${entry.title}${entry.displaySize}
@@ -157,7 +157,9 @@ export default class Item extends Element {
return;
}
- this.element.querySelector('[download]').click();
+ this.element
+ .querySelector('[download]')
+ .dispatchEvent(new CustomEvent('click'));
}
loading(loading = true) {
@@ -180,25 +182,40 @@ export default class Item extends Element {
}
const launchLightbox = (lightboxContent, onShow = null) => {
- const escapeListener = (event) => {
+ const close = () => lightbox.close(),
+ escapeListener = (event) => {
if (event.key === 'Escape') {
- lightbox.close();
+ close();
}
},
lightbox = BasicLightbox.create(lightboxContent, {
className: entry.type,
onShow: () => {
this.loading(false);
+
document.addEventListener('keydown', escapeListener);
+ document.addEventListener('preview:close', (event: CustomEvent) => {
+ lightbox.preview = event.detail?.preview;
+
+ close();
+ });
if (onShow) {
onShow(lightbox);
}
},
- onClose: () =>
- document.removeEventListener('keydown', escapeListener),
+ onClose: () => {
+ document.removeEventListener('keydown', escapeListener);
+ document.removeEventListener('preview:close', close);
+
+ this.trigger('preview:closed', this.#entry, {
+ preview: lightbox.preview,
+ });
+ },
});
lightbox.show();
+
+ this.trigger('preview:opened', this.#entry);
};
if (['video', 'audio', 'image', 'font', 'pdf'].includes(entry.type)) {
diff --git a/src/lib/trailingSlash.ts b/src/lib/trailingSlash.ts
new file mode 100644
index 0000000..5c9d96a
--- /dev/null
+++ b/src/lib/trailingSlash.ts
@@ -0,0 +1,4 @@
+export const trailingSlash = (text: string) =>
+ text.endsWith('/') ? text : `${text}/`;
+
+export default trailingSlash;
diff --git a/src/webdav-min.js b/src/webdav-min.js
index 03a08bb..49c6fd0 100644
--- a/src/webdav-min.js
+++ b/src/webdav-min.js
@@ -1,10 +1,10 @@
-(()=>{var Nt=Object.create;var dt=Object.defineProperty,Gt=Object.defineProperties,Wt=Object.getOwnPropertyDescriptor,Vt=Object.getOwnPropertyDescriptors,Zt=Object.getOwnPropertyNames,Et=Object.getOwnPropertySymbols,Xt=Object.getPrototypeOf,At=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable;var xt=(r,t,e)=>t in r?dt(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,N=(r,t)=>{for(var e in t||(t={}))At.call(t,e)&&xt(r,e,t[e]);if(Et)for(var e of Et(t))Yt.call(t,e)&&xt(r,e,t[e]);return r},tt=(r,t)=>Gt(r,Vt(t));var ye=(r=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(r,{get:(t,e)=>(typeof require!="undefined"?require:t)[e]}):r)(function(r){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var ft=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var Kt=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Zt(t))!At.call(r,i)&&i!==e&&dt(r,i,{get:()=>t[i],enumerable:!(n=Wt(t,i))||n.enumerable});return r};var pt=(r,t,e)=>(e=r!=null?Nt(Xt(r)):{},Kt(t||!r||!r.__esModule?dt(e,"default",{value:r,enumerable:!0}):e,r));var Ft=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var u=(r,t,e)=>(Ft(r,t,"read from private field"),e?e.call(r):t.get(r)),b=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},E=(r,t,e,n)=>(Ft(r,t,"write to private field"),n?n.call(r,e):t.set(r,e),e);var $=(r,t,e)=>new Promise((n,i)=>{var s=p=>{try{f(e.next(p))}catch(x){i(x)}},l=p=>{try{f(e.throw(p))}catch(x){i(x)}},f=p=>p.done?n(p.value):Promise.resolve(p.value).then(s,l);f((e=e.apply(r,t)).next())});var St=ft((Dt,vt)=>{(function(r){typeof Dt=="object"&&typeof vt<"u"?vt.exports=r():typeof define=="function"&&define.amd?define([],r):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).basicLightbox=r()})(function(){return function r(t,e,n){function i(f,p){if(!e[f]){if(!t[f]){var x=typeof ye=="function"&&ye;if(!p&&x)return x(f,!0);if(s)return s(f,!0);var L=new Error("Cannot find module '"+f+"'");throw L.code="MODULE_NOT_FOUND",L}var v=e[f]={exports:{}};t[f][0].call(v.exports,function(A){return i(t[f][1][A]||A)},v,v.exports,r,t,e,n)}return e[f].exports}for(var s=typeof ye=="function"&&ye,l=0;l1&&arguments[1]!==void 0&&arguments[1],p=document.createElement("div");return p.innerHTML=l.trim(),f===!0?p.children:p.firstChild},i=function(l,f){var p=l.children;return p.length===1&&p[0].tagName===f},s=function(l){return(l=l||document.querySelector(".basicLightbox"))!=null&&l.ownerDocument.body.contains(l)===!0};e.visible=s,e.create=function(l,f){var p=function(v,A){var w=n(`
-
+(()=>{var Gt=Object.create;var ft=Object.defineProperty,Wt=Object.defineProperties,Vt=Object.getOwnPropertyDescriptor,Zt=Object.getOwnPropertyDescriptors,Xt=Object.getOwnPropertyNames,xt=Object.getOwnPropertySymbols,Yt=Object.getPrototypeOf,Ft=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable;var At=(r,t,e)=>t in r?ft(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,N=(r,t)=>{for(var e in t||(t={}))Ft.call(t,e)&&At(r,e,t[e]);if(xt)for(var e of xt(t))Kt.call(t,e)&&At(r,e,t[e]);return r},rt=(r,t)=>Wt(r,Zt(t));var ye=(r=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(r,{get:(t,e)=>(typeof require!="undefined"?require:t)[e]}):r)(function(r){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var pt=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var Jt=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xt(t))!Ft.call(r,i)&&i!==e&&ft(r,i,{get:()=>t[i],enumerable:!(n=Vt(t,i))||n.enumerable});return r};var gt=(r,t,e)=>(e=r!=null?Gt(Yt(r)):{},Jt(t||!r||!r.__esModule?ft(e,"default",{value:r,enumerable:!0}):e,r));var Lt=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var c=(r,t,e)=>(Lt(r,t,"read from private field"),e?e.call(r):t.get(r)),E=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},A=(r,t,e,n)=>(Lt(r,t,"write to private field"),n?n.call(r,e):t.set(r,e),e);var $=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{u(e.next(l))}catch(p){i(p)}},g=l=>{try{u(e.throw(l))}catch(p){i(p)}},u=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,g);u((e=e.apply(r,t)).next())});var _t=pt((Dt,bt)=>{(function(r){typeof Dt=="object"&&typeof bt<"u"?bt.exports=r():typeof define=="function"&&define.amd?define([],r):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).basicLightbox=r()})(function(){return function r(t,e,n){function i(u,l){if(!e[u]){if(!t[u]){var p=typeof ye=="function"&&ye;if(!l&&p)return p(u,!0);if(s)return s(u,!0);var F=new Error("Cannot find module '"+u+"'");throw F.code="MODULE_NOT_FOUND",F}var y=e[u]={exports:{}};t[u][0].call(y.exports,function(x){return i(t[u][1][x]||x)},y,y.exports,r,t,e,n)}return e[u].exports}for(var s=typeof ye=="function"&&ye,g=0;g1&&arguments[1]!==void 0&&arguments[1],l=document.createElement("div");return l.innerHTML=g.trim(),u===!0?l.children:l.firstChild},i=function(g,u){var l=g.children;return l.length===1&&l[0].tagName===u},s=function(g){return(g=g||document.querySelector(".basicLightbox"))!=null&&g.ownerDocument.body.contains(g)===!0};e.visible=s,e.create=function(g,u){var l=function(y,x){var w=n(`
+
- `)),k=w.querySelector(".basicLightbox__placeholder");v.forEach(function(d){return k.appendChild(d)});var o=i(k,"IMG"),a=i(k,"VIDEO"),c=i(k,"IFRAME");return o===!0&&w.classList.add("basicLightbox--img"),a===!0&&w.classList.add("basicLightbox--video"),c===!0&&w.classList.add("basicLightbox--iframe"),w}(l=function(v){var A=typeof v=="string",w=v instanceof HTMLElement==1;if(A===!1&&w===!1)throw new Error("Content must be a DOM element/node or string");return A===!0?Array.from(n(v,!0)):v.tagName==="TEMPLATE"?[v.content.cloneNode(!0)]:Array.from(v.children)}(l),f=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if((v=Object.assign({},v)).closable==null&&(v.closable=!0),v.className==null&&(v.className=""),v.onShow==null&&(v.onShow=function(){}),v.onClose==null&&(v.onClose=function(){}),typeof v.closable!="boolean")throw new Error("Property `closable` must be a boolean");if(typeof v.className!="string")throw new Error("Property `className` must be a string");if(typeof v.onShow!="function")throw new Error("Property `onShow` must be a function");if(typeof v.onClose!="function")throw new Error("Property `onClose` must be a function");return v}(f)),x=function(v){return f.onClose(L)!==!1&&function(A,w){return A.classList.remove("basicLightbox--visible"),setTimeout(function(){return s(A)===!1||A.parentElement.removeChild(A),w()},410),!0}(p,function(){if(typeof v=="function")return v(L)})};f.closable===!0&&p.addEventListener("click",function(v){v.target===p&&x()});var L={element:function(){return p},visible:function(){return s(p)},show:function(v){return f.onShow(L)!==!1&&function(A,w){return document.body.appendChild(A),setTimeout(function(){requestAnimationFrame(function(){return A.classList.add("basicLightbox--visible"),w()})},10),!0}(p,function(){if(typeof v=="function")return v(L)})},close:x};return L}},{}]},{},[1])(1)})});var _t=ft((Lr,rt)=>{var or=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var g=function(r){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,e=0,n={},i={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function o(a){return a instanceof s?new s(a.type,o(a.content),a.alias):Array.isArray(a)?a.map(o):a.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(d){var o=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(d.stack)||[])[1];if(o){var a=document.getElementsByTagName("script");for(var c in a)if(a[c].src==o)return a[c]}return null}},isActive:function(o,a,c){for(var d="no-"+a;o;){var h=o.classList;if(h.contains(a))return!0;if(h.contains(d))return!1;o=o.parentElement}return!!c}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(o,a){var c=i.util.clone(i.languages[o]);for(var d in a)c[d]=a[d];return c},insertBefore:function(o,a,c,d){d=d||i.languages;var h=d[o],y={};for(var F in h)if(h.hasOwnProperty(F)){if(F==a)for(var m in c)c.hasOwnProperty(m)&&(y[m]=c[m]);c.hasOwnProperty(F)||(y[F]=h[F])}var T=d[o];return d[o]=y,i.languages.DFS(i.languages,function(P,z){z===T&&P!=o&&(this[P]=y)}),y},DFS:function o(a,c,d,h){h=h||{};var y=i.util.objId;for(var F in a)if(a.hasOwnProperty(F)){c.call(a,F,a[F],d||F);var m=a[F],T=i.util.type(m);T==="Object"&&!h[y(m)]?(h[y(m)]=!0,o(m,c,null,h)):T==="Array"&&!h[y(m)]&&(h[y(m)]=!0,o(m,c,F,h))}}},plugins:{},highlightAll:function(o,a){i.highlightAllUnder(document,o,a)},highlightAllUnder:function(o,a,c){var d={callback:c,container:o,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",d),d.elements=Array.prototype.slice.apply(d.container.querySelectorAll(d.selector)),i.hooks.run("before-all-elements-highlight",d);for(var h=0,y;y=d.elements[h++];)i.highlightElement(y,a===!0,d.callback)},highlightElement:function(o,a,c){var d=i.util.getLanguage(o),h=i.languages[d];i.util.setLanguage(o,d);var y=o.parentElement;y&&y.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(y,d);var F=o.textContent,m={element:o,language:d,grammar:h,code:F};function T(z){m.highlightedCode=z,i.hooks.run("before-insert",m),m.element.innerHTML=m.highlightedCode,i.hooks.run("after-highlight",m),i.hooks.run("complete",m),c&&c.call(m.element)}if(i.hooks.run("before-sanity-check",m),y=m.element.parentElement,y&&y.nodeName.toLowerCase()==="pre"&&!y.hasAttribute("tabindex")&&y.setAttribute("tabindex","0"),!m.code){i.hooks.run("complete",m),c&&c.call(m.element);return}if(i.hooks.run("before-highlight",m),!m.grammar){T(i.util.encode(m.code));return}if(a&&r.Worker){var P=new Worker(i.filename);P.onmessage=function(z){T(z.data)},P.postMessage(JSON.stringify({language:m.language,code:m.code,immediateClose:!0}))}else T(i.highlight(m.code,m.grammar,m.language))},highlight:function(o,a,c){var d={code:o,grammar:a,language:c};if(i.hooks.run("before-tokenize",d),!d.grammar)throw new Error('The language "'+d.language+'" has no grammar.');return d.tokens=i.tokenize(d.code,d.grammar),i.hooks.run("after-tokenize",d),s.stringify(i.util.encode(d.tokens),d.language)},tokenize:function(o,a){var c=a.rest;if(c){for(var d in c)a[d]=c[d];delete a.rest}var h=new p;return x(h,h.head,o),f(o,h,a,h.head,0),v(h)},hooks:{all:{},add:function(o,a){var c=i.hooks.all;c[o]=c[o]||[],c[o].push(a)},run:function(o,a){var c=i.hooks.all[o];if(!(!c||!c.length))for(var d=0,h;h=c[d++];)h(a)}},Token:s};r.Prism=i;function s(o,a,c,d){this.type=o,this.content=a,this.alias=c,this.length=(d||"").length|0}s.stringify=function o(a,c){if(typeof a=="string")return a;if(Array.isArray(a)){var d="";return a.forEach(function(T){d+=o(T,c)}),d}var h={type:a.type,content:o(a.content,c),tag:"span",classes:["token",a.type],attributes:{},language:c},y=a.alias;y&&(Array.isArray(y)?Array.prototype.push.apply(h.classes,y):h.classes.push(y)),i.hooks.run("wrap",h);var F="";for(var m in h.attributes)F+=" "+m+'="'+(h.attributes[m]||"").replace(/"/g,""")+'"';return"<"+h.tag+' class="'+h.classes.join(" ")+'"'+F+">"+h.content+""+h.tag+">"};function l(o,a,c,d){o.lastIndex=a;var h=o.exec(c);if(h&&d&&h[1]){var y=h[1].length;h.index+=y,h[0]=h[0].slice(y)}return h}function f(o,a,c,d,h,y){for(var F in c)if(!(!c.hasOwnProperty(F)||!c[F])){var m=c[F];m=Array.isArray(m)?m:[m];for(var T=0;T=y.reach);q+=D.value.length,D=D.next){var V=D.value;if(a.length>o.length)return;if(!(V instanceof s)){var Ke=1,M;if(Xe){if(M=l(ge,q,o,pe),!M||M.index>=o.length)break;var Je=M.index,zt=M.index+M[0].length,Z=q;for(Z+=D.value.length;Je>=Z;)D=D.next,Z+=D.value.length;if(Z-=D.value.length,q=Z,D.value instanceof s)continue;for(var me=D;me!==a.tail&&(Zy.reach&&(y.reach=ct);var et=D.prev;ut&&(et=x(a,et,ut),q+=ut.length),L(a,et,Ke);var Ht=new s(F,z?i.tokenize(Qe,z):Qe,Ye,Qe);if(D=x(a,et,Ht),wt&&x(a,D,wt),Ke>1){var ht={cause:F+","+T,reach:ct};f(o,a,c,D.prev,q,ht),y&&ht.reach>y.reach&&(y.reach=ht.reach)}}}}}}function p(){var o={value:null,prev:null,next:null},a={value:null,prev:o,next:null};o.next=a,this.head=o,this.tail=a,this.length=0}function x(o,a,c){var d=a.next,h={value:c,prev:a,next:d};return a.next=h,d.prev=h,o.length++,h}function L(o,a,c){for(var d=a.next,h=0;h/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/?[\da-f]{1,8};/i]};g.languages.markup.tag.inside["attr-value"].inside.entity=g.languages.markup.entity;g.languages.markup.doctype.inside["internal-subset"].inside=g.languages.markup;g.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))});Object.defineProperty(g.languages.markup.tag,"addInlined",{value:function(t,e){var n={};n["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:g.languages[e]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+e]={pattern:/[\s\S]+/,inside:g.languages[e]};var s={};s[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},g.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(g.languages.markup.tag,"addAttribute",{value:function(r,t){g.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:g.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});g.languages.html=g.languages.markup;g.languages.mathml=g.languages.markup;g.languages.svg=g.languages.markup;g.languages.xml=g.languages.extend("markup",{});g.languages.ssml=g.languages.xml;g.languages.atom=g.languages.xml;g.languages.rss=g.languages.xml;(function(r){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var e=r.languages.markup;e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))})(g);g.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};g.languages.javascript=g.languages.extend("clike",{"class-name":[g.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});g.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;g.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:g.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:g.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:g.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:g.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:g.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});g.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:g.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});g.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});g.languages.markup&&(g.languages.markup.tag.addInlined("script","javascript"),g.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));g.languages.js=g.languages.javascript;(function(){if(typeof g>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading\u2026",t=function(A,w){return"\u2716 Error "+A+" while fetching file: "+w},e="\u2716 Error: File does not exist or is empty",n={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",s="loading",l="loaded",f="failed",p="pre[data-src]:not(["+i+'="'+l+'"]):not(['+i+'="'+s+'"])';function x(A,w,k){var o=new XMLHttpRequest;o.open("GET",A,!0),o.onreadystatechange=function(){o.readyState==4&&(o.status<400&&o.responseText?w(o.responseText):o.status>=400?k(t(o.status,o.statusText)):k(e))},o.send(null)}function L(A){var w=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(A||"");if(w){var k=Number(w[1]),o=w[2],a=w[3];return o?a?[k,Number(a)]:[k,void 0]:[k,k]}}g.hooks.add("before-highlightall",function(A){A.selector+=", "+p}),g.hooks.add("before-sanity-check",function(A){var w=A.element;if(w.matches(p)){A.code="",w.setAttribute(i,s);var k=w.appendChild(document.createElement("CODE"));k.textContent=r;var o=w.getAttribute("data-src"),a=A.language;if(a==="none"){var c=(/\.(\w+)$/.exec(o)||[,"none"])[1];a=n[c]||c}g.util.setLanguage(k,a),g.util.setLanguage(w,a);var d=g.plugins.autoloader;d&&d.loadLanguages(a),x(o,function(h){w.setAttribute(i,l);var y=L(w.getAttribute("data-range"));if(y){var F=h.split(/\r\n?|\n/g),m=y[0],T=y[1]==null?F.length:y[1];m<0&&(m+=F.length),m=Math.max(0,Math.min(m-1,F.length)),T<0&&(T+=F.length),T=Math.max(0,Math.min(T,F.length)),h=F.slice(m,T).join(`
-`),w.hasAttribute("data-start")||w.setAttribute("data-start",String(m+1))}k.textContent=h,g.highlightElement(k)},function(h){w.setAttribute(i,f),k.textContent=h})}}),g.plugins.fileHighlight={highlight:function(w){for(var k=(w||document).querySelectorAll(p),o=0,a;a=k[o++];)g.highlightElement(a)}};var v=!1;g.fileHighlight=function(){v||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),v=!0),g.plugins.fileHighlight.highlight.apply(this,arguments)}})()});var Mt=ft(G=>{"use strict";var it=G&&G.__assign||function(){return it=Object.assign||function(r){for(var t,e=1,n=arguments.length;e0&&e.hide()}),this.element.classList.remove(this.toastShowClass),this.element.classList.add(this.toastHideClass),this.trigger("hide"),this.animation){var n=function(){return e.remove()},i=function(){l||(e.element.addEventListener("transitionend",function(){return n()}),l=!0)},s=function(){e.show(),e.element.removeEventListener("transitionstart",function(){return i()}),e.element.removeEventListener("transitionend",function(){return n()}),e.element.removeEventListener("mouseover",function(){return s()}),e.element.addEventListener("mouseout",function(){return e.hide()})},l=!1;this.element.addEventListener("mouseover",function(){return s()}),this.element.addEventListener("transitionstart",function(){return i()});return}this.remove()}},r.prototype.remove=function(){this.element.parentNode===this.container&&(this.container.removeChild(this.element),this.trigger("remove"))},r.prototype.buildClose=function(t){var e=this,n=document.createElement("button");return n.setAttribute("title",t),n.appendChild(document.createTextNode(t)),n.addEventListener("click",function(){return e.hide()}),n},r.prototype.getContainer=function(t){var e=t.containerClass,n=t.containerElement,i=t.root,s=i.querySelector("".concat(n,".").concat(e));if(s)return s;var l=document.createElement(n);return l.classList.add(e),i.appendChild(l),l},r.prototype.on=function(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)},r.prototype.off=function(t,e){if(e===void 0&&(e=null),!e){this.events[t]=[];return}var n=this.events[t].indexOf(e);n===-1&&this.events[t].splice(n,1)},r.prototype.trigger=function(t){for(var e=this,n=[],i=1;i-1});var Lt,Tt;function ve(r){if(typeof r!="string"&&(r=String(r)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(r)||r==="")throw new TypeError('Invalid character in header field name: "'+r+'"');return r.toLowerCase()}function mt(r){return typeof r!="string"&&(r=String(r)),r}function yt(r){var t={next:function(){var e=r.shift();return{done:e===void 0,value:e}}};return I.iterable&&(t[Symbol.iterator]=function(){return t}),t}function C(r){this.map={},r instanceof C?r.forEach(function(t,e){this.append(e,t)},this):Array.isArray(r)?r.forEach(function(t){this.append(t[0],t[1])},this):r&&Object.getOwnPropertyNames(r).forEach(function(t){this.append(t,r[t])},this)}C.prototype.append=function(r,t){r=ve(r),t=mt(t);var e=this.map[r];this.map[r]=e?e+", "+t:t};C.prototype.delete=function(r){delete this.map[ve(r)]};C.prototype.get=function(r){return r=ve(r),this.has(r)?this.map[r]:null};C.prototype.has=function(r){return this.map.hasOwnProperty(ve(r))};C.prototype.set=function(r,t){this.map[ve(r)]=mt(t)};C.prototype.forEach=function(r,t){for(var e in this.map)this.map.hasOwnProperty(e)&&r.call(t,this.map[e],e,this)};C.prototype.keys=function(){var r=[];return this.forEach(function(t,e){r.push(e)}),yt(r)};C.prototype.values=function(){var r=[];return this.forEach(function(t){r.push(t)}),yt(r)};C.prototype.entries=function(){var r=[];return this.forEach(function(t,e){r.push([e,t])}),yt(r)};I.iterable&&(C.prototype[Symbol.iterator]=C.prototype.entries);function gt(r){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}function $t(r){return new Promise(function(t,e){r.onload=function(){t(r.result)},r.onerror=function(){e(r.error)}})}function Qt(r){var t=new FileReader,e=$t(t);return t.readAsArrayBuffer(r),e}function er(r){var t=new FileReader,e=$t(t);return t.readAsText(r),e}function tr(r){for(var t=new Uint8Array(r),e=new Array(t.length),n=0;n-1?t:r}function ee(r,t){if(!(this instanceof ee))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var e=t.body;if(r instanceof ee){if(r.bodyUsed)throw new TypeError("Already read");this.url=r.url,this.credentials=r.credentials,t.headers||(this.headers=new C(r.headers)),this.method=r.method,this.mode=r.mode,this.signal=r.signal,!e&&r._bodyInit!=null&&(e=r._bodyInit,r.bodyUsed=!0)}else this.url=String(r);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new C(t.headers)),this.method=nr(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&e)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(e),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}ee.prototype.clone=function(){return new ee(this,{body:this._bodyInit})};function ir(r){var t=new FormData;return r.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),s=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(s))}}),t}function sr(r){var t=new C,e=r.replace(/\r?\n[\t ]+/g," ");return e.split("\r").map(function(n){return n.indexOf(`
-`)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),s=i.shift().trim();if(s){var l=i.join(":").trim();t.append(s,l)}}),t}Pt.call(ee.prototype);function H(r,t){if(!(this instanceof H))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new C(t.headers),this.url=t.url||"",this._initBody(r)}Pt.call(H.prototype);H.prototype.clone=function(){return new H(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new C(this.headers),url:this.url})};H.error=function(){var r=new H(null,{status:0,statusText:""});return r.type="error",r};var ar=[301,302,303,307,308];H.redirect=function(r,t){if(ar.indexOf(t)===-1)throw new RangeError("Invalid status code");return new H(null,{status:t,headers:{location:r}})};var Q=S.DOMException;try{new Q}catch{Q=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},Q.prototype=Object.create(Error.prototype),Q.prototype.constructor=Q}function Ct(r,t){return new Promise(function(e,n){var i=new ee(r,t);if(i.signal&&i.signal.aborted)return n(new Q("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var p={status:s.status,statusText:s.statusText,headers:sr(s.getAllResponseHeaders()||"")};p.url="responseURL"in s?s.responseURL:p.headers.get("X-Request-URL");var x="response"in s?s.response:s.responseText;setTimeout(function(){e(new H(x,p))},0)},s.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.onabort=function(){setTimeout(function(){n(new Q("Aborted","AbortError"))},0)};function f(p){try{return p===""&&S.location.href?S.location.href:p}catch{return p}}s.open(i.method,f(i.url),!0),i.credentials==="include"?s.withCredentials=!0:i.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(I.blob?s.responseType="blob":I.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(s.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof C)?Object.getOwnPropertyNames(t.headers).forEach(function(p){s.setRequestHeader(p,mt(t.headers[p]))}):i.headers.forEach(function(p,x){s.setRequestHeader(x,p)}),i.signal&&(i.signal.addEventListener("abort",l),s.onreadystatechange=function(){s.readyState===4&&i.signal.removeEventListener("abort",l)}),s.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}Ct.polyfill=!0;S.fetch||(S.fetch=Ct,S.Headers=C,S.Request=ee,S.Response=H);var te={},O=class{hasEvent(t){return t in te}on(t,e){this.hasEvent(t)||(te[t]=[]),te[t].push(e)}off(t,e=null){if(!!this.hasEvent(t)){if(e===null)return te[t]=[];te[t]=te[t].filter(n=>n!==e)}}trigger(t,...e){if(this.hasEvent(t)){let n=!1;te[t].forEach(i=>{n||i(...e)===!1&&(n=!0)})}}};var be,U=class extends O{constructor(e=null){super();b(this,be,void 0);e!==null&&E(this,be,this.createNodeFromString(e))}get element(){return u(this,be)}createNodesFromString(e){let n=document.createElement("div"),i=document.createDocumentFragment();n.innerHTML=e;for(let s of n.childNodes)i.appendChild(s);return i}createNodeFromString(e){return this.createNodesFromString(e).firstChild}emptyNode(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}};be=new WeakMap;var Ot=pt(St());var Bt=pt(_t());var lr=r=>r.replace(/^\/+|\/+$/g,""),ur=(...r)=>`/${r.map(lr).filter(t=>t).join("/")}`,_=ur;var nt,B,Ee,we=class extends U{constructor(e,n=btoa){super(`
+ `)),k=w.querySelector(".basicLightbox__placeholder");y.forEach(function(f){return k.appendChild(f)});var o=i(k,"IMG"),a=i(k,"VIDEO"),d=i(k,"IFRAME");return o===!0&&w.classList.add("basicLightbox--img"),a===!0&&w.classList.add("basicLightbox--video"),d===!0&&w.classList.add("basicLightbox--iframe"),w}(g=function(y){var x=typeof y=="string",w=y instanceof HTMLElement==1;if(x===!1&&w===!1)throw new Error("Content must be a DOM element/node or string");return x===!0?Array.from(n(y,!0)):y.tagName==="TEMPLATE"?[y.content.cloneNode(!0)]:Array.from(y.children)}(g),u=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if((y=Object.assign({},y)).closable==null&&(y.closable=!0),y.className==null&&(y.className=""),y.onShow==null&&(y.onShow=function(){}),y.onClose==null&&(y.onClose=function(){}),typeof y.closable!="boolean")throw new Error("Property `closable` must be a boolean");if(typeof y.className!="string")throw new Error("Property `className` must be a string");if(typeof y.onShow!="function")throw new Error("Property `onShow` must be a function");if(typeof y.onClose!="function")throw new Error("Property `onClose` must be a function");return y}(u)),p=function(y){return u.onClose(F)!==!1&&function(x,w){return x.classList.remove("basicLightbox--visible"),setTimeout(function(){return s(x)===!1||x.parentElement.removeChild(x),w()},410),!0}(l,function(){if(typeof y=="function")return y(F)})};u.closable===!0&&l.addEventListener("click",function(y){y.target===l&&p()});var F={element:function(){return l},visible:function(){return s(l)},show:function(y){return u.onShow(F)!==!1&&function(x,w){return document.body.appendChild(x),setTimeout(function(){requestAnimationFrame(function(){return x.classList.add("basicLightbox--visible"),w()})},10),!0}(l,function(){if(typeof y=="function")return y(F)})},close:p};return F}},{}]},{},[1])(1)})});var Ot=pt((Pr,nt)=>{var lr=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var m=function(r){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,e=0,n={},i={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function o(a){return a instanceof s?new s(a.type,o(a.content),a.alias):Array.isArray(a)?a.map(o):a.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(f){var o=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(f.stack)||[])[1];if(o){var a=document.getElementsByTagName("script");for(var d in a)if(a[d].src==o)return a[d]}return null}},isActive:function(o,a,d){for(var f="no-"+a;o;){var h=o.classList;if(h.contains(a))return!0;if(h.contains(f))return!1;o=o.parentElement}return!!d}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(o,a){var d=i.util.clone(i.languages[o]);for(var f in a)d[f]=a[f];return d},insertBefore:function(o,a,d,f){f=f||i.languages;var h=f[o],b={};for(var L in h)if(h.hasOwnProperty(L)){if(L==a)for(var v in d)d.hasOwnProperty(v)&&(b[v]=d[v]);d.hasOwnProperty(L)||(b[L]=h[L])}var P=f[o];return f[o]=b,i.languages.DFS(i.languages,function(T,z){z===P&&T!=o&&(this[T]=b)}),b},DFS:function o(a,d,f,h){h=h||{};var b=i.util.objId;for(var L in a)if(a.hasOwnProperty(L)){d.call(a,L,a[L],f||L);var v=a[L],P=i.util.type(v);P==="Object"&&!h[b(v)]?(h[b(v)]=!0,o(v,d,null,h)):P==="Array"&&!h[b(v)]&&(h[b(v)]=!0,o(v,d,L,h))}}},plugins:{},highlightAll:function(o,a){i.highlightAllUnder(document,o,a)},highlightAllUnder:function(o,a,d){var f={callback:d,container:o,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",f),f.elements=Array.prototype.slice.apply(f.container.querySelectorAll(f.selector)),i.hooks.run("before-all-elements-highlight",f);for(var h=0,b;b=f.elements[h++];)i.highlightElement(b,a===!0,f.callback)},highlightElement:function(o,a,d){var f=i.util.getLanguage(o),h=i.languages[f];i.util.setLanguage(o,f);var b=o.parentElement;b&&b.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(b,f);var L=o.textContent,v={element:o,language:f,grammar:h,code:L};function P(z){v.highlightedCode=z,i.hooks.run("before-insert",v),v.element.innerHTML=v.highlightedCode,i.hooks.run("after-highlight",v),i.hooks.run("complete",v),d&&d.call(v.element)}if(i.hooks.run("before-sanity-check",v),b=v.element.parentElement,b&&b.nodeName.toLowerCase()==="pre"&&!b.hasAttribute("tabindex")&&b.setAttribute("tabindex","0"),!v.code){i.hooks.run("complete",v),d&&d.call(v.element);return}if(i.hooks.run("before-highlight",v),!v.grammar){P(i.util.encode(v.code));return}if(a&&r.Worker){var T=new Worker(i.filename);T.onmessage=function(z){P(z.data)},T.postMessage(JSON.stringify({language:v.language,code:v.code,immediateClose:!0}))}else P(i.highlight(v.code,v.grammar,v.language))},highlight:function(o,a,d){var f={code:o,grammar:a,language:d};if(i.hooks.run("before-tokenize",f),!f.grammar)throw new Error('The language "'+f.language+'" has no grammar.');return f.tokens=i.tokenize(f.code,f.grammar),i.hooks.run("after-tokenize",f),s.stringify(i.util.encode(f.tokens),f.language)},tokenize:function(o,a){var d=a.rest;if(d){for(var f in d)a[f]=d[f];delete a.rest}var h=new l;return p(h,h.head,o),u(o,h,a,h.head,0),y(h)},hooks:{all:{},add:function(o,a){var d=i.hooks.all;d[o]=d[o]||[],d[o].push(a)},run:function(o,a){var d=i.hooks.all[o];if(!(!d||!d.length))for(var f=0,h;h=d[f++];)h(a)}},Token:s};r.Prism=i;function s(o,a,d,f){this.type=o,this.content=a,this.alias=d,this.length=(f||"").length|0}s.stringify=function o(a,d){if(typeof a=="string")return a;if(Array.isArray(a)){var f="";return a.forEach(function(P){f+=o(P,d)}),f}var h={type:a.type,content:o(a.content,d),tag:"span",classes:["token",a.type],attributes:{},language:d},b=a.alias;b&&(Array.isArray(b)?Array.prototype.push.apply(h.classes,b):h.classes.push(b)),i.hooks.run("wrap",h);var L="";for(var v in h.attributes)L+=" "+v+'="'+(h.attributes[v]||"").replace(/"/g,""")+'"';return"<"+h.tag+' class="'+h.classes.join(" ")+'"'+L+">"+h.content+""+h.tag+">"};function g(o,a,d,f){o.lastIndex=a;var h=o.exec(d);if(h&&f&&h[1]){var b=h[1].length;h.index+=b,h[0]=h[0].slice(b)}return h}function u(o,a,d,f,h,b){for(var L in d)if(!(!d.hasOwnProperty(L)||!d[L])){var v=d[L];v=Array.isArray(v)?v:[v];for(var P=0;P=b.reach);B+=S.value.length,S=S.next){var V=S.value;if(a.length>o.length)return;if(!(V instanceof s)){var Je=1,M;if(Ye){if(M=g(ge,B,o,pe),!M||M.index>=o.length)break;var Qe=M.index,Ht=M.index+M[0].length,Z=B;for(Z+=S.value.length;Qe>=Z;)S=S.next,Z+=S.value.length;if(Z-=S.value.length,B=Z,S.value instanceof s)continue;for(var me=S;me!==a.tail&&(Zb.reach&&(b.reach=dt);var tt=S.prev;ct&&(tt=p(a,tt,ct),B+=ct.length),F(a,tt,Je);var Nt=new s(L,z?i.tokenize(et,z):et,Ke,et);if(S=p(a,tt,Nt),Et&&p(a,S,Et),Je>1){var ht={cause:L+","+P,reach:dt};u(o,a,d,S.prev,B,ht),b&&ht.reach>b.reach&&(b.reach=ht.reach)}}}}}}function l(){var o={value:null,prev:null,next:null},a={value:null,prev:o,next:null};o.next=a,this.head=o,this.tail=a,this.length=0}function p(o,a,d){var f=a.next,h={value:d,prev:a,next:f};return a.next=h,f.prev=h,o.length++,h}function F(o,a,d){for(var f=a.next,h=0;h/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/?[\da-f]{1,8};/i]};m.languages.markup.tag.inside["attr-value"].inside.entity=m.languages.markup.entity;m.languages.markup.doctype.inside["internal-subset"].inside=m.languages.markup;m.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))});Object.defineProperty(m.languages.markup.tag,"addInlined",{value:function(t,e){var n={};n["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:m.languages[e]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+e]={pattern:/[\s\S]+/,inside:m.languages[e]};var s={};s[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},m.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(m.languages.markup.tag,"addAttribute",{value:function(r,t){m.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:m.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});m.languages.html=m.languages.markup;m.languages.mathml=m.languages.markup;m.languages.svg=m.languages.markup;m.languages.xml=m.languages.extend("markup",{});m.languages.ssml=m.languages.xml;m.languages.atom=m.languages.xml;m.languages.rss=m.languages.xml;(function(r){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var e=r.languages.markup;e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))})(m);m.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};m.languages.javascript=m.languages.extend("clike",{"class-name":[m.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});m.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;m.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:m.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:m.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:m.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:m.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:m.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});m.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:m.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});m.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});m.languages.markup&&(m.languages.markup.tag.addInlined("script","javascript"),m.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));m.languages.js=m.languages.javascript;(function(){if(typeof m>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading\u2026",t=function(x,w){return"\u2716 Error "+x+" while fetching file: "+w},e="\u2716 Error: File does not exist or is empty",n={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",s="loading",g="loaded",u="failed",l="pre[data-src]:not(["+i+'="'+g+'"]):not(['+i+'="'+s+'"])';function p(x,w,k){var o=new XMLHttpRequest;o.open("GET",x,!0),o.onreadystatechange=function(){o.readyState==4&&(o.status<400&&o.responseText?w(o.responseText):o.status>=400?k(t(o.status,o.statusText)):k(e))},o.send(null)}function F(x){var w=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(x||"");if(w){var k=Number(w[1]),o=w[2],a=w[3];return o?a?[k,Number(a)]:[k,void 0]:[k,k]}}m.hooks.add("before-highlightall",function(x){x.selector+=", "+l}),m.hooks.add("before-sanity-check",function(x){var w=x.element;if(w.matches(l)){x.code="",w.setAttribute(i,s);var k=w.appendChild(document.createElement("CODE"));k.textContent=r;var o=w.getAttribute("data-src"),a=x.language;if(a==="none"){var d=(/\.(\w+)$/.exec(o)||[,"none"])[1];a=n[d]||d}m.util.setLanguage(k,a),m.util.setLanguage(w,a);var f=m.plugins.autoloader;f&&f.loadLanguages(a),p(o,function(h){w.setAttribute(i,g);var b=F(w.getAttribute("data-range"));if(b){var L=h.split(/\r\n?|\n/g),v=b[0],P=b[1]==null?L.length:b[1];v<0&&(v+=L.length),v=Math.max(0,Math.min(v-1,L.length)),P<0&&(P+=L.length),P=Math.max(0,Math.min(P,L.length)),h=L.slice(v,P).join(`
+`),w.hasAttribute("data-start")||w.setAttribute("data-start",String(v+1))}k.textContent=h,m.highlightElement(k)},function(h){w.setAttribute(i,u),k.textContent=h})}}),m.plugins.fileHighlight={highlight:function(w){for(var k=(w||document).querySelectorAll(l),o=0,a;a=k[o++];)m.highlightElement(a)}};var y=!1;m.fileHighlight=function(){y||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),y=!0),m.plugins.fileHighlight.highlight.apply(this,arguments)}})()});var Ut=pt(G=>{"use strict";var st=G&&G.__assign||function(){return st=Object.assign||function(r){for(var t,e=1,n=arguments.length;e0&&e.hide()}),this.element.classList.remove(this.toastShowClass),this.element.classList.add(this.toastHideClass),this.trigger("hide"),this.animation){var n=function(){return e.remove()},i=function(){g||(e.element.addEventListener("transitionend",function(){return n()}),g=!0)},s=function(){e.show(),e.element.removeEventListener("transitionstart",function(){return i()}),e.element.removeEventListener("transitionend",function(){return n()}),e.element.removeEventListener("mouseover",function(){return s()}),e.element.addEventListener("mouseout",function(){return e.hide()})},g=!1;this.element.addEventListener("mouseover",function(){return s()}),this.element.addEventListener("transitionstart",function(){return i()});return}this.remove()}},r.prototype.remove=function(){this.element.parentNode===this.container&&(this.container.removeChild(this.element),this.trigger("remove"))},r.prototype.buildClose=function(t){var e=this,n=document.createElement("button");return n.setAttribute("title",t),n.appendChild(document.createTextNode(t)),n.addEventListener("click",function(){return e.hide()}),n},r.prototype.getContainer=function(t){var e=t.containerClass,n=t.containerElement,i=t.root,s=i.querySelector("".concat(n,".").concat(e));if(s)return s;var g=document.createElement(n);return g.classList.add(e),i.appendChild(g),g},r.prototype.on=function(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)},r.prototype.off=function(t,e){if(e===void 0&&(e=null),!e){this.events[t]=[];return}var n=this.events[t].indexOf(e);n===-1&&this.events[t].splice(n,1)},r.prototype.trigger=function(t){for(var e=this,n=[],i=1;i-1});var kt,$t;function ve(r){if(typeof r!="string"&&(r=String(r)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(r)||r==="")throw new TypeError('Invalid character in header field name: "'+r+'"');return r.toLowerCase()}function yt(r){return typeof r!="string"&&(r=String(r)),r}function vt(r){var t={next:function(){var e=r.shift();return{done:e===void 0,value:e}}};return q.iterable&&(t[Symbol.iterator]=function(){return t}),t}function C(r){this.map={},r instanceof C?r.forEach(function(t,e){this.append(e,t)},this):Array.isArray(r)?r.forEach(function(t){this.append(t[0],t[1])},this):r&&Object.getOwnPropertyNames(r).forEach(function(t){this.append(t,r[t])},this)}C.prototype.append=function(r,t){r=ve(r),t=yt(t);var e=this.map[r];this.map[r]=e?e+", "+t:t};C.prototype.delete=function(r){delete this.map[ve(r)]};C.prototype.get=function(r){return r=ve(r),this.has(r)?this.map[r]:null};C.prototype.has=function(r){return this.map.hasOwnProperty(ve(r))};C.prototype.set=function(r,t){this.map[ve(r)]=yt(t)};C.prototype.forEach=function(r,t){for(var e in this.map)this.map.hasOwnProperty(e)&&r.call(t,this.map[e],e,this)};C.prototype.keys=function(){var r=[];return this.forEach(function(t,e){r.push(e)}),vt(r)};C.prototype.values=function(){var r=[];return this.forEach(function(t){r.push(t)}),vt(r)};C.prototype.entries=function(){var r=[];return this.forEach(function(t,e){r.push([e,t])}),vt(r)};q.iterable&&(C.prototype[Symbol.iterator]=C.prototype.entries);function mt(r){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}function Tt(r){return new Promise(function(t,e){r.onload=function(){t(r.result)},r.onerror=function(){e(r.error)}})}function er(r){var t=new FileReader,e=Tt(t);return t.readAsArrayBuffer(r),e}function tr(r){var t=new FileReader,e=Tt(t);return t.readAsText(r),e}function rr(r){for(var t=new Uint8Array(r),e=new Array(t.length),n=0;n-1?t:r}function ee(r,t){if(!(this instanceof ee))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var e=t.body;if(r instanceof ee){if(r.bodyUsed)throw new TypeError("Already read");this.url=r.url,this.credentials=r.credentials,t.headers||(this.headers=new C(r.headers)),this.method=r.method,this.mode=r.mode,this.signal=r.signal,!e&&r._bodyInit!=null&&(e=r._bodyInit,r.bodyUsed=!0)}else this.url=String(r);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new C(t.headers)),this.method=ir(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&e)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(e),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}ee.prototype.clone=function(){return new ee(this,{body:this._bodyInit})};function sr(r){var t=new FormData;return r.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),s=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(s))}}),t}function ar(r){var t=new C,e=r.replace(/\r?\n[\t ]+/g," ");return e.split("\r").map(function(n){return n.indexOf(`
+`)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),s=i.shift().trim();if(s){var g=i.join(":").trim();t.append(s,g)}}),t}Ct.call(ee.prototype);function H(r,t){if(!(this instanceof H))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new C(t.headers),this.url=t.url||"",this._initBody(r)}Ct.call(H.prototype);H.prototype.clone=function(){return new H(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new C(this.headers),url:this.url})};H.error=function(){var r=new H(null,{status:0,statusText:""});return r.type="error",r};var or=[301,302,303,307,308];H.redirect=function(r,t){if(or.indexOf(t)===-1)throw new RangeError("Invalid status code");return new H(null,{status:t,headers:{location:r}})};var Q=_.DOMException;try{new Q}catch{Q=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},Q.prototype=Object.create(Error.prototype),Q.prototype.constructor=Q}function St(r,t){return new Promise(function(e,n){var i=new ee(r,t);if(i.signal&&i.signal.aborted)return n(new Q("Aborted","AbortError"));var s=new XMLHttpRequest;function g(){s.abort()}s.onload=function(){var l={status:s.status,statusText:s.statusText,headers:ar(s.getAllResponseHeaders()||"")};l.url="responseURL"in s?s.responseURL:l.headers.get("X-Request-URL");var p="response"in s?s.response:s.responseText;setTimeout(function(){e(new H(p,l))},0)},s.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.onabort=function(){setTimeout(function(){n(new Q("Aborted","AbortError"))},0)};function u(l){try{return l===""&&_.location.href?_.location.href:l}catch{return l}}s.open(i.method,u(i.url),!0),i.credentials==="include"?s.withCredentials=!0:i.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(q.blob?s.responseType="blob":q.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(s.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof C)?Object.getOwnPropertyNames(t.headers).forEach(function(l){s.setRequestHeader(l,yt(t.headers[l]))}):i.headers.forEach(function(l,p){s.setRequestHeader(p,l)}),i.signal&&(i.signal.addEventListener("abort",g),s.onreadystatechange=function(){s.readyState===4&&i.signal.removeEventListener("abort",g)}),s.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}St.polyfill=!0;_.fetch||(_.fetch=St,_.Headers=C,_.Request=ee,_.Response=H);var te={},I=class{hasEvent(t){return t in te}on(t,e){this.hasEvent(t)||(te[t]=[]),te[t].push(e)}off(t,e=null){if(!!this.hasEvent(t)){if(e===null)return te[t]=[];te[t]=te[t].filter(n=>n!==e)}}trigger(t,...e){if(this.hasEvent(t)){let n=!1;te[t].forEach(i=>{n||i(...e)===!1&&(n=!0)})}}};var be,U=class extends I{constructor(e=null){super();E(this,be,void 0);e!==null&&A(this,be,this.createNodeFromString(e))}get element(){return c(this,be)}createNodesFromString(e){let n=document.createElement("div"),i=document.createDocumentFragment();n.innerHTML=e;for(let s of n.childNodes)i.appendChild(s);return i}createNodeFromString(e){return this.createNodesFromString(e).firstChild}emptyNode(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}};be=new WeakMap;var It=gt(_t());var qt=gt(Ot());var ur=r=>r.replace(/^\/+|\/+$/g,""),cr=(...r)=>`/${r.map(ur).filter(t=>t).join("/")}`,O=cr;var it,D,Ee,we=class extends U{constructor(e,n=btoa){super(`
${e.title}${e.displaySize}
@@ -13,17 +13,17 @@
-
`);b(this,nt,void 0);b(this,B,void 0);b(this,Ee,Object.freeze({video:e=>``,audio:e=>``,image:e=>``,font:e=>{let n={eot:"embedded-opentype",otf:"opentype",ttf:"truetype"},i=e.name.replace(/^.+\.([^.]+)$/,"$1").toLowerCase(),s=e.fullPath.replace(/\W+/g,"_"),l=`The quick brown fox jumps over the lazy dog. 0123456789
+
`);E(this,it,void 0);E(this,D,void 0);E(this,Ee,Object.freeze({video:e=>``,audio:e=>``,image:e=>``,font:e=>{let n={eot:"embedded-opentype",otf:"opentype",ttf:"truetype"},i=e.name.replace(/^.+\.([^.]+)$/,"$1").toLowerCase(),s=e.fullPath.replace(/\W+/g,"_"),g=`The quick brown fox jumps over the lazy dog. 0123456789
Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz`;return`
${e.title}
-
${l}
-
${l}
-
${l}
-
${l}
`},text:(e,n)=>`
${n.replace(/[<>]/g,i=>({"<":"<",">":">"})[i])}
`,pdf:e=>``}));E(this,nt,n),E(this,B,e),this.element.classList.add(e.directory?"directory":"file",e.type?e.type:"unknown"),e.placeholder&&this.element.classList.add("loading"),e.del||this.element.querySelector(".delete").setAttribute("hidden",""),e.rename||this.element.querySelector(".rename").setAttribute("hidden",""),this.bindEvents()}bindEvents(e=this.element){this.on("entry:update",n=>{n===u(this,B)&&this.update()}),this.on("move:failed",n=>{n===u(this,B).fullPath&&this.loading(!1)}),this.on("delete:failed",n=>{n===u(this,B).fullPath&&this.loading(!1)}),e.addEventListener("click",()=>this.open()),e.querySelector("[download]").addEventListener("click",n=>n.stopPropagation()),e.querySelector(".delete").addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),this.del()}),e.querySelector(".rename").addEventListener("click",n=>{n.stopPropagation(),n.preventDefault(),this.rename()}),e.addEventListener("keydown",n=>{if(["F2","Delete","Enter"].includes(n.key)){if(n.preventDefault(),n.key==="F2"&&u(this,B).rename)this.rename();else if(n.key==="Delete"&&u(this,B).del)this.del();else if(n.key==="Enter"&&!u(this,B).directory){if(n.shiftKey)return this.download();this.open()}}})}del(){let e=u(this,B);if(!e.del)throw new TypeError(`'${e.name}' is read only.`);if(this.loading(),!confirm(`Are you sure you want to delete '${e.title}?'`))return this.loading(!1);this.trigger("delete",e.fullPath,e)}download(){u(this,B).directory||this.element.querySelector("[download]").click()}loading(e=!0){if(e)return this.element.classList.add("loading");this.element.classList.remove("loading")}open(){let e=u(this,B);if(this.loading(),e.directory)return this.trigger("go",e.fullPath,!1,()=>this.loading(!1));let n=(i,s=null)=>{let l=p=>{p.key==="Escape"&&f.close()},f=Ot.create(i,{className:e.type,onShow:()=>{this.loading(!1),document.addEventListener("keydown",l),s&&s(f)},onClose:()=>document.removeEventListener("keydown",l)});f.show()};["video","audio","image","font","pdf"].includes(e.type)?this.trigger("check",e.fullPath,()=>{n(u(this,Ee)[e.type](e))},()=>this.loading(!1)):(this.trigger("get",e.fullPath,i=>{if(!i)return this.loading(!1);if(e.type!=="text")return this.download();n(u(this,Ee).text(e,i),s=>Bt.default.highlightAllUnder(s.element()))}),this.loading(!1)),event.preventDefault()}rename(){let e=u(this,B);if(!e.rename)throw new TypeError(`'${e.name}' cannot be renamed.`);let n=this.element,i=n.querySelector(".title"),s=n.querySelector("input"),l=()=>{i.innerText=s.value,s.style.setProperty("width",`${i.scrollWidth}px`)},f=()=>{if(s.value!==e.title)return this.loading(),p(),this.trigger("move",e.fullPath,_(e.path,s.value),e);x()},p=()=>{s.removeEventListener("blur",L),s.removeEventListener("keydown",v),s.removeEventListener("input",A)},x=()=>(i.classList.remove("invisible"),s.classList.add("hidden"),s.value=e.title,l(),p(),n.focus()),L=()=>{f()},v=w=>{w.key==="Enter"?(w.stopPropagation(),w.preventDefault(),f()):w.key==="Escape"&&x()},A=()=>l();i.classList.add("invisible"),s.classList.remove("hidden"),s.value=e.title,l(),s.removeAttribute("readonly"),s.addEventListener("blur",L),s.addEventListener("keydown",v),s.addEventListener("input",A),s.focus()}update(){u(this,B).placeholder&&this.element.classList.contains("placeholder")&&this.element.classList.remove("placeholder")}};nt=new WeakMap,B=new WeakMap,Ee=new WeakMap;var It=(()=>{try{return document.querySelector(":focus-within"),!0}catch(r){return!1}})();var re,Ae,xe=class extends U{constructor(){super('