diff --git a/themes/hugo-coder b/themes/hugo-coder deleted file mode 160000 index f69d6d6..0000000 --- a/themes/hugo-coder +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f69d6d6da728790a5f0bb1c5e2047174bc8f185c diff --git a/themes/hugo-coder/.editorconfig b/themes/hugo-coder/.editorconfig new file mode 100644 index 0000000..51c74a1 --- /dev/null +++ b/themes/hugo-coder/.editorconfig @@ -0,0 +1,29 @@ +# https://editorconfig.org + +# this file is the top-most editorconfig file +root = true + +# all files +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true + +# markdown files +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false + +# configuration files +[*.toml] +indent_size = 2 + +# web files +[*.{html,css,scss}] +indent_size = 2 + +[Makefile] +indent_style = tab diff --git a/themes/hugo-coder/.gitignore b/themes/hugo-coder/.gitignore new file mode 100644 index 0000000..2be26dd --- /dev/null +++ b/themes/hugo-coder/.gitignore @@ -0,0 +1,6 @@ +.idea +**/themes/ +exampleSite/public/ +exampleSite/resources/ +*.lock +public diff --git a/themes/hugo-coder/CONTRIBUTORS.md b/themes/hugo-coder/CONTRIBUTORS.md new file mode 100644 index 0000000..98c54b8 --- /dev/null +++ b/themes/hugo-coder/CONTRIBUTORS.md @@ -0,0 +1,148 @@ +# Contributors + +- [Chip Senkbeil](https://github.com/chipsenkbeil) +- [Dale Noe](https://github.com/dalenoe) +- [Gabor Nagy](https://github.com/Aigeruth) +- [Harry Khanna](https://github.com/hkhanna) +- [Ihor Dvoretskyi](https://github.com/idvoretskyi) +- [Jacob Wood](https://github.com/jacoblukewood) +- [Jan Baudisch](https://github.com/flyingP0tat0) +- [Jiri Hubacek](https://github.com/qeef) +- [Khosrow Moossavi](https://github.com/khos2ow) +- [Maikel](https://github.com/mbollemeijer) +- [MetBril](https://github.com/metbril) +- [Myles Johnson](https://github.com/MylesJohnson) +- [Niels Reijn](https://github.com/reijnn) +- [Padraic Renaghan](https://github.com/prenagha) +- [peterrus](https://github.com/peterrus) +- [Philipp Rintz](https://github.com/p-rintz) +- [Ralf Junghanns](https://github.com/rabbl) +- [rdhox](https://rdhox.io) +- [tobaloidee](https://github.com/Tobaloidee) +- [Tomasz Wąsiński](https://github.com/wasinski) +- [Vinícius dos Santos Oliveira](https://github.com/vinipsmaker) +- [Vlad Ionescu](https://github.com/Vlaaaaaaad) +- [Joseph Ting](https://github.com/josephting) +- [Abner Campanha](https://github.com/abnerpc) +- [Martin Kiesel](https://github.com/Kyslik) +- [John Tobin](https://www.johntobin.ie/) +- [Thomas Nys](https://thomasnys.com) +- [Piotr Januszewski](https://piojanu.github.io) +- [Artem Khvastunov](https://artspb.me) +- [Gabriel Nepomuceno](https://blog.nepomuceno.me) +- [Salvatore Giordano](https://salvatore-giordano.github.io) +- [Jeffrey Carpenter](https://uvolabs.me) +- [Paul Lettington](https://github.com/plett) +- [Thomas Vochten](https://github.com/thomasvochten) +- [Caspar Krieger](https://www.asparck.com) +- [D_DAndrew](https://d-dandrew.github.io) +- [Wataru Mizukami](https://github.com/tarumzu) +- [Yudi Widiyanto](https://github.com/yudiwdynto) +- [Łukasz Mróz](https://github.com/mrozlukasz) +- [Jia "Jay" Tan](https://github.com/j7an) +- [Ryan](https://github.com/alrayyes) +- [Naim A.](https://github.com/naim94a) +- [Alexander Rohde](https://github.com/a1x42) +- [Shreyansh Khajanchi](https://shreyanshja.in) +- [Lionel Brianto](https://lionel.brianto.dev) +- [Luis Zarate](https://github.com/jlzaratec) +- [Ariejan de Vroom](https://www.devroom.io) +- [Bobby Lindsey](https://bobbywlindsey.com) +- [José Mª Escartín](https://github.com/jme52) +- [John Schroeder](https://blog.schroedernet.software) +- [Tobias Lindberg](https://github.com/tobiasehlert) +- [KK](https://github.com/bebound) +- [Eli W. Hunter](https://github.com/elihunter173) +- [Víctor López](https://github.com/viticlick) +- [Anson VanDoren](https://github.com/anson-vandoren) +- [Michael Lynch](https://github.com/mtlynch) +- [FIGBERT](https://figbert.com/) +- [Yash Mehrotra](https://yashmehrotra.com) +- [Paolo Mainardi](https://paolomainardi.com) +- [Ka-Wai Lin](https://github.com/kwlin) +- [Piotr Orzechowski](https://orzechowski.tech) +- [Glenn Feunteun](https://github.com/gfeun) +- [Santiago González](https://github.com/netrules) +- [Codruț Constantin Gușoi](https://www.codrut.pro) +- [Clément Pannetier](https://clementpannetier.dev) +- [FantasticMao](https://github.com/FantasticMao) +- [Utkarsh Gupta](https://utkarsh2102.com) +- [Latiif Alsharif](https://latiif.se) +- [Endormi](https://endormi.io) +- [Rajiv Ranjan Singh](https://iamrajiv.github.io/) +- [Pakhomov Alexander](https://github.com/PakhomovAlexander) +- [Rhys Perry](https://rhysperry.com) +- [Arunvel Sriram](https://github.com/arunvelsriram) +- [Lorenzo Cameroni](https://github.com/came88) +- [Jared Sturdy](https://github.com/jsturdy) +- [Daniel Monteiro](https://github.com/dfamonteiro) +- [Dave Rolsky](https://github.com/autarch) +- [Joseph Sanders](https://github.com/jls83) +- [Rabin Adhikari](https://github.com/rabinadk1/) +- [Hussaini Zulkifli](https://github.com/hussaini/) +- [Ellison Leão](https://github.com/ellisonleao) +- [Lucas de Oliveira](https://github.com/lucas-dOliveira) +- [Jian Loong Liew](https://github.com/JianLoong) +- [earnest ma](https://github.com/earnestma) +- [TMineCola](https://github.com/tminecola) +- [Arafat Hasan](https://github.com/arafat-hasan) +- [YUJI](https://yuji.ne.jp/) +- [JaeSang Yoo](https://github.com/JSYoo5B) +- [tianheg](https://github.com/tianheg) +- [Felix](https://github.com/lazyyz) +- [Peter Duchnovsky](https://duchnovsky.com) +- [Alex Miranda](https://ammiranda.com) +- [Alphonse Mariya](https://github.com/alfunx) +- [Ziwei Pan](https://github.com/PanZiwei/) +- [Viktar Patotski](https://github.com/xp-vit) +- [cuso4-5h2o](https://www.cuso4.me) +- [freeformz](https://icanhazdowntime.org) +- [Roberto Gongora](https://yourfavourite.blog) +- [kuba86](https://kuba86.com) +- [Vladislav Matus](https://github.com/matusvla) +- [Kirill Feoktistov](https://feoktistoff.org) +- [leins275](https://github.com/LanskovNV) +- [Michael Weiss](https://mweiss.ch) +- [Simon Pai](https://github.com/simonpai) +- [Brenton Mallen](https://github.com/brentonmallen1) +- [Xiaoyang Luo](https://github.com/ccviolett/) +- [Michiel Appelman](https://appelman.se) +- [Mark Wood](https://digitalnotions.net) +- [Sam A.](https://samsapti.dev) +- [John Feminella](https://jxf.me) +- [zzsqwq](https://zzsqwq.cn) +- [George Tsiokos](https://george.tsiokos.com) +- [Eltjo](https://github.com/eltjo) +- [Saurmandal](https://saur.neocities.org) +- [Jneo8](https://github.com/jneo8) +- [Daniel Nduati](https://github.com/DanNduati) +- [Simon Hollingshead](https://github.com/simonhollingshead) +- [yangyangdaji](https://github.com/yangyangdaji) +- [xiaotianxt](https://github.com/xiaotianxt) +- [Nour Agha](https://github.com/nourkagha) +- [Brian Lachniet](https://github.com/blachniet) +- [ShortArrow](https://github.com/ShortArrow) +- [Martin Hellspong](https://github.com/marhel) +- [Robert Tucker](https://github.com/robertwtucker) +- [Michał Pawlik](https://michalp.net) +- [Kilian Kluge](https://github.com/ionicsolutions) +- [Jaroslaw Rozanski](https://jarekrozanski.eu) +- [Easton Man](https://github.com/eastonman) +- [Yiğit Altınay](https://altinay.xyz) +- [Fei Kong](https://github.com/alpha0422) +- [Ahmet Enes Bayraktar](https://github.com/aeb-dev) +- [Todor Bogosavljević](https://github.com/tbx1b) +- [Kemal Akkoyun](https://github.com/kakkoyun) +- [Igetin](https://github.com/Igetin) +- [Kirill Che.](https://github.com/g4s8) +- [iron3oxide](https://github.com/iron3oxide) +- [Jens Rantil](https://github.com/JensRantil) +- [Muqeet Malik](https://github.com/mmalik23) +- [Sammy44nts](https://github.com/sammy44nts) +- [Shaked8634](https://github.com/shaked8634) +- [Leo Heimann Ruiz](https://leo.heitmannruiz.org/) +- [Antoine "Toinux" Wam](https://github.com/itzwam) +- [Reberti Carvalho Soares](https://github.com/RebertiCS) +- [Andreas Deininger](https://github.com/deining) +- [Ardemium](https://github.com/ardemium) +- [Matt Ellery](https://github.com/matt-ellery) diff --git a/themes/hugo-coder/LICENSE.md b/themes/hugo-coder/LICENSE.md new file mode 100644 index 0000000..29dbd75 --- /dev/null +++ b/themes/hugo-coder/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2018 Luiz F. A. de Prá + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/themes/hugo-coder/Makefile b/themes/hugo-coder/Makefile new file mode 100644 index 0000000..8e0c3e4 --- /dev/null +++ b/themes/hugo-coder/Makefile @@ -0,0 +1,12 @@ +HUGO_BIN=hugo + +.PHONY: build demo release + +build: + $(HUGO_BIN) --themesDir=../.. --source=exampleSite + +demo: + $(HUGO_BIN) server -D --themesDir=../.. --source=exampleSite --bind 0.0.0.0 + +release: build + rm -rf ./resources && cp -r ./exampleSite/resources ./resources diff --git a/themes/hugo-coder/README.md b/themes/hugo-coder/README.md new file mode 100644 index 0000000..0dfdeec --- /dev/null +++ b/themes/hugo-coder/README.md @@ -0,0 +1,53 @@ +

+

+ + Hugo Theme Badge + + + MIT License Badge + +

+ +

+ + Hugo Coder Logo + +

+

+ +A simple and clean blog theme for [Hugo](https://gohugo.io/). + +![](images/screenshot.png) + +## Live Demo + +See [here](https://hugo-coder.netlify.app/). + +## Quick Start + +1. Add the repository into your Hugo Project repository as a submodule, `git submodule add https://github.com/luizdepra/hugo-coder.git themes/hugo-coder`. +2. Configure your `hugo.toml`. You can either use [this minimal configuration](https://github.com/luizdepra/hugo-coder/blob/main/docs/configurations.md#complete-example) as a base, or look for a complete explanation about all configurations [here](https://github.com/luizdepra/hugo-coder/blob/main/docs/configurations.md). The [`hugo.toml`](https://github.com/luizdepra/hugo-coder/blob/master/exampleSite/hugo.toml) inside the [`exampleSite`](https://github.com/luizdepra/hugo-coder/tree/master/exampleSite) is also a good reference. +3. Build your site with `hugo server` and see the result at `http://localhost:1313/`. + +## Documentation + +See the [`docs`](docs/home.md) folder. + +## License + +Coder is licensed under the [MIT license](https://github.com/luizdepra/hugo-coder/blob/master/LICENSE.md). + +## Maintenance + +This theme is maintained by its author [Luiz de Prá](https://github.com/luizdepra) with the help from these awesome [contributors](CONTRIBUTORS.md). + +## Sponsoring + +If you like my project or it was useful for you, consider supporting its development. Just: + +Buy Me A Coffee + +## Special Thanks + +- Gleen McComb, for his great [article](https://glennmccomb.com/articles/how-to-build-custom-hugo-pagination/) about custom pagination. +- All contributors, for every PR and Issue reported. diff --git a/themes/hugo-coder/archetypes/default.md b/themes/hugo-coder/archetypes/default.md new file mode 100644 index 0000000..c2de8e4 --- /dev/null +++ b/themes/hugo-coder/archetypes/default.md @@ -0,0 +1,6 @@ ++++ +draft = true +date = {{ .Date }} +title = "" +slug = "" ++++ diff --git a/themes/hugo-coder/archetypes/posts.md b/themes/hugo-coder/archetypes/posts.md new file mode 100644 index 0000000..76242f8 --- /dev/null +++ b/themes/hugo-coder/archetypes/posts.md @@ -0,0 +1,12 @@ ++++ +draft = true +date = {{ .Date }} +title = "" +description = "" +slug = "" +authors = [] +tags = [] +categories = [] +externalLink = "" +series = [] ++++ diff --git a/themes/hugo-coder/assets/js/coder.js b/themes/hugo-coder/assets/js/coder.js new file mode 100644 index 0000000..9b46cfc --- /dev/null +++ b/themes/hugo-coder/assets/js/coder.js @@ -0,0 +1,97 @@ +const body = document.body; +const darkModeToggle = document.getElementById('dark-mode-toggle'); +const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)'); + +// Check if user preference is set, if not check value of body class for light or dark else it means that colorscheme = auto +if (localStorage.getItem("colorscheme")) { + setTheme(localStorage.getItem("colorscheme")); +} else if (body.classList.contains('colorscheme-light') || body.classList.contains('colorscheme-dark')) { + setTheme(body.classList.contains("colorscheme-dark") ? "dark" : "light"); +} else { + setTheme(darkModeMediaQuery.matches ? "dark" : "light"); +} + +if (darkModeToggle) { + darkModeToggle.addEventListener('click', () => { + let theme = body.classList.contains("colorscheme-dark") ? "light" : "dark"; + setTheme(theme); + rememberTheme(theme); + }); +} + +darkModeMediaQuery.addListener((event) => { + setTheme(event.matches ? "dark" : "light"); +}); + +document.addEventListener("DOMContentLoaded", function () { + let node = document.querySelector('.preload-transitions'); + node.classList.remove('preload-transitions'); +}); + +function setTheme(theme) { + body.classList.remove('colorscheme-auto'); + let inverse = theme === 'dark' ? 'light' : 'dark'; + body.classList.remove('colorscheme-' + inverse); + body.classList.add('colorscheme-' + theme); + document.documentElement.style['color-scheme'] = theme; + + function waitForElm(selector) { + return new Promise(resolve => { + if (document.querySelector(selector)) { + return resolve(document.querySelector(selector)); + } + + const observer = new MutationObserver(mutations => { + if (document.querySelector(selector)) { + resolve(document.querySelector(selector)); + observer.disconnect(); + } + }); + + observer.observe(document.body, { + childList: true, + subtree: true + }); + }); + } + + if (theme === 'dark') { + const message = { + type: 'set-theme', + theme: 'github-dark' + }; + waitForElm('.utterances-frame').then((iframe) => { + iframe.contentWindow.postMessage(message, 'https://utteranc.es'); + }) + + } + else { + const message = { + type: 'set-theme', + theme: 'github-light' + }; + waitForElm('.utterances-frame').then((iframe) => { + iframe.contentWindow.postMessage(message, 'https://utteranc.es'); + }) + + } + + function sendMessage(message) { + const iframe = document.querySelector('iframe.giscus-frame'); + if (!iframe) return; + iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app'); + } + sendMessage({ + setConfig: { + theme: theme, + }, + }); + + // Create and send event + const event = new Event('themeChanged'); + document.dispatchEvent(event); +} + +function rememberTheme(theme) { + localStorage.setItem('colorscheme', theme); +} diff --git a/themes/hugo-coder/assets/js/purify.min.js b/themes/hugo-coder/assets/js/purify.min.js new file mode 100644 index 0000000..644aca0 --- /dev/null +++ b/themes/hugo-coder/assets/js/purify.min.js @@ -0,0 +1,3 @@ +/*! @license DOMPurify 2.4.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.1/LICENSE */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,o,a){return r=n()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var a=new(Function.bind.apply(e,o));return r&&t(a,r.prototype),a},r.apply(null,arguments)}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;o/gm),Y=f(/\${[\w\W]*}/gm),$=f(/^data-[\-\w.\u00B7-\uFFFF]/),K=f(/^aria-[\-\w]+$/),V=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),X=f(/^(?:\w+script|data):/i),Z=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),J=f(/^html$/i),Q=function(){return"undefined"==typeof window?null:window},ee=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};var te=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q(),r=function(e){return t(e)};if(r.version="2.4.1",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;var a=n.document,i=n.document,l=n.DocumentFragment,c=n.HTMLTemplateElement,u=n.Node,s=n.Element,f=n.NodeFilter,p=n.NamedNodeMap,d=void 0===p?n.NamedNodeMap||n.MozNamedAttrMap:p,h=n.HTMLFormElement,g=n.DOMParser,y=n.trustedTypes,O=s.prototype,te=R(O,"cloneNode"),ne=R(O,"nextSibling"),re=R(O,"childNodes"),oe=R(O,"parentNode");if("function"==typeof c){var ae=i.createElement("template");ae.content&&ae.content.ownerDocument&&(i=ae.content.ownerDocument)}var ie=ee(y,a),le=ie?ie.createHTML(""):"",ce=i,ue=ce.implementation,se=ce.createNodeIterator,me=ce.createDocumentFragment,fe=ce.getElementsByTagName,pe=a.importNode,de={};try{de=L(i).documentMode?i.documentMode:{}}catch(e){}var he={};r.isSupported="function"==typeof oe&&ue&&void 0!==ue.createHTMLDocument&&9!==de;var ge,ye,be=W,ve=q,Te=Y,Ne=$,Ae=K,Ee=X,we=Z,Se=V,xe=null,_e=D({},[].concat(o(M),o(C),o(I),o(U),o(z))),ke=null,Oe=D({},[].concat(o(P),o(j),o(B),o(G))),De=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,Re=null,Me=!0,Ce=!0,Ie=!1,Fe=!1,Ue=!1,He=!1,ze=!1,Pe=!1,je=!1,Be=!1,Ge=!0,We=!1,qe="user-content-",Ye=!0,$e=!1,Ke={},Ve=null,Xe=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ze=null,Je=D({},["audio","video","img","source","image","track"]),Qe=null,et=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",rt="http://www.w3.org/1999/xhtml",ot=rt,at=!1,it=null,lt=D({},[tt,nt,rt],A),ct=["application/xhtml+xml","text/html"],ut="text/html",st=null,mt=i.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},pt=function(t){st&&st===t||(t&&"object"===e(t)||(t={}),t=L(t),ge=ge=-1===ct.indexOf(t.PARSER_MEDIA_TYPE)?ut:t.PARSER_MEDIA_TYPE,ye="application/xhtml+xml"===ge?A:N,xe="ALLOWED_TAGS"in t?D({},t.ALLOWED_TAGS,ye):_e,ke="ALLOWED_ATTR"in t?D({},t.ALLOWED_ATTR,ye):Oe,it="ALLOWED_NAMESPACES"in t?D({},t.ALLOWED_NAMESPACES,A):lt,Qe="ADD_URI_SAFE_ATTR"in t?D(L(et),t.ADD_URI_SAFE_ATTR,ye):et,Ze="ADD_DATA_URI_TAGS"in t?D(L(Je),t.ADD_DATA_URI_TAGS,ye):Je,Ve="FORBID_CONTENTS"in t?D({},t.FORBID_CONTENTS,ye):Xe,Le="FORBID_TAGS"in t?D({},t.FORBID_TAGS,ye):{},Re="FORBID_ATTR"in t?D({},t.FORBID_ATTR,ye):{},Ke="USE_PROFILES"in t&&t.USE_PROFILES,Me=!1!==t.ALLOW_ARIA_ATTR,Ce=!1!==t.ALLOW_DATA_ATTR,Ie=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=t.SAFE_FOR_TEMPLATES||!1,Ue=t.WHOLE_DOCUMENT||!1,Pe=t.RETURN_DOM||!1,je=t.RETURN_DOM_FRAGMENT||!1,Be=t.RETURN_TRUSTED_TYPE||!1,ze=t.FORCE_BODY||!1,Ge=!1!==t.SANITIZE_DOM,We=t.SANITIZE_NAMED_PROPS||!1,Ye=!1!==t.KEEP_CONTENT,$e=t.IN_PLACE||!1,Se=t.ALLOWED_URI_REGEXP||Se,ot=t.NAMESPACE||rt,t.CUSTOM_ELEMENT_HANDLING&&ft(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ft(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Fe&&(Ce=!1),je&&(Pe=!0),Ke&&(xe=D({},o(z)),ke=[],!0===Ke.html&&(D(xe,M),D(ke,P)),!0===Ke.svg&&(D(xe,C),D(ke,j),D(ke,G)),!0===Ke.svgFilters&&(D(xe,I),D(ke,j),D(ke,G)),!0===Ke.mathMl&&(D(xe,U),D(ke,B),D(ke,G))),t.ADD_TAGS&&(xe===_e&&(xe=L(xe)),D(xe,t.ADD_TAGS,ye)),t.ADD_ATTR&&(ke===Oe&&(ke=L(ke)),D(ke,t.ADD_ATTR,ye)),t.ADD_URI_SAFE_ATTR&&D(Qe,t.ADD_URI_SAFE_ATTR,ye),t.FORBID_CONTENTS&&(Ve===Xe&&(Ve=L(Ve)),D(Ve,t.FORBID_CONTENTS,ye)),Ye&&(xe["#text"]=!0),Ue&&D(xe,["html","head","body"]),xe.table&&(D(xe,["tbody"]),delete Le.tbody),m&&m(t),st=t)},dt=D({},["mi","mo","mn","ms","mtext"]),ht=D({},["foreignobject","desc","title","annotation-xml"]),gt=D({},["title","style","font","a","script"]),yt=D({},C);D(yt,I),D(yt,F);var bt=D({},U);D(bt,H);var vt=function(e){var t=oe(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});var n=N(e.tagName),r=N(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===rt?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===r||dt[r]):Boolean(yt[n]):e.namespaceURI===tt?t.namespaceURI===rt?"math"===n:t.namespaceURI===nt?"math"===n&&ht[r]:Boolean(bt[n]):e.namespaceURI===rt?!(t.namespaceURI===nt&&!ht[r])&&(!(t.namespaceURI===tt&&!dt[r])&&(!bt[n]&&(gt[n]||!yt[n]))):!("application/xhtml+xml"!==ge||!it[e.namespaceURI]))},Tt=function(e){T(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=le}catch(t){e.remove()}}},Nt=function(e,t){try{T(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){T(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ke[e])if(Pe||je)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},At=function(e){var t,n;if(ze)e=""+e;else{var r=E(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===ge&&ot===rt&&(e=''+e+"");var o=ie?ie.createHTML(e):e;if(ot===rt)try{t=(new g).parseFromString(o,ge)}catch(e){}if(!t||!t.documentElement){t=ue.createDocument(ot,"template",null);try{t.documentElement.innerHTML=at?"":o}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),ot===rt?fe.call(t,Ue?"html":"body")[0]:Ue?t.documentElement:a},Et=function(e){return se.call(e.ownerDocument||e,e,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null,!1)},wt=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function(t){return"object"===e(u)?t instanceof u:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},xt=function(e,t,n){he[e]&&b(he[e],(function(e){e.call(r,t,n,st)}))},_t=function(e){var t;if(xt("beforeSanitizeElements",e,null),wt(e))return Tt(e),!0;if(_(/[\u0080-\uFFFF]/,e.nodeName))return Tt(e),!0;var n=ye(e.nodeName);if(xt("uponSanitizeElement",e,{tagName:n,allowedTags:xe}),e.hasChildNodes()&&!St(e.firstElementChild)&&(!St(e.content)||!St(e.content.firstElementChild))&&_(/<[/\w]/g,e.innerHTML)&&_(/<[/\w]/g,e.textContent))return Tt(e),!0;if("select"===n&&_(/