UNPKG

tido

Version:

Text Viewer for Digital Objects (TIDO)

141 lines 660 kB
var ef=Object.defineProperty;var tf=(e,n,t)=>n in e?ef(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var gn=(e,n,t)=>tf(e,typeof n!="symbol"?n+"":n,t);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function t(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=t(r);fetch(r.href,o)}})();/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function xs(e){const n=Object.create(null);for(const t of e.split(","))n[t]=1;return t=>t in n}const Ke={},ai=[],$t=()=>{},nf=()=>!1,Gr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Es=e=>e.startsWith("onUpdate:"),st=Object.assign,Cs=(e,n)=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)},rf=Object.prototype.hasOwnProperty,je=(e,n)=>rf.call(e,n),Ie=Array.isArray,li=e=>Kr(e)==="[object Map]",Tu=e=>Kr(e)==="[object Set]",Ae=e=>typeof e=="function",ot=e=>typeof e=="string",fn=e=>typeof e=="symbol",Xe=e=>e!==null&&typeof e=="object",Su=e=>(Xe(e)||Ae(e))&&Ae(e.then)&&Ae(e.catch),xu=Object.prototype.toString,Kr=e=>xu.call(e),of=e=>Kr(e).slice(8,-1),Eu=e=>Kr(e)==="[object Object]",Ps=e=>ot(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ii=xs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),qr=e=>{const n=Object.create(null);return t=>n[t]||(n[t]=e(t))},sf=/-(\w)/g,zt=qr(e=>e.replace(sf,(n,t)=>t?t.toUpperCase():"")),af=/\B([A-Z])/g,Jn=qr(e=>e.replace(af,"-$1").toLowerCase()),Zr=qr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Er=qr(e=>e?`on${Zr(e)}`:""),Cn=(e,n)=>!Object.is(e,n),Cr=(e,...n)=>{for(let t=0;t<e.length;t++)e[t](...n)},Cu=(e,n,t,i=!1)=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,writable:i,value:t})},Ho=e=>{const n=parseFloat(e);return isNaN(n)?e:n},lf=e=>{const n=ot(e)?Number(e):NaN;return isNaN(n)?e:n};let ga;const Yr=()=>ga||(ga=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function hn(e){if(Ie(e)){const n={};for(let t=0;t<e.length;t++){const i=e[t],r=ot(i)?ff(i):hn(i);if(r)for(const o in r)n[o]=r[o]}return n}else if(ot(e)||Xe(e))return e}const uf=/;(?![^(]*\))/g,cf=/:([^]+)/,df=/\/\*[^]*?\*\//g;function ff(e){const n={};return e.replace(df,"").split(uf).forEach(t=>{if(t){const i=t.split(cf);i.length>1&&(n[i[0].trim()]=i[1].trim())}}),n}function qe(e){let n="";if(ot(e))n=e;else if(Ie(e))for(let t=0;t<e.length;t++){const i=qe(e[t]);i&&(n+=i+" ")}else if(Xe(e))for(const t in e)e[t]&&(n+=t+" ");return n.trim()}const hf="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",pf=xs(hf);function Pu(e){return!!e||e===""}const Iu=e=>!!(e&&e.__v_isRef===!0),xe=e=>ot(e)?e:e==null?"":Ie(e)||Xe(e)&&(e.toString===xu||!Ae(e.toString))?Iu(e)?xe(e.value):JSON.stringify(e,Ou,2):String(e),Ou=(e,n)=>Iu(n)?Ou(e,n.value):li(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((t,[i,r],o)=>(t[po(i,o)+" =>"]=r,t),{})}:Tu(n)?{[`Set(${n.size})`]:[...n.values()].map(t=>po(t))}:fn(n)?po(n):Xe(n)&&!Ie(n)&&!Eu(n)?String(n):n,po=(e,n="")=>{var t;return fn(e)?`Symbol(${(t=e.description)!=null?t:n})`:e};/**
* @vue/reactivity v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let It;class Au{constructor(n=!1){this.detached=n,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=It,!n&&It&&(this.index=(It.scopes||(It.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let n,t;if(this.scopes)for(n=0,t=this.scopes.length;n<t;n++)this.scopes[n].pause();for(n=0,t=this.effects.length;n<t;n++)this.effects[n].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let n,t;if(this.scopes)for(n=0,t=this.scopes.length;n<t;n++)this.scopes[n].resume();for(n=0,t=this.effects.length;n<t;n++)this.effects[n].resume()}}run(n){if(this._active){const t=It;try{return It=this,n()}finally{It=t}}}on(){It=this}off(){It=this.parent}stop(n){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(this.effects.length=0,t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!n){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Is(e){return new Au(e)}function Os(){return It}function Lu(e,n=!1){It&&It.cleanups.push(e)}let Ze;const go=new WeakSet;class Ru{constructor(n){this.fn=n,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,It&&It.active&&It.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,go.has(this)&&(go.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Du(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ma(this),Mu(this);const n=Ze,t=Gt;Ze=this,Gt=!0;try{return this.fn()}finally{Nu(this),Ze=n,Gt=t,this.flags&=-3}}stop(){if(this.flags&1){for(let n=this.deps;n;n=n.nextDep)Rs(n);this.deps=this.depsTail=void 0,ma(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?go.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Vo(this)&&this.run()}get dirty(){return Vo(this)}}let ku=0,Oi,Ai;function Du(e,n=!1){if(e.flags|=8,n){e.next=Ai,Ai=e;return}e.next=Oi,Oi=e}function As(){ku++}function Ls(){if(--ku>0)return;if(Ai){let n=Ai;for(Ai=void 0;n;){const t=n.next;n.next=void 0,n.flags&=-9,n=t}}let e;for(;Oi;){let n=Oi;for(Oi=void 0;n;){const t=n.next;if(n.next=void 0,n.flags&=-9,n.flags&1)try{n.trigger()}catch(i){e||(e=i)}n=t}}if(e)throw e}function Mu(e){for(let n=e.deps;n;n=n.nextDep)n.version=-1,n.prevActiveLink=n.dep.activeLink,n.dep.activeLink=n}function Nu(e){let n,t=e.depsTail,i=t;for(;i;){const r=i.prevDep;i.version===-1?(i===t&&(t=r),Rs(i),gf(i)):n=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}e.deps=n,e.depsTail=t}function Vo(e){for(let n=e.deps;n;n=n.nextDep)if(n.dep.version!==n.version||n.dep.computed&&(Fu(n.dep.computed)||n.dep.version!==n.version))return!0;return!!e._dirty}function Fu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Bi))return;e.globalVersion=Bi;const n=e.dep;if(e.flags|=2,n.version>0&&!e.isSSR&&e.deps&&!Vo(e)){e.flags&=-3;return}const t=Ze,i=Gt;Ze=e,Gt=!0;try{Mu(e);const r=e.fn(e._value);(n.version===0||Cn(r,e._value))&&(e._value=r,n.version++)}catch(r){throw n.version++,r}finally{Ze=t,Gt=i,Nu(e),e.flags&=-3}}function Rs(e,n=!1){const{dep:t,prevSub:i,nextSub:r}=e;if(i&&(i.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=i,e.nextSub=void 0),t.subs===e&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let o=t.computed.deps;o;o=o.nextDep)Rs(o,!0)}!n&&!--t.sc&&t.map&&t.map.delete(t.key)}function gf(e){const{prevDep:n,nextDep:t}=e;n&&(n.nextDep=t,e.prevDep=void 0),t&&(t.prevDep=n,e.nextDep=void 0)}let Gt=!0;const Bu=[];function An(){Bu.push(Gt),Gt=!1}function Ln(){const e=Bu.pop();Gt=e===void 0?!0:e}function ma(e){const{cleanup:n}=e;if(e.cleanup=void 0,n){const t=Ze;Ze=void 0;try{n()}finally{Ze=t}}}let Bi=0;class mf{constructor(n,t){this.sub=n,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Xr{constructor(n){this.computed=n,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(n){if(!Ze||!Gt||Ze===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Ze)t=this.activeLink=new mf(Ze,this),Ze.deps?(t.prevDep=Ze.depsTail,Ze.depsTail.nextDep=t,Ze.depsTail=t):Ze.deps=Ze.depsTail=t,Hu(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=Ze.depsTail,t.nextDep=void 0,Ze.depsTail.nextDep=t,Ze.depsTail=t,Ze.deps===t&&(Ze.deps=i)}return t}trigger(n){this.version++,Bi++,this.notify(n)}notify(n){As();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{Ls()}}}function Hu(e){if(e.dep.sc++,e.sub.flags&4){const n=e.dep.computed;if(n&&!e.dep.subs){n.flags|=20;for(let i=n.deps;i;i=i.nextDep)Hu(i)}const t=e.dep.subs;t!==e&&(e.prevSub=t,t&&(t.nextSub=e)),e.dep.subs=e}}const Rr=new WeakMap,Gn=Symbol(""),zo=Symbol(""),Hi=Symbol("");function wt(e,n,t){if(Gt&&Ze){let i=Rr.get(e);i||Rr.set(e,i=new Map);let r=i.get(t);r||(i.set(t,r=new Xr),r.map=i,r.key=t),r.track()}}function ln(e,n,t,i,r,o){const l=Rr.get(e);if(!l){Bi++;return}const s=a=>{a&&a.trigger()};if(As(),n==="clear")l.forEach(s);else{const a=Ie(e),u=a&&Ps(t);if(a&&t==="length"){const c=Number(i);l.forEach((f,h)=>{(h==="length"||h===Hi||!fn(h)&&h>=c)&&s(f)})}else switch((t!==void 0||l.has(void 0))&&s(l.get(t)),u&&s(l.get(Hi)),n){case"add":a?u&&s(l.get("length")):(s(l.get(Gn)),li(e)&&s(l.get(zo)));break;case"delete":a||(s(l.get(Gn)),li(e)&&s(l.get(zo)));break;case"set":li(e)&&s(l.get(Gn));break}}Ls()}function vf(e,n){const t=Rr.get(e);return t&&t.get(n)}function ei(e){const n=He(e);return n===e?n:(wt(n,"iterate",Hi),Vt(e)?n:n.map(Tt))}function Jr(e){return wt(e=He(e),"iterate",Hi),e}const yf={__proto__:null,[Symbol.iterator](){return mo(this,Symbol.iterator,Tt)},concat(...e){return ei(this).concat(...e.map(n=>Ie(n)?ei(n):n))},entries(){return mo(this,"entries",e=>(e[1]=Tt(e[1]),e))},every(e,n){return nn(this,"every",e,n,void 0,arguments)},filter(e,n){return nn(this,"filter",e,n,t=>t.map(Tt),arguments)},find(e,n){return nn(this,"find",e,n,Tt,arguments)},findIndex(e,n){return nn(this,"findIndex",e,n,void 0,arguments)},findLast(e,n){return nn(this,"findLast",e,n,Tt,arguments)},findLastIndex(e,n){return nn(this,"findLastIndex",e,n,void 0,arguments)},forEach(e,n){return nn(this,"forEach",e,n,void 0,arguments)},includes(...e){return vo(this,"includes",e)},indexOf(...e){return vo(this,"indexOf",e)},join(e){return ei(this).join(e)},lastIndexOf(...e){return vo(this,"lastIndexOf",e)},map(e,n){return nn(this,"map",e,n,void 0,arguments)},pop(){return wi(this,"pop")},push(...e){return wi(this,"push",e)},reduce(e,...n){return va(this,"reduce",e,n)},reduceRight(e,...n){return va(this,"reduceRight",e,n)},shift(){return wi(this,"shift")},some(e,n){return nn(this,"some",e,n,void 0,arguments)},splice(...e){return wi(this,"splice",e)},toReversed(){return ei(this).toReversed()},toSorted(e){return ei(this).toSorted(e)},toSpliced(...e){return ei(this).toSpliced(...e)},unshift(...e){return wi(this,"unshift",e)},values(){return mo(this,"values",Tt)}};function mo(e,n,t){const i=Jr(e),r=i[n]();return i!==e&&!Vt(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.value&&(o.value=t(o.value)),o}),r}const bf=Array.prototype;function nn(e,n,t,i,r,o){const l=Jr(e),s=l!==e&&!Vt(e),a=l[n];if(a!==bf[n]){const f=a.apply(e,o);return s?Tt(f):f}let u=t;l!==e&&(s?u=function(f,h){return t.call(this,Tt(f),h,e)}:t.length>2&&(u=function(f,h){return t.call(this,f,h,e)}));const c=a.call(l,u,i);return s&&r?r(c):c}function va(e,n,t,i){const r=Jr(e);let o=t;return r!==e&&(Vt(e)?t.length>3&&(o=function(l,s,a){return t.call(this,l,s,a,e)}):o=function(l,s,a){return t.call(this,l,Tt(s),a,e)}),r[n](o,...i)}function vo(e,n,t){const i=He(e);wt(i,"iterate",Hi);const r=i[n](...t);return(r===-1||r===!1)&&Ms(t[0])?(t[0]=He(t[0]),i[n](...t)):r}function wi(e,n,t=[]){An(),As();const i=He(e)[n].apply(e,t);return Ls(),Ln(),i}const _f=xs("__proto__,__v_isRef,__isVue"),Vu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(fn));function wf(e){fn(e)||(e=String(e));const n=He(this);return wt(n,"has",e),n.hasOwnProperty(e)}class zu{constructor(n=!1,t=!1){this._isReadonly=n,this._isShallow=t}get(n,t,i){if(t==="__v_skip")return n.__v_skip;const r=this._isReadonly,o=this._isShallow;if(t==="__v_isReactive")return!r;if(t==="__v_isReadonly")return r;if(t==="__v_isShallow")return o;if(t==="__v_raw")return i===(r?o?Lf:Gu:o?Wu:Uu).get(n)||Object.getPrototypeOf(n)===Object.getPrototypeOf(i)?n:void 0;const l=Ie(n);if(!r){let a;if(l&&(a=yf[t]))return a;if(t==="hasOwnProperty")return wf}const s=Reflect.get(n,t,nt(n)?n:i);return(fn(t)?Vu.has(t):_f(t))||(r||wt(n,"get",t),o)?s:nt(s)?l&&Ps(t)?s:s.value:Xe(s)?r?ur(s):mi(s):s}}class ju extends zu{constructor(n=!1){super(!1,n)}set(n,t,i,r){let o=n[t];if(!this._isShallow){const a=Zn(o);if(!Vt(i)&&!Zn(i)&&(o=He(o),i=He(i)),!Ie(n)&&nt(o)&&!nt(i))return a?!1:(o.value=i,!0)}const l=Ie(n)&&Ps(t)?Number(t)<n.length:je(n,t),s=Reflect.set(n,t,i,nt(n)?n:r);return n===He(r)&&(l?Cn(i,o)&&ln(n,"set",t,i):ln(n,"add",t,i)),s}deleteProperty(n,t){const i=je(n,t);n[t];const r=Reflect.deleteProperty(n,t);return r&&i&&ln(n,"delete",t,void 0),r}has(n,t){const i=Reflect.has(n,t);return(!fn(t)||!Vu.has(t))&&wt(n,"has",t),i}ownKeys(n){return wt(n,"iterate",Ie(n)?"length":Gn),Reflect.ownKeys(n)}}class Tf extends zu{constructor(n=!1){super(!0,n)}set(n,t){return!0}deleteProperty(n,t){return!0}}const Sf=new ju,xf=new Tf,Ef=new ju(!0);const jo=e=>e,gr=e=>Reflect.getPrototypeOf(e);function Cf(e,n,t){return function(...i){const r=this.__v_raw,o=He(r),l=li(o),s=e==="entries"||e===Symbol.iterator&&l,a=e==="keys"&&l,u=r[e](...i),c=t?jo:n?Uo:Tt;return!n&&wt(o,"iterate",a?zo:Gn),{next(){const{value:f,done:h}=u.next();return h?{value:f,done:h}:{value:s?[c(f[0]),c(f[1])]:c(f),done:h}},[Symbol.iterator](){return this}}}}function mr(e){return function(...n){return e==="delete"?!1:e==="clear"?void 0:this}}function Pf(e,n){const t={get(r){const o=this.__v_raw,l=He(o),s=He(r);e||(Cn(r,s)&&wt(l,"get",r),wt(l,"get",s));const{has:a}=gr(l),u=n?jo:e?Uo:Tt;if(a.call(l,r))return u(o.get(r));if(a.call(l,s))return u(o.get(s));o!==l&&o.get(r)},get size(){const r=this.__v_raw;return!e&&wt(He(r),"iterate",Gn),Reflect.get(r,"size",r)},has(r){const o=this.__v_raw,l=He(o),s=He(r);return e||(Cn(r,s)&&wt(l,"has",r),wt(l,"has",s)),r===s?o.has(r):o.has(r)||o.has(s)},forEach(r,o){const l=this,s=l.__v_raw,a=He(s),u=n?jo:e?Uo:Tt;return!e&&wt(a,"iterate",Gn),s.forEach((c,f)=>r.call(o,u(c),u(f),l))}};return st(t,e?{add:mr("add"),set:mr("set"),delete:mr("delete"),clear:mr("clear")}:{add(r){!n&&!Vt(r)&&!Zn(r)&&(r=He(r));const o=He(this);return gr(o).has.call(o,r)||(o.add(r),ln(o,"add",r,r)),this},set(r,o){!n&&!Vt(o)&&!Zn(o)&&(o=He(o));const l=He(this),{has:s,get:a}=gr(l);let u=s.call(l,r);u||(r=He(r),u=s.call(l,r));const c=a.call(l,r);return l.set(r,o),u?Cn(o,c)&&ln(l,"set",r,o):ln(l,"add",r,o),this},delete(r){const o=He(this),{has:l,get:s}=gr(o);let a=l.call(o,r);a||(r=He(r),a=l.call(o,r)),s&&s.call(o,r);const u=o.delete(r);return a&&ln(o,"delete",r,void 0),u},clear(){const r=He(this),o=r.size!==0,l=r.clear();return o&&ln(r,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=Cf(r,e,n)}),t}function ks(e,n){const t=Pf(e,n);return(i,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?i:Reflect.get(je(t,r)&&r in i?t:i,r,o)}const If={get:ks(!1,!1)},Of={get:ks(!1,!0)},Af={get:ks(!0,!1)};const Uu=new WeakMap,Wu=new WeakMap,Gu=new WeakMap,Lf=new WeakMap;function Rf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function kf(e){return e.__v_skip||!Object.isExtensible(e)?0:Rf(of(e))}function mi(e){return Zn(e)?e:Ds(e,!1,Sf,If,Uu)}function Df(e){return Ds(e,!1,Ef,Of,Wu)}function ur(e){return Ds(e,!0,xf,Af,Gu)}function Ds(e,n,t,i,r){if(!Xe(e)||e.__v_raw&&!(n&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const l=kf(e);if(l===0)return e;const s=new Proxy(e,l===2?i:t);return r.set(e,s),s}function Pn(e){return Zn(e)?Pn(e.__v_raw):!!(e&&e.__v_isReactive)}function Zn(e){return!!(e&&e.__v_isReadonly)}function Vt(e){return!!(e&&e.__v_isShallow)}function Ms(e){return e?!!e.__v_raw:!1}function He(e){const n=e&&e.__v_raw;return n?He(n):e}function Ns(e){return!je(e,"__v_skip")&&Object.isExtensible(e)&&Cu(e,"__v_skip",!0),e}const Tt=e=>Xe(e)?mi(e):e,Uo=e=>Xe(e)?ur(e):e;function nt(e){return e?e.__v_isRef===!0:!1}function de(e){return Ku(e,!1)}function Qr(e){return Ku(e,!0)}function Ku(e,n){return nt(e)?e:new Mf(e,n)}class Mf{constructor(n,t){this.dep=new Xr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?n:He(n),this._value=t?n:Tt(n),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(n){const t=this._rawValue,i=this.__v_isShallow||Vt(n)||Zn(n);n=i?n:He(n),Cn(n,t)&&(this._rawValue=n,this._value=i?n:Tt(n),this.dep.trigger())}}function Re(e){return nt(e)?e.value:e}const Nf={get:(e,n,t)=>n==="__v_raw"?e:Re(Reflect.get(e,n,t)),set:(e,n,t,i)=>{const r=e[n];return nt(r)&&!nt(t)?(r.value=t,!0):Reflect.set(e,n,t,i)}};function qu(e){return Pn(e)?e:new Proxy(e,Nf)}class Ff{constructor(n){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Xr,{get:i,set:r}=n(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=r}get value(){return this._value=this._get()}set value(n){this._set(n)}}function Bf(e){return new Ff(e)}function Hf(e){const n=Ie(e)?new Array(e.length):{};for(const t in e)n[t]=Zu(e,t);return n}class Vf{constructor(n,t,i){this._object=n,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const n=this._object[this._key];return this._value=n===void 0?this._defaultValue:n}set value(n){this._object[this._key]=n}get dep(){return vf(He(this._object),this._key)}}class zf{constructor(n){this._getter=n,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function jf(e,n,t){return nt(e)?e:Ae(e)?new zf(e):Xe(e)&&arguments.length>1?Zu(e,n,t):de(e)}function Zu(e,n,t){const i=e[n];return nt(i)?i:new Vf(e,n,t)}class Uf{constructor(n,t,i){this.fn=n,this.setter=t,this._value=void 0,this.dep=new Xr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Bi-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Ze!==this)return Du(this,!0),!0}get value(){const n=this.dep.track();return Fu(this),n&&(n.version=this.dep.version),this._value}set value(n){this.setter&&this.setter(n)}}function Wf(e,n,t=!1){let i,r;return Ae(e)?i=e:(i=e.get,r=e.set),new Uf(i,r,t)}const vr={},kr=new WeakMap;let Un;function Gf(e,n=!1,t=Un){if(t){let i=kr.get(t);i||kr.set(t,i=[]),i.push(e)}}function Kf(e,n,t=Ke){const{immediate:i,deep:r,once:o,scheduler:l,augmentJob:s,call:a}=t,u=P=>r?P:Vt(P)||r===!1||r===0?un(P,1):un(P);let c,f,h,p,g=!1,y=!1;if(nt(e)?(f=()=>e.value,g=Vt(e)):Pn(e)?(f=()=>u(e),g=!0):Ie(e)?(y=!0,g=e.some(P=>Pn(P)||Vt(P)),f=()=>e.map(P=>{if(nt(P))return P.value;if(Pn(P))return u(P);if(Ae(P))return a?a(P,2):P()})):Ae(e)?n?f=a?()=>a(e,2):e:f=()=>{if(h){An();try{h()}finally{Ln()}}const P=Un;Un=c;try{return a?a(e,3,[p]):e(p)}finally{Un=P}}:f=$t,n&&r){const P=f,D=r===!0?1/0:r;f=()=>un(P(),D)}const T=Os(),v=()=>{c.stop(),T&&T.active&&Cs(T.effects,c)};if(o&&n){const P=n;n=(...D)=>{P(...D),v()}}let E=y?new Array(e.length).fill(vr):vr;const O=P=>{if(!(!(c.flags&1)||!c.dirty&&!P))if(n){const D=c.run();if(r||g||(y?D.some((H,M)=>Cn(H,E[M])):Cn(D,E))){h&&h();const H=Un;Un=c;try{const M=[D,E===vr?void 0:y&&E[0]===vr?[]:E,p];a?a(n,3,M):n(...M),E=D}finally{Un=H}}}else c.run()};return s&&s(O),c=new Ru(f),c.scheduler=l?()=>l(O,!1):O,p=P=>Gf(P,!1,c),h=c.onStop=()=>{const P=kr.get(c);if(P){if(a)a(P,4);else for(const D of P)D();kr.delete(c)}},n?i?O(!0):E=c.run():l?l(O.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function un(e,n=1/0,t){if(n<=0||!Xe(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),n--,nt(e))un(e.value,n,t);else if(Ie(e))for(let i=0;i<e.length;i++)un(e[i],n,t);else if(Tu(e)||li(e))e.forEach(i=>{un(i,n,t)});else if(Eu(e)){for(const i in e)un(e[i],n,t);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&un(e[i],n,t)}return e}/**
* @vue/runtime-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function cr(e,n,t,i){try{return i?e(...i):e()}catch(r){$r(r,n,t)}}function Kt(e,n,t,i){if(Ae(e)){const r=cr(e,n,t,i);return r&&Su(r)&&r.catch(o=>{$r(o,n,t)}),r}if(Ie(e)){const r=[];for(let o=0;o<e.length;o++)r.push(Kt(e[o],n,t,i));return r}}function $r(e,n,t,i=!0){const r=n?n.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:l}=n&&n.appContext.config||Ke;if(n){let s=n.parent;const a=n.proxy,u=`https://vuejs.org/error-reference/#runtime-${t}`;for(;s;){const c=s.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](e,a,u)===!1)return}s=s.parent}if(o){An(),cr(o,null,10,[e,a,u]),Ln();return}}qf(e,t,r,i,l)}function qf(e,n,t,i=!0,r=!1){if(r)throw e;console.error(e)}const Ot=[];let Xt=-1;const ui=[];let wn=null,ni=0;const Yu=Promise.resolve();let Dr=null;function Qn(e){const n=Dr||Yu;return e?n.then(this?e.bind(this):e):n}function Zf(e){let n=Xt+1,t=Ot.length;for(;n<t;){const i=n+t>>>1,r=Ot[i],o=Vi(r);o<e||o===e&&r.flags&2?n=i+1:t=i}return n}function Fs(e){if(!(e.flags&1)){const n=Vi(e),t=Ot[Ot.length-1];!t||!(e.flags&2)&&n>=Vi(t)?Ot.push(e):Ot.splice(Zf(n),0,e),e.flags|=1,Xu()}}function Xu(){Dr||(Dr=Yu.then(Qu))}function Yf(e){Ie(e)?ui.push(...e):wn&&e.id===-1?wn.splice(ni+1,0,e):e.flags&1||(ui.push(e),e.flags|=1),Xu()}function ya(e,n,t=Xt+1){for(;t<Ot.length;t++){const i=Ot[t];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;Ot.splice(t,1),t--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Ju(e){if(ui.length){const n=[...new Set(ui)].sort((t,i)=>Vi(t)-Vi(i));if(ui.length=0,wn){wn.push(...n);return}for(wn=n,ni=0;ni<wn.length;ni++){const t=wn[ni];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}wn=null,ni=0}}const Vi=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Qu(e){try{for(Xt=0;Xt<Ot.length;Xt++){const n=Ot[Xt];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),cr(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Xt<Ot.length;Xt++){const n=Ot[Xt];n&&(n.flags&=-2)}Xt=-1,Ot.length=0,Ju(),Dr=null,(Ot.length||ui.length)&&Qu()}}let ut=null,$u=null;function Mr(e){const n=ut;return ut=e,$u=e&&e.type.__scopeId||null,n}function ct(e,n=ut,t){if(!n||e._n)return e;const i=(...r)=>{i._d&&Ra(-1);const o=Mr(n);let l;try{l=e(...r)}finally{Mr(o),i._d&&Ra(1)}return l};return i._n=!0,i._c=!0,i._d=!0,i}function gt(e,n){if(ut===null)return e;const t=ro(ut),i=e.dirs||(e.dirs=[]);for(let r=0;r<n.length;r++){let[o,l,s,a=Ke]=n[r];o&&(Ae(o)&&(o={mounted:o,updated:o}),o.deep&&un(l),i.push({dir:o,instance:t,value:l,oldValue:void 0,arg:s,modifiers:a}))}return e}function Mn(e,n,t,i){const r=e.dirs,o=n&&n.dirs;for(let l=0;l<r.length;l++){const s=r[l];o&&(s.oldValue=o[l].value);let a=s.dir[i];a&&(An(),Kt(a,t,8,[e.el,s,e,n]),Ln())}}const ec=Symbol("_vte"),tc=e=>e.__isTeleport,Li=e=>e&&(e.disabled||e.disabled===""),ba=e=>e&&(e.defer||e.defer===""),_a=e=>typeof SVGElement<"u"&&e instanceof SVGElement,wa=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Wo=(e,n)=>{const t=e&&e.to;return ot(t)?n?n(t):null:t},nc={name:"Teleport",__isTeleport:!0,process(e,n,t,i,r,o,l,s,a,u){const{mc:c,pc:f,pbc:h,o:{insert:p,querySelector:g,createText:y,createComment:T}}=u,v=Li(n.props);let{shapeFlag:E,children:O,dynamicChildren:P}=n;if(e==null){const D=n.el=y(""),H=n.anchor=y("");p(D,t,i),p(H,t,i);const M=(R,V)=>{E&16&&(r&&r.isCE&&(r.ce._teleportTarget=R),c(O,R,V,r,o,l,s,a))},B=()=>{const R=n.target=Wo(n.props,g),V=ic(R,n,y,p);R&&(l!=="svg"&&_a(R)?l="svg":l!=="mathml"&&wa(R)&&(l="mathml"),v||(M(R,V),Pr(n,!1)))};v&&(M(t,H),Pr(n,!0)),ba(n.props)?Pt(()=>{B(),n.el.__isMounted=!0},o):B()}else{if(ba(n.props)&&!e.el.__isMounted){Pt(()=>{nc.process(e,n,t,i,r,o,l,s,a,u),delete e.el.__isMounted},o);return}n.el=e.el,n.targetStart=e.targetStart;const D=n.anchor=e.anchor,H=n.target=e.target,M=n.targetAnchor=e.targetAnchor,B=Li(e.props),R=B?t:H,V=B?D:M;if(l==="svg"||_a(H)?l="svg":(l==="mathml"||wa(H))&&(l="mathml"),P?(h(e.dynamicChildren,P,R,r,o,l,s),js(e,n,!0)):a||f(e,n,R,V,r,o,l,s,!1),v)B?n.props&&e.props&&n.props.to!==e.props.to&&(n.props.to=e.props.to):yr(n,t,D,u,1);else if((n.props&&n.props.to)!==(e.props&&e.props.to)){const $=n.target=Wo(n.props,g);$&&yr(n,$,null,u,0)}else B&&yr(n,H,M,u,1);Pr(n,v)}},remove(e,n,t,{um:i,o:{remove:r}},o){const{shapeFlag:l,children:s,anchor:a,targetStart:u,targetAnchor:c,target:f,props:h}=e;if(f&&(r(u),r(c)),o&&r(a),l&16){const p=o||!Li(h);for(let g=0;g<s.length;g++){const y=s[g];i(y,n,t,p,!!y.dynamicChildren)}}},move:yr,hydrate:Xf};function yr(e,n,t,{o:{insert:i},m:r},o=2){o===0&&i(e.targetAnchor,n,t);const{el:l,anchor:s,shapeFlag:a,children:u,props:c}=e,f=o===2;if(f&&i(l,n,t),(!f||Li(c))&&a&16)for(let h=0;h<u.length;h++)r(u[h],n,t,2);f&&i(s,n,t)}function Xf(e,n,t,i,r,o,{o:{nextSibling:l,parentNode:s,querySelector:a,insert:u,createText:c}},f){const h=n.target=Wo(n.props,a);if(h){const p=Li(n.props),g=h._lpa||h.firstChild;if(n.shapeFlag&16)if(p)n.anchor=f(l(e),n,s(e),t,i,r,o),n.targetStart=g,n.targetAnchor=g&&l(g);else{n.anchor=l(e);let y=g;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")n.targetStart=y;else if(y.data==="teleport anchor"){n.targetAnchor=y,h._lpa=n.targetAnchor&&l(n.targetAnchor);break}}y=l(y)}n.targetAnchor||ic(h,n,c,u),f(g&&l(g),n,h,t,i,r,o)}Pr(n,p)}return n.anchor&&l(n.anchor)}const Jf=nc;function Pr(e,n){const t=e.ctx;if(t&&t.ut){let i,r;for(n?(i=e.el,r=e.anchor):(i=e.targetStart,r=e.targetAnchor);i&&i!==r;)i.nodeType===1&&i.setAttribute("data-v-owner",t.uid),i=i.nextSibling;t.ut()}}function ic(e,n,t,i){const r=n.targetStart=t(""),o=n.targetAnchor=t("");return r[ec]=o,e&&(i(r,e),i(o,e)),o}const Tn=Symbol("_leaveCb"),br=Symbol("_enterCb");function Qf(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return jt(()=>{e.isMounted=!0}),no(()=>{e.isUnmounting=!0}),e}const Ft=[Function,Array],rc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ft,onEnter:Ft,onAfterEnter:Ft,onEnterCancelled:Ft,onBeforeLeave:Ft,onLeave:Ft,onAfterLeave:Ft,onLeaveCancelled:Ft,onBeforeAppear:Ft,onAppear:Ft,onAfterAppear:Ft,onAppearCancelled:Ft},oc=e=>{const n=e.subTree;return n.component?oc(n.component):n},$f={name:"BaseTransition",props:rc,setup(e,{slots:n}){const t=en(),i=Qf();return()=>{const r=n.default&&lc(n.default(),!0);if(!r||!r.length)return;const o=sc(r),l=He(e),{mode:s}=l;if(i.isLeaving)return yo(o);const a=Ta(o);if(!a)return yo(o);let u=Go(a,l,i,t,f=>u=f);a.type!==At&&zi(a,u);let c=t.subTree&&Ta(t.subTree);if(c&&c.type!==At&&!Wn(a,c)&&oc(t).type!==At){let f=Go(c,l,i,t);if(zi(c,f),s==="out-in"&&a.type!==At)return i.isLeaving=!0,f.afterLeave=()=>{i.isLeaving=!1,t.job.flags&8||t.update(),delete f.afterLeave,c=void 0},yo(o);s==="in-out"&&a.type!==At?f.delayLeave=(h,p,g)=>{const y=ac(i,c);y[String(c.key)]=c,h[Tn]=()=>{p(),h[Tn]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{g(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return o}}};function sc(e){let n=e[0];if(e.length>1){for(const t of e)if(t.type!==At){n=t;break}}return n}const eh=$f;function ac(e,n){const{leavingVNodes:t}=e;let i=t.get(n.type);return i||(i=Object.create(null),t.set(n.type,i)),i}function Go(e,n,t,i,r){const{appear:o,mode:l,persisted:s=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:h,onLeave:p,onAfterLeave:g,onLeaveCancelled:y,onBeforeAppear:T,onAppear:v,onAfterAppear:E,onAppearCancelled:O}=n,P=String(e.key),D=ac(t,e),H=(R,V)=>{R&&Kt(R,i,9,V)},M=(R,V)=>{const $=V[1];H(R,V),Ie(R)?R.every(N=>N.length<=1)&&$():R.length<=1&&$()},B={mode:l,persisted:s,beforeEnter(R){let V=a;if(!t.isMounted)if(o)V=T||a;else return;R[Tn]&&R[Tn](!0);const $=D[P];$&&Wn(e,$)&&$.el[Tn]&&$.el[Tn](),H(V,[R])},enter(R){let V=u,$=c,N=f;if(!t.isMounted)if(o)V=v||u,$=E||c,N=O||f;else return;let re=!1;const Z=R[br]=le=>{re||(re=!0,le?H(N,[R]):H($,[R]),B.delayedLeave&&B.delayedLeave(),R[br]=void 0)};V?M(V,[R,Z]):Z()},leave(R,V){const $=String(e.key);if(R[br]&&R[br](!0),t.isUnmounting)return V();H(h,[R]);let N=!1;const re=R[Tn]=Z=>{N||(N=!0,V(),Z?H(y,[R]):H(g,[R]),R[Tn]=void 0,D[$]===e&&delete D[$])};D[$]=e,p?M(p,[R,re]):re()},clone(R){const V=Go(R,n,t,i,r);return r&&r(V),V}};return B}function yo(e){if(eo(e))return e=In(e),e.children=null,e}function Ta(e){if(!eo(e))return tc(e.type)&&e.children?sc(e.children):e;const{shapeFlag:n,children:t}=e;if(t){if(n&16)return t[0];if(n&32&&Ae(t.default))return t.default()}}function zi(e,n){e.shapeFlag&6&&e.component?(e.transition=n,zi(e.component.subTree,n)):e.shapeFlag&128?(e.ssContent.transition=n.clone(e.ssContent),e.ssFallback.transition=n.clone(e.ssFallback)):e.transition=n}function lc(e,n=!1,t){let i=[],r=0;for(let o=0;o<e.length;o++){let l=e[o];const s=t==null?l.key:String(t)+String(l.key!=null?l.key:o);l.type===Ee?(l.patchFlag&128&&r++,i=i.concat(lc(l.children,n,s))):(n||l.type!==At)&&i.push(s!=null?In(l,{key:s}):l)}if(r>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}/*! #__NO_SIDE_EFFECTS__ */function ze(e,n){return Ae(e)?st({name:e.name},n,{setup:e}):e}function uc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function cc(e){const n=en(),t=Qr(null);if(n){const r=n.refs===Ke?n.refs={}:n.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>t.value,set:o=>t.value=o})}return t}function Nr(e,n,t,i,r=!1){if(Ie(e)){e.forEach((g,y)=>Nr(g,n&&(Ie(n)?n[y]:n),t,i,r));return}if(ci(i)&&!r){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Nr(e,n,t,i.component.subTree);return}const o=i.shapeFlag&4?ro(i.component):i.el,l=r?null:o,{i:s,r:a}=e,u=n&&n.r,c=s.refs===Ke?s.refs={}:s.refs,f=s.setupState,h=He(f),p=f===Ke?()=>!1:g=>je(h,g);if(u!=null&&u!==a&&(ot(u)?(c[u]=null,p(u)&&(f[u]=null)):nt(u)&&(u.value=null)),Ae(a))cr(a,s,12,[l,c]);else{const g=ot(a),y=nt(a);if(g||y){const T=()=>{if(e.f){const v=g?p(a)?f[a]:c[a]:a.value;r?Ie(v)&&Cs(v,o):Ie(v)?v.includes(o)||v.push(o):g?(c[a]=[o],p(a)&&(f[a]=c[a])):(a.value=[o],e.k&&(c[e.k]=a.value))}else g?(c[a]=l,p(a)&&(f[a]=l)):y&&(a.value=l,e.k&&(c[e.k]=l))};l?(T.id=-1,Pt(T,t)):T()}}}Yr().requestIdleCallback;Yr().cancelIdleCallback;const ci=e=>!!e.type.__asyncLoader,eo=e=>e.type.__isKeepAlive;function th(e,n){dc(e,"a",n)}function nh(e,n){dc(e,"da",n)}function dc(e,n,t=pt){const i=e.__wdc||(e.__wdc=()=>{let r=t;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(to(n,i,t),t){let r=t.parent;for(;r&&r.parent;)eo(r.parent.vnode)&&ih(i,n,t,r),r=r.parent}}function ih(e,n,t,i){const r=to(n,e,i,!0);dr(()=>{Cs(i[n],r)},t)}function to(e,n,t=pt,i=!1){if(t){const r=t[e]||(t[e]=[]),o=n.__weh||(n.__weh=(...l)=>{An();const s=hr(t),a=Kt(n,t,e,l);return s(),Ln(),a});return i?r.unshift(o):r.push(o),o}}const pn=e=>(n,t=pt)=>{(!Wi||e==="sp")&&to(e,(...i)=>n(...i),t)},fc=pn("bm"),jt=pn("m"),rh=pn("bu"),oh=pn("u"),no=pn("bum"),dr=pn("um"),sh=pn("sp"),ah=pn("rtg"),lh=pn("rtc");function uh(e,n=pt){to("ec",e,n)}const Bs="components",ch="directives";function St(e,n){return Hs(Bs,e,!0,n)||e}const hc=Symbol.for("v-ndc");function at(e){return ot(e)?Hs(Bs,e,!1)||e:e||hc}function Yn(e){return Hs(ch,e)}function Hs(e,n,t=!0,i=!1){const r=ut||pt;if(r){const o=r.type;if(e===Bs){const s=Qh(o,!1);if(s&&(s===n||s===zt(n)||s===Zr(zt(n))))return o}const l=Sa(r[e]||o[e],n)||Sa(r.appContext[e],n);return!l&&i?o:l}}function Sa(e,n){return e&&(e[n]||e[zt(n)]||e[Zr(zt(n))])}function et(e,n,t,i){let r;const o=t,l=Ie(e);if(l||ot(e)){const s=l&&Pn(e);let a=!1;s&&(a=!Vt(e),e=Jr(e)),r=new Array(e.length);for(let u=0,c=e.length;u<c;u++)r[u]=n(a?Tt(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){r=new Array(e);for(let s=0;s<e;s++)r[s]=n(s+1,s,void 0,o)}else if(Xe(e))if(e[Symbol.iterator])r=Array.from(e,(s,a)=>n(s,a,void 0,o));else{const s=Object.keys(e);r=new Array(s.length);for(let a=0,u=s.length;a<u;a++){const c=s[a];r[a]=n(e[c],c,a,o)}}else r=[];return r}function Qe(e,n,t={},i,r){if(ut.ce||ut.parent&&ci(ut.parent)&&ut.parent.ce)return n!=="default"&&(t.name=n),L(),he(Ee,null,[we("slot",t,i&&i())],64);let o=e[n];o&&o._c&&(o._d=!1),L();const l=o&&pc(o(t)),s=t.key||l&&l.key,a=he(Ee,{key:(s&&!fn(s)?s:`_${n}`)+(!l&&i?"_fb":"")},l||(i?i():[]),l&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function pc(e){return e.some(n=>Ui(n)?!(n.type===At||n.type===Ee&&!pc(n.children)):!0)?e:null}function xa(e,n){const t={};for(const i in e)t[Er(i)]=e[i];return t}const Ko=e=>e?Rc(e)?ro(e):Ko(e.parent):null,Ri=st(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ko(e.parent),$root:e=>Ko(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Vs(e),$forceUpdate:e=>e.f||(e.f=()=>{Fs(e.update)}),$nextTick:e=>e.n||(e.n=Qn.bind(e.proxy)),$watch:e=>Dh.bind(e)}),bo=(e,n)=>e!==Ke&&!e.__isScriptSetup&&je(e,n),dh={get({_:e},n){if(n==="__v_skip")return!0;const{ctx:t,setupState:i,data:r,props:o,accessCache:l,type:s,appContext:a}=e;let u;if(n[0]!=="$"){const p=l[n];if(p!==void 0)switch(p){case 1:return i[n];case 2:return r[n];case 4:return t[n];case 3:return o[n]}else{if(bo(i,n))return l[n]=1,i[n];if(r!==Ke&&je(r,n))return l[n]=2,r[n];if((u=e.propsOptions[0])&&je(u,n))return l[n]=3,o[n];if(t!==Ke&&je(t,n))return l[n]=4,t[n];qo&&(l[n]=0)}}const c=Ri[n];let f,h;if(c)return n==="$attrs"&&wt(e.attrs,"get",""),c(e);if((f=s.__cssModules)&&(f=f[n]))return f;if(t!==Ke&&je(t,n))return l[n]=4,t[n];if(h=a.config.globalProperties,je(h,n))return h[n]},set({_:e},n,t){const{data:i,setupState:r,ctx:o}=e;return bo(r,n)?(r[n]=t,!0):i!==Ke&&je(i,n)?(i[n]=t,!0):je(e.props,n)||n[0]==="$"&&n.slice(1)in e?!1:(o[n]=t,!0)},has({_:{data:e,setupState:n,accessCache:t,ctx:i,appContext:r,propsOptions:o}},l){let s;return!!t[l]||e!==Ke&&je(e,l)||bo(n,l)||(s=o[0])&&je(s,l)||je(i,l)||je(Ri,l)||je(r.config.globalProperties,l)},defineProperty(e,n,t){return t.get!=null?e._.accessCache[n]=0:je(t,"value")&&this.set(e,n,t.value,null),Reflect.defineProperty(e,n,t)}};function Ea(e){return Ie(e)?e.reduce((n,t)=>(n[t]=null,n),{}):e}let qo=!0;function fh(e){const n=Vs(e),t=e.proxy,i=e.ctx;qo=!1,n.beforeCreate&&Ca(n.beforeCreate,e,"bc");const{data:r,computed:o,methods:l,watch:s,provide:a,inject:u,created:c,beforeMount:f,mounted:h,beforeUpdate:p,updated:g,activated:y,deactivated:T,beforeDestroy:v,beforeUnmount:E,destroyed:O,unmounted:P,render:D,renderTracked:H,renderTriggered:M,errorCaptured:B,serverPrefetch:R,expose:V,inheritAttrs:$,components:N,directives:re,filters:Z}=n;if(u&&hh(u,i,null),l)for(const pe in l){const _e=l[pe];Ae(_e)&&(i[pe]=_e.bind(t))}if(r){const pe=r.call(t,t);Xe(pe)&&(e.data=mi(pe))}if(qo=!0,o)for(const pe in o){const _e=o[pe],Fe=Ae(_e)?_e.bind(t,t):Ae(_e.get)?_e.get.bind(t,t):$t,ge=!Ae(_e)&&Ae(_e.set)?_e.set.bind(t):$t,Ne=J({get:Fe,set:ge});Object.defineProperty(i,pe,{enumerable:!0,configurable:!0,get:()=>Ne.value,set:We=>Ne.value=We})}if(s)for(const pe in s)gc(s[pe],i,t,pe);if(a){const pe=Ae(a)?a.call(t):a;Reflect.ownKeys(pe).forEach(_e=>{bh(_e,pe[_e])})}c&&Ca(c,e,"c");function oe(pe,_e){Ie(_e)?_e.forEach(Fe=>pe(Fe.bind(t))):_e&&pe(_e.bind(t))}if(oe(fc,f),oe(jt,h),oe(rh,p),oe(oh,g),oe(th,y),oe(nh,T),oe(uh,B),oe(lh,H),oe(ah,M),oe(no,E),oe(dr,P),oe(sh,R),Ie(V))if(V.length){const pe=e.exposed||(e.exposed={});V.forEach(_e=>{Object.defineProperty(pe,_e,{get:()=>t[_e],set:Fe=>t[_e]=Fe})})}else e.exposed||(e.exposed={});D&&e.render===$t&&(e.render=D),$!=null&&(e.inheritAttrs=$),N&&(e.components=N),re&&(e.directives=re),R&&uc(e)}function hh(e,n,t=$t){Ie(e)&&(e=Zo(e));for(const i in e){const r=e[i];let o;Xe(r)?"default"in r?o=qn(r.from||i,r.default,!0):o=qn(r.from||i):o=qn(r),nt(o)?Object.defineProperty(n,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:l=>o.value=l}):n[i]=o}}function Ca(e,n,t){Kt(Ie(e)?e.map(i=>i.bind(n.proxy)):e.bind(n.proxy),n,t)}function gc(e,n,t,i){let r=i.includes(".")?Pc(t,i):()=>t[i];if(ot(e)){const o=n[e];Ae(o)&&Ve(r,o)}else if(Ae(e))Ve(r,e.bind(t));else if(Xe(e))if(Ie(e))e.forEach(o=>gc(o,n,t,i));else{const o=Ae(e.handler)?e.handler.bind(t):n[e.handler];Ae(o)&&Ve(r,o,e)}}function Vs(e){const n=e.type,{mixins:t,extends:i}=n,{mixins:r,optionsCache:o,config:{optionMergeStrategies:l}}=e.appContext,s=o.get(n);let a;return s?a=s:!r.length&&!t&&!i?a=n:(a={},r.length&&r.forEach(u=>Fr(a,u,l,!0)),Fr(a,n,l)),Xe(n)&&o.set(n,a),a}function Fr(e,n,t,i=!1){const{mixins:r,extends:o}=n;o&&Fr(e,o,t,!0),r&&r.forEach(l=>Fr(e,l,t,!0));for(const l in n)if(!(i&&l==="expose")){const s=ph[l]||t&&t[l];e[l]=s?s(e[l],n[l]):n[l]}return e}const ph={data:Pa,props:Ia,emits:Ia,methods:Pi,computed:Pi,beforeCreate:Et,created:Et,beforeMount:Et,mounted:Et,beforeUpdate:Et,updated:Et,beforeDestroy:Et,beforeUnmount:Et,destroyed:Et,unmounted:Et,activated:Et,deactivated:Et,errorCaptured:Et,serverPrefetch:Et,components:Pi,directives:Pi,watch:mh,provide:Pa,inject:gh};function Pa(e,n){return n?e?function(){return st(Ae(e)?e.call(this,this):e,Ae(n)?n.call(this,this):n)}:n:e}function gh(e,n){return Pi(Zo(e),Zo(n))}function Zo(e){if(Ie(e)){const n={};for(let t=0;t<e.length;t++)n[e[t]]=e[t];return n}return e}function Et(e,n){return e?[...new Set([].concat(e,n))]:n}function Pi(e,n){return e?st(Object.create(null),e,n):n}function Ia(e,n){return e?Ie(e)&&Ie(n)?[...new Set([...e,...n])]:st(Object.create(null),Ea(e),Ea(n??{})):n}function mh(e,n){if(!e)return n;if(!n)return e;const t=st(Object.create(null),e);for(const i in n)t[i]=Et(e[i],n[i]);return t}function mc(){return{app:null,config:{isNativeTag:nf,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let vh=0;function yh(e,n){return function(i,r=null){Ae(i)||(i=st({},i)),r!=null&&!Xe(r)&&(r=null);const o=mc(),l=new WeakSet,s=[];let a=!1;const u=o.app={_uid:vh++,_component:i,_props:r,_container:null,_context:o,_instance:null,version:ep,get config(){return o.config},set config(c){},use(c,...f){return l.has(c)||(c&&Ae(c.install)?(l.add(c),c.install(u,...f)):Ae(c)&&(l.add(c),c(u,...f))),u},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),u},component(c,f){return f?(o.components[c]=f,u):o.components[c]},directive(c,f){return f?(o.directives[c]=f,u):o.directives[c]},mount(c,f,h){if(!a){const p=u._ceVNode||we(i,r);return p.appContext=o,h===!0?h="svg":h===!1&&(h=void 0),f&&n?n(p,c):e(p,c,h),a=!0,u._container=c,c.__vue_app__=u,ro(p.component)}},onUnmount(c){s.push(c)},unmount(){a&&(Kt(s,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,f){return o.provides[c]=f,u},runWithContext(c){const f=Kn;Kn=u;try{return c()}finally{Kn=f}}};return u}}let Kn=null;function bh(e,n){if(pt){let t=pt.provides;const i=pt.parent&&pt.parent.provides;i===t&&(t=pt.provides=Object.create(i)),t[e]=n}}function qn(e,n,t=!1){const i=pt||ut;if(i||Kn){const r=Kn?Kn._context.provides:i?i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return t&&Ae(n)?n.call(i&&i.proxy):n}}function _h(){return!!(pt||ut||Kn)}const vc={},yc=()=>Object.create(vc),bc=e=>Object.getPrototypeOf(e)===vc;function wh(e,n,t,i=!1){const r={},o=yc();e.propsDefaults=Object.create(null),_c(e,n,r,o);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);t?e.props=i?r:Df(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Th(e,n,t,i){const{props:r,attrs:o,vnode:{patchFlag:l}}=e,s=He(r),[a]=e.propsOptions;let u=!1;if((i||l>0)&&!(l&16)){if(l&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let h=c[f];if(io(e.emitsOptions,h))continue;const p=n[h];if(a)if(je(o,h))p!==o[h]&&(o[h]=p,u=!0);else{const g=zt(h);r[g]=Yo(a,s,g,p,e,!1)}else p!==o[h]&&(o[h]=p,u=!0)}}}else{_c(e,n,r,o)&&(u=!0);let c;for(const f in s)(!n||!je(n,f)&&((c=Jn(f))===f||!je(n,c)))&&(a?t&&(t[f]!==void 0||t[c]!==void 0)&&(r[f]=Yo(a,s,f,void 0,e,!0)):delete r[f]);if(o!==s)for(const f in o)(!n||!je(n,f))&&(delete o[f],u=!0)}u&&ln(e.attrs,"set","")}function _c(e,n,t,i){const[r,o]=e.propsOptions;let l=!1,s;if(n)for(let a in n){if(Ii(a))continue;const u=n[a];let c;r&&je(r,c=zt(a))?!o||!o.includes(c)?t[c]=u:(s||(s={}))[c]=u:io(e.emitsOptions,a)||(!(a in i)||u!==i[a])&&(i[a]=u,l=!0)}if(o){const a=He(t),u=s||Ke;for(let c=0;c<o.length;c++){const f=o[c];t[f]=Yo(r,a,f,u[f],e,!je(u,f))}}return l}function Yo(e,n,t,i,r,o){const l=e[t];if(l!=null){const s=je(l,"default");if(s&&i===void 0){const a=l.default;if(l.type!==Function&&!l.skipFactory&&Ae(a)){const{propsDefaults:u}=r;if(t in u)i=u[t];else{const c=hr(r);i=u[t]=a.call(null,n),c()}}else i=a;r.ce&&r.ce._setProp(t,i)}l[0]&&(o&&!s?i=!1:l[1]&&(i===""||i===Jn(t))&&(i=!0))}return i}const Sh=new WeakMap;function wc(e,n,t=!1){const i=t?Sh:n.propsCache,r=i.get(e);if(r)return r;const o=e.props,l={},s=[];let a=!1;if(!Ae(e)){const c=f=>{a=!0;const[h,p]=wc(f,n,!0);st(l,h),p&&s.push(...p)};!t&&n.mixins.length&&n.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!a)return Xe(e)&&i.set(e,ai),ai;if(Ie(o))for(let c=0;c<o.length;c++){const f=zt(o[c]);Oa(f)&&(l[f]=Ke)}else if(o)for(const c in o){const f=zt(c);if(Oa(f)){const h=o[c],p=l[f]=Ie(h)||Ae(h)?{type:h}:st({},h),g=p.type;let y=!1,T=!0;if(Ie(g))for(let v=0;v<g.length;++v){const E=g[v],O=Ae(E)&&E.name;if(O==="Boolean"){y=!0;break}else O==="String"&&(T=!1)}else y=Ae(g)&&g.name==="Boolean";p[0]=y,p[1]=T,(y||je(p,"default"))&&s.push(f)}}const u=[l,s];return Xe(e)&&i.set(e,u),u}function Oa(e){return e[0]!=="$"&&!Ii(e)}const Tc=e=>e[0]==="_"||e==="$stable",zs=e=>Ie(e)?e.map(Jt):[Jt(e)],xh=(e,n,t)=>{if(n._n)return n;const i=ct((...r)=>zs(n(...r)),t);return i._c=!1,i},Sc=(e,n,t)=>{const i=e._ctx;for(const r in e){if(Tc(r))continue;const o=e[r];if(Ae(o))n[r]=xh(r,o,i);else if(o!=null){const l=zs(o);n[r]=()=>l}}},xc=(e,n)=>{const t=zs(n);e.slots.default=()=>t},Ec=(e,n,t)=>{for(const i in n)(t||i!=="_")&&(e[i]=n[i])},Eh=(e,n,t)=>{const i=e.slots=yc();if(e.vnode.shapeFlag&32){const r=n._;r?(Ec(i,n,t),t&&Cu(i,"_",r,!0)):Sc(n,i)}else n&&xc(e,n)},Ch=(e,n,t)=>{const{vnode:i,slots:r}=e;let o=!0,l=Ke;if(i.shapeFlag&32){const s=n._;s?t&&s===1?o=!1:Ec(r,n,t):(o=!n.$stable,Sc(n,r)),l=n}else n&&(xc(e,n),l={default:1});if(o)for(const s in r)!Tc(s)&&l[s]==null&&delete r[s]},Pt=zh;function Ph(e){return Ih(e)}function Ih(e,n){const t=Yr();t.__VUE__=!0;const{insert:i,remove:r,patchProp:o,createElement:l,createText:s,createComment:a,setText:u,setElementText:c,parentNode:f,nextSibling:h,setScopeId:p=$t,insertStaticContent:g}=e,y=(b,d,m,x=null,I=null,A=null,U=void 0,z=null,Q=!!d.dynamicChildren)=>{if(b===d)return;b&&!Wn(b,d)&&(x=q(b),We(b,I,A,!0),b=null),d.patchFlag===-2&&(Q=!1,d.dynamicChildren=null);const{type:Y,ref:ue,shapeFlag:X}=d;switch(Y){case fr:T(b,d,m,x);break;case At:v(b,d,m,x);break;case To:b==null&&E(d,m,x,U);break;case Ee:N(b,d,m,x,I,A,U,z,Q);break;default:X&1?D(b,d,m,x,I,A,U,z,Q):X&6?re(b,d,m,x,I,A,U,z,Q):(X&64||X&128)&&Y.process(b,d,m,x,I,A,U,z,Q,ce)}ue!=null&&I&&Nr(ue,b&&b.ref,A,d||b,!d)},T=(b,d,m,x)=>{if(b==null)i(d.el=s(d.children),m,x);else{const I=d.el=b.el;d.children!==b.children&&u(I,d.children)}},v=(b,d,m,x)=>{b==null?i(d.el=a(d.children||""),m,x):d.el=b.el},E=(b,d,m,x)=>{[b.el,b.anchor]=g(b.children,d,m,x,b.el,b.anchor)},O=({el:b,anchor:d},m,x)=>{let I;for(;b&&b!==d;)I=h(b),i(b,m,x),b=I;i(d,m,x)},P=({el:b,anchor:d})=>{let m;for(;b&&b!==d;)m=h(b),r(b),b=m;r(d)},D=(b,d,m,x,I,A,U,z,Q)=>{d.type==="svg"?U="svg":d.type==="math"&&(U="mathml"),b==null?H(d,m,x,I,A,U,z,Q):R(b,d,I,A,U,z,Q)},H=(b,d,m,x,I,A,U,z)=>{let Q,Y;const{props:ue,shapeFlag:X,transition:ee,dirs:k}=b;if(Q=b.el=l(b.type,A,ue&&ue.is,ue),X&8?c(Q,b.children):X&16&&B(b.children,Q,null,x,I,_o(b,A),U,z),k&&Mn(b,null,x,"created"),M(Q,b,b.scopeId,U,x),ue){for(const ye in ue)ye!=="value"&&!Ii(ye)&&o(Q,ye,null,ue[ye],A,x);"value"in ue&&o(Q,"value",null,ue.value,A),(Y=ue.onVnodeBeforeMount)&&Zt(Y,x,b)}k&&Mn(b,null,x,"beforeMount");const G=Oh(I,ee);G&&ee.beforeEnter(Q),i(Q,d,m),((Y=ue&&ue.onVnodeMounted)||G||k)&&Pt(()=>{Y&&Zt(Y,x,b),G&&ee.enter(Q),k&&Mn(b,null,x,"mounted")},I)},M=(b,d,m,x,I)=>{if(m&&p(b,m),x)for(let A=0;A<x.length;A++)p(b,x[A]);if(I){let A=I.subTree;if(d===A||Oc(A.type)&&(A.ssContent===d||A.ssFallback===d)){const U=I.vnode;M(b,U,U.scopeId,U.slotScopeIds,I.parent)}}},B=(b,d,m,x,I,A,U,z,Q=0)=>{for(let Y=Q;Y<b.length;Y++){const ue=b[Y]=z?Sn(b[Y]):Jt(b[Y]);y(null,ue,d,m,x,I,A,U,z)}},R=(b,d,m,x,I,A,U)=>{const z=d.el=b.el;let{patchFlag:Q,dynamicChildren:Y,dirs:ue}=d;Q|=b.patchFlag&16;const X=b.props||Ke,ee=d.props||Ke;let k;if(m&&Nn(m,!1),(k=ee.onVnodeBeforeUpdate)&&Zt(k,m,d,b),ue&&Mn(d,b,m,"beforeUpdate"),m&&Nn(m,!0),(X.innerHTML&&ee.innerHTML==null||X.textContent&&ee.textContent==null)&&c(z,""),Y?V(b.dynamicChildren,Y,z,m,x,_o(d,I),A):U||_e(b,d,z,null,m,x,_o(d,I),A,!1),Q>0){if(Q&16)$(z,X,ee,m,I);else if(Q&2&&X.class!==ee.class&&o(z,"class",null,ee.class,I),Q&4&&o(z,"style",X.style,ee.style,I),Q&8){const G=d.dynamicProps;for(let ye=0;ye<G.length;ye++){const w=G[ye],_=X[w],S=ee[w];(S!==_||w==="value")&&o(z,w,_,S,I,m)}}Q&1&&b.children!==d.children&&c(z,d.children)}else!U&&Y==null&&$(z,X,ee,m,I);((k=ee.onVnodeUpdated)||ue)&&Pt(()=>{k&&Zt(k,m,d,b),ue&&Mn(d,b,m,"updated")},x)},V=(b,d,m,x,I,A,U)=>{for(let z=0;z<d.length;z++){const Q=b[z],Y=d[z],ue=Q.el&&(Q.type===Ee||!Wn(Q,Y)||Q.shapeFlag&70)?f(Q.el):m;y(Q,Y,ue,null,x,I,A,U,!0)}},$=(b,d,m,x,I)=>{if(d!==m){if(d!==Ke)for(const A in d)!Ii(A)&&!(A in m)&&o(b,A,d[A],null,I,x);for(const A in m){if(Ii(A))continue;const U=m[A],z=d[A];U!==z&&A!=="value"&&o(b,A,z,U,I,x)}"value"in m&&o(b,"value",d.value,m.value,I)}},N=(b,d,m,x,I,A,U,z,Q)=>{const Y=d.el=b?b.el:s(""),ue=d.anchor=b?b.anchor:s("");let{patchFlag:X,dynamicChildren:ee,slotScopeIds:k}=d;k&&(z=z?z.concat(k):k),b==null?(i(Y,m,x),i(ue,m,x),B(d.children||[],m,ue,I,A,U,z,Q)):X>0&&X&64&&ee&&b.dynamicChildren?(V(b.dynamicChildren,ee,m,I,A,U,z),(d.key!=null||I&&d===I.subTree)&&js(b,d,!0)):_e(b,d,m,ue,I,A,U,z,Q)},re=(b,d,m,x,I,A,U,z,Q)=>{d.slotScopeIds=z,b==null?d.shapeFlag&512?I.ctx.activate(d,m,x,U,Q):Z(d,m,x,I,A,U,Q):le(b,d,Q)},Z=(b,d,m,x,I,A,U)=>{const z=b.component=qh(b,x,I);if(eo(b)&&(z.ctx.renderer=ce),Zh(z,!1,U),z.asyncDep){if(I&&I.registerDep(z,oe,U),!b.el){const Q=z.subTree=we(At);v(null,Q,d,m)}}else oe(z,b,d,m,I,A,U)},le=(b,d,m)=>{const x=d.component=b.component;if(Hh(b,d,m))if(x.asyncDep&&!x.asyncResolved){pe(x,d,m);return}else x.next=d,x.update();else d.el=b.el,x.vnode=d},oe=(b,d,m,x,I,A,U)=>{const z=()=>{if(b.isMounted){let{next:X,bu:ee,u:k,parent:G,vnode:ye}=b;{const W=Cc(b);if(W){X&&(X.el=ye.el,pe(b,X,U)),W.asyncDep.then(()=>{b.isUnmounted||z()});return}}let w=X,_;Nn(b,!1),X?(X.el=ye.el,pe(b,X,U)):X=ye,ee&&Cr(ee),(_=X.props&&X.props.onVnodeBeforeUpdate)&&Zt(_,G,X,ye),Nn(b,!0);const S=wo(b),C=b.subTree;b.subTree=S,y(C,S,f(C.el),q(C),b,I,A),X.el=S.el,w===null&&Vh(b,S.el),k&&Pt(k,I),(_=X.props&&X.props.onVnodeUpdated)&&Pt(()=>Zt(_,G,X,ye),I)}else{let X;const{el:ee,props:k}=d,{bm:G,m:ye,parent:w,root:_,type:S}=b,C=ci(d);if(Nn(b,!1),G&&Cr(G),!C&&(X=k&&k.onVnodeBeforeMount)&&Zt(X,w,d),Nn(b,!0),ee&&Ce){const W=()=>{b.subTree=wo(b),Ce(ee,b.subTree,b,I,null)};C&&S.__asyncHydrate?S.__asyncHydrate(ee,b,W):W()}else{_.ce&&_.ce._injectChildStyle(S);const W=b.subTree=wo(b);y(null,W,m,x,b,I,A),d.el=W.el}if(ye&&Pt(ye,I),!C&&(X=k&&k.onVnodeMounted)){const W=d;Pt(()=>Zt(X,w,W),I)}(d.shapeFlag&256||w&&ci(w.vnode)&&w.vnode.shapeFlag&256)&&b.a&&Pt(b.a,I),b.isMounted=!0,d=m=x=null}};b.scope.on();const Q=b.effect=new Ru(z);b.scope.off();const Y=b.update=Q.run.bind(Q),ue=b.job=Q.runIfDirty.bind(Q);ue.i=b,ue.id=b.uid,Q.scheduler=()=>Fs(ue),Nn(b,!0),Y()},pe=(b,d,m)=>{d.component=b;const x=b.vnode.props;b.vnode=d,b.next=null,Th(b,d.props,x,m),Ch(b,d.children,m),An(),ya(b),Ln()},_e=(b,d,m,x,I,A,U,z,Q=!1)=>{const Y=b&&b.children,ue=b?b.shapeFlag:0,X=d.children,{patchFlag:ee,shapeFlag:k}=d;if(ee>0){if(ee&128){ge(Y,X,m,x,I,A,U,z,Q);return}else if(ee&256){Fe(Y,X,m,x,I,A,U,z,Q);return}}k&8?(ue&16&&F(Y,I,A),X!==Y&&c(m,X)):ue&16?k&16?ge(Y,X,m,x,I,A,U,z,Q):F(Y,I,A,!0):(ue&8&&c(m,""),k&16&&B(X,m,x,I,A,U,z,Q))},Fe=(b,d,m,x,I,A,U,z,Q)=>{b=b||ai,d=d||ai;const Y=b.length,ue=d.length,X=Math.min(Y,ue);let ee;for(ee=0;ee<X;ee++){const k=d[ee]=Q?Sn(d[ee]):Jt(d[ee]);y(b[ee],k,m,null,I,A,U,z,Q)}Y>ue?F(b,I,A,!0,!1,X):B(d,m,x,I,A,U,z,Q,X)},ge=(b,d,m,x,I,A,U,z,Q)=>{let Y=0;const ue=d.length;let X=b.length-1,ee=ue-1;for(;Y<=X&&Y<=ee;){const k=b[Y],G=d[Y]=Q?Sn(d[Y]):Jt(d[Y]);if(Wn(k,G))y(k,G,m,null,I,A,U,z,Q);else break;Y++}for(;Y<=X&&Y<=ee;){const k=b[X],G=d[ee]=Q?Sn(d[ee]):Jt(d[ee]);if(Wn(k,G))y(k,G,m,null,I,A,U,z,Q);else break;X--,ee--}if(Y>X){if(Y<=ee){const k=ee+1,G=k<ue?d[k].el:x;for(;Y<=ee;)y(null,d[Y]=Q?Sn(d[Y]):Jt(d[Y]),m,G,I,A,U,z,Q),Y++}}else if(Y>ee)for(;Y<=X;)We(b[Y],I,A,!0),Y++;else{const k=Y,G=Y,ye=new Map;for(Y=G;Y<=ee;Y++){const ke=d[Y]=Q?Sn(d[Y]):Jt(d[Y]);ke.key!=null&&ye.set(ke.key,Y)}let w,_=0;const S=ee-G+1;let C=!1,W=0;const ie=new Array(S);for(Y=0;Y<S;Y++)ie[Y]=0;for(Y=k;Y<=X;Y++){const ke=b[Y];if(_>=S){We(ke,I,A,!0);continue}let be;if(ke.key!=null)be=ye.get(ke.key);else for(w=G;w<=ee;w++)if(ie[w-G]===0&&Wn(ke,d[w])){be=w;break}be===void 0?We(ke,I,A,!0):(ie[be-G]=Y+1,be>=W?W=be:C=!0,y(ke,d[be],m,null,I,A,U,z,Q),_++)}const Te=C?Ah(ie):ai;for(w=Te.length-1,Y=S-1;Y>=0;Y--){const ke=G+Y,be=d[ke],bt=ke+1<ue?d[ke+1].el:x;ie[Y]===0?y(null,be,m,bt,I,A,U,z,Q):C&&(w<0||Y!==Te[w]?Ne(be,m,bt,2):w--)}}},Ne=(b,d,m,x,I=null)=>{const{el:A,type:U,transition:z,children:Q,shapeFlag:Y}=b;if(Y&6){Ne(b.component.subTree,d,m,x);return}if(Y&128){b.suspense.move(d,m,x);return}if(Y&64){U.move(b,d,m,ce);return}if(U===Ee){i(A,d,m);for(let X=0;X<Q.length;X++)Ne(Q[X],d,m,x);i(b.anchor,d,m);return}if(U===To){O(b,d,m);return}if(x!==2&&Y&1&&z)if(x===0)z.beforeEnter(A),i(A,d,m),Pt(()=>z.enter(A),I);else{const{leave:X,delayLeave:ee,afterLeave:k}=z,G=()=>i(A,d,m),ye=()=>{X(A,()=>{G(),k&&k()})};ee?ee(A,G,ye):ye()}else i(A,d,m)},We=(b,d,m,x=!1,I=!1)=>{const{type:A,props:U,ref:z,children:Q,dynamicChildren:Y,shapeFlag:ue,patchFlag:X,dirs:ee,cacheIndex:k}=b;if(X===-2&&(I=!1),z!=null&&Nr(z,null,m,b,!0),k!=null&&(d.renderCache[k]=void 0),ue&256){d.ctx.deactivate(b);return}const G=ue&1&&ee,ye=!ci(b);let w;if(ye&&(w=U&&U.onVnodeBeforeUnmount)&&Zt(w,d,b),ue&6)te(b.component,m,x);else{if(ue&128){b.suspense.unmount(m,x);return}G&&Mn(b,null,d,"beforeUnmount"),ue&64?b.type.remove(b,d,m,ce,x):Y&&!Y.hasOnce&&(A!==Ee||X>0&&X&64)?F(Y,d,m,!1,!0):(A===Ee&&X&384||!I&&ue&16)&&F(Q,d,m),x&&it(b)}(ye&&(w=U&&U.onVnodeUnmounted)||G)&&Pt(()=>{w&&Zt(w,d,b),G&&Mn(b,null,d,"unmounted")},m)},it=b=>{const{type:d,el:m,anchor:x,transition:I}=b;if(d===Ee){tt(m,x);return}if(d===To){P(b);return}const A=()=>{r(m),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(b.shapeFlag&1&&I&&!I.persisted){const{leave:U,delayLeave:z}=I,Q=()=>U(m,A);z?z(b.el,A,Q):Q()}else A()},tt=(b,d)=>{let m;for(;b!==d;)m=h(b),r(b),b=m;r(d)},te=(b,d,m)=>{const{bum:x,scope:I,job:A,subTree:U,um:z,m:Q,a:Y}=b;Aa(Q),Aa(Y),x&&Cr(x),I.stop(),A&&(A.flags|=8,We(U,b,d,m)),z&&Pt(z,d),Pt(()=>{b.isUnmounted=!0},d),d&&d.pendingBranch&&!d.isUnmounted&&b.asyncDep&&!b.asyncResolved&&b.suspenseId===d.pendingId&&(d.deps--,d.deps===0&&d.resolve())},F=(b,d,m,x=!1,I=!1,A=0)=>{for(let U=A;U<b.length;U++)We(b[U],d,m,x,I)},q=b=>{if(b.shapeFlag&6)return q(b.component.subTree);if(b.shapeFlag&128)return b.suspense.next();const d=h(b.anchor||b.el),m=d&&d[ec];return m?h(m):d};let K=!1;const se=(b,d,m)=>{b==null?d._vnode&&We(d._vnode,null,null,!0):y(d._vnode||null,b,d,null,null,null,m),d._vnode=b,K||(K=!0,ya(),Ju(),K=!1)},ce={p:y,um:We,m:Ne,r:it,mt:Z,mc:B,pc:_e,pbc:V,n:q,o:e};let me,Ce;return{render:se,hydrate:me,createApp:yh(se,me)}}function _o({type:e,props:n},t){return t==="svg"&&e==="foreignObject"||t==="mathml"&&e==="annotation-xml"&&n&&n.encoding&&n.encoding.includes("html")?void 0:t}function Nn({effect:e,job:n},t){t?(e.flags|=32,n.flags|=4):(e.flags&=-33,n.flags&=-5)}function Oh(e,n){return(!e||e&&!e.pendingBranch)&&n&&!n.persisted}function js(e,n,t=!1){const i=e.children,r=n.children;if(Ie(i)&&Ie(r))for(let o=0;o<i.length;o++){const l=i[o];let s=r[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=r[o]=Sn(r[o]),s.el=l.el),!t&&s.patchFlag!==-2&&js(l,s)),s.type===fr&&(s.el=l.el)}}function Ah(e){const n=e.slice(),t=[0];let i,r,o,l,s;const a=e.length;for(i=0;i<a;i++){const u=e[i];if(u!==0){if(r=t[t.length-1],e[r]<u){n[i]=r,t.push(i);continue}for(o=0,l=t.length-1;o<l;)s=o+l>>1,e[t[s]]<u?o=s+1:l=s;u<e[t[o]]&&(o>0&&(n[i]=t[o-1]),t[o]=i)}}for(o=t.length,l=t[o-1];o-- >0;)t[o]=l,l=n[l];return t}function Cc(e){const n=e.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:Cc(n)}function Aa(e){if(e)for(let n=0;n<e.length;n++)e[n].flags|=8}const Lh=Symbol.for("v-scx"),Rh=()=>qn(Lh);function kh(e,n){return Us(e,null,n)}function Ve(e,n,t){return Us(e,n,t)}function Us(e,n,t=Ke){const{immediate:i,deep:r,flush:o,once:l}=t,s=st({},t),a=n&&i||!n&&o!=="post";let u;if(Wi){if(o==="sync"){const p=Rh();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=$t,p.resume=$t,p.pause=$t,p}}const c=pt;s.call=(p,g,y)=>Kt(p,c,g,y);let f=!1;o==="post"?s.scheduler=p=>{Pt(p,c&&c.suspense)}:o!=="sync"&&(f=!0,s.scheduler=(p,g)=>{g?p():Fs(p)}),s.augmentJob=p=>{n&&(p.flags|=4),f&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const h=Kf(e,n,s);return Wi&&(u?u.push(h):a&&h()),h}function Dh(e,n,t){const i=this.proxy,r=ot(e)?e.includes(".")?Pc(i,e):()=>i[e]:e.bind(i,i);let o;Ae(n)?o=n:(o=n.handler,t=n);const l=hr(this),s=Us(r,o.bind(i),t);return l(),s}function Pc(e,n){const t=n.split(".");return()=>{let i=e;for(let r=0;r<t.length&&i;r++)i=i[t[r]];return i}}const Mh=(e,n)=>n==="modelValue"||n==="model-value"?e.modelModifiers:e[`${n}Modifiers`]||e[`${zt(n)}Modifiers`]||e[`${Jn(n)}Modifiers`];function Nh(e,n,...t){if(e.isUnmounted)return;const i=e.vnode.props||Ke;let r=t;const o=n.startsWith("update:"),l=o&&Mh(i,n.slice(7));l&&(l.trim&&(r=t.map(c=>ot(c)?c.trim():c)),l.number&&(r=t.map(Ho)));let s,a=i[s=Er(n)]||i[s=Er(zt(n))];!a&&o&&(a=i[s=Er(Jn(n))]),a&&Kt(a,e,6,r);const u=i[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,Kt(u,e,6,r)}}function Ic(e,n,t=!1){const i=n.emitsCache,r=i.get(e);if(r!==void 0)return r;const o=e.emits;let l={},s=!1;if(!Ae(e)){const a=u=>{const c=Ic(u,n,!0);c&&(s=!0,st(l,c))};!t&&n.mixins.length&&n.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!s?(Xe(e)&&i.set(e,null),null):(Ie(o)?o.forEach(a=>l[a]=null):st(l,o),Xe(e)&&i.set(e,l),l)}function io(e,n){return!e||!Gr(n)?!1:(n=n.slice(2).replace(/Once$/,""),je(e,n[0].toLowerCase()+n.slice(1))||je(e,Jn(n))||je(e,n))}function wo(e){const{type:n,vnode:t,proxy:i,withProxy:r,propsOptions:[o],slots:l,attrs:s,emit:a,render:u,renderCache:c,props:f,data:h,setupState:p,ctx:g,inheritAttrs:y}=e,T=Mr(e);let v,E;try{if(t.shapeFlag&4){const P=r||i,D=P;v=Jt(u.call(D,P,c,f,p,h,g)),E=s}else{const P=n;v=Jt(P.length>1?P(f,{attrs:s,slots:l,emit:a}):P(f,null)),E=n.props?s:Fh(s)}}catch(P){ki.length=0,$r(P,e,1),v=we(At)}let O=v;if(E&&y!==!1){const P=Object.keys(E),{shapeFlag:D}=O;P.length&&D&7&&(o&&P.some(Es)&&(E=Bh(E,o)),O=In(O,E,!1,!0))}return t.dirs&&(O=In(O,null,!1,!0),O.dirs=O.dirs?O.dirs.concat(t.dirs):t.dirs),t.transition&&zi(O,t.transition),v=O,Mr(T),v}const Fh=e=>{let n;for(const t in e)(t==="class"||t==="style"||Gr(t))&&((n||(n={}))[t]=e[t]);return n},Bh=(e,n)=>{const t={};for(const i in e)(!Es(i)||!(i.slice(9)in n))&&(t[i]=e[i]);return t};function Hh(e,n,t){const{props:i,children:r,component:o}=e,{props:l,children:s,patchFlag:a}=n,u=o.emitsOptions;if(n.dirs||n.transition)return!0;if(t&&a>=0){if(a&1024)return!0;if(a&16)return i?La(i,l,u):!!l;if(a&8){const c=n.dynamicProps;for(let f=0;f<c.length;f++){const h=c[f];if(l[h]!==i[h]&&!io(u,h))return!0}}}else return(r||s)&&(!s||!s.$stable)?!0:i===l?!1:i?l?La(i,l,u):!0:!!l;return!1}function La(e,n,t){const i=Object.keys(n);if(i.length!==Object.keys(e).length)return!0;for(let r=0;r<i.length;r++){const o=i[r];if(n[o]!==e[o]&&!io(t,o))return!0}return!1}function Vh({vnode:e,parent:n},t){for(;n;){const i=n.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.el=e.el),i===e)(e=n.vnode).el=t,n=n.parent;else break}}const Oc=e=>e.__isSuspense;function zh(e,n){n&&n.pendingBranch?Ie(e)?n.effects.push(...e):n.effects.push(e):Yf(e)}const Ee=Symbol.for("v-fgt"),fr=Symbol.for("v-txt"),At=Symbol.for("v-cmt"),To=Symbol.for("v-stc"),ki=[];let Dt=null;function L(e=!1){ki.push(Dt=e?null:[])}function jh(){ki.pop(),Dt=ki[ki.length-1]||null}let ji=1;function Ra(e,n=!1){ji+=e,e<0&&Dt&&n&&(Dt.hasOnce=!0)}function Ac(e){return e.dynamicChildren=ji>0?Dt||ai:null,jh(),ji>0&&Dt&&Dt.push(e),e}function j(e,n,t,i,r,o){return Ac(ne(e,n,t,i,r,o,!0))}function he(e,n,t,i,r){return Ac(we(e,n,t,i,r,!0))}function Ui(e){return e?e.__v_isVNode===!0:!1}function Wn(e,n){return e.type===n.type&&e.key===n.key}const Lc=({key:e})=>e??null,Ir=({ref:e,ref_key:n,ref_for:t})=>(typeof e=="number"&&(e=""+e),e!=null?ot(e)||nt(e)||Ae(e)?{i:ut,r:e,k:n,f:!!t}:e:null);function ne(e,n=null,t=null,i=0,r=null,o=e===Ee?0:1,l=!1,s=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:n,key:n&&Lc(n),ref:n&&Ir(n),scopeId:$u,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ut};return s?(Ws(a,t),o&128&&e.normalize(a)):t&&(a.shapeFlag|=ot(t)?8:16),ji>0&&!l&&Dt&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&Dt.push(a),a}const we=Uh;function Uh(e,n=null,t=null,i=0,r=null,o=!1){if((!e||e===hc)&&(e=At),Ui(e)){const s=In(e,n,!0);return t&&Ws(s,t),ji>0&&!o&&Dt&&(s.shapeFlag&6?Dt[Dt.indexOf(e)]=s:Dt.push(s)),s.patchFlag=-2,s}if($h(e)&&(e=e.__vccOpts),n){n=Wh(n);let{class:s,style:a}=n;s&&!ot(s)&&(n.class=qe(s)),Xe(a)&&(Ms(a)&&!Ie(a)&&(a=st({},a)),n.style=hn(a))}const l=ot(e)?1:Oc(e)?128:tc(e)?64:Xe(e)?4:Ae(e)?2:0;return ne(e,n,t,i,r,l,o,!0)}function Wh(e){return e?Ms(e)||bc(e)?st({},e):e:null}function In(e,n,t=!1,i=!1){const{props:r,ref:o,patchFlag:l,children:s,transition:a}=e,u=n?ae(r||{},n):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Lc(u),ref:n&&n.ref?t&&o?Ie(o)?o.concat(Ir(n)):[o,Ir(n)]:Ir(n):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:n&&e.type!==Ee?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&In(e.ssContent),ssFallback:e.ssFallback&&In(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&i&&zi(c,a.clone(c)),c}function Rn(e=" ",n=0){return we(fr,null,e,n)}function Se(e="",n=!1){return n?(L(),he(At,null,e)):we(At,null,e)}function Jt(e){return e==null||typeof e=="boolean"?we(At):Ie(e)?we(Ee,null,e.slice()):Ui(e)?Sn(e):we(fr,null,String(e))}function Sn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:In(e)}function Ws(e,n){let t=0;const{shapeFlag:i}=e;if(n==null)n=null;else if(Ie(n))t=16;else if(typeof n=="object")if(i&65){const r=n.default;r&&(r._c&&(r._d=!1),Ws(e,r()),r._c&&(r._d=!0));return}else{t=32;const r=n._;!r&&!bc(n)?n._ctx=ut:r===3&&ut&&(ut.slots._===1?n._=1:(n._=2,e.patchFlag|=1024))}else Ae(n)?(n={default:n,_ctx:ut},t=32):(n=String(n),i&64?(t=16,n=[Rn(n)]):t=8);e.children=n,e.shapeFlag|=t}function ae(...e){const n={};for(let t=0;t<e.length;t++){const i=e[t];for(const r in i)if(r==="class")n.class!==i.class&&(n.class=qe([n.class,i.class]));else if(r==="style")n.style=hn([n.style,i.style]);else if(Gr(r)){const o=n[r],l=i[r];l&&o!==l&&!(Ie(o)&&o.includes(l))&&(n[r]=o?[].concat(o,l):l)}else r!==""&&(n[r]=i[r])}return n}function Zt(e,n,t,i=null){Kt(e,n,7,[t,i])}const Gh=mc();let Kh=0;function qh(e,n,t){const i=e.type,r=(n?n.appContext:e.appContext)||Gh,o={uid:Kh++,vnode:e,type:i,parent:n,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Au(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(r.provides),ids:n?n.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wc(i,r),emitsOptions:Ic(i,r),emit:null,emitted:null,propsDefaults:Ke,inheritAttrs:i.inheritAttrs,ctx:Ke,data:Ke,props:Ke,attrs:Ke,slots:Ke,refs:Ke,setupState:Ke,setupContext:null,suspense:t,suspenseId:t?t.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=n?n.root:o,o.emit=Nh.bind(null,o),e.ce&&e.ce(o),o}let pt=null;const en=()=>pt||ut;let Br,Xo;{const e=Yr(),n=(t,i)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(i),o=>{r.length>1?r.forEach(l=>l(o)):r[0](o)}};Br=n("__VUE_INSTANCE_SETTERS__",t=>pt=t),Xo=n("__VUE_SSR_SETTERS__",t=>Wi=t)}const hr=e=>{const n=pt;return Br(e),e.scope.on(),()=>{e.scope.off(),Br(n)}},ka=()=>{pt&&pt.scope.off(),Br(null)};function Rc(e){return e.vnode.shapeFlag&4}let Wi=!1;function Zh(e,n=!1,t=!1){n&&Xo(n);const{props:i,children:r}=e.vnode,o=Rc(e);wh(e,i,o,n),Eh(e,r,t);const l=o?Yh(e,n):void 0;return n&&Xo(!1),l}function Yh(e,n){const t=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,dh);const{setup:i}=t;if(i){An();const r=e.setupContext=i.length>1?Jh(e):null,o=hr(e),l=cr(i,e,0,[e.props,r]),s=Su(l);if(Ln(),o(),(s||e.sp)&&!ci(e)&&uc(e),s){if(l.then(ka,ka),n)return l.then(a=>{Da(e,a,n)}).catch(a=>{$r(a,e,0)});e.asyncDep=l}else Da(e,l,n)}else kc(e,n)}function Da(e,n,t){Ae(n)?e.type.__ssrInlineRender?e.ssrRender=n:e.render=n:Xe(n)&&(e.setupState=qu(n)),kc(e,t)}let Ma;function kc(e,n,t){const i=e.type;if(!e.render){if(!n&&Ma&&!i.render){const r=i.template||Vs(e).template;if(r){const{isCustomElement:o,compilerOptions:l}=e.appContext.config,{delimiters:s,compilerOptions:a}=i,u=st(st({isCustomElement:o,delimiters:s},l),a);i.render=Ma(r,u)}}e.render=i.render||$t}{const r=hr(e);An();try{fh(e)}finally{Ln(),r()}}}const Xh={get(e,n){return wt(e,"get",""),e[n]}};function Jh(e){const n=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,Xh),slots:e.slots,emit:e.emit,expose:n}}function ro(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(qu(Ns(e.exposed)),{get(n,t){if(t in n)return n[t];if(t in Ri)return Ri[t](e)},has(n,t){return t in n||t in Ri}})):e.proxy}function Qh(e,n=!0){return Ae(e)?e.displayName||e.name:e.name||n&&e.__name}function $h(e){return Ae(e)&&"__vccOpts"in e}const J=(e,n)=>Wf(e,n,Wi);function oo(e,n,t){const i=arguments.length;return i===2?Xe(n)&&!Ie(n)?Ui(n)?we(e,null,[n]):we(e,n):we(e,null,n):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Ui(t)&&(t=[t]),we(e,n,t))}const ep="3.5.13";/**
* @vue/runtime-dom v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Jo;const Na=typeof window<"u"&&window.trustedTypes;if(Na)try{Jo=Na.createPolicy("vue",{createHTML:e=>e})}catch{}const Dc=Jo?e=>Jo.createHTML(e):e=>e,tp="http://www.w3.org/2000/svg",np="http://www.w3.org/1998/Math/MathML",an=typeof document<"u"?document:null,Fa=an&&an.createElement("template"),ip={insert:(e,n,t)=>{n.insertBefore(e,t||null)},remove:e=>{const n=e.parentNode;n&&n.removeChild(e)},createElement:(e,n,t,i)=>{const r=n==="svg"?an.createElementNS(tp,e):n==="mathml"?an.createElementNS(np,e):t?an.createElement(e,{is:t}):an.createElement(e);return e==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:e=>an.createTextNode(e),createComment:e=>an.createComment(e),setText:(e,n)=>{e.nodeValue=n},setElementText:(e,n)=>{e.textContent=n},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>an.querySelector(e),setScopeId(e,n){e.setAttribute(n,"")},insertStaticContent(e,n,t,i,r,o){const l=t?t.previousSibling:n.lastChild;if(r&&(r===o||r.nextSibling))for(;n.insertBefore(r.cloneNode(!0),t),!(r===o||!(r=r.nextSibling)););else{Fa.innerHTML=Dc(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const s=Fa.content;if(i==="svg"||i==="mathml"){const a=s.firstChild;for(;a.firstChild;)s.appendChild(a.firstChild);s.removeChild(a)}n.insertBefore(s,t)}return[l?l.nextSibling:n.firstChild,t?t.previousSibling:n.lastChild]}},mn="transition",Ti="animation",Gi=Symbol("_vtc"),Mc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},rp=st({},rc,Mc),op=e=>(e.displayName="Transition",e.props=rp,e),Nc=op((e,{slots:n})=>oo(eh,sp(e),n)),Fn=(e,n=[])=>{Ie(e)?e.forEach(t=>t(...n)):e&&e(...n)},Ba=e=>e?Ie(e)?e.some(n=>n.length>1):e.length>1:!1;function sp(e){const n={};for(const N in e)N in Mc||(n[N]=e[N]);if(e.css===!1)return n;const{name:t="v",type:i,duration:r,enterFromClass:o=`${t}-enter-from`,enterActiveClass:l=`${t}-enter-active`,enterToClass:s=`${t}-enter-to`,appearFromClass:a=o,appearActiveClass:u=l,appearToClass:c=s,leaveFromClass:f=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:p=`${t}-leave-to`}=e,g=ap(r),y=g&&g[0],T=g&&g[1],{onBeforeEnter:v,onEnter:E,onEnterCancelled:O,onLeave:P,onLeaveCancelled:D,onBeforeAppear:H=v,onAppear:M=E,onAppearCancelled:B=O}=n,R=(N,re,Z,le)=>{N._enterCancelled=le,Bn(N,re?c:s),Bn(N,re?u:l),Z&&Z()},V=(N,re)=>{N._isLeaving=!1,Bn(N,f),Bn(N,p),Bn(N,h),re&&re()},$=N=>(re,Z)=>{const le=N?M:E,oe=()=>R(re,N,Z);Fn(le,[re,oe]),Ha(()=>{Bn(re,N?a:o),rn(re,N?c:s),Ba(le)||Va(re,i,y,oe)})};return st(n,{onBeforeEnter(N){Fn(v,[N]),rn(N,o),rn(N,l)},onBeforeAppear(N){Fn(H,[N]),rn(N,a),rn(N,u)},onEnter:$(!1),onAppear:$(!0),onLeave(N,re){N._isLeaving=!0;const Z=()=>V(N,re);rn(N,f),N._enterCancelled?(rn(N,h),Ua()):(Ua(),rn(N,h)),Ha(()=>{N._isLeaving&&(Bn(N,f),rn(N,p),Ba(P)||Va(N,i,T,Z))}),Fn(P,[N,Z])},onEnterCancelled(N){R(N,!1,void 0,!0),Fn(O,[N])},onAppearCancelled(N){R(N,!0,void 0,!0),Fn(B,[N])},onLeaveCancelled(N){V(N),Fn(D,[N])}})}function ap(e){if(e==null)return null;if(Xe(e))return[So(e.enter),So(e.leave)];{const n=So(e);return[n,n]}}function So(e){return lf(e)}function rn(e,n){n.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[Gi]||(e[Gi]=new Set)).add(n)}function Bn(e,n){n.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const t=e[Gi];t&&(t.delete(n),t.size||(e[Gi]=void 0))}function Ha(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let lp=0;function Va(e,n,t,i){const r=e._endId=++lp,o=()=>{r===e._endId&&i()};if(t!=null)return setTimeout(o,t);const{type:l,timeout:s,propCount:a}=up(e,n);if(!l)return i();const u=l+"end";let c=0;const f=()=>{e.removeEventListener(u,h),o()},h=p=>{p.target===e&&++c>=a&&f()};setTimeout(()=>{c<a&&f()},s+1),e.addEventListener(u,h)}function up(e,n){const t=window.getComputedStyle(e),i=g=>(t[g]||"").split(", "),r=i(`${mn}Delay`),o=i(`${mn}Duration`),l=za(r,o),s=i(`${Ti}Delay`),a=i(`${Ti}Duration`),u=za(s,a);let c=null,f=0,h=0;n===mn?l>0&&(c=mn,f=l,h=o.length):n===Ti?u>0&&(c=Ti,f=u,h=a.length):(f=Math.max(l,u),c=f>0?l>u?mn:Ti:null,h=c?c===mn?o.length:a.length:0);const p=c===mn&&/\b(transform|all)(,|$)/.test(i(`${mn}Property`).toString());return{type:c,timeout:f,propCount:h,hasTransform:p}}function za(e,n){for(;e.length<n.length;)e=e.concat(e);return Math.max(...n.map((t,i)=>ja(t)+ja(e[i])))}function ja(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ua(){return document.body.offsetHeight}function cp(e,n,t){const i=e[Gi];i&&(n=(n?[n,...i]:[...i]).join(" ")),n==null?e.removeAttribute("class"):t?e.setAttribute("class",n):e.className=n}const Hr=Symbol("_vod"),Fc=Symbol("_vsh"),Xn={beforeMount(e,{value:n},{transition:t}){e[Hr]=e.style.display==="none"?"":e.style.display,t&&n?t.beforeEnter(e):Si(e,n)},mounted(e,{value:n},{transition:t}){t&&n&&t.enter(e)},updated(e,{value:n,oldValue:t},{transition:i}){!n!=!t&&(i?n?(i.beforeEnter(e),Si(e,!0),i.enter(e)):i.leave(e,()=>{Si(e,!1)}):Si(e,n))},beforeUnmount(e,{value:n}){Si(e,n)}};function Si(e,n){e.style.display=n?e[Hr]:"none",e[Fc]=!n}const dp=Symbol(""),fp=/(^|;)\s*display\s*:/;function hp(e,n,t){const i=e.style,r=ot(t);let o=!1;if(t&&!r){if(n)if(ot(n))for(const l of n.split(";")){const s=l.slice(0,l.indexOf(":")).trim();t[s]==null&&Or(i,s,"")}else for(const l in n)t[l]==null&&Or(i,l,"");for(const l in t)l==="display"&&(o=!0),Or(i,l,t[l])}else if(r){if(n!==t){const l=i[dp];l&&(t+=";"+l),i.cssText=t,o=fp.test(t)}}else n&&e.removeAttribute("style");Hr in e&&(e[Hr]=o?i.display:"",e[Fc]&&(i.display="none"))}const Wa=/\s*!important$/;function Or(e,n,t){if(Ie(t))t.forEach(i=>Or(e,n,i));else if(t==null&&(t=""),n.startsWith("--"))e.setProperty(n,t);else{const i=pp(e,n);Wa.test(t)?e.setProperty(Jn(i),t.replace(Wa,""),"important"):e[i]=t}}const Ga=["Webkit","Moz","ms"],xo={};function pp(e,n){const t=xo[n];if(t)return t;let i=zt(n);if(i!=="filter"&&i in e)return xo[n]=i;i=Zr(i);for(let r=0;r<Ga.length;r++){const o=Ga[r]+i;if(o in e)return xo[n]=o}return n}const Ka="http://www.w3.org/1999/xlink";function qa(e,n,t,i,r,o=pf(n)){i&&n.startsWith("xlink:")?t==null?e.removeAttributeNS(Ka,n.slice(6,n.length)):e.setAttributeNS(Ka,n,t):t==null||o&&!Pu(t)?e.removeAttribute(n):e.setAttribute(n,o?"":fn(t)?String(t):t)}function Za(e,n,t,i,r){if(n==="innerHTML"||n==="textContent"){t!=null&&(e[n]=n==="innerHTML"?Dc(t):t);return}const o=e.tagName;if(n==="value"&&o!=="PROGRESS"&&!o.includes("-")){const s=o==="OPTION"?e.getAttribute("value")||"":e.value,a=t==null?e.type==="checkbox"?"on":"":String(t);(s!==a||!("_value"in e))&&(e.value=a),t==null&&e.removeAttribute(n),e._value=t;return}let l=!1;if(t===""||t==null){const s=typeof e[n];s==="boolean"?t=Pu(t):t==null&&s==="string"?(t="",l=!0):s==="number"&&(t=0,l=!0)}try{e[n]=t}catch{}l&&e.removeAttribute(r||n)}function ii(e,n,t,i){e.addEventListener(n,t,i)}function gp(e,n,t,i){e.removeEventListener(n,t,i)}const Ya=Symbol("_vei");function mp(e,n,t,i,r=null){const o=e[Ya]||(e[Ya]={}),l=o[n];if(i&&l)l.value=i;else{const[s,a]=vp(n);if(i){const u=o[n]=_p(i,r);ii(e,s,u,a)}else l&&(gp(e,s,l,a),o[n]=void 0)}}const Xa=/(?:Once|Passive|Capture)$/;function vp(e){let n;if(Xa.test(e)){n={};let i;for(;i=e.match(Xa);)e=e.slice(0,e.length-i[0].length),n[i[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Jn(e.slice(2)),n]}let Eo=0;const yp=Promise.resolve(),bp=()=>Eo||(yp.then(()=>Eo=0),Eo=Date.now());function _p(e,n){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;Kt(wp(i,t.value),n,5,[i])};return t.value=e,t.attached=bp(),t}function wp(e,n){if(Ie(n)){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{t.call(e),e._stopped=!0},n.map(i=>r=>!r._stopped&&i&&i(r))}else return n}const Ja=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Tp=(e,n,t,i,r,o)=>{const l=r==="svg";n==="class"?cp(e,i,l):n==="style"?hp(e,t,i):Gr(n)?Es(n)||mp(e,n,t,i,o):(n[0]==="."?(n=n.slice(1),!0):n[0]==="^"?(n=n.slice(1),!1):Sp(e,n,i,l))?(Za(e,n,i),!e.tagName.includes("-")&&(n==="value"||n==="checked"||n==="selected")&&qa(e,n,i,l,o,n!=="value")):e._isVueCE&&(/[A-Z]/.test(n)||!ot(i))?Za(e,zt(n),i,o,n):(n==="true-value"?e._trueValue=i:n==="false-value"&&(e._falseValue=i),qa(e,n,i,l))};function Sp(e,n,t,i){if(i)return!!(n==="innerHTML"||n==="textContent"||n in e&&Ja(n)&&Ae(t));if(n==="spellcheck"||n==="draggable"||n==="translate"||n==="form"||n==="list"&&e.tagName==="INPUT"||n==="type"&&e.tagName==="TEXTAREA")return!1;if(n==="width"||n==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Ja(n)&&ot(t)?!1:n in e}const Qa=e=>{const n=e.props["onUpdate:modelValue"]||!1;return Ie(n)?t=>Cr(n,t):n};function xp(e){e.target.composing=!0}function $a(e){const n=e.target;n.composing&&(n.composing=!1,n.dispatchEvent(new Event("input")))}const Co=Symbol("_assign"),Ep={created(e,{modifiers:{lazy:n,trim:t,number:i}},r){e[Co]=Qa(r);const o=i||r.props&&r.props.type==="number";ii(e,n?"change":"input",l=>{if(l.target.composing)return;let s=e.value;t&&(s=s.trim()),o&&(s=Ho(s)),e[Co](s)}),t&&ii(e,"change",()=>{e.value=e.value.trim()}),n||(ii(e,"compositionstart",xp),ii(e,"compositionend",$a),ii(e,"change",$a))},mounted(e,{value:n}){e.value=n??""},beforeUpdate(e,{value:n,oldValue:t,modifiers:{lazy:i,trim:r,number:o}},l){if(e[Co]=Qa(l),e.composing)return;const s=(o||e.type==="number")&&!/^0\d/.test(e.value)?Ho(e.value):e.value,a=n??"";s!==a&&(document.activeElement===e&&e.type!=="range"&&(i&&n===t||r&&e.value.trim()===a)||(e.value=a))}},Cp=["ctrl","shift","alt","meta"],Pp={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,n)=>Cp.some(t=>e[`${t}Key`]&&!n.includes(t))},Ip=(e,n)=>{const t=e._withMods||(e._withMods={}),i=n.join(".");return t[i]||(t[i]=(r,...o)=>{for(let l=0;l<n.length;l++){const s=Pp[n[l]];if(s&&s(r,n))return}return e(r,...o)})},Op=st({patchProp:Tp},ip);let el;function Ap(){return el||(el=Ph(Op))}const Lp=(...e)=>{const n=Ap().createApp(...e),{mount:t}=n;return n.mount=i=>{const r=kp(i);if(!r)return;const o=n._component;!Ae(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const l=t(r,!1,Rp(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},n};function Rp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function kp(e){return ot(e)?document.querySelector(e):e}function Po(e,n){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Gs(e))||n){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(u){throw u},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,l=!1,s;return{s:function(){t=t.call(e)},n:function(){var u=t.next();return o=u.done,u},e:function(u){l=!0,s=u},f:function(){try{!o&&t.return!=null&&t.return()}finally{if(l)throw s}}}}function Dp(e){return Fp(e)||Np(e)||Gs(e)||Mp()}function Mp(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Np(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fp(e){if(Array.isArray(e))return Qo(e)}function Di(e){"@babel/helpers - typeof";return Di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Di(e)}function Io(e,n){return Vp(e)||Hp(e,n)||Gs(e,n)||Bp()}function Bp(){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 Gs(e,n){if(e){if(typeof e=="string")return Qo(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Qo(e,n)}}function Qo(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function Hp(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var i,r,o,l,s=[],a=!0,u=!1;try{if(o=(t=t.call(e)).next,n!==0)for(;!(a=(i=o.call(t)).done)&&(s.push(i.value),s.length!==n);a=!0);}catch(c){u=!0,r=c}finally{try{if(!a&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw r}}return s}}function Vp(e){if(Array.isArray(e))return e}var ve={innerWidth:function(n){if(n){var t=n.offsetWidth,i=getComputedStyle(n);return t+=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),t}return 0},width:function(n){if(n){var t=n.offsetWidth,i=getComputedStyle(n);return t-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),t}return 0},getWindowScrollTop:function(){var n=document.documentElement;return(window.pageYOffset||n.scrollTop)-(n.clientTop||0)},getWindowScrollLeft:function(){var n=document.documentElement;return(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0)},getOuterWidth:function(n,t){if(n){var i=n.offsetWidth;if(t){var r=getComputedStyle(n);i+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return i}return 0},getOuterHeight:function(n,t){if(n){var i=n.offsetHeight;if(t){var r=getComputedStyle(n);i+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return i}return 0},getClientHeight:function(n,t){if(n){var i=n.clientHeight;if(t){var r=getComputedStyle(n);i+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return i}return 0},getViewport:function(){var n=window,t=document,i=t.documentElement,r=t.getElementsByTagName("body")[0],o=n.innerWidth||i.clientWidth||r.clientWidth,l=n.innerHeight||i.clientHeight||r.clientHeight;return{width:o,height:l}},getOffset:function(n){if(n){var t=n.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index:function(n){if(n)for(var t,i=(t=this.getParentNode(n))===null||t===void 0?void 0:t.childNodes,r=0,o=0;o<i.length;o++){if(i[o]===n)return r;i[o].nodeType===1&&r++}return-1},addMultipleClasses:function(n,t){var i=this;n&&t&&[t].flat().filter(Boolean).forEach(function(r){return r.split(" ").forEach(function(o){return i.addClass(n,o)})})},removeMultipleClasses:function(n,t){var i=this;n&&t&&[t].flat().filter(Boolean).forEach(function(r){return r.split(" ").forEach(function(o){return i.removeClass(n,o)})})},addClass:function(n,t){n&&t&&!this.hasClass(n,t)&&(n.classList?n.classList.add(t):n.className+=" "+t)},removeClass:function(n,t){n&&t&&(n.classList?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:function(n,t){return n?n.classList?n.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(n.className):!1},addStyles:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};n&&Object.entries(t).forEach(function(i){var r=Io(i,2),o=r[0],l=r[1];return n.style[o]=l})},find:function(n,t){return this.isElement(n)?n.querySelectorAll(t):[]},findSingle:function(n,t){return this.isElement(n)?n.querySelector(t):null},createElement:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n){var i=document.createElement(n);this.setAttributes(i,t);for(var r=arguments.length,o=new Array(r>2?r-2:0),l=2;l<r;l++)o[l-2]=arguments[l];return i.append.apply(i,o),i}},setAttribute:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0;this.isElement(n)&&i!==null&&i!==void 0&&n.setAttribute(t,i)},setAttributes:function(n){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.isElement(n)){var r=function o(l,s){var a,u,c=n!=null&&(a=n.$attrs)!==null&&a!==void 0&&a[l]?[n==null||(u=n.$attrs)===null||u===void 0?void 0:u[l]]:[];return[s].flat().reduce(function(f,h){if(h!=null){var p=Di(h);if(p==="string"||p==="number")f.push(h);else if(p==="object"){var g=Array.isArray(h)?o(l,h):Object.entries(h).map(function(y){var T=Io(y,2),v=T[0],E=T[1];return l==="style"&&(E||E===0)?"".concat(v.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(E):E?v:void 0});f=g.length?f.concat(g.filter(function(y){return!!y})):f}}return f},c)};Object.entries(i).forEach(function(o){var l=Io(o,2),s=l[0],a=l[1];if(a!=null){var u=s.match(/^on(.+)/);u?n.addEventListener(u[1].toLowerCase(),a):s==="p-bind"?t.setAttributes(n,a):(a=s==="class"?Dp(new Set(r("class",a))).join(" ").trim():s==="style"?r("style",a).join(";").trim():a,(n.$attrs=n.$attrs||{})&&(n.$attrs[s]=a),n.setAttribute(s,a))}})}},getAttribute:function(n,t){if(this.isElement(n)){var i=n.getAttribute(t);return isNaN(i)?i==="true"||i==="false"?i==="true":i:+i}},isAttributeEquals:function(n,t,i){return this.isElement(n)?this.getAttribute(n,t)===i:!1},isAttributeNotEquals:function(n,t,i){return!this.isAttributeEquals(n,t,i)},getHeight:function(n){if(n){var t=n.offsetHeight,i=getComputedStyle(n);return t-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),t}return 0},getWidth:function(n){if(n){var t=n.offsetWidth,i=getComputedStyle(n);return t-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)+parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),t}return 0},absolutePosition:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(n){var r=n.offsetParent?{width:n.offsetWidth,height:n.offsetHeight}:this.getHiddenElementDimensions(n),o=r.height,l=r.width,s=t.offsetHeight,a=t.offsetWidth,u=t.getBoundingClientRect(),c=this.getWindowScrollTop(),f=this.getWindowScrollLeft(),h=this.getViewport(),p,g,y="top";u.top+s+o>h.height?(p=u.top+c-o,y="bottom",p<0&&(p=c)):p=s+u.top+c,u.left+l>h.width?g=Math.max(0,u.left+f+a-l):g=u.left+f,n.style.top=p+"px",n.style.left=g+"px",n.style.transformOrigin=y,i&&(n.style.marginTop=y==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}},relativePosition:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(n){var r=n.offsetParent?{width:n.offsetWidth,height:n.offsetHeight}:this.getHiddenElementDimensions(n),o=t.offsetHeight,l=t.getBoundingClientRect(),s=this.getViewport(),a,u,c="top";l.top+o+r.height>s.height?(a=-1*r.height,c="bottom",l.top+a<0&&(a=-1*l.top)):a=o,r.width>s.width?u=l.left*-1:l.left+r.width>s.width?u=(l.left+r.width-s.width)*-1:u=0,n.style.top=a+"px",n.style.left=u+"px",n.style.transformOrigin=c,i&&(n.style.marginTop=c==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}},nestedPosition:function(n,t){if(n){var i=n.parentElement,r=this.getOffset(i),o=this.getViewport(),l=n.offsetParent?n.offsetWidth:this.getHiddenElementOuterWidth(n),s=this.getOuterWidth(i.children[0]),a;parseInt(r.left,10)+s+l>o.width-this.calculateScrollbarWidth()?parseInt(r.left,10)<l?t%2===1?a=parseInt(r.left,10)?"-"+parseInt(r.left,10)+"px":"100%":t%2===0&&(a=o.width-l-this.calculateScrollbarWidth()+"px"):a="-100%":a="100%",n.style.top="0px",n.style.left=a}},getParentNode:function(n){var t=n==null?void 0:n.parentNode;return t&&t instanceof ShadowRoot&&t.host&&(t=t.host),t},getParents:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=this.getParentNode(n);return i===null?t:this.getParents(i,t.concat([i]))},getScrollableParents:function(n){var t=[];if(n){var i=this.getParents(n),r=/(auto|scroll)/,o=function(T){try{var v=window.getComputedStyle(T,null);return r.test(v.getPropertyValue("overflow"))||r.test(v.getPropertyValue("overflowX"))||r.test(v.getPropertyValue("overflowY"))}catch{return!1}},l=Po(i),s;try{for(l.s();!(s=l.n()).done;){var a=s.value,u=a.nodeType===1&&a.dataset.scrollselectors;if(u){var c=u.split(","),f=Po(c),h;try{for(f.s();!(h=f.n()).done;){var p=h.value,g=this.findSingle(a,p);g&&o(g)&&t.push(g)}}catch(y){f.e(y)}finally{f.f()}}a.nodeType!==9&&o(a)&&t.push(a)}}catch(y){l.e(y)}finally{l.f()}}return t},getHiddenElementOuterHeight:function(n){if(n){n.style.visibility="hidden",n.style.display="block";var t=n.offsetHeight;return n.style.display="none",n.style.visibility="visible",t}return 0},getHiddenElementOuterWidth:function(n){if(n){n.style.visibility="hidden",n.style.display="block";var t=n.offsetWidth;return n.style.display="none",n.style.visibility="visible",t}return 0},getHiddenElementDimensions:function(n){if(n){var t={};return n.style.visibility="hidden",n.style.display="block",t.width=n.offsetWidth,t.height=n.offsetHeight,n.style.display="none",n.style.visibility="visible",t}return 0},fadeIn:function(n,t){if(n){n.style.opacity=0;var i=+new Date,r=0,o=function l(){r=+n.style.opacity+(new Date().getTime()-i)/t,n.style.opacity=r,i=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(l)||setTimeout(l,16))};o()}},fadeOut:function(n,t){if(n)var i=1,r=50,o=t,l=r/o,s=setInterval(function(){i-=l,i<=0&&(i=0,clearInterval(s)),n.style.opacity=i},r)},getUserAgent:function(){return navigator.userAgent},appendChild:function(n,t){if(this.isElement(t))t.appendChild(n);else if(t.el&&t.elElement)t.elElement.appendChild(n);else throw new Error("Cannot append "+t+" to "+n)},isElement:function(n){return(typeof HTMLElement>"u"?"undefined":Di(HTMLElement))==="object"?n instanceof HTMLElement:n&&Di(n)==="object"&&n!==null&&n.nodeType===1&&typeof n.nodeName=="string"},scrollInView:function(n,t){var i=getComputedStyle(n).getPropertyValue("borderTopWidth"),r=i?parseFloat(i):0,o=getComputedStyle(n).getPropertyValue("paddingTop"),l=o?parseFloat(o):0,s=n.getBoundingClientRect(),a=t.getBoundingClientRect(),u=a.top+document.body.scrollTop-(s.top+document.body.scrollTop)-r-l,c=n.scrollTop,f=n.clientHeight,h=this.getOuterHeight(t);u<0?n.scrollTop=c+u:u+h>f&&(n.scrollTop=c+u-f+h)},clearSelection:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}},getSelection:function(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null},calculateScrollbarWidth:function(){if(this.calculatedScrollbarWidth!=null)return this.calculatedScrollbarWidth;var n=document.createElement("div");this.addStyles(n,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(n);var t=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=t,t},calculateBodyScrollbarWidth:function(){return window.innerWidth-document.documentElement.offsetWidth},getBrowser:function(){if(!this.browser){var n=this.resolveUserAgent();this.browser={},n.browser&&(this.browser[n.browser]=!0,this.browser.version=n.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser},resolveUserAgent:function(){var n=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(n)||/(webkit)[ ]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[];return{browser:t[1]||"",version:t[2]||"0"}},isVisible:function(n){return n&&n.offsetParent!=null},invokeElementMethod:function(n,t,i){n[t].apply(n,i)},isExist:function(n){return!!(n!==null&&typeof n<"u"&&n.nodeName&&this.getParentNode(n))},isClient:function(){return!!(typeof window<"u"&&window.document&&window.document.createElement)},focus:function(n,t){n&&document.activeElement!==n&&n.focus(t)},isFocusableElement:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return this.isElement(n)?n.matches('button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(t,`,
                [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t,`,
                input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t,`,
                select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t,`,
                textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t,`,
                [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t,`,
                [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t)):!1},getFocusableElements:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=this.find(n,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(t,`,
                [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t,`,
                input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t,`,
                select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t,`,
                textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t,`,
                [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t,`,
                [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(t)),r=[],o=Po(i),l;try{for(o.s();!(l=o.n()).done;){var s=l.value;getComputedStyle(s).display!="none"&&getComputedStyle(s).visibility!="hidden"&&r.push(s)}}catch(a){o.e(a)}finally{o.f()}return r},getFirstFocusableElement:function(n,t){var i=this.getFocusableElements(n,t);return i.length>0?i[0]:null},getLastFocusableElement:function(n,t){var i=this.getFocusableElements(n,t);return i.length>0?i[i.length-1]:null},getNextFocusableElement:function(n,t,i){var r=this.getFocusableElements(n,i),o=r.length>0?r.findIndex(function(s){return s===t}):-1,l=o>-1&&r.length>=o+1?o+1:-1;return l>-1?r[l]:null},getPreviousElementSibling:function(n,t){for(var i=n.previousElementSibling;i;){if(i.matches(t))return i;i=i.previousElementSibling}return null},getNextElementSibling:function(n,t){for(var i=n.nextElementSibling;i;){if(i.matches(t))return i;i=i.nextElementSibling}return null},isClickable:function(n){if(n){var t=n.nodeName,i=n.parentElement&&n.parentElement.nodeName;return t==="INPUT"||t==="TEXTAREA"||t==="BUTTON"||t==="A"||i==="INPUT"||i==="TEXTAREA"||i==="BUTTON"||i==="A"||!!n.closest(".p-button, .p-checkbox, .p-radiobutton")}return!1},applyStyle:function(n,t){if(typeof t=="string")n.style.cssText=t;else for(var i in t)n.style[i]=t[i]},isIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream},isAndroid:function(){return/(android)/i.test(navigator.userAgent)},isTouchDevice:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},hasCSSAnimation:function(n){if(n){var t=getComputedStyle(n),i=parseFloat(t.getPropertyValue("animation-duration")||"0");return i>0}return!1},hasCSSTransition:function(n){if(n){var t=getComputedStyle(n),i=parseFloat(t.getPropertyValue("transition-duration")||"0");return i>0}return!1},exportCSV:function(n,t){var i=new Blob([n],{type:"application/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(i,t+".csv");else{var r=document.createElement("a");r.download!==void 0?(r.setAttribute("href",URL.createObjectURL(i)),r.setAttribute("download",t+".csv"),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)):(n="data:text/csv;charset=utf-8,"+n,window.open(encodeURI(n)))}},blockBodyScroll:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"p-overflow-hidden";document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,n)},unblockBodyScroll:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"p-overflow-hidden";document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,n)}};function tl(e,n){return Up(e)||jp(e,n)||Ks(e,n)||zp()}function zp(){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 jp(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var i,r,o,l,s=[],a=!0,u=!1;try{if(o=(t=t.call(e)).next,n!==0)for(;!(a=(i=o.call(t)).done)&&(s.push(i.value),s.length!==n);a=!0);}catch(c){u=!0,r=c}finally{try{if(!a&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw r}}return s}}function Up(e){if(Array.isArray(e))return e}function nl(e){return Kp(e)||Gp(e)||Ks(e)||Wp()}function Wp(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gp(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kp(e){if(Array.isArray(e))return $o(e)}function Oo(e,n){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Ks(e))||n){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(u){throw u},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,l=!1,s;return{s:function(){t=t.call(e)},n:function(){var u=t.next();return o=u.done,u},e:function(u){l=!0,s=u},f:function(){try{!o&&t.return!=null&&t.return()}finally{if(l)throw s}}}}function Ks(e,n){if(e){if(typeof e=="string")return $o(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return $o(e,n)}}function $o(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function Mi(e){"@babel/helpers - typeof";return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mi(e)}var Oe={equals:function(n,t,i){return i?this.resolveFieldData(n,i)===this.resolveFieldData(t,i):this.deepEquals(n,t)},deepEquals:function(n,t){if(n===t)return!0;if(n&&t&&Mi(n)=="object"&&Mi(t)=="object"){var i=Array.isArray(n),r=Array.isArray(t),o,l,s;if(i&&r){if(l=n.length,l!=t.length)return!1;for(o=l;o--!==0;)if(!this.deepEquals(n[o],t[o]))return!1;return!0}if(i!=r)return!1;var a=n instanceof Date,u=t instanceof Date;if(a!=u)return!1;if(a&&u)return n.getTime()==t.getTime();var c=n instanceof RegExp,f=t instanceof RegExp;if(c!=f)return!1;if(c&&f)return n.toString()==t.toString();var h=Object.keys(n);if(l=h.length,l!==Object.keys(t).length)return!1;for(o=l;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,h[o]))return!1;for(o=l;o--!==0;)if(s=h[o],!this.deepEquals(n[s],t[s]))return!1;return!0}return n!==n&&t!==t},resolveFieldData:function(n,t){if(!n||!t)return null;try{var i=n[t];if(this.isNotEmpty(i))return i}catch{}if(Object.keys(n).length){if(this.isFunction(t))return t(n);if(t.indexOf(".")===-1)return n[t];for(var r=t.split("."),o=n,l=0,s=r.length;l<s;++l){if(o==null)return null;o=o[r[l]]}return o}return null},getItemValue:function(n){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return this.isFunction(n)?n.apply(void 0,i):n},filter:function(n,t,i){var r=[];if(n){var o=Oo(n),l;try{for(o.s();!(l=o.n()).done;){var s=l.value,a=Oo(t),u;try{for(a.s();!(u=a.n()).done;){var c=u.value;if(String(this.resolveFieldData(s,c)).toLowerCase().indexOf(i.toLowerCase())>-1){r.push(s);break}}}catch(f){a.e(f)}finally{a.f()}}}catch(f){o.e(f)}finally{o.f()}}return r},reorderArray:function(n,t,i){n&&t!==i&&(i>=n.length&&(i%=n.length,t%=n.length),n.splice(i,0,n.splice(t,1)[0]))},findIndexInList:function(n,t){var i=-1;if(t){for(var r=0;r<t.length;r++)if(t[r]===n){i=r;break}}return i},contains:function(n,t){if(n!=null&&t&&t.length){var i=Oo(t),r;try{for(i.s();!(r=i.n()).done;){var o=r.value;if(this.equals(n,o))return!0}}catch(l){i.e(l)}finally{i.f()}}return!1},insertIntoOrderedArray:function(n,t,i,r){if(i.length>0){for(var o=!1,l=0;l<i.length;l++){var s=this.findIndexInList(i[l],r);if(s>t){i.splice(l,0,n),o=!0;break}}o||i.push(n)}else i.push(n)},removeAccents:function(n){return n&&n.search(/[\xC0-\xFF]/g)>-1&&(n=n.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),n},getVNodeProp:function(n,t){if(n){var i=n.props;if(i){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=Object.prototype.hasOwnProperty.call(i,r)?r:t;return n.type.extends.props[t].type===Boolean&&i[o]===""?!0:i[o]}}return null},toFlatCase:function(n){return this.isString(n)?n.replace(/(-|_)/g,"").toLowerCase():n},toKebabCase:function(n){return this.isString(n)?n.replace(/(_)/g,"-").replace(/[A-Z]/g,function(t,i){return i===0?t:"-"+t.toLowerCase()}).toLowerCase():n},toCapitalCase:function(n){return this.isString(n,{empty:!1})?n[0].toUpperCase()+n.slice(1):n},isEmpty:function(n){return n==null||n===""||Array.isArray(n)&&n.length===0||!(n instanceof Date)&&Mi(n)==="object"&&Object.keys(n).length===0},isNotEmpty:function(n){return!this.isEmpty(n)},isFunction:function(n){return!!(n&&n.constructor&&n.call&&n.apply)},isObject:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n instanceof Object&&n.constructor===Object&&(t||Object.keys(n).length!==0)},isDate:function(n){return n instanceof Date&&n.constructor===Date},isArray:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Array.isArray(n)&&(t||n.length!==0)},isString:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return typeof n=="string"&&(t||n!=="")},isPrintableCharacter:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.isNotEmpty(n)&&n.length===1&&n.match(/\S| /)},findLast:function(n,t){var i;if(this.isNotEmpty(n))try{i=n.findLast(t)}catch{i=nl(n).reverse().find(t)}return i},findLastIndex:function(n,t){var i=-1;if(this.isNotEmpty(n))try{i=n.findLastIndex(t)}catch{i=n.lastIndexOf(nl(n).reverse().find(t))}return i},sort:function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:1,l=this.compare(n,t,r,i),s=i;return(this.isEmpty(n)||this.isEmpty(t))&&(s=o===1?i:o),s*l},compare:function(n,t,i){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=-1,l=this.isEmpty(n),s=this.isEmpty(t);return l&&s?o=0:l?o=r:s?o=-r:typeof n=="string"&&typeof t=="string"?o=i(n,t):o=n<t?-1:n>t?1:0,o},localeComparator:function(){return new Intl.Collator(void 0,{numeric:!0}).compare},nestedKeys:function(){var n=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return Object.entries(t).reduce(function(r,o){var l=tl(o,2),s=l[0],a=l[1],u=i?"".concat(i,".").concat(s):s;return n.isObject(a)?r=r.concat(n.nestedKeys(a,u)):r.push(u),r},[])},stringify:function(n){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=" ".repeat(r),l=" ".repeat(r+i);return this.isArray(n)?"["+n.map(function(s){return t.stringify(s,i,r+i)}).join(", ")+"]":this.isDate(n)?n.toISOString():this.isFunction(n)?n.toString():this.isObject(n)?`{
`+Object.entries(n).map(function(s){var a=tl(s,2),u=a[0],c=a[1];return"".concat(l).concat(u,": ").concat(t.stringify(c,i,r+i))}).join(`,
`)+`
`.concat(o)+"}":JSON.stringify(n)}},il=0;function Ni(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"pv_id_";return il++,"".concat(e).concat(il)}function qp(e){return Jp(e)||Xp(e)||Yp(e)||Zp()}function Zp(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yp(e,n){if(e){if(typeof e=="string")return es(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return es(e,n)}}function Xp(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jp(e){if(Array.isArray(e))return es(e)}function es(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function Qp(){var e=[],n=function(s,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:999,c=r(s,a,u),f=c.value+(c.key===s?0:u)+1;return e.push({key:s,value:f}),f},t=function(s){e=e.filter(function(a){return a.value!==s})},i=function(s,a){return r(s,a).value},r=function(s,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return qp(e).reverse().find(function(c){return!0})||{key:s,value:u}},o=function(s){return s&&parseInt(s.style.zIndex,10)||0};return{get:o,set:function(s,a,u){a&&(a.style.zIndex=String(n(s,!0,u)))},clear:function(s){s&&(t(o(s)),s.style.zIndex="")},getCurrent:function(s){return i(s,!0)}}}var Ao=Qp(),_t={STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter"};function Ki(e){"@babel/helpers - typeof";return Ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ki(e)}function rl(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Lo(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?rl(Object(t),!0).forEach(function(i){$p(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rl(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function $p(e,n,t){return n=eg(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function eg(e){var n=tg(e,"string");return Ki(n)=="symbol"?n:String(n)}function tg(e,n){if(Ki(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(Ki(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var ol={ripple:!1,inputStyle:null,locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,showMonthAfterYear:!1,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"Page {page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[_t.STARTS_WITH,_t.CONTAINS,_t.NOT_CONTAINS,_t.ENDS_WITH,_t.EQUALS,_t.NOT_EQUALS],numeric:[_t.EQUALS,_t.NOT_EQUALS,_t.LESS_THAN,_t.LESS_THAN_OR_EQUAL_TO,_t.GREATER_THAN,_t.GREATER_THAN_OR_EQUAL_TO],date:[_t.DATE_IS,_t.DATE_IS_NOT,_t.DATE_BEFORE,_t.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100},pt:void 0,ptOptions:{mergeSections:!0,mergeProps:!1},unstyled:!1,csp:{nonce:void 0}},ng=Symbol();function ig(e,n,t,i){if(e!==n){var r=document.getElementById(t),o=r.cloneNode(!0),l=r.getAttribute("href").replace(e,n);o.setAttribute("id",t+"-clone"),o.setAttribute("href",l),o.addEventListener("load",function(){r.remove(),o.setAttribute("id",t),i&&i()}),r.parentNode&&r.parentNode.insertBefore(o,r.nextSibling)}}var rg={install:function(n,t){var i=t?Lo(Lo({},ol),t):Lo({},ol),r={config:mi(i),changeTheme:ig};n.config.globalProperties.$primevue=r,n.provide(ng,r)}},og=!1;/*!
 * pinia v2.1.7
 * (c) 2023 Eduardo San Martin Morote
 * @license MIT
 */let Bc;const so=e=>Bc=e,Hc=Symbol();function ts(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Fi;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Fi||(Fi={}));function sg(){const e=Is(!0),n=e.run(()=>de({}));let t=[],i=[];const r=Ns({install(o){so(r),r._a=o,o.provide(Hc,r),o.config.globalProperties.$pinia=r,i.forEach(l=>t.push(l)),i=[]},use(o){return!this._a&&!og?i.push(o):t.push(o),this},_p:t,_a:null,_e:e,_s:new Map,state:n});return r}const Vc=()=>{};function sl(e,n,t,i=Vc){e.push(n);const r=()=>{const o=e.indexOf(n);o>-1&&(e.splice(o,1),i())};return!t&&Os()&&Lu(r),r}function ti(e,...n){e.slice().forEach(t=>{t(...n)})}const ag=e=>e();function ns(e,n){e instanceof Map&&n instanceof Map&&n.forEach((t,i)=>e.set(i,t)),e instanceof Set&&n instanceof Set&&n.forEach(e.add,e);for(const t in n){if(!n.hasOwnProperty(t))continue;const i=n[t],r=e[t];ts(r)&&ts(i)&&e.hasOwnProperty(t)&&!nt(i)&&!Pn(i)?e[t]=ns(r,i):e[t]=i}return e}const lg=Symbol();function ug(e){return!ts(e)||!e.hasOwnProperty(lg)}const{assign:_n}=Object;function cg(e){return!!(nt(e)&&e.effect)}function dg(e,n,t,i){const{state:r,actions:o,getters:l}=n,s=t.state.value[e];let a;function u(){s||(t.state.value[e]=r?r():{});const c=Hf(t.state.value[e]);return _n(c,o,Object.keys(l||{}).reduce((f,h)=>(f[h]=Ns(J(()=>{so(t);const p=t._s.get(e);return l[h].call(p,p)})),f),{}))}return a=zc(e,u,n,t,i,!0),a}function zc(e,n,t={},i,r,o){let l;const s=_n({actions:{}},t),a={deep:!0};let u,c,f=[],h=[],p;const g=i.state.value[e];!o&&!g&&(i.state.value[e]={}),de({});let y;function T(B){let R;u=c=!1,typeof B=="function"?(B(i.state.value[e]),R={type:Fi.patchFunction,storeId:e,events:p}):(ns(i.state.value[e],B),R={type:Fi.patchObject,payload:B,storeId:e,events:p});const V=y=Symbol();Qn().then(()=>{y===V&&(u=!0)}),c=!0,ti(f,R,i.state.value[e])}const v=o?function(){const{state:R}=t,V=R?R():{};this.$patch($=>{_n($,V)})}:Vc;function E(){l.stop(),f=[],h=[],i._s.delete(e)}function O(B,R){return function(){so(i);const V=Array.from(arguments),$=[],N=[];function re(oe){$.push(oe)}function Z(oe){N.push(oe)}ti(h,{args:V,name:B,store:D,after:re,onError:Z});let le;try{le=R.apply(this&&this.$id===e?this:D,V)}catch(oe){throw ti(N,oe),oe}return le instanceof Promise?le.then(oe=>(ti($,oe),oe)).catch(oe=>(ti(N,oe),Promise.reject(oe))):(ti($,le),le)}}const P={_p:i,$id:e,$onAction:sl.bind(null,h),$patch:T,$reset:v,$subscribe(B,R={}){const V=sl(f,B,R.detached,()=>$()),$=l.run(()=>Ve(()=>i.state.value[e],N=>{(R.flush==="sync"?c:u)&&B({storeId:e,type:Fi.direct,events:p},N)},_n({},a,R)));return V},$dispose:E},D=mi(P);i._s.set(e,D);const M=(i._a&&i._a.runWithContext||ag)(()=>i._e.run(()=>(l=Is()).run(n)));for(const B in M){const R=M[B];if(nt(R)&&!cg(R)||Pn(R))o||(g&&ug(R)&&(nt(R)?R.value=g[B]:ns(R,g[B])),i.state.value[e][B]=R);else if(typeof R=="function"){const V=O(B,R);M[B]=V,s.actions[B]=R}}return _n(D,M),_n(He(D),M),Object.defineProperty(D,"$state",{get:()=>i.state.value[e],set:B=>{T(R=>{_n(R,B)})}}),i._p.forEach(B=>{_n(D,l.run(()=>B({store:D,app:i._a,pinia:i,options:s})))}),g&&o&&t.hydrate&&t.hydrate(D.$state,g),u=!0,c=!0,D}function qs(e,n,t){let i,r;const o=typeof n=="function";typeof e=="string"?(i=e,r=o?t:n):(r=e,i=e.id);function l(s,a){const u=_h();return s=s||(u?qn(Hc,null):null),s&&so(s),s=Bc,s._s.has(i)||(o?zc(i,n,r,s):dg(i,r,s)),s._s.get(i)}return l.$id=i,l}/*!
  * shared v9.10.2
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */const Vr=typeof window<"u",kn=(e,n=!1)=>n?Symbol.for(e):Symbol(e),fg=(e,n,t)=>hg({l:e,k:n,s:t}),hg=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),lt=e=>typeof e=="number"&&isFinite(e),pg=e=>Uc(e)==="[object Date]",On=e=>Uc(e)==="[object RegExp]",ao=e=>Le(e)&&Object.keys(e).length===0,yt=Object.assign;let al;const cn=()=>al||(al=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ll(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const gg=Object.prototype.hasOwnProperty;function zr(e,n){return gg.call(e,n)}const $e=Array.isArray,Ye=e=>typeof e=="function",fe=e=>typeof e=="string",Me=e=>typeof e=="boolean",Ue=e=>e!==null&&typeof e=="object",mg=e=>Ue(e)&&Ye(e.then)&&Ye(e.catch),jc=Object.prototype.toString,Uc=e=>jc.call(e),Le=e=>{if(!Ue(e))return!1;const n=Object.getPrototypeOf(e);return n===null||n.constructor===Object},vg=e=>e==null?"":$e(e)||Le(e)&&e.toString===jc?JSON.stringify(e,null,2):String(e);function yg(e,n=""){return e.reduce((t,i,r)=>r===0?t+i:t+n+i,"")}function Zs(e){let n=e;return()=>++n}function bg(e,n){typeof console<"u"&&(console.warn("[intlify] "+e),n&&console.warn(n.stack))}const _r=e=>!Ue(e)||$e(e);function Ar(e,n){if(_r(e)||_r(n))throw new Error("Invalid value");const t=[{src:e,des:n}];for(;t.length;){const{src:i,des:r}=t.pop();Object.keys(i).forEach(o=>{_r(i[o])||_r(r[o])?r[o]=i[o]:t.push({src:i[o],des:r[o]})})}}/*!
  * message-compiler v9.10.2
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */function _g(e,n,t){return{line:e,column:n,offset:t}}function is(e,n,t){return{start:e,end:n}}const wg=/\{([0-9a-zA-Z]+)\}/g;function Tg(e,...n){return n.length===1&&Sg(n[0])&&(n=n[0]),(!n||!n.hasOwnProperty)&&(n={}),e.replace(wg,(t,i)=>n.hasOwnProperty(i)?n[i]:"")}const Wc=Object.assign,ul=e=>typeof e=="string",Sg=e=>e!==null&&typeof e=="object";function Gc(e,n=""){return e.reduce((t,i,r)=>r===0?t+i:t+n+i,"")}const Pe={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},xg={[Pe.EXPECTED_TOKEN]:"Expected token: '{0}'",[Pe.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[Pe.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[Pe.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[Pe.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[Pe.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[Pe.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[Pe.EMPTY_PLACEHOLDER]:"Empty placeholder",[Pe.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[Pe.INVALID_LINKED_FORMAT]:"Invalid linked format",[Pe.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[Pe.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[Pe.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[Pe.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[Pe.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[Pe.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function vi(e,n,t={}){const{domain:i,messages:r,args:o}=t,l=Tg((r||xg)[e]||"",...o||[]),s=new SyntaxError(String(l));return s.code=e,n&&(s.location=n),s.domain=i,s}function Eg(e){throw e}const on=" ",Cg="\r",Ct=`
`,Pg="\u2028",Ig="\u2029";function Og(e){const n=e;let t=0,i=1,r=1,o=0;const l=M=>n[M]===Cg&&n[M+1]===Ct,s=M=>n[M]===Ct,a=M=>n[M]===Ig,u=M=>n[M]===Pg,c=M=>l(M)||s(M)||a(M)||u(M),f=()=>t,h=()=>i,p=()=>r,g=()=>o,y=M=>l(M)||a(M)||u(M)?Ct:n[M],T=()=>y(t),v=()=>y(t+o);function E(){return o=0,c(t)&&(i++,r=0),l(t)&&t++,t++,r++,n[t]}function O(){return l(t+o)&&o++,o++,n[t+o]}function P(){t=0,i=1,r=1,o=0}function D(M=0){o=M}function H(){const M=t+o;for(;M!==t;)E();o=0}return{index:f,line:h,column:p,peekOffset:g,charAt:y,currentChar:T,currentPeek:v,next:E,peek:O,reset:P,resetPeek:D,skipToPeek:H}}const vn=void 0,Ag=".",cl="'",Lg="tokenizer";function Rg(e,n={}){const t=n.location!==!1,i=Og(e),r=()=>i.index(),o=()=>_g(i.line(),i.column(),i.index()),l=o(),s=r(),a={currentType:14,offset:s,startLoc:l,endLoc:l,lastType:14,lastOffset:s,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},u=()=>a,{onError:c}=n;function f(b,d,m,...x){const I=u();if(d.column+=m,d.offset+=m,c){const A=t?is(I.startLoc,d):null,U=vi(b,A,{domain:Lg,args:x});c(U)}}function h(b,d,m){b.endLoc=o(),b.currentType=d;const x={type:d};return t&&(x.loc=is(b.startLoc,b.endLoc)),m!=null&&(x.value=m),x}const p=b=>h(b,14);function g(b,d){return b.currentChar()===d?(b.next(),d):(f(Pe.EXPECTED_TOKEN,o(),0,d),"")}function y(b){let d="";for(;b.currentPeek()===on||b.currentPeek()===Ct;)d+=b.currentPeek(),b.peek();return d}function T(b){const d=y(b);return b.skipToPeek(),d}function v(b){if(b===vn)return!1;const d=b.charCodeAt(0);return d>=97&&d<=122||d>=65&&d<=90||d===95}function E(b){if(b===vn)return!1;const d=b.charCodeAt(0);return d>=48&&d<=57}function O(b,d){const{currentType:m}=d;if(m!==2)return!1;y(b);const x=v(b.currentPeek());return b.resetPeek(),x}function P(b,d){const{currentType:m}=d;if(m!==2)return!1;y(b);const x=b.currentPeek()==="-"?b.peek():b.currentPeek(),I=E(x);return b.resetPeek(),I}function D(b,d){const{currentType:m}=d;if(m!==2)return!1;y(b);const x=b.currentPeek()===cl;return b.resetPeek(),x}function H(b,d){const{currentType:m}=d;if(m!==8)return!1;y(b);const x=b.currentPeek()===".";return b.resetPeek(),x}function M(b,d){const{currentType:m}=d;if(m!==9)return!1;y(b);const x=v(b.currentPeek());return b.resetPeek(),x}function B(b,d){const{currentType:m}=d;if(!(m===8||m===12))return!1;y(b);const x=b.currentPeek()===":";return b.resetPeek(),x}function R(b,d){const{currentType:m}=d;if(m!==10)return!1;const x=()=>{const A=b.currentPeek();return A==="{"?v(b.peek()):A==="@"||A==="%"||A==="|"||A===":"||A==="."||A===on||!A?!1:A===Ct?(b.peek(),x()):v(A)},I=x();return b.resetPeek(),I}function V(b){y(b);const d=b.currentPeek()==="|";return b.resetPeek(),d}function $(b){const d=y(b),m=b.currentPeek()==="%"&&b.peek()==="{";return b.resetPeek(),{isModulo:m,hasSpace:d.length>0}}function N(b,d=!0){const m=(I=!1,A="",U=!1)=>{const z=b.currentPeek();return z==="{"?A==="%"?!1:I:z==="@"||!z?A==="%"?!0:I:z==="%"?(b.peek(),m(I,"%",!0)):z==="|"?A==="%"||U?!0:!(A===on||A===Ct):z===on?(b.peek(),m(!0,on,U)):z===Ct?(b.peek(),m(!0,Ct,U)):!0},x=m();return d&&b.resetPeek(),x}function re(b,d){const m=b.currentChar();return m===vn?vn:d(m)?(b.next(),m):null}function Z(b){return re(b,m=>{const x=m.charCodeAt(0);return x>=97&&x<=122||x>=65&&x<=90||x>=48&&x<=57||x===95||x===36})}function le(b){return re(b,m=>{const x=m.charCodeAt(0);return x>=48&&x<=57})}function oe(b){return re(b,m=>{const x=m.charCodeAt(0);return x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102})}function pe(b){let d="",m="";for(;d=le(b);)m+=d;return m}function _e(b){T(b);const d=b.currentChar();return d!=="%"&&f(Pe.EXPECTED_TOKEN,o(),0,d),b.next(),"%"}function Fe(b){let d="";for(;;){const m=b.currentChar();if(m==="{"||m==="}"||m==="@"||m==="|"||!m)break;if(m==="%")if(N(b))d+=m,b.next();else break;else if(m===on||m===Ct)if(N(b))d+=m,b.next();else{if(V(b))break;d+=m,b.next()}else d+=m,b.next()}return d}function ge(b){T(b);let d="",m="";for(;d=Z(b);)m+=d;return b.currentChar()===vn&&f(Pe.UNTERMINATED_CLOSING_BRACE,o(),0),m}function Ne(b){T(b);let d="";return b.currentChar()==="-"?(b.next(),d+=`-${pe(b)}`):d+=pe(b),b.currentChar()===vn&&f(Pe.UNTERMINATED_CLOSING_BRACE,o(),0),d}function We(b){T(b),g(b,"'");let d="",m="";const x=A=>A!==cl&&A!==Ct;for(;d=re(b,x);)d==="\\"?m+=it(b):m+=d;const I=b.currentChar();return I===Ct||I===vn?(f(Pe.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),I===Ct&&(b.next(),g(b,"'")),m):(g(b,"'"),m)}function it(b){const d=b.currentChar();switch(d){case"\\":case"'":return b.next(),`\\${d}`;case"u":return tt(b,d,4);case"U":return tt(b,d,6);default:return f(Pe.UNKNOWN_ESCAPE_SEQUENCE,o(),0,d),""}}function tt(b,d,m){g(b,d);let x="";for(let I=0;I<m;I++){const A=oe(b);if(!A){f(Pe.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${d}${x}${b.currentChar()}`);break}x+=A}return`\\${d}${x}`}function te(b){T(b);let d="",m="";const x=I=>I!=="{"&&I!=="}"&&I!==on&&I!==Ct;for(;d=re(b,x);)m+=d;return m}function F(b){let d="",m="";for(;d=Z(b);)m+=d;return m}function q(b){const d=(m=!1,x)=>{const I=b.currentChar();return I==="{"||I==="%"||I==="@"||I==="|"||I==="("||I===")"||!I||I===on?x:I===Ct||I===Ag?(x+=I,b.next(),d(m,x)):(x+=I,b.next(),d(!0,x))};return d(!1,"")}function K(b){T(b);const d=g(b,"|");return T(b),d}function se(b,d){let m=null;switch(b.currentChar()){case"{":return d.braceNest>=1&&f(Pe.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),b.next(),m=h(d,2,"{"),T(b),d.braceNest++,m;case"}":return d.braceNest>0&&d.currentType===2&&f(Pe.EMPTY_PLACEHOLDER,o(),0),b.next(),m=h(d,3,"}"),d.braceNest--,d.braceNest>0&&T(b),d.inLinked&&d.braceNest===0&&(d.inLinked=!1),m;case"@":return d.braceNest>0&&f(Pe.UNTERMINATED_CLOSING_BRACE,o(),0),m=ce(b,d)||p(d),d.braceNest=0,m;default:{let I=!0,A=!0,U=!0;if(V(b))return d.braceNest>0&&f(Pe.UNTERMINATED_CLOSING_BRACE,o(),0),m=h(d,1,K(b)),d.braceNest=0,d.inLinked=!1,m;if(d.braceNest>0&&(d.currentType===5||d.currentType===6||d.currentType===7))return f(Pe.UNTERMINATED_CLOSING_BRACE,o(),0),d.braceNest=0,me(b,d);if(I=O(b,d))return m=h(d,5,ge(b)),T(b),m;if(A=P(b,d))return m=h(d,6,Ne(b)),T(b),m;if(U=D(b,d))return m=h(d,7,We(b)),T(b),m;if(!I&&!A&&!U)return m=h(d,13,te(b)),f(Pe.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,m.value),T(b),m;break}}return m}function ce(b,d){const{currentType:m}=d;let x=null;const I=b.currentChar();switch((m===8||m===9||m===12||m===10)&&(I===Ct||I===on)&&f(Pe.INVALID_LINKED_FORMAT,o(),0),I){case"@":return b.next(),x=h(d,8,"@"),d.inLinked=!0,x;case".":return T(b),b.next(),h(d,9,".");case":":return T(b),b.next(),h(d,10,":");default:return V(b)?(x=h(d,1,K(b)),d.braceNest=0,d.inLinked=!1,x):H(b,d)||B(b,d)?(T(b),ce(b,d)):M(b,d)?(T(b),h(d,12,F(b))):R(b,d)?(T(b),I==="{"?se(b,d)||x:h(d,11,q(b))):(m===8&&f(Pe.INVALID_LINKED_FORMAT,o(),0),d.braceNest=0,d.inLinked=!1,me(b,d))}}function me(b,d){let m={type:14};if(d.braceNest>0)return se(b,d)||p(d);if(d.inLinked)return ce(b,d)||p(d);switch(b.currentChar()){case"{":return se(b,d)||p(d);case"}":return f(Pe.UNBALANCED_CLOSING_BRACE,o(),0),b.next(),h(d,3,"}");case"@":return ce(b,d)||p(d);default:{if(V(b))return m=h(d,1,K(b)),d.braceNest=0,d.inLinked=!1,m;const{isModulo:I,hasSpace:A}=$(b);if(I)return A?h(d,0,Fe(b)):h(d,4,_e(b));if(N(b))return h(d,0,Fe(b));break}}return m}function Ce(){const{currentType:b,offset:d,startLoc:m,endLoc:x}=a;return a.lastType=b,a.lastOffset=d,a.lastStartLoc=m,a.lastEndLoc=x,a.offset=r(),a.startLoc=o(),i.currentChar()===vn?h(a,14):me(i,a)}return{nextToken:Ce,currentOffset:r,currentPosition:o,context:u}}const kg="parser",Dg=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Mg(e,n,t){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(n||t,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function Ng(e={}){const n=e.location!==!1,{onError:t}=e;function i(v,E,O,P,...D){const H=v.currentPosition();if(H.offset+=P,H.column+=P,t){const M=n?is(O,H):null,B=vi(E,M,{domain:kg,args:D});t(B)}}function r(v,E,O){const P={type:v};return n&&(P.start=E,P.end=E,P.loc={start:O,end:O}),P}function o(v,E,O,P){n&&(v.end=E,v.loc&&(v.loc.end=O))}function l(v,E){const O=v.context(),P=r(3,O.offset,O.startLoc);return P.value=E,o(P,v.currentOffset(),v.currentPosition()),P}function s(v,E){const O=v.context(),{lastOffset:P,lastStartLoc:D}=O,H=r(5,P,D);return H.index=parseInt(E,10),v.nextToken(),o(H,v.currentOffset(),v.currentPosition()),H}function a(v,E){const O=v.context(),{lastOffset:P,lastStartLoc:D}=O,H=r(4,P,D);return H.key=E,v.nextToken(),o(H,v.currentOffset(),v.currentPosition()),H}function u(v,E){const O=v.context(),{lastOffset:P,lastStartLoc:D}=O,H=r(9,P,D);return H.value=E.replace(Dg,Mg),v.nextToken(),o(H,v.currentOffset(),v.currentPosition()),H}function c(v){const E=v.nextToken(),O=v.context(),{lastOffset:P,lastStartLoc:D}=O,H=r(8,P,D);return E.type!==12?(i(v,Pe.UNEXPECTED_EMPTY_LINKED_MODIFIER,O.lastStartLoc,0),H.value="",o(H,P,D),{nextConsumeToken:E,node:H}):(E.value==null&&i(v,Pe.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,Yt(E)),H.value=E.value||"",o(H,v.currentOffset(),v.currentPosition()),{node:H})}function f(v,E){const O=v.context(),P=r(7,O.offset,O.startLoc);return P.value=E,o(P,v.currentOffset(),v.currentPosition()),P}function h(v){const E=v.context(),O=r(6,E.offset,E.startLoc);let P=v.nextToken();if(P.type===9){const D=c(v);O.modifier=D.node,P=D.nextConsumeToken||v.nextToken()}switch(P.type!==10&&i(v,Pe.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Yt(P)),P=v.nextToken(),P.type===2&&(P=v.nextToken()),P.type){case 11:P.value==null&&i(v,Pe.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Yt(P)),O.key=f(v,P.value||"");break;case 5:P.value==null&&i(v,Pe.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Yt(P)),O.key=a(v,P.value||"");break;case 6:P.value==null&&i(v,Pe.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Yt(P)),O.key=s(v,P.value||"");break;case 7:P.value==null&&i(v,Pe.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Yt(P)),O.key=u(v,P.value||"");break;default:{i(v,Pe.UNEXPECTED_EMPTY_LINKED_KEY,E.lastStartLoc,0);const D=v.context(),H=r(7,D.offset,D.startLoc);return H.value="",o(H,D.offset,D.startLoc),O.key=H,o(O,D.offset,D.startLoc),{nextConsumeToken:P,node:O}}}return o(O,v.currentOffset(),v.currentPosition()),{node:O}}function p(v){const E=v.context(),O=E.currentType===1?v.currentOffset():E.offset,P=E.currentType===1?E.endLoc:E.startLoc,D=r(2,O,P);D.items=[];let H=null;do{const R=H||v.nextToken();switch(H=null,R.type){case 0:R.value==null&&i(v,Pe.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Yt(R)),D.items.push(l(v,R.value||""));break;case 6:R.value==null&&i(v,Pe.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Yt(R)),D.items.push(s(v,R.value||""));break;case 5:R.value==null&&i(v,Pe.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Yt(R)),D.items.push(a(v,R.value||""));break;case 7:R.value==null&&i(v,Pe.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Yt(R)),D.items.push(u(v,R.value||""));break;case 8:{const V=h(v);D.items.push(V.node),H=V.nextConsumeToken||null;break}}}while(E.currentType!==14&&E.currentType!==1);const M=E.currentType===1?E.lastOffset:v.currentOffset(),B=E.currentType===1?E.lastEndLoc:v.currentPosition();return o(D,M,B),D}function g(v,E,O,P){const D=v.context();let H=P.items.length===0;const M=r(1,E,O);M.cases=[],M.cases.push(P);do{const B=p(v);H||(H=B.items.length===0),M.cases.push(B)}while(D.currentType!==14);return H&&i(v,Pe.MUST_HAVE_MESSAGES_IN_PLURAL,O,0),o(M,v.currentOffset(),v.currentPosition()),M}function y(v){const E=v.context(),{offset:O,startLoc:P}=E,D=p(v);return E.currentType===14?D:g(v,O,P,D)}function T(v){const E=Rg(v,Wc({},e)),O=E.context(),P=r(0,O.offset,O.startLoc);return n&&P.loc&&(P.loc.source=v),P.body=y(E),e.onCacheKey&&(P.cacheKey=e.onCacheKey(v)),O.currentType!==14&&i(E,Pe.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,v[O.offset]||""),o(P,E.currentOffset(),E.currentPosition()),P}return{parse:T}}function Yt(e){if(e.type===14)return"EOF";const n=(e.value||"").replace(/\r?\n/gu,"\\n");return n.length>10?n.slice(0,9)+"…":n}function Fg(e,n={}){const t={ast:e,helpers:new Set};return{context:()=>t,helper:o=>(t.helpers.add(o),o)}}function dl(e,n){for(let t=0;t<e.length;t++)Ys(e[t],n)}function Ys(e,n){switch(e.type){case 1:dl(e.cases,n),n.helper("plural");break;case 2:dl(e.items,n);break;case 6:{Ys(e.key,n),n.helper("linked"),n.helper("type");break}case 5:n.helper("interpolate"),n.helper("list");break;case 4:n.helper("interpolate"),n.helper("named");break}}function Bg(e,n={}){const t=Fg(e);t.helper("normalize"),e.body&&Ys(e.body,t);const i=t.context();e.helpers=Array.from(i.helpers)}function Hg(e){const n=e.body;return n.type===2?fl(n):n.cases.forEach(t=>fl(t)),e}function fl(e){if(e.items.length===1){const n=e.items[0];(n.type===3||n.type===9)&&(e.static=n.value,delete n.value)}else{const n=[];for(let t=0;t<e.items.length;t++){const i=e.items[t];if(!(i.type===3||i.type===9)||i.value==null)break;n.push(i.value)}if(n.length===e.items.length){e.static=Gc(n);for(let t=0;t<e.items.length;t++){const i=e.items[t];(i.type===3||i.type===9)&&delete i.value}}}}const Vg="minifier";function ri(e){switch(e.t=e.type,e.type){case 0:{const n=e;ri(n.body),n.b=n.body,delete n.body;break}case 1:{const n=e,t=n.cases;for(let i=0;i<t.length;i++)ri(t[i]);n.c=t,delete n.cases;break}case 2:{const n=e,t=n.items;for(let i=0;i<t.length;i++)ri(t[i]);n.i=t,delete n.items,n.static&&(n.s=n.static,delete n.static);break}case 3:case 9:case 8:case 7:{const n=e;n.value&&(n.v=n.value,delete n.value);break}case 6:{const n=e;ri(n.key),n.k=n.key,delete n.key,n.modifier&&(ri(n.modifier),n.m=n.modifier,delete n.modifier);break}case 5:{const n=e;n.i=n.index,delete n.index;break}case 4:{const n=e;n.k=n.key,delete n.key;break}default:throw vi(Pe.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:Vg,args:[e.type]})}delete e.type}const zg="parser";function jg(e,n){const{sourceMap:t,filename:i,breakLineCode:r,needIndent:o}=n,l=n.location!==!1,s={filename:i,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};l&&e.loc&&(s.source=e.loc.source);const a=()=>s;function u(T,v){s.code+=T}function c(T,v=!0){const E=v?r:"";u(o?E+"  ".repeat(T):E)}function f(T=!0){const v=++s.indentLevel;T&&c(v)}function h(T=!0){const v=--s.indentLevel;T&&c(v)}function p(){c(s.indentLevel)}return{context:a,push:u,indent:f,deindent:h,newline:p,helper:T=>`_${T}`,needIndent:()=>s.needIndent}}function Ug(e,n){const{helper:t}=e;e.push(`${t("linked")}(`),di(e,n.key),n.modifier?(e.push(", "),di(e,n.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function Wg(e,n){const{helper:t,needIndent:i}=e;e.push(`${t("normalize")}([`),e.indent(i());const r=n.items.length;for(let o=0;o<r&&(di(e,n.items[o]),o!==r-1);o++)e.push(", ");e.deindent(i()),e.push("])")}function Gg(e,n){const{helper:t,needIndent:i}=e;if(n.cases.length>1){e.push(`${t("plural")}([`),e.indent(i());const r=n.cases.length;for(let o=0;o<r&&(di(e,n.cases[o]),o!==r-1);o++)e.push(", ");e.deindent(i()),e.push("])")}}function Kg(e,n){n.body?di(e,n.body):e.push("null")}function di(e,n){const{helper:t}=e;switch(n.type){case 0:Kg(e,n);break;case 1:Gg(e,n);break;case 2:Wg(e,n);break;case 6:Ug(e,n);break;case 8:e.push(JSON.stringify(n.value),n);break;case 7:e.push(JSON.stringify(n.value),n);break;case 5:e.push(`${t("interpolate")}(${t("list")}(${n.index}))`,n);break;case 4:e.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(n.key)}))`,n);break;case 9:e.push(JSON.stringify(n.value),n);break;case 3:e.push(JSON.stringify(n.value),n);break;default:throw vi(Pe.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:zg,args:[n.type]})}}const qg=(e,n={})=>{const t=ul(n.mode)?n.mode:"normal",i=ul(n.filename)?n.filename:"message.intl",r=!!n.sourceMap,o=n.breakLineCode!=null?n.breakLineCode:t==="arrow"?";":`
`,l=n.needIndent?n.needIndent:t!=="arrow",s=e.helpers||[],a=jg(e,{mode:t,filename:i,sourceMap:r,breakLineCode:o,needIndent:l});a.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(l),s.length>0&&(a.push(`const { ${Gc(s.map(f=>`${f}: _${f}`),", ")} } = ctx`),a.newline()),a.push("return "),di(a,e),a.deindent(l),a.push("}"),delete e.helpers;const{code:u,map:c}=a.context();return{ast:e,code:u,map:c?c.toJSON():void 0}};function Zg(e,n={}){const t=Wc({},n),i=!!t.jit,r=!!t.minify,o=t.optimize==null?!0:t.optimize,s=Ng(t).parse(e);return i?(o&&Hg(s),r&&ri(s),{ast:s,code:""}):(Bg(s,t),qg(s,t))}/*!
  * core-base v9.10.2
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */function Yg(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(cn().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(cn().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(cn().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}const Dn=[];Dn[0]={w:[0],i:[3,0],"[":[4],o:[7]};Dn[1]={w:[1],".":[2],"[":[4],o:[7]};Dn[2]={w:[2],i:[3,0],0:[3,0]};Dn[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};Dn[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};Dn[5]={"'":[4,0],o:8,l:[5,0]};Dn[6]={'"':[4,0],o:8,l:[6,0]};const Xg=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Jg(e){return Xg.test(e)}function Qg(e){const n=e.charCodeAt(0),t=e.charCodeAt(e.length-1);return n===t&&(n===34||n===39)?e.slice(1,-1):e}function $g(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function em(e){const n=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:Jg(n)?Qg(n):"*"+n}function tm(e){const n=[];let t=-1,i=0,r=0,o,l,s,a,u,c,f;const h=[];h[0]=()=>{l===void 0?l=s:l+=s},h[1]=()=>{l!==void 0&&(n.push(l),l=void 0)},h[2]=()=>{h[0](),r++},h[3]=()=>{if(r>0)r--,i=4,h[0]();else{if(r=0,l===void 0||(l=em(l),l===!1))return!1;h[1]()}};function p(){const g=e[t+1];if(i===5&&g==="'"||i===6&&g==='"')return t++,s="\\"+g,h[0](),!0}for(;i!==null;)if(t++,o=e[t],!(o==="\\"&&p())){if(a=$g(o),f=Dn[i],u=f[a]||f.l||8,u===8||(i=u[0],u[1]!==void 0&&(c=h[u[1]],c&&(s=o,c()===!1))))return;if(i===7)return n}}const hl=new Map;function nm(e,n){return Ue(e)?e[n]:null}function im(e,n){if(!Ue(e))return null;let t=hl.get(n);if(t||(t=tm(n),t&&hl.set(n,t)),!t)return null;const i=t.length;let r=e,o=0;for(;o<i;){const l=r[t[o]];if(l===void 0||Ye(r))return null;r=l,o++}return r}const rm=e=>e,om=e=>"",sm="text",am=e=>e.length===0?"":yg(e),lm=vg;function pl(e,n){return e=Math.abs(e),n===2?e?e>1?1:0:1:e?Math.min(e,2):0}function um(e){const n=lt(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(lt(e.named.count)||lt(e.named.n))?lt(e.named.count)?e.named.count:lt(e.named.n)?e.named.n:n:n}function cm(e,n){n.count||(n.count=e),n.n||(n.n=e)}function dm(e={}){const n=e.locale,t=um(e),i=Ue(e.pluralRules)&&fe(n)&&Ye(e.pluralRules[n])?e.pluralRules[n]:pl,r=Ue(e.pluralRules)&&fe(n)&&Ye(e.pluralRules[n])?pl:void 0,o=v=>v[i(t,v.length,r)],l=e.list||[],s=v=>l[v],a=e.named||{};lt(e.pluralIndex)&&cm(t,a);const u=v=>a[v];function c(v){const E=Ye(e.messages)?e.messages(v):Ue(e.messages)?e.messages[v]:!1;return E||(e.parent?e.parent.message(v):om)}const f=v=>e.modifiers?e.modifiers[v]:rm,h=Le(e.processor)&&Ye(e.processor.normalize)?e.processor.normalize:am,p=Le(e.processor)&&Ye(e.processor.interpolate)?e.processor.interpolate:lm,g=Le(e.processor)&&fe(e.processor.type)?e.processor.type:sm,T={list:s,named:u,plural:o,linked:(v,...E)=>{const[O,P]=E;let D="text",H="";E.length===1?Ue(O)?(H=O.modifier||H,D=O.type||D):fe(O)&&(H=O||H):E.length===2&&(fe(O)&&(H=O||H),fe(P)&&(D=P||D));const M=c(v)(T),B=D==="vnode"&&$e(M)&&H?M[0]:M;return H?f(H)(B,D):B},message:c,type:g,interpolate:p,normalize:h,values:yt({},l,a)};return T}let qi=null;function fm(e){qi=e}function hm(e,n,t){qi&&qi.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:n,meta:t})}const pm=gm("function:translate");function gm(e){return n=>qi&&qi.emit(e,n)}const mm={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,__EXTEND_POINT__:8},Kc=Pe.__EXTEND_POINT__,Hn=Zs(Kc),Wt={INVALID_ARGUMENT:Kc,INVALID_DATE_ARGUMENT:Hn(),INVALID_ISO_DATE_ARGUMENT:Hn(),NOT_SUPPORT_NON_STRING_MESSAGE:Hn(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:Hn(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:Hn(),NOT_SUPPORT_LOCALE_TYPE:Hn(),__EXTEND_POINT__:Hn()};function Qt(e){return vi(e,null,void 0)}function Xs(e,n){return n.locale!=null?gl(n.locale):gl(e.locale)}let Ro;function gl(e){if(fe(e))return e;if(Ye(e)){if(e.resolvedOnce&&Ro!=null)return Ro;if(e.constructor.name==="Function"){const n=e();if(mg(n))throw Qt(Wt.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ro=n}else throw Qt(Wt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Qt(Wt.NOT_SUPPORT_LOCALE_TYPE)}function vm(e,n,t){return[...new Set([t,...$e(n)?n:Ue(n)?Object.keys(n):fe(n)?[n]:[t]])]}function qc(e,n,t){const i=fe(t)?t:fi,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let o=r.__localeChainCache.get(i);if(!o){o=[];let l=[t];for(;$e(l);)l=ml(o,l,n);const s=$e(n)||!Le(n)?n:n.default?n.default:null;l=fe(s)?[s]:s,$e(l)&&ml(o,l,!1),r.__localeChainCache.set(i,o)}return o}function ml(e,n,t){let i=!0;for(let r=0;r<n.length&&Me(i);r++){const o=n[r];fe(o)&&(i=ym(e,n[r],t))}return i}function ym(e,n,t){let i;const r=n.split("-");do{const o=r.join("-");i=bm(e,o,t),r.splice(-1,1)}while(r.length&&i===!0);return i}function bm(e,n,t){let i=!1;if(!e.includes(n)&&(i=!0,n)){i=n[n.length-1]!=="!";const r=n.replace(/!/g,"");e.push(r),($e(t)||Le(t))&&t[r]&&(i=t[r])}return i}const _m="9.10.2",lo=-1,fi="en-US",vl="",yl=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function wm(){return{upper:(e,n)=>n==="text"&&fe(e)?e.toUpperCase():n==="vnode"&&Ue(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,n)=>n==="text"&&fe(e)?e.toLowerCase():n==="vnode"&&Ue(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,n)=>n==="text"&&fe(e)?yl(e):n==="vnode"&&Ue(e)&&"__v_isVNode"in e?yl(e.children):e}}let Zc;function bl(e){Zc=e}let Yc;function Tm(e){Yc=e}let Xc;function Sm(e){Xc=e}let Jc=null;const xm=e=>{Jc=e},Em=()=>Jc;let Qc=null;const _l=e=>{Qc=e},Cm=()=>Qc;let wl=0;function Pm(e={}){const n=Ye(e.onWarn)?e.onWarn:bg,t=fe(e.version)?e.version:_m,i=fe(e.locale)||Ye(e.locale)?e.locale:fi,r=Ye(i)?fi:i,o=$e(e.fallbackLocale)||Le(e.fallbackLocale)||fe(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,l=Le(e.messages)?e.messages:{[r]:{}},s=Le(e.datetimeFormats)?e.datetimeFormats:{[r]:{}},a=Le(e.numberFormats)?e.numberFormats:{[r]:{}},u=yt({},e.modifiers||{},wm()),c=e.pluralRules||{},f=Ye(e.missing)?e.missing:null,h=Me(e.missingWarn)||On(e.missingWarn)?e.missingWarn:!0,p=Me(e.fallbackWarn)||On(e.fallbackWarn)?e.fallbackWarn:!0,g=!!e.fallbackFormat,y=!!e.unresolving,T=Ye(e.postTranslation)?e.postTranslation:null,v=Le(e.processor)?e.processor:null,E=Me(e.warnHtmlMessage)?e.warnHtmlMessage:!0,O=!!e.escapeParameter,P=Ye(e.messageCompiler)?e.messageCompiler:Zc,D=Ye(e.messageResolver)?e.messageResolver:Yc||nm,H=Ye(e.localeFallbacker)?e.localeFallbacker:Xc||vm,M=Ue(e.fallbackContext)?e.fallbackContext:void 0,B=e,R=Ue(B.__datetimeFormatters)?B.__datetimeFormatters:new Map,V=Ue(B.__numberFormatters)?B.__numberFormatters:new Map,$=Ue(B.__meta)?B.__meta:{};wl++;const N={version:t,cid:wl,locale:i,fallbackLocale:o,messages:l,modifiers:u,pluralRules:c,missing:f,missingWarn:h,fallbackWarn:p,fallbackFormat:g,unresolving:y,postTranslation:T,processor:v,warnHtmlMessage:E,escapeParameter:O,messageCompiler:P,messageResolver:D,localeFallbacker:H,fallbackContext:M,onWarn:n,__meta:$};return N.datetimeFormats=s,N.numberFormats=a,N.__datetimeFormatters=R,N.__numberFormatters=V,__INTLIFY_PROD_DEVTOOLS__&&hm(N,t,$),N}function Js(e,n,t,i,r){const{missing:o,onWarn:l}=e;if(o!==null){const s=o(e,t,n,r);return fe(s)?s:n}else return n}function xi(e,n,t){const i=e;i.__localeChainCache=new Map,e.localeFallbacker(e,t,n)}function ko(e){return t=>Im(t,e)}function Im(e,n){const t=n.b||n.body;if((t.t||t.type)===1){const i=t,r=i.c||i.cases;return e.plural(r.reduce((o,l)=>[...o,Tl(e,l)],[]))}else return Tl(e,t)}function Tl(e,n){const t=n.s||n.static;if(t)return e.type==="text"?t:e.normalize([t]);{const i=(n.i||n.items).reduce((r,o)=>[...r,rs(e,o)],[]);return e.normalize(i)}}function rs(e,n){const t=n.t||n.type;switch(t){case 3:{const i=n;return i.v||i.value}case 9:{const i=n;return i.v||i.value}case 4:{const i=n;return e.interpolate(e.named(i.k||i.key))}case 5:{const i=n;return e.interpolate(e.list(i.i!=null?i.i:i.index))}case 6:{const i=n,r=i.m||i.modifier;return e.linked(rs(e,i.k||i.key),r?rs(e,r):void 0,e.type)}case 7:{const i=n;return i.v||i.value}case 8:{const i=n;return i.v||i.value}default:throw new Error(`unhandled node type on format message part: ${t}`)}}const $c=e=>e;let si=Object.create(null);const hi=e=>Ue(e)&&(e.t===0||e.type===0)&&("b"in e||"body"in e);function ed(e,n={}){let t=!1;const i=n.onError||Eg;return n.onError=r=>{t=!0,i(r)},{...Zg(e,n),detectError:t}}const Om=(e,n)=>{if(!fe(e))throw Qt(Wt.NOT_SUPPORT_NON_STRING_MESSAGE);{Me(n.warnHtmlMessage)&&n.warnHtmlMessage;const i=(n.onCacheKey||$c)(e),r=si[i];if(r)return r;const{code:o,detectError:l}=ed(e,n),s=new Function(`return ${o}`)();return l?s:si[i]=s}};function Am(e,n){if(__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&fe(e)){Me(n.warnHtmlMessage)&&n.warnHtmlMessage;const i=(n.onCacheKey||$c)(e),r=si[i];if(r)return r;const{ast:o,detectError:l}=ed(e,{...n,location:!1,jit:!0}),s=ko(o);return l?s:si[i]=s}else{const t=e.cacheKey;if(t){const i=si[t];return i||(si[t]=ko(e))}else return ko(e)}}const Sl=()=>"",Ht=e=>Ye(e);function xl(e,...n){const{fallbackFormat:t,postTranslation:i,unresolving:r,messageCompiler:o,fallbackLocale:l,messages:s}=e,[a,u]=os(...n),c=Me(u.missingWarn)?u.missingWarn:e.missingWarn,f=Me(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,h=Me(u.escapeParameter)?u.escapeParameter:e.escapeParameter,p=!!u.resolvedMessage,g=fe(u.default)||Me(u.default)?Me(u.default)?o?a:()=>a:u.default:t?o?a:()=>a:"",y=t||g!=="",T=Xs(e,u);h&&Lm(u);let[v,E,O]=p?[a,T,s[T]||{}]:td(e,a,T,l,f,c),P=v,D=a;if(!p&&!(fe(P)||hi(P)||Ht(P))&&y&&(P=g,D=P),!p&&(!(fe(P)||hi(P)||Ht(P))||!fe(E)))return r?lo:a;let H=!1;const M=()=>{H=!0},B=Ht(P)?P:nd(e,a,E,P,D,M);if(H)return P;const R=Dm(e,E,O,u),V=dm(R),$=Rm(e,B,V),N=i?i($,a):$;if(__INTLIFY_PROD_DEVTOOLS__){const re={timestamp:Date.now(),key:fe(a)?a:Ht(P)?P.key:"",locale:E||(Ht(P)?P.locale:""),format:fe(P)?P:Ht(P)?P.source:"",message:N};re.meta=yt({},e.__meta,Em()||{}),pm(re)}return N}function Lm(e){$e(e.list)?e.list=e.list.map(n=>fe(n)?ll(n):n):Ue(e.named)&&Object.keys(e.named).forEach(n=>{fe(e.named[n])&&(e.named[n]=ll(e.named[n]))})}function td(e,n,t,i,r,o){const{messages:l,onWarn:s,messageResolver:a,localeFallbacker:u}=e,c=u(e,i,t);let f={},h,p=null;const g="translate";for(let y=0;y<c.length&&(h=c[y],f=l[h]||{},(p=a(f,n))===null&&(p=f[n]),!(fe(p)||hi(p)||Ht(p)));y++){const T=Js(e,n,h,o,g);T!==n&&(p=T)}return[p,h,f]}function nd(e,n,t,i,r,o){const{messageCompiler:l,warnHtmlMessage:s}=e;if(Ht(i)){const u=i;return u.locale=u.locale||t,u.key=u.key||n,u}if(l==null){const u=()=>i;return u.locale=t,u.key=n,u}const a=l(i,km(e,t,r,i,s,o));return a.locale=t,a.key=n,a.source=i,a}function Rm(e,n,t){return n(t)}function os(...e){const[n,t,i]=e,r={};if(!fe(n)&&!lt(n)&&!Ht(n)&&!hi(n))throw Qt(Wt.INVALID_ARGUMENT);const o=lt(n)?String(n):(Ht(n),n);return lt(t)?r.plural=t:fe(t)?r.default=t:Le(t)&&!ao(t)?r.named=t:$e(t)&&(r.list=t),lt(i)?r.plural=i:fe(i)?r.default=i:Le(i)&&yt(r,i),[o,r]}function km(e,n,t,i,r,o){return{locale:n,key:t,warnHtmlMessage:r,onError:l=>{throw o&&o(l),l},onCacheKey:l=>fg(n,t,l)}}function Dm(e,n,t,i){const{modifiers:r,pluralRules:o,messageResolver:l,fallbackLocale:s,fallbackWarn:a,missingWarn:u,fallbackContext:c}=e,h={locale:n,modifiers:r,pluralRules:o,messages:p=>{let g=l(t,p);if(g==null&&c){const[,,y]=td(c,p,n,s,a,u);g=l(y,p)}if(fe(g)||hi(g)){let y=!1;const v=nd(e,p,n,g,p,()=>{y=!0});return y?Sl:v}else return Ht(g)?g:Sl}};return e.processor&&(h.processor=e.processor),i.list&&(h.list=i.list),i.named&&(h.named=i.named),lt(i.plural)&&(h.pluralIndex=i.plural),h}function El(e,...n){const{datetimeFormats:t,unresolving:i,fallbackLocale:r,onWarn:o,localeFallbacker:l}=e,{__datetimeFormatters:s}=e,[a,u,c,f]=ss(...n),h=Me(c.missingWarn)?c.missingWarn:e.missingWarn;Me(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,g=Xs(e,c),y=l(e,r,g);if(!fe(a)||a==="")return new Intl.DateTimeFormat(g,f).format(u);let T={},v,E=null;const O="datetime format";for(let H=0;H<y.length&&(v=y[H],T=t[v]||{},E=T[a],!Le(E));H++)Js(e,a,v,h,O);if(!Le(E)||!fe(v))return i?lo:a;let P=`${v}__${a}`;ao(f)||(P=`${P}__${JSON.stringify(f)}`);let D=s.get(P);return D||(D=new Intl.DateTimeFormat(v,yt({},E,f)),s.set(P,D)),p?D.formatToParts(u):D.format(u)}const id=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function ss(...e){const[n,t,i,r]=e,o={};let l={},s;if(fe(n)){const a=n.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!a)throw Qt(Wt.INVALID_ISO_DATE_ARGUMENT);const u=a[3]?a[3].trim().startsWith("T")?`${a[1].trim()}${a[3].trim()}`:`${a[1].trim()}T${a[3].trim()}`:a[1].trim();s=new Date(u);try{s.toISOString()}catch{throw Qt(Wt.INVALID_ISO_DATE_ARGUMENT)}}else if(pg(n)){if(isNaN(n.getTime()))throw Qt(Wt.INVALID_DATE_ARGUMENT);s=n}else if(lt(n))s=n;else throw Qt(Wt.INVALID_ARGUMENT);return fe(t)?o.key=t:Le(t)&&Object.keys(t).forEach(a=>{id.includes(a)?l[a]=t[a]:o[a]=t[a]}),fe(i)?o.locale=i:Le(i)&&(l=i),Le(r)&&(l=r),[o.key||"",s,o,l]}function Cl(e,n,t){const i=e;for(const r in t){const o=`${n}__${r}`;i.__datetimeFormatters.has(o)&&i.__datetimeFormatters.delete(o)}}function Pl(e,...n){const{numberFormats:t,unresolving:i,fallbackLocale:r,onWarn:o,localeFallbacker:l}=e,{__numberFormatters:s}=e,[a,u,c,f]=as(...n),h=Me(c.missingWarn)?c.missingWarn:e.missingWarn;Me(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,g=Xs(e,c),y=l(e,r,g);if(!fe(a)||a==="")return new Intl.NumberFormat(g,f).format(u);let T={},v,E=null;const O="number format";for(let H=0;H<y.length&&(v=y[H],T=t[v]||{},E=T[a],!Le(E));H++)Js(e,a,v,h,O);if(!Le(E)||!fe(v))return i?lo:a;let P=`${v}__${a}`;ao(f)||(P=`${P}__${JSON.stringify(f)}`);let D=s.get(P);return D||(D=new Intl.NumberFormat(v,yt({},E,f)),s.set(P,D)),p?D.formatToParts(u):D.format(u)}const rd=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function as(...e){const[n,t,i,r]=e,o={};let l={};if(!lt(n))throw Qt(Wt.INVALID_ARGUMENT);const s=n;return fe(t)?o.key=t:Le(t)&&Object.keys(t).forEach(a=>{rd.includes(a)?l[a]=t[a]:o[a]=t[a]}),fe(i)?o.locale=i:Le(i)&&(l=i),Le(r)&&(l=r),[o.key||"",s,o,l]}function Il(e,n,t){const i=e;for(const r in t){const o=`${n}__${r}`;i.__numberFormatters.has(o)&&i.__numberFormatters.delete(o)}}Yg();/*!
  * vue-i18n v9.10.2
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */const Mm="9.10.2";function Nm(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(cn().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(cn().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(cn().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(cn().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(cn().__INTLIFY_PROD_DEVTOOLS__=!1)}const od=mm.__EXTEND_POINT__,sn=Zs(od);sn(),sn(),sn(),sn(),sn(),sn(),sn(),sn(),sn();const sd=Wt.__EXTEND_POINT__,Lt=Zs(sd),dt={UNEXPECTED_RETURN_TYPE:sd,INVALID_ARGUMENT:Lt(),MUST_BE_CALL_SETUP_TOP:Lt(),NOT_INSTALLED:Lt(),NOT_AVAILABLE_IN_LEGACY_MODE:Lt(),REQUIRED_VALUE:Lt(),INVALID_VALUE:Lt(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Lt(),NOT_INSTALLED_WITH_PROVIDE:Lt(),UNEXPECTED_ERROR:Lt(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Lt(),BRIDGE_SUPPORT_VUE_2_ONLY:Lt(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Lt(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Lt(),__EXTEND_POINT__:Lt()};function mt(e,...n){return vi(e,null,void 0)}const ls=kn("__translateVNode"),us=kn("__datetimeParts"),cs=kn("__numberParts"),ad=kn("__setPluralRules"),ld=kn("__injectWithOption"),ds=kn("__dispose");function Zi(e){if(!Ue(e))return e;for(const n in e)if(zr(e,n))if(!n.includes("."))Ue(e[n])&&Zi(e[n]);else{const t=n.split("."),i=t.length-1;let r=e,o=!1;for(let l=0;l<i;l++){if(t[l]in r||(r[t[l]]={}),!Ue(r[t[l]])){o=!0;break}r=r[t[l]]}o||(r[t[i]]=e[n],delete e[n]),Ue(r[t[i]])&&Zi(r[t[i]])}return e}function uo(e,n){const{messages:t,__i18n:i,messageResolver:r,flatJson:o}=n,l=Le(t)?t:$e(i)?{}:{[e]:{}};if($e(i)&&i.forEach(s=>{if("locale"in s&&"resource"in s){const{locale:a,resource:u}=s;a?(l[a]=l[a]||{},Ar(u,l[a])):Ar(u,l)}else fe(s)&&Ar(JSON.parse(s),l)}),r==null&&o)for(const s in l)zr(l,s)&&Zi(l[s]);return l}function ud(e){return e.type}function cd(e,n,t){let i=Ue(n.messages)?n.messages:{};"__i18nGlobal"in t&&(i=uo(e.locale.value,{messages:i,__i18n:t.__i18nGlobal}));const r=Object.keys(i);r.length&&r.forEach(o=>{e.mergeLocaleMessage(o,i[o])});{if(Ue(n.datetimeFormats)){const o=Object.keys(n.datetimeFormats);o.length&&o.forEach(l=>{e.mergeDateTimeFormat(l,n.datetimeFormats[l])})}if(Ue(n.numberFormats)){const o=Object.keys(n.numberFormats);o.length&&o.forEach(l=>{e.mergeNumberFormat(l,n.numberFormats[l])})}}}function Ol(e){return we(fr,null,e,0)}const Al="__INTLIFY_META__",Ll=()=>[],Fm=()=>!1;let Rl=0;function kl(e){return(n,t,i,r)=>e(t,i,en()||void 0,r)}const Bm=()=>{const e=en();let n=null;return e&&(n=ud(e)[Al])?{[Al]:n}:null};function Qs(e={},n){const{__root:t,__injectWithOption:i}=e,r=t===void 0,o=e.flatJson,l=Vr?de:Qr,s=!!e.translateExistCompatible;let a=Me(e.inheritLocale)?e.inheritLocale:!0;const u=l(t&&a?t.locale.value:fe(e.locale)?e.locale:fi),c=l(t&&a?t.fallbackLocale.value:fe(e.fallbackLocale)||$e(e.fallbackLocale)||Le(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),f=l(uo(u.value,e)),h=l(Le(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),p=l(Le(e.numberFormats)?e.numberFormats:{[u.value]:{}});let g=t?t.missingWarn:Me(e.missingWarn)||On(e.missingWarn)?e.missingWarn:!0,y=t?t.fallbackWarn:Me(e.fallbackWarn)||On(e.fallbackWarn)?e.fallbackWarn:!0,T=t?t.fallbackRoot:Me(e.fallbackRoot)?e.fallbackRoot:!0,v=!!e.fallbackFormat,E=Ye(e.missing)?e.missing:null,O=Ye(e.missing)?kl(e.missing):null,P=Ye(e.postTranslation)?e.postTranslation:null,D=t?t.warnHtmlMessage:Me(e.warnHtmlMessage)?e.warnHtmlMessage:!0,H=!!e.escapeParameter;const M=t?t.modifiers:Le(e.modifiers)?e.modifiers:{};let B=e.pluralRules||t&&t.pluralRules,R;R=(()=>{r&&_l(null);const k={version:Mm,locale:u.value,fallbackLocale:c.value,messages:f.value,modifiers:M,pluralRules:B,missing:O===null?void 0:O,missingWarn:g,fallbackWarn:y,fallbackFormat:v,unresolving:!0,postTranslation:P===null?void 0:P,warnHtmlMessage:D,escapeParameter:H,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};k.datetimeFormats=h.value,k.numberFormats=p.value,k.__datetimeFormatters=Le(R)?R.__datetimeFormatters:void 0,k.__numberFormatters=Le(R)?R.__numberFormatters:void 0;const G=Pm(k);return r&&_l(G),G})(),xi(R,u.value,c.value);function $(){return[u.value,c.value,f.value,h.value,p.value]}const N=J({get:()=>u.value,set:k=>{u.value=k,R.locale=u.value}}),re=J({get:()=>c.value,set:k=>{c.value=k,R.fallbackLocale=c.value,xi(R,u.value,k)}}),Z=J(()=>f.value),le=J(()=>h.value),oe=J(()=>p.value);function pe(){return Ye(P)?P:null}function _e(k){P=k,R.postTranslation=k}function Fe(){return E}function ge(k){k!==null&&(O=kl(k)),E=k,R.missing=O}const Ne=(k,G,ye,w,_,S)=>{$();let C;try{__INTLIFY_PROD_DEVTOOLS__,r||(R.fallbackContext=t?Cm():void 0),C=k(R)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(R.fallbackContext=void 0)}if(ye!=="translate exists"&&lt(C)&&C===lo||ye==="translate exists"&&!C){const[W,ie]=G();return t&&T?w(t):_(W)}else{if(S(C))return C;throw mt(dt.UNEXPECTED_RETURN_TYPE)}};function We(...k){return Ne(G=>Reflect.apply(xl,null,[G,...k]),()=>os(...k),"translate",G=>Reflect.apply(G.t,G,[...k]),G=>G,G=>fe(G))}function it(...k){const[G,ye,w]=k;if(w&&!Ue(w))throw mt(dt.INVALID_ARGUMENT);return We(G,ye,yt({resolvedMessage:!0},w||{}))}function tt(...k){return Ne(G=>Reflect.apply(El,null,[G,...k]),()=>ss(...k),"datetime format",G=>Reflect.apply(G.d,G,[...k]),()=>vl,G=>fe(G))}function te(...k){return Ne(G=>Reflect.apply(Pl,null,[G,...k]),()=>as(...k),"number format",G=>Reflect.apply(G.n,G,[...k]),()=>vl,G=>fe(G))}function F(k){return k.map(G=>fe(G)||lt(G)||Me(G)?Ol(String(G)):G)}const K={normalize:F,interpolate:k=>k,type:"vnode"};function se(...k){return Ne(G=>{let ye;const w=G;try{w.processor=K,ye=Reflect.apply(xl,null,[w,...k])}finally{w.processor=null}return ye},()=>os(...k),"translate",G=>G[ls](...k),G=>[Ol(G)],G=>$e(G))}function ce(...k){return Ne(G=>Reflect.apply(Pl,null,[G,...k]),()=>as(...k),"number format",G=>G[cs](...k),Ll,G=>fe(G)||$e(G))}function me(...k){return Ne(G=>Reflect.apply(El,null,[G,...k]),()=>ss(...k),"datetime format",G=>G[us](...k),Ll,G=>fe(G)||$e(G))}function Ce(k){B=k,R.pluralRules=B}function b(k,G){return Ne(()=>{if(!k)return!1;const ye=fe(G)?G:u.value,w=x(ye),_=R.messageResolver(w,k);return s?_!=null:hi(_)||Ht(_)||fe(_)},()=>[k],"translate exists",ye=>Reflect.apply(ye.te,ye,[k,G]),Fm,ye=>Me(ye))}function d(k){let G=null;const ye=qc(R,c.value,u.value);for(let w=0;w<ye.length;w++){const _=f.value[ye[w]]||{},S=R.messageResolver(_,k);if(S!=null){G=S;break}}return G}function m(k){const G=d(k);return G??(t?t.tm(k)||{}:{})}function x(k){return f.value[k]||{}}function I(k,G){if(o){const ye={[k]:G};for(const w in ye)zr(ye,w)&&Zi(ye[w]);G=ye[k]}f.value[k]=G,R.messages=f.value}function A(k,G){f.value[k]=f.value[k]||{};const ye={[k]:G};if(o)for(const w in ye)zr(ye,w)&&Zi(ye[w]);G=ye[k],Ar(G,f.value[k]),R.messages=f.value}function U(k){return h.value[k]||{}}function z(k,G){h.value[k]=G,R.datetimeFormats=h.value,Cl(R,k,G)}function Q(k,G){h.value[k]=yt(h.value[k]||{},G),R.datetimeFormats=h.value,Cl(R,k,G)}function Y(k){return p.value[k]||{}}function ue(k,G){p.value[k]=G,R.numberFormats=p.value,Il(R,k,G)}function X(k,G){p.value[k]=yt(p.value[k]||{},G),R.numberFormats=p.value,Il(R,k,G)}Rl++,t&&Vr&&(Ve(t.locale,k=>{a&&(u.value=k,R.locale=k,xi(R,u.value,c.value))}),Ve(t.fallbackLocale,k=>{a&&(c.value=k,R.fallbackLocale=k,xi(R,u.value,c.value))}));const ee={id:Rl,locale:N,fallbackLocale:re,get inheritLocale(){return a},set inheritLocale(k){a=k,k&&t&&(u.value=t.locale.value,c.value=t.fallbackLocale.value,xi(R,u.value,c.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:Z,get modifiers(){return M},get pluralRules(){return B||{}},get isGlobal(){return r},get missingWarn(){return g},set missingWarn(k){g=k,R.missingWarn=g},get fallbackWarn(){return y},set fallbackWarn(k){y=k,R.fallbackWarn=y},get fallbackRoot(){return T},set fallbackRoot(k){T=k},get fallbackFormat(){return v},set fallbackFormat(k){v=k,R.fallbackFormat=v},get warnHtmlMessage(){return D},set warnHtmlMessage(k){D=k,R.warnHtmlMessage=k},get escapeParameter(){return H},set escapeParameter(k){H=k,R.escapeParameter=k},t:We,getLocaleMessage:x,setLocaleMessage:I,mergeLocaleMessage:A,getPostTranslationHandler:pe,setPostTranslationHandler:_e,getMissingHandler:Fe,setMissingHandler:ge,[ad]:Ce};return ee.datetimeFormats=le,ee.numberFormats=oe,ee.rt=it,ee.te=b,ee.tm=m,ee.d=tt,ee.n=te,ee.getDateTimeFormat=U,ee.setDateTimeFormat=z,ee.mergeDateTimeFormat=Q,ee.getNumberFormat=Y,ee.setNumberFormat=ue,ee.mergeNumberFormat=X,ee[ld]=i,ee[ls]=se,ee[us]=me,ee[cs]=ce,ee}function Hm(e){const n=fe(e.locale)?e.locale:fi,t=fe(e.fallbackLocale)||$e(e.fallbackLocale)||Le(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:n,i=Ye(e.missing)?e.missing:void 0,r=Me(e.silentTranslationWarn)||On(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,o=Me(e.silentFallbackWarn)||On(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,l=Me(e.fallbackRoot)?e.fallbackRoot:!0,s=!!e.formatFallbackMessages,a=Le(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Ye(e.postTranslation)?e.postTranslation:void 0,f=fe(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,p=Me(e.sync)?e.sync:!0;let g=e.messages;if(Le(e.sharedMessages)){const H=e.sharedMessages;g=Object.keys(H).reduce((B,R)=>{const V=B[R]||(B[R]={});return yt(V,H[R]),B},g||{})}const{__i18n:y,__root:T,__injectWithOption:v}=e,E=e.datetimeFormats,O=e.numberFormats,P=e.flatJson,D=e.translateExistCompatible;return{locale:n,fallbackLocale:t,messages:g,flatJson:P,datetimeFormats:E,numberFormats:O,missing:i,missingWarn:r,fallbackWarn:o,fallbackRoot:l,fallbackFormat:s,modifiers:a,pluralRules:u,postTranslation:c,warnHtmlMessage:f,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:p,translateExistCompatible:D,__i18n:y,__root:T,__injectWithOption:v}}function fs(e={},n){{const t=Qs(Hm(e)),{__extender:i}=e,r={id:t.id,get locale(){return t.locale.value},set locale(o){t.locale.value=o},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(o){t.fallbackLocale.value=o},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(o){},get missing(){return t.getMissingHandler()},set missing(o){t.setMissingHandler(o)},get silentTranslationWarn(){return Me(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(o){t.missingWarn=Me(o)?!o:o},get silentFallbackWarn(){return Me(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(o){t.fallbackWarn=Me(o)?!o:o},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(o){t.fallbackFormat=o},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(o){t.setPostTranslationHandler(o)},get sync(){return t.inheritLocale},set sync(o){t.inheritLocale=o},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(o){t.warnHtmlMessage=o!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(o){t.escapeParameter=o},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(o){},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...o){const[l,s,a]=o,u={};let c=null,f=null;if(!fe(l))throw mt(dt.INVALID_ARGUMENT);const h=l;return fe(s)?u.locale=s:$e(s)?c=s:Le(s)&&(f=s),$e(a)?c=a:Le(a)&&(f=a),Reflect.apply(t.t,t,[h,c||f||{},u])},rt(...o){return Reflect.apply(t.rt,t,[...o])},tc(...o){const[l,s,a]=o,u={plural:1};let c=null,f=null;if(!fe(l))throw mt(dt.INVALID_ARGUMENT);const h=l;return fe(s)?u.locale=s:lt(s)?u.plural=s:$e(s)?c=s:Le(s)&&(f=s),fe(a)?u.locale=a:$e(a)?c=a:Le(a)&&(f=a),Reflect.apply(t.t,t,[h,c||f||{},u])},te(o,l){return t.te(o,l)},tm(o){return t.tm(o)},getLocaleMessage(o){return t.getLocaleMessage(o)},setLocaleMessage(o,l){t.setLocaleMessage(o,l)},mergeLocaleMessage(o,l){t.mergeLocaleMessage(o,l)},d(...o){return Reflect.apply(t.d,t,[...o])},getDateTimeFormat(o){return t.getDateTimeFormat(o)},setDateTimeFormat(o,l){t.setDateTimeFormat(o,l)},mergeDateTimeFormat(o,l){t.mergeDateTimeFormat(o,l)},n(...o){return Reflect.apply(t.n,t,[...o])},getNumberFormat(o){return t.getNumberFormat(o)},setNumberFormat(o,l){t.setNumberFormat(o,l)},mergeNumberFormat(o,l){t.mergeNumberFormat(o,l)},getChoiceIndex(o,l){return-1}};return r.__extender=i,r}}const $s={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Vm({slots:e},n){return n.length===1&&n[0]==="default"?(e.default?e.default():[]).reduce((i,r)=>[...i,...r.type===Ee?r.children:[r]],[]):n.reduce((t,i)=>{const r=e[i];return r&&(t[i]=r()),t},{})}function dd(e){return Ee}const zm=ze({name:"i18n-t",props:yt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>lt(e)||!isNaN(e)}},$s),setup(e,n){const{slots:t,attrs:i}=n,r=e.i18n||tn({useScope:e.scope,__useComponent:!0});return()=>{const o=Object.keys(t).filter(f=>f!=="_"),l={};e.locale&&(l.locale=e.locale),e.plural!==void 0&&(l.plural=fe(e.plural)?+e.plural:e.plural);const s=Vm(n,o),a=r[ls](e.keypath,s,l),u=yt({},i),c=fe(e.tag)||Ue(e.tag)?e.tag:dd();return oo(c,u,a)}}}),Dl=zm;function jm(e){return $e(e)&&!fe(e[0])}function fd(e,n,t,i){const{slots:r,attrs:o}=n;return()=>{const l={part:!0};let s={};e.locale&&(l.locale=e.locale),fe(e.format)?l.key=e.format:Ue(e.format)&&(fe(e.format.key)&&(l.key=e.format.key),s=Object.keys(e.format).reduce((h,p)=>t.includes(p)?yt({},h,{[p]:e.format[p]}):h,{}));const a=i(e.value,l,s);let u=[l.key];$e(a)?u=a.map((h,p)=>{const g=r[h.type],y=g?g({[h.type]:h.value,index:p,parts:a}):[h.value];return jm(y)&&(y[0].key=`${h.type}-${p}`),y}):fe(a)&&(u=[a]);const c=yt({},o),f=fe(e.tag)||Ue(e.tag)?e.tag:dd();return oo(f,c,u)}}const Um=ze({name:"i18n-n",props:yt({value:{type:Number,required:!0},format:{type:[String,Object]}},$s),setup(e,n){const t=e.i18n||tn({useScope:"parent",__useComponent:!0});return fd(e,n,rd,(...i)=>t[cs](...i))}}),Ml=Um,Wm=ze({name:"i18n-d",props:yt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},$s),setup(e,n){const t=e.i18n||tn({useScope:"parent",__useComponent:!0});return fd(e,n,id,(...i)=>t[us](...i))}}),Nl=Wm;function Gm(e,n){const t=e;if(e.mode==="composition")return t.__getInstance(n)||e.global;{const i=t.__getInstance(n);return i!=null?i.__composer:e.global.__composer}}function Km(e){const n=l=>{const{instance:s,modifiers:a,value:u}=l;if(!s||!s.$)throw mt(dt.UNEXPECTED_ERROR);const c=Gm(e,s.$),f=Fl(u);return[Reflect.apply(c.t,c,[...Bl(f)]),c]};return{created:(l,s)=>{const[a,u]=n(s);Vr&&e.global===u&&(l.__i18nWatcher=Ve(u.locale,()=>{s.instance&&s.instance.$forceUpdate()})),l.__composer=u,l.textContent=a},unmounted:l=>{Vr&&l.__i18nWatcher&&(l.__i18nWatcher(),l.__i18nWatcher=void 0,delete l.__i18nWatcher),l.__composer&&(l.__composer=void 0,delete l.__composer)},beforeUpdate:(l,{value:s})=>{if(l.__composer){const a=l.__composer,u=Fl(s);l.textContent=Reflect.apply(a.t,a,[...Bl(u)])}},getSSRProps:l=>{const[s]=n(l);return{textContent:s}}}}function Fl(e){if(fe(e))return{path:e};if(Le(e)){if(!("path"in e))throw mt(dt.REQUIRED_VALUE,"path");return e}else throw mt(dt.INVALID_VALUE)}function Bl(e){const{path:n,locale:t,args:i,choice:r,plural:o}=e,l={},s=i||{};return fe(t)&&(l.locale=t),lt(r)&&(l.plural=r),lt(o)&&(l.plural=o),[n,s,l]}function qm(e,n,...t){const i=Le(t[0])?t[0]:{},r=!!i.useI18nComponentName;(Me(i.globalInstall)?i.globalInstall:!0)&&([r?"i18n":Dl.name,"I18nT"].forEach(l=>e.component(l,Dl)),[Ml.name,"I18nN"].forEach(l=>e.component(l,Ml)),[Nl.name,"I18nD"].forEach(l=>e.component(l,Nl))),e.directive("t",Km(n))}function Zm(e,n,t){return{beforeCreate(){const i=en();if(!i)throw mt(dt.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const o=r.i18n;if(r.__i18n&&(o.__i18n=r.__i18n),o.__root=n,this===this.$root)this.$i18n=Hl(e,o);else{o.__injectWithOption=!0,o.__extender=t.__vueI18nExtend,this.$i18n=fs(o);const l=this.$i18n;l.__extender&&(l.__disposer=l.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=Hl(e,r);else{this.$i18n=fs({__i18n:r.__i18n,__injectWithOption:!0,__extender:t.__vueI18nExtend,__root:n});const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}else this.$i18n=e;r.__i18nGlobal&&cd(n,r,r),this.$t=(...o)=>this.$i18n.t(...o),this.$rt=(...o)=>this.$i18n.rt(...o),this.$tc=(...o)=>this.$i18n.tc(...o),this.$te=(o,l)=>this.$i18n.te(o,l),this.$d=(...o)=>this.$i18n.d(...o),this.$n=(...o)=>this.$i18n.n(...o),this.$tm=o=>this.$i18n.tm(o),t.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=en();if(!i)throw mt(dt.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),t.__deleteInstance(i),delete this.$i18n}}}function Hl(e,n){e.locale=n.locale||e.locale,e.fallbackLocale=n.fallbackLocale||e.fallbackLocale,e.missing=n.missing||e.missing,e.silentTranslationWarn=n.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=n.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=n.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=n.postTranslation||e.postTranslation,e.warnHtmlInMessage=n.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=n.escapeParameterHtml||e.escapeParameterHtml,e.sync=n.sync||e.sync,e.__composer[ad](n.pluralizationRules||e.pluralizationRules);const t=uo(e.locale,{messages:n.messages,__i18n:n.__i18n});return Object.keys(t).forEach(i=>e.mergeLocaleMessage(i,t[i])),n.datetimeFormats&&Object.keys(n.datetimeFormats).forEach(i=>e.mergeDateTimeFormat(i,n.datetimeFormats[i])),n.numberFormats&&Object.keys(n.numberFormats).forEach(i=>e.mergeNumberFormat(i,n.numberFormats[i])),e}const Ym=kn("global-vue-i18n");function Xm(e={},n){const t=__VUE_I18N_LEGACY_API__&&Me(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,i=Me(e.globalInjection)?e.globalInjection:!0,r=__VUE_I18N_LEGACY_API__&&t?!!e.allowComposition:!0,o=new Map,[l,s]=Jm(e,t),a=kn("");function u(h){return o.get(h)||null}function c(h,p){o.set(h,p)}function f(h){o.delete(h)}{const h={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},get allowComposition(){return r},async install(p,...g){if(p.__VUE_I18N_SYMBOL__=a,p.provide(p.__VUE_I18N_SYMBOL__,h),Le(g[0])){const v=g[0];h.__composerExtend=v.__composerExtend,h.__vueI18nExtend=v.__vueI18nExtend}let y=null;!t&&i&&(y=sv(p,h.global)),__VUE_I18N_FULL_INSTALL__&&qm(p,h,...g),__VUE_I18N_LEGACY_API__&&t&&p.mixin(Zm(s,s.__composer,h));const T=p.unmount;p.unmount=()=>{y&&y(),h.dispose(),T()}},get global(){return s},dispose(){l.stop()},__instances:o,__getInstance:u,__setInstance:c,__deleteInstance:f};return h}}function tn(e={}){const n=en();if(n==null)throw mt(dt.MUST_BE_CALL_SETUP_TOP);if(!n.isCE&&n.appContext.app!=null&&!n.appContext.app.__VUE_I18N_SYMBOL__)throw mt(dt.NOT_INSTALLED);const t=Qm(n),i=ev(t),r=ud(n),o=$m(e,r);if(__VUE_I18N_LEGACY_API__&&t.mode==="legacy"&&!e.__useComponent){if(!t.allowComposition)throw mt(dt.NOT_AVAILABLE_IN_LEGACY_MODE);return rv(n,o,i,e)}if(o==="global")return cd(i,e,r),i;if(o==="parent"){let a=tv(t,n,e.__useComponent);return a==null&&(a=i),a}const l=t;let s=l.__getInstance(n);if(s==null){const a=yt({},e);"__i18n"in r&&(a.__i18n=r.__i18n),i&&(a.__root=i),s=Qs(a),l.__composerExtend&&(s[ds]=l.__composerExtend(s)),iv(l,n,s),l.__setInstance(n,s)}return s}function Jm(e,n,t){const i=Is();{const r=__VUE_I18N_LEGACY_API__&&n?i.run(()=>fs(e)):i.run(()=>Qs(e));if(r==null)throw mt(dt.UNEXPECTED_ERROR);return[i,r]}}function Qm(e){{const n=qn(e.isCE?Ym:e.appContext.app.__VUE_I18N_SYMBOL__);if(!n)throw mt(e.isCE?dt.NOT_INSTALLED_WITH_PROVIDE:dt.UNEXPECTED_ERROR);return n}}function $m(e,n){return ao(e)?"__i18n"in n?"local":"global":e.useScope?e.useScope:"local"}function ev(e){return e.mode==="composition"?e.global:e.global.__composer}function tv(e,n,t=!1){let i=null;const r=n.root;let o=nv(n,t);for(;o!=null;){const l=e;if(e.mode==="composition")i=l.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const s=l.__getInstance(o);s!=null&&(i=s.__composer,t&&i&&!i[ld]&&(i=null))}if(i!=null||r===o)break;o=o.parent}return i}function nv(e,n=!1){return e==null?null:n&&e.vnode.ctx||e.parent}function iv(e,n,t){jt(()=>{},n),dr(()=>{const i=t;e.__deleteInstance(n);const r=i[ds];r&&(r(),delete i[ds])},n)}function rv(e,n,t,i={}){const r=n==="local",o=Qr(null);if(r&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw mt(dt.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const l=Me(i.inheritLocale)?i.inheritLocale:!fe(i.locale),s=de(!r||l?t.locale.value:fe(i.locale)?i.locale:fi),a=de(!r||l?t.fallbackLocale.value:fe(i.fallbackLocale)||$e(i.fallbackLocale)||Le(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:s.value),u=de(uo(s.value,i)),c=de(Le(i.datetimeFormats)?i.datetimeFormats:{[s.value]:{}}),f=de(Le(i.numberFormats)?i.numberFormats:{[s.value]:{}}),h=r?t.missingWarn:Me(i.missingWarn)||On(i.missingWarn)?i.missingWarn:!0,p=r?t.fallbackWarn:Me(i.fallbackWarn)||On(i.fallbackWarn)?i.fallbackWarn:!0,g=r?t.fallbackRoot:Me(i.fallbackRoot)?i.fallbackRoot:!0,y=!!i.fallbackFormat,T=Ye(i.missing)?i.missing:null,v=Ye(i.postTranslation)?i.postTranslation:null,E=r?t.warnHtmlMessage:Me(i.warnHtmlMessage)?i.warnHtmlMessage:!0,O=!!i.escapeParameter,P=r?t.modifiers:Le(i.modifiers)?i.modifiers:{},D=i.pluralRules||r&&t.pluralRules;function H(){return[s.value,a.value,u.value,c.value,f.value]}const M=J({get:()=>o.value?o.value.locale.value:s.value,set:d=>{o.value&&(o.value.locale.value=d),s.value=d}}),B=J({get:()=>o.value?o.value.fallbackLocale.value:a.value,set:d=>{o.value&&(o.value.fallbackLocale.value=d),a.value=d}}),R=J(()=>o.value?o.value.messages.value:u.value),V=J(()=>c.value),$=J(()=>f.value);function N(){return o.value?o.value.getPostTranslationHandler():v}function re(d){o.value&&o.value.setPostTranslationHandler(d)}function Z(){return o.value?o.value.getMissingHandler():T}function le(d){o.value&&o.value.setMissingHandler(d)}function oe(d){return H(),d()}function pe(...d){return o.value?oe(()=>Reflect.apply(o.value.t,null,[...d])):oe(()=>"")}function _e(...d){return o.value?Reflect.apply(o.value.rt,null,[...d]):""}function Fe(...d){return o.value?oe(()=>Reflect.apply(o.value.d,null,[...d])):oe(()=>"")}function ge(...d){return o.value?oe(()=>Reflect.apply(o.value.n,null,[...d])):oe(()=>"")}function Ne(d){return o.value?o.value.tm(d):{}}function We(d,m){return o.value?o.value.te(d,m):!1}function it(d){return o.value?o.value.getLocaleMessage(d):{}}function tt(d,m){o.value&&(o.value.setLocaleMessage(d,m),u.value[d]=m)}function te(d,m){o.value&&o.value.mergeLocaleMessage(d,m)}function F(d){return o.value?o.value.getDateTimeFormat(d):{}}function q(d,m){o.value&&(o.value.setDateTimeFormat(d,m),c.value[d]=m)}function K(d,m){o.value&&o.value.mergeDateTimeFormat(d,m)}function se(d){return o.value?o.value.getNumberFormat(d):{}}function ce(d,m){o.value&&(o.value.setNumberFormat(d,m),f.value[d]=m)}function me(d,m){o.value&&o.value.mergeNumberFormat(d,m)}const Ce={get id(){return o.value?o.value.id:-1},locale:M,fallbackLocale:B,messages:R,datetimeFormats:V,numberFormats:$,get inheritLocale(){return o.value?o.value.inheritLocale:l},set inheritLocale(d){o.value&&(o.value.inheritLocale=d)},get availableLocales(){return o.value?o.value.availableLocales:Object.keys(u.value)},get modifiers(){return o.value?o.value.modifiers:P},get pluralRules(){return o.value?o.value.pluralRules:D},get isGlobal(){return o.value?o.value.isGlobal:!1},get missingWarn(){return o.value?o.value.missingWarn:h},set missingWarn(d){o.value&&(o.value.missingWarn=d)},get fallbackWarn(){return o.value?o.value.fallbackWarn:p},set fallbackWarn(d){o.value&&(o.value.missingWarn=d)},get fallbackRoot(){return o.value?o.value.fallbackRoot:g},set fallbackRoot(d){o.value&&(o.value.fallbackRoot=d)},get fallbackFormat(){return o.value?o.value.fallbackFormat:y},set fallbackFormat(d){o.value&&(o.value.fallbackFormat=d)},get warnHtmlMessage(){return o.value?o.value.warnHtmlMessage:E},set warnHtmlMessage(d){o.value&&(o.value.warnHtmlMessage=d)},get escapeParameter(){return o.value?o.value.escapeParameter:O},set escapeParameter(d){o.value&&(o.value.escapeParameter=d)},t:pe,getPostTranslationHandler:N,setPostTranslationHandler:re,getMissingHandler:Z,setMissingHandler:le,rt:_e,d:Fe,n:ge,tm:Ne,te:We,getLocaleMessage:it,setLocaleMessage:tt,mergeLocaleMessage:te,getDateTimeFormat:F,setDateTimeFormat:q,mergeDateTimeFormat:K,getNumberFormat:se,setNumberFormat:ce,mergeNumberFormat:me};function b(d){d.locale.value=s.value,d.fallbackLocale.value=a.value,Object.keys(u.value).forEach(m=>{d.mergeLocaleMessage(m,u.value[m])}),Object.keys(c.value).forEach(m=>{d.mergeDateTimeFormat(m,c.value[m])}),Object.keys(f.value).forEach(m=>{d.mergeNumberFormat(m,f.value[m])}),d.escapeParameter=O,d.fallbackFormat=y,d.fallbackRoot=g,d.fallbackWarn=p,d.missingWarn=h,d.warnHtmlMessage=E}return fc(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw mt(dt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const d=o.value=e.proxy.$i18n.__composer;n==="global"?(s.value=d.locale.value,a.value=d.fallbackLocale.value,u.value=d.messages.value,c.value=d.datetimeFormats.value,f.value=d.numberFormats.value):r&&b(d)}),Ce}const ov=["locale","fallbackLocale","availableLocales"],Vl=["t","rt","d","n","tm","te"];function sv(e,n){const t=Object.create(null);return ov.forEach(r=>{const o=Object.getOwnPropertyDescriptor(n,r);if(!o)throw mt(dt.UNEXPECTED_ERROR);const l=nt(o.value)?{get(){return o.value.value},set(s){o.value.value=s}}:{get(){return o.get&&o.get()}};Object.defineProperty(t,r,l)}),e.config.globalProperties.$i18n=t,Vl.forEach(r=>{const o=Object.getOwnPropertyDescriptor(n,r);if(!o||!o.value)throw mt(dt.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,o)}),()=>{delete e.config.globalProperties.$i18n,Vl.forEach(r=>{delete e.config.globalProperties[`$${r}`]})}}Nm();__INTLIFY_JIT_COMPILATION__?bl(Am):bl(Om);Tm(im);Sm(qc);if(__INTLIFY_PROD_DEVTOOLS__){const e=cn();e.__INTLIFY__=!0,fm(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const av={annotations:"Annotations",highlight_all_annotations:"Highlight All Annotations in Text Panel",highlight_no_annotations:"Remove All Highlights in Text Panel",no_annotations_available:"No Annotations available",change_language:"Change language",collection:"Collection",collector:"Collector",change_color_scheme:"Change color",comments:"Comments",no_comments_available:"No Comments Available",error_at_json_parsing:"JSON Parsing error, please check the config and reload the application",content:"Contents","Current location":"Current location","Date of creation":"Date of creation",decrease:"Decrease",default:"Default",reset_view:"Reset panels to default view",error_default:"Something went wrong. Please reload the page/application and/or try again later.",description:"Description",editor:"Editor",editorial:"Editorial",Editors:"Editors",hide:"Hide",image:"Image",error_vpn:'Some images are not available outside of the VPN (Virtual Private Network) of the Georg-August-University Goettingen. If you like to get access please refer to the guide at <a href="https://docs.gwdg.de/doku.php?id=en:services:network_services:vpn:start" target="_blank"> Network Services VPN</a>.',error_image_not_exists:"An image for this page does not exist yet.",error_collection_url:"Please provide the correct collection URL in the config",error_manifest_url:"Please provide the correct manifest URL in the config",error_item_url:"Please provide the correct item URL in the config",error_no_manifests_in_initcollection:"The collection should have at least one manifest, since we are trying to initialize collection",error_no_items_in_manifest:"The manifest should have at least one item",error_m_in_url_no_collection:"Please do not enter 'm' in the URL since there is no collection",error_item_not_in_manifest:"The item initialized in the custom config is not part of the manifest initialized in config",error_manifestpart_tido_url:"Please provide the value of manifest Index 'm' like i.e m2 or m3 (values are 2 and 3 in this case)",error_itempart_tido_url:"Please provide the value of item Index 'i' like i.e i2 or i3 (values are 2 and 3 in this case)",error_panelspart_tido_url:"Please provide the value of Panels 'p' panelIndex.TabIndexOpened for each panel index in the right form",error_showpart_tido_url:"Please provide the value of panels shown 's' in the right form",error_labels_custom_config:"Please provide correct values for the keys of 'labels' in custom config. If you provide a certain key, then please provide its value",error_undefined_role:"Please define 'role' in Actor",error_open_image:"Could not open the image file.",no_image_available:"No Image Available",image_license:"Image License",image_notes:"Image Notes",increase:"Increase",report_a_bug:"Report a Bug",close:"Close",sub_info:"Göttingen State and University Library",tido_description:"Slim, easy to use and mobile-friendly text and image viewer",documentation:"Documentation",license:"Licensed under GNU Affero General Public License v3.0",source_code:"Source Code",label:"Label",language:"Language (ISO 639-3)",Letter:"Letter",License:"License",Location:"Current location",Manuscript:"Manuscript",metadata:"Metadata",Motif:"Motifs",search_hit_list:"Search hit list",next_item:"Next Item",previous_item:"Previous Item",next_manifest:"Next Manifest",previous_manifest:"Previous Manifest",no_annotations_in_view:"The current view has no annotations to display.",no_comments_in_view:"The current view does not contain any comments to display",noConfigEntrypoint:"No Entrypoint is available in the config. Please add one to load viewer",no_entrypoint_available:"No entrypoint URL found. Please check your configuration.",config_error:"Configuration Error",no_views_configured:"No views configured in this panel.",Origin:"Origin",switch_to_fullscreen:"Toggle full page",zoom_in:"Zoom in",zoom_out:"Zoom out","Place of origin":"Place of origin",project_info:"Project Info",reset:"Reset",search:"Search",item:"Item",sheet:"Sheet",show:"Show",show_hide_panels:"Show/Hide Panels",tabs:"Tabs","TEI document":"TEI document",text:"Text",no_text_in_view:"A text for this view does not exist yet.",no_text_available:"No Text Available",text_size:"Text size",title:"Title",title_homepage:"The Story of Ahiqar in its Syriac and Arabic Tradition",title_viewer:"Edition Viewer",referenced_annotation:"Referenced Annotation",referenced_annotations:"Referenced Annotations",transcription:"Transcription",transliteration:"Transliteration",unknown_text_type:"Unknown Text Type",Year:"Year of creation",page:"Page",select_all:"Select all",contents:"Contents",failed_to_fetch_url:"Failed to fetch URL",please_try_again_later:"Please try again later",server_error:"Server error",other:"Other",subtitle:"Subtitle",also_selected:"Also selected",undefined_role:"Undefined role",not_found:"Not found",unauthorized:"Unauthorized",unknown_error:"Unknown Error",details:"Details",selected_variants:"Selected Variants",original:"Original",witnesses:"Witnesses",witnesses_details:"Witnesses Details",variants_details:"Variants Details",witnesses_selected:"Witnesses selected",single_select_mode:"Single Select Mode",single_select_mode_info_message:"Please select variant items from the text."},lv={annotations:"Annotationen",highlight_all_annotations:"Alle Anmerkungen im Textbereich hervorheben",highlight_no_annotations:"Alle Hervorhebungen im Textbereich entfernen",no_annotations_available:"Keine Annotationen verfügbar",no_comments_available:"Keine Kommentare verfügbar",change_language:"Sprache ändern",collection:"Kollektion",comments:"Kommentare",collector:"Kollektor",change_color_scheme:"Farbschema ändern",error_at_json_parsing:"Fehler beim JSON Parsing. Bitte überprüfen Sie die Konfigurationund laden Sie die Anwendung neu.",content:"Inhalt","Contents & Metadata":"Inhalt & Metadaten","Current location":"Aktueller Standort","Date of creation":"Erstelldatum",decrease:"Verkleinern",default:"Standard",reset_view:"Ansicht zurücksetzen",description:"Beschreibung",editor:"Herausgeber",editorial:"Kommentar",Editors:"Herausgeber",error_default:"Es ist ein Fehler aufgetreten. Bitte laden Sie die App/Seite erneut und/oder versuchen Sie es später zu einem späteren Zeitpunkt nochmal.",hide:"Verstecke",image:"Digitalisat",error_vpn:'Einige Bilder stehen Ihnen außerhalb des Netzwerks der Georg-August-Universität Göttingen ohne VPN-Zugang nicht zur Verfügung. Wenn Sie Zugang erhalten möchten, nutzen Sie bitte die Anleitung der GWDG zum <a href="https://docs.gwdg.de/doku.php?id=en:services:network_services:vpn:start" target="_blank"> Netzwerk-Service VPN</a>.',error_image_not_exists:"Für diese Seite existiert noch kein Bild.",error_collection_url:"Bitte geben Sie eine richtige Collection URL in der Konfiguration an.",error_manifest_url:"Bitte geben Sie eine richtige Manifest URL in der Konfiguration an.",error_item_url:"Bitte geben Sie eine richtige Item URL in der Konfiguration an.",error_no_manifests_in_initcollection:"Die Collection sollte Manifests enthalten.",error_no_items_in_manifest:"Das manifest sollte mindestens ein Item enthalten.",error_m_in_url_no_collection:"Es ist keine Collection angegeben. Bitte geben Sie kein 'm' in der URL ein.",error_item_not_in_manifest:"Item ist nicht im initialisierten Manifest enthalten.",error_manifestpart_tido_url:"Bitte geben Sie den Manifest-Teil (m) in der URL in der richtigen Form ein.",error_itempart_tido_url:"Bitte geben Sie den Item-Teil (i) in der URL in der richtigen Form ein.",error_panelspart_tido_url:"Bitte geben Sie den Panels-Teil (p) in der URL in der richtigen Form ein.",error_showpart_tido_url:"Bitte geben Sie den Show-Teil (s) in der URL in der richtigen Form ein.",error_open_image:"Fehler beim Öffnen der Bilddatei.",no_image_available:"Kein Bild verfügbar",image_license:"Bildlizenz",image_notes:"Bildnotizen",increase:"Vergrössern",report_a_bug:"Fehlerbericht senden",close:"Schliessen",sub_info:"Niedersächsische Staats- und Universitätsbibliothek Göttingen",tido_description:"Schlanker, benutzer- und mobilfreundlicher Text- und Bildbetrachter",documentation:"Dokumentation",license:"lizensiert unter GNU Affero General Public License v3.0",source_code:"Quellcode",label:"Kennzeichnung",language:"Sprache",Letter:"Brief",License:"Lizenz",Location:"Aktueller Aufbewahrungsort",metadata:"Metadaten",Motif:"Motive",search_hit_list:"Trefferanzeige",no_annotations_in_view:"Die aktuelle Ansicht enthält keine Annotationen.",no_comments_in_view:"Die aktuelle Ansicht enthält keine Kommentare",no_entrypoint_available:"Keine URL zum Einstieg gefunden. Bitte überprüfen Sie Ihre Konfiguration.",config_error:"Konfigurationsfehler",no_views_configured:"Keine Ansichten in diesem Panel konfiguriert.",Origin:"Ursprung",switch_to_fullscreen:"zu Vollbild wechseln",zoom_in:"Vergrössern",zoom_out:"Verkleinern","Place of origin":"Herkunftsort",project_info:"Projekt Informationen",reset:"Zurücksetzen",search:"Suche",item:"Seite",next_item:"Nächste Seite",previous_item:"Vorherige Seite",next_manifest:"Nächstes Dokument",previous_manifest:"Vorheriges Dokument",show:"Zeige",show_hide_panels:"Panels ein-/ausblenden",tabs:"Reiter","TEI document":"TEI-Dokument",text:"Text",no_text_in_view:"Für diese Ansicht existiert noch kein Text.",no_text_available:"Kein Text verfügbar",text_size:"Textgrösse",title:"Titel",title_homepage:"Die syrischen und arabischen Ahiqar-Texte",title_viewer:"Edition anzeigen",referenced_annotation:"Referenzierte Annotation",referenced_annotations:"Referenzierte Annotationen",transcription:"Transkription",transliteration:"Transliteration",unknown_text_type:"Unbekannter Text Typ",Year:"Erstellungsjahr",page:"Seite",select_all:"Alle auswählen",contents:"Inhalt",failed_to_fetch_url:"Die URL konnte nicht abgerufen werden",please_try_again_later:"Bitte versuchen Sie es später nochmal",server_error:"Server Fehler",other:"Sonstiges",subtitle:"Untertitel",more_annotations:"Weitere",undefined_role:"Undefinierte Rolle",not_found:"Nicht gefunden",unauthorized:"Nicht autorisiert",unknown_error:"Unbekannter Fehler",details:"Details",selected_variants:"Ausgewählte Varianten",original:"Original",witnesses:"Textzeugen",witnesses_details:"Infos zu Textzeugen",variants_details:"Infos zu Varianten",witnesses_selected:"Textzeugen ausgewählt",single_select_mode:"Single Select Mode",single_select_mode_info_message:"Bitte wählen Sie Varianten aus dem Text."},xn={en:av,de:lv},ht=Xm({legacy:!1,locale:"en",fallbackLocale:"en",messages:xn,silentTranslationWarn:!0,warnHtmlInMessage:"off"}),uv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M12.643 15C13.979 15 15 13.845 15 12.5V5H1v7.5C1 13.845 2.021 15 3.357 15zM5.5 7h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1M.8 1a.8.8 0 0 0-.8.8V3a.8.8 0 0 0 .8.8h14.4A.8.8 0 0 0 16 3V1.8a.8.8 0 0 0-.8-.8z"/></svg>',cv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M8.277.084a.5.5 0 0 0-.554 0l-7.5 5A.5.5 0 0 0 .5 6h1.875v7H1.5a.5.5 0 0 0 0 1h13a.5.5 0 1 0 0-1h-.875V6H15.5a.5.5 0 0 0 .277-.916zM12.375 6v7h-1.25V6zm-2.5 0v7h-1.25V6zm-2.5 0v7h-1.25V6zm-2.5 0v7h-1.25V6zM8 4a1 1 0 1 1 0-2a1 1 0 0 1 0 2M.5 15a.5.5 0 0 0 0 1h15a.5.5 0 1 0 0-1z"/></svg>',dv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M4 .5a.5.5 0 0 0-1 0V1H2a2 2 0 0 0-2 2v1h16V3a2 2 0 0 0-2-2h-1V.5a.5.5 0 0 0-1 0V1H4zM16 14V5H0v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M9.5 7h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5m3 0h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5M2 10.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm3.5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5"/></svg>',fv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M8 15c4.418 0 8-3.134 8-7s-3.582-7-8-7s-8 3.134-8 7c0 1.76.743 3.37 1.97 4.6c-.097 1.016-.417 2.13-.771 2.966c-.079.186.074.394.273.362c2.256-.37 3.597-.938 4.18-1.234A9 9 0 0 0 8 15"/></svg>',hv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><g fill="currentColor" fill-rule="evenodd"><path d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"/><path d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"/></g></svg>',pv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><g fill="currentColor"><path d="M5 0h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2h1a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1H1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v9a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1H3a2 2 0 0 1 2-2"/><path d="M1 6v-.5a.5.5 0 0 1 1 0V6h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1zm0 3v-.5a.5.5 0 0 1 1 0V9h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1zm0 2.5v.5H.5a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1H2v-.5a.5.5 0 0 0-1 0"/></g></svg>',gv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10m0-7a3 3 0 1 1 0-6a3 3 0 0 1 0 6"/></svg>',mv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="m13.498.795l.149-.149a1.207 1.207 0 1 1 1.707 1.708l-.149.148a1.5 1.5 0 0 1-.059 2.059L4.854 14.854a.5.5 0 0 1-.233.131l-4 1a.5.5 0 0 1-.606-.606l1-4a.5.5 0 0 1 .131-.232l9.642-9.642a.5.5 0 0 0-.642.056L6.854 4.854a.5.5 0 1 1-.708-.708L9.44.854A1.5 1.5 0 0 1 11.5.796a1.5 1.5 0 0 1 1.998-.001"/></svg>',hd='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><g fill="currentColor"><path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456l-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/><path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/></g></svg>',vv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M3 14s-1 0-1-1s1-4 6-4s6 3 6 4s-1 1-1 1zm5-6a3 3 0 1 0 0-6a3 3 0 0 0 0 6"/></svg>',yv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M1 2.828c.885-.37 2.154-.769 3.388-.893c1.33-.134 2.458.063 3.112.752v9.746c-.935-.53-2.12-.603-3.213-.493c-1.18.12-2.37.461-3.287.811zm7.5-.141c.654-.689 1.782-.886 3.112-.752c1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81c-1.094-.111-2.278-.039-3.213.492zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02c1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877c1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783"/></svg>',bv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5m.002 6a1 1 0 1 1 0 2a1 1 0 0 1 0-2"></path></svg>',_v='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412l-1 4.705c-.07.34.029.533.304.533c.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598c-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081l.082-.381l2.29-.287zM8 5.5a1 1 0 1 1 0-2a1 1 0 0 1 0 2"></path></svg>',wv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8L4.646 2.354a.5.5 0 0 1 0-.708"></path></svg>',Tv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8"/></svg>',Sv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8"/></svg>',xv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><g fill="currentColor"><path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914a.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2z"/><path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466"/></g></svg>',Ev='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em"" viewBox="0 0 16 16"><g fill="currentColor"><path fill-rule="evenodd" d="M6.5 12a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M13 6.5a6.5 6.5 0 1 1-13 0a6.5 6.5 0 0 1 13 0"/><path d="M10.344 11.742q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1a6.5 6.5 0 0 1-1.398 1.4z"/><path fill-rule="evenodd" d="M6.5 3a.5.5 0 0 1 .5.5V6h2.5a.5.5 0 0 1 0 1H7v2.5a.5.5 0 0 1-1 0V7H3.5a.5.5 0 0 1 0-1H6V3.5a.5.5 0 0 1 .5-.5"/></g></svg>',Cv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><g fill="currentColor"><path fill-rule="evenodd" d="M6.5 12a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M13 6.5a6.5 6.5 0 1 1-13 0a6.5 6.5 0 0 1 13 0"/><path d="M10.344 11.742q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1a6.5 6.5 0 0 1-1.398 1.4z"/><path fill-rule="evenodd" d="M3 6.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5"/></g></svg>',Pv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M1.5 1a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4A1.5 1.5 0 0 1 1.5 0h4a.5.5 0 0 1 0 1zM10 .5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 16 1.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5M.5 10a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 0 14.5v-4a.5.5 0 0 1 .5-.5m15 0a.5.5 0 0 1 .5.5v4a1.5 1.5 0 0 1-1.5 1.5h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5"/></svg>',Iv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M5.828 10.172a.5.5 0 0 0-.707 0l-4.096 4.096V11.5a.5.5 0 0 0-1 0v3.975a.5.5 0 0 0 .5.5H4.5a.5.5 0 0 0 0-1H1.732l4.096-4.096a.5.5 0 0 0 0-.707m4.344 0a.5.5 0 0 1 .707 0l4.096 4.096V11.5a.5.5 0 1 1 1 0v3.975a.5.5 0 0 1-.5.5H11.5a.5.5 0 0 1 0-1h2.768l-4.096-4.096a.5.5 0 0 1 0-.707m0-4.344a.5.5 0 0 0 .707 0l4.096-4.096V4.5a.5.5 0 1 0 1 0V.525a.5.5 0 0 0-.5-.5H11.5a.5.5 0 0 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 0 .707m-4.344 0a.5.5 0 0 1-.707 0L1.025 1.732V4.5a.5.5 0 0 1-1 0V.525a.5.5 0 0 1 .5-.5H4.5a.5.5 0 0 1 0 1H1.732l4.096 4.096a.5.5 0 0 1 0 .707"/></svg>',Ov='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M6 .278a.77.77 0 0 1 .08.858a7.2 7.2 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277q.792-.001 1.533-.16a.79.79 0 0 1 .81.316a.73.73 0 0 1-.031.893A8.35 8.35 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71C0 4.266 2.114 1.312 5.124.06A.75.75 0 0 1 6 .278"/></svg>',Av='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M8 12a4 4 0 1 0 0-8a4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708"/></svg>',Lv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><g fill="currentColor"><path d="M4.545 6.714L4.11 8H3l1.862-5h1.284L8 8H6.833l-.435-1.286zm1.634-.736L5.5 3.956h-.049l-.679 2.022z"/><path d="M0 2a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v3h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zm7.138 9.995q.289.451.63.846c-.748.575-1.673 1.001-2.768 1.292c.178.217.451.635.555.867c1.125-.359 2.08-.844 2.886-1.494c.777.665 1.739 1.165 2.93 1.472c.133-.254.414-.673.629-.89c-1.125-.253-2.057-.694-2.82-1.284c.681-.747 1.222-1.651 1.621-2.757H14V8h-3v1.047h.765c-.318.844-.74 1.546-1.272 2.13a6 6 0 0 1-.415-.492a2 2 0 0 1-.94.31"/></g></svg>',Rv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M19 12.998H5v-2h14z"/></svg>',kv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"/></svg>',Dv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" d="M10.478 1.647a.5.5 0 1 0-.956-.294l-4 13a.5.5 0 0 0 .956.294zM4.854 4.146a.5.5 0 0 1 0 .708L1.707 8l3.147 3.146a.5.5 0 0 1-.708.708l-3.5-3.5a.5.5 0 0 1 0-.708l3.5-3.5a.5.5 0 0 1 .708 0m6.292 0a.5.5 0 0 0 0 .708L14.293 8l-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 0 0-.708 0"/></svg>',Mv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><g fill="currentColor"><path d="M4.978.855a.5.5 0 1 0-.956.29l.41 1.352A5 5 0 0 0 3 6h10a5 5 0 0 0-1.432-3.503l.41-1.352a.5.5 0 1 0-.956-.29l-.291.956A5 5 0 0 0 8 1a5 5 0 0 0-2.731.811l-.29-.956z"/><path d="M13 6v1H8.5v8.975A5 5 0 0 0 13 11h.5a.5.5 0 0 1 .5.5v.5a.5.5 0 1 0 1 0v-.5a1.5 1.5 0 0 0-1.5-1.5H13V9h1.5a.5.5 0 0 0 0-1H13V7h.5A1.5 1.5 0 0 0 15 5.5V5a.5.5 0 0 0-1 0v.5a.5.5 0 0 1-.5.5zm-5.5 9.975V7H3V6h-.5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 0-1 0v.5A1.5 1.5 0 0 0 2.5 7H3v1H1.5a.5.5 0 0 0 0 1H3v1h-.5A1.5 1.5 0 0 0 1 11.5v.5a.5.5 0 1 0 1 0v-.5a.5.5 0 0 1 .5-.5H3a5 5 0 0 0 4.5 4.975"/></g></svg>',Nv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"/></svg>',Fv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32"><path fill="currentColor" d="M28 4H10a2.006 2.006 0 0 0-2 2v14a2.006 2.006 0 0 0 2 2h18a2.006 2.006 0 0 0 2-2V6a2.006 2.006 0 0 0-2-2m0 16H10V6h18Z"/><path fill="currentColor" d="M18 26H4V16h2v-2H4a2.006 2.006 0 0 0-2 2v10a2.006 2.006 0 0 0 2 2h14a2.006 2.006 0 0 0 2-2v-2h-2Z"/></svg>',Bv='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"/><path fill="currentColor" d="M9 2a2 2 0 0 0-2 2v2h2V4h11v11h-2v2h2a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM4 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2zm0 2h11v11H4z"/></g></svg>',Hv={},Vv=Object.freeze(Object.defineProperty({__proto__:null,archive:uv,arrowLeft:Tv,arrowRight:Sv,bank:cv,book:yv,bug:Mv,calendar:dv,chat:fv,check:kv,chevronRight:wv,code:Dv,copy:Bv,default:Hv,dropdown:Nv,exitFullscreen:Iv,externalLink:hv,fullscreen:Pv,info:_v,journals:pv,marker:gv,minus:Rv,moon:Ov,pen:mv,pencil:hd,person:vv,popup:Fv,reset:xv,sun:Av,translate:Lv,warning:bv,zoomIn:Ev,zoomOut:Cv},Symbol.toStringTag,{value:"Module"})),jr=e=>Vv[e]||hd;var zv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gd={},md={},ea={exports:{}},De=String,vd=function(){return{isColorSupported:!1,reset:De,bold:De,dim:De,italic:De,underline:De,inverse:De,hidden:De,strikethrough:De,black:De,red:De,green:De,yellow:De,blue:De,magenta:De,cyan:De,white:De,gray:De,bgBlack:De,bgRed:De,bgGreen:De,bgYellow:De,bgBlue:De,bgMagenta:De,bgCyan:De,bgWhite:De,blackBright:De,redBright:De,greenBright:De,yellowBright:De,blueBright:De,magentaBright:De,cyanBright:De,whiteBright:De,bgBlackBright:De,bgRedBright:De,bgGreenBright:De,bgYellowBright:De,bgBlueBright:De,bgMagentaBright:De,bgCyanBright:De,bgWhiteBright:De}};ea.exports=vd();ea.exports.createColors=vd;var jv=ea.exports;(function(e){var n={};Object.defineProperty(e,"__esModule",{value:!0});function t(u,c){for(var f in c)Object.defineProperty(u,f,{enumerable:!0,get:c[f]})}t(e,{dim:function(){return s},default:function(){return a}});const i=r(jv);function r(u){return u&&u.__esModule?u:{default:u}}let o=new Set;function l(u,c,f){typeof process<"u"&&n.JEST_WORKER_ID||f&&o.has(f)||(f&&o.add(f),console.warn(""),c.forEach(h=>console.warn(u,"-",h)))}function s(u){return i.default.dim(u)}const a={info(u,c){l(i.default.bold(i.default.cyan("info")),...Array.isArray(u)?[u]:[c,u])},warn(u,c){l(i.default.bold(i.default.yellow("warn")),...Array.isArray(u)?[u]:[c,u])},risk(u,c){l(i.default.bold(i.default.magenta("risk")),...Array.isArray(u)?[u]:[c,u])}}})(md);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});const n=t(md);function t(o){return o&&o.__esModule?o:{default:o}}function i({version:o,from:l,to:s}){n.default.warn(`${l}-color-renamed`,[`As of Tailwind CSS ${o}, \`${l}\` has been renamed to \`${s}\`.`,"Update your configuration file to silence this warning."])}const r={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return i({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return i({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return i({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return i({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return i({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}})(gd);let Do=gd;var Uv=(Do.__esModule?Do:{default:Do}).default;const Ut=pd(Uv);function Wv(e,n,t){const i=e.split(",").map(r=>[...n.querySelectorAll(r.replace(":","--"))]).flat();i.length!==0&&i.forEach(r=>{r.setAttribute("data-annotation",!0),s0(r,"data-annotation-ids",t),r.setAttribute("data-annotation-level",-1)})}const Gv=e=>{const n=jr(e);if(!n)return null;const t=document.createElement("figure");return t.classList.add("t-relative","t-inline-flex","t-w-4","t-h-4","t-mb-[2px]","t-ml-0.5","t-text-primary","t-align-middle"),t.classList.add(`icon-${e}`),t.innerHTML=n,t};function Kv(e,n){const t=e.hasAttribute("data-annotation-level")?parseInt(e.getAttribute("data-annotation-level"),10):0;return n==="INC"?t+1:n==="DEC"?t-1:t}function yn(e,{operation:n,level:t}={}){(e?[...document.querySelectorAll(e)]:[]).forEach(r=>{yd(r,{operation:n,level:t})})}function Mo(e){return e.hasAttribute("data-annotation-level")?parseInt(e.getAttribute("data-annotation-level"),10):-1}function yd(e,{operation:n,level:t}){if(e.hasAttribute("data-annotation")){const i=t!==void 0?t:Kv(e,n);e.setAttribute("data-annotation-level",i)}[...e.children].forEach(i=>yd(i,{operation:n,level:t}))}function kt(e){let n=null;const t=e.target.length>0?e.target[0].selector:void 0;if(t)t.type==="CssSelector"?n=zl(t):t.type==="FragmentSelector"&&(n=zl(e.body.selector));else{let r=e.target.id;r&&(r=r.split("/").pop(),n=`#annotation-${r}`)}return o0(n)?n:null}function zl(e){return e.value??null}function qv(e,n,t){let i=!1;if([...e.children].forEach(r=>{r.nodeName==="svg"&&r.getAttribute("data-annotation-icon")&&(i=!0)}),!i)try{const r=Gv(t);r.setAttribute("data-annotation-icon",n.id),e.prepend(r)}catch(r){console.log(r)}}function jl(e){const n=e.id,t=document.querySelector(`figure[data-annotation-icon='${n}']`);t&&t.remove()}function Zv(e,n,t){let i=e.parentElement;const r=[].slice.call(i.children).indexOf(e);if(r<0)return;const o=Xv(n,t);let l=!1;if(r===0?l=!1:l=i.children[r-1].classList.contains("witnesses"),l)i.children[r-1].appendChild(o);else{const s=Yv();s.appendChild(o),i.insertBefore(s,e)}}function Yv(){const e=document.createElement("span");return e.classList.add("witnesses","t-inline-flex","t-flex-wrap"),e}function Xv(e,n){const t=document.createElement("span");return t.innerHTML=e&&e.idnoAlt?e.idnoAlt:"-",t.setAttribute("data-idno",e.idno??"-"),t.classList.add("t-rounded-3xl","t-box-border","t-py-0.5","t-px-1.5","t-text-xs","t-font-semibold","t-font-sans","t-ml-[3px]"),t.style.background=Ut[n][100],t.style.color=Ut[n][600],t}function Jv(){const e=document.querySelectorAll(".content-view"),n=[];e.forEach(t=>n.push(...Array.from(t.querySelectorAll(".witnesses")))),n.forEach(t=>{t.remove()})}function Ul(e,n){const t=document.querySelectorAll(".content-view");if(t.length===0||Array.from(t).findIndex(l=>l.querySelectorAll(".witnesses").length>0)===-1)return;const r=Qv(e);if(!r||Array.from(r.children).length===0)return;const o=Array.from(r.children).filter(l=>l.getAttribute("data-idno")===n);o.length>0&&o[0].remove()}function Qv(e){const n=document.querySelector(e);if(!n)return null;const t=n.parentElement,i=[].slice.call(t.children).indexOf(n);return i<1?null:t.children[i-1]}function Ei(e){return(e==null?void 0:e.body["x-content-type"])==="Variant"}function $v(e,n){let t=[];return!e||e.length===0?[]:(e.forEach(i=>{i.body["x-content-type"]===n&&t.push(i)}),t)}const e0=(e,n)=>{const t="normal";let i="normal";const r=document.querySelector(`${n} .tido`);if(!r)return!1;const o=e.split("/");if(o.length===0)return!1;const l=o[o.length-1],[s,a]=l.split(".");if(s.toLowerCase().includes("bold")&&(i=700),!s||!a)return!1;const u=document.createElement("style");return u.id=e,u.innerHTML=`@font-face {
  font-family: "${s}";
  font-weight: ${i};
  font-style: ${t};
  src: url(${e}) format("${a}");
}`,r.appendChild(u),!0},t0=e=>{const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href",e),n.setAttribute("id",e),document.head.appendChild(n)},co=async(e=2500)=>new Promise(n=>setTimeout(n,e)),n0=e=>new DOMParser().parseFromString(e,"text/html"),i0=(e,n)=>{if(!e||!n)return!1;const t=e.getBoundingClientRect(),i=n.getBoundingClientRect();return(Math.min(t.bottom,i.bottom)-Math.max(t.top,i.top))/t.height>=.7},r0=e=>document.createDocumentFragment().querySelector(e),o0=e=>{try{r0(e)}catch{return!1}return!0};function s0(e,n,t){const i=e.getAttribute(n);i?i.match(t)||e.setAttribute(n,`${i} ${t}`):e.setAttribute(n,t)}function fo(e,n){const t=e.getAttribute(n);return t?t.split(" "):[]}function ta(e,n){const{bottom:t,top:i}=e.getBoundingClientRect(),{top:r,height:o}=n.getBoundingClientRect();(t>o||i<r)&&e.scrollIntoView({block:"center",behavior:"smooth"})}class a0{async pushQuery(n){const t=new URL(window.location);t.searchParams.set("tido",n),window.history.pushState({},"",t)}getValueInOldQuery(n,t){const i=n.split("_");let r="";return i.forEach(o=>{o.includes(t)&&(r=o.slice(1))}),r}async updateQueryFinal(n,t){let i=this.getQuery();const r=["m","i","s","p"];let o=[null,null,null,null];i!==""&&r.forEach((a,u)=>{i.includes(a)&&(o[u]=this.getValueInOldQuery(i,a))});const l=r.findIndex(a=>a===t);o[l]=n;const s=o.map((a,u)=>({item:a,index:u})).filter(({item:a})=>a!==null).map(({item:a,index:u})=>r[u]+a).join("_");await this.pushQuery(s)}async updatePanels(n){const t=Object.keys(n).map(i=>`${i}.${n[i]}`).join("-");this.updateQueryFinal(t,"p")}async updateShow(n=[]){await co(300);let t=n.join("-");t===""&&(t=null),this.updateQueryFinal(t,"s")}async updateItem(n){this.updateQueryFinal(n,"i")}async updateManifest(n){this.updateQueryFinal(n,"m")}async updateQuery(n){for(const t of Object.keys(n))t==="i"&&this.updateItem(n[t]),t==="m"&&this.updateManifest(n[t])}getQuery(){return new URLSearchParams(window.location.search).get("tido")??""}}const oi=new a0,Ge=qs("config",()=>{const e=de(null),n=de({container:"#app",collection:"",manifest:"",item:"",fitPanels:!0,panels:[{label:"contents",toggle:!0,show:!0,width:1,views:[{id:"tree",label:"contents",connector:{id:1,options:{labels:{item:"Sheet",manifest:"Manuscript"}}}}]},{label:"metadata",show:!0,toggle:!0,width:1,views:[{id:"metadata",label:"metadata",connector:{id:2,options:{collection:{all:!0},manifest:{all:!0},item:{all:!0}}}}]},{label:"image",show:!0,toggle:!0,width:1,views:[{id:"image",label:"Image",connector:{id:3}}]},{label:"text",show:!0,toggle:!0,width:1,views:[{id:"text1",label:"Transcription",default:!0,connector:{id:4}}]},{label:"annotations",show:!0,toggle:!0,width:1,views:[{id:"annotations1",label:"annotations",connector:{id:5,options:{types:[]}}}]}],colors:{forceMode:"none",primary:"",secondary:"",accent:""},header:{show:!0,navigation:!0,panelsToggle:!0,languageSwitch:!1},labels:{item:"Sheet",manifest:"Manuscript"},lang:"en",meta:{collection:{all:!0},manifest:{all:!0},item:{all:!0}},notificationColors:{info:"blue-400",warning:"red-400"}}),t=de([]),i=de(!1),r={label:"Panel",show:!0,toggle:!0,views:[]},o={id:"view",name:"View",default:!1,connector:{id:1,options:{}}},l=J(()=>{const F=n.value.panels.findIndex(({views:K})=>K.find(({connector:se})=>se.id===4));if(F===-1)return-1;const q=t.value[F];return n.value.panels[F].views[q].connector.options.type});function s(te){var ce,me;const q=n.value.panels.findIndex(({views:Ce})=>Ce.find(({connector:b})=>b.id===5));if(q===-1)return;const K=t.value[q];return(me=((ce=n.value.panels[q].views[K].connector.options)==null?void 0:ce.types).find(({name:Ce})=>Ce===te))==null?void 0:me.icon}function a(te){n.value=te}async function u(te,F){t.value[F]!==void 0&&(t.value[F]=te),await oi.updatePanels(t.value)}function c(te){n.value.panels=te}function f(te,F){n.value.panels[te].show=F}function h(te,F){te.value=te,F.value=F}function p(te){t.value=te}function g(te){e.value=te}function y(te){return!!te}function T(te){return!!te}function v(te){return!!te}function E(te){return!!te&&Object.keys(te).every(F=>F==="en"||F==="de")}function O(te){return!!te&&Array.isArray(te)}function P(te){return!!te}function D(te){return!!te}function H(te){return!!te}function M(te,F){if(!te)return!1;const q=Object.keys(F);return Object.keys(te).filter(se=>q.findIndex(ce=>ce===se)===-1).length===0}function B(te,F){if(!te||!F)return!1;let q=!0;return Object.keys(te).forEach(K=>{(!(K in F)||te[K]==="")&&(q=!1)}),q}function R(te){return typeof te=="boolean"}function V(te){return te.filter(F=>F.views&&F.views.length>0).map(F=>{const q=F.views.findIndex(K=>K.default===!0);return q>-1?q:0}).reduce((F,q,K)=>(F[K]=q,F),{})}function $(te,F){if(te==="")return[void 0,void 0,void 0,void 0];const q=te.split("_"),K=q.find(Ce=>Ce[0].includes(F[0])),se=q.find(Ce=>Ce[0].includes(F[1])),ce=q.find(Ce=>Ce[0].includes(F[2])),me=q.find(Ce=>Ce[0].includes(F[3]));return[K,se,ce,me]}function N(te){return/m\d+$/.exec(te)!==null}function re(te){return/i\d+$/.exec(te)!==null}function Z(te,F,q){const K=F.split("-"),se=/^\d+$/;if(te[0]!=="p"||K.length!==q)return!1;for(let ce=0;ce<K.length;ce++){const me=K[ce];if(me.length!==3||se.test(me[0])===!1||se.test(me[2])===!1||me[1]!==".")return!1}return!0}function le(te,F){const q=te.split("-"),K=/\d\-/;if(q.length>F)return!1;for(let me=0;me<q.length-1;me++)if(te.slice(me*2,me*2+2).match(K)===null)return!1;const se=te.slice(-1)[0],ce=parseInt(se,10);return!(/^\d+$/.test(se)===!1||ce>=F||ce<0)}function oe(te){let F="";for(let q=0;q<te;q++)q!==te-1?F+=`${q}.0-`:F+=`${q}.0`;return F}function pe(te){return te.reduce((F,q)=>{const[K,se]=q.split(".").map(ce=>parseInt(ce,10));return F[K]=se,F},{})}function _e(te,F){const{container:q,translations:K,collection:se,manifest:ce,item:me,panels:Ce,lang:b,colors:d,header:m,labels:x,fitPanels:I}=te;return{...H(q)&&{container:q},...y(se)&&{collection:se},...T(ce)&&{manifest:ce},...v(me)&&{item:me},...E(K)&&{translations:K},...O(Ce)&&{panels:Ce},...P(b)&&{lang:b},...D(d)&&{colors:d},...M(m,F.header)&&{header:m},...B(x,F.labels)&&{labels:x},...R(I)&&{fitPanels:I}}}function Fe(te){const F={},q=oi.getQuery(),K=["m","i","p","s"];let[se,ce,me,Ce]=[void 0,void 0,void 0,void 0];const b=te.panels?te.panels.length:0,[d,m,x,I]=$(q,K);if(d!==void 0)if(N(d))F.m=parseInt(d.slice(1),10);else throw new Error(ht.global.t("error_manifestpart_tido_url"));if(m!==void 0)if(re(m))F.i=parseInt(m.slice(1),10);else throw new Error(ht.global.t("error_itempart_tido_url"));if(x!==void 0){const U=x.slice(1);if(Z(x,U,b))me=U;else throw new Error(ht.global.t("error_panelspart_tido_url"))}else me=oe(b);const A=me!==""?me.split("-"):[];if(F.activeViews=pe(A),I!==void 0){const U=I.slice(1);if(le(U,b))F.show=U.split("-").map(Number);else throw new Error(ht.global.t("error_showpart_tido_url"))}return F}function ge(te){return{...JSON.parse(JSON.stringify(te)),activeViews:V(te.panels)}}function Ne(te){const F=_e(te,n.value),q=Fe(te),K=ge(n.value),se={...K.header,...F.header};if(F.panels&&(F.panels=F.panels.map(b=>(b.views&&(b.views=b.views.map(d=>({...o,...d}))),{...r,...b})),!q.show&&F.panels.find(d=>d.show===!1))){const d=F.panels.reduce((m,x,I)=>x.show?[...m,I]:m,[]);oi.updateShow(d)}const ce={...K,...F,header:se};window.localStorage.setItem("tido-config",JSON.stringify(ce));const me={...K,...F,...q,header:se},Ce=q.activeViews||K.activeViews;p(Ce),me.show&&me.show.length>0&&(me.panels.map((b,d)=>me.panels[d].show=!1),me.show.forEach(b=>{!Number.isInteger(b)||!me.panels[b]||(me.panels[b].show=!0)})),me.translations&&Object.keys(me.translations).forEach(d=>{ht.global.setLocaleMessage(d,{...xn[d]?xn[d]:{},...me.translations[d]})}),a(me),q.activeViews?p(Ce):tt(!1)}function We({index:te,show:F}){f(te,F);const q=n.value.panels.reduce((K,se,ce)=>se.show?[...K,ce]:K,[]);oi.updateShow(q)}function it(te){const F={...n.value};F.panels[3].views[0].connector.options={type:te},a(F)}async function tt(te=!0){const F=[];n.value.panels.forEach(({views:q},K)=>{let se=q.findIndex(ce=>!!ce.default);se===-1&&(se=0),F[K]=se}),te&&await oi.updatePanels(F),p(F)}return{instanceId:e,config:n,activeViews:t,isValid:i,activeContentType:l,getIconByType:s,setConfig:a,setActivePanelView:u,setPanels:c,setShowPanelSetter:f,loadConfig:h,setActiveViews:p,setInstanceId:g,validateCollection:y,validateManifest:T,validateItem:v,validateTranslations:E,validatePanels:O,validateLang:P,validateColors:D,validateContainer:H,validateLabels:B,validateHeader:M,createDefaultActiveViews:V,splitUrlParts:$,isManifestPartValid:N,isItemPartValid:re,isShowPartValid:le,isPanelsPartValid:Z,createDefaultPanelValue:oe,createActiveViewsFromPanelsArray:pe,discoverCustomConfig:_e,discoverUrlConfig:Fe,discoverDefaultConfig:ge,load:Ne,setShowPanel:We,setContentType:it,setDefaultActiveViews:tt}});async function En(e){try{const n=await fetch(e),t=n.headers.get("Content-Type");if(t.includes("application/json"))return await n.json();if(t.includes("text"))return n.text()}catch({response:n}){if(!n)throw Wl(null,`${ht.global.t("failed_to_fetch_url")} ${e}`);if(n.status!==200)throw Wl(n.status,n.message)}return null}function Wl(e,n){let t=ht.global.t("server_error");return e===404?t=ht.global.t("not_found"):e===401&&(t=ht.global.t("unauthorized")),t=ht.global.t(t),{title:t,message:n}}class l0{constructor(){this.events={}}on(n,t){return this.events[n]||(this.events[n]=[]),this.events[n].push(t),()=>this.off(n,t)}off(n,t){this.events[n]&&(this.events[n]=this.events[n].filter(i=>i!==t))}emit(n,t){this.events[n]&&this.events[n].forEach(i=>i(t))}}const na=new l0,u0=(e,n)=>{const t=e.replace(/#/g,""),i=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),o=parseInt(t.substr(4,2),16);return`--color-${n}: ${i}, ${r}, ${o}; --color-${n}-accent: ${i-15}, ${r-15}, ${o-15};`};function c0(){return["rose","amber","violet","lime","blue","teal","pink","orange","gray"]}function d0(e){return c0()[e]}const xt=qs("annotations",()=>{const e=de(""),n=de({}),t=de({}),i=de(null),r=de([]),o=de({}),l=de([]),s=de([]),a=de(!1),u=de(!1);let c=mi({});const f=F=>{n.value=F};function h(F){s.value=F}function p(F){c=F}function g(F){a.value=F}function y(F){t.value=F}function T(){const F=[];return l.value.length===0?[]:Object.keys(c).length===0?[]:(l.value.forEach(q=>{q.body.value.witnesses.find(ce=>c[ce]===!0)&&F.push(q)}),F)}const v=F=>{const q=xt(),K=i.value.find(Ce=>Ce.id===F);if(!K||n.value[F])return;const se={...n.value};se[F]=K,q.setActiveAnnotations(se);const ce=kt(K),me=ce?[...Array.from(document.querySelectorAll(ce))]:[];if(me.length>0){const Ce=me[0];Ei(K)?(Mo(Ce)<=0&&yn(ce,{operation:"INC"}),O(Ce,K)):(yn(ce,{operation:"INC"}),E(Ce,K)),ta(Ce,Ce.closest(".panel-body"))}},E=(F,q)=>{const se=Ge().getIconByType(q.body["x-content-type"]);se&&qv(F,q,se)},O=(F,q)=>{q.body.value.witnesses.forEach(K=>{Zv(F,o.value[K],t.value[K])})},P=F=>{const K=Ge().activeContentType;i.value!==null&&(l.value=F.length===0?i.value:i.value.filter(se=>{const ce=F.find(({name:Ce})=>Ce===se.body["x-content-type"]);if(!ce)return!1;if(ce!=null&&ce.displayWhen&&(ce==null?void 0:ce.displayWhen)===K)return!0;const me=kt(se);return!!(me&&document.querySelector(me))})),h(l.value)},D=F=>{Object.keys(n.value).filter(K=>!F.find(se=>n.value[K].body.value.witnesses.includes(se))).forEach(K=>V(K));const q=Object.keys(n.value);s.value.filter(K=>!q.includes(K.id)).forEach(K=>{const se=kt(K);if(!se)return;q.filter(me=>se===kt(n.value[me])).length>0||yn(se,{level:-1})}),s.value=i.value.filter(K=>Ei(K)&&F.find(se=>K.body.value.witnesses.includes(se))),s.value.filter(K=>!q.includes(K.id)).forEach(K=>{const se=kt(K);if(!se)return;const ce=q.filter(Ce=>se===kt(n.value[Ce])).length>0,me=document.querySelector(se);me&&!ce&&Mo(me)<0&&yn(se,{level:0})})},H=F=>{i.value!==null&&i.value.forEach(q=>{const{id:K}=q,se=kt(q);se&&Wv(se,F,K)})},M=({items:F=[],refs:q=[]})=>{i.value=F,r.value=q,o.value=q.reduce((K,se)=>(K[se.idno]=se,K),{}),B(),R(),g(!1)};function B(){if(i.value.length===0)return;let F=!1;for(let q=0;q<i.value.length;q++){const K=i.value[q];Ei(K)&&(!Array.isArray(K.body.value.witnesses)||K.body.value.witnesses.length===0)&&(K.body.value.witnesses=["missing"],F=!0)}F&&r.value.push({idno:"missing",manifest:""})}function R(){const F={};r.value&&r.value.length!==0&&(r.value.forEach((q,K)=>{F[q.idno]=d0(K)}),y(F))}const V=F=>{const q=xt(),K=n.value[F];if(!K)return;const se={...n.value};delete se[F],q.setActiveAnnotations(se);const ce=kt(K);document.querySelector(ce)&&(Ei(K)?(Mo(document.querySelector(ce))>0&&Object.keys(n.value).findIndex(Ce=>kt(n.value[Ce])===ce)===-1&&yn(ce,{operation:"DEC"}),N(ce,K)):(yn(ce,{operation:"DEC"}),$(K)))},$=F=>{Ge().getIconByType(F.body["x-content-type"])&&jl(F)},N=(F,q)=>{q.body.value.witnesses.forEach(K=>{Ul(F,K)})},re=()=>{i.value!==null&&i.value.forEach(F=>{const q=kt(F);q&&(yn(q,{level:-1}),jl(F),Ei(F)&&F.body.value.witnesses.forEach(K=>{Ul(q,K)}))}),f({})},Z=async F=>{try{const q=await En(F);if(!q.first){M({items:[],refs:[]});return}const K=await En(q.first);Array.isArray(K.items)&&M(K)}catch(q){console.error(q),M({items:[],refs:[]})}},le=F=>{if(!F)return;const q=({target:K})=>{K.dataset.annotation||(K=oe(K)),K&&na.emit("click",{target:K})};return F.addEventListener("click",q),q};function oe(F){var K;const q=F.parentElement;return q?(K=q.dataset)!=null&&K.annotation?q:oe(q):null}const pe=()=>{l.value.forEach(({id:F})=>!n.value[F]&&v(F))},_e=()=>{l.value.forEach(({id:F})=>n.value[F]&&V(F))},Fe=F=>{F.forEach(q=>{const K=i.value.find(se=>se.id===q);K&&s.value.push(K)})},ge=F=>{F.forEach(q=>{const K=i.value.find(se=>se.id===q);if(K){const se=s.value.findIndex(ce=>ce.id===K.id);se>-1&&s.value.splice(se,1)}})},Ne=F=>{F.forEach(q=>{const K=i.value.find(se=>se.id===q);K&&v(K.id)})},We=F=>{F.forEach(q=>{const K=i.value.find(se=>se.id===q);K&&V(K.id)})},it=()=>{const F=l.value.reduce((q,K)=>{const se=kt(K);return q!==""&&(q+=","),q+=se,q},"");F&&yn(F,{level:0})};return{activeTab:e,activeAnnotations:n,annotations:i,witnesses:r,witnessesMap:o,filteredAnnotations:l,visibleAnnotations:s,isLoading:a,isSingleSelectMode:u,variantItemsColors:t,activeWitnessesIds:c,setActiveAnnotations:f,setVisibleAnnotations:h,setVariantItemsColors:y,setActiveWitnessesIds:p,addActiveAnnotation:v,selectFilteredAnnotations:P,addHighlightAttributesToText:H,annotationLoaded:M,preprocessVariants:B,allocateWitnessColorInVariantItem:R,removeActiveAnnotation:V,resetAnnotations:re,initAnnotations:Z,addHighlightClickListeners:le,selectAll:pe,selectNone:_e,filterAnnotationsByWitnesses:D,highlightTargetsLevel0:it,enableSingleSelectMode:()=>{re(),it(),s.value=[],u.value=!0},disableSingleSelectMode:()=>{re(),s.value=T(),it(),u.value=!1},activateAnnotationsByIds:Ne,deactivateAnnotationsByIds:We,addVisibleAnnotations:Fe,removeVisibleAnnotations:ge}}),vt=qs("contents",()=>{const e=de({}),n=de(null),t=de(null),i=de(null),r=de(null),o=de(null),l=J(()=>n.value?Object.keys(n.value).length?n.value.title[0].title?n.value.title[0].title:"Undefined collection title":"Manifest <small>(No label available)</small>":null),s=J(()=>o.value?o.value.sequence.findIndex(M=>M.id===i.value):-1);function a(M){n.value={...M}}function u(M){t.value=M}function c(M){i.value=M}function f(M){r.value=M}function h(M){Array.isArray(M.sequence)||(M.sequence=[M.sequence]),o.value={...M}}function p(M,B){e.value={...e.value,[B]:M}}function g(M=[],B){return M===null||M.length===0?-1:B?(B=encodeURI(decodeURI(B)),M.findIndex(({sequence:R})=>(R=Array.isArray(R)?R:[R],R.find(({id:V})=>encodeURI(decodeURI(V))===B)))):0}function y(M){const B=M.manifest;return r.value.findIndex(R=>R.id===B)}async function T(M){return await En(M)}function v(M,B){return M>=0&&M<B}function E(M,B){return M>=0&&M<B}return{activeContentMap:e,collection:n,item:t,itemUrl:i,manifests:r,manifest:o,collectionTitle:l,itemIndex:s,setCollection:a,setItem:u,setItemUrl:c,setManifests:f,setManifest:h,setActiveContentMap:p,findActiveManifestIndex:g,findManifestIndexOfManifestInConfig:y,getManifest:T,isManifestPartInsideRangeValue:v,isItemPartInsideRangeValue:E,initCollection:async M=>{const B=Ge(),R=vt(),V=B.config;let{item:$}=V,N,re,Z,le;try{N=await En(M)}catch{throw new Error(ht.global.t("error_collection_url"))}R.setCollection(N);const oe=Object.keys(N).length>0?N.sequence.length:0;if(oe===0)throw new Error(ht.global.t("error_no_manifests_in_initCollection"));if("m"in V&&!v(V.m,oe))throw new Error(`Please enter 'm' as integer in this range [0,${oe})`);if(Array.isArray(N.sequence)&&N.sequence.length>0){const pe=[];N.sequence.forEach(Ne=>pe.push(T(Ne.id)));const _e=await Promise.all(pe);R.setManifests(_e),"m"in V&&"i"in V?(Z=V.m,le=V.i):"m"in V?(Z=V.m,le=0):"i"in V?(le=V.i,"manifest"in V&&V.manifest!==""?Z=y(V):Z=0):"manifest"in V&&V.manifest!==""?(Z=y(V),le=0):[Z,le]=[0,0];const Fe=_e[Z].sequence.length;if(!E(le,Fe))throw new Error(`Please enter 'i' as integer in this range [0,${Fe})`);re=_e[Z],$=re.sequence[le].id;const{support:ge}=re;ge&&ge.length>0&&await R.getSupport(ge),R.setManifest(re),R.initItem($)}},initManifest:async M=>{const B=vt();let R,V,$;const N=Ge();try{R=await En(M)}catch{throw new Error(ht.global.t("error_manifest_url"))}if(Array.isArray(R.sequence)&&R.sequence.length<=0)throw new Error(ht.global.t("error_no_items_in_manifest"));const re=R.sequence.length;B.setManifest(R);const Z=N.config;if(V=Z.item,"collection"in Z&&Z.collection===""&&("m"in Z&&"i"in Z||"m"in Z))throw new Error(ht.global.t("error_m_in_url_no_collection"));if("i"in Z&&!("m"in Z))$=Z.i;else if(V!==""){if($=R.sequence.findIndex(oe=>oe.id===V),$===-1)throw new Error(ht.global.t("error_item_not_in_manifest"))}else Z.manifest!==""&&($=0);const{support:le}=R;if(le&&le.length>0&&await B.getSupport(le),$!==void 0){if(!E($,re))throw new Error(`Please enter 'i' as integer in this range [0,${re})`);V=R.sequence[$].id,await B.initItem(V)}},initItem:async M=>{const B=xt(),R=vt();let V;try{V=await En(M)}catch{throw new Error(ht.global.t("error_item_url"))}R.setItem(V),R.setItemUrl(M),V.annotationCollection&&await B.initAnnotations(V.annotationCollection);const $=s.value,N=R.findActiveManifestIndex(r.value,M),re=r.value&&r.value.length>0?{m:N,i:$}:{i:$};await oi.updateQuery(re)},getSupport:M=>{const B=Ge(),{container:R}=B.config;M==null||M.forEach(V=>{const $=document.getElementById(V.url);V.type==="font"&&!$&&e0(V.url,R),V.type!=="font"&&!$&&t0(V.url)})}}}),f0=["innerHTML"],dn=ze({__name:"BaseIcon",props:{name:{}},setup(e){return(n,t)=>(L(),j("i",{innerHTML:Re(jr)(n.name)},null,8,f0))}}),h0=["disabled"],Mt=ze({__name:"BaseButton",props:{text:{default:""},display:{default:"filled"},size:{default:"normal"},icon:{default:null},iconPosition:{default:"left"},rounded:{type:[Boolean,null],default:null},disabled:{type:Boolean,default:!1}},setup(e){const n=e;let t;Ve(()=>n.icon,s=>t=s,{immediate:!0});let i=n.iconPosition,r=!1;n.text===""&&t!==null&&(r=!0,i=null);let o=!1;n.rounded===null&&n.text===""&&(o=!0),n.rounded===null&&n.text!==""&&(o=!1),n.rounded!==null&&(o=n.rounded);const l={};return n.display==="link"&&(i="right",t="heroicons:arrow-right-20-solid"),l["focus-visible:t-outline-none focus-visible:t-ring-4 !t-flex t-items-center t-justify-center disabled:t-opacity-50"]=!0,l["t-rounded-md"]=!o,l["t-rounded-full"]=o,l["t-py-2 t-ps-3 t-pe-5"]=n.size==="normal"&&!!t&&i==="left",l["t-py-2 t-ps-5 t-pe-3"]=n.size==="normal"&&!!t&&i==="right",l["t-p-[0.6rem]"]=n.size==="normal"&&r,l["t-py-2 t-px-5"]=n.size==="normal"&&!t,l["t-py-1.5 t-ps-2 t-pe-3"]=n.size==="small"&&!!t&&i==="left",l["t-py-1.5 t-ps-3 t-pe-2"]=n.size==="small"&&!!t&&i==="right",l["t-p-2"]=n.size==="small"&&r,l["t-py-1.5 t-px-3"]=n.size==="small"&&!t,l["t-py-1 t-ps-1 t-pe-1.5"]=n.size==="tiny"&&!!t&&i==="left",l["t-py-1 t-ps-1.5 t-pe-1"]=n.size==="tiny"&&!!t&&i==="right",l["t-p-0.5"]=n.size==="tiny"&&r,l["t-py-1.5 t-px-2"]=n.size==="tiny"&&!t,l["t-text-sm t-leading-2"]=n.size==="normal"&&!r,l["t-text-md t-leading-2"]=n.size==="normal"&&r,l["t-text-sm t-leading-2"]=n.size==="small",l["t-text-xs t-leading-3"]=n.size==="tiny",l["focus-visible:t-ring-primary focus-visible:t-ring-opacity-25 dark:focus-visible:t-ring-primary dark:focus-visible:t-ring-opacity-50 t-bg-primary t-text-white hover:t-bg-primary-700 dark:t-bg-primary dark:hover:t-bg-primary dark:focus:t-ring-green-800 hover:t-bg-primary-accent"]=n.display==="filled",l["focus-visible:t-ring-primary focus-visible:t-ring-opacity-25 dark:focus-visible:t-ring-primary dark:focus-visible:t-ring-opacity-50 t-bg-none t-text-primary hover:t-underline"]=n.display==="link",l["t-bg-gray-300/75 t-text-gray-600 dark:t-text-gray-300 focus:t-ring-zinc-300 focus:t-ring-opacity-50 hover:t-bg-gray-300 hover:dark:t-bg-gray-700 dark:t-bg-gray-800"]=n.display==="mono",l["t-bg-none t-text-primary t-border t-border-primary focus:t-ring-zinc-300 focus:t-ring-opacity-50 hover:t-bg-primary-50 dark:hover:t-bg-zinc-800"]=n.display==="outline",l["t-bg-transparent hover:t-bg-gray-300/30 dark:hover:t-bg-gray-600 focus-visible:t-ring-primary dark:focus-visible:t-ring-primary-300 dark:focus-visible:t-ring-opacity-50 focus-visible:t-ring-opacity-25"]=n.display==="flat",(s,a)=>(L(),j("button",{type:"button",class:qe(l),disabled:s.disabled},[Re(t)&&Re(i)==="left"?(L(),he(dn,{key:0,name:Re(t),class:"t-text-base t-me-1.5"},null,8,["name"])):Se("",!0),Re(r)?(L(),he(dn,{key:1,name:Re(t),class:"mt-[1px]"},null,8,["name"])):(L(),j(Ee,{key:2},[Rn(xe(s.text),1)],64)),Re(t)&&Re(i)==="right"?(L(),he(dn,{key:3,name:Re(t),class:"t-text-base t-ms-1.5"},null,8,["name"])):Se("",!0)],8,h0))}}),Gl=["next_item","previous_item","next_manifest","previous_manifest"];function p0(e){const n=e.lang??"en",t=e.translations?[n]:{};for(let i=0;i<Gl.length;i++)if(!(Gl[i]in t))return!1;return!0}function g0(e){const n=e.lang??"en";if(p0(e)){const t=e.translations[n];return[t.next_item,t.previous_item,t.next_manifest,t.previous_manifest]}else{const t=xn[n];return[t.next_item,t.previous_item,t.next_manifest,t.previous_manifest]}}const m0={class:"t-flex t-space-x-2"},v0=ze({__name:"NavBar",setup(e){const n=Ge(),t=vt(),i=J(()=>t.manifest),r=J(()=>t.manifests),o=J(()=>t.itemUrl),l=J(()=>i.value?i.value.sequence.findIndex(({id:v})=>v===o.value):-1),s=J(()=>!(l.value-1<0&&(r.value===null||r.value.findIndex(({id:O})=>O===i.value.id)-1<0))),a=J(()=>!(l.value+1>i.value.sequence.length-1&&(r.value===null||r.value.findIndex(({id:O})=>O===i.value.id)+1>r.value.length-1))),[u,c,f,h]=g0(n.config),p=J(v=>l.value===-1?v:l.value===i.value.sequence.length-1?`${f}`:`${u}`),g=J(v=>l.value===-1?v:l.value===0?`${h}`:`${c}`);function y(){const v=l.value-1;let E="";if(v<0){const O=r.value.findIndex(({id:D})=>D===i.value.id)-1;if(O<0)return;const P=r.value[O];t.setManifest(P),n.setDefaultActiveViews(),E=P.sequence[P.sequence.length-1].id}else E=i.value.sequence[v].id;t.initItem(E)}function T(){const v=l.value+1;let E="";if(v>i.value.sequence.length-1){const O=r.value.findIndex(({id:D})=>D===i.value.id)+1;if(O>r.value.length-1)return;const P=r.value[O];t.setManifest(P),n.setDefaultActiveViews(),E=P.sequence[0].id}else E=i.value.sequence[v].id;t.initItem(E)}return(v,E)=>(L(),j("div",m0,[i.value?(L(),he(Mt,{key:0,disabled:!s.value,text:g.value,size:"small",icon:"arrowLeft",class:"prev-button",onClick:y},null,8,["disabled","text"])):Se("",!0),i.value?(L(),he(Mt,{key:1,disabled:!a.value,text:p.value,size:"small",icon:"arrowRight","icon-position":"right",class:"next-button",onClick:T},null,8,["disabled","text"])):Se("",!0)]))}}),y0={class:"t-flex t-flex-col t-justify-center"},b0={key:0,class:"sm:t-text-xl md:t-text-2xl t-font-bold"},_0={key:1,class:"t-flex t-items-center t-flex-wrap t-text-xl t-mt-2 t-mb-6"},w0={key:1},T0={key:1,class:"t-align-middle sm:t-text-xl md:t-text-2xl t-font-bold t-mt-2 t-mb-4"},S0={class:"t-align-middle"},x0={key:1,class:"t-align-middle"},E0={key:1,class:"sm:t-text-xl md:t-text-2xl t-font-bold t-mb-4 t-mt-2"},Kl="item",C0=ze({__name:"TitleBar",props:{item:{default:()=>({})}},setup(e){const{t:n}=tn(),t=Ge(),i=vt(),r=J(()=>i.collectionTitle),o=J(()=>{var a;return(a=i.manifest)==null?void 0:a.label});function l(a){const u=a.lang,c=a.translations?[u]:{};if(Object.keys(c).length>0){for(const h in c)if(h===Kl)return!0}return!1}function s(a){const u=a.lang;return l(a)?a.translations[u][Kl]:n("item")}return(a,u)=>(L(),j("div",y0,[r.value||o.value?(L(),j(Ee,{key:0},[r.value?(L(),j(Ee,{key:0},[r.value?(L(),j("h1",b0,xe(r.value),1)):Se("",!0),o.value?(L(),j("h2",_0,[ne("span",null,xe(o.value),1),a.item?(L(),he(dn,{key:0,class:"t-px-2 text-gray-500 dark:text-gray-300",name:"chevronRight"})):Se("",!0),a.item?(L(),j("span",w0,xe(s(Re(t).config))+" "+xe(a.item.n),1)):Se("",!0)])):Se("",!0)],64)):(L(),j("h1",T0,[ne("span",S0,xe(o.value),1),a.item?(L(),he(dn,{key:0,class:"t-inline-flex t-align-middle t-px-2 text-gray-500 dark:text-gray-300",name:"chevronRight"})):Se("",!0),a.item?(L(),j("span",x0,xe(s(Re(t).config))+" "+xe(a.item.n),1)):Se("",!0)]))],64)):(L(),j("h1",E0," TIDO Viewer "))]))}}),bd=1200,hs=de(window.innerWidth<=bd),ps=new Set,ql=()=>{hs.value=window.innerWidth<=bd,ps.forEach(e=>e(hs.value))};let Zl=!1;function ia(){return Zl||(jt(()=>{window.addEventListener("resize",ql)}),dr(()=>{window.removeEventListener("resize",ql)}),Zl=!0),{isMobile:hs,onResize:n=>(ps.add(n),()=>ps.delete(n))}}function Yi(e){"@babel/helpers - typeof";return Yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Yi(e)}function Yl(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Xl(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Yl(Object(t),!0).forEach(function(i){P0(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Yl(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function P0(e,n,t){return n=I0(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function I0(e){var n=O0(e,"string");return Yi(n)=="symbol"?n:String(n)}function O0(e,n){if(Yi(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(Yi(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function A0(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;en()?jt(e):n?e():Qn(e)}var L0=0;function _d(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=de(!1),i=de(e),r=de(null),o=ve.isClient()?window.document:void 0,l=n.document,s=l===void 0?o:l,a=n.immediate,u=a===void 0?!0:a,c=n.manual,f=c===void 0?!1:c,h=n.name,p=h===void 0?"style_".concat(++L0):h,g=n.id,y=g===void 0?void 0:g,T=n.media,v=T===void 0?void 0:T,E=n.nonce,O=E===void 0?void 0:E,P=n.props,D=P===void 0?{}:P,H=function(){},M=function(V){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s){var N=Xl(Xl({},D),$),re=N.name||p,Z=N.id||y,le=N.nonce||O;r.value=s.querySelector('style[data-primevue-style-id="'.concat(re,'"]'))||s.getElementById(Z)||s.createElement("style"),r.value.isConnected||(i.value=V||e,ve.setAttributes(r.value,{type:"text/css",id:Z,media:v,nonce:le}),s.head.appendChild(r.value),ve.setAttribute(r.value,"data-primevue-style-id",p),ve.setAttributes(r.value,N)),!t.value&&(H=Ve(i,function(oe){r.value.textContent=oe},{immediate:!0}),t.value=!0)}},B=function(){!s||!t.value||(H(),ve.isExist(r.value)&&s.head.removeChild(r.value),t.value=!1)};return u&&!f&&A0(M),{id:y,name:p,css:i,unload:B,load:M,isLoaded:ur(t)}}function Xi(e){"@babel/helpers - typeof";return Xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Xi(e)}function R0(e,n){return N0(e)||M0(e,n)||D0(e,n)||k0()}function k0(){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 D0(e,n){if(e){if(typeof e=="string")return Jl(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Jl(e,n)}}function Jl(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function M0(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var i,r,o,l,s=[],a=!0,u=!1;try{if(o=(t=t.call(e)).next,n!==0)for(;!(a=(i=o.call(t)).done)&&(s.push(i.value),s.length!==n);a=!0);}catch(c){u=!0,r=c}finally{try{if(!a&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw r}}return s}}function N0(e){if(Array.isArray(e))return e}function Ql(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function No(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Ql(Object(t),!0).forEach(function(i){F0(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ql(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function F0(e,n,t){return n=B0(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function B0(e){var n=H0(e,"string");return Xi(n)=="symbol"?n:String(n)}function H0(e,n){if(Xi(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(Xi(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var V0=`
.p-hidden-accessible {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.p-hidden-accessible input,
.p-hidden-accessible select {
    transform: scale(0);
}

.p-overflow-hidden {
    overflow: hidden;
    padding-right: var(--scrollbar-width);
}
`,z0={},j0={},Rt={name:"base",css:V0,classes:z0,inlineStyles:j0,loadStyle:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.css?_d(this.css,No({name:this.name},n)):{}},getStyleSheet:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.css){var i=Object.entries(t).reduce(function(r,o){var l=R0(o,2),s=l[0],a=l[1];return r.push("".concat(s,'="').concat(a,'"'))&&r},[]).join(" ");return'<style type="text/css" data-primevue-style-id="'.concat(this.name,'" ').concat(i,">").concat(this.css).concat(n,"</style>")}return""},extend:function(n){return No(No({},this),{},{css:void 0},n)}};function Ji(e){"@babel/helpers - typeof";return Ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ji(e)}function $l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function U0(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?$l(Object(t),!0).forEach(function(i){W0(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$l(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function W0(e,n,t){return n=G0(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function G0(e){var n=K0(e,"string");return Ji(n)=="symbol"?n:String(n)}function K0(e,n){if(Ji(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(Ji(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Fo=Rt.extend({name:"common",loadGlobalStyle:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _d(n,U0({name:"global"},t))}});function Qi(e){"@babel/helpers - typeof";return Qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qi(e)}function q0(e){return Sd(e)||Z0(e)||Td(e)||wd()}function Z0(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wr(e,n){return Sd(e)||Y0(e,n)||Td(e,n)||wd()}function wd(){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 Td(e,n){if(e){if(typeof e=="string")return eu(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eu(e,n)}}function eu(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function Y0(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var i,r,o,l,s=[],a=!0,u=!1;try{if(o=(t=t.call(e)).next,n===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(i=o.call(t)).done)&&(s.push(i.value),s.length!==n);a=!0);}catch(c){u=!0,r=c}finally{try{if(!a&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw r}}return s}}function Sd(e){if(Array.isArray(e))return e}function tu(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Je(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?tu(Object(t),!0).forEach(function(i){Lr(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tu(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function Lr(e,n,t){return n=X0(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function X0(e){var n=J0(e,"string");return Qi(n)=="symbol"?n:String(n)}function J0(e,n){if(Qi(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(Qi(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var qt={name:"BaseComponent",props:{pt:{type:Object,default:void 0},ptOptions:{type:Object,default:void 0},unstyled:{type:Boolean,default:void 0}},inject:{$parentInstance:{default:void 0}},watch:{isUnstyled:{immediate:!0,handler:function(n){if(!n){var t,i;Fo.loadStyle({nonce:(t=this.$config)===null||t===void 0||(t=t.csp)===null||t===void 0?void 0:t.nonce}),this.$options.style&&this.$style.loadStyle({nonce:(i=this.$config)===null||i===void 0||(i=i.csp)===null||i===void 0?void 0:i.nonce})}}}},beforeCreate:function(){var n,t,i,r,o,l,s,a,u,c,f,h=(n=this.pt)===null||n===void 0?void 0:n._usept,p=h?(t=this.pt)===null||t===void 0||(t=t.originalValue)===null||t===void 0?void 0:t[this.$.type.name]:void 0,g=h?(i=this.pt)===null||i===void 0||(i=i.value)===null||i===void 0?void 0:i[this.$.type.name]:this.pt;(r=g||p)===null||r===void 0||(r=r.hooks)===null||r===void 0||(o=r.onBeforeCreate)===null||o===void 0||o.call(r);var y=(l=this.$config)===null||l===void 0||(l=l.pt)===null||l===void 0?void 0:l._usept,T=y?(s=this.$primevue)===null||s===void 0||(s=s.config)===null||s===void 0||(s=s.pt)===null||s===void 0?void 0:s.originalValue:void 0,v=y?(a=this.$primevue)===null||a===void 0||(a=a.config)===null||a===void 0||(a=a.pt)===null||a===void 0?void 0:a.value:(u=this.$primevue)===null||u===void 0||(u=u.config)===null||u===void 0?void 0:u.pt;(c=v||T)===null||c===void 0||(c=c[this.$.type.name])===null||c===void 0||(c=c.hooks)===null||c===void 0||(f=c.onBeforeCreate)===null||f===void 0||f.call(c)},created:function(){this._hook("onCreated")},beforeMount:function(){var n;Rt.loadStyle({nonce:(n=this.$config)===null||n===void 0||(n=n.csp)===null||n===void 0?void 0:n.nonce}),this._loadGlobalStyles(),this._hook("onBeforeMount")},mounted:function(){this._hook("onMounted")},beforeUpdate:function(){this._hook("onBeforeUpdate")},updated:function(){this._hook("onUpdated")},beforeUnmount:function(){this._hook("onBeforeUnmount")},unmounted:function(){this._hook("onUnmounted")},methods:{_hook:function(n){if(!this.$options.hostName){var t=this._usePT(this._getPT(this.pt,this.$.type.name),this._getOptionValue,"hooks.".concat(n)),i=this._useDefaultPT(this._getOptionValue,"hooks.".concat(n));t==null||t(),i==null||i()}},_mergeProps:function(n){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return Oe.isFunction(n)?n.apply(void 0,i):ae.apply(void 0,i)},_loadGlobalStyles:function(){var n,t=this._useGlobalPT(this._getOptionValue,"global.css",this.$params);Oe.isNotEmpty(t)&&Fo.loadGlobalStyle(t,{nonce:(n=this.$config)===null||n===void 0||(n=n.csp)===null||n===void 0?void 0:n.nonce})},_getHostInstance:function(n){return n?this.$options.hostName?n.$.type.name===this.$options.hostName?n:this._getHostInstance(n.$parentInstance):n.$parentInstance:void 0},_getPropValue:function(n){var t;return this[n]||((t=this._getHostInstance(this))===null||t===void 0?void 0:t[n])},_getOptionValue:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Oe.toFlatCase(t).split("."),o=r.shift();return o?Oe.isObject(n)?this._getOptionValue(Oe.getItemValue(n[Object.keys(n).find(function(l){return Oe.toFlatCase(l)===o})||""],i),r.join("."),i):void 0:Oe.getItemValue(n,i)},_getPTValue:function(){var n,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,l=/./g.test(i)&&!!r[i.split(".")[0]],s=this._getPropValue("ptOptions")||((n=this.$config)===null||n===void 0?void 0:n.ptOptions)||{},a=s.mergeSections,u=a===void 0?!0:a,c=s.mergeProps,f=c===void 0?!1:c,h=o?l?this._useGlobalPT(this._getPTClassValue,i,r):this._useDefaultPT(this._getPTClassValue,i,r):void 0,p=l?void 0:this._getPTSelf(t,this._getPTClassValue,i,Je(Je({},r),{},{global:h||{}})),g=this._getPTDatasets(i);return u||!u&&p?f?this._mergeProps(f,h,p,g):Je(Je(Je({},h),p),g):Je(Je({},p),g)},_getPTSelf:function(){for(var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return ae(this._usePT.apply(this,[this._getPT(n,this.$name)].concat(i)),this._usePT.apply(this,[this.$_attrsPT].concat(i)))},_getPTDatasets:function(){var n,t,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r="data-pc-",o=i==="root"&&Oe.isNotEmpty((n=this.pt)===null||n===void 0?void 0:n["data-pc-section"]);return i!=="transition"&&Je(Je({},i==="root"&&Je(Lr({},"".concat(r,"name"),Oe.toFlatCase(o?(t=this.pt)===null||t===void 0?void 0:t["data-pc-section"]:this.$.type.name)),o&&Lr({},"".concat(r,"extend"),Oe.toFlatCase(this.$.type.name)))),{},Lr({},"".concat(r,"section"),Oe.toFlatCase(i)))},_getPTClassValue:function(){var n=this._getOptionValue.apply(this,arguments);return Oe.isString(n)||Oe.isArray(n)?{class:n}:n},_getPT:function(n){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,o=function(s){var a,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=r?r(s):s,f=Oe.toFlatCase(i),h=Oe.toFlatCase(t.$name);return(a=u?f!==h?c==null?void 0:c[f]:void 0:c==null?void 0:c[f])!==null&&a!==void 0?a:c};return n!=null&&n.hasOwnProperty("_usept")?{_usept:n._usept,originalValue:o(n.originalValue),value:o(n.value)}:o(n,!0)},_usePT:function(n,t,i,r){var o=function(y){return t(y,i,r)};if(n!=null&&n.hasOwnProperty("_usept")){var l,s=n._usept||((l=this.$config)===null||l===void 0?void 0:l.ptOptions)||{},a=s.mergeSections,u=a===void 0?!0:a,c=s.mergeProps,f=c===void 0?!1:c,h=o(n.originalValue),p=o(n.value);return h===void 0&&p===void 0?void 0:Oe.isString(p)?p:Oe.isString(h)?h:u||!u&&p?f?this._mergeProps(f,h,p):Je(Je({},h),p):p}return o(n)},_useGlobalPT:function(n,t,i){return this._usePT(this.globalPT,n,t,i)},_useDefaultPT:function(n,t,i){return this._usePT(this.defaultPT,n,t,i)},ptm:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._getPTValue(this.pt,n,Je(Je({},this.$params),t))},ptmi:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ae(this.$_attrsNoPT,this.ptm(n,t))},ptmo:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._getPTValue(n,t,Je({instance:this},i),!1)},cx:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.isUnstyled?void 0:this._getOptionValue(this.$style.classes,n,Je(Je({},this.$params),t))},sx:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t){var r=this._getOptionValue(this.$style.inlineStyles,n,Je(Je({},this.$params),i)),o=this._getOptionValue(Fo.inlineStyles,n,Je(Je({},this.$params),i));return[o,r]}}},computed:{globalPT:function(){var n,t=this;return this._getPT((n=this.$config)===null||n===void 0?void 0:n.pt,void 0,function(i){return Oe.getItemValue(i,{instance:t})})},defaultPT:function(){var n,t=this;return this._getPT((n=this.$config)===null||n===void 0?void 0:n.pt,void 0,function(i){return t._getOptionValue(i,t.$name,Je({},t.$params))||Oe.getItemValue(i,Je({},t.$params))})},isUnstyled:function(){var n;return this.unstyled!==void 0?this.unstyled:(n=this.$config)===null||n===void 0?void 0:n.unstyled},$params:function(){var n=this._getHostInstance(this)||this.$parent;return{instance:this,props:this.$props,state:this.$data,attrs:this.$attrs,parent:{instance:n,props:n==null?void 0:n.$props,state:n==null?void 0:n.$data,attrs:n==null?void 0:n.$attrs},parentInstance:n}},$style:function(){return Je(Je({classes:void 0,inlineStyles:void 0,loadStyle:function(){},loadCustomStyle:function(){}},(this._getHostInstance(this)||{}).$style),this.$options.style)},$config:function(){var n;return(n=this.$primevue)===null||n===void 0?void 0:n.config},$name:function(){return this.$options.hostName||this.$.type.name},$_attrsPT:function(){return Object.entries(this.$attrs||{}).filter(function(n){var t=wr(n,1),i=t[0];return i==null?void 0:i.startsWith("pt:")}).reduce(function(n,t){var i=wr(t,2),r=i[0],o=i[1],l=r.split(":"),s=q0(l),a=s.slice(1);return a==null||a.reduce(function(u,c,f,h){return!u[c]&&(u[c]=f===h.length-1?o:{}),u[c]},n),n},{})},$_attrsNoPT:function(){return Object.entries(this.$attrs||{}).filter(function(n){var t=wr(n,1),i=t[0];return!(i!=null&&i.startsWith("pt:"))}).reduce(function(n,t){var i=wr(t,2),r=i[0],o=i[1];return n[r]=o,n},{})}}},Q0=`
.p-icon {
    display: inline-block;
}

.p-icon-spin {
    -webkit-animation: p-icon-spin 2s infinite linear;
    animation: p-icon-spin 2s infinite linear;
}

@-webkit-keyframes p-icon-spin {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(359deg);
        transform: rotate(359deg);
    }
}

@keyframes p-icon-spin {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(359deg);
        transform: rotate(359deg);
    }
}
`,$0=Rt.extend({name:"baseicon",css:Q0});function $i(e){"@babel/helpers - typeof";return $i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$i(e)}function nu(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function iu(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?nu(Object(t),!0).forEach(function(i){ey(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nu(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function ey(e,n,t){return n=ty(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ty(e){var n=ny(e,"string");return $i(n)=="symbol"?n:String(n)}function ny(e,n){if($i(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if($i(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Nt={name:"BaseIcon",extends:qt,props:{label:{type:String,default:void 0},spin:{type:Boolean,default:!1}},style:$0,methods:{pti:function(){var n=Oe.isEmpty(this.label);return iu(iu({},!this.isUnstyled&&{class:["p-icon",{"p-icon-spin":this.spin}]}),{},{role:n?void 0:"img","aria-label":n?void 0:this.label,"aria-hidden":n})}}},er={name:"CheckIcon",extends:Nt},iy=ne("path",{d:"M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z",fill:"currentColor"},null,-1),ry=[iy];function oy(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),ry,16)}er.render=oy;var sy={root:function(n){var t=n.instance,i=n.props;return["p-checkbox p-component",{"p-highlight":t.checked,"p-disabled":i.disabled,"p-invalid":i.invalid,"p-variant-filled":i.variant?i.variant==="filled":t.$primevue.config.inputStyle==="filled"}]},box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon"},ay=Rt.extend({name:"checkbox",classes:sy}),ly={name:"BaseCheckbox",extends:qt,props:{value:null,modelValue:null,binary:Boolean,name:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:ay,provide:function(){return{$parentInstance:this}}};function uy(e){return hy(e)||fy(e)||dy(e)||cy()}function cy(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dy(e,n){if(e){if(typeof e=="string")return gs(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return gs(e,n)}}function fy(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hy(e){if(Array.isArray(e))return gs(e)}function gs(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}var ra={name:"Checkbox",extends:ly,inheritAttrs:!1,emits:["update:modelValue","change","focus","blur"],methods:{getPTOptions:function(n){var t=n==="root"?this.ptmi:this.ptm;return t(n,{context:{checked:this.checked,disabled:this.disabled}})},onChange:function(n){var t=this;if(!this.disabled&&!this.readonly){var i;this.binary?i=this.checked?this.falseValue:this.trueValue:this.checked?i=this.modelValue.filter(function(r){return!Oe.equals(r,t.value)}):i=this.modelValue?[].concat(uy(this.modelValue),[this.value]):[this.value],this.$emit("update:modelValue",i),this.$emit("change",n)}},onFocus:function(n){this.$emit("focus",n)},onBlur:function(n){this.$emit("blur",n)}},computed:{checked:function(){return this.binary?this.modelValue===this.trueValue:Oe.contains(this.value,this.modelValue)}},components:{CheckIcon:er}},py=["data-p-highlight","data-p-disabled"],gy=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label","aria-invalid"];function my(e,n,t,i,r,o){var l=St("CheckIcon");return L(),j("div",ae({class:e.cx("root")},o.getPTOptions("root"),{"data-p-highlight":o.checked,"data-p-disabled":e.disabled}),[ne("input",ae({id:e.inputId,type:"checkbox",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.value,name:e.name,checked:o.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-invalid":e.invalid||void 0,onFocus:n[0]||(n[0]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:n[1]||(n[1]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),onChange:n[2]||(n[2]=function(){return o.onChange&&o.onChange.apply(o,arguments)})},o.getPTOptions("input")),null,16,gy),ne("div",ae({class:e.cx("box")},o.getPTOptions("box")),[Qe(e.$slots,"icon",{checked:o.checked,class:qe(e.cx("icon"))},function(){return[o.checked?(L(),he(l,ae({key:0,class:e.cx("icon")},o.getPTOptions("icon")),null,16,["class"])):Se("",!0)]})],16)],16,py)}ra.render=my;const vy=["innerHTML"],yy=["innerHTML"],Ur=ze({__name:"BaseCheckbox",props:{id:{default:"default-id"},label:{},modelValue:{type:Boolean},triState:{type:Boolean},round:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){const t=e,i=n,r={root:{class:["t-relative","t-inline-flex","t-align-bottom","t-w-[18px]","t-h-[18px]","t-cursor-pointer","t-select-none"]},box:({props:l,context:s})=>({class:["t-flex","t-items-center","t-justify-center","t-w-[18px]","t-h-[18px]","t-border",{"t-rounded":!t.round},{"t-rounded-full":t.round},{"t-border-gray-300":!s.checked,"t-border-primary t-bg-primary hover:t-bg-primary-accent dark:t-border-primary dark:t-bg-primary":s.checked||t.modelValue===null},{"t-bg-gray-50 dark:t-bg-gray-800 t-border-gray-300 dark:t-border-gray-600 peer-hover:t-border-gray-400 dark:peer-hover:t-border-gray-500":!l.disabled&&!s.checked,"peer-hover:t-bg-primary dark:peer-hover:bg-primary":!l.disabled&&s.checked,"peer-focus-visible:t-border-gray-400 dark:t-peer-focus-visible:border-primary-400 peer-focus-visible:t-ring-2 peer-focus-visible:t-ring-primary/20 dark:t-peer-focus-visible:ring-primary-300/20":!l.disabled,"t-cursor-default t-opacity-60":l.disabled},"t-transition-colors","t-duration-200"]}),input:{class:["t-peer","t-w-full ","t-h-full","t-absolute","t-top-0 t-left-0","t-z-10","t-p-0","t-m-0","t-opacity-0","t-rounded-md","t-outline-none","t-border","t-appearance-none","t-cursor-pointer"]},icon:{class:["t-leading-none","t-w-4","t-h-2.5","t-text-white","t-transition-all","t-duration-200"]}};function o(){return t.modelValue===null?"mixed":t.modelValue===!0?"true":"false"}return(l,s)=>(L(),he(Re(ra),{"model-value":l.modelValue,binary:!0,"input-id":l.id,pt:r,"aria-checked":o(),unstyled:"","onUpdate:modelValue":s[0]||(s[0]=a=>i("update:modelValue",a))},{icon:ct(()=>[l.modelValue===null?(L(),j("i",{key:0,class:"t-leading-none t-w-[18px] t-h-[18px] t-text-lg t-text-white t-transition-all t-flex t-items-center t-justify-center",innerHTML:Re(jr)("minus")},null,8,vy)):l.modelValue===!0?(L(),j("i",{key:1,class:"t-leading-none t-w-[18px] t-h-[18px] t-scale-[0.8] t-text-white t-transition-all t-flex t-items-center t-justify-center",innerHTML:Re(jr)("check")},null,8,yy)):Se("",!0)]),_:1},8,["model-value","input-id","aria-checked"]))}}),by={class:"t-relative"},oa=ze({__name:"BaseDropdown",props:{modelValue:{type:Boolean},buttonText:{},openLeft:{type:Boolean,default:!0},openRight:{type:Boolean,default:!1},size:{default:"normal"}},emits:["update:modelValue"],setup(e,{emit:n}){const t=e,i=n,r=Ge(),o=J(()=>r.config.container);return Ve(()=>t.modelValue,l=>{const s=document.querySelector(o.value+" .tido");let a=s.querySelector("#tido-backdrop");if(l){if(!a){const u=document.createElement("div");u.id="tido-backdrop",u.classList.add("t-fixed","t-top-0","t-left-0","t-z-[999]","t-w-screen","t-h-screen","t-bg-gray-200/30"),s.appendChild(u),a=s.querySelector("#tido-backdrop"),a.clickOutsideEvent=()=>{i("update:modelValue",!1)},a.addEventListener("click",a.clickOutsideEvent)}}else a&&a.remove()}),(l,s)=>(L(),j("div",by,[we(Mt,{display:"mono",icon:"dropdown","icon-position":"right",size:l.size,text:l.buttonText,onClick:s[0]||(s[0]=a=>i("update:modelValue",!l.modelValue))},null,8,["size","text"]),l.modelValue?(L(),j("div",{key:0,class:qe(["t-absolute t-top-[110%] t-z-[1000] t-min-w-full t-shadow-md t-rounded-md t-p-2 t-border dark:t-border-gray-600 dark:t-bg-gray-800 t-bg-gray-50",{"t-right-0":t.openRight,"t-left-0":t.openLeft}])},[Qe(l.$slots,"default")],2)):Se("",!0)]))}}),_y={class:"panels-toggle t-relative"},wy=["for"],Ty={key:1,class:"t-flex t-items-center t-space-x-4"},Sy=["title","for"],xy={__name:"PanelsToggle",setup(e){const{isMobile:n}=ia(),t=Ge(),{t:i}=tn(),r=de([]),o=de(!1),l=J(()=>t.config.panels),s=J(()=>r.value.filter(({show:f})=>!f).length>0?"primary":"grey-7");Ve(l,f=>{r.value=f.filter(({toggle:h})=>h===!0).map(({show:h,label:p},g)=>({index:g,show:h,label:p}))},{immediate:!0});function a(f,h){if(h===!1){let p=0;for(let g=0;g<r.value.length;g+=1)g!==f&&r.value[g].show===!1&&(p+=1);p===r.value.length-1&&(h=!0)}r.value[f].show=h,t.setShowPanel({index:f,show:h})}function u(){const f=window.localStorage.getItem("tido-config");let h;f&&(h=JSON.parse(f)),r.value.forEach((p,g)=>{let y=!0;h&&h.panels[g]&&(y=h.panels[g].show??!0),r.value[g].show=y,t.setShowPanel({index:g,show:y})})}function c(f){const h=i(r.value[f].label),p=`${h[0].toUpperCase()}${h.slice(1)}`;return r.value[f].show?`${i("hide")} ${p} Panel`:`${i("show")} ${p} Panel`}return(f,h)=>(L(),j("div",_y,[Re(n)?(L(),he(oa,{key:0,modelValue:o.value,"onUpdate:modelValue":h[0]||(h[0]=p=>o.value=p),"button-text":f.$t("show_hide_panels"),"open-right":""},{default:ct(()=>[(L(!0),j(Ee,null,et(r.value,({show:p,label:g},y)=>(L(),j("div",{key:`toggle${y}`,class:"t-space-x-2 t-flex t-items-center t-mb-2"},[we(Ur,{id:`panel-toggle-${y}`,"model-value":p,"onUpdate:modelValue":T=>a(y,T)},null,8,["id","model-value","onUpdate:modelValue"]),ne("label",{class:"t-text-nowrap",for:`panel-toggle-${y}`},xe(f.$t(g)),9,wy)]))),128)),r.value.length>0?(L(),he(Mt,{key:0,class:qe("t-text-"+s.value),title:f.$t("reset_view"),text:f.$t("reset"),display:"flat",icon:"reset",onClick:u},null,8,["class","title","text"])):Se("",!0)]),_:1},8,["modelValue","button-text"])):(L(),j("div",Ty,[(L(!0),j(Ee,null,et(r.value,({show:p,label:g},y)=>(L(),j("div",{key:`toggle${y}`,class:"t-flex t-items-center"},[we(Ur,{id:`panel-toggle-${y}`,"model-value":p,round:!0,"onUpdate:modelValue":T=>a(y,T)},null,8,["id","model-value","onUpdate:modelValue"]),ne("label",{title:c(y),for:`panel-toggle-${y}`,class:"t-ml-2 t-text-sm"},xe(f.$t(g)),9,Sy)]))),128)),r.value.length>0?(L(),he(Mt,{key:0,class:qe("t-text-"+s.value),title:f.$t("reset_view"),text:f.$t("reset"),display:"flat",icon:"reset",onClick:u},null,8,["class","title","text"])):Se("",!0)]))]))}},Ey="tido",Cy="4.9.0",Py="Text Viewer for Digital Objects (TIDO)",Iy="TIDO",Oy=["openseadragon","subugoe","TIDO","viewer","vue","tailwindcss","primevue"],Ay="AGPL-3.0-or-later",Ly="Göttingen State and University Library - SUB",Ry=["Noor Amtul <amtul@sub.uni-goettingen.de>","Manikanth Dindigala","Mathias Göbel <goebel@sub.uni-goettingen.de>","Orlin Malkja <malkja@sub.uni-goettingen.de>","Paul Pestov <pestov@sub.uni-goettingen.de>","Frank Schneider","Michelle Weidling <weidling@sub.uni-goettingen.de>","Nils Windisch"],ky="module",Dy="dist/tido.js",My={url:"https://github.com/subugoe/tido/issues"},Ny="https://subugoe.github.io/tido/",Fy={type:"git",url:"git+https://github.com/subugoe/tido.git"},By={"@vitejs/plugin-vue":"^5.0.4","@vueuse/core":"^10.9.0",autoprefixer:"^10.4.17",cypress:"^13.6.6",eslint:"^8.57.0","eslint-plugin-vue":"^9.27.0","http-server":"^14.1.1",ncp:"^2.0.0",openseadragon:"^3.1.0",pinia:"^2.1.7","postcss-html":"^1.7.0",primevue:"^3.49.1",sass:"^1.71.1","standard-version":"^9.5.0","start-server-and-test":"^2.0.3",stylelint:"^16.7.0","stylelint-config-standard":"^36.0.1","stylelint-config-standard-scss":"^13.1.0","stylelint-config-standard-vue":"^1.0.0","stylelint-scss":"^6.4.1",tailwindcss:"^3.4.1","typescript-eslint":"^7.16.1",vite:"^5.2.6",vue:"^3.5.13","vue-i18n":"^9.2.0-beta.35",vuex:"^4.0.1"},Hy=["last 1 version","not dead","not IE 11","> 5%"],Vy={node:">= 20.0.0",npm:">= 6.13.4"},zy={build:"vite build",cypress:"cypress open","cypress:headless":"cypress run --headless",dev:"vite",fix:"npm run fix:vue && npm run fix:js && npm run fix:ts && npm run fix:scss","fix:js":"eslint --fix --ext .js src","fix:ts":"eslint --fix --ext .js src","fix:scss":"stylelint --fix 'src/**/*.{css,scss,vue}'","fix:vue":"eslint --fix --ext .vue src",lint:"npm run lint:vue && npm run lint:js && npm run lint:scss","lint:js":"eslint --ext .js src","lint:ts":"eslint --ext .js src","lint:scss":"stylelint --fix 'src/**/*.{css,scss,vue}'","lint:vue":"eslint --ext=.vue src",release:"npm run build && npm publish","start:mock-api":"http-server tests/mocks -p 8181 -c-1 --silent --cors","start:examples":"http-server examples -p 2222 -c-1 --silent --cors",preview:"npm run build && vite preview","preview:examples":"npm run build && cp -r dist/ examples/dist/ && npm run start:examples",test:"start-server-and-test preview:examples 2222 cypress:headless","write-changelog":"standard-version"},jy=["dist"],Uy={name:Ey,version:Cy,description:Py,productName:Iy,keywords:Oy,license:Ay,author:Ly,contributors:Ry,type:ky,main:Dy,bugs:My,homepage:Ny,repository:Fy,private:!1,devDependencies:By,browserslist:Hy,engines:Vy,scripts:zy,files:jy};function tr(e){"@babel/helpers - typeof";return tr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tr(e)}function ru(e,n){return qy(e)||Ky(e,n)||Gy(e,n)||Wy()}function Wy(){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 Gy(e,n){if(e){if(typeof e=="string")return ou(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ou(e,n)}}function ou(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function Ky(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var i,r,o,l,s=[],a=!0,u=!1;try{if(o=(t=t.call(e)).next,n!==0)for(;!(a=(i=o.call(t)).done)&&(s.push(i.value),s.length!==n);a=!0);}catch(c){u=!0,r=c}finally{try{if(!a&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw r}}return s}}function qy(e){if(Array.isArray(e))return e}function su(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function rt(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?su(Object(t),!0).forEach(function(i){ms(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):su(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function ms(e,n,t){return n=Zy(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Zy(e){var n=Yy(e,"string");return tr(n)=="symbol"?n:String(n)}function Yy(e,n){if(tr(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(tr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Be={_getMeta:function(){return[Oe.isObject(arguments.length<=0?void 0:arguments[0])||arguments.length<=0?void 0:arguments[0],Oe.getItemValue(Oe.isObject(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1])]},_getConfig:function(n,t){var i,r,o;return(i=(n==null||(r=n.instance)===null||r===void 0?void 0:r.$primevue)||(t==null||(o=t.ctx)===null||o===void 0||(o=o.appContext)===null||o===void 0||(o=o.config)===null||o===void 0||(o=o.globalProperties)===null||o===void 0?void 0:o.$primevue))===null||i===void 0?void 0:i.config},_getOptionValue:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Oe.toFlatCase(t).split("."),o=r.shift();return o?Oe.isObject(n)?Be._getOptionValue(Oe.getItemValue(n[Object.keys(n).find(function(l){return Oe.toFlatCase(l)===o})||""],i),r.join("."),i):void 0:Oe.getItemValue(n,i)},_getPTValue:function(){var n,t,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=function(){var E=Be._getOptionValue.apply(Be,arguments);return Oe.isString(E)||Oe.isArray(E)?{class:E}:E},u=((n=i.binding)===null||n===void 0||(n=n.value)===null||n===void 0?void 0:n.ptOptions)||((t=i.$config)===null||t===void 0?void 0:t.ptOptions)||{},c=u.mergeSections,f=c===void 0?!0:c,h=u.mergeProps,p=h===void 0?!1:h,g=s?Be._useDefaultPT(i,i.defaultPT(),a,o,l):void 0,y=Be._usePT(i,Be._getPT(r,i.$name),a,o,rt(rt({},l),{},{global:g||{}})),T=Be._getPTDatasets(i,o);return f||!f&&y?p?Be._mergeProps(i,p,g,y,T):rt(rt(rt({},g),y),T):rt(rt({},y),T)},_getPTDatasets:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i="data-pc-";return rt(rt({},t==="root"&&ms({},"".concat(i,"name"),Oe.toFlatCase(n.$name))),{},ms({},"".concat(i,"section"),Oe.toFlatCase(t)))},_getPT:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=function(l){var s,a=i?i(l):l,u=Oe.toFlatCase(t);return(s=a==null?void 0:a[u])!==null&&s!==void 0?s:a};return n!=null&&n.hasOwnProperty("_usept")?{_usept:n._usept,originalValue:r(n.originalValue),value:r(n.value)}:r(n)},_usePT:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,l=function(T){return i(T,r,o)};if(t!=null&&t.hasOwnProperty("_usept")){var s,a=t._usept||((s=n.$config)===null||s===void 0?void 0:s.ptOptions)||{},u=a.mergeSections,c=u===void 0?!0:u,f=a.mergeProps,h=f===void 0?!1:f,p=l(t.originalValue),g=l(t.value);return p===void 0&&g===void 0?void 0:Oe.isString(g)?g:Oe.isString(p)?p:c||!c&&g?h?Be._mergeProps(n,h,p,g):rt(rt({},p),g):g}return l(t)},_useDefaultPT:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return Be._usePT(n,t,i,r,o)},_hook:function(n,t,i,r,o,l){var s,a,u="on".concat(Oe.toCapitalCase(t)),c=Be._getConfig(r,o),f=i==null?void 0:i.$instance,h=Be._usePT(f,Be._getPT(r==null||(s=r.value)===null||s===void 0?void 0:s.pt,n),Be._getOptionValue,"hooks.".concat(u)),p=Be._useDefaultPT(f,c==null||(a=c.pt)===null||a===void 0||(a=a.directives)===null||a===void 0?void 0:a[n],Be._getOptionValue,"hooks.".concat(u)),g={el:i,binding:r,vnode:o,prevVnode:l};h==null||h(f,g),p==null||p(f,g)},_mergeProps:function(){for(var n=arguments.length>1?arguments[1]:void 0,t=arguments.length,i=new Array(t>2?t-2:0),r=2;r<t;r++)i[r-2]=arguments[r];return Oe.isFunction(n)?n.apply(void 0,i):ae.apply(void 0,i)},_extend:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=function(o,l,s,a,u){var c,f;l._$instances=l._$instances||{};var h=Be._getConfig(s,a),p=l._$instances[n]||{},g=Oe.isEmpty(p)?rt(rt({},t),t==null?void 0:t.methods):{};l._$instances[n]=rt(rt({},p),{},{$name:n,$host:l,$binding:s,$modifiers:s==null?void 0:s.modifiers,$value:s==null?void 0:s.value,$el:p.$el||l||void 0,$style:rt({classes:void 0,inlineStyles:void 0,loadStyle:function(){}},t==null?void 0:t.style),$config:h,defaultPT:function(){return Be._getPT(h==null?void 0:h.pt,void 0,function(T){var v;return T==null||(v=T.directives)===null||v===void 0?void 0:v[n]})},isUnstyled:function(){var T,v;return((T=l.$instance)===null||T===void 0||(T=T.$binding)===null||T===void 0||(T=T.value)===null||T===void 0?void 0:T.unstyled)!==void 0?(v=l.$instance)===null||v===void 0||(v=v.$binding)===null||v===void 0||(v=v.value)===null||v===void 0?void 0:v.unstyled:h==null?void 0:h.unstyled},ptm:function(){var T,v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Be._getPTValue(l.$instance,(T=l.$instance)===null||T===void 0||(T=T.$binding)===null||T===void 0||(T=T.value)===null||T===void 0?void 0:T.pt,v,rt({},E))},ptmo:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Be._getPTValue(l.$instance,T,v,E,!1)},cx:function(){var T,v,E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(T=l.$instance)!==null&&T!==void 0&&T.isUnstyled()?void 0:Be._getOptionValue((v=l.$instance)===null||v===void 0||(v=v.$style)===null||v===void 0?void 0:v.classes,E,rt({},O))},sx:function(){var T,v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E?Be._getOptionValue((T=l.$instance)===null||T===void 0||(T=T.$style)===null||T===void 0?void 0:T.inlineStyles,v,rt({},O)):void 0}},g),l.$instance=l._$instances[n],(c=(f=l.$instance)[o])===null||c===void 0||c.call(f,l,s,a,u),l["$".concat(n)]=l.$instance,Be._hook(n,o,l,s,a,u)};return{created:function(o,l,s,a){i("created",o,l,s,a)},beforeMount:function(o,l,s,a){var u,c,f,h,p=Be._getConfig(l,s);Rt.loadStyle({nonce:p==null||(u=p.csp)===null||u===void 0?void 0:u.nonce}),!((c=o.$instance)!==null&&c!==void 0&&c.isUnstyled())&&((f=o.$instance)===null||f===void 0||(f=f.$style)===null||f===void 0||f.loadStyle({nonce:p==null||(h=p.csp)===null||h===void 0?void 0:h.nonce})),i("beforeMount",o,l,s,a)},mounted:function(o,l,s,a){var u,c,f,h,p=Be._getConfig(l,s);Rt.loadStyle({nonce:p==null||(u=p.csp)===null||u===void 0?void 0:u.nonce}),!((c=o.$instance)!==null&&c!==void 0&&c.isUnstyled())&&((f=o.$instance)===null||f===void 0||(f=f.$style)===null||f===void 0||f.loadStyle({nonce:p==null||(h=p.csp)===null||h===void 0?void 0:h.nonce})),i("mounted",o,l,s,a)},beforeUpdate:function(o,l,s,a){i("beforeUpdate",o,l,s,a)},updated:function(o,l,s,a){i("updated",o,l,s,a)},beforeUnmount:function(o,l,s,a){i("beforeUnmount",o,l,s,a)},unmounted:function(o,l,s,a){i("unmounted",o,l,s,a)}}},extend:function(){var n=Be._getMeta.apply(Be,arguments),t=ru(n,2),i=t[0],r=t[1];return rt({extend:function(){var l=Be._getMeta.apply(Be,arguments),s=ru(l,2),a=s[0],u=s[1];return Be.extend(a,rt(rt(rt({},r),r==null?void 0:r.methods),u))}},Be._extend(i,r))}},Xy={},Jy=Be.extend({style:Xy});function nr(e){"@babel/helpers - typeof";return nr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},nr(e)}function au(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function lu(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?au(Object(t),!0).forEach(function(i){Qy(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):au(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function Qy(e,n,t){return n=$y(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function $y(e){var n=e1(e,"string");return nr(n)=="symbol"?n:String(n)}function e1(e,n){if(nr(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(nr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var t1=Jy.extend("focustrap",{mounted:function(n,t){var i=t.value||{},r=i.disabled;r||(this.createHiddenFocusableElements(n,t),this.bind(n,t),this.autoElementFocus(n,t)),n.setAttribute("data-pd-focustrap",!0),this.$el=n},updated:function(n,t){var i=t.value||{},r=i.disabled;r&&this.unbind(n)},unmounted:function(n){this.unbind(n)},methods:{getComputedSelector:function(n){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(n??"")},bind:function(n,t){var i=this,r=t.value||{},o=r.onFocusIn,l=r.onFocusOut;n.$_pfocustrap_mutationobserver=new MutationObserver(function(s){s.forEach(function(a){if(a.type==="childList"&&!n.contains(document.activeElement)){var u=function c(f){var h=ve.isFocusableElement(f)?ve.isFocusableElement(f,i.getComputedSelector(n.$_pfocustrap_focusableselector))?f:ve.getFirstFocusableElement(n,i.getComputedSelector(n.$_pfocustrap_focusableselector)):ve.getFirstFocusableElement(f);return Oe.isNotEmpty(h)?h:f.nextSibling&&c(f.nextSibling)};ve.focus(u(a.nextSibling))}})}),n.$_pfocustrap_mutationobserver.disconnect(),n.$_pfocustrap_mutationobserver.observe(n,{childList:!0}),n.$_pfocustrap_focusinlistener=function(s){return o&&o(s)},n.$_pfocustrap_focusoutlistener=function(s){return l&&l(s)},n.addEventListener("focusin",n.$_pfocustrap_focusinlistener),n.addEventListener("focusout",n.$_pfocustrap_focusoutlistener)},unbind:function(n){n.$_pfocustrap_mutationobserver&&n.$_pfocustrap_mutationobserver.disconnect(),n.$_pfocustrap_focusinlistener&&n.removeEventListener("focusin",n.$_pfocustrap_focusinlistener)&&(n.$_pfocustrap_focusinlistener=null),n.$_pfocustrap_focusoutlistener&&n.removeEventListener("focusout",n.$_pfocustrap_focusoutlistener)&&(n.$_pfocustrap_focusoutlistener=null)},autoFocus:function(n){this.autoElementFocus(this.$el,{value:lu(lu({},n),{},{autoFocus:!0})})},autoElementFocus:function(n,t){var i=t.value||{},r=i.autoFocusSelector,o=r===void 0?"":r,l=i.firstFocusableSelector,s=l===void 0?"":l,a=i.autoFocus,u=a===void 0?!1:a,c=ve.getFirstFocusableElement(n,"[autofocus]".concat(this.getComputedSelector(o)));u&&!c&&(c=ve.getFirstFocusableElement(n,this.getComputedSelector(s))),ve.focus(c)},onFirstHiddenElementFocus:function(n){var t,i=n.currentTarget,r=n.relatedTarget,o=r===i.$_pfocustrap_lasthiddenfocusableelement||!((t=this.$el)!==null&&t!==void 0&&t.contains(r))?ve.getFirstFocusableElement(i.parentElement,this.getComputedSelector(i.$_pfocustrap_focusableselector)):i.$_pfocustrap_lasthiddenfocusableelement;ve.focus(o)},onLastHiddenElementFocus:function(n){var t,i=n.currentTarget,r=n.relatedTarget,o=r===i.$_pfocustrap_firsthiddenfocusableelement||!((t=this.$el)!==null&&t!==void 0&&t.contains(r))?ve.getLastFocusableElement(i.parentElement,this.getComputedSelector(i.$_pfocustrap_focusableselector)):i.$_pfocustrap_firsthiddenfocusableelement;ve.focus(o)},createHiddenFocusableElements:function(n,t){var i=this,r=t.value||{},o=r.tabIndex,l=o===void 0?0:o,s=r.firstFocusableSelector,a=s===void 0?"":s,u=r.lastFocusableSelector,c=u===void 0?"":u,f=function(y){return ve.createElement("span",{class:"p-hidden-accessible p-hidden-focusable",tabIndex:l,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:y==null?void 0:y.bind(i)})},h=f(this.onFirstHiddenElementFocus),p=f(this.onLastHiddenElementFocus);h.$_pfocustrap_lasthiddenfocusableelement=p,h.$_pfocustrap_focusableselector=a,h.setAttribute("data-pc-section","firstfocusableelement"),p.$_pfocustrap_firsthiddenfocusableelement=h,p.$_pfocustrap_focusableselector=c,p.setAttribute("data-pc-section","lastfocusableelement"),n.prepend(h),n.append(p)}}}),sa={name:"TimesIcon",extends:Nt},n1=ne("path",{d:"M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z",fill:"currentColor"},null,-1),i1=[n1];function r1(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),i1,16)}sa.render=r1;var xd={name:"WindowMaximizeIcon",extends:Nt},o1=ne("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z",fill:"currentColor"},null,-1),s1=[o1];function a1(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),s1,16)}xd.render=a1;var Ed={name:"WindowMinimizeIcon",extends:Nt},l1=ne("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z",fill:"currentColor"},null,-1),u1=[l1];function c1(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),u1,16)}Ed.render=c1;var Cd={name:"Portal",props:{appendTo:{type:[String,Object],default:"body"},disabled:{type:Boolean,default:!1}},data:function(){return{mounted:!1}},mounted:function(){this.mounted=ve.isClient()},computed:{inline:function(){return this.disabled||this.appendTo==="self"}}};function d1(e,n,t,i,r,o){return o.inline?Qe(e.$slots,"default",{key:0}):r.mounted?(L(),he(Jf,{key:1,to:t.appendTo},[Qe(e.$slots,"default")],8,["to"])):Se("",!0)}Cd.render=d1;var f1={root:"p-ink"},h1=Rt.extend({name:"ripple",classes:f1}),p1=Be.extend({style:h1});function g1(e){return b1(e)||y1(e)||v1(e)||m1()}function m1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v1(e,n){if(e){if(typeof e=="string")return vs(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return vs(e,n)}}function y1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function b1(e){if(Array.isArray(e))return vs(e)}function vs(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}var yi=p1.extend("ripple",{mounted:function(n){var t,i=n==null||(t=n.$instance)===null||t===void 0?void 0:t.$config;i&&i.ripple&&(this.create(n),this.bindEvents(n),n.setAttribute("data-pd-ripple",!0))},unmounted:function(n){this.remove(n)},timeout:void 0,methods:{bindEvents:function(n){n.addEventListener("mousedown",this.onMouseDown.bind(this))},unbindEvents:function(n){n.removeEventListener("mousedown",this.onMouseDown.bind(this))},create:function(n){var t=ve.createElement("span",{role:"presentation","aria-hidden":!0,"data-p-ink":!0,"data-p-ink-active":!1,class:!this.isUnstyled()&&this.cx("root"),onAnimationEnd:this.onAnimationEnd.bind(this),"p-bind":this.ptm("root")});n.appendChild(t),this.$el=t},remove:function(n){var t=this.getInk(n);t&&(this.unbindEvents(n),t.removeEventListener("animationend",this.onAnimationEnd),t.remove())},onMouseDown:function(n){var t=this,i=n.currentTarget,r=this.getInk(i);if(!(!r||getComputedStyle(r,null).display==="none")){if(!this.isUnstyled()&&ve.removeClass(r,"p-ink-active"),r.setAttribute("data-p-ink-active","false"),!ve.getHeight(r)&&!ve.getWidth(r)){var o=Math.max(ve.getOuterWidth(i),ve.getOuterHeight(i));r.style.height=o+"px",r.style.width=o+"px"}var l=ve.getOffset(i),s=n.pageX-l.left+document.body.scrollTop-ve.getWidth(r)/2,a=n.pageY-l.top+document.body.scrollLeft-ve.getHeight(r)/2;r.style.top=a+"px",r.style.left=s+"px",!this.isUnstyled()&&ve.addClass(r,"p-ink-active"),r.setAttribute("data-p-ink-active","true"),this.timeout=setTimeout(function(){r&&(!t.isUnstyled()&&ve.removeClass(r,"p-ink-active"),r.setAttribute("data-p-ink-active","false"))},401)}},onAnimationEnd:function(n){this.timeout&&clearTimeout(this.timeout),!this.isUnstyled()&&ve.removeClass(n.currentTarget,"p-ink-active"),n.currentTarget.setAttribute("data-p-ink-active","false")},getInk:function(n){return n&&n.children?g1(n.children).find(function(t){return ve.getAttribute(t,"data-pc-name")==="ripple"}):void 0}}}),_1={mask:function(n){var t=n.position,i=n.modal;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:t==="left"||t==="topleft"||t==="bottomleft"?"flex-start":t==="right"||t==="topright"||t==="bottomright"?"flex-end":"center",alignItems:t==="top"||t==="topleft"||t==="topright"?"flex-start":t==="bottom"||t==="bottomleft"||t==="bottomright"?"flex-end":"center",pointerEvents:i?"auto":"none"}},root:{display:"flex",flexDirection:"column",pointerEvents:"auto"}},w1={mask:function(n){var t=n.props,i=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"],r=i.find(function(o){return o===t.position});return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":t.modal},r?"p-dialog-".concat(r):""]},root:function(n){var t=n.props,i=n.instance;return["p-dialog p-component",{"p-dialog-rtl":t.rtl,"p-dialog-maximized":t.maximizable&&i.maximized,"p-ripple-disabled":i.$primevue.config.ripple===!1}]},header:"p-dialog-header",title:"p-dialog-title",icons:"p-dialog-header-icons",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",maximizableIcon:"p-dialog-header-maximize-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",closeButtonIcon:"p-dialog-header-close-icon",content:"p-dialog-content",footer:"p-dialog-footer"},T1=Rt.extend({name:"dialog",classes:w1,inlineStyles:_1}),S1={name:"BaseDialog",extends:qt,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:[String,Object],default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},style:T1,provide:function(){return{$parentInstance:this}}},Pd={name:"Dialog",extends:S1,inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],provide:function(){var n=this;return{dialogRef:J(function(){return n._instance})}},data:function(){return{id:this.$attrs.id,containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null}},watch:{"$attrs.id":function(n){this.id=n||Ni()}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&Ao.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.id=this.id||Ni(),this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit("update:visible",!1)},onBeforeEnter:function(n){n.setAttribute(this.attributeSelector,"")},onEnter:function(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&Ao.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&ve.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide"),this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&Ao.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick:function(n){this.dismissableMask&&this.modal&&this.mask===n.target&&this.close()},focus:function(){var n=function(r){return r&&r.querySelector("[autofocus]")},t=this.$slots.footer&&n(this.footerContainer);t||(t=this.$slots.header&&n(this.headerContainer),t||(t=this.$slots.default&&n(this.content),t||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)))),t&&ve.focus(t,{focusVisible:!0})},maximize:function(n){this.maximized?(this.maximized=!1,this.$emit("unmaximize",n)):(this.maximized=!0,this.$emit("maximize",n)),this.modal||(this.maximized?ve.blockBodyScroll():ve.unblockBodyScroll())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&ve.blockBodyScroll()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&ve.unblockBodyScroll()},onKeyDown:function(n){n.code==="Escape"&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},containerRef:function(n){this.container=n},maskRef:function(n){this.mask=n},contentRef:function(n){this.content=n},headerContainerRef:function(n){this.headerContainer=n},footerContainerRef:function(n){this.footerContainer=n},maximizableRef:function(n){this.maximizableButton=n},closeButtonRef:function(n){this.closeButton=n},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var n;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",ve.setAttribute(this.styleElement,"nonce",(n=this.$primevue)===null||n===void 0||(n=n.config)===null||n===void 0||(n=n.csp)===null||n===void 0?void 0:n.nonce),document.head.appendChild(this.styleElement);var t="";for(var i in this.breakpoints)t+=`
                        @media screen and (max-width: `.concat(i,`) {
                            .p-dialog[`).concat(this.attributeSelector,`] {
                                width: `).concat(this.breakpoints[i],` !important;
                            }
                        }
                    `);this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag:function(n){n.target.closest("div").getAttribute("data-pc-section")!=="icons"&&this.draggable&&(this.dragging=!0,this.lastPageX=n.pageX,this.lastPageY=n.pageY,this.container.style.margin="0",document.body.setAttribute("data-p-unselectable-text","true"),!this.isUnstyled&&ve.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var n=this;this.documentDragListener=function(t){if(n.dragging){var i=ve.getOuterWidth(n.container),r=ve.getOuterHeight(n.container),o=t.pageX-n.lastPageX,l=t.pageY-n.lastPageY,s=n.container.getBoundingClientRect(),a=s.left+o,u=s.top+l,c=ve.getViewport(),f=getComputedStyle(n.container),h=parseFloat(f.marginLeft),p=parseFloat(f.marginTop);n.container.style.position="fixed",n.keepInViewport?(a>=n.minX&&a+i<c.width&&(n.lastPageX=t.pageX,n.container.style.left=a-h+"px"),u>=n.minY&&u+r<c.height&&(n.lastPageY=t.pageY,n.container.style.top=u-p+"px")):(n.lastPageX=t.pageX,n.container.style.left=a-h+"px",n.lastPageY=t.pageY,n.container.style.top=u-p+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener:function(){var n=this;this.documentDragEndListener=function(t){n.dragging&&(n.dragging=!1,document.body.removeAttribute("data-p-unselectable-text"),!n.isUnstyled&&ve.removeClass(document.body,"p-unselectable-text"),n.$emit("dragend",t))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},ariaLabelledById:function(){return this.header!=null||this.$attrs["aria-labelledby"]!==null?this.id+"_header":null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:function(){return Ni()}},directives:{ripple:yi,focustrap:t1},components:{Portal:Cd,WindowMinimizeIcon:Ed,WindowMaximizeIcon:xd,TimesIcon:sa}};function ir(e){"@babel/helpers - typeof";return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ir(e)}function uu(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Tr(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?uu(Object(t),!0).forEach(function(i){x1(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uu(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function x1(e,n,t){return n=E1(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function E1(e){var n=C1(e,"string");return ir(n)=="symbol"?n:String(n)}function C1(e,n){if(ir(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(ir(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var P1=["aria-labelledby","aria-modal"],I1=["id"],O1=["autofocus","tabindex"],A1=["autofocus","aria-label"];function L1(e,n,t,i,r,o){var l=St("Portal"),s=Yn("ripple"),a=Yn("focustrap");return L(),he(l,{appendTo:e.appendTo},{default:ct(function(){return[r.containerVisible?(L(),j("div",ae({key:0,ref:o.maskRef,class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),onClick:n[3]||(n[3]=function(){return o.onMaskClick&&o.onMaskClick.apply(o,arguments)})},e.ptm("mask")),[we(Nc,ae({name:"p-dialog",onBeforeEnter:o.onBeforeEnter,onEnter:o.onEnter,onBeforeLeave:o.onBeforeLeave,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave,appear:""},e.ptm("transition")),{default:ct(function(){return[e.visible?gt((L(),j("div",ae({key:0,ref:o.containerRef,class:e.cx("root"),style:e.sx("root"),role:"dialog","aria-labelledby":o.ariaLabelledById,"aria-modal":e.modal},e.ptmi("root")),[e.$slots.container?Qe(e.$slots,"container",{key:0,onClose:o.close,onMaximize:function(c){return o.maximize(c)},closeCallback:o.close,maximizeCallback:function(c){return o.maximize(c)}}):(L(),j(Ee,{key:1},[e.showHeader?(L(),j("div",ae({key:0,ref:o.headerContainerRef,class:e.cx("header"),onMousedown:n[2]||(n[2]=function(){return o.initDrag&&o.initDrag.apply(o,arguments)})},e.ptm("header")),[Qe(e.$slots,"header",{class:qe(e.cx("title"))},function(){return[e.header?(L(),j("span",ae({key:0,id:o.ariaLabelledById,class:e.cx("title")},e.ptm("title")),xe(e.header),17,I1)):Se("",!0)]}),ne("div",ae({class:e.cx("icons")},e.ptm("icons")),[e.maximizable?gt((L(),j("button",ae({key:0,ref:o.maximizableRef,autofocus:r.focusableMax,class:e.cx("maximizableButton"),onClick:n[0]||(n[0]=function(){return o.maximize&&o.maximize.apply(o,arguments)}),type:"button",tabindex:e.maximizable?"0":"-1"},e.ptm("maximizableButton"),{"data-pc-group-section":"headericon"}),[Qe(e.$slots,"maximizeicon",{maximized:r.maximized,class:qe(e.cx("maximizableIcon"))},function(){return[(L(),he(at(o.maximizeIconComponent),ae({class:[e.cx("maximizableIcon"),r.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm("maximizableIcon")),null,16,["class"]))]})],16,O1)),[[s]]):Se("",!0),e.closable?gt((L(),j("button",ae({key:1,ref:o.closeButtonRef,autofocus:r.focusableClose,class:e.cx("closeButton"),onClick:n[1]||(n[1]=function(){return o.close&&o.close.apply(o,arguments)}),"aria-label":o.closeAriaLabel,type:"button"},Tr(Tr({},e.closeButtonProps),e.ptm("closeButton")),{"data-pc-group-section":"headericon"}),[Qe(e.$slots,"closeicon",{class:qe(e.cx("closeButtonIcon"))},function(){return[(L(),he(at(e.closeIcon?"span":"TimesIcon"),ae({class:[e.cx("closeButtonIcon"),e.closeIcon]},e.ptm("closeButtonIcon")),null,16,["class"]))]})],16,A1)),[[s]]):Se("",!0)],16)],16)):Se("",!0),ne("div",ae({ref:o.contentRef,class:[e.cx("content"),e.contentClass],style:e.contentStyle},Tr(Tr({},e.contentProps),e.ptm("content"))),[Qe(e.$slots,"default")],16),e.footer||e.$slots.footer?(L(),j("div",ae({key:1,ref:o.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[Qe(e.$slots,"footer",{},function(){return[Rn(xe(e.footer),1)]})],16)):Se("",!0)],64))],16,P1)),[[a,{disabled:!e.modal}]]):Se("",!0)]}),_:3},16,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):Se("",!0)]}),_:3},8,["appendTo"])}Pd.render=L1;const R1={class:"t-text-lg t-font-medium t-leading-6 t-text-gray-900 dark:t-text-gray-400"},k1={ref:"containerRef"},ys=ze({__name:"BaseDialog",props:{modelValue:{type:Boolean},title:{},closable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e,{emit:n}){const t=Ge(),i=n;return(r,o)=>(L(),he(Re(Pd),{visible:r.modelValue,modal:"",unstyled:"",closable:r.closable,"dismissable-mask":r.closable,"append-to":Re(t).config.container+" .tido > *",pt:{root:{class:"t-relative t-bg-white dark:t-bg-gray-800 t-p-4 t-rounded-lg t-max-w-[90%] lg:t-min-w-[33%] t-max-h-[80%] t-shadow-lg dark:t-border dark:t-border-gray-700"},header:{class:"t-flex t-mb-4"},headerIcons:{class:"t-ml-auto"},closeButton:{class:"t-absolute t-right-4 hover:t-bg-gray-100 dark:hover:t-bg-gray-700 t-w-8 t-h-8 t-rounded-full t-flex t-items-center t-justify-center"},mask:{class:"t-bg-gray-900 t-bg-opacity-50 dark:t-bg-opacity-75"}},"onUpdate:visible":o[0]||(o[0]=l=>i("update:modelValue",l))},{header:ct(()=>[ne("h3",R1,xe(r.title),1)]),default:ct(()=>[ne("div",k1,[Qe(r.$slots,"default")],512)]),_:3},8,["visible","closable","dismissable-mask","append-to"]))}}),D1={class:"t-flex t-space-x-2 t-items-baseline t-mb-2"},M1={class:"t-text-gray-600"},N1={class:"t-mb-4"},F1={class:"t-mb-4"},B1={class:"t-flex t-space-x-2"},H1={href:"https://gitlab.gwdg.de/subugoe/emo/tido/-/blob/main/README.md",target:"_blank"},V1={href:"https://gitlab.gwdg.de/subugoe/emo/tido/",target:"_blank"},z1={href:"mailto:gitlab+subugoe-emo-tido-10921-issue-@gwdg.de",target:"_blank"},j1={__name:"SoftwareInfo",setup(e){const n=de(!1),t=Uy.version,i=J(()=>new Date().getFullYear());return(r,o)=>(L(),j("div",null,[we(Mt,{display:"flat",rounded:"",title:r.$t("project_info"),icon:"info",class:"t-text-gray-400 hover:t-text-gray-500",onClick:o[0]||(o[0]=l=>n.value=!0)},null,8,["title"]),we(ys,{modelValue:n.value,"onUpdate:modelValue":o[1]||(o[1]=l=>n.value=l),closable:""},{default:ct(()=>[ne("div",D1,[o[2]||(o[2]=ne("h2",{class:"t-text-xl t-font-bold"}," TIDO ",-1)),ne("p",M1," v"+xe(Re(t)),1)]),ne("p",N1,xe(r.$t("tido_description")),1),ne("p",null,xe(r.$t("license")),1),ne("p",F1," Copyright (c) "+xe(i.value)+" "+xe(r.$t("sub_info")),1),ne("div",B1,[ne("a",H1,[we(Mt,{display:"flat",icon:"book",text:r.$t("documentation"),size:"small"},null,8,["text"])]),ne("a",V1,[we(Mt,{display:"flat",icon:"code",text:r.$t("source_code"),size:"small"},null,8,["text"])]),ne("a",z1,[we(Mt,{display:"flat",size:"small",href:"mailto:gitlab+subugoe-emo-tido-10921-issue-@gwdg.de",icon:"bug",text:r.$t("report_a_bug")},null,8,["text"])])])]),_:1},8,["modelValue"])]))}},U1={class:"t-relative"},W1=["onClick"],G1=ze({__name:"LanguageSwitch",setup(e){const n=Ge(),{locale:t}=tn(),i=de([{label:"DE",value:"de-de"},{label:"EN",value:"en-US"}]),r=de(i.value[0]),o=de(!1),l=J(()=>n.config);Ve(r,a=>{t.value=a.value}),jt(()=>{r.value=l.value.lang||"en-US"});function s(a){r.value=a}return(a,u)=>(L(),j("div",U1,[we(oa,{modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=c=>o.value=c),"button-text":a.$t("change_language"),"open-right":""},{default:ct(()=>[(L(!0),j(Ee,null,et(i.value,c=>(L(),j("div",{key:c.value,class:qe([{language:r.value===c.value},"t-py-2 t-px-4 hover:t-bg-gray-200 dark:hover:t-bg-gray-600 t-rounded-md"]),onClick:f=>s(c)},xe(c.label),11,W1))),128))]),_:1},8,["modelValue","button-text"])]))}});function Id(e){return Os()?(Lu(e),!0):!1}function pi(e){return typeof e=="function"?e():Re(e)}const K1=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const q1=Object.prototype.toString,Z1=e=>q1.call(e)==="[object Object]",Od=()=>{};function Y1(e,n){function t(...i){return new Promise((r,o)=>{Promise.resolve(e(()=>n.apply(this,i),{fn:n,thisArg:this,args:i})).then(r).catch(o)})}return t}const Ad=e=>e();function X1(e=Ad){const n=de(!0);function t(){n.value=!1}function i(){n.value=!0}const r=(...o)=>{n.value&&e(...o)};return{isActive:ur(n),pause:t,resume:i,eventFilter:r}}function J1(e){return en()}function Q1(...e){if(e.length!==1)return jf(...e);const n=e[0];return typeof n=="function"?ur(Bf(()=>({get:n,set:Od}))):de(n)}function $1(e,n,t={}){const{eventFilter:i=Ad,...r}=t;return Ve(e,Y1(i,n),r)}function eb(e,n,t={}){const{eventFilter:i,...r}=t,{eventFilter:o,pause:l,resume:s,isActive:a}=X1(i);return{stop:$1(e,n,{...r,eventFilter:o}),pause:l,resume:s,isActive:a}}function Ld(e,n=!0,t){J1()?jt(e,t):n?e():Qn(e)}function Rd(e=!1,n={}){const{truthyValue:t=!0,falsyValue:i=!1}=n,r=nt(e),o=de(e);function l(s){if(arguments.length)return o.value=s,o.value;{const a=pi(t);return o.value=o.value===a?pi(i):a,o.value}}return r?l:[o,l]}function kd(e){var n;const t=pi(e);return(n=t==null?void 0:t.$el)!=null?n:t}const gi=K1?window:void 0;function cu(...e){let n,t,i,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([t,i,r]=e,n=gi):[n,t,i,r]=e,!n)return Od;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const o=[],l=()=>{o.forEach(c=>c()),o.length=0},s=(c,f,h,p)=>(c.addEventListener(f,h,p),()=>c.removeEventListener(f,h,p)),a=Ve(()=>[kd(n),pi(r)],([c,f])=>{if(l(),!c)return;const h=Z1(f)?{...f}:f;o.push(...t.flatMap(p=>i.map(g=>s(c,p,g,h))))},{immediate:!0,flush:"post"}),u=()=>{a(),l()};return Id(u),u}function tb(){const e=de(!1),n=en();return n&&jt(()=>{e.value=!0},n),e}function nb(e){const n=tb();return J(()=>(n.value,!!e()))}function ib(e,n={}){const{window:t=gi}=n,i=nb(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let r;const o=de(!1),l=u=>{o.value=u.matches},s=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",l):r.removeListener(l))},a=kh(()=>{i.value&&(s(),r=t.matchMedia(pi(e)),"addEventListener"in r?r.addEventListener("change",l):r.addListener(l),o.value=r.matches)});return Id(()=>{a(),s(),r=void 0}),o}const Sr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},xr="__vueuse_ssr_handlers__",rb=ob();function ob(){return xr in Sr||(Sr[xr]=Sr[xr]||{}),Sr[xr]}function Dd(e,n){return rb[e]||n}function sb(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const ab={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},du="vueuse-storage";function lb(e,n,t,i={}){var r;const{flush:o="pre",deep:l=!0,listenToStorageChanges:s=!0,writeDefaults:a=!0,mergeDefaults:u=!1,shallow:c,window:f=gi,eventFilter:h,onError:p=V=>{console.error(V)},initOnMounted:g}=i,y=(c?Qr:de)(typeof n=="function"?n():n);if(!t)try{t=Dd("getDefaultStorage",()=>{var V;return(V=gi)==null?void 0:V.localStorage})()}catch(V){p(V)}if(!t)return y;const T=pi(n),v=sb(T),E=(r=i.serializer)!=null?r:ab[v],{pause:O,resume:P}=eb(y,()=>H(y.value),{flush:o,deep:l,eventFilter:h});f&&s&&Ld(()=>{cu(f,"storage",B),cu(f,du,R),g&&B()}),g||B();function D(V,$){f&&f.dispatchEvent(new CustomEvent(du,{detail:{key:e,oldValue:V,newValue:$,storageArea:t}}))}function H(V){try{const $=t.getItem(e);if(V==null)D($,null),t.removeItem(e);else{const N=E.write(V);$!==N&&(t.setItem(e,N),D($,N))}}catch($){p($)}}function M(V){const $=V?V.newValue:t.getItem(e);if($==null)return a&&T!=null&&t.setItem(e,E.write(T)),T;if(!V&&u){const N=E.read($);return typeof u=="function"?u(N,T):v==="object"&&!Array.isArray(N)?{...T,...N}:N}else return typeof $!="string"?$:E.read($)}function B(V){if(!(V&&V.storageArea!==t)){if(V&&V.key==null){y.value=T;return}if(!(V&&V.key!==e)){O();try{(V==null?void 0:V.newValue)!==E.write(y.value)&&(y.value=M(V))}catch($){p($)}finally{V?Qn(P):P()}}}}function R(V){B(V.detail)}return y}function Md(e){return ib("(prefers-color-scheme: dark)",e)}function ub(e={}){const{selector:n="html",attribute:t="class",initialValue:i="auto",window:r=gi,storage:o,storageKey:l="vueuse-color-scheme",listenToStorageChanges:s=!0,storageRef:a,emitAuto:u,disableTransition:c=!0}=e,f={auto:"",light:"light",dark:"dark",...e.modes||{}},h=Md({window:r}),p=J(()=>h.value?"dark":"light"),g=a||(l==null?Q1(i):lb(l,i,o,{window:r,listenToStorageChanges:s})),y=J(()=>g.value==="auto"?p.value:g.value),T=Dd("updateHTMLAttrs",(P,D,H)=>{const M=typeof P=="string"?r==null?void 0:r.document.querySelector(P):kd(P);if(!M)return;let B;if(c&&(B=r.document.createElement("style"),B.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),r.document.head.appendChild(B)),D==="class"){const R=H.split(/\s/g);Object.values(f).flatMap(V=>(V||"").split(/\s/g)).filter(Boolean).forEach(V=>{R.includes(V)?M.classList.add(V):M.classList.remove(V)})}else M.setAttribute(D,H);c&&(r.getComputedStyle(B).opacity,document.head.removeChild(B))});function v(P){var D;T(n,t,(D=f[P])!=null?D:P)}function E(P){e.onChanged?e.onChanged(P,v):v(P)}Ve(y,E,{flush:"post",immediate:!0}),Ld(()=>E(y.value));const O=J({get(){return u?g.value:y.value},set(P){g.value=P}});try{return Object.assign(O,{store:g,system:p,state:y})}catch{return O}}function cb(e={}){const{valueDark:n="dark",valueLight:t="",window:i=gi}=e,r=ub({...e,onChanged:(s,a)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,s==="dark",a,s):a(s)},modes:{dark:n,light:t}}),o=J(()=>r.system?r.system.value:Md({window:i}).value?"dark":"light");return J({get(){return r.value==="dark"},set(s){const a=s?"dark":"light";o.value===a?r.value="auto":r.value=a}})}let Wr;function db(e){Wr=cb({selector:e,attribute:"color-scheme",valueDark:"dark",valueLight:"light",onChanged(n){document.querySelector(e).setAttribute("color-scheme",n?"dark":"light")}})}const fb={__name:"DarkModeToggle",setup(e){const n=Rd(Wr);return(t,i)=>(L(),he(Mt,{display:"flat",rounded:"",size:"normal",class:"dark:t-text-yellow-400 t-text-gray-400 hover:t-text-gray-500",icon:Re(Wr)?"moon":"sun",onClick:i[0]||(i[0]=r=>Re(n)())},null,8,["icon"]))}},hb={class:"t-flex t-items-center no-wrap t-space-x-2 t-justify-end"},pb={__name:"ToolBar",setup(e){const n=Ge(),t=J(()=>n.config),i=J(()=>{var r,o;return((o=(r=t.value)==null?void 0:r.header)==null?void 0:o.languageSwitch)!==void 0?t.value.header.languageSwitch:!0});return(r,o)=>(L(),j("div",hb,[i.value?(L(),he(G1,{key:0})):Se("",!0),we(fb),we(j1)]))}},gb={key:0,class:"header t-flex t-flex-col t-mb-4"},mb={class:"t-flex t-items-start sm:t-flex-row t-flex-col-reverse"},vb={key:0,class:"t-flex md:t-items-center t-flex-col md:t-flex-row"},yb=ze({__name:"GlobalHeader",props:{configErrorTitle:{default:""}},setup(e){const n=Ge(),t=vt(),i=J(()=>n.config),r=J(()=>{var a,u;return(u=(a=i.value)==null?void 0:a.header)==null?void 0:u.show}),o=J(()=>t.item),l=J(()=>{var a,u;return((u=(a=i.value)==null?void 0:a.header)==null?void 0:u.navigation)||!0}),s=J(()=>{var a,u,c,f;return((u=(a=i.value)==null?void 0:a.header)==null?void 0:u.panelsToggle)!==void 0?(f=(c=i.value)==null?void 0:c.header)==null?void 0:f.panelsToggle:!0});return(a,u)=>r.value?(L(),j("div",gb,[ne("div",mb,[we(C0,{item:o.value},null,8,["item"]),we(pb,{class:"t-ml-auto"})]),o.value?(L(),j("div",vb,[l.value?(L(),he(v0,{key:0})):Se("",!0),s.value?(L(),he(xy,{key:1,class:"md:t-ml-auto t-mt-4 md:t-mt-0"})):Se("",!0)])):Se("",!0)])):Se("",!0)}});var Nd={name:"ChevronLeftIcon",extends:Nt},bb=ne("path",{d:"M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z",fill:"currentColor"},null,-1),_b=[bb];function wb(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),_b,16)}Nd.render=wb;var aa={name:"ChevronRightIcon",extends:Nt},Tb=ne("path",{d:"M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z",fill:"currentColor"},null,-1),Sb=[Tb];function xb(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),Sb,16)}aa.render=xb;var Eb={root:function(n){var t=n.props;return["p-tabview p-component",{"p-tabview-scrollable":t.scrollable}]},navContainer:"p-tabview-nav-container",previousButton:"p-tabview-nav-prev p-tabview-nav-btn p-link",navContent:"p-tabview-nav-content",nav:"p-tabview-nav",tab:{header:function(n){var t=n.instance,i=n.tab,r=n.index;return["p-tabview-header",t.getTabProp(i,"headerClass"),{"p-highlight":t.d_activeIndex===r,"p-disabled":t.getTabProp(i,"disabled")}]},headerAction:"p-tabview-nav-link p-tabview-header-action",headerTitle:"p-tabview-title",content:function(n){var t=n.instance,i=n.tab;return["p-tabview-panel",t.getTabProp(i,"contentClass")]}},inkbar:"p-tabview-ink-bar",nextButton:"p-tabview-nav-next p-tabview-nav-btn p-link",panelContainer:"p-tabview-panels"},Cb=Rt.extend({name:"tabview",classes:Eb}),Pb={name:"BaseTabView",extends:qt,props:{activeIndex:{type:Number,default:0},lazy:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},tabindex:{type:Number,default:0},selectOnFocus:{type:Boolean,default:!1},previousButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null},prevIcon:{type:String,default:void 0},nextIcon:{type:String,default:void 0}},style:Cb,provide:function(){return{$parentInstance:this}}},Fd={name:"TabView",extends:Pb,inheritAttrs:!1,emits:["update:activeIndex","tab-change","tab-click"],data:function(){return{id:this.$attrs.id,d_activeIndex:this.activeIndex,isPrevButtonDisabled:!0,isNextButtonDisabled:!1}},watch:{"$attrs.id":function(n){this.id=n||Ni()},activeIndex:function(n){this.d_activeIndex=n,this.scrollInView({index:n})}},mounted:function(){this.id=this.id||Ni(),this.updateInkBar(),this.scrollable&&this.updateButtonState()},updated:function(){this.updateInkBar(),this.scrollable&&this.updateButtonState()},methods:{isTabPanel:function(n){return n.type.name==="TabPanel"},isTabActive:function(n){return this.d_activeIndex===n},getTabProp:function(n,t){return n.props?n.props[t]:void 0},getKey:function(n,t){return this.getTabProp(n,"header")||t},getTabHeaderActionId:function(n){return"".concat(this.id,"_").concat(n,"_header_action")},getTabContentId:function(n){return"".concat(this.id,"_").concat(n,"_content")},getTabPT:function(n,t,i){var r=this.tabs.length,o={props:n.props,parent:{instance:this,props:this.$props,state:this.$data},context:{index:i,count:r,first:i===0,last:i===r-1,active:this.isTabActive(i)}};return ae(this.ptm("tab.".concat(t),{tab:o}),this.ptm("tabpanel.".concat(t),{tabpanel:o}),this.ptm("tabpanel.".concat(t),o),this.ptmo(this.getTabProp(n,"pt"),t,o))},onScroll:function(n){this.scrollable&&this.updateButtonState(),n.preventDefault()},onPrevButtonClick:function(){var n=this.$refs.content,t=ve.getWidth(n),i=n.scrollLeft-t;n.scrollLeft=i<=0?0:i},onNextButtonClick:function(){var n=this.$refs.content,t=ve.getWidth(n)-this.getVisibleButtonWidths(),i=n.scrollLeft+t,r=n.scrollWidth-t;n.scrollLeft=i>=r?r:i},onTabClick:function(n,t,i){this.changeActiveIndex(n,t,i),this.$emit("tab-click",{originalEvent:n,index:i})},onTabKeyDown:function(n,t,i){switch(n.code){case"ArrowLeft":this.onTabArrowLeftKey(n);break;case"ArrowRight":this.onTabArrowRightKey(n);break;case"Home":this.onTabHomeKey(n);break;case"End":this.onTabEndKey(n);break;case"PageDown":this.onPageDownKey(n);break;case"PageUp":this.onPageUpKey(n);break;case"Enter":case"NumpadEnter":case"Space":this.onTabEnterKey(n,t,i);break}},onTabArrowRightKey:function(n){var t=this.findNextHeaderAction(n.target.parentElement);t?this.changeFocusedTab(n,t):this.onTabHomeKey(n),n.preventDefault()},onTabArrowLeftKey:function(n){var t=this.findPrevHeaderAction(n.target.parentElement);t?this.changeFocusedTab(n,t):this.onTabEndKey(n),n.preventDefault()},onTabHomeKey:function(n){var t=this.findFirstHeaderAction();this.changeFocusedTab(n,t),n.preventDefault()},onTabEndKey:function(n){var t=this.findLastHeaderAction();this.changeFocusedTab(n,t),n.preventDefault()},onPageDownKey:function(n){this.scrollInView({index:this.$refs.nav.children.length-2}),n.preventDefault()},onPageUpKey:function(n){this.scrollInView({index:0}),n.preventDefault()},onTabEnterKey:function(n,t,i){this.changeActiveIndex(n,t,i),n.preventDefault()},findNextHeaderAction:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=t?n:n.nextElementSibling;return i?ve.getAttribute(i,"data-p-disabled")||ve.getAttribute(i,"data-pc-section")==="inkbar"?this.findNextHeaderAction(i):ve.findSingle(i,'[data-pc-section="headeraction"]'):null},findPrevHeaderAction:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=t?n:n.previousElementSibling;return i?ve.getAttribute(i,"data-p-disabled")||ve.getAttribute(i,"data-pc-section")==="inkbar"?this.findPrevHeaderAction(i):ve.findSingle(i,'[data-pc-section="headeraction"]'):null},findFirstHeaderAction:function(){return this.findNextHeaderAction(this.$refs.nav.firstElementChild,!0)},findLastHeaderAction:function(){return this.findPrevHeaderAction(this.$refs.nav.lastElementChild,!0)},changeActiveIndex:function(n,t,i){!this.getTabProp(t,"disabled")&&this.d_activeIndex!==i&&(this.d_activeIndex=i,this.$emit("update:activeIndex",i),this.$emit("tab-change",{originalEvent:n,index:i}),this.scrollInView({index:i}))},changeFocusedTab:function(n,t){if(t&&(ve.focus(t),this.scrollInView({element:t}),this.selectOnFocus)){var i=parseInt(t.parentElement.dataset.pcIndex,10),r=this.tabs[i];this.changeActiveIndex(n,r,i)}},scrollInView:function(n){var t=n.element,i=n.index,r=i===void 0?-1:i,o=t||this.$refs.nav.children[r];o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest"})},updateInkBar:function(){var n=this.$refs.nav.children[this.d_activeIndex];this.$refs.inkbar.style.width=ve.getWidth(n)+"px",this.$refs.inkbar.style.left=ve.getOffset(n).left-ve.getOffset(this.$refs.nav).left+"px"},updateButtonState:function(){var n=this.$refs.content,t=n.scrollLeft,i=n.scrollWidth,r=ve.getWidth(n);this.isPrevButtonDisabled=t===0,this.isNextButtonDisabled=parseInt(t)===i-r},getVisibleButtonWidths:function(){var n=this.$refs,t=n.prevBtn,i=n.nextBtn;return[t,i].reduce(function(r,o){return o?r+ve.getWidth(o):r},0)}},computed:{tabs:function(){var n=this;return this.$slots.default().reduce(function(t,i){return n.isTabPanel(i)?t.push(i):i.children&&i.children instanceof Array&&i.children.forEach(function(r){n.isTabPanel(r)&&t.push(r)}),t},[])},prevButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.previous:void 0},nextButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.next:void 0}},directives:{ripple:yi},components:{ChevronLeftIcon:Nd,ChevronRightIcon:aa}};function rr(e){"@babel/helpers - typeof";return rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rr(e)}function fu(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Bt(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?fu(Object(t),!0).forEach(function(i){Ib(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fu(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function Ib(e,n,t){return n=Ob(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ob(e){var n=Ab(e,"string");return rr(n)=="symbol"?n:String(n)}function Ab(e,n){if(rr(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(rr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Lb=["tabindex","aria-label"],Rb=["data-p-highlight","data-p-disabled","data-pc-index","data-p-active"],kb=["id","tabindex","aria-disabled","aria-selected","aria-controls","onClick","onKeydown"],Db=["tabindex","aria-label"],Mb=["id","aria-labelledby","data-pc-index","data-p-active"];function Nb(e,n,t,i,r,o){var l=Yn("ripple");return L(),j("div",ae({class:e.cx("root"),role:"tablist"},e.ptmi("root")),[ne("div",ae({class:e.cx("navContainer")},e.ptm("navContainer")),[e.scrollable&&!r.isPrevButtonDisabled?gt((L(),j("button",ae({key:0,ref:"prevBtn",type:"button",class:e.cx("previousButton"),tabindex:e.tabindex,"aria-label":o.prevButtonAriaLabel,onClick:n[0]||(n[0]=function(){return o.onPrevButtonClick&&o.onPrevButtonClick.apply(o,arguments)})},Bt(Bt({},e.previousButtonProps),e.ptm("previousButton")),{"data-pc-group-section":"navbutton"}),[Qe(e.$slots,"previousicon",{},function(){return[(L(),he(at(e.prevIcon?"span":"ChevronLeftIcon"),ae({"aria-hidden":"true",class:e.prevIcon},e.ptm("previousIcon")),null,16,["class"]))]})],16,Lb)),[[l]]):Se("",!0),ne("div",ae({ref:"content",class:e.cx("navContent"),onScroll:n[1]||(n[1]=function(){return o.onScroll&&o.onScroll.apply(o,arguments)})},e.ptm("navContent")),[ne("ul",ae({ref:"nav",class:e.cx("nav")},e.ptm("nav")),[(L(!0),j(Ee,null,et(o.tabs,function(s,a){return L(),j("li",ae({key:o.getKey(s,a),style:o.getTabProp(s,"headerStyle"),class:e.cx("tab.header",{tab:s,index:a}),role:"presentation"},Bt(Bt(Bt({},o.getTabProp(s,"headerProps")),o.getTabPT(s,"root",a)),o.getTabPT(s,"header",a)),{"data-pc-name":"tabpanel","data-p-highlight":r.d_activeIndex===a,"data-p-disabled":o.getTabProp(s,"disabled"),"data-pc-index":a,"data-p-active":r.d_activeIndex===a}),[gt((L(),j("a",ae({id:o.getTabHeaderActionId(a),class:e.cx("tab.headerAction"),tabindex:o.getTabProp(s,"disabled")||!o.isTabActive(a)?-1:e.tabindex,role:"tab","aria-disabled":o.getTabProp(s,"disabled"),"aria-selected":o.isTabActive(a),"aria-controls":o.getTabContentId(a),onClick:function(c){return o.onTabClick(c,s,a)},onKeydown:function(c){return o.onTabKeyDown(c,s,a)}},Bt(Bt({},o.getTabProp(s,"headerActionProps")),o.getTabPT(s,"headerAction",a))),[s.props&&s.props.header?(L(),j("span",ae({key:0,class:e.cx("tab.headerTitle")},o.getTabPT(s,"headerTitle",a)),xe(s.props.header),17)):Se("",!0),s.children&&s.children.header?(L(),he(at(s.children.header),{key:1})):Se("",!0)],16,kb)),[[l]])],16,Rb)}),128)),ne("li",ae({ref:"inkbar",class:e.cx("inkbar"),role:"presentation","aria-hidden":"true"},e.ptm("inkbar")),null,16)],16)],16),e.scrollable&&!r.isNextButtonDisabled?gt((L(),j("button",ae({key:1,ref:"nextBtn",type:"button",class:e.cx("nextButton"),tabindex:e.tabindex,"aria-label":o.nextButtonAriaLabel,onClick:n[2]||(n[2]=function(){return o.onNextButtonClick&&o.onNextButtonClick.apply(o,arguments)})},Bt(Bt({},e.nextButtonProps),e.ptm("nextButton")),{"data-pc-group-section":"navbutton"}),[Qe(e.$slots,"nexticon",{},function(){return[(L(),he(at(e.nextIcon?"span":"ChevronRightIcon"),ae({"aria-hidden":"true",class:e.nextIcon},e.ptm("nextIcon")),null,16,["class"]))]})],16,Db)),[[l]]):Se("",!0)],16),ne("div",ae({class:e.cx("panelContainer")},e.ptm("panelContainer")),[(L(!0),j(Ee,null,et(o.tabs,function(s,a){return L(),j(Ee,{key:o.getKey(s,a)},[!e.lazy||o.isTabActive(a)?gt((L(),j("div",ae({key:0,id:o.getTabContentId(a),style:o.getTabProp(s,"contentStyle"),class:e.cx("tab.content",{tab:s}),role:"tabpanel","aria-labelledby":o.getTabHeaderActionId(a)},Bt(Bt(Bt({},o.getTabProp(s,"contentProps")),o.getTabPT(s,"root",a)),o.getTabPT(s,"content",a)),{"data-pc-name":"tabpanel","data-pc-index":a,"data-p-active":r.d_activeIndex===a}),[(L(),he(at(s)))],16,Mb)),[[Xn,e.lazy?!0:o.isTabActive(a)]]):Se("",!0)],64)}),128))],16)],16)}Fd.render=Nb;var Fb={},Bb={name:"BaseTabPanel",extends:qt,props:{header:null,headerStyle:null,headerClass:null,headerProps:null,headerActionProps:null,contentStyle:null,contentClass:null,contentProps:null,disabled:Boolean},style:Fb},Bd={name:"TabPanel",extends:Bb};function Hb(e,n,t,i,r,o){return Qe(e.$slots,"default")}Bd.render=Hb;function la(e,n){let t=[];return e!=null&&e.length&&e.forEach(i=>{const r=n.find(o=>o.key.toLowerCase()===i.toLowerCase());r&&t.push({key:i,value:r.value})}),t}function pr(e){let n;for(let t=0;t<e.length;t++){const r=e[t].views;if(!(!r||r.length===0)&&(n=r.filter(o=>o.connector.id===2),n.length>0))return n[0]}return null}const Vb=["href","title"],zb=ze({__name:"MetadataLink",props:{url:{default:""},text:{default:""}},setup(e){return(n,t)=>(L(),j("a",{href:n.url,title:n.text+"- open in a new tab or window",rel:"noopener noreferrer",target:"_blank",class:"content__link t-text-primary dark:t-text-gray-200"},[ne("span",null,xe(n.text),1),we(dn,{name:"externalLink",class:"content__link-icon t-pl-1 t-text-[12px]"})],8,Vb))}}),jb=["innerHTML"],Ub=ze({__name:"MetadataValue",props:{value:{default:""}},setup(e){return(n,t)=>(L(),j("span",{class:"metadata-value",innerHTML:n.value},null,8,jb))}}),bi=(e,n)=>{const t=e.__vccOpts||e;for(const[i,r]of n)t[i]=r;return t},Hd=bi(Ub,[["__scopeId","data-v-3df13e8f"]]);var bs={name:"ExclamationTriangleIcon",extends:Nt},Wb=ne("path",{d:"M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z",fill:"currentColor"},null,-1),Gb=ne("path",{d:"M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z",fill:"currentColor"},null,-1),Kb=ne("path",{d:"M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z",fill:"currentColor"},null,-1),qb=[Wb,Gb,Kb];function Zb(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),qb,16)}bs.render=Zb;var _s={name:"InfoCircleIcon",extends:Nt},Yb=ne("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z",fill:"currentColor"},null,-1),Xb=[Yb];function Jb(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),Xb,16)}_s.render=Jb;var ws={name:"TimesCircleIcon",extends:Nt},Qb=ne("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z",fill:"currentColor"},null,-1),$b=[Qb];function e_(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),$b,16)}ws.render=e_;var t_={root:function(n){var t=n.props;return"p-message p-component p-message-"+t.severity},wrapper:"p-message-wrapper",icon:"p-message-icon",text:"p-message-text",closeButton:"p-message-close p-link",closeIcon:"p-message-close-icon"},n_=Rt.extend({name:"message",classes:t_}),i_={name:"BaseMessage",extends:qt,props:{severity:{type:String,default:"info"},closable:{type:Boolean,default:!0},sticky:{type:Boolean,default:!0},life:{type:Number,default:3e3},icon:{type:String,default:void 0},closeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},style:n_,provide:function(){return{$parentInstance:this}}},Vd={name:"Message",extends:i_,inheritAttrs:!1,emits:["close","life-end"],timeout:null,data:function(){return{visible:!0}},watch:{sticky:function(n){n||this.closeAfterDelay()}},mounted:function(){this.sticky||this.closeAfterDelay()},methods:{close:function(n){this.visible=!1,this.$emit("close",n)},closeAfterDelay:function(){var n=this;setTimeout(function(){n.visible=!1,n.$emit("life-end")},this.life)}},computed:{iconComponent:function(){return{info:_s,success:er,warn:bs,error:ws}[this.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{ripple:yi},components:{TimesIcon:sa,InfoCircleIcon:_s,CheckIcon:er,ExclamationTriangleIcon:bs,TimesCircleIcon:ws}};function or(e){"@babel/helpers - typeof";return or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},or(e)}function hu(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Vn(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?hu(Object(t),!0).forEach(function(i){r_(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hu(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function r_(e,n,t){return n=o_(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o_(e){var n=s_(e,"string");return or(n)=="symbol"?n:String(n)}function s_(e,n){if(or(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(or(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var a_=["aria-label"];function l_(e,n,t,i,r,o){var l=St("TimesIcon"),s=Yn("ripple");return L(),he(Nc,ae({name:"p-message",appear:""},e.ptmi("transition")),{default:ct(function(){return[gt(ne("div",ae({class:e.cx("root"),role:"alert","aria-live":"assertive","aria-atomic":"true"},e.ptm("root")),[e.$slots.container?Qe(e.$slots,"container",{key:0,onClose:o.close,closeCallback:o.close}):(L(),j("div",ae({key:1,class:e.cx("wrapper")},e.ptm("wrapper")),[Qe(e.$slots,"messageicon",{class:"p-message-icon"},function(){return[(L(),he(at(e.icon?"span":o.iconComponent),ae({class:[e.cx("icon"),e.icon]},e.ptm("icon")),null,16,["class"]))]}),ne("div",ae({class:["p-message-text",e.cx("text")]},e.ptm("text")),[Qe(e.$slots,"default")],16),e.closable?gt((L(),j("button",ae({key:0,class:e.cx("closeButton"),"aria-label":o.closeAriaLabel,type:"button",onClick:n[0]||(n[0]=function(a){return o.close(a)})},Vn(Vn(Vn({},e.closeButtonProps),e.ptm("button")),e.ptm("closeButton"))),[Qe(e.$slots,"closeicon",{},function(){return[e.closeIcon?(L(),j("i",ae({key:0,class:[e.cx("closeIcon"),e.closeIcon]},Vn(Vn({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16)):(L(),he(l,ae({key:1,class:[e.cx("closeIcon"),e.closeIcon]},Vn(Vn({},e.ptm("buttonIcon")),e.ptm("closeIcon"))),null,16,["class"]))]})],16,a_)),[[s]]):Se("",!0)],16))],16),[[Xn,r.visible]])]}),_:3},16)}Vd.render=l_;var u_={root:function(n){var t=n.props,i=n.instance;return["p-badge p-component",{"p-badge-no-gutter":Oe.isNotEmpty(t.value)&&String(t.value).length===1,"p-badge-dot":Oe.isEmpty(t.value)&&!i.$slots.default,"p-badge-lg":t.size==="large","p-badge-xl":t.size==="xlarge","p-badge-info":t.severity==="info","p-badge-success":t.severity==="success","p-badge-warning":t.severity==="warning","p-badge-danger":t.severity==="danger","p-badge-secondary":t.severity==="secondary","p-badge-contrast":t.severity==="contrast"}]}},c_=Rt.extend({name:"badge",classes:u_}),d_={name:"BaseBadge",extends:qt,props:{value:{type:[String,Number],default:null},severity:{type:String,default:null},size:{type:String,default:null}},style:c_,provide:function(){return{$parentInstance:this}}},zd={name:"Badge",extends:d_,inheritAttrs:!1};function f_(e,n,t,i,r,o){return L(),j("span",ae({class:e.cx("root")},e.ptmi("root")),[Qe(e.$slots,"default",{},function(){return[Rn(xe(e.value),1)]})],16)}zd.render=f_;var ho={name:"SpinnerIcon",extends:Nt},h_=ne("path",{d:"M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z",fill:"currentColor"},null,-1),p_=[h_];function g_(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),p_,16)}ho.render=g_;function sr(e){"@babel/helpers - typeof";return sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sr(e)}function bn(e,n,t){return n=m_(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function m_(e){var n=v_(e,"string");return sr(n)=="symbol"?n:String(n)}function v_(e,n){if(sr(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(sr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var y_={root:function(n){var t=n.instance,i=n.props;return["p-button p-component",bn(bn(bn(bn(bn(bn(bn(bn({"p-button-icon-only":t.hasIcon&&!i.label&&!i.badge,"p-button-vertical":(i.iconPos==="top"||i.iconPos==="bottom")&&i.label,"p-disabled":t.$attrs.disabled||t.$attrs.disabled===""||i.loading,"p-button-loading":i.loading,"p-button-loading-label-only":i.loading&&!t.hasIcon&&i.label,"p-button-link":i.link},"p-button-".concat(i.severity),i.severity),"p-button-raised",i.raised),"p-button-rounded",i.rounded),"p-button-text",i.text),"p-button-outlined",i.outlined),"p-button-sm",i.size==="small"),"p-button-lg",i.size==="large"),"p-button-plain",i.plain)]},loadingIcon:"p-button-loading-icon pi-spin",icon:function(n){var t=n.props;return["p-button-icon",{"p-button-icon-left":t.iconPos==="left"&&t.label,"p-button-icon-right":t.iconPos==="right"&&t.label,"p-button-icon-top":t.iconPos==="top"&&t.label,"p-button-icon-bottom":t.iconPos==="bottom"&&t.label}]},label:"p-button-label"},b_=Rt.extend({name:"button",classes:y_}),__={name:"BaseButton",extends:qt,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:"left"},iconClass:{type:String,default:null},badge:{type:String,default:null},badgeClass:{type:String,default:null},badgeSeverity:{type:String,default:null},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},style:b_,provide:function(){return{$parentInstance:this}}},jd={name:"Button",extends:__,inheritAttrs:!1,methods:{getPTOptions:function(n){var t=n==="root"?this.ptmi:this.ptm;return t(n,{context:{disabled:this.disabled}})}},computed:{disabled:function(){return this.$attrs.disabled||this.$attrs.disabled===""||this.loading},defaultAriaLabel:function(){return this.label?this.label+(this.badge?" "+this.badge:""):this.$attrs.ariaLabel},hasIcon:function(){return this.icon||this.$slots.icon}},components:{SpinnerIcon:ho,Badge:zd},directives:{ripple:yi}},w_=["aria-label","disabled","data-p-severity"];function T_(e,n,t,i,r,o){var l=St("SpinnerIcon"),s=St("Badge"),a=Yn("ripple");return gt((L(),j("button",ae({class:e.cx("root"),type:"button","aria-label":o.defaultAriaLabel,disabled:o.disabled},o.getPTOptions("root"),{"data-p-severity":e.severity}),[Qe(e.$slots,"default",{},function(){return[e.loading?Qe(e.$slots,"loadingicon",{key:0,class:qe([e.cx("loadingIcon"),e.cx("icon")])},function(){return[e.loadingIcon?(L(),j("span",ae({key:0,class:[e.cx("loadingIcon"),e.cx("icon"),e.loadingIcon]},e.ptm("loadingIcon")),null,16)):(L(),he(l,ae({key:1,class:[e.cx("loadingIcon"),e.cx("icon")],spin:""},e.ptm("loadingIcon")),null,16,["class"]))]}):Qe(e.$slots,"icon",{key:1,class:qe([e.cx("icon")])},function(){return[e.icon?(L(),j("span",ae({key:0,class:[e.cx("icon"),e.icon,e.iconClass]},e.ptm("icon")),null,16)):Se("",!0)]}),ne("span",ae({class:e.cx("label")},e.ptm("label")),xe(e.label||" "),17),e.badge?(L(),he(s,ae({key:2,value:e.badge,class:e.badgeClass,severity:e.badgeSeverity,unstyled:e.unstyled},e.ptm("badge")),null,16,["value","class","severity","unstyled"])):Se("",!0)]})],16,w_)),[[a]])}jd.render=T_;const S_={class:"t-ml-1 t-mb-2 t-relative"},x_=ze({__name:"CopyCitation",props:{value:{}},setup(e){const n=e;let t=de(!1),i=de("Copy citation value");const r=de(!1);async function o(){try{await navigator.clipboard.writeText(n.value),t.value=!0,i.value="Copied!",setTimeout(()=>{this.copiedCitation=!1,i.value="Copy citation value"},1200)}catch{console.error("Citation could not be copied in the keyboard")}}function l(){return t.value===!0?"check":"copy"}return(s,a)=>(L(),j("span",S_,[we(Re(jd),{class:"t-h-7",onMouseenter:a[1]||(a[1]=u=>r.value=!0),onMouseleave:a[2]||(a[2]=u=>r.value=!1)},{default:ct(()=>[we(dn,{name:l(),class:qe([{"t-text-green-500":Re(t),"t-text-gray-400":!Re(t)},"t-text-xl t-align-middle"]),onClick:a[0]||(a[0]=u=>o())},null,8,["name","class"])]),_:1}),gt(we(Re(Vd),{pt:{root:"t-bg-zinc-700 t-text-white t-text-sm t-absolute t-left-1/2 t--translate-x-1/2 t-w-fit t-whitespace-nowrap t-rounded",wrapper:"t-flex t-flex-row t-pr-1",icon:"t-hidden",text:"t-pl-1",closebutton:{class:"t-hidden"}}},{default:ct(()=>[Rn(xe(Re(i)),1)]),_:1},512),[[Xn,Re(t)||r.value]])]))}}),E_={key:0,class:"t-font-semibold t-text-sm t-text-gray-400"},C_=ze({__name:"MetadataItem",props:{item:{}},setup(e){const n=e,t=J(()=>{var s;return((s=n.item)==null?void 0:s.key)||"other"}),i=J(()=>{var s;return((s=n.item)==null?void 0:s.metadata)||[]}),r=Ge();function o(){var u,c,f;const s=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/gi;return(typeof((u=n.item)==null?void 0:u.key)=="string"?(f=(c=n.item)==null?void 0:c.key)==null?void 0:f.match(s):null)!==null}function l(s,a){if(!a.panels||a.panels.length===!1)return!1;const u=pr(a.panels);return u.connector.options.citationKey?u.connector.options.citationKey===s:!1}return(s,a)=>{const u=St("MetadataItem",!0);return L(),j("div",null,[o()?Se("",!0):(L(),j("h4",E_,xe(s.$t(t.value)),1)),o()?(L(),he(zb,{key:1,url:s.item.key,text:s.item.value},null,8,["url","text"])):s.item.value?(L(),he(Hd,{key:2,value:s.item.value},null,8,["value"])):Se("",!0),l(s.item.key,Re(r).config)?(L(),he(x_,{key:3,value:s.item.value},null,8,["value"])):Se("",!0),(L(!0),j(Ee,null,et(i.value,(c,f)=>(L(),he(u,{key:f,item:c,class:"nested-metadata"},null,8,["item"]))),128))])}}}),ua=bi(C_,[["__scopeId","data-v-e836d55e"]]),P_={key:0,class:"collection-metadata t-mb-7"},I_={class:"t-text-xl t-font-semibold t-mb-2"},pu=ze({__name:"CollectionMetadata",setup(e){const n=vt();function t(o){return!o||o.collector.length===0?null:o.collector.length===1?o.collector[0].name:o.collector.map(l=>l.name).join(", ")}const i=J(()=>n.collection),r=J(()=>{if(!i.value)return[];const o={main:"title",sub:"subtitle"},l=t(i.value),{description:s}=i.value,u=[...i.value.title.filter(p=>p).map(p=>({key:o[p.type]||"title",value:p.title})),...l?[{key:"collector",value:l}]:[],...s?[{key:"description",value:s}]:[]];let c=pr(Ge().config.panels).connector.options.collectionOrder,f;(c==null?void 0:c.length)>0&&(f=c.map(p=>p.toLowerCase()));let h=[];return(f==null?void 0:f.length)>0?(h=la(f,u),h):u});return(o,l)=>r.value.length>0?(L(),j("div",P_,[ne("h3",I_,xe(o.$t("collection")),1),(L(!0),j(Ee,null,et(r.value,(s,a)=>(L(),j("div",{key:a,class:"t-mb-4"},[we(ua,{item:s},null,8,["item"])]))),128))])):Se("",!0)}}),O_={class:"t-font-semibold t-text-sm t-text-gray-400"},A_=ze({__name:"Actor",props:{data:{default:()=>[]}},setup(e){const{t:n}=tn();function t(i){const{role:r}=i;if(!r)throw new Error(n("error_undefined_role"));return r.length===0?"undefined_role":r[0]}return(i,r)=>(L(!0),j(Ee,null,et(i.data,o=>(L(),j("div",{key:o.name,class:"t-mb-4"},[ne("h4",O_,xe(i.$t(t(o))),1),we(Hd,{value:o.name},null,8,["value"])]))),128))}}),L_={key:0,class:"manifest-metadata t-mb-7"},R_={class:"t-text-xl t-font-semibold t-mb-2"},gu=ze({__name:"ManifestMetadata",setup(e){const n=Ge(),t=vt(),i=J(()=>t.manifest),r=J(()=>t.manifests),o=J(()=>{var f;return((f=i.value)==null?void 0:f.sequence.length)>0}),l=J(()=>r.value!==null?r.value.findIndex(({id:f})=>f===i.value.id)+1:1),s=J(()=>r.value!==null?r.value.length:1),a=J(()=>n.config.labels),u=J(()=>{if(!i.value)return[];let f=pr(Ge().config.panels).connector.options.manifestOrder,h=[{key:"Label",value:i.value.label},...(i.value.license||[]).map(g=>({key:"License",value:g.id})),...i.value.metadata||[]],p=[];return(f==null?void 0:f.length)>0?(p=la(f,h),p):h}),c=J(()=>{var f;return(f=i.value)==null?void 0:f.actor});return(f,h)=>o.value?(L(),j("div",L_,[ne("h3",R_,xe(f.$t(a.value.manifest))+" "+xe(l.value)+" / "+xe(s.value),1),(L(!0),j(Ee,null,et(u.value,(p,g)=>(L(),j("div",{key:g,class:"t-mb-4"},[we(ua,{item:p},null,8,["item"])]))),128)),we(A_,{data:c.value},null,8,["data"])])):Se("",!0)}}),k_={class:"item-metadata t-mb-7"},D_={class:"t-text-xl t-font-semibold t-mb-2"},mu=ze({__name:"ItemMetadata",setup(e){const n=Ge(),t=vt(),i=J(()=>t.item),r=J(()=>t.itemUrl),o=J(()=>t.manifest),l=J(()=>{var f;return(f=o.value)==null?void 0:f.sequence.length}),s=J(()=>n.config.labels),a=J(()=>o.value?o.value.sequence.findIndex(({id:f})=>f===r.value)+1:1),u=J(()=>l.value??1),c=J(()=>{var g,y,T,v,E,O,P,D;let f=pr(Ge().config.panels).connector.options.itemOrder,h=[{key:"label",value:i.value.n},{key:"language",value:(y=(g=i.value)==null?void 0:g.lang)==null?void 0:y.join(",")},{key:"image_license",value:(E=(v=(T=i.value)==null?void 0:T.image)==null?void 0:v.license)==null?void 0:E.id},{key:"image_notes",value:(D=(P=(O=i.value)==null?void 0:O.image)==null?void 0:P.license)==null?void 0:D.notes}].filter(H=>H.value),p=[];return(f==null?void 0:f.length)>0?(p=la(f,h),p):h});return(f,h)=>(L(),j("div",k_,[ne("h3",D_,xe(f.$t(s.value.item))+" "+xe(a.value)+" / "+xe(u.value),1),(L(!0),j(Ee,null,et(c.value,(p,g)=>(L(),j("div",{key:g,class:"t-mb-4"},[we(ua,{item:p},null,8,["item"])]))),128))]))}}),M_={class:"metadata-view t-overflow-auto t-break-all t-px-4 t-pt-4"},N_={__name:"MetadataView",props:{options:Object},setup(e){const n=Ge(),t=J(()=>n.config),i=J(()=>pr(t.value.panels)),r=J(()=>i.value.connector.options.documentsOrder);let o=J(()=>l(r.value));function l(s){let a=[];if(!s||s.length===0)return[pu,gu,mu];for(let u=0;u<s.length;u++){const c=s[u].toLowerCase();c.includes("collection")&&a.push(pu),c.includes("manifest")&&a.push(gu),c.includes("item")&&a.push(mu)}return a}return(s,a)=>(L(),j("div",M_,[(L(!0),j(Ee,null,et(Re(o),(u,c)=>(L(),he(at(u),{key:c}))),128))]))}};var Ud={name:"SearchIcon",extends:Nt},F_=ne("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z",fill:"currentColor"},null,-1),B_=[F_];function H_(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),B_,16)}Ud.render=H_;var V_={root:function(n){var t=n.props;return["p-tree p-component",{"p-tree-selectable":t.selectionMode!=null,"p-tree-loading":t.loading,"p-tree-flex-scrollable":t.scrollHeight==="flex"}]},loadingOverlay:"p-tree-loading-overlay p-component-overlay",loadingIcon:"p-tree-loading-icon",filterContainer:"p-tree-filter-container",input:"p-tree-filter p-inputtext p-component",searchIcon:"p-tree-filter-icon",wrapper:"p-tree-wrapper",container:"p-tree-container",node:function(n){var t=n.instance;return["p-treenode",{"p-treenode-leaf":t.leaf}]},content:function(n){var t=n.instance;return["p-treenode-content",t.node.styleClass,{"p-treenode-selectable":t.selectable,"p-highlight":t.checkboxMode&&t.$parentInstance.highlightOnSelect?t.checked:t.selected}]},toggler:"p-tree-toggler p-link",togglerIcon:"p-tree-toggler-icon",nodeTogglerIcon:"p-tree-node-toggler-icon",nodeCheckbox:function(n){var t=n.instance;return[{"p-indeterminate":t.partialChecked}]},nodeIcon:"p-treenode-icon",label:"p-treenode-label",subgroup:"p-treenode-children"},z_=Rt.extend({name:"tree",classes:V_}),Wd={name:"ChevronDownIcon",extends:Nt},j_=ne("path",{d:"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z",fill:"currentColor"},null,-1),U_=[j_];function W_(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),U_,16)}Wd.render=W_;var Gd={name:"MinusIcon",extends:Nt},G_=ne("path",{d:"M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z",fill:"currentColor"},null,-1),K_=[G_];function q_(e,n,t,i,r,o){return L(),j("svg",ae({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),K_,16)}Gd.render=q_;var Z_={name:"BaseTree",extends:qt,props:{value:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},metaKeySelection:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},loadingMode:{type:String,default:"mask"},filter:{type:Boolean,default:!1},filterBy:{type:String,default:"label"},filterMode:{type:String,default:"lenient"},filterPlaceholder:{type:String,default:null},filterLocale:{type:String,default:void 0},highlightOnSelect:{type:Boolean,default:!1},scrollHeight:{type:String,default:null},level:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:z_,provide:function(){return{$parentInstance:this}}};function ar(e){"@babel/helpers - typeof";return ar=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ar(e)}function vu(e,n){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Kd(e))||n){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(u){throw u},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,l=!1,s;return{s:function(){t=t.call(e)},n:function(){var u=t.next();return o=u.done,u},e:function(u){l=!0,s=u},f:function(){try{!o&&t.return!=null&&t.return()}finally{if(l)throw s}}}}function yu(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function bu(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?yu(Object(t),!0).forEach(function(i){Y_(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yu(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function Y_(e,n,t){return n=X_(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function X_(e){var n=J_(e,"string");return ar(n)=="symbol"?n:String(n)}function J_(e,n){if(ar(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(ar(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Ci(e){return ew(e)||$_(e)||Kd(e)||Q_()}function Q_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kd(e,n){if(e){if(typeof e=="string")return Ts(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ts(e,n)}}function $_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ew(e){if(Array.isArray(e))return Ts(e)}function Ts(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}var qd={name:"TreeNode",hostName:"Tree",extends:qt,emits:["node-toggle","node-click","checkbox-change"],props:{node:{type:null,default:null},expandedKeys:{type:null,default:null},loadingMode:{type:String,default:"mask"},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},templates:{type:null,default:null},level:{type:Number,default:null},index:null},nodeTouched:!1,toggleClicked:!1,mounted:function(){this.setAllNodesTabIndexes()},methods:{toggle:function(){this.$emit("node-toggle",this.node),this.toggleClicked=!0},label:function(n){return typeof n.label=="function"?n.label():n.label},onChildNodeToggle:function(n){this.$emit("node-toggle",n)},getPTOptions:function(n){return this.ptm(n,{context:{index:this.index,expanded:this.expanded,selected:this.selected,checked:this.checked,leaf:this.leaf}})},onClick:function(n){if(this.toggleClicked||ve.getAttribute(n.target,'[data-pc-section="toggler"]')||ve.getAttribute(n.target.parentElement,'[data-pc-section="toggler"]')){this.toggleClicked=!1;return}this.isCheckboxSelectionMode()?this.toggleCheckbox():this.$emit("node-click",{originalEvent:n,nodeTouched:this.nodeTouched,node:this.node}),this.nodeTouched=!1},onChildNodeClick:function(n){this.$emit("node-click",n)},onTouchEnd:function(){this.nodeTouched=!0},onKeyDown:function(n){if(this.isSameNode(n))switch(n.code){case"Tab":this.onTabKey(n);break;case"ArrowDown":this.onArrowDown(n);break;case"ArrowUp":this.onArrowUp(n);break;case"ArrowRight":this.onArrowRight(n);break;case"ArrowLeft":this.onArrowLeft(n);break;case"Enter":case"NumpadEnter":case"Space":this.onEnterKey(n);break}},onArrowDown:function(n){var t=n.target.getAttribute("data-pc-section")==="toggler"?n.target.closest('[role="treeitem"]'):n.target,i=t.children[1];if(i)this.focusRowChange(t,i.children[0]);else if(t.nextElementSibling)this.focusRowChange(t,t.nextElementSibling);else{var r=this.findNextSiblingOfAncestor(t);r&&this.focusRowChange(t,r)}n.preventDefault()},onArrowUp:function(n){var t=n.target;if(t.previousElementSibling)this.focusRowChange(t,t.previousElementSibling,this.findLastVisibleDescendant(t.previousElementSibling));else{var i=this.getParentNodeElement(t);i&&this.focusRowChange(t,i)}n.preventDefault()},onArrowRight:function(n){var t=this;this.leaf||this.expanded||(n.currentTarget.tabIndex=-1,this.$emit("node-toggle",this.node),this.$nextTick(function(){t.onArrowDown(n)}))},onArrowLeft:function(n){var t=ve.findSingle(n.currentTarget,'[data-pc-section="toggler"]');if(this.level===0&&!this.expanded)return!1;if(this.expanded&&!this.leaf)return t.click(),!1;var i=this.findBeforeClickableNode(n.currentTarget);i&&this.focusRowChange(n.currentTarget,i)},onEnterKey:function(n){this.setTabIndexForSelectionMode(n,this.nodeTouched),this.onClick(n),n.preventDefault()},onTabKey:function(){this.setAllNodesTabIndexes()},setAllNodesTabIndexes:function(){var n=ve.find(this.$refs.currentNode.closest('[data-pc-section="container"]'),'[role="treeitem"]'),t=Ci(n).some(function(r){return r.getAttribute("aria-selected")==="true"||r.getAttribute("aria-checked")==="true"});if(Ci(n).forEach(function(r){r.tabIndex=-1}),t){var i=Ci(n).filter(function(r){return r.getAttribute("aria-selected")==="true"||r.getAttribute("aria-checked")==="true"});i[0].tabIndex=0;return}Ci(n)[0].tabIndex=0},setTabIndexForSelectionMode:function(n,t){if(this.selectionMode!==null){var i=Ci(ve.find(this.$refs.currentNode.parentElement,'[role="treeitem"]'));n.currentTarget.tabIndex=t===!1?-1:0,i.every(function(r){return r.tabIndex===-1})&&(i[0].tabIndex=0)}},focusRowChange:function(n,t,i){n.tabIndex="-1",t.tabIndex="0",this.focusNode(i||t)},findBeforeClickableNode:function(n){var t=n.closest("ul").closest("li");if(t){var i=ve.findSingle(t,"button");return i&&i.style.visibility!=="hidden"?t:this.findBeforeClickableNode(n.previousElementSibling)}return null},toggleCheckbox:function(){var n=this.selectionKeys?bu({},this.selectionKeys):{},t=!this.checked;this.propagateDown(this.node,t,n),this.$emit("checkbox-change",{node:this.node,check:t,selectionKeys:n})},propagateDown:function(n,t,i){if(t?i[n.key]={checked:!0,partialChecked:!1}:delete i[n.key],n.children&&n.children.length){var r=vu(n.children),o;try{for(r.s();!(o=r.n()).done;){var l=o.value;this.propagateDown(l,t,i)}}catch(s){r.e(s)}finally{r.f()}}},propagateUp:function(n){var t=n.check,i=bu({},n.selectionKeys),r=0,o=!1,l=vu(this.node.children),s;try{for(l.s();!(s=l.n()).done;){var a=s.value;i[a.key]&&i[a.key].checked?r++:i[a.key]&&i[a.key].partialChecked&&(o=!0)}}catch(u){l.e(u)}finally{l.f()}t&&r===this.node.children.length?i[this.node.key]={checked:!0,partialChecked:!1}:(t||delete i[this.node.key],o||r>0&&r!==this.node.children.length?i[this.node.key]={checked:!1,partialChecked:!0}:delete i[this.node.key]),this.$emit("checkbox-change",{node:n.node,check:n.check,selectionKeys:i})},onChildCheckboxChange:function(n){this.$emit("checkbox-change",n)},findNextSiblingOfAncestor:function(n){var t=this.getParentNodeElement(n);return t?t.nextElementSibling?t.nextElementSibling:this.findNextSiblingOfAncestor(t):null},findLastVisibleDescendant:function(n){var t=n.children[1];if(t){var i=t.children[t.children.length-1];return this.findLastVisibleDescendant(i)}else return n},getParentNodeElement:function(n){var t=n.parentElement.parentElement;return ve.getAttribute(t,"role")==="treeitem"?t:null},focusNode:function(n){n.focus()},isCheckboxSelectionMode:function(){return this.selectionMode==="checkbox"},isSameNode:function(n){return n.currentTarget&&(n.currentTarget.isSameNode(n.target)||n.currentTarget.isSameNode(n.target.closest('[role="treeitem"]')))}},computed:{hasChildren:function(){return this.node.children&&this.node.children.length>0},expanded:function(){return this.expandedKeys&&this.expandedKeys[this.node.key]===!0},leaf:function(){return this.node.leaf===!1?!1:!(this.node.children&&this.node.children.length)},selectable:function(){return this.node.selectable===!1?!1:this.selectionMode!=null},selected:function(){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.node.key]===!0:!1},checkboxMode:function(){return this.selectionMode==="checkbox"&&this.node.selectable!==!1},checked:function(){return this.selectionKeys?this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].checked:!1},partialChecked:function(){return this.selectionKeys?this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].partialChecked:!1},ariaChecked:function(){return this.selectionMode==="single"||this.selectionMode==="multiple"?this.selected:void 0},ariaSelected:function(){return this.checkboxMode?this.checked:void 0}},components:{Checkbox:ra,ChevronDownIcon:Wd,ChevronRightIcon:aa,CheckIcon:er,MinusIcon:Gd,SpinnerIcon:ho},directives:{ripple:yi}},tw=["aria-label","aria-selected","aria-expanded","aria-setsize","aria-posinset","aria-level","aria-checked","tabindex"],nw=["data-p-highlight","data-p-selectable"];function iw(e,n,t,i,r,o){var l=St("SpinnerIcon"),s=St("Checkbox"),a=St("TreeNode",!0),u=Yn("ripple");return L(),j("li",ae({ref:"currentNode",class:e.cx("node"),role:"treeitem","aria-label":o.label(t.node),"aria-selected":o.ariaSelected,"aria-expanded":o.expanded,"aria-setsize":t.node.children?t.node.children.length:0,"aria-posinset":t.index+1,"aria-level":t.level,"aria-checked":o.ariaChecked,tabindex:t.index===0?0:-1,onKeydown:n[4]||(n[4]=function(){return o.onKeyDown&&o.onKeyDown.apply(o,arguments)})},t.level===1?o.getPTOptions("node"):e.ptm("subgroup")),[ne("div",ae({class:e.cx("content"),onClick:n[2]||(n[2]=function(){return o.onClick&&o.onClick.apply(o,arguments)}),onTouchend:n[3]||(n[3]=function(){return o.onTouchEnd&&o.onTouchEnd.apply(o,arguments)}),style:t.node.style},o.getPTOptions("content"),{"data-p-highlight":o.checkboxMode?o.checked:o.selected,"data-p-selectable":o.selectable}),[gt((L(),j("button",ae({type:"button",class:e.cx("toggler"),onClick:n[0]||(n[0]=function(){return o.toggle&&o.toggle.apply(o,arguments)}),tabindex:"-1","aria-hidden":"true"},o.getPTOptions("toggler")),[t.node.loading&&t.loadingMode==="icon"?(L(),j(Ee,{key:0},[t.templates.nodetogglericon?(L(),he(at(t.templates.nodetogglericon),{key:0,class:qe(e.cx("nodetogglericon"))},null,8,["class"])):(L(),he(l,ae({key:1,spin:"",class:e.cx("nodetogglericon")},e.ptm("nodetogglericon")),null,16,["class"]))],64)):(L(),j(Ee,{key:1},[t.templates.togglericon?(L(),he(at(t.templates.togglericon),{key:0,node:t.node,expanded:o.expanded,class:qe(e.cx("togglerIcon"))},null,8,["node","expanded","class"])):o.expanded?(L(),he(at(t.node.expandedIcon?"span":"ChevronDownIcon"),ae({key:1,class:e.cx("togglerIcon")},o.getPTOptions("togglerIcon")),null,16,["class"])):(L(),he(at(t.node.collapsedIcon?"span":"ChevronRightIcon"),ae({key:2,class:e.cx("togglerIcon")},o.getPTOptions("togglerIcon")),null,16,["class"]))],64))],16)),[[u]]),o.checkboxMode?(L(),he(s,{key:0,modelValue:o.checked,binary:!0,class:qe(e.cx("nodeCheckbox")),tabindex:-1,unstyled:e.unstyled,pt:o.getPTOptions("nodeCheckbox"),"data-p-checked":o.checked,"data-p-partialchecked":o.partialChecked},{icon:ct(function(c){return[t.templates.checkboxicon?(L(),he(at(t.templates.checkboxicon),{key:0,checked:c.checked,partialChecked:o.partialChecked,class:qe(c.class)},null,8,["checked","partialChecked","class"])):(L(),he(at(o.checked?"CheckIcon":o.partialChecked?"MinusIcon":null),ae({key:1,class:c.class},o.getPTOptions("nodeCheckbox.icon")),null,16,["class"]))]}),_:1},8,["modelValue","class","unstyled","pt","data-p-checked","data-p-partialchecked"])):Se("",!0),t.templates.nodeicon?(L(),he(at(t.templates.nodeicon),{key:1,node:t.node},null,8,["node"])):(L(),j("span",ae({key:2,class:[e.cx("nodeIcon"),t.node.icon]},o.getPTOptions("nodeIcon")),null,16)),ne("span",ae({class:e.cx("label")},o.getPTOptions("label"),{onKeydown:n[1]||(n[1]=Ip(function(){},["stop"]))}),[t.templates[t.node.type]||t.templates.default?(L(),he(at(t.templates[t.node.type]||t.templates.default),{key:0,node:t.node},null,8,["node"])):(L(),j(Ee,{key:1},[Rn(xe(o.label(t.node)),1)],64))],16)],16,nw),o.hasChildren&&o.expanded?(L(),j("ul",ae({key:0,class:e.cx("subgroup"),role:"group"},e.ptm("subgroup")),[(L(!0),j(Ee,null,et(t.node.children,function(c){return L(),he(a,{key:c.key,node:c,templates:t.templates,level:t.level+1,expandedKeys:t.expandedKeys,onNodeToggle:o.onChildNodeToggle,onNodeClick:o.onChildNodeClick,selectionMode:t.selectionMode,selectionKeys:t.selectionKeys,onCheckboxChange:o.propagateUp,unstyled:e.unstyled,pt:e.pt},null,8,["node","templates","level","expandedKeys","onNodeToggle","onNodeClick","selectionMode","selectionKeys","onCheckboxChange","unstyled","pt"])}),128))],16)):Se("",!0)],16,tw)}qd.render=iw;function lr(e){"@babel/helpers - typeof";return lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lr(e)}function Bo(e,n){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Zd(e))||n){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(u){throw u},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,l=!1,s;return{s:function(){t=t.call(e)},n:function(){var u=t.next();return o=u.done,u},e:function(u){l=!0,s=u},f:function(){try{!o&&t.return!=null&&t.return()}finally{if(l)throw s}}}}function rw(e){return aw(e)||sw(e)||Zd(e)||ow()}function ow(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zd(e,n){if(e){if(typeof e=="string")return Ss(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ss(e,n)}}function sw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aw(e){if(Array.isArray(e))return Ss(e)}function Ss(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function _u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function zn(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?_u(Object(t),!0).forEach(function(i){lw(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_u(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function lw(e,n,t){return n=uw(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function uw(e){var n=cw(e,"string");return lr(n)=="symbol"?n:String(n)}function cw(e,n){if(lr(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,n||"default");if(lr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Yd={name:"Tree",extends:Z_,inheritAttrs:!1,emits:["node-expand","node-collapse","update:expandedKeys","update:selectionKeys","node-select","node-unselect","filter"],data:function(){return{d_expandedKeys:this.expandedKeys||{},filterValue:null}},watch:{expandedKeys:function(n){this.d_expandedKeys=n}},methods:{onNodeToggle:function(n){var t=n.key;this.d_expandedKeys[t]?(delete this.d_expandedKeys[t],this.$emit("node-collapse",n)):(this.d_expandedKeys[t]=!0,this.$emit("node-expand",n)),this.d_expandedKeys=zn({},this.d_expandedKeys),this.$emit("update:expandedKeys",this.d_expandedKeys)},onNodeClick:function(n){if(this.selectionMode!=null&&n.node.selectable!==!1){var t=n.nodeTouched?!1:this.metaKeySelection,i=t?this.handleSelectionWithMetaKey(n):this.handleSelectionWithoutMetaKey(n);this.$emit("update:selectionKeys",i)}},onCheckboxChange:function(n){this.$emit("update:selectionKeys",n.selectionKeys),n.check?this.$emit("node-select",n.node):this.$emit("node-unselect",n.node)},handleSelectionWithMetaKey:function(n){var t=n.originalEvent,i=n.node,r=t.metaKey||t.ctrlKey,o=this.isNodeSelected(i),l;return o&&r?(this.isSingleSelectionMode()?l={}:(l=zn({},this.selectionKeys),delete l[i.key]),this.$emit("node-unselect",i)):(this.isSingleSelectionMode()?l={}:this.isMultipleSelectionMode()&&(l=r?this.selectionKeys?zn({},this.selectionKeys):{}:{}),l[i.key]=!0,this.$emit("node-select",i)),l},handleSelectionWithoutMetaKey:function(n){var t=n.node,i=this.isNodeSelected(t),r;return this.isSingleSelectionMode()?i?(r={},this.$emit("node-unselect",t)):(r={},r[t.key]=!0,this.$emit("node-select",t)):i?(r=zn({},this.selectionKeys),delete r[t.key],this.$emit("node-unselect",t)):(r=this.selectionKeys?zn({},this.selectionKeys):{},r[t.key]=!0,this.$emit("node-select",t)),r},isSingleSelectionMode:function(){return this.selectionMode==="single"},isMultipleSelectionMode:function(){return this.selectionMode==="multiple"},isNodeSelected:function(n){return this.selectionMode&&this.selectionKeys?this.selectionKeys[n.key]===!0:!1},isChecked:function(n){return this.selectionKeys?this.selectionKeys[n.key]&&this.selectionKeys[n.key].checked:!1},isNodeLeaf:function(n){return n.leaf===!1?!1:!(n.children&&n.children.length)},onFilterKeydown:function(n){(n.code==="Enter"||n.code==="NumpadEnter")&&n.preventDefault(),this.$emit("filter",{originalEvent:n,value:n.target.value})},findFilteredNodes:function(n,t){if(n){var i=!1;if(n.children){var r=rw(n.children);n.children=[];var o=Bo(r),l;try{for(o.s();!(l=o.n()).done;){var s=l.value,a=zn({},s);this.isFilterMatched(a,t)&&(i=!0,n.children.push(a))}}catch(u){o.e(u)}finally{o.f()}}if(i)return!0}},isFilterMatched:function(n,t){var i=t.searchFields,r=t.filterText,o=t.strict,l=!1,s=Bo(i),a;try{for(s.s();!(a=s.n()).done;){var u=a.value,c=String(Oe.resolveFieldData(n,u)).toLocaleLowerCase(this.filterLocale);c.indexOf(r)>-1&&(l=!0)}}catch(f){s.e(f)}finally{s.f()}return(!l||o&&!this.isNodeLeaf(n))&&(l=this.findFilteredNodes(n,{searchFields:i,filterText:r,strict:o})||l),l}},computed:{filteredValue:function(){var n=[],t=this.filterBy.split(","),i=this.filterValue.trim().toLocaleLowerCase(this.filterLocale),r=this.filterMode==="strict",o=Bo(this.value),l;try{for(o.s();!(l=o.n()).done;){var s=l.value,a=zn({},s),u={searchFields:t,filterText:i,strict:r};(r&&(this.findFilteredNodes(a,u)||this.isFilterMatched(a,u))||!r&&(this.isFilterMatched(a,u)||this.findFilteredNodes(a,u)))&&n.push(a)}}catch(c){o.e(c)}finally{o.f()}return n},valueToRender:function(){return this.filterValue&&this.filterValue.trim().length>0?this.filteredValue:this.value}},components:{TreeNode:qd,SearchIcon:Ud,SpinnerIcon:ho}},dw=["placeholder"],fw=["aria-labelledby","aria-label"];function hw(e,n,t,i,r,o){var l=St("SpinnerIcon"),s=St("SearchIcon"),a=St("TreeNode");return L(),j("div",ae({class:e.cx("root")},e.ptmi("root")),[e.loading&&e.loadingMode==="mask"?(L(),j("div",ae({key:0,class:e.cx("loadingOverlay")},e.ptm("loadingOverlay")),[Qe(e.$slots,"loadingicon",{class:qe(e.cx("loadingIcon"))},function(){return[e.loadingIcon?(L(),j("i",ae({key:0,class:[e.cx("loadingIcon"),"pi-spin",e.loadingIcon]},e.ptm("loadingIcon")),null,16)):(L(),he(l,ae({key:1,spin:"",class:e.cx("loadingIcon")},e.ptm("loadingIcon")),null,16,["class"]))]})],16)):Se("",!0),e.filter?(L(),j("div",ae({key:1,class:e.cx("filterContainer")},e.ptm("filterContainer")),[gt(ne("input",ae({"onUpdate:modelValue":n[0]||(n[0]=function(u){return r.filterValue=u}),type:"text",autocomplete:"off",class:e.cx("input"),placeholder:e.filterPlaceholder,onKeydown:n[1]||(n[1]=function(){return o.onFilterKeydown&&o.onFilterKeydown.apply(o,arguments)})},e.ptm("input")),null,16,dw),[[Ep,r.filterValue]]),Qe(e.$slots,"searchicon",{class:qe(e.cx("searchIcon"))},function(){return[we(s,ae({class:e.cx("searchIcon")},e.ptm("searchIcon")),null,16,["class"])]})],16)):Se("",!0),ne("div",ae({class:e.cx("wrapper"),style:{maxHeight:e.scrollHeight}},e.ptm("wrapper")),[ne("ul",ae({class:e.cx("container"),role:"tree","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel},e.ptm("container")),[(L(!0),j(Ee,null,et(o.valueToRender,function(u,c){return L(),he(a,{key:u.key,node:u,templates:e.$slots,level:e.level+1,index:c,expandedKeys:r.d_expandedKeys,onNodeToggle:o.onNodeToggle,onNodeClick:o.onNodeClick,selectionMode:e.selectionMode,selectionKeys:e.selectionKeys,onCheckboxChange:o.onCheckboxChange,loadingMode:e.loadingMode,unstyled:e.unstyled,pt:e.pt},null,8,["node","templates","level","index","expandedKeys","onNodeToggle","onNodeClick","selectionMode","selectionKeys","onCheckboxChange","loadingMode","unstyled","pt"])}),128))],16,fw)],16)],16)}Yd.render=hw;const pw=["id"],gw={__name:"TreeView",emits:["loading"],setup(e,{emit:n}){const t=n,i=Ge(),r=vt(),{t:o}=tn(),l=de({}),s=de(null),a=de([]),u=de(null),c=J(()=>i.config),f=J(()=>r.collectionTitle),h=J(()=>r.collection),p=J(()=>c.value&&c.value.labels||{}),g=J(()=>r.itemUrl),y=J(()=>r.manifest);jt(()=>{var N,re;t("loading",!0),h.value?(v(),l.value={...l.value,[y.value.id]:!0},O(y.value),s.value={[g.value!==""?g.value:(N=y.value.sequence[0])==null?void 0:N.id]:!0}):y.value&&(E(),s.value={[g.value!==""?g.value:(re=y.value.sequence[0])==null?void 0:re.id]:!0}),t("loading",!1),H()}),Ve(y,N=>{var Z;const re=$(N.id);!re||((Z=re.children)==null?void 0:Z.length)>0||(l.value={...l.value,[N.id]:!0},O(N))}),Ve(g,N=>{s.value={[N]:!0}});function T(N){Object.keys(N).length&&(s.value=N)}async function v(){a.value=[{key:f.value,label:f.value,selectable:!1,url:f.value,children:h.value.sequence.map(({label:N,id:re},Z)=>({key:re,label:N??B(Z),lazy:!0,url:re,selectable:!1,type:"manifest"}))}],l.value={[f.value]:!0}}async function E(){const{label:N,sequence:re,id:Z}=y.value;a.value=[{key:Z,label:N??B(),sequence:re,url:Z,selectable:!1,children:(Array.isArray(re)?re:[re]).map(({id:le,label:oe},pe)=>({key:le,label:oe??R(pe),url:le,parent:Z,leaf:!0}))}],l.value={[Z]:!0}}function O(N){const re=$(N.id,a.value[0]);re.children=N.sequence.map(({id:Z,label:le},oe)=>({key:Z,label:le??R(oe),url:Z,parent:N.id,leaf:!0,selectable:!0}))}async function P(N){if(y.value.id===N.key)return;const re=await M(N.key);O(re)}async function D(N){y.value.id!==N.parent&&(await r.initManifest(N.parent),await i.setDefaultActiveViews()),await r.initItem(N.key)}function H(){Qn(()=>{const N=document.getElementById(g.value);N&&!i0(N,u.value)&&V(N)})}async function M(N){return En(N)}function B(N){return`${p.value.manifest??o("manifest")} ${N!==void 0?N+1:""}`}function R(N){return`${p.value.item??o("page")} ${N+1}`}function V(N){N.scrollIntoView({block:"center",behavior:"smooth"})}function $(N,re){return re||([re]=a.value),re.url===N?re:re.children?re.children.find(Z=>!!$(N,Z)):null}return(N,re)=>(L(),j("div",{ref_key:"containerRef",ref:u,class:"tree-view t-px-4 t-pt-4 t-h-full t-overflow-auto"},[we(Re(Yd),{expandedKeys:l.value,"onUpdate:expandedKeys":re[0]||(re[0]=Z=>l.value=Z),"selection-keys":s.value,value:a.value,class:"t-w-full",unstyled:"","selection-mode":"single",pt:{root:"t-relative",wrapper:"t-relative t-overflow-auto",filterContainer:"t-w-full t-relative t-mb-4",container:"t-me-4",content:Z=>({class:["t-flex t-py-2 t-pr-3 t-rounded-md t-cursor-pointer","t-relative",{"t-pl-8":!Z.context.leaf||Z.props.node.lazy},{"t-pl-3":Z.context.leaf&&!Z.props.node.lazy},{"hover:t-bg-zinc-200 dark:hover:t-bg-zinc-700":!Z.context.selected},{"t-bg-primary t-text-gray-100":Z.context.selected}]}),toggler:Z=>({class:["t-border-0 t-absolute t-left-0 t-top-[10px] t-w-full t-pl-3 t-text-left",{"t-hidden":Z.context.leaf&&!Z.props.node.lazy}]}),label:"t-cursor-pointer t-select-none",subgroup:"t-pl-2",loadingOverlay:"t-absolute t-z-10 t-w-full t-h-full t-flex t-items-center t-justify-center t-bg-white dark:t-bg-zinc-800 t-bg-opacity-75 dark:t-bg-opacity-75"},"onUpdate:selectionKeys":T,onNodeExpand:P,onNodeSelect:D},{default:ct(({node:Z})=>[ne("span",{id:Z.key},xe(Z.label),9,pw)]),_:1},8,["expandedKeys","selection-keys","value","pt"])],512))}},mw=ze({__name:"AnnotationIcon",props:{name:{}},setup(e){return(n,t)=>n.name?(L(),he(dn,{key:0,class:"dark:text-gray-300 t-text-primary",name:n.name},null,8,["name"])):Se("",!0)}}),vw={key:0,class:"annotations-list t-overflow-auto"},yw=["data-annotation-id","onClick"],bw=["innerHTML"],_w=ze({__name:"AnnotationsList",props:{annotations:{default:()=>[]},types:{}},setup(e){const n=xt(),t=Ge(),i=e,r=J(()=>n.activeAnnotations),o=J(()=>n.filteredAnnotations),l=J(()=>i.types.reduce((p,g)=>(p[g.name]=g.annotationType||"annotation",p),{}));function s(p){return!!r.value[p.id]}function a(p){return l.value[p.body["x-content-type"]]==="text"}function u(p){var g;return((g=i.types.find(({name:y})=>y===p))==null?void 0:g.icon)||"pencil"}function c(p){n.addActiveAnnotation(p)}function f(p){n.removeActiveAnnotation(p)}function h({id:p}){!!r.value[p]?f(p):c(p)}return(p,g)=>o.value.length?(L(),j("div",vw,[(L(!0),j(Ee,null,et(p.annotations,y=>(L(),j("div",{key:y.id},[ne("div",{class:qe(["t-flex t-items-center t-space-x-2 item",["t-py-2 t-px-3 t-mb-1 t-rounded-md",{"hover:t-bg-gray-200 dark:hover:t-bg-gray-600 t-cursor-pointer":!a(y)&&!s(y)},{"t-bg-gray-300 dark:t-bg-gray-600 active":s(y)}]]),"data-annotation-id":y.id,onClick:T=>a(y)?()=>{}:h(y)},[!a(y)&&Re(t).getIconByType(y.body["x-content-type"])?(L(),he(mw,{key:0,name:u(y.body["x-content-type"])},null,8,["name"])):Se("",!0),ne("span",{class:"t-break-all",innerHTML:y.body.value},null,8,bw)],10,yw)]))),128))])):Se("",!0)}}),ww={"data-cy":"message-box"},Tw={class:"t-flex t-items-center t-justify-center"},Sw={class:"t-font-bold t-align-middle"},xw={key:0,class:"t-text-center t-mt-2 t-text-sm dark:t-text-gray-400"},Ew=["innerHTML"],_i={__name:"MessageBox",props:{message:{type:String,default:()=>""},title:String,type:{type:String,default:()=>""}},setup(e){const n=e,t=Ge(),i=J(()=>t.config),r=J(()=>i.value.notificationColors),o=J(()=>{var l,s;switch(n.type){case"info":return(l=r.value)!=null&&l.info?r.value.info:"";case"warning":return(s=r.value)!=null&&s.warning?r.value.warning:"";default:return""}});return(l,s)=>(L(),j("div",ww,[ne("div",Tw,[we(dn,{class:qe([`t-text-${o.value}`,"t-pr-2"]),name:e.type},null,8,["class","name"]),ne("span",Sw,xe(e.title||e.message),1)]),e.title?(L(),j("div",xw,[ne("span",{innerHTML:e.message},null,8,Ew)])):Se("",!0)]))}};function Cw(e){let n={};return fo(e,"data-annotation-ids").forEach(t=>n[t]=!0),n=ca(e,n),n=da(e,n),Object.keys(n)}function ca(e,n={}){const t=e.parentElement;return t&&t.id!=="text-content"?(fo(t,"data-annotation-ids").forEach(i=>n[i]=!0),ca(t,n)):n}function da(e,n={}){const{children:t}=e;return[...t].forEach(i=>{i.dataset.annotation&&(fo(i,"data-annotation-ids").forEach(r=>n[r]=!0),n=da(i,n))}),n}function Xd(e){const n=Object.keys(e).map(t=>`${t}+${e[t]}`).join(",");return n!==""?n:"null"}const Pw={class:"t-p-4 t-overflow-auto"},Iw=ze({__name:"AnnotationsView",props:{types:{}},emits:["init"],setup(e,{emit:n}){const t=xt(),i=vt(),r=e,o=n;let l=null,s=null;const a=J(()=>t.annotations),u=J(()=>t.filteredAnnotations),c=J(()=>i.activeContentMap),f=J(()=>{const p=Xd(c.value),g=l!==a.value,y=s!==p;return`${a.value!==null}|${y}|${g}|${p}`});Ve(f,p=>{if(!p)return;const[g,y,T,v]=p.split("|");g!=="true"||y!=="true"&&T!=="true"||v==="null"||(l=t.annotations,s=v,t.resetAnnotations(),t.selectFilteredAnnotations(r.types),t.highlightTargetsLevel0(),o("init"))},{immediate:!0});const h=na.on("click",({target:p})=>{let g={};fo(p,"data-annotation-ids").forEach(v=>g[v]=!0),g=ca(p,g),g=da(p,g);const y=parseInt(p.getAttribute("data-annotation-level"),10)>0,T=[];Object.keys(g).forEach(v=>{const E=document.querySelector(`[data-annotation-id="${v}"]`);E&&T.push(E),u.value.find(P=>P.id===v)&&(y?t.removeActiveAnnotation(v):t.addActiveAnnotation(v))}),T.length>0&&ta(T[0],T[0].closest(".panel-body"))});return no(()=>h()),(p,g)=>(L(),j("div",Pw,[u.value.length>0?(L(),he(_w,{key:0,class:"custom-font",annotations:u.value,types:p.types},null,8,["annotations","types"])):(L(),he(_i,{key:1,message:p.$t("no_annotations_in_view"),title:p.$t("no_annotations_available"),type:"info"},null,8,["message","title"]))]))}}),Ow={class:"t-space-y-4"},Aw={class:"t-border t-rounded-md t-min-w-[16rem] t-p-4"},Lw={class:"t-font-semibold t-mb-2"},Rw={class:"t-font-semibold t-mb-2 t-flex t-whitespace-nowrap"},kw=ze({__name:"ActiveVariantsDetails",setup(e){const n=xt(),t=J(()=>{const o=n.activeAnnotations;return Object.keys(o).filter(l=>o[l].body["x-content-type"]==="Variant").map(l=>o[l])}),i=J(()=>t.value.reduce((o,l)=>(l.target.forEach(s=>{const a=s.selector.value;o[a]?o[a].variants.push(l):o[a]={content:s.source,variants:[l]}}),o),{}));function r(o){return n.variantItemsColors[o]}return(o,l)=>(L(),j("div",Ow,[(L(!0),j(Ee,null,et(Object.keys(i.value),(s,a)=>(L(),j("div",{key:a,class:"t-flex t-space-x-2 t-min-h-[100px] t-overflow-x-auto"},[ne("div",Aw,[ne("h3",Lw,xe(o.$t("original")),1),ne("p",null,xe(i.value[s].content),1)]),(L(!0),j(Ee,null,et(i.value[s].variants,(u,c)=>(L(),j("div",{key:c,class:"t-border t-rounded-md t-min-w-[16rem] t-p-4"},[ne("h3",Rw,[ne("span",{class:"t-rounded-full t-h-3 t-w-3 t-mt-1.5 t-mr-2 t-flex-shrink-0",style:hn({background:Re(Ut)[r(u.body.value.witness)][500]})},null,4),Rn(" "+xe(u.body.value.witness),1)]),ne("p",null,xe(u.body.value.entry),1)]))),128))]))),128))]))}}),Dw={class:"t-font-semibold t-mb-2 t-flex t-whitespace-nowrap"},Mw=ze({__name:"WitnessesDetails",setup(e){const n=xt(),t=J(()=>n.witnesses);function i(r){return n.variantItemsColors[r]}return(r,o)=>(L(!0),j(Ee,null,et(t.value,(l,s)=>(L(),j("div",{key:s,class:"t-flex t-flex-col t-rounded-md t-border t-mb-2 t-p-4"},[ne("h3",Dw,[ne("span",{class:"t-rounded-full t-h-3 t-w-3 t-mt-1.5 t-mr-2 t-flex-shrink-0",style:hn({background:Re(Ut)[i(l.idno)][500]})},null,4),Rn(" "+xe(l.idno),1)]),o[0]||(o[0]=ne("p",null,"test",-1))]))),128))}}),Nw={id:"variants-top-bar",class:"t-flex t-flex-col"},Fw={class:"t-text-sm t-font-bold t-mb-2"},Bw={class:"t-flex t-items-center t-pb-4 t-border-b dark:t-border-b-gray-600"},Hw={class:"t-space-y-2"},Vw=["for","title"],zw={class:"t-mt-4 t-flex t-items-center"},jw={class:"t-text-sm t-font-bold"},Uw=ze({__name:"VariantsTopBar",setup(e){const n=xt(),t=J(()=>n.witnesses),i=J(()=>Object.keys(n.activeWitnessesIds).filter(u=>!!n.activeWitnessesIds[u]).length),r=de(!1),o=de(!1),l=de(!1);Ve(t,u=>{let c=n.activeWitnessesIds;(u==null?void 0:u.length)>0&&(u.forEach(f=>c[f.idno]=!0),n.setActiveWitnessesIds(c))},{immediate:!0});function s(u){return n.variantItemsColors[u]}function a(u,c){let f=n.activeWitnessesIds;f[u.idno]=c,n.filterAnnotationsByWitnesses(Object.keys(f).filter(h=>!!f[h])),n.setActiveWitnessesIds(f)}return(u,c)=>(L(),j(Ee,null,[gt(ne("div",Nw,[ne("h3",Fw,xe(u.$t("witnesses"))+": ",1),ne("div",Bw,[we(oa,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=f=>o.value=f),"button-text":i.value+" "+u.$t("witnesses_selected"),size:"small","open-left":""},{default:ct(()=>[ne("div",Hw,[(L(!0),j(Ee,null,et(t.value,(f,h)=>(L(),j("div",{key:h,class:"t-flex t-flex-shrink-0 t-cursor-pointer t-space-x-2"},[we(Ur,{id:`witness-toggle-${h}`,"model-value":Re(n).activeWitnessesIds[f.idno],"onUpdate:modelValue":p=>a(f,p)},null,8,["id","model-value","onUpdate:modelValue"]),ne("label",{class:"t-relative t-rounded-3xl t-box-border t-px-2 t-py-1 t-text-xs t-flex-grow-0 t-font-semibold t-cursor-pointer t-truncate t-max-w-[300px]",for:`witness-toggle-${h}`,title:f.title??"-",style:hn({background:Re(Ut)[s(f.idno)][100],color:Re(Ut)[s(f.idno)][600]})},xe(f.idnoAlt?`(${f.idnoAlt}) `:"")+xe(f.title??"-"),13,Vw)]))),128))])]),_:1},8,["modelValue","button-text"])]),gt(ne("div",zw,[ne("span",jw,xe(Object.keys(Re(n).activeAnnotations).length)+" Variants selected",1)],512),[[Xn,Object.keys(Re(n).activeAnnotations).length>0]])],512),[[Xn,Re(n).filteredAnnotations.length>0]]),we(ys,{modelValue:r.value,"onUpdate:modelValue":c[1]||(c[1]=f=>r.value=f),title:u.$t("witnesses_details")},{default:ct(()=>[we(Mw)]),_:1},8,["modelValue","title"]),we(ys,{modelValue:l.value,"onUpdate:modelValue":c[2]||(c[2]=f=>l.value=f),title:u.$t("selected_variants")},{default:ct(()=>[we(kw)]),_:1},8,["modelValue","title"])],64))}}),Ww=["data-annotation-id"],Gw=["innerHTML"],Kw={class:"t-w-1/3 t-flex t-flex-wrap t-gap-0.5"},qw=["onMouseover"],Zw={class:"t-pointer-events-none"},Yw={key:0,class:"t-slate-200 t-my-[6px] t-rounded-none","data-cy":"variant-sep-line"},Xw=ze({__name:"VariantItem",props:{annotation:{default:()=>({})},isActive:{type:Boolean,default:()=>!0},toggle:{type:Function,default:()=>null},showSeparator:{type:Boolean,default:()=>!1}},emits:["select","unselect","show-details"],setup(e,{emit:n}){const t=xt(),i=J(()=>o.annotation.body.value.entry),r=J(()=>o.annotation.body.value.witnesses),o=e,l=n;function s(){o.isActive?l("unselect"):l("select")}function a(p){return t.variantItemsColors[p]}function u(p,g){const{target:y}=p,T=document.createElement("div");T.classList.add("witness-tooltip","t-absolute","t-z-50","t-rounded-3xl","t-box-border","t-px-2","t-py-1","t-text-xs","t-font-semibold","t-max-w-[300px]","t-truncate","-t-top-[28px]","t-left-1/2","-t-translate-x-1/2","t-border","t-text-nowrap"),T.style.background=Ut[a(g)][100],T.style.color=Ut[a(g)][600],T.style.borderColor=Ut[a(g)][600],T.innerHTML=h(g),y.appendChild(T)}function c(p){const{target:g}=p;g.querySelector(".witness-tooltip").remove()}function f(p){return t.witnessesMap[p].idnoAlt??"-"}function h(p){return t.witnessesMap[p].title??"-"}return(p,g)=>(L(),j(Ee,null,[ne("div",{class:qe(["t-items-center t-flex t-mb-1 t-relative",["t-py-2 t-px-2 -t-mx-2 t-mb-1 t-space-x-2 t-rounded-md",{"hover:t-bg-gray-200 dark:hover:t-bg-gray-600 t-cursor-pointer":!p.isActive},{"t-bg-gray-300 dark:t-bg-gray-600 active":p.isActive}]]),"data-annotation-id":p.annotation.id,onClick:s},[ne("span",{class:"t-w-2/3",innerHTML:i.value},null,8,Gw),ne("div",Kw,[(L(!0),j(Ee,null,et(r.value,y=>(L(),j("div",{key:y,class:"t-relative t-rounded-3xl t-box-border t-px-2 t-py-1 t-text-xs t-flex-grow-0 t-font-semibold",style:hn({background:Re(Ut)[a(y)][100],color:Re(Ut)[a(y)][600]}),onMouseover:T=>u(T,y),onMouseout:g[0]||(g[0]=T=>c(T))},[ne("span",Zw,xe(f(y)),1)],44,qw))),128))])],10,Ww),p.showSeparator?(L(),j("hr",Yw)):Se("",!0)],64))}}),Jw={key:0,class:"annotations-list t-overflow-visible"},Qw=ze({__name:"VariantsList",setup(e){const n=xt(),t=Ge(),i=J(()=>t.config.lang),r=J(()=>n.activeAnnotations),o=J(()=>n.visibleAnnotations);function l(p){return!!r.value[p.id]}function s(p){n.addActiveAnnotation(p)}function a(p){n.removeActiveAnnotation(p)}function u({id:p}){!!r.value[p]?a(p):s(p)}function c(){return n.isSingleSelectMode&&n.filteredAnnotations.length>0?xn[i.value].single_select_mode_info_message:xn[i.value].no_annotations_in_view}function f(){return n.isSingleSelectMode&&n.filteredAnnotations.length>0?xn[i.value].single_select_mode:xn[i.value].no_annotations_available}function h(p,g){if(p[g+1])return kt(p[g])!==kt(p[g+1])}return(p,g)=>o.value.length>0?(L(),j("div",Jw,[(L(!0),j(Ee,null,et(o.value,(y,T)=>(L(),he(Xw,{key:y.id,annotation:y,"is-active":l(y),toggle:u,"show-separator":h(o.value,T),onSelect:v=>s(y.id),onUnselect:v=>a(y.id),onShowDetails:p.openDetailsDialog},null,8,["annotation","is-active","show-separator","onSelect","onUnselect","onShowDetails"]))),128))])):(L(),he(_i,{key:1,message:c(),title:f(),type:"info"},null,8,["message","title"]))}}),$w={class:"t-flex t-flex-col t-p-4"},eT={class:"t-mb-2"},tT={class:"t-flex-1 t-overflow-visible"},nT=ze({__name:"VariantsView",setup(e){const n=xt(),t=vt(),i=J(()=>n.annotations),r=J(()=>t.activeContentMap),o=J(()=>`${i.value!==null}|${Xd(r.value)}`);Ve(o,s=>{const[a,u]=s.split("|");a!=="true"||u==="null"||(n.resetAnnotations(),n.selectFilteredAnnotations([{name:"Variant"}]),n.highlightTargetsLevel0(),n.isSingleSelectMode=!1)},{immediate:!0});const l=na.on("click",({target:s})=>{let a=Cw(s);const c=$v(n.annotations,"Variant").map(y=>y.id);a=a.filter(y=>c.includes(y));const f=n.visibleAnnotations.filter(y=>a.find(T=>y.id===T));if(n.isSingleSelectMode){if(a.length<1)return}else if(f.length===0)return;const h=parseInt(s.getAttribute("data-annotation-level"),10)>0,p=f.map(y=>y.id),g=document.querySelector(`[data-annotation-id="${p[0]}"]`);g&&ta(g,g.closest(".panel-body")),n.isSingleSelectMode?h?(n.removeVisibleAnnotations(p),n.deactivateAnnotationsByIds(p)):(n.addVisibleAnnotations(a),n.activateAnnotationsByIds(a)):h?n.deactivateAnnotationsByIds(p):n.activateAnnotationsByIds(p)});return no(()=>l()),(s,a)=>(L(),j("div",$w,[ne("div",eT,[we(Uw)]),ne("div",tT,[we(Qw)])]))}}),iT={class:"content-view t-px-4 t-pt-4"},rT={key:0,class:"t-p-2"},oT=["innerHTML"],sT={__name:"ContentView",props:{url:String,type:String,fontSize:Number,panelIndex:Number},emits:["loading"],setup(e,{emit:n}){const t=e,i=n,r=cc("textContainer"),o=Ge(),l=vt(),s=de(""),a=de(null),u=J(()=>o.config),c=J(()=>({fontSize:`${t.fontSize}px`}));let f=null;Ve(()=>t.url,h,{immediate:!0});async function h(g){if(console.log(g),s.value="",!g){a.value="no_text_in_view";return}const y=xt();try{a.value="",i("loading",!0),await co(300);const T=await En(g);p(T);const v=n0(T);s.value=v.documentElement.innerHTML,setTimeout(async()=>{i("loading",!1);const E=r.value;y.addHighlightAttributesToText(E),f&&E.removeEventListener("click",f),f=y.addHighlightClickListeners(E),l.setActiveContentMap(t.url,t.panelIndex)},100)}catch(T){console.error(T),a.value=T.message}}function p(g){let y;try{y=JSON.parse(g)}catch{}if(y&&y.status===500)throw new Error("no_text_in_view")}return(g,y)=>(L(),j("div",iT,[a.value!==""?(L(),j("div",rT,[we(_i,{message:g.$t(a.value),"notification-colors":u.value.notificationColors,title:g.$t("no_text_available"),type:"warning"},null,8,["message","notification-colors","title"])])):(L(),j("div",{key:1,id:"text-content",ref_key:"textContainer",ref:r,class:"custom-font item-content t-flex t-flex-col t-flex-1 t-overflow-auto"},[ne("div",{class:qe({rtl:u.value.rtl}),innerHTML:s.value,style:hn(c.value)},null,14,oT)],512))]))}},aT=bi(sT,[["__scopeId","data-v-f59632a1"]]);var Jd={exports:{}};(function(e){//! openseadragon 3.1.0
//! Built on 2022-06-07
//! Git commit: v3.1.0-1-c1c380f
//! http://openseadragon.github.io
//! License: http://openseadragon.github.io/license/
function n(t){return new n.Viewer(t)}(function(t){t.version={versionStr:"3.1.0",major:parseInt("3",10),minor:parseInt("1",10),revision:parseInt("0",10)};var i={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},r=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.isFunction=function(l){return t.type(l)==="function"},t.isArray=Array.isArray||function(l){return t.type(l)==="array"},t.isWindow=function(l){return l&&typeof l=="object"&&"setInterval"in l},t.type=function(l){return l==null?String(l):i[r.call(l)]||"object"},t.isPlainObject=function(l){if(!l||n.type(l)!=="object"||l.nodeType||t.isWindow(l)||l.constructor&&!o.call(l,"constructor")&&!o.call(l.constructor.prototype,"isPrototypeOf"))return!1;var s;for(var a in l)s=a;return s===void 0||o.call(l,s)},t.isEmptyObject=function(l){for(var s in l)return!1;return!0},t.freezeObject=function(l){return Object.freeze?t.freezeObject=Object.freeze:t.freezeObject=function(s){return s},t.freezeObject(l)},t.supportsCanvas=function(){var l=document.createElement("canvas");return!!(t.isFunction(l.getContext)&&l.getContext("2d"))}(),t.isCanvasTainted=function(l){var s=!1;try{l.getContext("2d").getImageData(0,0,1,1)}catch{s=!0}return s},t.supportsAddEventListener=function(){return!!(document.documentElement.addEventListener&&document.addEventListener)}(),t.supportsRemoveEventListener=function(){return!!(document.documentElement.removeEventListener&&document.removeEventListener)}(),t.supportsEventListenerOptions=function(){var l=0;if(t.supportsAddEventListener)try{var s={get capture(){return l++,!1},get once(){return l++,!1},get passive(){return l++,!1}};window.addEventListener("test",null,s),window.removeEventListener("test",null,s)}catch{l=0}return l>=3}(),t.getCurrentPixelDensityRatio=function(){if(t.supportsCanvas){var l=document.createElement("canvas").getContext("2d"),s=window.devicePixelRatio||1,a=l.webkitBackingStorePixelRatio||l.mozBackingStorePixelRatio||l.msBackingStorePixelRatio||l.oBackingStorePixelRatio||l.backingStorePixelRatio||1;return Math.max(s,1)/a}else return 1},t.pixelDensityRatio=t.getCurrentPixelDensityRatio()})(n),function(t){t.extend=function(){var a,u,c,f,h,p,g=arguments[0]||{},y=arguments.length,T=!1,v=1;for(typeof g=="boolean"&&(T=g,g=arguments[1]||{},v=2),typeof g!="object"&&!n.isFunction(g)&&(g={}),y===v&&(g=this,--v);v<y;v++)if(a=arguments[v],a!==null||a!==void 0)for(u in a)c=g[u],f=a[u],g!==f&&(T&&f&&(n.isPlainObject(f)||(h=n.isArray(f)))?(h?(h=!1,p=c&&n.isArray(c)?c:[]):p=c&&n.isPlainObject(c)?c:{},g[u]=n.extend(T,p,f)):f!==void 0&&(g[u]=f));return g};var i=function(){if(typeof navigator!="object")return!1;var a=navigator.userAgent;return typeof a!="string"?!1:a.indexOf("iPhone")!==-1||a.indexOf("iPad")!==-1||a.indexOf("iPod")!==-1};t.extend(t,{DEFAULT_SETTINGS:{xmlPath:null,tileSources:null,tileHost:null,initialPage:0,crossOriginPolicy:!1,ajaxWithCredentials:!1,loadTilesWithAjax:!1,ajaxHeaders:{},splitHashDataForPost:!1,panHorizontal:!0,panVertical:!0,constrainDuringPan:!1,wrapHorizontal:!1,wrapVertical:!1,visibilityRatio:.5,minPixelRatio:.5,defaultZoomLevel:0,minZoomLevel:null,maxZoomLevel:null,homeFillsViewer:!1,clickTimeThreshold:300,clickDistThreshold:5,dblClickTimeThreshold:300,dblClickDistThreshold:20,springStiffness:6.5,animationTime:1.2,gestureSettingsMouse:{dragToPan:!0,scrollToZoom:!0,clickToZoom:!0,dblClickToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsTouch:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsPen:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!0,dblClickToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsUnknown:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},zoomPerClick:2,zoomPerScroll:1.2,zoomPerSecond:1,blendTime:0,alwaysBlend:!1,autoHideControls:!0,immediateRender:!1,minZoomImageRatio:.9,maxZoomPixelRatio:1.1,smoothTileEdgesMinZoom:1.1,iOSDevice:i(),pixelsPerWheelLine:40,pixelsPerArrowPress:40,autoResize:!0,preserveImageSizeOnResize:!1,minScrollDeltaTime:50,rotationIncrement:90,showSequenceControl:!0,sequenceControlAnchor:null,preserveViewport:!1,preserveOverlays:!1,navPrevNextWrap:!1,showNavigationControl:!0,navigationControlAnchor:null,showZoomControl:!0,showHomeControl:!0,showFullPageControl:!0,showRotationControl:!1,showFlipControl:!1,controlsFadeDelay:2e3,controlsFadeLength:1500,mouseNavEnabled:!0,showNavigator:!1,navigatorId:null,navigatorPosition:null,navigatorSizeRatio:.2,navigatorMaintainSizeRatio:!1,navigatorTop:null,navigatorLeft:null,navigatorHeight:null,navigatorWidth:null,navigatorAutoResize:!0,navigatorAutoFade:!0,navigatorRotate:!0,navigatorBackground:"#000",navigatorOpacity:.8,navigatorBorderColor:"#555",navigatorDisplayRegionColor:"#900",degrees:0,flipped:!1,opacity:1,preload:!1,compositeOperation:null,imageSmoothingEnabled:!0,placeholderFillStyle:null,subPixelRoundingForTransparency:null,showReferenceStrip:!1,referenceStripScroll:"horizontal",referenceStripElement:null,referenceStripHeight:null,referenceStripWidth:null,referenceStripPosition:"BOTTOM_LEFT",referenceStripSizeRatio:.2,collectionRows:3,collectionColumns:0,collectionLayout:"horizontal",collectionMode:!1,collectionTileSize:800,collectionTileMargin:80,imageLoaderLimit:0,maxImageCacheCount:200,timeout:3e4,useCanvas:!0,prefixUrl:"/images/",navImages:{zoomIn:{REST:"zoomin_rest.png",GROUP:"zoomin_grouphover.png",HOVER:"zoomin_hover.png",DOWN:"zoomin_pressed.png"},zoomOut:{REST:"zoomout_rest.png",GROUP:"zoomout_grouphover.png",HOVER:"zoomout_hover.png",DOWN:"zoomout_pressed.png"},home:{REST:"home_rest.png",GROUP:"home_grouphover.png",HOVER:"home_hover.png",DOWN:"home_pressed.png"},fullpage:{REST:"fullpage_rest.png",GROUP:"fullpage_grouphover.png",HOVER:"fullpage_hover.png",DOWN:"fullpage_pressed.png"},rotateleft:{REST:"rotateleft_rest.png",GROUP:"rotateleft_grouphover.png",HOVER:"rotateleft_hover.png",DOWN:"rotateleft_pressed.png"},rotateright:{REST:"rotateright_rest.png",GROUP:"rotateright_grouphover.png",HOVER:"rotateright_hover.png",DOWN:"rotateright_pressed.png"},flip:{REST:"flip_rest.png",GROUP:"flip_grouphover.png",HOVER:"flip_hover.png",DOWN:"flip_pressed.png"},previous:{REST:"previous_rest.png",GROUP:"previous_grouphover.png",HOVER:"previous_hover.png",DOWN:"previous_pressed.png"},next:{REST:"next_rest.png",GROUP:"next_grouphover.png",HOVER:"next_hover.png",DOWN:"next_pressed.png"}},debugMode:!1,debugGridColor:["#437AB2","#1B9E77","#D95F02","#7570B3","#E7298A","#66A61E","#E6AB02","#A6761D","#666666"],silenceMultiImageWarnings:!1},SIGNAL:"----seadragon----",delegate:function(a,u){return function(){var c=arguments;return c===void 0&&(c=[]),u.apply(a,c)}},BROWSERS:{UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5,EDGE:6,CHROMEEDGE:7},SUBPIXEL_ROUNDING_OCCURRENCES:{NEVER:0,ONLY_AT_REST:1,ALWAYS:2},_viewers:new Map,getViewer:function(a){return t._viewers.get(this.getElement(a))},getElement:function(a){return typeof a=="string"&&(a=document.getElementById(a)),a},getElementPosition:function(a){var u=new t.Point,c,f;for(a=t.getElement(a),c=t.getElementStyle(a).position==="fixed",f=s(a,c);f;)u.x+=a.offsetLeft,u.y+=a.offsetTop,c&&(u=u.plus(t.getPageScroll())),a=f,c=t.getElementStyle(a).position==="fixed",f=s(a,c);return u},getElementOffset:function(a){a=t.getElement(a);var u=a&&a.ownerDocument,c,f,h={top:0,left:0};return u?(c=u.documentElement,typeof a.getBoundingClientRect<"u"&&(h=a.getBoundingClientRect()),f=u===u.window?u:u.nodeType===9?u.defaultView||u.parentWindow:!1,new t.Point(h.left+(f.pageXOffset||c.scrollLeft)-(c.clientLeft||0),h.top+(f.pageYOffset||c.scrollTop)-(c.clientTop||0))):new t.Point},getElementSize:function(a){return a=t.getElement(a),new t.Point(a.clientWidth,a.clientHeight)},getElementStyle:document.documentElement.currentStyle?function(a){return a=t.getElement(a),a.currentStyle}:function(a){return a=t.getElement(a),window.getComputedStyle(a,"")},getCssPropertyWithVendorPrefix:function(a){var u={};return t.getCssPropertyWithVendorPrefix=function(c){if(u[c]!==void 0)return u[c];var f=document.createElement("div").style,h=null;if(f[c]!==void 0)h=c;else for(var p=["Webkit","Moz","MS","O","webkit","moz","ms","o"],g=t.capitalizeFirstLetter(c),y=0;y<p.length;y++){var T=p[y]+g;if(f[T]!==void 0){h=T;break}}return u[c]=h,h},t.getCssPropertyWithVendorPrefix(a)},capitalizeFirstLetter:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},positiveModulo:function(a,u){var c=a%u;return c<0&&(c+=u),c},pointInElement:function(a,u){a=t.getElement(a);var c=t.getElementOffset(a),f=t.getElementSize(a);return u.x>=c.x&&u.x<c.x+f.x&&u.y<c.y+f.y&&u.y>=c.y},getMousePosition:function(a){if(typeof a.pageX=="number")t.getMousePosition=function(u){var c=new t.Point;return c.x=u.pageX,c.y=u.pageY,c};else if(typeof a.clientX=="number")t.getMousePosition=function(u){var c=new t.Point;return c.x=u.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c.y=u.clientY+document.body.scrollTop+document.documentElement.scrollTop,c};else throw new Error("Unknown event mouse position, no known technique.");return t.getMousePosition(a)},getPageScroll:function(){var a=document.documentElement||{},u=document.body||{};if(typeof window.pageXOffset=="number")t.getPageScroll=function(){return new t.Point(window.pageXOffset,window.pageYOffset)};else if(u.scrollLeft||u.scrollTop)t.getPageScroll=function(){return new t.Point(document.body.scrollLeft,document.body.scrollTop)};else if(a.scrollLeft||a.scrollTop)t.getPageScroll=function(){return new t.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)};else return new t.Point(0,0);return t.getPageScroll()},setPageScroll:function(a){if(typeof window.scrollTo<"u")t.setPageScroll=function(f){window.scrollTo(f.x,f.y)};else{var u=t.getPageScroll();if(u.x===a.x&&u.y===a.y)return;document.body.scrollLeft=a.x,document.body.scrollTop=a.y;var c=t.getPageScroll();if(c.x!==u.x&&c.y!==u.y){t.setPageScroll=function(f){document.body.scrollLeft=f.x,document.body.scrollTop=f.y};return}if(document.documentElement.scrollLeft=a.x,document.documentElement.scrollTop=a.y,c=t.getPageScroll(),c.x!==u.x&&c.y!==u.y){t.setPageScroll=function(f){document.documentElement.scrollLeft=f.x,document.documentElement.scrollTop=f.y};return}t.setPageScroll=function(f){}}t.setPageScroll(a)},getWindowSize:function(){var a=document.documentElement||{},u=document.body||{};if(typeof window.innerWidth=="number")t.getWindowSize=function(){return new t.Point(window.innerWidth,window.innerHeight)};else if(a.clientWidth||a.clientHeight)t.getWindowSize=function(){return new t.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(u.clientWidth||u.clientHeight)t.getWindowSize=function(){return new t.Point(document.body.clientWidth,document.body.clientHeight)};else throw new Error("Unknown window size, no known technique.");return t.getWindowSize()},makeCenteredNode:function(a){a=t.getElement(a);var u=[t.makeNeutralElement("div"),t.makeNeutralElement("div"),t.makeNeutralElement("div")];return t.extend(u[0].style,{display:"table",height:"100%",width:"100%"}),t.extend(u[1].style,{display:"table-row"}),t.extend(u[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),u[0].appendChild(u[1]),u[1].appendChild(u[2]),u[2].appendChild(a),u[0]},makeNeutralElement:function(a){var u=document.createElement(a),c=u.style;return c.background="transparent none",c.border="none",c.margin="0px",c.padding="0px",c.position="static",u},now:function(){return Date.now?t.now=Date.now:t.now=function(){return new Date().getTime()},t.now()},makeTransparentImage:function(a){var u=t.makeNeutralElement("img");return u.src=a,u},setElementOpacity:function(a,u,c){var f,h;a=t.getElement(a),c&&!t.Browser.alpha&&(u=Math.round(u)),t.Browser.opacity?a.style.opacity=u<1?u:"":u<1?(f=Math.round(100*u),h="alpha(opacity="+f+")",a.style.filter=h):a.style.filter=""},setElementTouchActionNone:function(a){a=t.getElement(a),typeof a.style.touchAction<"u"?a.style.touchAction="none":typeof a.style.msTouchAction<"u"&&(a.style.msTouchAction="none")},setElementPointerEvents:function(a,u){a=t.getElement(a),typeof a.style<"u"&&typeof a.style.pointerEvents<"u"&&(a.style.pointerEvents=u)},setElementPointerEventsNone:function(a){t.setElementPointerEvents(a,"none")},addClass:function(a,u){a=t.getElement(a),a.className?(" "+a.className+" ").indexOf(" "+u+" ")===-1&&(a.className+=" "+u):a.className=u},indexOf:function(a,u,c){return Array.prototype.indexOf?this.indexOf=function(f,h,p){return f.indexOf(h,p)}:this.indexOf=function(f,h,p){var g,y=p||0,T;if(!f)throw new TypeError;if(T=f.length,T===0||y>=T)return-1;for(y<0&&(y=T-Math.abs(y)),g=y;g<T;g++)if(f[g]===h)return g;return-1},this.indexOf(a,u,c)},removeClass:function(a,u){var c,f=[],h;for(a=t.getElement(a),c=a.className.split(/\s+/),h=0;h<c.length;h++)c[h]&&c[h]!==u&&f.push(c[h]);a.className=f.join(" ")},normalizeEventListenerOptions:function(a){var u;return typeof a<"u"?typeof a=="boolean"?u=t.supportsEventListenerOptions?{capture:a}:a:u=t.supportsEventListenerOptions?a:typeof a.capture<"u"?a.capture:!1:u=t.supportsEventListenerOptions?{capture:!1}:!1,u},addEvent:function(){if(t.supportsAddEventListener)return function(a,u,c,f){f=t.normalizeEventListenerOptions(f),a=t.getElement(a),a.addEventListener(u,c,f)};if(document.documentElement.attachEvent&&document.attachEvent)return function(a,u,c){a=t.getElement(a),a.attachEvent("on"+u,c)};throw new Error("No known event model.")}(),removeEvent:function(){if(t.supportsRemoveEventListener)return function(a,u,c,f){f=t.normalizeEventListenerOptions(f),a=t.getElement(a),a.removeEventListener(u,c,f)};if(document.documentElement.detachEvent&&document.detachEvent)return function(a,u,c){a=t.getElement(a),a.detachEvent("on"+u,c)};throw new Error("No known event model.")}(),cancelEvent:function(a){a.preventDefault()},eventIsCanceled:function(a){return a.defaultPrevented},stopEvent:function(a){a.stopPropagation()},createCallback:function(a,u){var c=[],f;for(f=2;f<arguments.length;f++)c.push(arguments[f]);return function(){var h=c.concat([]),p;for(p=0;p<arguments.length;p++)h.push(arguments[p]);return u.apply(a,h)}},getUrlParameter:function(a){var u=l[a];return u||null},getUrlProtocol:function(a){var u=a.match(/^([a-z]+:)\/\//i);return u===null?window.location.protocol:u[1].toLowerCase()},createAjaxRequest:function(a){var u;try{u=!!new ActiveXObject("Microsoft.XMLHTTP")}catch{u=!1}if(u)window.XMLHttpRequest?t.createAjaxRequest=function(c){return c?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}:t.createAjaxRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")};else if(window.XMLHttpRequest)t.createAjaxRequest=function(){return new XMLHttpRequest};else throw new Error("Browser doesn't support XMLHttpRequest.");return t.createAjaxRequest(a)},makeAjaxRequest:function(a,u,c){var f,h,p,g;t.isPlainObject(a)&&(u=a.success,c=a.error,f=a.withCredentials,h=a.headers,p=a.responseType||null,g=a.postData||null,a=a.url);var y=t.getUrlProtocol(a),T=t.createAjaxRequest(y==="file:");if(!t.isFunction(u))throw new Error("makeAjaxRequest requires a success callback");T.onreadystatechange=function(){T.readyState===4&&(T.onreadystatechange=function(){},T.status>=200&&T.status<300||T.status===0&&y!=="http:"&&y!=="https:"?u(T):t.isFunction(c)?c(T):t.console.error("AJAX request returned %d: %s",T.status,a))};var v=g?"POST":"GET";try{if(T.open(v,a,!0),p&&(T.responseType=p),h)for(var E in h)Object.prototype.hasOwnProperty.call(h,E)&&h[E]&&T.setRequestHeader(E,h[E]);f&&(T.withCredentials=!0),T.send(g)}catch(O){t.console.error("%s while making AJAX request: %s",O.name,O.message),T.onreadystatechange=function(){},t.isFunction(c)&&c(T,O)}return T},jsonp:function(a){var u,c=a.url,f=document.head||document.getElementsByTagName("head")[0]||document.documentElement,h=a.callbackName||"openseadragon"+t.now(),p=window[h],g="$1"+h+"$2",y=a.param||"callback",T=a.callback;c=c.replace(/(=)\?(&|$)|\?\?/i,g),c+=(/\?/.test(c)?"&":"?")+y+"="+h,window[h]=function(v){if(p)window[h]=p;else try{delete window[h]}catch{}T&&t.isFunction(T)&&T(v)},u=document.createElement("script"),(a.async!==void 0||a.async!==!1)&&(u.async="async"),a.scriptCharset&&(u.charset=a.scriptCharset),u.src=c,u.onload=u.onreadystatechange=function(v,E){(E||!u.readyState||/loaded|complete/.test(u.readyState))&&(u.onload=u.onreadystatechange=null,f&&u.parentNode&&f.removeChild(u),u=void 0)},f.insertBefore(u,f.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(a){if(window.DOMParser)t.parseXml=function(u){var c=null,f;return f=new DOMParser,c=f.parseFromString(u,"text/xml"),c};else if(window.ActiveXObject)t.parseXml=function(u){var c=null;return c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(u),c};else throw new Error("Browser doesn't support XML DOM.");return t.parseXml(a)},parseJSON:function(a){return t.parseJSON=window.JSON.parse,t.parseJSON(a)},imageFormatSupported:function(a){return a=a||"",!!o[a.toLowerCase()]},setImageFormatsSupported:function(a){t.extend(o,a)}});var r=function(a){};t.console=window.console||{log:r,debug:r,info:r,warn:r,error:r,assert:r},t.Browser={vendor:t.BROWSERS.UNKNOWN,version:0,alpha:!0};var o={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},l={};(function(){var a=navigator.appVersion,u=navigator.userAgent,c;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(t.Browser.vendor=t.BROWSERS.IE,t.Browser.version=parseFloat(u.substring(u.indexOf("MSIE")+5,u.indexOf(";",u.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(u.indexOf("Edge")>=0?(t.Browser.vendor=t.BROWSERS.EDGE,t.Browser.version=parseFloat(u.substring(u.indexOf("Edge")+5))):u.indexOf("Edg")>=0?(t.Browser.vendor=t.BROWSERS.CHROMEEDGE,t.Browser.version=parseFloat(u.substring(u.indexOf("Edg")+4))):u.indexOf("Firefox")>=0?(t.Browser.vendor=t.BROWSERS.FIREFOX,t.Browser.version=parseFloat(u.substring(u.indexOf("Firefox")+8))):u.indexOf("Safari")>=0?(t.Browser.vendor=u.indexOf("Chrome")>=0?t.BROWSERS.CHROME:t.BROWSERS.SAFARI,t.Browser.version=parseFloat(u.substring(u.substring(0,u.indexOf("Safari")).lastIndexOf("/")+1,u.indexOf("Safari")))):(c=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),c.exec(u)!==null&&(t.Browser.vendor=t.BROWSERS.IE,t.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":t.Browser.vendor=t.BROWSERS.OPERA,t.Browser.version=parseFloat(a);break}var f=window.location.search.substring(1),h=f.split("&"),p,g,y;for(y=0;y<h.length;y++)if(p=h[y],g=p.indexOf("="),g>0){var T=p.substring(0,g),v=p.substring(g+1);try{l[T]=decodeURIComponent(v)}catch{t.console.error("Ignoring malformed URL parameter: %s=%s",T,v)}}t.Browser.alpha=!(t.Browser.vendor===t.BROWSERS.CHROME&&t.Browser.version<2),t.Browser.opacity=!0,t.Browser.vendor===t.BROWSERS.IE&&t.Browser.version<11&&t.console.error("Internet Explorer versions < 11 are not supported by OpenSeadragon")})(),function(a){var u=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame,c=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame;if(u&&c)t.requestAnimationFrame=function(){return u.apply(a,arguments)},t.cancelAnimationFrame=function(){return c.apply(a,arguments)};else{var f=[],h=[],p=0,g;t.requestAnimationFrame=function(y){return f.push([++p,y]),g||(g=setInterval(function(){if(f.length){var T=t.now(),v=h;for(h=f,f=v;h.length;)h.shift()[1](T)}else clearInterval(g),g=void 0},1e3/50)),p},t.cancelAnimationFrame=function(y){var T,v;for(T=0,v=f.length;T<v;T+=1)if(f[T][0]===y){f.splice(T,1);return}for(T=0,v=h.length;T<v;T+=1)if(h[T][0]===y){h.splice(T,1);return}}}}(window);function s(a,u){return u&&a!==document.body?document.body:a.offsetParent}}(n),function(t,i){e.exports?e.exports=i():t.OpenSeadragon=i()}(zv,function(){return n}),function(t){var i={supportsFullScreen:!1,isFullScreen:function(){return!1},getFullScreenElement:function(){return null},requestFullScreen:function(){},exitFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",fullScreenErrorEventName:""};document.exitFullscreen?(i.supportsFullScreen=!0,i.getFullScreenElement=function(){return document.fullscreenElement},i.requestFullScreen=function(r){return r.requestFullscreen()},i.exitFullScreen=function(){document.exitFullscreen()},i.fullScreenEventName="fullscreenchange",i.fullScreenErrorEventName="fullscreenerror"):document.msExitFullscreen?(i.supportsFullScreen=!0,i.getFullScreenElement=function(){return document.msFullscreenElement},i.requestFullScreen=function(r){return r.msRequestFullscreen()},i.exitFullScreen=function(){document.msExitFullscreen()},i.fullScreenEventName="MSFullscreenChange",i.fullScreenErrorEventName="MSFullscreenError"):document.webkitExitFullscreen?(i.supportsFullScreen=!0,i.getFullScreenElement=function(){return document.webkitFullscreenElement},i.requestFullScreen=function(r){return r.webkitRequestFullscreen()},i.exitFullScreen=function(){document.webkitExitFullscreen()},i.fullScreenEventName="webkitfullscreenchange",i.fullScreenErrorEventName="webkitfullscreenerror"):document.webkitCancelFullScreen?(i.supportsFullScreen=!0,i.getFullScreenElement=function(){return document.webkitCurrentFullScreenElement},i.requestFullScreen=function(r){return r.webkitRequestFullScreen()},i.exitFullScreen=function(){document.webkitCancelFullScreen()},i.fullScreenEventName="webkitfullscreenchange",i.fullScreenErrorEventName="webkitfullscreenerror"):document.mozCancelFullScreen&&(i.supportsFullScreen=!0,i.getFullScreenElement=function(){return document.mozFullScreenElement},i.requestFullScreen=function(r){return r.mozRequestFullScreen()},i.exitFullScreen=function(){document.mozCancelFullScreen()},i.fullScreenEventName="mozfullscreenchange",i.fullScreenErrorEventName="mozfullscreenerror"),i.isFullScreen=function(){return i.getFullScreenElement()!==null},i.cancelFullScreen=function(){t.console.error("cancelFullScreen is deprecated. Use exitFullScreen instead."),i.exitFullScreen()},t.extend(t,i)}(n),function(t){t.EventSource=function(){this.events={}},t.EventSource.prototype={addOnceHandler:function(i,r,o,l){var s=this;l=l||1;var a=0,u=function(c){a++,a===l&&s.removeHandler(i,u),r(c)};this.addHandler(i,u,o)},addHandler:function(i,r,o){var l=this.events[i];l||(this.events[i]=l=[]),r&&t.isFunction(r)&&(l[l.length]={handler:r,userData:o||null})},removeHandler:function(i,r){var o=this.events[i],l=[],s;if(o&&t.isArray(o)){for(s=0;s<o.length;s++)o[s].handler!==r&&l.push(o[s]);this.events[i]=l}},numberOfHandlers:function(i){var r=this.events[i];return r?r.length:0},removeAllHandlers:function(i){if(i)this.events[i]=[];else for(var r in this.events)this.events[r]=[]},getHandler:function(i){var r=this.events[i];return!r||!r.length?null:(r=r.length===1?[r[0]]:Array.apply(null,r),function(o,l){var s,a=r.length;for(s=0;s<a;s++)r[s]&&(l.eventSource=o,l.userData=r[s].userData,r[s].handler(l))})},raiseEvent:function(i,r){var o=this.getHandler(i);o&&(r||(r={}),o(this,r))}}}(n),function(t){var i={};t.MouseTracker=function(w){var _=arguments;t.isPlainObject(w)||(w={element:_[0],clickTimeThreshold:_[1],clickDistThreshold:_[2]}),this.hash=Math.random(),this.element=t.getElement(w.element),this.clickTimeThreshold=w.clickTimeThreshold||t.DEFAULT_SETTINGS.clickTimeThreshold,this.clickDistThreshold=w.clickDistThreshold||t.DEFAULT_SETTINGS.clickDistThreshold,this.dblClickTimeThreshold=w.dblClickTimeThreshold||t.DEFAULT_SETTINGS.dblClickTimeThreshold,this.dblClickDistThreshold=w.dblClickDistThreshold||t.DEFAULT_SETTINGS.dblClickDistThreshold,this.userData=w.userData||null,this.stopDelay=w.stopDelay||50,this.preProcessEventHandler=w.preProcessEventHandler||null,this.contextMenuHandler=w.contextMenuHandler||null,this.enterHandler=w.enterHandler||null,this.leaveHandler=w.leaveHandler||null,this.exitHandler=w.exitHandler||null,this.overHandler=w.overHandler||null,this.outHandler=w.outHandler||null,this.pressHandler=w.pressHandler||null,this.nonPrimaryPressHandler=w.nonPrimaryPressHandler||null,this.releaseHandler=w.releaseHandler||null,this.nonPrimaryReleaseHandler=w.nonPrimaryReleaseHandler||null,this.moveHandler=w.moveHandler||null,this.scrollHandler=w.scrollHandler||null,this.clickHandler=w.clickHandler||null,this.dblClickHandler=w.dblClickHandler||null,this.dragHandler=w.dragHandler||null,this.dragEndHandler=w.dragEndHandler||null,this.pinchHandler=w.pinchHandler||null,this.stopHandler=w.stopHandler||null,this.keyDownHandler=w.keyDownHandler||null,this.keyUpHandler=w.keyUpHandler||null,this.keyHandler=w.keyHandler||null,this.focusHandler=w.focusHandler||null,this.blurHandler=w.blurHandler||null;var S=this;i[this.hash]={click:function(C){O(S,C)},dblclick:function(C){P(S,C)},keydown:function(C){D(S,C)},keyup:function(C){H(S,C)},keypress:function(C){M(S,C)},focus:function(C){B(S,C)},blur:function(C){R(S,C)},contextmenu:function(C){V(S,C)},wheel:function(C){$(S,C)},mousewheel:function(C){N(S,C)},DOMMouseScroll:function(C){N(S,C)},MozMousePixelScroll:function(C){N(S,C)},losecapture:function(C){Z(S,C)},mouseenter:function(C){it(S,C)},mouseleave:function(C){tt(S,C)},mouseover:function(C){te(S,C)},mouseout:function(C){F(S,C)},mousedown:function(C){q(S,C)},mouseup:function(C){K(S,C)},mousemove:function(C){me(S,C)},touchstart:function(C){le(S,C)},touchend:function(C){oe(S,C)},touchmove:function(C){pe(S,C)},touchcancel:function(C){_e(S,C)},gesturestart:function(C){Fe(S,C)},gesturechange:function(C){ge(S,C)},gotpointercapture:function(C){Ne(S,C)},lostpointercapture:function(C){We(S,C)},pointerenter:function(C){it(S,C)},pointerleave:function(C){tt(S,C)},pointerover:function(C){te(S,C)},pointerout:function(C){F(S,C)},pointerdown:function(C){q(S,C)},pointerup:function(C){K(S,C)},pointermove:function(C){me(S,C)},pointercancel:function(C){d(S,C)},pointerupcaptured:function(C){se(S,C)},pointermovecaptured:function(C){Ce(S,C)},tracking:!1,activePointersLists:[],lastClickPos:null,dblClickTimeOut:null,pinchGPoints:[],lastPinchDist:0,currentPinchDist:0,lastPinchCenter:null,currentPinchCenter:null,sentDragEvent:!1},this.hasGestureHandlers=!!(this.pressHandler||this.nonPrimaryPressHandler||this.releaseHandler||this.nonPrimaryReleaseHandler||this.clickHandler||this.dblClickHandler||this.dragHandler||this.dragEndHandler||this.pinchHandler),this.hasScrollHandler=!!this.scrollHandler,t.MouseTracker.havePointerEvents&&t.setElementPointerEvents(this.element,"auto"),this.exitHandler&&t.console.error("MouseTracker.exitHandler is deprecated. Use MouseTracker.leaveHandler instead."),w.startDisabled||this.setTracking(!0)},t.MouseTracker.prototype={destroy:function(){a(this),this.element=null,i[this.hash]=null,delete i[this.hash]},isTracking:function(){return i[this.hash].tracking},setTracking:function(w){return w?s(this):a(this),this},getActivePointersListByType:function(w){var _=i[this.hash],S,C=_.activePointersLists.length,W;for(S=0;S<C;S++)if(_.activePointersLists[S].type===w)return _.activePointersLists[S];return W=new t.MouseTracker.GesturePointList(w),_.activePointersLists.push(W),W},getActivePointerCount:function(){var w=i[this.hash],_,S=w.activePointersLists.length,C=0;for(_=0;_<S;_++)C+=w.activePointersLists[_].getLength();return C},preProcessEventHandler:function(){},contextMenuHandler:function(){},enterHandler:function(){},leaveHandler:function(){},exitHandler:function(){},overHandler:function(){},outHandler:function(){},pressHandler:function(){},nonPrimaryPressHandler:function(){},releaseHandler:function(){},nonPrimaryReleaseHandler:function(){},moveHandler:function(){},scrollHandler:function(){},clickHandler:function(){},dblClickHandler:function(){},dragHandler:function(){},dragEndHandler:function(){},pinchHandler:function(){},stopHandler:function(){},keyDownHandler:function(){},keyUpHandler:function(){},keyHandler:function(){},focusHandler:function(){},blurHandler:function(){}};var r=function(){try{return window.self!==window.top}catch{return!0}}();function o(w){try{return w.addEventListener&&w.removeEventListener}catch{return!1}}t.MouseTracker.gesturePointVelocityTracker=function(){var w=[],_=0,S=0,C=function(ke,be){return ke.hash.toString()+be.type+be.id.toString()},W=function(){var ke,be=w.length,bt,ft,$n=t.now(),fa,ha,pa;for(fa=$n-S,S=$n,ke=0;ke<be;ke++)bt=w[ke],ft=bt.gPoint,ft.direction=Math.atan2(ft.currentPos.y-bt.lastPos.y,ft.currentPos.x-bt.lastPos.x),ha=bt.lastPos.distanceTo(ft.currentPos),bt.lastPos=ft.currentPos,pa=1e3*ha/(fa+1),ft.speed=.75*pa+.25*ft.speed},ie=function(ke,be){var bt=C(ke,be);w.push({guid:bt,gPoint:be,lastPos:be.currentPos}),w.length===1&&(S=t.now(),_=window.setInterval(W,50))},Te=function(ke,be){var bt=C(ke,be),ft,$n=w.length;for(ft=0;ft<$n;ft++)if(w[ft].guid===bt){w.splice(ft,1),$n--,$n===0&&window.clearInterval(_);break}};return{addPoint:ie,removePoint:Te}}(),t.MouseTracker.captureElement=document,t.MouseTracker.wheelEventName=t.Browser.vendor===t.BROWSERS.IE&&t.Browser.version>8||"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",t.MouseTracker.wheelEventName],t.MouseTracker.wheelEventName==="DOMMouseScroll"&&t.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(t.MouseTracker.havePointerEvents=!0,t.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),t.MouseTracker.havePointerCapture=function(){var w=document.createElement("div");return t.isFunction(w.setPointerCapture)&&t.isFunction(w.releasePointerCapture)}(),t.MouseTracker.havePointerCapture&&t.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(t.MouseTracker.havePointerEvents=!1,t.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),t.MouseTracker.mousePointerId="legacy-mouse",t.MouseTracker.havePointerCapture=function(){var w=document.createElement("div");return t.isFunction(w.setCapture)&&t.isFunction(w.releaseCapture)}(),t.MouseTracker.havePointerCapture&&t.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&t.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&t.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),t.MouseTracker.GesturePointList=function(w){this._gPoints=[],this.type=w,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},t.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(w){return this._gPoints.push(w)},removeById:function(w){var _,S=this._gPoints.length;for(_=0;_<S;_++)if(this._gPoints[_].id===w){this._gPoints.splice(_,1);break}return this._gPoints.length},getByIndex:function(w){return w<this._gPoints.length?this._gPoints[w]:null},getById:function(w){var _,S=this._gPoints.length;for(_=0;_<S;_++)if(this._gPoints[_].id===w)return this._gPoints[_];return null},getPrimary:function(w){var _,S=this._gPoints.length;for(_=0;_<S;_++)if(this._gPoints[_].isPrimary)return this._gPoints[_];return null},addContact:function(){++this.contacts,this.contacts>1&&(this.type==="mouse"||this.type==="pen")&&(t.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};function l(w){var _=i[w.hash],S,C,W,ie,Te,ke=_.activePointersLists.length;for(S=0;S<ke;S++)if(W=_.activePointersLists[S],W.getLength()>0){for(Te=[],ie=W.asArray(),C=0;C<ie.length;C++)Te.push(ie[C]);for(C=0;C<Te.length;C++)x(w,W,Te[C])}for(S=0;S<ke;S++)_.activePointersLists.pop();_.sentDragEvent=!1}function s(w){var _=i[w.hash],S,C;if(!_.tracking){for(C=0;C<t.MouseTracker.subscribeEvents.length;C++)S=t.MouseTracker.subscribeEvents[C],t.addEvent(w.element,S,_[S],S===t.MouseTracker.wheelEventName?{passive:!1,capture:!1}:!1);l(w),_.tracking=!0}}function a(w){var _=i[w.hash],S,C;if(_.tracking){for(C=0;C<t.MouseTracker.subscribeEvents.length;C++)S=t.MouseTracker.subscribeEvents[C],t.removeEvent(w.element,S,_[S],!1);l(w),_.tracking=!1}}function u(w,_){var S=i[w.hash];if(_==="pointerevent")return{upName:"pointerup",upHandler:S.pointerupcaptured,moveName:"pointermove",moveHandler:S.pointermovecaptured};if(_==="mouse")return{upName:"pointerup",upHandler:S.pointerupcaptured,moveName:"pointermove",moveHandler:S.pointermovecaptured};if(_==="touch")return{upName:"touchend",upHandler:S.touchendcaptured,moveName:"touchmove",moveHandler:S.touchmovecaptured};throw new Error("MouseTracker.getCaptureEventParams: Unknown pointer type.")}function c(w,_){var S;if(t.MouseTracker.havePointerCapture)if(t.MouseTracker.havePointerEvents)try{w.element.setPointerCapture(_.id)}catch{t.console.warn("setPointerCapture() called on invalid pointer ID");return}else w.element.setCapture(!0);else S=u(w,t.MouseTracker.havePointerEvents?"pointerevent":_.type),r&&o(window.top)&&t.addEvent(window.top,S.upName,S.upHandler,!0),t.addEvent(t.MouseTracker.captureElement,S.upName,S.upHandler,!0),t.addEvent(t.MouseTracker.captureElement,S.moveName,S.moveHandler,!0);U(w,_,!0)}function f(w,_){var S,C,W;if(t.MouseTracker.havePointerCapture)if(t.MouseTracker.havePointerEvents){if(C=w.getActivePointersListByType(_.type),W=C.getById(_.id),!W||!W.captured)return;try{w.element.releasePointerCapture(_.id)}catch{}}else w.element.releaseCapture();else S=u(w,t.MouseTracker.havePointerEvents?"pointerevent":_.type),r&&o(window.top)&&t.removeEvent(window.top,S.upName,S.upHandler,!0),t.removeEvent(t.MouseTracker.captureElement,S.moveName,S.moveHandler,!0),t.removeEvent(t.MouseTracker.captureElement,S.upName,S.upHandler,!0);U(w,_,!1)}function h(w){return t.MouseTracker.havePointerEvents?w.pointerId:t.MouseTracker.mousePointerId}function p(w){return t.MouseTracker.havePointerEvents?w.pointerType||(t.Browser.vendor===t.BROWSERS.IE?"mouse":""):"mouse"}function g(w){return t.MouseTracker.havePointerEvents?w.isPrimary:!0}function y(w){return t.getMousePosition(w)}function T(w,_){return v(y(w),_)}function v(w,_){var S=t.getElementOffset(_);return w.minus(S)}function E(w,_){return new t.Point((w.x+_.x)/2,(w.y+_.y)/2)}function O(w,_){var S={originalEvent:_,eventType:"click",pointerType:"mouse",isEmulated:!1};A(w,S),S.preventDefault&&!S.defaultPrevented&&t.cancelEvent(_),S.stopPropagation&&t.stopEvent(_)}function P(w,_){var S={originalEvent:_,eventType:"dblclick",pointerType:"mouse",isEmulated:!1};A(w,S),S.preventDefault&&!S.defaultPrevented&&t.cancelEvent(_),S.stopPropagation&&t.stopEvent(_)}function D(w,_){var S=null,C={originalEvent:_,eventType:"keydown",pointerType:"",isEmulated:!1};A(w,C),w.keyDownHandler&&!C.preventGesture&&!C.defaultPrevented&&(S={eventSource:w,keyCode:_.keyCode?_.keyCode:_.charCode,ctrl:_.ctrlKey,shift:_.shiftKey,alt:_.altKey,meta:_.metaKey,originalEvent:_,preventDefault:C.preventDefault||C.defaultPrevented,userData:w.userData},w.keyDownHandler(S)),(S&&S.preventDefault||C.preventDefault&&!C.defaultPrevented)&&t.cancelEvent(_),C.stopPropagation&&t.stopEvent(_)}function H(w,_){var S=null,C={originalEvent:_,eventType:"keyup",pointerType:"",isEmulated:!1};A(w,C),w.keyUpHandler&&!C.preventGesture&&!C.defaultPrevented&&(S={eventSource:w,keyCode:_.keyCode?_.keyCode:_.charCode,ctrl:_.ctrlKey,shift:_.shiftKey,alt:_.altKey,meta:_.metaKey,originalEvent:_,preventDefault:C.preventDefault||C.defaultPrevented,userData:w.userData},w.keyUpHandler(S)),(S&&S.preventDefault||C.preventDefault&&!C.defaultPrevented)&&t.cancelEvent(_),C.stopPropagation&&t.stopEvent(_)}function M(w,_){var S=null,C={originalEvent:_,eventType:"keypress",pointerType:"",isEmulated:!1};A(w,C),w.keyHandler&&!C.preventGesture&&!C.defaultPrevented&&(S={eventSource:w,keyCode:_.keyCode?_.keyCode:_.charCode,ctrl:_.ctrlKey,shift:_.shiftKey,alt:_.altKey,meta:_.metaKey,originalEvent:_,preventDefault:C.preventDefault||C.defaultPrevented,userData:w.userData},w.keyHandler(S)),(S&&S.preventDefault||C.preventDefault&&!C.defaultPrevented)&&t.cancelEvent(_),C.stopPropagation&&t.stopEvent(_)}function B(w,_){var S={originalEvent:_,eventType:"focus",pointerType:"",isEmulated:!1};A(w,S),w.focusHandler&&!S.preventGesture&&w.focusHandler({eventSource:w,originalEvent:_,userData:w.userData})}function R(w,_){var S={originalEvent:_,eventType:"blur",pointerType:"",isEmulated:!1};A(w,S),w.blurHandler&&!S.preventGesture&&w.blurHandler({eventSource:w,originalEvent:_,userData:w.userData})}function V(w,_){var S=null,C={originalEvent:_,eventType:"contextmenu",pointerType:"mouse",isEmulated:!1};A(w,C),w.contextMenuHandler&&!C.preventGesture&&!C.defaultPrevented&&(S={eventSource:w,position:v(y(_),w.element),originalEvent:C.originalEvent,preventDefault:C.preventDefault||C.defaultPrevented,userData:w.userData},w.contextMenuHandler(S)),(S&&S.preventDefault||C.preventDefault&&!C.defaultPrevented)&&t.cancelEvent(_),C.stopPropagation&&t.stopEvent(_)}function $(w,_){re(w,_,_)}function N(w,_){var S={target:_.target||_.srcElement,type:"wheel",shiftKey:_.shiftKey||!1,clientX:_.clientX,clientY:_.clientY,pageX:_.pageX?_.pageX:_.clientX,pageY:_.pageY?_.pageY:_.clientY,deltaMode:_.type==="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0};t.MouseTracker.wheelEventName==="mousewheel"?S.deltaY=-_.wheelDelta/t.DEFAULT_SETTINGS.pixelsPerWheelLine:S.deltaY=_.detail,re(w,S,_)}function re(w,_,S){var C=0,W,ie=null;C=_.deltaY<0?1:-1,W={originalEvent:_,eventType:"wheel",pointerType:"mouse",isEmulated:_!==S},A(w,W),w.scrollHandler&&!W.preventGesture&&!W.defaultPrevented&&(ie={eventSource:w,pointerType:"mouse",position:T(_,w.element),scroll:C,shift:_.shiftKey,isTouchEvent:!1,originalEvent:S,preventDefault:W.preventDefault||W.defaultPrevented,userData:w.userData},w.scrollHandler(ie)),W.stopPropagation&&t.stopEvent(S),(ie&&ie.preventDefault||W.preventDefault&&!W.defaultPrevented)&&t.cancelEvent(S)}function Z(w,_){var S={id:t.MouseTracker.mousePointerId,type:"mouse"},C={originalEvent:_,eventType:"lostpointercapture",pointerType:"mouse",isEmulated:!1};A(w,C),_.target===w.element&&U(w,S,!1),C.stopPropagation&&t.stopEvent(_)}function le(w,_){var S,C,W=_.changedTouches.length,ie,Te=w.getActivePointersListByType("touch");S=t.now(),Te.getLength()>_.touches.length-W&&t.console.warn("Tracked touch contact count doesn't match event.touches.length");var ke={originalEvent:_,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(A(w,ke),C=0;C<W;C++)ie={id:_.changedTouches[C].identifier,type:"touch",isPrimary:Te.getLength()===0,currentPos:y(_.changedTouches[C]),currentTime:S},z(w,ke,ie),X(w,ke,ie,0),U(w,ie,!0);ke.preventDefault&&!ke.defaultPrevented&&t.cancelEvent(_),ke.stopPropagation&&t.stopEvent(_)}function oe(w,_){var S,C,W=_.changedTouches.length,ie;S=t.now();var Te={originalEvent:_,eventType:"pointerup",pointerType:"touch",isEmulated:!1};for(A(w,Te),C=0;C<W;C++)ie={id:_.changedTouches[C].identifier,type:"touch",currentPos:y(_.changedTouches[C]),currentTime:S},ee(w,Te,ie,0),U(w,ie,!1),Q(w,Te,ie);Te.preventDefault&&!Te.defaultPrevented&&t.cancelEvent(_),Te.stopPropagation&&t.stopEvent(_)}function pe(w,_){var S,C,W=_.changedTouches.length,ie;S=t.now();var Te={originalEvent:_,eventType:"pointermove",pointerType:"touch",isEmulated:!1};for(A(w,Te),C=0;C<W;C++)ie={id:_.changedTouches[C].identifier,type:"touch",currentPos:y(_.changedTouches[C]),currentTime:S},k(w,Te,ie);Te.preventDefault&&!Te.defaultPrevented&&t.cancelEvent(_),Te.stopPropagation&&t.stopEvent(_)}function _e(w,_){var S=_.changedTouches.length,C,W,ie={originalEvent:_,eventType:"pointercancel",pointerType:"touch",isEmulated:!1};for(A(w,ie),C=0;C<S;C++)W={id:_.changedTouches[C].identifier,type:"touch"},G(w,ie,W);ie.stopPropagation&&t.stopEvent(_)}function Fe(w,_){return t.eventIsCanceled(_)||_.preventDefault(),!1}function ge(w,_){return t.eventIsCanceled(_)||_.preventDefault(),!1}function Ne(w,_){var S={originalEvent:_,eventType:"gotpointercapture",pointerType:p(_),isEmulated:!1};A(w,S),_.target===w.element&&U(w,{id:_.pointerId,type:p(_)},!0),S.stopPropagation&&t.stopEvent(_)}function We(w,_){var S={originalEvent:_,eventType:"lostpointercapture",pointerType:p(_),isEmulated:!1};A(w,S),_.target===w.element&&U(w,{id:_.pointerId,type:p(_)},!1),S.stopPropagation&&t.stopEvent(_)}function it(w,_){var S={id:h(_),type:p(_),isPrimary:g(_),currentPos:y(_),currentTime:t.now()},C={originalEvent:_,eventType:"pointerenter",pointerType:S.type,isEmulated:!1};A(w,C),z(w,C,S)}function tt(w,_){var S={id:h(_),type:p(_),isPrimary:g(_),currentPos:y(_),currentTime:t.now()},C={originalEvent:_,eventType:"pointerleave",pointerType:S.type,isEmulated:!1};A(w,C),Q(w,C,S)}function te(w,_){var S={id:h(_),type:p(_),isPrimary:g(_),currentPos:y(_),currentTime:t.now()},C={originalEvent:_,eventType:"pointerover",pointerType:S.type,isEmulated:!1};A(w,C),Y(w,C,S),C.preventDefault&&!C.defaultPrevented&&t.cancelEvent(_),C.stopPropagation&&t.stopEvent(_)}function F(w,_){var S={id:h(_),type:p(_),isPrimary:g(_),currentPos:y(_),currentTime:t.now()},C={originalEvent:_,eventType:"pointerout",pointerType:S.type,isEmulated:!1};A(w,C),ue(w,C,S),C.preventDefault&&!C.defaultPrevented&&t.cancelEvent(_),C.stopPropagation&&t.stopEvent(_)}function q(w,_){var S={id:h(_),type:p(_),isPrimary:g(_),currentPos:y(_),currentTime:t.now()},C=t.MouseTracker.havePointerEvents&&S.type==="touch"&&t.Browser.vendor!==t.BROWSERS.IE,W={originalEvent:_,eventType:"pointerdown",pointerType:S.type,isEmulated:!1};A(w,W),X(w,W,S,_.button),W.preventDefault&&!W.defaultPrevented&&t.cancelEvent(_),W.stopPropagation&&t.stopEvent(_),W.shouldCapture&&(C?U(w,S,!0):c(w,S))}function K(w,_){ce(w,_)}function se(w,_){var S=w.getActivePointersListByType(p(_));S.getById(_.pointerId)&&ce(w,_),t.stopEvent(_)}function ce(w,_){var S;S={id:h(_),type:p(_),isPrimary:g(_),currentPos:y(_),currentTime:t.now()};var C={originalEvent:_,eventType:"pointerup",pointerType:S.type,isEmulated:!1};A(w,C),ee(w,C,S,_.button),C.preventDefault&&!C.defaultPrevented&&t.cancelEvent(_),C.stopPropagation&&t.stopEvent(_),C.shouldReleaseCapture&&(_.target===w.element?f(w,S):U(w,S,!1))}function me(w,_){b(w,_)}function Ce(w,_){var S=w.getActivePointersListByType(p(_));S.getById(_.pointerId)&&b(w,_),t.stopEvent(_)}function b(w,_){var S={id:h(_),type:p(_),isPrimary:g(_),currentPos:y(_),currentTime:t.now()},C={originalEvent:_,eventType:"pointermove",pointerType:S.type,isEmulated:!1};A(w,C),k(w,C,S),C.preventDefault&&!C.defaultPrevented&&t.cancelEvent(_),C.stopPropagation&&t.stopEvent(_)}function d(w,_){var S={id:_.pointerId,type:p(_)},C={originalEvent:_,eventType:"pointercancel",pointerType:S.type,isEmulated:!1};A(w,C),G(w,C,S),C.stopPropagation&&t.stopEvent(_)}function m(w,_){return _.speed=0,_.direction=0,_.contactPos=_.currentPos,_.contactTime=_.currentTime,_.lastPos=_.currentPos,_.lastTime=_.currentTime,w.add(_)}function x(w,_,S){var C,W=_.getById(S.id);return W?(W.captured&&(t.console.warn("stopTrackingPointer() called on captured pointer"),f(w,W)),_.removeContact(),C=_.removeById(S.id)):C=_.getLength(),C}function I(w,_){switch(_.eventType){case"pointermove":_.isStoppable=!0,_.isCancelable=!0,_.preventDefault=!1,_.preventGesture=!w.hasGestureHandlers,_.stopPropagation=!1;break;case"pointerover":case"pointerout":case"contextmenu":case"keydown":case"keyup":case"keypress":_.isStoppable=!0,_.isCancelable=!0,_.preventDefault=!1,_.preventGesture=!1,_.stopPropagation=!1;break;case"pointerdown":_.isStoppable=!0,_.isCancelable=!0,_.preventDefault=!1,_.preventGesture=!w.hasGestureHandlers,_.stopPropagation=!1;break;case"pointerup":_.isStoppable=!0,_.isCancelable=!0,_.preventDefault=!1,_.preventGesture=!w.hasGestureHandlers,_.stopPropagation=!1;break;case"wheel":_.isStoppable=!0,_.isCancelable=!0,_.preventDefault=!1,_.preventGesture=!w.hasScrollHandler,_.stopPropagation=!1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":_.isStoppable=!0,_.isCancelable=!1,_.preventDefault=!1,_.preventGesture=!1,_.stopPropagation=!1;break;case"click":_.isStoppable=!0,_.isCancelable=!0,_.preventDefault=!!w.clickHandler,_.preventGesture=!1,_.stopPropagation=!1;break;case"dblclick":_.isStoppable=!0,_.isCancelable=!0,_.preventDefault=!!w.dblClickHandler,_.preventGesture=!1,_.stopPropagation=!1;break;case"focus":case"blur":case"pointerenter":case"pointerleave":default:_.isStoppable=!1,_.isCancelable=!1,_.preventDefault=!1,_.preventGesture=!1,_.stopPropagation=!1;break}}function A(w,_){_.eventSource=w,_.eventPhase=_.originalEvent&&typeof _.originalEvent.eventPhase<"u"?_.originalEvent.eventPhase:0,_.defaultPrevented=t.eventIsCanceled(_.originalEvent),_.shouldCapture=!1,_.shouldReleaseCapture=!1,_.userData=w.userData,I(w,_),w.preProcessEventHandler&&w.preProcessEventHandler(_)}function U(w,_,S){var C=w.getActivePointersListByType(_.type),W=C.getById(_.id);W?S&&!W.captured?(W.captured=!0,C.captureCount++):!S&&W.captured&&(W.captured=!1,C.captureCount--,C.captureCount<0&&(C.captureCount=0,t.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))):t.console.warn("updatePointerCaptured() called on untracked pointer")}function z(w,_,S){var C=w.getActivePointersListByType(S.type),W;W=C.getById(S.id),W?(W.insideElement=!0,W.lastPos=W.currentPos,W.lastTime=W.currentTime,W.currentPos=S.currentPos,W.currentTime=S.currentTime,S=W):(S.captured=!1,S.insideElementPressed=!1,S.insideElement=!0,m(C,S)),w.enterHandler&&w.enterHandler({eventSource:w,pointerType:S.type,position:v(S.currentPos,w.element),buttons:C.buttons,pointers:w.getActivePointerCount(),insideElementPressed:S.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:S.type==="touch",originalEvent:_.originalEvent,userData:w.userData})}function Q(w,_,S){var C=w.getActivePointersListByType(S.type),W,ie;W=C.getById(S.id),W?(W.captured?(W.insideElement=!1,W.lastPos=W.currentPos,W.lastTime=W.currentTime,W.currentPos=S.currentPos,W.currentTime=S.currentTime):x(w,C,W),S=W):(S.captured=!1,S.insideElementPressed=!1),(w.leaveHandler||w.exitHandler)&&(ie={eventSource:w,pointerType:S.type,position:S.currentPos&&v(S.currentPos,w.element),buttons:C.buttons,pointers:w.getActivePointerCount(),insideElementPressed:S.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:S.type==="touch",originalEvent:_.originalEvent,userData:w.userData},w.leaveHandler&&w.leaveHandler(ie),w.exitHandler&&w.exitHandler(ie))}function Y(w,_,S){var C,W;C=w.getActivePointersListByType(S.type),W=C.getById(S.id),W?S=W:(S.captured=!1,S.insideElementPressed=!1),w.overHandler&&w.overHandler({eventSource:w,pointerType:S.type,position:v(S.currentPos,w.element),buttons:C.buttons,pointers:w.getActivePointerCount(),insideElementPressed:S.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:S.type==="touch",originalEvent:_.originalEvent,userData:w.userData})}function ue(w,_,S){var C,W;C=w.getActivePointersListByType(S.type),W=C.getById(S.id),W?S=W:(S.captured=!1,S.insideElementPressed=!1),w.outHandler&&w.outHandler({eventSource:w,pointerType:S.type,position:S.currentPos&&v(S.currentPos,w.element),buttons:C.buttons,pointers:w.getActivePointerCount(),insideElementPressed:S.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:S.type==="touch",originalEvent:_.originalEvent,userData:w.userData})}function X(w,_,S,C){var W=i[w.hash],ie=w.getActivePointersListByType(S.type),Te;if(typeof _.originalEvent.buttons<"u"?ie.buttons=_.originalEvent.buttons:C===0?ie.buttons|=1:C===1?ie.buttons|=4:C===2?ie.buttons|=2:C===3?ie.buttons|=8:C===4?ie.buttons|=16:C===5&&(ie.buttons|=32),C!==0){_.shouldCapture=!1,_.shouldReleaseCapture=!1,w.nonPrimaryPressHandler&&!_.preventGesture&&!_.defaultPrevented&&(_.preventDefault=!0,w.nonPrimaryPressHandler({eventSource:w,pointerType:S.type,position:v(S.currentPos,w.element),button:C,buttons:ie.buttons,isTouchEvent:S.type==="touch",originalEvent:_.originalEvent,userData:w.userData}));return}Te=ie.getById(S.id),Te?(Te.insideElementPressed=!0,Te.insideElement=!0,Te.originalTarget=_.originalEvent.target,Te.contactPos=S.currentPos,Te.contactTime=S.currentTime,Te.lastPos=Te.currentPos,Te.lastTime=Te.currentTime,Te.currentPos=S.currentPos,Te.currentTime=S.currentTime,S=Te):(S.captured=!1,S.insideElementPressed=!0,S.insideElement=!0,S.originalTarget=_.originalEvent.target,m(ie,S)),ie.addContact(),!_.preventGesture&&!_.defaultPrevented?(_.shouldCapture=!0,_.shouldReleaseCapture=!1,_.preventDefault=!0,(w.dragHandler||w.dragEndHandler||w.pinchHandler)&&t.MouseTracker.gesturePointVelocityTracker.addPoint(w,S),ie.contacts===1?w.pressHandler&&!_.preventGesture&&w.pressHandler({eventSource:w,pointerType:S.type,position:v(S.contactPos,w.element),buttons:ie.buttons,isTouchEvent:S.type==="touch",originalEvent:_.originalEvent,userData:w.userData}):ie.contacts===2&&w.pinchHandler&&S.type==="touch"&&(W.pinchGPoints=ie.asArray(),W.lastPinchDist=W.currentPinchDist=W.pinchGPoints[0].currentPos.distanceTo(W.pinchGPoints[1].currentPos),W.lastPinchCenter=W.currentPinchCenter=E(W.pinchGPoints[0].currentPos,W.pinchGPoints[1].currentPos))):(_.shouldCapture=!1,_.shouldReleaseCapture=!1)}function ee(w,_,S,C){var W=i[w.hash],ie=w.getActivePointersListByType(S.type),Te,ke,be,bt=!1,ft;if(typeof _.originalEvent.buttons<"u"?ie.buttons=_.originalEvent.buttons:C===0?ie.buttons^=-2:C===1?ie.buttons^=-5:C===2?ie.buttons^=-3:C===3?ie.buttons^=-9:C===4?ie.buttons^=-17:C===5&&(ie.buttons^=-33),_.shouldCapture=!1,C!==0){_.shouldReleaseCapture=!1,w.nonPrimaryReleaseHandler&&!_.preventGesture&&!_.defaultPrevented&&(_.preventDefault=!0,w.nonPrimaryReleaseHandler({eventSource:w,pointerType:S.type,position:v(S.currentPos,w.element),button:C,buttons:ie.buttons,isTouchEvent:S.type==="touch",originalEvent:_.originalEvent,userData:w.userData}));return}be=ie.getById(S.id),be?(ie.removeContact(),be.captured&&(bt=!0),be.lastPos=be.currentPos,be.lastTime=be.currentTime,be.currentPos=S.currentPos,be.currentTime=S.currentTime,be.insideElement||x(w,ie,be),Te=be.currentPos,ke=be.currentTime):(S.captured=!1,S.insideElementPressed=!1,S.insideElement=!0,m(ie,S),be=S),!_.preventGesture&&!_.defaultPrevented&&(bt?(_.shouldReleaseCapture=!0,_.preventDefault=!0,(w.dragHandler||w.dragEndHandler||w.pinchHandler)&&t.MouseTracker.gesturePointVelocityTracker.removePoint(w,be),ie.contacts===0?(w.releaseHandler&&Te&&w.releaseHandler({eventSource:w,pointerType:be.type,position:v(Te,w.element),buttons:ie.buttons,insideElementPressed:be.insideElementPressed,insideElementReleased:be.insideElement,isTouchEvent:be.type==="touch",originalEvent:_.originalEvent,userData:w.userData}),w.dragEndHandler&&W.sentDragEvent&&w.dragEndHandler({eventSource:w,pointerType:be.type,position:v(be.currentPos,w.element),speed:be.speed,direction:be.direction,shift:_.originalEvent.shiftKey,isTouchEvent:be.type==="touch",originalEvent:_.originalEvent,userData:w.userData}),W.sentDragEvent=!1,(w.clickHandler||w.dblClickHandler)&&be.insideElement&&(ft=ke-be.contactTime<=w.clickTimeThreshold&&be.contactPos.distanceTo(Te)<=w.clickDistThreshold,w.clickHandler&&w.clickHandler({eventSource:w,pointerType:be.type,position:v(be.currentPos,w.element),quick:ft,shift:_.originalEvent.shiftKey,isTouchEvent:be.type==="touch",originalEvent:_.originalEvent,originalTarget:be.originalTarget,userData:w.userData}),w.dblClickHandler&&ft&&(ie.clicks++,ie.clicks===1?(W.lastClickPos=Te,W.dblClickTimeOut=setTimeout(function(){ie.clicks=0},w.dblClickTimeThreshold)):ie.clicks===2&&(clearTimeout(W.dblClickTimeOut),ie.clicks=0,W.lastClickPos.distanceTo(Te)<=w.dblClickDistThreshold&&w.dblClickHandler({eventSource:w,pointerType:be.type,position:v(be.currentPos,w.element),shift:_.originalEvent.shiftKey,isTouchEvent:be.type==="touch",originalEvent:_.originalEvent,userData:w.userData}),W.lastClickPos=null)))):ie.contacts===2&&w.pinchHandler&&be.type==="touch"&&(W.pinchGPoints=ie.asArray(),W.lastPinchDist=W.currentPinchDist=W.pinchGPoints[0].currentPos.distanceTo(W.pinchGPoints[1].currentPos),W.lastPinchCenter=W.currentPinchCenter=E(W.pinchGPoints[0].currentPos,W.pinchGPoints[1].currentPos))):(_.shouldReleaseCapture=!1,w.releaseHandler&&Te&&(w.releaseHandler({eventSource:w,pointerType:be.type,position:v(Te,w.element),buttons:ie.buttons,insideElementPressed:be.insideElementPressed,insideElementReleased:be.insideElement,isTouchEvent:be.type==="touch",originalEvent:_.originalEvent,userData:w.userData}),_.preventDefault=!0)))}function k(w,_,S){var C=i[w.hash],W=w.getActivePointersListByType(S.type),ie,Te,ke;if(typeof _.originalEvent.buttons<"u"&&(W.buttons=_.originalEvent.buttons),ie=W.getById(S.id),ie)ie.lastPos=ie.currentPos,ie.lastTime=ie.currentTime,ie.currentPos=S.currentPos,ie.currentTime=S.currentTime;else return;_.shouldCapture=!1,_.shouldReleaseCapture=!1,w.stopHandler&&S.type==="mouse"&&(clearTimeout(w.stopTimeOut),w.stopTimeOut=setTimeout(function(){ye(w,_.originalEvent,S.type)},w.stopDelay)),W.contacts===0?w.moveHandler&&w.moveHandler({eventSource:w,pointerType:S.type,position:v(S.currentPos,w.element),buttons:W.buttons,isTouchEvent:S.type==="touch",originalEvent:_.originalEvent,userData:w.userData}):W.contacts===1?(w.moveHandler&&(ie=W.asArray()[0],w.moveHandler({eventSource:w,pointerType:ie.type,position:v(ie.currentPos,w.element),buttons:W.buttons,isTouchEvent:ie.type==="touch",originalEvent:_.originalEvent,userData:w.userData})),w.dragHandler&&!_.preventGesture&&!_.defaultPrevented&&(ie=W.asArray()[0],ke=ie.currentPos.minus(ie.lastPos),w.dragHandler({eventSource:w,pointerType:ie.type,position:v(ie.currentPos,w.element),buttons:W.buttons,delta:ke,speed:ie.speed,direction:ie.direction,shift:_.originalEvent.shiftKey,isTouchEvent:ie.type==="touch",originalEvent:_.originalEvent,userData:w.userData}),_.preventDefault=!0,C.sentDragEvent=!0)):W.contacts===2&&(w.moveHandler&&(Te=W.asArray(),w.moveHandler({eventSource:w,pointerType:Te[0].type,position:v(E(Te[0].currentPos,Te[1].currentPos),w.element),buttons:W.buttons,isTouchEvent:Te[0].type==="touch",originalEvent:_.originalEvent,userData:w.userData})),w.pinchHandler&&S.type==="touch"&&!_.preventGesture&&!_.defaultPrevented&&(ke=C.pinchGPoints[0].currentPos.distanceTo(C.pinchGPoints[1].currentPos),ke!==C.currentPinchDist&&(C.lastPinchDist=C.currentPinchDist,C.currentPinchDist=ke,C.lastPinchCenter=C.currentPinchCenter,C.currentPinchCenter=E(C.pinchGPoints[0].currentPos,C.pinchGPoints[1].currentPos),w.pinchHandler({eventSource:w,pointerType:"touch",gesturePoints:C.pinchGPoints,lastCenter:v(C.lastPinchCenter,w.element),center:v(C.currentPinchCenter,w.element),lastDistance:C.lastPinchDist,distance:C.currentPinchDist,shift:_.originalEvent.shiftKey,originalEvent:_.originalEvent,userData:w.userData}),_.preventDefault=!0)))}function G(w,_,S){var C=w.getActivePointersListByType(S.type),W;W=C.getById(S.id),W&&x(w,C,W)}function ye(w,_,S){w.stopHandler&&w.stopHandler({eventSource:w,pointerType:S,position:T(_,w.element),buttons:w.getActivePointersListByType(S).buttons,isTouchEvent:S==="touch",originalEvent:_,userData:w.userData})}}(n),function(t){t.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},t.Control=function(i,r,o){var l=i.parentNode;typeof r=="number"&&(t.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead.  Support for this deprecated variant is scheduled for removal in December 2013"),r={anchor:r}),r.attachToViewer=typeof r.attachToViewer>"u"?!0:r.attachToViewer,this.autoFade=typeof r.autoFade>"u"?!0:r.autoFade,this.element=i,this.anchor=r.anchor,this.container=o,this.anchor===t.ControlAnchor.ABSOLUTE?(this.wrapper=t.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof r.top=="number"?r.top+"px":r.top,this.wrapper.style.left=typeof r.left=="number"?r.left+"px":r.left,this.wrapper.style.height=typeof r.height=="number"?r.height+"px":r.height,this.wrapper.style.width=typeof r.width=="number"?r.width+"px":r.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=t.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor===t.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),r.attachToViewer?this.anchor===t.ControlAnchor.TOP_RIGHT||this.anchor===t.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):l.appendChild(this.wrapper)},t.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==t.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!=="none"},setVisible:function(i){this.wrapper.style.display=i?this.anchor===t.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(i){this.element[t.SIGNAL]&&t.Browser.vendor===t.BROWSERS.IE?t.setElementOpacity(this.element,i,!0):t.setElementOpacity(this.wrapper,i,!0)}}}(n),function(t){t.ControlDock=function(r){var o=["topleft","topright","bottomright","bottomleft"],l,s;for(t.extend(!0,this,{id:"controldock-"+t.now()+"-"+Math.floor(Math.random()*1e6),container:t.makeNeutralElement("div"),controls:[]},r),this.container.onsubmit=function(){return!1},this.element&&(this.element=t.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),s=0;s<o.length;s++)l=o[s],this.controls[l]=t.makeNeutralElement("div"),this.controls[l].style.position="absolute",l.match("left")&&(this.controls[l].style.left="0px"),l.match("right")&&(this.controls[l].style.right="0px"),l.match("top")&&(this.controls[l].style.top="0px"),l.match("bottom")&&(this.controls[l].style.bottom="0px");this.container.appendChild(this.controls.topleft),this.container.appendChild(this.controls.topright),this.container.appendChild(this.controls.bottomright),this.container.appendChild(this.controls.bottomleft)},t.ControlDock.prototype={addControl:function(r,o){r=t.getElement(r);var l=null;if(!(i(this,r)>=0)){switch(o.anchor){case t.ControlAnchor.TOP_RIGHT:l=this.controls.topright,r.style.position="relative",r.style.paddingRight="0px",r.style.paddingTop="0px";break;case t.ControlAnchor.BOTTOM_RIGHT:l=this.controls.bottomright,r.style.position="relative",r.style.paddingRight="0px",r.style.paddingBottom="0px";break;case t.ControlAnchor.BOTTOM_LEFT:l=this.controls.bottomleft,r.style.position="relative",r.style.paddingLeft="0px",r.style.paddingBottom="0px";break;case t.ControlAnchor.TOP_LEFT:l=this.controls.topleft,r.style.position="relative",r.style.paddingLeft="0px",r.style.paddingTop="0px";break;case t.ControlAnchor.ABSOLUTE:l=this.container,r.style.margin="0px",r.style.padding="0px";break;default:case t.ControlAnchor.NONE:l=this.container,r.style.margin="0px",r.style.padding="0px";break}this.controls.push(new t.Control(r,o,l)),r.style.display="inline-block"}},removeControl:function(r){r=t.getElement(r);var o=i(this,r);return o>=0&&(this.controls[o].destroy(),this.controls.splice(o,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var r;for(r=this.controls.length-1;r>=0;r--)if(this.controls[r].isVisible())return!0;return!1},setControlsEnabled:function(r){var o;for(o=this.controls.length-1;o>=0;o--)this.controls[o].setVisible(r);return this}};function i(r,o){var l=r.controls,s;for(s=l.length-1;s>=0;s--)if(l[s].element===o)return s;return-1}}(n),function(t){t.Placement=t.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}}})}(n),function(t){var i={},r=1;t.Viewer=function(d){var m=arguments,x=this,I;if(t.isPlainObject(d)||(d={id:m[0],xmlPath:m.length>1?m[1]:void 0,prefixUrl:m.length>2?m[2]:void 0,controls:m.length>3?m[3]:void 0,overlays:m.length>4?m[4]:void 0}),d.config&&(t.extend(!0,d,d.config),delete d.config),t.extend(!0,this,{id:d.id,hash:d.hash||r++,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},t.DEFAULT_SETTINGS,d),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(typeof i[this.hash]<"u"&&t.console.warn("Hash "+this.hash+" has already been used."),i[this.hash]={fsBoundsDelta:new t.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._updatePixelDensityRatioBind=null,this._lastScrollTime=t.now(),t.EventSource.call(this),this.addHandler("open-failed",function(A){var U=t.getString("Errors.OpenFailed",A.eventSource,A.message);x._showMessage(U)}),t.ControlDock.call(this,d),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=t.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function(A){A.width="100%",A.height="100%",A.overflow="hidden",A.position="absolute",A.top="0px",A.left="0px"}(this.canvas.style),t.setElementTouchActionNone(this.canvas),d.tabIndex!==""&&(this.canvas.tabIndex=d.tabIndex===void 0?0:d.tabIndex),this.container.className="openseadragon-container",function(A){A.width="100%",A.height="100%",A.position="relative",A.overflow="hidden",A.left="0px",A.top="0px",A.textAlign="left"}(this.container.style),t.setElementTouchActionNone(this.container),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 t.MouseTracker({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:t.delegate(this,T),keyDownHandler:t.delegate(this,v),keyHandler:t.delegate(this,E),clickHandler:t.delegate(this,O),dblClickHandler:t.delegate(this,P),dragHandler:t.delegate(this,D),dragEndHandler:t.delegate(this,H),enterHandler:t.delegate(this,M),leaveHandler:t.delegate(this,B),pressHandler:t.delegate(this,R),releaseHandler:t.delegate(this,V),nonPrimaryPressHandler:t.delegate(this,$),nonPrimaryReleaseHandler:t.delegate(this,N),scrollHandler:t.delegate(this,Z),pinchHandler:t.delegate(this,re)}),this.outerTracker=new t.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:t.delegate(this,le),leaveHandler:t.delegate(this,oe)}),this.toolbar&&(this.toolbar=new t.ControlDock({element:this.toolbar})),this.bindStandardControls(),i[this.hash].prevContainerSize=o(this.container),this.world=new t.World({viewer:this}),this.world.addHandler("add-item",function(A){x.source=x.world.getItemAt(0).source,i[x.hash].forceRedraw=!0,x._updateRequestId||(x._updateRequestId=u(x,pe))}),this.world.addHandler("remove-item",function(A){x.world.getItemCount()?x.source=x.world.getItemAt(0).source:x.source=null,i[x.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function(A){x.viewport&&x.viewport._setContentBounds(x.world.getHomeBounds(),x.world.getContentFactor())}),this.world.addHandler("item-index-change",function(A){x.source=x.world.getItemAt(0).source}),this.viewport=new t.Viewport({containerSize:i[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,silenceMultiImageWarnings:this.silenceMultiImageWarnings}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new t.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:d.timeout}),this.tileCache=new t.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new t.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=t.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(I=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(I,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(I=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(I,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new t.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),I=0;I<this.customControls.length;I++)this.addControl(this.customControls[I].id,{anchor:this.customControls[I].anchor});t.requestAnimationFrame(function(){f(x)}),this.imageSmoothingEnabled!==void 0&&!this.imageSmoothingEnabled&&this.drawer.setImageSmoothingEnabled(this.imageSmoothingEnabled),t._viewers.set(this.element,this)},t.extend(t.Viewer.prototype,t.EventSource.prototype,t.ControlDock.prototype,{isOpen:function(){return!!this.world.getItemCount()},openDzi:function(d){return t.console.error("[Viewer.openDzi] this function is deprecated; use Viewer.open() instead."),this.open(d)},openTileSource:function(d){return t.console.error("[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead."),this.open(d)},get buttons(){return t.console.warn("Viewer.buttons is deprecated; Please use Viewer.buttonGroup"),this.buttonGroup},open:function(d,m){var x=this;if(this.close(),!d)return this;if(this.sequenceMode&&t.isArray(d))return this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),typeof m<"u"&&!isNaN(m)&&(this.initialPage=m),this.tileSources=d,this._sequenceIndex=Math.max(0,Math.min(this.tileSources.length-1,this.initialPage)),this.tileSources.length&&(this.open(this.tileSources[this._sequenceIndex]),this.showReferenceStrip&&this.addReferenceStrip()),this._updateSequenceButtons(this._sequenceIndex),this;if(t.isArray(d)||(d=[d]),!d.length)return this;this._opening=!0;for(var I=d.length,A=0,U=0,z,Q=function(){if(A+U===I)if(A){(x._firstOpen||!x.preserveViewport)&&(x.viewport.goHome(!0),x.viewport.update()),x._firstOpen=!1;var X=d[0];if(X.tileSource&&(X=X.tileSource),x.overlays&&!x.preserveOverlays)for(var ee=0;ee<x.overlays.length;ee++)x.currentOverlays[ee]=s(x,x.overlays[ee]);x._drawOverlays(),x._opening=!1,x.raiseEvent("open",{source:X})}else x._opening=!1,x.raiseEvent("open-failed",z)},Y=function(X){(!t.isPlainObject(X)||!X.tileSource)&&(X={tileSource:X}),X.index!==void 0&&(t.console.error("[Viewer.open] setting indexes here is not supported; use addTiledImage instead"),delete X.index),X.collectionImmediately===void 0&&(X.collectionImmediately=!0);var ee=X.success;X.success=function(G){if(A++,X.tileSource.overlays)for(var ye=0;ye<X.tileSource.overlays.length;ye++)x.addOverlay(X.tileSource.overlays[ye]);ee&&ee(G),Q()};var k=X.error;X.error=function(G){U++,z||(z=G),k&&k(G),Q()},x.addTiledImage(X)},ue=0;ue<d.length;ue++)Y(d[ue]);return this},close:function(){return i[this.hash]?(this._opening=!1,this.navigator&&this.navigator.close(),this.preserveOverlays||(this.clearOverlays(),this.overlaysContainer.innerHTML=""),i[this.hash].animating=!1,this.world.removeAll(),this.imageLoader.clear(),this.raiseEvent("close"),this):this},destroy:function(){if(i[this.hash]){if(this._removeUpdatePixelDensityRatioEvent(),this.close(),this.clearOverlays(),this.overlaysContainer.innerHTML="",this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),this._updateRequestId!==null&&(t.cancelAnimationFrame(this._updateRequestId),this._updateRequestId=null),this.drawer&&this.drawer.destroy(),this.navigator&&(this.navigator.destroy(),i[this.navigator.hash]=null,delete i[this.navigator.hash],this.navigator=null),this.removeAllHandlers(),this.buttonGroup)this.buttonGroup.destroy();else if(this.customButtons)for(;this.customButtons.length;)this.customButtons.pop().destroy();if(this.paging&&this.paging.destroy(),this.element)for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.container.onsubmit=null,this.clearControls(),this.innerTracker&&this.innerTracker.destroy(),this.outerTracker&&this.outerTracker.destroy(),i[this.hash]=null,delete i[this.hash],this.canvas=null,this.container=null,t._viewers.delete(this.element),this.element=null}},isMouseNavEnabled:function(){return this.innerTracker.isTracking()},setMouseNavEnabled:function(d){return this.innerTracker.setTracking(d),this.outerTracker.setTracking(d),this.raiseEvent("mouse-enabled",{enabled:d}),this},areControlsEnabled:function(){var d=this.controls.length,m;for(m=0;m<this.controls.length;m++)d=d&&this.controls[m].isVisible();return d},setControlsEnabled:function(d){return d?p(this):f(this),this.raiseEvent("controls-enabled",{enabled:d}),this},setDebugMode:function(d){for(var m=0;m<this.world.getItemCount();m++)this.world.getItemAt(m).debugMode=d;this.debugMode=d,this.forceRedraw()},isFullPage:function(){return i[this.hash].fullPage},setFullPage:function(d){var m=document.body,x=m.style,I=document.documentElement.style,A=this,U,z;if(d===this.isFullPage())return this;var Q={fullPage:d,preventDefaultAction:!1};if(this.raiseEvent("pre-full-page",Q),Q.preventDefaultAction)return this;if(d){for(this.elementSize=t.getElementSize(this.element),this.pageScroll=t.getPageScroll(),this.elementMargin=this.element.style.margin,this.element.style.margin="0",this.elementPadding=this.element.style.padding,this.element.style.padding="0",this.bodyMargin=x.margin,this.docMargin=I.margin,x.margin="0",I.margin="0",this.bodyPadding=x.padding,this.docPadding=I.padding,x.padding="0",I.padding="0",this.bodyWidth=x.width,this.docWidth=I.width,x.width="100%",I.width="100%",this.bodyHeight=x.height,this.docHeight=I.height,x.height="100%",I.height="100%",this.bodyDisplay=x.display,x.display="block",this.previousBody=[],i[this.hash].prevElementParent=this.element.parentNode,i[this.hash].prevNextSibling=this.element.nextSibling,i[this.hash].prevElementWidth=this.element.style.width,i[this.hash].prevElementHeight=this.element.style.height,U=m.childNodes.length,z=0;z<U;z++)this.previousBody.push(m.childNodes[0]),m.removeChild(m.childNodes[0]);this.toolbar&&this.toolbar.element&&(this.toolbar.parentNode=this.toolbar.element.parentNode,this.toolbar.nextSibling=this.toolbar.element.nextSibling,m.appendChild(this.toolbar.element),t.addClass(this.toolbar.element,"fullpage")),t.addClass(this.element,"fullpage"),m.appendChild(this.element),this.element.style.height="100vh",this.element.style.width="100vw",this.toolbar&&this.toolbar.element&&(this.element.style.height=t.getElementSize(this.element).y-t.getElementSize(this.toolbar.element).y+"px"),i[this.hash].fullPage=!0,t.delegate(this,le)({})}else{for(this.element.style.margin=this.elementMargin,this.element.style.padding=this.elementPadding,x.margin=this.bodyMargin,I.margin=this.docMargin,x.padding=this.bodyPadding,I.padding=this.docPadding,x.width=this.bodyWidth,I.width=this.docWidth,x.height=this.bodyHeight,I.height=this.docHeight,x.display=this.bodyDisplay,m.removeChild(this.element),U=this.previousBody.length,z=0;z<U;z++)m.appendChild(this.previousBody.shift());t.removeClass(this.element,"fullpage"),i[this.hash].prevElementParent.insertBefore(this.element,i[this.hash].prevNextSibling),this.toolbar&&this.toolbar.element&&(m.removeChild(this.toolbar.element),t.removeClass(this.toolbar.element,"fullpage"),this.toolbar.parentNode.insertBefore(this.toolbar.element,this.toolbar.nextSibling),delete this.toolbar.parentNode,delete this.toolbar.nextSibling),this.element.style.width=i[this.hash].prevElementWidth,this.element.style.height=i[this.hash].prevElementHeight;var Y=0,ue=function(){t.setPageScroll(A.pageScroll);var X=t.getPageScroll();Y++,Y<10&&(X.x!==A.pageScroll.x||X.y!==A.pageScroll.y)&&t.requestAnimationFrame(ue)};t.requestAnimationFrame(ue),i[this.hash].fullPage=!1,t.delegate(this,oe)({})}return this.navigator&&this.viewport&&this.navigator.update(this.viewport),this.raiseEvent("full-page",{fullPage:d}),this},setFullScreen:function(d){var m=this;if(!t.supportsFullScreen)return this.setFullPage(d);if(t.isFullScreen()===d)return this;var x={fullScreen:d,preventDefaultAction:!1};if(this.raiseEvent("pre-full-screen",x),x.preventDefaultAction)return this;if(d){if(this.setFullPage(!0),!this.isFullPage())return this;this.fullPageStyleWidth=this.element.style.width,this.fullPageStyleHeight=this.element.style.height,this.element.style.width="100%",this.element.style.height="100%";var I=function(){var A=t.isFullScreen();A||(t.removeEvent(document,t.fullScreenEventName,I),t.removeEvent(document,t.fullScreenErrorEventName,I),m.setFullPage(!1),m.isFullPage()&&(m.element.style.width=m.fullPageStyleWidth,m.element.style.height=m.fullPageStyleHeight)),m.navigator&&m.viewport&&setTimeout(function(){m.navigator.update(m.viewport)}),m.raiseEvent("full-screen",{fullScreen:A})};t.addEvent(document,t.fullScreenEventName,I),t.addEvent(document,t.fullScreenErrorEventName,I),t.requestFullScreen(document.body)}else t.exitFullScreen();return this},isVisible:function(){return this.container.style.visibility!=="hidden"},isFullScreen:function(){return t.isFullScreen()&&this.isFullPage()},setVisible:function(d){return this.container.style.visibility=d?"":"hidden",this.raiseEvent("visible",{visible:d}),this},addTiledImage:function(d){t.console.assert(d,"[Viewer.addTiledImage] options is required"),t.console.assert(d.tileSource,"[Viewer.addTiledImage] options.tileSource is required"),t.console.assert(!d.replace||d.index>-1&&d.index<this.world.getItemCount(),"[Viewer.addTiledImage] if options.replace is used, options.index must be a valid index in Viewer.world");var m=this;d.replace&&(d.replaceItem=m.world.getItemAt(d.index)),this._hideMessage(),d.placeholderFillStyle===void 0&&(d.placeholderFillStyle=this.placeholderFillStyle),d.opacity===void 0&&(d.opacity=this.opacity),d.preload===void 0&&(d.preload=this.preload),d.compositeOperation===void 0&&(d.compositeOperation=this.compositeOperation),d.crossOriginPolicy===void 0&&(d.crossOriginPolicy=d.tileSource.crossOriginPolicy!==void 0?d.tileSource.crossOriginPolicy:this.crossOriginPolicy),d.ajaxWithCredentials===void 0&&(d.ajaxWithCredentials=this.ajaxWithCredentials),d.loadTilesWithAjax===void 0&&(d.loadTilesWithAjax=this.loadTilesWithAjax),d.ajaxHeaders===void 0||d.ajaxHeaders===null?d.ajaxHeaders=this.ajaxHeaders:t.isPlainObject(d.ajaxHeaders)&&t.isPlainObject(this.ajaxHeaders)&&(d.ajaxHeaders=t.extend({},this.ajaxHeaders,d.ajaxHeaders));var x={options:d};function I(z){for(var Q=0;Q<m._loadQueue.length;Q++)if(m._loadQueue[Q]===x){m._loadQueue.splice(Q,1);break}m._loadQueue.length===0&&A(x),m.raiseEvent("add-item-failed",z),d.error&&d.error(z)}function A(z){m.collectionMode&&(m.world.arrange({immediately:z.options.collectionImmediately,rows:m.collectionRows,columns:m.collectionColumns,layout:m.collectionLayout,tileSize:m.collectionTileSize,tileMargin:m.collectionTileMargin}),m.world.setAutoRefigureSizes(!0))}if(t.isArray(d.tileSource)){setTimeout(function(){I({message:"[Viewer.addTiledImage] Sequences can not be added; add them one at a time instead.",source:d.tileSource,options:d})});return}this._loadQueue.push(x);function U(){for(var z,Q,Y;m._loadQueue.length&&(z=m._loadQueue[0],!!z.tileSource);){if(m._loadQueue.splice(0,1),z.options.replace){var ue=m.world.getIndexOfItem(z.options.replaceItem);ue!==-1&&(z.options.index=ue),m.world.removeItem(z.options.replaceItem)}Q=new t.TiledImage({viewer:m,source:z.tileSource,viewport:m.viewport,drawer:m.drawer,tileCache:m.tileCache,imageLoader:m.imageLoader,x:z.options.x,y:z.options.y,width:z.options.width,height:z.options.height,fitBounds:z.options.fitBounds,fitBoundsPlacement:z.options.fitBoundsPlacement,clip:z.options.clip,placeholderFillStyle:z.options.placeholderFillStyle,opacity:z.options.opacity,preload:z.options.preload,degrees:z.options.degrees,flipped:z.options.flipped,compositeOperation:z.options.compositeOperation,springStiffness:m.springStiffness,animationTime:m.animationTime,minZoomImageRatio:m.minZoomImageRatio,wrapHorizontal:m.wrapHorizontal,wrapVertical:m.wrapVertical,immediateRender:m.immediateRender,blendTime:m.blendTime,alwaysBlend:m.alwaysBlend,minPixelRatio:m.minPixelRatio,smoothTileEdgesMinZoom:m.smoothTileEdgesMinZoom,iOSDevice:m.iOSDevice,crossOriginPolicy:z.options.crossOriginPolicy,ajaxWithCredentials:z.options.ajaxWithCredentials,loadTilesWithAjax:z.options.loadTilesWithAjax,ajaxHeaders:z.options.ajaxHeaders,debugMode:m.debugMode,subPixelRoundingForTransparency:m.subPixelRoundingForTransparency}),m.collectionMode&&m.world.setAutoRefigureSizes(!1),m.navigator&&(Y=t.extend({},z.options,{replace:!1,originalTiledImage:Q,tileSource:z.tileSource}),m.navigator.addTiledImage(Y)),m.world.addItem(Q,{index:z.options.index}),m._loadQueue.length===0&&A(z),m.world.getItemCount()===1&&!m.preserveViewport&&m.viewport.goHome(!0),z.options.success&&z.options.success({item:Q})}}l(this,d.tileSource,d,function(z){x.tileSource=z,U()},function(z){z.options=d,I(z),U()})},addSimpleImage:function(d){t.console.assert(d,"[Viewer.addSimpleImage] options is required"),t.console.assert(d.url,"[Viewer.addSimpleImage] options.url is required");var m=t.extend({},d,{tileSource:{type:"image",url:d.url}});delete m.url,this.addTiledImage(m)},addLayer:function(d){var m=this;t.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var x=t.extend({},d,{success:function(I){m.raiseEvent("add-layer",{options:d,drawer:I.item})},error:function(I){m.raiseEvent("add-layer-failed",I)}});return this.addTiledImage(x),this},getLayerAtLevel:function(d){return t.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(d)},getLevelOfLayer:function(d){return t.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(d)},getLayersCount:function(){return t.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(d,m){return t.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(d,m)},removeLayer:function(d){return t.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(d)},forceRedraw:function(){return i[this.hash].forceRedraw=!0,this},bindSequenceControls:function(){var d=t.delegate(this,g),m=t.delegate(this,y),x=t.delegate(this,this.goToNextPage),I=t.delegate(this,this.goToPreviousPage),A=this.navImages,U=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(U=!1),this.previousButton=new t.Button({element:this.previousButton?t.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.PreviousPage"),srcRest:ge(this.prefixUrl,A.previous.REST),srcGroup:ge(this.prefixUrl,A.previous.GROUP),srcHover:ge(this.prefixUrl,A.previous.HOVER),srcDown:ge(this.prefixUrl,A.previous.DOWN),onRelease:I,onFocus:d,onBlur:m}),this.nextButton=new t.Button({element:this.nextButton?t.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.NextPage"),srcRest:ge(this.prefixUrl,A.next.REST),srcGroup:ge(this.prefixUrl,A.next.GROUP),srcHover:ge(this.prefixUrl,A.next.HOVER),srcDown:ge(this.prefixUrl,A.next.DOWN),onRelease:x,onFocus:d,onBlur:m}),this.navPrevNextWrap||this.previousButton.disable(),(!this.tileSources||!this.tileSources.length)&&this.nextButton.disable(),U&&(this.paging=new t.ButtonGroup({buttons:[this.previousButton,this.nextButton],clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.pagingControl=this.paging.element,this.toolbar?this.toolbar.addControl(this.pagingControl,{anchor:t.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||t.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var d=t.delegate(this,Ne),m=t.delegate(this,it),x=t.delegate(this,F),I=t.delegate(this,We),A=t.delegate(this,q),U=t.delegate(this,se),z=t.delegate(this,ce),Q=t.delegate(this,me),Y=t.delegate(this,Ce),ue=t.delegate(this,b),X=t.delegate(this,g),ee=t.delegate(this,y),k=this.navImages,G=[],ye=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(ye=!1),this.showZoomControl&&(G.push(this.zoomInButton=new t.Button({element:this.zoomInButton?t.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.ZoomIn"),srcRest:ge(this.prefixUrl,k.zoomIn.REST),srcGroup:ge(this.prefixUrl,k.zoomIn.GROUP),srcHover:ge(this.prefixUrl,k.zoomIn.HOVER),srcDown:ge(this.prefixUrl,k.zoomIn.DOWN),onPress:d,onRelease:m,onClick:x,onEnter:d,onExit:m,onFocus:X,onBlur:ee})),G.push(this.zoomOutButton=new t.Button({element:this.zoomOutButton?t.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.ZoomOut"),srcRest:ge(this.prefixUrl,k.zoomOut.REST),srcGroup:ge(this.prefixUrl,k.zoomOut.GROUP),srcHover:ge(this.prefixUrl,k.zoomOut.HOVER),srcDown:ge(this.prefixUrl,k.zoomOut.DOWN),onPress:I,onRelease:m,onClick:A,onEnter:I,onExit:m,onFocus:X,onBlur:ee}))),this.showHomeControl&&G.push(this.homeButton=new t.Button({element:this.homeButton?t.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.Home"),srcRest:ge(this.prefixUrl,k.home.REST),srcGroup:ge(this.prefixUrl,k.home.GROUP),srcHover:ge(this.prefixUrl,k.home.HOVER),srcDown:ge(this.prefixUrl,k.home.DOWN),onRelease:U,onFocus:X,onBlur:ee})),this.showFullPageControl&&G.push(this.fullPageButton=new t.Button({element:this.fullPageButton?t.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.FullPage"),srcRest:ge(this.prefixUrl,k.fullpage.REST),srcGroup:ge(this.prefixUrl,k.fullpage.GROUP),srcHover:ge(this.prefixUrl,k.fullpage.HOVER),srcDown:ge(this.prefixUrl,k.fullpage.DOWN),onRelease:z,onFocus:X,onBlur:ee})),this.showRotationControl&&(G.push(this.rotateLeftButton=new t.Button({element:this.rotateLeftButton?t.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.RotateLeft"),srcRest:ge(this.prefixUrl,k.rotateleft.REST),srcGroup:ge(this.prefixUrl,k.rotateleft.GROUP),srcHover:ge(this.prefixUrl,k.rotateleft.HOVER),srcDown:ge(this.prefixUrl,k.rotateleft.DOWN),onRelease:Q,onFocus:X,onBlur:ee})),G.push(this.rotateRightButton=new t.Button({element:this.rotateRightButton?t.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.RotateRight"),srcRest:ge(this.prefixUrl,k.rotateright.REST),srcGroup:ge(this.prefixUrl,k.rotateright.GROUP),srcHover:ge(this.prefixUrl,k.rotateright.HOVER),srcDown:ge(this.prefixUrl,k.rotateright.DOWN),onRelease:Y,onFocus:X,onBlur:ee}))),this.showFlipControl&&G.push(this.flipButton=new t.Button({element:this.flipButton?t.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.Flip"),srcRest:ge(this.prefixUrl,k.flip.REST),srcGroup:ge(this.prefixUrl,k.flip.GROUP),srcHover:ge(this.prefixUrl,k.flip.HOVER),srcDown:ge(this.prefixUrl,k.flip.DOWN),onRelease:ue,onFocus:X,onBlur:ee})),ye?(this.buttonGroup=new t.ButtonGroup({buttons:G,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttonGroup.element,this.addHandler("open",t.delegate(this,K)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||t.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||t.ControlAnchor.TOP_LEFT})):this.customButtons=G),this},currentPage:function(){return this._sequenceIndex},goToPage:function(d){return this.tileSources&&d>=0&&d<this.tileSources.length&&(this._sequenceIndex=d,this._updateSequenceButtons(d),this.open(this.tileSources[d]),this.referenceStrip&&this.referenceStrip.setFocus(d),this.raiseEvent("page",{page:d})),this},addOverlay:function(d,m,x,I){var A;if(t.isPlainObject(d)?A=d:A={element:d,location:m,placement:x,onDraw:I},d=t.getElement(A.element),a(this.currentOverlays,d)>=0)return this;var U=s(this,A);return this.currentOverlays.push(U),U.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:d,location:A.location,placement:A.placement}),this},updateOverlay:function(d,m,x){var I;return d=t.getElement(d),I=a(this.currentOverlays,d),I>=0&&(this.currentOverlays[I].update(m,x),i[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:d,location:m,placement:x})),this},removeOverlay:function(d){var m;return d=t.getElement(d),m=a(this.currentOverlays,d),m>=0&&(this.currentOverlays[m].destroy(),this.currentOverlays.splice(m,1),i[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:d})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return i[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(d){var m;return d=t.getElement(d),m=a(this.currentOverlays,d),m>=0?this.currentOverlays[m]:null},_updateSequenceButtons:function(d){this.nextButton&&(!this.tileSources||this.tileSources.length-1===d?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(d>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(d){this._hideMessage();var m=t.makeNeutralElement("div");m.appendChild(document.createTextNode(d)),this.messageDiv=t.makeCenteredNode(m),t.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var d=this.messageDiv;d&&(d.parentNode.removeChild(d),delete this.messageDiv)},gestureSettingsByDeviceType:function(d){switch(d){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var d,m=this.currentOverlays.length;for(d=0;d<m;d++)this.currentOverlays[d].drawHTML(this.overlaysContainer,this.viewport)},_cancelPendingImages:function(){this._loadQueue=[]},removeReferenceStrip:function(){this.showReferenceStrip=!1,this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null)},addReferenceStrip:function(){if(this.showReferenceStrip=!0,this.sequenceMode){if(this.referenceStrip)return;this.tileSources.length&&this.tileSources.length>1&&(this.referenceStrip=new t.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 t.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),t.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){t.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var d=t.pixelDensityRatio,m=t.getCurrentPixelDensityRatio();d!==m&&(t.pixelDensityRatio=m,this.world.resetItems(),this.forceRedraw())},goToPreviousPage:function(){var d=this._sequenceIndex-1;this.navPrevNextWrap&&d<0&&(d+=this.tileSources.length),this.goToPage(d)},goToNextPage:function(){var d=this._sequenceIndex+1;this.navPrevNextWrap&&d>=this.tileSources.length&&(d=0),this.goToPage(d)},isAnimating:function(){return i[this.hash].animating}});function o(d){return d=t.getElement(d),new t.Point(d.clientWidth===0?1:d.clientWidth,d.clientHeight===0?1:d.clientHeight)}function l(d,m,x,I,A){var U=d;if(t.type(m)==="string"){if(m.match(/^\s*<.*>\s*$/))m=t.parseXml(m);else if(m.match(/^\s*[{[].*[}\]]\s*$/))try{var z=t.parseJSON(m);m=z}catch{}}function Q(Y,ue){Y.ready?I(Y):(Y.addHandler("ready",function(){I(Y)}),Y.addHandler("open-failed",function(X){A({message:X.message,source:ue})}))}setTimeout(function(){if(t.type(m)==="string")m=new t.TileSource({url:m,crossOriginPolicy:x.crossOriginPolicy!==void 0?x.crossOriginPolicy:d.crossOriginPolicy,ajaxWithCredentials:d.ajaxWithCredentials,ajaxHeaders:x.ajaxHeaders?x.ajaxHeaders:d.ajaxHeaders,splitHashDataForPost:d.splitHashDataForPost,useCanvas:d.useCanvas,success:function(ee){I(ee.tileSource)}}),m.addHandler("open-failed",function(ee){A(ee)});else if(t.isPlainObject(m)||m.nodeType)if(m.crossOriginPolicy===void 0&&(x.crossOriginPolicy!==void 0||d.crossOriginPolicy!==void 0)&&(m.crossOriginPolicy=x.crossOriginPolicy!==void 0?x.crossOriginPolicy:d.crossOriginPolicy),m.ajaxWithCredentials===void 0&&(m.ajaxWithCredentials=d.ajaxWithCredentials),m.useCanvas===void 0&&(m.useCanvas=d.useCanvas),t.isFunction(m.getTileUrl)){var Y=new t.TileSource(m);Y.getTileUrl=m.getTileUrl,I(Y)}else{var ue=t.TileSource.determineType(U,m);if(!ue){A({message:"Unable to load TileSource",source:m});return}var X=ue.prototype.configure.apply(U,[m]);Q(new ue(X),m)}else Q(m,m)})}function s(d,m){if(m instanceof t.Overlay)return m;var x=null;if(m.element)x=t.getElement(m.element);else{var I=m.id?m.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);x=t.getElement(m.id),x||(x=document.createElement("a"),x.href="#/overlay/"+I),x.id=I,t.addClass(x,m.className?m.className:"openseadragon-overlay")}var A=m.location,U=m.width,z=m.height;if(!A){var Q=m.x,Y=m.y;if(m.px!==void 0){var ue=d.viewport.imageToViewportRectangle(new t.Rect(m.px,m.py,U||0,z||0));Q=ue.x,Y=ue.y,U=U!==void 0?ue.width:void 0,z=z!==void 0?ue.height:void 0}A=new t.Point(Q,Y)}var X=m.placement;return X&&t.type(X)==="string"&&(X=t.Placement[m.placement.toUpperCase()]),new t.Overlay({element:x,location:A,placement:X,onDraw:m.onDraw,checkResize:m.checkResize,width:U,height:z,rotationMode:m.rotationMode})}function a(d,m){var x;for(x=d.length-1;x>=0;x--)if(d[x].element===m)return x;return-1}function u(d,m){return t.requestAnimationFrame(function(){m(d)})}function c(d){t.requestAnimationFrame(function(){h(d)})}function f(d){d.autoHideControls&&(d.controlsShouldFade=!0,d.controlsFadeBeginTime=t.now()+d.controlsFadeDelay,window.setTimeout(function(){c(d)},d.controlsFadeDelay))}function h(d){var m,x,I,A;if(d.controlsShouldFade){for(m=t.now(),x=m-d.controlsFadeBeginTime,I=1-x/d.controlsFadeLength,I=Math.min(1,I),I=Math.max(0,I),A=d.controls.length-1;A>=0;A--)d.controls[A].autoFade&&d.controls[A].setOpacity(I);I>0&&c(d)}}function p(d){var m;for(d.controlsShouldFade=!1,m=d.controls.length-1;m>=0;m--)d.controls[m].setOpacity(1)}function g(){p(this)}function y(){f(this)}function T(d){var m={tracker:d.eventSource,position:d.position,originalEvent:d.originalEvent,preventDefault:d.preventDefault};this.raiseEvent("canvas-contextmenu",m),d.preventDefault=m.preventDefault}function v(d){var m={originalEvent:d.originalEvent,preventDefaultAction:!1,preventVerticalPan:d.preventVerticalPan||!this.panVertical,preventHorizontalPan:d.preventHorizontalPan||!this.panHorizontal};if(this.raiseEvent("canvas-key",m),!m.preventDefaultAction&&!d.ctrl&&!d.alt&&!d.meta)switch(d.keyCode){case 38:m.preventVerticalPan||(d.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),d.preventDefault=!0;break;case 40:m.preventVerticalPan||(d.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),d.preventDefault=!0;break;case 37:m.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),d.preventDefault=!0;break;case 39:m.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),d.preventDefault=!0;break;default:d.preventDefault=!1;break}else d.preventDefault=!1}function E(d){var m={originalEvent:d.originalEvent,preventDefaultAction:!1,preventVerticalPan:d.preventVerticalPan||!this.panVertical,preventHorizontalPan:d.preventHorizontalPan||!this.panHorizontal};if(this.raiseEvent("canvas-key",m),!m.preventDefaultAction&&!d.ctrl&&!d.alt&&!d.meta)switch(d.keyCode){case 43:case 61:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),d.preventDefault=!0;break;case 45:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),d.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),d.preventDefault=!0;break;case 119:case 87:m.preventVerticalPan||(d.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,-40))),this.viewport.applyConstraints()),d.preventDefault=!0;break;case 115:case 83:m.preventVerticalPan||(d.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,40))),this.viewport.applyConstraints()),d.preventDefault=!0;break;case 97:m.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(-40,0))),this.viewport.applyConstraints()),d.preventDefault=!0;break;case 100:m.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(40,0))),this.viewport.applyConstraints()),d.preventDefault=!0;break;case 114:this.viewport.flipped?this.viewport.setRotation(t.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(t.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),d.preventDefault=!0;break;case 82:this.viewport.flipped?this.viewport.setRotation(t.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(t.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),d.preventDefault=!0;break;case 102:this.viewport.toggleFlip(),d.preventDefault=!0;break;case 106:this.goToPreviousPage();break;case 107:this.goToNextPage();break;default:d.preventDefault=!1;break}else d.preventDefault=!1}function O(d){var m,x=document.activeElement===this.canvas;x||this.canvas.focus(),this.viewport.flipped&&(d.position.x=this.viewport.getContainerSize().x-d.position.x);var I={tracker:d.eventSource,position:d.position,quick:d.quick,shift:d.shift,originalEvent:d.originalEvent,originalTarget:d.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",I),!I.preventDefaultAction&&this.viewport&&d.quick&&(m=this.gestureSettingsByDeviceType(d.pointerType),m.clickToZoom&&(this.viewport.zoomBy(d.shift?1/this.zoomPerClick:this.zoomPerClick,m.zoomToRefPoint?this.viewport.pointFromPixel(d.position,!0):null),this.viewport.applyConstraints()))}function P(d){var m,x={tracker:d.eventSource,position:d.position,shift:d.shift,originalEvent:d.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",x),!x.preventDefaultAction&&this.viewport&&(m=this.gestureSettingsByDeviceType(d.pointerType),m.dblClickToZoom&&(this.viewport.zoomBy(d.shift?1/this.zoomPerClick:this.zoomPerClick,m.zoomToRefPoint?this.viewport.pointFromPixel(d.position,!0):null),this.viewport.applyConstraints()))}function D(d){var m,x={tracker:d.eventSource,pointerType:d.pointerType,position:d.position,delta:d.delta,speed:d.speed,direction:d.direction,shift:d.shift,originalEvent:d.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",x),m=this.gestureSettingsByDeviceType(d.pointerType),m.dragToPan&&!x.preventDefaultAction&&this.viewport){if(this.panHorizontal||(d.delta.x=0),this.panVertical||(d.delta.y=0),this.viewport.flipped&&(d.delta.x=-d.delta.x),this.constrainDuringPan){var I=this.viewport.deltaPointsFromPixels(d.delta.negate());this.viewport.centerSpringX.target.value+=I.x,this.viewport.centerSpringY.target.value+=I.y;var A=this.viewport.getBounds(),U=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=I.x,this.viewport.centerSpringY.target.value-=I.y,A.x!==U.x&&(d.delta.x=0),A.y!==U.y&&(d.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(d.delta.negate()),m.flickEnabled&&!this.constrainDuringPan)}}function H(d){var m={tracker:d.eventSource,pointerType:d.pointerType,position:d.position,speed:d.speed,direction:d.direction,shift:d.shift,originalEvent:d.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",m),!m.preventDefaultAction&&this.viewport){var x=this.gestureSettingsByDeviceType(d.pointerType);if(x.flickEnabled&&d.speed>=x.flickMinSpeed){var I=0;this.panHorizontal&&(I=x.flickMomentum*d.speed*Math.cos(d.direction));var A=0;this.panVertical&&(A=x.flickMomentum*d.speed*Math.sin(d.direction));var U=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),z=this.viewport.pointFromPixel(new t.Point(U.x-I,U.y-A));this.viewport.panTo(z,!1)}this.viewport.applyConstraints()}}function M(d){this.raiseEvent("canvas-enter",{tracker:d.eventSource,pointerType:d.pointerType,position:d.position,buttons:d.buttons,pointers:d.pointers,insideElementPressed:d.insideElementPressed,buttonDownAny:d.buttonDownAny,originalEvent:d.originalEvent})}function B(d){this.raiseEvent("canvas-exit",{tracker:d.eventSource,pointerType:d.pointerType,position:d.position,buttons:d.buttons,pointers:d.pointers,insideElementPressed:d.insideElementPressed,buttonDownAny:d.buttonDownAny,originalEvent:d.originalEvent})}function R(d){this.raiseEvent("canvas-press",{tracker:d.eventSource,pointerType:d.pointerType,position:d.position,insideElementPressed:d.insideElementPressed,insideElementReleased:d.insideElementReleased,originalEvent:d.originalEvent})}function V(d){this.raiseEvent("canvas-release",{tracker:d.eventSource,pointerType:d.pointerType,position:d.position,insideElementPressed:d.insideElementPressed,insideElementReleased:d.insideElementReleased,originalEvent:d.originalEvent})}function $(d){this.raiseEvent("canvas-nonprimary-press",{tracker:d.eventSource,position:d.position,pointerType:d.pointerType,button:d.button,buttons:d.buttons,originalEvent:d.originalEvent})}function N(d){this.raiseEvent("canvas-nonprimary-release",{tracker:d.eventSource,position:d.position,pointerType:d.pointerType,button:d.button,buttons:d.buttons,originalEvent:d.originalEvent})}function re(d){var m,x,I,A,U={tracker:d.eventSource,pointerType:d.pointerType,gesturePoints:d.gesturePoints,lastCenter:d.lastCenter,center:d.center,lastDistance:d.lastDistance,distance:d.distance,shift:d.shift,originalEvent:d.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",U),this.viewport&&(m=this.gestureSettingsByDeviceType(d.pointerType),m.pinchToZoom&&(!U.preventDefaultPanAction||!U.preventDefaultZoomAction)&&(x=this.viewport.pointFromPixel(d.center,!0),m.zoomToRefPoint&&!U.preventDefaultPanAction&&(I=this.viewport.pointFromPixel(d.lastCenter,!0),A=I.minus(x),this.panHorizontal||(A.x=0),this.panVertical||(A.y=0),this.viewport.panBy(A,!0)),U.preventDefaultZoomAction||this.viewport.zoomBy(d.distance/d.lastDistance,x,!0),this.viewport.applyConstraints()),m.pinchRotate&&!U.preventDefaultRotateAction)){var z=Math.atan2(d.gesturePoints[0].currentPos.y-d.gesturePoints[1].currentPos.y,d.gesturePoints[0].currentPos.x-d.gesturePoints[1].currentPos.x),Q=Math.atan2(d.gesturePoints[0].lastPos.y-d.gesturePoints[1].lastPos.y,d.gesturePoints[0].lastPos.x-d.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(z-Q)*(180/Math.PI))}}function Z(d){var m,x,I,A,U;A=t.now(),U=A-this._lastScrollTime,U>this.minScrollDeltaTime?(this._lastScrollTime=A,m={tracker:d.eventSource,position:d.position,scroll:d.scroll,shift:d.shift,originalEvent:d.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",m),!m.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(d.position.x=this.viewport.getContainerSize().x-d.position.x),x=this.gestureSettingsByDeviceType(d.pointerType),x.scrollToZoom&&(I=Math.pow(this.zoomPerScroll,d.scroll),this.viewport.zoomBy(I,x.zoomToRefPoint?this.viewport.pointFromPixel(d.position,!0):null),this.viewport.applyConstraints())),d.preventDefault=m.preventDefault):d.preventDefault=!0}function le(d){i[this.hash].mouseInside=!0,p(this),this.raiseEvent("container-enter",{tracker:d.eventSource,pointerType:d.pointerType,position:d.position,buttons:d.buttons,pointers:d.pointers,insideElementPressed:d.insideElementPressed,buttonDownAny:d.buttonDownAny,originalEvent:d.originalEvent})}function oe(d){d.pointers<1&&(i[this.hash].mouseInside=!1,i[this.hash].animating||f(this)),this.raiseEvent("container-exit",{tracker:d.eventSource,pointerType:d.pointerType,position:d.position,buttons:d.buttons,pointers:d.pointers,insideElementPressed:d.insideElementPressed,buttonDownAny:d.buttonDownAny,originalEvent:d.originalEvent})}function pe(d){_e(d),d.isOpen()?d._updateRequestId=u(d,pe):d._updateRequestId=!1}function _e(d){if(!(d._opening||!i[d.hash])){if(d.autoResize){var m=o(d.container),x=i[d.hash].prevContainerSize;if(!m.equals(x)){var I=d.viewport;if(d.preserveImageSizeOnResize){var A=x.x/m.x,U=I.getZoom()*A,z=I.getCenter();I.resize(m,!1),I.zoomTo(U,null,!0),I.panTo(z,!0)}else{var Q=I.getBounds();I.resize(m,!0),I.fitBoundsWithConstraints(Q,!0)}i[d.hash].prevContainerSize=m,i[d.hash].forceRedraw=!0}}var Y=d.viewport.update(),ue=d.world.update()||Y;Y&&d.raiseEvent("viewport-change"),d.referenceStrip&&(ue=d.referenceStrip.update(d.viewport)||ue);var X=i[d.hash].animating;!X&&ue&&(d.raiseEvent("animation-start"),p(d));var ee=X&&!ue;ee&&(i[d.hash].animating=!1),(ue||ee||i[d.hash].forceRedraw||d.world.needsDraw())&&(Fe(d),d._drawOverlays(),d.navigator&&d.navigator.update(d.viewport),i[d.hash].forceRedraw=!1,ue&&d.raiseEvent("animation")),ee&&(d.raiseEvent("animation-finish"),i[d.hash].mouseInside||f(d)),i[d.hash].animating=ue}}function Fe(d){d.imageLoader.clear(),d.drawer.clear(),d.world.draw(),d.raiseEvent("update-viewport",{})}function ge(d,m){return d?d+m:m}function Ne(){i[this.hash].lastZoomTime=t.now(),i[this.hash].zoomFactor=this.zoomPerSecond,i[this.hash].zooming=!0,tt(this)}function We(){i[this.hash].lastZoomTime=t.now(),i[this.hash].zoomFactor=1/this.zoomPerSecond,i[this.hash].zooming=!0,tt(this)}function it(){i[this.hash].zooming=!1}function tt(d){t.requestAnimationFrame(t.delegate(d,te))}function te(){var d,m,x;i[this.hash].zooming&&this.viewport&&(d=t.now(),m=d-i[this.hash].lastZoomTime,x=Math.pow(i[this.hash].zoomFactor,m/1e3),this.viewport.zoomBy(x),this.viewport.applyConstraints(),i[this.hash].lastZoomTime=d,tt(this))}function F(){this.viewport&&(i[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function q(){this.viewport&&(i[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function K(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function se(){this.viewport&&this.viewport.goHome()}function ce(){this.isFullPage()&&!t.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function me(){if(this.viewport){var d=this.viewport.getRotation();this.viewport.flipped?d=t.positiveModulo(d+this.rotationIncrement,360):d=t.positiveModulo(d-this.rotationIncrement,360),this.viewport.setRotation(d)}}function Ce(){if(this.viewport){var d=this.viewport.getRotation();this.viewport.flipped?d=t.positiveModulo(d-this.rotationIncrement,360):d=t.positiveModulo(d+this.rotationIncrement,360),this.viewport.setRotation(d)}}function b(){this.viewport.toggleFlip()}}(n),function(t){t.Navigator=function(u){var c=u.viewer,f=this,h,p;u.id?(this.element=document.getElementById(u.id),u.controlOptions={anchor:t.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(u.id="navigator-"+t.now(),this.element=t.makeNeutralElement("div"),u.controlOptions={anchor:t.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:u.autoFade},u.position&&(u.position==="BOTTOM_RIGHT"?u.controlOptions.anchor=t.ControlAnchor.BOTTOM_RIGHT:u.position==="BOTTOM_LEFT"?u.controlOptions.anchor=t.ControlAnchor.BOTTOM_LEFT:u.position==="TOP_RIGHT"?u.controlOptions.anchor=t.ControlAnchor.TOP_RIGHT:u.position==="TOP_LEFT"?u.controlOptions.anchor=t.ControlAnchor.TOP_LEFT:u.position==="ABSOLUTE"&&(u.controlOptions.anchor=t.ControlAnchor.ABSOLUTE,u.controlOptions.top=u.top,u.controlOptions.left=u.left,u.controlOptions.height=u.height,u.controlOptions.width=u.width))),this.element.id=u.id,this.element.className+=" navigator",u=t.extend(!0,{sizeRatio:t.DEFAULT_SETTINGS.navigatorSizeRatio},u,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:u.autoResize,minZoomImageRatio:1,background:u.background,opacity:u.opacity,borderColor:u.borderColor,displayRegionColor:u.displayRegionColor}),u.minPixelRatio=this.minPixelRatio=c.minPixelRatio,t.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new t.Point(1,1),this.totalBorderWidths=new t.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),u.controlOptions.anchor!==t.ControlAnchor.NONE&&function(T,v){T.margin="0px",T.border=v+"px solid "+u.borderColor,T.padding="0px",T.background=u.background,T.opacity=u.opacity,T.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=t.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(T,v){T.position="relative",T.top="0px",T.left="0px",T.fontSize="0px",T.overflow="hidden",T.border=v+"px solid "+u.displayRegionColor,T.margin="0px",T.padding="0px",T.background="transparent",T.float="left",T.cssFloat="left",T.styleFloat="left",T.zIndex=999999999,T.cursor="default"}(this.displayRegion.style,this.borderWidth),t.setElementPointerEventsNone(this.displayRegion),t.setElementTouchActionNone(this.displayRegion),this.displayRegionContainer=t.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",t.setElementPointerEventsNone(this.displayRegionContainer),t.setElementTouchActionNone(this.displayRegionContainer),c.addControl(this.element,u.controlOptions),this._resizeWithViewer=u.controlOptions.anchor!==t.ControlAnchor.ABSOLUTE&&u.controlOptions.anchor!==t.ControlAnchor.NONE,u.width&&u.height?(this.setWidth(u.width),this.setHeight(u.height)):this._resizeWithViewer&&(h=t.getElementSize(c.element),this.element.style.height=Math.round(h.y*u.sizeRatio)+"px",this.element.style.width=Math.round(h.x*u.sizeRatio)+"px",this.oldViewerSize=h,p=t.getElementSize(this.element),this.elementArea=p.x*p.y),this.oldContainerSize=new t.Point(0,0),t.Viewer.apply(this,[u]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function g(T){s(f.displayRegionContainer,T),s(f.displayRegion,-T),f.viewport.setRotation(T)}if(u.navigatorRotate){var y=u.viewer.viewport?u.viewer.viewport.getRotation():u.viewer.degrees||0;g(y),u.viewer.addHandler("rotate",function(T){g(T.degrees)})}this.innerTracker.destroy(),this.innerTracker=new t.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:t.delegate(this,r),clickHandler:t.delegate(this,i),releaseHandler:t.delegate(this,o),scrollHandler:t.delegate(this,l),preProcessEventHandler:function(T){T.eventType==="wheel"&&(T.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",t.setElementPointerEventsNone(this.canvas),t.setElementPointerEventsNone(this.container),this.addHandler("reset-size",function(){f.viewport&&f.viewport.goHome(!0)}),c.world.addHandler("item-index-change",function(T){window.setTimeout(function(){var v=f.world.getItemAt(T.previousIndex);f.world.setItemIndex(v,T.newIndex)},1)}),c.world.addHandler("remove-item",function(T){var v=T.item,E=f._getMatchingItem(v);E&&f.world.removeItem(E)}),this.update(c.viewport)},t.extend(t.Navigator.prototype,t.EventSource.prototype,t.Viewer.prototype,{updateSize:function(){if(this.viewport){var u=new t.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);u.equals(this.oldContainerSize)||(this.viewport.resize(u,!0),this.viewport.goHome(!0),this.oldContainerSize=u,this.drawer.clear(),this.world.draw())}},setWidth:function(u){this.width=u,this.element.style.width=typeof u=="number"?u+"px":u,this._resizeWithViewer=!1},setHeight:function(u){this.height=u,this.element.style.height=typeof u=="number"?u+"px":u,this._resizeWithViewer=!1},setFlip:function(u){return this.viewport.setFlip(u),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(u){a(this.displayRegion,u),a(this.canvas,u),a(this.element,u)},update:function(u){var c,f,h,p,g,y;if(c=t.getElementSize(this.viewer.element),this._resizeWithViewer&&c.x&&c.y&&!c.equals(this.oldViewerSize)&&(this.oldViewerSize=c,this.maintainSizeRatio||!this.elementArea?(f=c.x*this.sizeRatio,h=c.y*this.sizeRatio):(f=Math.sqrt(this.elementArea*(c.x/c.y)),h=this.elementArea/f),this.element.style.width=Math.round(f)+"px",this.element.style.height=Math.round(h)+"px",this.elementArea||(this.elementArea=f*h),this.updateSize()),u&&this.viewport){p=u.getBoundsNoRotate(!0),g=this.viewport.pixelFromPointNoRotate(p.getTopLeft(),!1),y=this.viewport.pixelFromPointNoRotate(p.getBottomRight(),!1).minus(this.totalBorderWidths);var T=this.displayRegion.style;T.display=this.world.getItemCount()?"block":"none",T.top=Math.round(g.y)+"px",T.left=Math.round(g.x)+"px";var v=Math.abs(g.x-y.x),E=Math.abs(g.y-y.y);T.width=Math.round(Math.max(v,0))+"px",T.height=Math.round(Math.max(E,0))+"px"}},addTiledImage:function(u){var c=this,f=u.originalTiledImage;delete u.original;var h=t.extend({},u,{success:function(p){var g=p.item;g._originalForNavigator=f,c._matchBounds(g,f,!0),c._matchOpacity(g,f),c._matchCompositeOperation(g,f);function y(){c._matchBounds(g,f)}function T(){c._matchOpacity(g,f)}function v(){c._matchCompositeOperation(g,f)}f.addHandler("bounds-change",y),f.addHandler("clip-change",y),f.addHandler("opacity-change",T),f.addHandler("composite-operation-change",v)}});return t.Viewer.prototype.addTiledImage.apply(this,[h])},destroy:function(){return t.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(u){for(var c=this.world.getItemCount(),f,h=0;h<c;h++)if(f=this.world.getItemAt(h),f._originalForNavigator===u)return f;return null},_matchBounds:function(u,c,f){var h=c.getBoundsNoRotate();u.setPosition(h.getTopLeft(),f),u.setWidth(h.width,f),u.setRotation(c.getRotation(),f),u.setClip(c.getClip()),u.setFlip(c.getFlip())},_matchOpacity:function(u,c){u.setOpacity(c.opacity)},_matchCompositeOperation:function(u,c){u.setCompositeOperation(c.compositeOperation)}});function i(u){var c={tracker:u.eventSource,position:u.position,quick:u.quick,shift:u.shift,originalEvent:u.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",c),!c.preventDefaultAction&&u.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(u.position.x=this.viewport.getContainerSize().x-u.position.x);var f=this.viewport.pointFromPixel(u.position);this.panVertical?this.panHorizontal||(f.x=this.viewer.viewport.getCenter(!0).x):f.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(f),this.viewer.viewport.applyConstraints()}}function r(u){var c={tracker:u.eventSource,position:u.position,delta:u.delta,speed:u.speed,direction:u.direction,shift:u.shift,originalEvent:u.originalEvent,preventDefaultAction:!1};this.viewer.raiseEvent("navigator-drag",c),!c.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(u.delta.x=0),this.panVertical||(u.delta.y=0),this.viewer.viewport.flipped&&(u.delta.x=-u.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(u.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function o(u){u.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function l(u){var c={tracker:u.eventSource,position:u.position,scroll:u.scroll,shift:u.shift,originalEvent:u.originalEvent,preventDefault:u.preventDefault};this.viewer.raiseEvent("navigator-scroll",c),u.preventDefault=c.preventDefault}function s(u,c){a(u,"rotate("+c+"deg)")}function a(u,c){u.style.webkitTransform=c,u.style.mozTransform=c,u.style.msTransform=c,u.style.oTransform=c,u.style.transform=c}}(n),function(t){var i={Errors:{Dzc:"Sorry, we don't support Deep Zoom Collections!",Dzi:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",Xml:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",ImageFormat:"Sorry, we don't support {0}-based Deep Zoom Images.",Security:"It looks like a security restriction stopped us from loading this Deep Zoom Image.",Status:"This space unintentionally left blank ({0} {1}).",OpenFailed:"Unable to open {0}: {1}"},Tooltips:{FullPage:"Toggle full page",Home:"Go home",ZoomIn:"Zoom in",ZoomOut:"Zoom out",NextPage:"Next page",PreviousPage:"Previous page",RotateLeft:"Rotate left",RotateRight:"Rotate right",Flip:"Flip Horizontally"}};t.extend(t,{getString:function(r){var o=r.split("."),l=null,s=arguments,a=i,u;for(u=0;u<o.length-1;u++)a=a[o[u]]||{};return l=a[o[u]],typeof l!="string"&&(t.console.error("Untranslated source string:",r),l=""),l.replace(/\{\d+\}/g,function(c){var f=parseInt(c.match(/\d+/),10)+1;return f<s.length?s[f]:""})},setString:function(r,o){var l=r.split("."),s=i,a;for(a=0;a<l.length-1;a++)s[l[a]]||(s[l[a]]={}),s=s[l[a]];s[l[a]]=o}})}(n),function(t){t.Point=function(i,r){this.x=typeof i=="number"?i:0,this.y=typeof r=="number"?r:0},t.Point.prototype={clone:function(){return new t.Point(this.x,this.y)},plus:function(i){return new t.Point(this.x+i.x,this.y+i.y)},minus:function(i){return new t.Point(this.x-i.x,this.y-i.y)},times:function(i){return new t.Point(this.x*i,this.y*i)},divide:function(i){return new t.Point(this.x/i,this.y/i)},negate:function(){return new t.Point(-this.x,-this.y)},distanceTo:function(i){return Math.sqrt(Math.pow(this.x-i.x,2)+Math.pow(this.y-i.y,2))},squaredDistanceTo:function(i){return Math.pow(this.x-i.x,2)+Math.pow(this.y-i.y,2)},apply:function(i){return new t.Point(i(this.x),i(this.y))},equals:function(i){return i instanceof t.Point&&this.x===i.x&&this.y===i.y},rotate:function(i,r){r=r||new t.Point(0,0);var o,l;if(i%90===0){var s=t.positiveModulo(i,360);switch(s){case 0:o=1,l=0;break;case 90:o=0,l=1;break;case 180:o=-1,l=0;break;case 270:o=0,l=-1;break}}else{var a=i*Math.PI/180;o=Math.cos(a),l=Math.sin(a)}var u=o*(this.x-r.x)-l*(this.y-r.y)+r.x,c=l*(this.x-r.x)+o*(this.y-r.y)+r.y;return new t.Point(u,c)},toString:function(){return"("+Math.round(this.x*100)/100+","+Math.round(this.y*100)/100+")"}}}(n),function(t){t.TileSource=function(r,o,l,s,a,u){var c=this,f=arguments,h,p;if(t.isPlainObject(r)?h=r:h={width:f[0],height:f[1],tileSize:f[2],tileOverlap:f[3],minLevel:f[4],maxLevel:f[5]},t.EventSource.call(this),t.extend(!0,this,h),!this.success){for(p=0;p<arguments.length;p++)if(t.isFunction(arguments[p])){this.success=arguments[p];break}}this.success&&this.addHandler("ready",function(g){c.success(g)}),t.type(arguments[0])==="string"&&(this.url=arguments[0]),this.url?(this.aspectRatio=1,this.dimensions=new t.Point(10,10),this._tileWidth=0,this._tileHeight=0,this.tileOverlap=0,this.minLevel=0,this.maxLevel=0,this.ready=!1,this.getImageInfo(this.url)):(this.ready=!0,this.aspectRatio=h.width&&h.height?h.width/h.height:1,this.dimensions=new t.Point(h.width,h.height),this.tileSize?(this._tileWidth=this._tileHeight=this.tileSize,delete this.tileSize):(this.tileWidth?(this._tileWidth=this.tileWidth,delete this.tileWidth):this._tileWidth=0,this.tileHeight?(this._tileHeight=this.tileHeight,delete this.tileHeight):this._tileHeight=0),this.tileOverlap=h.tileOverlap?h.tileOverlap:0,this.minLevel=h.minLevel?h.minLevel:0,this.maxLevel=h.maxLevel!==void 0&&h.maxLevel!==null?h.maxLevel:h.width&&h.height?Math.ceil(Math.log(Math.max(h.width,h.height))/Math.log(2)):0,this.success&&t.isFunction(this.success)&&this.success(this))},t.TileSource.prototype={getTileSize:function(r){return t.console.error("[TileSource.getTileSize] is deprecated. Use TileSource.getTileWidth() and TileSource.getTileHeight() instead"),this._tileWidth},getTileWidth:function(r){return this._tileWidth?this._tileWidth:this.getTileSize(r)},getTileHeight:function(r){return this._tileHeight?this._tileHeight:this.getTileSize(r)},setMaxLevel:function(r){this.maxLevel=r,this._memoizeLevelScale()},getLevelScale:function(r){return this._memoizeLevelScale(),this.getLevelScale(r)},_memoizeLevelScale:function(){var r={},o;for(o=0;o<=this.maxLevel;o++)r[o]=1/Math.pow(2,this.maxLevel-o);this.getLevelScale=function(l){return r[l]}},getNumTiles:function(r){var o=this.getLevelScale(r),l=Math.ceil(o*this.dimensions.x/this.getTileWidth(r)),s=Math.ceil(o*this.dimensions.y/this.getTileHeight(r));return new t.Point(l,s)},getPixelRatio:function(r){var o=this.dimensions.times(this.getLevelScale(r)),l=1/o.x*t.pixelDensityRatio,s=1/o.y*t.pixelDensityRatio;return new t.Point(l,s)},getClosestLevel:function(){var r,o;for(r=this.minLevel+1;r<=this.maxLevel&&(o=this.getNumTiles(r),!(o.x>1||o.y>1));r++);return r-1},getTileAtPoint:function(r,o){var l=o.x>=0&&o.x<=1&&o.y>=0&&o.y<=1/this.aspectRatio;t.console.assert(l,"[TileSource.getTileAtPoint] must be called with a valid point.");var s=this.dimensions.x*this.getLevelScale(r),a=o.x*s,u=o.y*s,c=Math.floor(a/this.getTileWidth(r)),f=Math.floor(u/this.getTileHeight(r));o.x>=1&&(c=this.getNumTiles(r).x-1);var h=1e-15;return o.y>=1/this.aspectRatio-h&&(f=this.getNumTiles(r).y-1),new t.Point(c,f)},getTileBounds:function(r,o,l,s){var a=this.dimensions.times(this.getLevelScale(r)),u=this.getTileWidth(r),c=this.getTileHeight(r),f=o===0?0:u*o-this.tileOverlap,h=l===0?0:c*l-this.tileOverlap,p=u+(o===0?1:2)*this.tileOverlap,g=c+(l===0?1:2)*this.tileOverlap,y=1/a.x;return p=Math.min(p,a.x-f),g=Math.min(g,a.y-h),s?new t.Rect(0,0,p,g):new t.Rect(f*y,h*y,p*y,g*y)},getImageInfo:function(r){var o=this,l,s,a,u,c,f,h;r&&(c=r.split("/"),f=c[c.length-1],h=f.lastIndexOf("."),h>-1&&(c[c.length-1]=f.slice(0,h)));var p=null;if(this.splitHashDataForPost){var g=r.indexOf("#");g!==-1&&(p=r.substring(g+1),r=r.substr(0,g))}s=function(y){typeof y=="string"&&(y=t.parseXml(y));var T=t.TileSource.determineType(o,y,r);if(!T){o.raiseEvent("open-failed",{message:"Unable to load TileSource",source:r});return}u=T.prototype.configure.apply(o,[y,r,p]),u.ajaxWithCredentials===void 0&&(u.ajaxWithCredentials=o.ajaxWithCredentials),a=new T(u),o.ready=!0,o.raiseEvent("ready",{tileSource:a})},r.match(/\.js$/)?(l=r.split("/").pop().replace(".js",""),t.jsonp({url:r,async:!1,callbackName:l,callback:s})):t.makeAjaxRequest({url:r,postData:p,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(y){var T=i(y);s(T)},error:function(y,T){var v;try{v="HTTP "+y.status+" attempting to load TileSource: "+r}catch{var E;typeof T>"u"||!T.toString?E="Unknown error":E=T.toString(),v=E+" attempting to load TileSource: "+r}t.console.error(v),o.raiseEvent("open-failed",{message:v,source:r,postData:p})}})},supports:function(r,o){return!1},configure:function(r,o,l){throw new Error("Method not implemented.")},getTileUrl:function(r,o,l){throw new Error("Method not implemented.")},getTilePostData:function(r,o,l){return null},getTileAjaxHeaders:function(r,o,l){return{}},getTileHashKey:function(r,o,l,s,a,u){return a?s+"+"+JSON.stringify(a):s},tileExists:function(r,o,l){var s=this.getNumTiles(r);return r>=this.minLevel&&r<=this.maxLevel&&o>=0&&l>=0&&o<s.x&&l<s.y}},t.extend(!0,t.TileSource.prototype,t.EventSource.prototype);function i(r){var o=r.responseText,l=r.status,s,a;if(r){if(r.status!==200&&r.status!==0)throw l=r.status,s=l===404?"Not Found":r.statusText,new Error(t.getString("Errors.Status",l,s))}else throw new Error(t.getString("Errors.Security"));if(o.match(/\s*<.*/))try{a=r.responseXML&&r.responseXML.documentElement?r.responseXML:t.parseXml(o)}catch{a=r.responseText}else if(o.match(/\s*[{[].*/))try{a=t.parseJSON(o)}catch{a=o}else a=o;return a}t.TileSource.determineType=function(r,o,l){var s;for(s in n)if(s.match(/.+TileSource$/)&&t.isFunction(n[s])&&t.isFunction(n[s].prototype.supports)&&n[s].prototype.supports.call(r,o,l))return n[s];return t.console.error("No TileSource was able to open %s %s",l,o),null}}(n),function(t){t.DziTileSource=function(o,l,s,a,u,c,f,h,p){var g,y,T,v;if(t.isPlainObject(o)?v=o:v={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4],fileFormat:arguments[5],displayRects:arguments[6],minLevel:arguments[7],maxLevel:arguments[8]},this._levelRects={},this.tilesUrl=v.tilesUrl,this.fileFormat=v.fileFormat,this.displayRects=v.displayRects,this.displayRects)for(g=this.displayRects.length-1;g>=0;g--)for(y=this.displayRects[g],T=y.minLevel;T<=y.maxLevel;T++)this._levelRects[T]||(this._levelRects[T]=[]),this._levelRects[T].push(y);t.TileSource.apply(this,[v])},t.extend(t.DziTileSource.prototype,t.TileSource.prototype,{supports:function(o,l){var s;return o.Image?s=o.Image.xmlns:o.documentElement&&(o.documentElement.localName==="Image"||o.documentElement.tagName==="Image")&&(s=o.documentElement.namespaceURI),s=(s||"").toLowerCase(),s.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||s.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(o,l,s){var a;return t.isPlainObject(o)?a=r(this,o):a=i(this,o),l&&!a.tilesUrl&&(a.tilesUrl=l.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),l.search(/\.(dzi|xml|js)\?/)!==-1?a.queryParams=l.match(/\?.*/):a.queryParams=""),a},getTileUrl:function(o,l,s){return[this.tilesUrl,o,"/",l,"_",s,".",this.fileFormat,this.queryParams].join("")},tileExists:function(o,l,s){var a=this._levelRects[o],u,c,f,h,p,g,y;if(this.minLevel&&o<this.minLevel||this.maxLevel&&o>this.maxLevel)return!1;if(!a||!a.length)return!0;for(y=a.length-1;y>=0;y--)if(u=a[y],!(o<u.minLevel||o>u.maxLevel)&&(c=this.getLevelScale(o),f=u.x*c,h=u.y*c,p=f+u.width*c,g=h+u.height*c,f=Math.floor(f/this._tileWidth),h=Math.floor(h/this._tileWidth),p=Math.ceil(p/this._tileWidth),g=Math.ceil(g/this._tileWidth),f<=l&&l<p&&h<=s&&s<g))return!0;return!1}});function i(o,l){if(!l||!l.documentElement)throw new Error(t.getString("Errors.Xml"));var s=l.documentElement,a=s.localName||s.tagName,u=l.documentElement.namespaceURI,c=null,f=[],h,p,g,y,T;if(a==="Image")try{if(y=s.getElementsByTagName("Size")[0],y===void 0&&(y=s.getElementsByTagNameNS(u,"Size")[0]),c={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:s.getAttribute("Url"),Format:s.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(s.getAttribute("Overlap"),10),TileSize:parseInt(s.getAttribute("TileSize"),10),Size:{Height:parseInt(y.getAttribute("Height"),10),Width:parseInt(y.getAttribute("Width"),10)}}},!t.imageFormatSupported(c.Image.Format))throw new Error(t.getString("Errors.ImageFormat",c.Image.Format.toUpperCase()));for(h=s.getElementsByTagName("DisplayRect"),h===void 0&&(h=s.getElementsByTagNameNS(u,"DisplayRect")[0]),T=0;T<h.length;T++)p=h[T],g=p.getElementsByTagName("Rect")[0],g===void 0&&(g=p.getElementsByTagNameNS(u,"Rect")[0]),f.push({Rect:{X:parseInt(g.getAttribute("X"),10),Y:parseInt(g.getAttribute("Y"),10),Width:parseInt(g.getAttribute("Width"),10),Height:parseInt(g.getAttribute("Height"),10),MinLevel:parseInt(p.getAttribute("MinLevel"),10),MaxLevel:parseInt(p.getAttribute("MaxLevel"),10)}});return f.length&&(c.Image.DisplayRect=f),r(o,c)}catch(O){throw O instanceof Error?O:new Error(t.getString("Errors.Dzi"))}else{if(a==="Collection")throw new Error(t.getString("Errors.Dzc"));if(a==="Error"){var v=s.getElementsByTagName("Message")[0],E=v.firstChild.nodeValue;throw new Error(E)}}throw new Error(t.getString("Errors.Dzi"))}function r(o,l){var s=l.Image,a=s.Url,u=s.Format,c=s.Size,f=s.DisplayRect||[],h=parseInt(c.Width,10),p=parseInt(c.Height,10),g=parseInt(s.TileSize,10),y=parseInt(s.Overlap,10),T=[],v,E;for(E=0;E<f.length;E++)v=f[E].Rect,T.push(new t.DisplayRect(parseInt(v.X,10),parseInt(v.Y,10),parseInt(v.Width,10),parseInt(v.Height,10),parseInt(v.MinLevel,10),parseInt(v.MaxLevel,10)));return t.extend(!0,{width:h,height:p,tileSize:g,tileOverlap:y,minLevel:null,maxLevel:null,tilesUrl:a,fileFormat:u,displayRects:T},l)}}(n),function(t){t.IIIFTileSource=function(s){if(t.extend(!0,this,s),!(this.height&&this.width&&this["@id"]))throw new Error("IIIF required parameters not provided.");if(s.tileSizePerScaleFactor={},this.tileFormat=this.tileFormat||"jpg",this.version=s.version,this.tile_width&&this.tile_height)s.tileWidth=this.tile_width,s.tileHeight=this.tile_height;else if(this.tile_width)s.tileSize=this.tile_width;else if(this.tile_height)s.tileSize=this.tile_height;else if(this.tiles)if(this.tiles.length===1)s.tileWidth=this.tiles[0].width,s.tileHeight=this.tiles[0].height||this.tiles[0].width,this.scale_factors=this.tiles[0].scaleFactors;else{this.scale_factors=[];for(var a=0;a<this.tiles.length;a++)for(var u=0;u<this.tiles[a].scaleFactors.length;u++){var c=this.tiles[a].scaleFactors[u];this.scale_factors.push(c),s.tileSizePerScaleFactor[c]={width:this.tiles[a].width,height:this.tiles[a].height||this.tiles[a].width}}}else if(i(s)){for(var f=Math.min(this.height,this.width),h=[256,512,1024],p=[],g=0;g<h.length;g++)h[g]<=f&&p.push(h[g]);p.length>0?s.tileSize=Math.max.apply(null,p):s.tileSize=f}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,s.levels=r(this),t.extend(!0,s,{width:s.levels[s.levels.length-1].width,height:s.levels[s.levels.length-1].height,tileSize:Math.max(s.height,s.width),tileOverlap:0,minLevel:0,maxLevel:s.levels.length-1}),this.levels=s.levels):t.console.error("Nothing in the info.json to construct image pyramids from");if(!s.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)s.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));else{var y=Math.max.apply(null,this.scale_factors);s.maxLevel=Math.round(Math.log(y)*Math.LOG2E)}t.TileSource.apply(this,[s])},t.extend(t.IIIFTileSource.prototype,t.TileSource.prototype,{supports:function(s,a){return s.protocol&&s.protocol==="http://iiif.io/api/image"||s["@context"]&&(s["@context"]==="http://library.stanford.edu/iiif/image-api/1.1/context.json"||s["@context"]==="http://iiif.io/api/image/1/context.json")||s.profile&&s.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||s.identifier&&s.width&&s.height?!0:!!(s.documentElement&&s.documentElement.tagName==="info"&&s.documentElement.namespaceURI==="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(s,a,u){if(t.isPlainObject(s)){if(!s["@context"])s["@context"]="http://iiif.io/api/image/1.0/context.json",s["@id"]=a.replace("/info.json",""),s.version=1;else{var f=s["@context"];if(Array.isArray(f)){for(var h=0;h<f.length;h++)if(typeof f[h]=="string"&&(/^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(f[h])||f[h]==="http://library.stanford.edu/iiif/image-api/1.1/context.json")){f=f[h];break}}switch(f){case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":s.version=1;break;case"http://iiif.io/api/image/2/context.json":s.version=2;break;case"http://iiif.io/api/image/3/context.json":s.version=3;break;default:t.console.error("Data has a @context property which contains no known IIIF context URI.")}}if(!s["@id"]&&s.id&&(s["@id"]=s.id),s.preferredFormats){for(var p=0;p<s.preferredFormats.length;p++)if(n.imageFormatSupported(s.preferredFormats[p])){s.tileFormat=s.preferredFormats[p];break}}return s}else{var c=o(s);return c["@context"]="http://iiif.io/api/image/1.0/context.json",c["@id"]=a.replace("/info.xml",""),c.version=1,c}},getTileWidth:function(s){if(this.emulateLegacyImagePyramid)return t.TileSource.prototype.getTileWidth.call(this,s);var a=Math.pow(2,this.maxLevel-s);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[a]?this.tileSizePerScaleFactor[a].width:this._tileWidth},getTileHeight:function(s){if(this.emulateLegacyImagePyramid)return t.TileSource.prototype.getTileHeight.call(this,s);var a=Math.pow(2,this.maxLevel-s);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[a]?this.tileSizePerScaleFactor[a].height:this._tileHeight},getLevelScale:function(s){if(this.emulateLegacyImagePyramid){var a=NaN;return this.levels.length>0&&s>=this.minLevel&&s<=this.maxLevel&&(a=this.levels[s].width/this.levels[this.maxLevel].width),a}return t.TileSource.prototype.getLevelScale.call(this,s)},getNumTiles:function(s){if(this.emulateLegacyImagePyramid){var a=this.getLevelScale(s);return a?new t.Point(1,1):new t.Point(0,0)}return t.TileSource.prototype.getNumTiles.call(this,s)},getTileAtPoint:function(s,a){return this.emulateLegacyImagePyramid?new t.Point(0,0):t.TileSource.prototype.getTileAtPoint.call(this,s,a)},getTileUrl:function(s,a,u){if(this.emulateLegacyImagePyramid){var c=null;return this.levels.length>0&&s>=this.minLevel&&s<=this.maxLevel&&(c=this.levels[s].url),c}var f="0",h=Math.pow(.5,this.maxLevel-s),p=Math.ceil(this.width*h),g=Math.ceil(this.height*h),y,T,v,E,O,P,D,H,M,B,R,V,$,N;return y=this.getTileWidth(s),T=this.getTileHeight(s),v=Math.ceil(y/h),E=Math.ceil(T/h),this.version===1?$="native."+this.tileFormat:$="default."+this.tileFormat,p<y&&g<T?(this.version===2&&p===this.width?B="full":this.version===3&&p===this.width&&g===this.height?B="max":this.version===3?B=p+","+g:B=p+",",O="full"):(P=a*v,D=u*E,H=Math.min(v,this.width-P),M=Math.min(E,this.height-D),a===0&&u===0&&H===this.width&&M===this.height?O="full":O=[P,D,H,M].join(","),R=Math.ceil(H*h),V=Math.ceil(M*h),this.version===2&&R===this.width?B="full":this.version===3&&R===this.width&&V===this.height?B="max":this.version===3?B=R+","+V:B=R+","),N=[this["@id"],O,B,f,$].join("/"),N},__testonly__:{canBeTiled:i,constructLevels:r}});function i(s){var a=["http://library.stanford.edu/iiif/image-api/compliance.html#level0","http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0","http://iiif.io/api/image/2/level0.json","level0","https://iiif.io/api/image/3/level0.json"],u=Array.isArray(s.profile)?s.profile[0]:s.profile,c=a.indexOf(u)!==-1,f=!1;return s.version===2&&s.profile.length>1&&s.profile[1].supports&&(f=s.profile[1].supports.indexOf("sizeByW")!==-1),s.version===3&&s.extraFeatures&&(f=s.extraFeatures.indexOf("sizeByWh")!==-1),!c||f}function r(s){for(var a=[],u=0;u<s.sizes.length;u++)a.push({url:s["@id"]+"/full/"+s.sizes[u].width+","+(s.version===3?s.sizes[u].height:"")+"/0/default."+s.tileFormat,width:s.sizes[u].width,height:s.sizes[u].height});return a.sort(function(c,f){return c.width-f.width})}function o(s){if(!s||!s.documentElement)throw new Error(t.getString("Errors.Xml"));var a=s.documentElement,u=a.tagName,c=null;if(u==="info")try{return c={},l(a,c),c}catch(f){throw f instanceof Error?f:new Error(t.getString("Errors.IIIF"))}throw new Error(t.getString("Errors.IIIF"))}function l(s,a,u){var c,f;if(s.nodeType===3&&u)f=s.nodeValue.trim(),f.match(/^\d*$/)&&(f=Number(f)),a[u]?(t.isArray(a[u])||(a[u]=[a[u]]),a[u].push(f)):a[u]=f;else if(s.nodeType===1)for(c=0;c<s.childNodes.length;c++)l(s.childNodes[c],a,s.nodeName)}}(n),function(t){t.OsmTileSource=function(i,r,o,l,s){var a;t.isPlainObject(i)?a=i:a={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]},(!a.width||!a.height)&&(a.width=65572864,a.height=65572864),a.tileSize||(a.tileSize=256,a.tileOverlap=0),a.tilesUrl||(a.tilesUrl="http://tile.openstreetmap.org/"),a.minLevel=8,t.TileSource.apply(this,[a])},t.extend(t.OsmTileSource.prototype,t.TileSource.prototype,{supports:function(i,r){return i.type&&i.type==="openstreetmaps"},configure:function(i,r,o){return i},getTileUrl:function(i,r,o){return this.tilesUrl+(i-8)+"/"+r+"/"+o+".png"}})}(n),function(t){t.TmsTileSource=function(i,r,o,l,s){var a;t.isPlainObject(i)?a=i:a={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]};var u=Math.ceil(a.width/256)*256,c=Math.ceil(a.height/256)*256,f;u>c?f=u/256:f=c/256,a.maxLevel=Math.ceil(Math.log(f)/Math.log(2))-1,a.tileSize=256,a.width=u,a.height=c,t.TileSource.apply(this,[a])},t.extend(t.TmsTileSource.prototype,t.TileSource.prototype,{supports:function(i,r){return i.type&&i.type==="tiledmapservice"},configure:function(i,r,o){return i},getTileUrl:function(i,r,o){var l=this.getNumTiles(i).y-1;return this.tilesUrl+i+"/"+r+"/"+(l-o)+".png"}})}(n),function(t){t.ZoomifyTileSource=function(i){typeof i.tileSize>"u"&&(i.tileSize=256),typeof i.fileFormat>"u"&&(i.fileFormat="jpg",this.fileFormat=i.fileFormat);var r={x:i.width,y:i.height};for(i.imageSizes=[{x:i.width,y:i.height}],i.gridSize=[this._getGridSize(i.width,i.height,i.tileSize)];parseInt(r.x,10)>i.tileSize||parseInt(r.y,10)>i.tileSize;)r.x=Math.floor(r.x/2),r.y=Math.floor(r.y/2),i.imageSizes.push({x:r.x,y:r.y}),i.gridSize.push(this._getGridSize(r.x,r.y,i.tileSize));i.imageSizes.reverse(),i.gridSize.reverse(),i.minLevel=0,i.maxLevel=i.gridSize.length-1,n.TileSource.apply(this,[i])},t.extend(t.ZoomifyTileSource.prototype,t.TileSource.prototype,{_getGridSize:function(i,r,o){return{x:Math.ceil(i/o),y:Math.ceil(r/o)}},_calculateAbsoluteTileNumber:function(i,r,o){for(var l=0,s={},a=0;a<i;a++)s=this.gridSize[a],l+=s.x*s.y;return s=this.gridSize[i],l+=s.x*o+r,l},supports:function(i,r){return i.type&&i.type==="zoomifytileservice"},configure:function(i,r,o){return i},getTileUrl:function(i,r,o){var l=0,s=this._calculateAbsoluteTileNumber(i,r,o);return l=Math.floor(s/256),this.tilesUrl+"TileGroup"+l+"/"+i+"-"+r+"-"+o+"."+this.fileFormat}})}(n),function(t){t.LegacyTileSource=function(l){var s,a,u;t.isArray(l)&&(s={type:"legacy-image-pyramid",levels:l}),s.levels=i(s.levels),s.levels.length>0?(a=s.levels[s.levels.length-1].width,u=s.levels[s.levels.length-1].height):(a=0,u=0,t.console.error("No supported image formats found")),t.extend(!0,s,{width:a,height:u,tileSize:Math.max(u,a),tileOverlap:0,minLevel:0,maxLevel:s.levels.length>0?s.levels.length-1:0}),t.TileSource.apply(this,[s]),this.levels=s.levels},t.extend(t.LegacyTileSource.prototype,t.TileSource.prototype,{supports:function(l,s){return l.type&&l.type==="legacy-image-pyramid"||l.documentElement&&l.documentElement.getAttribute("type")==="legacy-image-pyramid"},configure:function(l,s,a){var u;return t.isPlainObject(l)?u=o(this,l):u=r(this,l),u},getLevelScale:function(l){var s=NaN;return this.levels.length>0&&l>=this.minLevel&&l<=this.maxLevel&&(s=this.levels[l].width/this.levels[this.maxLevel].width),s},getNumTiles:function(l){var s=this.getLevelScale(l);return s?new t.Point(1,1):new t.Point(0,0)},getTileUrl:function(l,s,a){var u=null;return this.levels.length>0&&l>=this.minLevel&&l<=this.maxLevel&&(u=this.levels[l].url),u}});function i(l){var s=[],a,u;for(u=0;u<l.length;u++)a=l[u],a.height&&a.width&&a.url?s.push({url:a.url,width:Number(a.width),height:Number(a.height)}):t.console.error("Unsupported image format: %s",a.url?a.url:"<no URL>");return s.sort(function(c,f){return c.height-f.height})}function r(l,s){if(!s||!s.documentElement)throw new Error(t.getString("Errors.Xml"));var a=s.documentElement,u=a.tagName,c=null,f=[],h,p;if(u==="image")try{for(c={type:a.getAttribute("type"),levels:[]},f=a.getElementsByTagName("level"),p=0;p<f.length;p++)h=f[p],c.levels.push({url:h.getAttribute("url"),width:parseInt(h.getAttribute("width"),10),height:parseInt(h.getAttribute("height"),10)});return o(l,c)}catch(g){throw g instanceof Error?g:new Error("Unknown error parsing Legacy Image Pyramid XML.")}else{if(u==="collection")throw new Error("Legacy Image Pyramid Collections not yet supported.");if(u==="error")throw new Error("Error: "+s)}throw new Error("Unknown element "+u)}function o(l,s){return s.levels}}(n),function(t){t.ImageTileSource=function(i){i=t.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},i),t.TileSource.apply(this,[i])},t.extend(t.ImageTileSource.prototype,t.TileSource.prototype,{supports:function(i,r){return i.type&&i.type==="image"},configure:function(i,r,o){return i},getImageInfo:function(i){var r=this._image=new Image,o=this;this.crossOriginPolicy&&(r.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(r.useCredentials=this.ajaxWithCredentials),t.addEvent(r,"load",function(){o.width=r.naturalWidth,o.height=r.naturalHeight,o.aspectRatio=o.width/o.height,o.dimensions=new t.Point(o.width,o.height),o._tileWidth=o.width,o._tileHeight=o.height,o.tileOverlap=0,o.minLevel=0,o.levels=o._buildLevels(),o.maxLevel=o.levels.length-1,o.ready=!0,o.raiseEvent("ready",{tileSource:o})}),t.addEvent(r,"error",function(){o.raiseEvent("open-failed",{message:"Error loading image at "+i,source:i})}),r.src=i},getLevelScale:function(i){var r=NaN;return i>=this.minLevel&&i<=this.maxLevel&&(r=this.levels[i].width/this.levels[this.maxLevel].width),r},getNumTiles:function(i){var r=this.getLevelScale(i);return r?new t.Point(1,1):new t.Point(0,0)},getTileUrl:function(i,r,o){var l=null;return i>=this.minLevel&&i<=this.maxLevel&&(l=this.levels[i].url),l},getContext2D:function(i,r,o){var l=null;return i>=this.minLevel&&i<=this.maxLevel&&(l=this.levels[i].context2D),l},destroy:function(){this._freeupCanvasMemory()},_buildLevels:function(){var i=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!t.supportsCanvas||!this.useCanvas)return delete this._image,i;var r=this._image.naturalWidth,o=this._image.naturalHeight,l=document.createElement("canvas"),s=l.getContext("2d");if(l.width=r,l.height=o,s.drawImage(this._image,0,0,r,o),i[0].context2D=s,delete this._image,t.isCanvasTainted(l))return i;for(;r>=2&&o>=2;){r=Math.floor(r/2),o=Math.floor(o/2);var a=document.createElement("canvas"),u=a.getContext("2d");a.width=r,a.height=o,u.drawImage(l,0,0,r,o),i.splice(0,0,{context2D:u,width:r,height:o}),l=a,s=u}return i},_freeupCanvasMemory:function(){for(var i=0;i<this.levels.length;i++)this.levels[i].context2D&&(this.levels[i].context2D.canvas.height=0,this.levels[i].context2D.canvas.width=0)}})}(n),function(t){t.TileSourceCollection=function(i,r,o,l){t.console.error("TileSourceCollection is deprecated; use World instead")}}(n),function(t){t.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},t.Button=function(u){var c=this;t.EventSource.call(this),t.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:t.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:t.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null,userData:null},u),this.element=u.element||t.makeNeutralElement("div"),u.element||(this.imgRest=t.makeTransparentImage(this.srcRest),this.imgGroup=t.makeTransparentImage(this.srcGroup),this.imgHover=t.makeTransparentImage(this.srcHover),this.imgDown=t.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,t.setElementPointerEventsNone(this.imgRest),t.setElementPointerEventsNone(this.imgGroup),t.setElementPointerEventsNone(this.imgHover),t.setElementPointerEventsNone(this.imgDown),this.element.style.position="relative",t.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",t.Browser.vendor===t.BROWSERS.FIREFOX&&t.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=t.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 t.MouseTracker({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(f){f.insideElementPressed?(s(c,t.ButtonState.DOWN),c.raiseEvent("enter",{originalEvent:f.originalEvent})):f.buttonDownAny||s(c,t.ButtonState.HOVER)},focusHandler:function(f){c.tracker.enterHandler(f),c.raiseEvent("focus",{originalEvent:f.originalEvent})},leaveHandler:function(f){a(c,t.ButtonState.GROUP),f.insideElementPressed&&c.raiseEvent("exit",{originalEvent:f.originalEvent})},blurHandler:function(f){c.tracker.leaveHandler(f),c.raiseEvent("blur",{originalEvent:f.originalEvent})},pressHandler:function(f){s(c,t.ButtonState.DOWN),c.raiseEvent("press",{originalEvent:f.originalEvent})},releaseHandler:function(f){f.insideElementPressed&&f.insideElementReleased?(a(c,t.ButtonState.HOVER),c.raiseEvent("release",{originalEvent:f.originalEvent})):f.insideElementPressed?a(c,t.ButtonState.GROUP):s(c,t.ButtonState.HOVER)},clickHandler:function(f){f.quick&&c.raiseEvent("click",{originalEvent:f.originalEvent})},keyHandler:function(f){f.keyCode===13?(c.raiseEvent("click",{originalEvent:f.originalEvent}),c.raiseEvent("release",{originalEvent:f.originalEvent}),f.preventDefault=!0):f.preventDefault=!1}}),a(this,t.ButtonState.REST)},t.extend(t.Button.prototype,t.EventSource.prototype,{notifyGroupEnter:function(){s(this,t.ButtonState.GROUP)},notifyGroupExit:function(){a(this,t.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,t.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,t.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()},destroy:function(){this.imgRest&&(this.element.removeChild(this.imgRest),this.imgRest=null),this.imgGroup&&(this.element.removeChild(this.imgGroup),this.imgGroup=null),this.imgHover&&(this.element.removeChild(this.imgHover),this.imgHover=null),this.imgDown&&(this.element.removeChild(this.imgDown),this.imgDown=null),this.removeAllHandlers(),this.tracker.destroy(),this.element=null}});function i(u){t.requestAnimationFrame(function(){r(u)})}function r(u){var c,f,h;u.shouldFade&&(c=t.now(),f=c-u.fadeBeginTime,h=1-f/u.fadeLength,h=Math.min(1,h),h=Math.max(0,h),u.imgGroup&&t.setElementOpacity(u.imgGroup,h,!0),h>0&&i(u))}function o(u){u.shouldFade=!0,u.fadeBeginTime=t.now()+u.fadeDelay,window.setTimeout(function(){i(u)},u.fadeDelay)}function l(u){u.shouldFade=!1,u.imgGroup&&t.setElementOpacity(u.imgGroup,1,!0)}function s(u,c){u.element.disabled||(c>=t.ButtonState.GROUP&&u.currentState===t.ButtonState.REST&&(l(u),u.currentState=t.ButtonState.GROUP),c>=t.ButtonState.HOVER&&u.currentState===t.ButtonState.GROUP&&(u.imgHover&&(u.imgHover.style.visibility=""),u.currentState=t.ButtonState.HOVER),c>=t.ButtonState.DOWN&&u.currentState===t.ButtonState.HOVER&&(u.imgDown&&(u.imgDown.style.visibility=""),u.currentState=t.ButtonState.DOWN))}function a(u,c){u.element.disabled||(c<=t.ButtonState.HOVER&&u.currentState===t.ButtonState.DOWN&&(u.imgDown&&(u.imgDown.style.visibility="hidden"),u.currentState=t.ButtonState.HOVER),c<=t.ButtonState.GROUP&&u.currentState===t.ButtonState.HOVER&&(u.imgHover&&(u.imgHover.style.visibility="hidden"),u.currentState=t.ButtonState.GROUP),c<=t.ButtonState.REST&&u.currentState===t.ButtonState.GROUP&&(o(u),u.currentState=t.ButtonState.REST))}}(n),function(t){t.ButtonGroup=function(i){t.extend(!0,this,{buttons:[],clickTimeThreshold:t.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:t.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},i);var r=this.buttons.concat([]),o=this,l;if(this.element=i.element||t.makeNeutralElement("div"),!i.group)for(this.element.style.display="inline-block",l=0;l<r.length;l++)this.element.appendChild(r[l].element);t.setElementTouchActionNone(this.element),this.tracker=new t.MouseTracker({userData:"ButtonGroup.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(s){var a;for(a=0;a<o.buttons.length;a++)o.buttons[a].notifyGroupEnter()},leaveHandler:function(s){var a;if(!s.insideElementPressed)for(a=0;a<o.buttons.length;a++)o.buttons[a].notifyGroupExit()}})},t.ButtonGroup.prototype={emulateEnter:function(){this.tracker.enterHandler({eventSource:this.tracker})},emulateLeave:function(){this.tracker.leaveHandler({eventSource:this.tracker})},destroy:function(){for(;this.buttons.length;){var i=this.buttons.pop();this.element.removeChild(i.element),i.destroy()}this.tracker.destroy(),this.element=null}}}(n),function(t){t.Rect=function(i,r,o,l,s){this.x=typeof i=="number"?i:0,this.y=typeof r=="number"?r:0,this.width=typeof o=="number"?o:0,this.height=typeof l=="number"?l:0,this.degrees=typeof s=="number"?s:0,this.degrees=t.positiveModulo(this.degrees,360);var a,u;this.degrees>=270?(a=this.getTopRight(),this.x=a.x,this.y=a.y,u=this.height,this.height=this.width,this.width=u,this.degrees-=270):this.degrees>=180?(a=this.getBottomRight(),this.x=a.x,this.y=a.y,this.degrees-=180):this.degrees>=90&&(a=this.getBottomLeft(),this.x=a.x,this.y=a.y,u=this.height,this.height=this.width,this.width=u,this.degrees-=90)},t.Rect.fromSummits=function(i,r,o){var l=i.distanceTo(r),s=i.distanceTo(o),a=r.minus(i),u=Math.atan(a.y/a.x);return a.x<0?u+=Math.PI:a.y<0&&(u+=2*Math.PI),new t.Rect(i.x,i.y,l,s,u/Math.PI*180)},t.Rect.prototype={clone:function(){return new t.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new t.Point(this.x,this.y)},getBottomRight:function(){return new t.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new t.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new t.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new t.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new t.Point(this.width,this.height)},equals:function(i){return i instanceof t.Rect&&this.x===i.x&&this.y===i.y&&this.width===i.width&&this.height===i.height&&this.degrees===i.degrees},times:function(i){return new t.Rect(this.x*i,this.y*i,this.width*i,this.height*i,this.degrees)},translate:function(i){return new t.Rect(this.x+i.x,this.y+i.y,this.width,this.height,this.degrees)},union:function(i){var r=this.getBoundingBox(),o=i.getBoundingBox(),l=Math.min(r.x,o.x),s=Math.min(r.y,o.y),a=Math.max(r.x+r.width,o.x+o.width),u=Math.max(r.y+r.height,o.y+o.height);return new t.Rect(l,s,a-l,u-s)},intersection:function(i){var r=1e-10,o=[],l=this.getTopLeft();i.containsPoint(l,r)&&o.push(l);var s=this.getTopRight();i.containsPoint(s,r)&&o.push(s);var a=this.getBottomLeft();i.containsPoint(a,r)&&o.push(a);var u=this.getBottomRight();i.containsPoint(u,r)&&o.push(u);var c=i.getTopLeft();this.containsPoint(c,r)&&o.push(c);var f=i.getTopRight();this.containsPoint(f,r)&&o.push(f);var h=i.getBottomLeft();this.containsPoint(h,r)&&o.push(h);var p=i.getBottomRight();this.containsPoint(p,r)&&o.push(p);for(var g=this._getSegments(),y=i._getSegments(),T=0;T<g.length;T++)for(var v=g[T],E=0;E<y.length;E++){var O=y[E],P=D(v[0],v[1],O[0],O[1]);P&&o.push(P)}function D(N,re,Z,le){var oe=re.minus(N),pe=le.minus(Z),_e=-pe.x*oe.y+oe.x*pe.y;if(_e===0)return null;var Fe=(oe.x*(N.y-Z.y)-oe.y*(N.x-Z.x))/_e,ge=(pe.x*(N.y-Z.y)-pe.y*(N.x-Z.x))/_e;return-r<=Fe&&Fe<=1-r&&-r<=ge&&ge<=1-r?new t.Point(N.x+ge*oe.x,N.y+ge*oe.y):null}if(o.length===0)return null;for(var H=o[0].x,M=o[0].x,B=o[0].y,R=o[0].y,V=1;V<o.length;V++){var $=o[V];$.x<H&&(H=$.x),$.x>M&&(M=$.x),$.y<B&&(B=$.y),$.y>R&&(R=$.y)}return new t.Rect(H,B,M-H,R-B)},_getSegments:function(){var i=this.getTopLeft(),r=this.getTopRight(),o=this.getBottomLeft(),l=this.getBottomRight();return[[i,r],[r,l],[l,o],[o,i]]},rotate:function(i,r){if(i=t.positiveModulo(i,360),i===0)return this.clone();r=r||this.getCenter();var o=this.getTopLeft().rotate(i,r),l=this.getTopRight().rotate(i,r),s=l.minus(o);s=s.apply(function(u){var c=1e-15;return Math.abs(u)<c?0:u});var a=Math.atan(s.y/s.x);return s.x<0?a+=Math.PI:s.y<0&&(a+=2*Math.PI),new t.Rect(o.x,o.y,this.width,this.height,a/Math.PI*180)},getBoundingBox:function(){if(this.degrees===0)return this.clone();var i=this.getTopLeft(),r=this.getTopRight(),o=this.getBottomLeft(),l=this.getBottomRight(),s=Math.min(i.x,r.x,o.x,l.x),a=Math.max(i.x,r.x,o.x,l.x),u=Math.min(i.y,r.y,o.y,l.y),c=Math.max(i.y,r.y,o.y,l.y);return new t.Rect(s,u,a-s,c-u)},getIntegerBoundingBox:function(){var i=this.getBoundingBox(),r=Math.floor(i.x),o=Math.floor(i.y),l=Math.ceil(i.width+i.x-r),s=Math.ceil(i.height+i.y-o);return new t.Rect(r,o,l,s)},containsPoint:function(i,r){r=r||0;var o=this.getTopLeft(),l=this.getTopRight(),s=this.getBottomLeft(),a=l.minus(o),u=s.minus(o);return(i.x-o.x)*a.x+(i.y-o.y)*a.y>=-r&&(i.x-l.x)*a.x+(i.y-l.y)*a.y<=r&&(i.x-o.x)*u.x+(i.y-o.y)*u.y>=-r&&(i.x-s.x)*u.x+(i.y-s.y)*u.y<=r},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]"}}}(n),function(t){var i={};t.ReferenceStrip=function(h){var p=this,g=h.viewer,y=t.getElementSize(g.element),T,v,E;for(h.id||(h.id="referencestrip-"+t.now(),this.element=t.makeNeutralElement("div"),this.element.id=h.id,this.element.className="referencestrip"),h=t.extend(!0,{sizeRatio:t.DEFAULT_SETTINGS.referenceStripSizeRatio,position:t.DEFAULT_SETTINGS.referenceStripPosition,scroll:t.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:t.DEFAULT_SETTINGS.clickTimeThreshold},h,{element:this.element}),t.extend(this,h),i[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,this.element.tabIndex=0,v=this.element.style,v.marginTop="0px",v.marginRight="0px",v.marginBottom="0px",v.marginLeft="0px",v.left="0px",v.bottom="0px",v.border="0px",v.background="#000",v.position="relative",t.setElementTouchActionNone(this.element),t.setElementOpacity(this.element,.8),this.viewer=g,this.tracker=new t.MouseTracker({userData:"ReferenceStrip.tracker",element:this.element,clickHandler:t.delegate(this,r),dragHandler:t.delegate(this,o),scrollHandler:t.delegate(this,l),enterHandler:t.delegate(this,a),leaveHandler:t.delegate(this,u),keyDownHandler:t.delegate(this,c),keyHandler:t.delegate(this,f),preProcessEventHandler:function(O){O.eventType==="wheel"&&(O.preventDefault=!0)}}),h.width&&h.height?(this.element.style.width=h.width+"px",this.element.style.height=h.height+"px",g.addControl(this.element,{anchor:t.ControlAnchor.BOTTOM_LEFT})):h.scroll==="horizontal"?(this.element.style.width=y.x*h.sizeRatio*g.tileSources.length+12*g.tileSources.length+"px",this.element.style.height=y.y*h.sizeRatio+"px",g.addControl(this.element,{anchor:t.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=y.y*h.sizeRatio*g.tileSources.length+12*g.tileSources.length+"px",this.element.style.width=y.x*h.sizeRatio+"px",g.addControl(this.element,{anchor:t.ControlAnchor.TOP_LEFT})),this.panelWidth=y.x*this.sizeRatio+8,this.panelHeight=y.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},E=0;E<g.tileSources.length;E++)T=t.makeNeutralElement("div"),T.id=this.element.id+"-"+E,T.style.width=p.panelWidth+"px",T.style.height=p.panelHeight+"px",T.style.display="inline",T.style.float="left",T.style.cssFloat="left",T.style.styleFloat="left",T.style.padding="2px",t.setElementTouchActionNone(T),t.setElementPointerEventsNone(T),this.element.appendChild(T),T.activePanel=!1,this.panels.push(T);s(this,this.scroll==="vertical"?y.y:y.x,0),this.setFocus(0)},t.ReferenceStrip.prototype={setFocus:function(h){var p=this.element.querySelector("#"+this.element.id+"-"+h),g=t.getElementSize(this.viewer.canvas),y=Number(this.element.style.width.replace("px","")),T=Number(this.element.style.height.replace("px","")),v=-Number(this.element.style.marginLeft.replace("px","")),E=-Number(this.element.style.marginTop.replace("px","")),O;this.currentSelected!==p&&(this.currentSelected&&(this.currentSelected.style.background="#000"),this.currentSelected=p,this.currentSelected.style.background="#999",this.scroll==="horizontal"?(O=Number(h)*(this.panelWidth+3),O>v+g.x-this.panelWidth?(O=Math.min(O,y-g.x),this.element.style.marginLeft=-O+"px",s(this,g.x,-O)):O<v&&(O=Math.max(0,O-g.x/2),this.element.style.marginLeft=-O+"px",s(this,g.x,-O))):(O=Number(h)*(this.panelHeight+3),O>E+g.y-this.panelHeight?(O=Math.min(O,T-g.y),this.element.style.marginTop=-O+"px",s(this,g.y,-O)):O<E&&(O=Math.max(0,O-g.y/2),this.element.style.marginTop=-O+"px",s(this,g.y,-O))),this.currentPage=h,a.call(this,{eventSource:this.tracker}))},update:function(){return!!i[this.id].animating},destroy:function(){if(this.miniViewers)for(var h in this.miniViewers)this.miniViewers[h].destroy();this.tracker.destroy(),this.element&&this.viewer.removeControl(this.element)}};function r(h){if(h.quick){var p;this.scroll==="horizontal"?p=Math.floor(h.position.x/this.panelWidth):p=Math.floor(h.position.y/this.panelHeight),this.viewer.goToPage(p)}this.element.focus()}function o(h){if(this.dragging=!0,this.element){var p=Number(this.element.style.marginLeft.replace("px","")),g=Number(this.element.style.marginTop.replace("px","")),y=Number(this.element.style.width.replace("px","")),T=Number(this.element.style.height.replace("px","")),v=t.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?-h.delta.x>0?p>-(y-v.x)&&(this.element.style.marginLeft=p+h.delta.x*2+"px",s(this,v.x,p+h.delta.x*2)):-h.delta.x<0&&p<0&&(this.element.style.marginLeft=p+h.delta.x*2+"px",s(this,v.x,p+h.delta.x*2)):-h.delta.y>0?g>-(T-v.y)&&(this.element.style.marginTop=g+h.delta.y*2+"px",s(this,v.y,g+h.delta.y*2)):-h.delta.y<0&&g<0&&(this.element.style.marginTop=g+h.delta.y*2+"px",s(this,v.y,g+h.delta.y*2))}}function l(h){if(this.element){var p=Number(this.element.style.marginLeft.replace("px","")),g=Number(this.element.style.marginTop.replace("px","")),y=Number(this.element.style.width.replace("px","")),T=Number(this.element.style.height.replace("px","")),v=t.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?h.scroll>0?p>-(y-v.x)&&(this.element.style.marginLeft=p-h.scroll*60+"px",s(this,v.x,p-h.scroll*60)):h.scroll<0&&p<0&&(this.element.style.marginLeft=p-h.scroll*60+"px",s(this,v.x,p-h.scroll*60)):h.scroll<0?g>v.y-T&&(this.element.style.marginTop=g+h.scroll*60+"px",s(this,v.y,g+h.scroll*60)):h.scroll>0&&g<0&&(this.element.style.marginTop=g+h.scroll*60+"px",s(this,v.y,g+h.scroll*60)),h.preventDefault=!0}}function s(h,p,g){var y,T,v,E,O,P;for(h.scroll==="horizontal"?y=h.panelWidth:y=h.panelHeight,T=Math.ceil(p/y)+5,v=Math.ceil((Math.abs(g)+p)/y)+1,T=v-T,T=T<0?0:T,O=T;O<v&&O<h.panels.length;O++)if(P=h.panels[O],!P.activePanel){var D,H=h.viewer.tileSources[O];H.referenceStripThumbnailUrl?D={type:"image",url:H.referenceStripThumbnailUrl}:D=H,E=new t.Viewer({id:P.id,tileSources:[D],element:P,navigatorSizeRatio:h.sizeRatio,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,loadTilesWithAjax:h.viewer.loadTilesWithAjax,ajaxHeaders:h.viewer.ajaxHeaders,useCanvas:h.useCanvas}),t.setElementPointerEventsNone(E.canvas),t.setElementPointerEventsNone(E.container),E.innerTracker.setTracking(!1),E.outerTracker.setTracking(!1),h.miniViewers[P.id]=E,P.activePanel=!0}}function a(h){var p=h.eventSource.element;this.scroll==="horizontal"?p.style.marginBottom="0px":p.style.marginLeft="0px"}function u(h){var p=h.eventSource.element;this.scroll==="horizontal"?p.style.marginBottom="-"+t.getElementSize(p).y/2+"px":p.style.marginLeft="-"+t.getElementSize(p).x/2+"px"}function c(h){if(!h.ctrl&&!h.alt&&!h.meta)switch(h.keyCode){case 38:l.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),h.preventDefault=!0;break;case 40:l.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),h.preventDefault=!0;break;case 37:l.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),h.preventDefault=!0;break;case 39:l.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),h.preventDefault=!0;break;default:h.preventDefault=!1;break}else h.preventDefault=!1}function f(h){if(!h.ctrl&&!h.alt&&!h.meta)switch(h.keyCode){case 61:l.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),h.preventDefault=!0;break;case 45:l.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),h.preventDefault=!0;break;case 48:case 119:case 87:l.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),h.preventDefault=!0;break;case 115:case 83:l.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),h.preventDefault=!0;break;case 97:l.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),h.preventDefault=!0;break;case 100:l.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),h.preventDefault=!0;break;default:h.preventDefault=!1;break}else h.preventDefault=!1}}(n),function(t){t.DisplayRect=function(i,r,o,l,s,a){t.Rect.apply(this,[i,r,o,l]),this.minLevel=s,this.maxLevel=a},t.extend(t.DisplayRect.prototype,t.Rect.prototype)}(n),function(t){t.Spring=function(r){var o=arguments;typeof r!="object"&&(r={initial:o.length&&typeof o[0]=="number"?o[0]:void 0,springStiffness:o.length>1?o[1].springStiffness:5,animationTime:o.length>1?o[1].animationTime:1.5}),t.console.assert(typeof r.springStiffness=="number"&&r.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),t.console.assert(typeof r.animationTime=="number"&&r.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),r.exponential&&(this._exponential=!0,delete r.exponential),t.extend(!0,this,r),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:t.now()},t.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))},t.Spring.prototype={resetTo:function(r){t.console.assert(!this._exponential||r!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=r,this.start.time=this.target.time=this.current.time=t.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(r){t.console.assert(!this._exponential||r!==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=r,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(r){this.start.value+=r,this.target.value+=r,this._exponential&&(t.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(r){this._exponential=r,this._exponential&&(t.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=t.now();var r,o;this._exponential?(r=this.start._logValue,o=this.target._logValue):(r=this.start.value,o=this.target.value);var l=this.current.time>=this.target.time?o:r+(o-r)*i(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),s=this.current.value;return this._exponential?this.current.value=Math.exp(l):this.current.value=l,s!==this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function i(r,o){return(1-Math.exp(r*-o))/(1-Math.exp(-r))}}(n),function(t){function i(o){t.extend(!0,this,{timeout:t.DEFAULT_SETTINGS.timeout,jobId:null},o),this.image=null}i.prototype={errorMsg:null,start:function(){var o=this,l=this.abort;this.image=new Image,this.image.onload=function(){o.finish(!0)},this.image.onabort=this.image.onerror=function(){o.errorMsg="Image load aborted",o.finish(!1)},this.jobId=window.setTimeout(function(){o.errorMsg="Image load exceeded timeout ("+o.timeout+" ms)",o.finish(!1)},this.timeout),this.loadWithAjax?(this.request=t.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",postData:this.postData,success:function(s){var a;try{a=new window.Blob([s.response])}catch(h){var u=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(h.name==="TypeError"&&u){var c=new u;c.append(s.response),a=c.getBlob()}}a.size===0&&(o.errorMsg="Empty image response.",o.finish(!1));var f=(window.URL||window.webkitURL).createObjectURL(a);o.image.src=f},error:function(s){o.errorMsg="Image load aborted - XHR error: Ajax returned "+s.status,o.finish(!1)}}),this.abort=function(){o.request.abort(),typeof l=="function"&&l()}):(this.crossOriginPolicy!==!1&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(o){this.image.onload=this.image.onerror=this.image.onabort=null,o||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},t.ImageLoader=function(o){t.extend(!0,this,{jobLimit:t.DEFAULT_SETTINGS.imageLoaderLimit,timeout:t.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},o)},t.ImageLoader.prototype={addJob:function(o){var l=this,s=function(c){r(l,c,o.callback)},a={src:o.src,loadWithAjax:o.loadWithAjax,ajaxHeaders:o.loadWithAjax?o.ajaxHeaders:null,crossOriginPolicy:o.crossOriginPolicy,ajaxWithCredentials:o.ajaxWithCredentials,postData:o.postData,callback:s,abort:o.abort,timeout:this.timeout},u=new i(a);!this.jobLimit||this.jobsInProgress<this.jobLimit?(u.start(),this.jobsInProgress++):this.jobQueue.push(u)},clear:function(){for(var o=0;o<this.jobQueue.length;o++){var l=this.jobQueue[o];typeof l.abort=="function"&&l.abort()}this.jobQueue=[]}};function r(o,l,s){var a;o.jobsInProgress--,(!o.jobLimit||o.jobsInProgress<o.jobLimit)&&o.jobQueue.length>0&&(a=o.jobQueue.shift(),a.start(),o.jobsInProgress++),s(l.image,l.errorMsg,l.request)}}(n),function(t){t.Tile=function(i,r,o,l,s,a,u,c,f,h,p,g){this.level=i,this.x=r,this.y=o,this.bounds=l,this.sourceBounds=h,this.exists=s,this.url=a,this.postData=p,this.context2D=u,this.loadWithAjax=c,this.ajaxHeaders=f,g===void 0&&(t.console.error("Tile constructor needs 'cacheKey' variable: creation tile cache in Tile class is deprecated. TileSource.prototype.getTileHashKey will be used."),g=t.TileSource.prototype.getTileHashKey(i,r,o,a,f,p)),this.cacheKey=g,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.flipped=!1,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},t.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return!!this.context2D||this.url.match(".png")},drawHTML:function(i){if(!this.cacheImageRecord){t.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString());return}if(!this.loaded){t.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}this.element||(this.element=t.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!==i&&i.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",this.flipped&&(this.style.transform="scaleX(-1)"),t.setElementOpacity(this.element,this.opacity)},drawCanvas:function(i,r,o,l,s){var a=this.position.times(t.pixelDensityRatio),u=this.size.times(t.pixelDensityRatio),c;if(!this.context2D&&!this.cacheImageRecord){t.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString());return}if(c=this.context2D||this.cacheImageRecord.getRenderedContext(),!this.loaded||!c){t.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}i.save(),i.globalAlpha=this.opacity,typeof o=="number"&&o!==1&&(a=a.times(o),u=u.times(o)),l instanceof t.Point&&(a=a.plus(l)),i.globalAlpha===1&&this._hasTransparencyChannel()&&(s&&(a.x=Math.round(a.x),a.y=Math.round(a.y),u.x=Math.round(u.x),u.y=Math.round(u.y)),i.clearRect(a.x,a.y,u.x,u.y)),r({context:i,tile:this,rendered:c});var f,h;this.sourceBounds?(f=Math.min(this.sourceBounds.width,c.canvas.width),h=Math.min(this.sourceBounds.height,c.canvas.height)):(f=c.canvas.width,h=c.canvas.height),i.translate(a.x+u.x/2,0),this.flipped&&i.scale(-1,1),i.drawImage(c.canvas,0,0,f,h,-u.x/2,a.y,u.x,u.y),i.restore()},getScaleForEdgeSmoothing:function(){var i;if(this.cacheImageRecord)i=this.cacheImageRecord.getRenderedContext();else if(this.context2D)i=this.context2D;else return t.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return i.canvas.width/(this.size.x*t.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(i,r,o){var l=Math.max(1,Math.ceil((o.x-r.x)/2)),s=Math.max(1,Math.ceil((o.y-r.y)/2));return new t.Point(l,s).minus(this.position.times(t.pixelDensityRatio).times(i||1).apply(function(a){return a%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}}}(n),function(t){t.OverlayPlacement=t.Placement,t.OverlayRotationMode=t.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),t.Overlay=function(i,r,o){var l;t.isPlainObject(i)?l=i:l={element:i,location:r,placement:o},this.element=l.element,this.style=l.element.style,this._init(l)},t.Overlay.prototype={_init:function(i){this.location=i.location,this.placement=i.placement===void 0?t.Placement.TOP_LEFT:i.placement,this.onDraw=i.onDraw,this.checkResize=i.checkResize===void 0?!0:i.checkResize,this.width=i.width===void 0?null:i.width,this.height=i.height===void 0?null:i.height,this.rotationMode=i.rotationMode||t.OverlayRotationMode.EXACT,this.location instanceof t.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=t.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new t.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(i,r){var o=t.Placement.properties[this.placement];o&&(o.isHorizontallyCentered?i.x-=r.x/2:o.isRight&&(i.x-=r.x),o.isVerticallyCentered?i.y-=r.y/2:o.isBottom&&(i.y-=r.y))},destroy:function(){var i=this.element,r=this.style;i.parentNode&&(i.parentNode.removeChild(i),i.prevElementParent&&(r.display="none",document.body.appendChild(i))),this.onDraw=null,r.top="",r.left="",r.position="",this.width!==null&&(r.width=""),this.height!==null&&(r.height="");var o=t.getCssPropertyWithVendorPrefix("transformOrigin"),l=t.getCssPropertyWithVendorPrefix("transform");o&&l&&(r[o]="",r[l]="")},drawHTML:function(i,r){var o=this.element;o.parentNode!==i&&(o.prevElementParent=o.parentNode,o.prevNextSibling=o.nextSibling,i.appendChild(o),this.style.position="absolute",this.size=t.getElementSize(o));var l=this._getOverlayPositionAndSize(r),s=l.position,a=this.size=l.size,u=l.rotate;if(this.onDraw)this.onDraw(s,a,this.element);else{var c=this.style;c.left=s.x+"px",c.top=s.y+"px",this.width!==null&&(c.width=a.x+"px"),this.height!==null&&(c.height=a.y+"px");var f=t.getCssPropertyWithVendorPrefix("transformOrigin"),h=t.getCssPropertyWithVendorPrefix("transform");f&&h&&(u?(c[f]=this._getTransformOrigin(),c[h]="rotate("+u+"deg)"):(c[f]="",c[h]="")),c.display="block"}},_getOverlayPositionAndSize:function(i){var r=i.pixelFromPoint(this.location,!0),o=this._getSizeInPixels(i);this.adjust(r,o);var l=0;if(i.degrees&&this.rotationMode!==t.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===t.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var s=new t.Rect(r.x,r.y,o.x,o.y),a=this._getBoundingBox(s,i.degrees);r=a.getTopLeft(),o=a.getSize()}else l=i.degrees;return{position:r,size:o,rotate:l}},_getSizeInPixels:function(i){var r=this.size.x,o=this.size.y;if(this.width!==null||this.height!==null){var l=i.deltaPixelsFromPointsNoRotate(new t.Point(this.width||0,this.height||0),!0);this.width!==null&&(r=l.x),this.height!==null&&(o=l.y)}if(this.checkResize&&(this.width===null||this.height===null)){var s=this.size=t.getElementSize(this.element);this.width===null&&(r=s.x),this.height===null&&(o=s.y)}return new t.Point(r,o)},_getBoundingBox:function(i,r){var o=this._getPlacementPoint(i);return i.rotate(r,o).getBoundingBox()},_getPlacementPoint:function(i){var r=new t.Point(i.x,i.y),o=t.Placement.properties[this.placement];return o&&(o.isHorizontallyCentered?r.x+=i.width/2:o.isRight&&(r.x+=i.width),o.isVerticallyCentered?r.y+=i.height/2:o.isBottom&&(r.y+=i.height)),r},_getTransformOrigin:function(){var i="",r=t.Placement.properties[this.placement];return r&&(r.isLeft?i="left":r.isRight&&(i="right"),r.isTop?i+=" top":r.isBottom&&(i+=" bottom")),i},update:function(i,r){var o=t.isPlainObject(i)?i:{location:i,placement:r};this._init({location:o.location||this.location,placement:o.placement!==void 0?o.placement:this.placement,onDraw:o.onDraw||this.onDraw,checkResize:o.checkResize||this.checkResize,width:o.width!==void 0?o.width:this.width,height:o.height!==void 0?o.height:this.height,rotationMode:o.rotationMode||this.rotationMode})},getBounds:function(i){t.console.assert(i,"A viewport must now be passed to Overlay.getBounds.");var r=this.width,o=this.height;if(r===null||o===null){var l=i.deltaPointsFromPixelsNoRotate(this.size,!0);r===null&&(r=l.x),o===null&&(o=l.y)}var s=this.location.clone();return this.adjust(s,new t.Point(r,o)),this._adjustBoundsForRotation(i,new t.Rect(s.x,s.y,r,o))},_adjustBoundsForRotation:function(i,r){if(!i||i.degrees===0||this.rotationMode===t.OverlayRotationMode.EXACT)return r;if(this.rotationMode===t.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return r;var o=this._getOverlayPositionAndSize(i);return i.viewerElementToViewportRectangle(new t.Rect(o.position.x,o.position.y,o.size.x,o.size.y))}return r.rotate(-i.degrees,this._getPlacementPoint(r))}}}(n),function(t){t.Drawer=function(i){t.console.assert(i.viewer,"[Drawer] options.viewer is required");var r=arguments;if(t.isPlainObject(i)||(i={source:r[0],viewport:r[1],element:r[2]}),t.console.assert(i.viewport,"[Drawer] options.viewport is required"),t.console.assert(i.element,"[Drawer] options.element is required"),i.source&&t.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=i.viewer,this.viewport=i.viewport,this.debugGridColor=typeof i.debugGridColor=="string"?[i.debugGridColor]:i.debugGridColor||t.DEFAULT_SETTINGS.debugGridColor,i.opacity&&t.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=t.supportsCanvas&&(this.viewer?this.viewer.useCanvas:!0),this.container=t.getElement(i.element),this.canvas=t.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 o=this._calculateCanvasSize();this.canvas.width=o.x,this.canvas.height=o.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",t.setElementOpacity(this.canvas,this.opacity,!0),t.setElementPointerEventsNone(this.canvas),t.setElementTouchActionNone(this.canvas),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},t.Drawer.prototype={addOverlay:function(i,r,o,l){return t.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(i,r,o,l),this},updateOverlay:function(i,r,o){return t.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(i,r,o),this},removeOverlay:function(i){return t.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(i),this},clearOverlays:function(){return t.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(i){var r=this.viewport.pixelFromPointNoRotate(i,!0);return new t.Point(r.x*t.pixelDensityRatio,r.y*t.pixelDensityRatio)},clipWithPolygons:function(i,r){if(this.useCanvas){var o=this._getContext(r);o.beginPath(),i.forEach(function(l){l.forEach(function(s,a){o[a===0?"moveTo":"lineTo"](s.x,s.y)})}),o.clip()}},setOpacity:function(i){t.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var r=this.viewer.world,o=0;o<r.getItemCount();o++)r.getItemAt(o).setOpacity(i);return this},getOpacity:function(){t.console.error("drawer.getOpacity is deprecated. Use tiledImage.getOpacity instead.");for(var i=this.viewer.world,r=0,o=0;o<i.getItemCount();o++){var l=i.getItemAt(o).getOpacity();l>r&&(r=l)}return r},needsUpdate:function(){return t.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return t.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return t.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return t.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 i=this._calculateCanvasSize();if((this.canvas.width!==i.x||this.canvas.height!==i.y)&&(this.canvas.width=i.x,this.canvas.height=i.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var r=this._calculateSketchCanvasSize();this.sketchCanvas.width=r.x,this.sketchCanvas.height=r.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(i,r){if(this.useCanvas){var o=this._getContext(i);if(r)o.clearRect(r.x,r.y,r.width,r.height);else{var l=o.canvas;o.clearRect(0,0,l.width,l.height)}}},viewportToDrawerRectangle:function(i){var r=this.viewport.pixelFromPointNoRotate(i.getTopLeft(),!0),o=this.viewport.deltaPixelsFromPointsNoRotate(i.getSize(),!0);return new t.Rect(r.x*t.pixelDensityRatio,r.y*t.pixelDensityRatio,o.x*t.pixelDensityRatio,o.y*t.pixelDensityRatio)},drawTile:function(i,r,o,l,s,a){if(t.console.assert(i,"[Drawer.drawTile] tile is required"),t.console.assert(r,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var u=this._getContext(o);l=l||1,i.drawCanvas(u,r,l,s,a)}else i.drawHTML(this.canvas)},_getContext:function(i){var r=this.context;if(i){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var o=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=o.x,this.sketchCanvas.height=o.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var l=this;this.viewer.addHandler("rotate",function s(){if(l.viewport.getRotation()!==0){l.viewer.removeHandler("rotate",s);var a=l._calculateSketchCanvasSize();l.sketchCanvas.width=a.x,l.sketchCanvas.height=a.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}r=this.sketchContext}return r},saveContext:function(i){this.useCanvas&&this._getContext(i).save()},restoreContext:function(i){this.useCanvas&&this._getContext(i).restore()},setClip:function(i,r){if(this.useCanvas){var o=this._getContext(r);o.beginPath(),o.rect(i.x,i.y,i.width,i.height),o.clip()}},drawRectangle:function(i,r,o){if(this.useCanvas){var l=this._getContext(o);l.save(),l.fillStyle=r,l.fillRect(i.x,i.y,i.width,i.height),l.restore()}},blendSketch:function(i,r,o,l){var s=i;if(t.isPlainObject(s)||(s={opacity:i,scale:r,translate:o,compositeOperation:l}),!(!this.useCanvas||!this.sketchCanvas)){i=s.opacity,l=s.compositeOperation;var a=s.bounds;if(this.context.save(),this.context.globalAlpha=i,l&&(this.context.globalCompositeOperation=l),a)a.x<0&&(a.width+=a.x,a.x=0),a.x+a.width>this.canvas.width&&(a.width=this.canvas.width-a.x),a.y<0&&(a.height+=a.y,a.y=0),a.y+a.height>this.canvas.height&&(a.height=this.canvas.height-a.y),this.context.drawImage(this.sketchCanvas,a.x,a.y,a.width,a.height,a.x,a.y,a.width,a.height);else{r=s.scale||1,o=s.translate;var u=o instanceof t.Point?o:new t.Point(0,0),c=0,f=0;if(o){var h=this.sketchCanvas.width-this.canvas.width,p=this.sketchCanvas.height-this.canvas.height;c=Math.round(h/2),f=Math.round(p/2)}this.context.drawImage(this.sketchCanvas,u.x-c*r,u.y-f*r,(this.canvas.width+2*c)*r,(this.canvas.height+2*f)*r,-c,-f,this.canvas.width+2*c,this.canvas.height+2*f)}this.context.restore()}},drawDebugInfo:function(i,r,o,l){if(this.useCanvas){var s=this.viewer.world.getIndexOfItem(l)%this.debugGridColor.length,a=this.context;a.save(),a.lineWidth=2*t.pixelDensityRatio,a.font="small-caps bold "+13*t.pixelDensityRatio+"px arial",a.strokeStyle=this.debugGridColor[s],a.fillStyle=this.debugGridColor[s],this.viewport.degrees!==0&&this._offsetForRotation({degrees:this.viewport.degrees}),l.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:l.getRotation(!0),point:l.viewport.pixelFromPointNoRotate(l._getRotationPoint(!0),!0)}),l.viewport.degrees===0&&l.getRotation(!0)%360===0&&l._drawer.viewer.viewport.getFlip()&&l._drawer._flip(),a.strokeRect(i.position.x*t.pixelDensityRatio,i.position.y*t.pixelDensityRatio,i.size.x*t.pixelDensityRatio,i.size.y*t.pixelDensityRatio);var u=(i.position.x+i.size.x/2)*t.pixelDensityRatio,c=(i.position.y+i.size.y/2)*t.pixelDensityRatio;a.translate(u,c),a.rotate(Math.PI/180*-this.viewport.degrees),a.translate(-u,-c),i.x===0&&i.y===0&&(a.fillText("Zoom: "+this.viewport.getZoom(),i.position.x*t.pixelDensityRatio,(i.position.y-30)*t.pixelDensityRatio),a.fillText("Pan: "+this.viewport.getBounds().toString(),i.position.x*t.pixelDensityRatio,(i.position.y-20)*t.pixelDensityRatio)),a.fillText("Level: "+i.level,(i.position.x+10)*t.pixelDensityRatio,(i.position.y+20)*t.pixelDensityRatio),a.fillText("Column: "+i.x,(i.position.x+10)*t.pixelDensityRatio,(i.position.y+30)*t.pixelDensityRatio),a.fillText("Row: "+i.y,(i.position.x+10)*t.pixelDensityRatio,(i.position.y+40)*t.pixelDensityRatio),a.fillText("Order: "+o+" of "+r,(i.position.x+10)*t.pixelDensityRatio,(i.position.y+50)*t.pixelDensityRatio),a.fillText("Size: "+i.size.toString(),(i.position.x+10)*t.pixelDensityRatio,(i.position.y+60)*t.pixelDensityRatio),a.fillText("Position: "+i.position.toString(),(i.position.x+10)*t.pixelDensityRatio,(i.position.y+70)*t.pixelDensityRatio),this.viewport.degrees!==0&&this._restoreRotationChanges(),l.getRotation(!0)%360!==0&&this._restoreRotationChanges(),l.viewport.degrees===0&&l.getRotation(!0)%360===0&&l._drawer.viewer.viewport.getFlip()&&l._drawer._flip(),a.restore()}},debugRect:function(i){if(this.useCanvas){var r=this.context;r.save(),r.lineWidth=2*t.pixelDensityRatio,r.strokeStyle=this.debugGridColor[0],r.fillStyle=this.debugGridColor[0],r.strokeRect(i.x*t.pixelDensityRatio,i.y*t.pixelDensityRatio,i.width*t.pixelDensityRatio,i.height*t.pixelDensityRatio),r.restore()}},setImageSmoothingEnabled:function(i){this.useCanvas&&(this._imageSmoothingEnabled=i,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(i){i.msImageSmoothingEnabled=this._imageSmoothingEnabled,i.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(i){var r=this._getContext(i).canvas;return new t.Point(r.width,r.height)},getCanvasCenter:function(){return new t.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(i){var r=i.point?i.point.times(t.pixelDensityRatio):this.getCanvasCenter(),o=this._getContext(i.useSketch);o.save(),o.translate(r.x,r.y),this.viewer.viewport.flipped?(o.rotate(Math.PI/180*-i.degrees),o.scale(-1,1)):o.rotate(Math.PI/180*i.degrees),o.translate(-r.x,-r.y)},_flip:function(i){i=i||{};var r=i.point?i.point.times(t.pixelDensityRatio):this.getCanvasCenter(),o=this._getContext(i.useSketch);o.translate(r.x,0),o.scale(-1,1),o.translate(-r.x,0)},_restoreRotationChanges:function(i){var r=this._getContext(i);r.restore()},_calculateCanvasSize:function(){var i=t.pixelDensityRatio,r=this.viewport.getContainerSize();return{x:Math.round(r.x*i),y:Math.round(r.y*i)}},_calculateSketchCanvasSize:function(){var i=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return i;var r=Math.ceil(Math.sqrt(i.x*i.x+i.y*i.y));return{x:r,y:r}}}}(n),function(t){t.Viewport=function(i){var r=arguments;r.length&&r[0]instanceof t.Point&&(i={containerSize:r[0],contentSize:r[1],config:r[2]}),i.config&&(t.extend(!0,i,i.config),delete i.config),this._margins=t.extend({left:0,top:0,right:0,bottom:0},i.margins||{}),delete i.margins,t.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:t.DEFAULT_SETTINGS.springStiffness,animationTime:t.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:t.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:t.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:t.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:t.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:t.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:t.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:t.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:t.DEFAULT_SETTINGS.maxZoomLevel,degrees:t.DEFAULT_SETTINGS.degrees,flipped:t.DEFAULT_SETTINGS.flipped,homeFillsViewer:t.DEFAULT_SETTINGS.homeFillsViewer,silenceMultiImageWarnings:t.DEFAULT_SETTINGS.silenceMultiImageWarnings},i),this._updateContainerInnerSize(),this.centerSpringX=new t.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new t.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new t.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 t.Rect(0,0,1,1),1),this.goHome(!0),this.update()},t.Viewport.prototype={resetContentSize:function(i){return t.console.assert(i,"[Viewport.resetContentSize] contentSize is required"),t.console.assert(i instanceof t.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),t.console.assert(i.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),t.console.assert(i.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new t.Rect(0,0,1,i.y/i.x),i.x),this},setHomeBounds:function(i,r){t.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(i,r)},_setContentBounds:function(i,r){t.console.assert(i,"[Viewport._setContentBounds] bounds is required"),t.console.assert(i instanceof t.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),t.console.assert(i.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),t.console.assert(i.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=i.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(r),this._contentBounds=i.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(r),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:r,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var i=this._contentAspectRatio/this.getAspectRatio(),r;return this.homeFillsViewer?r=i>=1?i:1:r=i>=1?1:i,r/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var i=this._contentBounds.getCenter(),r=1/this.getHomeZoom(),o=r/this.getAspectRatio();return new t.Rect(i.x-r/2,i.y-o/2,r,o)},goHome:function(i){return this.viewer&&this.viewer.raiseEvent("home",{immediately:i}),this.fitBounds(this.getHomeBounds(),i)},getMinZoom:function(){var i=this.getHomeZoom(),r=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*i;return r},getMaxZoom:function(){var i=this.maxZoomLevel;return i||(i=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,i/=this._contentBounds.width),Math.max(i,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new t.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return t.extend({},this._margins)},setMargins:function(i){t.console.assert(t.type(i)==="object","[Viewport.setMargins] margins must be an object"),this._margins=t.extend({left:0,top:0,right:0,bottom:0},i),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(i){return this.getBoundsNoRotate(i).rotate(-this.getRotation())},getBoundsNoRotate:function(i){var r=this.getCenter(i),o=1/this.getZoom(i),l=o/this.getAspectRatio();return new t.Rect(r.x-o/2,r.y-l/2,o,l)},getBoundsWithMargins:function(i){return this.getBoundsNoRotateWithMargins(i).rotate(-this.getRotation(),this.getCenter(i))},getBoundsNoRotateWithMargins:function(i){var r=this.getBoundsNoRotate(i),o=this._containerInnerSize.x*this.getZoom(i);return r.x-=this._margins.left/o,r.y-=this._margins.top/o,r.width+=(this._margins.left+this._margins.right)/o,r.height+=(this._margins.top+this._margins.bottom)/o,r},getCenter:function(i){var r=new t.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),o=new t.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),l,s,a,u,c,f,h,p;return i?r:this.zoomPoint?(l=this.pixelFromPoint(this.zoomPoint,!0),s=this.getZoom(),a=1/s,u=a/this.getAspectRatio(),c=new t.Rect(r.x-a/2,r.y-u/2,a,u),f=this._pixelFromPoint(this.zoomPoint,c),h=f.minus(l),p=h.divide(this._containerInnerSize.x*s),o.plus(p)):o},getZoom:function(i){return i?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(i){return Math.max(Math.min(i,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(i){var r=new t.Rect(i.x,i.y,i.width,i.height);if(!this.wrapHorizontal){var o=this.visibilityRatio*r.width,l=r.x+r.width,s=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,a=this._contentBoundsNoRotate.x-l+o,u=s-r.x-o;o>this._contentBoundsNoRotate.width?r.x+=(a+u)/2:u<0?r.x+=u:a>0&&(r.x+=a)}if(!this.wrapVertical){var c=this.visibilityRatio*r.height,f=r.y+r.height,h=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,p=this._contentBoundsNoRotate.y-f+c,g=h-r.y-c;c>this._contentBoundsNoRotate.height?r.y+=(p+g)/2:g<0?r.y+=g:p>0&&(r.y+=p)}return r},_raiseConstraintsEvent:function(i){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:i})},applyConstraints:function(i){var r=this.getZoom(),o=this._applyZoomConstraints(r);r!==o&&this.zoomTo(o,this.zoomPoint,i);var l=this.getBoundsNoRotate(),s=this._applyBoundaryConstraints(l);return this._raiseConstraintsEvent(i),(l.x!==s.x||l.y!==s.y||i)&&this.fitBounds(s.rotate(-this.getRotation()),i),this},ensureVisible:function(i){return this.applyConstraints(i)},_fitBounds:function(i,r){r=r||{};var o=r.immediately||!1,l=r.constraints||!1,s=this.getAspectRatio(),a=i.getCenter(),u=new t.Rect(i.x,i.y,i.width,i.height,i.degrees+this.getRotation()).getBoundingBox();u.getAspectRatio()>=s?u.height=u.width/s:u.width=u.height*s,u.x=a.x-u.width/2,u.y=a.y-u.height/2;var c=1/u.width;if(l){var f=u.getAspectRatio(),h=this._applyZoomConstraints(c);c!==h&&(c=h,u.width=1/c,u.x=a.x-u.width/2,u.height=u.width/f,u.y=a.y-u.height/2),u=this._applyBoundaryConstraints(u),a=u.getCenter(),this._raiseConstraintsEvent(o)}if(o)return this.panTo(a,!0),this.zoomTo(c,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var p=this.getBounds(),g=this.getZoom();if(g===0||Math.abs(c/g-1)<1e-8)return this.zoomTo(c,!0),this.panTo(a,o);u=u.rotate(-this.getRotation());var y=u.getTopLeft().times(c).minus(p.getTopLeft().times(g)).divide(c-g);return this.zoomTo(c,y,o)},fitBounds:function(i,r){return this._fitBounds(i,{immediately:r,constraints:!1})},fitBoundsWithConstraints:function(i,r){return this._fitBounds(i,{immediately:r,constraints:!0})},fitVertically:function(i){var r=new t.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(r,i)},fitHorizontally:function(i){var r=new t.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(r,i)},getConstrainedBounds:function(i){var r,o;return r=this.getBounds(i),o=this._applyBoundaryConstraints(r),o},panBy:function(i,r){var o=new t.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(o.plus(i),r)},panTo:function(i,r){return r?(this.centerSpringX.resetTo(i.x),this.centerSpringY.resetTo(i.y)):(this.centerSpringX.springTo(i.x),this.centerSpringY.springTo(i.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:i,immediately:r}),this},zoomBy:function(i,r,o){return this.zoomTo(this.zoomSpring.target.value*i,r,o)},zoomTo:function(i,r,o){var l=this;return this.zoomPoint=r instanceof t.Point&&!isNaN(r.x)&&!isNaN(r.y)?r:null,o?this._adjustCenterSpringsForZoomPoint(function(){l.zoomSpring.resetTo(i)}):this.zoomSpring.springTo(i),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:i,refPoint:r,immediately:o}),this},setRotation:function(i){return!this.viewer||!this.viewer.drawer.canRotate()?this:(this.degrees=t.positiveModulo(i,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:i}),this)},getRotation:function(){return this.degrees},resize:function(i,r){var o=this.getBoundsNoRotate(),l=o,s;return this.containerSize.x=i.x,this.containerSize.y=i.y,this._updateContainerInnerSize(),r&&(s=i.x/this.containerSize.x,l.width=o.width*s,l.height=l.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:i,maintain:r}),this.fitBounds(l,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new t.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 i=this;this._adjustCenterSpringsForZoomPoint(function(){i.zoomSpring.update()}),this.centerSpringX.update(),this.centerSpringY.update();var r=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,r},_adjustCenterSpringsForZoomPoint:function(i){if(this.zoomPoint){var r=this.pixelFromPoint(this.zoomPoint,!0);i();var o=this.pixelFromPoint(this.zoomPoint,!0),l=o.minus(r),s=this.deltaPointsFromPixels(l,!0);this.centerSpringX.shiftBy(s.x),this.centerSpringY.shiftBy(s.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else i()},deltaPixelsFromPointsNoRotate:function(i,r){return i.times(this._containerInnerSize.x*this.getZoom(r))},deltaPixelsFromPoints:function(i,r){return this.deltaPixelsFromPointsNoRotate(i.rotate(this.getRotation()),r)},deltaPointsFromPixelsNoRotate:function(i,r){return i.divide(this._containerInnerSize.x*this.getZoom(r))},deltaPointsFromPixels:function(i,r){return this.deltaPointsFromPixelsNoRotate(i,r).rotate(-this.getRotation())},pixelFromPointNoRotate:function(i,r){return this._pixelFromPointNoRotate(i,this.getBoundsNoRotate(r))},pixelFromPoint:function(i,r){return this._pixelFromPoint(i,this.getBoundsNoRotate(r))},_pixelFromPointNoRotate:function(i,r){return i.minus(r.getTopLeft()).times(this._containerInnerSize.x/r.width).plus(new t.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(i,r){return this._pixelFromPointNoRotate(i.rotate(this.getRotation(),this.getCenter(!0)),r)},pointFromPixelNoRotate:function(i,r){var o=this.getBoundsNoRotate(r);return i.minus(new t.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/o.width).plus(o.getTopLeft())},pointFromPixel:function(i,r){return this.pointFromPixelNoRotate(i,r).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(i,r){var o=this._contentBoundsNoRotate.width;return new t.Point(i*this._contentSizeNoRotate.x/o,r*this._contentSizeNoRotate.x/o)},viewportToImageCoordinates:function(i,r){if(i instanceof t.Point)return this.viewportToImageCoordinates(i.x,i.y);if(this.viewer){var o=this.viewer.world.getItemCount();if(o>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(o===1){var l=this.viewer.world.getItemAt(0);return l.viewportToImageCoordinates(i,r,!0)}}return this._viewportToImageDelta(i-this._contentBoundsNoRotate.x,r-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(i,r){var o=this._contentBoundsNoRotate.width;return new t.Point(i/this._contentSizeNoRotate.x*o,r/this._contentSizeNoRotate.x*o)},imageToViewportCoordinates:function(i,r){if(i instanceof t.Point)return this.imageToViewportCoordinates(i.x,i.y);if(this.viewer){var o=this.viewer.world.getItemCount();if(o>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(o===1){var l=this.viewer.world.getItemAt(0);return l.imageToViewportCoordinates(i,r,!0)}}var s=this._imageToViewportDelta(i,r);return s.x+=this._contentBoundsNoRotate.x,s.y+=this._contentBoundsNoRotate.y,s},imageToViewportRectangle:function(i,r,o,l){var s=i;if(s instanceof t.Rect||(s=new t.Rect(i,r,o,l)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(a===1){var u=this.viewer.world.getItemAt(0);return u.imageToViewportRectangle(i,r,o,l,!0)}}var c=this.imageToViewportCoordinates(s.x,s.y),f=this._imageToViewportDelta(s.width,s.height);return new t.Rect(c.x,c.y,f.x,f.y,s.degrees)},viewportToImageRectangle:function(i,r,o,l){var s=i;if(s instanceof t.Rect||(s=new t.Rect(i,r,o,l)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(a===1){var u=this.viewer.world.getItemAt(0);return u.viewportToImageRectangle(i,r,o,l,!0)}}var c=this.viewportToImageCoordinates(s.x,s.y),f=this._viewportToImageDelta(s.width,s.height);return new t.Rect(c.x,c.y,f.x,f.y,s.degrees)},viewerElementToImageCoordinates:function(i){var r=this.pointFromPixel(i,!0);return this.viewportToImageCoordinates(r)},imageToViewerElementCoordinates:function(i){var r=this.imageToViewportCoordinates(i);return this.pixelFromPoint(r,!0)},windowToImageCoordinates:function(i){t.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var r=i.minus(t.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(r)},imageToWindowCoordinates:function(i){t.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var r=this.imageToViewerElementCoordinates(i);return r.plus(t.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(i){return this.pointFromPixel(i,!0)},viewportToViewerElementCoordinates:function(i){return this.pixelFromPoint(i,!0)},viewerElementToViewportRectangle:function(i){return t.Rect.fromSummits(this.pointFromPixel(i.getTopLeft(),!0),this.pointFromPixel(i.getTopRight(),!0),this.pointFromPixel(i.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(i){return t.Rect.fromSummits(this.pixelFromPoint(i.getTopLeft(),!0),this.pixelFromPoint(i.getTopRight(),!0),this.pixelFromPoint(i.getBottomLeft(),!0))},windowToViewportCoordinates:function(i){t.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var r=i.minus(t.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(r)},viewportToWindowCoordinates:function(i){t.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var r=this.viewportToViewerElementCoordinates(i);return r.plus(t.getElementPosition(this.viewer.element))},viewportToImageZoom:function(i){if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(r===1){var o=this.viewer.world.getItemAt(0);return o.viewportToImageZoom(i)}}var l=this._contentSizeNoRotate.x,s=this._containerInnerSize.x,a=this._contentBoundsNoRotate.width,u=s/l*a;return i*u},imageToViewportZoom:function(i){if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(r===1){var o=this.viewer.world.getItemAt(0);return o.imageToViewportZoom(i)}}var l=this._contentSizeNoRotate.x,s=this._containerInnerSize.x,a=this._contentBoundsNoRotate.width,u=l/s/a;return i*u},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(i){return this.flipped===i?this:(this.flipped=i,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:i}),this)}}}(n),function(t){t.TiledImage=function(s){var a=this;t.console.assert(s.tileCache,"[TiledImage] options.tileCache is required"),t.console.assert(s.drawer,"[TiledImage] options.drawer is required"),t.console.assert(s.viewer,"[TiledImage] options.viewer is required"),t.console.assert(s.imageLoader,"[TiledImage] options.imageLoader is required"),t.console.assert(s.source,"[TiledImage] options.source is required"),t.console.assert(!s.clip||s.clip instanceof t.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),t.EventSource.call(this),this._tileCache=s.tileCache,delete s.tileCache,this._drawer=s.drawer,delete s.drawer,this._imageLoader=s.imageLoader,delete s.imageLoader,s.clip instanceof t.Rect&&(this._clip=s.clip.clone()),delete s.clip;var u=s.x||0;delete s.x;var c=s.y||0;delete s.y,this.normHeight=s.source.dimensions.y/s.source.dimensions.x,this.contentAspectX=s.source.dimensions.x/s.source.dimensions.y;var f=1;s.width?(f=s.width,delete s.width,s.height&&(t.console.error("specifying both width and height to a tiledImage is not supported"),delete s.height)):s.height&&(f=s.height/this.normHeight,delete s.height);var h=s.fitBounds;delete s.fitBounds;var p=s.fitBoundsPlacement||n.Placement.CENTER;delete s.fitBoundsPlacement;var g=s.degrees||0;delete s.degrees,t.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:t.DEFAULT_SETTINGS.springStiffness,animationTime:t.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:t.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:t.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:t.DEFAULT_SETTINGS.wrapVertical,immediateRender:t.DEFAULT_SETTINGS.immediateRender,blendTime:t.DEFAULT_SETTINGS.blendTime,alwaysBlend:t.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:t.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:t.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:t.DEFAULT_SETTINGS.iOSDevice,debugMode:t.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:t.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:t.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:t.DEFAULT_SETTINGS.placeholderFillStyle,opacity:t.DEFAULT_SETTINGS.opacity,preload:t.DEFAULT_SETTINGS.preload,compositeOperation:t.DEFAULT_SETTINGS.compositeOperation,subPixelRoundingForTransparency:t.DEFAULT_SETTINGS.subPixelRoundingForTransparency},s),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new t.Spring({initial:u,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new t.Spring({initial:c,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new t.Spring({initial:f,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new t.Spring({initial:g,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),h&&this.fitBounds(h,p,!0),this._drawingHandler=function(y){a.viewer.raiseEvent("tile-drawing",t.extend({tiledImage:a},y))}},t.extend(t.TiledImage.prototype,t.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(s){s!==this._fullyLoaded&&(this._fullyLoaded=s,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=t.now(),this._needsDraw=!0},update:function(){var s=this._xSpring.update(),a=this._ySpring.update(),u=this._scaleSpring.update(),c=this._degreesSpring.update();return s||a||u||c?(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(),this.source.destroy&&this.source.destroy()},getBounds:function(s){return this.getBoundsNoRotate(s).rotate(this.getRotation(s),this._getRotationPoint(s))},getBoundsNoRotate:function(s){return s?new t.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new t.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return t.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(s){var a=this.getBoundsNoRotate(s);if(this._clip){var u=s?this._worldWidthCurrent:this._worldWidthTarget,c=u/this.source.dimensions.x,f=this._clip.times(c);a=new t.Rect(a.x+f.x,a.y+f.y,f.width,f.height)}return a.rotate(this.getRotation(s),this._getRotationPoint(s))},getTileBounds:function(s,a,u){var c=this.source.getNumTiles(s),f=(c.x+a%c.x)%c.x,h=(c.y+u%c.y)%c.y,p=this.source.getTileBounds(s,f,h);return this.getFlip()&&(p.x=1-p.x-p.width),p.x+=(a-f)/c.x,p.y+=this._worldHeightCurrent/this._worldWidthCurrent*((u-h)/c.y),p},getContentSize:function(){return new t.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var s=this.imageToWindowCoordinates(new t.Point(0,0)),a=this.imageToWindowCoordinates(this.getContentSize());return new t.Point(a.x-s.x,a.y-s.y)},_viewportToImageDelta:function(s,a,u){var c=u?this._scaleSpring.current.value:this._scaleSpring.target.value;return new t.Point(s*(this.source.dimensions.x/c),a*(this.source.dimensions.y*this.contentAspectX/c))},viewportToImageCoordinates:function(s,a,u){var c;return s instanceof t.Point?(u=a,c=s):c=new t.Point(s,a),c=c.rotate(-this.getRotation(u),this._getRotationPoint(u)),u?this._viewportToImageDelta(c.x-this._xSpring.current.value,c.y-this._ySpring.current.value):this._viewportToImageDelta(c.x-this._xSpring.target.value,c.y-this._ySpring.target.value)},_imageToViewportDelta:function(s,a,u){var c=u?this._scaleSpring.current.value:this._scaleSpring.target.value;return new t.Point(s/this.source.dimensions.x*c,a/this.source.dimensions.y/this.contentAspectX*c)},imageToViewportCoordinates:function(s,a,u){s instanceof t.Point&&(u=a,a=s.y,s=s.x);var c=this._imageToViewportDelta(s,a);return u?(c.x+=this._xSpring.current.value,c.y+=this._ySpring.current.value):(c.x+=this._xSpring.target.value,c.y+=this._ySpring.target.value),c.rotate(this.getRotation(u),this._getRotationPoint(u))},imageToViewportRectangle:function(s,a,u,c,f){var h=s;h instanceof t.Rect?f=a:h=new t.Rect(s,a,u,c);var p=this.imageToViewportCoordinates(h.getTopLeft(),f),g=this._imageToViewportDelta(h.width,h.height,f);return new t.Rect(p.x,p.y,g.x,g.y,h.degrees+this.getRotation(f))},viewportToImageRectangle:function(s,a,u,c,f){var h=s;s instanceof t.Rect?f=a:h=new t.Rect(s,a,u,c);var p=this.viewportToImageCoordinates(h.getTopLeft(),f),g=this._viewportToImageDelta(h.width,h.height,f);return new t.Rect(p.x,p.y,g.x,g.y,h.degrees-this.getRotation(f))},viewerElementToImageCoordinates:function(s){var a=this.viewport.pointFromPixel(s,!0);return this.viewportToImageCoordinates(a)},imageToViewerElementCoordinates:function(s){var a=this.imageToViewportCoordinates(s);return this.viewport.pixelFromPoint(a,!0)},windowToImageCoordinates:function(s){var a=s.minus(n.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(a)},imageToWindowCoordinates:function(s){var a=this.imageToViewerElementCoordinates(s);return a.plus(n.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(s){var a=this._scaleSpring.current.value;return s=s.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new t.Rect((s.x-this._xSpring.current.value)/a,(s.y-this._ySpring.current.value)/a,s.width/a,s.height/a,s.degrees)},viewportToImageZoom:function(s){var a=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return a*s},imageToViewportZoom:function(s){var a=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return s/a},setPosition:function(s,a){var u=this._xSpring.target.value===s.x&&this._ySpring.target.value===s.y;if(a){if(u&&this._xSpring.current.value===s.x&&this._ySpring.current.value===s.y)return;this._xSpring.resetTo(s.x),this._ySpring.resetTo(s.y),this._needsDraw=!0}else{if(u)return;this._xSpring.springTo(s.x),this._ySpring.springTo(s.y),this._needsDraw=!0}u||this._raiseBoundsChange()},setWidth:function(s,a){this._setScale(s,a)},setHeight:function(s,a){this._setScale(s/this.normHeight,a)},setCroppingPolygons:function(s){var a=function(c){return c instanceof t.Point||typeof c.x=="number"&&typeof c.y=="number"},u=function(c){return c.map(function(f){try{if(a(f))return{x:f.x,y:f.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!t.isArray(s))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=s.map(function(c){return u(c)})}catch(c){t.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),t.console.error(c),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(s,a,u){a=a||t.Placement.CENTER;var c=t.Placement.properties[a],f=this.contentAspectX,h=0,p=0,g=1,y=1;if(this._clip&&(f=this._clip.getAspectRatio(),g=this._clip.width/this.source.dimensions.x,y=this._clip.height/this.source.dimensions.y,s.getAspectRatio()>f?(h=this._clip.x/this._clip.height*s.height,p=this._clip.y/this._clip.height*s.height):(h=this._clip.x/this._clip.width*s.width,p=this._clip.y/this._clip.width*s.width)),s.getAspectRatio()>f){var T=s.height/y,v=0;c.isHorizontallyCentered?v=(s.width-s.height*f)/2:c.isRight&&(v=s.width-s.height*f),this.setPosition(new t.Point(s.x-h+v,s.y-p),u),this.setHeight(T,u)}else{var E=s.width/g,O=0;c.isVerticallyCentered?O=(s.height-s.width/f)/2:c.isBottom&&(O=s.height-s.width/f),this.setPosition(new t.Point(s.x-h,s.y-p+O),u),this.setWidth(E,u)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(s){t.console.assert(!s||s instanceof t.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),s instanceof t.Rect?this._clip=s.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return!!this.flipped},setFlip:function(s){this.flipped=!!s,this._needsDraw=!0,this._raiseBoundsChange()},getOpacity:function(){return this.opacity},setOpacity:function(s){s!==this.opacity&&(this.opacity=s,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(s){this._preload=!!s,this._needsDraw=!0},getRotation:function(s){return s?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(s,a){this._degreesSpring.target.value===s&&this._degreesSpring.isAtTargetValue()||(a?this._degreesSpring.resetTo(s):this._degreesSpring.springTo(s),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(s){return this.getBoundsNoRotate(s).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(s){s!==this.compositeOperation&&(this.compositeOperation=s,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(s,a){var u=this._scaleSpring.target.value===s;if(a){if(u&&this._scaleSpring.current.value===s)return;this._scaleSpring.resetTo(s),this._updateForScale(),this._needsDraw=!0}else{if(u)return;this._scaleSpring.springTo(s),this._updateForScale(),this._needsDraw=!0}u||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 s=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),a=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,u=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(a/this.minPixelRatio)/Math.log(2))));return u=Math.max(u,this.source.minLevel||0),s=Math.min(s,u),{lowestLevel:s,highestLevel:u}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){var s=this.lastDrawn.pop();s.beingDrawn=!1}var a=this.viewport,u=this._viewportToTiledImageRectangle(a.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var c=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(u=u.intersection(c),u===null)return}for(var f=this._getLevelsInterval(),h=f.lowestLevel,p=f.highestLevel,g=null,y=!1,T=t.now(),v=p;v>=h;v--){var E=!1,O=a.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(v),!0).x*this._scaleSpring.current.value;if(v===h||!y&&O>=this.minPixelRatio)E=!0,y=!0;else if(!y)continue;var P=a.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(v),!1).x*this._scaleSpring.current.value,D=a.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,H=this.immediateRender?1:D,M=Math.min(1,(O-.5)/.5),B=H/Math.abs(H-P);if(g=this._updateLevel(y,E,v,M,B,u,T,g),this._providesCoverage(this.coverage,v))break}this._drawTiles(this.lastDrawn),g&&!g.context2D?(this._loadTile(g,T),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(this._tilesLoading===0)},_getCornerTiles:function(s,a,u){var c,f;this.wrapHorizontal?(c=t.positiveModulo(a.x,1),f=t.positiveModulo(u.x,1)):(c=Math.max(0,a.x),f=Math.min(1,u.x));var h,p,g=1/this.source.aspectRatio;this.wrapVertical?(h=t.positiveModulo(a.y,g),p=t.positiveModulo(u.y,g)):(h=Math.max(0,a.y),p=Math.min(g,u.y));var y=this.source.getTileAtPoint(s,new t.Point(c,h)),T=this.source.getTileAtPoint(s,new t.Point(f,p)),v=this.source.getNumTiles(s);return this.wrapHorizontal&&(y.x+=v.x*Math.floor(a.x),T.x+=v.x*Math.floor(u.x)),this.wrapVertical&&(y.y+=v.y*Math.floor(a.y/g),T.y+=v.y*Math.floor(u.y/g)),{topLeft:y,bottomRight:T}},_updateLevel:function(s,a,u,c,f,h,p,g){var y=h.getBoundingBox().getTopLeft(),T=h.getBoundingBox().getBottomRight();this.viewer&&this.viewer.raiseEvent("update-level",{tiledImage:this,havedrawn:s,level:u,opacity:c,visibility:f,drawArea:h,topleft:y,bottomright:T,currenttime:p,best:g}),this._resetCoverage(this.coverage,u),this._resetCoverage(this.loadingCoverage,u);var v=this._getCornerTiles(u,y,T),E=v.topLeft,O=v.bottomRight,P=this.source.getNumTiles(u),D=this.viewport.pixelFromPoint(this.viewport.getCenter());this.getFlip()&&(O.x+=1,this.wrapHorizontal||(O.x=Math.min(O.x,P.x-1)));for(var H=E.x;H<=O.x;H++)for(var M=E.y;M<=O.y;M++){var B;if(this.getFlip()){var R=(P.x+H%P.x)%P.x;B=H+P.x-R-R-1}else B=H;h.intersection(this.getTileBounds(u,B,M))!==null&&(g=this._updateTile(a,s,B,M,u,c,f,D,P,p,g))}return g},_updateTile:function(s,a,u,c,f,h,p,g,y,T,v){var E=this._getTile(u,c,f,T,y,this._worldWidthCurrent,this._worldHeightCurrent),O=a;this.viewer&&this.viewer.raiseEvent("update-tile",{tiledImage:this,tile:E}),this._setCoverage(this.coverage,f,u,c,!1);var P=E.loaded||E.loading||this._isCovered(this.loadingCoverage,f,u,c);if(this._setCoverage(this.loadingCoverage,f,u,c,P),!E.exists||(s&&!O&&(this._isCovered(this.coverage,f,u,c)?this._setCoverage(this.coverage,f,u,c,!0):O=!0),!O))return v;if(this._positionTile(E,this.source.tileOverlap,this.viewport,g,p),!E.loaded)if(E.context2D)this._setTileLoaded(E);else{var D=this._tileCache.getImageRecord(E.cacheKey);if(D){var H=D.getImage();this._setTileLoaded(E,H)}}if(E.loaded){var M=this._blendTile(E,u,c,f,h,T);M&&(this._needsDraw=!0)}else E.loading?this._tilesLoading++:P||(v=this._compareTiles(v,E));return v},_getTile:function(s,a,u,c,f,h,p){var g,y,T,v,E,O,P,D,H,M,B=this.tilesMatrix,R=this.source;return B[u]||(B[u]={}),B[u][s]||(B[u][s]={}),(!B[u][s][a]||!B[u][s][a].flipped!=!this.flipped)&&(g=(f.x+s%f.x)%f.x,y=(f.y+a%f.y)%f.y,T=this.getTileBounds(u,s,a),v=R.getTileBounds(u,g,y,!0),E=R.tileExists(u,g,y),O=R.getTileUrl(u,g,y),P=R.getTilePostData(u,g,y),this.loadTilesWithAjax?(D=R.getTileAjaxHeaders(u,g,y),t.isPlainObject(this.ajaxHeaders)&&(D=t.extend({},this.ajaxHeaders,D))):D=null,H=R.getContext2D?R.getContext2D(u,g,y):void 0,M=new t.Tile(u,s,a,T,E,O,H,this.loadTilesWithAjax,D,v,P,R.getTileHashKey(u,g,y,O,D,P)),this.getFlip()?g===0&&(M.isRightMost=!0):g===f.x-1&&(M.isRightMost=!0),y===f.y-1&&(M.isBottomMost=!0),M.flipped=this.flipped,B[u][s][a]=M),M=B[u][s][a],M.lastTouchTime=c,M},_loadTile:function(s,a){var u=this;s.loading=!0,this._imageLoader.addJob({src:s.url,postData:s.postData,loadWithAjax:s.loadWithAjax,ajaxHeaders:s.ajaxHeaders,crossOriginPolicy:this.crossOriginPolicy,ajaxWithCredentials:this.ajaxWithCredentials,callback:function(c,f,h){u._onTileLoad(s,a,c,f,h)},abort:function(){s.loading=!1}})},_onTileLoad:function(s,a,u,c,f){if(!u){t.console.error("Tile %s failed to load: %s - error: %s",s,s.url,c),this.viewer.raiseEvent("tile-load-failed",{tile:s,tiledImage:this,time:a,message:c,tileRequest:f}),s.loading=!1,s.exists=!1;return}if(a<this.lastResetTime){t.console.warn("Ignoring tile %s loaded before reset: %s",s,s.url),s.loading=!1;return}var h=this,p=function(){var g=h.source,y=g.getClosestLevel();h._setTileLoaded(s,u,y,f)};this._midDraw?window.setTimeout(p,1):p()},_setTileLoaded:function(s,a,u,c){var f=0,h=this;function p(){return f++,g}function g(){f--,f===0&&(s.loading=!1,s.loaded=!0,s.context2D||h._tileCache.cacheTile({image:a,tile:s,cutoff:u,tiledImage:h}),h._needsDraw=!0)}this.viewer.raiseEvent("tile-loaded",{tile:s,tiledImage:this,tileRequest:c,image:a,getCompletionCallback:p}),p()()},_positionTile:function(s,a,u,c,f){var h=s.bounds.getTopLeft();h.x*=this._scaleSpring.current.value,h.y*=this._scaleSpring.current.value,h.x+=this._xSpring.current.value,h.y+=this._ySpring.current.value;var p=s.bounds.getSize();p.x*=this._scaleSpring.current.value,p.y*=this._scaleSpring.current.value;var g=u.pixelFromPointNoRotate(h,!0),y=u.pixelFromPointNoRotate(h,!1),T=u.deltaPixelsFromPointsNoRotate(p,!0),v=u.deltaPixelsFromPointsNoRotate(p,!1),E=y.plus(v.divide(2)),O=c.squaredDistanceTo(E);a||(T=T.plus(new t.Point(1,1))),s.isRightMost&&this.wrapHorizontal&&(T.x+=.75),s.isBottomMost&&this.wrapVertical&&(T.y+=.75),s.position=g,s.size=T,s.squaredDistance=O,s.visibility=f},_blendTile:function(s,a,u,c,f,h){var p=1e3*this.blendTime,g,y;if(s.blendStart||(s.blendStart=h),g=h-s.blendStart,y=p?Math.min(1,g/p):1,this.alwaysBlend&&(y*=f),s.opacity=y,this.lastDrawn.push(s),y===1)this._setCoverage(this.coverage,c,a,u,!0),this._hasOpaqueTile=!0;else if(g<p)return!0;return!1},_compareTiles:function(s,a){return!s||a.visibility>s.visibility||a.visibility===s.visibility&&a.squaredDistance<s.squaredDistance?a:s},_drawTiles:function(s){if(!(this.opacity===0||s.length===0&&!this.placeholderFillStyle)){var a=s[0],u;a&&(u=this.opacity<1||this.compositeOperation&&this.compositeOperation!=="source-over"||!this._isBottomItem()&&a._hasTransparencyChannel());var c,f,h=this.viewport.getZoom(!0),p=this.viewportToImageZoom(h);s.length>1&&p>this.smoothTileEdgesMinZoom&&!this.iOSDevice&&this.getRotation(!0)%360===0&&t.supportsCanvas&&this.viewer.useCanvas&&(u=!0,c=a.getScaleForEdgeSmoothing(),f=a.getTranslationForEdgeSmoothing(c,this._drawer.getCanvasSize(!1),this._drawer.getCanvasSize(!0)));var g;u&&(c||(g=this.viewport.viewportToViewerElementRectangle(this.getClippedBounds(!0)).getIntegerBoundingBox(),this._drawer.viewer.viewport.getFlip()&&(this.viewport.degrees!==0||this.getRotation(!0)%360!==0)&&(g.x=this._drawer.viewer.container.clientWidth-(g.x+g.width)),g=g.times(t.pixelDensityRatio)),this._drawer._clear(!0,g)),c||(this.viewport.degrees!==0&&this._drawer._offsetForRotation({degrees:this.viewport.degrees,useSketch:u}),this.getRotation(!0)%360!==0&&this._drawer._offsetForRotation({degrees:this.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(this._getRotationPoint(!0),!0),useSketch:u}),this.viewport.degrees===0&&this.getRotation(!0)%360===0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip());var y=!1;if(this._clip){this._drawer.saveContext(u);var T=this.imageToViewportRectangle(this._clip,!0);T=T.rotate(-this.getRotation(!0),this._getRotationPoint(!0));var v=this._drawer.viewportToDrawerRectangle(T);c&&(v=v.times(c)),f&&(v=v.translate(f)),this._drawer.setClip(v,u),y=!0}if(this._croppingPolygons){this._drawer.saveContext(u);try{var E=this._croppingPolygons.map(function(R){return R.map(function(V){var $=this.imageToViewportCoordinates(V.x,V.y,!0).rotate(-this.getRotation(!0),this._getRotationPoint(!0)),N=this._drawer.viewportCoordToDrawerCoord($);return c&&(N=N.times(c)),N})});this._drawer.clipWithPolygons(E,u)}catch(R){t.console.error(R)}y=!0}if(this.placeholderFillStyle&&this._hasOpaqueTile===!1){var O=this._drawer.viewportToDrawerRectangle(this.getBounds(!0));c&&(O=O.times(c)),f&&(O=O.translate(f));var P=null;typeof this.placeholderFillStyle=="function"?P=this.placeholderFillStyle(this,this._drawer.context):P=this.placeholderFillStyle,this._drawer.drawRectangle(O,P,u)}var D=l(this.subPixelRoundingForTransparency),H=!1;if(D===t.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS)H=!0;else if(D===t.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST){var M=this.viewer&&this.viewer.isAnimating();H=!M}for(var B=s.length-1;B>=0;B--)a=s[B],this._drawer.drawTile(a,this._drawingHandler,u,c,f,H),a.beingDrawn=!0,this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:this,tile:a});y&&this._drawer.restoreContext(u),c||(this.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(u),this.viewport.degrees!==0&&this._drawer._restoreRotationChanges(u)),u&&(c&&(this.viewport.degrees!==0&&this._drawer._offsetForRotation({degrees:this.viewport.degrees,useSketch:!1}),this.getRotation(!0)%360!==0&&this._drawer._offsetForRotation({degrees:this.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(this._getRotationPoint(!0),!0),useSketch:!1})),this._drawer.blendSketch({opacity:this.opacity,scale:c,translate:f,compositeOperation:this.compositeOperation,bounds:g}),c&&(this.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(!1),this.viewport.degrees!==0&&this._drawer._restoreRotationChanges(!1))),c||this.viewport.degrees===0&&this.getRotation(!0)%360===0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip(),this._drawDebugInfo(s)}},_drawDebugInfo:function(s){if(this.debugMode)for(var a=s.length-1;a>=0;a--){var u=s[a];try{this._drawer.drawDebugInfo(u,s.length,a,this)}catch(c){t.console.error(c)}}},_providesCoverage:function(s,a,u,c){var f,h,p,g;if(!s[a])return!1;if(u===void 0||c===void 0){f=s[a];for(p in f)if(Object.prototype.hasOwnProperty.call(f,p)){h=f[p];for(g in h)if(Object.prototype.hasOwnProperty.call(h,g)&&!h[g])return!1}return!0}return s[a][u]===void 0||s[a][u][c]===void 0||s[a][u][c]===!0},_isCovered:function(s,a,u,c){return u===void 0||c===void 0?this._providesCoverage(s,a+1):this._providesCoverage(s,a+1,2*u,2*c)&&this._providesCoverage(s,a+1,2*u,2*c+1)&&this._providesCoverage(s,a+1,2*u+1,2*c)&&this._providesCoverage(s,a+1,2*u+1,2*c+1)},_setCoverage:function(s,a,u,c,f){if(!s[a]){t.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",a);return}s[a][u]||(s[a][u]={}),s[a][u][c]=f},_resetCoverage:function(s,a){s[a]={}}});var i=t.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER;function r(s){return s!==t.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS&&s!==t.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST&&s!==t.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER}function o(s){return r(s)?i:s}function l(s){if(typeof s=="number")return o(s);if(!s||!t.Browser)return i;var a=s[t.Browser.vendor];return r(a)&&(a=s["*"]),o(a)}}(n),function(t){var i=function(o){t.console.assert(o,"[TileCache.cacheTile] options is required"),t.console.assert(o.tile,"[TileCache.cacheTile] options.tile is required"),t.console.assert(o.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=o.tile,this.tiledImage=o.tiledImage},r=function(o){t.console.assert(o,"[ImageRecord] options is required"),t.console.assert(o.image,"[ImageRecord] options.image is required"),this._image=o.image,this._tiles=[]};r.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var o=document.createElement("canvas");o.width=this._image.width,o.height=this._image.height,this._renderedContext=o.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(o){t.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=o},addTile:function(o){t.console.assert(o,"[ImageRecord.addTile] tile is required"),this._tiles.push(o)},removeTile:function(o){for(var l=0;l<this._tiles.length;l++)if(this._tiles[l]===o){this._tiles.splice(l,1);return}t.console.warn("[ImageRecord.removeTile] trying to remove unknown tile",o)},getTileCount:function(){return this._tiles.length}},t.TileCache=function(o){o=o||{},this._maxImageCacheCount=o.maxImageCacheCount||t.DEFAULT_SETTINGS.maxImageCacheCount,this._tilesLoaded=[],this._imagesLoaded=[],this._imagesLoadedCount=0},t.TileCache.prototype={numTilesLoaded:function(){return this._tilesLoaded.length},cacheTile:function(o){t.console.assert(o,"[TileCache.cacheTile] options is required"),t.console.assert(o.tile,"[TileCache.cacheTile] options.tile is required"),t.console.assert(o.tile.cacheKey,"[TileCache.cacheTile] options.tile.cacheKey is required"),t.console.assert(o.tiledImage,"[TileCache.cacheTile] options.tiledImage is required");var l=o.cutoff||0,s=this._tilesLoaded.length,a=this._imagesLoaded[o.tile.cacheKey];if(a||(t.console.assert(o.image,"[TileCache.cacheTile] options.image is required to create an ImageRecord"),a=this._imagesLoaded[o.tile.cacheKey]=new r({image:o.image}),this._imagesLoadedCount++),a.addTile(o.tile),o.tile.cacheImageRecord=a,this._imagesLoadedCount>this._maxImageCacheCount){for(var u=null,c=-1,f=null,h,p,g,y,T,v,E=this._tilesLoaded.length-1;E>=0;E--)if(v=this._tilesLoaded[E],h=v.tile,!(h.level<=l||h.beingDrawn)){if(!u){u=h,c=E,f=v;continue}y=h.lastTouchTime,p=u.lastTouchTime,T=h.level,g=u.level,(y<p||y===p&&T>g)&&(u=h,c=E,f=v)}u&&c>=0&&(this._unloadTile(f),s=c)}this._tilesLoaded[s]=new i({tile:o.tile,tiledImage:o.tiledImage})},clearTilesFor:function(o){t.console.assert(o,"[TileCache.clearTilesFor] tiledImage is required");for(var l,s=0;s<this._tilesLoaded.length;++s)l=this._tilesLoaded[s],l.tiledImage===o&&(this._unloadTile(l),this._tilesLoaded.splice(s,1),s--)},getImageRecord:function(o){return t.console.assert(o,"[TileCache.getImageRecord] cacheKey is required"),this._imagesLoaded[o]},_unloadTile:function(o){t.console.assert(o,"[TileCache._unloadTile] tileRecord is required");var l=o.tile,s=o.tiledImage;l.unload(),l.cacheImageRecord=null;var a=this._imagesLoaded[l.cacheKey];a.removeTile(l),a.getTileCount()||(a.destroy(),delete this._imagesLoaded[l.cacheKey],this._imagesLoadedCount--),s.viewer.raiseEvent("tile-unloaded",{tile:l,tiledImage:s})}}}(n),function(t){t.World=function(i){var r=this;t.console.assert(i.viewer,"[World] options.viewer is required"),t.EventSource.call(this),this.viewer=i.viewer,this._items=[],this._needsDraw=!1,this._autoRefigureSizes=!0,this._needsSizesFigured=!1,this._delegatedFigureSizes=function(o){r._autoRefigureSizes?r._figureSizes():r._needsSizesFigured=!0},this._figureSizes()},t.extend(t.World.prototype,t.EventSource.prototype,{addItem:function(i,r){if(t.console.assert(i,"[World.addItem] item is required"),t.console.assert(i instanceof t.TiledImage,"[World.addItem] only TiledImages supported at this time"),r=r||{},r.index!==void 0){var o=Math.max(0,Math.min(this._items.length,r.index));this._items.splice(o,0,i)}else this._items.push(i);this._autoRefigureSizes?this._figureSizes():this._needsSizesFigured=!0,this._needsDraw=!0,i.addHandler("bounds-change",this._delegatedFigureSizes),i.addHandler("clip-change",this._delegatedFigureSizes),this.raiseEvent("add-item",{item:i})},getItemAt:function(i){return t.console.assert(i!==void 0,"[World.getItemAt] index is required"),this._items[i]},getIndexOfItem:function(i){return t.console.assert(i,"[World.getIndexOfItem] item is required"),t.indexOf(this._items,i)},getItemCount:function(){return this._items.length},setItemIndex:function(i,r){t.console.assert(i,"[World.setItemIndex] item is required"),t.console.assert(r!==void 0,"[World.setItemIndex] index is required");var o=this.getIndexOfItem(i);if(r>=this._items.length)throw new Error("Index bigger than number of layers.");r===o||o===-1||(this._items.splice(o,1),this._items.splice(r,0,i),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:i,previousIndex:o,newIndex:r}))},removeItem:function(i){t.console.assert(i,"[World.removeItem] item is required");var r=t.indexOf(this._items,i);r!==-1&&(i.removeHandler("bounds-change",this._delegatedFigureSizes),i.removeHandler("clip-change",this._delegatedFigureSizes),i.destroy(),this._items.splice(r,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(i))},removeAll:function(){this.viewer._cancelPendingImages();var i,r;for(r=0;r<this._items.length;r++)i=this._items[r],i.removeHandler("bounds-change",this._delegatedFigureSizes),i.removeHandler("clip-change",this._delegatedFigureSizes),i.destroy();var o=this._items;for(this._items=[],this._figureSizes(),this._needsDraw=!0,r=0;r<o.length;r++)i=o[r],this._raiseRemoveItem(i)},resetItems:function(){for(var i=0;i<this._items.length;i++)this._items[i].reset()},update:function(){for(var i=!1,r=0;r<this._items.length;r++)i=this._items[r].update()||i;return i},draw:function(){for(var i=0;i<this._items.length;i++)this._items[i].draw();this._needsDraw=!1},needsDraw:function(){for(var i=0;i<this._items.length;i++)if(this._items[i].needsDraw())return!0;return this._needsDraw},getHomeBounds:function(){return this._homeBounds.clone()},getContentFactor:function(){return this._contentFactor},setAutoRefigureSizes:function(i){this._autoRefigureSizes=i,i&this._needsSizesFigured&&(this._figureSizes(),this._needsSizesFigured=!1)},arrange:function(i){i=i||{};var r=i.immediately||!1,o=i.layout||t.DEFAULT_SETTINGS.collectionLayout,l=i.rows||t.DEFAULT_SETTINGS.collectionRows,s=i.columns||t.DEFAULT_SETTINGS.collectionColumns,a=i.tileSize||t.DEFAULT_SETTINGS.collectionTileSize,u=i.tileMargin||t.DEFAULT_SETTINGS.collectionTileMargin,c=a+u,f;!i.rows&&s?f=s:f=Math.ceil(this._items.length/l);var h=0,p=0,g,y,T,v,E;this.setAutoRefigureSizes(!1);for(var O=0;O<this._items.length;O++)O&&O%f===0&&(o==="horizontal"?(p+=c,h=0):(h+=c,p=0)),g=this._items[O],y=g.getBounds(),y.width>y.height?T=a:T=a*(y.width/y.height),v=T*(y.height/y.width),E=new t.Point(h+(a-T)/2,p+(a-v)/2),g.setPosition(E,r),g.setWidth(T,r),o==="horizontal"?h+=c:p+=c;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var i=this._homeBounds?this._homeBounds.clone():null,r=this._contentSize?this._contentSize.clone():null,o=this._contentFactor||0;if(!this._items.length)this._homeBounds=new t.Rect(0,0,1,1),this._contentSize=new t.Point(1,1),this._contentFactor=1;else{var l=this._items[0],s=l.getBounds();this._contentFactor=l.getContentSize().x/s.width;for(var a=l.getClippedBounds().getBoundingBox(),u=a.x,c=a.y,f=a.x+a.width,h=a.y+a.height,p=1;p<this._items.length;p++)l=this._items[p],s=l.getBounds(),this._contentFactor=Math.max(this._contentFactor,l.getContentSize().x/s.width),a=l.getClippedBounds().getBoundingBox(),u=Math.min(u,a.x),c=Math.min(c,a.y),f=Math.max(f,a.x+a.width),h=Math.max(h,a.y+a.height);this._homeBounds=new t.Rect(u,c,f-u,h-c),this._contentSize=new t.Point(this._homeBounds.width*this._contentFactor,this._homeBounds.height*this._contentFactor)}(this._contentFactor!==o||!this._homeBounds.equals(i)||!this._contentSize.equals(r))&&this.raiseEvent("metrics-change",{})},_raiseRemoveItem:function(i){this.raiseEvent("remove-item",{item:i})}})}(n)})(Jd);var lT=Jd.exports;const wu=pd(lT);class uT{constructor(n,t){gn(this,"$",null);gn(this,"viewer",null);gn(this,"containerWidth",0);gn(this,"containerHeight",0);gn(this,"svg",null);gn(this,"svgNS","http://www.w3.org/2000/svg");gn(this,"node",null);if(!t)throw new Error("OpenSeadragon is missing.");this.$=t,this.createOverlay(n)}getNode(){return this.node}createOverlay(n){this.viewer=n,this.containerWidth=0,this.containerHeight=0,this.svg=document.createElementNS(this.svgNS,"svg"),this.svg.style.position="absolute",this.svg.style.left=0,this.svg.style.top=0,this.svg.style.width="100%",this.svg.style.height="100%",this.viewer.canvas.appendChild(this.svg),this.node=document.createElementNS(this.svgNS,"g"),this.svg.appendChild(this.node),this.viewer.addHandler("animation",()=>{this.resize()}),this.viewer.addHandler("open",()=>{this.resize()}),this.viewer.addHandler("rotate",()=>{this.resize()}),this.viewer.addHandler("flip",()=>{this.resize()}),this.viewer.addHandler("resize",()=>{this.resize()}),this.resize()}resize(){this.containerWidth!==this.viewer.container.clientWidth&&(this.containerWidth=this.viewer.container.clientWidth,this.svg.setAttribute("width",this.containerWidth)),this.containerHeight!==this.viewer.container.clientHeight&&(this.containerHeight=this.viewer.container.clientHeight,this.svg.setAttribute("height",this.containerHeight));var n=this.viewer.viewport.pixelFromPoint(new this.$.Point(0,0),!0),t=this.viewer.viewport.getZoom(!0),i=this.viewer.viewport.getRotation(),r=this.viewer.viewport.getFlip(),o=this.viewer.viewport._containerInnerSize.x;const l=this.viewer.world.getItemAt(0).getContentSize();var s=l.y/l.x,a=o*t,u=o*s*t;r&&(a=-a,n.x=-n.x+o),this.node.setAttribute("transform","translate("+n.x+","+n.y+") scale("+a+","+u+") rotate("+i+")")}onClick(n,t){new this.$.MouseTracker({element:n,clickHandler:t}).setTracking(!0)}}const cT={class:"image-view t-relative t-h-full"},dT={key:0,class:"t-p-2 t-flex t-justify-center t-pt-12"},fT={key:1,id:"openseadragon",class:"t-w-full t-h-full t-margin-0"},hT={__name:"ImageView",emits:"loading",setup(e,{emit:n}){const t=n,i=vt(),r=xt(),o=de(null),l=de(null),s=J(()=>i.item),a=J(()=>{var g,y;return(y=(g=s.value)==null?void 0:g.image)==null?void 0:y.id}),u=J(()=>({id:"openseadragon",tileSources:{type:"image",url:a.value},maxZoomLevel:10,zoomInButton:"zoom-in",zoomOutButton:"zoom-out",homeButton:"default",fullPageButton:"fullscreen"}));let c=[];Ve(()=>r.activeAnnotations,g=>{c.forEach(y=>{Object.keys(g).includes(y.getAttribute("data-annotation-id"))?y.classList.add("selected"):y.classList.remove("selected")})}),Ve(()=>r.filteredAnnotations,()=>{o.value&&h()}),Ve(s,async()=>{var g;if(!((g=s.value)!=null&&g.image)){l.value={message:"no_image_available"};return}t("loading",!0);try{const y=await fetch(s.value.image.id);if(y.status===500)throw{message:"error_image_not_exists"};if(y.status!==200&&y.status!==201)throw{message:"error_vpn"};l.value=null,await co(1e3),f()}catch(y){l.value=y,console.error(y),t("loading",!1)}},{immediate:!0});function f(){o.value&&(o.value.destroy(),o.value=null),o.value=new wu.Viewer(u.value),o.value.controlsFadeDelay=1e3,o.value.addHandler("tile-loaded",()=>{t("loading",!1),h()}),o.value.addHandler("open-failed",()=>{l.value={message:"error_open_image"},t("loading",!1)})}function h(){p();const g=r.filteredAnnotations.filter(v=>v.body["x-content-type"]==="LineSegmentation");if(g.length===0)return;const y=new uT(o.value,wu),T=y.getNode();c=g.map(v=>{const[E,O,P,D]=v.target[0].selector.value.split(":")[1].split(",").map(B=>parseFloat(B)/100),H=[[E,O],[E+P,O],[E+P,O+D],[E,O+D]],M=document.createElementNS("http://www.w3.org/2000/svg","polygon");return M.setAttribute("data-annotation-id",v.id),M.setAttribute("points",H.map(B=>B.join(",")).join(" ")),M.classList.add("tido-polygon"),T.appendChild(M),M}),c.forEach(v=>{y.onClick(v,()=>{const E=v.getAttribute("data-annotation-id");v.classList.contains("selected")?r.removeActiveAnnotation(E):r.addActiveAnnotation(E)})})}function p(){c.forEach(g=>g.remove())}return(g,y)=>(L(),j("div",cT,[l.value?(L(),j("div",dT,[we(_i,{message:g.$t(l.value.message),title:g.$t("no_image_available"),type:"warning"},null,8,["message","title"])])):(L(),j("figure",fT))]))}},pT={class:"panel-zoom-action t-items-center t-flex"},gT={__name:"PanelZoomAction",props:{min:Number,max:Number,step:Number,startValue:Number},emits:["update"],setup(e,{emit:n}){const t=e,i=n,r=de(!1),o=de(!1),l=de(0);jt(()=>{l.value=t.startValue,l.value===t.min&&(o.value=!0),l.value===t.max&&(r.value=!0)});function s(){l.value+t.step<=t.max&&(l.value+=t.step,i("update",l.value)),l.value>=t.max?r.value=!0:(r.value=!1,o.value=!1)}function a(){l.value-t.step>=t.min&&(l.value-=t.step,i("update",l.value)),l.value<=t.min?o.value=!0:(r.value=!1,o.value=!1)}return(u,c)=>(L(),j("div",pT,[we(Mt,{display:"flat",rounded:"",icon:"zoomIn",size:"small",disabled:r.value,title:u.$t("increase"),class:"t-text-primary dark:t-text-gray-400",onClick:c[0]||(c[0]=f=>s())},null,8,["disabled","title"]),we(Mt,{display:"flat",rounded:"",icon:"zoomOut",size:"small",disabled:o.value,title:u.$t("decrease"),class:"t-text-primary dark:t-text-gray-400",onClick:c[1]||(c[1]=f=>a())},null,8,["disabled","title"])]))}},mT=bi(gT,[["__scopeId","data-v-511929c0"]]),vT={class:"t-flex t-items-center"},yT={for:"panel-toggle-action",class:"t-ml-2 t-text-sm"},bT={__name:"PanelCheckAction",props:{selected:Boolean,label:String},emits:["update"],setup(e,{emit:n}){const t=e,i=n,r=de(!1);return Ve(()=>t.selected,o=>{r.value=o},{immediate:!0}),Ve(r,(o,l)=>{o!==l&&i("update",o)}),(o,l)=>(L(),j("div",vT,[we(Ur,{id:"panel-check-action",modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=s=>r.value=s),"tri-state":""},null,8,["modelValue"]),ne("label",yT,xe(e.label),1)]))}};var _T={root:function(n){var t=n.instance,i=n.props;return["p-togglebutton p-component",{"p-disabled":i.disabled,"p-highlight":t.active,"p-invalid":i.invalid}]},input:"p-togglebutton-input",box:function(n){var t=n.instance;return["p-button p-component",{"p-button-icon-only":t.hasIcon&&!t.hasLabel}]},icon:function(n){var t=n.instance,i=n.props;return["p-button-icon",{"p-button-icon-left":i.iconPos==="left"&&t.label,"p-button-icon-right":i.iconPos==="right"&&t.label}]},label:"p-button-label"},wT=Rt.extend({name:"togglebutton",classes:_T}),TT={name:"BaseToggleButton",extends:qt,props:{modelValue:Boolean,onIcon:String,offIcon:String,onLabel:{type:String,default:"Yes"},offLabel:{type:String,default:"No"},iconPos:{type:String,default:"left"},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:wT,provide:function(){return{$parentInstance:this}}},Qd={name:"ToggleButton",extends:TT,inheritAttrs:!1,emits:["update:modelValue","change","focus","blur"],methods:{getPTOptions:function(n){var t=n==="root"?this.ptmi:this.ptm;return t(n,{context:{active:this.active,disabled:this.disabled}})},onChange:function(n){!this.disabled&&!this.readonly&&(this.$emit("update:modelValue",!this.modelValue),this.$emit("change",n))},onFocus:function(n){this.$emit("focus",n)},onBlur:function(n){this.$emit("blur",n)}},computed:{active:function(){return this.modelValue===!0},hasLabel:function(){return Oe.isNotEmpty(this.onLabel)&&Oe.isNotEmpty(this.offLabel)},hasIcon:function(){return this.$slots.icon||this.onIcon&&this.offIcon},label:function(){return this.hasLabel?this.modelValue?this.onLabel:this.offLabel:"&nbsp;"}},directives:{ripple:yi}},ST=["data-p-highlight","data-p-disabled"],xT=["id","value","checked","tabindex","disabled","readonly","aria-labelledby","aria-label","aria-invalid"];function ET(e,n,t,i,r,o){var l=Yn("ripple");return L(),j("div",ae({class:e.cx("root")},o.getPTOptions("root"),{"data-p-highlight":o.active,"data-p-disabled":e.disabled}),[ne("input",ae({id:e.inputId,type:"checkbox",role:"switch",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,checked:o.active,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-invalid":e.invalid||void 0,onFocus:n[0]||(n[0]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:n[1]||(n[1]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),onChange:n[2]||(n[2]=function(){return o.onChange&&o.onChange.apply(o,arguments)})},o.getPTOptions("input")),null,16,xT),gt((L(),j("div",ae({class:e.cx("box")},o.getPTOptions("box")),[Qe(e.$slots,"icon",{value:e.modelValue,class:qe(e.cx("icon"))},function(){return[e.onIcon||e.offIcon?(L(),j("span",ae({key:0,class:[e.cx("icon"),e.modelValue?e.onIcon:e.offIcon]},o.getPTOptions("icon")),null,16)):Se("",!0)]}),ne("span",ae({class:e.cx("label")},o.getPTOptions("label")),xe(o.label),17)],16)),[[l]])],16,ST)}Qd.render=ET;const CT={class:"t-flex t-items-center"},PT={__name:"VariantsToggleModeAction",props:{selected:Boolean,label:String},setup(e){const n=e,t=de(!1),i=xt();return Ve(()=>n.selected,r=>{t.value=r},{immediate:!0}),Ve(()=>i.isSingleSelectMode,r=>{t.value=r}),Ve(t,r=>{r?i.enableSingleSelectMode():i.disableSingleSelectMode()}),(r,o)=>(L(),j("div",CT,[ne("label",{for:"panel-toggle-action",class:"t-mr-2 t-text-sm t-cursor-pointer",onClick:o[0]||(o[0]=l=>t.value=!t.value)},xe(e.label),1),we(Re(Qd),{id:"panel-toggle-action",modelValue:t.value,"onUpdate:modelValue":o[1]||(o[1]=l=>t.value=l),"on-label":"On","off-label":"Off",pt:{root:({props:l,context:s})=>({class:["t-relative t-inline-flex t-w-16"]}),box:({props:l,context:s})=>({class:["t-relative t-pointer-events-none t-flex-1 t-bg-gray-200 t-outline-transparent t-border t-border-gray-200 t-rounded-md t-py-1 t-px-3","t-inline-flex t-items-center t-overflow-hidden t-text-center t-select-none","before:t-absolute before:t-left-1 before:t-top-1 before:t-z-1 before:t-w-[calc(100%-0.5rem)] before:t-h-[calc(100%-0.5rem)] before:t-rounded-[4px] before:t-transition-all before:t-shadow-xsm","t-transition-all t-duration-200","t-text-gray-500",{"before:t-bg-white":l.modelValue}]}),label:"t-relative t-flex-1 t-font-semibold t-text-sm",input:"t-w-full t-h-full t-absolute t-appearance-none t-cursor-pointer",content:""}},null,8,["modelValue","pt"])]))}},IT={class:"panel-image-action t-flex"},OT=ze({__name:"PanelImageAction",setup(e){const n=J(()=>[{id:"zoom-in",icon:"zoomIn",tooltip:"zoom_in"},{id:"zoom-out",icon:"zoomOut",tooltip:"zoom_out"},{id:"fullscreen",icon:"fullscreen",tooltip:"switch_to_fullscreen"},{id:"default",icon:"exitFullscreen",tooltip:"reset_view"}]);return(t,i)=>(L(),j("div",IT,[(L(!0),j(Ee,null,et(n.value,(r,o)=>(L(),he(Mt,{id:r.id,key:o,display:"flat",size:"small",title:t.$t(r.tooltip),icon:r.icon,class:"t-text-primary t-basis-0"},null,8,["id","title","icon"]))),128))]))}}),AT=bi(OT,[["__scopeId","data-v-30d88363"]]),LT={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"t-text-primary"},$d={__name:"LoadingSpinner",props:{background:String},setup(e){return(n,t)=>(L(),j("svg",LT,t[0]||(t[0]=[ne("path",{fill:"none",stroke:"currentColor","stroke-dasharray":"15","stroke-dashoffset":"15","stroke-linecap":"round","stroke-width":"2",d:"M12 3C16.9706 3 21 7.02944 21 12"},[ne("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"0.3s",values:"15;0"}),ne("animateTransform",{attributeName:"transform",dur:"1.5s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})],-1)])))}},RT={1:{component:"TreeView",label:"content"},2:{component:"MetadataView",label:"metadata"},3:{component:"ImageView",label:"image"},4:{component:"ContentView",label:"text"},5:{component:"AnnotationsView",label:"annotations"},6:{component:"VariantsView",label:"variants"}},jn=e=>({id:e,...RT[e]});function kT(e,n){const t=e.connector.options,i=t.default_font_size?t.default_font_size:null,r=t.min_font_size?t.min_font_size:null,o=t.max_font_size?t.max_font_size:null;return{...n,...i&&{fontSize:i},...r&&{minSize:r},...o&&{maxSize:o}}}const DT={components:{AnnotationsView:Iw,VariantsView:nT,ContentView:aT,ImageView:hT,LoadingSpinner:$d,MetadataView:N_,MessageBox:_i,PanelImageAction:AT,PanelCheckAction:bT,PanelZoomAction:mT,VariantsToggleModeAction:PT,TreeView:gw,TabView:Fd,TabPanel:Bd},props:{panel:{type:Object,default:()=>{}},panelIndex:Number,activeView:Number},setup(e,{emit:n}){const t=Ge(),i=vt(),{t:r}=tn(),{isMobile:o,onResize:l}=ia(),s=300,a=de([]),u=de(0),c=de(null),f=de(!1),h=de(1),p=de(1),g=de("0%"),y=J(()=>i.item),T=J(()=>t.config);let v;jt(()=>{v=l(()=>O(T.value.fitPanels,e.panel.width,o.value))}),dr(()=>{v&&v()}),Ve(()=>e.activeView,Z=>{u.value=Z},{immediate:!0}),Ve(()=>e.panel,({views:Z})=>{Qn(()=>E(Z))},{deep:!0,immediate:!0}),Ve(y,()=>E(e.panel.views));function E(Z){O(T.value.fitPanels,e.panel.width,o.value),a.value=[],c.value!==null&&c.value(),Z.forEach((le,oe)=>{const{component:pe}=jn(le.connector.id);switch(pe){case"ContentView":return D(le,oe,e.panelIndex);case"TreeView":return R(le);case"MetadataView":return B(le);case"ImageView":return V(le);case"AnnotationsView":return H(le,oe);case"VariantsView":return M(le);default:return $(le)}})}function O(Z,le,oe){if(oe){g.value=`${90*P(le)}vw`,p.value=0,h.value=1;return}Z?(g.value="0%",p.value=1,h.value=P(le)):(g.value=`${s*P(le)}px`,p.value=0,h.value=1)}function P(Z){return!Z||typeof Z!="number"?1:Z>10?10:Z}function D(Z,le,oe){var K;const pe={fontSize:16,minSize:14,maxSize:28},{fontSize:_e,minSize:Fe,maxSize:ge}=kT(Z,pe),{connector:Ne,label:We}=Z,{component:it}=jn(Ne.id),tt=(K=Ne.options)==null?void 0:K.type,te=N(tt),q=[{component:"PanelZoomAction",props:{min:Fe,max:ge,step:2,startValue:_e},events:{update:se=>{a.value[le].props.fontSize=se}}}];a.value=[...a.value,{component:it,label:We,props:{type:tt,url:te,fontSize:_e,panelIndex:oe},actions:q}]}function H(Z,le){var te;const oe=xt(),{connector:pe,label:_e}=Z,{component:Fe}=jn(pe.id);if(!((te=y.value)==null?void 0:te.annotationCollection))return;const Ne=!1,We={update:F=>{F!==null&&(F?oe.selectAll():oe.selectNone())}},it={init:()=>{a.value[le].actions[0].props.selected=!1}};c.value=oe.$onAction(({name:F,args:q})=>{var K,se;if(a.value.length&&((se=(K=a.value[le])==null?void 0:K.actions)!=null&&se.length)&&F==="setActiveAnnotations"){const ce=q[0],me=Object.keys(ce).length,Ce=oe.filteredAnnotations.length;let b=me>0&&me===Ce;!b&&me>0&&(b=null),a.value[le].actions[0].props.selected!==b&&(a.value[le].actions[0].props.selected=b)}});const tt=[{component:"PanelCheckAction",props:{selected:Ne,label:r("select_all")},events:We}];a.value=[...a.value,{component:Fe,label:_e,props:{...pe.options},actions:tt,events:it}]}function M(Z){const{connector:le,label:oe}=Z,{component:pe}=jn(le.id),_e=[{component:"VariantsToggleModeAction",props:{selected:!1,label:r("single_select_mode")}}];a.value=[...a.value,{component:pe,label:oe,props:{...le.options},actions:_e}]}function B(Z){const{connector:le,label:oe}=Z,{component:pe}=jn(le.id),{options:_e}=le;a.value=[...a.value,{component:pe,label:oe,props:{options:_e}}]}function R(Z){$(Z)}function V(Z){const{connector:le,label:oe}=Z,{component:pe}=jn(le.id);a.value=[...a.value,{component:pe,label:oe,props:{...le.options},actions:[{component:"PanelImageAction"}]}]}function $(Z){const{connector:le,label:oe}=Z,{component:pe}=jn(le.id);a.value=[...a.value,{component:pe,label:oe,props:{...le.options}}]}function N(Z){let le=null;return Z||([le]=y.value.content,t.setContentType(le.type.split("type=")[1])),le=y.value.content.find(oe=>oe.type.split("type=")[1]===Z),le?le.url:null}function re(Z){u.value=Z,Z!==2&&Jv(),n("active-view",u.value)}return{activeTabIndex:u,isLoading:f,tabs:a,onViewChange:re,flexBasis:g,flexGrow:h,flexShrink:p}}},MT={class:"panel-header t-py-3 t-px-4 t-flex t-justify-between t-items-center"},NT={class:"caption t-font-bold"},FT={key:0},BT={key:1},HT={class:"actions t-flex t-space-x-2"},VT={class:"panel-body t-relative t-overflow-hidden t-flex t-flex-1 t-flex-col t-bg-none"},zT={key:0,class:"t-absolute t-bottom-0 t-z-50 t-flex t-bg-gray-50 dark:t-bg-gray-800 t-w-full t-h-[93%] t-justify-center t-items-center"};function jT(e,n,t,i,r,o){const l=St("LoadingSpinner"),s=St("TabPanel"),a=St("TabView"),u=St("MessageBox");return L(),j("div",{class:"panel t-flex t-flex-col t-overflow-hidden t-rounded-lg t-bg-gray-50 dark:t-bg-gray-800 t-border dark:t-border-gray-700 t-max-h-screen md:t-h-auto",style:hn({flexBasis:i.flexBasis,flexGrow:i.flexGrow,flexShrink:i.flexShrink})},[ne("div",MT,[ne("div",NT,[t.panel.label&&i.tabs.length>1||i.tabs.length===0?(L(),j("span",FT,xe(e.$t(t.panel.label)),1)):i.tabs.length===1?(L(),j("span",BT,xe(e.$t(i.tabs[0].label)),1)):Se("",!0)]),ne("div",HT,[(L(!0),j(Ee,null,et(i.tabs,(c,f)=>(L(),j(Ee,{key:f},[(L(!0),j(Ee,null,et(c.actions,({component:h,props:p,events:g},y)=>gt((L(),he(at(h),ae({key:y,ref_for:!0},p,xa(g)),null,16)),[[Xn,f===i.activeTabIndex]])),128))],64))),128))])]),n[3]||(n[3]=ne("div",{class:"t-h-[1px] dark:t-bg-gray-600 t-bg-gray-200 t-mx-4"},null,-1)),ne("div",VT,[i.isLoading?(L(),j("div",zT,[we(l,{class:"t-text-5xl"})])):Se("",!0),i.tabs.length>1?(L(),he(a,{key:1,"active-index":i.activeTabIndex,"onUpdate:activeIndex":[n[1]||(n[1]=c=>i.activeTabIndex=c),i.onViewChange],unstyled:"",pt:{navContent:{class:["t-mx-4"]},nav:({props:c})=>({class:["t-relative t-mr-0 t-flex t-list-none t-overflow-hidden",{"t-opacity-60 t-cursor-default t-user-select-none t-select-none t-pointer-events-none":c==null?void 0:c.disabled}]}),tabpanel:{header:({parent:c,context:f})=>({class:["t-flex-1 t-relative t-text-sm","after:t-content-[''] after:t-absolute after:t-flex after:t-bottom-0 after:t-h-[2px] after:t-w-full after:t-bg-primary",{"after:t-opacity-0":c.state.d_activeIndex!==f.index},{"t-bg-primary/5 t-text-primary after:t-opacity-1":c.state.d_activeIndex===f.index}]}),headerAction:{class:["t-relative t-cursor-pointer t-border-b t-border-gray-200 dark:t-border-gray-600","t-flex t-items-center t-justify-center","t-px-3 t-pb-3 t-pt-4","t-transition-all hover:dark:t-bg-gray-600/50 hover:t-bg-gray-300/30"]},headerTitle:{class:["t-leading-none","t-whitespace-nowrap"]},content:{class:["t-overflow-auto","t-grow"]}},inkbar:()=>({class:["t-hidden"]}),root:{class:["t-flex t-flex-col t-flex-1 t-overflow-hidden t-h-full t-flex-1"]},panelContainer:{class:["t-flex t-flex-col t-flex-1 t-overflow-hidden"]}}},{default:ct(()=>[(L(!0),j(Ee,null,et(i.tabs,(c,f)=>(L(),he(s,{key:c.id,header:e.$t(c.label),unstyled:""},{default:ct(()=>[i.activeTabIndex===f?(L(),he(at(c.component),ae({key:c.id,ref_for:!0},c.props,xa(c.events),{onLoading:n[0]||(n[0]=h=>i.isLoading=h)}),null,16)):Se("",!0)]),_:2},1032,["header"]))),128))]),_:1},8,["active-index","pt","onUpdate:activeIndex"])):i.tabs.length===1?(L(),he(at(i.tabs[0].component),ae({key:i.tabs[0].id},i.tabs[0].props,{onLoading:n[2]||(n[2]=c=>i.isLoading=c)}),null,16)):(L(),he(u,{key:3,title:e.$t("config_error"),message:e.$t("no_views_configured"),type:"warning",style:{"margin-top":"5rem"}},null,8,["title","message"]))])],4)}const UT=bi(DT,[["render",jT]]),WT={class:"panels-wrapper t-flex-1 t-space-y-4 md:t-space-y-0 t-overflow-hidden"},GT={__name:"PanelsWrapper",setup(e){const{isMobile:n}=ia(),t=Ge(),i=J(()=>r.value.panels),r=J(()=>t.config),o=J(()=>t.activeViews),l=cc("container");function s(u,c){t.setActivePanelView(u,c)}function a(u){return o.value[u]}return(u,c)=>(L(),j("div",WT,[ne("div",{ref_key:"container",ref:l,class:"t-flex t-h-full t-overflow-x-auto t-pb-2 -t-mr-4 lg:t-mr-0 t-gap-4"},[(L(!0),j(Ee,null,et(i.value,(f,h)=>gt((L(),he(UT,{key:`pc${h}`,panel:f,"panel-index":h,"active-view":a(h),class:qe(["panel",{"t-mr-4":h===i.value.length-1&&Re(n)}]),onActiveView:p=>s(p,h)},null,8,["panel","panel-index","active-view","class","onActiveView"])),[[Xn,f.show]])),128))],512)]))}},KT={class:"tido"},qT={class:"t-h-full t-flex t-flex-col t-bg-gray-200 dark:t-bg-gray-900 t-text-gray-800 dark:t-text-gray-200"},ZT={key:1,class:"t-flex t-relative t-flex-1 t-justify-center t-items-center"},YT={class:"t-h-full t-w-full t-flex t-items-center t-justify-center t-border-dashed t-border-[3px] t-border-gray-400 dark:t-border-dashed dark:t-border-gray-600 t-rounded-md"},XT={name:"TIDO"},JT=ze({...XT,setup(e){const n=Ge(),t=xt(),i=vt(),{t:r,locale:o}=tn(),l=de(""),s=de(""),a=de(!0),u=J(()=>{const{collection:D,manifest:H}=f.value;return!p.value||p.value.annotationCollection&&c.value===null?!1:D?y.value!==null&&!!h.value&&!!g.value:H?!!g.value:!0}),c=J(()=>t.annotations),f=J(()=>n.config),h=J(()=>i.collection),p=J(()=>i.item),g=J(()=>i.manifest),y=J(()=>i.manifests);db(f.value.container),jt(async()=>{if(a.value=!0,await v(),s.value){a.value=!1;return}o.value=f.value.lang,P(f.value.colors.forceMode),await O()});async function T(D){await vt().initCollection(D)}async function v(){try{const D=qn("config");await n.load(D)}catch({title:D,message:H}){l.value=r("config_error"),s.value=r(H)}}async function E(D){await vt().initManifest(D)}async function O(){const{collection:D,manifest:H}=f.value;try{if(D)await T(D);else if(H)await E(H);else throw new Error(r("no_entrypoint_available"))}catch(M){await co(1e3),l.value=M.title||r("unknown_error"),s.value=M.message||r("please_try_again_later")}finally{a.value=!1}}function P(D){if(D){if(!D.match(/^[0-9a-zA-Z]{1,16}$/))return;document.querySelector(f.value.container).setAttribute("color-scheme",D)}}return(D,H)=>(L(),j("div",KT,[ne("div",qT,[we(yb),u.value?(L(),he(GT,{key:0})):(L(),j("div",ZT,[ne("div",YT,[a.value?(L(),he($d,{key:0,class:"t-text-6xl"})):(L(),j(Ee,{key:1},[s.value?(L(),he(_i,{key:0,message:s.value,title:l.value,type:"warning"},null,8,["message","title"])):Se("",!0)],64))])]))])]))}});function QT(){return Math.random().toString(36).slice(2,16)}window.Tido=function(n={}){var o;const t=sg();this.config={...n},this.app=Lp({setup(){return()=>oo(JT)}}),this.app.provide("config",this.config),this.app.use(rg),this.app.use(t),this.app.use(ht);let i=!1;this.mount=l=>{var c;if(i)throw new Error("Tido is already mounted");const s=typeof l=="string"?document.querySelector(l):l;if(!s)throw new Error("Container element not found");s.classList.add("tido-container"),this.app.mount(s);const a=QT();this.app.provide("instanceId",a);const u=document.createElement("style");u.id=a,u.innerHTML=`
      ${this.config.container||"#app"} { ${u0(((c=this.config.colors)==null?void 0:c.primary)??"#3456aa","primary")} }
    `,s.appendChild(u),i=!0};const r=((o=this.config)==null?void 0:o.container)||"#app";this.mount(r),this.setTheme=l=>{if(!l||l!=="light"&&l!=="dark")return;const s=Rd(Wr);let a=!1;l==="dark"&&(a=!0),s(a)}};