Welcome to mirror list, hosted at ThFree Co, Russian Federation.

theme.min.js « js « assets - github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6c2eab6b5d0a5f97200f747782f882a607cb7a7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,b){a.raw=b;return a};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};
$jscomp.arrayFromIterator=function(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c};$jscomp.arrayFromIterable=function(a){return a instanceof Array?a:$jscomp.arrayFromIterator($jscomp.makeIterator(a))};$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};
$jscomp.global=$jscomp.getGlobal(this);$jscomp.checkEs6ConformanceViaProxy=function(){try{var a={},b=Object.create(new $jscomp.global.Proxy(a,{get:function(c,d,e){return c==a&&"q"==d&&e==b}}));return!0===b.q}catch(c){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;
$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;
$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,b){var c=$jscomp.propertyToPolyfillSymbol[b];if(null==c)return a[b];c=a[c];return void 0!==c?c:a[b]};$jscomp.polyfill=function(a,b,c,d){b&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,b,c,d):$jscomp.polyfillUnisolated(a,b,c,d))};
$jscomp.polyfillUnisolated=function(a,b,c,d){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))return;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})};
$jscomp.polyfillIsolated=function(a,b,c,d){var e=a.split(".");a=1===e.length;d=e[0];d=!a&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var l=0;l<e.length-1;l++){var k=e[l];if(!(k in d))return;d=d[k]}e=e[e.length-1];c=$jscomp.IS_SYMBOL_NATIVE&&"es6"===c?d[e]:null;b=b(c);null!=b&&(a?$jscomp.defineProperty($jscomp.polyfills,e,{configurable:!0,writable:!0,value:b}):b!==c&&($jscomp.propertyToPolyfillSymbol[e]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(e):$jscomp.POLYFILL_PREFIX+e,e=
$jscomp.propertyToPolyfillSymbol[e],$jscomp.defineProperty(d,e,{configurable:!0,writable:!0,value:b})))};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(a){if(a)return a;var b=function(e,l){this.$jscomp$symbol$id_=e;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:l})};b.prototype.toString=function(){return this.$jscomp$symbol$id_};var c=0,d=function(e){if(this instanceof d)throw new TypeError("Symbol is not a constructor");return new b("jscomp_symbol_"+(e||"")+"_"+c++,e)};return d},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=$jscomp.global[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&$jscomp.defineProperty(d.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return a},"es6",
"es3");$jscomp.iteratorPrototype=function(a){a={next:a};a[Symbol.iterator]=function(){return this};return a};$jscomp.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};
$jscomp.polyfill("WeakMap",function(a){function b(){if(!a||!Object.seal)return!1;try{var f=Object.seal({}),h=Object.seal({}),m=new a([[f,2],[h,3]]);if(2!=m.get(f)||3!=m.get(h))return!1;m.delete(f);m.set(h,4);return!m.has(f)&&4==m.get(h)}catch(u){return!1}}function c(){}function d(f){var h=typeof f;return"object"===h&&null!==f||"function"===h}function e(f){if(!$jscomp.owns(f,k)){var h=new c;$jscomp.defineProperty(f,k,{value:h})}}function l(f){if(!$jscomp.ISOLATE_POLYFILLS){var h=Object[f];h&&(Object[f]=
function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return h(m)})}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(a&&$jscomp.ES6_CONFORMANCE)return a}else if(b())return a;var k="$jscomp_hidden_"+Math.random();l("freeze");l("preventExtensions");l("seal");var n=0,g=function(f){this.id_=(n+=Math.random()+1).toString();if(f){f=$jscomp.makeIterator(f);for(var h;!(h=f.next()).done;)h=h.value,this.set(h[0],h[1])}};g.prototype.set=function(f,h){if(!d(f))throw Error("Invalid WeakMap key");
e(f);if(!$jscomp.owns(f,k))throw Error("WeakMap key fail: "+f);f[k][this.id_]=h;return this};g.prototype.get=function(f){return d(f)&&$jscomp.owns(f,k)?f[k][this.id_]:void 0};g.prototype.has=function(f){return d(f)&&$jscomp.owns(f,k)&&$jscomp.owns(f[k],this.id_)};g.prototype.delete=function(f){return d(f)&&$jscomp.owns(f,k)&&$jscomp.owns(f[k],this.id_)?delete f[k][this.id_]:!1};return g},"es6","es3");$jscomp.MapEntry=function(){};
$jscomp.polyfill("Map",function(a){function b(){if($jscomp.ASSUME_NO_NATIVE_MAP||!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var g=Object.seal({x:4}),f=new a($jscomp.makeIterator([[g,"s"]]));if("s"!=f.get(g)||1!=f.size||f.get({x:4})||f.set({x:4},"t")!=f||2!=f.size)return!1;var h=f.entries(),m=h.next();if(m.done||m.value[0]!=g||"s"!=m.value[1])return!1;m=h.next();return m.done||4!=m.value[0].x||"t"!=m.value[1]||!h.next().done?!1:!0}catch(u){return!1}}
if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(a&&$jscomp.ES6_CONFORMANCE)return a}else if(b())return a;var c=new WeakMap,d=function(g){this.data_={};this.head_=k();this.size=0;if(g){g=$jscomp.makeIterator(g);for(var f;!(f=g.next()).done;)f=f.value,this.set(f[0],f[1])}};d.prototype.set=function(g,f){g=0===g?0:g;var h=e(this,g);h.list||(h.list=this.data_[h.id]=[]);h.entry?h.entry.value=f:(h.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:g,value:f},h.list.push(h.entry),
this.head_.previous.next=h.entry,this.head_.previous=h.entry,this.size++);return this};d.prototype.delete=function(g){g=e(this,g);return g.entry&&g.list?(g.list.splice(g.index,1),g.list.length||delete this.data_[g.id],g.entry.previous.next=g.entry.next,g.entry.next.previous=g.entry.previous,g.entry.head=null,this.size--,!0):!1};d.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=k();this.size=0};d.prototype.has=function(g){return!!e(this,g).entry};d.prototype.get=function(g){return(g=
e(this,g).entry)&&g.value};d.prototype.entries=function(){return l(this,function(g){return[g.key,g.value]})};d.prototype.keys=function(){return l(this,function(g){return g.key})};d.prototype.values=function(){return l(this,function(g){return g.value})};d.prototype.forEach=function(g,f){for(var h=this.entries(),m;!(m=h.next()).done;)m=m.value,g.call(f,m[1],m[0],this)};d.prototype[Symbol.iterator]=d.prototype.entries;var e=function(g,f){var h=f&&typeof f;"object"==h||"function"==h?c.has(f)?h=c.get(f):
(h=""+ ++n,c.set(f,h)):h="p_"+f;var m=g.data_[h];if(m&&$jscomp.owns(g.data_,h))for(g=0;g<m.length;g++){var u=m[g];if(f!==f&&u.key!==u.key||f===u.key)return{id:h,list:m,index:g,entry:u}}return{id:h,list:m,index:-1,entry:void 0}},l=function(g,f){var h=g.head_;return $jscomp.iteratorPrototype(function(){if(h){for(;h.head!=g.head_;)h=h.previous;for(;h.next!=h.head;)return h=h.next,{done:!1,value:f(h)};h=null}return{done:!0,value:void 0}})},k=function(){var g={};return g.previous=g.next=g.head=g},n=0;
return d},"es6","es3");
$jscomp.polyfill("Set",function(a){function b(){if($jscomp.ASSUME_NO_NATIVE_SET||!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var d=Object.seal({x:4}),e=new a($jscomp.makeIterator([d]));if(!e.has(d)||1!=e.size||e.add(d)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var l=e.entries(),k=l.next();if(k.done||k.value[0]!=d||k.value[1]!=d)return!1;k=l.next();return k.done||k.value[0]==d||4!=k.value[0].x||k.value[1]!=k.value[0]?!1:l.next().done}catch(n){return!1}}
if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(a&&$jscomp.ES6_CONFORMANCE)return a}else if(b())return a;var c=function(d){this.map_=new Map;if(d){d=$jscomp.makeIterator(d);for(var e;!(e=d.next()).done;)this.add(e.value)}this.size=this.map_.size};c.prototype.add=function(d){d=0===d?0:d;this.map_.set(d,d);this.size=this.map_.size;return this};c.prototype.delete=function(d){d=this.map_.delete(d);this.size=this.map_.size;return d};c.prototype.clear=function(){this.map_.clear();this.size=0};c.prototype.has=
function(d){return this.map_.has(d)};c.prototype.entries=function(){return this.map_.entries()};c.prototype.values=function(){return this.map_.values()};c.prototype.keys=c.prototype.values;c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(d,e){var l=this;this.map_.forEach(function(k){return d.call(e,k,k,l)})};return c},"es6","es3");$jscomp.polyfill("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)$jscomp.owns(b,d)&&c.push(b[d]);return c}},"es8","es3");
$jscomp.iteratorFromArray=function(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var l=c++;return{value:b(l,a[l]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(b){return b})}},"es6","es3");var Util=function(){};Util.prototype.forEach=function(a,b){a=a||[];for(var c=0;c<a.length;c++)b(a[c])};
Util.prototype.getScrollTop=function(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop};Util.prototype.isMobile=function(){return window.matchMedia("only screen and (max-width: 680px)").matches};Util.prototype.isTocStatic=function(){return window.matchMedia("only screen and (max-width: 960px)").matches};
Util.prototype.animateCSS=function(a,b,c,d){Array.isArray(b)||(b=[b]);a.classList.add.apply(a.classList,["animated"].concat($jscomp.arrayFromIterable(b)));var e=function(){a.classList.remove.apply(a.classList,["animated"].concat($jscomp.arrayFromIterable(b)));a.removeEventListener("animationend",e);"function"===typeof d&&d()};c||a.addEventListener("animationend",e,!1)};
var Theme=function(){this.config=window.config;this.data=this.config.data;this.isDark="dark"===document.body.getAttribute("theme");this.util=new Util;this.oldScrollTop=this.newScrollTop=this.util.getScrollTop();this.scrollEventSet=new Set;this.resizeEventSet=new Set;this.switchThemeEventSet=new Set;this.clickMaskEventSet=new Set;window.objectFitImages&&objectFitImages()};
Theme.prototype.initSVGIcon=function(){this.util.forEach(document.querySelectorAll("[data-svg-src]"),function(a){fetch(a.getAttribute("data-svg-src")).then(function(b){return b.text()}).then(function(b){var c=document.createElement("div");c.insertAdjacentHTML("afterbegin",b);b=c.firstChild;b.setAttribute("data-svg-src",a.getAttribute("data-svg-src"));b.classList.add("icon");c=b.getElementsByTagName("title");c.length&&b.removeChild(c[0]);a.parentElement.replaceChild(b,a)}).catch(function(b){console.error(b)})})};
Theme.prototype.initTwemoji=function(){this.config.twemoji&&twemoji.parse(document.body)};Theme.prototype.initMenuMobile=function(){var a=document.getElementById("menu-toggle-mobile"),b=document.getElementById("menu-mobile");a.addEventListener("click",function(){document.body.classList.toggle("blur");a.classList.toggle("active");b.classList.toggle("active")},!1);this._menuMobileOnClickMask=this._menuMobileOnClickMask||function(){a.classList.remove("active");b.classList.remove("active")};this.clickMaskEventSet.add(this._menuMobileOnClickMask)};
Theme.prototype.initSwitchTheme=function(){var a=this;this.util.forEach(document.getElementsByClassName("theme-switch"),function(b){b.addEventListener("click",function(){"dark"===document.body.getAttribute("theme")?document.body.setAttribute("theme","light"):document.body.setAttribute("theme","dark");a.isDark=!a.isDark;window.localStorage&&localStorage.setItem("theme",a.isDark?"dark":"light");window.REMARK42.changeTheme("dark"===document.body.getAttribute("theme")?"dark":"light");for(var c=$jscomp.makeIterator(a.switchThemeEventSet),
d=c.next();!d.done;d=c.next())d=d.value,d()},!1)})};
Theme.prototype.initSearch=function(){var a=this,b=this.config.search,c=this.util.isMobile();if(!(!b||c&&this._searchMobileOnce||!c&&this._searchDesktopOnce)){var d=b.maxResultLength?b.maxResultLength:10,e=b.snippetLength?b.snippetLength:50,l=b.highlightTag?b.highlightTag:"em",k=c?"mobile":"desktop",n=document.getElementById("header-"+k),g=document.getElementById("search-input-"+k),f=document.getElementById("search-toggle-"+k),h=document.getElementById("search-loading-"+k),m=document.getElementById("search-clear-"+
k);c?(this._searchMobileOnce=!0,g.addEventListener("focus",function(){document.body.classList.add("blur");n.classList.add("open")},!1),document.getElementById("search-cancel-mobile").addEventListener("click",function(){n.classList.remove("open");document.body.classList.remove("blur");document.getElementById("menu-toggle-mobile").classList.remove("active");document.getElementById("menu-mobile").classList.remove("active");h.style.display="none";m.style.display="none";a._searchMobile&&a._searchMobile.autocomplete.setVal("")},
!1),m.addEventListener("click",function(){m.style.display="none";a._searchMobile&&a._searchMobile.autocomplete.setVal("")},!1),this._searchMobileOnClickMask=this._searchMobileOnClickMask||function(){n.classList.remove("open");h.style.display="none";m.style.display="none";a._searchMobile&&a._searchMobile.autocomplete.setVal("")},this.clickMaskEventSet.add(this._searchMobileOnClickMask)):(this._searchDesktopOnce=!0,f.addEventListener("click",function(){document.body.classList.add("blur");n.classList.add("open");
g.focus()},!1),m.addEventListener("click",function(){m.style.display="none";a._searchDesktop&&a._searchDesktop.autocomplete.setVal("")},!1),this._searchDesktopOnClickMask=this._searchDesktopOnClickMask||function(){n.classList.remove("open");h.style.display="none";m.style.display="none";a._searchDesktop&&a._searchDesktop.autocomplete.setVal("")},this.clickMaskEventSet.add(this._searchDesktopOnClickMask));g.addEventListener("input",function(){m.style.display=""===g.value?"none":"inline"},!1);var u=
function(){var w=autocomplete("#search-input-"+k,{hint:!1,autoselect:!0,dropdownMenuContainer:"#search-dropdown-"+k,clearOnSelected:!0,cssClasses:{noPrefix:!0},debug:!0},{name:"search",source:function(p,D){h.style.display="inline";m.style.display="none";var z=function(r){h.style.display="none";m.style.display="inline";D(r)};if("lunr"===b.type){var C=function(){lunr.queryHandler&&(p=lunr.queryHandler(p));var r={};a._index.search(p).forEach(function(t){var x=t.matchData.metadata;t=a._indexData[t.ref];
var v=t.uri,E=t.title,A=t.content;if(!r[v]){var B=0;Object.values(x).forEach(function(y){if(y=y.content)if(y=y.position[0][0],y<B||0===B)B=y});B-=e/5;0<B?(B+=A.substr(B,20).lastIndexOf(" ")+1,A="..."+A.substr(B,e)):A=A.substr(0,e);Object.keys(x).forEach(function(y){E=E.replace(new RegExp("("+y+")","gi"),"<"+l+">$1</"+l+">");A=A.replace(new RegExp("("+y+")","gi"),"<"+l+">$1</"+l+">")});r[v]={uri:v,title:E,date:t.date,context:A}}});return Object.values(r).slice(0,d)};a._index?z(C()):fetch(b.lunrIndexURL).then(function(r){return r.json()}).then(function(r){var t=
{};a._index=lunr(function(){var x=this;b.lunrLanguageCode&&this.use(lunr[b.lunrLanguageCode]);this.ref("objectID");this.field("title",{boost:50});this.field("tags",{boost:20});this.field("categories",{boost:20});this.field("content",{boost:10});this.metadataWhitelist=["position"];r.forEach(function(v){t[v.objectID]=v;x.add(v)})});a._indexData=t;z(C())}).catch(function(r){console.error(r);z([])})}else"algolia"===b.type&&(a._algoliaIndex=a._algoliaIndex||algoliasearch(b.algoliaAppID,b.algoliaSearchKey).initIndex(b.algoliaIndex),
a._algoliaIndex.search(p,{offset:0,length:8*d,attributesToHighlight:["title"],attributesToSnippet:["content:"+e],highlightPreTag:"<"+l+">",highlightPostTag:"</"+l+">"}).then(function(r){var t={};r.hits.forEach(function(x){var v=x.uri,E=x._snippetResult.content;t[v]&&t[v].context.length>E.value||(t[v]={uri:v,title:x._highlightResult.title.value,date:x.date,context:E.value})});z(Object.values(t).slice(0,d))}).catch(function(r){console.error(r);z([])}))},templates:{suggestion:function(p){return'<div><span class="suggestion-title">'+
p.title+'</span><span class="suggestion-date">'+p.date+'</span></div><div class="suggestion-context">'+p.context+"</div>"},empty:function(p){return'<div class="search-empty">'+b.noResultsFound+': <span class="search-query">"'+p.query+'"</span></div>'},footer:function(p){p="algolia"===b.type?{searchType:"algolia",icon:'<i class="fab fa-algolia fa-fw"></i>',href:"https://www.algolia.com/"}:{searchType:"Lunr.js",icon:"",href:"https://lunrjs.com/"};return'<div class="search-footer">Search by <a href="'+
p.href+'" rel="noopener noreffer" target="_blank">'+p.icon+" "+p.searchType+"</a></div>"}}});w.on("autocomplete:selected",function(p,D,z,C){window.location.assign(D.uri)});c?a._searchMobile=w:a._searchDesktop=w};if(b.lunrSegmentitURL&&!document.getElementById("lunr-segmentit")){var q=document.createElement("script");q.id="lunr-segmentit";q.type="text/javascript";q.src=b.lunrSegmentitURL;q.async=!0;q.readyState?q.onreadystatechange=function(){if("loaded"==q.readyState||"complete"==q.readyState)q.onreadystatechange=
null,u()}:q.onload=function(){u()};document.body.appendChild(q)}else u()}};Theme.prototype.initDetails=function(){this.util.forEach(document.getElementsByClassName("details"),function(a){a.getElementsByClassName("details-summary")[0].addEventListener("click",function(){a.classList.toggle("open")},!1)})};Theme.prototype.initLightGallery=function(){this.config.lightGallery&&lightGallery(document.getElementById("content"),this.config.lightGallery)};
Theme.prototype.initHighlight=function(){var a=this;this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function(b){var c=document.createElement("div");c.className=b.className;var d=document.createElement("table");c.appendChild(d);var e=document.createElement("tbody");d.appendChild(e);d=document.createElement("tr");e.appendChild(d);e=document.createElement("td");d.appendChild(e);b.parentElement.replaceChild(c,b);e.appendChild(b)});this.util.forEach(document.querySelectorAll(".highlight > .chroma"),
function(b){var c=b.querySelectorAll("pre.chroma > code");if(c.length){var d=c[c.length-1];c=document.createElement("div");c.className="code-header "+d.className.toLowerCase();var e=document.createElement("span");e.classList.add("code-title");e.insertAdjacentHTML("afterbegin",'<i class="arrow fas fa-chevron-right fa-fw"></i>');e.addEventListener("click",function(){b.classList.toggle("open")},!1);c.appendChild(e);e=document.createElement("span");e.insertAdjacentHTML("afterbegin",'<i class="fas fa-ellipsis-h fa-fw"></i>');
e.classList.add("ellipses");e.addEventListener("click",function(){b.classList.add("open")},!1);c.appendChild(e);e=document.createElement("span");e.insertAdjacentHTML("afterbegin",'<i class="far fa-copy fa-fw"></i>');e.classList.add("copy");var l=d.innerText;(0>a.config.code.maxShownLines||l.split("\n").length<a.config.code.maxShownLines+2)&&b.classList.add("open");a.config.code.copyTitle&&(e.setAttribute("data-clipboard-text",l),e.title=a.config.code.copyTitle,(new ClipboardJS(e)).on("success",function(k){a.util.animateCSS(d,
"flash")}),c.appendChild(e));b.insertBefore(c,b.firstChild)}})};Theme.prototype.initTable=function(){this.util.forEach(document.querySelectorAll(".single table"),function(a){var b=document.createElement("div");b.className="table-wrapper";a.parentElement.replaceChild(b,a);b.appendChild(a)})};Theme.prototype.initHeaderLink=function(){for(var a=1;6>=a;a++)this.util.forEach(document.querySelectorAll("h"+a),function(b){b.classList.add("headerLink");b.insertAdjacentHTML("afterbegin",'<a href="#'+b.id+'" class="header-mark"></a>')})};
Theme.prototype.initToc=function(){var a=this,b=document.getElementById("TableOfContents");if(null!==b)if(document.getElementById("toc-static").getAttribute("data-kept")||this.util.isTocStatic()){var c=document.getElementById("toc-content-static");b.parentElement!==c&&(b.parentElement.removeChild(b),c.appendChild(b));this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{c=document.getElementById("toc-content-auto");b.parentElement!==c&&(b.parentElement.removeChild(b),c.appendChild(b));
var d=document.getElementById("toc-auto");c=document.getElementsByClassName("content-block")[0];var e=c.getBoundingClientRect();d.style.left=e.left+e.width+20+"px";d.style.maxWidth=c.getBoundingClientRect().left-20+314+"px";d.style.visibility="visible";var l=b.querySelectorAll("a:first-child"),k=b.getElementsByTagName("li"),n=document.getElementsByClassName("headerLink"),g="normal"!==document.body.getAttribute("data-header-desktop"),f=document.getElementById("header-desktop").offsetHeight,h=20+(g?
f:0),m=d.offsetTop,u=m-h+(g?0:f);this._tocOnScroll=this._tocOnScroll||function(){var q=document.getElementById("toc-final").offsetTop-d.getBoundingClientRect().height,w=q-h+(g?0:f);a.newScrollTop<u?(d.style.position="absolute",d.style.top=m+"px"):a.newScrollTop>w?(d.style.position="absolute",d.style.top=q+"px"):(d.style.position="fixed",d.style.top=h+"px");a.util.forEach(l,function(C){C.classList.remove("active")});a.util.forEach(k,function(C){C.classList.remove("has-active")});q=20+(g?f:0);w=n.length-
1;for(var p=0;p<n.length-1;p++){var D=n[p].getBoundingClientRect().top,z=n[p+1].getBoundingClientRect().top;if(0===p&&D>q||D<=q&&z>q){w=p;break}}if(-1!==w)for(l[w].classList.add("active"),q=l[w].parentElement;q!==b;)q.classList.add("has-active"),q=q.parentElement.parentElement};this._tocOnScroll();this.scrollEventSet.add(this._tocOnScroll)}};Theme.prototype.initMath=function(){this.config.math&&renderMathInElement(document.body,this.config.math)};
Theme.prototype.initMermaid=function(){var a=this,b=document.getElementsByClassName("mermaid");b.length&&(mermaid.initialize({startOnLoad:!1,theme:"null"}),this.util.forEach(b,function(c){mermaid.mermaidAPI.render("svg-"+c.id,a.data[c.id],function(d){c.insertAdjacentHTML("afterbegin",d)},c)}))};
Theme.prototype.initEcharts=function(){var a=this;this._echartsOnSwitchTheme=this._echartsOnSwitchTheme||function(){a._echartsArr=a._echartsArr||[];for(var b=0;b<a._echartsArr.length;b++)a._echartsArr[b].dispose();a._echartsArr=[];a.util.forEach(document.getElementsByClassName("echarts"),function(c){var d=echarts.init(c,a.isDark?"dark":"macarons",{renderer:"svg"});d.setOption(JSON.parse(a.data[c.id]));a._echartsArr.push(d)})};this.switchThemeEventSet.add(this._echartsOnSwitchTheme);this._echartsOnSwitchTheme();
this._echartsOnResize=this._echartsOnResize||function(){for(var b=0;b<a._echartsArr.length;b++)a._echartsArr[b].resize()};this.resizeEventSet.add(this._echartsOnResize)};
Theme.prototype.initMapbox=function(){var a=this;this.config.mapbox&&(mapboxgl.accessToken=this.config.mapbox.accessToken,mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin),this._mapboxArr=this._mapboxArr||[],this.util.forEach(document.getElementsByClassName("mapbox"),function(b){var c=a.data[b.id],d=c.lng,e=c.lat,l=c.lightStyle,k=c.darkStyle,n=c.marked,g=c.navigation,f=c.geolocate,h=c.scale,m=c.fullscreen;b=new mapboxgl.Map({container:b,center:[d,e],zoom:c.zoom,minZoom:.2,style:a.isDark?
k:l,attributionControl:!1});n&&(new mapboxgl.Marker).setLngLat([d,e]).addTo(b);g&&b.addControl(new mapboxgl.NavigationControl,"bottom-right");f&&b.addControl(new mapboxgl.GeolocateControl({positionOptions:{enableHighAccuracy:!0},showUserLocation:!0,trackUserLocation:!0}),"bottom-right");h&&b.addControl(new mapboxgl.ScaleControl);m&&b.addControl(new mapboxgl.FullscreenControl);b.addControl(new MapboxLanguage);a._mapboxArr.push(b)}),this._mapboxOnSwitchTheme=this._mapboxOnSwitchTheme||function(){a.util.forEach(a._mapboxArr,
function(b){var c=b.getContainer(),d=a.data[c.id];c=d.lightStyle;d=d.darkStyle;b.setStyle(a.isDark?d:c);b.addControl(new MapboxLanguage)})},this.switchThemeEventSet.add(this._mapboxOnSwitchTheme))};
Theme.prototype.initTypeit=function(){var a=this;if(this.config.typeit){var b=this.config.typeit,c=b.speed?b.speed:100,d=b.cursorSpeed?b.cursorSpeed:1E3,e=b.cursorChar?b.cursorChar:"|";Object.values(b.data).forEach(function(l){var k=function(n){var g=l[n],f=(new TypeIt("#"+g,{strings:a.data[g],speed:c,lifeLike:!0,cursorSpeed:d,cursorChar:e,waitUntilVisible:!0,afterComplete:function(){n===l.length-1?0<=b.duration&&window.setTimeout(function(){f.destroy()},b.duration):(f.destroy(),k(n+1))}})).go()};
k(0)})}};
Theme.prototype.initComment=function(){var a=this;if(this.config.comment&&(this.config.comment.gitalk&&(this.config.comment.gitalk.body=decodeURI(window.location.href),(new Gitalk(this.config.comment.gitalk)).render("gitalk")),this.config.comment.valine&&new Valine(this.config.comment.valine),this.config.comment.utterances)){var b=this.config.comment.utterances,c=document.createElement("script");c.src="https://utteranc.es/client.js";c.type="text/javascript";c.setAttribute("repo",b.repo);c.setAttribute("issue-term",
b.issueTerm);b.label&&c.setAttribute("label",b.label);c.setAttribute("theme",this.isDark?b.darkTheme:b.lightTheme);c.crossOrigin="anonymous";c.async=!0;document.getElementById("utterances").appendChild(c);this._utterancesOnSwitchTheme=this._utterancesOnSwitchTheme||function(){var d={type:"set-theme",theme:a.isDark?b.darkTheme:b.lightTheme};document.querySelector(".utterances-frame").contentWindow.postMessage(d,"https://utteranc.es")};this.switchThemeEventSet.add(this._utterancesOnSwitchTheme)}};
Theme.prototype.initSmoothScroll=function(){SmoothScroll&&new SmoothScroll('[href^="#"]',{speed:300,speedAsDuration:!0,header:"#header-desktop"})};Theme.prototype.initCookieconsent=function(){this.config.cookieconsent&&cookieconsent.initialise(this.config.cookieconsent)};
Theme.prototype.onScroll=function(){var a=this,b=[];"auto"===document.body.getAttribute("data-header-desktop")&&b.push(document.getElementById("header-desktop"));"auto"===document.body.getAttribute("data-header-mobile")&&b.push(document.getElementById("header-mobile"));if(document.getElementById("comments")){var c=document.getElementById("view-comments");c.href="#comments";c.style.display="block"}var d=document.getElementById("fixed-buttons");window.addEventListener("scroll",function(){a.newScrollTop=
a.util.getScrollTop();var e=a.newScrollTop-a.oldScrollTop,l=a.util.isMobile();a.util.forEach(b,function(n){20<e?(n.classList.remove("fadeInDown"),a.util.animateCSS(n,["fadeOutUp","faster"],!0)):-20>e&&(n.classList.remove("fadeOutUp"),a.util.animateCSS(n,["fadeInDown","faster"],!0))});if(100<a.newScrollTop)if(l&&20<e)d.classList.remove("fadeIn"),a.util.animateCSS(d,["fadeOut","faster"],!0);else{if(!l||-20>e)d.style.display="block",d.classList.remove("fadeOut"),a.util.animateCSS(d,["fadeIn","faster"],
!0)}else l||(d.classList.remove("fadeIn"),a.util.animateCSS(d,["fadeOut","faster"],!0)),d.style.display="none";l=$jscomp.makeIterator(a.scrollEventSet);for(var k=l.next();!k.done;k=l.next())k=k.value,k();a.oldScrollTop=a.newScrollTop},!1)};
Theme.prototype.onResize=function(){var a=this;window.addEventListener("resize",function(){a._resizeTimeout||(a._resizeTimeout=window.setTimeout(function(){a._resizeTimeout=null;for(var b=$jscomp.makeIterator(a.resizeEventSet),c=b.next();!c.done;c=b.next())c=c.value,c();a.initToc();a.initMermaid();a.initSearch()},100))},!1)};
Theme.prototype.onClickMask=function(){var a=this;document.getElementById("mask").addEventListener("click",function(){for(var b=$jscomp.makeIterator(a.clickMaskEventSet),c=b.next();!c.done;c=b.next())c=c.value,c();document.body.classList.remove("blur")},!1)};
Theme.prototype.init=function(){var a=this;try{this.initSVGIcon(),this.initTwemoji(),this.initMenuMobile(),this.initSwitchTheme(),this.initSearch(),this.initDetails(),this.initLightGallery(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initSmoothScroll(),this.initMath(),this.initMermaid(),this.initEcharts(),this.initTypeit(),this.initMapbox(),this.initCookieconsent()}catch(b){console.error(b)}window.setTimeout(function(){a.initToc();a.initComment();a.onScroll();a.onResize();a.onClickMask()},
100)};var themeInit=function(){(new Theme).init()};"loading"!==document.readyState?themeInit():document.addEventListener("DOMContentLoaded",themeInit,!1);