{K=K.concat(this.walkTokens(ot[ut],q))}):ot.tokens&&(K=K.concat(this.walkTokens(ot.tokens,q)))}}return K}use(...W){const q=this.defaults.extensions||{renderers:{},childTokens:{}};return W.forEach(K=>{const X={...K};if(X.async=this.defaults.async||X.async||!1,K.extensions&&(K.extensions.forEach(tt=>{if(!tt.name)throw new Error("extension name required");if("renderer"in tt){const rt=q.renderers[tt.name];rt?q.renderers[tt.name]=function(...ot){let ut=tt.renderer.apply(this,ot);return ut===!1&&(ut=rt.apply(this,ot)),ut}:q.renderers[tt.name]=tt.renderer}if("tokenizer"in tt){if(!tt.level||tt.level!=="block"&&tt.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const rt=q[tt.level];rt?rt.unshift(tt.tokenizer):q[tt.level]=[tt.tokenizer],tt.start&&(tt.level==="block"?q.startBlock?q.startBlock.push(tt.start):q.startBlock=[tt.start]:tt.level==="inline"&&(q.startInline?q.startInline.push(tt.start):q.startInline=[tt.start]))}"childTokens"in tt&&tt.childTokens&&(q.childTokens[tt.name]=tt.childTokens)}),X.extensions=q),K.renderer){const tt=this.defaults.renderer||new _Renderer(this.defaults);for(const rt in K.renderer){const ot=K.renderer[rt],ut=rt,yn=tt[ut];tt[ut]=(...uo)=>{let po=ot.apply(tt,uo);return po===!1&&(po=yn.apply(tt,uo)),po||""}}X.renderer=tt}if(K.tokenizer){const tt=this.defaults.tokenizer||new _Tokenizer(this.defaults);for(const rt in K.tokenizer){const ot=K.tokenizer[rt],ut=rt,yn=tt[ut];tt[ut]=(...uo)=>{let po=ot.apply(tt,uo);return po===!1&&(po=yn.apply(tt,uo)),po}}X.tokenizer=tt}if(K.hooks){const tt=this.defaults.hooks||new _Hooks;for(const rt in K.hooks){const ot=K.hooks[rt],ut=rt,yn=tt[ut];_Hooks.passThroughHooks.has(rt)?tt[ut]=uo=>{if(this.defaults.async)return Promise.resolve(ot.call(tt,uo)).then(mo=>yn.call(tt,mo));const po=ot.call(tt,uo);return yn.call(tt,po)}:tt[ut]=(...uo)=>{let po=ot.apply(tt,uo);return po===!1&&(po=yn.apply(tt,uo)),po}}X.hooks=tt}if(K.walkTokens){const tt=this.defaults.walkTokens,rt=K.walkTokens;X.walkTokens=function(ot){let ut=[];return ut.push(rt.call(this,ot)),tt&&(ut=ut.concat(tt.call(this,ot))),ut}}this.defaults={...this.defaults,...X}}),this}setOptions(W){return this.defaults={...this.defaults,...W},this}}CT=new WeakSet,hI=function(W,q){return(K,X,tt)=>{typeof X=="function"&&(tt=X,X=null);const rt={...X},ot={...this.defaults,...rt};this.defaults.async===!0&&rt.async===!1&&(ot.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),ot.async=!0);const ut=NC(this,DC,wP).call(this,!!ot.silent,!!ot.async,tt);if(typeof K>"u"||K===null)return ut(new Error("marked(): input parameter is undefined or null"));if(typeof K!="string")return ut(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(K)+", string expected"));if(checkDeprecations(ot,tt),ot.hooks&&(ot.hooks.options=ot),tt){const yn=tt,uo=ot.highlight;let po;try{ot.hooks&&(K=ot.hooks.preprocess(K)),po=W(K,ot)}catch(lf){return ut(lf)}const mo=lf=>{let yf;if(!lf)try{ot.walkTokens&&this.walkTokens(po,ot.walkTokens),yf=q(po,ot),ot.hooks&&(yf=ot.hooks.postprocess(yf))}catch(cf){lf=cf}return ot.highlight=uo,lf?ut(lf):yn(null,yf)};if(!uo||uo.length<3||(delete ot.highlight,!po.length))return mo();let wo=0;this.walkTokens(po,lf=>{lf.type==="code"&&(wo++,setTimeout(()=>{uo(lf.text,lf.lang,(yf,cf)=>{if(yf)return mo(yf);cf!=null&&cf!==lf.text&&(lf.text=cf,lf.escaped=!0),wo--,wo===0&&mo()})},0))}),wo===0&&mo();return}if(ot.async)return Promise.resolve(ot.hooks?ot.hooks.preprocess(K):K).then(yn=>W(yn,ot)).then(yn=>ot.walkTokens?Promise.all(this.walkTokens(yn,ot.walkTokens)).then(()=>yn):yn).then(yn=>q(yn,ot)).then(yn=>ot.hooks?ot.hooks.postprocess(yn):yn).catch(ut);try{ot.hooks&&(K=ot.hooks.preprocess(K));const yn=W(K,ot);ot.walkTokens&&this.walkTokens(yn,ot.walkTokens);let uo=q(yn,ot);return ot.hooks&&(uo=ot.hooks.postprocess(uo)),uo}catch(yn){return ut(yn)}}},DC=new WeakSet,wP=function(W,q,K){return X=>{if(X.message+=`
-Please report this to https://github.com/markedjs/marked.`,W){const tt="An error occurred:
"+escape$1(X.message+"",!0)+"
";if(q)return Promise.resolve(tt);if(K){K(null,tt);return}return tt}if(q)return Promise.reject(X);if(K){K(X);return}throw X}};const markedInstance=new Marked;function marked(F,W,q){return markedInstance.parse(F,W,q)}marked.options=marked.setOptions=function(F){return markedInstance.setOptions(F),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.getDefaults=_getDefaults;marked.defaults=_defaults;marked.use=function(...F){return markedInstance.use(...F),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.walkTokens=function(F,W){return markedInstance.walkTokens(F,W)};marked.parseInline=markedInstance.parseInline;marked.Parser=_Parser;marked.parser=_Parser.parse;marked.Renderer=_Renderer;marked.TextRenderer=_TextRenderer;marked.Lexer=_Lexer;marked.lexer=_Lexer.lex;marked.Tokenizer=_Tokenizer;marked.Slugger=_Slugger;marked.Hooks=_Hooks;marked.parse=marked;marked.options;marked.setOptions;marked.use;marked.walkTokens;marked.parseInline;_Parser.parse;_Lexer.lex;const _hoisted_1$n={class:"card",hoist:""},_hoisted_2$k=["src","alt"],_hoisted_3$h={class:"content"},_hoisted_4$g=["innerHTML"],_hoisted_5$e=["innerHTML"],_hoisted_6$d=["innerHTML"],_hoisted_7$a={slot:"footer"},_hoisted_8$9=["href"],_sfc_main$p=defineComponent({__name:"EntityCard.ce",props:{file:{type:String},language:{type:String,default:"en"},qid:{type:String}},setup(F){const W=F;watch$1(W,()=>{W.qid&&(q.value=W.qid),W.file&&(K.value=W.file)});const q=ref(W.qid);watch$1(q,()=>{ot()});const K=ref(W.file);watch$1(K,()=>{ot()});const X=ref();watch$1(X,po=>{po.summaryText||ut()});const tt=computed(()=>{var po;return(po=window.config)==null?void 0:po.source}),rt=ref();onMounted(()=>{ot()});async function ot(){var po;if(K.value){let mo=(po=tt.value)!=null&&po.owner?`https://raw.githubusercontent.com/${tt.value.owner}/${tt.value.repository}/${tt.value.branch}/`:"/",wo,lf,yf=K.value.split(".").pop();yf==="md"?wo=await fetch(`${mo}${K.value}`):yf==="yaml"?lf=await fetch(`${mo}${K.value}`):[wo,lf]=await Promise.all([fetch(`${mo}${K.value}.md`),fetch(`${mo}${K.value}.yaml`)]);let cf=lf!=null&&lf.ok?uo(await lf.text()):{};wo!=null&&wo.ok&&(cf={...cf,...yn(await wo.text())}),cf.id&&(cf={...await getEntity(cf.id),...cf}),X.value=cf}else q.value&&(X.value=await getEntity(q.value))}function ut(){if(X.value.wikipedia){let po=X.value.wikipedia.replace(/\/w\//,"/wiki").split("/wiki/").pop();fetch(`https://${W.language}.wikipedia.org/api/rest_v1/page/summary/${po}`).then(mo=>mo.json()).then(mo=>{rt.value=mo.extract_html||mo.extract,q.value&&(window.entityData[q.value].summaryText=mo.extract_html||mo.extract)})}}function yn(po){var _f,$f,wf;let mo=(_f=new DOMParser().parseFromString(marked.parse(po),"text/html"))==null?void 0:_f.firstChild,wo=($f=mo==null?void 0:mo.querySelector("h1,h2,h3,h4,h5,h6"))==null?void 0:$f.textContent,lf=(wf=mo==null?void 0:mo.querySelector("img"))==null?void 0:wf.src,yf,cf=[];mo.querySelectorAll("p").forEach(Pf=>{var Cf,Af;/^Q\d+$/.test(((Cf=Pf.textContent)==null?void 0:Cf.trim())||"")?yf=(Af=Pf.textContent)==null?void 0:Af.trim():cf.push(Pf.textContent||"")});let vf={};return wo&&(vf.label=wo),yf&&(vf.id=yf),cf.length&&(vf.description=cf.join(`
+Please report this to https://github.com/markedjs/marked.`,W){const tt="An error occurred:
"+escape$1(X.message+"",!0)+"
";if(q)return Promise.resolve(tt);if(K){K(null,tt);return}return tt}if(q)return Promise.reject(X);if(K){K(X);return}throw X}};const markedInstance=new Marked;function marked(F,W,q){return markedInstance.parse(F,W,q)}marked.options=marked.setOptions=function(F){return markedInstance.setOptions(F),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.getDefaults=_getDefaults;marked.defaults=_defaults;marked.use=function(...F){return markedInstance.use(...F),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.walkTokens=function(F,W){return markedInstance.walkTokens(F,W)};marked.parseInline=markedInstance.parseInline;marked.Parser=_Parser;marked.parser=_Parser.parse;marked.Renderer=_Renderer;marked.TextRenderer=_TextRenderer;marked.Lexer=_Lexer;marked.lexer=_Lexer.lex;marked.Tokenizer=_Tokenizer;marked.Slugger=_Slugger;marked.Hooks=_Hooks;marked.parse=marked;marked.options;marked.setOptions;marked.use;marked.walkTokens;marked.parseInline;_Parser.parse;_Lexer.lex;const _hoisted_1$n={class:"card",hoist:""},_hoisted_2$k=["src","alt"],_hoisted_3$h={class:"content"},_hoisted_4$g=["innerHTML"],_hoisted_5$e=["innerHTML"],_hoisted_6$d=["innerHTML"],_hoisted_7$a={slot:"footer"},_hoisted_8$9=["href"],_sfc_main$p=defineComponent({__name:"EntityCard.ce",props:{file:{type:String},language:{type:String,default:"en"},qid:{type:String}},setup(F){const W=F;watch$1(W,()=>{W.qid&&(q.value=W.qid),W.file&&(K.value=W.file)});const q=ref(W.qid);watch$1(q,()=>{ot()});const K=ref(W.file);watch$1(K,()=>{ot()});const X=ref();watch$1(X,po=>{po.summaryText||ut()});const tt=computed(()=>{var po;return(po=window.config)==null?void 0:po.source}),rt=ref();onMounted(()=>{ot()});async function ot(){var po;if(K.value){let mo=(po=tt.value)!=null&&po.owner?`https://raw.githubusercontent.com/${tt.value.owner}/${tt.value.repository}/${tt.value.branch}/`:"/",wo,lf,yf=K.value.split(".").pop();yf==="md"?wo=await fetch(`${mo}${K.value}`):yf==="yaml"?lf=await fetch(`${mo}${K.value}`):[wo,lf]=await Promise.all([fetch(`${mo}${K.value}.md`),fetch(`${mo}${K.value}.yaml`)]);let cf=lf!=null&&lf.ok?uo(await lf.text()):{};wo!=null&&wo.ok&&(cf={...cf,...yn(await wo.text())}),cf.id&&(cf={...await getEntity(cf.id),...cf}),X.value=cf}else q.value&&(X.value=await getEntity(q.value))}function ut(){if(X.value.wikipedia){let po=X.value.wikipedia.replace(/\/w\//,"/wiki").split("/wiki/").pop();fetch(`https://${W.language}.wikipedia.org/api/rest_v1/page/summary/${po}`).then(mo=>mo.json()).then(mo=>{rt.value=mo.extract_html||mo.extract,q.value&&(window.entityData[q.value].summaryText=mo.extract_html||mo.extract)})}}function yn(po){var _f,$f,xf;let mo=(_f=new DOMParser().parseFromString(marked.parse(po),"text/html"))==null?void 0:_f.firstChild,wo=($f=mo==null?void 0:mo.querySelector("h1,h2,h3,h4,h5,h6"))==null?void 0:$f.textContent,lf=(xf=mo==null?void 0:mo.querySelector("img"))==null?void 0:xf.src,yf,cf=[];mo.querySelectorAll("p").forEach(Af=>{var Cf,Pf;/^Q\d+$/.test(((Cf=Af.textContent)==null?void 0:Cf.trim())||"")?yf=(Pf=Af.textContent)==null?void 0:Pf.trim():cf.push(Af.textContent||"")});let vf={};return wo&&(vf.label=wo),yf&&(vf.id=yf),cf.length&&(vf.description=cf.join(`
`)),lf&&(vf.thumbnail=lf),vf}function uo(po){return load$2(po)}return(po,mo)=>{var wo,lf,yf,cf,vf,_f;return openBlock(),createElementBlock("sl-card",_hoisted_1$n,[(wo=X.value)!=null&&wo.thumbnail?(openBlock(),createElementBlock("img",{key:0,slot:"image",src:(lf=X.value)==null?void 0:lf.thumbnail,alt:(yf=X.value)==null?void 0:yf.label},null,8,_hoisted_2$k)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_3$h,[(cf=X.value)!=null&&cf.label?(openBlock(),createElementBlock("h2",{key:0,innerHTML:X.value.label},null,8,_hoisted_4$g)):createCommentVNode("",!0),(vf=X.value)!=null&&vf.description?(openBlock(),createElementBlock("p",{key:1,class:"description",innerHTML:X.value.description},null,8,_hoisted_5$e)):createCommentVNode("",!0),rt.value?(openBlock(),createElementBlock("p",{key:2,class:"description",innerHTML:rt.value},null,8,_hoisted_6$d)):createCommentVNode("",!0)]),createBaseVNode("div",_hoisted_7$a,[!K.value&&q.value&&((_f=X.value)!=null&&_f.wikipedia)?(openBlock(),createElementBlock("a",{key:0,href:X.value.wikipedia,target:"_blank"},"Wikipedia",8,_hoisted_8$9)):createCommentVNode("",!0)])])}}}),_style_0$n=`.card{display:flex;flex-direction:column;min-width:200px;max-width:300px;max-height:800px;background-color:#fff;margin:1em;box-shadow:#32325d40 0 6px 12px -2px,#0000004d 0 3px 7px -3px;border:1px solid #ccc;border-radius:3px}img{max-height:375px;-o-object-fit:cover;object-fit:cover}.content{display:flex;flex-direction:column;flex:1;gap:.5em;padding:.5em;overflow-y:scroll}h2{margin:0}.description{margin:0;padding:0;font-style:italic;font-size:.9em}.card [slot=footer]{display:flex;justify-content:space-between;align-items:center;padding:.5em}
`,EntityCard=_export_sfc(_sfc_main$p,[["styles",[_style_0$n]]]),_hoisted_1$m=["innerHTML"],_hoisted_2$j=["qid","file","language"],_sfc_main$o=defineComponent({__name:"EntityInfobox.ce",props:{file:{type:String},language:{type:String,default:"en"},qid:{type:String},text:{type:String}},setup(F){const W=F,q=ref(null),K=computed(()=>{var ut,yn;return(yn=(ut=q.value)==null?void 0:ut.getRootNode())==null?void 0:yn.host}),X=computed(()=>{var ut;return(ut=q==null?void 0:q.value)==null?void 0:ut.parentNode}),tt=ref(),rt=ref(),ot=ref(W.text);return watch$1(W,ut=>{tt.value=ut.qid,ot.value=ut.text}),onMounted(()=>{var ut,yn;ot.value=W.text||((ut=K.value)==null?void 0:ut.textContent),((yn=X.value)==null?void 0:yn.querySelector("sl-dropdown")).addEventListener("sl-show",uo=>{W.qid&&(tt.value=W.qid),W.file&&(rt.value=W.file)})}),(ut,yn)=>(openBlock(),createElementBlock("sl-dropdown",{ref_key:"root",ref:q,distance:"12",placement:"top",hoist:""},[createBaseVNode("div",{slot:"trigger",innerHTML:ot.value},null,8,_hoisted_1$m),tt.value||rt.value?(openBlock(),createElementBlock("ve-entity-card",{key:0,qid:tt.value,file:rt.value,language:W.language},null,8,_hoisted_2$j)):createCommentVNode("",!0)],512))}}),_style_0$m=`:host{cursor:pointer}sl-dropdown svg{width:1.2em;height:1.2em;cursor:pointer}
`,EntityInfobox=_export_sfc(_sfc_main$o,[["styles",[_style_0$m]]]);/*
@@ -3426,14 +3426,14 @@ Please report this to https://github.com/markedjs/marked.`,W){const tt="An er
* @author: HtmlStream
* @license: Htmlstream Libraries (https://preline.co/docs/license.html)
* Copyright 2023 Htmlstream
- */class HSOverlay extends Component$1{constructor(q){super("[data-hs-overlay]");Sv(this,"root");this.root=q,this.openNextOverlay=!1}init(){this.root.addEventListener("click",q=>{const X=q.target.closest(this.selector),tt=q.target.closest("[data-hs-overlay-close]"),rt=q.target.getAttribute("aria-overlay")==="true";if(tt)return this.close(tt.closest(".hs-overlay.open"));if(X)return this.toggle(this.root.querySelector(X.getAttribute("data-hs-overlay")));rt&&this._onBackdropClick(q.target)}),this.root.addEventListener("keydown",q=>{if(q.keyCode===27){const K=this.root.querySelector(".hs-overlay.open");if(!K)return;setTimeout(()=>{K.getAttribute("data-hs-overlay-keyboard")!=="false"&&this.close(K)})}})}toggle(q){q&&(q.classList.contains("hidden")?this.open(q):this.close(q))}open(q){if(!q)return;const K=this.root.querySelector(".hs-overlay.open"),X=this.getClassProperty(q,"--body-scroll","false")!=="true";if(K)return this.openNextOverlay=!0,this.close(K).then(()=>{this.open(q),this.openNextOverlay=!1});X&&(this.root.style.overflow="hidden"),this._buildBackdrop(q),this._checkTimer(q),this._autoHide(q),q.classList.remove("hidden"),q.setAttribute("aria-overlay","true"),q.setAttribute("tabindex","-1"),setTimeout(()=>{q.classList.contains("hidden")||(q.classList.add("open"),this._fireEvent("open",q),this._dispatch("open.hs.overlay",q,q),this._focusInput(q))},50)}close(q){return new Promise(K=>{q&&(q.classList.remove("open"),q.removeAttribute("aria-overlay"),q.removeAttribute("tabindex","-1"),this.afterTransition(q,()=>{q.classList.contains("open")||(q.classList.add("hidden"),this._destroyBackdrop(),this._fireEvent("close",q),this._dispatch("close.hs.overlay",q,q),this.root.style.overflow="",K(q))}))})}_autoHide(q){const K=parseInt(this.getClassProperty(q,"--auto-hide","0"));K&&(q.autoHide=setTimeout(()=>{this.close(q)},K))}_checkTimer(q){q.autoHide&&(clearTimeout(q.autoHide),delete q.autoHide)}_onBackdropClick(q){this.getClassProperty(q,"--overlay-backdrop","true")!=="static"&&this.close(q)}_buildBackdrop(q){const K=q.getAttribute("data-hs-overlay-backdrop-container")||!1;let X=document.createElement("div"),tt="transition duration fixed inset-0 z-50 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 hs-overlay-backdrop";for(const ut of q.classList.values())ut.startsWith("hs-overlay-backdrop-open:")&&(tt+=` ${ut}`);const rt=this.getClassProperty(q,"--overlay-backdrop","true")!=="static";this.getClassProperty(q,"--overlay-backdrop","true")!=="false"&&(K&&(X=this.root.querySelector(K).cloneNode(!0),X.classList.remove("hidden"),tt=X.classList,X.classList=""),rt&&X.addEventListener("click",()=>this.close(q),!0),X.setAttribute("data-hs-overlay-backdrop-template",""),this.root.appendChild(X),setTimeout(()=>{X.classList=tt}))}_destroyBackdrop(){const q=this.root.querySelector("[data-hs-overlay-backdrop-template]");q&&(this.openNextOverlay&&(q.style.transitionDuration=`${parseFloat(window.getComputedStyle(q).transitionDuration.replace(/[^\d.-]/g,""))*1.8}s`),q.classList.add("opacity-0"),this.afterTransition(q,()=>{q.remove()}))}_focusInput(q){const K=q.querySelector("[autofocus]");K&&K.focus()}}const _hoisted_1$l=["innerHTML"],_hoisted_2$i={class:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"},_hoisted_3$g={class:"flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"},_hoisted_4$f={class:"p-4 overflow-y-auto flex items-center gap-4"},_hoisted_5$d=createBaseVNode("sl-spinner",{style:{"font-size":"3rem","--indicator-color":"deeppink","--track-color":"pink"}},null,-1),_hoisted_6$c=["innerHTML"],_sfc_main$n=defineComponent({__name:"Footer.ce",setup(F){const W=ref([]),q=ref(null),K=computed(()=>{var wo,lf;return(lf=(wo=q.value)==null?void 0:wo.getRootNode())==null?void 0:lf.host}),X=ref(null),tt=computed(()=>X==null?void 0:X.value),rt=computed(()=>new HSOverlay(tt.value)),ot=ref(null),ut=computed(()=>ot==null?void 0:ot.value),yn=ref("Generating PDF...");watch$1(ut,wo=>{rt.value.init(),wo.addEventListener("open.hs.overlay",lf=>uo.value=!0),wo.addEventListener("close.hs.overlay",lf=>uo.value=!1)});const uo=ref(!1);watch$1(uo,wo=>{wo?rt.value.open(ut.value):rt.value.close(ut.value)}),watch$1(K,()=>{po()});function po(){function wo(){return Array.from(K.value.querySelectorAll("li")).map(lf=>{let yf=document.createElement("li");yf.innerHTML=marked.parse(lf.textContent||"");let cf=yf.querySelector("code");if(cf){let vf=cf.previousElementSibling,_f=vf||yf,$f=mo(cf.innerHTML);$f.id&&(_f.id=$f.id),$f.class&&$f.class.split(" ").forEach(wf=>_f.classList.add(wf)),$f.style&&_f.setAttribute("style",$f.style),cf.remove()}return yf})}W.value=wo(),new MutationObserver(lf=>{for(let yf of lf)yf.type==="childList"&&(W.value=wo())}).observe(K.value,{childList:!0,subtree:!0})}function mo(wo){var vf;let lf=[];wo=wo.replace(/”/g,'"').replace(/”/g,'"').replace(/’/g,"'"),(vf=wo==null?void 0:wo.match(/[^\s"]+|"([^"]*)"/gmi))==null||vf.filter(_f=>_f).forEach(_f=>{lf.length>0&&lf[lf.length-1].indexOf("=")===lf[lf.length-1].length-1?lf[lf.length-1]=`${lf[lf.length-1]}${_f}`:lf.push(_f)});let yf={},cf=0;for(;cf0){let[$f,wf]=_f.split("=");wf=wf[0]==='"'&&wf[wf.length-1]==='"'?wf.slice(1,-1):wf,yf[$f]?yf[$f]+=` ${wf}`:yf[$f]=wf}else if(_f[0]==="."){let $f="class",wf=_f.slice(1);wf=wf[0]==='"'&&wf[wf.length-1]==='"'?wf.slice(1,-1):wf,yf[$f]?yf[$f]+=` ${wf}`:yf[$f]=wf}else if(_f[0]===":"){let $f="style",wf;_f.length===1&&cf<_f.length&&lf[cf+1][0]==='"'?(wf=lf[cf+1].slice(1,-1),cf++):wf=_f.slice(1),yf[$f]?yf[$f]+=` ${wf}`:yf[$f]=wf}else if(_f[0]==='"'){let $f="args",wf=_f.slice(1,-1);yf[$f]?yf[$f].push(wf):yf[$f]=[wf]}else _f[0]==="#"?yf.id=_f.slice(1):yf[_f]=!0;cf++}return yf}return(wo,lf)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("ul",{ref_key:"footer",ref:q,id:"footer",class:"flex bg-slate-100 p-2 gap-3 mt-8 items-center w-full h-8"},[(openBlock(!0),createElementBlock(Fragment,null,renderList(W.value,(yf,cf)=>(openBlock(),createElementBlock("li",{key:`li-${cf}`,innerHTML:yf.innerHTML,class:normalizeClass(yf.className),style:normalizeStyle(yf.getAttribute("style")||"")},null,14,_hoisted_1$l))),128))],512),createBaseVNode("div",{ref_key:"overlayRef",ref:X},[createBaseVNode("div",{ref_key:"modalRef",ref:ot,id:"hs-basic-modal",class:"hs-overlay hidden w-full h-full fixed top-0 start-0 z-[80] overflow-x-hidden overflow-y-auto pointer-events-none"},[createBaseVNode("div",_hoisted_2$i,[createBaseVNode("div",_hoisted_3$g,[createBaseVNode("div",_hoisted_4$f,[_hoisted_5$d,createBaseVNode("p",{innerHTML:yn.value},null,8,_hoisted_6$c)])])])],512)],512)],64))}}),_style_0$l=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.\\!relative{position:relative!important}.relative{position:relative}.sticky{position:sticky}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.inset-0{top:0;right:0;bottom:0;left:0}.end-1{inset-inline-end:.25rem}.right-\\[10px\\]{right:10px}.start-0{inset-inline-start:0px}.top-0{top:0}.top-\\[12px\\]{top:12px}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\\[80\\]{z-index:80}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.m-1{margin:.25rem}.m-3{margin:.75rem}.me-1{margin-inline-end:.25rem}.ml-1{margin-left:.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-none{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.\\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.\\!grid{display:grid!important}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-1{height:.25rem}.h-40{height:10rem}.h-8{height:2rem}.h-80{height:20rem}.h-auto{height:auto}.h-full{height:100%}.min-h-\\[calc\\(100\\%-3\\.5rem\\)\\]{min-height:calc(100% - 3.5rem)}.w-1{width:.25rem}.w-\\[a-z0-9-\\]{width:a-z0-9-}.w-full{width:100%}.max-w-\\[24px\\]{max-width:24px}.max-w-xs{max-width:20rem}.flex-shrink,.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-top{caption-side:top}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.\\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform,.transform-cpu{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.columns-1{-moz-columns:1;columns:1}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-normal{align-content:normal}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.content-stretch{align-content:stretch}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-stretch{justify-content:stretch}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.hyphens-none{-webkit-hyphens:none;hyphens:none}.hyphens-manual{-webkit-hyphens:manual;hyphens:manual}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-none{border-style:none}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[rgb\\(255\\,0\\,0\\)\\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-14{padding:3.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pe-1{padding-inline-end:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.\\!ordinal{--tw-ordinal: ordinal !important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-\\[\\#336699\\]\\/\\[\\.35\\]{color:#33669959}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!invert{--tw-invert: invert(100%) !important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale: grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert: invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia: sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.\\!transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.content-\\[\\'this-is-also-valid\\]-weirdly-enough\\'\\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.\\[--placement\\:bottom\\]{--placement: bottom}.\\[--placement\\:top\\]{--placement: top}.\\[--trigger\\:click\\]{--trigger: click}.\\[-\\:\\=\\]{-: =}.\\[a-zA-Z0-9\\:\\\\\\\\-\\\\\\\\\\._\\$\\]{a-z-a--z0-9:\\\\-\\\\. $}.\\[a-zA-Z0-9\\:_-\\]{a-z-a--z0-9:-}.\\[a-zA-Z\\:_\\]{a-z-a--z:}.\\[a\\:a\\]{a:a}.\\[vite\\:css\\]{vite:css}.\\[vite\\:html\\]{vite:html}html{padding:1rem;font-family:sans-serif}ve-header ul,ve-menu ul{display:none}@media (min-width: 640px){.sm\\:container{width:100%}@media (min-width: 640px){.sm\\:container{max-width:640px}}@media (min-width: 768px){.sm\\:container{max-width:768px}}@media (min-width: 1024px){.sm\\:container{max-width:1024px}}@media (min-width: 1280px){.sm\\:container{max-width:1280px}}@media (min-width: 1536px){.sm\\:container{max-width:1536px}}}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\\:font-bold:hover{font-weight:700}.before\\:hover\\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\\:before\\:text-center:hover:before{content:var(--tw-content);text-align:center}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\\:hover\\:text-center:hover:focus{text-align:center}.hover\\:focus\\:text-center:focus:hover{text-align:center}.hs-tooltip.show .hs-tooltip-shown\\:visible{visibility:visible}.hs-tooltip.show .hs-tooltip-shown\\:opacity-100{opacity:1}.open.hs-overlay-open\\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\\:opacity-100{opacity:1}.open.hs-overlay-open\\:duration-500{transition-duration:.5s}.open .hs-overlay-open\\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\\:opacity-100{opacity:1}.open .hs-overlay-open\\:duration-500{transition-duration:.5s}:is(.dark .dark\\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\\:shadow-slate-700\\/\\[\\.7\\]){--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\\:focus\\:ring-offset-gray-800:focus){--tw-ring-offset-color: #1f2937}@media (min-width: 640px){.sm\\:mx-auto{margin-left:auto;margin-right:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:underline{text-decoration-line:underline}}@media (min-width: 768px){.md\\:p-5{padding:1.25rem}}@media (min-width: 1024px){:is(.dark .dark\\:lg\\:hover\\:\\[paint-order\\:markers\\]:hover){paint-order:markers}}img,svg{height:36px}.push{margin-left:auto}@media only screen and (max-width: 768px){#footer{font-size:.8em}li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:#00000080;z-index:2;cursor:pointer}
-`,Footer=_export_sfc(_sfc_main$n,[["styles",[_style_0$l]]]),_hoisted_1$k=["id"],_hoisted_2$h=["src","onClick","onDragstart"],_hoisted_3$f=["innerHTML"],_hoisted_4$e=["src"],_hoisted_5$c={slot:"footer",class:"footer"},_hoisted_6$b=["manifest"],_hoisted_7$9={class:"controls push"},_hoisted_8$8={key:0,class:"toolbar"},_hoisted_9$9=createBaseVNode("svg",{class:"push edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z"})],-1),_hoisted_10$9=createBaseVNode("svg",{class:"delete",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M170.5 51.6L151.5 80h145l-19-28.4c-1.5-2.2-4-3.6-6.7-3.6H177.1c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80H368h48 8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-8V432c0 44.2-35.8 80-80 80H112c-44.2 0-80-35.8-80-80V128H24c-13.3 0-24-10.7-24-24S10.7 80 24 80h8H80 93.8l36.7-55.1C140.9 9.4 158.4 0 177.1 0h93.7c18.7 0 36.2 9.4 46.6 24.9zM80 128V432c0 17.7 14.3 32 32 32H336c17.7 0 32-14.3 32-32V128H80zm80 64V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16z"})],-1),_hoisted_11$9=[_hoisted_9$9,_hoisted_10$9],_sfc_main$m=defineComponent({__name:"Gallery.ce",props:{active:{type:Boolean},base:{type:String},caption:{type:Boolean,default:!1},class:{type:String},data:{type:String},dialogWidth:{type:String,default:"100vw"},ghDir:{type:String},height:{type:Number},repoIsWritable:{type:Boolean,default:!1},slot:{type:String}},setup(F){const W=F,q=ref(null),K=computed(()=>{var kf,Nf;return(Nf=(kf=q.value)==null?void 0:kf.getRootNode())==null?void 0:Nf.host});watch$1(K,()=>{Cf()});const X=computed(()=>{var kf;return(kf=q==null?void 0:q.value)==null?void 0:kf.parentNode}),tt=self.window,rt=ref(tt.config||{}),ot=ref(null);watch$1(ot,async()=>{var kf,Nf,Yf,Gf,rp,ip;(kf=rt.value)!=null&&kf.github&&((Nf=ot.value)!=null&&Nf.token)&&(ut.value=await Hf((Gf=(Yf=rt.value)==null?void 0:Yf.source)==null?void 0:Gf.owner,(ip=(rp=rt.value)==null?void 0:rp.source)==null?void 0:ip.repository,ot.value.username,ot.value.token))});const ut=ref(!1),yn=computed(()=>{var kf;if((kf=rt.value.source)!=null&&kf.owner)return rt.value.source;if(W.base){let[Nf,Yf,Gf,...rp]=W.base.split("/");return{owner:Nf,repository:Yf,branch:Gf,dir:rp?`/${rp.join("/")}/`:"/"}}return null}),uo=ref([]);watch$1(uo,async kf=>{mo.value=await loadManifests(kf)});function po(kf){var Nf;return Object.fromEntries((Nf=kf.metadata)==null?void 0:Nf.map(Yf=>[(Yf.label.en||Yf.label.none||Object.keys(Yf.label)[0])[0],(Yf.value.en||Yf.value.none||Object.keys(Yf.value)[0])[0]]))}const mo=ref([]);watch$1(mo,kf=>{wo.value=kf.map(Nf=>{var vp;let Yf=po(Nf),Gf=[Yf.camera,Yf.exposure,Yf.mode].filter(Np=>Np).join(", "),rp=findItem({type:"Annotation",motivation:"painting"},Nf,1).body,ip=((vp=Nf.metadata)==null?void 0:vp.filter(Np=>(Np.label.en||Np.label.none)[0]==="orientation").map(Np=>(Np.value.en||Np.value.none)[0])[0])||1;ip=Array.isArray(ip)?ip[0]:ip;let ap=ip===1||ip===3?rp.width:rp.height,yp=ip===1||ip===3?rp.height:rp.width;return{id:Nf.id,label:Nf.label?Nf.label.en||Nf.label.none||Object.values(Nf.label)[0]:null,summary:Nf.summary?Nf.summary.en||Nf.summary.none||Object.values(Nf.summary)[0]:null,width:ap,height:yp,format:rp.format,orientation:ip,aspect_ratio:Number((ap/yp).toFixed(4)),thumbnail:Nf.thumbnail[0].id,photoDetails:Gf}})});const wo=ref([]);watch$1(wo,kf=>{Af()});const lf=ref(null);watch$1(lf,()=>{$f.value=lf.value!==null});const yf=ref(0),cf=ref([]);let vf,_f;const $f=ref(!1);watch$1($f,()=>{_f.open=$f.value});function wf(kf){var vp,Np,jp;if(kf.indexOf("http")===0)return kf;let Nf,Yf;kf.indexOf(":")>0?[Nf,Yf]=kf.split(":"):Yf=kf;let Gf=Yf.split("/"),rp=Gf[Gf.length-1],ip=rp.lastIndexOf("."),ap=rp.slice(0,ip),yp=rp.slice(ip+1);return Gf[Gf.length-1]=`${encodeURIComponent(ap)}.${yp}`,kf=Gf.join("/"),kf=Nf?`${Nf}:${Gf.join("/")}`:`gh:${(vp=yn.value)==null?void 0:vp.owner}/${(Np=yn.value)==null?void 0:Np.repository}${(jp=yn.value)==null?void 0:jp.dir}/${Gf.join("/")}`,`https://iiif.mdpress.io/${kf}/manifest.json`}function Pf(kf){var rp;let Nf=[];kf=kf.replace(/”/g,'"').replace(/”/g,'"'),(rp=kf==null?void 0:kf.match(/[^\s"]+|"([^"]*)"/gmi))==null||rp.filter(ip=>ip).forEach(ip=>{Nf.length>0&&Nf[Nf.length-1].indexOf("=")===Nf[Nf.length-1].length-1?Nf[Nf.length-1]=`${Nf[Nf.length-1]}${ip}`:Nf.push(ip)});let Yf={},Gf=["src","caption","options","fit","rotate","seq"];return Nf.filter(ip=>ip!=="image").forEach((ip,ap)=>{if(ip.indexOf("=")>0){let yp=ip.indexOf("="),vp=ip.slice(0,yp),Np=ip.slice(yp+1);Yf[vp]=Np[0]==='"'?Np.slice(1,-1):Np}else Yf[Gf[ap]]=ip[0]==='"'?ip.slice(1,-1):ip}),Yf}function Cf(){if(W.data){let kf=document.getElementById(W.data);uo.value=Array.from(kf.querySelectorAll("li")).map(Nf=>Nf.textContent).map(Nf=>wf(Nf))}else if(W.ghDir){let kf=W.ghDir[0]==="/"?W.ghDir.slice(1):W.ghDir;fetch(`https://iiif.mdpress.io/gh-dir/${kf}?filter=images`).then(Nf=>Nf.json()).then(Nf=>{uo.value=Nf.map(Yf=>wf(`gh:${W.ghDir}/${Yf.name}`))})}else{let kf=function(){uo.value=Array.from(Nf.querySelectorAll("li")).map(Yf=>Yf.innerText).map(Yf=>Pf(Yf)).map(Yf=>wf(Yf.src))},Nf=K.value;kf(),new MutationObserver(Yf=>{for(let Gf of Yf)Gf.type==="childList"&&kf()}).observe(Nf,{childList:!0,subtree:!0})}}function Af(){if(wo.value.length===0)return;let kf=W.caption?32:0,Nf=wo.value.length;const Yf=yf.value<=640?2:yf.value<=960?3:yf.value<=1280?4:yf.value<=1920?5:6;let Gf=[],rp=isMobile$1()?8:16,ip=[],ap=0,yp=0,vp=0;wo.value.forEach((Np,jp)=>{if(vp+=Np.aspect_ratio,ip.push(Np),vp>=Yf||jp+1===Nf){vp=Math.max(vp,Yf);const Jp=(yf.value-rp*(ip.length-1))/vp;ip.forEach(ng=>{const og=Jp*ng.aspect_ratio;Gf.push({width:`${Math.round(og)}px`,height:`${Math.round(Jp+kf)}px`,transform:`translate3d(${Math.round(ap)}px, ${Math.round(yp)}px, 0)`}),ap+=og+rp}),ip=[],vp=0,yp+=Jp+rp+kf,ap=0}}),q.value&&(q.value.style.height=`${yp-rp}px`),cf.value=Gf}function Bf(kf){lf.value=mo.value[kf]}onMounted(()=>{var kf;ot.value=localStorage.getItem("auth-user")&&JSON.parse(localStorage.getItem("auth-user")||"{}"),_f=(kf=X.value)==null?void 0:kf.querySelector(".dialog"),_f.addEventListener("sl-hide",Nf=>$f.value=!1)}),watch$1(q,()=>{var kf;q.value&&(yf.value=((kf=q.value)==null?void 0:kf.clientWidth)||0,new ResizeObserver(()=>{var Yf,Gf,rp;(Yf=q.value)!=null&&Yf.clientWidth&&((Gf=q.value)==null?void 0:Gf.clientWidth)!==yf.value&&(yf.value=(rp=q.value)==null?void 0:rp.clientWidth,clearTimeout(vf),vf=setTimeout(Af,10))}).observe(q.value))});async function Hf(kf,Nf,Yf,Gf){let rp=`https://api.github.com/repos/${kf}/${Nf}/collaborators/${Yf}`,ip=await fetch(rp,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${Gf}`}});return ip.ok&&ip.status===204}function Df(kf){navigator.clipboard&&navigator.clipboard.writeText(kf)}function Lf(kf,Nf){var Yf;(Yf=Nf.dataTransfer)==null||Yf.setData("text/plain",mo.value[kf].id)}return(kf,Nf)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",{ref_key:"root",ref:q,id:"gallery"},[cf.value.length>0?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(wo.value,(Yf,Gf)=>(openBlock(),createElementBlock("div",{class:"gallery-item",id:Yf.id,style:normalizeStyle(cf.value[Gf])},[createBaseVNode("img",{class:"image fade-in",onload:"this.style.opacity = 1",src:wo.value[Gf].thumbnail,onClick:rp=>Bf(Gf),onDragstart:rp=>Lf(Gf,rp),draggable:""},null,40,_hoisted_2$h),F.caption?(openBlock(),createElementBlock("div",{key:0,style:{height:"32px",display:"flex","align-items":"center","margin-left":"0.25em"},innerHTML:wo.value[Gf].label},null,8,_hoisted_3$f)):createCommentVNode("",!0)],12,_hoisted_1$k))),256)):createCommentVNode("",!0)],512),createBaseVNode("sl-dialog",{class:"dialog","no-header":"",style:normalizeStyle({"--width":F.dialogWidth,"--body-spacing":0,"--footer-spacing":"0.5em"})},[lf.value?(openBlock(),createElementBlock("ve-image",{key:0,"no-caption":"",src:lf.value.id,fit:"contain"},null,8,_hoisted_4$e)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_5$c,[createBaseVNode("ve-caption",{manifest:lf.value},null,8,_hoisted_6$b),createBaseVNode("div",_hoisted_7$9,[ut.value?(openBlock(),createElementBlock("div",_hoisted_8$8,_hoisted_11$9)):createCommentVNode("",!0),createBaseVNode("img",{src:"https://v3.juncture-digital.org/images/iiif.png",class:"iiif",alt:"IIIF manifest icon",onClick:Nf[0]||(Nf[0]=Yf=>Df(lf.value.id))}),createBaseVNode("sl-button",{variant:"primary",onClick:Nf[1]||(Nf[1]=Yf=>lf.value=null)},"Close")])])],4)],64))}}),_style_0$k=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*{box-sizing:border-box}#gallery{position:relative;margin:1rem}@media only screen and (max-width: 768px){#gallery{margin:0}}sl-dialog::part(panel){max-width:unset;max-height:unset;height:100dvh}sl-dialog::part(overlay){--sl-overlay-background-color: rgba(100, 100, 100, .8)}sl-dialog::part(footer){background-color:#64646480}.gallery-item{position:absolute;display:flex;flex-direction:column;width:100px;box-shadow:2px 2px 4px #ccc}.gallery-item:hover{box-shadow:#32325d40 0 6px 12px -2px,#0000004d 0 3px 7px -3px}.image{left:0;top:0;width:100%;height:100%;opacity:0;background-color:#d5d5d5}.fade-in{opacity:0;-webkit-transition:all 1s ease;-moz-transition:all 1s ease;-ms-transition:all 1s ease;-o-transition:all 1s ease}.image:hover{cursor:pointer}.icons{display:flex;align-items:center;gap:6px}.size{width:100%;font-size:.8em;margin-top:3px}.provider-logo{height:20px}.license{cursor:pointer;display:inline-block}.image-card{font-size:.85em;display:flex;flex-direction:column}.title{display:flex;align-items:center;gap:6px;font-size:.9em}.title img{width:16px;opacity:1}.clamp{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.text{margin:6px 0;height:50px}.text p{margin:0;padding:0}.license{display:flex;align-items:center;gap:3px;font-size:.8em;margin-left:.5rem}a.license{color:#000;text-decoration:none;font-size:.9rem}sl-icon{font-size:1.2rem}.push{margin-left:auto}.controls{display:flex;align-items:center;gap:1em}.toolbar{height:32px;justify-content:flex-end;display:flex;align-items:center;gap:.5em;padding:0 .2em}.toolbar svg{width:20px;height:20px;cursor:pointer;fill:#777}.toolbar svg:hover{fill:#444}.dialog .footer{display:flex;align-items:center;gap:.5em;padding:.5em;text-align:left}.iiif{width:32px;height:32px;cursor:copy}.iiif:hover{width:40px;height:40px}
-`,Gallery=_export_sfc(_sfc_main$m,[["styles",[_style_0$k]]]),_hoisted_1$j={ref:"root",class:"main"},_hoisted_2$g=createBaseVNode("svg",{slot:"prefix",width:"32",height:"32",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},[createBaseVNode("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})],-1),_hoisted_3$e=["value"],_hoisted_4$d={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_5$b=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_6$a=[_hoisted_5$b],_hoisted_7$8=["onClick","innerHTML"],_hoisted_8$7={key:0},_hoisted_9$8={key:0},_hoisted_10$8={slot:"trigger",size:"medium"},_hoisted_11$8={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_12$8=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_13$7=[_hoisted_12$8],_hoisted_14$6=["onClick","innerHTML"],_hoisted_15$5={key:1},_hoisted_16$5={key:0},_hoisted_17$5={key:0,slot:"trigger",size:"medium"},_hoisted_18$5={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_19$4=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_20$4=[_hoisted_19$4],_hoisted_21$4=["onClick","innerHTML"],_hoisted_22$3={key:0},_hoisted_23$3={slot:"trigger",size:"medium"},_hoisted_24$3={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_25$3=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_26$3=[_hoisted_25$3],_hoisted_27$3=["onClick","disabled"],_hoisted_28$3={key:0,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_29$2=createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"},null,-1),_hoisted_30$2=[_hoisted_29$2],_hoisted_31$2={key:1,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512"},_hoisted_32$2=createBaseVNode("path",{d:"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"},null,-1),_hoisted_33$2=[_hoisted_32$2],_hoisted_34$2={key:2,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},_hoisted_35$2=createBaseVNode("path",{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},null,-1),_hoisted_36$2=[_hoisted_35$2],_hoisted_37$2=["onClick"],_hoisted_38$2=createBaseVNode("svg",{slot:"prefix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"})],-1),_hoisted_39$2=createBaseVNode("span",null,"Add Item",-1),_hoisted_40$2=[_hoisted_38$2,_hoisted_39$2],_hoisted_41$2={key:2},_hoisted_42$2={width:"24",height:"24",slot:"trigger",fill:"#999",style:{cursor:"pointer",padding:"0 0 0 8px","margin-top":"-12px"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_43$2=createBaseVNode("path",{d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"},null,-1),_hoisted_44$2=[_hoisted_43$2],_hoisted_45$2={slot:"prefix",width:"18",height:"18",fill:"red",style:{"margin-right":"0.5em"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_46$2=createBaseVNode("path",{d:"M170.5 51.6L151.5 80h145l-19-28.4c-1.5-2.2-4-3.6-6.7-3.6H177.1c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80H368h48 8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-8V432c0 44.2-35.8 80-80 80H112c-44.2 0-80-35.8-80-80V128H24c-13.3 0-24-10.7-24-24S10.7 80 24 80h8H80 93.8l36.7-55.1C140.9 9.4 158.4 0 177.1 0h93.7c18.7 0 36.2 9.4 46.6 24.9zM80 128V432c0 17.7 14.3 32 32 32H336c17.7 0 32-14.3 32-32V128H80zm80 64V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16z"},null,-1),_hoisted_47$1=[_hoisted_46$2],_hoisted_48=createBaseVNode("div",{slot:"footer"},[createBaseVNode("sl-button",{variant:"primary",class:"cancel",style:{"margin-right":"1em"}},"Cancel"),createBaseVNode("sl-button",{variant:"primary",class:"confirm"},"Confirm")],-1),_hoisted_49={id:"add-file-form",class:"input-validation-pattern"},_hoisted_50=createBaseVNode("sl-input",{style:{flex:"1"},autocomplete:"off",required:"",id:"add-file-input",placeholder:"Enter file path",pattern:"^([A-z0-9\\-_]+/)*[A-z0-9\\-_.]+$"},null,-1),_hoisted_51=createBaseVNode("br",null,null,-1),_hoisted_52=["innerHTML"],_hoisted_53=createBaseVNode("sl-button",{type:"reset",variant:"default"},"Reset",-1),_hoisted_54=createBaseVNode("sl-button",{type:"submit",variant:"primary"},"Add",-1),_sfc_main$l=defineComponent({__name:"GhFileSelector.ce",props:{ghSource:{type:String}},emits:["fileSelected","repoIsWritable"],setup(F,{expose:W,emit:q}){const K=F;W({GithubClient:GithubClient$1}),watch$1(K,()=>X()),onMounted(()=>X());function X(){jp(),vp()}const tt=ref(null),rt=ref(null),ot=ref(null);watch$1(ot,Dp=>{var Lp,xp;Dp==null||Dp.addEventListener("sl-overlay-dismiss",()=>Dp.hide()),Dp==null||Dp.addEventListener("sl-close",()=>Dp.hide()),(Lp=Dp==null?void 0:Dp.querySelector(".cancel"))==null||Lp.addEventListener("click",()=>Dp.hide()),(xp=Dp==null?void 0:Dp.querySelector(".confirm"))==null||xp.addEventListener("click",()=>{Dp==null||Dp.hide(),vg()})});const ut=ref(null);watch$1(ut,Dp=>{var Lp,xp;Dp==null||Dp.addEventListener("sl-overlay-dismiss",()=>Dp.hide()),Dp==null||Dp.addEventListener("sl-close",()=>Dp.hide()),(Lp=Dp==null?void 0:Dp.querySelector(".cancel"))==null||Lp.addEventListener("click",()=>Dp.hide()),(xp=Dp==null?void 0:Dp.querySelector(".confirm"))==null||xp.addEventListener("click",()=>{Dp==null||Dp.hide()})});const yn=ref(null),uo=ref(null),po=ref(""),mo=ref(),wo=ref(!1),lf=ref([]),yf=ref(!1),cf=ref();watch$1(po,()=>{wo.value=window.localStorage.getItem("gh-auth-token")!==null,mo.value=new GithubClient$1(po.value||""),_f.value&&Bf()}),watch$1(mo,async Dp=>{});const vf=ref([]),_f=ref("");watch$1(vf,Dp=>{var xp;if(!Dp.length)return;let Lp=Dp.find(kp=>{var lp;return kp.login===((lp=cf.value)==null?void 0:lp.acct)});_f.value=(Lp==null?void 0:Lp.login)||((xp=cf.value)==null?void 0:xp.acct)||Dp[0].login});async function $f(){Promise.all([mo.value.user(),mo.value.organizations()]).then(Dp=>vf.value=Dp.flat())}function wf(Dp){cf.value=null,_f.value=Dp.login}function Pf(Dp){let Lp=yn.value.value.trim();uo.value&&(uo.value.style.display=Lp.length?"none":"block"),Dp.key==="Enter"&&(_f.value=Lp)}const Cf=ref([]),Af=ref("");watch$1(_f,Dp=>{Af.value="",Bf()}),watch$1(Cf,Dp=>{if(!Dp.length)return;let Lp=Dp.find(xp=>{var kp;return xp.name===((kp=cf.value)==null?void 0:kp.repo)})||Dp.find(xp=>xp.name==="essays")||Dp[0];Af.value=Lp.name});function Bf(){var Dp;(Dp=mo.value)==null||Dp.repos(_f.value).then(Lp=>Cf.value=Lp)}function Hf(Dp){cf.value=null,Af.value=Dp.name}watch$1(yf,Dp=>{q("repoIsWritable",Dp)});const Df=ref([]),Lf=ref("");watch$1(Af,Dp=>{Dp&&(Lf.value="",wo.value&&mo.value.user().then(Lp=>Lp.login).then(Lp=>Dp?mo.value.isCollaborator(_f.value,Dp,Lp):!1).then(Lp=>yf.value=Lp),kf())});async function kf(){mo.value.branches(_f.value,Af.value).then(Dp=>Df.value=Dp)}let Nf;watch$1(Df,async Dp=>{var Lp,xp;Dp.length&&(!Nf&&_f.value&&Af.value&&(Nf=await mo.value.defaultBranch(_f.value,Af.value)),Lf.value=((Lp=cf.value)==null?void 0:Lp.branch)||Nf||((xp=Dp[0])==null?void 0:xp.name))});function Yf(Dp){cf.value=null,Lf.value=Dp.name}watch$1(Lf,Dp=>{_f.value&&Af.value&&Dp&&ap("").then(Lp=>{let xp=ip(Lp);Gf.value=[{dirList:Lp,selected:xp}]})});const Gf=ref([]);watch$1(Gf,()=>{var xp;if(!Gf.value.length)return;let Dp=Gf.value.length-1,Lp=Gf.value[Dp];if(((xp=Lp==null?void 0:Lp.selected)==null?void 0:xp.type)==="dir")ap(Gf.value.map(kp=>kp.selected.name).join("/")).then(kp=>{let lp=ip(kp,Dp+1);Gf.value=[...Gf.value,{dirList:kp,selected:lp}]});else{let kp=`${_f.value}/${Af.value}/${Lf.value}/${Gf.value.map(lp=>lp.selected.name).join("/")}`;q("fileSelected",{trigger:rt.value,path:kp})}});function rp(Dp,Lp){cf.value=null;let xp=[...Gf.value];xp[Dp]={dirList:xp[Dp].dirList,selected:Lp},Gf.value=xp.slice(0,Dp+1)}function ip(Dp,Lp=0){return(Dp==null?void 0:Dp.find(xp=>{var kp,lp;return xp.name===((kp=cf.value)==null?void 0:kp.path[Lp])||xp.name===`${(lp=cf.value)==null?void 0:lp.path[Lp]}.md`}))||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file").find(xp=>xp.name==="index.md"||xp.name==="README.md"))||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file"&&/\.md$/.test(xp.name))[0])||(Dp==null?void 0:Dp.filter(xp=>xp.type==="dir")[0])||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file")[0])}async function ap(Dp){let Lp=await mo.value.dirlist(_f.value,Af.value,Dp,Lf.value),xp=Lp.filter(lp=>lp.type==="dir"),kp=Lp.filter(lp=>lp.type==="file");return[...xp,...kp]}function yp(){vf.value=[],Cf.value=[],Df.value=[],Gf.value=[],_f.value="",Af.value="",Lf.value=""}async function vp(Dp=K.ghSource,Lp="select"){var qf;if(!Dp)return;rt.value=Lp,yp();let[xp,kp,lp,...Of]=(Dp||"").split("/").filter(cp=>cp);cf.value={acct:xp,repo:kp,branch:lp,path:Of},wo.value?($f(),lf.value=await mo.value.user().then(cp=>cp.login),_f.value&&Af.value&&lf.value&&mo.value.isCollaborator(_f.value,Af.value,lf.value).then(cp=>yf.value=cp)):(qf=cf.value)!=null&&qf.acct&&(_f.value=cf.value.acct)}watch$1(cf,Dp=>{});async function Np(){let Lp=await fetch("https://iiif.mdpress.io/gh-token");if(Lp.ok){let xp=await Lp.text();window.localStorage.setItem("gh-unscoped-token",xp)}}async function jp(){window.localStorage.getItem("gh-unscoped-token")||await Np(),po.value=window.localStorage.getItem("gh-auth-token")||window.localStorage.getItem("gh-unscoped-token")}function Ip(Dp){return Dp.toLowerCase().split("-").map(Lp=>Lp.charAt(0).toUpperCase()+Lp.slice(1)).join(" ")}let Jp=0;function ng(Dp=0){var xp,kp,lp;Jp=Dp;let Lp=(xp=ut.value)==null?void 0:xp.querySelector("#add-file-form");Lp.onclick||(Lp.onclick=function(){},Lp.addEventListener("submit",async Of=>{var Ep;tt.value=null,Of.preventDefault();let qf=(Ep=ut.value)==null?void 0:Ep.querySelector("#add-file-input"),cp=[...Gf.value.slice(0,Jp).filter(_p=>_p.selected.type==="dir").map(_p=>_p.selected.name),...qf.value.split("/").filter(_p=>_p)],hp=cp[cp.length-1];cp[cp.length-1].indexOf(".")>0?cp[cp.length-1]=cp[cp.length-1].replace(/readme\.md/,"README.md"):cp.push("README.md");let $p=cp.join("/");hp=Ip(hp.replace(/\.md$/,""));let Vp=`[![](https://v3.juncture-digital.org/images/wb.svg)](https://v3.juncture-digital.org/wb)
+ */class HSOverlay extends Component$1{constructor(q){super("[data-hs-overlay]");Sv(this,"root");this.root=q,this.openNextOverlay=!1}init(){this.root.addEventListener("click",q=>{const X=q.target.closest(this.selector),tt=q.target.closest("[data-hs-overlay-close]"),rt=q.target.getAttribute("aria-overlay")==="true";if(tt)return this.close(tt.closest(".hs-overlay.open"));if(X)return this.toggle(this.root.querySelector(X.getAttribute("data-hs-overlay")));rt&&this._onBackdropClick(q.target)}),this.root.addEventListener("keydown",q=>{if(q.keyCode===27){const K=this.root.querySelector(".hs-overlay.open");if(!K)return;setTimeout(()=>{K.getAttribute("data-hs-overlay-keyboard")!=="false"&&this.close(K)})}})}toggle(q){q&&(q.classList.contains("hidden")?this.open(q):this.close(q))}open(q){if(!q)return;const K=this.root.querySelector(".hs-overlay.open"),X=this.getClassProperty(q,"--body-scroll","false")!=="true";if(K)return this.openNextOverlay=!0,this.close(K).then(()=>{this.open(q),this.openNextOverlay=!1});X&&(this.root.style.overflow="hidden"),this._buildBackdrop(q),this._checkTimer(q),this._autoHide(q),q.classList.remove("hidden"),q.setAttribute("aria-overlay","true"),q.setAttribute("tabindex","-1"),setTimeout(()=>{q.classList.contains("hidden")||(q.classList.add("open"),this._fireEvent("open",q),this._dispatch("open.hs.overlay",q,q),this._focusInput(q))},50)}close(q){return new Promise(K=>{q&&(q.classList.remove("open"),q.removeAttribute("aria-overlay"),q.removeAttribute("tabindex","-1"),this.afterTransition(q,()=>{q.classList.contains("open")||(q.classList.add("hidden"),this._destroyBackdrop(),this._fireEvent("close",q),this._dispatch("close.hs.overlay",q,q),this.root.style.overflow="",K(q))}))})}_autoHide(q){const K=parseInt(this.getClassProperty(q,"--auto-hide","0"));K&&(q.autoHide=setTimeout(()=>{this.close(q)},K))}_checkTimer(q){q.autoHide&&(clearTimeout(q.autoHide),delete q.autoHide)}_onBackdropClick(q){this.getClassProperty(q,"--overlay-backdrop","true")!=="static"&&this.close(q)}_buildBackdrop(q){const K=q.getAttribute("data-hs-overlay-backdrop-container")||!1;let X=document.createElement("div"),tt="transition duration fixed inset-0 z-50 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 hs-overlay-backdrop";for(const ut of q.classList.values())ut.startsWith("hs-overlay-backdrop-open:")&&(tt+=` ${ut}`);const rt=this.getClassProperty(q,"--overlay-backdrop","true")!=="static";this.getClassProperty(q,"--overlay-backdrop","true")!=="false"&&(K&&(X=this.root.querySelector(K).cloneNode(!0),X.classList.remove("hidden"),tt=X.classList,X.classList=""),rt&&X.addEventListener("click",()=>this.close(q),!0),X.setAttribute("data-hs-overlay-backdrop-template",""),this.root.appendChild(X),setTimeout(()=>{X.classList=tt}))}_destroyBackdrop(){const q=this.root.querySelector("[data-hs-overlay-backdrop-template]");q&&(this.openNextOverlay&&(q.style.transitionDuration=`${parseFloat(window.getComputedStyle(q).transitionDuration.replace(/[^\d.-]/g,""))*1.8}s`),q.classList.add("opacity-0"),this.afterTransition(q,()=>{q.remove()}))}_focusInput(q){const K=q.querySelector("[autofocus]");K&&K.focus()}}const _hoisted_1$l=["innerHTML"],_hoisted_2$i={class:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"},_hoisted_3$g={class:"flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"},_hoisted_4$f={class:"p-4 overflow-y-auto flex items-center gap-4"},_hoisted_5$d=createBaseVNode("sl-spinner",{style:{"font-size":"3rem","--indicator-color":"deeppink","--track-color":"pink"}},null,-1),_hoisted_6$c=["innerHTML"],_sfc_main$n=defineComponent({__name:"Footer.ce",setup(F){const W=ref([]),q=ref(null),K=computed(()=>{var wo,lf;return(lf=(wo=q.value)==null?void 0:wo.getRootNode())==null?void 0:lf.host}),X=ref(null),tt=computed(()=>X==null?void 0:X.value),rt=computed(()=>new HSOverlay(tt.value)),ot=ref(null),ut=computed(()=>ot==null?void 0:ot.value),yn=ref("Generating PDF...");watch$1(ut,wo=>{rt.value.init(),wo.addEventListener("open.hs.overlay",lf=>uo.value=!0),wo.addEventListener("close.hs.overlay",lf=>uo.value=!1)});const uo=ref(!1);watch$1(uo,wo=>{wo?rt.value.open(ut.value):rt.value.close(ut.value)}),watch$1(K,()=>{po()});function po(){function wo(){return Array.from(K.value.querySelectorAll("li")).map(lf=>{let yf=document.createElement("li");yf.innerHTML=marked.parse(lf.textContent||"");let cf=yf.querySelector("code");if(cf){let vf=cf.previousElementSibling,_f=vf||yf,$f=mo(cf.innerHTML);$f.id&&(_f.id=$f.id),$f.class&&$f.class.split(" ").forEach(xf=>_f.classList.add(xf)),$f.style&&_f.setAttribute("style",$f.style),cf.remove()}return yf})}W.value=wo(),new MutationObserver(lf=>{for(let yf of lf)yf.type==="childList"&&(W.value=wo())}).observe(K.value,{childList:!0,subtree:!0})}function mo(wo){var vf;let lf=[];wo=wo.replace(/”/g,'"').replace(/”/g,'"').replace(/’/g,"'"),(vf=wo==null?void 0:wo.match(/[^\s"]+|"([^"]*)"/gmi))==null||vf.filter(_f=>_f).forEach(_f=>{lf.length>0&&lf[lf.length-1].indexOf("=")===lf[lf.length-1].length-1?lf[lf.length-1]=`${lf[lf.length-1]}${_f}`:lf.push(_f)});let yf={},cf=0;for(;cf0){let[$f,xf]=_f.split("=");xf=xf[0]==='"'&&xf[xf.length-1]==='"'?xf.slice(1,-1):xf,yf[$f]?yf[$f]+=` ${xf}`:yf[$f]=xf}else if(_f[0]==="."){let $f="class",xf=_f.slice(1);xf=xf[0]==='"'&&xf[xf.length-1]==='"'?xf.slice(1,-1):xf,yf[$f]?yf[$f]+=` ${xf}`:yf[$f]=xf}else if(_f[0]===":"){let $f="style",xf;_f.length===1&&cf<_f.length&&lf[cf+1][0]==='"'?(xf=lf[cf+1].slice(1,-1),cf++):xf=_f.slice(1),yf[$f]?yf[$f]+=` ${xf}`:yf[$f]=xf}else if(_f[0]==='"'){let $f="args",xf=_f.slice(1,-1);yf[$f]?yf[$f].push(xf):yf[$f]=[xf]}else _f[0]==="#"?yf.id=_f.slice(1):yf[_f]=!0;cf++}return yf}return(wo,lf)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("ul",{ref_key:"footer",ref:q,id:"footer",class:"flex bg-slate-100 p-2 gap-3 mt-8 items-center w-full h-8"},[(openBlock(!0),createElementBlock(Fragment,null,renderList(W.value,(yf,cf)=>(openBlock(),createElementBlock("li",{key:`li-${cf}`,innerHTML:yf.innerHTML,class:normalizeClass(yf.className),style:normalizeStyle(yf.getAttribute("style")||"")},null,14,_hoisted_1$l))),128))],512),createBaseVNode("div",{ref_key:"overlayRef",ref:X},[createBaseVNode("div",{ref_key:"modalRef",ref:ot,id:"hs-basic-modal",class:"hs-overlay hidden w-full h-full fixed top-0 start-0 z-[80] overflow-x-hidden overflow-y-auto pointer-events-none"},[createBaseVNode("div",_hoisted_2$i,[createBaseVNode("div",_hoisted_3$g,[createBaseVNode("div",_hoisted_4$f,[_hoisted_5$d,createBaseVNode("p",{innerHTML:yn.value},null,8,_hoisted_6$c)])])])],512)],512)],64))}}),_style_0$l=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.\\!relative{position:relative!important}.relative{position:relative}.sticky{position:sticky}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.inset-0{top:0;right:0;bottom:0;left:0}.end-1{inset-inline-end:.25rem}.right-\\[10px\\]{right:10px}.start-0{inset-inline-start:0px}.top-0{top:0}.top-\\[12px\\]{top:12px}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\\[80\\]{z-index:80}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.m-1{margin:.25rem}.m-3{margin:.75rem}.me-1{margin-inline-end:.25rem}.ml-1{margin-left:.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-none{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.\\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.\\!grid{display:grid!important}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-1{height:.25rem}.h-40{height:10rem}.h-8{height:2rem}.h-80{height:20rem}.h-auto{height:auto}.h-full{height:100%}.min-h-\\[calc\\(100\\%-3\\.5rem\\)\\]{min-height:calc(100% - 3.5rem)}.w-1{width:.25rem}.w-\\[a-z0-9-\\]{width:a-z0-9-}.w-full{width:100%}.max-w-\\[24px\\]{max-width:24px}.max-w-xs{max-width:20rem}.flex-shrink,.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-top{caption-side:top}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.\\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform,.transform-cpu{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.columns-1{-moz-columns:1;columns:1}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-normal{align-content:normal}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.content-stretch{align-content:stretch}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-stretch{justify-content:stretch}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.hyphens-none{-webkit-hyphens:none;hyphens:none}.hyphens-manual{-webkit-hyphens:manual;hyphens:manual}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-none{border-style:none}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[rgb\\(255\\,0\\,0\\)\\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-14{padding:3.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pe-1{padding-inline-end:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.\\!ordinal{--tw-ordinal: ordinal !important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-\\[\\#336699\\]\\/\\[\\.35\\]{color:#33669959}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!invert{--tw-invert: invert(100%) !important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale: grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert: invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia: sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.\\!transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.content-\\[\\'this-is-also-valid\\]-weirdly-enough\\'\\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.\\[--placement\\:bottom\\]{--placement: bottom}.\\[--placement\\:top\\]{--placement: top}.\\[--trigger\\:click\\]{--trigger: click}.\\[-\\:\\=\\]{-: =}.\\[a-zA-Z0-9\\:\\\\\\\\-\\\\\\\\\\._\\$\\]{a-z-a--z0-9:\\\\-\\\\. $}.\\[a-zA-Z0-9\\:_-\\]{a-z-a--z0-9:-}.\\[a-zA-Z\\:_\\]{a-z-a--z:}.\\[a\\:a\\]{a:a}.\\[vite\\:css\\]{vite:css}.\\[vite\\:html\\]{vite:html}html{padding:1rem;font-family:sans-serif}ve-header ul,ve-menu ul{display:none}@media (min-width: 640px){.sm\\:container{width:100%}@media (min-width: 640px){.sm\\:container{max-width:640px}}@media (min-width: 768px){.sm\\:container{max-width:768px}}@media (min-width: 1024px){.sm\\:container{max-width:1024px}}@media (min-width: 1280px){.sm\\:container{max-width:1280px}}@media (min-width: 1536px){.sm\\:container{max-width:1536px}}}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\\:font-bold:hover{font-weight:700}.before\\:hover\\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\\:before\\:text-center:hover:before{content:var(--tw-content);text-align:center}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\\:hover\\:text-center:hover:focus{text-align:center}.hover\\:focus\\:text-center:focus:hover{text-align:center}.hs-tooltip.show .hs-tooltip-shown\\:visible{visibility:visible}.hs-tooltip.show .hs-tooltip-shown\\:opacity-100{opacity:1}.open.hs-overlay-open\\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\\:opacity-100{opacity:1}.open.hs-overlay-open\\:duration-500{transition-duration:.5s}.open .hs-overlay-open\\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\\:opacity-100{opacity:1}.open .hs-overlay-open\\:duration-500{transition-duration:.5s}:is(.dark .dark\\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\\:shadow-slate-700\\/\\[\\.7\\]){--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\\:focus\\:ring-offset-gray-800:focus){--tw-ring-offset-color: #1f2937}@media (min-width: 640px){.sm\\:mx-auto{margin-left:auto;margin-right:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:underline{text-decoration-line:underline}}@media (min-width: 768px){.md\\:p-5{padding:1.25rem}}@media (min-width: 1024px){:is(.dark .dark\\:lg\\:hover\\:\\[paint-order\\:markers\\]:hover){paint-order:markers}}img,svg{height:36px}.push{margin-left:auto}@media only screen and (max-width: 768px){#footer{font-size:.8em}li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:#00000080;z-index:2;cursor:pointer}
+`,Footer=_export_sfc(_sfc_main$n,[["styles",[_style_0$l]]]),_hoisted_1$k=["id"],_hoisted_2$h=["src","onClick","onDragstart"],_hoisted_3$f=["innerHTML"],_hoisted_4$e=["src"],_hoisted_5$c={slot:"footer",class:"footer"},_hoisted_6$b=["manifest"],_hoisted_7$9={class:"controls push"},_hoisted_8$8={key:0,class:"toolbar"},_hoisted_9$9=createBaseVNode("svg",{class:"push edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z"})],-1),_hoisted_10$9=createBaseVNode("svg",{class:"delete",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M170.5 51.6L151.5 80h145l-19-28.4c-1.5-2.2-4-3.6-6.7-3.6H177.1c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80H368h48 8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-8V432c0 44.2-35.8 80-80 80H112c-44.2 0-80-35.8-80-80V128H24c-13.3 0-24-10.7-24-24S10.7 80 24 80h8H80 93.8l36.7-55.1C140.9 9.4 158.4 0 177.1 0h93.7c18.7 0 36.2 9.4 46.6 24.9zM80 128V432c0 17.7 14.3 32 32 32H336c17.7 0 32-14.3 32-32V128H80zm80 64V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16z"})],-1),_hoisted_11$9=[_hoisted_9$9,_hoisted_10$9],_sfc_main$m=defineComponent({__name:"Gallery.ce",props:{active:{type:Boolean},base:{type:String},caption:{type:Boolean,default:!1},class:{type:String},data:{type:String},dialogWidth:{type:String,default:"100vw"},ghDir:{type:String},height:{type:Number},repoIsWritable:{type:Boolean,default:!1},slot:{type:String}},setup(F){const W=F,q=ref(null),K=computed(()=>{var kf,Nf;return(Nf=(kf=q.value)==null?void 0:kf.getRootNode())==null?void 0:Nf.host});watch$1(K,()=>{Cf()});const X=computed(()=>{var kf;return(kf=q==null?void 0:q.value)==null?void 0:kf.parentNode}),tt=self.window,rt=ref(tt.config||{}),ot=ref(null);watch$1(ot,async()=>{var kf,Nf,Yf,Gf,rp,ip;(kf=rt.value)!=null&&kf.github&&((Nf=ot.value)!=null&&Nf.token)&&(ut.value=await Hf((Gf=(Yf=rt.value)==null?void 0:Yf.source)==null?void 0:Gf.owner,(ip=(rp=rt.value)==null?void 0:rp.source)==null?void 0:ip.repository,ot.value.username,ot.value.token))});const ut=ref(!1),yn=computed(()=>{var kf;if((kf=rt.value.source)!=null&&kf.owner)return rt.value.source;if(W.base){let[Nf,Yf,Gf,...rp]=W.base.split("/");return{owner:Nf,repository:Yf,branch:Gf,dir:rp?`/${rp.join("/")}/`:"/"}}return null}),uo=ref([]);watch$1(uo,async kf=>{mo.value=await loadManifests(kf)});function po(kf){var Nf;return Object.fromEntries((Nf=kf.metadata)==null?void 0:Nf.map(Yf=>[(Yf.label.en||Yf.label.none||Object.keys(Yf.label)[0])[0],(Yf.value.en||Yf.value.none||Object.keys(Yf.value)[0])[0]]))}const mo=ref([]);watch$1(mo,kf=>{wo.value=kf.map(Nf=>{var vp;let Yf=po(Nf),Gf=[Yf.camera,Yf.exposure,Yf.mode].filter(Np=>Np).join(", "),rp=findItem({type:"Annotation",motivation:"painting"},Nf,1).body,ip=((vp=Nf.metadata)==null?void 0:vp.filter(Np=>(Np.label.en||Np.label.none)[0]==="orientation").map(Np=>(Np.value.en||Np.value.none)[0])[0])||1;ip=Array.isArray(ip)?ip[0]:ip;let ap=ip===1||ip===3?rp.width:rp.height,yp=ip===1||ip===3?rp.height:rp.width;return{id:Nf.id,label:Nf.label?Nf.label.en||Nf.label.none||Object.values(Nf.label)[0]:null,summary:Nf.summary?Nf.summary.en||Nf.summary.none||Object.values(Nf.summary)[0]:null,width:ap,height:yp,format:rp.format,orientation:ip,aspect_ratio:Number((ap/yp).toFixed(4)),thumbnail:Nf.thumbnail[0].id,photoDetails:Gf}})});const wo=ref([]);watch$1(wo,kf=>{Pf()});const lf=ref(null);watch$1(lf,()=>{$f.value=lf.value!==null});const yf=ref(0),cf=ref([]);let vf,_f;const $f=ref(!1);watch$1($f,()=>{_f.open=$f.value});function xf(kf){var vp,Np,jp;if(kf.indexOf("http")===0)return kf;let Nf,Yf;kf.indexOf(":")>0?[Nf,Yf]=kf.split(":"):Yf=kf;let Gf=Yf.split("/"),rp=Gf[Gf.length-1],ip=rp.lastIndexOf("."),ap=rp.slice(0,ip),yp=rp.slice(ip+1);return Gf[Gf.length-1]=`${encodeURIComponent(ap)}.${yp}`,kf=Gf.join("/"),kf=Nf?`${Nf}:${Gf.join("/")}`:`gh:${(vp=yn.value)==null?void 0:vp.owner}/${(Np=yn.value)==null?void 0:Np.repository}${(jp=yn.value)==null?void 0:jp.dir}/${Gf.join("/")}`,`https://iiif.mdpress.io/${kf}/manifest.json`}function Af(kf){var rp;let Nf=[];kf=kf.replace(/”/g,'"').replace(/”/g,'"'),(rp=kf==null?void 0:kf.match(/[^\s"]+|"([^"]*)"/gmi))==null||rp.filter(ip=>ip).forEach(ip=>{Nf.length>0&&Nf[Nf.length-1].indexOf("=")===Nf[Nf.length-1].length-1?Nf[Nf.length-1]=`${Nf[Nf.length-1]}${ip}`:Nf.push(ip)});let Yf={},Gf=["src","caption","options","fit","rotate","seq"];return Nf.filter(ip=>ip!=="image").forEach((ip,ap)=>{if(ip.indexOf("=")>0){let yp=ip.indexOf("="),vp=ip.slice(0,yp),Np=ip.slice(yp+1);Yf[vp]=Np[0]==='"'?Np.slice(1,-1):Np}else Yf[Gf[ap]]=ip[0]==='"'?ip.slice(1,-1):ip}),Yf}function Cf(){if(W.data){let kf=document.getElementById(W.data);uo.value=Array.from(kf.querySelectorAll("li")).map(Nf=>Nf.textContent).map(Nf=>xf(Nf))}else if(W.ghDir){let kf=W.ghDir[0]==="/"?W.ghDir.slice(1):W.ghDir;fetch(`https://iiif.mdpress.io/gh-dir/${kf}?filter=images`).then(Nf=>Nf.json()).then(Nf=>{uo.value=Nf.map(Yf=>xf(`gh:${W.ghDir}/${Yf.name}`))})}else{let kf=function(){uo.value=Array.from(Nf.querySelectorAll("li")).map(Yf=>Yf.innerText).map(Yf=>Af(Yf)).map(Yf=>xf(Yf.src))},Nf=K.value;kf(),new MutationObserver(Yf=>{for(let Gf of Yf)Gf.type==="childList"&&kf()}).observe(Nf,{childList:!0,subtree:!0})}}function Pf(){if(wo.value.length===0)return;let kf=W.caption?32:0,Nf=wo.value.length;const Yf=yf.value<=640?2:yf.value<=960?3:yf.value<=1280?4:yf.value<=1920?5:6;let Gf=[],rp=isMobile()?8:16,ip=[],ap=0,yp=0,vp=0;wo.value.forEach((Np,jp)=>{if(vp+=Np.aspect_ratio,ip.push(Np),vp>=Yf||jp+1===Nf){vp=Math.max(vp,Yf);const Jp=(yf.value-rp*(ip.length-1))/vp;ip.forEach(ng=>{const og=Jp*ng.aspect_ratio;Gf.push({width:`${Math.round(og)}px`,height:`${Math.round(Jp+kf)}px`,transform:`translate3d(${Math.round(ap)}px, ${Math.round(yp)}px, 0)`}),ap+=og+rp}),ip=[],vp=0,yp+=Jp+rp+kf,ap=0}}),q.value&&(q.value.style.height=`${yp-rp}px`),cf.value=Gf}function Bf(kf){lf.value=mo.value[kf]}onMounted(()=>{var kf;ot.value=localStorage.getItem("auth-user")&&JSON.parse(localStorage.getItem("auth-user")||"{}"),_f=(kf=X.value)==null?void 0:kf.querySelector(".dialog"),_f.addEventListener("sl-hide",Nf=>$f.value=!1)}),watch$1(q,()=>{var kf;q.value&&(yf.value=((kf=q.value)==null?void 0:kf.clientWidth)||0,new ResizeObserver(()=>{var Yf,Gf,rp;(Yf=q.value)!=null&&Yf.clientWidth&&((Gf=q.value)==null?void 0:Gf.clientWidth)!==yf.value&&(yf.value=(rp=q.value)==null?void 0:rp.clientWidth,clearTimeout(vf),vf=setTimeout(Pf,10))}).observe(q.value))});async function Hf(kf,Nf,Yf,Gf){let rp=`https://api.github.com/repos/${kf}/${Nf}/collaborators/${Yf}`,ip=await fetch(rp,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${Gf}`}});return ip.ok&&ip.status===204}function Df(kf){navigator.clipboard&&navigator.clipboard.writeText(kf)}function Lf(kf,Nf){var Yf;(Yf=Nf.dataTransfer)==null||Yf.setData("text/plain",mo.value[kf].id)}return(kf,Nf)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",{ref_key:"root",ref:q,id:"gallery"},[cf.value.length>0?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(wo.value,(Yf,Gf)=>(openBlock(),createElementBlock("div",{class:"gallery-item",id:Yf.id,style:normalizeStyle(cf.value[Gf])},[createBaseVNode("img",{class:"image fade-in",onload:"this.style.opacity = 1",src:wo.value[Gf].thumbnail,onClick:rp=>Bf(Gf),onDragstart:rp=>Lf(Gf,rp),draggable:""},null,40,_hoisted_2$h),F.caption?(openBlock(),createElementBlock("div",{key:0,style:{height:"32px",display:"flex","align-items":"center","margin-left":"0.25em"},innerHTML:wo.value[Gf].label},null,8,_hoisted_3$f)):createCommentVNode("",!0)],12,_hoisted_1$k))),256)):createCommentVNode("",!0)],512),createBaseVNode("sl-dialog",{class:"dialog","no-header":"",style:normalizeStyle({"--width":F.dialogWidth,"--body-spacing":0,"--footer-spacing":"0.5em"})},[lf.value?(openBlock(),createElementBlock("ve-image",{key:0,"no-caption":"",src:lf.value.id,fit:"contain"},null,8,_hoisted_4$e)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_5$c,[createBaseVNode("ve-caption",{manifest:lf.value},null,8,_hoisted_6$b),createBaseVNode("div",_hoisted_7$9,[ut.value?(openBlock(),createElementBlock("div",_hoisted_8$8,_hoisted_11$9)):createCommentVNode("",!0),createBaseVNode("img",{src:"https://v3.juncture-digital.org/images/iiif.png",class:"iiif",alt:"IIIF manifest icon",onClick:Nf[0]||(Nf[0]=Yf=>Df(lf.value.id))}),createBaseVNode("sl-button",{variant:"primary",onClick:Nf[1]||(Nf[1]=Yf=>lf.value=null)},"Close")])])],4)],64))}}),_style_0$k=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*{box-sizing:border-box}#gallery{position:relative;margin:1rem}@media only screen and (max-width: 768px){#gallery{margin:0}}sl-dialog::part(panel){max-width:unset;max-height:unset;height:100dvh}sl-dialog::part(overlay){--sl-overlay-background-color: rgba(100, 100, 100, .8)}sl-dialog::part(footer){background-color:#64646480}.gallery-item{position:absolute;display:flex;flex-direction:column;width:100px;box-shadow:2px 2px 4px #ccc}.gallery-item:hover{box-shadow:#32325d40 0 6px 12px -2px,#0000004d 0 3px 7px -3px}.image{left:0;top:0;width:100%;height:100%;opacity:0;background-color:#d5d5d5}.fade-in{opacity:0;-webkit-transition:all 1s ease;-moz-transition:all 1s ease;-ms-transition:all 1s ease;-o-transition:all 1s ease}.image:hover{cursor:pointer}.icons{display:flex;align-items:center;gap:6px}.size{width:100%;font-size:.8em;margin-top:3px}.provider-logo{height:20px}.license{cursor:pointer;display:inline-block}.image-card{font-size:.85em;display:flex;flex-direction:column}.title{display:flex;align-items:center;gap:6px;font-size:.9em}.title img{width:16px;opacity:1}.clamp{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.text{margin:6px 0;height:50px}.text p{margin:0;padding:0}.license{display:flex;align-items:center;gap:3px;font-size:.8em;margin-left:.5rem}a.license{color:#000;text-decoration:none;font-size:.9rem}sl-icon{font-size:1.2rem}.push{margin-left:auto}.controls{display:flex;align-items:center;gap:1em}.toolbar{height:32px;justify-content:flex-end;display:flex;align-items:center;gap:.5em;padding:0 .2em}.toolbar svg{width:20px;height:20px;cursor:pointer;fill:#777}.toolbar svg:hover{fill:#444}.dialog .footer{display:flex;align-items:center;gap:.5em;padding:.5em;text-align:left}.iiif{width:32px;height:32px;cursor:copy}.iiif:hover{width:40px;height:40px}
+`,Gallery=_export_sfc(_sfc_main$m,[["styles",[_style_0$k]]]),_hoisted_1$j={ref:"root",class:"main"},_hoisted_2$g=createBaseVNode("svg",{slot:"prefix",width:"32",height:"32",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},[createBaseVNode("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})],-1),_hoisted_3$e=["value"],_hoisted_4$d={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_5$b=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_6$a=[_hoisted_5$b],_hoisted_7$8=["onClick","innerHTML"],_hoisted_8$7={key:0},_hoisted_9$8={key:0},_hoisted_10$8={slot:"trigger",size:"medium"},_hoisted_11$8={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_12$8=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_13$7=[_hoisted_12$8],_hoisted_14$6=["onClick","innerHTML"],_hoisted_15$5={key:1},_hoisted_16$5={key:0},_hoisted_17$5={key:0,slot:"trigger",size:"medium"},_hoisted_18$5={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_19$4=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_20$4=[_hoisted_19$4],_hoisted_21$4=["onClick","innerHTML"],_hoisted_22$3={key:0},_hoisted_23$3={slot:"trigger",size:"medium"},_hoisted_24$3={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_25$3=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_26$3=[_hoisted_25$3],_hoisted_27$3=["onClick","disabled"],_hoisted_28$3={key:0,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_29$2=createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"},null,-1),_hoisted_30$2=[_hoisted_29$2],_hoisted_31$2={key:1,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512"},_hoisted_32$2=createBaseVNode("path",{d:"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"},null,-1),_hoisted_33$2=[_hoisted_32$2],_hoisted_34$2={key:2,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},_hoisted_35$2=createBaseVNode("path",{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},null,-1),_hoisted_36$2=[_hoisted_35$2],_hoisted_37$2=["onClick"],_hoisted_38$2=createBaseVNode("svg",{slot:"prefix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"})],-1),_hoisted_39$2=createBaseVNode("span",null,"Add Item",-1),_hoisted_40$2=[_hoisted_38$2,_hoisted_39$2],_hoisted_41$2={key:2},_hoisted_42$2={width:"24",height:"24",slot:"trigger",fill:"#999",style:{cursor:"pointer",padding:"0 0 0 8px","margin-top":"-12px"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_43$2=createBaseVNode("path",{d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"},null,-1),_hoisted_44$2=[_hoisted_43$2],_hoisted_45$2={slot:"prefix",width:"18",height:"18",fill:"red",style:{"margin-right":"0.5em"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_46$2=createBaseVNode("path",{d:"M170.5 51.6L151.5 80h145l-19-28.4c-1.5-2.2-4-3.6-6.7-3.6H177.1c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80H368h48 8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-8V432c0 44.2-35.8 80-80 80H112c-44.2 0-80-35.8-80-80V128H24c-13.3 0-24-10.7-24-24S10.7 80 24 80h8H80 93.8l36.7-55.1C140.9 9.4 158.4 0 177.1 0h93.7c18.7 0 36.2 9.4 46.6 24.9zM80 128V432c0 17.7 14.3 32 32 32H336c17.7 0 32-14.3 32-32V128H80zm80 64V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16z"},null,-1),_hoisted_47$1=[_hoisted_46$2],_hoisted_48=createBaseVNode("div",{slot:"footer"},[createBaseVNode("sl-button",{variant:"primary",class:"cancel",style:{"margin-right":"1em"}},"Cancel"),createBaseVNode("sl-button",{variant:"primary",class:"confirm"},"Confirm")],-1),_hoisted_49={id:"add-file-form",class:"input-validation-pattern"},_hoisted_50=createBaseVNode("sl-input",{style:{flex:"1"},autocomplete:"off",required:"",id:"add-file-input",placeholder:"Enter file path",pattern:"^([A-z0-9\\-_]+/)*[A-z0-9\\-_.]+$"},null,-1),_hoisted_51=createBaseVNode("br",null,null,-1),_hoisted_52=["innerHTML"],_hoisted_53=createBaseVNode("sl-button",{type:"reset",variant:"default"},"Reset",-1),_hoisted_54=createBaseVNode("sl-button",{type:"submit",variant:"primary"},"Add",-1),_sfc_main$l=defineComponent({__name:"GhFileSelector.ce",props:{ghSource:{type:String}},emits:["fileSelected","repoIsWritable"],setup(F,{expose:W,emit:q}){const K=F;W({GithubClient:GithubClient$1}),watch$1(K,()=>X()),onMounted(()=>X());function X(){jp(),vp()}const tt=ref(null),rt=ref(null),ot=ref(null);watch$1(ot,Dp=>{var Lp,xp;Dp==null||Dp.addEventListener("sl-overlay-dismiss",()=>Dp.hide()),Dp==null||Dp.addEventListener("sl-close",()=>Dp.hide()),(Lp=Dp==null?void 0:Dp.querySelector(".cancel"))==null||Lp.addEventListener("click",()=>Dp.hide()),(xp=Dp==null?void 0:Dp.querySelector(".confirm"))==null||xp.addEventListener("click",()=>{Dp==null||Dp.hide(),vg()})});const ut=ref(null);watch$1(ut,Dp=>{var Lp,xp;Dp==null||Dp.addEventListener("sl-overlay-dismiss",()=>Dp.hide()),Dp==null||Dp.addEventListener("sl-close",()=>Dp.hide()),(Lp=Dp==null?void 0:Dp.querySelector(".cancel"))==null||Lp.addEventListener("click",()=>Dp.hide()),(xp=Dp==null?void 0:Dp.querySelector(".confirm"))==null||xp.addEventListener("click",()=>{Dp==null||Dp.hide()})});const yn=ref(null),uo=ref(null),po=ref(""),mo=ref(),wo=ref(!1),lf=ref([]),yf=ref(!1),cf=ref();watch$1(po,()=>{wo.value=window.localStorage.getItem("gh-auth-token")!==null,mo.value=new GithubClient$1(po.value||""),_f.value&&Bf()}),watch$1(mo,async Dp=>{});const vf=ref([]),_f=ref("");watch$1(vf,Dp=>{var xp;if(!Dp.length)return;let Lp=Dp.find(kp=>{var lp;return kp.login===((lp=cf.value)==null?void 0:lp.acct)});_f.value=(Lp==null?void 0:Lp.login)||((xp=cf.value)==null?void 0:xp.acct)||Dp[0].login});async function $f(){Promise.all([mo.value.user(),mo.value.organizations()]).then(Dp=>vf.value=Dp.flat())}function xf(Dp){cf.value=null,_f.value=Dp.login}function Af(Dp){let Lp=yn.value.value.trim();uo.value&&(uo.value.style.display=Lp.length?"none":"block"),Dp.key==="Enter"&&(_f.value=Lp)}const Cf=ref([]),Pf=ref("");watch$1(_f,Dp=>{Pf.value="",Bf()}),watch$1(Cf,Dp=>{if(!Dp.length)return;let Lp=Dp.find(xp=>{var kp;return xp.name===((kp=cf.value)==null?void 0:kp.repo)})||Dp.find(xp=>xp.name==="essays")||Dp[0];Pf.value=Lp.name});function Bf(){var Dp;(Dp=mo.value)==null||Dp.repos(_f.value).then(Lp=>Cf.value=Lp)}function Hf(Dp){cf.value=null,Pf.value=Dp.name}watch$1(yf,Dp=>{q("repoIsWritable",Dp)});const Df=ref([]),Lf=ref("");watch$1(Pf,Dp=>{Dp&&(Lf.value="",wo.value&&mo.value.user().then(Lp=>Lp.login).then(Lp=>Dp?mo.value.isCollaborator(_f.value,Dp,Lp):!1).then(Lp=>yf.value=Lp),kf())});async function kf(){mo.value.branches(_f.value,Pf.value).then(Dp=>Df.value=Dp)}let Nf;watch$1(Df,async Dp=>{var Lp,xp;Dp.length&&(!Nf&&_f.value&&Pf.value&&(Nf=await mo.value.defaultBranch(_f.value,Pf.value)),Lf.value=((Lp=cf.value)==null?void 0:Lp.branch)||Nf||((xp=Dp[0])==null?void 0:xp.name))});function Yf(Dp){cf.value=null,Lf.value=Dp.name}watch$1(Lf,Dp=>{_f.value&&Pf.value&&Dp&&ap("").then(Lp=>{let xp=ip(Lp);Gf.value=[{dirList:Lp,selected:xp}]})});const Gf=ref([]);watch$1(Gf,()=>{var xp;if(!Gf.value.length)return;let Dp=Gf.value.length-1,Lp=Gf.value[Dp];if(((xp=Lp==null?void 0:Lp.selected)==null?void 0:xp.type)==="dir")ap(Gf.value.map(kp=>kp.selected.name).join("/")).then(kp=>{let lp=ip(kp,Dp+1);Gf.value=[...Gf.value,{dirList:kp,selected:lp}]});else{let kp=`${_f.value}/${Pf.value}/${Lf.value}/${Gf.value.map(lp=>lp.selected.name).join("/")}`;q("fileSelected",{trigger:rt.value,path:kp})}});function rp(Dp,Lp){cf.value=null;let xp=[...Gf.value];xp[Dp]={dirList:xp[Dp].dirList,selected:Lp},Gf.value=xp.slice(0,Dp+1)}function ip(Dp,Lp=0){return(Dp==null?void 0:Dp.find(xp=>{var kp,lp;return xp.name===((kp=cf.value)==null?void 0:kp.path[Lp])||xp.name===`${(lp=cf.value)==null?void 0:lp.path[Lp]}.md`}))||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file").find(xp=>xp.name==="index.md"||xp.name==="README.md"))||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file"&&/\.md$/.test(xp.name))[0])||(Dp==null?void 0:Dp.filter(xp=>xp.type==="dir")[0])||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file")[0])}async function ap(Dp){let Lp=await mo.value.dirlist(_f.value,Pf.value,Dp,Lf.value),xp=Lp.filter(lp=>lp.type==="dir"),kp=Lp.filter(lp=>lp.type==="file");return[...xp,...kp]}function yp(){vf.value=[],Cf.value=[],Df.value=[],Gf.value=[],_f.value="",Pf.value="",Lf.value=""}async function vp(Dp=K.ghSource,Lp="select"){var qf;if(!Dp)return;rt.value=Lp,yp();let[xp,kp,lp,...Of]=(Dp||"").split("/").filter(cp=>cp);cf.value={acct:xp,repo:kp,branch:lp,path:Of},wo.value?($f(),lf.value=await mo.value.user().then(cp=>cp.login),_f.value&&Pf.value&&lf.value&&mo.value.isCollaborator(_f.value,Pf.value,lf.value).then(cp=>yf.value=cp)):(qf=cf.value)!=null&&qf.acct&&(_f.value=cf.value.acct)}watch$1(cf,Dp=>{});async function Np(){let Lp=await fetch("https://iiif.mdpress.io/gh-token");if(Lp.ok){let xp=await Lp.text();window.localStorage.setItem("gh-unscoped-token",xp)}}async function jp(){window.localStorage.getItem("gh-unscoped-token")||await Np(),po.value=window.localStorage.getItem("gh-auth-token")||window.localStorage.getItem("gh-unscoped-token")}function Ip(Dp){return Dp.toLowerCase().split("-").map(Lp=>Lp.charAt(0).toUpperCase()+Lp.slice(1)).join(" ")}let Jp=0;function ng(Dp=0){var xp,kp,lp;Jp=Dp;let Lp=(xp=ut.value)==null?void 0:xp.querySelector("#add-file-form");Lp.onclick||(Lp.onclick=function(){},Lp.addEventListener("submit",async Of=>{var Ep;tt.value=null,Of.preventDefault();let qf=(Ep=ut.value)==null?void 0:Ep.querySelector("#add-file-input"),cp=[...Gf.value.slice(0,Jp).filter(_p=>_p.selected.type==="dir").map(_p=>_p.selected.name),...qf.value.split("/").filter(_p=>_p)],hp=cp[cp.length-1];cp[cp.length-1].indexOf(".")>0?cp[cp.length-1]=cp[cp.length-1].replace(/readme\.md/,"README.md"):cp.push("README.md");let $p=cp.join("/");hp=Ip(hp.replace(/\.md$/,""));let Vp=`[![](https://v3.juncture-digital.org/images/wb.svg)](https://v3.juncture-digital.org/wb)
# ${hp}
-`,bp=await mo.value.putFile(_f.value,Af.value,$p,Vp,Lf.value);if(bp.status>=200&&bp.status<300){let _p=`${_f.value}/${Af.value}/${Lf.value}/${$p}`;vp(_p,"add"),og()}else tt.value=`Error: ${bp.statusText} ${$p}`}),Lp.addEventListener("reset",()=>{tt.value=null})),(kp=ut.value)==null||kp.addEventListener("sl-after-show",()=>{var Of;((Of=ut.value)==null?void 0:Of.querySelector("#add-file-input")).focus()}),(lp=ut.value)==null||lp.show()}function og(){var Lp,xp;let Dp=(Lp=ut.value)==null?void 0:Lp.querySelector("#add-file-input");Dp.value="",tt.value=null,(xp=ut.value)==null||xp.hide()}async function vg(){let Dp=Gf.value.map(Lp=>Lp.selected.name).join("/");await mo.value.deleteFile(_f.value,Af.value,Dp,Lf.value),vp(`${_f.value}/${Af.value}/${Lf.value}`,"delete")}return(Dp,Lp)=>{var xp,kp;return openBlock(),createElementBlock("div",_hoisted_1$j,[_hoisted_2$g,createBaseVNode("sl-breadcrumb",null,[createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-dropdown",null,[createBaseVNode("sl-input",{ref_key:"acctInput",ref:yn,slot:"trigger",size:"medium",placeholder:"Github username",autocomplete:"off",onKeyup:Pf,value:_f.value},[vf.value.length>0?(openBlock(),createElementBlock("svg",_hoisted_4$d,_hoisted_6$a)):createCommentVNode("",!0)],40,_hoisted_3$e),createBaseVNode("sl-menu",{ref_key:"acctMenu",ref:uo},[(openBlock(!0),createElementBlock(Fragment,null,renderList(vf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`acct-${Of}`,onClick:qf=>wf(lp),innerHTML:lp.login,class:normalizeClass({selected:lp.login===_f.value})},null,10,_hoisted_7$8))),128))],512)])]),Af.value?(openBlock(),createElementBlock("sl-breadcrumb-item",_hoisted_8$7,[Cf.value.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_9$8,[createBaseVNode("sl-button",_hoisted_10$8,[createTextVNode(toDisplayString(Af.value)+" ",1),Cf.value.length>1?(openBlock(),createElementBlock("svg",_hoisted_11$8,_hoisted_13$7)):createCommentVNode("",!0)]),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Cf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`repo-${Of}`,onClick:qf=>Hf(lp),innerHTML:lp.name,class:normalizeClass({selected:lp.name===Af.value})},null,10,_hoisted_14$6))),128))])])):createCommentVNode("",!0)])):createCommentVNode("",!0),Lf.value?(openBlock(),createElementBlock("sl-breadcrumb-item",_hoisted_15$5,[Df.value.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_16$5,[Lf.value?(openBlock(),createElementBlock("sl-button",_hoisted_17$5,[createTextVNode(toDisplayString(Lf.value)+" ",1),Df.value.length>1?(openBlock(),createElementBlock("svg",_hoisted_18$5,_hoisted_20$4)):createCommentVNode("",!0)])):createCommentVNode("",!0),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Df.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`branch-${Of}`,onClick:qf=>Yf(lp),innerHTML:lp.name,class:normalizeClass({selected:lp.name===Lf.value})},null,10,_hoisted_21$4))),128))])])):createCommentVNode("",!0)])):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Gf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-breadcrumb-item",{key:`pe-${Of}`},[lp.dirList.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_22$3,[createBaseVNode("sl-button",_hoisted_23$3,[createTextVNode(toDisplayString(lp.selected.name)+" ",1),lp.dirList.length>1?(openBlock(),createElementBlock("svg",_hoisted_24$3,_hoisted_26$3)):createCommentVNode("",!0)]),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(lp.dirList,(qf,cp)=>(openBlock(),createElementBlock("sl-menu-item",{key:`dl=${Of}-${cp}`,onClick:hp=>(qf.type==="dir"||/\.md$/.test(qf.name))&&rp(Of,qf),class:normalizeClass({selected:qf.name===lp.selected.name}),disabled:qf.type==="file"&&!/\.md$/.test(qf.name)?"":null},[qf.type==="dir"?(openBlock(),createElementBlock("svg",_hoisted_28$3,_hoisted_30$2)):/\.md$/.test(qf.name)?(openBlock(),createElementBlock("svg",_hoisted_31$2,_hoisted_33$2)):(openBlock(),createElementBlock("svg",_hoisted_34$2,_hoisted_36$2)),createTextVNode(" "+toDisplayString(qf.name),1)],10,_hoisted_27$3))),128)),yf.value?(openBlock(),createElementBlock("sl-menu-item",{key:0,onClick:qf=>ng(Of)},_hoisted_40$2,8,_hoisted_37$2)):createCommentVNode("",!0)])])):createCommentVNode("",!0)]))),128)),yf.value?(openBlock(),createElementBlock("sl-dropdown",_hoisted_41$2,[(openBlock(),createElementBlock("svg",_hoisted_42$2,_hoisted_44$2)),createBaseVNode("sl-menu",null,[createBaseVNode("sl-menu-item",{onClick:Lp[0]||(Lp[0]=lp=>{var Of;return(Of=ot.value)==null?void 0:Of.show()})},[(openBlock(),createElementBlock("svg",_hoisted_45$2,_hoisted_47$1)),createTextVNode(" Delete file ")])])])):createCommentVNode("",!0)]),createBaseVNode("sl-dialog",{ref_key:"deleteDialog",ref:ot,label:"Confirm Delete",class:"deleteDialog"},[createTextVNode(" Delete "+toDisplayString((kp=(xp=Gf.value[Gf.value.length-1])==null?void 0:xp.selected)==null?void 0:kp.name)+"? ",1),_hoisted_48],512),createBaseVNode("sl-dialog",{label:"Add File",ref_key:"addDialog",ref:ut},[createBaseVNode("form",_hoisted_49,[_hoisted_50,_hoisted_51,tt.value?(openBlock(),createElementBlock("div",{key:0,innerHTML:tt.value,style:{color:"red","margin-bottom":"1em"}},null,8,_hoisted_52)):createCommentVNode("",!0),createBaseVNode("sl-button",{onClick:Lp[1]||(Lp[1]=lp=>og())},"Cancel"),_hoisted_53,_hoisted_54])],512)],512)}}}),_style_0$j=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*{box-sizing:border-box}:host{display:block;width:100%;border:1px solid #ced4da;position:relative;z-index:1;background-color:#fff;box-sizing:border-box}.main{display:flex;align-items:center;gap:1em;padding:6px}sl-menu{text-align:left}sl-menu-item.selected::part(label){font-weight:700}
-`,GhFileSelector=_export_sfc(_sfc_main$l,[["styles",[_style_0$j]]]),_hoisted_1$i={key:0,class:"logo"},_hoisted_2$f=["href"],_hoisted_3$d=["src"],_hoisted_4$c={class:"branding"},_hoisted_5$a={key:0,class:"title"},_hoisted_6$9=["href","innerHTML"],_hoisted_7$7=["innerHTML"],_hoisted_8$6={class:"search-and-menu"},_hoisted_9$7=["search-domain","search-cx","search-key"],_hoisted_10$7=["auth","contact","pdf-download-enabled","innerHTML"],_hoisted_11$7={key:1},_hoisted_12$7=["manifest"],_sfc_main$k=defineComponent({__name:"Header.ce",props:{alpha:{type:Number},auth:{type:String},background:{type:String},backgroundColor:{type:String},breadcrumbs:{type:Boolean,default:!1},color:{type:String},contact:{type:String},height:{type:Number,default:400},iconFilter:{type:String},logo:{type:String},noManifestPopover:{type:Boolean,default:!1},options:{type:String},pdfDownloadEnabled:{type:Boolean,default:!1},position:{type:String,default:"center"},subtitle:{type:String},searchDomain:{type:String},searchCx:{type:String},searchKey:{type:String},title:{type:String},top:{type:Number,default:0}},setup(F){const W=F,q=self.window,K=ref(null),X=computed(()=>{var kf,Nf;return(Nf=(kf=K.value)==null?void 0:kf.getRootNode())==null?void 0:Nf.host}),tt=ref(null),rt=ref(null),ot=ref(),ut=ref(q.config||{}),yn=computed(()=>{var kf;return W.title||((kf=ut.value.meta)==null?void 0:kf.title)}),uo=computed(()=>{var kf,Nf;return W.background||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.backgroundImage)}),po=computed(()=>{var Nf,Yf;let kf=W.logo||((Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)==null?void 0:Yf.logo);return kf&&((kf==null?void 0:kf.indexOf("http"))===0?kf:`${ut.value.baseurl||""}/${kf[0]==="/"?kf.slice(1):kf}`)}),mo=computed(()=>{var kf,Nf;return W.iconFilter===void 0?(Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.iconFilter:W.iconFilter}),wo=computed(()=>{var kf,Nf;return W.backgroundColor||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.backgroundColor)||(uo.value?"black":"#ddd")}),lf=computed(()=>{var kf,Nf;return W.color||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.color)||"#fff"}),yf=computed(()=>{var kf,Nf;return W.contact||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.contact)}),cf=computed(()=>{var kf,Nf;return W.breadcrumbs||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.breadcrumbs)}),vf=computed(()=>{var kf,Nf;return W.pdfDownloadEnabled||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.pdfDownloadEnabled)}),_f=computed(()=>{var kf,Nf;return W.auth||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.auth)});watch$1(rt,kf=>{kf&&(kf.style.backgroundColor=Lf(wo.value,W.alpha||(uo.value?.5:1)))});const $f=ref(!1),wf=ref(),Pf=ref(),Cf=ref(),Af=ref();watch$1(X,kf=>{var Nf,Yf;if(ut.value=q.config||{},Pf.value=parseImageOptions(W.options||""),uo.value&&Bf(),tt.value&&(tt.value.style.height=W.height?`${W.height}px`:uo.value?"400px":"100px"),(Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)!=null&&Yf.class&&ut.value.defaults.header.class.split(" ").forEach(Gf=>kf.classList.add(Gf)),$f.value=kf.classList.contains("sticky"),$f.value){let Gf=parseInt(kf.style.top.replace(/px/,"")),rp=W.top?W.top:Gf||(uo.value?-300:0);kf.style.top=`${rp}px`}});function Bf(){getManifest(uo.value).then(kf=>wf.value=kf).catch(kf=>{fetch(`https://${iiifServer}/manifest/`,{method:"POST",body:JSON.stringify({url:uo.value})}).then(Nf=>Nf.json()).then(Nf=>wf.value=Nf)})}onMounted(()=>{nextTick(()=>{var Nf,Yf,Gf,rp;let kf=X.value.querySelector("ul");if(!kf){let ip=X.value.nextElementSibling;ip&&ip.tagName==="UL"&&(kf=ip)}kf?kf.style.display="none":(Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)!=null&&Yf.nav&&(kf=document.createElement("ul"),(rp=(Gf=ut.value.defaults)==null?void 0:Gf.header)==null||rp.nav.forEach(ip=>{const ap=document.createElement("li"),yp=document.createElement("a");yp.href=ip.href,yp.innerHTML=ip.label,ip.icon&&(yp.innerHTML+=ip.icon),ap.appendChild(yp),kf.appendChild(ap)})),ot.value=kf==null?void 0:kf.innerHTML}),document.addEventListener("scroll",()=>{let kf=K.value?K.value.getBoundingClientRect().height+K.value.getBoundingClientRect().top:0;EventBus$1.emit("offset",kf)})}),watch$1(wf,(kf,Nf)=>{kf!==Nf&&(Cf.value=getItemInfo(kf))}),watch$1(Cf,async(kf,Nf)=>{kf!==Nf&&setTimeout(async()=>{Af.value=kf.service?Hf(kf.service[0].id||kf.service[0]["@id"],Pf.value):await imageDataUrl(Cf.value.id,Pf.value.region,{width:X.value.clientWidth,height:W.height})},100)}),watch$1(Af,()=>{tt.value&&(tt.value.style.backgroundImage=`url("${Af.value}")`,tt.value.style.backgroundPosition=W.position)});function Hf(kf,Nf){let Yf=Cf.value,Gf=Number((Yf.width/Yf.height).toFixed(4)),rp=Math.min(800,X.value.getBoundingClientRect().width.toFixed(0)),ip=Number(rp/Gf).toFixed(0),ap=`${rp},${ip}`;return`${kf.replace(/\/info.json$/,"")}/${Nf.region}/${ap}/${Nf.rotation}/${Nf.quality}.${Nf.format}`}const Df={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#964B00",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8B4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Lf(kf,Nf=1){let Yf,Gf=kf[0]==="#"?kf:Df[kf.toLowerCase()];if(Gf.length===4){let rp=Gf.slice(1,2),ip=Gf.slice(2,3),ap=Gf.slice(3,4);rp=parseInt(rp+rp,16),ip=parseInt(ip+ip,16),ap=parseInt(ap+ap,16),Yf=`rgba(${rp}, ${ip}, ${ap}, ${Nf})`}else{const rp=parseInt(Gf.slice(1,3),16),ip=parseInt(Gf.slice(3,5),16),ap=parseInt(Gf.slice(5,7),16);Yf=`rgba(${rp}, ${ip}, ${ap}, ${Nf})`}return Yf}return(kf,Nf)=>(openBlock(),createElementBlock("div",{class:"header",ref_key:"root",ref:K},[uo.value?(openBlock(),createElementBlock("div",{key:0,class:"background",ref_key:"background",ref:tt},null,512)):createCommentVNode("",!0),createBaseVNode("div",{class:"navbar",ref_key:"navbar",ref:rt,style:normalizeStyle({color:lf.value})},[po.value?(openBlock(),createElementBlock("div",_hoisted_1$i,[createBaseVNode("a",{href:`${ut.value.baseurl||""}/`},[createBaseVNode("img",{src:po.value,class:normalizeClass(`${mo.value?"icon-"+mo.value:""}`),alt:"logo"},null,10,_hoisted_3$d)],8,_hoisted_2$f)])):createCommentVNode("",!0),createBaseVNode("div",_hoisted_4$c,[yn.value?(openBlock(),createElementBlock("div",_hoisted_5$a,[createBaseVNode("a",{href:`${ut.value.baseurl||""}/`,innerHTML:yn.value},null,8,_hoisted_6$9)])):createCommentVNode("",!0),F.subtitle?(openBlock(),createElementBlock("div",{key:1,class:"subtitle clamp1",innerHTML:F.subtitle},null,8,_hoisted_7$7)):createCommentVNode("",!0)]),createBaseVNode("div",_hoisted_8$6,[W.searchDomain?(openBlock(),createElementBlock("ve-site-search",{key:0,"search-domain":W.searchDomain,"search-cx":W.searchCx,"search-key":W.searchKey},null,8,_hoisted_9$7)):createCommentVNode("",!0),ot.value!==void 0||_f.value?(openBlock(),createElementBlock("ve-menu",{key:1,auth:_f.value,contact:yf.value,"pdf-download-enabled":vf.value?"":null,innerHTML:ot.value},null,8,_hoisted_10$7)):createCommentVNode("",!0)])],4),cf.value?(openBlock(),createElementBlock("ve-breadcrumbs",_hoisted_11$7)):createCommentVNode("",!0),wf.value&&!F.noManifestPopover?(openBlock(),createElementBlock("ve-manifest-popup",{key:2,manifest:wf.value},null,8,_hoisted_12$7)):createCommentVNode("",!0)],512))}}),_style_0$i=`:host{display:block}.header{display:grid;grid-template-rows:1fr 100px auto;grid-template-columns:1fr}.background{grid-area:1 / 1 / 3 / 2;background-repeat:no-repeat;background-size:cover;background-position:center;z-index:1;position:relative}.navbar{grid-area:2 / 1 / 3 / 2;background-color:#0006;color:#fff;z-index:2;display:flex;align-items:center;gap:1.5em;padding:0 20px}ve-manifest-popup{visibility:hidden;position:absolute;top:1em;right:1em;z-index:10}.header:hover ve-manifest-popup{visibility:visible;transition:all .5s ease-in}ve-breadcrumbs{grid-area:3 / 1 / 4 / 2;background-color:#fff;color:#000;z-index:1}.branding{display:flex;flex-direction:column;gap:6px}.title a{font-size:2em;line-height:1;font-weight:500;text-decoration:none;color:inherit}.subtitle{font-size:1.5em;line-height:1;font-weight:300}.logo{display:flex;align-items:center;justify-content:center;height:50%}.logo a{height:100%}.logo img{-o-object-fit:contain;object-fit:contain;vertical-align:middle;height:100%}.search-and-menu{margin-left:auto;display:flex;align-items:center;gap:1em}.clamp1{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}@media only screen and (max-width: 768px){.navbar{gap:.75em;padding:0 1em}.title a{font-size:1.3em}.subtitle{font-size:1em}.logo img{max-width:40px}ve-breadcrumbs{padding-left:.5rem}}.icon-white{filter:invert(100%) sepia(0%) saturate(7487%) hue-rotate(339deg) brightness(115%) contrast(100%)}
+`,bp=await mo.value.putFile(_f.value,Pf.value,$p,Vp,Lf.value);if(bp.status>=200&&bp.status<300){let _p=`${_f.value}/${Pf.value}/${Lf.value}/${$p}`;vp(_p,"add"),og()}else tt.value=`Error: ${bp.statusText} ${$p}`}),Lp.addEventListener("reset",()=>{tt.value=null})),(kp=ut.value)==null||kp.addEventListener("sl-after-show",()=>{var Of;((Of=ut.value)==null?void 0:Of.querySelector("#add-file-input")).focus()}),(lp=ut.value)==null||lp.show()}function og(){var Lp,xp;let Dp=(Lp=ut.value)==null?void 0:Lp.querySelector("#add-file-input");Dp.value="",tt.value=null,(xp=ut.value)==null||xp.hide()}async function vg(){let Dp=Gf.value.map(Lp=>Lp.selected.name).join("/");await mo.value.deleteFile(_f.value,Pf.value,Dp,Lf.value),vp(`${_f.value}/${Pf.value}/${Lf.value}`,"delete")}return(Dp,Lp)=>{var xp,kp;return openBlock(),createElementBlock("div",_hoisted_1$j,[_hoisted_2$g,createBaseVNode("sl-breadcrumb",null,[createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-dropdown",null,[createBaseVNode("sl-input",{ref_key:"acctInput",ref:yn,slot:"trigger",size:"medium",placeholder:"Github username",autocomplete:"off",onKeyup:Af,value:_f.value},[vf.value.length>0?(openBlock(),createElementBlock("svg",_hoisted_4$d,_hoisted_6$a)):createCommentVNode("",!0)],40,_hoisted_3$e),createBaseVNode("sl-menu",{ref_key:"acctMenu",ref:uo},[(openBlock(!0),createElementBlock(Fragment,null,renderList(vf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`acct-${Of}`,onClick:qf=>xf(lp),innerHTML:lp.login,class:normalizeClass({selected:lp.login===_f.value})},null,10,_hoisted_7$8))),128))],512)])]),Pf.value?(openBlock(),createElementBlock("sl-breadcrumb-item",_hoisted_8$7,[Cf.value.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_9$8,[createBaseVNode("sl-button",_hoisted_10$8,[createTextVNode(toDisplayString(Pf.value)+" ",1),Cf.value.length>1?(openBlock(),createElementBlock("svg",_hoisted_11$8,_hoisted_13$7)):createCommentVNode("",!0)]),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Cf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`repo-${Of}`,onClick:qf=>Hf(lp),innerHTML:lp.name,class:normalizeClass({selected:lp.name===Pf.value})},null,10,_hoisted_14$6))),128))])])):createCommentVNode("",!0)])):createCommentVNode("",!0),Lf.value?(openBlock(),createElementBlock("sl-breadcrumb-item",_hoisted_15$5,[Df.value.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_16$5,[Lf.value?(openBlock(),createElementBlock("sl-button",_hoisted_17$5,[createTextVNode(toDisplayString(Lf.value)+" ",1),Df.value.length>1?(openBlock(),createElementBlock("svg",_hoisted_18$5,_hoisted_20$4)):createCommentVNode("",!0)])):createCommentVNode("",!0),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Df.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`branch-${Of}`,onClick:qf=>Yf(lp),innerHTML:lp.name,class:normalizeClass({selected:lp.name===Lf.value})},null,10,_hoisted_21$4))),128))])])):createCommentVNode("",!0)])):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Gf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-breadcrumb-item",{key:`pe-${Of}`},[lp.dirList.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_22$3,[createBaseVNode("sl-button",_hoisted_23$3,[createTextVNode(toDisplayString(lp.selected.name)+" ",1),lp.dirList.length>1?(openBlock(),createElementBlock("svg",_hoisted_24$3,_hoisted_26$3)):createCommentVNode("",!0)]),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(lp.dirList,(qf,cp)=>(openBlock(),createElementBlock("sl-menu-item",{key:`dl=${Of}-${cp}`,onClick:hp=>(qf.type==="dir"||/\.md$/.test(qf.name))&&rp(Of,qf),class:normalizeClass({selected:qf.name===lp.selected.name}),disabled:qf.type==="file"&&!/\.md$/.test(qf.name)?"":null},[qf.type==="dir"?(openBlock(),createElementBlock("svg",_hoisted_28$3,_hoisted_30$2)):/\.md$/.test(qf.name)?(openBlock(),createElementBlock("svg",_hoisted_31$2,_hoisted_33$2)):(openBlock(),createElementBlock("svg",_hoisted_34$2,_hoisted_36$2)),createTextVNode(" "+toDisplayString(qf.name),1)],10,_hoisted_27$3))),128)),yf.value?(openBlock(),createElementBlock("sl-menu-item",{key:0,onClick:qf=>ng(Of)},_hoisted_40$2,8,_hoisted_37$2)):createCommentVNode("",!0)])])):createCommentVNode("",!0)]))),128)),yf.value?(openBlock(),createElementBlock("sl-dropdown",_hoisted_41$2,[(openBlock(),createElementBlock("svg",_hoisted_42$2,_hoisted_44$2)),createBaseVNode("sl-menu",null,[createBaseVNode("sl-menu-item",{onClick:Lp[0]||(Lp[0]=lp=>{var Of;return(Of=ot.value)==null?void 0:Of.show()})},[(openBlock(),createElementBlock("svg",_hoisted_45$2,_hoisted_47$1)),createTextVNode(" Delete file ")])])])):createCommentVNode("",!0)]),createBaseVNode("sl-dialog",{ref_key:"deleteDialog",ref:ot,label:"Confirm Delete",class:"deleteDialog"},[createTextVNode(" Delete "+toDisplayString((kp=(xp=Gf.value[Gf.value.length-1])==null?void 0:xp.selected)==null?void 0:kp.name)+"? ",1),_hoisted_48],512),createBaseVNode("sl-dialog",{label:"Add File",ref_key:"addDialog",ref:ut},[createBaseVNode("form",_hoisted_49,[_hoisted_50,_hoisted_51,tt.value?(openBlock(),createElementBlock("div",{key:0,innerHTML:tt.value,style:{color:"red","margin-bottom":"1em"}},null,8,_hoisted_52)):createCommentVNode("",!0),createBaseVNode("sl-button",{onClick:Lp[1]||(Lp[1]=lp=>og())},"Cancel"),_hoisted_53,_hoisted_54])],512)],512)}}}),_style_0$j=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*{box-sizing:border-box}:host{display:block;width:100%;border:1px solid #ced4da;position:relative;z-index:1;background-color:#fff;box-sizing:border-box}.main{display:flex;align-items:center;gap:1em;padding:6px}sl-menu{text-align:left}sl-menu-item.selected::part(label){font-weight:700}
+`,GhFileSelector=_export_sfc(_sfc_main$l,[["styles",[_style_0$j]]]),_hoisted_1$i={key:0,class:"logo"},_hoisted_2$f=["href"],_hoisted_3$d=["src"],_hoisted_4$c={class:"branding"},_hoisted_5$a={key:0,class:"title"},_hoisted_6$9=["href","innerHTML"],_hoisted_7$7=["innerHTML"],_hoisted_8$6={class:"search-and-menu"},_hoisted_9$7=["search-domain","search-cx","search-key"],_hoisted_10$7=["auth","contact","pdf-download-enabled","innerHTML"],_hoisted_11$7={key:1},_hoisted_12$7=["manifest"],_sfc_main$k=defineComponent({__name:"Header.ce",props:{alpha:{type:Number},auth:{type:String},background:{type:String},backgroundColor:{type:String},breadcrumbs:{type:Boolean,default:!1},color:{type:String},contact:{type:String},height:{type:Number,default:400},iconFilter:{type:String},logo:{type:String},noManifestPopover:{type:Boolean,default:!1},options:{type:String},pdfDownloadEnabled:{type:Boolean,default:!1},position:{type:String,default:"center"},subtitle:{type:String},searchDomain:{type:String},searchCx:{type:String},searchKey:{type:String},title:{type:String},top:{type:Number,default:0}},setup(F){const W=F,q=self.window,K=ref(null),X=computed(()=>{var kf,Nf;return(Nf=(kf=K.value)==null?void 0:kf.getRootNode())==null?void 0:Nf.host}),tt=ref(null),rt=ref(null),ot=ref(),ut=ref(q.config||{}),yn=computed(()=>{var kf;return W.title||((kf=ut.value.meta)==null?void 0:kf.title)}),uo=computed(()=>{var kf,Nf;return W.background||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.backgroundImage)}),po=computed(()=>{var Nf,Yf;let kf=W.logo||((Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)==null?void 0:Yf.logo);return kf&&((kf==null?void 0:kf.indexOf("http"))===0?kf:`${ut.value.baseurl||""}/${kf[0]==="/"?kf.slice(1):kf}`)}),mo=computed(()=>{var kf,Nf;return W.iconFilter===void 0?(Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.iconFilter:W.iconFilter}),wo=computed(()=>{var kf,Nf;return W.backgroundColor||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.backgroundColor)||(uo.value?"black":"#ddd")}),lf=computed(()=>{var kf,Nf;return W.color||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.color)||"#fff"}),yf=computed(()=>{var kf,Nf;return W.contact||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.contact)}),cf=computed(()=>{var kf,Nf;return W.breadcrumbs||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.breadcrumbs)}),vf=computed(()=>{var kf,Nf;return W.pdfDownloadEnabled||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.pdfDownloadEnabled)}),_f=computed(()=>{var kf,Nf;return W.auth||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.auth)});watch$1(rt,kf=>{kf&&(kf.style.backgroundColor=Lf(wo.value,W.alpha||(uo.value?.5:1)))});const $f=ref(!1),xf=ref(),Af=ref(),Cf=ref(),Pf=ref();watch$1(X,kf=>{var Nf,Yf;if(ut.value=q.config||{},Af.value=parseImageOptions(W.options||""),uo.value&&Bf(),tt.value&&(tt.value.style.height=W.height?`${W.height}px`:uo.value?"400px":"100px"),(Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)!=null&&Yf.class&&ut.value.defaults.header.class.split(" ").forEach(Gf=>kf.classList.add(Gf)),$f.value=kf.classList.contains("sticky"),$f.value){let Gf=parseInt(kf.style.top.replace(/px/,"")),rp=W.top?W.top:Gf||(uo.value?-300:0);kf.style.top=`${rp}px`}});function Bf(){getManifest(uo.value).then(kf=>xf.value=kf).catch(kf=>{fetch(`https://${iiifServer}/manifest/`,{method:"POST",body:JSON.stringify({url:uo.value})}).then(Nf=>Nf.json()).then(Nf=>xf.value=Nf)})}onMounted(()=>{nextTick(()=>{var Nf,Yf,Gf,rp;let kf=X.value.querySelector("ul");if(!kf){let ip=X.value.nextElementSibling;ip&&ip.tagName==="UL"&&(kf=ip)}kf?kf.style.display="none":(Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)!=null&&Yf.nav&&(kf=document.createElement("ul"),(rp=(Gf=ut.value.defaults)==null?void 0:Gf.header)==null||rp.nav.forEach(ip=>{const ap=document.createElement("li"),yp=document.createElement("a");yp.href=ip.href,yp.innerHTML=ip.label,ip.icon&&(yp.innerHTML+=ip.icon),ap.appendChild(yp),kf.appendChild(ap)})),ot.value=kf==null?void 0:kf.innerHTML}),document.addEventListener("scroll",()=>{let kf=K.value?K.value.getBoundingClientRect().height+K.value.getBoundingClientRect().top:0;EventBus$1.emit("offset",kf)})}),watch$1(xf,(kf,Nf)=>{kf!==Nf&&(Cf.value=getItemInfo(kf))}),watch$1(Cf,async(kf,Nf)=>{kf!==Nf&&setTimeout(async()=>{Pf.value=kf.service?Hf(kf.service[0].id||kf.service[0]["@id"],Af.value):await imageDataUrl(Cf.value.id,Af.value.region,{width:X.value.clientWidth,height:W.height})},100)}),watch$1(Pf,()=>{tt.value&&(tt.value.style.backgroundImage=`url("${Pf.value}")`,tt.value.style.backgroundPosition=W.position)});function Hf(kf,Nf){let Yf=Cf.value,Gf=Number((Yf.width/Yf.height).toFixed(4)),rp=Math.min(800,X.value.getBoundingClientRect().width.toFixed(0)),ip=Number(rp/Gf).toFixed(0),ap=`${rp},${ip}`;return`${kf.replace(/\/info.json$/,"")}/${Nf.region}/${ap}/${Nf.rotation}/${Nf.quality}.${Nf.format}`}const Df={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#964B00",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8B4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Lf(kf,Nf=1){let Yf,Gf=kf[0]==="#"?kf:Df[kf.toLowerCase()];if(Gf.length===4){let rp=Gf.slice(1,2),ip=Gf.slice(2,3),ap=Gf.slice(3,4);rp=parseInt(rp+rp,16),ip=parseInt(ip+ip,16),ap=parseInt(ap+ap,16),Yf=`rgba(${rp}, ${ip}, ${ap}, ${Nf})`}else{const rp=parseInt(Gf.slice(1,3),16),ip=parseInt(Gf.slice(3,5),16),ap=parseInt(Gf.slice(5,7),16);Yf=`rgba(${rp}, ${ip}, ${ap}, ${Nf})`}return Yf}return(kf,Nf)=>(openBlock(),createElementBlock("div",{class:"header",ref_key:"root",ref:K},[uo.value?(openBlock(),createElementBlock("div",{key:0,class:"background",ref_key:"background",ref:tt},null,512)):createCommentVNode("",!0),createBaseVNode("div",{class:"navbar",ref_key:"navbar",ref:rt,style:normalizeStyle({color:lf.value})},[po.value?(openBlock(),createElementBlock("div",_hoisted_1$i,[createBaseVNode("a",{href:`${ut.value.baseurl||""}/`},[createBaseVNode("img",{src:po.value,class:normalizeClass(`${mo.value?"icon-"+mo.value:""}`),alt:"logo"},null,10,_hoisted_3$d)],8,_hoisted_2$f)])):createCommentVNode("",!0),createBaseVNode("div",_hoisted_4$c,[yn.value?(openBlock(),createElementBlock("div",_hoisted_5$a,[createBaseVNode("a",{href:`${ut.value.baseurl||""}/`,innerHTML:yn.value},null,8,_hoisted_6$9)])):createCommentVNode("",!0),F.subtitle?(openBlock(),createElementBlock("div",{key:1,class:"subtitle clamp1",innerHTML:F.subtitle},null,8,_hoisted_7$7)):createCommentVNode("",!0)]),createBaseVNode("div",_hoisted_8$6,[W.searchDomain?(openBlock(),createElementBlock("ve-site-search",{key:0,"search-domain":W.searchDomain,"search-cx":W.searchCx,"search-key":W.searchKey},null,8,_hoisted_9$7)):createCommentVNode("",!0),ot.value!==void 0||_f.value?(openBlock(),createElementBlock("ve-menu",{key:1,auth:_f.value,contact:yf.value,"pdf-download-enabled":vf.value?"":null,innerHTML:ot.value},null,8,_hoisted_10$7)):createCommentVNode("",!0)])],4),cf.value?(openBlock(),createElementBlock("ve-breadcrumbs",_hoisted_11$7)):createCommentVNode("",!0),xf.value&&!F.noManifestPopover?(openBlock(),createElementBlock("ve-manifest-popup",{key:2,manifest:xf.value},null,8,_hoisted_12$7)):createCommentVNode("",!0)],512))}}),_style_0$i=`:host{display:block}.header{display:grid;grid-template-rows:1fr 100px auto;grid-template-columns:1fr}.background{grid-area:1 / 1 / 3 / 2;background-repeat:no-repeat;background-size:cover;background-position:center;z-index:1;position:relative}.navbar{grid-area:2 / 1 / 3 / 2;background-color:#0006;color:#fff;z-index:2;display:flex;align-items:center;gap:1.5em;padding:0 20px}ve-manifest-popup{visibility:hidden;position:absolute;top:1em;right:1em;z-index:10}.header:hover ve-manifest-popup{visibility:visible;transition:all .5s ease-in}ve-breadcrumbs{grid-area:3 / 1 / 4 / 2;background-color:#fff;color:#000;z-index:1}.branding{display:flex;flex-direction:column;gap:6px}.title a{font-size:2em;line-height:1;font-weight:500;text-decoration:none;color:inherit}.subtitle{font-size:1.5em;line-height:1;font-weight:300}.logo{display:flex;align-items:center;justify-content:center;height:50%}.logo a{height:100%}.logo img{-o-object-fit:contain;object-fit:contain;vertical-align:middle;height:100%}.search-and-menu{margin-left:auto;display:flex;align-items:center;gap:1em}.clamp1{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}@media only screen and (max-width: 768px){.navbar{gap:.75em;padding:0 1em}.title a{font-size:1.3em}.subtitle{font-size:1em}.logo img{max-width:40px}ve-breadcrumbs{padding-left:.5rem}}.icon-white{filter:invert(100%) sepia(0%) saturate(7487%) hue-rotate(339deg) brightness(115%) contrast(100%)}
`,Header=_export_sfc(_sfc_main$k,[["styles",[_style_0$i]]]),_hoisted_1$h=["allow","allowfullscreen","allowtransparency","frameborder","height","loading","mozallowfullscreen","msallowfullscreen","name","referrerpolicy","src","webkitallowfullscreen","width"],_hoisted_2$e=["innerHTML"],_sfc_main$j=defineComponent({__name:"IFrame.ce",props:{allow:{type:String},allowfullscreen:{type:Boolean},allowpaymentrequest:{type:Boolean},allowtransparency:{type:Boolean,default:!0},caption:{type:String},frameborder:{type:Number,default:0},height:{type:Number},loading:{type:String,default:"eager"},name:{type:String},referrerpolicy:{type:String},sandbox:{type:String},src:{type:String},srcdoc:{type:String},width:{type:Number}},setup(F){var po,mo,wo;const W=F;watch$1(W,()=>{yn()});const q=ref(null),K=computed(()=>{var lf,yf;return(yf=(lf=q.value)==null?void 0:lf.getRootNode())==null?void 0:yf.host});watch$1(K,lf=>{new ResizeObserver(()=>yn()).observe(lf)});const X=ref(null),tt=ref(W.width||((po=K.value)==null?void 0:po.style.width)&&K.value.clientWidth),rt=ref(W.height||((mo=K.value)==null?void 0:mo.style.height)&&K.value.clientHeight),ot=ref(tt.value||((wo=K.value)==null?void 0:wo.clientWidth)),ut=ref(rt.value||ot.value);function yn(){tt.value=W.width||K.value.style.width&&K.value.clientWidth,rt.value=W.height||K.value.style.height&&K.value.clientHeight,ot.value=tt.value||K.value.clientWidth,ut.value=rt.value||ot.value}function uo(lf){return lf?marked.parse(lf).slice(3,-5):""}return(lf,yf)=>{var cf;return openBlock(),createElementBlock("div",{ref_key:"main",ref:q,class:"main"},[createBaseVNode("iframe",{ref:"iframeEl",allow:F.allow,allowfullscreen:F.allowfullscreen,allowtransparency:F.allowtransparency,frameborder:F.frameborder,height:ut.value-(((cf=X.value)==null?void 0:cf.clientHeight)||0),loading:F.loading,mozallowfullscreen:F.allowfullscreen,msallowfullscreen:F.allowfullscreen,name:F.name,referrerpolicy:F.referrerpolicy,src:F.src,webkitallowfullscreen:F.allowfullscreen,width:ot.value},null,8,_hoisted_1$h),F.caption?(openBlock(),createElementBlock("div",{key:0,ref_key:"captionEl",ref:X,class:"caption",innerHTML:uo(F.caption)},null,8,_hoisted_2$e)):createCommentVNode("",!0)],512)}}}),_style_0$h=`*{box-sizing:border-box}:host{display:block;width:100%;height:100%;margin:0;padding:0}.main{display:flex;flex-direction:column;background-color:#fff;width:100%!important}.caption{padding:.3em;width:100%;font-size:1em;font-weight:500;text-align:left;line-height:1.3;margin-bottom:.3em}
`,IFrame=_export_sfc(_sfc_main$j,[["styles",[_style_0$h]]]);var openseadragon={exports:{}},hasRequiredOpenseadragon;function requireOpenseadragon(){return hasRequiredOpenseadragon||(hasRequiredOpenseadragon=1,function(module){//! openseadragon 2.4.2
//! Built on 2020-03-05
@@ -3441,7 +3441,7 @@ Please report this to https://github.com/markedjs/marked.`,W){const tt="An er
//! http://openseadragon.github.io
//! License: http://openseadragon.github.io/license/
function OpenSeadragon(F){return new OpenSeadragon.Viewer(F)}(function(F){F.version={versionStr:"2.4.2",major:parseInt("2",10),minor:parseInt("4",10),revision:parseInt("2",10)};var W={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},q=Object.prototype.toString,K=Object.prototype.hasOwnProperty;F.isFunction=function(X){return F.type(X)==="function"},F.isArray=Array.isArray||function(X){return F.type(X)==="array"},F.isWindow=function(X){return X&&typeof X=="object"&&"setInterval"in X},F.type=function(X){return X==null?String(X):W[q.call(X)]||"object"},F.isPlainObject=function(X){if(!X||OpenSeadragon.type(X)!=="object"||X.nodeType||F.isWindow(X)||X.constructor&&!K.call(X,"constructor")&&!K.call(X.constructor.prototype,"isPrototypeOf"))return!1;var tt;for(var rt in X)tt=rt;return tt===void 0||K.call(X,tt)},F.isEmptyObject=function(X){for(var tt in X)return!1;return!0},F.freezeObject=function(X){return Object.freeze?F.freezeObject=Object.freeze:F.freezeObject=function(tt){return tt},F.freezeObject(X)},F.supportsCanvas=function(){var X=document.createElement("canvas");return!!(F.isFunction(X.getContext)&&X.getContext("2d"))}(),F.isCanvasTainted=function(X){var tt=!1;try{X.getContext("2d").getImageData(0,0,1,1)}catch{tt=!0}return tt},F.pixelDensityRatio=function(){if(F.supportsCanvas){var X=document.createElement("canvas").getContext("2d"),tt=window.devicePixelRatio||1,rt=X.webkitBackingStorePixelRatio||X.mozBackingStorePixelRatio||X.msBackingStorePixelRatio||X.oBackingStorePixelRatio||X.backingStorePixelRatio||1;return Math.max(tt,1)/rt}else return 1}()})(OpenSeadragon),function($){$.extend=function(){var F,W,q,K,X,tt,rt=arguments[0]||{},ot=arguments.length,ut=!1,yn=1;for(typeof rt=="boolean"&&(ut=rt,rt=arguments[1]||{},yn=2),typeof rt!="object"&&!OpenSeadragon.isFunction(rt)&&(rt={}),ot===yn&&(rt=this,--yn);yn=q.x&&W.x=q.y},getEvent:function(F){return F?$.getEvent=function(W){return W}:$.getEvent=function(){return window.event},$.getEvent(F)},getMousePosition:function(F){if(typeof F.pageX=="number")$.getMousePosition=function(W){var q=new $.Point;return W=$.getEvent(W),q.x=W.pageX,q.y=W.pageY,q};else if(typeof F.clientX=="number")$.getMousePosition=function(W){var q=new $.Point;return W=$.getEvent(W),q.x=W.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,q.y=W.clientY+document.body.scrollTop+document.documentElement.scrollTop,q};else throw new Error("Unknown event mouse position, no known technique.");return $.getMousePosition(F)},getPageScroll:function(){var F=document.documentElement||{},W=document.body||{};if(typeof window.pageXOffset=="number")$.getPageScroll=function(){return new $.Point(window.pageXOffset,window.pageYOffset)};else if(W.scrollLeft||W.scrollTop)$.getPageScroll=function(){return new $.Point(document.body.scrollLeft,document.body.scrollTop)};else if(F.scrollLeft||F.scrollTop)$.getPageScroll=function(){return new $.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)};else return new $.Point(0,0);return $.getPageScroll()},setPageScroll:function(F){if(typeof window.scrollTo<"u")$.setPageScroll=function(K){window.scrollTo(K.x,K.y)};else{var W=$.getPageScroll();if(W.x===F.x&&W.y===F.y)return;document.body.scrollLeft=F.x,document.body.scrollTop=F.y;var q=$.getPageScroll();if(q.x!==W.x&&q.y!==W.y){$.setPageScroll=function(K){document.body.scrollLeft=K.x,document.body.scrollTop=K.y};return}if(document.documentElement.scrollLeft=F.x,document.documentElement.scrollTop=F.y,q=$.getPageScroll(),q.x!==W.x&&q.y!==W.y){$.setPageScroll=function(K){document.documentElement.scrollLeft=K.x,document.documentElement.scrollTop=K.y};return}$.setPageScroll=function(K){}}return $.setPageScroll(F)},getWindowSize:function(){var F=document.documentElement||{},W=document.body||{};if(typeof window.innerWidth=="number")$.getWindowSize=function(){return new $.Point(window.innerWidth,window.innerHeight)};else if(F.clientWidth||F.clientHeight)$.getWindowSize=function(){return new $.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(W.clientWidth||W.clientHeight)$.getWindowSize=function(){return new $.Point(document.body.clientWidth,document.body.clientHeight)};else throw new Error("Unknown window size, no known technique.");return $.getWindowSize()},makeCenteredNode:function(F){F=$.getElement(F);var W=[$.makeNeutralElement("div"),$.makeNeutralElement("div"),$.makeNeutralElement("div")];return $.extend(W[0].style,{display:"table",height:"100%",width:"100%"}),$.extend(W[1].style,{display:"table-row"}),$.extend(W[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),W[0].appendChild(W[1]),W[1].appendChild(W[2]),W[2].appendChild(F),W[0]},makeNeutralElement:function(F){var W=document.createElement(F),q=W.style;return q.background="transparent none",q.border="none",q.margin="0px",q.padding="0px",q.position="static",W},now:function(){return Date.now?$.now=Date.now:$.now=function(){return new Date().getTime()},$.now()},makeTransparentImage:function(F){return $.makeTransparentImage=function(W){var q=$.makeNeutralElement("img");return q.src=W,q},$.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<7&&($.makeTransparentImage=function(W){var q=$.makeNeutralElement("img"),K=null;return K=$.makeNeutralElement("span"),K.style.display="inline-block",q.onload=function(){K.style.width=K.style.width||q.width+"px",K.style.height=K.style.height||q.height+"px",q.onload=null,q=null},q.src=W,K.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+W+"', sizingMethod='scale')",K}),$.makeTransparentImage(F)},setElementOpacity:function(F,W,q){var K,X;F=$.getElement(F),q&&!$.Browser.alpha&&(W=Math.round(W)),$.Browser.opacity?F.style.opacity=W<1?W:"":W<1?(K=Math.round(100*W),X="alpha(opacity="+K+")",F.style.filter=X):F.style.filter=""},setElementTouchActionNone:function(F){F=$.getElement(F),typeof F.style.touchAction<"u"?F.style.touchAction="none":typeof F.style.msTouchAction<"u"&&(F.style.msTouchAction="none")},addClass:function(F,W){F=$.getElement(F),F.className?(" "+F.className+" ").indexOf(" "+W+" ")===-1&&(F.className+=" "+W):F.className=W},indexOf:function(F,W,q){return Array.prototype.indexOf?this.indexOf=function(K,X,tt){return K.indexOf(X,tt)}:this.indexOf=function(K,X,tt){var rt,ot=tt||0,ut;if(!K)throw new TypeError;if(ut=K.length,ut===0||ot>=ut)return-1;for(ot<0&&(ot=ut-Math.abs(ot)),rt=ot;rt=200&&ot.status<300||ot.status===0&&rt!=="http:"&&rt!=="https:"?W(ot):($.console.log("AJAX request returned %d: %s",ot.status,F),$.isFunction(q)&&q(ot)))};try{if(ot.open("GET",F,!0),tt&&(ot.responseType=tt),X)for(var ut in X)Object.prototype.hasOwnProperty.call(X,ut)&&X[ut]&&ot.setRequestHeader(ut,X[ut]);K&&(ot.withCredentials=!0),ot.send(null)}catch(mo){var yn=mo.message,uo=$.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<10;if(uo&&typeof mo.number<"u"&&mo.number==-2147024891&&(yn+=`
-See http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#xdomain`),$.console.log("%s while making AJAX request: %s",mo.name,yn),ot.onreadystatechange=function(){},window.XDomainRequest){var po=new window.XDomainRequest;if(po){po.onload=function(wo){$.isFunction(W)&&W({responseText:po.responseText,status:200,statusText:"OK"})},po.onerror=function(wo){$.isFunction(q)&&q({responseText:po.responseText,status:444,statusText:"An error happened. Due to an XDomainRequest deficiency we can not extract any information about this error. Upgrade your browser."})};try{po.open("GET",F),po.send()}catch{$.isFunction(q)&&q(ot,mo)}}}else $.isFunction(q)&&q(ot,mo)}return ot},jsonp:function(F){var W,q=F.url,K=document.head||document.getElementsByTagName("head")[0]||document.documentElement,X=F.callbackName||"openseadragon"+$.now(),tt=window[X],rt="$1"+X+"$2",ot=F.param||"callback",ut=F.callback;q=q.replace(/(\=)\?(&|$)|\?\?/i,rt),q+=(/\?/.test(q)?"&":"?")+ot+"="+X,window[X]=function(yn){if(tt)window[X]=tt;else try{delete window[X]}catch{}ut&&$.isFunction(ut)&&ut(yn)},W=document.createElement("script"),(F.async!==void 0||F.async!==!1)&&(W.async="async"),F.scriptCharset&&(W.charset=F.scriptCharset),W.src=q,W.onload=W.onreadystatechange=function(yn,uo){(uo||!W.readyState||/loaded|complete/.test(W.readyState))&&(W.onload=W.onreadystatechange=null,K&&W.parentNode&&K.removeChild(W),W=void 0)},K.insertBefore(W,K.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(F){if(window.DOMParser)$.parseXml=function(W){var q=null,K;return K=new DOMParser,q=K.parseFromString(W,"text/xml"),q};else if(window.ActiveXObject)$.parseXml=function(W){var q=null;return q=new ActiveXObject("Microsoft.XMLDOM"),q.async=!1,q.loadXML(W),q};else throw new Error("Browser doesn't support XML DOM.");return $.parseXml(F)},parseJSON:function(string){return window.JSON&&window.JSON.parse?$.parseJSON=window.JSON.parse:$.parseJSON=function(string){return eval("("+string+")")},$.parseJSON(string)},imageFormatSupported:function(F){return F=F||"",!!FILEFORMATS[F.toLowerCase()]}});var nullfunction=function(F){};$.console=window.console||{log:nullfunction,debug:nullfunction,info:nullfunction,warn:nullfunction,error:nullfunction,assert:nullfunction},$.Browser={vendor:$.BROWSERS.UNKNOWN,version:0,alpha:!0};var FILEFORMATS={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},URLPARAMS={};(function(){var F=navigator.appVersion,W=navigator.userAgent,q;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(W.substring(W.indexOf("MSIE")+5,W.indexOf(";",W.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(W.indexOf("Firefox")>=0?($.Browser.vendor=$.BROWSERS.FIREFOX,$.Browser.version=parseFloat(W.substring(W.indexOf("Firefox")+8))):W.indexOf("Safari")>=0?($.Browser.vendor=W.indexOf("Chrome")>=0?$.BROWSERS.CHROME:$.BROWSERS.SAFARI,$.Browser.version=parseFloat(W.substring(W.substring(0,W.indexOf("Safari")).lastIndexOf("/")+1,W.indexOf("Safari")))):(q=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),q.exec(W)!==null&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":$.Browser.vendor=$.BROWSERS.OPERA,$.Browser.version=parseFloat(F);break}var K=window.location.search.substring(1),X=K.split("&"),tt,rt,ot;for(ot=0;ot0){var ut=tt.substring(0,rt),yn=tt.substring(rt+1);try{URLPARAMS[ut]=decodeURIComponent(yn)}catch{$.console.error("Ignoring malformed URL parameter: %s=%s",ut,yn)}}$.Browser.alpha=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9||$.Browser.vendor==$.BROWSERS.CHROME&&$.Browser.version<2),$.Browser.opacity=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9)})(),function(F){var W=F.requestAnimationFrame||F.mozRequestAnimationFrame||F.webkitRequestAnimationFrame||F.msRequestAnimationFrame,q=F.cancelAnimationFrame||F.mozCancelAnimationFrame||F.webkitCancelAnimationFrame||F.msCancelAnimationFrame;if(W&&q)$.requestAnimationFrame=function(){return W.apply(F,arguments)},$.cancelAnimationFrame=function(){return q.apply(F,arguments)};else{var K=[],X=[],tt=0,rt;$.requestAnimationFrame=function(ot){return K.push([++tt,ot]),rt||(rt=setInterval(function(){if(K.length){var ut=$.now(),yn=X;for(X=K,K=yn;X.length;)X.shift()[1](ut)}else clearInterval(rt),rt=void 0},1e3/50)),tt},$.cancelAnimationFrame=function(ot){var ut,yn;for(ut=0,yn=K.length;ut8||"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",F.MouseTracker.supportsMouseCapture=function(){var Kf=document.createElement("div");return F.isFunction(Kf.setCapture)&&F.isFunction(Kf.releaseCapture)}(),F.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur",F.MouseTracker.wheelEventName],F.MouseTracker.wheelEventName=="DOMMouseScroll"&&F.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent&&(window.navigator.pointerEnabled||F.Browser.vendor!==F.BROWSERS.IE)?(F.MouseTracker.havePointerEvents=!0,F.MouseTracker.subscribeEvents.push("pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),F.MouseTracker.unprefixedPointerEvents=!0,navigator.maxTouchPoints?F.MouseTracker.maxTouchPoints=navigator.maxTouchPoints:F.MouseTracker.maxTouchPoints=0,F.MouseTracker.haveMouseEnter=!1):window.MSPointerEvent&&window.navigator.msPointerEnabled?(F.MouseTracker.havePointerEvents=!0,F.MouseTracker.subscribeEvents.push("MSPointerOver","MSPointerOut","MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"),F.MouseTracker.unprefixedPointerEvents=!1,navigator.msMaxTouchPoints?F.MouseTracker.maxTouchPoints=navigator.msMaxTouchPoints:F.MouseTracker.maxTouchPoints=0,F.MouseTracker.haveMouseEnter=!1):(F.MouseTracker.havePointerEvents=!1,F.Browser.vendor===F.BROWSERS.IE&&F.Browser.version<9?(F.MouseTracker.subscribeEvents.push("mouseenter","mouseleave"),F.MouseTracker.haveMouseEnter=!0):(F.MouseTracker.subscribeEvents.push("mouseover","mouseout"),F.MouseTracker.haveMouseEnter=!1),F.MouseTracker.subscribeEvents.push("mousedown","mouseup","mousemove"),"ontouchstart"in window&&F.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&F.MouseTracker.subscribeEvents.push("gesturestart","gesturechange"),F.MouseTracker.mousePointerId="legacy-mouse",F.MouseTracker.maxTouchPoints=10),F.MouseTracker.GesturePointList=function(Kf){this._gPoints=[],this.type=Kf,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},F.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(Kf){return this._gPoints.push(Kf)},removeById:function(Kf){var Xf,gp=this._gPoints.length;for(Xf=0;Xf1&&(this.type==="mouse"||this.type==="pen")&&(this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};function K(Kf){var Xf=q[Kf.hash],gp,wp=Xf.activePointersLists.length;for(gp=0;gp0&&(F.removeEvent(F.MouseTracker.captureElement,"mousemove",Xf.mousemovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"mouseup",Xf.mouseupcaptured,!0),F.removeEvent(F.MouseTracker.captureElement,F.MouseTracker.unprefixedPointerEvents?"pointermove":"MSPointerMove",Xf.pointermovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,F.MouseTracker.unprefixedPointerEvents?"pointerup":"MSPointerUp",Xf.pointerupcaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"touchmove",Xf.touchmovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"touchend",Xf.touchendcaptured,!0),Xf.activePointersLists[gp].captureCount=0);for(gp=0;gp0){for(wp=0;wp0&&(lm(Kf,Xf,mg,0),gp.captureCount=1,ut(Kf,gp.type),kg(Kf,Xf,mg))}}function Jp(Kf,Xf){var gp,wp,dg,mg=Xf.changedTouches.length,pg=[],wg,Cg=Kf.getActivePointersListByType("touch");for(gp=F.now(),Cg.getLength()>Xf.touches.length-mg&&(F.console.warn("Tracked touch contact count doesn't match event.touches.length. Removing all tracked touch pointers."),Ip(Kf,Xf,Cg)),wp=0;wp"u")return Ip(Kf,Xf,mg),!1;for(Bg=0;Bg"u"?!0:q.attachToViewer,this.autoFade=typeof q.autoFade>"u"?!0:q.autoFade,this.element=W,this.anchor=q.anchor,this.container=K,this.anchor==F.ControlAnchor.ABSOLUTE?(this.wrapper=F.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof q.top=="number"?q.top+"px":q.top,this.wrapper.style.left=typeof q.left=="number"?q.left+"px":q.left,this.wrapper.style.height=typeof q.height=="number"?q.height+"px":q.height,this.wrapper.style.width=typeof q.width=="number"?q.width+"px":q.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=F.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor==F.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),q.attachToViewer?this.anchor==F.ControlAnchor.TOP_RIGHT||this.anchor==F.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):X.appendChild(this.wrapper)},F.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!="none"},setVisible:function(W){this.wrapper.style.display=W?this.anchor==F.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(W){this.element[F.SIGNAL]&&F.Browser.vendor==F.BROWSERS.IE?F.setElementOpacity(this.element,W,!0):F.setElementOpacity(this.wrapper,W,!0)}}}(OpenSeadragon),function(F){F.ControlDock=function(q){var K=["topleft","topright","bottomright","bottomleft"],X,tt;for(F.extend(!0,this,{id:"controldock-"+F.now()+"-"+Math.floor(Math.random()*1e6),container:F.makeNeutralElement("div"),controls:[]},q),this.container.onsubmit=function(){return!1},this.element&&(this.element=F.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),tt=0;tt=0)){switch(K.anchor){case F.ControlAnchor.TOP_RIGHT:X=this.controls.topright,q.style.position="relative",q.style.paddingRight="0px",q.style.paddingTop="0px";break;case F.ControlAnchor.BOTTOM_RIGHT:X=this.controls.bottomright,q.style.position="relative",q.style.paddingRight="0px",q.style.paddingBottom="0px";break;case F.ControlAnchor.BOTTOM_LEFT:X=this.controls.bottomleft,q.style.position="relative",q.style.paddingLeft="0px",q.style.paddingBottom="0px";break;case F.ControlAnchor.TOP_LEFT:X=this.controls.topleft,q.style.position="relative",q.style.paddingLeft="0px",q.style.paddingTop="0px";break;case F.ControlAnchor.ABSOLUTE:X=this.container,q.style.margin="0px",q.style.padding="0px";break;default:case F.ControlAnchor.NONE:X=this.container,q.style.margin="0px",q.style.padding="0px";break}this.controls.push(new F.Control(q,K,X)),q.style.display="inline-block"}},removeControl:function(q){q=F.getElement(q);var K=W(this,q);return K>=0&&(this.controls[K].destroy(),this.controls.splice(K,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var q;for(q=this.controls.length-1;q>=0;q--)if(this.controls[q].isVisible())return!0;return!1},setControlsEnabled:function(q){var K;for(K=this.controls.length-1;K>=0;K--)this.controls[K].setVisible(q);return this}};function W(q,K){var X=q.controls,tt;for(tt=X.length-1;tt>=0;tt--)if(X[tt].element==K)return tt;return-1}}(OpenSeadragon),function(F){F.Placement=F.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(OpenSeadragon),function(F){var W={},q=1;F.Viewer=function(Of){var qf=arguments,cp=this,hp;if(F.isPlainObject(Of)||(Of={id:qf[0],xmlPath:qf.length>1?qf[1]:void 0,prefixUrl:qf.length>2?qf[2]:void 0,controls:qf.length>3?qf[3]:void 0,overlays:qf.length>4?qf[4]:void 0}),Of.config&&(F.extend(!0,Of,Of.config),delete Of.config),F.extend(!0,this,{id:Of.id,hash:Of.hash||q++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},F.DEFAULT_SETTINGS,Of),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(typeof W[this.hash]<"u"&&F.console.warn("Hash "+this.hash+" has already been used."),W[this.hash]={fsBoundsDelta:new F.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._lastScrollTime=F.now(),F.EventSource.call(this),this.addHandler("open-failed",function($p){var Vp=F.getString("Errors.OpenFailed",$p.eventSource,$p.message);cp._showMessage(Vp)}),F.ControlDock.call(this,Of),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=F.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function($p){$p.width="100%",$p.height="100%",$p.overflow="hidden",$p.position="absolute",$p.top="0px",$p.left="0px"}(this.canvas.style),F.setElementTouchActionNone(this.canvas),Of.tabIndex!==""&&(this.canvas.tabIndex=Of.tabIndex===void 0?0:Of.tabIndex),this.container.className="openseadragon-container",function($p){$p.width="100%",$p.height="100%",$p.position="relative",$p.overflow="hidden",$p.left="0px",$p.top="0px",$p.textAlign="left"}(this.container.style),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new F.MouseTracker({element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,keyDownHandler:F.delegate(this,lf),keyHandler:F.delegate(this,yf),clickHandler:F.delegate(this,cf),dblClickHandler:F.delegate(this,vf),dragHandler:F.delegate(this,_f),dragEndHandler:F.delegate(this,$f),enterHandler:F.delegate(this,wf),exitHandler:F.delegate(this,Pf),pressHandler:F.delegate(this,Cf),releaseHandler:F.delegate(this,Af),nonPrimaryPressHandler:F.delegate(this,Bf),nonPrimaryReleaseHandler:F.delegate(this,Hf),scrollHandler:F.delegate(this,Lf),pinchHandler:F.delegate(this,Df)}),this.outerTracker=new F.MouseTracker({element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:F.delegate(this,kf),exitHandler:F.delegate(this,Nf)}),this.toolbar&&(this.toolbar=new F.ControlDock({element:this.toolbar})),this.bindStandardControls(),W[this.hash].prevContainerSize=K(this.container),this.world=new F.World({viewer:this}),this.world.addHandler("add-item",function($p){cp.source=cp.world.getItemAt(0).source,W[cp.hash].forceRedraw=!0,cp._updateRequestId||(cp._updateRequestId=ot(cp,Yf))}),this.world.addHandler("remove-item",function($p){cp.world.getItemCount()?cp.source=cp.world.getItemAt(0).source:cp.source=null,W[cp.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function($p){cp.viewport&&cp.viewport._setContentBounds(cp.world.getHomeBounds(),cp.world.getContentFactor())}),this.world.addHandler("item-index-change",function($p){cp.source=cp.world.getItemAt(0).source}),this.viewport=new F.Viewport({containerSize:W[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new F.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:Of.timeout}),this.tileCache=new F.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new F.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=F.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(hp=this.buttons.buttons.indexOf(this.rotateLeft),this.buttons.buttons.splice(hp,1),this.buttons.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(hp=this.buttons.buttons.indexOf(this.rotateRight),this.buttons.buttons.splice(hp,1),this.buttons.element.removeChild(this.rotateRight.element))),this.showNavigator&&(this.navigator=new F.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),hp=0;hp-1&&Of.index=0&&Of=0)return this;var Vp=tt(this,$p);return this.currentOverlays.push(Vp),Vp.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:Of,location:$p.location,placement:$p.placement}),this},updateOverlay:function(Of,qf,cp){var hp;return Of=F.getElement(Of),hp=rt(this.currentOverlays,Of),hp>=0&&(this.currentOverlays[hp].update(qf,cp),W[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:Of,location:qf,placement:cp})),this},removeOverlay:function(Of){var qf;return Of=F.getElement(Of),qf=rt(this.currentOverlays,Of),qf>=0&&(this.currentOverlays[qf].destroy(),this.currentOverlays.splice(qf,1),W[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:Of})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return W[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(Of){var qf;return Of=F.getElement(Of),qf=rt(this.currentOverlays,Of),qf>=0?this.currentOverlays[qf]:null},_updateSequenceButtons:function(Of){this.nextButton&&(!this.tileSources||this.tileSources.length-1===Of?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(Of>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(Of){this._hideMessage();var qf=F.makeNeutralElement("div");qf.appendChild(document.createTextNode(Of)),this.messageDiv=F.makeCenteredNode(qf),F.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var Of=this.messageDiv;Of&&(Of.parentNode.removeChild(Of),delete this.messageDiv)},gestureSettingsByDeviceType:function(Of){switch(Of){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var Of,qf=this.currentOverlays.length;for(Of=0;Of1&&(this.referenceStrip=new F.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else F.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')}});function K(Of){return Of=F.getElement(Of),new F.Point(Of.clientWidth===0?1:Of.clientWidth,Of.clientHeight===0?1:Of.clientHeight)}function X(Of,qf,cp,hp,$p){var Vp=Of;if(F.type(qf)=="string"){if(qf.match(/^\s*<.*>\s*$/))qf=F.parseXml(qf);else if(qf.match(/^\s*[\{\[].*[\}\]]\s*$/))try{var bp=F.parseJSON(qf);qf=bp}catch{}}function Ep(_p,Mp){_p.ready?hp(_p):(_p.addHandler("ready",function(){hp(_p)}),_p.addHandler("open-failed",function(Yp){$p({message:Yp.message,source:Mp})}))}setTimeout(function(){if(F.type(qf)=="string")qf=new F.TileSource({url:qf,crossOriginPolicy:cp.crossOriginPolicy!==void 0?cp.crossOriginPolicy:Of.crossOriginPolicy,ajaxWithCredentials:Of.ajaxWithCredentials,ajaxHeaders:Of.ajaxHeaders,useCanvas:Of.useCanvas,success:function(ug){hp(ug.tileSource)}}),qf.addHandler("open-failed",function(ug){$p(ug)});else if(F.isPlainObject(qf)||qf.nodeType)if(qf.crossOriginPolicy===void 0&&(cp.crossOriginPolicy!==void 0||Of.crossOriginPolicy!==void 0)&&(qf.crossOriginPolicy=cp.crossOriginPolicy!==void 0?cp.crossOriginPolicy:Of.crossOriginPolicy),qf.ajaxWithCredentials===void 0&&(qf.ajaxWithCredentials=Of.ajaxWithCredentials),qf.useCanvas===void 0&&(qf.useCanvas=Of.useCanvas),F.isFunction(qf.getTileUrl)){var _p=new F.TileSource(qf);_p.getTileUrl=qf.getTileUrl,hp(_p)}else{var Mp=F.TileSource.determineType(Vp,qf);if(!Mp){$p({message:"Unable to load TileSource",source:qf});return}var Yp=Mp.prototype.configure.apply(Vp,[qf]);Ep(new Mp(Yp),qf)}else Ep(qf,qf)})}function tt(Of,qf){if(qf instanceof F.Overlay)return qf;var cp=null;if(qf.element)cp=F.getElement(qf.element);else{var hp=qf.id?qf.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);cp=F.getElement(qf.id),cp||(cp=document.createElement("a"),cp.href="#/overlay/"+hp),cp.id=hp,F.addClass(cp,qf.className?qf.className:"openseadragon-overlay")}var $p=qf.location,Vp=qf.width,bp=qf.height;if(!$p){var Ep=qf.x,_p=qf.y;if(qf.px!==void 0){var Mp=Of.viewport.imageToViewportRectangle(new F.Rect(qf.px,qf.py,Vp||0,bp||0));Ep=Mp.x,_p=Mp.y,Vp=Vp!==void 0?Mp.width:void 0,bp=bp!==void 0?Mp.height:void 0}$p=new F.Point(Ep,_p)}var Yp=qf.placement;return Yp&&F.type(Yp)==="string"&&(Yp=F.Placement[qf.placement.toUpperCase()]),new F.Overlay({element:cp,location:$p,placement:Yp,onDraw:qf.onDraw,checkResize:qf.checkResize,width:Vp,height:bp,rotationMode:qf.rotationMode})}function rt(Of,qf){var cp;for(cp=Of.length-1;cp>=0;cp--)if(Of[cp].element===qf)return cp;return-1}function ot(Of,qf){return F.requestAnimationFrame(function(){qf(Of)})}function ut(Of){F.requestAnimationFrame(function(){uo(Of)})}function yn(Of){Of.autoHideControls&&(Of.controlsShouldFade=!0,Of.controlsFadeBeginTime=F.now()+Of.controlsFadeDelay,window.setTimeout(function(){ut(Of)},Of.controlsFadeDelay))}function uo(Of){var qf,cp,hp,$p;if(Of.controlsShouldFade){for(qf=F.now(),cp=qf-Of.controlsFadeBeginTime,hp=1-cp/Of.controlsFadeLength,hp=Math.min(1,hp),hp=Math.max(0,hp),$p=Of.controls.length-1;$p>=0;$p--)Of.controls[$p].autoFade&&Of.controls[$p].setOpacity(hp);hp>0&&ut(Of)}}function po(Of){var qf;for(Of.controlsShouldFade=!1,qf=Of.controls.length-1;qf>=0;qf--)Of.controls[qf].setOpacity(1)}function mo(){po(this)}function wo(){yn(this)}function lf(Of){var qf={originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction,preventVerticalPan:Of.preventVerticalPan,preventHorizontalPan:Of.preventHorizontalPan};if(this.raiseEvent("canvas-key",qf),!qf.preventDefaultAction&&!Of.ctrl&&!Of.alt&&!Of.meta)switch(Of.keyCode){case 38:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 40:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 37:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;case 39:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;default:return!0}else return!0}function yf(Of){var qf={originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction,preventVerticalPan:Of.preventVerticalPan,preventHorizontalPan:Of.preventHorizontalPan};if(this.raiseEvent("canvas-key",qf),!qf.preventDefaultAction&&!Of.ctrl&&!Of.alt&&!Of.meta)switch(Of.keyCode){case 43:case 61:return this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),!1;case 45:return this.viewport.zoomBy(.9),this.viewport.applyConstraints(),!1;case 48:return this.viewport.goHome(),this.viewport.applyConstraints(),!1;case 119:case 87:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,-40))),this.viewport.applyConstraints()),!1;case 115:case 83:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,40))),this.viewport.applyConstraints()),!1;case 97:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(-40,0))),this.viewport.applyConstraints()),!1;case 100:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(40,0))),this.viewport.applyConstraints()),!1;case 114:return this.viewport.flipped?this.viewport.setRotation(F.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(F.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 82:return this.viewport.flipped?this.viewport.setRotation(F.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(F.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 102:return this.viewport.toggleFlip(),!1;default:return!0}else return!0}function cf(Of){var qf,cp=document.activeElement==this.canvas;cp||this.canvas.focus(),this.viewport.flipped&&(Of.position.x=this.viewport.getContainerSize().x-Of.position.x);var hp={tracker:Of.eventSource,position:Of.position,quick:Of.quick,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};this.raiseEvent("canvas-click",hp),!hp.preventDefaultAction&&this.viewport&&Of.quick&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.clickToZoom&&(this.viewport.zoomBy(Of.shift?1/this.zoomPerClick:this.zoomPerClick,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints()))}function vf(Of){var qf,cp={tracker:Of.eventSource,position:Of.position,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};this.raiseEvent("canvas-double-click",cp),!cp.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.dblClickToZoom&&(this.viewport.zoomBy(Of.shift?1/this.zoomPerClick:this.zoomPerClick,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints()))}function _f(Of){var qf,cp={tracker:Of.eventSource,position:Of.position,delta:Of.delta,speed:Of.speed,direction:Of.direction,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};if(this.raiseEvent("canvas-drag",cp),!cp.preventDefaultAction&&this.viewport){if(qf=this.gestureSettingsByDeviceType(Of.pointerType),this.panHorizontal||(Of.delta.x=0),this.panVertical||(Of.delta.y=0),this.viewport.flipped&&(Of.delta.x=-Of.delta.x),this.constrainDuringPan){var hp=this.viewport.deltaPointsFromPixels(Of.delta.negate());this.viewport.centerSpringX.target.value+=hp.x,this.viewport.centerSpringY.target.value+=hp.y;var $p=this.viewport.getBounds(),Vp=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=hp.x,this.viewport.centerSpringY.target.value-=hp.y,$p.x!=Vp.x&&(Of.delta.x=0),$p.y!=Vp.y&&(Of.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(Of.delta.negate()),qf.flickEnabled&&!this.constrainDuringPan)}}function $f(Of){if(!Of.preventDefaultAction&&this.viewport){var qf=this.gestureSettingsByDeviceType(Of.pointerType);if(qf.flickEnabled&&Of.speed>=qf.flickMinSpeed){var cp=0;this.panHorizontal&&(cp=qf.flickMomentum*Of.speed*Math.cos(Of.direction));var hp=0;this.panVertical&&(hp=qf.flickMomentum*Of.speed*Math.sin(Of.direction));var $p=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),Vp=this.viewport.pointFromPixel(new F.Point($p.x-cp,$p.y-hp));this.viewport.panTo(Vp,!1)}this.viewport.applyConstraints()}this.raiseEvent("canvas-drag-end",{tracker:Of.eventSource,position:Of.position,speed:Of.speed,direction:Of.direction,shift:Of.shift,originalEvent:Of.originalEvent})}function wf(Of){this.raiseEvent("canvas-enter",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Pf(Of){window.location!=window.parent.location&&F.MouseTracker.resetAllMouseTrackers(),this.raiseEvent("canvas-exit",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Cf(Of){this.raiseEvent("canvas-press",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,insideElementPressed:Of.insideElementPressed,insideElementReleased:Of.insideElementReleased,originalEvent:Of.originalEvent})}function Af(Of){this.raiseEvent("canvas-release",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,insideElementPressed:Of.insideElementPressed,insideElementReleased:Of.insideElementReleased,originalEvent:Of.originalEvent})}function Bf(Of){this.raiseEvent("canvas-nonprimary-press",{tracker:Of.eventSource,position:Of.position,pointerType:Of.pointerType,button:Of.button,buttons:Of.buttons,originalEvent:Of.originalEvent})}function Hf(Of){this.raiseEvent("canvas-nonprimary-release",{tracker:Of.eventSource,position:Of.position,pointerType:Of.pointerType,button:Of.button,buttons:Of.buttons,originalEvent:Of.originalEvent})}function Df(Of){var qf,cp,hp,$p;if(!Of.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.pinchToZoom&&(cp=this.viewport.pointFromPixel(Of.center,!0),hp=this.viewport.pointFromPixel(Of.lastCenter,!0),$p=hp.minus(cp),this.panHorizontal||($p.x=0),this.panVertical||($p.y=0),this.viewport.zoomBy(Of.distance/Of.lastDistance,cp,!0),qf.zoomToRefPoint&&this.viewport.panBy($p,!0),this.viewport.applyConstraints()),qf.pinchRotate)){var Vp=Math.atan2(Of.gesturePoints[0].currentPos.y-Of.gesturePoints[1].currentPos.y,Of.gesturePoints[0].currentPos.x-Of.gesturePoints[1].currentPos.x),bp=Math.atan2(Of.gesturePoints[0].lastPos.y-Of.gesturePoints[1].lastPos.y,Of.gesturePoints[0].lastPos.x-Of.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(Vp-bp)*(180/Math.PI))}return this.raiseEvent("canvas-pinch",{tracker:Of.eventSource,gesturePoints:Of.gesturePoints,lastCenter:Of.lastCenter,center:Of.center,lastDistance:Of.lastDistance,distance:Of.distance,shift:Of.shift,originalEvent:Of.originalEvent}),!1}function Lf(Of){var qf,cp,hp,$p;if(hp=F.now(),$p=hp-this._lastScrollTime,$p>this.minScrollDeltaTime){if(this._lastScrollTime=hp,this.viewport.flipped&&(Of.position.x=this.viewport.getContainerSize().x-Of.position.x),!Of.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.scrollToZoom&&(cp=Math.pow(this.zoomPerScroll,Of.scroll),this.viewport.zoomBy(cp,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints())),this.raiseEvent("canvas-scroll",{tracker:Of.eventSource,position:Of.position,scroll:Of.scroll,shift:Of.shift,originalEvent:Of.originalEvent}),qf&&qf.scrollToZoom)return!1}else if(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf&&qf.scrollToZoom)return!1}function kf(Of){W[this.hash].mouseInside=!0,po(this),this.raiseEvent("container-enter",{tracker:Of.eventSource,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Nf(Of){Of.pointers<1&&(W[this.hash].mouseInside=!1,W[this.hash].animating||yn(this)),this.raiseEvent("container-exit",{tracker:Of.eventSource,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Yf(Of){Gf(Of),Of.isOpen()?Of._updateRequestId=ot(Of,Yf):Of._updateRequestId=!1}function Gf(Of){if(!Of._opening){if(Of.autoResize){var qf=K(Of.container),cp=W[Of.hash].prevContainerSize;if(!qf.equals(cp)){var hp=Of.viewport;if(Of.preserveImageSizeOnResize){var $p=cp.x/qf.x,Vp=hp.getZoom()*$p,bp=hp.getCenter();hp.resize(qf,!1),hp.zoomTo(Vp,null,!0),hp.panTo(bp,!0)}else{var Ep=hp.getBounds();hp.resize(qf,!0),hp.fitBoundsWithConstraints(Ep,!0)}W[Of.hash].prevContainerSize=qf,W[Of.hash].forceRedraw=!0}}var _p=Of.viewport.update(),Mp=Of.world.update()||_p;_p&&Of.raiseEvent("viewport-change"),Of.referenceStrip&&(Mp=Of.referenceStrip.update(Of.viewport)||Mp),!W[Of.hash].animating&&Mp&&(Of.raiseEvent("animation-start"),po(Of)),(Mp||W[Of.hash].forceRedraw||Of.world.needsDraw())&&(rp(Of),Of._drawOverlays(),Of.navigator&&Of.navigator.update(Of.viewport),W[Of.hash].forceRedraw=!1,Mp&&Of.raiseEvent("animation")),W[Of.hash].animating&&!Mp&&(Of.raiseEvent("animation-finish"),W[Of.hash].mouseInside||yn(Of)),W[Of.hash].animating=Mp}}function rp(Of){Of.imageLoader.clear(),Of.drawer.clear(),Of.world.draw(),Of.raiseEvent("update-viewport",{})}function ip(Of,qf){return Of?Of+qf:qf}function ap(){W[this.hash].lastZoomTime=F.now(),W[this.hash].zoomFactor=this.zoomPerSecond,W[this.hash].zooming=!0,Np(this)}function yp(){W[this.hash].lastZoomTime=F.now(),W[this.hash].zoomFactor=1/this.zoomPerSecond,W[this.hash].zooming=!0,Np(this)}function vp(){W[this.hash].zooming=!1}function Np(Of){F.requestAnimationFrame(F.delegate(Of,jp))}function jp(){var Of,qf,cp;W[this.hash].zooming&&this.viewport&&(Of=F.now(),qf=Of-W[this.hash].lastZoomTime,cp=Math.pow(W[this.hash].zoomFactor,qf/1e3),this.viewport.zoomBy(cp),this.viewport.applyConstraints(),W[this.hash].lastZoomTime=Of,Np(this))}function Ip(){this.viewport&&(W[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function Jp(){this.viewport&&(W[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function ng(){this.buttons.emulateEnter(),this.buttons.emulateExit()}function og(){this.viewport&&this.viewport.goHome()}function vg(){this.isFullPage()&&!F.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttons&&this.buttons.emulateExit(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function Dp(){if(this.viewport){var Of=this.viewport.getRotation();this.viewport.flipped?Of=F.positiveModulo(Of+this.rotationIncrement,360):Of=F.positiveModulo(Of-this.rotationIncrement,360),this.viewport.setRotation(Of)}}function Lp(){if(this.viewport){var Of=this.viewport.getRotation();this.viewport.flipped?Of=F.positiveModulo(Of-this.rotationIncrement,360):Of=F.positiveModulo(Of+this.rotationIncrement,360),this.viewport.setRotation(Of)}}function xp(){this.viewport.toggleFlip()}function kp(){var Of=this._sequenceIndex-1;this.navPrevNextWrap&&Of<0&&(Of+=this.tileSources.length),this.goToPage(Of)}function lp(){var Of=this._sequenceIndex+1;this.navPrevNextWrap&&Of>=this.tileSources.length&&(Of=0),this.goToPage(Of)}}(OpenSeadragon),function(F){F.Navigator=function(ot){var ut=ot.viewer,yn=this,uo,po;ot.id?(this.element=document.getElementById(ot.id),ot.controlOptions={anchor:F.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(ot.id="navigator-"+F.now(),this.element=F.makeNeutralElement("div"),ot.controlOptions={anchor:F.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:ot.autoFade},ot.position&&(ot.position=="BOTTOM_RIGHT"?ot.controlOptions.anchor=F.ControlAnchor.BOTTOM_RIGHT:ot.position=="BOTTOM_LEFT"?ot.controlOptions.anchor=F.ControlAnchor.BOTTOM_LEFT:ot.position=="TOP_RIGHT"?ot.controlOptions.anchor=F.ControlAnchor.TOP_RIGHT:ot.position=="TOP_LEFT"?ot.controlOptions.anchor=F.ControlAnchor.TOP_LEFT:ot.position=="ABSOLUTE"&&(ot.controlOptions.anchor=F.ControlAnchor.ABSOLUTE,ot.controlOptions.top=ot.top,ot.controlOptions.left=ot.left,ot.controlOptions.height=ot.height,ot.controlOptions.width=ot.width))),this.element.id=ot.id,this.element.className+=" navigator",ot=F.extend(!0,{sizeRatio:F.DEFAULT_SETTINGS.navigatorSizeRatio},ot,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:ot.autoResize,minZoomImageRatio:1,background:ot.background,opacity:ot.opacity,borderColor:ot.borderColor,displayRegionColor:ot.displayRegionColor}),ot.minPixelRatio=this.minPixelRatio=ut.minPixelRatio,F.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new F.Point(1,1),this.totalBorderWidths=new F.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),ot.controlOptions.anchor!=F.ControlAnchor.NONE&&function(lf,yf){lf.margin="0px",lf.border=yf+"px solid "+ot.borderColor,lf.padding="0px",lf.background=ot.background,lf.opacity=ot.opacity,lf.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=F.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(lf,yf){lf.position="relative",lf.top="0px",lf.left="0px",lf.fontSize="0px",lf.overflow="hidden",lf.border=yf+"px solid "+ot.displayRegionColor,lf.margin="0px",lf.padding="0px",lf.background="transparent",lf.float="left",lf.cssFloat="left",lf.styleFloat="left",lf.zIndex=999999999,lf.cursor="default"}(this.displayRegion.style,this.borderWidth),this.displayRegionContainer=F.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",ut.addControl(this.element,ot.controlOptions),this._resizeWithViewer=ot.controlOptions.anchor!=F.ControlAnchor.ABSOLUTE&&ot.controlOptions.anchor!=F.ControlAnchor.NONE,ot.width&&ot.height?(this.setWidth(ot.width),this.setHeight(ot.height)):this._resizeWithViewer&&(uo=F.getElementSize(ut.element),this.element.style.height=Math.round(uo.y*ot.sizeRatio)+"px",this.element.style.width=Math.round(uo.x*ot.sizeRatio)+"px",this.oldViewerSize=uo,po=F.getElementSize(this.element),this.elementArea=po.x*po.y),this.oldContainerSize=new F.Point(0,0),F.Viewer.apply(this,[ot]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function mo(lf){tt(yn.displayRegionContainer,lf),tt(yn.displayRegion,-lf),yn.viewport.setRotation(lf)}if(ot.navigatorRotate){var wo=ot.viewer.viewport?ot.viewer.viewport.getRotation():ot.viewer.degrees||0;mo(wo),ot.viewer.addHandler("rotate",function(lf){mo(lf.degrees)})}this.innerTracker.destroy(),this.innerTracker=new F.MouseTracker({element:this.element,dragHandler:F.delegate(this,q),clickHandler:F.delegate(this,W),releaseHandler:F.delegate(this,K),scrollHandler:F.delegate(this,X)}),this.addHandler("reset-size",function(){yn.viewport&&yn.viewport.goHome(!0)}),ut.world.addHandler("item-index-change",function(lf){window.setTimeout(function(){var yf=yn.world.getItemAt(lf.previousIndex);yn.world.setItemIndex(yf,lf.newIndex)},1)}),ut.world.addHandler("remove-item",function(lf){var yf=lf.item,cf=yn._getMatchingItem(yf);cf&&yn.world.removeItem(cf)}),this.update(ut.viewport)},F.extend(F.Navigator.prototype,F.EventSource.prototype,F.Viewer.prototype,{updateSize:function(){if(this.viewport){var ot=new F.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);ot.equals(this.oldContainerSize)||(this.viewport.resize(ot,!0),this.viewport.goHome(!0),this.oldContainerSize=ot,this.drawer.clear(),this.world.draw())}},setWidth:function(ot){this.width=ot,this.element.style.width=typeof ot=="number"?ot+"px":ot,this._resizeWithViewer=!1},setHeight:function(ot){this.height=ot,this.element.style.height=typeof ot=="number"?ot+"px":ot,this._resizeWithViewer=!1},setFlip:function(ot){return this.viewport.setFlip(ot),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(ot){rt(this.displayRegion,ot),rt(this.canvas,ot),rt(this.element,ot)},update:function(ot){var ut,yn,uo,po,mo,wo;if(ut=F.getElementSize(this.viewer.element),this._resizeWithViewer&&ut.x&&ut.y&&!ut.equals(this.oldViewerSize)&&(this.oldViewerSize=ut,this.maintainSizeRatio||!this.elementArea?(yn=ut.x*this.sizeRatio,uo=ut.y*this.sizeRatio):(yn=Math.sqrt(this.elementArea*(ut.x/ut.y)),uo=this.elementArea/yn),this.element.style.width=Math.round(yn)+"px",this.element.style.height=Math.round(uo)+"px",this.elementArea||(this.elementArea=yn*uo),this.updateSize()),ot&&this.viewport){po=ot.getBoundsNoRotate(!0),mo=this.viewport.pixelFromPointNoRotate(po.getTopLeft(),!1),wo=this.viewport.pixelFromPointNoRotate(po.getBottomRight(),!1).minus(this.totalBorderWidths);var lf=this.displayRegion.style;lf.display=this.world.getItemCount()?"block":"none",lf.top=Math.round(mo.y)+"px",lf.left=Math.round(mo.x)+"px";var yf=Math.abs(mo.x-wo.x),cf=Math.abs(mo.y-wo.y);lf.width=Math.round(Math.max(yf,0))+"px",lf.height=Math.round(Math.max(cf,0))+"px"}},addTiledImage:function(ot){var ut=this,yn=ot.originalTiledImage;delete ot.original;var uo=F.extend({},ot,{success:function(po){var mo=po.item;mo._originalForNavigator=yn,ut._matchBounds(mo,yn,!0);function wo(){ut._matchBounds(mo,yn)}function lf(){ut._matchOpacity(mo,yn)}function yf(){ut._matchCompositeOperation(mo,yn)}yn.addHandler("bounds-change",wo),yn.addHandler("clip-change",wo),yn.addHandler("opacity-change",lf),yn.addHandler("composite-operation-change",yf)}});return F.Viewer.prototype.addTiledImage.apply(this,[uo])},_getMatchingItem:function(ot){for(var ut=this.world.getItemCount(),yn,uo=0;uo1||K.y>1));q++);return q-1},getTileAtPoint:function(q,K){var X=K.x>=0&&K.x<=1&&K.y>=0&&K.y<=1/this.aspectRatio;F.console.assert(X,"[TileSource.getTileAtPoint] must be called with a valid point.");var tt=this.dimensions.x*this.getLevelScale(q),rt=K.x*tt,ot=K.y*tt,ut=Math.floor(rt/this.getTileWidth(q)),yn=Math.floor(ot/this.getTileHeight(q));K.x>=1&&(ut=this.getNumTiles(q).x-1);var uo=1e-15;return K.y>=1/this.aspectRatio-uo&&(yn=this.getNumTiles(q).y-1),new F.Point(ut,yn)},getTileBounds:function(q,K,X,tt){var rt=this.dimensions.times(this.getLevelScale(q)),ot=this.getTileWidth(q),ut=this.getTileHeight(q),yn=K===0?0:ot*K-this.tileOverlap,uo=X===0?0:ut*X-this.tileOverlap,po=ot+(K===0?1:2)*this.tileOverlap,mo=ut+(X===0?1:2)*this.tileOverlap,wo=1/rt.x;return po=Math.min(po,rt.x-yn),mo=Math.min(mo,rt.y-uo),tt?new F.Rect(0,0,po,mo):new F.Rect(yn*wo,uo*wo,po*wo,mo*wo)},getImageInfo:function(q){var K=this,X,tt,rt,ot,ut,yn,uo;q&&(ut=q.split("/"),yn=ut[ut.length-1],uo=yn.lastIndexOf("."),uo>-1&&(ut[ut.length-1]=yn.slice(0,uo))),tt=function(po){typeof po=="string"&&(po=F.parseXml(po));var mo=F.TileSource.determineType(K,po,q);if(!mo){K.raiseEvent("open-failed",{message:"Unable to load TileSource",source:q});return}ot=mo.prototype.configure.apply(K,[po,q]),ot.ajaxWithCredentials===void 0&&(ot.ajaxWithCredentials=K.ajaxWithCredentials),rt=new mo(ot),K.ready=!0,K.raiseEvent("ready",{tileSource:rt})},q.match(/\.js$/)?(X=q.split("/").pop().replace(".js",""),F.jsonp({url:q,async:!1,callbackName:X,callback:tt})):F.makeAjaxRequest({url:q,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(po){var mo=W(po);tt(mo)},error:function(po,mo){var wo;try{wo="HTTP "+po.status+" attempting to load TileSource"}catch{var lf;typeof mo>"u"||!mo.toString?lf="Unknown error":lf=mo.toString(),wo=lf+" attempting to load TileSource"}K.raiseEvent("open-failed",{message:wo,source:q})}})},supports:function(q,K){return!1},configure:function(q,K){throw new Error("Method not implemented.")},getTileUrl:function(q,K,X){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(q,K,X){return{}},tileExists:function(q,K,X){var tt=this.getNumTiles(q);return q>=this.minLevel&&q<=this.maxLevel&&K>=0&&X>=0&&K=0;mo--)for(wo=this.displayRects[mo],lf=wo.minLevel;lf<=wo.maxLevel;lf++)this._levelRects[lf]||(this._levelRects[lf]=[]),this._levelRects[lf].push(wo);F.TileSource.apply(this,[yf])},F.extend(F.DziTileSource.prototype,F.TileSource.prototype,{supports:function(K,X){var tt;return K.Image?tt=K.Image.xmlns:K.documentElement&&(K.documentElement.localName=="Image"||K.documentElement.tagName=="Image")&&(tt=K.documentElement.namespaceURI),tt=(tt||"").toLowerCase(),tt.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||tt.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(K,X){var tt;return F.isPlainObject(K)?tt=q(this,K):tt=W(this,K),X&&!tt.tilesUrl&&(tt.tilesUrl=X.replace(/([^\/]+?)(\.(dzi|xml|js)?(\?[^\/]*)?)?\/?$/,"$1_files/"),X.search(/\.(dzi|xml|js)\?/)!=-1?tt.queryParams=X.match(/\?.*/):tt.queryParams=""),tt},getTileUrl:function(K,X,tt){return[this.tilesUrl,K,"/",X,"_",tt,".",this.fileFormat,this.queryParams].join("")},tileExists:function(K,X,tt){var rt=this._levelRects[K],ot,ut,yn,uo,po,mo,wo;if(this.minLevel&&Kthis.maxLevel)return!1;if(!rt||!rt.length)return!0;for(wo=rt.length-1;wo>=0;wo--)if(ot=rt[wo],!(Kot.maxLevel)&&(ut=this.getLevelScale(K),yn=ot.x*ut,uo=ot.y*ut,po=yn+ot.width*ut,mo=uo+ot.height*ut,yn=Math.floor(yn/this._tileWidth),uo=Math.floor(uo/this._tileWidth),po=Math.ceil(po/this._tileWidth),mo=Math.ceil(mo/this._tileWidth),yn<=X&&X0?tt.tileSize=Math.max.apply(null,po):tt.tileSize=yn}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,tt.levels=q(this),F.extend(!0,tt,{width:tt.levels[tt.levels.length-1].width,height:tt.levels[tt.levels.length-1].height,tileSize:Math.max(tt.height,tt.width),tileOverlap:0,minLevel:0,maxLevel:tt.levels.length-1}),this.levels=tt.levels):F.console.error("Nothing in the info.json to construct image pyramids from");if(!tt.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)tt.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));else{var wo=Math.max.apply(null,this.scale_factors);tt.maxLevel=Math.round(Math.log(wo)*Math.LOG2E)}F.TileSource.apply(this,[tt])},F.extend(F.IIIFTileSource.prototype,F.TileSource.prototype,{supports:function(tt,rt){return tt.protocol&&tt.protocol=="http://iiif.io/api/image"||tt["@context"]&&(tt["@context"]=="http://library.stanford.edu/iiif/image-api/1.1/context.json"||tt["@context"]=="http://iiif.io/api/image/1/context.json")||tt.profile&&tt.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||tt.identifier&&tt.width&&tt.height?!0:!!(tt.documentElement&&tt.documentElement.tagName=="info"&&tt.documentElement.namespaceURI=="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(tt,rt){if(F.isPlainObject(tt)){if(!tt["@context"])tt["@context"]="http://iiif.io/api/image/1.0/context.json",tt["@id"]=rt.replace("/info.json",""),tt.version=1;else{var ut=tt["@context"];if(Array.isArray(ut)){for(var yn=0;yn0&&tt>=this.minLevel&&tt<=this.maxLevel&&(rt=this.levels[tt].width/this.levels[this.maxLevel].width),rt}return F.TileSource.prototype.getLevelScale.call(this,tt)},getNumTiles:function(tt){if(this.emulateLegacyImagePyramid){var rt=this.getLevelScale(tt);return rt?new F.Point(1,1):new F.Point(0,0)}return F.TileSource.prototype.getNumTiles.call(this,tt)},getTileAtPoint:function(tt,rt){return this.emulateLegacyImagePyramid?new F.Point(0,0):F.TileSource.prototype.getTileAtPoint.call(this,tt,rt)},getTileUrl:function(tt,rt,ot){if(this.emulateLegacyImagePyramid){var ut=null;return this.levels.length>0&&tt>=this.minLevel&&tt<=this.maxLevel&&(ut=this.levels[tt].url),ut}var yn="0",uo=Math.pow(.5,this.maxLevel-tt),po=Math.ceil(this.width*uo),mo=Math.ceil(this.height*uo),wo,lf,yf,cf,vf,_f,$f,wf,Pf,Cf,Af,Bf,Hf,Df;return wo=this.getTileWidth(tt),lf=this.getTileHeight(tt),yf=Math.ceil(wo/uo),cf=Math.ceil(lf/uo),this.version===1?Hf="native."+this.tileFormat:Hf="default."+this.tileFormat,po1&&tt.profile[1].supports&&(yn=tt.profile[1].supports.indexOf("sizeByW")!==-1),tt.version===3&&tt.extraFeatures&&(yn=tt.extraFeatures.indexOf("sizeByWh")!==-1),!ut||yn}function q(tt){for(var rt=[],ot=0;otut?yn=ot/256:yn=ut/256,rt.maxLevel=Math.ceil(Math.log(yn)/Math.log(2))-1,rt.tileSize=256,rt.width=ot,rt.height=ut,F.TileSource.apply(this,[rt])},F.extend(F.TmsTileSource.prototype,F.TileSource.prototype,{supports:function(W,q){return W.type&&W.type=="tiledmapservice"},configure:function(W,q){return W},getTileUrl:function(W,q,K){var X=this.getNumTiles(W).y-1;return this.tilesUrl+W+"/"+q+"/"+(X-K)+".png"}})}(OpenSeadragon),function(F){F.ZoomifyTileSource=function(W){W.tileSize=256;var q={x:W.width,y:W.height};for(W.imageSizes=[{x:W.width,y:W.height}],W.gridSize=[this._getGridSize(W.width,W.height,W.tileSize)];parseInt(q.x,10)>W.tileSize||parseInt(q.y,10)>W.tileSize;)q.x=Math.floor(q.x/2),q.y=Math.floor(q.y/2),W.imageSizes.push({x:q.x,y:q.y}),W.gridSize.push(this._getGridSize(q.x,q.y,W.tileSize));W.imageSizes.reverse(),W.gridSize.reverse(),W.minLevel=0,W.maxLevel=W.gridSize.length-1,OpenSeadragon.TileSource.apply(this,[W])},F.extend(F.ZoomifyTileSource.prototype,F.TileSource.prototype,{_getGridSize:function(W,q,K){return{x:Math.ceil(W/K),y:Math.ceil(q/K)}},_calculateAbsoluteTileNumber:function(W,q,K){for(var X=0,tt={},rt=0;rt0?(rt=tt.levels[tt.levels.length-1].width,ot=tt.levels[tt.levels.length-1].height):(rt=0,ot=0,F.console.error("No supported image formats found")),F.extend(!0,tt,{width:rt,height:ot,tileSize:Math.max(ot,rt),tileOverlap:0,minLevel:0,maxLevel:tt.levels.length>0?tt.levels.length-1:0}),F.TileSource.apply(this,[tt]),this.levels=tt.levels},F.extend(F.LegacyTileSource.prototype,F.TileSource.prototype,{supports:function(X,tt){return X.type&&X.type=="legacy-image-pyramid"||X.documentElement&&X.documentElement.getAttribute("type")=="legacy-image-pyramid"},configure:function(X,tt){var rt;return F.isPlainObject(X)?rt=K(this,X):rt=q(this,X),rt},getLevelScale:function(X){var tt=NaN;return this.levels.length>0&&X>=this.minLevel&&X<=this.maxLevel&&(tt=this.levels[X].width/this.levels[this.maxLevel].width),tt},getNumTiles:function(X){var tt=this.getLevelScale(X);return tt?new F.Point(1,1):new F.Point(0,0)},getTileUrl:function(X,tt,rt){var ot=null;return this.levels.length>0&&X>=this.minLevel&&X<=this.maxLevel&&(ot=this.levels[X].url),ot}});function W(X){var tt=[],rt,ot;for(ot=0;ot");return tt.sort(function(ut,yn){return ut.height-yn.height})}function q(X,tt){if(!tt||!tt.documentElement)throw new Error(F.getString("Errors.Xml"));var rt=tt.documentElement,ot=rt.tagName,ut=null,yn=[],uo,po;if(ot=="image")try{for(ut={type:rt.getAttribute("type"),levels:[]},yn=rt.getElementsByTagName("level"),po=0;po=this.minLevel&&W<=this.maxLevel&&(q=this.levels[W].width/this.levels[this.maxLevel].width),q},getNumTiles:function(W){var q=this.getLevelScale(W);return q?new F.Point(1,1):new F.Point(0,0)},getTileUrl:function(W,q,K){var X=null;return W>=this.minLevel&&W<=this.maxLevel&&(X=this.levels[W].url),X},getContext2D:function(W,q,K){var X=null;return W>=this.minLevel&&W<=this.maxLevel&&(X=this.levels[W].context2D),X},_buildLevels:function(){var W=[{url:this._image.src,width:Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,height:Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height}];if(!this.buildPyramid||!F.supportsCanvas||!this.useCanvas)return delete this._image,W;var q=Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,K=Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height,X=document.createElement("canvas"),tt=X.getContext("2d");if(X.width=q,X.height=K,tt.drawImage(this._image,0,0,q,K),W[0].context2D=tt,delete this._image,F.isCanvasTainted(X))return W;for(;q>=2&&K>=2;){q=Math.floor(q/2),K=Math.floor(K/2);var rt=document.createElement("canvas"),ot=rt.getContext("2d");rt.width=q,rt.height=K,ot.drawImage(X,0,0,q,K),W.splice(0,0,{context2D:ot,width:q,height:K}),X=rt,tt=ot}return W}})}(OpenSeadragon),function(F){F.TileSourceCollection=function(W,q,K,X){F.console.error("TileSourceCollection is deprecated; use World instead")}}(OpenSeadragon),function(F){F.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},F.Button=function(ot){var ut=this;F.EventSource.call(this),F.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:F.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null},ot),this.element=ot.element||F.makeNeutralElement("div"),ot.element||(this.imgRest=F.makeTransparentImage(this.srcRest),this.imgGroup=F.makeTransparentImage(this.srcGroup),this.imgHover=F.makeTransparentImage(this.srcHover),this.imgDown=F.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,this.element.style.position="relative",F.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",F.Browser.vendor==F.BROWSERS.FIREFOX&&F.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=F.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new F.MouseTracker({element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(yn){yn.insideElementPressed?(tt(ut,F.ButtonState.DOWN),ut.raiseEvent("enter",{originalEvent:yn.originalEvent})):yn.buttonDownAny||tt(ut,F.ButtonState.HOVER)},focusHandler:function(yn){this.enterHandler(yn),ut.raiseEvent("focus",{originalEvent:yn.originalEvent})},exitHandler:function(yn){rt(ut,F.ButtonState.GROUP),yn.insideElementPressed&&ut.raiseEvent("exit",{originalEvent:yn.originalEvent})},blurHandler:function(yn){this.exitHandler(yn),ut.raiseEvent("blur",{originalEvent:yn.originalEvent})},pressHandler:function(yn){tt(ut,F.ButtonState.DOWN),ut.raiseEvent("press",{originalEvent:yn.originalEvent})},releaseHandler:function(yn){yn.insideElementPressed&&yn.insideElementReleased?(rt(ut,F.ButtonState.HOVER),ut.raiseEvent("release",{originalEvent:yn.originalEvent})):yn.insideElementPressed?rt(ut,F.ButtonState.GROUP):tt(ut,F.ButtonState.HOVER)},clickHandler:function(yn){yn.quick&&ut.raiseEvent("click",{originalEvent:yn.originalEvent})},keyHandler:function(yn){return yn.keyCode===13?(ut.raiseEvent("click",{originalEvent:yn.originalEvent}),ut.raiseEvent("release",{originalEvent:yn.originalEvent}),!1):!0}}),rt(this,F.ButtonState.REST)},F.extend(F.Button.prototype,F.EventSource.prototype,{notifyGroupEnter:function(){tt(this,F.ButtonState.GROUP)},notifyGroupExit:function(){rt(this,F.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,F.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,F.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()}});function W(ot){F.requestAnimationFrame(function(){q(ot)})}function q(ot){var ut,yn,uo;ot.shouldFade&&(ut=F.now(),yn=ut-ot.fadeBeginTime,uo=1-yn/ot.fadeLength,uo=Math.min(1,uo),uo=Math.max(0,uo),ot.imgGroup&&F.setElementOpacity(ot.imgGroup,uo,!0),uo>0&&W(ot))}function K(ot){ot.shouldFade=!0,ot.fadeBeginTime=F.now()+ot.fadeDelay,window.setTimeout(function(){W(ot)},ot.fadeDelay)}function X(ot){ot.shouldFade=!1,ot.imgGroup&&F.setElementOpacity(ot.imgGroup,1,!0)}function tt(ot,ut){ot.element.disabled||(ut>=F.ButtonState.GROUP&&ot.currentState==F.ButtonState.REST&&(X(ot),ot.currentState=F.ButtonState.GROUP),ut>=F.ButtonState.HOVER&&ot.currentState==F.ButtonState.GROUP&&(ot.imgHover&&(ot.imgHover.style.visibility=""),ot.currentState=F.ButtonState.HOVER),ut>=F.ButtonState.DOWN&&ot.currentState==F.ButtonState.HOVER&&(ot.imgDown&&(ot.imgDown.style.visibility=""),ot.currentState=F.ButtonState.DOWN))}function rt(ot,ut){ot.element.disabled||(ut<=F.ButtonState.HOVER&&ot.currentState==F.ButtonState.DOWN&&(ot.imgDown&&(ot.imgDown.style.visibility="hidden"),ot.currentState=F.ButtonState.HOVER),ut<=F.ButtonState.GROUP&&ot.currentState==F.ButtonState.HOVER&&(ot.imgHover&&(ot.imgHover.style.visibility="hidden"),ot.currentState=F.ButtonState.GROUP),ut<=F.ButtonState.REST&&ot.currentState==F.ButtonState.GROUP&&(K(ot),ot.currentState=F.ButtonState.REST))}}(OpenSeadragon),function(F){F.ButtonGroup=function(W){F.extend(!0,this,{buttons:[],clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:F.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},W);var q=this.buttons.concat([]),K=this,X;if(this.element=W.element||F.makeNeutralElement("div"),!W.group)for(this.element.style.display="inline-block",X=0;X=270?(rt=this.getTopRight(),this.x=rt.x,this.y=rt.y,ot=this.height,this.height=this.width,this.width=ot,this.degrees-=270):this.degrees>=180?(rt=this.getBottomRight(),this.x=rt.x,this.y=rt.y,this.degrees-=180):this.degrees>=90&&(rt=this.getBottomLeft(),this.x=rt.x,this.y=rt.y,ot=this.height,this.height=this.width,this.width=ot,this.degrees-=90)},F.Rect.fromSummits=function(W,q,K){var X=W.distanceTo(q),tt=W.distanceTo(K),rt=q.minus(W),ot=Math.atan(rt.y/rt.x);return rt.x<0?ot+=Math.PI:rt.y<0&&(ot+=2*Math.PI),new F.Rect(W.x,W.y,X,tt,ot/Math.PI*180)},F.Rect.prototype={clone:function(){return new F.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new F.Point(this.x,this.y)},getBottomRight:function(){return new F.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new F.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new F.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new F.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new F.Point(this.width,this.height)},equals:function(W){return W instanceof F.Rect&&this.x===W.x&&this.y===W.y&&this.width===W.width&&this.height===W.height&&this.degrees===W.degrees},times:function(W){return new F.Rect(this.x*W,this.y*W,this.width*W,this.height*W,this.degrees)},translate:function(W){return new F.Rect(this.x+W.x,this.y+W.y,this.width,this.height,this.degrees)},union:function(W){var q=this.getBoundingBox(),K=W.getBoundingBox(),X=Math.min(q.x,K.x),tt=Math.min(q.y,K.y),rt=Math.max(q.x+q.width,K.x+K.width),ot=Math.max(q.y+q.height,K.y+K.height);return new F.Rect(X,tt,rt-X,ot-tt)},intersection:function(W){var q=1e-10,K=[],X=this.getTopLeft();W.containsPoint(X,q)&&K.push(X);var tt=this.getTopRight();W.containsPoint(tt,q)&&K.push(tt);var rt=this.getBottomLeft();W.containsPoint(rt,q)&&K.push(rt);var ot=this.getBottomRight();W.containsPoint(ot,q)&&K.push(ot);var ut=W.getTopLeft();this.containsPoint(ut,q)&&K.push(ut);var yn=W.getTopRight();this.containsPoint(yn,q)&&K.push(yn);var uo=W.getBottomLeft();this.containsPoint(uo,q)&&K.push(uo);var po=W.getBottomRight();this.containsPoint(po,q)&&K.push(po);for(var mo=this._getSegments(),wo=W._getSegments(),lf=0;lfPf&&(Pf=Hf.x),Hf.yAf&&(Af=Hf.y)}return new F.Rect(wf,Cf,Pf-wf,Af-Cf)},_getSegments:function(){var W=this.getTopLeft(),q=this.getTopRight(),K=this.getBottomLeft(),X=this.getBottomRight();return[[W,q],[q,X],[X,K],[K,W]]},rotate:function(W,q){if(W=F.positiveModulo(W,360),W===0)return this.clone();q=q||this.getCenter();var K=this.getTopLeft().rotate(W,q),X=this.getTopRight().rotate(W,q),tt=X.minus(K);tt=tt.apply(function(ot){var ut=1e-15;return Math.abs(ot)=-q&&(W.x-X.x)*rt.x+(W.y-X.y)*rt.y<=q&&(W.x-K.x)*ot.x+(W.y-K.y)*ot.y>=-q&&(W.x-tt.x)*ot.x+(W.y-tt.y)*ot.y<=q},toString:function(){return"["+Math.round(this.x*100)/100+", "+Math.round(this.y*100)/100+", "+Math.round(this.width*100)/100+"x"+Math.round(this.height*100)/100+", "+Math.round(this.degrees*100)/100+"deg]"}}}(OpenSeadragon),function(F){var W={};F.ReferenceStrip=function(yn){var uo=this,po=yn.viewer,mo=F.getElementSize(po.element),wo,lf,yf;for(yn.id||(yn.id="referencestrip-"+F.now(),this.element=F.makeNeutralElement("div"),this.element.id=yn.id,this.element.className="referencestrip"),yn=F.extend(!0,{sizeRatio:F.DEFAULT_SETTINGS.referenceStripSizeRatio,position:F.DEFAULT_SETTINGS.referenceStripPosition,scroll:F.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold},yn,{element:this.element,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1}),F.extend(this,yn),W[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,lf=this.element.style,lf.marginTop="0px",lf.marginRight="0px",lf.marginBottom="0px",lf.marginLeft="0px",lf.left="0px",lf.bottom="0px",lf.border="0px",lf.background="#000",lf.position="relative",F.setElementTouchActionNone(this.element),F.setElementOpacity(this.element,.8),this.viewer=po,this.innerTracker=new F.MouseTracker({element:this.element,dragHandler:F.delegate(this,q),scrollHandler:F.delegate(this,K),enterHandler:F.delegate(this,tt),exitHandler:F.delegate(this,rt),keyDownHandler:F.delegate(this,ot),keyHandler:F.delegate(this,ut)}),yn.width&&yn.height?(this.element.style.width=yn.width+"px",this.element.style.height=yn.height+"px",po.addControl(this.element,{anchor:F.ControlAnchor.BOTTOM_LEFT})):yn.scroll=="horizontal"?(this.element.style.width=mo.x*yn.sizeRatio*po.tileSources.length+12*po.tileSources.length+"px",this.element.style.height=mo.y*yn.sizeRatio+"px",po.addControl(this.element,{anchor:F.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=mo.y*yn.sizeRatio*po.tileSources.length+12*po.tileSources.length+"px",this.element.style.width=mo.x*yn.sizeRatio+"px",po.addControl(this.element,{anchor:F.ControlAnchor.TOP_LEFT})),this.panelWidth=mo.x*this.sizeRatio+8,this.panelHeight=mo.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},yf=0;yflf+po.x-this.panelWidth?(cf=Math.min(cf,mo-po.x),this.element.style.marginLeft=-cf+"px",X(this,po.x,-cf)):cfyf+po.y-this.panelHeight?(cf=Math.min(cf,wo-po.y),this.element.style.marginTop=-cf+"px",X(this,po.y,-cf)):cf0?uo>-(mo-lf.x)&&(this.element.style.marginLeft=uo+yn.delta.x*2+"px",X(this,lf.x,uo+yn.delta.x*2)):-yn.delta.x<0&&uo<0&&(this.element.style.marginLeft=uo+yn.delta.x*2+"px",X(this,lf.x,uo+yn.delta.x*2)):-yn.delta.y>0?po>-(wo-lf.y)&&(this.element.style.marginTop=po+yn.delta.y*2+"px",X(this,lf.y,po+yn.delta.y*2)):-yn.delta.y<0&&po<0&&(this.element.style.marginTop=po+yn.delta.y*2+"px",X(this,lf.y,po+yn.delta.y*2))),!1}function K(yn){var uo=Number(this.element.style.marginLeft.replace("px","")),po=Number(this.element.style.marginTop.replace("px","")),mo=Number(this.element.style.width.replace("px","")),wo=Number(this.element.style.height.replace("px","")),lf=F.getElementSize(this.viewer.canvas);return this.element&&(this.scroll=="horizontal"?yn.scroll>0?uo>-(mo-lf.x)&&(this.element.style.marginLeft=uo-yn.scroll*60+"px",X(this,lf.x,uo-yn.scroll*60)):yn.scroll<0&&uo<0&&(this.element.style.marginLeft=uo-yn.scroll*60+"px",X(this,lf.x,uo-yn.scroll*60)):yn.scroll<0?po>lf.y-wo&&(this.element.style.marginTop=po+yn.scroll*60+"px",X(this,lf.y,po+yn.scroll*60)):yn.scroll>0&&po<0&&(this.element.style.marginTop=po+yn.scroll*60+"px",X(this,lf.y,po+yn.scroll*60))),!1}function X(yn,uo,po){var mo,wo,lf,yf,cf,vf,_f;for(yn.scroll=="horizontal"?mo=yn.panelWidth:mo=yn.panelHeight,wo=Math.ceil(uo/mo)+5,lf=Math.ceil((Math.abs(po)+uo)/mo)+1,wo=lf-wo,wo=wo<0?0:wo,vf=wo;vf1?K[1].springStiffness:5,animationTime:K.length>1?K[1].animationTime:1.5}),F.console.assert(typeof q.springStiffness=="number"&&q.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),F.console.assert(typeof q.animationTime=="number"&&q.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),q.exponential&&(this._exponential=!0,delete q.exponential),F.extend(!0,this,q),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:F.now()},F.console.assert(!this._exponential||this.current.value!==0,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},F.Spring.prototype={resetTo:function(q){F.console.assert(!this._exponential||q!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=q,this.start.time=this.target.time=this.current.time=F.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(q){F.console.assert(!this._exponential||q!==0,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=q,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(q){this.start.value+=q,this.target.value+=q,this._exponential&&(F.console.assert(this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(q){this._exponential=q,this._exponential&&(F.console.assert(this.current.value!==0&&this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){this.current.time=F.now();var q,K;this._exponential?(q=this.start._logValue,K=this.target._logValue):(q=this.start.value,K=this.target.value);var X=this.current.time>=this.target.time?K:q+(K-q)*W(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),tt=this.current.value;return this._exponential?this.current.value=Math.exp(X):this.current.value=X,tt!=this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function W(q,K){return(1-Math.exp(q*-K))/(1-Math.exp(-q))}}(OpenSeadragon),function(F){function W(K){F.extend(!0,this,{timeout:F.DEFAULT_SETTINGS.timeout,jobId:null},K),this.image=null}W.prototype={errorMsg:null,start:function(){var K=this,X=this.abort;this.image=new Image,this.image.onload=function(){K.finish(!0)},this.image.onabort=this.image.onerror=function(){K.errorMsg="Image load aborted",K.finish(!1)},this.jobId=window.setTimeout(function(){K.errorMsg="Image load exceeded timeout ("+K.timeout+" ms)",K.finish(!1)},this.timeout),this.loadWithAjax?(this.request=F.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(tt){var rt;try{rt=new window.Blob([tt.response])}catch(uo){var ot=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(uo.name==="TypeError"&&ot){var ut=new ot;ut.append(tt.response),rt=ut.getBlob()}}rt.size===0&&(K.errorMsg="Empty image response.",K.finish(!1));var yn=(window.URL||window.webkitURL).createObjectURL(rt);K.image.src=yn},error:function(tt){K.errorMsg="Image load aborted - XHR error",K.finish(!1)}}),this.abort=function(){K.request.abort(),typeof X=="function"&&X()}):(this.crossOriginPolicy!==!1&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(K){this.image.onload=this.image.onerror=this.image.onabort=null,K||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},F.ImageLoader=function(K){F.extend(!0,this,{jobLimit:F.DEFAULT_SETTINGS.imageLoaderLimit,timeout:F.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},K)},F.ImageLoader.prototype={addJob:function(K){var X=this,tt=function(ut){q(X,ut,K.callback)},rt={src:K.src,loadWithAjax:K.loadWithAjax,ajaxHeaders:K.loadWithAjax?K.ajaxHeaders:null,crossOriginPolicy:K.crossOriginPolicy,ajaxWithCredentials:K.ajaxWithCredentials,callback:tt,abort:K.abort,timeout:this.timeout},ot=new W(rt);!this.jobLimit||this.jobsInProgress0&&(rt=K.jobQueue.shift(),rt.start(),K.jobsInProgress++),tt(X.image,X.errorMsg,X.request)}}(OpenSeadragon),function(F){F.Tile=function(W,q,K,X,tt,rt,ot,ut,yn,uo){this.level=W,this.x=q,this.y=K,this.bounds=X,this.sourceBounds=uo,this.exists=tt,this.url=rt,this.context2D=ot,this.loadWithAjax=ut,this.ajaxHeaders=yn,this.ajaxHeaders?this.cacheKey=this.url+"+"+JSON.stringify(this.ajaxHeaders):this.cacheKey=this.url,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.image=null,this.style=null,this.position=null,this.size=null,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},F.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return!!this.context2D||this.url.match(".png")},drawHTML:function(W){if(!this.cacheImageRecord){F.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString());return}if(!this.loaded){F.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}this.element||(this.element=F.makeNeutralElement("div"),this.imgElement=this.cacheImageRecord.getImage().cloneNode(),this.imgElement.style.msInterpolationMode="nearest-neighbor",this.imgElement.style.width="100%",this.imgElement.style.height="100%",this.style=this.element.style,this.style.position="absolute"),this.element.parentNode!=W&&W.appendChild(this.element),this.imgElement.parentNode!=this.element&&this.element.appendChild(this.imgElement),this.style.top=this.position.y+"px",this.style.left=this.position.x+"px",this.style.height=this.size.y+"px",this.style.width=this.size.x+"px",F.setElementOpacity(this.element,this.opacity)},drawCanvas:function(W,q,K,X){var tt=this.position.times(F.pixelDensityRatio),rt=this.size.times(F.pixelDensityRatio),ot;if(!this.context2D&&!this.cacheImageRecord){F.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString());return}if(ot=this.context2D||this.cacheImageRecord.getRenderedContext(),!this.loaded||!ot){F.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}W.save(),W.globalAlpha=this.opacity,typeof K=="number"&&K!==1&&(tt=tt.times(K),rt=rt.times(K)),X instanceof F.Point&&(tt=tt.plus(X)),W.globalAlpha===1&&this._hasTransparencyChannel()&&W.clearRect(tt.x,tt.y,rt.x,rt.y),q({context:W,tile:this,rendered:ot});var ut,yn;this.sourceBounds?(ut=Math.min(this.sourceBounds.width,ot.canvas.width),yn=Math.min(this.sourceBounds.height,ot.canvas.height)):(ut=ot.canvas.width,yn=ot.canvas.height),W.drawImage(ot.canvas,0,0,ut,yn,tt.x,tt.y,rt.x,rt.y),W.restore()},getScaleForEdgeSmoothing:function(){var W;if(this.cacheImageRecord)W=this.cacheImageRecord.getRenderedContext();else if(this.context2D)W=this.context2D;else return F.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return W.canvas.width/(this.size.x*F.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(W,q,K){var X=Math.max(1,Math.ceil((K.x-q.x)/2)),tt=Math.max(1,Math.ceil((K.y-q.y)/2));return new F.Point(X,tt).minus(this.position.times(F.pixelDensityRatio).times(W||1).apply(function(rt){return rt%1}))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}}(OpenSeadragon),function(F){F.OverlayPlacement=F.Placement,F.OverlayRotationMode=F.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),F.Overlay=function(W,q,K){var X;F.isPlainObject(W)?X=W:X={element:W,location:q,placement:K},this.element=X.element,this.style=X.element.style,this._init(X)},F.Overlay.prototype={_init:function(W){this.location=W.location,this.placement=W.placement===void 0?F.Placement.TOP_LEFT:W.placement,this.onDraw=W.onDraw,this.checkResize=W.checkResize===void 0?!0:W.checkResize,this.width=W.width===void 0?null:W.width,this.height=W.height===void 0?null:W.height,this.rotationMode=W.rotationMode||F.OverlayRotationMode.EXACT,this.location instanceof F.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=F.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new F.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(W,q){var K=F.Placement.properties[this.placement];K&&(K.isHorizontallyCentered?W.x-=q.x/2:K.isRight&&(W.x-=q.x),K.isVerticallyCentered?W.y-=q.y/2:K.isBottom&&(W.y-=q.y))},destroy:function(){var W=this.element,q=this.style;W.parentNode&&(W.parentNode.removeChild(W),W.prevElementParent&&(q.display="none",document.body.appendChild(W))),this.onDraw=null,q.top="",q.left="",q.position="",this.width!==null&&(q.width=""),this.height!==null&&(q.height="");var K=F.getCssPropertyWithVendorPrefix("transformOrigin"),X=F.getCssPropertyWithVendorPrefix("transform");K&&X&&(q[K]="",q[X]="")},drawHTML:function(W,q){var K=this.element;K.parentNode!==W&&(K.prevElementParent=K.parentNode,K.prevNextSibling=K.nextSibling,W.appendChild(K),this.style.position="absolute",this.size=F.getElementSize(K));var X=this._getOverlayPositionAndSize(q),tt=X.position,rt=this.size=X.size,ot=X.rotate;if(this.onDraw)this.onDraw(tt,rt,this.element);else{var ut=this.style;ut.left=tt.x+"px",ut.top=tt.y+"px",this.width!==null&&(ut.width=rt.x+"px"),this.height!==null&&(ut.height=rt.y+"px");var yn=F.getCssPropertyWithVendorPrefix("transformOrigin"),uo=F.getCssPropertyWithVendorPrefix("transform");yn&&uo&&(ot?(ut[yn]=this._getTransformOrigin(),ut[uo]="rotate("+ot+"deg)"):(ut[yn]="",ut[uo]="")),ut.display!=="none"&&(ut.display="block")}},_getOverlayPositionAndSize:function(W){var q=W.pixelFromPoint(this.location,!0),K=this._getSizeInPixels(W);this.adjust(q,K);var X=0;if(W.degrees&&this.rotationMode!==F.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===F.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var tt=new F.Rect(q.x,q.y,K.x,K.y),rt=this._getBoundingBox(tt,W.degrees);q=rt.getTopLeft(),K=rt.getSize()}else X=W.degrees;return{position:q,size:K,rotate:X}},_getSizeInPixels:function(W){var q=this.size.x,K=this.size.y;if(this.width!==null||this.height!==null){var X=W.deltaPixelsFromPointsNoRotate(new F.Point(this.width||0,this.height||0),!0);this.width!==null&&(q=X.x),this.height!==null&&(K=X.y)}if(this.checkResize&&(this.width===null||this.height===null)){var tt=this.size=F.getElementSize(this.element);this.width===null&&(q=tt.x),this.height===null&&(K=tt.y)}return new F.Point(q,K)},_getBoundingBox:function(W,q){var K=this._getPlacementPoint(W);return W.rotate(q,K).getBoundingBox()},_getPlacementPoint:function(W){var q=new F.Point(W.x,W.y),K=F.Placement.properties[this.placement];return K&&(K.isHorizontallyCentered?q.x+=W.width/2:K.isRight&&(q.x+=W.width),K.isVerticallyCentered?q.y+=W.height/2:K.isBottom&&(q.y+=W.height)),q},_getTransformOrigin:function(){var W="",q=F.Placement.properties[this.placement];return q&&(q.isLeft?W="left":q.isRight&&(W="right"),q.isTop?W+=" top":q.isBottom&&(W+=" bottom")),W},update:function(W,q){var K=F.isPlainObject(W)?W:{location:W,placement:q};this._init({location:K.location||this.location,placement:K.placement!==void 0?K.placement:this.placement,onDraw:K.onDraw||this.onDraw,checkResize:K.checkResize||this.checkResize,width:K.width!==void 0?K.width:this.width,height:K.height!==void 0?K.height:this.height,rotationMode:K.rotationMode||this.rotationMode})},getBounds:function(W){F.console.assert(W,"A viewport must now be passed to Overlay.getBounds.");var q=this.width,K=this.height;if(q===null||K===null){var X=W.deltaPointsFromPixelsNoRotate(this.size,!0);q===null&&(q=X.x),K===null&&(K=X.y)}var tt=this.location.clone();return this.adjust(tt,new F.Point(q,K)),this._adjustBoundsForRotation(W,new F.Rect(tt.x,tt.y,q,K))},_adjustBoundsForRotation:function(W,q){if(!W||W.degrees===0||this.rotationMode===F.OverlayRotationMode.EXACT)return q;if(this.rotationMode===F.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return q;var K=this._getOverlayPositionAndSize(W);return W.viewerElementToViewportRectangle(new F.Rect(K.position.x,K.position.y,K.size.x,K.size.y))}return q.rotate(-W.degrees,this._getPlacementPoint(q))}}}(OpenSeadragon),function(F){F.Drawer=function(W){F.console.assert(W.viewer,"[Drawer] options.viewer is required");var q=arguments;if(F.isPlainObject(W)||(W={source:q[0],viewport:q[1],element:q[2]}),F.console.assert(W.viewport,"[Drawer] options.viewport is required"),F.console.assert(W.element,"[Drawer] options.element is required"),W.source&&F.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=W.viewer,this.viewport=W.viewport,this.debugGridColor=typeof W.debugGridColor=="string"?[W.debugGridColor]:W.debugGridColor||F.DEFAULT_SETTINGS.debugGridColor,W.opacity&&F.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=F.supportsCanvas&&(this.viewer?this.viewer.useCanvas:!0),this.container=F.getElement(W.element),this.canvas=F.makeNeutralElement(this.useCanvas?"canvas":"div"),this.context=this.useCanvas?this.canvas.getContext("2d"):null,this.sketchCanvas=null,this.sketchContext=null,this.element=this.container,this.container.dir="ltr",this.useCanvas){var K=this._calculateCanvasSize();this.canvas.width=K.x,this.canvas.height=K.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",F.setElementOpacity(this.canvas,this.opacity,!0),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},F.Drawer.prototype={addOverlay:function(W,q,K,X){return F.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(W,q,K,X),this},updateOverlay:function(W,q,K){return F.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(W,q,K),this},removeOverlay:function(W){return F.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(W),this},clearOverlays:function(){return F.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(W){var q=this.viewport.pixelFromPointNoRotate(W,!0);return new F.Point(q.x*F.pixelDensityRatio,q.y*F.pixelDensityRatio)},clipWithPolygons:function(W,q){if(this.useCanvas){var K=this._getContext(q);K.beginPath(),W.forEach(function(X){X.forEach(function(tt,rt){K[rt===0?"moveTo":"lineTo"](tt.x,tt.y)})}),K.clip()}},setOpacity:function(W){F.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var q=this.viewer.world,K=0;Kq&&(q=X)}return q},needsUpdate:function(){return F.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return F.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return F.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return F.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var W=this._calculateCanvasSize();if((this.canvas.width!=W.x||this.canvas.height!=W.y)&&(this.canvas.width=W.x,this.canvas.height=W.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var q=this._calculateSketchCanvasSize();this.sketchCanvas.width=q.x,this.sketchCanvas.height=q.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(W,q){if(this.useCanvas){var K=this._getContext(W);if(q)K.clearRect(q.x,q.y,q.width,q.height);else{var X=K.canvas;K.clearRect(0,0,X.width,X.height)}}},viewportToDrawerRectangle:function(W){var q=this.viewport.pixelFromPointNoRotate(W.getTopLeft(),!0),K=this.viewport.deltaPixelsFromPointsNoRotate(W.getSize(),!0);return new F.Rect(q.x*F.pixelDensityRatio,q.y*F.pixelDensityRatio,K.x*F.pixelDensityRatio,K.y*F.pixelDensityRatio)},drawTile:function(W,q,K,X,tt){if(F.console.assert(W,"[Drawer.drawTile] tile is required"),F.console.assert(q,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var rt=this._getContext(K);X=X||1,W.drawCanvas(rt,q,X,tt)}else W.drawHTML(this.canvas)},_getContext:function(W){var q=this.context;if(W){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var K=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=K.x,this.sketchCanvas.height=K.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var X=this;this.viewer.addHandler("rotate",function tt(){if(X.viewport.getRotation()!==0){X.viewer.removeHandler("rotate",tt);var rt=X._calculateSketchCanvasSize();X.sketchCanvas.width=rt.x,X.sketchCanvas.height=rt.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}q=this.sketchContext}return q},saveContext:function(W){this.useCanvas&&this._getContext(W).save()},restoreContext:function(W){this.useCanvas&&this._getContext(W).restore()},setClip:function(W,q){if(this.useCanvas){var K=this._getContext(q);K.beginPath(),K.rect(W.x,W.y,W.width,W.height),K.clip()}},drawRectangle:function(W,q,K){if(this.useCanvas){var X=this._getContext(K);X.save(),X.fillStyle=q,X.fillRect(W.x,W.y,W.width,W.height),X.restore()}},blendSketch:function(W,q,K,X){var tt=W;if(F.isPlainObject(tt)||(tt={opacity:W,scale:q,translate:K,compositeOperation:X}),!(!this.useCanvas||!this.sketchCanvas)){W=tt.opacity,X=tt.compositeOperation;var rt=tt.bounds;if(this.context.save(),this.context.globalAlpha=W,X&&(this.context.globalCompositeOperation=X),rt)rt.x<0&&(rt.width+=rt.x,rt.x=0),rt.x+rt.width>this.canvas.width&&(rt.width=this.canvas.width-rt.x),rt.y<0&&(rt.height+=rt.y,rt.y=0),rt.y+rt.height>this.canvas.height&&(rt.height=this.canvas.height-rt.y),this.context.drawImage(this.sketchCanvas,rt.x,rt.y,rt.width,rt.height,rt.x,rt.y,rt.width,rt.height);else{q=tt.scale||1,K=tt.translate;var ot=K instanceof F.Point?K:new F.Point(0,0),ut=0,yn=0;if(K){var uo=this.sketchCanvas.width-this.canvas.width,po=this.sketchCanvas.height-this.canvas.height;ut=Math.round(uo/2),yn=Math.round(po/2)}this.context.drawImage(this.sketchCanvas,ot.x-ut*q,ot.y-yn*q,(this.canvas.width+2*ut)*q,(this.canvas.height+2*yn)*q,-ut,-yn,this.canvas.width+2*ut,this.canvas.height+2*yn)}this.context.restore()}},drawDebugInfo:function(W,q,K,X){if(this.useCanvas){var tt=this.viewer.world.getIndexOfItem(X)%this.debugGridColor.length,rt=this.context;rt.save(),rt.lineWidth=2*F.pixelDensityRatio,rt.font="small-caps bold "+13*F.pixelDensityRatio+"px arial",rt.strokeStyle=this.debugGridColor[tt],rt.fillStyle=this.debugGridColor[tt],this.viewport.degrees!==0&&this._offsetForRotation({degrees:this.viewport.degrees}),X.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:X.getRotation(!0),point:X.viewport.pixelFromPointNoRotate(X._getRotationPoint(!0),!0)}),X.viewport.degrees===0&&X.getRotation(!0)%360===0&&X._drawer.viewer.viewport.getFlip()&&X._drawer._flip(),rt.strokeRect(W.position.x*F.pixelDensityRatio,W.position.y*F.pixelDensityRatio,W.size.x*F.pixelDensityRatio,W.size.y*F.pixelDensityRatio);var ot=(W.position.x+W.size.x/2)*F.pixelDensityRatio,ut=(W.position.y+W.size.y/2)*F.pixelDensityRatio;rt.translate(ot,ut),rt.rotate(Math.PI/180*-this.viewport.degrees),rt.translate(-ot,-ut),W.x===0&&W.y===0&&(rt.fillText("Zoom: "+this.viewport.getZoom(),W.position.x*F.pixelDensityRatio,(W.position.y-30)*F.pixelDensityRatio),rt.fillText("Pan: "+this.viewport.getBounds().toString(),W.position.x*F.pixelDensityRatio,(W.position.y-20)*F.pixelDensityRatio)),rt.fillText("Level: "+W.level,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+20)*F.pixelDensityRatio),rt.fillText("Column: "+W.x,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+30)*F.pixelDensityRatio),rt.fillText("Row: "+W.y,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+40)*F.pixelDensityRatio),rt.fillText("Order: "+K+" of "+q,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+50)*F.pixelDensityRatio),rt.fillText("Size: "+W.size.toString(),(W.position.x+10)*F.pixelDensityRatio,(W.position.y+60)*F.pixelDensityRatio),rt.fillText("Position: "+W.position.toString(),(W.position.x+10)*F.pixelDensityRatio,(W.position.y+70)*F.pixelDensityRatio),this.viewport.degrees!==0&&this._restoreRotationChanges(),X.getRotation(!0)%360!==0&&this._restoreRotationChanges(),X.viewport.degrees===0&&X.getRotation(!0)%360===0&&X._drawer.viewer.viewport.getFlip()&&X._drawer._flip(),rt.restore()}},debugRect:function(W){if(this.useCanvas){var q=this.context;q.save(),q.lineWidth=2*F.pixelDensityRatio,q.strokeStyle=this.debugGridColor[0],q.fillStyle=this.debugGridColor[0],q.strokeRect(W.x*F.pixelDensityRatio,W.y*F.pixelDensityRatio,W.width*F.pixelDensityRatio,W.height*F.pixelDensityRatio),q.restore()}},setImageSmoothingEnabled:function(W){this.useCanvas&&(this._imageSmoothingEnabled=W,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(W){W.msImageSmoothingEnabled=this._imageSmoothingEnabled,W.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(W){var q=this._getContext(W).canvas;return new F.Point(q.width,q.height)},getCanvasCenter:function(){return new F.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(W){var q=W.point?W.point.times(F.pixelDensityRatio):this.getCanvasCenter(),K=this._getContext(W.useSketch);K.save(),K.translate(q.x,q.y),this.viewer.viewport.flipped?(K.rotate(Math.PI/180*-W.degrees),K.scale(-1,1)):K.rotate(Math.PI/180*W.degrees),K.translate(-q.x,-q.y)},_flip:function(W){W=W||{};var q=W.point?W.point.times(F.pixelDensityRatio):this.getCanvasCenter(),K=this._getContext(W.useSketch);K.translate(q.x,0),K.scale(-1,1),K.translate(-q.x,0)},_restoreRotationChanges:function(W){var q=this._getContext(W);q.restore()},_calculateCanvasSize:function(){var W=F.pixelDensityRatio,q=this.viewport.getContainerSize();return{x:Math.round(q.x*W),y:Math.round(q.y*W)}},_calculateSketchCanvasSize:function(){var W=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return W;var q=Math.ceil(Math.sqrt(W.x*W.x+W.y*W.y));return{x:q,y:q}}}}(OpenSeadragon),function(F){F.Viewport=function(W){var q=arguments;q.length&&q[0]instanceof F.Point&&(W={containerSize:q[0],contentSize:q[1],config:q[2]}),W.config&&(F.extend(!0,W,W.config),delete W.config),this._margins=F.extend({left:0,top:0,right:0,bottom:0},W.margins||{}),delete W.margins,F.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:F.DEFAULT_SETTINGS.springStiffness,animationTime:F.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:F.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:F.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:F.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:F.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:F.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:F.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:F.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:F.DEFAULT_SETTINGS.maxZoomLevel,degrees:F.DEFAULT_SETTINGS.degrees,flipped:F.DEFAULT_SETTINGS.flipped,homeFillsViewer:F.DEFAULT_SETTINGS.homeFillsViewer},W),this._updateContainerInnerSize(),this.centerSpringX=new F.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new F.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new F.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new F.Rect(0,0,1,1),1),this.goHome(!0),this.update()},F.Viewport.prototype={resetContentSize:function(W){return F.console.assert(W,"[Viewport.resetContentSize] contentSize is required"),F.console.assert(W instanceof F.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),F.console.assert(W.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),F.console.assert(W.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new F.Rect(0,0,1,W.y/W.x),W.x),this},setHomeBounds:function(W,q){F.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(W,q)},_setContentBounds:function(W,q){F.console.assert(W,"[Viewport._setContentBounds] bounds is required"),F.console.assert(W instanceof F.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),F.console.assert(W.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),F.console.assert(W.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=W.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(q),this._contentBounds=W.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(q),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:q,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var W=this._contentAspectRatio/this.getAspectRatio(),q;return this.homeFillsViewer?q=W>=1?W:1:q=W>=1?1:W,q/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var W=this._contentBounds.getCenter(),q=1/this.getHomeZoom(),K=q/this.getAspectRatio();return new F.Rect(W.x-q/2,W.y-K/2,q,K)},goHome:function(W){return this.viewer&&this.viewer.raiseEvent("home",{immediately:W}),this.fitBounds(this.getHomeBounds(),W)},getMinZoom:function(){var W=this.getHomeZoom(),q=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*W;return q},getMaxZoom:function(){var W=this.maxZoomLevel;return W||(W=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,W/=this._contentBounds.width),Math.max(W,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new F.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return F.extend({},this._margins)},setMargins:function(W){F.console.assert(F.type(W)==="object","[Viewport.setMargins] margins must be an object"),this._margins=F.extend({left:0,top:0,right:0,bottom:0},W),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(W){return this.getBoundsNoRotate(W).rotate(-this.getRotation())},getBoundsNoRotate:function(W){var q=this.getCenter(W),K=1/this.getZoom(W),X=K/this.getAspectRatio();return new F.Rect(q.x-K/2,q.y-X/2,K,X)},getBoundsWithMargins:function(W){return this.getBoundsNoRotateWithMargins(W).rotate(-this.getRotation(),this.getCenter(W))},getBoundsNoRotateWithMargins:function(W){var q=this.getBoundsNoRotate(W),K=this._containerInnerSize.x*this.getZoom(W);return q.x-=this._margins.left/K,q.y-=this._margins.top/K,q.width+=(this._margins.left+this._margins.right)/K,q.height+=(this._margins.top+this._margins.bottom)/K,q},getCenter:function(W){var q=new F.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),K=new F.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),X,tt,rt,ot,ut,yn,uo,po;return W?q:this.zoomPoint?(X=this.pixelFromPoint(this.zoomPoint,!0),tt=this.getZoom(),rt=1/tt,ot=rt/this.getAspectRatio(),ut=new F.Rect(q.x-rt/2,q.y-ot/2,rt,ot),yn=this._pixelFromPoint(this.zoomPoint,ut),uo=yn.minus(X),po=uo.divide(this._containerInnerSize.x*tt),K.plus(po)):K},getZoom:function(W){return W?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(W){return Math.max(Math.min(W,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(W){var q=new F.Rect(W.x,W.y,W.width,W.height);if(!this.wrapHorizontal){var K=this.visibilityRatio*q.width,X=q.x+q.width,tt=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,rt=this._contentBoundsNoRotate.x-X+K,ot=tt-q.x-K;K>this._contentBoundsNoRotate.width?q.x+=(rt+ot)/2:ot<0?q.x+=ot:rt>0&&(q.x+=rt)}if(!this.wrapVertical){var ut=this.visibilityRatio*q.height,yn=q.y+q.height,uo=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,po=this._contentBoundsNoRotate.y-yn+ut,mo=uo-q.y-ut;ut>this._contentBoundsNoRotate.height?q.y+=(po+mo)/2:mo<0?q.y+=mo:po>0&&(q.y+=po)}return q},_raiseConstraintsEvent:function(W){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:W})},applyConstraints:function(W){var q=this.getZoom(),K=this._applyZoomConstraints(q);q!==K&&this.zoomTo(K,this.zoomPoint,W);var X=this.getBoundsNoRotate(),tt=this._applyBoundaryConstraints(X);return this._raiseConstraintsEvent(W),(X.x!==tt.x||X.y!==tt.y||W)&&this.fitBounds(tt.rotate(-this.getRotation()),W),this},ensureVisible:function(W){return this.applyConstraints(W)},_fitBounds:function(W,q){q=q||{};var K=q.immediately||!1,X=q.constraints||!1,tt=this.getAspectRatio(),rt=W.getCenter(),ot=new F.Rect(W.x,W.y,W.width,W.height,W.degrees+this.getRotation()).getBoundingBox();ot.getAspectRatio()>=tt?ot.height=ot.width/tt:ot.width=ot.height*tt,ot.x=rt.x-ot.width/2,ot.y=rt.y-ot.height/2;var ut=1/ot.width;if(X){var yn=ot.getAspectRatio(),uo=this._applyZoomConstraints(ut);ut!==uo&&(ut=uo,ot.width=1/ut,ot.x=rt.x-ot.width/2,ot.height=ot.width/yn,ot.y=rt.y-ot.height/2),ot=this._applyBoundaryConstraints(ot),rt=ot.getCenter(),this._raiseConstraintsEvent(K)}if(K)return this.panTo(rt,!0),this.zoomTo(ut,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var po=this.getBounds(),mo=this.getZoom();if(mo===0||Math.abs(ut/mo-1)<1e-8)return this.zoomTo(ut,!0),this.panTo(rt,K);ot=ot.rotate(-this.getRotation());var wo=ot.getTopLeft().times(ut).minus(po.getTopLeft().times(mo)).divide(ut-mo);return this.zoomTo(ut,wo,K)},fitBounds:function(W,q){return this._fitBounds(W,{immediately:q,constraints:!1})},fitBoundsWithConstraints:function(W,q){return this._fitBounds(W,{immediately:q,constraints:!0})},fitVertically:function(W){var q=new F.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(q,W)},fitHorizontally:function(W){var q=new F.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(q,W)},getConstrainedBounds:function(W){var q,K;return q=this.getBounds(W),K=this._applyBoundaryConstraints(q),K},panBy:function(W,q){var K=new F.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(K.plus(W),q)},panTo:function(W,q){return q?(this.centerSpringX.resetTo(W.x),this.centerSpringY.resetTo(W.y)):(this.centerSpringX.springTo(W.x),this.centerSpringY.springTo(W.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:W,immediately:q}),this},zoomBy:function(W,q,K){return this.zoomTo(this.zoomSpring.target.value*W,q,K)},zoomTo:function(W,q,K){var X=this;return this.zoomPoint=q instanceof F.Point&&!isNaN(q.x)&&!isNaN(q.y)?q:null,K?this._adjustCenterSpringsForZoomPoint(function(){X.zoomSpring.resetTo(W)}):this.zoomSpring.springTo(W),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:W,refPoint:q,immediately:K}),this},setRotation:function(W){return!this.viewer||!this.viewer.drawer.canRotate()?this:(this.degrees=F.positiveModulo(W,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:W}),this)},getRotation:function(){return this.degrees},resize:function(W,q){var K=this.getBoundsNoRotate(),X=K,tt;return this.containerSize.x=W.x,this.containerSize.y=W.y,this._updateContainerInnerSize(),q&&(tt=W.x/this.containerSize.x,X.width=K.width*tt,X.height=X.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:W,maintain:q}),this.fitBounds(X,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new F.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var W=this;this._adjustCenterSpringsForZoomPoint(function(){W.zoomSpring.update()}),this.centerSpringX.update(),this.centerSpringY.update();var q=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,q},_adjustCenterSpringsForZoomPoint:function(W){if(this.zoomPoint){var q=this.pixelFromPoint(this.zoomPoint,!0);W();var K=this.pixelFromPoint(this.zoomPoint,!0),X=K.minus(q),tt=this.deltaPointsFromPixels(X,!0);this.centerSpringX.shiftBy(tt.x),this.centerSpringY.shiftBy(tt.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else W()},deltaPixelsFromPointsNoRotate:function(W,q){return W.times(this._containerInnerSize.x*this.getZoom(q))},deltaPixelsFromPoints:function(W,q){return this.deltaPixelsFromPointsNoRotate(W.rotate(this.getRotation()),q)},deltaPointsFromPixelsNoRotate:function(W,q){return W.divide(this._containerInnerSize.x*this.getZoom(q))},deltaPointsFromPixels:function(W,q){return this.deltaPointsFromPixelsNoRotate(W,q).rotate(-this.getRotation())},pixelFromPointNoRotate:function(W,q){return this._pixelFromPointNoRotate(W,this.getBoundsNoRotate(q))},pixelFromPoint:function(W,q){return this._pixelFromPoint(W,this.getBoundsNoRotate(q))},_pixelFromPointNoRotate:function(W,q){return W.minus(q.getTopLeft()).times(this._containerInnerSize.x/q.width).plus(new F.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(W,q){return this._pixelFromPointNoRotate(W.rotate(this.getRotation(),this.getCenter(!0)),q)},pointFromPixelNoRotate:function(W,q){var K=this.getBoundsNoRotate(q);return W.minus(new F.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/K.width).plus(K.getTopLeft())},pointFromPixel:function(W,q){return this.pointFromPixelNoRotate(W,q).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(W,q){var K=this._contentBoundsNoRotate.width;return new F.Point(W*this._contentSizeNoRotate.x/K,q*this._contentSizeNoRotate.x/K)},viewportToImageCoordinates:function(W,q){if(W instanceof F.Point)return this.viewportToImageCoordinates(W.x,W.y);if(this.viewer){var K=this.viewer.world.getItemCount();if(K>1)F.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(K===1){var X=this.viewer.world.getItemAt(0);return X.viewportToImageCoordinates(W,q,!0)}}return this._viewportToImageDelta(W-this._contentBoundsNoRotate.x,q-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(W,q){var K=this._contentBoundsNoRotate.width;return new F.Point(W/this._contentSizeNoRotate.x*K,q/this._contentSizeNoRotate.x*K)},imageToViewportCoordinates:function(W,q){if(W instanceof F.Point)return this.imageToViewportCoordinates(W.x,W.y);if(this.viewer){var K=this.viewer.world.getItemCount();if(K>1)F.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(K===1){var X=this.viewer.world.getItemAt(0);return X.imageToViewportCoordinates(W,q,!0)}}var tt=this._imageToViewportDelta(W,q);return tt.x+=this._contentBoundsNoRotate.x,tt.y+=this._contentBoundsNoRotate.y,tt},imageToViewportRectangle:function(W,q,K,X){var tt=W;if(tt instanceof F.Rect||(tt=new F.Rect(W,q,K,X)),this.viewer){var rt=this.viewer.world.getItemCount();if(rt>1)F.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(rt===1){var ot=this.viewer.world.getItemAt(0);return ot.imageToViewportRectangle(W,q,K,X,!0)}}var ut=this.imageToViewportCoordinates(tt.x,tt.y),yn=this._imageToViewportDelta(tt.width,tt.height);return new F.Rect(ut.x,ut.y,yn.x,yn.y,tt.degrees)},viewportToImageRectangle:function(W,q,K,X){var tt=W;if(tt instanceof F.Rect||(tt=new F.Rect(W,q,K,X)),this.viewer){var rt=this.viewer.world.getItemCount();if(rt>1)F.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(rt===1){var ot=this.viewer.world.getItemAt(0);return ot.viewportToImageRectangle(W,q,K,X,!0)}}var ut=this.viewportToImageCoordinates(tt.x,tt.y),yn=this._viewportToImageDelta(tt.width,tt.height);return new F.Rect(ut.x,ut.y,yn.x,yn.y,tt.degrees)},viewerElementToImageCoordinates:function(W){var q=this.pointFromPixel(W,!0);return this.viewportToImageCoordinates(q)},imageToViewerElementCoordinates:function(W){var q=this.imageToViewportCoordinates(W);return this.pixelFromPoint(q,!0)},windowToImageCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var q=W.minus(F.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(q)},imageToWindowCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var q=this.imageToViewerElementCoordinates(W);return q.plus(F.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(W){return this.pointFromPixel(W,!0)},viewportToViewerElementCoordinates:function(W){return this.pixelFromPoint(W,!0)},viewerElementToViewportRectangle:function(W){return F.Rect.fromSummits(this.pointFromPixel(W.getTopLeft(),!0),this.pointFromPixel(W.getTopRight(),!0),this.pointFromPixel(W.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(W){return F.Rect.fromSummits(this.pixelFromPoint(W.getTopLeft(),!0),this.pixelFromPoint(W.getTopRight(),!0),this.pixelFromPoint(W.getBottomLeft(),!0))},windowToViewportCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var q=W.minus(F.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(q)},viewportToWindowCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var q=this.viewportToViewerElementCoordinates(W);return q.plus(F.getElementPosition(this.viewer.element))},viewportToImageZoom:function(W){if(this.viewer){var q=this.viewer.world.getItemCount();if(q>1)F.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(q===1){var K=this.viewer.world.getItemAt(0);return K.viewportToImageZoom(W)}}var X=this._contentSizeNoRotate.x,tt=this._containerInnerSize.x,rt=this._contentBoundsNoRotate.width,ot=tt/X*rt;return W*ot},imageToViewportZoom:function(W){if(this.viewer){var q=this.viewer.world.getItemCount();if(q>1)F.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(q===1){var K=this.viewer.world.getItemAt(0);return K.imageToViewportZoom(W)}}var X=this._contentSizeNoRotate.x,tt=this._containerInnerSize.x,rt=this._contentBoundsNoRotate.width,ot=X/tt/rt;return W*ot},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(W){return this.flipped===W?this:(this.flipped=W,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:W}),this)}}}(OpenSeadragon),function(F){F.TiledImage=function(cf){var vf=this;F.console.assert(cf.tileCache,"[TiledImage] options.tileCache is required"),F.console.assert(cf.drawer,"[TiledImage] options.drawer is required"),F.console.assert(cf.viewer,"[TiledImage] options.viewer is required"),F.console.assert(cf.imageLoader,"[TiledImage] options.imageLoader is required"),F.console.assert(cf.source,"[TiledImage] options.source is required"),F.console.assert(!cf.clip||cf.clip instanceof F.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),F.EventSource.call(this),this._tileCache=cf.tileCache,delete cf.tileCache,this._drawer=cf.drawer,delete cf.drawer,this._imageLoader=cf.imageLoader,delete cf.imageLoader,cf.clip instanceof F.Rect&&(this._clip=cf.clip.clone()),delete cf.clip;var _f=cf.x||0;delete cf.x;var $f=cf.y||0;delete cf.y,this.normHeight=cf.source.dimensions.y/cf.source.dimensions.x,this.contentAspectX=cf.source.dimensions.x/cf.source.dimensions.y;var wf=1;cf.width?(wf=cf.width,delete cf.width,cf.height&&(F.console.error("specifying both width and height to a tiledImage is not supported"),delete cf.height)):cf.height&&(wf=cf.height/this.normHeight,delete cf.height);var Pf=cf.fitBounds;delete cf.fitBounds;var Cf=cf.fitBoundsPlacement||OpenSeadragon.Placement.CENTER;delete cf.fitBoundsPlacement;var Af=cf.degrees||0;delete cf.degrees,F.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:F.DEFAULT_SETTINGS.springStiffness,animationTime:F.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:F.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:F.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:F.DEFAULT_SETTINGS.wrapVertical,immediateRender:F.DEFAULT_SETTINGS.immediateRender,blendTime:F.DEFAULT_SETTINGS.blendTime,alwaysBlend:F.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:F.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:F.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:F.DEFAULT_SETTINGS.iOSDevice,debugMode:F.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:F.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:F.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:F.DEFAULT_SETTINGS.placeholderFillStyle,opacity:F.DEFAULT_SETTINGS.opacity,preload:F.DEFAULT_SETTINGS.preload,compositeOperation:F.DEFAULT_SETTINGS.compositeOperation},cf),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new F.Spring({initial:_f,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new F.Spring({initial:$f,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new F.Spring({initial:wf,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new F.Spring({initial:Af,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),Pf&&this.fitBounds(Pf,Cf,!0),this._drawingHandler=function(Bf){vf.viewer.raiseEvent("tile-drawing",F.extend({tiledImage:vf},Bf))}},F.extend(F.TiledImage.prototype,F.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(cf){cf!==this._fullyLoaded&&(this._fullyLoaded=cf,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=F.now(),this._needsDraw=!0},update:function(){var cf=this._xSpring.update(),vf=this._ySpring.update(),_f=this._scaleSpring.update(),$f=this._degreesSpring.update();return cf||vf||_f||$f?(this._updateForScale(),this._needsDraw=!0,!0):!1},draw:function(){this.opacity!==0||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset()},getBounds:function(cf){return this.getBoundsNoRotate(cf).rotate(this.getRotation(cf),this._getRotationPoint(cf))},getBoundsNoRotate:function(cf){return cf?new F.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new F.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return F.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(cf){var vf=this.getBoundsNoRotate(cf);if(this._clip){var _f=cf?this._worldWidthCurrent:this._worldWidthTarget,$f=_f/this.source.dimensions.x,wf=this._clip.times($f);vf=new F.Rect(vf.x+wf.x,vf.y+wf.y,wf.width,wf.height)}return vf.rotate(this.getRotation(cf),this._getRotationPoint(cf))},getContentSize:function(){return new F.Point(this.source.dimensions.x,this.source.dimensions.y)},_viewportToImageDelta:function(cf,vf,_f){var $f=_f?this._scaleSpring.current.value:this._scaleSpring.target.value;return new F.Point(cf*(this.source.dimensions.x/$f),vf*(this.source.dimensions.y*this.contentAspectX/$f))},viewportToImageCoordinates:function(cf,vf,_f){var $f;return cf instanceof F.Point?(_f=vf,$f=cf):$f=new F.Point(cf,vf),$f=$f.rotate(-this.getRotation(_f),this._getRotationPoint(_f)),_f?this._viewportToImageDelta($f.x-this._xSpring.current.value,$f.y-this._ySpring.current.value):this._viewportToImageDelta($f.x-this._xSpring.target.value,$f.y-this._ySpring.target.value)},_imageToViewportDelta:function(cf,vf,_f){var $f=_f?this._scaleSpring.current.value:this._scaleSpring.target.value;return new F.Point(cf/this.source.dimensions.x*$f,vf/this.source.dimensions.y/this.contentAspectX*$f)},imageToViewportCoordinates:function(cf,vf,_f){cf instanceof F.Point&&(_f=vf,vf=cf.y,cf=cf.x);var $f=this._imageToViewportDelta(cf,vf);return _f?($f.x+=this._xSpring.current.value,$f.y+=this._ySpring.current.value):($f.x+=this._xSpring.target.value,$f.y+=this._ySpring.target.value),$f.rotate(this.getRotation(_f),this._getRotationPoint(_f))},imageToViewportRectangle:function(cf,vf,_f,$f,wf){var Pf=cf;Pf instanceof F.Rect?wf=vf:Pf=new F.Rect(cf,vf,_f,$f);var Cf=this.imageToViewportCoordinates(Pf.getTopLeft(),wf),Af=this._imageToViewportDelta(Pf.width,Pf.height,wf);return new F.Rect(Cf.x,Cf.y,Af.x,Af.y,Pf.degrees+this.getRotation(wf))},viewportToImageRectangle:function(cf,vf,_f,$f,wf){var Pf=cf;cf instanceof F.Rect?wf=vf:Pf=new F.Rect(cf,vf,_f,$f);var Cf=this.viewportToImageCoordinates(Pf.getTopLeft(),wf),Af=this._viewportToImageDelta(Pf.width,Pf.height,wf);return new F.Rect(Cf.x,Cf.y,Af.x,Af.y,Pf.degrees-this.getRotation(wf))},viewerElementToImageCoordinates:function(cf){var vf=this.viewport.pointFromPixel(cf,!0);return this.viewportToImageCoordinates(vf)},imageToViewerElementCoordinates:function(cf){var vf=this.imageToViewportCoordinates(cf);return this.viewport.pixelFromPoint(vf,!0)},windowToImageCoordinates:function(cf){var vf=cf.minus(OpenSeadragon.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(vf)},imageToWindowCoordinates:function(cf){var vf=this.imageToViewerElementCoordinates(cf);return vf.plus(OpenSeadragon.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(cf){var vf=this._scaleSpring.current.value;return cf=cf.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new F.Rect((cf.x-this._xSpring.current.value)/vf,(cf.y-this._ySpring.current.value)/vf,cf.width/vf,cf.height/vf,cf.degrees)},viewportToImageZoom:function(cf){var vf=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return vf*cf},imageToViewportZoom:function(cf){var vf=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return cf/vf},setPosition:function(cf,vf){var _f=this._xSpring.target.value===cf.x&&this._ySpring.target.value===cf.y;if(vf){if(_f&&this._xSpring.current.value===cf.x&&this._ySpring.current.value===cf.y)return;this._xSpring.resetTo(cf.x),this._ySpring.resetTo(cf.y),this._needsDraw=!0}else{if(_f)return;this._xSpring.springTo(cf.x),this._ySpring.springTo(cf.y),this._needsDraw=!0}_f||this._raiseBoundsChange()},setWidth:function(cf,vf){this._setScale(cf,vf)},setHeight:function(cf,vf){this._setScale(cf/this.normHeight,vf)},setCroppingPolygons:function(cf){var vf=function($f){return $f instanceof F.Point||typeof $f.x=="number"&&typeof $f.y=="number"},_f=function($f){return $f.map(function(wf){try{if(vf(wf))return{x:wf.x,y:wf.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!F.isArray(cf))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=cf.map(function($f){return _f($f)})}catch($f){F.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),F.console.error($f),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(cf,vf,_f){vf=vf||F.Placement.CENTER;var $f=F.Placement.properties[vf],wf=this.contentAspectX,Pf=0,Cf=0,Af=1,Bf=1;if(this._clip&&(wf=this._clip.getAspectRatio(),Af=this._clip.width/this.source.dimensions.x,Bf=this._clip.height/this.source.dimensions.y,cf.getAspectRatio()>wf?(Pf=this._clip.x/this._clip.height*cf.height,Cf=this._clip.y/this._clip.height*cf.height):(Pf=this._clip.x/this._clip.width*cf.width,Cf=this._clip.y/this._clip.width*cf.width)),cf.getAspectRatio()>wf){var Hf=cf.height/Bf,Df=0;$f.isHorizontallyCentered?Df=(cf.width-cf.height*wf)/2:$f.isRight&&(Df=cf.width-cf.height*wf),this.setPosition(new F.Point(cf.x-Pf+Df,cf.y-Cf),_f),this.setHeight(Hf,_f)}else{var Lf=cf.width/Af,kf=0;$f.isVerticallyCentered?kf=(cf.height-cf.width/wf)/2:$f.isBottom&&(kf=cf.height-cf.width/wf),this.setPosition(new F.Point(cf.x-Pf,cf.y-Cf+kf),_f),this.setWidth(Lf,_f)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(cf){F.console.assert(!cf||cf instanceof F.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),cf instanceof F.Rect?this._clip=cf.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getOpacity:function(){return this.opacity},setOpacity:function(cf){cf!==this.opacity&&(this.opacity=cf,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(cf){this._preload=!!cf,this._needsDraw=!0},getRotation:function(cf){return cf?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(cf,vf){this._degreesSpring.target.value===cf&&this._degreesSpring.isAtTargetValue()||(vf?this._degreesSpring.resetTo(cf):this._degreesSpring.springTo(cf),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(cf){return this.getBoundsNoRotate(cf).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(cf){cf!==this.compositeOperation&&(this.compositeOperation=cf,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(cf,vf){var _f=this._scaleSpring.target.value===cf;if(vf){if(_f&&this._scaleSpring.current.value===cf)return;this._scaleSpring.resetTo(cf),this._updateForScale(),this._needsDraw=!0}else{if(_f)return;this._scaleSpring.springTo(cf),this._updateForScale(),this._needsDraw=!0}_f||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var cf=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),vf=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,_f=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(vf/this.minPixelRatio)/Math.log(2))));return _f=Math.max(_f,this.source.minLevel||0),cf=Math.min(cf,_f),{lowestLevel:cf,highestLevel:_f}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){var cf=this.lastDrawn.pop();cf.beingDrawn=!1}var vf=this.viewport,_f=this._viewportToTiledImageRectangle(vf.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var $f=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(_f=_f.intersection($f),_f===null)return}for(var wf=this._getLevelsInterval(),Pf=wf.lowestLevel,Cf=wf.highestLevel,Af=null,Bf=!1,Hf=F.now(),Df=Cf;Df>=Pf;Df--){var Lf=!1,kf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Df),!0).x*this._scaleSpring.current.value;if(Df===Pf||!Bf&&kf>=this.minPixelRatio)Lf=!0,Bf=!0;else if(!Bf)continue;var Nf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Df),!1).x*this._scaleSpring.current.value,Yf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,Gf=this.immediateRender?1:Yf,rp=Math.min(1,(kf-.5)/.5),ip=Gf/Math.abs(Gf-Nf);if(Af=W(this,Bf,Lf,Df,rp,ip,_f,Hf,Af),yn(this.coverage,Df))break}lf(this,this.lastDrawn),Af&&!Af.context2D?(X(this,Af,Hf),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(this._tilesLoading===0)},_getCornerTiles:function(cf,vf,_f){var $f,wf;this.wrapHorizontal?($f=F.positiveModulo(vf.x,1),wf=F.positiveModulo(_f.x,1)):($f=Math.max(0,vf.x),wf=Math.min(1,_f.x));var Pf,Cf,Af=1/this.source.aspectRatio;this.wrapVertical?(Pf=F.positiveModulo(vf.y,Af),Cf=F.positiveModulo(_f.y,Af)):(Pf=Math.max(0,vf.y),Cf=Math.min(Af,_f.y));var Bf=this.source.getTileAtPoint(cf,new F.Point($f,Pf)),Hf=this.source.getTileAtPoint(cf,new F.Point(wf,Cf)),Df=this.source.getNumTiles(cf);return this.wrapHorizontal&&(Bf.x+=Df.x*Math.floor(vf.x),Hf.x+=Df.x*Math.floor(_f.x)),this.wrapVertical&&(Bf.y+=Df.y*Math.floor(vf.y/Af),Hf.y+=Df.y*Math.floor(_f.y/Af)),{topLeft:Bf,bottomRight:Hf}}});function W(cf,vf,_f,$f,wf,Pf,Cf,Af,Bf){var Hf=Cf.getBoundingBox().getTopLeft(),Df=Cf.getBoundingBox().getBottomRight();cf.viewer&&cf.viewer.raiseEvent("update-level",{tiledImage:cf,havedrawn:vf,level:$f,opacity:wf,visibility:Pf,drawArea:Cf,topleft:Hf,bottomright:Df,currenttime:Af,best:Bf}),mo(cf.coverage,$f),mo(cf.loadingCoverage,$f);for(var Lf=cf._getCornerTiles($f,Hf,Df),kf=Lf.topLeft,Nf=Lf.bottomRight,Yf=cf.source.getNumTiles($f),Gf=cf.viewport.pixelFromPoint(cf.viewport.getCenter()),rp=kf.x;rp<=Nf.x;rp++)for(var ip=kf.y;ip<=Nf.y;ip++){if(!cf.wrapHorizontal&&!cf.wrapVertical){var ap=cf.source.getTileBounds($f,rp,ip);if(Cf.intersection(ap)===null)continue}Bf=q(cf,_f,vf,rp,ip,$f,wf,Pf,Gf,Yf,Af,Bf)}return Bf}function q(cf,vf,_f,$f,wf,Pf,Cf,Af,Bf,Hf,Df,Lf){var kf=K($f,wf,Pf,cf,cf.source,cf.tilesMatrix,Df,Hf,cf._worldWidthCurrent,cf._worldHeightCurrent),Nf=_f;cf.viewer&&cf.viewer.raiseEvent("update-tile",{tiledImage:cf,tile:kf}),po(cf.coverage,Pf,$f,wf,!1);var Yf=kf.loaded||kf.loading||uo(cf.loadingCoverage,Pf,$f,wf);if(po(cf.loadingCoverage,Pf,$f,wf,Yf),!kf.exists||(vf&&!Nf&&(uo(cf.coverage,Pf,$f,wf)?po(cf.coverage,Pf,$f,wf,!0):Nf=!0),!Nf))return Lf;if(ot(kf,cf.source.tileOverlap,cf.viewport,Bf,Af,cf),!kf.loaded)if(kf.context2D)rt(cf,kf);else{var Gf=cf._tileCache.getImageRecord(kf.cacheKey);if(Gf){var rp=Gf.getImage();rt(cf,kf,rp)}}if(kf.loaded){var ip=ut(cf,kf,$f,wf,Pf,Cf,Df);ip&&(cf._needsDraw=!0)}else kf.loading?cf._tilesLoading++:Yf||(Lf=wo(Lf,kf));return Lf}function K(cf,vf,_f,$f,wf,Pf,Cf,Af,Bf,Hf){var Df,Lf,kf,Nf,Yf,Gf,rp,ip,ap;return Pf[_f]||(Pf[_f]={}),Pf[_f][cf]||(Pf[_f][cf]={}),Pf[_f][cf][vf]||(Df=(Af.x+cf%Af.x)%Af.x,Lf=(Af.y+vf%Af.y)%Af.y,kf=wf.getTileBounds(_f,Df,Lf),Nf=wf.getTileBounds(_f,Df,Lf,!0),Yf=wf.tileExists(_f,Df,Lf),Gf=wf.getTileUrl(_f,Df,Lf),$f.loadTilesWithAjax?(rp=wf.getTileAjaxHeaders(_f,Df,Lf),F.isPlainObject($f.ajaxHeaders)&&(rp=F.extend({},$f.ajaxHeaders,rp))):rp=null,ip=wf.getContext2D?wf.getContext2D(_f,Df,Lf):void 0,kf.x+=(cf-Df)/Af.x,kf.y+=Hf/Bf*((vf-Lf)/Af.y),ap=new F.Tile(_f,cf,vf,kf,Yf,Gf,ip,$f.loadTilesWithAjax,rp,Nf),Df===Af.x-1&&(ap.isRightMost=!0),Lf===Af.y-1&&(ap.isBottomMost=!0),Pf[_f][cf][vf]=ap),ap=Pf[_f][cf][vf],ap.lastTouchTime=Cf,ap}function X(cf,vf,_f){vf.loading=!0,cf._imageLoader.addJob({src:vf.url,loadWithAjax:vf.loadWithAjax,ajaxHeaders:vf.ajaxHeaders,crossOriginPolicy:cf.crossOriginPolicy,ajaxWithCredentials:cf.ajaxWithCredentials,callback:function($f,wf,Pf){tt(cf,vf,_f,$f,wf,Pf)},abort:function(){vf.loading=!1}})}function tt(cf,vf,_f,$f,wf,Pf){if(!$f){F.console.log("Tile %s failed to load: %s - error: %s",vf,vf.url,wf),cf.viewer.raiseEvent("tile-load-failed",{tile:vf,tiledImage:cf,time:_f,message:wf,tileRequest:Pf}),vf.loading=!1,vf.exists=!1;return}if(_fcf.visibility||vf.visibility==cf.visibility&&vf.squaredDistance1&&Af>cf.smoothTileEdgesMinZoom&&!cf.iOSDevice&&cf.getRotation(!0)%360===0&&F.supportsCanvas&&($f=!0,wf=_f.getScaleForEdgeSmoothing(),Pf=_f.getTranslationForEdgeSmoothing(wf,cf._drawer.getCanvasSize(!1),cf._drawer.getCanvasSize(!0)));var Bf;$f&&(wf||(Bf=cf.viewport.viewportToViewerElementRectangle(cf.getClippedBounds(!0)).getIntegerBoundingBox(),cf._drawer.viewer.viewport.getFlip()&&(cf.viewport.degrees!==0||cf.getRotation(!0)%360!==0)&&(Bf.x=cf._drawer.viewer.container.clientWidth-(Bf.x+Bf.width)),Bf=Bf.times(F.pixelDensityRatio)),cf._drawer._clear(!0,Bf)),wf||(cf.viewport.degrees!==0&&cf._drawer._offsetForRotation({degrees:cf.viewport.degrees,useSketch:$f}),cf.getRotation(!0)%360!==0&&cf._drawer._offsetForRotation({degrees:cf.getRotation(!0),point:cf.viewport.pixelFromPointNoRotate(cf._getRotationPoint(!0),!0),useSketch:$f}),cf.viewport.degrees===0&&cf.getRotation(!0)%360===0&&cf._drawer.viewer.viewport.getFlip()&&cf._drawer._flip());var Hf=!1;if(cf._clip){cf._drawer.saveContext($f);var Df=cf.imageToViewportRectangle(cf._clip,!0);Df=Df.rotate(-cf.getRotation(!0),cf._getRotationPoint(!0));var Lf=cf._drawer.viewportToDrawerRectangle(Df);wf&&(Lf=Lf.times(wf)),Pf&&(Lf=Lf.translate(Pf)),cf._drawer.setClip(Lf,$f),Hf=!0}if(cf._croppingPolygons){cf._drawer.saveContext($f);try{var kf=cf._croppingPolygons.map(function(rp){return rp.map(function(ip){var ap=cf.imageToViewportCoordinates(ip.x,ip.y,!0).rotate(-cf.getRotation(!0),cf._getRotationPoint(!0)),yp=cf._drawer.viewportCoordToDrawerCoord(ap);return wf&&(yp=yp.times(wf)),yp})});cf._drawer.clipWithPolygons(kf,$f)}catch(rp){F.console.error(rp)}Hf=!0}if(cf.placeholderFillStyle&&cf._hasOpaqueTile===!1){var Nf=cf._drawer.viewportToDrawerRectangle(cf.getBounds(!0));wf&&(Nf=Nf.times(wf)),Pf&&(Nf=Nf.translate(Pf));var Yf=null;typeof cf.placeholderFillStyle=="function"?Yf=cf.placeholderFillStyle(cf,cf._drawer.context):Yf=cf.placeholderFillStyle,cf._drawer.drawRectangle(Nf,Yf,$f)}for(var Gf=vf.length-1;Gf>=0;Gf--)_f=vf[Gf],cf._drawer.drawTile(_f,cf._drawingHandler,$f,wf,Pf),_f.beingDrawn=!0,cf.viewer&&cf.viewer.raiseEvent("tile-drawn",{tiledImage:cf,tile:_f});Hf&&cf._drawer.restoreContext($f),wf||(cf.getRotation(!0)%360!==0&&cf._drawer._restoreRotationChanges($f),cf.viewport.degrees!==0&&cf._drawer._restoreRotationChanges($f)),$f&&(wf&&(cf.viewport.degrees!==0&&cf._drawer._offsetForRotation({degrees:cf.viewport.degrees,useSketch:!1}),cf.getRotation(!0)%360!==0&&cf._drawer._offsetForRotation({degrees:cf.getRotation(!0),point:cf.viewport.pixelFromPointNoRotate(cf._getRotationPoint(!0),!0),useSketch:!1})),cf._drawer.blendSketch({opacity:cf.opacity,scale:wf,translate:Pf,compositeOperation:cf.compositeOperation,bounds:Bf}),wf&&(cf.getRotation(!0)%360!==0&&cf._drawer._restoreRotationChanges(!1),cf.viewport.degrees!==0&&cf._drawer._restoreRotationChanges(!1))),wf||cf.viewport.degrees===0&&cf.getRotation(!0)%360===0&&cf._drawer.viewer.viewport.getFlip()&&cf._drawer._flip(),yf(cf,vf)}}function yf(cf,vf){if(cf.debugMode)for(var _f=vf.length-1;_f>=0;_f--){var $f=vf[_f];try{cf._drawer.drawDebugInfo($f,vf.length,_f,cf)}catch(wf){F.console.error(wf)}}}}(OpenSeadragon),function(F){var W=function(K){F.console.assert(K,"[TileCache.cacheTile] options is required"),F.console.assert(K.tile,"[TileCache.cacheTile] options.tile is required"),F.console.assert(K.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=K.tile,this.tiledImage=K.tiledImage},q=function(K){F.console.assert(K,"[ImageRecord] options is required"),F.console.assert(K.image,"[ImageRecord] options.image is required"),this._image=K.image,this._tiles=[]};q.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var K=document.createElement("canvas");K.width=this._image.width,K.height=this._image.height,this._renderedContext=K.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(K){F.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=K},addTile:function(K){F.console.assert(K,"[ImageRecord.addTile] tile is required"),this._tiles.push(K)},removeTile:function(K){for(var X=0;Xthis._maxImageCacheCount){for(var ot=null,ut=-1,yn=null,uo,po,mo,wo,lf,yf,cf=this._tilesLoaded.length-1;cf>=0;cf--)if(yf=this._tilesLoaded[cf],uo=yf.tile,!(uo.level<=X||uo.beingDrawn)){if(!ot){ot=uo,ut=cf,yn=yf;continue}wo=uo.lastTouchTime,po=ot.lastTouchTime,lf=uo.level,mo=ot.level,(womo)&&(ot=uo,ut=cf,yn=yf)}ot&&ut>=0&&(this._unloadTile(yn),tt=ut)}this._tilesLoaded[tt]=new W({tile:K.tile,tiledImage:K.tiledImage})},clearTilesFor:function(K){F.console.assert(K,"[TileCache.clearTilesFor] tiledImage is required");for(var X,tt=0;tt=this._items.length)throw new Error("Index bigger than number of layers.");q===K||K===-1||(this._items.splice(K,1),this._items.splice(q,0,W),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:W,previousIndex:K,newIndex:q}))},removeItem:function(W){F.console.assert(W,"[World.removeItem] item is required");var q=F.indexOf(this._items,W);q!==-1&&(W.removeHandler("bounds-change",this._delegatedFigureSizes),W.removeHandler("clip-change",this._delegatedFigureSizes),W.destroy(),this._items.splice(q,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(W))},removeAll:function(){this.viewer._cancelPendingImages();var W,q;for(q=0;qwo.height?lf=rt:lf=rt*(wo.width/wo.height),yf=lf*(wo.height/wo.width),cf=new F.Point(uo+(rt-lf)/2,po+(rt-yf)/2),mo.setPosition(cf,q),mo.setWidth(lf,q),K==="horizontal"?uo+=ut:po+=ut;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var W=this._homeBounds?this._homeBounds.clone():null,q=this._contentSize?this._contentSize.clone():null,K=this._contentFactor||0;if(!this._items.length)this._homeBounds=new F.Rect(0,0,1,1),this._contentSize=new F.Point(1,1),this._contentFactor=1;else{var X=this._items[0],tt=X.getBounds();this._contentFactor=X.getContentSize().x/tt.width;for(var rt=X.getClippedBounds().getBoundingBox(),ot=rt.x,ut=rt.y,yn=rt.x+rt.width,uo=rt.y+rt.height,po=1;pout.version.major)throw new Error("OpenSeadragonViewerInputHook requires OpenSeadragon version 1.0.0+");return ut.Viewer.prototype.addViewerInputHook=function(uo){return(uo=uo||{}).viewer=this,new yn.ViewerInputHook(uo)},yn.ViewerInputHook=function(uo){var po,mo;for((uo=uo||{}).hooks=uo.hooks||[],this.viewer=uo.viewer||null,this.viewerTrackers={},this.hooks=[],this.viewer&&(this.viewerTrackers.viewer=this.viewer.innerTracker,this.viewerTrackers.viewer_outer=this.viewer.outerTracker),po=0;polf in wo?q(wo,lf,{enumerable:!0,configurable:!0,writable:!0,value:yf}):wo[lf]=yf,yn=(wo,lf)=>{for(var yf in lf||(lf={}))rt.call(lf,yf)&&ut(wo,yf,lf[yf]);if(tt)for(var yf of tt(lf))ot.call(lf,yf)&&ut(wo,yf,lf[yf]);return wo},uo=(wo,lf)=>K(wo,X(lf)),po=(wo,lf)=>{var yf={};for(var cf in wo)rt.call(wo,cf)&&lf.indexOf(cf)<0&&(yf[cf]=wo[cf]);if(wo!=null&&tt)for(var cf of tt(wo))lf.indexOf(cf)<0&&ot.call(wo,cf)&&(yf[cf]=wo[cf]);return yf},mo=(wo,lf,yf)=>(ut(wo,typeof lf!="symbol"?lf+"":lf,yf),yf);(function(wo,lf){F.exports=lf(requireOpenseadragon())})(commonjsGlobal$3,function(wo){function lf(go){return go&&typeof go=="object"&&"default"in go?go:{default:go}}var yf=lf(wo),cf,vf,_f,$f,wf,Pf,Cf,Af={},Bf=[],Hf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Df(go,xo){for(var uf in xo)go[uf]=xo[uf];return go}function Lf(go){var xo=go.parentNode;xo&&xo.removeChild(go)}function kf(go,xo,uf){var df,gf,Ef,Rf={};for(Ef in xo)Ef=="key"?df=xo[Ef]:Ef=="ref"?gf=xo[Ef]:Rf[Ef]=xo[Ef];if(arguments.length>2&&(Rf.children=arguments.length>3?cf.call(arguments,2):uf),typeof go=="function"&&go.defaultProps!=null)for(Ef in go.defaultProps)Rf[Ef]===void 0&&(Rf[Ef]=go.defaultProps[Ef]);return Nf(go,Rf,df,gf,null)}function Nf(go,xo,uf,df,gf){var Ef={type:go,props:xo,key:uf,ref:df,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:gf??++_f};return vf.vnode!=null&&vf.vnode(Ef),Ef}function Yf(){return{current:null}}function Gf(go){return go.children}function rp(go,xo){this.props=go,this.context=xo}function ip(go,xo){if(xo==null)return go.__?ip(go.__,go.__.__k.indexOf(go)+1):null;for(var uf;xo0?Nf(Pp.type,Pp.props,Pp.key,null,Pp.__v):Pp)!=null){if(Pp.__=uf,Pp.__b=uf.__b+1,(Tp=Tg[Jf])===null||Tp&&Pp.key==Tp.key&&Pp.type===Tp.type)Tg[Jf]=void 0;else for(mp=0;mp2&&(Rf.children=arguments.length>3?cf.call(arguments,2):uf),Nf(go.type,Rf,df||go.key,gf||go.ref,null)}function bp(go,xo){var uf={__c:xo="__cC"+Cf++,__:go,Consumer:function(df,gf){return df.children(gf)},Provider:function(df){var gf,Ef;return this.getChildContext||(gf=[],(Ef={})[xo]=this,this.getChildContext=function(){return Ef},this.shouldComponentUpdate=function(Rf){this.props.value!==Rf.value&&gf.some(yp)},this.sub=function(Rf){gf.push(Rf);var Vf=Rf.componentWillUnmount;Rf.componentWillUnmount=function(){gf.splice(gf.indexOf(Rf),1),Vf&&Vf.call(Rf)}}),df.children}};return uf.Provider.__=uf.Consumer.contextType=uf}cf=Bf.slice,vf={__e:function(go,xo){for(var uf,df,gf;xo=xo.__;)if((uf=xo.__c)&&!uf.__)try{if((df=uf.constructor)&&df.getDerivedStateFromError!=null&&(uf.setState(df.getDerivedStateFromError(go)),gf=uf.__d),uf.componentDidCatch!=null&&(uf.componentDidCatch(go),gf=uf.__d),gf)return uf.__E=uf}catch(Ef){go=Ef}throw go}},_f=0,rp.prototype.setState=function(go,xo){var uf;uf=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Df({},this.state),typeof go=="function"&&(go=go(Df({},uf),this.props)),go&&Df(uf,go),go!=null&&this.__v&&(xo&&this.__h.push(xo),yp(this))},rp.prototype.forceUpdate=function(go){this.__v&&(this.__e=!0,go&&this.__h.push(go),yp(this))},rp.prototype.render=Gf,$f=[],wf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,vp.__r=0,Cf=0;var Ep,_p,Mp,Yp=0,ug=[],hg=vf.__b,xg=vf.__r,kg=vf.diffed,Dg=vf.__c,lm=vf.unmount;function Bp(go,xo){vf.__h&&vf.__h(_p,go,Yp||xo),Yp=0;var uf=_p.__H||(_p.__H={__:[],__h:[]});return go>=uf.__.length&&uf.__.push({}),uf.__[go]}function Rp(go){return Yp=1,Fp(Hg,go)}function Fp(go,xo,uf){var df=Bp(Ep++,2);return df.t=go,df.__c||(df.__=[uf?uf(xo):Hg(void 0,xo),function(gf){var Ef=df.t(df.__[0],gf);df.__[0]!==Ef&&(df.__=[Ef,df.__[1]],df.__c.setState({}))}],df.__c=_p),df.__}function Op(go,xo){var uf=Bp(Ep++,3);!vf.__s&&mm(uf.__H,xo)&&(uf.__=go,uf.__H=xo,_p.__H.__h.push(uf))}function Kp(go,xo){var uf=Bp(Ep++,4);!vf.__s&&mm(uf.__H,xo)&&(uf.__=go,uf.__H=xo,_p.__h.push(uf))}function Kf(go){return Yp=5,gp(function(){return{current:go}},[])}function Xf(go,xo,uf){Yp=6,Kp(function(){typeof go=="function"?go(xo()):go&&(go.current=xo())},uf==null?uf:uf.concat(go))}function gp(go,xo){var uf=Bp(Ep++,7);return mm(uf.__H,xo)&&(uf.__=go(),uf.__H=xo,uf.__h=go),uf.__}function wp(go,xo){return Yp=8,gp(function(){return go},xo)}function dg(go){var xo=_p.context[go.__c],uf=Bp(Ep++,9);return uf.c=go,xo?(uf.__==null&&(uf.__=!0,xo.sub(_p)),xo.props.value):go.__}function mg(go,xo){vf.useDebugValue&&vf.useDebugValue(xo?xo(go):go)}function pg(go){var xo=Bp(Ep++,10),uf=Rp();return xo.__=go,_p.componentDidCatch||(_p.componentDidCatch=function(df){xo.__&&xo.__(df),uf[1](df)}),[uf[0],function(){uf[1](void 0)}]}function wg(){ug.forEach(function(go){if(go.__P)try{go.__H.__h.forEach(Bg),go.__H.__h.forEach(Xg),go.__H.__h=[]}catch(xo){go.__H.__h=[],vf.__e(xo,go.__v)}}),ug=[]}vf.__b=function(go){_p=null,hg&&hg(go)},vf.__r=function(go){xg&&xg(go),Ep=0;var xo=(_p=go.__c).__H;xo&&(xo.__h.forEach(Bg),xo.__h.forEach(Xg),xo.__h=[])},vf.diffed=function(go){kg&&kg(go);var xo=go.__c;xo&&xo.__H&&xo.__H.__h.length&&(ug.push(xo)!==1&&Mp===vf.requestAnimationFrame||((Mp=vf.requestAnimationFrame)||function(uf){var df,gf=function(){clearTimeout(Ef),Cg&&cancelAnimationFrame(df),setTimeout(uf)},Ef=setTimeout(gf,100);Cg&&(df=requestAnimationFrame(gf))})(wg)),_p=void 0},vf.__c=function(go,xo){xo.some(function(uf){try{uf.__h.forEach(Bg),uf.__h=uf.__h.filter(function(df){return!df.__||Xg(df)})}catch(df){xo.some(function(gf){gf.__h&&(gf.__h=[])}),xo=[],vf.__e(df,uf.__v)}}),Dg&&Dg(go,xo)},vf.unmount=function(go){lm&&lm(go);var xo=go.__c;if(xo&&xo.__H)try{xo.__H.__.forEach(Bg)}catch(uf){vf.__e(uf,xo.__v)}};var Cg=typeof requestAnimationFrame=="function";function Bg(go){var xo=_p;typeof go.__c=="function"&&go.__c(),_p=xo}function Xg(go){var xo=_p;go.__c=go.__(),_p=xo}function mm(go,xo){return!go||go.length!==xo.length||xo.some(function(uf,df){return uf!==go[df]})}function Hg(go,xo){return typeof xo=="function"?xo(go):xo}function Iy(go,xo){for(var uf in xo)go[uf]=xo[uf];return go}function py(go,xo){for(var uf in go)if(uf!=="__source"&&!(uf in xo))return!0;for(var df in xo)if(df!=="__source"&&go[df]!==xo[df])return!0;return!1}function Yy(go){this.props=go}function Yb(go,xo){function uf(gf){var Ef=this.props.ref,Rf=Ef==gf.ref;return!Rf&&Ef&&(Ef.call?Ef(null):Ef.current=null),xo?!xo(this.props,gf)||!Rf:py(this.props,gf)}function df(gf){return this.shouldComponentUpdate=uf,kf(go,gf)}return df.displayName="Memo("+(go.displayName||go.name)+")",df.prototype.isReactComponent=!0,df.__f=!0,df}(Yy.prototype=new rp).isPureReactComponent=!0,Yy.prototype.shouldComponentUpdate=function(go,xo){return py(this.props,go)||py(this.state,xo)};var p0=vf.__b;vf.__b=function(go){go.type&&go.type.__f&&go.ref&&(go.props.ref=go.ref,go.ref=null),p0&&p0(go)};var _b=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Fy(go){function xo(uf,df){var gf=Iy({},uf);return delete gf.ref,go(gf,(df=uf.ref||df)&&(typeof df!="object"||"current"in df)?df:null)}return xo.$$typeof=_b,xo.render=xo,xo.prototype.isReactComponent=xo.__f=!0,xo.displayName="ForwardRef("+(go.displayName||go.name)+")",xo}var qg=function(go,xo){return go==null?null:Ip(Ip(go).map(xo))},E1={map:qg,forEach:qg,count:function(go){return go?Ip(go).length:0},only:function(go){var xo=Ip(go);if(xo.length!==1)throw"Children.only";return xo[0]},toArray:Ip},A$=vf.__e;vf.__e=function(go,xo,uf){if(go.then){for(var df,gf=xo;gf=gf.__;)if((df=gf.__c)&&df.__c)return xo.__e==null&&(xo.__e=uf.__e,xo.__k=uf.__k),df.__c(go,xo)}A$(go,xo,uf)};var qv=vf.unmount;function H0(){this.__u=0,this.t=null,this.__b=null}function wb(go){var xo=go.__.__c;return xo&&xo.__e&&xo.__e(go)}function R$(go){var xo,uf,df;function gf(Ef){if(xo||(xo=go()).then(function(Rf){uf=Rf.default||Rf},function(Rf){df=Rf}),df)throw df;if(!uf)throw xo;return kf(uf,Ef)}return gf.displayName="Lazy",gf.__f=!0,gf}function g0(){this.u=null,this.o=null}vf.unmount=function(go){var xo=go.__c;xo&&xo.__R&&xo.__R(),xo&&go.__h===!0&&(go.type=null),qv&&qv(go)},(H0.prototype=new rp).__c=function(go,xo){var uf=xo.__c,df=this;df.t==null&&(df.t=[]),df.t.push(uf);var gf=wb(df.__v),Ef=!1,Rf=function(){Ef||(Ef=!0,uf.__R=null,gf?gf(Vf):Vf())};uf.__R=Rf;var Vf=function(){if(!--df.__u){if(df.state.__e){var ep=df.state.__e;df.__v.__k[0]=function mp(Tp,Pp,tg){return Tp&&(Tp.__v=null,Tp.__k=Tp.__k&&Tp.__k.map(function(gg){return mp(gg,Pp,tg)}),Tp.__c&&Tp.__c.__P===Pp&&(Tp.__e&&tg.insertBefore(Tp.__e,Tp.__d),Tp.__c.__e=!0,Tp.__c.__P=tg)),Tp}(ep,ep.__c.__P,ep.__c.__O)}var Jf;for(df.setState({__e:df.__b=null});Jf=df.t.pop();)Jf.forceUpdate()}},Qf=xo.__h===!0;df.__u++||Qf||df.setState({__e:df.__b=df.__v.__k[0]}),go.then(Rf,Rf)},H0.prototype.componentWillUnmount=function(){this.t=[]},H0.prototype.render=function(go,xo){if(this.__b){if(this.__v.__k){var uf=document.createElement("div"),df=this.__v.__k[0].__c;this.__v.__k[0]=function Ef(Rf,Vf,Qf){return Rf&&(Rf.__c&&Rf.__c.__H&&(Rf.__c.__H.__.forEach(function(ep){typeof ep.__c=="function"&&ep.__c()}),Rf.__c.__H=null),(Rf=Iy({},Rf)).__c!=null&&(Rf.__c.__P===Qf&&(Rf.__c.__P=Vf),Rf.__c=null),Rf.__k=Rf.__k&&Rf.__k.map(function(ep){return Ef(ep,Vf,Qf)})),Rf}(this.__b,uf,df.__O=df.__P)}this.__b=null}var gf=xo.__e&&kf(Gf,null,go.fallback);return gf&&(gf.__h=null),[kf(Gf,null,xo.__e?null:go.children),gf]};var m_=function(go,xo,uf){if(++uf[1]===uf[0]&&go.o.delete(xo),go.props.revealOrder&&(go.props.revealOrder[0]!=="t"||!go.o.size))for(uf=go.u;uf;){for(;uf.length>3;)uf.pop()();if(uf[1]>>1,1),xo.i.removeChild(df)}}),hp(kf(Jg,{context:xo.context},go.__v),xo.l)):xo.l&&xo.componentWillUnmount()}function Eg(go,xo){return kf(Hp,{__v:go,i:xo})}(g0.prototype=new rp).__e=function(go){var xo=this,uf=wb(xo.__v),df=xo.o.get(go);return df[0]++,function(gf){var Ef=function(){xo.props.revealOrder?(df.push(gf),m_(xo,go,df)):gf()};uf?uf(Ef):Ef()}},g0.prototype.render=function(go){this.u=null,this.o=new Map;var xo=Ip(go.children);go.revealOrder&&go.revealOrder[0]==="b"&&xo.reverse();for(var uf=xo.length;uf--;)this.o.set(xo[uf],this.u=[1,0,this.u]);return go.children},g0.prototype.componentDidUpdate=g0.prototype.componentDidMount=function(){var go=this;this.o.forEach(function(xo,uf){m_(go,uf,xo)})};var Gg=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,yv=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Py=function(go){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(go)};function Cv(go,xo,uf){return xo.__k==null&&(xo.textContent=""),hp(go,xo),typeof uf=="function"&&uf(),go?go.__c:null}function By(go,xo,uf){return $p(go,xo),typeof uf=="function"&&uf(),go?go.__c:null}rp.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(go){Object.defineProperty(rp.prototype,go,{configurable:!0,get:function(){return this["UNSAFE_"+go]},set:function(xo){Object.defineProperty(this,go,{configurable:!0,writable:!0,value:xo})}})});var S1=vf.event;function T1(){}function jy(){return this.cancelBubble}function cw(){return this.defaultPrevented}vf.event=function(go){return S1&&(go=S1(go)),go.persist=T1,go.isPropagationStopped=jy,go.isDefaultPrevented=cw,go.nativeEvent=go};var xb,N$={configurable:!0,get:function(){return this.class}},$x=vf.vnode;vf.vnode=function(go){var xo=go.type,uf=go.props,df=uf;if(typeof xo=="string"){for(var gf in df={},uf){var Ef=uf[gf];gf==="value"&&"defaultValue"in uf&&Ef==null||(gf==="defaultValue"&&"value"in uf&&uf.value==null?gf="value":gf==="download"&&Ef===!0?Ef="":/ondoubleclick/i.test(gf)?gf="ondblclick":/^onchange(textarea|input)/i.test(gf+xo)&&!Py(uf.type)?gf="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(gf)?gf=gf.toLowerCase():yv.test(gf)?gf=gf.replace(/[A-Z0-9]/,"-$&").toLowerCase():Ef===null&&(Ef=void 0),df[gf]=Ef)}xo=="select"&&df.multiple&&Array.isArray(df.value)&&(df.value=Ip(uf.children).forEach(function(Rf){Rf.props.selected=df.value.indexOf(Rf.props.value)!=-1})),xo=="select"&&df.defaultValue!=null&&(df.value=Ip(uf.children).forEach(function(Rf){Rf.props.selected=df.multiple?df.defaultValue.indexOf(Rf.props.value)!=-1:df.defaultValue==Rf.props.value})),go.props=df}xo&&uf.class!=uf.className&&(N$.enumerable="className"in uf,uf.className!=null&&(df.class=uf.className),Object.defineProperty(df,"className",N$)),go.$$typeof=Gg,$x&&$x(go)};var _x=vf.__r;vf.__r=function(go){_x&&_x(go),xb=go.__c};var Kb={ReactCurrentDispatcher:{current:{readContext:function(go){return xb.__n[go.__c].props.value}}}},dv="17.0.2";function Ov(go){return kf.bind(null,go)}function Xb(go){return!!go&&go.$$typeof===Gg}function Y1(go){return Xb(go)?Vp.apply(null,arguments):go}function K1(go){return!!go.__k&&(hp(null,go),!0)}function Zb(go){return go&&(go.base||go.nodeType===1&&go)||null}var Tm=function(go,xo){return go(xo)},cm=function(go,xo){return go(xo)},uw=Gf,Zg={useState:Rp,useReducer:Fp,useEffect:Op,useLayoutEffect:Kp,useRef:Kf,useImperativeHandle:Xf,useMemo:gp,useCallback:wp,useContext:dg,useDebugValue:mg,version:"17.0.2",Children:E1,render:Cv,hydrate:By,unmountComponentAtNode:K1,createPortal:Eg,createElement:kf,createContext:bp,createFactory:Ov,cloneElement:Y1,createRef:Yf,Fragment:Gf,isValidElement:Xb,findDOMNode:Zb,Component:rp,PureComponent:Yy,memo:Yb,forwardRef:Fy,flushSync:cm,unstable_batchedUpdates:Tm,StrictMode:Gf,Suspense:H0,SuspenseList:g0,lazy:R$,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kb},_m=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Zg,version:dv,Children:E1,render:Cv,hydrate:By,unmountComponentAtNode:K1,createPortal:Eg,createFactory:Ov,cloneElement:Y1,isValidElement:Xb,findDOMNode:Zb,PureComponent:Yy,memo:Yb,forwardRef:Fy,flushSync:cm,unstable_batchedUpdates:Tm,StrictMode:uw,Suspense:H0,SuspenseList:g0,lazy:R$,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kb,createElement:kf,createContext:bp,createRef:Yf,Fragment:Gf,Component:rp,useState:Rp,useReducer:Fp,useEffect:Op,useLayoutEffect:Kp,useRef:Kf,useImperativeHandle:Xf,useMemo:gp,useCallback:wp,useContext:dg,useDebugValue:mg,useErrorBoundary:pg}),Eb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof commonjsGlobal$3<"u"?commonjsGlobal$3:typeof self<"u"?self:{};function v_(go){return go&&go.__esModule&&Object.prototype.hasOwnProperty.call(go,"default")?go.default:go}function X1(go){if(go.__esModule)return go;var xo=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(go).forEach(function(uf){var df=Object.getOwnPropertyDescriptor(go,uf);Object.defineProperty(xo,uf,df.get?df:{enumerable:!0,get:function(){return go[uf]}})}),xo}var Yv={exports:{}};function Iv(){}Iv.prototype={on:function(go,xo,uf){var df=this.e||(this.e={});return(df[go]||(df[go]=[])).push({fn:xo,ctx:uf}),this},once:function(go,xo,uf){var df=this;function gf(){df.off(go,gf),xo.apply(uf,arguments)}return gf._=xo,this.on(go,gf,uf)},emit:function(go){var xo=[].slice.call(arguments,1),uf=((this.e||(this.e={}))[go]||[]).slice(),df=0,gf=uf.length;for(df;df0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";var df=(go=window.document)===null||go===void 0||(xo=go.documentElement)===null||xo===void 0?void 0:xo.style;if(!df||uf in df)return"";for(var gf=0;gf=0?($.Browser.vendor=$.BROWSERS.FIREFOX,$.Browser.version=parseFloat(W.substring(W.indexOf("Firefox")+8))):W.indexOf("Safari")>=0?($.Browser.vendor=W.indexOf("Chrome")>=0?$.BROWSERS.CHROME:$.BROWSERS.SAFARI,$.Browser.version=parseFloat(W.substring(W.substring(0,W.indexOf("Safari")).lastIndexOf("/")+1,W.indexOf("Safari")))):(q=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),q.exec(W)!==null&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":$.Browser.vendor=$.BROWSERS.OPERA,$.Browser.version=parseFloat(F);break}var K=window.location.search.substring(1),X=K.split("&"),tt,rt,ot;for(ot=0;ot0){var ut=tt.substring(0,rt),yn=tt.substring(rt+1);try{URLPARAMS[ut]=decodeURIComponent(yn)}catch{$.console.error("Ignoring malformed URL parameter: %s=%s",ut,yn)}}$.Browser.alpha=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9||$.Browser.vendor==$.BROWSERS.CHROME&&$.Browser.version<2),$.Browser.opacity=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9)})(),function(F){var W=F.requestAnimationFrame||F.mozRequestAnimationFrame||F.webkitRequestAnimationFrame||F.msRequestAnimationFrame,q=F.cancelAnimationFrame||F.mozCancelAnimationFrame||F.webkitCancelAnimationFrame||F.msCancelAnimationFrame;if(W&&q)$.requestAnimationFrame=function(){return W.apply(F,arguments)},$.cancelAnimationFrame=function(){return q.apply(F,arguments)};else{var K=[],X=[],tt=0,rt;$.requestAnimationFrame=function(ot){return K.push([++tt,ot]),rt||(rt=setInterval(function(){if(K.length){var ut=$.now(),yn=X;for(X=K,K=yn;X.length;)X.shift()[1](ut)}else clearInterval(rt),rt=void 0},1e3/50)),tt},$.cancelAnimationFrame=function(ot){var ut,yn;for(ut=0,yn=K.length;ut8||"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",F.MouseTracker.supportsMouseCapture=function(){var Kf=document.createElement("div");return F.isFunction(Kf.setCapture)&&F.isFunction(Kf.releaseCapture)}(),F.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur",F.MouseTracker.wheelEventName],F.MouseTracker.wheelEventName=="DOMMouseScroll"&&F.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent&&(window.navigator.pointerEnabled||F.Browser.vendor!==F.BROWSERS.IE)?(F.MouseTracker.havePointerEvents=!0,F.MouseTracker.subscribeEvents.push("pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),F.MouseTracker.unprefixedPointerEvents=!0,navigator.maxTouchPoints?F.MouseTracker.maxTouchPoints=navigator.maxTouchPoints:F.MouseTracker.maxTouchPoints=0,F.MouseTracker.haveMouseEnter=!1):window.MSPointerEvent&&window.navigator.msPointerEnabled?(F.MouseTracker.havePointerEvents=!0,F.MouseTracker.subscribeEvents.push("MSPointerOver","MSPointerOut","MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"),F.MouseTracker.unprefixedPointerEvents=!1,navigator.msMaxTouchPoints?F.MouseTracker.maxTouchPoints=navigator.msMaxTouchPoints:F.MouseTracker.maxTouchPoints=0,F.MouseTracker.haveMouseEnter=!1):(F.MouseTracker.havePointerEvents=!1,F.Browser.vendor===F.BROWSERS.IE&&F.Browser.version<9?(F.MouseTracker.subscribeEvents.push("mouseenter","mouseleave"),F.MouseTracker.haveMouseEnter=!0):(F.MouseTracker.subscribeEvents.push("mouseover","mouseout"),F.MouseTracker.haveMouseEnter=!1),F.MouseTracker.subscribeEvents.push("mousedown","mouseup","mousemove"),"ontouchstart"in window&&F.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&F.MouseTracker.subscribeEvents.push("gesturestart","gesturechange"),F.MouseTracker.mousePointerId="legacy-mouse",F.MouseTracker.maxTouchPoints=10),F.MouseTracker.GesturePointList=function(Kf){this._gPoints=[],this.type=Kf,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},F.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(Kf){return this._gPoints.push(Kf)},removeById:function(Kf){var Xf,gp=this._gPoints.length;for(Xf=0;Xf1&&(this.type==="mouse"||this.type==="pen")&&(this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};function K(Kf){var Xf=q[Kf.hash],gp,wp=Xf.activePointersLists.length;for(gp=0;gp0&&(F.removeEvent(F.MouseTracker.captureElement,"mousemove",Xf.mousemovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"mouseup",Xf.mouseupcaptured,!0),F.removeEvent(F.MouseTracker.captureElement,F.MouseTracker.unprefixedPointerEvents?"pointermove":"MSPointerMove",Xf.pointermovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,F.MouseTracker.unprefixedPointerEvents?"pointerup":"MSPointerUp",Xf.pointerupcaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"touchmove",Xf.touchmovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"touchend",Xf.touchendcaptured,!0),Xf.activePointersLists[gp].captureCount=0);for(gp=0;gp0){for(wp=0;wp0&&(lm(Kf,Xf,mg,0),gp.captureCount=1,ut(Kf,gp.type),kg(Kf,Xf,mg))}}function Jp(Kf,Xf){var gp,wp,dg,mg=Xf.changedTouches.length,pg=[],wg,Cg=Kf.getActivePointersListByType("touch");for(gp=F.now(),Cg.getLength()>Xf.touches.length-mg&&(F.console.warn("Tracked touch contact count doesn't match event.touches.length. Removing all tracked touch pointers."),Ip(Kf,Xf,Cg)),wp=0;wp"u")return Ip(Kf,Xf,mg),!1;for(Bg=0;Bg"u"?!0:q.attachToViewer,this.autoFade=typeof q.autoFade>"u"?!0:q.autoFade,this.element=W,this.anchor=q.anchor,this.container=K,this.anchor==F.ControlAnchor.ABSOLUTE?(this.wrapper=F.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof q.top=="number"?q.top+"px":q.top,this.wrapper.style.left=typeof q.left=="number"?q.left+"px":q.left,this.wrapper.style.height=typeof q.height=="number"?q.height+"px":q.height,this.wrapper.style.width=typeof q.width=="number"?q.width+"px":q.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=F.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor==F.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),q.attachToViewer?this.anchor==F.ControlAnchor.TOP_RIGHT||this.anchor==F.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):X.appendChild(this.wrapper)},F.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!="none"},setVisible:function(W){this.wrapper.style.display=W?this.anchor==F.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(W){this.element[F.SIGNAL]&&F.Browser.vendor==F.BROWSERS.IE?F.setElementOpacity(this.element,W,!0):F.setElementOpacity(this.wrapper,W,!0)}}}(OpenSeadragon),function(F){F.ControlDock=function(q){var K=["topleft","topright","bottomright","bottomleft"],X,tt;for(F.extend(!0,this,{id:"controldock-"+F.now()+"-"+Math.floor(Math.random()*1e6),container:F.makeNeutralElement("div"),controls:[]},q),this.container.onsubmit=function(){return!1},this.element&&(this.element=F.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),tt=0;tt=0)){switch(K.anchor){case F.ControlAnchor.TOP_RIGHT:X=this.controls.topright,q.style.position="relative",q.style.paddingRight="0px",q.style.paddingTop="0px";break;case F.ControlAnchor.BOTTOM_RIGHT:X=this.controls.bottomright,q.style.position="relative",q.style.paddingRight="0px",q.style.paddingBottom="0px";break;case F.ControlAnchor.BOTTOM_LEFT:X=this.controls.bottomleft,q.style.position="relative",q.style.paddingLeft="0px",q.style.paddingBottom="0px";break;case F.ControlAnchor.TOP_LEFT:X=this.controls.topleft,q.style.position="relative",q.style.paddingLeft="0px",q.style.paddingTop="0px";break;case F.ControlAnchor.ABSOLUTE:X=this.container,q.style.margin="0px",q.style.padding="0px";break;default:case F.ControlAnchor.NONE:X=this.container,q.style.margin="0px",q.style.padding="0px";break}this.controls.push(new F.Control(q,K,X)),q.style.display="inline-block"}},removeControl:function(q){q=F.getElement(q);var K=W(this,q);return K>=0&&(this.controls[K].destroy(),this.controls.splice(K,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var q;for(q=this.controls.length-1;q>=0;q--)if(this.controls[q].isVisible())return!0;return!1},setControlsEnabled:function(q){var K;for(K=this.controls.length-1;K>=0;K--)this.controls[K].setVisible(q);return this}};function W(q,K){var X=q.controls,tt;for(tt=X.length-1;tt>=0;tt--)if(X[tt].element==K)return tt;return-1}}(OpenSeadragon),function(F){F.Placement=F.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(OpenSeadragon),function(F){var W={},q=1;F.Viewer=function(Of){var qf=arguments,cp=this,hp;if(F.isPlainObject(Of)||(Of={id:qf[0],xmlPath:qf.length>1?qf[1]:void 0,prefixUrl:qf.length>2?qf[2]:void 0,controls:qf.length>3?qf[3]:void 0,overlays:qf.length>4?qf[4]:void 0}),Of.config&&(F.extend(!0,Of,Of.config),delete Of.config),F.extend(!0,this,{id:Of.id,hash:Of.hash||q++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},F.DEFAULT_SETTINGS,Of),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(typeof W[this.hash]<"u"&&F.console.warn("Hash "+this.hash+" has already been used."),W[this.hash]={fsBoundsDelta:new F.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._lastScrollTime=F.now(),F.EventSource.call(this),this.addHandler("open-failed",function($p){var Vp=F.getString("Errors.OpenFailed",$p.eventSource,$p.message);cp._showMessage(Vp)}),F.ControlDock.call(this,Of),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=F.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function($p){$p.width="100%",$p.height="100%",$p.overflow="hidden",$p.position="absolute",$p.top="0px",$p.left="0px"}(this.canvas.style),F.setElementTouchActionNone(this.canvas),Of.tabIndex!==""&&(this.canvas.tabIndex=Of.tabIndex===void 0?0:Of.tabIndex),this.container.className="openseadragon-container",function($p){$p.width="100%",$p.height="100%",$p.position="relative",$p.overflow="hidden",$p.left="0px",$p.top="0px",$p.textAlign="left"}(this.container.style),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new F.MouseTracker({element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,keyDownHandler:F.delegate(this,lf),keyHandler:F.delegate(this,yf),clickHandler:F.delegate(this,cf),dblClickHandler:F.delegate(this,vf),dragHandler:F.delegate(this,_f),dragEndHandler:F.delegate(this,$f),enterHandler:F.delegate(this,xf),exitHandler:F.delegate(this,Af),pressHandler:F.delegate(this,Cf),releaseHandler:F.delegate(this,Pf),nonPrimaryPressHandler:F.delegate(this,Bf),nonPrimaryReleaseHandler:F.delegate(this,Hf),scrollHandler:F.delegate(this,Lf),pinchHandler:F.delegate(this,Df)}),this.outerTracker=new F.MouseTracker({element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:F.delegate(this,kf),exitHandler:F.delegate(this,Nf)}),this.toolbar&&(this.toolbar=new F.ControlDock({element:this.toolbar})),this.bindStandardControls(),W[this.hash].prevContainerSize=K(this.container),this.world=new F.World({viewer:this}),this.world.addHandler("add-item",function($p){cp.source=cp.world.getItemAt(0).source,W[cp.hash].forceRedraw=!0,cp._updateRequestId||(cp._updateRequestId=ot(cp,Yf))}),this.world.addHandler("remove-item",function($p){cp.world.getItemCount()?cp.source=cp.world.getItemAt(0).source:cp.source=null,W[cp.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function($p){cp.viewport&&cp.viewport._setContentBounds(cp.world.getHomeBounds(),cp.world.getContentFactor())}),this.world.addHandler("item-index-change",function($p){cp.source=cp.world.getItemAt(0).source}),this.viewport=new F.Viewport({containerSize:W[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new F.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:Of.timeout}),this.tileCache=new F.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new F.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=F.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(hp=this.buttons.buttons.indexOf(this.rotateLeft),this.buttons.buttons.splice(hp,1),this.buttons.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(hp=this.buttons.buttons.indexOf(this.rotateRight),this.buttons.buttons.splice(hp,1),this.buttons.element.removeChild(this.rotateRight.element))),this.showNavigator&&(this.navigator=new F.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),hp=0;hp-1&&Of.index=0&&Of=0)return this;var Vp=tt(this,$p);return this.currentOverlays.push(Vp),Vp.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:Of,location:$p.location,placement:$p.placement}),this},updateOverlay:function(Of,qf,cp){var hp;return Of=F.getElement(Of),hp=rt(this.currentOverlays,Of),hp>=0&&(this.currentOverlays[hp].update(qf,cp),W[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:Of,location:qf,placement:cp})),this},removeOverlay:function(Of){var qf;return Of=F.getElement(Of),qf=rt(this.currentOverlays,Of),qf>=0&&(this.currentOverlays[qf].destroy(),this.currentOverlays.splice(qf,1),W[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:Of})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return W[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(Of){var qf;return Of=F.getElement(Of),qf=rt(this.currentOverlays,Of),qf>=0?this.currentOverlays[qf]:null},_updateSequenceButtons:function(Of){this.nextButton&&(!this.tileSources||this.tileSources.length-1===Of?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(Of>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(Of){this._hideMessage();var qf=F.makeNeutralElement("div");qf.appendChild(document.createTextNode(Of)),this.messageDiv=F.makeCenteredNode(qf),F.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var Of=this.messageDiv;Of&&(Of.parentNode.removeChild(Of),delete this.messageDiv)},gestureSettingsByDeviceType:function(Of){switch(Of){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var Of,qf=this.currentOverlays.length;for(Of=0;Of1&&(this.referenceStrip=new F.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else F.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')}});function K(Of){return Of=F.getElement(Of),new F.Point(Of.clientWidth===0?1:Of.clientWidth,Of.clientHeight===0?1:Of.clientHeight)}function X(Of,qf,cp,hp,$p){var Vp=Of;if(F.type(qf)=="string"){if(qf.match(/^\s*<.*>\s*$/))qf=F.parseXml(qf);else if(qf.match(/^\s*[\{\[].*[\}\]]\s*$/))try{var bp=F.parseJSON(qf);qf=bp}catch{}}function Ep(_p,Mp){_p.ready?hp(_p):(_p.addHandler("ready",function(){hp(_p)}),_p.addHandler("open-failed",function(Yp){$p({message:Yp.message,source:Mp})}))}setTimeout(function(){if(F.type(qf)=="string")qf=new F.TileSource({url:qf,crossOriginPolicy:cp.crossOriginPolicy!==void 0?cp.crossOriginPolicy:Of.crossOriginPolicy,ajaxWithCredentials:Of.ajaxWithCredentials,ajaxHeaders:Of.ajaxHeaders,useCanvas:Of.useCanvas,success:function(ug){hp(ug.tileSource)}}),qf.addHandler("open-failed",function(ug){$p(ug)});else if(F.isPlainObject(qf)||qf.nodeType)if(qf.crossOriginPolicy===void 0&&(cp.crossOriginPolicy!==void 0||Of.crossOriginPolicy!==void 0)&&(qf.crossOriginPolicy=cp.crossOriginPolicy!==void 0?cp.crossOriginPolicy:Of.crossOriginPolicy),qf.ajaxWithCredentials===void 0&&(qf.ajaxWithCredentials=Of.ajaxWithCredentials),qf.useCanvas===void 0&&(qf.useCanvas=Of.useCanvas),F.isFunction(qf.getTileUrl)){var _p=new F.TileSource(qf);_p.getTileUrl=qf.getTileUrl,hp(_p)}else{var Mp=F.TileSource.determineType(Vp,qf);if(!Mp){$p({message:"Unable to load TileSource",source:qf});return}var Yp=Mp.prototype.configure.apply(Vp,[qf]);Ep(new Mp(Yp),qf)}else Ep(qf,qf)})}function tt(Of,qf){if(qf instanceof F.Overlay)return qf;var cp=null;if(qf.element)cp=F.getElement(qf.element);else{var hp=qf.id?qf.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);cp=F.getElement(qf.id),cp||(cp=document.createElement("a"),cp.href="#/overlay/"+hp),cp.id=hp,F.addClass(cp,qf.className?qf.className:"openseadragon-overlay")}var $p=qf.location,Vp=qf.width,bp=qf.height;if(!$p){var Ep=qf.x,_p=qf.y;if(qf.px!==void 0){var Mp=Of.viewport.imageToViewportRectangle(new F.Rect(qf.px,qf.py,Vp||0,bp||0));Ep=Mp.x,_p=Mp.y,Vp=Vp!==void 0?Mp.width:void 0,bp=bp!==void 0?Mp.height:void 0}$p=new F.Point(Ep,_p)}var Yp=qf.placement;return Yp&&F.type(Yp)==="string"&&(Yp=F.Placement[qf.placement.toUpperCase()]),new F.Overlay({element:cp,location:$p,placement:Yp,onDraw:qf.onDraw,checkResize:qf.checkResize,width:Vp,height:bp,rotationMode:qf.rotationMode})}function rt(Of,qf){var cp;for(cp=Of.length-1;cp>=0;cp--)if(Of[cp].element===qf)return cp;return-1}function ot(Of,qf){return F.requestAnimationFrame(function(){qf(Of)})}function ut(Of){F.requestAnimationFrame(function(){uo(Of)})}function yn(Of){Of.autoHideControls&&(Of.controlsShouldFade=!0,Of.controlsFadeBeginTime=F.now()+Of.controlsFadeDelay,window.setTimeout(function(){ut(Of)},Of.controlsFadeDelay))}function uo(Of){var qf,cp,hp,$p;if(Of.controlsShouldFade){for(qf=F.now(),cp=qf-Of.controlsFadeBeginTime,hp=1-cp/Of.controlsFadeLength,hp=Math.min(1,hp),hp=Math.max(0,hp),$p=Of.controls.length-1;$p>=0;$p--)Of.controls[$p].autoFade&&Of.controls[$p].setOpacity(hp);hp>0&&ut(Of)}}function po(Of){var qf;for(Of.controlsShouldFade=!1,qf=Of.controls.length-1;qf>=0;qf--)Of.controls[qf].setOpacity(1)}function mo(){po(this)}function wo(){yn(this)}function lf(Of){var qf={originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction,preventVerticalPan:Of.preventVerticalPan,preventHorizontalPan:Of.preventHorizontalPan};if(this.raiseEvent("canvas-key",qf),!qf.preventDefaultAction&&!Of.ctrl&&!Of.alt&&!Of.meta)switch(Of.keyCode){case 38:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 40:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 37:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;case 39:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;default:return!0}else return!0}function yf(Of){var qf={originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction,preventVerticalPan:Of.preventVerticalPan,preventHorizontalPan:Of.preventHorizontalPan};if(this.raiseEvent("canvas-key",qf),!qf.preventDefaultAction&&!Of.ctrl&&!Of.alt&&!Of.meta)switch(Of.keyCode){case 43:case 61:return this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),!1;case 45:return this.viewport.zoomBy(.9),this.viewport.applyConstraints(),!1;case 48:return this.viewport.goHome(),this.viewport.applyConstraints(),!1;case 119:case 87:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,-40))),this.viewport.applyConstraints()),!1;case 115:case 83:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,40))),this.viewport.applyConstraints()),!1;case 97:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(-40,0))),this.viewport.applyConstraints()),!1;case 100:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(40,0))),this.viewport.applyConstraints()),!1;case 114:return this.viewport.flipped?this.viewport.setRotation(F.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(F.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 82:return this.viewport.flipped?this.viewport.setRotation(F.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(F.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 102:return this.viewport.toggleFlip(),!1;default:return!0}else return!0}function cf(Of){var qf,cp=document.activeElement==this.canvas;cp||this.canvas.focus(),this.viewport.flipped&&(Of.position.x=this.viewport.getContainerSize().x-Of.position.x);var hp={tracker:Of.eventSource,position:Of.position,quick:Of.quick,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};this.raiseEvent("canvas-click",hp),!hp.preventDefaultAction&&this.viewport&&Of.quick&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.clickToZoom&&(this.viewport.zoomBy(Of.shift?1/this.zoomPerClick:this.zoomPerClick,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints()))}function vf(Of){var qf,cp={tracker:Of.eventSource,position:Of.position,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};this.raiseEvent("canvas-double-click",cp),!cp.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.dblClickToZoom&&(this.viewport.zoomBy(Of.shift?1/this.zoomPerClick:this.zoomPerClick,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints()))}function _f(Of){var qf,cp={tracker:Of.eventSource,position:Of.position,delta:Of.delta,speed:Of.speed,direction:Of.direction,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};if(this.raiseEvent("canvas-drag",cp),!cp.preventDefaultAction&&this.viewport){if(qf=this.gestureSettingsByDeviceType(Of.pointerType),this.panHorizontal||(Of.delta.x=0),this.panVertical||(Of.delta.y=0),this.viewport.flipped&&(Of.delta.x=-Of.delta.x),this.constrainDuringPan){var hp=this.viewport.deltaPointsFromPixels(Of.delta.negate());this.viewport.centerSpringX.target.value+=hp.x,this.viewport.centerSpringY.target.value+=hp.y;var $p=this.viewport.getBounds(),Vp=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=hp.x,this.viewport.centerSpringY.target.value-=hp.y,$p.x!=Vp.x&&(Of.delta.x=0),$p.y!=Vp.y&&(Of.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(Of.delta.negate()),qf.flickEnabled&&!this.constrainDuringPan)}}function $f(Of){if(!Of.preventDefaultAction&&this.viewport){var qf=this.gestureSettingsByDeviceType(Of.pointerType);if(qf.flickEnabled&&Of.speed>=qf.flickMinSpeed){var cp=0;this.panHorizontal&&(cp=qf.flickMomentum*Of.speed*Math.cos(Of.direction));var hp=0;this.panVertical&&(hp=qf.flickMomentum*Of.speed*Math.sin(Of.direction));var $p=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),Vp=this.viewport.pointFromPixel(new F.Point($p.x-cp,$p.y-hp));this.viewport.panTo(Vp,!1)}this.viewport.applyConstraints()}this.raiseEvent("canvas-drag-end",{tracker:Of.eventSource,position:Of.position,speed:Of.speed,direction:Of.direction,shift:Of.shift,originalEvent:Of.originalEvent})}function xf(Of){this.raiseEvent("canvas-enter",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Af(Of){window.location!=window.parent.location&&F.MouseTracker.resetAllMouseTrackers(),this.raiseEvent("canvas-exit",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Cf(Of){this.raiseEvent("canvas-press",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,insideElementPressed:Of.insideElementPressed,insideElementReleased:Of.insideElementReleased,originalEvent:Of.originalEvent})}function Pf(Of){this.raiseEvent("canvas-release",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,insideElementPressed:Of.insideElementPressed,insideElementReleased:Of.insideElementReleased,originalEvent:Of.originalEvent})}function Bf(Of){this.raiseEvent("canvas-nonprimary-press",{tracker:Of.eventSource,position:Of.position,pointerType:Of.pointerType,button:Of.button,buttons:Of.buttons,originalEvent:Of.originalEvent})}function Hf(Of){this.raiseEvent("canvas-nonprimary-release",{tracker:Of.eventSource,position:Of.position,pointerType:Of.pointerType,button:Of.button,buttons:Of.buttons,originalEvent:Of.originalEvent})}function Df(Of){var qf,cp,hp,$p;if(!Of.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.pinchToZoom&&(cp=this.viewport.pointFromPixel(Of.center,!0),hp=this.viewport.pointFromPixel(Of.lastCenter,!0),$p=hp.minus(cp),this.panHorizontal||($p.x=0),this.panVertical||($p.y=0),this.viewport.zoomBy(Of.distance/Of.lastDistance,cp,!0),qf.zoomToRefPoint&&this.viewport.panBy($p,!0),this.viewport.applyConstraints()),qf.pinchRotate)){var Vp=Math.atan2(Of.gesturePoints[0].currentPos.y-Of.gesturePoints[1].currentPos.y,Of.gesturePoints[0].currentPos.x-Of.gesturePoints[1].currentPos.x),bp=Math.atan2(Of.gesturePoints[0].lastPos.y-Of.gesturePoints[1].lastPos.y,Of.gesturePoints[0].lastPos.x-Of.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(Vp-bp)*(180/Math.PI))}return this.raiseEvent("canvas-pinch",{tracker:Of.eventSource,gesturePoints:Of.gesturePoints,lastCenter:Of.lastCenter,center:Of.center,lastDistance:Of.lastDistance,distance:Of.distance,shift:Of.shift,originalEvent:Of.originalEvent}),!1}function Lf(Of){var qf,cp,hp,$p;if(hp=F.now(),$p=hp-this._lastScrollTime,$p>this.minScrollDeltaTime){if(this._lastScrollTime=hp,this.viewport.flipped&&(Of.position.x=this.viewport.getContainerSize().x-Of.position.x),!Of.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.scrollToZoom&&(cp=Math.pow(this.zoomPerScroll,Of.scroll),this.viewport.zoomBy(cp,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints())),this.raiseEvent("canvas-scroll",{tracker:Of.eventSource,position:Of.position,scroll:Of.scroll,shift:Of.shift,originalEvent:Of.originalEvent}),qf&&qf.scrollToZoom)return!1}else if(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf&&qf.scrollToZoom)return!1}function kf(Of){W[this.hash].mouseInside=!0,po(this),this.raiseEvent("container-enter",{tracker:Of.eventSource,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Nf(Of){Of.pointers<1&&(W[this.hash].mouseInside=!1,W[this.hash].animating||yn(this)),this.raiseEvent("container-exit",{tracker:Of.eventSource,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Yf(Of){Gf(Of),Of.isOpen()?Of._updateRequestId=ot(Of,Yf):Of._updateRequestId=!1}function Gf(Of){if(!Of._opening){if(Of.autoResize){var qf=K(Of.container),cp=W[Of.hash].prevContainerSize;if(!qf.equals(cp)){var hp=Of.viewport;if(Of.preserveImageSizeOnResize){var $p=cp.x/qf.x,Vp=hp.getZoom()*$p,bp=hp.getCenter();hp.resize(qf,!1),hp.zoomTo(Vp,null,!0),hp.panTo(bp,!0)}else{var Ep=hp.getBounds();hp.resize(qf,!0),hp.fitBoundsWithConstraints(Ep,!0)}W[Of.hash].prevContainerSize=qf,W[Of.hash].forceRedraw=!0}}var _p=Of.viewport.update(),Mp=Of.world.update()||_p;_p&&Of.raiseEvent("viewport-change"),Of.referenceStrip&&(Mp=Of.referenceStrip.update(Of.viewport)||Mp),!W[Of.hash].animating&&Mp&&(Of.raiseEvent("animation-start"),po(Of)),(Mp||W[Of.hash].forceRedraw||Of.world.needsDraw())&&(rp(Of),Of._drawOverlays(),Of.navigator&&Of.navigator.update(Of.viewport),W[Of.hash].forceRedraw=!1,Mp&&Of.raiseEvent("animation")),W[Of.hash].animating&&!Mp&&(Of.raiseEvent("animation-finish"),W[Of.hash].mouseInside||yn(Of)),W[Of.hash].animating=Mp}}function rp(Of){Of.imageLoader.clear(),Of.drawer.clear(),Of.world.draw(),Of.raiseEvent("update-viewport",{})}function ip(Of,qf){return Of?Of+qf:qf}function ap(){W[this.hash].lastZoomTime=F.now(),W[this.hash].zoomFactor=this.zoomPerSecond,W[this.hash].zooming=!0,Np(this)}function yp(){W[this.hash].lastZoomTime=F.now(),W[this.hash].zoomFactor=1/this.zoomPerSecond,W[this.hash].zooming=!0,Np(this)}function vp(){W[this.hash].zooming=!1}function Np(Of){F.requestAnimationFrame(F.delegate(Of,jp))}function jp(){var Of,qf,cp;W[this.hash].zooming&&this.viewport&&(Of=F.now(),qf=Of-W[this.hash].lastZoomTime,cp=Math.pow(W[this.hash].zoomFactor,qf/1e3),this.viewport.zoomBy(cp),this.viewport.applyConstraints(),W[this.hash].lastZoomTime=Of,Np(this))}function Ip(){this.viewport&&(W[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function Jp(){this.viewport&&(W[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function ng(){this.buttons.emulateEnter(),this.buttons.emulateExit()}function og(){this.viewport&&this.viewport.goHome()}function vg(){this.isFullPage()&&!F.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttons&&this.buttons.emulateExit(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function Dp(){if(this.viewport){var Of=this.viewport.getRotation();this.viewport.flipped?Of=F.positiveModulo(Of+this.rotationIncrement,360):Of=F.positiveModulo(Of-this.rotationIncrement,360),this.viewport.setRotation(Of)}}function Lp(){if(this.viewport){var Of=this.viewport.getRotation();this.viewport.flipped?Of=F.positiveModulo(Of-this.rotationIncrement,360):Of=F.positiveModulo(Of+this.rotationIncrement,360),this.viewport.setRotation(Of)}}function xp(){this.viewport.toggleFlip()}function kp(){var Of=this._sequenceIndex-1;this.navPrevNextWrap&&Of<0&&(Of+=this.tileSources.length),this.goToPage(Of)}function lp(){var Of=this._sequenceIndex+1;this.navPrevNextWrap&&Of>=this.tileSources.length&&(Of=0),this.goToPage(Of)}}(OpenSeadragon),function(F){F.Navigator=function(ot){var ut=ot.viewer,yn=this,uo,po;ot.id?(this.element=document.getElementById(ot.id),ot.controlOptions={anchor:F.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(ot.id="navigator-"+F.now(),this.element=F.makeNeutralElement("div"),ot.controlOptions={anchor:F.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:ot.autoFade},ot.position&&(ot.position=="BOTTOM_RIGHT"?ot.controlOptions.anchor=F.ControlAnchor.BOTTOM_RIGHT:ot.position=="BOTTOM_LEFT"?ot.controlOptions.anchor=F.ControlAnchor.BOTTOM_LEFT:ot.position=="TOP_RIGHT"?ot.controlOptions.anchor=F.ControlAnchor.TOP_RIGHT:ot.position=="TOP_LEFT"?ot.controlOptions.anchor=F.ControlAnchor.TOP_LEFT:ot.position=="ABSOLUTE"&&(ot.controlOptions.anchor=F.ControlAnchor.ABSOLUTE,ot.controlOptions.top=ot.top,ot.controlOptions.left=ot.left,ot.controlOptions.height=ot.height,ot.controlOptions.width=ot.width))),this.element.id=ot.id,this.element.className+=" navigator",ot=F.extend(!0,{sizeRatio:F.DEFAULT_SETTINGS.navigatorSizeRatio},ot,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:ot.autoResize,minZoomImageRatio:1,background:ot.background,opacity:ot.opacity,borderColor:ot.borderColor,displayRegionColor:ot.displayRegionColor}),ot.minPixelRatio=this.minPixelRatio=ut.minPixelRatio,F.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new F.Point(1,1),this.totalBorderWidths=new F.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),ot.controlOptions.anchor!=F.ControlAnchor.NONE&&function(lf,yf){lf.margin="0px",lf.border=yf+"px solid "+ot.borderColor,lf.padding="0px",lf.background=ot.background,lf.opacity=ot.opacity,lf.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=F.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(lf,yf){lf.position="relative",lf.top="0px",lf.left="0px",lf.fontSize="0px",lf.overflow="hidden",lf.border=yf+"px solid "+ot.displayRegionColor,lf.margin="0px",lf.padding="0px",lf.background="transparent",lf.float="left",lf.cssFloat="left",lf.styleFloat="left",lf.zIndex=999999999,lf.cursor="default"}(this.displayRegion.style,this.borderWidth),this.displayRegionContainer=F.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",ut.addControl(this.element,ot.controlOptions),this._resizeWithViewer=ot.controlOptions.anchor!=F.ControlAnchor.ABSOLUTE&&ot.controlOptions.anchor!=F.ControlAnchor.NONE,ot.width&&ot.height?(this.setWidth(ot.width),this.setHeight(ot.height)):this._resizeWithViewer&&(uo=F.getElementSize(ut.element),this.element.style.height=Math.round(uo.y*ot.sizeRatio)+"px",this.element.style.width=Math.round(uo.x*ot.sizeRatio)+"px",this.oldViewerSize=uo,po=F.getElementSize(this.element),this.elementArea=po.x*po.y),this.oldContainerSize=new F.Point(0,0),F.Viewer.apply(this,[ot]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function mo(lf){tt(yn.displayRegionContainer,lf),tt(yn.displayRegion,-lf),yn.viewport.setRotation(lf)}if(ot.navigatorRotate){var wo=ot.viewer.viewport?ot.viewer.viewport.getRotation():ot.viewer.degrees||0;mo(wo),ot.viewer.addHandler("rotate",function(lf){mo(lf.degrees)})}this.innerTracker.destroy(),this.innerTracker=new F.MouseTracker({element:this.element,dragHandler:F.delegate(this,q),clickHandler:F.delegate(this,W),releaseHandler:F.delegate(this,K),scrollHandler:F.delegate(this,X)}),this.addHandler("reset-size",function(){yn.viewport&&yn.viewport.goHome(!0)}),ut.world.addHandler("item-index-change",function(lf){window.setTimeout(function(){var yf=yn.world.getItemAt(lf.previousIndex);yn.world.setItemIndex(yf,lf.newIndex)},1)}),ut.world.addHandler("remove-item",function(lf){var yf=lf.item,cf=yn._getMatchingItem(yf);cf&&yn.world.removeItem(cf)}),this.update(ut.viewport)},F.extend(F.Navigator.prototype,F.EventSource.prototype,F.Viewer.prototype,{updateSize:function(){if(this.viewport){var ot=new F.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);ot.equals(this.oldContainerSize)||(this.viewport.resize(ot,!0),this.viewport.goHome(!0),this.oldContainerSize=ot,this.drawer.clear(),this.world.draw())}},setWidth:function(ot){this.width=ot,this.element.style.width=typeof ot=="number"?ot+"px":ot,this._resizeWithViewer=!1},setHeight:function(ot){this.height=ot,this.element.style.height=typeof ot=="number"?ot+"px":ot,this._resizeWithViewer=!1},setFlip:function(ot){return this.viewport.setFlip(ot),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(ot){rt(this.displayRegion,ot),rt(this.canvas,ot),rt(this.element,ot)},update:function(ot){var ut,yn,uo,po,mo,wo;if(ut=F.getElementSize(this.viewer.element),this._resizeWithViewer&&ut.x&&ut.y&&!ut.equals(this.oldViewerSize)&&(this.oldViewerSize=ut,this.maintainSizeRatio||!this.elementArea?(yn=ut.x*this.sizeRatio,uo=ut.y*this.sizeRatio):(yn=Math.sqrt(this.elementArea*(ut.x/ut.y)),uo=this.elementArea/yn),this.element.style.width=Math.round(yn)+"px",this.element.style.height=Math.round(uo)+"px",this.elementArea||(this.elementArea=yn*uo),this.updateSize()),ot&&this.viewport){po=ot.getBoundsNoRotate(!0),mo=this.viewport.pixelFromPointNoRotate(po.getTopLeft(),!1),wo=this.viewport.pixelFromPointNoRotate(po.getBottomRight(),!1).minus(this.totalBorderWidths);var lf=this.displayRegion.style;lf.display=this.world.getItemCount()?"block":"none",lf.top=Math.round(mo.y)+"px",lf.left=Math.round(mo.x)+"px";var yf=Math.abs(mo.x-wo.x),cf=Math.abs(mo.y-wo.y);lf.width=Math.round(Math.max(yf,0))+"px",lf.height=Math.round(Math.max(cf,0))+"px"}},addTiledImage:function(ot){var ut=this,yn=ot.originalTiledImage;delete ot.original;var uo=F.extend({},ot,{success:function(po){var mo=po.item;mo._originalForNavigator=yn,ut._matchBounds(mo,yn,!0);function wo(){ut._matchBounds(mo,yn)}function lf(){ut._matchOpacity(mo,yn)}function yf(){ut._matchCompositeOperation(mo,yn)}yn.addHandler("bounds-change",wo),yn.addHandler("clip-change",wo),yn.addHandler("opacity-change",lf),yn.addHandler("composite-operation-change",yf)}});return F.Viewer.prototype.addTiledImage.apply(this,[uo])},_getMatchingItem:function(ot){for(var ut=this.world.getItemCount(),yn,uo=0;uo1||K.y>1));q++);return q-1},getTileAtPoint:function(q,K){var X=K.x>=0&&K.x<=1&&K.y>=0&&K.y<=1/this.aspectRatio;F.console.assert(X,"[TileSource.getTileAtPoint] must be called with a valid point.");var tt=this.dimensions.x*this.getLevelScale(q),rt=K.x*tt,ot=K.y*tt,ut=Math.floor(rt/this.getTileWidth(q)),yn=Math.floor(ot/this.getTileHeight(q));K.x>=1&&(ut=this.getNumTiles(q).x-1);var uo=1e-15;return K.y>=1/this.aspectRatio-uo&&(yn=this.getNumTiles(q).y-1),new F.Point(ut,yn)},getTileBounds:function(q,K,X,tt){var rt=this.dimensions.times(this.getLevelScale(q)),ot=this.getTileWidth(q),ut=this.getTileHeight(q),yn=K===0?0:ot*K-this.tileOverlap,uo=X===0?0:ut*X-this.tileOverlap,po=ot+(K===0?1:2)*this.tileOverlap,mo=ut+(X===0?1:2)*this.tileOverlap,wo=1/rt.x;return po=Math.min(po,rt.x-yn),mo=Math.min(mo,rt.y-uo),tt?new F.Rect(0,0,po,mo):new F.Rect(yn*wo,uo*wo,po*wo,mo*wo)},getImageInfo:function(q){var K=this,X,tt,rt,ot,ut,yn,uo;q&&(ut=q.split("/"),yn=ut[ut.length-1],uo=yn.lastIndexOf("."),uo>-1&&(ut[ut.length-1]=yn.slice(0,uo))),tt=function(po){typeof po=="string"&&(po=F.parseXml(po));var mo=F.TileSource.determineType(K,po,q);if(!mo){K.raiseEvent("open-failed",{message:"Unable to load TileSource",source:q});return}ot=mo.prototype.configure.apply(K,[po,q]),ot.ajaxWithCredentials===void 0&&(ot.ajaxWithCredentials=K.ajaxWithCredentials),rt=new mo(ot),K.ready=!0,K.raiseEvent("ready",{tileSource:rt})},q.match(/\.js$/)?(X=q.split("/").pop().replace(".js",""),F.jsonp({url:q,async:!1,callbackName:X,callback:tt})):F.makeAjaxRequest({url:q,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(po){var mo=W(po);tt(mo)},error:function(po,mo){var wo;try{wo="HTTP "+po.status+" attempting to load TileSource"}catch{var lf;typeof mo>"u"||!mo.toString?lf="Unknown error":lf=mo.toString(),wo=lf+" attempting to load TileSource"}K.raiseEvent("open-failed",{message:wo,source:q})}})},supports:function(q,K){return!1},configure:function(q,K){throw new Error("Method not implemented.")},getTileUrl:function(q,K,X){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(q,K,X){return{}},tileExists:function(q,K,X){var tt=this.getNumTiles(q);return q>=this.minLevel&&q<=this.maxLevel&&K>=0&&X>=0&&K=0;mo--)for(wo=this.displayRects[mo],lf=wo.minLevel;lf<=wo.maxLevel;lf++)this._levelRects[lf]||(this._levelRects[lf]=[]),this._levelRects[lf].push(wo);F.TileSource.apply(this,[yf])},F.extend(F.DziTileSource.prototype,F.TileSource.prototype,{supports:function(K,X){var tt;return K.Image?tt=K.Image.xmlns:K.documentElement&&(K.documentElement.localName=="Image"||K.documentElement.tagName=="Image")&&(tt=K.documentElement.namespaceURI),tt=(tt||"").toLowerCase(),tt.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||tt.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(K,X){var tt;return F.isPlainObject(K)?tt=q(this,K):tt=W(this,K),X&&!tt.tilesUrl&&(tt.tilesUrl=X.replace(/([^\/]+?)(\.(dzi|xml|js)?(\?[^\/]*)?)?\/?$/,"$1_files/"),X.search(/\.(dzi|xml|js)\?/)!=-1?tt.queryParams=X.match(/\?.*/):tt.queryParams=""),tt},getTileUrl:function(K,X,tt){return[this.tilesUrl,K,"/",X,"_",tt,".",this.fileFormat,this.queryParams].join("")},tileExists:function(K,X,tt){var rt=this._levelRects[K],ot,ut,yn,uo,po,mo,wo;if(this.minLevel&&Kthis.maxLevel)return!1;if(!rt||!rt.length)return!0;for(wo=rt.length-1;wo>=0;wo--)if(ot=rt[wo],!(Kot.maxLevel)&&(ut=this.getLevelScale(K),yn=ot.x*ut,uo=ot.y*ut,po=yn+ot.width*ut,mo=uo+ot.height*ut,yn=Math.floor(yn/this._tileWidth),uo=Math.floor(uo/this._tileWidth),po=Math.ceil(po/this._tileWidth),mo=Math.ceil(mo/this._tileWidth),yn<=X&&X0?tt.tileSize=Math.max.apply(null,po):tt.tileSize=yn}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,tt.levels=q(this),F.extend(!0,tt,{width:tt.levels[tt.levels.length-1].width,height:tt.levels[tt.levels.length-1].height,tileSize:Math.max(tt.height,tt.width),tileOverlap:0,minLevel:0,maxLevel:tt.levels.length-1}),this.levels=tt.levels):F.console.error("Nothing in the info.json to construct image pyramids from");if(!tt.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)tt.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));else{var wo=Math.max.apply(null,this.scale_factors);tt.maxLevel=Math.round(Math.log(wo)*Math.LOG2E)}F.TileSource.apply(this,[tt])},F.extend(F.IIIFTileSource.prototype,F.TileSource.prototype,{supports:function(tt,rt){return tt.protocol&&tt.protocol=="http://iiif.io/api/image"||tt["@context"]&&(tt["@context"]=="http://library.stanford.edu/iiif/image-api/1.1/context.json"||tt["@context"]=="http://iiif.io/api/image/1/context.json")||tt.profile&&tt.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||tt.identifier&&tt.width&&tt.height?!0:!!(tt.documentElement&&tt.documentElement.tagName=="info"&&tt.documentElement.namespaceURI=="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(tt,rt){if(F.isPlainObject(tt)){if(!tt["@context"])tt["@context"]="http://iiif.io/api/image/1.0/context.json",tt["@id"]=rt.replace("/info.json",""),tt.version=1;else{var ut=tt["@context"];if(Array.isArray(ut)){for(var yn=0;yn0&&tt>=this.minLevel&&tt<=this.maxLevel&&(rt=this.levels[tt].width/this.levels[this.maxLevel].width),rt}return F.TileSource.prototype.getLevelScale.call(this,tt)},getNumTiles:function(tt){if(this.emulateLegacyImagePyramid){var rt=this.getLevelScale(tt);return rt?new F.Point(1,1):new F.Point(0,0)}return F.TileSource.prototype.getNumTiles.call(this,tt)},getTileAtPoint:function(tt,rt){return this.emulateLegacyImagePyramid?new F.Point(0,0):F.TileSource.prototype.getTileAtPoint.call(this,tt,rt)},getTileUrl:function(tt,rt,ot){if(this.emulateLegacyImagePyramid){var ut=null;return this.levels.length>0&&tt>=this.minLevel&&tt<=this.maxLevel&&(ut=this.levels[tt].url),ut}var yn="0",uo=Math.pow(.5,this.maxLevel-tt),po=Math.ceil(this.width*uo),mo=Math.ceil(this.height*uo),wo,lf,yf,cf,vf,_f,$f,xf,Af,Cf,Pf,Bf,Hf,Df;return wo=this.getTileWidth(tt),lf=this.getTileHeight(tt),yf=Math.ceil(wo/uo),cf=Math.ceil(lf/uo),this.version===1?Hf="native."+this.tileFormat:Hf="default."+this.tileFormat,po1&&tt.profile[1].supports&&(yn=tt.profile[1].supports.indexOf("sizeByW")!==-1),tt.version===3&&tt.extraFeatures&&(yn=tt.extraFeatures.indexOf("sizeByWh")!==-1),!ut||yn}function q(tt){for(var rt=[],ot=0;otut?yn=ot/256:yn=ut/256,rt.maxLevel=Math.ceil(Math.log(yn)/Math.log(2))-1,rt.tileSize=256,rt.width=ot,rt.height=ut,F.TileSource.apply(this,[rt])},F.extend(F.TmsTileSource.prototype,F.TileSource.prototype,{supports:function(W,q){return W.type&&W.type=="tiledmapservice"},configure:function(W,q){return W},getTileUrl:function(W,q,K){var X=this.getNumTiles(W).y-1;return this.tilesUrl+W+"/"+q+"/"+(X-K)+".png"}})}(OpenSeadragon),function(F){F.ZoomifyTileSource=function(W){W.tileSize=256;var q={x:W.width,y:W.height};for(W.imageSizes=[{x:W.width,y:W.height}],W.gridSize=[this._getGridSize(W.width,W.height,W.tileSize)];parseInt(q.x,10)>W.tileSize||parseInt(q.y,10)>W.tileSize;)q.x=Math.floor(q.x/2),q.y=Math.floor(q.y/2),W.imageSizes.push({x:q.x,y:q.y}),W.gridSize.push(this._getGridSize(q.x,q.y,W.tileSize));W.imageSizes.reverse(),W.gridSize.reverse(),W.minLevel=0,W.maxLevel=W.gridSize.length-1,OpenSeadragon.TileSource.apply(this,[W])},F.extend(F.ZoomifyTileSource.prototype,F.TileSource.prototype,{_getGridSize:function(W,q,K){return{x:Math.ceil(W/K),y:Math.ceil(q/K)}},_calculateAbsoluteTileNumber:function(W,q,K){for(var X=0,tt={},rt=0;rt0?(rt=tt.levels[tt.levels.length-1].width,ot=tt.levels[tt.levels.length-1].height):(rt=0,ot=0,F.console.error("No supported image formats found")),F.extend(!0,tt,{width:rt,height:ot,tileSize:Math.max(ot,rt),tileOverlap:0,minLevel:0,maxLevel:tt.levels.length>0?tt.levels.length-1:0}),F.TileSource.apply(this,[tt]),this.levels=tt.levels},F.extend(F.LegacyTileSource.prototype,F.TileSource.prototype,{supports:function(X,tt){return X.type&&X.type=="legacy-image-pyramid"||X.documentElement&&X.documentElement.getAttribute("type")=="legacy-image-pyramid"},configure:function(X,tt){var rt;return F.isPlainObject(X)?rt=K(this,X):rt=q(this,X),rt},getLevelScale:function(X){var tt=NaN;return this.levels.length>0&&X>=this.minLevel&&X<=this.maxLevel&&(tt=this.levels[X].width/this.levels[this.maxLevel].width),tt},getNumTiles:function(X){var tt=this.getLevelScale(X);return tt?new F.Point(1,1):new F.Point(0,0)},getTileUrl:function(X,tt,rt){var ot=null;return this.levels.length>0&&X>=this.minLevel&&X<=this.maxLevel&&(ot=this.levels[X].url),ot}});function W(X){var tt=[],rt,ot;for(ot=0;ot");return tt.sort(function(ut,yn){return ut.height-yn.height})}function q(X,tt){if(!tt||!tt.documentElement)throw new Error(F.getString("Errors.Xml"));var rt=tt.documentElement,ot=rt.tagName,ut=null,yn=[],uo,po;if(ot=="image")try{for(ut={type:rt.getAttribute("type"),levels:[]},yn=rt.getElementsByTagName("level"),po=0;po=this.minLevel&&W<=this.maxLevel&&(q=this.levels[W].width/this.levels[this.maxLevel].width),q},getNumTiles:function(W){var q=this.getLevelScale(W);return q?new F.Point(1,1):new F.Point(0,0)},getTileUrl:function(W,q,K){var X=null;return W>=this.minLevel&&W<=this.maxLevel&&(X=this.levels[W].url),X},getContext2D:function(W,q,K){var X=null;return W>=this.minLevel&&W<=this.maxLevel&&(X=this.levels[W].context2D),X},_buildLevels:function(){var W=[{url:this._image.src,width:Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,height:Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height}];if(!this.buildPyramid||!F.supportsCanvas||!this.useCanvas)return delete this._image,W;var q=Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,K=Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height,X=document.createElement("canvas"),tt=X.getContext("2d");if(X.width=q,X.height=K,tt.drawImage(this._image,0,0,q,K),W[0].context2D=tt,delete this._image,F.isCanvasTainted(X))return W;for(;q>=2&&K>=2;){q=Math.floor(q/2),K=Math.floor(K/2);var rt=document.createElement("canvas"),ot=rt.getContext("2d");rt.width=q,rt.height=K,ot.drawImage(X,0,0,q,K),W.splice(0,0,{context2D:ot,width:q,height:K}),X=rt,tt=ot}return W}})}(OpenSeadragon),function(F){F.TileSourceCollection=function(W,q,K,X){F.console.error("TileSourceCollection is deprecated; use World instead")}}(OpenSeadragon),function(F){F.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},F.Button=function(ot){var ut=this;F.EventSource.call(this),F.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:F.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null},ot),this.element=ot.element||F.makeNeutralElement("div"),ot.element||(this.imgRest=F.makeTransparentImage(this.srcRest),this.imgGroup=F.makeTransparentImage(this.srcGroup),this.imgHover=F.makeTransparentImage(this.srcHover),this.imgDown=F.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,this.element.style.position="relative",F.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",F.Browser.vendor==F.BROWSERS.FIREFOX&&F.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=F.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new F.MouseTracker({element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(yn){yn.insideElementPressed?(tt(ut,F.ButtonState.DOWN),ut.raiseEvent("enter",{originalEvent:yn.originalEvent})):yn.buttonDownAny||tt(ut,F.ButtonState.HOVER)},focusHandler:function(yn){this.enterHandler(yn),ut.raiseEvent("focus",{originalEvent:yn.originalEvent})},exitHandler:function(yn){rt(ut,F.ButtonState.GROUP),yn.insideElementPressed&&ut.raiseEvent("exit",{originalEvent:yn.originalEvent})},blurHandler:function(yn){this.exitHandler(yn),ut.raiseEvent("blur",{originalEvent:yn.originalEvent})},pressHandler:function(yn){tt(ut,F.ButtonState.DOWN),ut.raiseEvent("press",{originalEvent:yn.originalEvent})},releaseHandler:function(yn){yn.insideElementPressed&&yn.insideElementReleased?(rt(ut,F.ButtonState.HOVER),ut.raiseEvent("release",{originalEvent:yn.originalEvent})):yn.insideElementPressed?rt(ut,F.ButtonState.GROUP):tt(ut,F.ButtonState.HOVER)},clickHandler:function(yn){yn.quick&&ut.raiseEvent("click",{originalEvent:yn.originalEvent})},keyHandler:function(yn){return yn.keyCode===13?(ut.raiseEvent("click",{originalEvent:yn.originalEvent}),ut.raiseEvent("release",{originalEvent:yn.originalEvent}),!1):!0}}),rt(this,F.ButtonState.REST)},F.extend(F.Button.prototype,F.EventSource.prototype,{notifyGroupEnter:function(){tt(this,F.ButtonState.GROUP)},notifyGroupExit:function(){rt(this,F.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,F.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,F.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()}});function W(ot){F.requestAnimationFrame(function(){q(ot)})}function q(ot){var ut,yn,uo;ot.shouldFade&&(ut=F.now(),yn=ut-ot.fadeBeginTime,uo=1-yn/ot.fadeLength,uo=Math.min(1,uo),uo=Math.max(0,uo),ot.imgGroup&&F.setElementOpacity(ot.imgGroup,uo,!0),uo>0&&W(ot))}function K(ot){ot.shouldFade=!0,ot.fadeBeginTime=F.now()+ot.fadeDelay,window.setTimeout(function(){W(ot)},ot.fadeDelay)}function X(ot){ot.shouldFade=!1,ot.imgGroup&&F.setElementOpacity(ot.imgGroup,1,!0)}function tt(ot,ut){ot.element.disabled||(ut>=F.ButtonState.GROUP&&ot.currentState==F.ButtonState.REST&&(X(ot),ot.currentState=F.ButtonState.GROUP),ut>=F.ButtonState.HOVER&&ot.currentState==F.ButtonState.GROUP&&(ot.imgHover&&(ot.imgHover.style.visibility=""),ot.currentState=F.ButtonState.HOVER),ut>=F.ButtonState.DOWN&&ot.currentState==F.ButtonState.HOVER&&(ot.imgDown&&(ot.imgDown.style.visibility=""),ot.currentState=F.ButtonState.DOWN))}function rt(ot,ut){ot.element.disabled||(ut<=F.ButtonState.HOVER&&ot.currentState==F.ButtonState.DOWN&&(ot.imgDown&&(ot.imgDown.style.visibility="hidden"),ot.currentState=F.ButtonState.HOVER),ut<=F.ButtonState.GROUP&&ot.currentState==F.ButtonState.HOVER&&(ot.imgHover&&(ot.imgHover.style.visibility="hidden"),ot.currentState=F.ButtonState.GROUP),ut<=F.ButtonState.REST&&ot.currentState==F.ButtonState.GROUP&&(K(ot),ot.currentState=F.ButtonState.REST))}}(OpenSeadragon),function(F){F.ButtonGroup=function(W){F.extend(!0,this,{buttons:[],clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:F.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},W);var q=this.buttons.concat([]),K=this,X;if(this.element=W.element||F.makeNeutralElement("div"),!W.group)for(this.element.style.display="inline-block",X=0;X=270?(rt=this.getTopRight(),this.x=rt.x,this.y=rt.y,ot=this.height,this.height=this.width,this.width=ot,this.degrees-=270):this.degrees>=180?(rt=this.getBottomRight(),this.x=rt.x,this.y=rt.y,this.degrees-=180):this.degrees>=90&&(rt=this.getBottomLeft(),this.x=rt.x,this.y=rt.y,ot=this.height,this.height=this.width,this.width=ot,this.degrees-=90)},F.Rect.fromSummits=function(W,q,K){var X=W.distanceTo(q),tt=W.distanceTo(K),rt=q.minus(W),ot=Math.atan(rt.y/rt.x);return rt.x<0?ot+=Math.PI:rt.y<0&&(ot+=2*Math.PI),new F.Rect(W.x,W.y,X,tt,ot/Math.PI*180)},F.Rect.prototype={clone:function(){return new F.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new F.Point(this.x,this.y)},getBottomRight:function(){return new F.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new F.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new F.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new F.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new F.Point(this.width,this.height)},equals:function(W){return W instanceof F.Rect&&this.x===W.x&&this.y===W.y&&this.width===W.width&&this.height===W.height&&this.degrees===W.degrees},times:function(W){return new F.Rect(this.x*W,this.y*W,this.width*W,this.height*W,this.degrees)},translate:function(W){return new F.Rect(this.x+W.x,this.y+W.y,this.width,this.height,this.degrees)},union:function(W){var q=this.getBoundingBox(),K=W.getBoundingBox(),X=Math.min(q.x,K.x),tt=Math.min(q.y,K.y),rt=Math.max(q.x+q.width,K.x+K.width),ot=Math.max(q.y+q.height,K.y+K.height);return new F.Rect(X,tt,rt-X,ot-tt)},intersection:function(W){var q=1e-10,K=[],X=this.getTopLeft();W.containsPoint(X,q)&&K.push(X);var tt=this.getTopRight();W.containsPoint(tt,q)&&K.push(tt);var rt=this.getBottomLeft();W.containsPoint(rt,q)&&K.push(rt);var ot=this.getBottomRight();W.containsPoint(ot,q)&&K.push(ot);var ut=W.getTopLeft();this.containsPoint(ut,q)&&K.push(ut);var yn=W.getTopRight();this.containsPoint(yn,q)&&K.push(yn);var uo=W.getBottomLeft();this.containsPoint(uo,q)&&K.push(uo);var po=W.getBottomRight();this.containsPoint(po,q)&&K.push(po);for(var mo=this._getSegments(),wo=W._getSegments(),lf=0;lfAf&&(Af=Hf.x),Hf.yPf&&(Pf=Hf.y)}return new F.Rect(xf,Cf,Af-xf,Pf-Cf)},_getSegments:function(){var W=this.getTopLeft(),q=this.getTopRight(),K=this.getBottomLeft(),X=this.getBottomRight();return[[W,q],[q,X],[X,K],[K,W]]},rotate:function(W,q){if(W=F.positiveModulo(W,360),W===0)return this.clone();q=q||this.getCenter();var K=this.getTopLeft().rotate(W,q),X=this.getTopRight().rotate(W,q),tt=X.minus(K);tt=tt.apply(function(ot){var ut=1e-15;return Math.abs(ot)=-q&&(W.x-X.x)*rt.x+(W.y-X.y)*rt.y<=q&&(W.x-K.x)*ot.x+(W.y-K.y)*ot.y>=-q&&(W.x-tt.x)*ot.x+(W.y-tt.y)*ot.y<=q},toString:function(){return"["+Math.round(this.x*100)/100+", "+Math.round(this.y*100)/100+", "+Math.round(this.width*100)/100+"x"+Math.round(this.height*100)/100+", "+Math.round(this.degrees*100)/100+"deg]"}}}(OpenSeadragon),function(F){var W={};F.ReferenceStrip=function(yn){var uo=this,po=yn.viewer,mo=F.getElementSize(po.element),wo,lf,yf;for(yn.id||(yn.id="referencestrip-"+F.now(),this.element=F.makeNeutralElement("div"),this.element.id=yn.id,this.element.className="referencestrip"),yn=F.extend(!0,{sizeRatio:F.DEFAULT_SETTINGS.referenceStripSizeRatio,position:F.DEFAULT_SETTINGS.referenceStripPosition,scroll:F.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold},yn,{element:this.element,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1}),F.extend(this,yn),W[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,lf=this.element.style,lf.marginTop="0px",lf.marginRight="0px",lf.marginBottom="0px",lf.marginLeft="0px",lf.left="0px",lf.bottom="0px",lf.border="0px",lf.background="#000",lf.position="relative",F.setElementTouchActionNone(this.element),F.setElementOpacity(this.element,.8),this.viewer=po,this.innerTracker=new F.MouseTracker({element:this.element,dragHandler:F.delegate(this,q),scrollHandler:F.delegate(this,K),enterHandler:F.delegate(this,tt),exitHandler:F.delegate(this,rt),keyDownHandler:F.delegate(this,ot),keyHandler:F.delegate(this,ut)}),yn.width&&yn.height?(this.element.style.width=yn.width+"px",this.element.style.height=yn.height+"px",po.addControl(this.element,{anchor:F.ControlAnchor.BOTTOM_LEFT})):yn.scroll=="horizontal"?(this.element.style.width=mo.x*yn.sizeRatio*po.tileSources.length+12*po.tileSources.length+"px",this.element.style.height=mo.y*yn.sizeRatio+"px",po.addControl(this.element,{anchor:F.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=mo.y*yn.sizeRatio*po.tileSources.length+12*po.tileSources.length+"px",this.element.style.width=mo.x*yn.sizeRatio+"px",po.addControl(this.element,{anchor:F.ControlAnchor.TOP_LEFT})),this.panelWidth=mo.x*this.sizeRatio+8,this.panelHeight=mo.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},yf=0;yflf+po.x-this.panelWidth?(cf=Math.min(cf,mo-po.x),this.element.style.marginLeft=-cf+"px",X(this,po.x,-cf)):cfyf+po.y-this.panelHeight?(cf=Math.min(cf,wo-po.y),this.element.style.marginTop=-cf+"px",X(this,po.y,-cf)):cf0?uo>-(mo-lf.x)&&(this.element.style.marginLeft=uo+yn.delta.x*2+"px",X(this,lf.x,uo+yn.delta.x*2)):-yn.delta.x<0&&uo<0&&(this.element.style.marginLeft=uo+yn.delta.x*2+"px",X(this,lf.x,uo+yn.delta.x*2)):-yn.delta.y>0?po>-(wo-lf.y)&&(this.element.style.marginTop=po+yn.delta.y*2+"px",X(this,lf.y,po+yn.delta.y*2)):-yn.delta.y<0&&po<0&&(this.element.style.marginTop=po+yn.delta.y*2+"px",X(this,lf.y,po+yn.delta.y*2))),!1}function K(yn){var uo=Number(this.element.style.marginLeft.replace("px","")),po=Number(this.element.style.marginTop.replace("px","")),mo=Number(this.element.style.width.replace("px","")),wo=Number(this.element.style.height.replace("px","")),lf=F.getElementSize(this.viewer.canvas);return this.element&&(this.scroll=="horizontal"?yn.scroll>0?uo>-(mo-lf.x)&&(this.element.style.marginLeft=uo-yn.scroll*60+"px",X(this,lf.x,uo-yn.scroll*60)):yn.scroll<0&&uo<0&&(this.element.style.marginLeft=uo-yn.scroll*60+"px",X(this,lf.x,uo-yn.scroll*60)):yn.scroll<0?po>lf.y-wo&&(this.element.style.marginTop=po+yn.scroll*60+"px",X(this,lf.y,po+yn.scroll*60)):yn.scroll>0&&po<0&&(this.element.style.marginTop=po+yn.scroll*60+"px",X(this,lf.y,po+yn.scroll*60))),!1}function X(yn,uo,po){var mo,wo,lf,yf,cf,vf,_f;for(yn.scroll=="horizontal"?mo=yn.panelWidth:mo=yn.panelHeight,wo=Math.ceil(uo/mo)+5,lf=Math.ceil((Math.abs(po)+uo)/mo)+1,wo=lf-wo,wo=wo<0?0:wo,vf=wo;vf1?K[1].springStiffness:5,animationTime:K.length>1?K[1].animationTime:1.5}),F.console.assert(typeof q.springStiffness=="number"&&q.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),F.console.assert(typeof q.animationTime=="number"&&q.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),q.exponential&&(this._exponential=!0,delete q.exponential),F.extend(!0,this,q),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:F.now()},F.console.assert(!this._exponential||this.current.value!==0,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},F.Spring.prototype={resetTo:function(q){F.console.assert(!this._exponential||q!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=q,this.start.time=this.target.time=this.current.time=F.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(q){F.console.assert(!this._exponential||q!==0,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=q,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(q){this.start.value+=q,this.target.value+=q,this._exponential&&(F.console.assert(this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(q){this._exponential=q,this._exponential&&(F.console.assert(this.current.value!==0&&this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){this.current.time=F.now();var q,K;this._exponential?(q=this.start._logValue,K=this.target._logValue):(q=this.start.value,K=this.target.value);var X=this.current.time>=this.target.time?K:q+(K-q)*W(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),tt=this.current.value;return this._exponential?this.current.value=Math.exp(X):this.current.value=X,tt!=this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function W(q,K){return(1-Math.exp(q*-K))/(1-Math.exp(-q))}}(OpenSeadragon),function(F){function W(K){F.extend(!0,this,{timeout:F.DEFAULT_SETTINGS.timeout,jobId:null},K),this.image=null}W.prototype={errorMsg:null,start:function(){var K=this,X=this.abort;this.image=new Image,this.image.onload=function(){K.finish(!0)},this.image.onabort=this.image.onerror=function(){K.errorMsg="Image load aborted",K.finish(!1)},this.jobId=window.setTimeout(function(){K.errorMsg="Image load exceeded timeout ("+K.timeout+" ms)",K.finish(!1)},this.timeout),this.loadWithAjax?(this.request=F.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(tt){var rt;try{rt=new window.Blob([tt.response])}catch(uo){var ot=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(uo.name==="TypeError"&&ot){var ut=new ot;ut.append(tt.response),rt=ut.getBlob()}}rt.size===0&&(K.errorMsg="Empty image response.",K.finish(!1));var yn=(window.URL||window.webkitURL).createObjectURL(rt);K.image.src=yn},error:function(tt){K.errorMsg="Image load aborted - XHR error",K.finish(!1)}}),this.abort=function(){K.request.abort(),typeof X=="function"&&X()}):(this.crossOriginPolicy!==!1&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(K){this.image.onload=this.image.onerror=this.image.onabort=null,K||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},F.ImageLoader=function(K){F.extend(!0,this,{jobLimit:F.DEFAULT_SETTINGS.imageLoaderLimit,timeout:F.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},K)},F.ImageLoader.prototype={addJob:function(K){var X=this,tt=function(ut){q(X,ut,K.callback)},rt={src:K.src,loadWithAjax:K.loadWithAjax,ajaxHeaders:K.loadWithAjax?K.ajaxHeaders:null,crossOriginPolicy:K.crossOriginPolicy,ajaxWithCredentials:K.ajaxWithCredentials,callback:tt,abort:K.abort,timeout:this.timeout},ot=new W(rt);!this.jobLimit||this.jobsInProgress0&&(rt=K.jobQueue.shift(),rt.start(),K.jobsInProgress++),tt(X.image,X.errorMsg,X.request)}}(OpenSeadragon),function(F){F.Tile=function(W,q,K,X,tt,rt,ot,ut,yn,uo){this.level=W,this.x=q,this.y=K,this.bounds=X,this.sourceBounds=uo,this.exists=tt,this.url=rt,this.context2D=ot,this.loadWithAjax=ut,this.ajaxHeaders=yn,this.ajaxHeaders?this.cacheKey=this.url+"+"+JSON.stringify(this.ajaxHeaders):this.cacheKey=this.url,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.image=null,this.style=null,this.position=null,this.size=null,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},F.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return!!this.context2D||this.url.match(".png")},drawHTML:function(W){if(!this.cacheImageRecord){F.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString());return}if(!this.loaded){F.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}this.element||(this.element=F.makeNeutralElement("div"),this.imgElement=this.cacheImageRecord.getImage().cloneNode(),this.imgElement.style.msInterpolationMode="nearest-neighbor",this.imgElement.style.width="100%",this.imgElement.style.height="100%",this.style=this.element.style,this.style.position="absolute"),this.element.parentNode!=W&&W.appendChild(this.element),this.imgElement.parentNode!=this.element&&this.element.appendChild(this.imgElement),this.style.top=this.position.y+"px",this.style.left=this.position.x+"px",this.style.height=this.size.y+"px",this.style.width=this.size.x+"px",F.setElementOpacity(this.element,this.opacity)},drawCanvas:function(W,q,K,X){var tt=this.position.times(F.pixelDensityRatio),rt=this.size.times(F.pixelDensityRatio),ot;if(!this.context2D&&!this.cacheImageRecord){F.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString());return}if(ot=this.context2D||this.cacheImageRecord.getRenderedContext(),!this.loaded||!ot){F.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}W.save(),W.globalAlpha=this.opacity,typeof K=="number"&&K!==1&&(tt=tt.times(K),rt=rt.times(K)),X instanceof F.Point&&(tt=tt.plus(X)),W.globalAlpha===1&&this._hasTransparencyChannel()&&W.clearRect(tt.x,tt.y,rt.x,rt.y),q({context:W,tile:this,rendered:ot});var ut,yn;this.sourceBounds?(ut=Math.min(this.sourceBounds.width,ot.canvas.width),yn=Math.min(this.sourceBounds.height,ot.canvas.height)):(ut=ot.canvas.width,yn=ot.canvas.height),W.drawImage(ot.canvas,0,0,ut,yn,tt.x,tt.y,rt.x,rt.y),W.restore()},getScaleForEdgeSmoothing:function(){var W;if(this.cacheImageRecord)W=this.cacheImageRecord.getRenderedContext();else if(this.context2D)W=this.context2D;else return F.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return W.canvas.width/(this.size.x*F.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(W,q,K){var X=Math.max(1,Math.ceil((K.x-q.x)/2)),tt=Math.max(1,Math.ceil((K.y-q.y)/2));return new F.Point(X,tt).minus(this.position.times(F.pixelDensityRatio).times(W||1).apply(function(rt){return rt%1}))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}}(OpenSeadragon),function(F){F.OverlayPlacement=F.Placement,F.OverlayRotationMode=F.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),F.Overlay=function(W,q,K){var X;F.isPlainObject(W)?X=W:X={element:W,location:q,placement:K},this.element=X.element,this.style=X.element.style,this._init(X)},F.Overlay.prototype={_init:function(W){this.location=W.location,this.placement=W.placement===void 0?F.Placement.TOP_LEFT:W.placement,this.onDraw=W.onDraw,this.checkResize=W.checkResize===void 0?!0:W.checkResize,this.width=W.width===void 0?null:W.width,this.height=W.height===void 0?null:W.height,this.rotationMode=W.rotationMode||F.OverlayRotationMode.EXACT,this.location instanceof F.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=F.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new F.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(W,q){var K=F.Placement.properties[this.placement];K&&(K.isHorizontallyCentered?W.x-=q.x/2:K.isRight&&(W.x-=q.x),K.isVerticallyCentered?W.y-=q.y/2:K.isBottom&&(W.y-=q.y))},destroy:function(){var W=this.element,q=this.style;W.parentNode&&(W.parentNode.removeChild(W),W.prevElementParent&&(q.display="none",document.body.appendChild(W))),this.onDraw=null,q.top="",q.left="",q.position="",this.width!==null&&(q.width=""),this.height!==null&&(q.height="");var K=F.getCssPropertyWithVendorPrefix("transformOrigin"),X=F.getCssPropertyWithVendorPrefix("transform");K&&X&&(q[K]="",q[X]="")},drawHTML:function(W,q){var K=this.element;K.parentNode!==W&&(K.prevElementParent=K.parentNode,K.prevNextSibling=K.nextSibling,W.appendChild(K),this.style.position="absolute",this.size=F.getElementSize(K));var X=this._getOverlayPositionAndSize(q),tt=X.position,rt=this.size=X.size,ot=X.rotate;if(this.onDraw)this.onDraw(tt,rt,this.element);else{var ut=this.style;ut.left=tt.x+"px",ut.top=tt.y+"px",this.width!==null&&(ut.width=rt.x+"px"),this.height!==null&&(ut.height=rt.y+"px");var yn=F.getCssPropertyWithVendorPrefix("transformOrigin"),uo=F.getCssPropertyWithVendorPrefix("transform");yn&&uo&&(ot?(ut[yn]=this._getTransformOrigin(),ut[uo]="rotate("+ot+"deg)"):(ut[yn]="",ut[uo]="")),ut.display!=="none"&&(ut.display="block")}},_getOverlayPositionAndSize:function(W){var q=W.pixelFromPoint(this.location,!0),K=this._getSizeInPixels(W);this.adjust(q,K);var X=0;if(W.degrees&&this.rotationMode!==F.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===F.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var tt=new F.Rect(q.x,q.y,K.x,K.y),rt=this._getBoundingBox(tt,W.degrees);q=rt.getTopLeft(),K=rt.getSize()}else X=W.degrees;return{position:q,size:K,rotate:X}},_getSizeInPixels:function(W){var q=this.size.x,K=this.size.y;if(this.width!==null||this.height!==null){var X=W.deltaPixelsFromPointsNoRotate(new F.Point(this.width||0,this.height||0),!0);this.width!==null&&(q=X.x),this.height!==null&&(K=X.y)}if(this.checkResize&&(this.width===null||this.height===null)){var tt=this.size=F.getElementSize(this.element);this.width===null&&(q=tt.x),this.height===null&&(K=tt.y)}return new F.Point(q,K)},_getBoundingBox:function(W,q){var K=this._getPlacementPoint(W);return W.rotate(q,K).getBoundingBox()},_getPlacementPoint:function(W){var q=new F.Point(W.x,W.y),K=F.Placement.properties[this.placement];return K&&(K.isHorizontallyCentered?q.x+=W.width/2:K.isRight&&(q.x+=W.width),K.isVerticallyCentered?q.y+=W.height/2:K.isBottom&&(q.y+=W.height)),q},_getTransformOrigin:function(){var W="",q=F.Placement.properties[this.placement];return q&&(q.isLeft?W="left":q.isRight&&(W="right"),q.isTop?W+=" top":q.isBottom&&(W+=" bottom")),W},update:function(W,q){var K=F.isPlainObject(W)?W:{location:W,placement:q};this._init({location:K.location||this.location,placement:K.placement!==void 0?K.placement:this.placement,onDraw:K.onDraw||this.onDraw,checkResize:K.checkResize||this.checkResize,width:K.width!==void 0?K.width:this.width,height:K.height!==void 0?K.height:this.height,rotationMode:K.rotationMode||this.rotationMode})},getBounds:function(W){F.console.assert(W,"A viewport must now be passed to Overlay.getBounds.");var q=this.width,K=this.height;if(q===null||K===null){var X=W.deltaPointsFromPixelsNoRotate(this.size,!0);q===null&&(q=X.x),K===null&&(K=X.y)}var tt=this.location.clone();return this.adjust(tt,new F.Point(q,K)),this._adjustBoundsForRotation(W,new F.Rect(tt.x,tt.y,q,K))},_adjustBoundsForRotation:function(W,q){if(!W||W.degrees===0||this.rotationMode===F.OverlayRotationMode.EXACT)return q;if(this.rotationMode===F.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return q;var K=this._getOverlayPositionAndSize(W);return W.viewerElementToViewportRectangle(new F.Rect(K.position.x,K.position.y,K.size.x,K.size.y))}return q.rotate(-W.degrees,this._getPlacementPoint(q))}}}(OpenSeadragon),function(F){F.Drawer=function(W){F.console.assert(W.viewer,"[Drawer] options.viewer is required");var q=arguments;if(F.isPlainObject(W)||(W={source:q[0],viewport:q[1],element:q[2]}),F.console.assert(W.viewport,"[Drawer] options.viewport is required"),F.console.assert(W.element,"[Drawer] options.element is required"),W.source&&F.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=W.viewer,this.viewport=W.viewport,this.debugGridColor=typeof W.debugGridColor=="string"?[W.debugGridColor]:W.debugGridColor||F.DEFAULT_SETTINGS.debugGridColor,W.opacity&&F.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=F.supportsCanvas&&(this.viewer?this.viewer.useCanvas:!0),this.container=F.getElement(W.element),this.canvas=F.makeNeutralElement(this.useCanvas?"canvas":"div"),this.context=this.useCanvas?this.canvas.getContext("2d"):null,this.sketchCanvas=null,this.sketchContext=null,this.element=this.container,this.container.dir="ltr",this.useCanvas){var K=this._calculateCanvasSize();this.canvas.width=K.x,this.canvas.height=K.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",F.setElementOpacity(this.canvas,this.opacity,!0),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},F.Drawer.prototype={addOverlay:function(W,q,K,X){return F.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(W,q,K,X),this},updateOverlay:function(W,q,K){return F.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(W,q,K),this},removeOverlay:function(W){return F.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(W),this},clearOverlays:function(){return F.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(W){var q=this.viewport.pixelFromPointNoRotate(W,!0);return new F.Point(q.x*F.pixelDensityRatio,q.y*F.pixelDensityRatio)},clipWithPolygons:function(W,q){if(this.useCanvas){var K=this._getContext(q);K.beginPath(),W.forEach(function(X){X.forEach(function(tt,rt){K[rt===0?"moveTo":"lineTo"](tt.x,tt.y)})}),K.clip()}},setOpacity:function(W){F.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var q=this.viewer.world,K=0;Kq&&(q=X)}return q},needsUpdate:function(){return F.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return F.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return F.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return F.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var W=this._calculateCanvasSize();if((this.canvas.width!=W.x||this.canvas.height!=W.y)&&(this.canvas.width=W.x,this.canvas.height=W.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var q=this._calculateSketchCanvasSize();this.sketchCanvas.width=q.x,this.sketchCanvas.height=q.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(W,q){if(this.useCanvas){var K=this._getContext(W);if(q)K.clearRect(q.x,q.y,q.width,q.height);else{var X=K.canvas;K.clearRect(0,0,X.width,X.height)}}},viewportToDrawerRectangle:function(W){var q=this.viewport.pixelFromPointNoRotate(W.getTopLeft(),!0),K=this.viewport.deltaPixelsFromPointsNoRotate(W.getSize(),!0);return new F.Rect(q.x*F.pixelDensityRatio,q.y*F.pixelDensityRatio,K.x*F.pixelDensityRatio,K.y*F.pixelDensityRatio)},drawTile:function(W,q,K,X,tt){if(F.console.assert(W,"[Drawer.drawTile] tile is required"),F.console.assert(q,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var rt=this._getContext(K);X=X||1,W.drawCanvas(rt,q,X,tt)}else W.drawHTML(this.canvas)},_getContext:function(W){var q=this.context;if(W){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var K=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=K.x,this.sketchCanvas.height=K.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var X=this;this.viewer.addHandler("rotate",function tt(){if(X.viewport.getRotation()!==0){X.viewer.removeHandler("rotate",tt);var rt=X._calculateSketchCanvasSize();X.sketchCanvas.width=rt.x,X.sketchCanvas.height=rt.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}q=this.sketchContext}return q},saveContext:function(W){this.useCanvas&&this._getContext(W).save()},restoreContext:function(W){this.useCanvas&&this._getContext(W).restore()},setClip:function(W,q){if(this.useCanvas){var K=this._getContext(q);K.beginPath(),K.rect(W.x,W.y,W.width,W.height),K.clip()}},drawRectangle:function(W,q,K){if(this.useCanvas){var X=this._getContext(K);X.save(),X.fillStyle=q,X.fillRect(W.x,W.y,W.width,W.height),X.restore()}},blendSketch:function(W,q,K,X){var tt=W;if(F.isPlainObject(tt)||(tt={opacity:W,scale:q,translate:K,compositeOperation:X}),!(!this.useCanvas||!this.sketchCanvas)){W=tt.opacity,X=tt.compositeOperation;var rt=tt.bounds;if(this.context.save(),this.context.globalAlpha=W,X&&(this.context.globalCompositeOperation=X),rt)rt.x<0&&(rt.width+=rt.x,rt.x=0),rt.x+rt.width>this.canvas.width&&(rt.width=this.canvas.width-rt.x),rt.y<0&&(rt.height+=rt.y,rt.y=0),rt.y+rt.height>this.canvas.height&&(rt.height=this.canvas.height-rt.y),this.context.drawImage(this.sketchCanvas,rt.x,rt.y,rt.width,rt.height,rt.x,rt.y,rt.width,rt.height);else{q=tt.scale||1,K=tt.translate;var ot=K instanceof F.Point?K:new F.Point(0,0),ut=0,yn=0;if(K){var uo=this.sketchCanvas.width-this.canvas.width,po=this.sketchCanvas.height-this.canvas.height;ut=Math.round(uo/2),yn=Math.round(po/2)}this.context.drawImage(this.sketchCanvas,ot.x-ut*q,ot.y-yn*q,(this.canvas.width+2*ut)*q,(this.canvas.height+2*yn)*q,-ut,-yn,this.canvas.width+2*ut,this.canvas.height+2*yn)}this.context.restore()}},drawDebugInfo:function(W,q,K,X){if(this.useCanvas){var tt=this.viewer.world.getIndexOfItem(X)%this.debugGridColor.length,rt=this.context;rt.save(),rt.lineWidth=2*F.pixelDensityRatio,rt.font="small-caps bold "+13*F.pixelDensityRatio+"px arial",rt.strokeStyle=this.debugGridColor[tt],rt.fillStyle=this.debugGridColor[tt],this.viewport.degrees!==0&&this._offsetForRotation({degrees:this.viewport.degrees}),X.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:X.getRotation(!0),point:X.viewport.pixelFromPointNoRotate(X._getRotationPoint(!0),!0)}),X.viewport.degrees===0&&X.getRotation(!0)%360===0&&X._drawer.viewer.viewport.getFlip()&&X._drawer._flip(),rt.strokeRect(W.position.x*F.pixelDensityRatio,W.position.y*F.pixelDensityRatio,W.size.x*F.pixelDensityRatio,W.size.y*F.pixelDensityRatio);var ot=(W.position.x+W.size.x/2)*F.pixelDensityRatio,ut=(W.position.y+W.size.y/2)*F.pixelDensityRatio;rt.translate(ot,ut),rt.rotate(Math.PI/180*-this.viewport.degrees),rt.translate(-ot,-ut),W.x===0&&W.y===0&&(rt.fillText("Zoom: "+this.viewport.getZoom(),W.position.x*F.pixelDensityRatio,(W.position.y-30)*F.pixelDensityRatio),rt.fillText("Pan: "+this.viewport.getBounds().toString(),W.position.x*F.pixelDensityRatio,(W.position.y-20)*F.pixelDensityRatio)),rt.fillText("Level: "+W.level,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+20)*F.pixelDensityRatio),rt.fillText("Column: "+W.x,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+30)*F.pixelDensityRatio),rt.fillText("Row: "+W.y,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+40)*F.pixelDensityRatio),rt.fillText("Order: "+K+" of "+q,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+50)*F.pixelDensityRatio),rt.fillText("Size: "+W.size.toString(),(W.position.x+10)*F.pixelDensityRatio,(W.position.y+60)*F.pixelDensityRatio),rt.fillText("Position: "+W.position.toString(),(W.position.x+10)*F.pixelDensityRatio,(W.position.y+70)*F.pixelDensityRatio),this.viewport.degrees!==0&&this._restoreRotationChanges(),X.getRotation(!0)%360!==0&&this._restoreRotationChanges(),X.viewport.degrees===0&&X.getRotation(!0)%360===0&&X._drawer.viewer.viewport.getFlip()&&X._drawer._flip(),rt.restore()}},debugRect:function(W){if(this.useCanvas){var q=this.context;q.save(),q.lineWidth=2*F.pixelDensityRatio,q.strokeStyle=this.debugGridColor[0],q.fillStyle=this.debugGridColor[0],q.strokeRect(W.x*F.pixelDensityRatio,W.y*F.pixelDensityRatio,W.width*F.pixelDensityRatio,W.height*F.pixelDensityRatio),q.restore()}},setImageSmoothingEnabled:function(W){this.useCanvas&&(this._imageSmoothingEnabled=W,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(W){W.msImageSmoothingEnabled=this._imageSmoothingEnabled,W.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(W){var q=this._getContext(W).canvas;return new F.Point(q.width,q.height)},getCanvasCenter:function(){return new F.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(W){var q=W.point?W.point.times(F.pixelDensityRatio):this.getCanvasCenter(),K=this._getContext(W.useSketch);K.save(),K.translate(q.x,q.y),this.viewer.viewport.flipped?(K.rotate(Math.PI/180*-W.degrees),K.scale(-1,1)):K.rotate(Math.PI/180*W.degrees),K.translate(-q.x,-q.y)},_flip:function(W){W=W||{};var q=W.point?W.point.times(F.pixelDensityRatio):this.getCanvasCenter(),K=this._getContext(W.useSketch);K.translate(q.x,0),K.scale(-1,1),K.translate(-q.x,0)},_restoreRotationChanges:function(W){var q=this._getContext(W);q.restore()},_calculateCanvasSize:function(){var W=F.pixelDensityRatio,q=this.viewport.getContainerSize();return{x:Math.round(q.x*W),y:Math.round(q.y*W)}},_calculateSketchCanvasSize:function(){var W=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return W;var q=Math.ceil(Math.sqrt(W.x*W.x+W.y*W.y));return{x:q,y:q}}}}(OpenSeadragon),function(F){F.Viewport=function(W){var q=arguments;q.length&&q[0]instanceof F.Point&&(W={containerSize:q[0],contentSize:q[1],config:q[2]}),W.config&&(F.extend(!0,W,W.config),delete W.config),this._margins=F.extend({left:0,top:0,right:0,bottom:0},W.margins||{}),delete W.margins,F.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:F.DEFAULT_SETTINGS.springStiffness,animationTime:F.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:F.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:F.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:F.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:F.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:F.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:F.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:F.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:F.DEFAULT_SETTINGS.maxZoomLevel,degrees:F.DEFAULT_SETTINGS.degrees,flipped:F.DEFAULT_SETTINGS.flipped,homeFillsViewer:F.DEFAULT_SETTINGS.homeFillsViewer},W),this._updateContainerInnerSize(),this.centerSpringX=new F.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new F.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new F.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new F.Rect(0,0,1,1),1),this.goHome(!0),this.update()},F.Viewport.prototype={resetContentSize:function(W){return F.console.assert(W,"[Viewport.resetContentSize] contentSize is required"),F.console.assert(W instanceof F.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),F.console.assert(W.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),F.console.assert(W.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new F.Rect(0,0,1,W.y/W.x),W.x),this},setHomeBounds:function(W,q){F.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(W,q)},_setContentBounds:function(W,q){F.console.assert(W,"[Viewport._setContentBounds] bounds is required"),F.console.assert(W instanceof F.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),F.console.assert(W.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),F.console.assert(W.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=W.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(q),this._contentBounds=W.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(q),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:q,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var W=this._contentAspectRatio/this.getAspectRatio(),q;return this.homeFillsViewer?q=W>=1?W:1:q=W>=1?1:W,q/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var W=this._contentBounds.getCenter(),q=1/this.getHomeZoom(),K=q/this.getAspectRatio();return new F.Rect(W.x-q/2,W.y-K/2,q,K)},goHome:function(W){return this.viewer&&this.viewer.raiseEvent("home",{immediately:W}),this.fitBounds(this.getHomeBounds(),W)},getMinZoom:function(){var W=this.getHomeZoom(),q=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*W;return q},getMaxZoom:function(){var W=this.maxZoomLevel;return W||(W=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,W/=this._contentBounds.width),Math.max(W,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new F.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return F.extend({},this._margins)},setMargins:function(W){F.console.assert(F.type(W)==="object","[Viewport.setMargins] margins must be an object"),this._margins=F.extend({left:0,top:0,right:0,bottom:0},W),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(W){return this.getBoundsNoRotate(W).rotate(-this.getRotation())},getBoundsNoRotate:function(W){var q=this.getCenter(W),K=1/this.getZoom(W),X=K/this.getAspectRatio();return new F.Rect(q.x-K/2,q.y-X/2,K,X)},getBoundsWithMargins:function(W){return this.getBoundsNoRotateWithMargins(W).rotate(-this.getRotation(),this.getCenter(W))},getBoundsNoRotateWithMargins:function(W){var q=this.getBoundsNoRotate(W),K=this._containerInnerSize.x*this.getZoom(W);return q.x-=this._margins.left/K,q.y-=this._margins.top/K,q.width+=(this._margins.left+this._margins.right)/K,q.height+=(this._margins.top+this._margins.bottom)/K,q},getCenter:function(W){var q=new F.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),K=new F.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),X,tt,rt,ot,ut,yn,uo,po;return W?q:this.zoomPoint?(X=this.pixelFromPoint(this.zoomPoint,!0),tt=this.getZoom(),rt=1/tt,ot=rt/this.getAspectRatio(),ut=new F.Rect(q.x-rt/2,q.y-ot/2,rt,ot),yn=this._pixelFromPoint(this.zoomPoint,ut),uo=yn.minus(X),po=uo.divide(this._containerInnerSize.x*tt),K.plus(po)):K},getZoom:function(W){return W?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(W){return Math.max(Math.min(W,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(W){var q=new F.Rect(W.x,W.y,W.width,W.height);if(!this.wrapHorizontal){var K=this.visibilityRatio*q.width,X=q.x+q.width,tt=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,rt=this._contentBoundsNoRotate.x-X+K,ot=tt-q.x-K;K>this._contentBoundsNoRotate.width?q.x+=(rt+ot)/2:ot<0?q.x+=ot:rt>0&&(q.x+=rt)}if(!this.wrapVertical){var ut=this.visibilityRatio*q.height,yn=q.y+q.height,uo=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,po=this._contentBoundsNoRotate.y-yn+ut,mo=uo-q.y-ut;ut>this._contentBoundsNoRotate.height?q.y+=(po+mo)/2:mo<0?q.y+=mo:po>0&&(q.y+=po)}return q},_raiseConstraintsEvent:function(W){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:W})},applyConstraints:function(W){var q=this.getZoom(),K=this._applyZoomConstraints(q);q!==K&&this.zoomTo(K,this.zoomPoint,W);var X=this.getBoundsNoRotate(),tt=this._applyBoundaryConstraints(X);return this._raiseConstraintsEvent(W),(X.x!==tt.x||X.y!==tt.y||W)&&this.fitBounds(tt.rotate(-this.getRotation()),W),this},ensureVisible:function(W){return this.applyConstraints(W)},_fitBounds:function(W,q){q=q||{};var K=q.immediately||!1,X=q.constraints||!1,tt=this.getAspectRatio(),rt=W.getCenter(),ot=new F.Rect(W.x,W.y,W.width,W.height,W.degrees+this.getRotation()).getBoundingBox();ot.getAspectRatio()>=tt?ot.height=ot.width/tt:ot.width=ot.height*tt,ot.x=rt.x-ot.width/2,ot.y=rt.y-ot.height/2;var ut=1/ot.width;if(X){var yn=ot.getAspectRatio(),uo=this._applyZoomConstraints(ut);ut!==uo&&(ut=uo,ot.width=1/ut,ot.x=rt.x-ot.width/2,ot.height=ot.width/yn,ot.y=rt.y-ot.height/2),ot=this._applyBoundaryConstraints(ot),rt=ot.getCenter(),this._raiseConstraintsEvent(K)}if(K)return this.panTo(rt,!0),this.zoomTo(ut,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var po=this.getBounds(),mo=this.getZoom();if(mo===0||Math.abs(ut/mo-1)<1e-8)return this.zoomTo(ut,!0),this.panTo(rt,K);ot=ot.rotate(-this.getRotation());var wo=ot.getTopLeft().times(ut).minus(po.getTopLeft().times(mo)).divide(ut-mo);return this.zoomTo(ut,wo,K)},fitBounds:function(W,q){return this._fitBounds(W,{immediately:q,constraints:!1})},fitBoundsWithConstraints:function(W,q){return this._fitBounds(W,{immediately:q,constraints:!0})},fitVertically:function(W){var q=new F.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(q,W)},fitHorizontally:function(W){var q=new F.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(q,W)},getConstrainedBounds:function(W){var q,K;return q=this.getBounds(W),K=this._applyBoundaryConstraints(q),K},panBy:function(W,q){var K=new F.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(K.plus(W),q)},panTo:function(W,q){return q?(this.centerSpringX.resetTo(W.x),this.centerSpringY.resetTo(W.y)):(this.centerSpringX.springTo(W.x),this.centerSpringY.springTo(W.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:W,immediately:q}),this},zoomBy:function(W,q,K){return this.zoomTo(this.zoomSpring.target.value*W,q,K)},zoomTo:function(W,q,K){var X=this;return this.zoomPoint=q instanceof F.Point&&!isNaN(q.x)&&!isNaN(q.y)?q:null,K?this._adjustCenterSpringsForZoomPoint(function(){X.zoomSpring.resetTo(W)}):this.zoomSpring.springTo(W),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:W,refPoint:q,immediately:K}),this},setRotation:function(W){return!this.viewer||!this.viewer.drawer.canRotate()?this:(this.degrees=F.positiveModulo(W,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:W}),this)},getRotation:function(){return this.degrees},resize:function(W,q){var K=this.getBoundsNoRotate(),X=K,tt;return this.containerSize.x=W.x,this.containerSize.y=W.y,this._updateContainerInnerSize(),q&&(tt=W.x/this.containerSize.x,X.width=K.width*tt,X.height=X.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:W,maintain:q}),this.fitBounds(X,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new F.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var W=this;this._adjustCenterSpringsForZoomPoint(function(){W.zoomSpring.update()}),this.centerSpringX.update(),this.centerSpringY.update();var q=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,q},_adjustCenterSpringsForZoomPoint:function(W){if(this.zoomPoint){var q=this.pixelFromPoint(this.zoomPoint,!0);W();var K=this.pixelFromPoint(this.zoomPoint,!0),X=K.minus(q),tt=this.deltaPointsFromPixels(X,!0);this.centerSpringX.shiftBy(tt.x),this.centerSpringY.shiftBy(tt.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else W()},deltaPixelsFromPointsNoRotate:function(W,q){return W.times(this._containerInnerSize.x*this.getZoom(q))},deltaPixelsFromPoints:function(W,q){return this.deltaPixelsFromPointsNoRotate(W.rotate(this.getRotation()),q)},deltaPointsFromPixelsNoRotate:function(W,q){return W.divide(this._containerInnerSize.x*this.getZoom(q))},deltaPointsFromPixels:function(W,q){return this.deltaPointsFromPixelsNoRotate(W,q).rotate(-this.getRotation())},pixelFromPointNoRotate:function(W,q){return this._pixelFromPointNoRotate(W,this.getBoundsNoRotate(q))},pixelFromPoint:function(W,q){return this._pixelFromPoint(W,this.getBoundsNoRotate(q))},_pixelFromPointNoRotate:function(W,q){return W.minus(q.getTopLeft()).times(this._containerInnerSize.x/q.width).plus(new F.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(W,q){return this._pixelFromPointNoRotate(W.rotate(this.getRotation(),this.getCenter(!0)),q)},pointFromPixelNoRotate:function(W,q){var K=this.getBoundsNoRotate(q);return W.minus(new F.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/K.width).plus(K.getTopLeft())},pointFromPixel:function(W,q){return this.pointFromPixelNoRotate(W,q).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(W,q){var K=this._contentBoundsNoRotate.width;return new F.Point(W*this._contentSizeNoRotate.x/K,q*this._contentSizeNoRotate.x/K)},viewportToImageCoordinates:function(W,q){if(W instanceof F.Point)return this.viewportToImageCoordinates(W.x,W.y);if(this.viewer){var K=this.viewer.world.getItemCount();if(K>1)F.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(K===1){var X=this.viewer.world.getItemAt(0);return X.viewportToImageCoordinates(W,q,!0)}}return this._viewportToImageDelta(W-this._contentBoundsNoRotate.x,q-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(W,q){var K=this._contentBoundsNoRotate.width;return new F.Point(W/this._contentSizeNoRotate.x*K,q/this._contentSizeNoRotate.x*K)},imageToViewportCoordinates:function(W,q){if(W instanceof F.Point)return this.imageToViewportCoordinates(W.x,W.y);if(this.viewer){var K=this.viewer.world.getItemCount();if(K>1)F.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(K===1){var X=this.viewer.world.getItemAt(0);return X.imageToViewportCoordinates(W,q,!0)}}var tt=this._imageToViewportDelta(W,q);return tt.x+=this._contentBoundsNoRotate.x,tt.y+=this._contentBoundsNoRotate.y,tt},imageToViewportRectangle:function(W,q,K,X){var tt=W;if(tt instanceof F.Rect||(tt=new F.Rect(W,q,K,X)),this.viewer){var rt=this.viewer.world.getItemCount();if(rt>1)F.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(rt===1){var ot=this.viewer.world.getItemAt(0);return ot.imageToViewportRectangle(W,q,K,X,!0)}}var ut=this.imageToViewportCoordinates(tt.x,tt.y),yn=this._imageToViewportDelta(tt.width,tt.height);return new F.Rect(ut.x,ut.y,yn.x,yn.y,tt.degrees)},viewportToImageRectangle:function(W,q,K,X){var tt=W;if(tt instanceof F.Rect||(tt=new F.Rect(W,q,K,X)),this.viewer){var rt=this.viewer.world.getItemCount();if(rt>1)F.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(rt===1){var ot=this.viewer.world.getItemAt(0);return ot.viewportToImageRectangle(W,q,K,X,!0)}}var ut=this.viewportToImageCoordinates(tt.x,tt.y),yn=this._viewportToImageDelta(tt.width,tt.height);return new F.Rect(ut.x,ut.y,yn.x,yn.y,tt.degrees)},viewerElementToImageCoordinates:function(W){var q=this.pointFromPixel(W,!0);return this.viewportToImageCoordinates(q)},imageToViewerElementCoordinates:function(W){var q=this.imageToViewportCoordinates(W);return this.pixelFromPoint(q,!0)},windowToImageCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var q=W.minus(F.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(q)},imageToWindowCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var q=this.imageToViewerElementCoordinates(W);return q.plus(F.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(W){return this.pointFromPixel(W,!0)},viewportToViewerElementCoordinates:function(W){return this.pixelFromPoint(W,!0)},viewerElementToViewportRectangle:function(W){return F.Rect.fromSummits(this.pointFromPixel(W.getTopLeft(),!0),this.pointFromPixel(W.getTopRight(),!0),this.pointFromPixel(W.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(W){return F.Rect.fromSummits(this.pixelFromPoint(W.getTopLeft(),!0),this.pixelFromPoint(W.getTopRight(),!0),this.pixelFromPoint(W.getBottomLeft(),!0))},windowToViewportCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var q=W.minus(F.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(q)},viewportToWindowCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var q=this.viewportToViewerElementCoordinates(W);return q.plus(F.getElementPosition(this.viewer.element))},viewportToImageZoom:function(W){if(this.viewer){var q=this.viewer.world.getItemCount();if(q>1)F.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(q===1){var K=this.viewer.world.getItemAt(0);return K.viewportToImageZoom(W)}}var X=this._contentSizeNoRotate.x,tt=this._containerInnerSize.x,rt=this._contentBoundsNoRotate.width,ot=tt/X*rt;return W*ot},imageToViewportZoom:function(W){if(this.viewer){var q=this.viewer.world.getItemCount();if(q>1)F.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(q===1){var K=this.viewer.world.getItemAt(0);return K.imageToViewportZoom(W)}}var X=this._contentSizeNoRotate.x,tt=this._containerInnerSize.x,rt=this._contentBoundsNoRotate.width,ot=X/tt/rt;return W*ot},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(W){return this.flipped===W?this:(this.flipped=W,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:W}),this)}}}(OpenSeadragon),function(F){F.TiledImage=function(cf){var vf=this;F.console.assert(cf.tileCache,"[TiledImage] options.tileCache is required"),F.console.assert(cf.drawer,"[TiledImage] options.drawer is required"),F.console.assert(cf.viewer,"[TiledImage] options.viewer is required"),F.console.assert(cf.imageLoader,"[TiledImage] options.imageLoader is required"),F.console.assert(cf.source,"[TiledImage] options.source is required"),F.console.assert(!cf.clip||cf.clip instanceof F.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),F.EventSource.call(this),this._tileCache=cf.tileCache,delete cf.tileCache,this._drawer=cf.drawer,delete cf.drawer,this._imageLoader=cf.imageLoader,delete cf.imageLoader,cf.clip instanceof F.Rect&&(this._clip=cf.clip.clone()),delete cf.clip;var _f=cf.x||0;delete cf.x;var $f=cf.y||0;delete cf.y,this.normHeight=cf.source.dimensions.y/cf.source.dimensions.x,this.contentAspectX=cf.source.dimensions.x/cf.source.dimensions.y;var xf=1;cf.width?(xf=cf.width,delete cf.width,cf.height&&(F.console.error("specifying both width and height to a tiledImage is not supported"),delete cf.height)):cf.height&&(xf=cf.height/this.normHeight,delete cf.height);var Af=cf.fitBounds;delete cf.fitBounds;var Cf=cf.fitBoundsPlacement||OpenSeadragon.Placement.CENTER;delete cf.fitBoundsPlacement;var Pf=cf.degrees||0;delete cf.degrees,F.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:F.DEFAULT_SETTINGS.springStiffness,animationTime:F.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:F.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:F.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:F.DEFAULT_SETTINGS.wrapVertical,immediateRender:F.DEFAULT_SETTINGS.immediateRender,blendTime:F.DEFAULT_SETTINGS.blendTime,alwaysBlend:F.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:F.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:F.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:F.DEFAULT_SETTINGS.iOSDevice,debugMode:F.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:F.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:F.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:F.DEFAULT_SETTINGS.placeholderFillStyle,opacity:F.DEFAULT_SETTINGS.opacity,preload:F.DEFAULT_SETTINGS.preload,compositeOperation:F.DEFAULT_SETTINGS.compositeOperation},cf),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new F.Spring({initial:_f,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new F.Spring({initial:$f,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new F.Spring({initial:xf,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new F.Spring({initial:Pf,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),Af&&this.fitBounds(Af,Cf,!0),this._drawingHandler=function(Bf){vf.viewer.raiseEvent("tile-drawing",F.extend({tiledImage:vf},Bf))}},F.extend(F.TiledImage.prototype,F.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(cf){cf!==this._fullyLoaded&&(this._fullyLoaded=cf,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=F.now(),this._needsDraw=!0},update:function(){var cf=this._xSpring.update(),vf=this._ySpring.update(),_f=this._scaleSpring.update(),$f=this._degreesSpring.update();return cf||vf||_f||$f?(this._updateForScale(),this._needsDraw=!0,!0):!1},draw:function(){this.opacity!==0||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset()},getBounds:function(cf){return this.getBoundsNoRotate(cf).rotate(this.getRotation(cf),this._getRotationPoint(cf))},getBoundsNoRotate:function(cf){return cf?new F.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new F.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return F.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(cf){var vf=this.getBoundsNoRotate(cf);if(this._clip){var _f=cf?this._worldWidthCurrent:this._worldWidthTarget,$f=_f/this.source.dimensions.x,xf=this._clip.times($f);vf=new F.Rect(vf.x+xf.x,vf.y+xf.y,xf.width,xf.height)}return vf.rotate(this.getRotation(cf),this._getRotationPoint(cf))},getContentSize:function(){return new F.Point(this.source.dimensions.x,this.source.dimensions.y)},_viewportToImageDelta:function(cf,vf,_f){var $f=_f?this._scaleSpring.current.value:this._scaleSpring.target.value;return new F.Point(cf*(this.source.dimensions.x/$f),vf*(this.source.dimensions.y*this.contentAspectX/$f))},viewportToImageCoordinates:function(cf,vf,_f){var $f;return cf instanceof F.Point?(_f=vf,$f=cf):$f=new F.Point(cf,vf),$f=$f.rotate(-this.getRotation(_f),this._getRotationPoint(_f)),_f?this._viewportToImageDelta($f.x-this._xSpring.current.value,$f.y-this._ySpring.current.value):this._viewportToImageDelta($f.x-this._xSpring.target.value,$f.y-this._ySpring.target.value)},_imageToViewportDelta:function(cf,vf,_f){var $f=_f?this._scaleSpring.current.value:this._scaleSpring.target.value;return new F.Point(cf/this.source.dimensions.x*$f,vf/this.source.dimensions.y/this.contentAspectX*$f)},imageToViewportCoordinates:function(cf,vf,_f){cf instanceof F.Point&&(_f=vf,vf=cf.y,cf=cf.x);var $f=this._imageToViewportDelta(cf,vf);return _f?($f.x+=this._xSpring.current.value,$f.y+=this._ySpring.current.value):($f.x+=this._xSpring.target.value,$f.y+=this._ySpring.target.value),$f.rotate(this.getRotation(_f),this._getRotationPoint(_f))},imageToViewportRectangle:function(cf,vf,_f,$f,xf){var Af=cf;Af instanceof F.Rect?xf=vf:Af=new F.Rect(cf,vf,_f,$f);var Cf=this.imageToViewportCoordinates(Af.getTopLeft(),xf),Pf=this._imageToViewportDelta(Af.width,Af.height,xf);return new F.Rect(Cf.x,Cf.y,Pf.x,Pf.y,Af.degrees+this.getRotation(xf))},viewportToImageRectangle:function(cf,vf,_f,$f,xf){var Af=cf;cf instanceof F.Rect?xf=vf:Af=new F.Rect(cf,vf,_f,$f);var Cf=this.viewportToImageCoordinates(Af.getTopLeft(),xf),Pf=this._viewportToImageDelta(Af.width,Af.height,xf);return new F.Rect(Cf.x,Cf.y,Pf.x,Pf.y,Af.degrees-this.getRotation(xf))},viewerElementToImageCoordinates:function(cf){var vf=this.viewport.pointFromPixel(cf,!0);return this.viewportToImageCoordinates(vf)},imageToViewerElementCoordinates:function(cf){var vf=this.imageToViewportCoordinates(cf);return this.viewport.pixelFromPoint(vf,!0)},windowToImageCoordinates:function(cf){var vf=cf.minus(OpenSeadragon.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(vf)},imageToWindowCoordinates:function(cf){var vf=this.imageToViewerElementCoordinates(cf);return vf.plus(OpenSeadragon.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(cf){var vf=this._scaleSpring.current.value;return cf=cf.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new F.Rect((cf.x-this._xSpring.current.value)/vf,(cf.y-this._ySpring.current.value)/vf,cf.width/vf,cf.height/vf,cf.degrees)},viewportToImageZoom:function(cf){var vf=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return vf*cf},imageToViewportZoom:function(cf){var vf=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return cf/vf},setPosition:function(cf,vf){var _f=this._xSpring.target.value===cf.x&&this._ySpring.target.value===cf.y;if(vf){if(_f&&this._xSpring.current.value===cf.x&&this._ySpring.current.value===cf.y)return;this._xSpring.resetTo(cf.x),this._ySpring.resetTo(cf.y),this._needsDraw=!0}else{if(_f)return;this._xSpring.springTo(cf.x),this._ySpring.springTo(cf.y),this._needsDraw=!0}_f||this._raiseBoundsChange()},setWidth:function(cf,vf){this._setScale(cf,vf)},setHeight:function(cf,vf){this._setScale(cf/this.normHeight,vf)},setCroppingPolygons:function(cf){var vf=function($f){return $f instanceof F.Point||typeof $f.x=="number"&&typeof $f.y=="number"},_f=function($f){return $f.map(function(xf){try{if(vf(xf))return{x:xf.x,y:xf.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!F.isArray(cf))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=cf.map(function($f){return _f($f)})}catch($f){F.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),F.console.error($f),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(cf,vf,_f){vf=vf||F.Placement.CENTER;var $f=F.Placement.properties[vf],xf=this.contentAspectX,Af=0,Cf=0,Pf=1,Bf=1;if(this._clip&&(xf=this._clip.getAspectRatio(),Pf=this._clip.width/this.source.dimensions.x,Bf=this._clip.height/this.source.dimensions.y,cf.getAspectRatio()>xf?(Af=this._clip.x/this._clip.height*cf.height,Cf=this._clip.y/this._clip.height*cf.height):(Af=this._clip.x/this._clip.width*cf.width,Cf=this._clip.y/this._clip.width*cf.width)),cf.getAspectRatio()>xf){var Hf=cf.height/Bf,Df=0;$f.isHorizontallyCentered?Df=(cf.width-cf.height*xf)/2:$f.isRight&&(Df=cf.width-cf.height*xf),this.setPosition(new F.Point(cf.x-Af+Df,cf.y-Cf),_f),this.setHeight(Hf,_f)}else{var Lf=cf.width/Pf,kf=0;$f.isVerticallyCentered?kf=(cf.height-cf.width/xf)/2:$f.isBottom&&(kf=cf.height-cf.width/xf),this.setPosition(new F.Point(cf.x-Af,cf.y-Cf+kf),_f),this.setWidth(Lf,_f)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(cf){F.console.assert(!cf||cf instanceof F.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),cf instanceof F.Rect?this._clip=cf.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getOpacity:function(){return this.opacity},setOpacity:function(cf){cf!==this.opacity&&(this.opacity=cf,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(cf){this._preload=!!cf,this._needsDraw=!0},getRotation:function(cf){return cf?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(cf,vf){this._degreesSpring.target.value===cf&&this._degreesSpring.isAtTargetValue()||(vf?this._degreesSpring.resetTo(cf):this._degreesSpring.springTo(cf),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(cf){return this.getBoundsNoRotate(cf).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(cf){cf!==this.compositeOperation&&(this.compositeOperation=cf,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(cf,vf){var _f=this._scaleSpring.target.value===cf;if(vf){if(_f&&this._scaleSpring.current.value===cf)return;this._scaleSpring.resetTo(cf),this._updateForScale(),this._needsDraw=!0}else{if(_f)return;this._scaleSpring.springTo(cf),this._updateForScale(),this._needsDraw=!0}_f||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var cf=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),vf=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,_f=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(vf/this.minPixelRatio)/Math.log(2))));return _f=Math.max(_f,this.source.minLevel||0),cf=Math.min(cf,_f),{lowestLevel:cf,highestLevel:_f}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){var cf=this.lastDrawn.pop();cf.beingDrawn=!1}var vf=this.viewport,_f=this._viewportToTiledImageRectangle(vf.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var $f=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(_f=_f.intersection($f),_f===null)return}for(var xf=this._getLevelsInterval(),Af=xf.lowestLevel,Cf=xf.highestLevel,Pf=null,Bf=!1,Hf=F.now(),Df=Cf;Df>=Af;Df--){var Lf=!1,kf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Df),!0).x*this._scaleSpring.current.value;if(Df===Af||!Bf&&kf>=this.minPixelRatio)Lf=!0,Bf=!0;else if(!Bf)continue;var Nf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Df),!1).x*this._scaleSpring.current.value,Yf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,Gf=this.immediateRender?1:Yf,rp=Math.min(1,(kf-.5)/.5),ip=Gf/Math.abs(Gf-Nf);if(Pf=W(this,Bf,Lf,Df,rp,ip,_f,Hf,Pf),yn(this.coverage,Df))break}lf(this,this.lastDrawn),Pf&&!Pf.context2D?(X(this,Pf,Hf),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(this._tilesLoading===0)},_getCornerTiles:function(cf,vf,_f){var $f,xf;this.wrapHorizontal?($f=F.positiveModulo(vf.x,1),xf=F.positiveModulo(_f.x,1)):($f=Math.max(0,vf.x),xf=Math.min(1,_f.x));var Af,Cf,Pf=1/this.source.aspectRatio;this.wrapVertical?(Af=F.positiveModulo(vf.y,Pf),Cf=F.positiveModulo(_f.y,Pf)):(Af=Math.max(0,vf.y),Cf=Math.min(Pf,_f.y));var Bf=this.source.getTileAtPoint(cf,new F.Point($f,Af)),Hf=this.source.getTileAtPoint(cf,new F.Point(xf,Cf)),Df=this.source.getNumTiles(cf);return this.wrapHorizontal&&(Bf.x+=Df.x*Math.floor(vf.x),Hf.x+=Df.x*Math.floor(_f.x)),this.wrapVertical&&(Bf.y+=Df.y*Math.floor(vf.y/Pf),Hf.y+=Df.y*Math.floor(_f.y/Pf)),{topLeft:Bf,bottomRight:Hf}}});function W(cf,vf,_f,$f,xf,Af,Cf,Pf,Bf){var Hf=Cf.getBoundingBox().getTopLeft(),Df=Cf.getBoundingBox().getBottomRight();cf.viewer&&cf.viewer.raiseEvent("update-level",{tiledImage:cf,havedrawn:vf,level:$f,opacity:xf,visibility:Af,drawArea:Cf,topleft:Hf,bottomright:Df,currenttime:Pf,best:Bf}),mo(cf.coverage,$f),mo(cf.loadingCoverage,$f);for(var Lf=cf._getCornerTiles($f,Hf,Df),kf=Lf.topLeft,Nf=Lf.bottomRight,Yf=cf.source.getNumTiles($f),Gf=cf.viewport.pixelFromPoint(cf.viewport.getCenter()),rp=kf.x;rp<=Nf.x;rp++)for(var ip=kf.y;ip<=Nf.y;ip++){if(!cf.wrapHorizontal&&!cf.wrapVertical){var ap=cf.source.getTileBounds($f,rp,ip);if(Cf.intersection(ap)===null)continue}Bf=q(cf,_f,vf,rp,ip,$f,xf,Af,Gf,Yf,Pf,Bf)}return Bf}function q(cf,vf,_f,$f,xf,Af,Cf,Pf,Bf,Hf,Df,Lf){var kf=K($f,xf,Af,cf,cf.source,cf.tilesMatrix,Df,Hf,cf._worldWidthCurrent,cf._worldHeightCurrent),Nf=_f;cf.viewer&&cf.viewer.raiseEvent("update-tile",{tiledImage:cf,tile:kf}),po(cf.coverage,Af,$f,xf,!1);var Yf=kf.loaded||kf.loading||uo(cf.loadingCoverage,Af,$f,xf);if(po(cf.loadingCoverage,Af,$f,xf,Yf),!kf.exists||(vf&&!Nf&&(uo(cf.coverage,Af,$f,xf)?po(cf.coverage,Af,$f,xf,!0):Nf=!0),!Nf))return Lf;if(ot(kf,cf.source.tileOverlap,cf.viewport,Bf,Pf,cf),!kf.loaded)if(kf.context2D)rt(cf,kf);else{var Gf=cf._tileCache.getImageRecord(kf.cacheKey);if(Gf){var rp=Gf.getImage();rt(cf,kf,rp)}}if(kf.loaded){var ip=ut(cf,kf,$f,xf,Af,Cf,Df);ip&&(cf._needsDraw=!0)}else kf.loading?cf._tilesLoading++:Yf||(Lf=wo(Lf,kf));return Lf}function K(cf,vf,_f,$f,xf,Af,Cf,Pf,Bf,Hf){var Df,Lf,kf,Nf,Yf,Gf,rp,ip,ap;return Af[_f]||(Af[_f]={}),Af[_f][cf]||(Af[_f][cf]={}),Af[_f][cf][vf]||(Df=(Pf.x+cf%Pf.x)%Pf.x,Lf=(Pf.y+vf%Pf.y)%Pf.y,kf=xf.getTileBounds(_f,Df,Lf),Nf=xf.getTileBounds(_f,Df,Lf,!0),Yf=xf.tileExists(_f,Df,Lf),Gf=xf.getTileUrl(_f,Df,Lf),$f.loadTilesWithAjax?(rp=xf.getTileAjaxHeaders(_f,Df,Lf),F.isPlainObject($f.ajaxHeaders)&&(rp=F.extend({},$f.ajaxHeaders,rp))):rp=null,ip=xf.getContext2D?xf.getContext2D(_f,Df,Lf):void 0,kf.x+=(cf-Df)/Pf.x,kf.y+=Hf/Bf*((vf-Lf)/Pf.y),ap=new F.Tile(_f,cf,vf,kf,Yf,Gf,ip,$f.loadTilesWithAjax,rp,Nf),Df===Pf.x-1&&(ap.isRightMost=!0),Lf===Pf.y-1&&(ap.isBottomMost=!0),Af[_f][cf][vf]=ap),ap=Af[_f][cf][vf],ap.lastTouchTime=Cf,ap}function X(cf,vf,_f){vf.loading=!0,cf._imageLoader.addJob({src:vf.url,loadWithAjax:vf.loadWithAjax,ajaxHeaders:vf.ajaxHeaders,crossOriginPolicy:cf.crossOriginPolicy,ajaxWithCredentials:cf.ajaxWithCredentials,callback:function($f,xf,Af){tt(cf,vf,_f,$f,xf,Af)},abort:function(){vf.loading=!1}})}function tt(cf,vf,_f,$f,xf,Af){if(!$f){F.console.log("Tile %s failed to load: %s - error: %s",vf,vf.url,xf),cf.viewer.raiseEvent("tile-load-failed",{tile:vf,tiledImage:cf,time:_f,message:xf,tileRequest:Af}),vf.loading=!1,vf.exists=!1;return}if(_fcf.visibility||vf.visibility==cf.visibility&&vf.squaredDistance1&&Pf>cf.smoothTileEdgesMinZoom&&!cf.iOSDevice&&cf.getRotation(!0)%360===0&&F.supportsCanvas&&($f=!0,xf=_f.getScaleForEdgeSmoothing(),Af=_f.getTranslationForEdgeSmoothing(xf,cf._drawer.getCanvasSize(!1),cf._drawer.getCanvasSize(!0)));var Bf;$f&&(xf||(Bf=cf.viewport.viewportToViewerElementRectangle(cf.getClippedBounds(!0)).getIntegerBoundingBox(),cf._drawer.viewer.viewport.getFlip()&&(cf.viewport.degrees!==0||cf.getRotation(!0)%360!==0)&&(Bf.x=cf._drawer.viewer.container.clientWidth-(Bf.x+Bf.width)),Bf=Bf.times(F.pixelDensityRatio)),cf._drawer._clear(!0,Bf)),xf||(cf.viewport.degrees!==0&&cf._drawer._offsetForRotation({degrees:cf.viewport.degrees,useSketch:$f}),cf.getRotation(!0)%360!==0&&cf._drawer._offsetForRotation({degrees:cf.getRotation(!0),point:cf.viewport.pixelFromPointNoRotate(cf._getRotationPoint(!0),!0),useSketch:$f}),cf.viewport.degrees===0&&cf.getRotation(!0)%360===0&&cf._drawer.viewer.viewport.getFlip()&&cf._drawer._flip());var Hf=!1;if(cf._clip){cf._drawer.saveContext($f);var Df=cf.imageToViewportRectangle(cf._clip,!0);Df=Df.rotate(-cf.getRotation(!0),cf._getRotationPoint(!0));var Lf=cf._drawer.viewportToDrawerRectangle(Df);xf&&(Lf=Lf.times(xf)),Af&&(Lf=Lf.translate(Af)),cf._drawer.setClip(Lf,$f),Hf=!0}if(cf._croppingPolygons){cf._drawer.saveContext($f);try{var kf=cf._croppingPolygons.map(function(rp){return rp.map(function(ip){var ap=cf.imageToViewportCoordinates(ip.x,ip.y,!0).rotate(-cf.getRotation(!0),cf._getRotationPoint(!0)),yp=cf._drawer.viewportCoordToDrawerCoord(ap);return xf&&(yp=yp.times(xf)),yp})});cf._drawer.clipWithPolygons(kf,$f)}catch(rp){F.console.error(rp)}Hf=!0}if(cf.placeholderFillStyle&&cf._hasOpaqueTile===!1){var Nf=cf._drawer.viewportToDrawerRectangle(cf.getBounds(!0));xf&&(Nf=Nf.times(xf)),Af&&(Nf=Nf.translate(Af));var Yf=null;typeof cf.placeholderFillStyle=="function"?Yf=cf.placeholderFillStyle(cf,cf._drawer.context):Yf=cf.placeholderFillStyle,cf._drawer.drawRectangle(Nf,Yf,$f)}for(var Gf=vf.length-1;Gf>=0;Gf--)_f=vf[Gf],cf._drawer.drawTile(_f,cf._drawingHandler,$f,xf,Af),_f.beingDrawn=!0,cf.viewer&&cf.viewer.raiseEvent("tile-drawn",{tiledImage:cf,tile:_f});Hf&&cf._drawer.restoreContext($f),xf||(cf.getRotation(!0)%360!==0&&cf._drawer._restoreRotationChanges($f),cf.viewport.degrees!==0&&cf._drawer._restoreRotationChanges($f)),$f&&(xf&&(cf.viewport.degrees!==0&&cf._drawer._offsetForRotation({degrees:cf.viewport.degrees,useSketch:!1}),cf.getRotation(!0)%360!==0&&cf._drawer._offsetForRotation({degrees:cf.getRotation(!0),point:cf.viewport.pixelFromPointNoRotate(cf._getRotationPoint(!0),!0),useSketch:!1})),cf._drawer.blendSketch({opacity:cf.opacity,scale:xf,translate:Af,compositeOperation:cf.compositeOperation,bounds:Bf}),xf&&(cf.getRotation(!0)%360!==0&&cf._drawer._restoreRotationChanges(!1),cf.viewport.degrees!==0&&cf._drawer._restoreRotationChanges(!1))),xf||cf.viewport.degrees===0&&cf.getRotation(!0)%360===0&&cf._drawer.viewer.viewport.getFlip()&&cf._drawer._flip(),yf(cf,vf)}}function yf(cf,vf){if(cf.debugMode)for(var _f=vf.length-1;_f>=0;_f--){var $f=vf[_f];try{cf._drawer.drawDebugInfo($f,vf.length,_f,cf)}catch(xf){F.console.error(xf)}}}}(OpenSeadragon),function(F){var W=function(K){F.console.assert(K,"[TileCache.cacheTile] options is required"),F.console.assert(K.tile,"[TileCache.cacheTile] options.tile is required"),F.console.assert(K.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=K.tile,this.tiledImage=K.tiledImage},q=function(K){F.console.assert(K,"[ImageRecord] options is required"),F.console.assert(K.image,"[ImageRecord] options.image is required"),this._image=K.image,this._tiles=[]};q.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var K=document.createElement("canvas");K.width=this._image.width,K.height=this._image.height,this._renderedContext=K.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(K){F.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=K},addTile:function(K){F.console.assert(K,"[ImageRecord.addTile] tile is required"),this._tiles.push(K)},removeTile:function(K){for(var X=0;Xthis._maxImageCacheCount){for(var ot=null,ut=-1,yn=null,uo,po,mo,wo,lf,yf,cf=this._tilesLoaded.length-1;cf>=0;cf--)if(yf=this._tilesLoaded[cf],uo=yf.tile,!(uo.level<=X||uo.beingDrawn)){if(!ot){ot=uo,ut=cf,yn=yf;continue}wo=uo.lastTouchTime,po=ot.lastTouchTime,lf=uo.level,mo=ot.level,(womo)&&(ot=uo,ut=cf,yn=yf)}ot&&ut>=0&&(this._unloadTile(yn),tt=ut)}this._tilesLoaded[tt]=new W({tile:K.tile,tiledImage:K.tiledImage})},clearTilesFor:function(K){F.console.assert(K,"[TileCache.clearTilesFor] tiledImage is required");for(var X,tt=0;tt=this._items.length)throw new Error("Index bigger than number of layers.");q===K||K===-1||(this._items.splice(K,1),this._items.splice(q,0,W),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:W,previousIndex:K,newIndex:q}))},removeItem:function(W){F.console.assert(W,"[World.removeItem] item is required");var q=F.indexOf(this._items,W);q!==-1&&(W.removeHandler("bounds-change",this._delegatedFigureSizes),W.removeHandler("clip-change",this._delegatedFigureSizes),W.destroy(),this._items.splice(q,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(W))},removeAll:function(){this.viewer._cancelPendingImages();var W,q;for(q=0;qwo.height?lf=rt:lf=rt*(wo.width/wo.height),yf=lf*(wo.height/wo.width),cf=new F.Point(uo+(rt-lf)/2,po+(rt-yf)/2),mo.setPosition(cf,q),mo.setWidth(lf,q),K==="horizontal"?uo+=ut:po+=ut;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var W=this._homeBounds?this._homeBounds.clone():null,q=this._contentSize?this._contentSize.clone():null,K=this._contentFactor||0;if(!this._items.length)this._homeBounds=new F.Rect(0,0,1,1),this._contentSize=new F.Point(1,1),this._contentFactor=1;else{var X=this._items[0],tt=X.getBounds();this._contentFactor=X.getContentSize().x/tt.width;for(var rt=X.getClippedBounds().getBoundingBox(),ot=rt.x,ut=rt.y,yn=rt.x+rt.width,uo=rt.y+rt.height,po=1;pout.version.major)throw new Error("OpenSeadragonViewerInputHook requires OpenSeadragon version 1.0.0+");return ut.Viewer.prototype.addViewerInputHook=function(uo){return(uo=uo||{}).viewer=this,new yn.ViewerInputHook(uo)},yn.ViewerInputHook=function(uo){var po,mo;for((uo=uo||{}).hooks=uo.hooks||[],this.viewer=uo.viewer||null,this.viewerTrackers={},this.hooks=[],this.viewer&&(this.viewerTrackers.viewer=this.viewer.innerTracker,this.viewerTrackers.viewer_outer=this.viewer.outerTracker),po=0;polf in wo?q(wo,lf,{enumerable:!0,configurable:!0,writable:!0,value:yf}):wo[lf]=yf,yn=(wo,lf)=>{for(var yf in lf||(lf={}))rt.call(lf,yf)&&ut(wo,yf,lf[yf]);if(tt)for(var yf of tt(lf))ot.call(lf,yf)&&ut(wo,yf,lf[yf]);return wo},uo=(wo,lf)=>K(wo,X(lf)),po=(wo,lf)=>{var yf={};for(var cf in wo)rt.call(wo,cf)&&lf.indexOf(cf)<0&&(yf[cf]=wo[cf]);if(wo!=null&&tt)for(var cf of tt(wo))lf.indexOf(cf)<0&&ot.call(wo,cf)&&(yf[cf]=wo[cf]);return yf},mo=(wo,lf,yf)=>(ut(wo,typeof lf!="symbol"?lf+"":lf,yf),yf);(function(wo,lf){F.exports=lf(requireOpenseadragon())})(commonjsGlobal$3,function(wo){function lf(go){return go&&typeof go=="object"&&"default"in go?go:{default:go}}var yf=lf(wo),cf,vf,_f,$f,xf,Af,Cf,Pf={},Bf=[],Hf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Df(go,xo){for(var uf in xo)go[uf]=xo[uf];return go}function Lf(go){var xo=go.parentNode;xo&&xo.removeChild(go)}function kf(go,xo,uf){var df,gf,Ef,Rf={};for(Ef in xo)Ef=="key"?df=xo[Ef]:Ef=="ref"?gf=xo[Ef]:Rf[Ef]=xo[Ef];if(arguments.length>2&&(Rf.children=arguments.length>3?cf.call(arguments,2):uf),typeof go=="function"&&go.defaultProps!=null)for(Ef in go.defaultProps)Rf[Ef]===void 0&&(Rf[Ef]=go.defaultProps[Ef]);return Nf(go,Rf,df,gf,null)}function Nf(go,xo,uf,df,gf){var Ef={type:go,props:xo,key:uf,ref:df,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:gf??++_f};return vf.vnode!=null&&vf.vnode(Ef),Ef}function Yf(){return{current:null}}function Gf(go){return go.children}function rp(go,xo){this.props=go,this.context=xo}function ip(go,xo){if(xo==null)return go.__?ip(go.__,go.__.__k.indexOf(go)+1):null;for(var uf;xo0?Nf(Pp.type,Pp.props,Pp.key,null,Pp.__v):Pp)!=null){if(Pp.__=uf,Pp.__b=uf.__b+1,(Tp=Tg[Jf])===null||Tp&&Pp.key==Tp.key&&Pp.type===Tp.type)Tg[Jf]=void 0;else for(mp=0;mp2&&(Rf.children=arguments.length>3?cf.call(arguments,2):uf),Nf(go.type,Rf,df||go.key,gf||go.ref,null)}function bp(go,xo){var uf={__c:xo="__cC"+Cf++,__:go,Consumer:function(df,gf){return df.children(gf)},Provider:function(df){var gf,Ef;return this.getChildContext||(gf=[],(Ef={})[xo]=this,this.getChildContext=function(){return Ef},this.shouldComponentUpdate=function(Rf){this.props.value!==Rf.value&&gf.some(yp)},this.sub=function(Rf){gf.push(Rf);var Vf=Rf.componentWillUnmount;Rf.componentWillUnmount=function(){gf.splice(gf.indexOf(Rf),1),Vf&&Vf.call(Rf)}}),df.children}};return uf.Provider.__=uf.Consumer.contextType=uf}cf=Bf.slice,vf={__e:function(go,xo){for(var uf,df,gf;xo=xo.__;)if((uf=xo.__c)&&!uf.__)try{if((df=uf.constructor)&&df.getDerivedStateFromError!=null&&(uf.setState(df.getDerivedStateFromError(go)),gf=uf.__d),uf.componentDidCatch!=null&&(uf.componentDidCatch(go),gf=uf.__d),gf)return uf.__E=uf}catch(Ef){go=Ef}throw go}},_f=0,rp.prototype.setState=function(go,xo){var uf;uf=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Df({},this.state),typeof go=="function"&&(go=go(Df({},uf),this.props)),go&&Df(uf,go),go!=null&&this.__v&&(xo&&this.__h.push(xo),yp(this))},rp.prototype.forceUpdate=function(go){this.__v&&(this.__e=!0,go&&this.__h.push(go),yp(this))},rp.prototype.render=Gf,$f=[],xf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,vp.__r=0,Cf=0;var Ep,_p,Mp,Yp=0,ug=[],hg=vf.__b,xg=vf.__r,kg=vf.diffed,Dg=vf.__c,lm=vf.unmount;function Bp(go,xo){vf.__h&&vf.__h(_p,go,Yp||xo),Yp=0;var uf=_p.__H||(_p.__H={__:[],__h:[]});return go>=uf.__.length&&uf.__.push({}),uf.__[go]}function Rp(go){return Yp=1,Fp(Hg,go)}function Fp(go,xo,uf){var df=Bp(Ep++,2);return df.t=go,df.__c||(df.__=[uf?uf(xo):Hg(void 0,xo),function(gf){var Ef=df.t(df.__[0],gf);df.__[0]!==Ef&&(df.__=[Ef,df.__[1]],df.__c.setState({}))}],df.__c=_p),df.__}function Op(go,xo){var uf=Bp(Ep++,3);!vf.__s&&mm(uf.__H,xo)&&(uf.__=go,uf.__H=xo,_p.__H.__h.push(uf))}function Kp(go,xo){var uf=Bp(Ep++,4);!vf.__s&&mm(uf.__H,xo)&&(uf.__=go,uf.__H=xo,_p.__h.push(uf))}function Kf(go){return Yp=5,gp(function(){return{current:go}},[])}function Xf(go,xo,uf){Yp=6,Kp(function(){typeof go=="function"?go(xo()):go&&(go.current=xo())},uf==null?uf:uf.concat(go))}function gp(go,xo){var uf=Bp(Ep++,7);return mm(uf.__H,xo)&&(uf.__=go(),uf.__H=xo,uf.__h=go),uf.__}function wp(go,xo){return Yp=8,gp(function(){return go},xo)}function dg(go){var xo=_p.context[go.__c],uf=Bp(Ep++,9);return uf.c=go,xo?(uf.__==null&&(uf.__=!0,xo.sub(_p)),xo.props.value):go.__}function mg(go,xo){vf.useDebugValue&&vf.useDebugValue(xo?xo(go):go)}function pg(go){var xo=Bp(Ep++,10),uf=Rp();return xo.__=go,_p.componentDidCatch||(_p.componentDidCatch=function(df){xo.__&&xo.__(df),uf[1](df)}),[uf[0],function(){uf[1](void 0)}]}function wg(){ug.forEach(function(go){if(go.__P)try{go.__H.__h.forEach(Bg),go.__H.__h.forEach(Xg),go.__H.__h=[]}catch(xo){go.__H.__h=[],vf.__e(xo,go.__v)}}),ug=[]}vf.__b=function(go){_p=null,hg&&hg(go)},vf.__r=function(go){xg&&xg(go),Ep=0;var xo=(_p=go.__c).__H;xo&&(xo.__h.forEach(Bg),xo.__h.forEach(Xg),xo.__h=[])},vf.diffed=function(go){kg&&kg(go);var xo=go.__c;xo&&xo.__H&&xo.__H.__h.length&&(ug.push(xo)!==1&&Mp===vf.requestAnimationFrame||((Mp=vf.requestAnimationFrame)||function(uf){var df,gf=function(){clearTimeout(Ef),Cg&&cancelAnimationFrame(df),setTimeout(uf)},Ef=setTimeout(gf,100);Cg&&(df=requestAnimationFrame(gf))})(wg)),_p=void 0},vf.__c=function(go,xo){xo.some(function(uf){try{uf.__h.forEach(Bg),uf.__h=uf.__h.filter(function(df){return!df.__||Xg(df)})}catch(df){xo.some(function(gf){gf.__h&&(gf.__h=[])}),xo=[],vf.__e(df,uf.__v)}}),Dg&&Dg(go,xo)},vf.unmount=function(go){lm&&lm(go);var xo=go.__c;if(xo&&xo.__H)try{xo.__H.__.forEach(Bg)}catch(uf){vf.__e(uf,xo.__v)}};var Cg=typeof requestAnimationFrame=="function";function Bg(go){var xo=_p;typeof go.__c=="function"&&go.__c(),_p=xo}function Xg(go){var xo=_p;go.__c=go.__(),_p=xo}function mm(go,xo){return!go||go.length!==xo.length||xo.some(function(uf,df){return uf!==go[df]})}function Hg(go,xo){return typeof xo=="function"?xo(go):xo}function Iy(go,xo){for(var uf in xo)go[uf]=xo[uf];return go}function py(go,xo){for(var uf in go)if(uf!=="__source"&&!(uf in xo))return!0;for(var df in xo)if(df!=="__source"&&go[df]!==xo[df])return!0;return!1}function Yy(go){this.props=go}function Yb(go,xo){function uf(gf){var Ef=this.props.ref,Rf=Ef==gf.ref;return!Rf&&Ef&&(Ef.call?Ef(null):Ef.current=null),xo?!xo(this.props,gf)||!Rf:py(this.props,gf)}function df(gf){return this.shouldComponentUpdate=uf,kf(go,gf)}return df.displayName="Memo("+(go.displayName||go.name)+")",df.prototype.isReactComponent=!0,df.__f=!0,df}(Yy.prototype=new rp).isPureReactComponent=!0,Yy.prototype.shouldComponentUpdate=function(go,xo){return py(this.props,go)||py(this.state,xo)};var p0=vf.__b;vf.__b=function(go){go.type&&go.type.__f&&go.ref&&(go.props.ref=go.ref,go.ref=null),p0&&p0(go)};var _b=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Fy(go){function xo(uf,df){var gf=Iy({},uf);return delete gf.ref,go(gf,(df=uf.ref||df)&&(typeof df!="object"||"current"in df)?df:null)}return xo.$$typeof=_b,xo.render=xo,xo.prototype.isReactComponent=xo.__f=!0,xo.displayName="ForwardRef("+(go.displayName||go.name)+")",xo}var qg=function(go,xo){return go==null?null:Ip(Ip(go).map(xo))},E1={map:qg,forEach:qg,count:function(go){return go?Ip(go).length:0},only:function(go){var xo=Ip(go);if(xo.length!==1)throw"Children.only";return xo[0]},toArray:Ip},A$=vf.__e;vf.__e=function(go,xo,uf){if(go.then){for(var df,gf=xo;gf=gf.__;)if((df=gf.__c)&&df.__c)return xo.__e==null&&(xo.__e=uf.__e,xo.__k=uf.__k),df.__c(go,xo)}A$(go,xo,uf)};var qv=vf.unmount;function H0(){this.__u=0,this.t=null,this.__b=null}function wb(go){var xo=go.__.__c;return xo&&xo.__e&&xo.__e(go)}function R$(go){var xo,uf,df;function gf(Ef){if(xo||(xo=go()).then(function(Rf){uf=Rf.default||Rf},function(Rf){df=Rf}),df)throw df;if(!uf)throw xo;return kf(uf,Ef)}return gf.displayName="Lazy",gf.__f=!0,gf}function g0(){this.u=null,this.o=null}vf.unmount=function(go){var xo=go.__c;xo&&xo.__R&&xo.__R(),xo&&go.__h===!0&&(go.type=null),qv&&qv(go)},(H0.prototype=new rp).__c=function(go,xo){var uf=xo.__c,df=this;df.t==null&&(df.t=[]),df.t.push(uf);var gf=wb(df.__v),Ef=!1,Rf=function(){Ef||(Ef=!0,uf.__R=null,gf?gf(Vf):Vf())};uf.__R=Rf;var Vf=function(){if(!--df.__u){if(df.state.__e){var ep=df.state.__e;df.__v.__k[0]=function mp(Tp,Pp,tg){return Tp&&(Tp.__v=null,Tp.__k=Tp.__k&&Tp.__k.map(function(gg){return mp(gg,Pp,tg)}),Tp.__c&&Tp.__c.__P===Pp&&(Tp.__e&&tg.insertBefore(Tp.__e,Tp.__d),Tp.__c.__e=!0,Tp.__c.__P=tg)),Tp}(ep,ep.__c.__P,ep.__c.__O)}var Jf;for(df.setState({__e:df.__b=null});Jf=df.t.pop();)Jf.forceUpdate()}},Qf=xo.__h===!0;df.__u++||Qf||df.setState({__e:df.__b=df.__v.__k[0]}),go.then(Rf,Rf)},H0.prototype.componentWillUnmount=function(){this.t=[]},H0.prototype.render=function(go,xo){if(this.__b){if(this.__v.__k){var uf=document.createElement("div"),df=this.__v.__k[0].__c;this.__v.__k[0]=function Ef(Rf,Vf,Qf){return Rf&&(Rf.__c&&Rf.__c.__H&&(Rf.__c.__H.__.forEach(function(ep){typeof ep.__c=="function"&&ep.__c()}),Rf.__c.__H=null),(Rf=Iy({},Rf)).__c!=null&&(Rf.__c.__P===Qf&&(Rf.__c.__P=Vf),Rf.__c=null),Rf.__k=Rf.__k&&Rf.__k.map(function(ep){return Ef(ep,Vf,Qf)})),Rf}(this.__b,uf,df.__O=df.__P)}this.__b=null}var gf=xo.__e&&kf(Gf,null,go.fallback);return gf&&(gf.__h=null),[kf(Gf,null,xo.__e?null:go.children),gf]};var m_=function(go,xo,uf){if(++uf[1]===uf[0]&&go.o.delete(xo),go.props.revealOrder&&(go.props.revealOrder[0]!=="t"||!go.o.size))for(uf=go.u;uf;){for(;uf.length>3;)uf.pop()();if(uf[1]>>1,1),xo.i.removeChild(df)}}),hp(kf(Jg,{context:xo.context},go.__v),xo.l)):xo.l&&xo.componentWillUnmount()}function Eg(go,xo){return kf(Hp,{__v:go,i:xo})}(g0.prototype=new rp).__e=function(go){var xo=this,uf=wb(xo.__v),df=xo.o.get(go);return df[0]++,function(gf){var Ef=function(){xo.props.revealOrder?(df.push(gf),m_(xo,go,df)):gf()};uf?uf(Ef):Ef()}},g0.prototype.render=function(go){this.u=null,this.o=new Map;var xo=Ip(go.children);go.revealOrder&&go.revealOrder[0]==="b"&&xo.reverse();for(var uf=xo.length;uf--;)this.o.set(xo[uf],this.u=[1,0,this.u]);return go.children},g0.prototype.componentDidUpdate=g0.prototype.componentDidMount=function(){var go=this;this.o.forEach(function(xo,uf){m_(go,uf,xo)})};var Gg=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,yv=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Py=function(go){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(go)};function Cv(go,xo,uf){return xo.__k==null&&(xo.textContent=""),hp(go,xo),typeof uf=="function"&&uf(),go?go.__c:null}function By(go,xo,uf){return $p(go,xo),typeof uf=="function"&&uf(),go?go.__c:null}rp.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(go){Object.defineProperty(rp.prototype,go,{configurable:!0,get:function(){return this["UNSAFE_"+go]},set:function(xo){Object.defineProperty(this,go,{configurable:!0,writable:!0,value:xo})}})});var S1=vf.event;function T1(){}function jy(){return this.cancelBubble}function cw(){return this.defaultPrevented}vf.event=function(go){return S1&&(go=S1(go)),go.persist=T1,go.isPropagationStopped=jy,go.isDefaultPrevented=cw,go.nativeEvent=go};var xb,N$={configurable:!0,get:function(){return this.class}},$x=vf.vnode;vf.vnode=function(go){var xo=go.type,uf=go.props,df=uf;if(typeof xo=="string"){for(var gf in df={},uf){var Ef=uf[gf];gf==="value"&&"defaultValue"in uf&&Ef==null||(gf==="defaultValue"&&"value"in uf&&uf.value==null?gf="value":gf==="download"&&Ef===!0?Ef="":/ondoubleclick/i.test(gf)?gf="ondblclick":/^onchange(textarea|input)/i.test(gf+xo)&&!Py(uf.type)?gf="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(gf)?gf=gf.toLowerCase():yv.test(gf)?gf=gf.replace(/[A-Z0-9]/,"-$&").toLowerCase():Ef===null&&(Ef=void 0),df[gf]=Ef)}xo=="select"&&df.multiple&&Array.isArray(df.value)&&(df.value=Ip(uf.children).forEach(function(Rf){Rf.props.selected=df.value.indexOf(Rf.props.value)!=-1})),xo=="select"&&df.defaultValue!=null&&(df.value=Ip(uf.children).forEach(function(Rf){Rf.props.selected=df.multiple?df.defaultValue.indexOf(Rf.props.value)!=-1:df.defaultValue==Rf.props.value})),go.props=df}xo&&uf.class!=uf.className&&(N$.enumerable="className"in uf,uf.className!=null&&(df.class=uf.className),Object.defineProperty(df,"className",N$)),go.$$typeof=Gg,$x&&$x(go)};var _x=vf.__r;vf.__r=function(go){_x&&_x(go),xb=go.__c};var Kb={ReactCurrentDispatcher:{current:{readContext:function(go){return xb.__n[go.__c].props.value}}}},dv="17.0.2";function Ov(go){return kf.bind(null,go)}function Xb(go){return!!go&&go.$$typeof===Gg}function Y1(go){return Xb(go)?Vp.apply(null,arguments):go}function K1(go){return!!go.__k&&(hp(null,go),!0)}function Zb(go){return go&&(go.base||go.nodeType===1&&go)||null}var Tm=function(go,xo){return go(xo)},cm=function(go,xo){return go(xo)},uw=Gf,Zg={useState:Rp,useReducer:Fp,useEffect:Op,useLayoutEffect:Kp,useRef:Kf,useImperativeHandle:Xf,useMemo:gp,useCallback:wp,useContext:dg,useDebugValue:mg,version:"17.0.2",Children:E1,render:Cv,hydrate:By,unmountComponentAtNode:K1,createPortal:Eg,createElement:kf,createContext:bp,createFactory:Ov,cloneElement:Y1,createRef:Yf,Fragment:Gf,isValidElement:Xb,findDOMNode:Zb,Component:rp,PureComponent:Yy,memo:Yb,forwardRef:Fy,flushSync:cm,unstable_batchedUpdates:Tm,StrictMode:Gf,Suspense:H0,SuspenseList:g0,lazy:R$,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kb},_m=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Zg,version:dv,Children:E1,render:Cv,hydrate:By,unmountComponentAtNode:K1,createPortal:Eg,createFactory:Ov,cloneElement:Y1,isValidElement:Xb,findDOMNode:Zb,PureComponent:Yy,memo:Yb,forwardRef:Fy,flushSync:cm,unstable_batchedUpdates:Tm,StrictMode:uw,Suspense:H0,SuspenseList:g0,lazy:R$,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kb,createElement:kf,createContext:bp,createRef:Yf,Fragment:Gf,Component:rp,useState:Rp,useReducer:Fp,useEffect:Op,useLayoutEffect:Kp,useRef:Kf,useImperativeHandle:Xf,useMemo:gp,useCallback:wp,useContext:dg,useDebugValue:mg,useErrorBoundary:pg}),Eb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof commonjsGlobal$3<"u"?commonjsGlobal$3:typeof self<"u"?self:{};function v_(go){return go&&go.__esModule&&Object.prototype.hasOwnProperty.call(go,"default")?go.default:go}function X1(go){if(go.__esModule)return go;var xo=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(go).forEach(function(uf){var df=Object.getOwnPropertyDescriptor(go,uf);Object.defineProperty(xo,uf,df.get?df:{enumerable:!0,get:function(){return go[uf]}})}),xo}var Yv={exports:{}};function Iv(){}Iv.prototype={on:function(go,xo,uf){var df=this.e||(this.e={});return(df[go]||(df[go]=[])).push({fn:xo,ctx:uf}),this},once:function(go,xo,uf){var df=this;function gf(){df.off(go,gf),xo.apply(uf,arguments)}return gf._=xo,this.on(go,gf,uf)},emit:function(go){var xo=[].slice.call(arguments,1),uf=((this.e||(this.e={}))[go]||[]).slice(),df=0,gf=uf.length;for(df;df0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";var df=(go=window.document)===null||go===void 0||(xo=go.documentElement)===null||xo===void 0?void 0:xo.style;if(!df||uf in df)return"";for(var gf=0;gf: Unmounted during event!");return xo}var C1={},r$={};Object.defineProperty(r$,"__esModule",{value:!0}),r$.default=n$;function n$(){}function z$(go){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?z$=function(xo){return typeof xo}:z$=function(xo){return xo&&typeof Symbol=="function"&&xo.constructor===Symbol&&xo!==Symbol.prototype?"symbol":typeof xo},z$(go)}Object.defineProperty(C1,"__esModule",{value:!0}),C1.default=void 0;var bw=j2(t1),Ay=my(Jb.exports),Ox=my(t1),xv=um,I0=v0,H$=O0,_y=my(r$);function my(go){return go&&go.__esModule?go:{default:go}}function o1(go){if(typeof WeakMap!="function")return null;var xo=new WeakMap,uf=new WeakMap;return(o1=function(df){return df?uf:xo})(go)}function j2(go,xo){if(!xo&&go&&go.__esModule)return go;if(go===null||z$(go)!=="object"&&typeof go!="function")return{default:go};var uf=o1(xo);if(uf&&uf.has(go))return uf.get(go);var df={},gf=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ef in go)if(Ef!=="default"&&Object.prototype.hasOwnProperty.call(go,Ef)){var Rf=gf?Object.getOwnPropertyDescriptor(go,Ef):null;Rf&&(Rf.get||Rf.set)?Object.defineProperty(df,Ef,Rf):df[Ef]=go[Ef]}return df.default=go,uf&&uf.set(go,df),df}function U$(go,xo){return _w(go)||Q1(go,xo)||i$(go,xo)||$w()}function $w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i$(go,xo){if(go){if(typeof go=="string")return Ix(go,xo);var uf=Object.prototype.toString.call(go).slice(8,-1);if(uf==="Object"&&go.constructor&&(uf=go.constructor.name),uf==="Map"||uf==="Set")return Array.from(go);if(uf==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(uf))return Ix(go,xo)}}function Ix(go,xo){(xo==null||xo>go.length)&&(xo=go.length);for(var uf=0,df=new Array(xo);uf"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function k_(go){return k_=Object.setPrototypeOf?Object.getPrototypeOf:function(xo){return xo.__proto__||Object.getPrototypeOf(xo)},k_(go)}function y0(go,xo,uf){return xo in go?Object.defineProperty(go,xo,{value:uf,enumerable:!0,configurable:!0,writable:!0}):go[xo]=uf,go}var b0={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},O1=b0.mouse,o$=function(go){eb(uf,go);var xo=V$(uf);function uf(){var df;ZE(this,uf);for(var gf=arguments.length,Ef=new Array(gf),Rf=0;Rf not mounted on DragStart!");var ep=Qf.ownerDocument;if(!(df.props.disabled||!(Vf.target instanceof ep.defaultView.Node)||df.props.handle&&!(0,xv.matchesSelectorAndParentsTo)(Vf.target,df.props.handle,Qf)||df.props.cancel&&(0,xv.matchesSelectorAndParentsTo)(Vf.target,df.props.cancel,Qf))){Vf.type==="touchstart"&&Vf.preventDefault();var Jf=(0,xv.getTouchIdentifier)(Vf);df.setState({touchIdentifier:Jf});var mp=(0,I0.getControlPosition)(Vf,Jf,Mv(df));if(mp!=null){var Tp=mp.x,Pp=mp.y,tg=(0,I0.createCoreData)(Mv(df),Tp,Pp);(0,_y.default)("DraggableCore: handleDragStart: %j",tg),(0,_y.default)("calling",df.props.onStart);var gg=df.props.onStart(Vf,tg);gg===!1||df.mounted===!1||(df.props.enableUserSelectHack&&(0,xv.addUserSelectStyles)(ep),df.setState({dragging:!0,lastX:Tp,lastY:Pp}),(0,xv.addEvent)(ep,O1.move,df.handleDrag),(0,xv.addEvent)(ep,O1.stop,df.handleDragStop))}}}),y0(Mv(df),"handleDrag",function(Vf){var Qf=(0,I0.getControlPosition)(Vf,df.state.touchIdentifier,Mv(df));if(Qf!=null){var ep=Qf.x,Jf=Qf.y;if(Array.isArray(df.props.grid)){var mp=ep-df.state.lastX,Tp=Jf-df.state.lastY,Pp=(0,I0.snapToGrid)(df.props.grid,mp,Tp),tg=U$(Pp,2);if(mp=tg[0],Tp=tg[1],!mp&&!Tp)return;ep=df.state.lastX+mp,Jf=df.state.lastY+Tp}var gg=(0,I0.createCoreData)(Mv(df),ep,Jf);(0,_y.default)("DraggableCore: handleDrag: %j",gg);var fg=df.props.onDrag(Vf,gg);if(fg===!1||df.mounted===!1){try{df.handleDragStop(new MouseEvent("mouseup"))}catch{var Tg=document.createEvent("MouseEvents");Tg.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),df.handleDragStop(Tg)}return}df.setState({lastX:ep,lastY:Jf})}}),y0(Mv(df),"handleDragStop",function(Vf){if(df.state.dragging){var Qf=(0,I0.getControlPosition)(Vf,df.state.touchIdentifier,Mv(df));if(Qf!=null){var ep=Qf.x,Jf=Qf.y,mp=(0,I0.createCoreData)(Mv(df),ep,Jf),Tp=df.props.onStop(Vf,mp);if(Tp===!1||df.mounted===!1)return!1;var Pp=df.findDOMNode();Pp&&df.props.enableUserSelectHack&&(0,xv.removeUserSelectStyles)(Pp.ownerDocument),(0,_y.default)("DraggableCore: handleDragStop: %j",mp),df.setState({dragging:!1,lastX:NaN,lastY:NaN}),Pp&&((0,_y.default)("DraggableCore: Removing handlers"),(0,xv.removeEvent)(Pp.ownerDocument,O1.move,df.handleDrag),(0,xv.removeEvent)(Pp.ownerDocument,O1.stop,df.handleDragStop))}}}),y0(Mv(df),"onMouseDown",function(Vf){return O1=b0.mouse,df.handleDragStart(Vf)}),y0(Mv(df),"onMouseUp",function(Vf){return O1=b0.mouse,df.handleDragStop(Vf)}),y0(Mv(df),"onTouchStart",function(Vf){return O1=b0.touch,df.handleDragStart(Vf)}),y0(Mv(df),"onTouchEnd",function(Vf){return O1=b0.touch,df.handleDragStop(Vf)}),df}return JE(uf,[{key:"componentDidMount",value:function(){this.mounted=!0;var df=this.findDOMNode();df&&(0,xv.addEvent)(df,b0.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var df=this.findDOMNode();if(df){var gf=df.ownerDocument;(0,xv.removeEvent)(gf,b0.mouse.move,this.handleDrag),(0,xv.removeEvent)(gf,b0.touch.move,this.handleDrag),(0,xv.removeEvent)(gf,b0.mouse.stop,this.handleDragStop),(0,xv.removeEvent)(gf,b0.touch.stop,this.handleDragStop),(0,xv.removeEvent)(df,b0.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,xv.removeUserSelectStyles)(gf)}}},{key:"findDOMNode",value:function(){var df,gf,Ef;return(df=(gf=this.props)===null||gf===void 0||(Ef=gf.nodeRef)===null||Ef===void 0?void 0:Ef.current)!==null&&df!==void 0?df:Ox.default.findDOMNode(this)}},{key:"render",value:function(){return bw.cloneElement(bw.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),uf}(bw.Component);C1.default=o$,y0(o$,"displayName","DraggableCore"),y0(o$,"propTypes",{allowAnyClick:Ay.default.bool,disabled:Ay.default.bool,enableUserSelectHack:Ay.default.bool,offsetParent:function(go,xo){if(go[xo]&&go[xo].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Ay.default.arrayOf(Ay.default.number),handle:Ay.default.string,cancel:Ay.default.string,nodeRef:Ay.default.object,onStart:Ay.default.func,onDrag:Ay.default.func,onStop:Ay.default.func,onMouseDown:Ay.default.func,scale:Ay.default.number,className:H$.dontSetMe,style:H$.dontSetMe,transform:H$.dontSetMe}),y0(o$,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(go){function xo(bg){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xo=function(Pg){return typeof Pg}:xo=function(Pg){return Pg&&typeof Symbol=="function"&&Pg.constructor===Symbol&&Pg!==Symbol.prototype?"symbol":typeof Pg},xo(bg)}Object.defineProperty(go,"__esModule",{value:!0}),Object.defineProperty(go,"DraggableCore",{enumerable:!0,get:function(){return ep.default}}),go.default=void 0;var uf=tg(t1),df=Tp(Jb.exports),gf=Tp(t1),Ef=Tp(r1),Rf=um,Vf=v0,Qf=O0,ep=Tp(C1),Jf=Tp(r$),mp=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function Tp(bg){return bg&&bg.__esModule?bg:{default:bg}}function Pp(bg){if(typeof WeakMap!="function")return null;var Pg=new WeakMap,Ng=new WeakMap;return(Pp=function(Ag){return Ag?Ng:Pg})(bg)}function tg(bg,Pg){if(!Pg&&bg&&bg.__esModule)return bg;if(bg===null||xo(bg)!=="object"&&typeof bg!="function")return{default:bg};var Ng=Pp(Pg);if(Ng&&Ng.has(bg))return Ng.get(bg);var Ag={},zg=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Sm in bg)if(Sm!=="default"&&Object.prototype.hasOwnProperty.call(bg,Sm)){var fy=zg?Object.getOwnPropertyDescriptor(bg,Sm):null;fy&&(fy.get||fy.set)?Object.defineProperty(Ag,Sm,fy):Ag[Sm]=bg[Sm]}return Ag.default=bg,Ng&&Ng.set(bg,Ag),Ag}function gg(){return gg=Object.assign||function(bg){for(var Pg=1;Pg=0)&&(!Object.prototype.propertyIsEnumerable.call(bg,Ag)||(Ng[Ag]=bg[Ag]))}return Ng}function Tg(bg,Pg){if(bg==null)return{};var Ng={},Ag=Object.keys(bg),zg,Sm;for(Sm=0;Sm=0)&&(Ng[zg]=bg[zg]);return Ng}function Rg(bg,Pg){var Ng=Object.keys(bg);if(Object.getOwnPropertySymbols){var Ag=Object.getOwnPropertySymbols(bg);Pg&&(Ag=Ag.filter(function(zg){return Object.getOwnPropertyDescriptor(bg,zg).enumerable})),Ng.push.apply(Ng,Ag)}return Ng}function $m(bg){for(var Pg=1;Pg=4;++df,gf-=4)uf=go.charCodeAt(df)&255|(go.charCodeAt(++df)&255)<<8|(go.charCodeAt(++df)&255)<<16|(go.charCodeAt(++df)&255)<<24,uf=(uf&65535)*1540483477+((uf>>>16)*59797<<16),uf^=uf>>>24,xo=(uf&65535)*1540483477+((uf>>>16)*59797<<16)^(xo&65535)*1540483477+((xo>>>16)*59797<<16);switch(gf){case 3:xo^=(go.charCodeAt(df+2)&255)<<16;case 2:xo^=(go.charCodeAt(df+1)&255)<<8;case 1:xo^=go.charCodeAt(df)&255,xo=(xo&65535)*1540483477+((xo>>>16)*59797<<16)}return xo^=xo>>>13,xo=(xo&65535)*1540483477+((xo>>>16)*59797<<16),((xo^xo>>>15)>>>0).toString(36)}var h_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},vm=/[A-Z]|^ms/g,O$=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rw=function(go){return go.charCodeAt(1)===45},I$=function(go){return go!=null&&typeof go!="boolean"},d0=My(function(go){return rw(go)?go:go.replace(vm,"-$&").toLowerCase()}),tT=function(go,xo){switch(go){case"animation":case"animationName":if(typeof xo=="string")return xo.replace(O$,function(uf,df,gf){return w1={name:df,styles:gf,next:w1},df})}return h_[go]!==1&&!rw(go)&&typeof xo=="number"&&xo!==0?xo+"px":xo};function qy(go,xo,uf){if(uf==null)return"";if(uf.__emotion_styles!==void 0)return uf;switch(typeof uf){case"boolean":return"";case"object":{if(uf.anim===1)return w1={name:uf.name,styles:uf.styles,next:w1},uf.name;if(uf.styles!==void 0){var df=uf.next;if(df!==void 0)for(;df!==void 0;)w1={name:df.name,styles:df.styles,next:w1},df=df.next;var gf=uf.styles+";";return gf}return Jv(go,xo,uf)}case"function":{if(go!==void 0){var Ef=w1,Rf=uf(go);return w1=Ef,qy(go,xo,Rf)}break}}if(xo==null)return uf;var Vf=xo[uf];return Vf!==void 0?Vf:uf}function Jv(go,xo,uf){var df="";if(Array.isArray(uf))for(var gf=0;gf=0)&&(uf[gf]=go[gf]);return uf}function $b(go,xo){if(go==null)return{};var uf=OE(go,xo),df,gf;if(Object.getOwnPropertySymbols){var Ef=Object.getOwnPropertySymbols(go);for(gf=0;gf=0)&&(!Object.prototype.propertyIsEnumerable.call(go,df)||(uf[df]=go[df]))}return uf}function d_(go){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d_=function(xo){return typeof xo}:d_=function(xo){return xo&&typeof Symbol=="function"&&xo.constructor===Symbol&&xo!==Symbol.prototype?"symbol":typeof xo},d_(go)}var y2={};Object.defineProperty(y2,"__esModule",{value:!0});var IE=Object.assign||function(go){for(var xo=1;xo=0||!Object.prototype.hasOwnProperty.call(go,df)||(uf[df]=go[df]);return uf}function aT(go,xo){if(!(go instanceof xo))throw new TypeError("Cannot call a class as a function")}function RE(go,xo){if(!go)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xo&&(typeof xo=="object"||typeof xo=="function")?xo:go}function sT(go,xo){if(typeof xo!="function"&&xo!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof xo);go.prototype=Object.create(xo&&xo.prototype,{constructor:{value:go,enumerable:!1,writable:!0,configurable:!0}}),xo&&(Object.setPrototypeOf?Object.setPrototypeOf(go,xo):go.__proto__=xo)}var lT={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},cT=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],iC=function(go){return cT.forEach(function(xo){return delete go[xo]}),go},uT=function(go,xo){xo.style.fontSize=go.fontSize,xo.style.fontFamily=go.fontFamily,xo.style.fontWeight=go.fontWeight,xo.style.fontStyle=go.fontStyle,xo.style.letterSpacing=go.letterSpacing,xo.style.textTransform=go.textTransform},hT=typeof window<"u"&&window.navigator?/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent):!1,dT=function(){return hT?"_"+Math.random().toString(36).substr(2,12):void 0},NE=function(go){sT(xo,go),iT(xo,null,[{key:"getDerivedStateFromProps",value:function(uf,df){var gf=uf.id;return gf!==df.prevId?{inputId:gf||dT(),prevId:gf}:null}}]);function xo(uf){aT(this,xo);var df=RE(this,(xo.__proto__||Object.getPrototypeOf(xo)).call(this,uf));return df.inputRef=function(gf){df.input=gf,typeof df.props.inputRef=="function"&&df.props.inputRef(gf)},df.placeHolderSizerRef=function(gf){df.placeHolderSizer=gf},df.sizerRef=function(gf){df.sizer=gf},df.state={inputWidth:uf.minWidth,inputId:uf.id||dT(),prevId:uf.id},df}return iT(xo,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(uf,df){df.inputWidth!==this.state.inputWidth&&typeof this.props.onAutosize=="function"&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(!(!this.mounted||!window.getComputedStyle)){var uf=this.input&&window.getComputedStyle(this.input);!uf||(uT(uf,this.sizer),this.placeHolderSizer&&uT(uf,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(!(!this.mounted||!this.sizer||typeof this.sizer.scrollWidth>"u")){var uf=void 0;this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?uf=Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:uf=this.sizer.scrollWidth+2;var df=this.props.type==="number"&&this.props.extraWidth===void 0?16:parseInt(this.props.extraWidth)||0;uf+=df,uf"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function aC(go){if(go===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return go}function gx(go,xo){return xo&&(typeof xo=="object"||typeof xo=="function")?xo:aC(go)}function iw(go){var xo=pT();return function(){var uf=DE(go),df;if(xo){var gf=DE(this).constructor;df=Reflect.construct(uf,arguments,gf)}else df=uf.apply(this,arguments);return gx(this,df)}}var f_=function(){};function LE(go,xo){return xo?xo[0]==="-"?go+xo:go+"__"+xo:go}function sC(go,xo,uf){var df=[uf];if(xo&&go)for(var gf in xo)xo.hasOwnProperty(gf)&&xo[gf]&&df.push("".concat(LE(go,gf)));return df.filter(function(Ef){return Ef}).map(function(Ef){return String(Ef).trim()}).join(" ")}var gT=function(go){return Array.isArray(go)?go.filter(Boolean):d_(go)==="object"&&go!==null?[go]:[]},lC=function(go){go.className,go.clearValue,go.cx,go.getStyles,go.getValue,go.hasValue,go.isMulti,go.isRtl,go.options,go.selectOption,go.selectProps,go.setValue,go.theme;var xo=$b(go,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]);return Dy({},xo)};function mT(go){return[document.documentElement,document.body,window].indexOf(go)>-1}function vT(go){return mT(go)?window.pageYOffset:go.scrollTop}function FE(go,xo){if(mT(go)){window.scrollTo(0,xo);return}go.scrollTop=xo}function cC(go){var xo=getComputedStyle(go),uf=xo.position==="absolute",df=/(auto|scroll)/,gf=document.documentElement;if(xo.position==="fixed")return gf;for(var Ef=go;Ef=Ef.parentElement;)if(xo=getComputedStyle(Ef),!(uf&&xo.position==="static")&&df.test(xo.overflow+xo.overflowY+xo.overflowX))return Ef;return gf}function yT(go,xo,uf,df){return uf*((go=go/df-1)*go*go+1)+xo}function w2(go,xo){var uf=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,df=arguments.length>3&&arguments[3]!==void 0?arguments[3]:f_,gf=vT(go),Ef=xo-gf,Rf=10,Vf=0;function Qf(){Vf+=Rf;var ep=yT(Vf,gf,Ef,uf);FE(go,ep),Vfuf.bottom?FE(go,Math.min(xo.offsetTop+xo.clientHeight-go.offsetHeight+gf,go.scrollHeight)):df.top-gf=gg)return{placement:"bottom",maxHeight:xo};if(Fv>=gg&&!Rf)return Ef&&w2(ep,Bv,x1),{placement:"bottom",maxHeight:xo};if(!Rf&&Fv>=df||Rf&&dy>=df){Ef&&w2(ep,Bv,x1);var lw=Rf?dy-am:Fv-am;return{placement:"bottom",maxHeight:lw}}if(gf==="auto"||Rf){var Wb=xo,P$=Rf?gm:by;return P$>=df&&(Wb=Math.min(P$-am-Qf.controlHeight,xo)),{placement:"top",maxHeight:Wb}}if(gf==="bottom")return Ef&&FE(ep,Bv),{placement:"bottom",maxHeight:xo};break;case"top":if(gm>=gg)return{placement:"top",maxHeight:xo};if(by>=gg&&!Rf)return Ef&&w2(ep,Gb,x1),{placement:"top",maxHeight:xo};if(!Rf&&by>=df||Rf&&gm>=df){var z0=xo;return(!Rf&&by>=df||Rf&&gm>=df)&&(z0=Rf?gm-wm:by-wm),Ef&&w2(ep,Gb,x1),{placement:"top",maxHeight:z0}}return{placement:"bottom",maxHeight:xo};default:throw new Error('Invalid placement provided "'.concat(gf,'".'))}return Jf}function pC(go){var xo={bottom:"top",top:"bottom"};return go?xo[go]:"bottom"}var aw=function(go){return go==="auto"?"bottom":go},gC=function(go){var xo,uf=go.placement,df=go.theme,gf=df.borderRadius,Ef=df.spacing,Rf=df.colors;return xo={label:"menu"},Vb(xo,pC(uf),"100%"),Vb(xo,"backgroundColor",Rf.neutral0),Vb(xo,"borderRadius",gf),Vb(xo,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Vb(xo,"marginBottom",Ef.menuGutter),Vb(xo,"marginTop",Ef.menuGutter),Vb(xo,"position","absolute"),Vb(xo,"width","100%"),Vb(xo,"zIndex",1),xo},mC=bp({getPortalPlacement:null}),vC=function(go){fx(uf,go);var xo=iw(uf);function uf(){var df;nw(this,uf);for(var gf=arguments.length,Ef=new Array(gf),Rf=0;Rf=4;++df,gf-=4)uf=go.charCodeAt(df)&255|(go.charCodeAt(++df)&255)<<8|(go.charCodeAt(++df)&255)<<16|(go.charCodeAt(++df)&255)<<24,uf=(uf&65535)*1540483477+((uf>>>16)*59797<<16),uf^=uf>>>24,xo=(uf&65535)*1540483477+((uf>>>16)*59797<<16)^(xo&65535)*1540483477+((xo>>>16)*59797<<16);switch(gf){case 3:xo^=(go.charCodeAt(df+2)&255)<<16;case 2:xo^=(go.charCodeAt(df+1)&255)<<8;case 1:xo^=go.charCodeAt(df)&255,xo=(xo&65535)*1540483477+((xo>>>16)*59797<<16)}return xo^=xo>>>13,xo=(xo&65535)*1540483477+((xo>>>16)*59797<<16),((xo^xo>>>15)>>>0).toString(36)}var h_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},vm=/[A-Z]|^ms/g,O$=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rw=function(go){return go.charCodeAt(1)===45},I$=function(go){return go!=null&&typeof go!="boolean"},d0=My(function(go){return rw(go)?go:go.replace(vm,"-$&").toLowerCase()}),tT=function(go,xo){switch(go){case"animation":case"animationName":if(typeof xo=="string")return xo.replace(O$,function(uf,df,gf){return w1={name:df,styles:gf,next:w1},df})}return h_[go]!==1&&!rw(go)&&typeof xo=="number"&&xo!==0?xo+"px":xo};function qy(go,xo,uf){if(uf==null)return"";if(uf.__emotion_styles!==void 0)return uf;switch(typeof uf){case"boolean":return"";case"object":{if(uf.anim===1)return w1={name:uf.name,styles:uf.styles,next:w1},uf.name;if(uf.styles!==void 0){var df=uf.next;if(df!==void 0)for(;df!==void 0;)w1={name:df.name,styles:df.styles,next:w1},df=df.next;var gf=uf.styles+";";return gf}return Jv(go,xo,uf)}case"function":{if(go!==void 0){var Ef=w1,Rf=uf(go);return w1=Ef,qy(go,xo,Rf)}break}}if(xo==null)return uf;var Vf=xo[uf];return Vf!==void 0?Vf:uf}function Jv(go,xo,uf){var df="";if(Array.isArray(uf))for(var gf=0;gf=0)&&(uf[gf]=go[gf]);return uf}function $b(go,xo){if(go==null)return{};var uf=OE(go,xo),df,gf;if(Object.getOwnPropertySymbols){var Ef=Object.getOwnPropertySymbols(go);for(gf=0;gf=0)&&(!Object.prototype.propertyIsEnumerable.call(go,df)||(uf[df]=go[df]))}return uf}function d_(go){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d_=function(xo){return typeof xo}:d_=function(xo){return xo&&typeof Symbol=="function"&&xo.constructor===Symbol&&xo!==Symbol.prototype?"symbol":typeof xo},d_(go)}var y2={};Object.defineProperty(y2,"__esModule",{value:!0});var IE=Object.assign||function(go){for(var xo=1;xo=0||!Object.prototype.hasOwnProperty.call(go,df)||(uf[df]=go[df]);return uf}function aT(go,xo){if(!(go instanceof xo))throw new TypeError("Cannot call a class as a function")}function RE(go,xo){if(!go)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xo&&(typeof xo=="object"||typeof xo=="function")?xo:go}function sT(go,xo){if(typeof xo!="function"&&xo!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof xo);go.prototype=Object.create(xo&&xo.prototype,{constructor:{value:go,enumerable:!1,writable:!0,configurable:!0}}),xo&&(Object.setPrototypeOf?Object.setPrototypeOf(go,xo):go.__proto__=xo)}var lT={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},cT=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],iC=function(go){return cT.forEach(function(xo){return delete go[xo]}),go},uT=function(go,xo){xo.style.fontSize=go.fontSize,xo.style.fontFamily=go.fontFamily,xo.style.fontWeight=go.fontWeight,xo.style.fontStyle=go.fontStyle,xo.style.letterSpacing=go.letterSpacing,xo.style.textTransform=go.textTransform},hT=typeof window<"u"&&window.navigator?/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent):!1,dT=function(){return hT?"_"+Math.random().toString(36).substr(2,12):void 0},NE=function(go){sT(xo,go),iT(xo,null,[{key:"getDerivedStateFromProps",value:function(uf,df){var gf=uf.id;return gf!==df.prevId?{inputId:gf||dT(),prevId:gf}:null}}]);function xo(uf){aT(this,xo);var df=RE(this,(xo.__proto__||Object.getPrototypeOf(xo)).call(this,uf));return df.inputRef=function(gf){df.input=gf,typeof df.props.inputRef=="function"&&df.props.inputRef(gf)},df.placeHolderSizerRef=function(gf){df.placeHolderSizer=gf},df.sizerRef=function(gf){df.sizer=gf},df.state={inputWidth:uf.minWidth,inputId:uf.id||dT(),prevId:uf.id},df}return iT(xo,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(uf,df){df.inputWidth!==this.state.inputWidth&&typeof this.props.onAutosize=="function"&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(!(!this.mounted||!window.getComputedStyle)){var uf=this.input&&window.getComputedStyle(this.input);!uf||(uT(uf,this.sizer),this.placeHolderSizer&&uT(uf,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(!(!this.mounted||!this.sizer||typeof this.sizer.scrollWidth>"u")){var uf=void 0;this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?uf=Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:uf=this.sizer.scrollWidth+2;var df=this.props.type==="number"&&this.props.extraWidth===void 0?16:parseInt(this.props.extraWidth)||0;uf+=df,uf"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function aC(go){if(go===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return go}function gx(go,xo){return xo&&(typeof xo=="object"||typeof xo=="function")?xo:aC(go)}function iw(go){var xo=pT();return function(){var uf=DE(go),df;if(xo){var gf=DE(this).constructor;df=Reflect.construct(uf,arguments,gf)}else df=uf.apply(this,arguments);return gx(this,df)}}var f_=function(){};function LE(go,xo){return xo?xo[0]==="-"?go+xo:go+"__"+xo:go}function sC(go,xo,uf){var df=[uf];if(xo&&go)for(var gf in xo)xo.hasOwnProperty(gf)&&xo[gf]&&df.push("".concat(LE(go,gf)));return df.filter(function(Ef){return Ef}).map(function(Ef){return String(Ef).trim()}).join(" ")}var gT=function(go){return Array.isArray(go)?go.filter(Boolean):d_(go)==="object"&&go!==null?[go]:[]},lC=function(go){go.className,go.clearValue,go.cx,go.getStyles,go.getValue,go.hasValue,go.isMulti,go.isRtl,go.options,go.selectOption,go.selectProps,go.setValue,go.theme;var xo=$b(go,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]);return Dy({},xo)};function mT(go){return[document.documentElement,document.body,window].indexOf(go)>-1}function vT(go){return mT(go)?window.pageYOffset:go.scrollTop}function FE(go,xo){if(mT(go)){window.scrollTo(0,xo);return}go.scrollTop=xo}function cC(go){var xo=getComputedStyle(go),uf=xo.position==="absolute",df=/(auto|scroll)/,gf=document.documentElement;if(xo.position==="fixed")return gf;for(var Ef=go;Ef=Ef.parentElement;)if(xo=getComputedStyle(Ef),!(uf&&xo.position==="static")&&df.test(xo.overflow+xo.overflowY+xo.overflowX))return Ef;return gf}function yT(go,xo,uf,df){return uf*((go=go/df-1)*go*go+1)+xo}function w2(go,xo){var uf=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,df=arguments.length>3&&arguments[3]!==void 0?arguments[3]:f_,gf=vT(go),Ef=xo-gf,Rf=10,Vf=0;function Qf(){Vf+=Rf;var ep=yT(Vf,gf,Ef,uf);FE(go,ep),Vfuf.bottom?FE(go,Math.min(xo.offsetTop+xo.clientHeight-go.offsetHeight+gf,go.scrollHeight)):df.top-gf=gg)return{placement:"bottom",maxHeight:xo};if(Fv>=gg&&!Rf)return Ef&&w2(ep,Bv,x1),{placement:"bottom",maxHeight:xo};if(!Rf&&Fv>=df||Rf&&dy>=df){Ef&&w2(ep,Bv,x1);var lw=Rf?dy-am:Fv-am;return{placement:"bottom",maxHeight:lw}}if(gf==="auto"||Rf){var Wb=xo,P$=Rf?gm:by;return P$>=df&&(Wb=Math.min(P$-am-Qf.controlHeight,xo)),{placement:"top",maxHeight:Wb}}if(gf==="bottom")return Ef&&FE(ep,Bv),{placement:"bottom",maxHeight:xo};break;case"top":if(gm>=gg)return{placement:"top",maxHeight:xo};if(by>=gg&&!Rf)return Ef&&w2(ep,Gb,x1),{placement:"top",maxHeight:xo};if(!Rf&&by>=df||Rf&&gm>=df){var z0=xo;return(!Rf&&by>=df||Rf&&gm>=df)&&(z0=Rf?gm-wm:by-wm),Ef&&w2(ep,Gb,x1),{placement:"top",maxHeight:z0}}return{placement:"bottom",maxHeight:xo};default:throw new Error('Invalid placement provided "'.concat(gf,'".'))}return Jf}function pC(go){var xo={bottom:"top",top:"bottom"};return go?xo[go]:"bottom"}var aw=function(go){return go==="auto"?"bottom":go},gC=function(go){var xo,uf=go.placement,df=go.theme,gf=df.borderRadius,Ef=df.spacing,Rf=df.colors;return xo={label:"menu"},Vb(xo,pC(uf),"100%"),Vb(xo,"backgroundColor",Rf.neutral0),Vb(xo,"borderRadius",gf),Vb(xo,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Vb(xo,"marginBottom",Ef.menuGutter),Vb(xo,"marginTop",Ef.menuGutter),Vb(xo,"position","absolute"),Vb(xo,"width","100%"),Vb(xo,"zIndex",1),xo},mC=bp({getPortalPlacement:null}),vC=function(go){fx(uf,go);var xo=iw(uf);function uf(){var df;nw(this,uf);for(var gf=arguments.length,Ef=new Array(gf),Rf=0;Rfgo.length)&&(xo=go.length);for(var uf=0,df=new Array(xo);uf-1}};function jP(go){go.in,go.out,go.onExited,go.appear,go.enter,go.exit;var xo=go.innerRef;go.emotion;var uf=$b(go,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return im("input",Kg({ref:xo},uf,{css:e1({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var zP=function(go){go.preventDefault(),go.stopPropagation()};function HP(go){var xo=go.isEnabled,uf=go.onBottomArrive,df=go.onBottomLeave,gf=go.onTopArrive,Ef=go.onTopLeave,Rf=Kf(!1),Vf=Kf(!1),Qf=Kf(0),ep=Kf(null),Jf=wp(function(fg,Tg){if(ep.current!==null){var Rg=ep.current,$m=Rg.scrollTop,pm=Rg.scrollHeight,am=Rg.clientHeight,wm=ep.current,gm=Tg>0,dy=pm-am-$m,by=!1;dy>Tg&&Rf.current&&(df&&df(fg),Rf.current=!1),gm&&Vf.current&&(Ef&&Ef(fg),Vf.current=!1),gm&&Tg>dy?(uf&&!Rf.current&&uf(fg),wm.scrollTop=pm,by=!0,Rf.current=!0):!gm&&-Tg>$m&&(gf&&!Vf.current&&gf(fg),wm.scrollTop=0,by=!0,Vf.current=!0),by&&zP(fg)}},[]),mp=wp(function(fg){Jf(fg,fg.deltaY)},[Jf]),Tp=wp(function(fg){Qf.current=fg.changedTouches[0].clientY},[]),Pp=wp(function(fg){var Tg=Qf.current-fg.changedTouches[0].clientY;Jf(fg,Tg)},[Jf]),tg=wp(function(fg){if(fg){var Tg=dC?{passive:!1}:!1;typeof fg.addEventListener=="function"&&fg.addEventListener("wheel",mp,Tg),typeof fg.addEventListener=="function"&&fg.addEventListener("touchstart",Tp,Tg),typeof fg.addEventListener=="function"&&fg.addEventListener("touchmove",Pp,Tg)}},[Pp,Tp,mp]),gg=wp(function(fg){!fg||(typeof fg.removeEventListener=="function"&&fg.removeEventListener("wheel",mp,!1),typeof fg.removeEventListener=="function"&&fg.removeEventListener("touchstart",Tp,!1),typeof fg.removeEventListener=="function"&&fg.removeEventListener("touchmove",Pp,!1))},[Pp,Tp,mp]);return Op(function(){if(xo){var fg=ep.current;return tg(fg),function(){gg(fg)}}},[xo,tg,gg]),function(fg){ep.current=fg}}var yI=["boxSizing","height","overflow","paddingRight","position"],bI={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function $I(go){go.preventDefault()}function _I(go){go.stopPropagation()}function wI(){var go=this.scrollTop,xo=this.scrollHeight,uf=go+this.offsetHeight;go===0?this.scrollTop=1:uf===xo&&(this.scrollTop=go-1)}function xI(){return"ontouchstart"in window||navigator.maxTouchPoints}var EI=!!(typeof window<"u"&&window.document&&window.document.createElement),_T=0,jE={capture:!1,passive:!1};function UP(go){var xo=go.isEnabled,uf=go.accountForScrollbars,df=uf===void 0?!0:uf,gf=Kf({}),Ef=Kf(null),Rf=wp(function(Qf){if(EI){var ep=document.body,Jf=ep&&ep.style;if(df&&yI.forEach(function(tg){var gg=Jf&&Jf[tg];gf.current[tg]=gg}),df&&_T<1){var mp=parseInt(gf.current.paddingRight,10)||0,Tp=document.body?document.body.clientWidth:0,Pp=window.innerWidth-Tp+mp||0;Object.keys(bI).forEach(function(tg){var gg=bI[tg];Jf&&(Jf[tg]=gg)}),Jf&&(Jf.paddingRight="".concat(Pp,"px"))}ep&&xI()&&(ep.addEventListener("touchmove",$I,jE),Qf&&(Qf.addEventListener("touchstart",wI,jE),Qf.addEventListener("touchmove",_I,jE))),_T+=1}},[]),Vf=wp(function(Qf){if(EI){var ep=document.body,Jf=ep&&ep.style;_T=Math.max(_T-1,0),df&&_T<1&&yI.forEach(function(mp){var Tp=gf.current[mp];Jf&&(Jf[mp]=Tp)}),ep&&xI()&&(ep.removeEventListener("touchmove",$I,jE),Qf&&(Qf.removeEventListener("touchstart",wI,jE),Qf.removeEventListener("touchmove",_I,jE)))}},[]);return Op(function(){if(xo){var Qf=Ef.current;return Rf(Qf),function(){Vf(Qf)}}},[xo,Rf,Vf]),function(Qf){Ef.current=Qf}}var VP=function(){return document.activeElement&&document.activeElement.blur()},GP={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function WP(go){var xo=go.children,uf=go.lockEnabled,df=go.captureEnabled,gf=df===void 0?!0:df,Ef=go.onBottomArrive,Rf=go.onBottomLeave,Vf=go.onTopArrive,Qf=go.onTopLeave,ep=HP({isEnabled:gf,onBottomArrive:Ef,onBottomLeave:Rf,onTopArrive:Vf,onTopLeave:Qf}),Jf=UP({isEnabled:uf}),mp=function(Tp){ep(Tp),Jf(Tp)};return im(Zg.Fragment,null,uf&&im("div",{onClick:VP,css:GP}),xo(mp))}var qP=function(go){return go.label},YP=function(go){return go.label},KP=function(go){return go.value},XP=function(go){return!!go.isDisabled},ZP={clearIndicator:tp,container:ls,control:lg,dropdownIndicator:pp,group:Wp,groupHeading:ig,indicatorsContainer:Sf,indicatorSeparator:up,input:cg,loadingIndicator:Ap,loadingMessage:at,menu:gC,menuList:RO,menuPortal:fo,multiValue:_g,multiValueLabel:bm,multiValueRemove:Mg,noOptionsMessage:nt,option:p_,placeholder:S2,singleValue:BE,valueContainer:mf},JP={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},QP=4,SI=4,eA=38,tA=SI*2,rA={baseUnit:SI,controlHeight:eA,menuGutter:tA},jO={borderRadius:QP,colors:JP,spacing:rA},nA={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:hC(),captureMenuScroll:!hC(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:BP(),formatGroupLabel:qP,getOptionLabel:YP,getOptionValue:KP,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:XP,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!PO(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(go){var xo=go.count;return"".concat(xo," result").concat(xo!==1?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function TI(go,xo,uf,df){var gf=PI(go,xo,uf),Ef=AI(go,xo,uf),Rf=II(go,xo),Vf=wC(go,xo);return{type:"option",data:xo,isDisabled:gf,isSelected:Ef,label:Rf,value:Vf,index:df}}function kI(go,xo){return go.options.map(function(uf,df){if(uf.options){var gf=uf.options.map(function(Rf,Vf){return TI(go,Rf,xo,Vf)}).filter(function(Rf){return OI(go,Rf)});return gf.length>0?{type:"group",data:uf,options:gf,index:df}:void 0}var Ef=TI(go,uf,xo,df);return OI(go,Ef)?Ef:void 0}).filter(function(uf){return!!uf})}function CI(go){return go.reduce(function(xo,uf){return uf.type==="group"?xo.push.apply(xo,fI(uf.options.map(function(df){return df.data}))):xo.push(uf.data),xo},[])}function iA(go,xo){return CI(kI(go,xo))}function OI(go,xo){var uf=go.inputValue,df=uf===void 0?"":uf,gf=xo.data,Ef=xo.isSelected,Rf=xo.label,Vf=xo.value;return(!NI(go)||!Ef)&&RI(go,{label:Rf,value:Vf,data:gf},df)}function oA(go,xo){var uf=go.focusedValue,df=go.selectValue,gf=df.indexOf(uf);if(gf>-1){var Ef=xo.indexOf(uf);if(Ef>-1)return uf;if(gf-1?uf:xo[0]}var II=function(go,xo){return go.getOptionLabel(xo)},wC=function(go,xo){return go.getOptionValue(xo)};function PI(go,xo,uf){return typeof go.isOptionDisabled=="function"?go.isOptionDisabled(xo,uf):!1}function AI(go,xo,uf){if(uf.indexOf(xo)>-1)return!0;if(typeof go.isOptionSelected=="function")return go.isOptionSelected(xo,uf);var df=wC(go,xo);return uf.some(function(gf){return wC(go,gf)===df})}function RI(go,xo,uf){return go.filterOption?go.filterOption(xo,uf):!0}var NI=function(go){var xo=go.hideSelectedOptions,uf=go.isMulti;return xo===void 0?uf:xo},sA=1,MI=function(go){fx(uf,go);var xo=iw(uf);function uf(df){var gf;return nw(this,uf),gf=xo.call(this,df),gf.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},gf.blockOptionHover=!1,gf.isComposing=!1,gf.commonProps=void 0,gf.initialTouchX=0,gf.initialTouchY=0,gf.instancePrefix="",gf.openAfterFocus=!1,gf.scrollToFocusedOptionOnUpdate=!1,gf.userIsDragging=void 0,gf.controlRef=null,gf.getControlRef=function(Ef){gf.controlRef=Ef},gf.focusedOptionRef=null,gf.getFocusedOptionRef=function(Ef){gf.focusedOptionRef=Ef},gf.menuListRef=null,gf.getMenuListRef=function(Ef){gf.menuListRef=Ef},gf.inputRef=null,gf.getInputRef=function(Ef){gf.inputRef=Ef},gf.focus=gf.focusInput,gf.blur=gf.blurInput,gf.onChange=function(Ef,Rf){var Vf=gf.props,Qf=Vf.onChange,ep=Vf.name;Rf.name=ep,gf.ariaOnChange(Ef,Rf),Qf(Ef,Rf)},gf.setValue=function(Ef){var Rf=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"set-value",Vf=arguments.length>2?arguments[2]:void 0,Qf=gf.props,ep=Qf.closeMenuOnSelect,Jf=Qf.isMulti;gf.onInputChange("",{action:"set-value"}),ep&&(gf.setState({inputIsHiddenAfterUpdate:!Jf}),gf.onMenuClose()),gf.setState({clearFocusValueOnUpdate:!0}),gf.onChange(Ef,{action:Rf,option:Vf})},gf.selectOption=function(Ef){var Rf=gf.props,Vf=Rf.blurInputOnSelect,Qf=Rf.isMulti,ep=Rf.name,Jf=gf.state.selectValue,mp=Qf&&gf.isOptionSelected(Ef,Jf),Tp=gf.isOptionDisabled(Ef,Jf);if(mp){var Pp=gf.getOptionValue(Ef);gf.setValue(Jf.filter(function(tg){return gf.getOptionValue(tg)!==Pp}),"deselect-option",Ef)}else if(!Tp)Qf?gf.setValue([].concat(fI(Jf),[Ef]),"select-option",Ef):gf.setValue(Ef,"select-option");else{gf.ariaOnChange(Ef,{action:"select-option",name:ep});return}Vf&&gf.blurInput()},gf.removeValue=function(Ef){var Rf=gf.props.isMulti,Vf=gf.state.selectValue,Qf=gf.getOptionValue(Ef),ep=Vf.filter(function(mp){return gf.getOptionValue(mp)!==Qf}),Jf=Rf?ep:ep[0]||null;gf.onChange(Jf,{action:"remove-value",removedValue:Ef}),gf.focusInput()},gf.clearValue=function(){var Ef=gf.state.selectValue;gf.onChange(gf.props.isMulti?[]:null,{action:"clear",removedValues:Ef})},gf.popValue=function(){var Ef=gf.props.isMulti,Rf=gf.state.selectValue,Vf=Rf[Rf.length-1],Qf=Rf.slice(0,Rf.length-1),ep=Ef?Qf:Qf[0]||null;gf.onChange(ep,{action:"pop-value",removedValue:Vf})},gf.getValue=function(){return gf.state.selectValue},gf.cx=function(){for(var Ef=arguments.length,Rf=new Array(Ef),Vf=0;VfJf||ep>Jf}},gf.onTouchEnd=function(Ef){gf.userIsDragging||(gf.controlRef&&!gf.controlRef.contains(Ef.target)&&gf.menuListRef&&!gf.menuListRef.contains(Ef.target)&&gf.blurInput(),gf.initialTouchX=0,gf.initialTouchY=0)},gf.onControlTouchEnd=function(Ef){gf.userIsDragging||gf.onControlMouseDown(Ef)},gf.onClearIndicatorTouchEnd=function(Ef){gf.userIsDragging||gf.onClearIndicatorMouseDown(Ef)},gf.onDropdownIndicatorTouchEnd=function(Ef){gf.userIsDragging||gf.onDropdownIndicatorMouseDown(Ef)},gf.handleInputChange=function(Ef){var Rf=Ef.currentTarget.value;gf.setState({inputIsHiddenAfterUpdate:!1}),gf.onInputChange(Rf,{action:"input-change"}),gf.props.menuIsOpen||gf.onMenuOpen()},gf.onInputFocus=function(Ef){gf.props.onFocus&&gf.props.onFocus(Ef),gf.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(gf.openAfterFocus||gf.props.openMenuOnFocus)&&gf.openMenu("first"),gf.openAfterFocus=!1},gf.onInputBlur=function(Ef){if(gf.menuListRef&&gf.menuListRef.contains(document.activeElement)){gf.inputRef.focus();return}gf.props.onBlur&&gf.props.onBlur(Ef),gf.onInputChange("",{action:"input-blur"}),gf.onMenuClose(),gf.setState({focusedValue:null,isFocused:!1})},gf.onOptionHover=function(Ef){gf.blockOptionHover||gf.state.focusedOption===Ef||gf.setState({focusedOption:Ef})},gf.shouldHideSelectedOptions=function(){return NI(gf.props)},gf.onKeyDown=function(Ef){var Rf=gf.props,Vf=Rf.isMulti,Qf=Rf.backspaceRemovesValue,ep=Rf.escapeClearsValue,Jf=Rf.inputValue,mp=Rf.isClearable,Tp=Rf.isDisabled,Pp=Rf.menuIsOpen,tg=Rf.onKeyDown,gg=Rf.tabSelectsValue,fg=Rf.openMenuOnFocus,Tg=gf.state,Rg=Tg.focusedOption,$m=Tg.focusedValue,pm=Tg.selectValue;if(!Tp&&!(typeof tg=="function"&&(tg(Ef),Ef.defaultPrevented))){switch(gf.blockOptionHover=!0,Ef.key){case"ArrowLeft":if(!Vf||Jf)return;gf.focusValue("previous");break;case"ArrowRight":if(!Vf||Jf)return;gf.focusValue("next");break;case"Delete":case"Backspace":if(Jf)return;if($m)gf.removeValue($m);else{if(!Qf)return;Vf?gf.popValue():mp&&gf.clearValue()}break;case"Tab":if(gf.isComposing||Ef.shiftKey||!Pp||!gg||!Rg||fg&&gf.isOptionSelected(Rg,pm))return;gf.selectOption(Rg);break;case"Enter":if(Ef.keyCode===229)break;if(Pp){if(!Rg||gf.isComposing)return;gf.selectOption(Rg);break}return;case"Escape":Pp?(gf.setState({inputIsHiddenAfterUpdate:!1}),gf.onInputChange("",{action:"menu-close"}),gf.onMenuClose()):mp&&ep&&gf.clearValue();break;case" ":if(Jf)return;if(!Pp){gf.openMenu("first");break}if(!Rg)return;gf.selectOption(Rg);break;case"ArrowUp":Pp?gf.focusOption("up"):gf.openMenu("last");break;case"ArrowDown":Pp?gf.focusOption("down"):gf.openMenu("first");break;case"PageUp":if(!Pp)return;gf.focusOption("pageup");break;case"PageDown":if(!Pp)return;gf.focusOption("pagedown");break;case"Home":if(!Pp)return;gf.focusOption("first");break;case"End":if(!Pp)return;gf.focusOption("last");break;default:return}Ef.preventDefault()}},gf.instancePrefix="react-select-"+(gf.props.instanceId||++sA),gf.state.selectValue=gT(df.value),gf}return $2(uf,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(df){var gf=this.props,Ef=gf.isDisabled,Rf=gf.menuIsOpen,Vf=this.state.isFocused;(Vf&&!Ef&&df.isDisabled||Vf&&Rf&&!df.menuIsOpen)&&this.focusInput(),Vf&&Ef&&!df.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(IO(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(df,gf){this.props.onInputChange(df,gf)}},{key:"focusInput",value:function(){!this.inputRef||this.inputRef.focus()}},{key:"blurInput",value:function(){!this.inputRef||this.inputRef.blur()}},{key:"openMenu",value:function(df){var gf=this,Ef=this.state,Rf=Ef.selectValue,Vf=Ef.isFocused,Qf=this.buildFocusableOptions(),ep=df==="first"?0:Qf.length-1;if(!this.props.isMulti){var Jf=Qf.indexOf(Rf[0]);Jf>-1&&(ep=Jf)}this.scrollToFocusedOptionOnUpdate=!(Vf&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:Qf[ep]},function(){return gf.onMenuOpen()})}},{key:"focusValue",value:function(df){var gf=this.state,Ef=gf.selectValue,Rf=gf.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var Vf=Ef.indexOf(Rf);Rf||(Vf=-1);var Qf=Ef.length-1,ep=-1;if(Ef.length){switch(df){case"previous":Vf===0?ep=0:Vf===-1?ep=Qf:ep=Vf-1;break;case"next":Vf>-1&&Vf0&&arguments[0]!==void 0?arguments[0]:"first",gf=this.props.pageSize,Ef=this.state.focusedOption,Rf=this.getFocusableOptions();if(Rf.length){var Vf=0,Qf=Rf.indexOf(Ef);Ef||(Qf=-1),df==="up"?Vf=Qf>0?Qf-1:Rf.length-1:df==="down"?Vf=(Qf+1)%Rf.length:df==="pageup"?(Vf=Qf-gf,Vf<0&&(Vf=0)):df==="pagedown"?(Vf=Qf+gf,Vf>Rf.length-1&&(Vf=Rf.length-1)):df==="last"&&(Vf=Rf.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:Rf[Vf],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(jO):Dy(Dy({},jO),this.props.theme):jO}},{key:"getCommonProps",value:function(){var df=this.clearValue,gf=this.cx,Ef=this.getStyles,Rf=this.getValue,Vf=this.selectOption,Qf=this.setValue,ep=this.props,Jf=ep.isMulti,mp=ep.isRtl,Tp=ep.options,Pp=this.hasValue();return{clearValue:df,cx:gf,getStyles:Ef,getValue:Rf,hasValue:Pp,isMulti:Jf,isRtl:mp,options:Tp,selectOption:Vf,selectProps:ep,setValue:Qf,theme:this.getTheme()}}},{key:"hasValue",value:function(){var df=this.state.selectValue;return df.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var df=this.props,gf=df.isClearable,Ef=df.isMulti;return gf===void 0?Ef:gf}},{key:"isOptionDisabled",value:function(df,gf){return PI(this.props,df,gf)}},{key:"isOptionSelected",value:function(df,gf){return AI(this.props,df,gf)}},{key:"filterOption",value:function(df,gf){return RI(this.props,df,gf)}},{key:"formatOptionLabel",value:function(df,gf){if(typeof this.props.formatOptionLabel=="function"){var Ef=this.props.inputValue,Rf=this.state.selectValue;return this.props.formatOptionLabel(df,{context:gf,inputValue:Ef,selectValue:Rf})}else return this.getOptionLabel(df)}},{key:"formatGroupLabel",value:function(df){return this.props.formatGroupLabel(df)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var df=this.props,gf=df.isDisabled,Ef=df.isSearchable,Rf=df.inputId,Vf=df.inputValue,Qf=df.tabIndex,ep=df.form,Jf=this.getComponents(),mp=Jf.Input,Tp=this.state.inputIsHidden,Pp=this.commonProps,tg=Rf||this.getElementId("input"),gg={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return Ef?Zg.createElement(mp,Kg({},Pp,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:tg,innerRef:this.getInputRef,isDisabled:gf,isHidden:Tp,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:Qf,form:ep,type:"text",value:Vf},gg)):Zg.createElement(jP,Kg({id:tg,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:f_,onFocus:this.onInputFocus,readOnly:!0,disabled:gf,tabIndex:Qf,form:ep,value:""},gg))}},{key:"renderPlaceholderOrValue",value:function(){var df=this,gf=this.getComponents(),Ef=gf.MultiValue,Rf=gf.MultiValueContainer,Vf=gf.MultiValueLabel,Qf=gf.MultiValueRemove,ep=gf.SingleValue,Jf=gf.Placeholder,mp=this.commonProps,Tp=this.props,Pp=Tp.controlShouldRenderValue,tg=Tp.isDisabled,gg=Tp.isMulti,fg=Tp.inputValue,Tg=Tp.placeholder,Rg=this.state,$m=Rg.selectValue,pm=Rg.focusedValue,am=Rg.isFocused;if(!this.hasValue()||!Pp)return fg?null:Zg.createElement(Jf,Kg({},mp,{key:"placeholder",isDisabled:tg,isFocused:am}),Tg);if(gg){var wm=$m.map(function(dy,by){var Fv=dy===pm;return Zg.createElement(Ef,Kg({},mp,{components:{Container:Rf,Label:Vf,Remove:Qf},isFocused:Fv,isDisabled:tg,key:"".concat(df.getOptionValue(dy)).concat(by),index:by,removeProps:{onClick:function(){return df.removeValue(dy)},onTouchEnd:function(){return df.removeValue(dy)},onMouseDown:function(Bv){Bv.preventDefault(),Bv.stopPropagation()}},data:dy}),df.formatOptionLabel(dy,"value"))});return wm}if(fg)return null;var gm=$m[0];return Zg.createElement(ep,Kg({},mp,{data:gm,isDisabled:tg}),this.formatOptionLabel(gm,"value"))}},{key:"renderClearIndicator",value:function(){var df=this.getComponents(),gf=df.ClearIndicator,Ef=this.commonProps,Rf=this.props,Vf=Rf.isDisabled,Qf=Rf.isLoading,ep=this.state.isFocused;if(!this.isClearable()||!gf||Vf||!this.hasValue()||Qf)return null;var Jf={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Zg.createElement(gf,Kg({},Ef,{innerProps:Jf,isFocused:ep}))}},{key:"renderLoadingIndicator",value:function(){var df=this.getComponents(),gf=df.LoadingIndicator,Ef=this.commonProps,Rf=this.props,Vf=Rf.isDisabled,Qf=Rf.isLoading,ep=this.state.isFocused;if(!gf||!Qf)return null;var Jf={"aria-hidden":"true"};return Zg.createElement(gf,Kg({},Ef,{innerProps:Jf,isDisabled:Vf,isFocused:ep}))}},{key:"renderIndicatorSeparator",value:function(){var df=this.getComponents(),gf=df.DropdownIndicator,Ef=df.IndicatorSeparator;if(!gf||!Ef)return null;var Rf=this.commonProps,Vf=this.props.isDisabled,Qf=this.state.isFocused;return Zg.createElement(Ef,Kg({},Rf,{isDisabled:Vf,isFocused:Qf}))}},{key:"renderDropdownIndicator",value:function(){var df=this.getComponents(),gf=df.DropdownIndicator;if(!gf)return null;var Ef=this.commonProps,Rf=this.props.isDisabled,Vf=this.state.isFocused,Qf={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Zg.createElement(gf,Kg({},Ef,{innerProps:Qf,isDisabled:Rf,isFocused:Vf}))}},{key:"renderMenu",value:function(){var df=this,gf=this.getComponents(),Ef=gf.Group,Rf=gf.GroupHeading,Vf=gf.Menu,Qf=gf.MenuList,ep=gf.MenuPortal,Jf=gf.LoadingMessage,mp=gf.NoOptionsMessage,Tp=gf.Option,Pp=this.commonProps,tg=this.state.focusedOption,gg=this.props,fg=gg.captureMenuScroll,Tg=gg.inputValue,Rg=gg.isLoading,$m=gg.loadingMessage,pm=gg.minMenuHeight,am=gg.maxMenuHeight,wm=gg.menuIsOpen,gm=gg.menuPlacement,dy=gg.menuPosition,by=gg.menuPortalTarget,Fv=gg.menuShouldBlockScroll,Bv=gg.menuShouldScrollIntoView,Gb=gg.noOptionsMessage,x1=gg.onMenuScrollToTop,lw=gg.onMenuScrollToBottom;if(!wm)return null;var Wb=function(ey,bg){var Pg=ey.type,Ng=ey.data,Ag=ey.isDisabled,zg=ey.isSelected,Sm=ey.label,fy=ey.value,f0=tg===Ng,jv=Ag?void 0:function(){return df.onOptionHover(Ng)},P2=Ag?void 0:function(){return df.selectOption(Ng)},g_="".concat(df.getElementId("option"),"-").concat(bg),bx={id:g_,onClick:P2,onMouseMove:jv,onMouseOver:jv,tabIndex:-1};return Zg.createElement(Tp,Kg({},Pp,{innerProps:bx,data:Ng,isDisabled:Ag,isSelected:zg,key:g_,label:Sm,type:Pg,value:fy,isFocused:f0,innerRef:f0?df.getFocusedOptionRef:void 0}),df.formatOptionLabel(ey.data,"menu"))},P$;if(this.hasOptions())P$=this.getCategorizedOptions().map(function(ey){if(ey.type==="group"){var bg=ey.data,Pg=ey.options,Ng=ey.index,Ag="".concat(df.getElementId("group"),"-").concat(Ng),zg="".concat(Ag,"-heading");return Zg.createElement(Ef,Kg({},Pp,{key:Ag,data:bg,options:Pg,Heading:Rf,headingProps:{id:zg,data:ey.data},label:df.formatGroupLabel(ey.data)}),ey.options.map(function(Sm){return Wb(Sm,"".concat(Ng,"-").concat(Sm.index))}))}else if(ey.type==="option")return Wb(ey,"".concat(ey.index))});else if(Rg){var z0=$m({inputValue:Tg});if(z0===null)return null;P$=Zg.createElement(Jf,Pp,z0)}else{var PC=Gb({inputValue:Tg});if(PC===null)return null;P$=Zg.createElement(mp,Pp,PC)}var I2={minMenuHeight:pm,maxMenuHeight:am,menuPlacement:gm,menuPosition:dy,menuShouldScrollIntoView:Bv},qb=Zg.createElement(vC,Kg({},Pp,I2),function(ey){var bg=ey.ref,Pg=ey.placerProps,Ng=Pg.placement,Ag=Pg.maxHeight;return Zg.createElement(Vf,Kg({},Pp,I2,{innerRef:bg,innerProps:{onMouseDown:df.onMenuMouseDown,onMouseMove:df.onMenuMouseMove},isLoading:Rg,placement:Ng}),Zg.createElement(WP,{captureEnabled:fg,onTopArrive:x1,onBottomArrive:lw,lockEnabled:Fv},function(zg){return Zg.createElement(Qf,Kg({},Pp,{innerRef:function(Sm){df.getMenuListRef(Sm),zg(Sm)},isLoading:Rg,maxHeight:Ag,focusedOption:tg}),P$)}))});return by||dy==="fixed"?Zg.createElement(ep,Kg({},Pp,{appendTo:by,controlElement:this.controlRef,menuPlacement:gm,menuPosition:dy}),qb):qb}},{key:"renderFormField",value:function(){var df=this,gf=this.props,Ef=gf.delimiter,Rf=gf.isDisabled,Vf=gf.isMulti,Qf=gf.name,ep=this.state.selectValue;if(!(!Qf||Rf))if(Vf)if(Ef){var Jf=ep.map(function(Pp){return df.getOptionValue(Pp)}).join(Ef);return Zg.createElement("input",{name:Qf,type:"hidden",value:Jf})}else{var mp=ep.length>0?ep.map(function(Pp,tg){return Zg.createElement("input",{key:"i-".concat(tg),name:Qf,type:"hidden",value:df.getOptionValue(Pp)})}):Zg.createElement("input",{name:Qf,type:"hidden"});return Zg.createElement("div",null,mp)}else{var Tp=ep[0]?this.getOptionValue(ep[0]):"";return Zg.createElement("input",{name:Qf,type:"hidden",value:Tp})}}},{key:"renderLiveRegion",value:function(){var df=this.commonProps,gf=this.state,Ef=gf.ariaSelection,Rf=gf.focusedOption,Vf=gf.focusedValue,Qf=gf.isFocused,ep=gf.selectValue,Jf=this.getFocusableOptions();return Zg.createElement(MP,Kg({},df,{ariaSelection:Ef,focusedOption:Rf,focusedValue:Vf,isFocused:Qf,selectValue:ep,focusableOptions:Jf}))}},{key:"render",value:function(){var df=this.getComponents(),gf=df.Control,Ef=df.IndicatorsContainer,Rf=df.SelectContainer,Vf=df.ValueContainer,Qf=this.props,ep=Qf.className,Jf=Qf.id,mp=Qf.isDisabled,Tp=Qf.menuIsOpen,Pp=this.state.isFocused,tg=this.commonProps=this.getCommonProps();return Zg.createElement(Rf,Kg({},tg,{className:ep,innerProps:{id:Jf,onKeyDown:this.onKeyDown},isDisabled:mp,isFocused:Pp}),this.renderLiveRegion(),Zg.createElement(gf,Kg({},tg,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:mp,isFocused:Pp,menuIsOpen:Tp}),Zg.createElement(Vf,Kg({},tg,{isDisabled:mp}),this.renderPlaceholderOrValue(),this.renderInput()),Zg.createElement(Ef,Kg({},tg,{isDisabled:mp}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(df,gf){var Ef=gf.prevProps,Rf=gf.clearFocusValueOnUpdate,Vf=gf.inputIsHiddenAfterUpdate,Qf=df.options,ep=df.value,Jf=df.menuIsOpen,mp=df.inputValue,Tp={};if(Ef&&(ep!==Ef.value||Qf!==Ef.options||Jf!==Ef.menuIsOpen||mp!==Ef.inputValue)){var Pp=gT(ep),tg=Jf?iA(df,Pp):[],gg=Rf?oA(gf,Pp):null,fg=aA(gf,tg);Tp={selectValue:Pp,focusedOption:fg,focusedValue:gg,clearFocusValueOnUpdate:!1}}var Tg=Vf!=null&&df!==Ef?{inputIsHidden:Vf,inputIsHiddenAfterUpdate:void 0}:{};return Dy(Dy(Dy({},Tp),Tg),{},{prevProps:df})}}]),uf}(rp);MI.defaultProps=nA;var lA={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},cA=function(go){var xo,uf;return uf=xo=function(df){fx(Ef,df);var gf=iw(Ef);function Ef(){var Rf;nw(this,Ef);for(var Vf=arguments.length,Qf=new Array(Vf),ep=0;ep1?Qf-1:0),Jf=1;Jf{const xo=go.content?zO.find(uf=>uf.value===go.content):null;return kf("div",{className:"r6o-purposedropdown"},kf(hA,{value:xo,onChange:go.onChange,options:zO,isDisabled:!go.editable}))};const dA=go=>kf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 940",width:go.width},kf("metadata",null,"IcoFont Icons"),kf("title",null,"simple-down"),kf("glyph",{glyphName:"simple-down",unicode:"",horizAdvX:"1000"}),kf("path",{fill:"currentColor",d:"M200 392.6l300 300 300-300-85.10000000000002-85.10000000000002-214.89999999999998 214.79999999999995-214.89999999999998-214.89999999999998-85.10000000000002 85.20000000000005z"})),fA=go=>kf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"180 150 700 800",width:go.width},kf("metadata",null,"IcoFont Icons"),kf("title",null,"close"),kf("glyph",{glyphName:"close",unicode:"",horizAdvX:"1000"}),kf("path",{fill:"currentColor",d:"M709.8 206.6c-64.39999999999998 65.50000000000003-128.89999999999998 131.20000000000002-194.19999999999993 197.6-8.600000000000023 8.699999999999989-22.400000000000034 8.800000000000011-31 0-65-66-129.70000000000005-131.8-194.5-197.6-8.600000000000023-8.699999999999989-22.400000000000034-8.599999999999994-30.900000000000034 0.09999999999999432-15.699999999999989 16.200000000000017-31.099999999999994 32.30000000000001-47.099999999999994 48.80000000000001-8.5 8.800000000000011-8.299999999999983 23 0.20000000000001705 31.69999999999999 63.099999999999966 64.19999999999999 127.89999999999998 130.10000000000002 193.59999999999997 197 8.600000000000023 8.699999999999989 8.5 22.80000000000001 0 31.599999999999966-65.19999999999999 66.40000000000009-130.2 132.5-194.7 198.10000000000002-8.5 8.700000000000045-8.5 22.800000000000068 0.20000000000001705 31.399999999999977l47.79999999999998 47.90000000000009c8.600000000000023 8.599999999999909 22.600000000000023 8.599999999999909 31.100000000000023-0.10000000000002274l194.2-197.30000000000007c8.600000000000023-8.699999999999932 22.399999999999977-8.699999999999932 31 0 64.70000000000005 65.80000000000007 129.20000000000005 131.4000000000001 194.20000000000005 197.5 8.599999999999909 8.700000000000045 22.5 8.800000000000068 31 0.10000000000002274 16-16.199999999999932 31.699999999999932-32.19999999999993 47.59999999999991-48.299999999999955 8.600000000000023-8.700000000000045 8.600000000000023-22.899999999999977 0.10000000000002274-31.600000000000023-63.799999999999955-65-128.5-130.89999999999998-194.19999999999993-197.79999999999995-8.600000000000023-8.700000000000045-8.600000000000023-22.900000000000034 0-31.600000000000023 65.19999999999993-66.40000000000003 130.0999999999999-132.5 194.5-198.20000000000005 8.599999999999909-8.699999999999989 8.5-22.799999999999955-0.10000000000002274-31.49999999999997l-47.80000000000007-48.099999999999994c-8.5-8.5-22.399999999999977-8.400000000000006-31 0.29999999999998295z"})),pA=go=>kf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:go.width},kf("path",{fill:"currentColor",d:"M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"}));var gA=go=>{const[xo,uf]=Rp(!1),[df,gf]=Rp(!1),Ef=mp=>{uf(!0),gf(!1)},Rf=mp=>{go.onDelete(go.body),gf(!1)},Vf=mp=>go.onUpdate(go.body,uo(yn({},go.body),{value:mp.target.value})),Qf=mp=>go.onUpdate(go.body,uo(yn({},go.body),{purpose:mp.value})),ep=go.body.modified||go.body.created,Jf=go.body.creator&&kf("div",{className:"r6o-lastmodified"},kf("span",{className:"r6o-lastmodified-by"},go.body.creator.name||go.body.creator.id),go.body.created&&kf("span",{className:"r6o-lastmodified-at"},kf(q$,{datetime:go.env.toClientTime(ep),locale:ay.locale()})));return go.readOnly?kf("div",{className:"r6o-widget comment"},kf("div",{className:"r6o-readonly-comment"},go.body.value),Jf):kf("div",{className:xo?"r6o-widget comment editable":"r6o-widget comment"},kf(tx,{editable:xo,content:go.body.value,onChange:Vf,onSaveAndClose:go.onSaveAndClose}),!xo&&Jf,go.purposeSelector&&kf(DI,{editable:xo,content:go.body.purpose,onChange:Qf,onSaveAndClose:go.onSaveAndClose}),kf("div",{className:df?"r6o-icon r6o-arrow-down r6o-menu-open":"r6o-icon r6o-arrow-down",onClick:()=>gf(!df)},kf(dA,{width:12})),df&&kf(h2,{onEdit:Ef,onDelete:Rf,onClickOutside:()=>gf(!1)}))};const mA=zO.map(go=>go.value),LI=(go,xo)=>{const uf=xo?mA.indexOf(go.purpose)>-1:go.purpose=="commenting"||go.purpose=="replying";return go.type==="TextualBody"&&(!go.hasOwnProperty("purpose")||uf)},FI=(go,xo)=>{var uf,df;if(xo.editable===!0)return!1;if(xo.editable===!1)return!0;if(xo.editable==="MINE_ONLY"){const gf=(uf=go.creator)==null?void 0:uf.id;return((df=xo.env.user)==null?void 0:df.id)!==gf}return xo.readOnly},vA=(go,xo)=>go||{type:"TextualBody",value:"",purpose:xo?"replying":"commenting",draft:!0},BI=go=>{const xo=go.annotation?go.annotation.bodies.filter(Rf=>LI(Rf,go.purposeSelector)):[],uf=vA(xo.find(Rf=>Rf.draft==!0),xo.length>1),df=xo.filter(Rf=>Rf!=uf),gf=Rf=>{const Vf=uf.value,Qf=Rf.target.value;Vf.length===0&&Qf.length>0?go.onAppendBody(uo(yn({},uf),{value:Qf})):Vf.length>0&&Qf.length===0?go.onRemoveBody(uf):go.onUpdateBody(uf,uo(yn({},uf),{value:Qf}))},Ef=Rf=>go.onUpdateBody(uf,uo(yn({},uf),{purpose:Rf.value}));return kf(Gf,null,df.map((Rf,Vf)=>kf(gA,{key:Vf,env:go.env,purposeSelector:go.purposeSelector,readOnly:FI(Rf,go),body:Rf,onUpdate:go.onUpdateBody,onDelete:go.onRemoveBody,onSaveAndClose:go.onSaveAndClose})),!go.readOnly&&go.annotation&&kf("div",{className:"r6o-widget comment editable"},kf(tx,{focus:go.focus,content:uf.value,editable:!0,placeholder:df.length>0?ay.t("Add a reply..."):ay.t("Add a comment..."),onChange:gf,onSaveAndClose:()=>go.onSaveAndClose()}),go.purposeSelector&&uf.value.length>0&&kf(DI,{editable:!0,content:uf.purpose,onChange:Ef,onSaveAndClose:()=>go.onSaveAndClose()})))};BI.disableDelete=(go,xo)=>go.bodies.filter(uf=>LI(uf,xo.purposeSelector)).some(uf=>FI(uf,xo));var jI=BI;function zI(go,xo){go.prototype=Object.create(xo.prototype),go.prototype.constructor=go,_2(go,xo)}function yA(go,xo){return go.classList?!!xo&&go.classList.contains(xo):(" "+(go.className.baseVal||go.className)+" ").indexOf(" "+xo+" ")!==-1}function bA(go,xo){go.classList?go.classList.add(xo):yA(go,xo)||(typeof go.className=="string"?go.className=go.className+" "+xo:go.setAttribute("class",(go.className&&go.className.baseVal||"")+" "+xo))}function HI(go,xo){return go.replace(new RegExp("(^|\\s)"+xo+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function $A(go,xo){go.classList?go.classList.remove(xo):typeof go.className=="string"?go.className=HI(go.className,xo):go.setAttribute("class",HI(go.className&&go.className.baseVal||"",xo))}var UI={disabled:!1},VI=Zg.createContext(null),wT="unmounted",T2="exited",k2="entering",zE="entered",HO="exiting",sw=function(go){zI(xo,go);function xo(df,gf){var Ef;Ef=go.call(this,df,gf)||this;var Rf=gf,Vf=Rf&&!Rf.isMounting?df.enter:df.appear,Qf;return Ef.appearStatus=null,df.in?Vf?(Qf=T2,Ef.appearStatus=k2):Qf=zE:df.unmountOnExit||df.mountOnEnter?Qf=wT:Qf=T2,Ef.state={status:Qf},Ef.nextCallback=null,Ef}xo.getDerivedStateFromProps=function(df,gf){var Ef=df.in;return Ef&&gf.status===wT?{status:T2}:null};var uf=xo.prototype;return uf.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},uf.componentDidUpdate=function(df){var gf=null;if(df!==this.props){var Ef=this.state.status;this.props.in?Ef!==k2&&Ef!==zE&&(gf=k2):(Ef===k2||Ef===zE)&&(gf=HO)}this.updateStatus(!1,gf)},uf.componentWillUnmount=function(){this.cancelNextCallback()},uf.getTimeouts=function(){var df=this.props.timeout,gf,Ef,Rf;return gf=Ef=Rf=df,df!=null&&typeof df!="number"&&(gf=df.exit,Ef=df.enter,Rf=df.appear!==void 0?df.appear:Ef),{exit:gf,enter:Ef,appear:Rf}},uf.updateStatus=function(df,gf){df===void 0&&(df=!1),gf!==null?(this.cancelNextCallback(),gf===k2?this.performEnter(df):this.performExit()):this.props.unmountOnExit&&this.state.status===T2&&this.setState({status:wT})},uf.performEnter=function(df){var gf=this,Ef=this.props.enter,Rf=this.context?this.context.isMounting:df,Vf=this.props.nodeRef?[Rf]:[Zg.findDOMNode(this),Rf],Qf=Vf[0],ep=Vf[1],Jf=this.getTimeouts(),mp=Rf?Jf.appear:Jf.enter;if(!df&&!Ef||UI.disabled){this.safeSetState({status:zE},function(){gf.props.onEntered(Qf)});return}this.props.onEnter(Qf,ep),this.safeSetState({status:k2},function(){gf.props.onEntering(Qf,ep),gf.onTransitionEnd(mp,function(){gf.safeSetState({status:zE},function(){gf.props.onEntered(Qf,ep)})})})},uf.performExit=function(){var df=this,gf=this.props.exit,Ef=this.getTimeouts(),Rf=this.props.nodeRef?void 0:Zg.findDOMNode(this);if(!gf||UI.disabled){this.safeSetState({status:T2},function(){df.props.onExited(Rf)});return}this.props.onExit(Rf),this.safeSetState({status:HO},function(){df.props.onExiting(Rf),df.onTransitionEnd(Ef.exit,function(){df.safeSetState({status:T2},function(){df.props.onExited(Rf)})})})},uf.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},uf.safeSetState=function(df,gf){gf=this.setNextCallback(gf),this.setState(df,gf)},uf.setNextCallback=function(df){var gf=this,Ef=!0;return this.nextCallback=function(Rf){Ef&&(Ef=!1,gf.nextCallback=null,df(Rf))},this.nextCallback.cancel=function(){Ef=!1},this.nextCallback},uf.onTransitionEnd=function(df,gf){this.setNextCallback(gf);var Ef=this.props.nodeRef?this.props.nodeRef.current:Zg.findDOMNode(this),Rf=df==null&&!this.props.addEndListener;if(!Ef||Rf){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var Vf=this.props.nodeRef?[this.nextCallback]:[Ef,this.nextCallback],Qf=Vf[0],ep=Vf[1];this.props.addEndListener(Qf,ep)}df!=null&&setTimeout(this.nextCallback,df)},uf.render=function(){var df=this.state.status;if(df===wT)return null;var gf=this.props,Ef=gf.children;gf.in,gf.mountOnEnter,gf.unmountOnExit,gf.appear,gf.enter,gf.exit,gf.timeout,gf.addEndListener,gf.onEnter,gf.onEntering,gf.onEntered,gf.onExit,gf.onExiting,gf.onExited,gf.nodeRef;var Rf=OE(gf,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Zg.createElement(VI.Provider,{value:null},typeof Ef=="function"?Ef(df,Rf):Zg.cloneElement(Zg.Children.only(Ef),Rf))},xo}(Zg.Component);sw.contextType=VI,sw.propTypes={};function HE(){}sw.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:HE,onEntering:HE,onEntered:HE,onExit:HE,onExiting:HE,onExited:HE},sw.UNMOUNTED=wT,sw.EXITED=T2,sw.ENTERING=k2,sw.ENTERED=zE,sw.EXITING=HO;var _A=sw,wA=function(go,xo){return go&&xo&&xo.split(" ").forEach(function(uf){return bA(go,uf)})},UO=function(go,xo){return go&&xo&&xo.split(" ").forEach(function(uf){return $A(go,uf)})},VO=function(go){zI(xo,go);function xo(){for(var df,gf=arguments.length,Ef=new Array(gf),Rf=0;Rfxo.filter(uf=>(uf.label?uf.label:uf).toLowerCase().startsWith(go.toLowerCase())),SA=(go,xo)=>xo(go);var TA=go=>{const xo=Kf(),[uf,df]=Rp(go.initialValue||""),[gf,Ef]=Rp([]),[Rf,Vf]=Rp(null);Op(()=>{go.focus&&xo.current.querySelector("input").focus({preventScroll:!0})},[]),Op(()=>{go.onChange&&go.onChange(uf)},[uf]);const Qf=Jf=>{if(typeof go.vocabulary=="function"){const mp=SA(Jf,go.vocabulary);mp.then?mp.then(Ef):Ef(mp)}else{const mp=EA(Jf,go.vocabulary);Ef(mp)}},ep=()=>{if(Rf!==null)go.onSubmit(gf[Rf]);else{const Jf=uf.trim();if(Jf){const mp=Array.isArray(go.vocabulary)?go.vocabulary.find(Tp=>(Tp.label||Tp).toLowerCase()===Jf.toLowerCase()):null;mp?go.onSubmit(mp):go.onSubmit(Jf)}}df(""),Ef([]),Vf(null)};return kf("div",{ref:xo,className:"r6o-autocomplete"},kf("div",null,kf("input",{onKeyDown:Jf=>{if(Jf.which===13)ep();else if(Jf.which===27)go.onCancel&&go.onCancel();else if(gf.length>0){if(Jf.which===38)if(Rf===null)Vf(0);else{const mp=Math.max(0,Rf-1);Vf(mp)}else if(Jf.which===40)if(Rf===null)Vf(0);else{const mp=Math.min(gf.length-1,Rf+1);Vf(mp)}}else Jf.which===40&&Array.isArray(go.vocabulary)&&Ef(go.vocabulary)},onChange:Jf=>{const{value:mp}=Jf.target;df(mp),Vf(null),mp?Qf(mp):Ef([])},value:uf,placeholder:go.placeholder})),kf("ul",null,gf.length>0&&gf.map((Jf,mp)=>kf("li",{key:`${Jf.label?Jf.label:Jf}${mp}`,onClick:ep,onMouseEnter:()=>Vf(mp),style:Rf===mp?{backgroundColor:"#bde4ff"}:{}},Jf.label?Jf.label:Jf))))};const kA=go=>go||{type:"TextualBody",value:"",purpose:"tagging",draft:!0};var GI=go=>{const xo=go.annotation?go.annotation.bodies.filter(Jf=>Jf.type==="TextualBody"&&Jf.purpose==="tagging"):[],uf=kA(xo.slice().reverse().find(Jf=>Jf.draft)),df=xo.filter(Jf=>Jf!=uf),[gf,Ef]=Rp(!1),Rf=Jf=>mp=>{Ef(gf===Jf?!1:Jf)},Vf=Jf=>{const mp=uf.value.trim(),Tp=Jf.trim();mp.length===0&&Tp.length>0?go.onAppendBody(uo(yn({},uf),{value:Tp})):mp.length>0&&Tp.length===0?go.onRemoveBody(uf):go.onUpdateBody(uf,uo(yn({},uf),{value:Tp}))},Qf=Jf=>mp=>{mp.stopPropagation(),go.onRemoveBody(Jf)},ep=Jf=>{const mp=Jf.label?uo(yn({},uf),{value:Jf.label,source:Jf.uri}):uo(yn({},uf),{value:Jf}),Tp=po(mp,["draft"]);uf.value.trim().length===0?go.onAppendBody(Tp):go.onUpdateBody(uf,Tp)};return kf("div",{className:"r6o-widget r6o-tag"},df.length>0&&kf("ul",{className:"r6o-taglist"},df.map(Jf=>kf("li",{key:Jf.value,onClick:Rf(Jf.value)},kf("span",{className:"r6o-label"},Jf.value),!go.readOnly&&kf(xA,{in:gf===Jf.value,timeout:200,classNames:"r6o-delete"},kf("span",{className:"r6o-delete-wrapper",onClick:Qf(Jf)},kf("span",{className:"r6o-delete"},kf(fA,{width:12}))))))),!go.readOnly&&kf(TA,{focus:go.focus,placeholder:ay.t("Add tag..."),vocabulary:go.vocabulary||[],onChange:Vf,onSubmit:ep}))};class WI extends rp{constructor(xo){super(xo),this.element=Zg.createRef()}renderWidget(xo){const uf=this.props.widget(uo(yn({annotation:xo.annotation,readOnly:xo.readOnly},xo.config),{onAppendBody:(df,gf)=>xo.onAppendBody(df,gf),onUpdateBody:(df,gf,Ef)=>xo.onUpdateBody(df,gf,Ef),onUpsertBody:(df,gf,Ef)=>xo.onUpsertBody(df,gf,Ef),onRemoveBody:(df,gf)=>xo.onRemoveBody(df,gf),onBatchModify:(df,gf)=>xo.onBatchModify(df,gf),onSetProperty:(df,gf)=>xo.onSetProperty(df,gf),onSaveAndClose:()=>xo.onSaveAndClose()}));for(;this.element.current.firstChild;)this.element.current.removeChild(this.element.current.lastChild);this.element.current.appendChild(uf)}componentDidMount(){this.renderWidget(this.props)}componentWillReceiveProps(xo){this.element.current&&this.props.annotation!==xo.annotation&&this.renderWidget(xo)}render(){return kf("div",{ref:this.element,className:"widget"})}}window.React=Zg,window.ReactDOM=Zg;const CA={COMMENT:jI,TAG:GI},OA=[kf(jI,null),kf(GI,null)],IA=go=>{const xo=df=>{var gf;return typeof df=="function"&&!!((gf=df.prototype)!=null&&gf.isReactComponent)},uf=df=>typeof df=="function"&&(String(df).match(/return .+\(['|"].+['|"],\s*\{/g)||String(df).match(/return .+preact_compat/)||String(df).match(/return .+\.createElement/g));return xo(go)||uf(go)},PA=go=>{const xo=(uf,df,gf)=>{if(typeof uf=="string"||uf instanceof String)return Zg.createElement(CA[uf],df);if((gf==null?void 0:gf.toLowerCase())==="react")return Zg.createElement(uf,df);if((gf==null?void 0:gf.toLowerCase())==="plainjs")return kf(WI,{widget:uf,config:df});if(IA(uf))return Zg.createElement(uf,df);if(typeof uf=="function"||uf instanceof Function)return kf(WI,{widget:uf,config:df});throw`${uf} is not a valid plugin`};if(go.widget){const uf=go,{widget:df,force:gf}=uf,Ef=po(uf,["widget","force"]);return xo(df,Ef,gf)}else return xo(go)},qI=14;var YI=(go,xo,uf,df)=>{const gf=go.getBoundingClientRect();xo.className="r6o-editor r6o-arrow-top r6o-arrow-left";const{left:Ef,top:Rf,right:Vf,bottom:Qf}=uf.getBoundingClientRect();if(xo.style.top=`${Qf-gf.top+qI}px`,xo.style.left=`${Ef-gf.left}px`,df){const ep=xo.children[1].getBoundingClientRect();if(ep.right>window.innerWidth&&(xo.classList.remove("r6o-arrow-left"),xo.classList.add("r6o-arrow-right"),xo.style.left=`${Vf-ep.width-gf.left}px`),ep.bottom>window.innerHeight){xo.classList.remove("r6o-arrow-top"),xo.classList.add("r6o-arrow-bottom");const mp=xo.children[1].getBoundingClientRect().height;xo.style.top=`${Rf-gf.top-mp-qI}px`}const Jf=xo.children[1].getBoundingClientRect();if(Jf.top<0){xo.classList.add("pushed","down"),xo.style.top=`${-gf.top}px`;const mp=Qf-gf.top;Jf.height-gf.top>mp&&xo.classList.remove("r6o-arrow-bottom")}Jf.left<0&&(xo.classList.add("pushed","right"),xo.style.left=`${-gf.left}px`),requestAnimationFrame(()=>xo.style.opacity=1)}};const KI=go=>{const{top:xo,left:uf,width:df,height:gf}=go.getBoundingClientRect();return`${xo}, ${uf}, ${df}, ${gf}`};class AA extends rp{constructor(xo){super(xo),mo(this,"initResizeObserver",()=>{const uf=this.props.autoPosition===void 0?!0:this.props.autoPosition;if(window!=null&&window.ResizeObserver){const df=new ResizeObserver(()=>{this.state.dragged||YI(this.props.wrapperEl,this.element.current,this.props.selectedElement,uf)});return df.observe(this.props.wrapperEl),()=>df.disconnect()}else this.state.dragged||YI(this.props.wrapperEl,this.element.current,this.props.selectedElement,uf)}),mo(this,"creationMeta",uf=>{const df={},{user:gf}=this.props.env;return gf&&(df.creator={},gf.id&&(df.creator.id=gf.id),gf.displayName&&(df.creator.name=gf.displayName),df[uf.created?"modified":"created"]=this.props.env.getCurrentTimeAdjusted()),df}),mo(this,"getCurrentAnnotation",()=>this.state.currentAnnotation.clone()),mo(this,"updateCurrentAnnotation",(uf,df)=>this.setState({currentAnnotation:this.state.currentAnnotation.clone(uf)},()=>{df&&this.onOk()})),mo(this,"onAppendBody",(uf,df)=>this.updateCurrentAnnotation({body:[...this.state.currentAnnotation.bodies,yn(yn({},uf),this.creationMeta(uf))]},df)),mo(this,"onUpdateBody",(uf,df,gf)=>this.updateCurrentAnnotation({body:this.state.currentAnnotation.bodies.map(Ef=>Ef===uf?yn(yn({},df),this.creationMeta(df)):Ef)},gf)),mo(this,"onRemoveBody",(uf,df)=>this.updateCurrentAnnotation({body:this.state.currentAnnotation.bodies.filter(gf=>gf!==uf)},df)),mo(this,"onUpsertBody",(uf,df,gf)=>{if(uf==null&&df!=null)this.onAppendBody(df,gf);else if(uf!=null&&df!=null)this.onUpdateBody(uf,df,gf);else if(uf!=null&&df==null){const Ef=this.state.currentAnnotation.bodies.find(Rf=>Rf.purpose===uf.purpose);Ef?this.onUpdateBody(Ef,uf,gf):this.onAppendBody(uf,gf)}}),mo(this,"onBatchModify",(uf,df)=>{const gf=uf.filter(ep=>ep.action==="upsert"&&ep.body).map(ep=>({previous:this.state.currentAnnotation.bodies.find(Jf=>Jf.purpose===ep.body.purpose),updated:yn(yn({},ep.body),this.creationMeta(ep.body))})),Ef=uf.filter(ep=>ep.action==="remove").map(ep=>ep.body),Rf=[...uf.filter(ep=>ep.action==="append"||ep.action==="upsert"&&ep.updated&&!ep.previous).map(ep=>yn(yn({},ep.body),this.creationMeta(ep.body))),...gf.filter(ep=>!ep.previous).map(ep=>ep.updated)],Vf=[...uf.filter(ep=>ep.action==="update"||ep.action==="upsert"&&ep.updated&&ep.previous).map(ep=>({previous:ep.previous,updated:yn(yn({},ep.updated),this.creationMeta(ep.updated))})),...gf.filter(ep=>ep.previous)],Qf=[...this.state.currentAnnotation.bodies.filter(ep=>!Ef.includes(ep)).map(ep=>{const Jf=Vf.find(mp=>mp.previous===ep);return Jf?Jf.updated:ep}),...Rf];this.updateCurrentAnnotation({body:Qf},df)}),mo(this,"onSetProperty",(uf,df)=>{if(["@context","id","type","body","target"].includes(uf))throw new Exception(`Cannot set ${uf} - not allowed`);if(df)this.updateCurrentAnnotation({[uf]:df});else{const gf=this.currentAnnotation.clone();delete gf[uf],this.setState({currentAnnotation:gf})}}),mo(this,"onCancel",()=>this.props.onCancel(this.props.annotation)),mo(this,"onOk",()=>{const uf=gf=>gf.clone({body:gf.bodies.map(Ef=>{var Rf=Ef,Vf=po(Rf,["draft"]);return Vf})}),{currentAnnotation:df}=this.state;df.bodies.length===0&&!this.props.allowEmpty?df.isSelection?this.onCancel():this.props.onAnnotationDeleted(this.props.annotation):df.isSelection?this.props.onAnnotationCreated(uf(df).toAnnotation()):this.props.onAnnotationUpdated(uf(df),this.props.annotation)}),mo(this,"onDelete",()=>this.props.onAnnotationDeleted(this.props.annotation)),this.element=Zg.createRef(),this.state={currentAnnotation:xo.annotation,dragged:!1,selectionBounds:KI(xo.selectedElement)}}componentWillReceiveProps(xo){var uf;const{selectionBounds:df}=this.state,gf=KI(xo.selectedElement);(uf=this.props.annotation)!=null&&uf.isEqual(xo.annotation)?this.setState({selectionBounds:gf}):this.setState({currentAnnotation:xo.annotation,selectionBounds:gf}),this.props.modifiedTarget!=xo.modifiedTarget&&this.state.currentAnnotation&&this.updateCurrentAnnotation({target:this.props.modifiedTarget}),df!=gf&&this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}componentDidMount(){this.removeObserver=this.initResizeObserver(),new MutationObserver(()=>{this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}).observe(this.element.current,{childList:!0,subtree:!0})}componentWillUnmount(){this.removeObserver&&this.removeObserver()}render(){const{currentAnnotation:xo}=this.state,uf=this.props.widgets?this.props.widgets.map(PA):OA,df=Ef=>Ef.type.disableDelete?Ef.type.disableDelete(xo,uo(yn({},Ef.props),{readOnly:this.props.readOnly,env:this.props.env})):!1,gf=xo&&(xo.bodies.length>0||this.props.allowEmpty)&&!this.props.readOnly&&!xo.isSelection&&!uf.some(df);return kf(Ew,{disabled:!this.props.detachable,handle:".r6o-draggable",cancel:".r6o-btn, .r6o-btn *",onDrag:()=>this.setState({dragged:!0})},kf("div",{ref:this.element,className:this.state.dragged?"r6o-editor dragged":"r6o-editor"},kf("div",{className:"r6o-arrow"}),kf("div",{className:"r6o-editor-inner"},uf.map((Ef,Rf)=>Zg.cloneElement(Ef,{key:`${Rf}`,focus:Rf===0,annotation:xo,readOnly:this.props.readOnly,env:this.props.env,onAppendBody:this.onAppendBody,onUpdateBody:this.onUpdateBody,onRemoveBody:this.onRemoveBody,onUpsertBody:this.onUpsertBody,onBatchModify:this.onBatchModify,onSetProperty:this.onSetProperty,onSaveAndClose:this.onOk})),this.props.readOnly?kf("div",{className:"r6o-footer"},kf("button",{className:"r6o-btn",onClick:this.onCancel},ay.t("Close"))):kf("div",{className:this.props.detachable?"r6o-footer r6o-draggable":"r6o-footer"},gf&&kf("button",{className:"r6o-btn left delete-annotation",title:ay.t("Delete"),onClick:this.onDelete},kf(pA,{width:12})),kf("button",{className:"r6o-btn outline",onClick:this.onCancel},ay.t("Cancel")),kf("button",{className:"r6o-btn ",onClick:this.onOk},ay.t("Ok"))))))}}var xC,RA=new Uint8Array(16);function NA(){if(!xC&&(xC=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!xC))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xC(RA)}var MA=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function DA(go){return typeof go=="string"&&MA.test(go)}for(var j0=[],GO=0;GO<256;++GO)j0.push((GO+256).toString(16).substr(1));function LA(go){var xo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,uf=(j0[go[xo+0]]+j0[go[xo+1]]+j0[go[xo+2]]+j0[go[xo+3]]+"-"+j0[go[xo+4]]+j0[go[xo+5]]+"-"+j0[go[xo+6]]+j0[go[xo+7]]+"-"+j0[go[xo+8]]+j0[go[xo+9]]+"-"+j0[go[xo+10]]+j0[go[xo+11]]+j0[go[xo+12]]+j0[go[xo+13]]+j0[go[xo+14]]+j0[go[xo+15]]).toLowerCase();if(!DA(uf))throw TypeError("Stringified UUID is invalid");return uf}function XI(go,xo,uf){go=go||{};var df=go.random||(go.rng||NA)();if(df[6]=df[6]&15|64,df[8]=df[8]&63|128,xo){uf=uf||0;for(var gf=0;gf<16;++gf)xo[uf+gf]=df[gf];return xo}return LA(df)}var FA=function go(xo,uf){if(xo===uf)return!0;if(xo&&uf&&typeof xo=="object"&&typeof uf=="object"){if(xo.constructor!==uf.constructor)return!1;var df,gf,Ef;if(Array.isArray(xo)){if(df=xo.length,df!=uf.length)return!1;for(gf=df;gf--!=0;)if(!go(xo[gf],uf[gf]))return!1;return!0}if(xo.constructor===RegExp)return xo.source===uf.source&&xo.flags===uf.flags;if(xo.valueOf!==Object.prototype.valueOf)return xo.valueOf()===uf.valueOf();if(xo.toString!==Object.prototype.toString)return xo.toString()===uf.toString();if(Ef=Object.keys(xo),df=Ef.length,df!==Object.keys(uf).length)return!1;for(gf=df;gf--!=0;)if(!Object.prototype.hasOwnProperty.call(uf,Ef[gf]))return!1;for(gf=df;gf--!=0;){var Rf=Ef[gf];if(!go(xo[Rf],uf[Rf]))return!1}return!0}return xo!==xo&&uf!==uf},ZI=FA;const WO=class{constructor(go,xo){mo(this,"clone",(uf,df)=>new WO(yn(yn({},this.underlying),uf),yn(yn({},this.opts),df))),mo(this,"selector",uf=>{const{target:df}=this.underlying;if(df.selector)return(Array.isArray(df.selector)?df.selector:[df.selector]).find(gf=>gf.type===uf)}),this.underlying=go,this.opts=xo}isEqual(go){return(go==null?void 0:go.type)!=="Annotation"?!1:this.underlying===go.underlying?!0:!this.underlying.id||!go.underlying.id?!1:ZI(this.underlying,go.underlying)}get readOnly(){var go;return(go=this.opts)==null?void 0:go.readOnly}get id(){return this.underlying.id}get type(){return this.underlying.type}get motivation(){return this.underlying.motivation}get body(){return this.underlying.body}get target(){return this.underlying.target}get bodies(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}set bodies(go){this.underlying.body=go}get targets(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}get quote(){return this.selector("TextQuoteSelector").exact}get start(){return this.selector("TextPositionSelector").start}get end(){return this.selector("TextPositionSelector").end}};let C2=WO;mo(C2,"create",go=>{const xo={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Annotation",id:`#${XI()}`,body:[]};return new WO(yn(yn({},xo),go))});class xT{constructor(xo,uf){mo(this,"clone",df=>{const gf=new xT;return gf.underlying=JSON.parse(JSON.stringify(this.underlying)),df&&(gf.underlying=yn(yn({},gf.underlying),df)),gf}),mo(this,"selector",df=>{const{target:gf}=this.underlying;if(gf.selector)return(Array.isArray(gf.selector)?gf.selector:[gf.selector]).find(Ef=>Ef.type===df)}),mo(this,"toAnnotation",()=>{const df=Object.assign({},this.underlying,{"@context":"http://www.w3.org/ns/anno.jsonld",type:"Annotation",id:`#${XI()}`});return new C2(df)}),this.underlying={type:"Selection",body:uf||[],target:xo}}get type(){return this.underlying.type}get body(){return this.underlying.body}get target(){return this.underlying.target}get targets(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}isEqual(xo){return xo?ZI(this.underlying,xo.underlying):!1}get bodies(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}get quote(){return this.selector("TextQuoteSelector").exact}get isSelection(){return!0}}let qO=0;var BA=()=>({setServerTime:go=>{const xo=Date.now();qO=go-xo},getCurrentTimeAdjusted:()=>new Date(Date.now()+qO).toISOString(),toClientTime:go=>Date.parse(go)-qO});const jA=(go,xo)=>{if(go){const uf=go==="auto"?window.navigator.userLanguage||window.navigator.language:go;try{ay.init(uf.split("-")[0].toLowerCase(),xo)}catch{console.warn(`Unsupported locale '${uf}'. Falling back to default en.`)}}else ay.init(null,xo)},wv="http://www.w3.org/2000/svg",YO=go=>{const xo=go.getAttribute("class");return xo?new Set(xo.split(" ")):new Set},yx=(go,xo)=>{const uf=YO(go);uf.add(xo),go.setAttribute("class",Array.from(uf).join(" "))},zA=(go,xo)=>{const uf=YO(go);uf.delete(xo),uf.size===0?go.removeAttribute("class"):go.setAttribute("class",Array.from(uf).join(" "))},KO=(go,xo)=>YO(go).has(xo),O2=(go,xo)=>{const uf=go.selector("FragmentSelector");if(uf!=null&&uf.conformsTo.startsWith("http://www.w3.org/TR/media-frags")){const{value:df}=uf,gf=df.includes(":")?df.substring(df.indexOf("=")+1,df.indexOf(":")):"pixel",Ef=df.includes(":")?df.substring(df.indexOf(":")+1):df.substring(df.indexOf("=")+1);let[Rf,Vf,Qf,ep]=Ef.split(",").map(parseFloat);return gf.toLowerCase()==="percent"&&(Rf=Rf*xo.naturalWidth/100,Vf=Vf*xo.naturalHeight/100,Qf=Qf*xo.naturalWidth/100,ep=ep*xo.naturalHeight/100),{x:Rf,y:Vf,w:Qf,h:ep}}},HA=(go,xo,uf,df,gf)=>({source:gf==null?void 0:gf.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:`xywh=pixel:${go},${xo},${uf},${df}`}}),VA=(go,xo,uf,df,gf)=>{const Ef=go/gf.naturalWidth*100,Rf=xo/gf.naturalHeight*100,Vf=uf/gf.naturalWidth*100,Qf=df/gf.naturalHeight*100;return{source:gf.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:`xywh=percent:${Ef},${Rf},${Vf},${Qf}`}}},ET=(go,xo,uf,df,gf,Ef)=>(Ef==null?void 0:Ef.toLowerCase())==="percent"?VA(go,xo,uf,df,gf):HA(go,xo,uf,df,gf),EC=(go,xo,uf,df,gf)=>{go.setAttribute("x",xo),go.setAttribute("y",uf),go.setAttribute("width",df),go.setAttribute("height",gf)},SC=(go,xo,uf)=>{go.setAttribute("cx",xo),go.setAttribute("cy",uf),go.setAttribute("r",7)},JI=(go,xo,uf,df,gf)=>{const Ef=document.createElementNS(wv,"path");Ef.setAttribute("fill-rule","evenodd");const{naturalWidth:Rf,naturalHeight:Vf}=go;return Ef.setAttribute("d",`M0 0 h${Rf} v${Vf} h-${Rf} z M${xo} ${uf} h${df} v${gf} h-${df} z`),Ef},XO=(go,xo,uf,df,gf,Ef)=>{const{naturalWidth:Rf,naturalHeight:Vf}=xo;go.setAttribute("d",`M0 0 h${Rf} v${Vf} h-${Rf} z M${uf} ${df} h${gf} v${Ef} h-${gf} z`)},ZO=(go,xo,uf,df)=>{const{x:gf,y:Ef,w:Rf,h:Vf}=go.type==="Annotation"||go.type==="Selection"?O2(go,xo):{x:go,y:xo,w:uf,h:df},Qf=document.createElementNS(wv,"g");if(Rf===0&&Vf===0){yx(Qf,"a9s-point"),yx(Qf,"a9s-non-scaling"),Qf.setAttribute("transform-origin",`${gf} ${Ef}`);const ep=document.createElementNS(wv,"circle"),Jf=document.createElementNS(wv,"circle");Jf.setAttribute("class","a9s-inner"),SC(Jf,gf,Ef),ep.setAttribute("class","a9s-outer"),SC(ep,gf,Ef),Qf.appendChild(ep),Qf.appendChild(Jf)}else{const ep=document.createElementNS(wv,"rect"),Jf=document.createElementNS(wv,"rect");Jf.setAttribute("class","a9s-inner"),EC(Jf,gf,Ef,Rf,Vf),ep.setAttribute("class","a9s-outer"),EC(ep,gf,Ef,Rf,Vf),Qf.appendChild(ep),Qf.appendChild(Jf)}return Qf},QI=go=>{const xo=go.querySelector(".a9s-outer");if(xo.nodeName==="rect"){const uf=parseFloat(xo.getAttribute("x")),df=parseFloat(xo.getAttribute("y")),gf=parseFloat(xo.getAttribute("width")),Ef=parseFloat(xo.getAttribute("height"));return{x:uf,y:df,w:gf,h:Ef}}else{const uf=parseFloat(xo.getAttribute("cx")),df=parseFloat(xo.getAttribute("cy"));return{x:uf,y:df,w:0,h:0}}},JO=(go,xo,uf,df,gf)=>{const Ef=go.querySelector(".a9s-inner"),Rf=go.querySelector(".a9s-outer");Rf.nodeName==="rect"?(EC(Ef,xo,uf,df,gf),EC(Rf,xo,uf,df,gf)):(SC(Ef,xo,uf),SC(Rf,xo,uf))},GA=(go,xo)=>{const{w:uf,h:df}=O2(go,xo);return uf*df};class WA{constructor(xo,uf,df,gf,Ef){mo(this,"dragTo",(Rf,Vf)=>{this.group.style.display=null,this.opposite=[Rf,Vf];const{x:Qf,y:ep,w:Jf,h:mp}=this.bbox;XO(this.mask,this.env.image,Qf,ep,Jf,mp),JO(this.rect,Qf,ep,Jf,mp)}),mo(this,"getBoundingClientRect",()=>this.rect.getBoundingClientRect()),mo(this,"toSelection",()=>{const{x:Rf,y:Vf,w:Qf,h:ep}=this.bbox;return new xT(ET(Rf,Vf,Qf,ep,this.env.image,this.config.fragmentUnit))}),mo(this,"destroy",()=>{this.group.parentNode.removeChild(this.group),this.mask=null,this.rect=null,this.group=null}),this.anchor=[xo,uf],this.opposite=[xo,uf],this.config=gf,this.env=Ef,this.group=document.createElementNS(wv,"g"),this.mask=JI(Ef.image,xo,uf,2,2),this.mask.setAttribute("class","a9s-selection-mask"),this.rect=ZO(xo,uf,2,2),this.rect.setAttribute("class","a9s-selection"),this.group.style.pointerEvents="none",this.group.style.display="none",this.group.appendChild(this.mask),this.group.appendChild(this.rect),df.appendChild(this.group)}get bbox(){const xo=this.opposite[0]-this.anchor[0],uf=this.opposite[1]-this.anchor[1];return{x:xo>0?this.anchor[0]:this.opposite[0],y:uf>0?this.anchor[1]:this.opposite[1],w:Math.max(1,Math.abs(xo)),h:Math.max(1,Math.abs(uf))}}get element(){return this.rect}}const qA={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},QO=()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,YA=go=>{let xo=null;const uf=(gf,Ef)=>new MouseEvent(gf,{screenX:Ef.screenX,screenY:Ef.screenY,clientX:Ef.clientX,clientY:Ef.clientY,pageX:Ef.pageX,pageY:Ef.pageY,bubbles:!0}),df=gf=>{const Ef=gf.changedTouches[0],Rf=uf(qA[gf.type],Ef);Ef.target.dispatchEvent(Rf),gf.preventDefault(),(gf.type==="touchstart"||gf.type==="touchmove")&&(xo&&clearTimeout(xo),xo=setTimeout(()=>{const Vf=uf("dblclick",Ef);Ef.target.dispatchEvent(Vf)},800)),gf.type==="touchend"&&xo&&clearTimeout(xo)};go.addEventListener("touchstart",df,!0),go.addEventListener("touchmove",df,!0),go.addEventListener("touchend",df,!0),go.addEventListener("touchcancel",df,!0)},TC="An implementation is missing",KA=QO();class eP extends Z1{constructor(xo,uf,df){super(),mo(this,"enableResponsive",()=>{window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{const Ef=this.svg.getBoundingClientRect(),{width:Rf,height:Vf}=this.svg.viewBox.baseVal;this.scale=Math.max(Rf/Ef.width,Vf/Ef.height),this.onScaleChanged&&this.onScaleChanged(this.scale)}),this.resizeObserver.observe(this.svg.parentNode))}),mo(this,"getSVGPoint",Ef=>{const Rf=this.svg.createSVGPoint();if(KA){const Vf=this.svg.getBoundingClientRect(),Qf=Ef.clientX-Vf.x,ep=Ef.clientY-Vf.y,{left:Jf,top:mp}=this.svg.getBoundingClientRect();return Rf.x=Qf+Jf,Rf.y=ep+mp,Rf.matrixTransform(this.g.getScreenCTM().inverse())}else return Rf.x=Ef.offsetX,Rf.y=Ef.offsetY,Rf.matrixTransform(this.g.getCTM().inverse())}),mo(this,"drawHandle",(Ef,Rf)=>{const Vf=document.createElementNS(wv,"g");Vf.setAttribute("class","a9s-handle");const Qf=document.createElementNS(wv,"g"),ep=Pp=>{const tg=document.createElementNS(wv,"circle");return tg.setAttribute("cx",Ef),tg.setAttribute("cy",Rf),tg.setAttribute("r",Pp),tg},Jf=this.config.handleRadius||6,mp=ep(Jf);mp.setAttribute("class","a9s-handle-inner");const Tp=ep(Jf+1);return Tp.setAttribute("class","a9s-handle-outer"),Qf.appendChild(Tp),Qf.appendChild(mp),Vf.appendChild(Qf),Vf}),mo(this,"setHandleXY",(Ef,Rf,Vf)=>{const Qf=Ef.querySelector(".a9s-handle-inner");Qf.setAttribute("cx",Rf),Qf.setAttribute("cy",Vf);const ep=Ef.querySelector(".a9s-handle-outer");ep.setAttribute("cx",Rf),ep.setAttribute("cy",Vf)}),mo(this,"getHandleXY",Ef=>{const Rf=Ef.querySelector(".a9s-handle-outer");return{x:parseFloat(Rf.getAttribute("cx")),y:parseFloat(Rf.getAttribute("cy"))}}),mo(this,"scaleHandle",Ef=>{const Rf=Ef.querySelector(".a9s-handle-inner"),Vf=Ef.querySelector(".a9s-handle-outer"),Qf=this.scale*(this.config.handleRadius||6);Rf.setAttribute("r",Qf),Vf.setAttribute("r",Qf)}),this.svg=xo.closest("svg"),this.g=xo,this.config=uf,this.env=df,this.scale=1;const{image:gf}=df;(gf instanceof Element||gf instanceof HTMLDocument)&&this.enableResponsive()}destroy(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=null}}class eI extends eP{constructor(xo,uf,df){super(xo,uf,df),mo(this,"attachListeners",({mouseMove:gf,mouseUp:Ef,dblClick:Rf})=>{gf&&(this.mouseMove=Vf=>{const{x:Qf,y:ep}=this.getSVGPoint(Vf);this.started||(this.emit("startSelection",{x:Qf,y:ep}),this.started=!0),gf(Qf,ep,Vf)},this.svg.addEventListener("mousemove",this.mouseMove)),Ef&&(this.mouseUp=Vf=>{if(Vf.button!==0)return;const{x:Qf,y:ep}=this.getSVGPoint(Vf);Ef(Qf,ep,Vf)},document.addEventListener("mouseup",this.mouseUp)),Rf&&(this.dblClick=Vf=>{const{x:Qf,y:ep}=this.getSVGPoint(Vf);Rf(Qf,ep,Vf)},document.addEventListener("dblclick",this.dblClick))}),mo(this,"detachListeners",()=>{this.mouseMove&&this.svg.removeEventListener("mousemove",this.mouseMove),this.mouseUp&&document.removeEventListener("mouseup",this.mouseUp),this.dblClick&&document.removeEventListener("dblclick",this.dblClick)}),mo(this,"start",(gf,Ef)=>{const{x:Rf,y:Vf}=this.getSVGPoint(gf);this.startDrawing(Rf,Vf,Ef,gf)}),mo(this,"startDrawing",gf=>{throw new Error(TC)}),mo(this,"createEditableShape",gf=>{throw new Error(TC)}),this.started=!1}get isDrawing(){throw new Error(TC)}}eI.supports=go=>{throw new Error(TC)};const tP="An implementation is missing";class rP extends eP{constructor(xo,uf,df,gf){super(uf,df,gf),mo(this,"updateState",Ef=>{throw new Error(tP)}),this.annotation=xo}get element(){throw new Error(tP)}}const XA=/firefox/i.test(navigator.userAgent),nP=(go,xo,uf,df,gf)=>{go.setAttribute("width",df),go.setAttribute("height",gf),XA?(go.setAttribute("x",0),go.setAttribute("y",0),go.setAttribute("transform",`translate(${xo}, ${uf})`)):(go.setAttribute("x",xo),go.setAttribute("y",uf))},iP=(go,xo)=>{const{x:uf,y:df,width:gf,height:Ef}=xo.getBBox(),Rf=document.createElementNS(wv,"svg");Rf.setAttribute("class","a9s-formatter-el"),nP(Rf,uf,df,gf,Ef);const Vf=document.createElementNS(wv,"g");Vf.appendChild(go),Rf.appendChild(Vf),xo.append(Rf)},kC=(go,xo,uf)=>{if(!uf)return go;const df=uf(xo);if(!df)return go;if(typeof df=="string"||df instanceof String)yx(go,df);else if(df.nodeType===Node.ELEMENT_NODE)iP(df,go);else{const{className:gf,style:Ef,element:Rf}=df;if(gf&&yx(go,gf),Ef){const Vf=go.querySelector(".a9s-outer"),Qf=go.querySelector(".a9s-inner");Vf&&Qf?(Vf.setAttribute("style","display:none"),Qf.setAttribute("style",Ef)):go.setAttribute("style",Ef)}Rf&&iP(Rf,go);for(const Vf in df)df.hasOwnProperty(Vf)&&Vf.startsWith("data-")&&go.setAttribute(Vf,df[Vf])}},tI=(go,xo,uf,df,gf)=>{const Ef=go.querySelector(".a9s-formatter-el");Ef&&nP(Ef,xo,uf,df,gf)};class ZA extends rP{constructor(xo,uf,df,gf){super(xo,uf,df,gf),mo(this,"onScaleChanged",()=>this.handles.map(this.scaleHandle)),mo(this,"setSize",(ep,Jf,mp,Tp)=>{JO(this.rectangle,ep,Jf,mp,Tp),XO(this.mask,this.env.image,ep,Jf,mp,Tp),tI(this.elementGroup,ep,Jf,mp,Tp);const[Pp,tg,gg,fg]=this.handles;this.setHandleXY(Pp,ep,Jf),this.setHandleXY(tg,ep+mp,Jf),this.setHandleXY(gg,ep+mp,Jf+Tp),this.setHandleXY(fg,ep,Jf+Tp)}),mo(this,"stretchCorners",(ep,Jf,mp)=>{const Tp=this.getHandleXY(Jf),Pp=mp.x-Tp.x,tg=mp.y-Tp.y,gg=Pp>0?Tp.x:mp.x,fg=tg>0?Tp.y:mp.y,Tg=Math.abs(Pp),Rg=Math.abs(tg);JO(this.rectangle,gg,fg,Tg,Rg),XO(this.mask,this.env.image,gg,fg,Tg,Rg),tI(this.elementGroup,gg,fg,Tg,Rg),this.setHandleXY(this.handles[ep],mp.x,mp.y);const $m=this.handles[(ep+3)%4];this.setHandleXY($m,Tp.x,mp.y);const pm=this.handles[(ep+5)%4];return this.setHandleXY(pm,mp.x,Tp.y),{x:gg,y:fg,w:Tg,h:Rg}}),mo(this,"onGrab",ep=>Jf=>{if(Jf.button!==0)return;this.grabbedElem=ep;const mp=this.getSVGPoint(Jf),{x:Tp,y:Pp}=QI(this.rectangle);this.mouseOffset={x:mp.x-Tp,y:mp.y-Pp}}),mo(this,"onMouseMove",ep=>{if(ep.button!==0)return;const Jf=(mp,Tp)=>mp<0?0:mp>Tp?Tp:mp;if(this.grabbedElem){const mp=this.getSVGPoint(ep);if(this.grabbedElem===this.rectangle){const{w:Tp,h:Pp}=QI(this.rectangle),{naturalWidth:tg,naturalHeight:gg}=this.env.image,fg=Jf(mp.x-this.mouseOffset.x,tg-Tp),Tg=Jf(mp.y-this.mouseOffset.y,gg-Pp);this.setSize(fg,Tg,Tp,Pp),this.emit("update",ET(fg,Tg,Tp,Pp,this.env.image,this.config.fragmentUnit))}else{const Tp=this.handles.indexOf(this.grabbedElem),Pp=Tp<2?this.handles[Tp+2]:this.handles[Tp-2],{x:tg,y:gg,w:fg,h:Tg}=this.stretchCorners(Tp,Pp,mp);this.emit("update",ET(tg,gg,fg,Tg,this.env.image,this.config.fragmentUnit))}}}),mo(this,"onMouseUp",ep=>{this.grabbedElem=null,this.mouseOffset=null}),mo(this,"updateState",ep=>{const{x:Jf,y:mp,w:Tp,h:Pp}=O2(ep,this.env.image);this.setSize(Jf,mp,Tp,Pp)}),this.svg.addEventListener("mousemove",this.onMouseMove),this.svg.addEventListener("mouseup",this.onMouseUp);const{x:Ef,y:Rf,w:Vf,h:Qf}=O2(xo,gf.image);this.containerGroup=document.createElementNS(wv,"g"),this.mask=JI(gf.image,Ef,Rf,Vf,Qf),this.mask.setAttribute("class","a9s-selection-mask"),this.containerGroup.appendChild(this.mask),this.elementGroup=document.createElementNS(wv,"g"),this.elementGroup.setAttribute("class","a9s-annotation editable selected"),this.rectangle=ZO(Ef,Rf,Vf,Qf),this.rectangle.querySelector(".a9s-inner").addEventListener("mousedown",this.onGrab(this.rectangle)),this.elementGroup.appendChild(this.rectangle),this.handles=[[Ef,Rf],[Ef+Vf,Rf],[Ef+Vf,Rf+Qf],[Ef,Rf+Qf]].map(ep=>{const[Jf,mp]=ep,Tp=this.drawHandle(Jf,mp);return Tp.addEventListener("mousedown",this.onGrab(Tp)),this.elementGroup.appendChild(Tp),Tp}),this.containerGroup.appendChild(this.elementGroup),uf.appendChild(this.containerGroup),kC(this.rectangle,xo,df.formatter),this.grabbedElem=null,this.mouseOffset=null}get element(){return this.elementGroup}destroy(){this.containerGroup.parentNode.removeChild(this.containerGroup),super.destroy()}}class CC extends eI{constructor(xo,uf,df){super(xo,uf,df),mo(this,"startDrawing",(gf,Ef)=>{this.attachListeners({mouseMove:this.onMouseMove,mouseUp:this.onMouseUp}),this.rubberband=new WA(gf,Ef,this.g,this.config,this.env)}),mo(this,"stop",()=>{this.rubberband&&(this.rubberband.destroy(),this.rubberband=null)}),mo(this,"onMouseMove",(gf,Ef)=>this.rubberband.dragTo(gf,Ef)),mo(this,"onMouseUp",()=>{this.detachListeners(),this.started=!1;const{width:gf,height:Ef}=this.rubberband.getBoundingClientRect(),Rf=this.config.minSelectionWidth||4,Vf=this.config.minSelectionHeight||4;if(gf>=Rf&&Ef>=Vf){const{element:Qf}=this.rubberband;Qf.annotation=this.rubberband.toSelection(),this.emit("complete",Qf)}else this.emit("cancel");this.stop()}),mo(this,"createEditableShape",gf=>new ZA(gf,this.g,this.config,this.env)),this.rubberband=null}get isDrawing(){return this.rubberband!=null}}CC.identifier="rect",CC.supports=go=>{const xo=go.selector("FragmentSelector");return xo==null?void 0:xo.conformsTo.startsWith("http://www.w3.org/TR/media-frags")};const JA=go=>{const xo=new XMLSerializer().serializeToString(go.documentElement).replace("