var e,t,i,n,s,r,a,o,l,A,c,u,h,d,g,p,f,m,C,I,v,B,y,b,E,w,Q,S,x,k,D,F,T,M,R,N,L,U,H,P,O,G,K,q,Y,V,W,j,J,z,X,$,Z,ee,te,ie,ne,se,re,ae,oe,le,Ae,ce,ue,he,de,ge,pe,fe,me,Ce,Ie,ve,Be,ye,be,Ee,we,Qe,_e,Se,xe,ke,De,Fe,Te,Me,Re,Ne,Le,Ue,He,Pe,Oe,Ge,Ke,qe,Ye,Ve,We,je,Je,ze,Xe,$e,Ze,et,tt,it,nt,st,rt,at,ot,lt,At,ct,ut,ht,dt,gt,pt,ft,mt,Ct,It,vt,Bt,yt,bt,Et,wt,Qt,_t,St,xt,kt,Dt,Ft,Tt,Mt,Rt,Nt,Lt,Ut,Ht,Pt,Ot,Gt,Kt,qt,Yt,Vt,Wt,jt,Jt,zt,Xt,$t,Zt,ei,ti,ii,ni,si,ri,ai,oi,li,Ai,ci,ui,hi,di,gi,pi,fi,mi,Ci,Ii,vi,Bi,yi,bi,Ei,wi,Qi,_i,Si,xi,ki,Di,Fi,Ti,Mi,Ri,Ni,Li,Ui,Hi,Pi,Oi,Gi,Ki,qi,Yi,Vi,Wi,ji,Ji,zi,Xi,$i,Zi,en,tn,nn,sn,rn,an,on,ln,An,cn,un,hn,dn,gn,pn,fn,mn,Cn,In,vn,Bn,yn,bn,En,wn,Qn,_n,Sn,xn,kn,Dn,Fn,Tn,Mn,Rn,Nn,Ln,Un,Hn,Pn,On,Gn,Kn,qn,Yn,Vn,Wn,jn,Jn,zn,Xn,$n,Zn,es,ts,is,ns,ss,rs,as,os,ls,As,cs,us,hs,ds,gs,ps,fs,ms,Cs,Is,vs,Bs,ys,bs,Es,ws,Qs,_s,Ss,xs,ks,Ds,Fs,Ts,Ms,Rs,Ns,Ls,Us,Hs,Ps,Os,Gs,Ks,qs,Ys,Vs,Ws,js,Js,zs,Xs,$s,Zs,er,tr,ir,nr,sr,rr,ar,or,lr,Ar,cr,ur,hr,dr,gr,pr,fr,mr,Cr,Ir,vr,Br,yr,br,Er,wr,Qr,_r,Sr,xr,kr,Dr,Fr,Tr,Mr,Rr,Nr,Lr,Ur,Hr,Pr,Or,Gr,Kr,qr,Yr,Vr,Wr,jr,Jr,zr,Xr,$r,Zr,ea,ta,ia,na,sa,ra,aa,oa,la,Aa,ca,ua,ha,da,ga,pa,fa,ma,Ca,Ia,va,Ba,ya,ba,Ea,wa,Qa,_a,Sa,xa,ka,Da,Fa,Ta,Ma,Ra,Na,La,Ua,Ha,Pa,Oa,Ga,Ka,qa,Ya,Va,Wa,ja,Ja,za,Xa,$a,Za,eo,to,io,no,so,ro,ao,oo,lo,Ao,co,uo,ho,go,po,fo,mo,Co,Io,vo,Bo,yo,bo,Eo,wo,Qo,_o,So,xo,ko,Do,Fo,To,Mo,Ro,No,Lo,Uo,Ho,Po,Oo,Go,Ko,qo,Yo,Vo,Wo,jo,Jo,zo,Xo,$o,Zo,el,tl,il,nl,sl,rl,al,ol,ll,Al,cl,ul,hl,dl,gl,pl,fl,ml,Cl,Il,vl,Bl,yl,bl,El,wl,Ql,_l,Sl,xl,kl,Dl,Fl,Tl,Ml,Rl,Nl,Ll,Ul,Hl,Pl,Ol,Gl,Kl,ql,Yl,Vl,Wl,jl,Jl,zl,Xl,$l,Zl,eA,tA,iA,nA,sA,rA,aA,oA,lA,AA,cA,uA,hA,dA,gA,pA,fA,mA,CA,IA,vA,BA,yA,bA,EA,wA,QA,_A,SA,xA,kA,DA,FA,TA,MA,RA,NA,LA,UA,HA,PA,OA,GA,KA,qA,YA,VA,WA,jA,JA,zA,XA,$A,ZA,ec,tc,ic,nc,sc,rc,ac,oc,lc,Ac,cc,uc,hc,dc,gc,pc,fc,mc=Object.defineProperty,Cc=e=>{throw TypeError(e)},Ic=(e,t,i)=>((e,t,i)=>t in e?mc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),vc=(e,t,i)=>t.has(e)||Cc("Cannot "+i),Bc=(e,t,i)=>(vc(e,t,"read from private field"),i?i.call(e):t.get(e)),yc=(e,t,i)=>t.has(e)?Cc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),bc=(e,t,i,n)=>(vc(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),Ec=(e,t,i)=>(vc(e,t,"access private method"),i),wc=(e,t,i,n)=>({set _(n){bc(e,t,n,i)},get _(){return Bc(e,t,n)}});
/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function Qc(e){const t=Object.create(null);for(const i of e.split(","))t[i]=1;return e=>e in t}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const i of e)if("childList"===i.type)for(const e of i.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const _c={},Sc=[],xc=()=>{},kc=()=>!1,Dc=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(// uppercase letter
e.charCodeAt(2)>122||e.charCodeAt(2)<97),Fc=e=>e.startsWith("onUpdate:"),Tc=Object.assign,Mc=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},Rc=Object.prototype.hasOwnProperty,Nc=(e,t)=>Rc.call(e,t),Lc=Array.isArray,Uc=e=>"[object Map]"===Wc(e),Hc=e=>"[object Set]"===Wc(e),Pc=e=>"[object Date]"===Wc(e),Oc=e=>"function"==typeof e,Gc=e=>"string"==typeof e,Kc=e=>"symbol"==typeof e,qc=e=>null!==e&&"object"==typeof e,Yc=e=>(qc(e)||Oc(e))&&Oc(e.then)&&Oc(e.catch),Vc=Object.prototype.toString,Wc=e=>Vc.call(e),jc=e=>"[object Object]"===Wc(e),Jc=e=>Gc(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,zc=Qc(
// the leading comma is intentional so empty string "" is also included
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xc=e=>{const t=Object.create(null);return i=>t[i]||(t[i]=e(i))},$c=/-(\w)/g,Zc=Xc((e=>e.replace($c,((e,t)=>t?t.toUpperCase():"")))),eu=/\B([A-Z])/g,tu=Xc((e=>e.replace(eu,"-$1").toLowerCase())),iu=Xc((e=>e.charAt(0).toUpperCase()+e.slice(1))),nu=Xc((e=>e?`on${iu(e)}`:"")),su=(e,t)=>!Object.is(e,t),ru=(e,...t)=>{for(let i=0;i<e.length;i++)e[i](...t)},au=(e,t,i,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:i})},ou=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let lu;const Au=()=>lu||(lu="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function cu(e){if(Lc(e)){const t={};for(let i=0;i<e.length;i++){const n=e[i],s=Gc(n)?gu(n):cu(n);if(s)for(const e in s)t[e]=s[e]}return t}if(Gc(e)||qc(e))return e}const uu=/;(?![^(]*\))/g,hu=/:([^]+)/,du=/\/\*[^]*?\*\//g;function gu(e){const t={};return e.replace(du,"").split(uu).forEach((e=>{if(e){const i=e.split(hu);i.length>1&&(t[i[0].trim()]=i[1].trim())}})),t}function pu(e){let t="";if(Gc(e))t=e;else if(Lc(e))for(let i=0;i<e.length;i++){const n=pu(e[i]);n&&(t+=n+" ")}else if(qc(e))for(const i in e)e[i]&&(t+=i+" ");return t.trim()}function fu(e){if(!e)return null;let{class:t,style:i}=e;return t&&!Gc(t)&&(e.class=pu(t)),i&&(e.style=cu(i)),e}const mu=Qc("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Cu(e){return!!e||""===e}function Iu(e,t){if(e===t)return!0;let i=Pc(e),n=Pc(t);if(i||n)return!(!i||!n)&&e.getTime()===t.getTime();if(i=Kc(e),n=Kc(t),i||n)return e===t;if(i=Lc(e),n=Lc(t),i||n)return!(!i||!n)&&function(e,t){if(e.length!==t.length)return!1;let i=!0;for(let n=0;i&&n<e.length;n++)i=Iu(e[n],t[n]);return i}(e,t);if(i=qc(e),n=qc(t),i||n){if(!i||!n)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e){const n=e.hasOwnProperty(i),s=t.hasOwnProperty(i);if(n&&!s||!n&&s||!Iu(e[i],t[i]))return!1}}return String(e)===String(t)}function vu(e,t){return e.findIndex((e=>Iu(e,t)))}const Bu=e=>!(!e||!0!==e.__v_isRef),yu=e=>Gc(e)?e:null==e?"":Lc(e)||qc(e)&&(e.toString===Vc||!Oc(e.toString))?Bu(e)?yu(e.value):JSON.stringify(e,bu,2):String(e),bu=(e,t)=>Bu(t)?bu(e,t.value):Uc(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,i],n)=>(e[Eu(t,n)+" =>"]=i,e)),{})}:Hc(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>Eu(e)))}:Kc(t)?Eu(t):!qc(t)||Lc(t)||jc(t)?t:String(t),Eu=(e,t="")=>{var i;
// Symbol.description in es2019+ so we need to cast here to pass
// the lib: es2016 check
return Kc(e)?`Symbol(${null!=(i=e.description)?i:t})`:e};
/**
* @vue/reactivity v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
let wu,Qu;class _u{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=wu,!e&&wu&&(this.index=(wu.scopes||(wu.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}
/**
   * Resumes the effect scope, including all child scopes and effects.
   */resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=wu;try{return wu=this,e()}finally{wu=t}}}
/**
   * This should only be called on non-detached scopes
   * @internal
   */on(){wu=this}
/**
   * This should only be called on non-detached scopes
   * @internal
   */off(){wu=this.parent}stop(e){if(this._active){let t,i;for(this._active=!1,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&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}function Su(e){return new _u(e)}function xu(){return wu}function ku(e,t=!1){wu&&wu.cleanups.push(e)}const Du=new WeakSet;class Fu{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,wu&&wu.active&&wu.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,Du.has(this)&&(Du.delete(this),this.trigger()))}
/**
   * @internal
   */notify(){2&this.flags&&!(32&this.flags)||8&this.flags||Nu(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,Ju(this),Hu(this);const e=Qu,t=Yu;Qu=this,Yu=!0;try{return this.fn()}finally{Pu(this),Qu=e,Yu=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)Ku(e);this.deps=this.depsTail=void 0,Ju(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?Du.add(this):this.scheduler?this.scheduler():this.runIfDirty()}
/**
   * @internal
   */runIfDirty(){Ou(this)&&this.run()}get dirty(){return Ou(this)}}let Tu,Mu,Ru=0;function Nu(e,t=!1){if(e.flags|=8,t)return e.next=Mu,void(Mu=e);e.next=Tu,Tu=e}function Lu(){Ru++}function Uu(){if(--Ru>0)return;if(Mu){let e=Mu;for(Mu=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Tu;){let i=Tu;for(Tu=void 0;i;){const n=i.next;if(i.next=void 0,i.flags&=-9,1&i.flags)try{i.trigger()}catch(t){e||(e=t)}i=n}}if(e)throw e}function Hu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Pu(e){let t,i=e.depsTail,n=i;for(;n;){const e=n.prevDep;-1===n.version?(n===i&&(i=e),Ku(n),qu(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=e}e.deps=t,e.depsTail=i}function Ou(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Gu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Gu(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===zu)return;e.globalVersion=zu;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Ou(e))return void(e.flags&=-3);const i=Qu,n=Yu;Qu=e,Yu=!0;try{Hu(e);const i=e.fn(e._value);(0===t.version||su(i,e._value))&&(e._value=i,t.version++)}catch(s){throw t.version++,s}finally{Qu=i,Yu=n,Pu(e),e.flags&=-3}}function Ku(e,t=!1){const{dep:i,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),i.subs===e&&(i.subs=n,!n&&i.computed)){i.computed.flags&=-5;for(let e=i.computed.deps;e;e=e.nextDep)Ku(e,!0)}t||--i.sc||!i.map||i.map.delete(i.key)}function qu(e){const{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}let Yu=!0;const Vu=[];function Wu(){Vu.push(Yu),Yu=!1}function ju(){const e=Vu.pop();Yu=void 0===e||e}function Ju(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=Qu;Qu=void 0;try{t()}finally{Qu=e}}}let zu=0,Xu=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class $u{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!Qu||!Yu||Qu===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==Qu)t=this.activeLink=new Xu(Qu,this),Qu.deps?(t.prevDep=Qu.depsTail,Qu.depsTail.nextDep=t,Qu.depsTail=t):Qu.deps=Qu.depsTail=t,Zu(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Qu.depsTail,t.nextDep=void 0,Qu.depsTail.nextDep=t,Qu.depsTail=t,Qu.deps===t&&(Qu.deps=e)}return t}trigger(e){this.version++,zu++,this.notify(e)}notify(e){Lu();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Uu()}}}function Zu(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Zu(e)}const i=e.dep.subs;i!==e&&(e.prevSub=i,i&&(i.nextSub=e)),e.dep.subs=e}}const eh=new WeakMap,th=Symbol(""),ih=Symbol(""),nh=Symbol("");function sh(e,t,i){if(Yu&&Qu){let t=eh.get(e);t||eh.set(e,t=new Map);let n=t.get(i);n||(t.set(i,n=new $u),n.map=t,n.key=i),n.track()}}function rh(e,t,i,n,s,r){const a=eh.get(e);if(!a)return void zu++;const o=e=>{e&&e.trigger()};if(Lu(),"clear"===t)a.forEach(o);else{const s=Lc(e),r=s&&Jc(i);if(s&&"length"===i){const e=Number(n);a.forEach(((t,i)=>{("length"===i||i===nh||!Kc(i)&&i>=e)&&o(t)}))}else switch((void 0!==i||a.has(void 0))&&o(a.get(i)),r&&o(a.get(nh)),t){case"add":s?r&&o(a.get("length")):(o(a.get(th)),Uc(e)&&o(a.get(ih)));break;case"delete":s||(o(a.get(th)),Uc(e)&&o(a.get(ih)));break;case"set":Uc(e)&&o(a.get(th))}}Uu()}function ah(e){const t=Yh(e);return t===e?t:(sh(t,0,nh),Kh(e)?t:t.map(Wh))}function oh(e){return sh(e=Yh(e),0,nh),e}const lh={__proto__:null,[Symbol.iterator](){return Ah(this,Symbol.iterator,Wh)},concat(...e){return ah(this).concat(...e.map((e=>Lc(e)?ah(e):e)))},entries(){return Ah(this,"entries",(e=>(e[1]=Wh(e[1]),e)))},every(e,t){return uh(this,"every",e,t,void 0,arguments)},filter(e,t){return uh(this,"filter",e,t,(e=>e.map(Wh)),arguments)},find(e,t){return uh(this,"find",e,t,Wh,arguments)},findIndex(e,t){return uh(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return uh(this,"findLast",e,t,Wh,arguments)},findLastIndex(e,t){return uh(this,"findLastIndex",e,t,void 0,arguments)},
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
forEach(e,t){return uh(this,"forEach",e,t,void 0,arguments)},includes(...e){return dh(this,"includes",e)},indexOf(...e){return dh(this,"indexOf",e)},join(e){return ah(this).join(e)},
// keys() iterator only reads `length`, no optimisation required
lastIndexOf(...e){return dh(this,"lastIndexOf",e)},map(e,t){return uh(this,"map",e,t,void 0,arguments)},pop(){return gh(this,"pop")},push(...e){return gh(this,"push",e)},reduce(e,...t){return hh(this,"reduce",e,t)},reduceRight(e,...t){return hh(this,"reduceRight",e,t)},shift(){return gh(this,"shift")},
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
some(e,t){return uh(this,"some",e,t,void 0,arguments)},splice(...e){return gh(this,"splice",e)},toReversed(){return ah(this).toReversed()},toSorted(e){return ah(this).toSorted(e)},toSpliced(...e){return ah(this).toSpliced(...e)},unshift(...e){return gh(this,"unshift",e)},values(){return Ah(this,"values",Wh)}};function Ah(e,t,i){const n=oh(e),s=n[t]();return n===e||Kh(e)||(s._next=s.next,s.next=()=>{const e=s._next();return e.value&&(e.value=i(e.value)),e}),s}const ch=Array.prototype;function uh(e,t,i,n,s,r){const a=oh(e),o=a!==e&&!Kh(e),l=a[t];if(l!==ch[t]){const t=l.apply(e,r);return o?Wh(t):t}let A=i;a!==e&&(o?A=function(t,n){return i.call(this,Wh(t),n,e)}:i.length>2&&(A=function(t,n){return i.call(this,t,n,e)}));const c=l.call(a,A,n);return o&&s?s(c):c}function hh(e,t,i,n){const s=oh(e);let r=i;return s!==e&&(Kh(e)?i.length>3&&(r=function(t,n,s){return i.call(this,t,n,s,e)}):r=function(t,n,s){return i.call(this,t,Wh(n),s,e)}),s[t](r,...n)}function dh(e,t,i){const n=Yh(e);sh(n,0,nh);const s=n[t](...i);return-1!==s&&!1!==s||!qh(i[0])?s:(i[0]=Yh(i[0]),n[t](...i))}function gh(e,t,i=[]){Wu(),Lu();const n=Yh(e)[t].apply(e,i);return Uu(),ju(),n}const ph=Qc("__proto__,__v_isRef,__isVue"),fh=new Set(
Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(Kc));function mh(e){Kc(e)||(e=String(e));const t=Yh(this);return sh(t,0,e),t.hasOwnProperty(e)}class Ch{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if("__v_skip"===t)return e.__v_skip;const n=this._isReadonly,s=this._isShallow;if("__v_isReactive"===t)return!n;if("__v_isReadonly"===t)return n;if("__v_isShallow"===t)return s;if("__v_raw"===t)return i===(n?s?Rh:Mh:s?Th:Fh).get(e)||// receiver is not the reactive proxy, but has the same prototype
// this means the receiver is a user proxy of the reactive proxy
Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const r=Lc(e);if(!n){let e;if(r&&(e=lh[t]))return e;if("hasOwnProperty"===t)return mh}const a=Reflect.get(e,t,
// if this is a proxy wrapping a ref, return methods using the raw ref
// as receiver so that we don't have to call `toRaw` on the ref in all
// its class methods
Jh(e)?e:i);return(Kc(t)?fh.has(t):ph(t))?a:(n||sh(e,0,t),s?a:Jh(a)?r&&Jc(t)?a:a.value:qc(a)?n?Hh(a):Lh(a):a)}}class Ih extends Ch{constructor(e=!1){super(!1,e)}set(e,t,i,n){let s=e[t];if(!this._isShallow){const t=Gh(s);if(Kh(i)||Gh(i)||(s=Yh(s),i=Yh(i)),!Lc(e)&&Jh(s)&&!Jh(i))return!t&&(s.value=i,!0)}const r=Lc(e)&&Jc(t)?Number(t)<e.length:Nc(e,t),a=Reflect.set(e,t,i,Jh(e)?e:n);return e===Yh(n)&&(r?su(i,s)&&rh(e,"set",t,i):rh(e,"add",t,i)),a}deleteProperty(e,t){const i=Nc(e,t);e[t];const n=Reflect.deleteProperty(e,t);return n&&i&&rh(e,"delete",t,void 0),n}has(e,t){const i=Reflect.has(e,t);return Kc(t)&&fh.has(t)||sh(e,0,t),i}ownKeys(e){return sh(e,0,Lc(e)?"length":th),Reflect.ownKeys(e)}}class vh extends Ch{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const Bh=new Ih,yh=new vh,bh=new Ih(!0),Eh=e=>e,wh=e=>Reflect.getPrototypeOf(e);function Qh(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function _h(e,t){const i={get(i){const n=this.__v_raw,s=Yh(n),r=Yh(i);e||(su(i,r)&&sh(s,0,i),sh(s,0,r));const{has:a}=wh(s),o=t?Eh:e?jh:Wh;return a.call(s,i)?o(n.get(i)):a.call(s,r)?o(n.get(r)):void(n!==s&&n.get(i))},get size(){const t=this.__v_raw;return!e&&sh(Yh(t),0,th),Reflect.get(t,"size",t)},has(t){const i=this.__v_raw,n=Yh(i),s=Yh(t);return e||(su(t,s)&&sh(n,0,t),sh(n,0,s)),t===s?i.has(t):i.has(t)||i.has(s)},forEach(i,n){const s=this,r=s.__v_raw,a=Yh(r),o=t?Eh:e?jh:Wh;return!e&&sh(a,0,th),r.forEach(((e,t)=>i.call(n,o(e),o(t),s)))}};Tc(i,e?{add:Qh("add"),set:Qh("set"),delete:Qh("delete"),clear:Qh("clear")}:{add(e){t||Kh(e)||Gh(e)||(e=Yh(e));const i=Yh(this);return wh(i).has.call(i,e)||(i.add(e),rh(i,"add",e,e)),this},set(e,i){t||Kh(i)||Gh(i)||(i=Yh(i));const n=Yh(this),{has:s,get:r}=wh(n);let a=s.call(n,e);a||(e=Yh(e),a=s.call(n,e));const o=r.call(n,e);return n.set(e,i),a?su(i,o)&&rh(n,"set",e,i):rh(n,"add",e,i),this},delete(e){const t=Yh(this),{has:i,get:n}=wh(t);let s=i.call(t,e);s||(e=Yh(e),s=i.call(t,e)),n&&n.call(t,e);const r=t.delete(e);return s&&rh(t,"delete",e,void 0),r},clear(){const e=Yh(this),t=0!==e.size,i=e.clear();return t&&rh(e,"clear",void 0,void 0),i}});return["keys","values","entries",Symbol.iterator].forEach((n=>{i[n]=function(e,t,i){return function(...n){const s=this.__v_raw,r=Yh(s),a=Uc(r),o="entries"===e||e===Symbol.iterator&&a,l="keys"===e&&a,A=s[e](...n),c=i?Eh:t?jh:Wh;return!t&&sh(r,0,l?ih:th),{
// iterator protocol
next(){const{value:e,done:t}=A.next();return t?{value:e,done:t}:{value:o?[c(e[0]),c(e[1])]:c(e),done:t}},
// iterable protocol
[Symbol.iterator](){return this}}}}(n,e,t)})),i}function Sh(e,t){const i=_h(e,t);return(t,n,s)=>"__v_isReactive"===n?!e:"__v_isReadonly"===n?e:"__v_raw"===n?t:Reflect.get(Nc(i,n)&&n in t?i:t,n,s)}const xh={get:Sh(!1,!1)},kh={get:Sh(!1,!0)},Dh={get:Sh(!0,!1)},Fh=new WeakMap,Th=new WeakMap,Mh=new WeakMap,Rh=new WeakMap;function Nh(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>Wc(e).slice(8,-1))(e))}function Lh(e){return Gh(e)?e:Ph(e,!1,Bh,xh,Fh)}function Uh(e){return Ph(e,!1,bh,kh,Th)}function Hh(e){return Ph(e,!0,yh,Dh,Mh)}function Ph(e,t,i,n,s){if(!qc(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=s.get(e);if(r)return r;const a=Nh(e);if(0===a)return e;const o=new Proxy(e,2===a?n:i);return s.set(e,o),o}function Oh(e){return Gh(e)?Oh(e.__v_raw):!(!e||!e.__v_isReactive)}function Gh(e){return!(!e||!e.__v_isReadonly)}function Kh(e){return!(!e||!e.__v_isShallow)}function qh(e){return!!e&&!!e.__v_raw}function Yh(e){const t=e&&e.__v_raw;return t?Yh(t):e}function Vh(e){return!Nc(e,"__v_skip")&&Object.isExtensible(e)&&au(e,"__v_skip",!0),e}const Wh=e=>qc(e)?Lh(e):e,jh=e=>qc(e)?Hh(e):e;function Jh(e){return!!e&&!0===e.__v_isRef}function zh(e){return $h(e,!1)}function Xh(e){return $h(e,!0)}function $h(e,t){return Jh(e)?e:new Zh(e,t)}class Zh{constructor(e,t){this.dep=new $u,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Yh(e),this._value=t?e:Wh(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||Kh(e)||Gh(e);e=i?e:Yh(e),su(e,t)&&(this._rawValue=e,this._value=i?e:Wh(e),this.dep.trigger())}}function ed(e){return Jh(e)?e.value:e}function td(e){return Oc(e)?e():ed(e)}const id={get:(e,t,i)=>"__v_raw"===t?e:ed(Reflect.get(e,t,i)),set:(e,t,i,n)=>{const s=e[t];return Jh(s)&&!Jh(i)?(s.value=i,!0):Reflect.set(e,t,i,n)}};function nd(e){return Oh(e)?e:new Proxy(e,id)}class sd{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new $u,{get:i,set:n}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=n}get value(){return this._value=this._get()}set value(e){this._set(e)}}function rd(e){const t=Lc(e)?new Array(e.length):{};for(const i in e)t[i]=Ad(e,i);return t}class ad{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){const i=eh.get(e);return i&&i.get(t)}(Yh(this._object),this._key)}}class od{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ld(e,t,i){return Jh(e)?e:Oc(e)?new od(e):qc(e)&&arguments.length>1?Ad(e,t,i):zh(e)}function Ad(e,t,i){const n=e[t];return Jh(n)?n:new ad(e,t,i)}class cd{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new $u(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=zu-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}
/**
   * @internal
   */notify(){if(this.flags|=16,!(8&this.flags)&&// avoid infinite self recursion
Qu!==this)return Nu(this,!0),!0}get value(){const e=this.dep.track();return Gu(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}const ud={},hd=new WeakMap;let dd;function gd(e,t,i=_c){const{immediate:n,deep:s,once:r,scheduler:a,augmentJob:o,call:l}=i,A=e=>s?e:Kh(e)||!1===s||0===s?pd(e,1):pd(e);let c,u,h,d,g=!1,p=!1;if(Jh(e)?(u=()=>e.value,g=Kh(e)):Oh(e)?(u=()=>A(e),g=!0):Lc(e)?(p=!0,g=e.some((e=>Oh(e)||Kh(e))),u=()=>e.map((e=>Jh(e)?e.value:Oh(e)?A(e):Oc(e)?l?l(e,2):e():void 0))):u=Oc(e)?t?l?()=>l(e,2):e:()=>{if(h){Wu();try{h()}finally{ju()}}const t=dd;dd=c;try{return l?l(e,3,[d]):e(d)}finally{dd=t}}:xc,t&&s){const e=u,t=!0===s?1/0:s;u=()=>pd(e(),t)}const f=xu(),m=()=>{c.stop(),f&&f.active&&Mc(f.effects,c)};if(r&&t){const e=t;t=(...t)=>{e(...t),m()}}let C=p?new Array(e.length).fill(ud):ud;const I=e=>{if(1&c.flags&&(c.dirty||e))if(t){const e=c.run();if(s||g||(p?e.some(((e,t)=>su(e,C[t]))):su(e,C))){h&&h();const i=dd;dd=c;try{const i=[e,
// pass undefined as the old value when it's changed for the first time
C===ud?void 0:p&&C[0]===ud?[]:C,d];l?l(t,3,i):
// @ts-expect-error
t(...i),C=e}finally{dd=i}}}else c.run()};return o&&o(I),c=new Fu(u),c.scheduler=a?()=>a(I,!1):I,d=e=>function(e,t=!1,i=dd){if(i){let t=hd.get(i);t||hd.set(i,t=[]),t.push(e)}}(e,!1,c),h=c.onStop=()=>{const e=hd.get(c);if(e){if(l)l(e,4);else for(const t of e)t();hd.delete(c)}},t?n?I(!0):C=c.run():a?a(I.bind(null,!0),!0):c.run(),m.pause=c.pause.bind(c),m.resume=c.resume.bind(c),m.stop=m,m}function pd(e,t=1/0,i){if(t<=0||!qc(e)||e.__v_skip)return e;if((i=i||new Set).has(e))return e;if(i.add(e),t--,Jh(e))pd(e.value,t,i);else if(Lc(e))for(let n=0;n<e.length;n++)pd(e[n],t,i);else if(Hc(e)||Uc(e))e.forEach((e=>{pd(e,t,i)}));else if(jc(e)){for(const n in e)pd(e[n],t,i);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&pd(e[n],t,i)}return e}
/**
* @vue/runtime-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function fd(e,t,i,n){try{return n?e(...n):e()}catch(s){Cd(s,t,i)}}function md(e,t,i,n){if(Oc(e)){const s=fd(e,t,i,n);return s&&Yc(s)&&s.catch((e=>{Cd(e,t,i)})),s}if(Lc(e)){const s=[];for(let r=0;r<e.length;r++)s.push(md(e[r],t,i,n));return s}}function Cd(e,t,i,n=!0){t&&t.vnode;const{errorHandler:s,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||_c;if(t){let n=t.parent;const r=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${i}`;for(;n;){const t=n.ec;if(t)for(let i=0;i<t.length;i++)if(!1===t[i](e,r,a))return;n=n.parent}if(s)return Wu(),fd(s,null,10,[e,r,a]),void ju()}!function(e,t,i,n=!0,s=!1){if(s)throw e;console.error(e)}(e,0,0,n,r)}const Id=[];let vd=-1;const Bd=[];let yd=null,bd=0;const Ed=Promise.resolve();let wd=null;function Qd(e){const t=wd||Ed;return e?t.then(this?e.bind(this):e):t}function _d(e){if(!(1&e.flags)){const t=Dd(e),i=Id[Id.length-1];!i||// fast path when the job id is larger than the tail
!(2&e.flags)&&t>=Dd(i)?Id.push(e):Id.splice(function(e){let t=vd+1,i=Id.length;for(;t<i;){const n=t+i>>>1,s=Id[n],r=Dd(s);r<e||r===e&&2&s.flags?t=n+1:i=n}return t}(t),0,e),e.flags|=1,Sd()}}function Sd(){wd||(wd=Ed.then(Fd))}function xd(e,t,i=vd+1){for(;i<Id.length;i++){const t=Id[i];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;Id.splice(i,1),i--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function kd(e){if(Bd.length){const e=[...new Set(Bd)].sort(((e,t)=>Dd(e)-Dd(t)));if(Bd.length=0,yd)return void yd.push(...e);for(yd=e,bd=0;bd<yd.length;bd++){const e=yd[bd];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}yd=null,bd=0}}const Dd=e=>null==e.id?2&e.flags?-1:1/0:e.id;function Fd(e){try{for(vd=0;vd<Id.length;vd++){const e=Id[vd];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),fd(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;vd<Id.length;vd++){const e=Id[vd];e&&(e.flags&=-2)}vd=-1,Id.length=0,kd(),wd=null,(Id.length||Bd.length)&&Fd()}}let Td=null,Md=null;function Rd(e){const t=Td;return Td=e,Md=e&&e.type.__scopeId||null,t}function Nd(e,t=Td,i){if(!t)return e;if(e._n)return e;const n=(...i)=>{n._d&&lf(-1);const s=Rd(t);let r;try{r=e(...i)}finally{Rd(s),n._d&&lf(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function Ld(e,t){if(null===Td)return e;const i=Gf(Td),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,r,a,o=_c]=t[s];e&&(Oc(e)&&(e={mounted:e,updated:e}),e.deep&&pd(r),n.push({dir:e,instance:i,value:r,oldValue:void 0,arg:a,modifiers:o}))}return e}function Ud(e,t,i,n){const s=e.dirs,r=t&&t.dirs;for(let a=0;a<s.length;a++){const o=s[a];r&&(o.oldValue=r[a].value);let l=o.dir[n];l&&(Wu(),md(l,i,8,[e.el,o,e,t]),ju())}}const Hd=Symbol("_vte"),Pd=e=>e.__isTeleport,Od=e=>e&&(e.disabled||""===e.disabled),Gd=e=>e&&(e.defer||""===e.defer),Kd=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,qd=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,Yd=(e,t)=>{const i=e&&e.to;if(Gc(i)){if(t){return t(i)}return null}return i},Vd={name:"Teleport",__isTeleport:!0,process(e,t,i,n,s,r,a,o,l,A){const{mc:c,pc:u,pbc:h,o:{insert:d,querySelector:g,createText:p,createComment:f}}=A,m=Od(t.props);let{shapeFlag:C,children:I,dynamicChildren:v}=t;if(null==e){const e=t.el=p(""),A=t.anchor=p("");d(e,i,n),d(A,i,n);const u=(e,t)=>{16&C&&(s&&s.isCE&&(s.ce._teleportTarget=e),c(I,e,t,s,r,a,o,l))},h=()=>{const e=t.target=Yd(t.props,g),i=zd(e,t,p,d);e&&("svg"!==a&&Kd(e)?a="svg":"mathml"!==a&&qd(e)&&(a="mathml"),m||(u(e,i),Jd(t,!1)))};m&&(u(i,A),Jd(t,!0)),Gd(t.props)?kp((()=>{h(),t.el.__isMounted=!0}),r):h()}else{if(Gd(t.props)&&!e.el.__isMounted)return void kp((()=>{Vd.process(e,t,i,n,s,r,a,o,l,A),delete e.el.__isMounted}),r);t.el=e.el,t.targetStart=e.targetStart;const c=t.anchor=e.anchor,d=t.target=e.target,p=t.targetAnchor=e.targetAnchor,f=Od(e.props),C=f?i:d,I=f?c:p;if("svg"===a||Kd(d)?a="svg":("mathml"===a||qd(d))&&(a="mathml"),v?(h(e.dynamicChildren,v,C,s,r,a,o),Mp(e,t,!0)):l||u(e,t,C,I,s,r,a,o,!1),m)f?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Wd(t,i,c,A,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Yd(t.props,g);e&&Wd(t,e,null,A,0)}else f&&Wd(t,d,p,A,1);Jd(t,m)}},remove(e,t,i,{um:n,o:{remove:s}},r){const{shapeFlag:a,children:o,anchor:l,targetStart:A,targetAnchor:c,target:u,props:h}=e;if(u&&(s(A),s(c)),r&&s(l),16&a){const e=r||!Od(h);for(let s=0;s<o.length;s++){const r=o[s];n(r,t,i,e,!!r.dynamicChildren)}}},move:Wd,hydrate:function(e,t,i,n,s,r,{o:{nextSibling:a,parentNode:o,querySelector:l,insert:A,createText:c}},u){const h=t.target=Yd(t.props,l);if(h){const l=Od(t.props),d=h._lpa||h.firstChild;if(16&t.shapeFlag)if(l)t.anchor=u(a(e),t,o(e),i,n,s,r),t.targetStart=d,t.targetAnchor=d&&a(d);else{t.anchor=a(e);let o=d;for(;o;){if(o&&8===o.nodeType)if("teleport start anchor"===o.data)t.targetStart=o;else if("teleport anchor"===o.data){t.targetAnchor=o,h._lpa=t.targetAnchor&&a(t.targetAnchor);break}o=a(o)}t.targetAnchor||zd(h,t,c,A),u(d&&a(d),t,h,i,n,s,r)}Jd(t,l)}return t.anchor&&a(t.anchor)}};function Wd(e,t,i,{o:{insert:n},m:s},r=2){0===r&&n(e.targetAnchor,t,i);const{el:a,anchor:o,shapeFlag:l,children:A,props:c}=e,u=2===r;if(u&&n(a,t,i),(!u||Od(c))&&16&l)for(let h=0;h<A.length;h++)s(A[h],t,i,2);u&&n(o,t,i)}const jd=Vd;function Jd(e,t){const i=e.ctx;if(i&&i.ut){let n,s;for(t?(n=e.el,s=e.anchor):(n=e.targetStart,s=e.targetAnchor);n&&n!==s;)1===n.nodeType&&n.setAttribute("data-v-owner",i.uid),n=n.nextSibling;i.ut()}}function zd(e,t,i,n){const s=t.targetStart=i(""),r=t.targetAnchor=i("");return s[Hd]=r,e&&(n(s,e),n(r,e)),r}const Xd=Symbol("_leaveCb"),$d=Symbol("_enterCb");function Zd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Eg((()=>{e.isMounted=!0})),_g((()=>{e.isUnmounting=!0})),e}const eg=[Function,Array],tg={mode:String,appear:Boolean,persisted:Boolean,
// enter
onBeforeEnter:eg,onEnter:eg,onAfterEnter:eg,onEnterCancelled:eg,
// leave
onBeforeLeave:eg,onLeave:eg,onAfterLeave:eg,onLeaveCancelled:eg,
// appear
onBeforeAppear:eg,onAppear:eg,onAfterAppear:eg,onAppearCancelled:eg},ig=e=>{const t=e.subTree;return t.component?ig(t.component):t},ng={name:"BaseTransition",props:tg,setup(e,{slots:t}){const i=kf(),n=Zd();return()=>{const s=t.default&&ug(t.default(),!0);if(!s||!s.length)return;const r=sg(s),a=Yh(e),{mode:o}=a;if(n.isLeaving)return lg(r);const l=Ag(r);if(!l)return lg(r);let A=og(l,a,n,i,(
// #11061, ensure enterHooks is fresh after clone
e=>A=e));l.type!==tf&&cg(l,A);let c=i.subTree&&Ag(i.subTree);if(c&&c.type!==tf&&!df(l,c)&&ig(i).type!==tf){let e=og(c,a,n,i);if(cg(c,e),"out-in"===o&&l.type!==tf)return n.isLeaving=!0,e.afterLeave=()=>{n.isLeaving=!1,8&i.job.flags||i.update(),delete e.afterLeave,c=void 0},lg(r);"in-out"===o&&l.type!==tf?e.delayLeave=(e,t,i)=>{ag(n,c)[String(c.key)]=c,e[Xd]=()=>{t(),e[Xd]=void 0,delete A.delayedLeave,c=void 0},A.delayedLeave=()=>{i(),delete A.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function sg(e){let t=e[0];if(e.length>1)for(const i of e)if(i.type!==tf){t=i;break}return t}const rg=ng;function ag(e,t){const{leavingVNodes:i}=e;let n=i.get(t.type);return n||(n=Object.create(null),i.set(t.type,n)),n}function og(e,t,i,n,s){const{appear:r,mode:a,persisted:o=!1,onBeforeEnter:l,onEnter:A,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:h,onLeave:d,onAfterLeave:g,onLeaveCancelled:p,onBeforeAppear:f,onAppear:m,onAfterAppear:C,onAppearCancelled:I}=t,v=String(e.key),B=ag(i,e),y=(e,t)=>{e&&md(e,n,9,t)},b=(e,t)=>{const i=t[1];y(e,t),Lc(e)?e.every((e=>e.length<=1))&&i():e.length<=1&&i()},E={mode:a,persisted:o,beforeEnter(t){let n=l;if(!i.isMounted){if(!r)return;n=f||l}t[Xd]&&t[Xd](!0
/* cancelled */);const s=B[v];s&&df(e,s)&&s.el[Xd]&&s.el[Xd](),y(n,[t])},enter(e){let t=A,n=c,s=u;if(!i.isMounted){if(!r)return;t=m||A,n=C||c,s=I||u}let a=!1;const o=e[$d]=t=>{a||(a=!0,y(t?s:n,[e]),E.delayedLeave&&E.delayedLeave(),e[$d]=void 0)};t?b(t,[e,o]):o()},leave(t,n){const s=String(e.key);if(t[$d]&&t[$d](!0
/* cancelled */),i.isUnmounting)return n();y(h,[t]);let r=!1;const a=t[Xd]=i=>{r||(r=!0,n(),y(i?p:g,[t]),t[Xd]=void 0,B[s]===e&&delete B[s])};B[s]=e,d?b(d,[t,a]):a()},clone(e){const r=og(e,t,i,n,s);return s&&s(r),r}};return E}function lg(e){if(fg(e))return(e=If(e)).children=null,e}function Ag(e){if(!fg(e))return Pd(e.type)&&e.children?sg(e.children):e;const{shapeFlag:t,children:i}=e;if(i){if(16&t)return i[0];if(32&t&&Oc(i.default))return i.default()}}function cg(e,t){6&e.shapeFlag&&e.component?(e.transition=t,cg(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ug(e,t=!1,i){let n=[],s=0;for(let r=0;r<e.length;r++){let a=e[r];const o=null==i?a.key:String(i)+String(null!=a.key?a.key:r);a.type===Zp?(128&a.patchFlag&&s++,n=n.concat(ug(a.children,t,o))):(t||a.type!==tf)&&n.push(null!=o?If(a,{key:o}):a)}if(s>1)for(let r=0;r<n.length;r++)n[r].patchFlag=-2;return n}
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function hg(e,t){return Oc(e)?
// #8236: extend call and options.name access are considered side-effects
// by Rollup, so we have to wrap it in a pure-annotated IIFE.
(()=>Tc({name:e.name},t,{setup:e}))():e}function dg(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function gg(e,t,i,n,s=!1){if(Lc(e))return void e.forEach(((e,r)=>gg(e,t&&(Lc(t)?t[r]:t),i,n,s)));if(pg(n)&&!s)return void(512&n.shapeFlag&&n.type.__asyncResolved&&n.component.subTree.component&&gg(e,t,i,n.component.subTree));const r=4&n.shapeFlag?Gf(n.component):n.el,a=s?null:r,{i:o,r:l}=e,A=t&&t.r,c=o.refs===_c?o.refs={}:o.refs,u=o.setupState,h=Yh(u),d=u===_c?()=>!1:e=>Nc(h,e);if(null!=A&&A!==l&&(Gc(A)?(c[A]=null,d(A)&&(u[A]=null)):Jh(A)&&(A.value=null)),Oc(l))fd(l,o,12,[a,c]);else{const t=Gc(l),n=Jh(l);if(t||n){const o=()=>{if(e.f){const i=t?d(l)?u[l]:c[l]:l.value;s?Lc(i)&&Mc(i,r):Lc(i)?i.includes(r)||i.push(r):t?(c[l]=[r],d(l)&&(u[l]=c[l])):(l.value=[r],e.k&&(c[e.k]=l.value))}else t?(c[l]=a,d(l)&&(u[l]=a)):n&&(l.value=a,e.k&&(c[e.k]=a))};a?(o.id=-1,kp(o,i)):o()}}}Au().requestIdleCallback,Au().cancelIdleCallback;const pg=e=>!!e.type.__asyncLoader,fg=e=>e.type.__isKeepAlive;function mg(e,t){Ig(e,"a",t)}function Cg(e,t){Ig(e,"da",t)}function Ig(e,t,i=xf){const n=e.__wdc||(e.__wdc=()=>{let t=i;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Bg(t,n,i),i){let e=i.parent;for(;e&&e.parent;)fg(e.parent.vnode)&&vg(n,t,i,e),e=e.parent}}function vg(e,t,i,n){const s=Bg(t,e,n,!0
/* prepend */);Sg((()=>{Mc(n[t],s)}),i)}function Bg(e,t,i=xf,n=!1){if(i){const s=i[e]||(i[e]=[]),r=t.__weh||(t.__weh=(...n)=>{Wu();const s=Tf(i),r=md(t,i,e,n);return s(),ju(),r});return n?s.unshift(r):s.push(r),r}}const yg=e=>(t,i=xf)=>{Lf&&"sp"!==e||Bg(e,((...e)=>t(...e)),i)},bg=yg("bm"),Eg=yg("m"),wg=yg("bu"),Qg=yg("u"),_g=yg("bum"),Sg=yg("um"),xg=yg("sp"),kg=yg("rtg"),Dg=yg("rtc");function Fg(e,t=xf){Bg("ec",e,t)}const Tg="components";function Mg(e,t){return Ug(Tg,e,!0,t)||e}const Rg=Symbol.for("v-ndc");function Ng(e){return Gc(e)?Ug(Tg,e,!1)||e:e||Rg}function Lg(e){return Ug("directives",e)}function Ug(e,t,i=!0,n=!1){const s=Td||xf;if(s){const i=s.type;if(e===Tg){const e=Kf(i,!1);if(e&&(e===t||e===Zc(t)||e===iu(Zc(t))))return i}const r=
// local registration
// check instance[type] first which is resolved for options API
Hg(s[e]||i[e],t)||// global registration
Hg(s.appContext[e],t);return!r&&n?i:r}}function Hg(e,t){return e&&(e[t]||e[Zc(t)]||e[iu(Zc(t))])}function Pg(e,t,i,n){let s;const r=i,a=Lc(e);if(a||Gc(e)){let i=!1;a&&Oh(e)&&(i=!Kh(e),e=oh(e)),s=new Array(e.length);for(let n=0,a=e.length;n<a;n++)s[n]=t(i?Wh(e[n]):e[n],n,void 0,r)}else if("number"==typeof e){s=new Array(e);for(let i=0;i<e;i++)s[i]=t(i+1,i,void 0,r)}else if(qc(e))if(e[Symbol.iterator])s=Array.from(e,((e,i)=>t(e,i,void 0,r)));else{const i=Object.keys(e);s=new Array(i.length);for(let n=0,a=i.length;n<a;n++){const a=i[n];s[n]=t(e[a],a,n,r)}}else s=[];return s}function Og(e,t){for(let i=0;i<t.length;i++){const n=t[i];if(Lc(n))for(let t=0;t<n.length;t++)e[n[t].name]=n[t].fn;else n&&(e[n.name]=n.key?(...e)=>{const t=n.fn(...e);return t&&(t.key=n.key),t}:n.fn)}return e}function Gg(e,t,i={},n,s){if(Td.ce||Td.parent&&pg(Td.parent)&&Td.parent.ce)return"default"!==t&&(i.name=t),af(),uf(Zp,null,[mf("slot",i,n&&n())],64);let r=e[t];r&&r._c&&(r._d=!1),af();const a=r&&Kg(r(i)),o=i.key||// slot content array of a dynamic conditional slot may have a branch
// key attached in the `createSlots` helper, respect that
a&&a.key,l=uf(Zp,{key:(o&&!Kc(o)?o:`_${t}`)+(// #7256 force differentiate fallback content from actual content
!a&&n?"_fb":"")},a||(n?n():[]),a&&1===e._?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),r&&r._c&&(r._d=!0),l}function Kg(e){return e.some((e=>!hf(e)||e.type!==tf&&!(e.type===Zp&&!Kg(e.children))))?e:null}const qg=e=>e?Rf(e)?Gf(e):qg(e.parent):null,Yg=
// Move PURE marker to new line to workaround compiler discarding it
// due to type annotation
Tc(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=>qg(e.parent),$root:e=>qg(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ip(e),$forceUpdate:e=>e.f||(e.f=()=>{_d(e.update)}),$nextTick:e=>e.n||(e.n=Qd.bind(e.proxy)),$watch:e=>Gp.bind(e)}),Vg=(e,t)=>e!==_c&&!e.__isScriptSetup&&Nc(e,t),Wg={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:i,setupState:n,data:s,props:r,accessCache:a,type:o,appContext:l}=e;let A;if("$"!==t[0]){const o=a[t];if(void 0!==o)switch(o){case 1:return n[t];case 2:return s[t];case 4:return i[t];case 3:return r[t]}else{if(Vg(n,t))return a[t]=1,n[t];if(s!==_c&&Nc(s,t))return a[t]=2,s[t];if(
// only cache other properties when instance has declared (thus stable)
// props
(A=e.propsOptions[0])&&Nc(A,t))return a[t]=3,r[t];if(i!==_c&&Nc(i,t))return a[t]=4,i[t];$g&&(a[t]=0)}}const c=Yg[t];let u,h;return c?("$attrs"===t&&sh(e.attrs,0,""),c(e)):
// css module (injected by vue-loader)
(u=o.__cssModules)&&(u=u[t])?u:i!==_c&&Nc(i,t)?(a[t]=4,i[t]):(
// global properties
h=l.config.globalProperties,Nc(h,t)?h[t]:void 0)},set({_:e},t,i){const{data:n,setupState:s,ctx:r}=e;return Vg(s,t)?(s[t]=i,!0):n!==_c&&Nc(n,t)?(n[t]=i,!0):!Nc(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(r[t]=i,!0))},has({_:{data:e,setupState:t,accessCache:i,ctx:n,appContext:s,propsOptions:r}},a){let o;return!!i[a]||e!==_c&&Nc(e,a)||Vg(t,a)||(o=r[0])&&Nc(o,a)||Nc(n,a)||Nc(Yg,a)||Nc(s.config.globalProperties,a)},defineProperty(e,t,i){return null!=i.get?e._.accessCache[t]=0:Nc(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}};function jg(){return zg().slots}function Jg(){return zg().attrs}function zg(){const e=kf();return e.setupContext||(e.setupContext=Of(e))}function Xg(e){return Lc(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let $g=!0;function Zg(e){const t=ip(e),i=e.proxy,n=e.ctx;$g=!1,t.beforeCreate&&ep(t.beforeCreate,e,"bc");const{
// state
data:s,computed:r,methods:a,watch:o,provide:l,inject:A,created:
// lifecycle
c,beforeMount:u,mounted:h,beforeUpdate:d,updated:g,activated:p,deactivated:f,beforeDestroy:m,beforeUnmount:C,destroyed:I,unmounted:v,render:B,renderTracked:y,renderTriggered:b,errorCaptured:E,serverPrefetch:w,expose:
// public API
Q,inheritAttrs:_,components:
// assets
S,directives:x,filters:k}=t;if(A&&function(e,t){Lc(e)&&(e=ap(e));for(const i in e){const n=e[i];let s;s=qc(n)?"default"in n?pp(n.from||i,n.default,!0):pp(n.from||i):pp(n),Jh(s)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[i]=s}}(A,n,null),a)for(const F in a){const e=a[F];Oc(e)&&(n[F]=e.bind(i))}if(s){const t=s.call(i,i);qc(t)&&(e.data=Lh(t))}if($g=!0,r)for(const F in r){const e=r[F],t=Oc(e)?e.bind(i,i):Oc(e.get)?e.get.bind(i,i):xc,s=!Oc(e)&&Oc(e.set)?e.set.bind(i):xc,a=qf({get:t,set:s});Object.defineProperty(n,F,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(o)for(const F in o)tp(o[F],n,i,F);if(l){const e=Oc(l)?l.call(i):l;Reflect.ownKeys(e).forEach((t=>{gp(t,e[t])}))}function D(e,t){Lc(t)?t.forEach((t=>e(t.bind(i)))):t&&e(t.bind(i))}if(c&&ep(c,e,"c"),D(bg,u),D(Eg,h),D(wg,d),D(Qg,g),D(mg,p),D(Cg,f),D(Fg,E),D(Dg,y),D(kg,b),D(_g,C),D(Sg,v),D(xg,w),Lc(Q))if(Q.length){const t=e.exposed||(e.exposed={});Q.forEach((e=>{Object.defineProperty(t,e,{get:()=>i[e],set:t=>i[e]=t})}))}else e.exposed||(e.exposed={});B&&e.render===xc&&(e.render=B),null!=_&&(e.inheritAttrs=_),S&&(e.components=S),x&&(e.directives=x),w&&dg(e)}function ep(e,t,i){md(Lc(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,i)}function tp(e,t,i,n){let s=n.includes(".")?Kp(i,n):()=>i[n];if(Gc(e)){const i=t[e];Oc(i)&&Pp(s,i)}else if(Oc(e))Pp(s,e.bind(i));else if(qc(e))if(Lc(e))e.forEach((e=>tp(e,t,i,n)));else{const n=Oc(e.handler)?e.handler.bind(i):t[e.handler];Oc(n)&&Pp(s,n,e)}}function ip(e){const t=e.type,{mixins:i,extends:n}=t,{mixins:s,optionsCache:r,config:{optionMergeStrategies:a}}=e.appContext,o=r.get(t);let l;return o?l=o:s.length||i||n?(l={},s.length&&s.forEach((e=>np(l,e,a,!0))),np(l,t,a)):l=t,qc(t)&&r.set(t,l),l}function np(e,t,i,n=!1){const{mixins:s,extends:r}=t;r&&np(e,r,i,!0),s&&s.forEach((t=>np(e,t,i,!0)));for(const a in t)if(n&&"expose"===a);else{const n=sp[a]||i&&i[a];e[a]=n?n(e[a],t[a]):t[a]}return e}const sp={data:rp,props:Ap,emits:Ap,
// objects
methods:lp,computed:lp,
// lifecycle
beforeCreate:op,created:op,beforeMount:op,mounted:op,beforeUpdate:op,updated:op,beforeDestroy:op,beforeUnmount:op,destroyed:op,unmounted:op,activated:op,deactivated:op,errorCaptured:op,serverPrefetch:op,
// assets
components:lp,directives:lp,
// watch
watch:function(e,t){if(!e)return t;if(!t)return e;const i=Tc(Object.create(null),e);for(const n in t)i[n]=op(e[n],t[n]);return i},
// provide / inject
provide:rp,inject:function(e,t){return lp(ap(e),ap(t))}};function rp(e,t){return t?e?function(){return Tc(Oc(e)?e.call(this,this):e,Oc(t)?t.call(this,this):t)}:t:e}function ap(e){if(Lc(e)){const t={};for(let i=0;i<e.length;i++)t[e[i]]=e[i];return t}return e}function op(e,t){return e?[...new Set([].concat(e,t))]:t}function lp(e,t){return e?Tc(Object.create(null),e,t):t}function Ap(e,t){return e?Lc(e)&&Lc(t)?[...new Set([...e,...t])]:Tc(
Object.create(null),Xg(e),Xg(null!=t?t:{})):t}function cp(){return{app:null,config:{isNativeTag:kc,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 up=0;function hp(e,t){return function(i,n=null){Oc(i)||(i=Tc({},i)),null==n||qc(n)||(n=null);const s=cp(),r=new WeakSet,a=[];let o=!1;const l=s.app={_uid:up++,_component:i,_props:n,_container:null,_context:s,_instance:null,version:Vf,get config(){return s.config},set config(e){},use:(e,...t)=>(r.has(e)||(e&&Oc(e.install)?(r.add(e),e.install(l,...t)):Oc(e)&&(r.add(e),e(l,...t))),l),mixin:e=>(s.mixins.includes(e)||s.mixins.push(e),l),component:(e,t)=>t?(s.components[e]=t,l):s.components[e],directive:(e,t)=>t?(s.directives[e]=t,l):s.directives[e],mount(r,a,A){if(!o){const c=l._ceVNode||mf(i,n);return c.appContext=s,!0===A?A="svg":!1===A&&(A=void 0),a&&t?t(c,r):e(c,r,A),o=!0,l._container=r,r.__vue_app__=l,Gf(c.component)}},onUnmount(e){a.push(e)},unmount(){o&&(md(a,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(s.provides[e]=t,l),runWithContext(e){const t=dp;dp=l;try{return e()}finally{dp=t}}};return l}}let dp=null;function gp(e,t){if(xf){let i=xf.provides;const n=xf.parent&&xf.parent.provides;n===i&&(i=xf.provides=Object.create(n)),i[e]=t}else;}function pp(e,t,i=!1){const n=xf||Td;if(n||dp){const s=dp?dp._context.provides:n?null==n.parent?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return i&&Oc(t)?t.call(n&&n.proxy):t}}const fp={},mp=()=>Object.create(fp),Cp=e=>Object.getPrototypeOf(e)===fp;function Ip(e,t,i,n){const[s,r]=e.propsOptions;let a,o=!1;if(t)for(let l in t){if(zc(l))continue;const A=t[l];let c;s&&Nc(s,c=Zc(l))?r&&r.includes(c)?(a||(a={}))[c]=A:i[c]=A:Wp(e.emitsOptions,l)||l in n&&A===n[l]||(n[l]=A,o=!0)}if(r){const t=Yh(i),n=a||_c;for(let a=0;a<r.length;a++){const o=r[a];i[o]=vp(s,t,o,n[o],e,!Nc(n,o))}}return o}function vp(e,t,i,n,s,r){const a=e[i];if(null!=a){const e=Nc(a,"default");if(e&&void 0===n){const e=a.default;if(a.type!==Function&&!a.skipFactory&&Oc(e)){const{propsDefaults:r}=s;if(i in r)n=r[i];else{const a=Tf(s);n=r[i]=e.call(null,t),a()}}else n=e;s.ce&&s.ce._setProp(i,n)}a[0
/* shouldCast */]&&(r&&!e?n=!1:!a[1
/* shouldCastTrue */]||""!==n&&n!==tu(i)||(n=!0))}return n}const Bp=new WeakMap;function yp(e,t,i=!1){const n=i?Bp:t.propsCache,s=n.get(e);if(s)return s;const r=e.props,a={},o=[];let l=!1;if(!Oc(e)){const n=e=>{l=!0;const[i,n]=yp(e,t,!0);Tc(a,i),n&&o.push(...n)};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!r&&!l)return qc(e)&&n.set(e,Sc),Sc;if(Lc(r))for(let c=0;c<r.length;c++){const e=Zc(r[c]);bp(e)&&(a[e]=_c)}else if(r)for(const c in r){const e=Zc(c);if(bp(e)){const t=r[c],i=a[e]=Lc(t)||Oc(t)?{type:t}:Tc({},t),n=i.type;let s=!1,l=!0;if(Lc(n))for(let e=0;e<n.length;++e){const t=n[e],i=Oc(t)&&t.name;if("Boolean"===i){s=!0;break}"String"===i&&(l=!1)}else s=Oc(n)&&"Boolean"===n.name;i[0
/* shouldCast */]=s,i[1
/* shouldCastTrue */]=l,(s||Nc(i,"default"))&&o.push(e)}}const A=[a,o];return qc(e)&&n.set(e,A),A}function bp(e){return"$"!==e[0]&&!zc(e)}const Ep=e=>"_"===e[0]||"$stable"===e,wp=e=>Lc(e)?e.map(yf):[yf(e)],Qp=(e,t,i)=>{if(t._n)return t;const n=Nd(((...e)=>wp(t(...e))),i);return n._c=!1,n},_p=(e,t,i)=>{const n=e._ctx;for(const s in e){if(Ep(s))continue;const i=e[s];if(Oc(i))t[s]=Qp(0,i,n);else if(null!=i){const e=wp(i);t[s]=()=>e}}},Sp=(e,t)=>{const i=wp(t);e.slots.default=()=>i},xp=(e,t,i)=>{for(const n in t)(i||"_"!==n)&&(e[n]=t[n])},kp=function(e,t){t&&t.pendingBranch?Lc(e)?t.effects.push(...e):t.effects.push(e):(Lc(i=e)?Bd.push(...i):yd&&-1===i.id?yd.splice(bd+1,0,i):1&i.flags||(Bd.push(i),i.flags|=1),Sd());var i};function Dp(e){return function(e){Au().__VUE__=!0;const{insert:t,remove:i,patchProp:n,createElement:s,createText:r,createComment:a,setText:o,setElementText:l,parentNode:A,nextSibling:c,setScopeId:u=xc,insertStaticContent:h}=e,d=(e,t,i,n=null,s=null,r=null,a=void 0,o=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!df(e,t)&&(n=O(e),N(e,s,r,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:A,ref:c,shapeFlag:u}=t;switch(A){case ef:g(e,t,i,n);break;case tf:p(e,t,i,n);break;case nf:null==e&&f(t,i,n,a);break;case Zp:Q(e,t,i,n,s,r,a,o,l);break;default:1&u?I(e,t,i,n,s,r,a,o,l):6&u?_(e,t,i,n,s,r,a,o,l):(64&u||128&u)&&A.process(e,t,i,n,s,r,a,o,l,q)}null!=c&&s&&gg(c,e&&e.ref,r,t||e,!t)},g=(e,i,n,s)=>{if(null==e)t(i.el=r(i.children),n,s);else{const t=i.el=e.el;i.children!==e.children&&o(t,i.children)}},p=(e,i,n,s)=>{null==e?t(i.el=a(i.children||""),n,s):i.el=e.el},f=(e,t,i,n)=>{[e.el,e.anchor]=h(e.children,t,i,n,e.el,e.anchor)},m=({el:e,anchor:i},n,s)=>{let r;for(;e&&e!==i;)r=c(e),t(e,n,s),e=r;t(i,n,s)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=c(e),i(e),e=n;i(t)},I=(e,t,i,n,s,r,a,o,l)=>{"svg"===t.type?a="svg":"math"===t.type&&(a="mathml"),null==e?v(t,i,n,s,r,a,o,l):b(e,t,s,r,a,o,l)},v=(e,i,r,a,o,A,c,u)=>{let h,d;const{props:g,shapeFlag:p,transition:f,dirs:m}=e;if(h=e.el=s(e.type,A,g&&g.is,g),8&p?l(h,e.children):16&p&&y(e.children,h,null,a,o,Fp(e,A),c,u),m&&Ud(e,null,a,"created"),B(h,e,e.scopeId,c,a),g){for(const e in g)"value"===e||zc(e)||n(h,e,null,g[e],A,a);"value"in g&&n(h,"value",null,g.value,A),(d=g.onVnodeBeforeMount)&&Qf(d,a,e)}m&&Ud(e,null,a,"beforeMount");const C=function(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}(o,f);C&&f.beforeEnter(h),t(h,i,r),((d=g&&g.onVnodeMounted)||C||m)&&kp((()=>{d&&Qf(d,a,e),C&&f.enter(h),m&&Ud(e,null,a,"mounted")}),o)},B=(e,t,i,n,s)=>{if(i&&u(e,i),n)for(let r=0;r<n.length;r++)u(e,n[r]);if(s){let i=s.subTree;if(t===i||$p(i.type)&&(i.ssContent===t||i.ssFallback===t)){const t=s.vnode;B(e,t,t.scopeId,t.slotScopeIds,s.parent)}}},y=(e,t,i,n,s,r,a,o,l=0)=>{for(let A=l;A<e.length;A++){const l=e[A]=o?bf(e[A]):yf(e[A]);d(null,l,t,i,n,s,r,a,o)}},b=(e,t,i,s,r,a,o)=>{const A=t.el=e.el;let{patchFlag:c,dynamicChildren:u,dirs:h}=t;c|=16&e.patchFlag;const d=e.props||_c,g=t.props||_c;let p;if(i&&Tp(i,!1),(p=g.onVnodeBeforeUpdate)&&Qf(p,i,t,e),h&&Ud(t,e,i,"beforeUpdate"),i&&Tp(i,!0),(d.innerHTML&&null==g.innerHTML||d.textContent&&null==g.textContent)&&l(A,""),u?E(e.dynamicChildren,u,A,i,s,Fp(t,r),a):o||F(e,t,A,null,i,s,Fp(t,r),a,!1),c>0){if(16&c)w(A,d,g,i,r);else if(2&c&&d.class!==g.class&&n(A,"class",null,g.class,r),4&c&&n(A,"style",d.style,g.style,r),8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const s=e[t],a=d[s],o=g[s];o===a&&"value"!==s||n(A,s,a,o,r,i)}}1&c&&e.children!==t.children&&l(A,t.children)}else o||null!=u||w(A,d,g,i,r);((p=g.onVnodeUpdated)||h)&&kp((()=>{p&&Qf(p,i,t,e),h&&Ud(t,e,i,"updated")}),s)},E=(e,t,i,n,s,r,a)=>{for(let o=0;o<t.length;o++){const l=e[o],c=t[o],u=
// oldVNode may be an errored async setup() component inside Suspense
// which will not have a mounted element
l.el&&(// - In the case of a Fragment, we need to provide the actual parent
// of the Fragment itself so it can move its children.
l.type===Zp||// - In the case of different nodes, there is going to be a replacement
// which also requires the correct parent container
!df(l,c)||// - In the case of a component, it could contain anything.
70&l.shapeFlag)?A(l.el):
// In other cases, the parent container is not actually used so we
// just pass the block element here to avoid a DOM parentNode call.
i;d(l,c,u,null,n,s,r,a,!0)}},w=(e,t,i,s,r)=>{if(t!==i){if(t!==_c)for(const a in t)zc(a)||a in i||n(e,a,t[a],null,r,s);for(const a in i){if(zc(a))continue;const o=i[a],l=t[a];o!==l&&"value"!==a&&n(e,a,l,o,r,s)}"value"in i&&n(e,"value",t.value,i.value,r)}},Q=(e,i,n,s,a,o,l,A,c)=>{const u=i.el=e?e.el:r(""),h=i.anchor=e?e.anchor:r("");let{patchFlag:d,dynamicChildren:g,slotScopeIds:p}=i;p&&(A=A?A.concat(p):p),null==e?(t(u,n,s),t(h,n,s),y(
// #10007
// such fragment like `<></>` will be compiled into
// a fragment which doesn't have a children.
// In this case fallback to an empty array
i.children||[],n,h,a,o,l,A,c)):d>0&&64&d&&g&&// #2715 the previous fragment could've been a BAILed one as a result
// of renderSlot() with no valid children
e.dynamicChildren?(E(e.dynamicChildren,g,n,a,o,l,A),(
// #2080 if the stable fragment has a key, it's a <template v-for> that may
//  get moved around. Make sure all root level vnodes inherit el.
// #2134 or if it's a component root, it may also get moved around
// as the component is being moved.
null!=i.key||a&&i===a.subTree)&&Mp(e,i,!0
/* shallow */)):F(e,i,n,h,a,o,l,A,c)},_=(e,t,i,n,s,r,a,o,l)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?s.ctx.activate(t,i,n,a,l):S(t,i,n,s,r,a,l):x(e,t,l)},S=(e,t,i,n,s,r,a)=>{const o=e.component=function(e,t,i){const n=e.type,s=(t?t.appContext:e.appContext)||_f,r={uid:Sf++,vnode:e,type:n,parent:t,appContext:s,root:null,
// to be immediately set
next:null,subTree:null,
// will be set synchronously right after creation
effect:null,update:null,
// will be set synchronously right after creation
job:null,scope:new _u(!0
/* detached */),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],
// local resolved assets
components:null,directives:null,
// resolved props and emits options
propsOptions:yp(n,s),emitsOptions:Vp(n,s),
// emit
emit:null,
// to be set immediately
emitted:null,
// props default value
propsDefaults:_c,
// inheritAttrs
inheritAttrs:n.inheritAttrs,
// state
ctx:_c,data:_c,props:_c,attrs:_c,slots:_c,refs:_c,setupState:_c,setupContext:null,
// suspense related
suspense:i,suspenseId:i?i.pendingId:0,asyncDep:null,asyncResolved:!1,
// lifecycle hooks
// not using enums here because it results in computed properties
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};r.ctx={_:r},r.root=t?t.root:r,r.emit=Yp.bind(null,r),e.ce&&e.ce(r);return r}(e,n,s);if(fg(e)&&(o.ctx.renderer=q),function(e,t=!1,i=!1){t&&Ff(t);const{props:n,children:s}=e.vnode,r=Rf(e);(function(e,t,i,n=!1){const s={},r=mp();e.propsDefaults=Object.create(null),Ip(e,t,s,r);for(const a in e.propsOptions[0])a in s||(s[a]=void 0);i?e.props=n?s:Uh(s):e.type.props?e.props=s:e.props=r,e.attrs=r})(e,n,r,t),((e,t,i)=>{const n=e.slots=mp();if(32&e.vnode.shapeFlag){const e=t._;e?(xp(n,t,i),i&&au(n,"_",e,!0)):_p(t,n)}else t&&Sp(e,t)})(e,s,i);const a=r?function(e,t){const i=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Wg);const{setup:n}=i;if(n){Wu();const i=e.setupContext=n.length>1?Of(e):null,s=Tf(e),r=fd(n,e,0,[e.props,i]),a=Yc(r);if(ju(),s(),!a&&!e.sp||pg(e)||dg(e),a){if(r.then(Mf,Mf),t)return r.then((i=>{Uf(e,i,t)})).catch((t=>{Cd(t,e,0)}));e.asyncDep=r}else Uf(e,r,t)}else Hf(e,t)}(e,t):void 0;t&&Ff(!1)}(o,!1,a),o.asyncDep){if(s&&s.registerDep(o,k,a),!e.el){const e=o.subTree=mf(tf);p(null,e,t,i)}}else k(o,e,t,i,s,r,a)},x=(e,t,i)=>{const n=t.component=e.component;if(function(e,t,i){const{props:n,children:s,component:r}=e,{props:a,children:o,patchFlag:l}=t,A=r.emitsOptions;if(t.dirs||t.transition)return!0;if(!(i&&l>=0))return!(!s&&!o||o&&o.$stable)||n!==a&&(n?!a||Xp(n,a,A):!!a);if(1024&l)return!0;if(16&l)return n?Xp(n,a,A):!!a;if(8&l){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const i=e[t];if(a[i]!==n[i]&&!Wp(A,i))return!0}}return!1}(e,t,i)){if(n.asyncDep&&!n.asyncResolved)return void D(n,t,i);n.next=t,n.update()}else t.el=e.el,n.vnode=t},k=(e,t,i,n,s,r,a)=>{const o=()=>{if(e.isMounted){let{next:t,bu:i,u:n,parent:l,vnode:c}=e;{const i=Rp(e);if(i)return t&&(t.el=c.el,D(e,t,a)),void i.asyncDep.then((()=>{e.isUnmounted||o()}))}let u,h=t;Tp(e,!1),t?(t.el=c.el,D(e,t,a)):t=c,i&&ru(i),(u=t.props&&t.props.onVnodeBeforeUpdate)&&Qf(u,l,t,c),Tp(e,!0);const g=jp(e),p=e.subTree;e.subTree=g,d(p,g,
// parent may have changed if it's in a teleport
A(p.el),
// anchor may have changed if it's in a fragment
O(p),e,s,r),t.el=g.el,null===h&&function({vnode:e,parent:t},i){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n!==e)break;(e=t.vnode).el=i,t=t.parent}}(e,g.el),n&&kp(n,s),(u=t.props&&t.props.onVnodeUpdated)&&kp((()=>Qf(u,l,t,c)),s)}else{let a;const{el:o,props:l}=t,{bm:A,m:c,parent:u,root:h,type:g}=e,p=pg(t);if(Tp(e,!1),A&&ru(A),!p&&(a=l&&l.onVnodeBeforeMount)&&Qf(a,u,t),Tp(e,!0),o&&V){const t=()=>{e.subTree=jp(e),V(o,e.subTree,e,s,null)};p&&g.__asyncHydrate?g.__asyncHydrate(o,e,t):t()}else{h.ce&&h.ce._injectChildStyle(g);const a=e.subTree=jp(e);d(null,a,i,n,e,s,r),t.el=a.el}if(c&&kp(c,s),!p&&(a=l&&l.onVnodeMounted)){const e=t;kp((()=>Qf(a,u,e)),s)}(256&t.shapeFlag||u&&pg(u.vnode)&&256&u.vnode.shapeFlag)&&e.a&&kp(e.a,s),e.isMounted=!0,t=i=n=null}};e.scope.on();const l=e.effect=new Fu(o);e.scope.off();const c=e.update=l.run.bind(l),u=e.job=l.runIfDirty.bind(l);u.i=e,u.id=e.uid,l.scheduler=()=>_d(u),Tp(e,!0),c()},D=(e,t,i)=>{t.component=e;const n=e.vnode.props;e.vnode=t,e.next=null,function(e,t,i,n){const{props:s,attrs:r,vnode:{patchFlag:a}}=e,o=Yh(s),[l]=e.propsOptions;let A=!1;if(
// always force full diff in dev
// - #1942 if hmr is enabled with sfc component
// - vite#872 non-sfc component used by sfc component
!(n||a>0)||16&a){let n;Ip(e,t,s,r)&&(A=!0);for(const r in o)t&&(// for camelCase
Nc(t,r)||// it's possible the original props was passed in as kebab-case
// and converted to camelCase (#955)
(n=tu(r))!==r&&Nc(t,n))||(l?!i||// for camelCase
void 0===i[r]&&// for kebab-case
void 0===i[n]||(s[r]=vp(l,o,r,void 0,e,!0)):delete s[r]);if(r!==o)for(const e in r)t&&Nc(t,e)||(delete r[e],A=!0)}else if(8&a){const i=e.vnode.dynamicProps;for(let n=0;n<i.length;n++){let a=i[n];if(Wp(e.emitsOptions,a))continue;const c=t[a];if(l)if(Nc(r,a))c!==r[a]&&(r[a]=c,A=!0);else{const t=Zc(a);s[t]=vp(l,o,t,c,e,!1)}else c!==r[a]&&(r[a]=c,A=!0)}}A&&rh(e.attrs,"set","")}(e,t.props,n,i),((e,t,i)=>{const{vnode:n,slots:s}=e;let r=!0,a=_c;if(32&n.shapeFlag){const e=t._;e?i&&1===e?r=!1:xp(s,t,i):(r=!t.$stable,_p(t,s)),a=t}else t&&(Sp(e,t),a={default:1});if(r)for(const o in s)Ep(o)||null!=a[o]||delete s[o]})(e,t.children,i),Wu(),xd(e),ju()},F=(e,t,i,n,s,r,a,o,A=!1)=>{const c=e&&e.children,u=e?e.shapeFlag:0,h=t.children,{patchFlag:d,shapeFlag:g}=t;if(d>0){if(128&d)return void M(c,h,i,n,s,r,a,o,A);if(256&d)return void T(c,h,i,n,s,r,a,o,A)}8&g?(16&u&&P(c,s,r),h!==c&&l(i,h)):16&u?16&g?M(c,h,i,n,s,r,a,o,A):P(c,s,r,!0):(8&u&&l(i,""),16&g&&y(h,i,n,s,r,a,o,A))},T=(e,t,i,n,s,r,a,o,l)=>{t=t||Sc;const A=(e=e||Sc).length,c=t.length,u=Math.min(A,c);let h;for(h=0;h<u;h++){const n=t[h]=l?bf(t[h]):yf(t[h]);d(e[h],n,i,null,s,r,a,o,l)}A>c?P(e,s,r,!0,!1,u):y(t,i,n,s,r,a,o,l,u)},M=(e,t,i,n,s,r,a,o,l)=>{let A=0;const c=t.length;let u=e.length-1,h=c-1;for(;A<=u&&A<=h;){const n=e[A],c=t[A]=l?bf(t[A]):yf(t[A]);if(!df(n,c))break;d(n,c,i,null,s,r,a,o,l),A++}for(;A<=u&&A<=h;){const n=e[u],A=t[h]=l?bf(t[h]):yf(t[h]);if(!df(n,A))break;d(n,A,i,null,s,r,a,o,l),u--,h--}if(A>u){if(A<=h){const e=h+1,u=e<c?t[e].el:n;for(;A<=h;)d(null,t[A]=l?bf(t[A]):yf(t[A]),i,u,s,r,a,o,l),A++}}else if(A>h)for(;A<=u;)N(e[A],s,r,!0),A++;else{const g=A,p=A,f=new Map;for(A=p;A<=h;A++){const e=t[A]=l?bf(t[A]):yf(t[A]);null!=e.key&&f.set(e.key,A)}let m,C=0;const I=h-p+1;let v=!1,B=0;const y=new Array(I);for(A=0;A<I;A++)y[A]=0;for(A=g;A<=u;A++){const n=e[A];if(C>=I){N(n,s,r,!0);continue}let c;if(null!=n.key)c=f.get(n.key);else for(m=p;m<=h;m++)if(0===y[m-p]&&df(n,t[m])){c=m;break}void 0===c?N(n,s,r,!0):(y[c-p]=A+1,c>=B?B=c:v=!0,d(n,t[c],i,null,s,r,a,o,l),C++)}const b=v?function(e){const t=e.slice(),i=[0];let n,s,r,a,o;const l=e.length;for(n=0;n<l;n++){const l=e[n];if(0!==l){if(s=i[i.length-1],e[s]<l){t[n]=s,i.push(n);continue}for(r=0,a=i.length-1;r<a;)o=r+a>>1,e[i[o]]<l?r=o+1:a=o;l<e[i[r]]&&(r>0&&(t[n]=i[r-1]),i[r]=n)}}r=i.length,a=i[r-1];for(;r-- >0;)i[r]=a,a=t[a];return i}(y):Sc;for(m=b.length-1,A=I-1;A>=0;A--){const e=p+A,u=t[e],h=e+1<c?t[e+1].el:n;0===y[A]?d(null,u,i,h,s,r,a,o,l):v&&(m<0||A!==b[m]?R(u,i,h,2):m--)}}},R=(e,i,n,s,r=null)=>{const{el:a,type:o,transition:l,children:A,shapeFlag:c}=e;if(6&c)return void R(e.component.subTree,i,n,s);if(128&c)return void e.suspense.move(i,n,s);if(64&c)return void o.move(e,i,n,q);if(o===Zp){t(a,i,n);for(let e=0;e<A.length;e++)R(A[e],i,n,s);return void t(e.anchor,i,n)}if(o===nf)return void m(e,i,n);if(2!==s&&1&c&&l)if(0===s)l.beforeEnter(a),t(a,i,n),kp((()=>l.enter(a)),r);else{const{leave:e,delayLeave:s,afterLeave:r}=l,o=()=>t(a,i,n),A=()=>{e(a,(()=>{o(),r&&r()}))};s?s(a,o,A):A()}else t(a,i,n)},N=(e,t,i,n=!1,s=!1)=>{const{type:r,props:a,ref:o,children:l,dynamicChildren:A,shapeFlag:c,patchFlag:u,dirs:h,cacheIndex:d}=e;if(-2===u&&(s=!1),null!=o&&gg(o,null,i,e,!0),null!=d&&(t.renderCache[d]=void 0),256&c)return void t.ctx.deactivate(e);const g=1&c&&h,p=!pg(e);let f;if(p&&(f=a&&a.onVnodeBeforeUnmount)&&Qf(f,t,e),6&c)H(e.component,i,n);else{if(128&c)return void e.suspense.unmount(i,n);g&&Ud(e,null,t,"beforeUnmount"),64&c?e.type.remove(e,t,i,q,n):A&&// #5154
// when v-once is used inside a block, setBlockTracking(-1) marks the
// parent block with hasOnce: true
// so that it doesn't take the fast path during unmount - otherwise
// components nested in v-once are never unmounted.
!A.hasOnce&&(// #1153: fast path should not be taken for non-stable (v-for) fragments
r!==Zp||u>0&&64&u)?P(A,t,i,!1,!0):(r===Zp&&384&u||!s&&16&c)&&P(l,t,i),n&&L(e)}(p&&(f=a&&a.onVnodeUnmounted)||g)&&kp((()=>{f&&Qf(f,t,e),g&&Ud(e,null,t,"unmounted")}),i)},L=e=>{const{type:t,el:n,anchor:s,transition:r}=e;if(t===Zp)return void U(n,s);if(t===nf)return void C(e);const a=()=>{i(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:i}=r,s=()=>t(n,a);i?i(e.el,a,s):s()}else a()},U=(e,t)=>{let n;for(;e!==t;)n=c(e),i(e),e=n;i(t)},H=(e,t,i)=>{const{bum:n,scope:s,job:r,subTree:a,um:o,m:l,a:A}=e;Np(l),Np(A),n&&ru(n),s.stop(),r&&(r.flags|=8,N(a,e,t,i)),o&&kp(o,t),kp((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},P=(e,t,i,n=!1,s=!1,r=0)=>{for(let a=r;a<e.length;a++)N(e[a],t,i,n,s)},O=e=>{if(6&e.shapeFlag)return O(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=c(e.anchor||e.el),i=t&&t[Hd];return i?c(i):t};let G=!1;const K=(e,t,i)=>{null==e?t._vnode&&N(t._vnode,null,null,!0):d(t._vnode||null,e,t,null,null,null,i),t._vnode=e,G||(G=!0,xd(),kd(),G=!1)},q={p:d,um:N,m:R,r:L,mt:S,mc:y,pc:F,pbc:E,n:O,o:e};let Y,V;return{render:K,hydrate:Y,createApp:hp(K,Y)}}(e)}function Fp({type:e,props:t},i){return"svg"===i&&"foreignObject"===e||"mathml"===i&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:i}function Tp({effect:e,job:t},i){i?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Mp(e,t,i=!1){const n=e.children,s=t.children;if(Lc(n)&&Lc(s))for(let r=0;r<n.length;r++){const e=n[r];let t=s[r];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=s[r]=bf(s[r]),t.el=e.el),i||-2===t.patchFlag||Mp(e,t)),t.type===ef&&(t.el=e.el)}}function Rp(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Rp(t)}function Np(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const Lp=Symbol.for("v-scx"),Up=()=>pp(Lp);function Hp(e,t){return Op(e,null,t)}function Pp(e,t,i){return Op(e,t,i)}function Op(e,t,i=_c){const{immediate:n,deep:s,flush:r,once:a}=i,o=Tc({},i),l=t&&n||!t&&"post"!==r;let A;if(Lf)if("sync"===r){const e=Up();A=e.__watcherHandles||(e.__watcherHandles=[])}else if(!l){const e=()=>{};return e.stop=xc,e.resume=xc,e.pause=xc,e}const c=xf;o.call=(e,t,i)=>md(e,c,t,i);let u=!1;"post"===r?o.scheduler=e=>{kp(e,c&&c.suspense)}:"sync"!==r&&(u=!0,o.scheduler=(e,t)=>{t?e():_d(e)}),o.augmentJob=e=>{t&&(e.flags|=4),u&&(e.flags|=2,c&&(e.id=c.uid,e.i=c))};const h=gd(e,t,o);return Lf&&(A?A.push(h):l&&h()),h}function Gp(e,t,i){const n=this.proxy,s=Gc(e)?e.includes(".")?Kp(n,e):()=>n[e]:e.bind(n,n);let r;Oc(t)?r=t:(r=t.handler,i=t);const a=Tf(this),o=Op(s,r.bind(n),i);return a(),o}function Kp(e,t){const i=t.split(".");return()=>{let t=e;for(let e=0;e<i.length&&t;e++)t=t[i[e]];return t}}const qp=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${Zc(t)}Modifiers`]||e[`${tu(t)}Modifiers`];function Yp(e,t,...i){if(e.isUnmounted)return;const n=e.vnode.props||_c;let s=i;const r=t.startsWith("update:"),a=r&&qp(n,t.slice(7));let o;a&&(a.trim&&(s=i.map((e=>Gc(e)?e.trim():e))),a.number&&(s=i.map(ou)));let l=n[o=nu(t)]||// also try camelCase event handler (#2249)
n[o=nu(Zc(t))];!l&&r&&(l=n[o=nu(tu(t))]),l&&md(l,e,6,s);const A=n[o+"Once"];if(A){if(e.emitted){if(e.emitted[o])return}else e.emitted={};e.emitted[o]=!0,md(A,e,6,s)}}function Vp(e,t,i=!1){const n=t.emitsCache,s=n.get(e);if(void 0!==s)return s;const r=e.emits;let a={},o=!1;if(!Oc(e)){const n=e=>{const i=Vp(e,t,!0);i&&(o=!0,Tc(a,i))};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}return r||o?(Lc(r)?r.forEach((e=>a[e]=null)):Tc(a,r),qc(e)&&n.set(e,a),a):(qc(e)&&n.set(e,null),null)}function Wp(e,t){return!(!e||!Dc(t))&&(t=t.slice(2).replace(/Once$/,""),Nc(e,t[0].toLowerCase()+t.slice(1))||Nc(e,tu(t))||Nc(e,t))}function jp(e){const{type:t,vnode:i,proxy:n,withProxy:s,propsOptions:[r],slots:a,attrs:o,emit:l,render:A,renderCache:c,props:u,data:h,setupState:d,ctx:g,inheritAttrs:p}=e,f=Rd(e);let m,C;try{if(4&i.shapeFlag){const e=s||n,t=e;m=yf(A.call(t,e,c,u,d,h,g)),C=o}else{const e=t;0,m=yf(e.length>1?e(u,{attrs:o,slots:a,emit:l}):e(u,null)),C=t.props?o:Jp(o)}}catch(v){sf.length=0,Cd(v,e,1),m=mf(tf)}let I=m;if(C&&!1!==p){const e=Object.keys(C),{shapeFlag:t}=I;e.length&&7&t&&(r&&e.some(Fc)&&(C=zp(C,r)),I=If(I,C,!1,!0))}return i.dirs&&(I=If(I,null,!1,!0),I.dirs=I.dirs?I.dirs.concat(i.dirs):i.dirs),i.transition&&cg(I,i.transition),m=I,Rd(f),m}const Jp=e=>{let t;for(const i in e)("class"===i||"style"===i||Dc(i))&&((t||(t={}))[i]=e[i]);return t},zp=(e,t)=>{const i={};for(const n in e)Fc(n)&&n.slice(9)in t||(i[n]=e[n]);return i};function Xp(e,t,i){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let s=0;s<n.length;s++){const r=n[s];if(t[r]!==e[r]&&!Wp(i,r))return!0}return!1}const $p=e=>e.__isSuspense;const Zp=Symbol.for("v-fgt"),ef=Symbol.for("v-txt"),tf=Symbol.for("v-cmt"),nf=Symbol.for("v-stc"),sf=[];let rf=null;function af(e=!1){sf.push(rf=e?null:[])}let of=1;function lf(e,t=!1){of+=e,e<0&&rf&&t&&(rf.hasOnce=!0)}function Af(e){return e.dynamicChildren=of>0?rf||Sc:null,sf.pop(),rf=sf[sf.length-1]||null,of>0&&rf&&rf.push(e),e}function cf(e,t,i,n,s,r){return Af(ff(e,t,i,n,s,r,!0))}function uf(e,t,i,n,s){return Af(mf(e,t,i,n,s,!0))}function hf(e){return!!e&&!0===e.__v_isVNode}function df(e,t){return e.type===t.type&&e.key===t.key}const gf=({key:e})=>null!=e?e:null,pf=({ref:e,ref_key:t,ref_for:i})=>("number"==typeof e&&(e=""+e),null!=e?Gc(e)||Jh(e)||Oc(e)?{i:Td,r:e,k:t,f:!!i}:e:null);function ff(e,t=null,i=null,n=0,s=null,r=(e===Zp?0:1),a=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&gf(t),ref:t&&pf(t),scopeId:Md,slotScopeIds:null,children:i,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:r,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Td};return o?(Ef(l,i),128&r&&e.normalize(l)):i&&(l.shapeFlag|=Gc(i)?8:16),of>0&&// avoid a block node from tracking itself
!a&&// has current parent block
rf&&(// presence of a patch flag indicates this node needs patching on updates.
// component nodes also should always be patched, because even if the
// component doesn't need to update, it needs to persist the instance on to
// the next vnode so that it can be properly unmounted later.
l.patchFlag>0||6&r)&&// the EVENTS flag is only for hydration and if it is the only flag, the
// vnode should not be considered dynamic due to handler caching.
32!==l.patchFlag&&rf.push(l),l}const mf=function(e,t=null,i=null,n=0,s=null,r=!1){e&&e!==Rg||(e=tf);if(hf(e)){const n=If(e,t,!0
/* mergeRef: true */);return i&&Ef(n,i),of>0&&!r&&rf&&(6&n.shapeFlag?rf[rf.indexOf(e)]=n:rf.push(n)),n.patchFlag=-2,n}a=e,Oc(a)&&"__vccOpts"in a&&(e=e.__vccOpts);var a;if(t){t=Cf(t);let{class:e,style:i}=t;e&&!Gc(e)&&(t.class=pu(e)),qc(i)&&(qh(i)&&!Lc(i)&&(i=Tc({},i)),t.style=cu(i))}const o=Gc(e)?1:$p(e)?128:Pd(e)?64:qc(e)?4:Oc(e)?2:0;return ff(e,t,i,n,s,o,r,!0)};function Cf(e){return e?qh(e)||Cp(e)?Tc({},e):e:null}function If(e,t,i=!1,n=!1){const{props:s,ref:r,patchFlag:a,children:o,transition:l}=e,A=t?wf(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:A,key:A&&gf(A),ref:t&&t.ref?
// #2078 in the case of <component :is="vnode" ref="extra"/>
// if the vnode itself already has a ref, cloneVNode will need to merge
// the refs so the single vnode can be set on multiple refs
i&&r?Lc(r)?r.concat(pf(t)):[r,pf(t)]:pf(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,
// if the vnode is cloned with extra props, we can no longer assume its
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
// note: preserve flag for fragments since they use the flag for children
// fast paths only.
patchFlag:t&&e.type!==Zp?-1===a?16:16|a:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,
// These should technically only be non-null on mounted VNodes. However,
// they *should* be copied for kept-alive vnodes. So we just always copy
// them since them being non-null during a mount doesn't affect the logic as
// they will simply be overwritten.
component:e.component,suspense:e.suspense,ssContent:e.ssContent&&If(e.ssContent),ssFallback:e.ssFallback&&If(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&cg(c,l.clone(c)),c}function vf(e=" ",t=0){return mf(ef,null,e,t)}function Bf(e="",t=!1){return t?(af(),uf(tf,null,e)):mf(tf,null,e)}function yf(e){return null==e||"boolean"==typeof e?mf(tf):Lc(e)?mf(Zp,null,
// #3666, avoid reference pollution when reusing vnode
e.slice()):hf(e)?bf(e):mf(ef,null,String(e))}function bf(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:If(e)}function Ef(e,t){let i=0;const{shapeFlag:n}=e;if(null==t)t=null;else if(Lc(t))i=16;else if("object"==typeof t){if(65&n){const i=t.default;return void(i&&(i._c&&(i._d=!1),Ef(e,i()),i._c&&(i._d=!0)))}{i=32;const n=t._;n||Cp(t)?3===n&&Td&&(1===Td.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Td}}else Oc(t)?(t={default:t,_ctx:Td},i=32):(t=String(t),64&n?(i=16,t=[vf(t)]):i=8);e.children=t,e.shapeFlag|=i}function wf(...e){const t={};for(let i=0;i<e.length;i++){const n=e[i];for(const e in n)if("class"===e)t.class!==n.class&&(t.class=pu([t.class,n.class]));else if("style"===e)t.style=cu([t.style,n.style]);else if(Dc(e)){const i=t[e],s=n[e];!s||i===s||Lc(i)&&i.includes(s)||(t[e]=i?[].concat(i,s):s)}else""!==e&&(t[e]=n[e])}return t}function Qf(e,t,i,n=null){md(e,t,7,[i,n])}const _f=cp();let Sf=0;let xf=null;const kf=()=>xf||Td;let Df,Ff;{const e=Au(),t=(t,i)=>{let n;return(n=e[t])||(n=e[t]=[]),n.push(i),e=>{n.length>1?n.forEach((t=>t(e))):n[0](e)}};Df=t("__VUE_INSTANCE_SETTERS__",(e=>xf=e)),Ff=t("__VUE_SSR_SETTERS__",(e=>Lf=e))}const Tf=e=>{const t=xf;return Df(e),e.scope.on(),()=>{e.scope.off(),Df(t)}},Mf=()=>{xf&&xf.scope.off(),Df(null)};function Rf(e){return 4&e.vnode.shapeFlag}let Nf,Lf=!1;function Uf(e,t,i){Oc(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:qc(t)&&(e.setupState=nd(t)),Hf(e,i)}function Hf(e,t,i){const n=e.type;if(!e.render){if(!t&&Nf&&!n.render){const t=n.template||ip(e).template;if(t){const{isCustomElement:i,compilerOptions:s}=e.appContext.config,{delimiters:r,compilerOptions:a}=n,o=Tc(Tc({isCustomElement:i,delimiters:r},s),a);n.render=Nf(t,o)}}e.render=n.render||xc}{const t=Tf(e);Wu();try{Zg(e)}finally{ju(),t()}}}const Pf={get:(e,t)=>(sh(e,0,""),e[t])};function Of(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,Pf),slots:e.slots,emit:e.emit,expose:t}}function Gf(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(nd(Vh(e.exposed)),{get:(t,i)=>i in t?t[i]:i in Yg?Yg[i](e):void 0,has:(e,t)=>t in e||t in Yg})):e.proxy}function Kf(e,t=!0){return Oc(e)?e.displayName||e.name:e.name||t&&e.__name}const qf=(e,t)=>{const i=function(e,t,i=!1){let n,s;return Oc(e)?n=e:(n=e.get,s=e.set),new cd(n,s,i)}(e,0,Lf);return i};function Yf(e,t,i){const n=arguments.length;return 2===n?qc(t)&&!Lc(t)?hf(t)?mf(e,null,[t]):mf(e,t):mf(e,null,t):(n>3?i=Array.prototype.slice.call(arguments,2):3===n&&hf(i)&&(i=[i]),mf(e,t,i))}const Vf="3.5.13",Wf=xc;
/**
* @vue/runtime-dom v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
let jf;const Jf="undefined"!=typeof window&&window.trustedTypes;if(Jf)try{jf=Jf.createPolicy("vue",{createHTML:e=>e})}catch(I2){}const zf=jf?e=>jf.createHTML(e):e=>e,Xf="undefined"!=typeof document?document:null,$f=Xf&&Xf.createElement("template"),Zf={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,n)=>{const s="svg"===t?Xf.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Xf.createElementNS("http://www.w3.org/1998/Math/MathML",e):i?Xf.createElement(e,{is:i}):Xf.createElement(e);return"select"===e&&n&&null!=n.multiple&&s.setAttribute("multiple",n.multiple),s},createText:e=>Xf.createTextNode(e),createComment:e=>Xf.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Xf.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},
// __UNSAFE__
// Reason: innerHTML.
// Static content here can only come from compiled templates.
// As long as the user only uses trusted templates, this is safe.
insertStaticContent(e,t,i,n,s,r){const a=i?i.previousSibling:t.lastChild;if(s&&(s===r||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),i),s!==r&&(s=s.nextSibling););else{$f.innerHTML=zf("svg"===n?`<svg>${e}</svg>`:"mathml"===n?`<math>${e}</math>`:e);const s=$f.content;if("svg"===n||"mathml"===n){const e=s.firstChild;for(;e.firstChild;)s.appendChild(e.firstChild);s.removeChild(e)}t.insertBefore(s,i)}return[
// first
a?a.nextSibling:t.firstChild,
// last
i?i.previousSibling:t.lastChild]}},em="transition",tm="animation",im=Symbol("_vtc"),nm={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},sm=Tc({},tg,nm),rm=e=>(e.displayName="Transition",e.props=sm,e),am=rm(((e,{slots:t})=>Yf(rg,Am(e),t))),om=(e,t=[])=>{Lc(e)?e.forEach((e=>e(...t))):e&&e(...t)},lm=e=>!!e&&(Lc(e)?e.some((e=>e.length>1)):e.length>1);function Am(e){const t={};for(const S in e)S in nm||(t[S]=e[S]);if(!1===e.css)return t;const{name:i="v",type:n,duration:s,enterFromClass:r=`${i}-enter-from`,enterActiveClass:a=`${i}-enter-active`,enterToClass:o=`${i}-enter-to`,appearFromClass:l=r,appearActiveClass:A=a,appearToClass:c=o,leaveFromClass:u=`${i}-leave-from`,leaveActiveClass:h=`${i}-leave-active`,leaveToClass:d=`${i}-leave-to`}=e,g=function(e){if(null==e)return null;if(qc(e))return[cm(e.enter),cm(e.leave)];{const t=cm(e);return[t,t]}}(s),p=g&&g[0],f=g&&g[1],{onBeforeEnter:m,onEnter:C,onEnterCancelled:I,onLeave:v,onLeaveCancelled:B,onBeforeAppear:y=m,onAppear:b=C,onAppearCancelled:E=I}=t,w=(e,t,i,n)=>{e._enterCancelled=n,hm(e,t?c:o),hm(e,t?A:a),i&&i()},Q=(e,t)=>{e._isLeaving=!1,hm(e,u),hm(e,d),hm(e,h),t&&t()},_=e=>(t,i)=>{const s=e?b:C,a=()=>w(t,e,i);om(s,[t,a]),dm((()=>{hm(t,e?l:r),um(t,e?c:o),lm(s)||pm(t,n,p,a)}))};return Tc(t,{onBeforeEnter(e){om(m,[e]),um(e,r),um(e,a)},onBeforeAppear(e){om(y,[e]),um(e,l),um(e,A)},onEnter:_(!1),onAppear:_(!0),onLeave(e,t){e._isLeaving=!0;const i=()=>Q(e,t);um(e,u),e._enterCancelled?(um(e,h),Im()):(Im(),um(e,h)),dm((()=>{e._isLeaving&&(hm(e,u),um(e,d),lm(v)||pm(e,n,f,i))})),om(v,[e,i])},onEnterCancelled(e){w(e,!1,void 0,!0),om(I,[e])},onAppearCancelled(e){w(e,!0,void 0,!0),om(E,[e])},onLeaveCancelled(e){Q(e),om(B,[e])}})}function cm(e){const t=(e=>{const t=Gc(e)?Number(e):NaN;return isNaN(t)?e:t})(e);return t}function um(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[im]||(e[im]=new Set)).add(t)}function hm(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const i=e[im];i&&(i.delete(t),i.size||(e[im]=void 0))}function dm(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let gm=0;function pm(e,t,i,n){const s=e._endId=++gm,r=()=>{s===e._endId&&n()};if(null!=i)return setTimeout(r,i);const{type:a,timeout:o,propCount:l}=fm(e,t);if(!a)return n();const A=a+"end";let c=0;const u=()=>{e.removeEventListener(A,h),r()},h=t=>{t.target===e&&++c>=l&&u()};setTimeout((()=>{c<l&&u()}),o+1),e.addEventListener(A,h)}function fm(e,t){const i=window.getComputedStyle(e),n=e=>(i[e]||"").split(", "),s=n(`${em}Delay`),r=n(`${em}Duration`),a=mm(s,r),o=n(`${tm}Delay`),l=n(`${tm}Duration`),A=mm(o,l);let c=null,u=0,h=0;t===em?a>0&&(c=em,u=a,h=r.length):t===tm?A>0&&(c=tm,u=A,h=l.length):(u=Math.max(a,A),c=u>0?a>A?em:tm:null,h=c?c===em?r.length:l.length:0);return{type:c,timeout:u,propCount:h,hasTransform:c===em&&/\b(transform|all)(,|$)/.test(n(`${em}Property`).toString())}}function mm(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,i)=>Cm(t)+Cm(e[i]))))}function Cm(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Im(){return document.body.offsetHeight}const vm=Symbol("_vod"),Bm=Symbol("_vsh"),ym={beforeMount(e,{value:t},{transition:i}){e[vm]="none"===e.style.display?"":e.style.display,i&&t?i.beforeEnter(e):bm(e,t)},mounted(e,{value:t},{transition:i}){i&&t&&i.enter(e)},updated(e,{value:t,oldValue:i},{transition:n}){!t!=!i&&(n?t?(n.beforeEnter(e),bm(e,!0),n.enter(e)):n.leave(e,(()=>{bm(e,!1)})):bm(e,t))},beforeUnmount(e,{value:t}){bm(e,t)}};function bm(e,t){e.style.display=t?e[vm]:"none",e[Bm]=!t}const Em=Symbol(""),wm=/(^|;)\s*display\s*:/;const Qm=/\s*!important$/;function _m(e,t,i){if(Lc(i))i.forEach((i=>_m(e,t,i)));else if(null==i&&(i=""),t.startsWith("--"))e.setProperty(t,i);else{const n=function(e,t){const i=xm[t];if(i)return i;let n=Zc(t);if("filter"!==n&&n in e)return xm[t]=n;n=iu(n);for(let s=0;s<Sm.length;s++){const i=Sm[s]+n;if(i in e)return xm[t]=i}return t}(e,t);Qm.test(i)?e.setProperty(tu(n),i.replace(Qm,""),"important"):e[n]=i}}const Sm=["Webkit","Moz","ms"],xm={};const km="http://www.w3.org/1999/xlink";function Dm(e,t,i,n,s,r=mu(t)){n&&t.startsWith("xlink:")?null==i?e.removeAttributeNS(km,t.slice(6,t.length)):e.setAttributeNS(km,t,i):null==i||r&&!Cu(i)?e.removeAttribute(t):e.setAttribute(t,r?"":Kc(i)?String(i):i)}function Fm(e,t,i,n,s){if("innerHTML"===t||"textContent"===t)return void(null!=i&&(e[t]="innerHTML"===t?zf(i):i));const r=e.tagName;if("value"===t&&"PROGRESS"!==r&&// custom elements may use _value internally
!r.includes("-")){const n="OPTION"===r?e.getAttribute("value")||"":e.value,s=null==i?
// #11647: value should be set as empty string for null and undefined,
// but <input type="checkbox"> should be set as 'on'.
"checkbox"===e.type?"on":"":String(i);return n===s&&"_value"in e||(e.value=s),null==i&&e.removeAttribute(t),void(e._value=i)}let a=!1;if(""===i||null==i){const n=typeof e[t];"boolean"===n?i=Cu(i):null==i&&"string"===n?(i="",a=!0):"number"===n&&(i=0,a=!0)}try{e[t]=i}catch(I2){}a&&e.removeAttribute(s||t)}function Tm(e,t,i,n){e.addEventListener(t,i,n)}const Mm=Symbol("_vei");function Rm(e,t,i,n,s=null){const r=e[Mm]||(e[Mm]={}),a=r[t];if(n&&a)a.value=n;else{const[i,o]=function(e){let t;if(Nm.test(e)){let i;for(t={};i=e.match(Nm);)e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}const i=":"===e[2]?e.slice(3):tu(e.slice(2));return[i,t]}(t);if(n){const a=r[t]=function(e,t){const i=e=>{if(e._vts){if(e._vts<=i.attached)return}else e._vts=Date.now();md(function(e,t){if(Lc(t)){const i=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{i.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,i.value),t,5,[e])};return i.value=e,i.attached=Hm(),i}(n,s);Tm(e,i,a,o)}else a&&(!function(e,t,i,n){e.removeEventListener(t,i,n)}(e,i,a,o),r[t]=void 0)}}const Nm=/(?:Once|Passive|Capture)$/;let Lm=0;const Um=Promise.resolve(),Hm=()=>Lm||(Um.then((()=>Lm=0)),Lm=Date.now());const Pm=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&// lowercase letter
e.charCodeAt(2)>96&&e.charCodeAt(2)<123;const Om=new WeakMap,Gm=new WeakMap,Km=Symbol("_moveCb"),qm=Symbol("_enterCb"),Ym=e=>(delete e.props.mode,e),Vm=Ym({name:"TransitionGroup",props:Tc({},sm,{tag:String,moveClass:String}),setup(e,{slots:t}){const i=kf(),n=Zd();let s,r;return Qg((()=>{if(!s.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,i){const n=e.cloneNode(),s=e[im];s&&s.forEach((e=>{e.split(/\s+/).forEach((e=>e&&n.classList.remove(e)))}));i.split(/\s+/).forEach((e=>e&&n.classList.add(e))),n.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(n);const{hasTransform:a}=fm(n);return r.removeChild(n),a}(s[0].el,i.vnode.el,t))return;s.forEach(jm),s.forEach(Jm);const n=s.filter(zm);Im(),n.forEach((e=>{const i=e.el,n=i.style;um(i,t),n.transform=n.webkitTransform=n.transitionDuration="";const s=i[Km]=e=>{e&&e.target!==i||e&&!/transform$/.test(e.propertyName)||(i.removeEventListener("transitionend",s),i[Km]=null,hm(i,t))};i.addEventListener("transitionend",s)}))})),()=>{const a=Yh(e),o=Am(a);let l=a.tag||Zp;if(s=[],r)for(let e=0;e<r.length;e++){const t=r[e];t.el&&t.el instanceof Element&&(s.push(t),cg(t,og(t,o,n,i)),Om.set(t,t.el.getBoundingClientRect()))}r=t.default?ug(t.default()):[];for(let e=0;e<r.length;e++){const t=r[e];null!=t.key&&cg(t,og(t,o,n,i))}return mf(l,null,r)}}}),Wm=Vm;function jm(e){const t=e.el;t[Km]&&t[Km](),t[qm]&&t[qm]()}function Jm(e){Gm.set(e,e.el.getBoundingClientRect())}function zm(e){const t=Om.get(e),i=Gm.get(e),n=t.left-i.left,s=t.top-i.top;if(n||s){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${n}px,${s}px)`,t.transitionDuration="0s",e}}const Xm=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Lc(t)?e=>ru(t,e):t};function $m(e){e.target.composing=!0}function Zm(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const eC=Symbol("_assign"),tC={created(e,{modifiers:{lazy:t,trim:i,number:n}},s){e[eC]=Xm(s);const r=n||s.props&&"number"===s.props.type;Tm(e,t?"change":"input",(t=>{if(t.target.composing)return;let n=e.value;i&&(n=n.trim()),r&&(n=ou(n)),e[eC](n)})),i&&Tm(e,"change",(()=>{e.value=e.value.trim()})),t||(Tm(e,"compositionstart",$m),Tm(e,"compositionend",Zm),Tm(e,"change",Zm))},
// set value on mounted so it's after min/max for type="range"
mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:i,modifiers:{lazy:n,trim:s,number:r}},a){if(e[eC]=Xm(a),e.composing)return;const o=null==t?"":t;if((!r&&"number"!==e.type||/^0\d/.test(e.value)?e.value:ou(e.value))!==o){if(document.activeElement===e&&"range"!==e.type){if(n&&t===i)return;if(s&&e.value.trim()===o)return}e.value=o}}},iC={
// #4096 array checkboxes need to be deep traversed
deep:!0,created(e,t,i){e[eC]=Xm(i),Tm(e,"change",(()=>{const t=e._modelValue,i=rC(e),n=e.checked,s=e[eC];if(Lc(t)){const e=vu(t,i),r=-1!==e;if(n&&!r)s(t.concat(i));else if(!n&&r){const i=[...t];i.splice(e,1),s(i)}}else if(Hc(t)){const e=new Set(t);n?e.add(i):e.delete(i),s(e)}else s(aC(e,n))}))},
// set initial checked on mount to wait for true-value/false-value
mounted:nC,beforeUpdate(e,t,i){e[eC]=Xm(i),nC(e,t,i)}};function nC(e,{value:t,oldValue:i},n){let s;if(e._modelValue=t,Lc(t))s=vu(t,n.props.value)>-1;else if(Hc(t))s=t.has(n.props.value);else{if(t===i)return;s=Iu(t,aC(e,!0))}e.checked!==s&&(e.checked=s)}const sC={created(e,{value:t},i){e.checked=Iu(t,i.props.value),e[eC]=Xm(i),Tm(e,"change",(()=>{e[eC](rC(e))}))},beforeUpdate(e,{value:t,oldValue:i},n){e[eC]=Xm(n),t!==i&&(e.checked=Iu(t,n.props.value))}};function rC(e){return"_value"in e?e._value:e.value}function aC(e,t){const i=t?"_trueValue":"_falseValue";return i in e?e[i]:t}const oC=["ctrl","shift","alt","meta"],lC={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&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>oC.some((i=>e[`${i}Key`]&&!t.includes(i)))},AC=(e,t)=>{const i=e._withMods||(e._withMods={}),n=t.join(".");return i[n]||(i[n]=(i,...n)=>{for(let e=0;e<t.length;e++){const n=lC[t[e]];if(n&&n(i,t))return}return e(i,...n)})},cC={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},uC=(e,t)=>{const i=e._withKeys||(e._withKeys={}),n=t.join(".");return i[n]||(i[n]=i=>{if(!("key"in i))return;const n=tu(i.key);return t.some((e=>e===n||cC[e]===n))?e(i):void 0})},hC=Tc({patchProp:(e,t,i,n,s,r)=>{const a="svg"===s;"class"===t?function(e,t,i){const n=e[im];n&&(t=(t?[t,...n]:[...n]).join(" ")),null==t?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}(e,n,a):"style"===t?function(e,t,i){const n=e.style,s=Gc(i);let r=!1;if(i&&!s){if(t)if(Gc(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==i[t]&&_m(n,t,"")}else for(const e in t)null==i[e]&&_m(n,e,"");for(const e in i)"display"===e&&(r=!0),_m(n,e,i[e])}else if(s){if(t!==i){const e=n[Em];e&&(i+=";"+e),n.cssText=i,r=wm.test(i)}}else t&&e.removeAttribute("style");vm in e&&(e[vm]=r?n.display:"",e[Bm]&&(n.display="none"))}(e,i,n):Dc(t)?Fc(t)||Rm(e,t,0,n,r):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,i,n){if(n)return"innerHTML"===t||"textContent"===t||!!(t in e&&Pm(t)&&Oc(i));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(Pm(t)&&Gc(i))return!1;return t in e}(e,t,n,a))?(Fm(e,t,n),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||Dm(e,t,n,a,0,"value"!==t)):
// #11081 force set props for possible async custom element
!e._isVueCE||!/[A-Z]/.test(t)&&Gc(n)?("true-value"===t?e._trueValue=n:"false-value"===t&&(e._falseValue=n),Dm(e,t,n,a)):Fm(e,Zc(t),n,0,t)}},Zf);let dC;function gC(){return dC||(dC=Dp(hC))}const pC=(...e)=>{gC().render(...e)},fC=(...e)=>{const t=gC().createApp(...e),{mount:i}=t;return t.mount=e=>{const n=function(e){if(Gc(e)){return document.querySelector(e)}return e}(e);if(!n)return;const s=t._component;Oc(s)||s.render||s.template||(s.template=n.innerHTML),1===n.nodeType&&(n.textContent="");const r=i(n,!1,function(e){if(e instanceof SVGElement)return"svg";if("function"==typeof MathMLElement&&e instanceof MathMLElement)return"mathml"}(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),r},t};
/*!
 * pinia v2.2.6
 * (c) 2024 Eduardo San Martin Morote
 * @license MIT
 */
let mC;const CC=e=>mC=e,IC=
/* istanbul ignore next */Symbol();function vC(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var BC,yC;(yC=BC||(BC={})).direct="direct",yC.patchObject="patch object",yC.patchFunction="patch function";const bC=()=>{};function EC(e,t,i,n=bC){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),n())};return!i&&xu()&&ku(s),s}function wC(e,...t){e.slice().forEach((e=>{e(...t)}))}const QC=e=>e(),_C=Symbol(),SC=Symbol();function xC(e,t){e instanceof Map&&t instanceof Map?t.forEach(((t,i)=>e.set(i,t))):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const i in t){if(!t.hasOwnProperty(i))continue;const n=t[i],s=e[i];vC(s)&&vC(n)&&e.hasOwnProperty(i)&&!Jh(n)&&!Oh(n)?e[i]=xC(s,n):e[i]=n}return e}const kC=
/* istanbul ignore next */Symbol();const{assign:DC}=Object;function FC(e,t,i={},n,s,r){let a;const o=DC({actions:{}},i),l={deep:!0};let A,c,u,h=[],d=[];const g=n.state.value[e];let p;function f(t){let i;A=c=!1,"function"==typeof t?(t(n.state.value[e]),i={type:BC.patchFunction,storeId:e,events:u}):(xC(n.state.value[e],t),i={type:BC.patchObject,payload:t,storeId:e,events:u});const s=p=Symbol();Qd().then((()=>{p===s&&(A=!0)})),c=!0,wC(h,i,n.state.value[e])}r||g||(n.state.value[e]={}),zh({});const m=r?function(){const{state:e}=i,t=e?e():{};this.$patch((e=>{DC(e,t)}))}:
/* istanbul ignore next */bC;const C=(t,i="")=>{if(_C in t)return t[SC]=i,t;const s=function(){CC(n);const i=Array.from(arguments),r=[],a=[];let o;wC(d,{args:i,name:s[SC],store:I,after:function(e){r.push(e)},onError:function(e){a.push(e)}});try{o=t.apply(this&&this.$id===e?this:I,i)}catch(l){throw wC(a,l),l}return o instanceof Promise?o.then((e=>(wC(r,e),e))).catch((e=>(wC(a,e),Promise.reject(e)))):(wC(r,o),o)};return s[_C]=!0,s[SC]=i,s},I=Lh({_p:n,
// _s: scope,
$id:e,$onAction:EC.bind(null,d),$patch:f,$reset:m,$subscribe(t,i={}){const s=EC(h,t,i.detached,(()=>r())),r=a.run((()=>Pp((()=>n.state.value[e]),(n=>{("sync"===i.flush?c:A)&&t({storeId:e,type:BC.direct,events:u},n)}),DC({},l,i))));return s},$dispose:function(){a.stop(),h=[],d=[],n._s.delete(e)}});n._s.set(e,I);const v=(n._a&&n._a.runWithContext||QC)((()=>n._e.run((()=>(a=Su()).run((()=>t({action:C})))))));for(const b in v){const t=v[b];if(Jh(t)&&(!Jh(y=t)||!y.effect)||Oh(t))r||(!g||vC(B=t)&&B.hasOwnProperty(kC)||(Jh(t)?t.value=g[b]:xC(t,g[b])),n.state.value[e][b]=t);else if("function"==typeof t){const e=C(t,b);v[b]=e,o.actions[b]=t}}var B,y;return DC(I,v),DC(Yh(I),v),Object.defineProperty(I,"$state",{get:()=>n.state.value[e],set:e=>{f((t=>{DC(t,e)}))}}),n._p.forEach((e=>{DC(I,a.run((()=>e({store:I,app:n._a,pinia:n,options:o}))))})),g&&r&&i.hydrate&&i.hydrate(I.$state,g),A=!0,c=!0,I}
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function TC(e,t,i){let n,s;const r="function"==typeof t;function a(e,i){(e=// in test mode, ignore the argument provided as we can always retrieve a
// pinia instance with getActivePinia()
e||(!!(xf||Td||dp)?pp(IC,null):null))&&CC(e),(e=mC)._s.has(n)||(r?FC(n,t,s,e):function(e,t,i){const{state:n,actions:s,getters:r}=t,a=i.state.value[e];let o;o=FC(e,(function(){a||(i.state.value[e]=n?n():{});const t=rd(i.state.value[e]);return DC(t,s,Object.keys(r||{}).reduce(((t,n)=>(t[n]=Vh(qf((()=>{CC(i);const t=i._s.get(e);return r[n].call(t,t)}))),t)),{}))}),t,i,0,!0)}(n,s,e));return e._s.get(n)}return"string"==typeof e?(n=e,s=r?i:t):(s=e,n=e.id),a.$id=n,a}var MC="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function RC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function NC(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),i}var LC,UC,HC={exports:{}};
/*!
 * jQuery JavaScript Library v3.7.1
 * https://jquery.com/
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2023-08-28T13:37Z
 */LC="undefined"!=typeof window?window:MC,UC=function(e,t){var i=[],n=Object.getPrototypeOf,s=i.slice,r=i.flat?function(e){return i.flat.call(e)}:function(e){return i.concat.apply([],e)},a=i.push,o=i.indexOf,l={},A=l.toString,c=l.hasOwnProperty,u=c.toString,h=u.call(Object),d={},g=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},p=function(e){return null!=e&&e===e.window},f=e.document,m={type:!0,src:!0,nonce:!0,noModule:!0};function C(e,t,i){var n,s,r=(i=i||f).createElement("script");if(r.text=e,t)for(n in m)(s=t[n]||t.getAttribute&&t.getAttribute(n))&&r.setAttribute(n,s);i.head.appendChild(r).parentNode.removeChild(r)}function I(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[A.call(e)]||"object":typeof e}var v="3.7.1",B=/HTML$/i,y=function(e,t){return new y.fn.init(e,t)};function b(e){var t=!!e&&"length"in e&&e.length,i=I(e);return!g(e)&&!p(e)&&("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e)}function E(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}y.fn=y.prototype={
// The current version of jQuery being used
jquery:v,constructor:y,
// The default length of a jQuery object is 0
length:0,toArray:function(){return s.call(this)},
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
pushStack:function(e){var t=y.merge(this.constructor(),e);return t.prevObject=this,t},
// Execute a callback for every element in the matched set.
each:function(e){return y.each(this,e)},map:function(e){return this.pushStack(y.map(this,(function(t,i){return e.call(t,i,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(y.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(y.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i<t?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},
// For internal use only.
// Behaves like an Array's method, not like a jQuery method.
push:a,sort:i.sort,splice:i.splice},y.extend=y.fn.extend=function(){var e,t,i,n,s,r,a=arguments[0]||{},o=1,l=arguments.length,A=!1;for("boolean"==typeof a&&(A=a,a=arguments[o]||{},o++),"object"==typeof a||g(a)||(a={}),o===l&&(a=this,o--);o<l;o++)if(null!=(e=arguments[o]))for(t in e)n=e[t],"__proto__"!==t&&a!==n&&(A&&n&&(y.isPlainObject(n)||(s=Array.isArray(n)))?(i=a[t],r=s&&!Array.isArray(i)?[]:s||y.isPlainObject(i)?i:{},s=!1,a[t]=y.extend(A,r,n)):void 0!==n&&(a[t]=n));return a},y.extend({
// Unique for each copy of jQuery on the page
expando:"jQuery"+(v+Math.random()).replace(/\D/g,""),
// Assume jQuery is ready without the ready module
isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,i;return!(!e||"[object Object]"!==A.call(e)||(t=n(e))&&("function"!=typeof(i=c.call(t,"constructor")&&t.constructor)||u.call(i)!==h))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},
// Evaluates a script in a provided context; falls back to the global one
// if not specified.
globalEval:function(e,t,i){C(e,{nonce:t&&t.nonce},i)},each:function(e,t){var i,n=0;if(b(e))for(i=e.length;n<i&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},
// Retrieve the text value of an array of DOM nodes
text:function(e){var t,i="",n=0,s=e.nodeType;if(!s)for(;t=e[n++];)i+=y.text(t);return 1===s||11===s?e.textContent:9===s?e.documentElement.textContent:3===s||4===s?e.nodeValue:i},
// results is for internal usage only
makeArray:function(e,t){var i=t||[];return null!=e&&(b(Object(e))?y.merge(i,"string"==typeof e?[e]:e):a.call(i,e)),i},inArray:function(e,t,i){return null==t?-1:o.call(t,e,i)},isXMLDoc:function(e){var t=e&&e.namespaceURI,i=e&&(e.ownerDocument||e).documentElement;return!B.test(t||i&&i.nodeName||"HTML")},
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
merge:function(e,t){for(var i=+t.length,n=0,s=e.length;n<i;n++)e[s++]=t[n];return e.length=s,e},grep:function(e,t,i){for(var n=[],s=0,r=e.length,a=!i;s<r;s++)!t(e[s],s)!==a&&n.push(e[s]);return n},
// arg is for internal usage only
map:function(e,t,i){var n,s,a=0,o=[];if(b(e))for(n=e.length;a<n;a++)null!=(s=t(e[a],a,i))&&o.push(s);else for(a in e)null!=(s=t(e[a],a,i))&&o.push(s);return r(o)},
// A global GUID counter for objects
guid:1,
// jQuery.support is not used in Core but other projects attach their
// properties to it so it needs to exist.
support:d}),"function"==typeof Symbol&&(y.fn[Symbol.iterator]=i[Symbol.iterator]),y.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){l["[object "+t+"]"]=t.toLowerCase()}));var w=i.pop,Q=i.sort,_=i.splice,S="[\\x20\\t\\r\\n\\f]",x=new RegExp("^"+S+"+|((?:^|[^\\\\])(?:\\\\.)*)"+S+"+$","g");y.contains=function(e,t){var i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||// Support: IE 9 - 11+
// IE doesn't have `contains` on SVG.
!(e.contains?e.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))};var k=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function D(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}y.escapeSelector=function(e){return(e+"").replace(k,D)};var F=f,T=a;!function(){var t,n,r,a,l,A,u,h,g,p,f=T,m=y.expando,C=0,I=0,v=ee(),B=ee(),b=ee(),k=ee(),D=function(e,t){return e===t&&(l=!0),0},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="(?:\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",N="\\["+S+"*("+R+")(?:"+S+// Operator (capture 2)
"*([*^$|!~]?=)"+S+// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+S+"*\\]",L=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",U=new RegExp(S+"+","g"),H=new RegExp("^"+S+"*,"+S+"*"),P=new RegExp("^"+S+"*([>+~]|"+S+")"+S+"*"),O=new RegExp(S+"|>"),G=new RegExp(L),K=new RegExp("^"+R+"$"),q={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+L),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+S+"*(even|odd|(([+-]|)(\\d*)n|)"+S+"*(?:([+-]|)"+S+"*(\\d+)|))"+S+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),
// For use in libraries implementing .is()
// We use this for POS matching in `select`
needsContext:new RegExp("^"+S+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+S+"*((?:-\\d)?\\d*)"+S+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,W=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,j=/[+~]/,J=new RegExp("\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\([^\\r\\n\\f])","g"),z=function(e,t){var i="0x"+e.slice(1)-65536;return t||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},X=function(){le()},$=he((function(e){return!0===e.disabled&&E(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{f.apply(i=s.call(F.childNodes),F.childNodes),i[F.childNodes.length].nodeType}catch(I2){f={apply:function(e,t){T.apply(e,s.call(t))},call:function(e){T.apply(e,s.call(arguments,1))}}}function Z(e,t,i,n){var s,r,a,o,l,c,u,p=t&&t.ownerDocument,C=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==C&&9!==C&&11!==C)return i;if(!n&&(le(t),t=t||A,h)){if(11!==C&&(l=W.exec(e)))if(s=l[1]){if(9===C){if(!(a=t.getElementById(s)))return i;if(a.id===s)return f.call(i,a),i}else if(p&&(a=p.getElementById(s))&&Z.contains(t,a)&&a.id===s)return f.call(i,a),i}else{if(l[2])return f.apply(i,t.getElementsByTagName(e)),i;if((s=l[3])&&t.getElementsByClassName)return f.apply(i,t.getElementsByClassName(s)),i}if(!(k[e+" "]||g&&g.test(e))){if(u=e,p=t,1===C&&(O.test(e)||P.test(e))){for((p=j.test(e)&&oe(t.parentNode)||t)==t&&d.scope||((o=t.getAttribute("id"))?o=y.escapeSelector(o):t.setAttribute("id",o=m)),r=(c=ce(e)).length;r--;)c[r]=(o?"#"+o:":scope")+" "+ue(c[r]);u=c.join(",")}try{return f.apply(i,p.querySelectorAll(u)),i}catch(I){k(e,!0)}finally{o===m&&t.removeAttribute("id")}}}return Ce(e.replace(x,"$1"),t,i,n)}function ee(){var e=[];return function t(i,s){return e.push(i+" ")>n.cacheLength&&delete t[e.shift()],t[i+" "]=s}}function te(e){return e[m]=!0,e}function ie(e){var t=A.createElement("fieldset");try{return!!e(t)}catch(I2){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ne(e){return function(t){return E(t,"input")&&t.type===e}}function se(e){return function(t){return(E(t,"input")||E(t,"button"))&&t.type===e}}function re(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||// Where there is no isDisabled, check manually
t.isDisabled!==!e&&$(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te((function(t){return t=+t,te((function(i,n){for(var s,r=e([],i.length,t),a=r.length;a--;)i[s=r[a]]&&(i[s]=!(n[s]=i[s]))}))}))}function oe(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var t,i=e?e.ownerDocument||e:F;return i!=A&&9===i.nodeType&&i.documentElement?(u=(A=i).documentElement,h=!y.isXMLDoc(A),p=u.matches||u.webkitMatchesSelector||u.msMatchesSelector,u.msMatchesSelector&&// Support: IE 11+, Edge 17 - 18+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
// two documents; shallow comparisons work.
// eslint-disable-next-line eqeqeq
F!=A&&(t=A.defaultView)&&t.top!==t&&t.addEventListener("unload",X),d.getById=ie((function(e){return u.appendChild(e).id=y.expando,!A.getElementsByName||!A.getElementsByName(y.expando).length})),d.disconnectedMatch=ie((function(e){return p.call(e,"*")})),d.scope=ie((function(){return A.querySelectorAll(":scope")})),d.cssHas=ie((function(){try{return A.querySelector(":has(*,:jqfake)"),!1}catch(I2){return!0}})),d.getById?(n.filter.ID=function(e){var t=e.replace(J,z);return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var i=t.getElementById(e);return i?[i]:[]}}):(n.filter.ID=function(e){var t=e.replace(J,z);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var i,n,s,r=t.getElementById(e);if(r){if((i=r.getAttributeNode("id"))&&i.value===e)return[r];for(s=t.getElementsByName(e),n=0;r=s[n++];)if((i=r.getAttributeNode("id"))&&i.value===e)return[r]}return[]}}),n.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},n.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&h)return t.getElementsByClassName(e)},g=[],ie((function(e){var t;u.appendChild(e).innerHTML="<a id='"+m+"' href='' disabled='disabled'></a><select id='"+m+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+S+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+m+"-]").length||g.push("~="),e.querySelectorAll("a#"+m+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll(":checked").length||g.push(":checked"),(t=A.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),u.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),(t=A.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+S+"*name"+S+"*="+S+"*(?:''|\"\")")})),d.cssHas||g.push(":has"),g=g.length&&new RegExp(g.join("|")),D=function(e,t){if(e===t)return l=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):
// Otherwise we know they are disconnected
1)||!d.sortDetached&&t.compareDocumentPosition(e)===i?e===A||e.ownerDocument==F&&Z.contains(F,e)?-1:t===A||t.ownerDocument==F&&Z.contains(F,t)?1:a?o.call(a,e)-o.call(a,t):0:4&i?-1:1)},A):A}for(t in Z.matches=function(e,t){return Z(e,null,null,t)},Z.matchesSelector=function(e,t){if(le(e),h&&!k[t+" "]&&(!g||!g.test(t)))try{var i=p.call(e,t);if(i||d.disconnectedMatch||// As well, disconnected nodes are said to be in a document
// fragment in IE 9
e.document&&11!==e.document.nodeType)return i}catch(I2){k(t,!0)}return Z(t,A,null,[e]).length>0},Z.contains=function(e,t){return(e.ownerDocument||e)!=A&&le(e),y.contains(e,t)},Z.attr=function(e,t){(e.ownerDocument||e)!=A&&le(e);var i=n.attrHandle[t.toLowerCase()],s=i&&c.call(n.attrHandle,t.toLowerCase())?i(e,t,!h):void 0;return void 0!==s?s:e.getAttribute(t)},Z.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},y.uniqueSort=function(e){var t,i=[],n=0,r=0;if(l=!d.sortStable,a=!d.sortStable&&s.call(e,0),Q.call(e,D),l){for(;t=e[r++];)t===e[r]&&(n=i.push(r));for(;n--;)_.call(e,i[n],1)}return a=null,e},y.fn.uniqueSort=function(){return this.pushStack(y.uniqueSort(s.apply(this)))},(n=y.expr={
// Can be adjusted by the user
cacheLength:50,createPseudo:te,match:q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(J,z),e[3]=(e[3]||e[4]||e[5]||"").replace(J,z),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Z.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Z.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&G.test(i)&&(// Get excess from tokenize (recursively)
t=ce(i,!0))&&(// advance to the next closing parenthesis
t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(J,z).toLowerCase();return"*"===e?function(){return!0}:function(e){return E(e,t)}},CLASS:function(e){var t=v[e+" "];return t||(t=new RegExp("(^|"+S+")"+e+"("+S+"|$)"))&&v(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,i){return function(n){var s=Z.attr(n,e);return null==s?"!="===t:!t||(s+="","="===t?s===i:"!="===t?s!==i:"^="===t?i&&0===s.indexOf(i):"*="===t?i&&s.indexOf(i)>-1:"$="===t?i&&s.slice(-i.length)===i:"~="===t?(" "+s.replace(U," ")+" ").indexOf(i)>-1:"|="===t&&(s===i||s.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,i,n,s){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),o="of-type"===t;return 1===n&&0===s?
// Shortcut for :nth-*(n)
function(e){return!!e.parentNode}:function(t,i,l){var A,c,u,h,d,g=r!==a?"nextSibling":"previousSibling",p=t.parentNode,f=o&&t.nodeName.toLowerCase(),I=!l&&!o,v=!1;if(p){if(r){for(;g;){for(u=t;u=u[g];)if(o?E(u,f):1===u.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?p.firstChild:p.lastChild],a&&I){for(v=(h=(A=(c=p[m]||(p[m]={}))[e]||[])[0]===C&&A[1])&&A[2],u=h&&p.childNodes[h];u=++h&&u&&u[g]||(// Fallback to seeking `elem` from the start
v=h=0)||d.pop();)if(1===u.nodeType&&++v&&u===t){c[e]=[C,h,v];break}}else if(I&&(v=h=(A=(c=t[m]||(t[m]={}))[e]||[])[0]===C&&A[1]),!1===v)for(;(u=++h&&u&&u[g]||(v=h=0)||d.pop())&&(!(o?E(u,f):1===u.nodeType)||!++v||(I&&((c=u[m]||(u[m]={}))[e]=[C,v]),u!==t)););return(v-=s)===n||v%n==0&&v/n>=0}}},PSEUDO:function(e,t){var i,s=n.pseudos[e]||n.setFilters[e.toLowerCase()]||Z.error("unsupported pseudo: "+e);return s[m]?s(t):s.length>1?(i=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,i){for(var n,r=s(e,t),a=r.length;a--;)e[n=o.call(e,r[a])]=!(i[n]=r[a])})):function(e){return s(e,0,i)}):s}},pseudos:{
// Potentially complex pseudos
not:te((function(e){var t=[],i=[],n=me(e.replace(x,"$1"));return n[m]?te((function(e,t,i,s){for(var r,a=n(e,null,s,[]),o=e.length;o--;)(r=a[o])&&(e[o]=!(t[o]=r))})):function(e,s,r){return t[0]=e,n(t,null,r,i),t[0]=null,!i.pop()}})),has:te((function(e){return function(t){return Z(e,t).length>0}})),contains:te((function(e){return e=e.replace(J,z),function(t){return(t.textContent||y.text(t)).indexOf(e)>-1}})),
// "Whether an element is represented by a :lang() selector
// is based solely on the element's language value
// being equal to the identifier C,
// or beginning with the identifier C immediately followed by "-".
// The matching of C against the element's language value is performed case-insensitively.
// The identifier C does not have to be a valid language name."
// https://www.w3.org/TR/selectors/#lang-pseudo
lang:te((function(e){return K.test(e||"")||Z.error("unsupported lang: "+e),e=e.replace(J,z).toLowerCase(),function(t){var i;do{if(i=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),
// Miscellaneous
target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===u},focus:function(e){return e===function(){try{return A.activeElement}catch(e){}}()&&A.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},
// Boolean properties
enabled:re(!1),disabled:re(!0),checked:function(e){return E(e,"input")&&!!e.checked||E(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},
// Contents
empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!n.pseudos.empty(e)},
// Element/input types
header:function(e){return V.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){return E(e,"input")&&"button"===e.type||E(e,"button")},text:function(e){var t;return E(e,"input")&&"text"===e.type&&(// Support: IE <10 only
// New HTML5 attribute values (e.g., "search") appear
// with elem.type === "text"
null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},
// Position-in-collection
first:ae((function(){return[0]})),last:ae((function(e,t){return[t-1]})),eq:ae((function(e,t,i){return[i<0?i+t:i]})),even:ae((function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e})),odd:ae((function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e})),lt:ae((function(e,t,i){var n;for(n=i<0?i+t:i>t?t:i;--n>=0;)e.push(n);return e})),gt:ae((function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e}))}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[t]=ne(t);for(t in{submit:!0,reset:!0})n.pseudos[t]=se(t);function Ae(){}function ce(e,t){var i,s,r,a,o,l,A,c=B[e+" "];if(c)return t?0:c.slice(0);for(o=e,l=[],A=n.preFilter;o;){for(a in i&&!(s=H.exec(o))||(s&&(o=o.slice(s[0].length)||o),l.push(r=[])),i=!1,(s=P.exec(o))&&(i=s.shift(),r.push({value:i,
// Cast descendant combinators to space
type:s[0].replace(x," ")}),o=o.slice(i.length)),n.filter)!(s=q[a].exec(o))||A[a]&&!(s=A[a](s))||(i=s.shift(),r.push({value:i,type:a,matches:s}),o=o.slice(i.length));if(!i)break}return t?o.length:o?Z.error(e):
// Cache the tokens
B(e,l).slice(0)}function ue(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function he(e,t,i){var n=t.dir,s=t.next,r=s||n,a=i&&"parentNode"===r,o=I++;return t.first?
// Check against closest ancestor/preceding element
function(t,i,s){for(;t=t[n];)if(1===t.nodeType||a)return e(t,i,s);return!1}:
// Check against all ancestor/preceding elements
function(t,i,l){var A,c,u=[C,o];if(l){for(;t=t[n];)if((1===t.nodeType||a)&&e(t,i,l))return!0}else for(;t=t[n];)if(1===t.nodeType||a)if(c=t[m]||(t[m]={}),s&&E(t,s))t=t[n]||t;else{if((A=c[r])&&A[0]===C&&A[1]===o)return u[2]=A[2];if(c[r]=u,u[2]=e(t,i,l))return!0}return!1}}function de(e){return e.length>1?function(t,i,n){for(var s=e.length;s--;)if(!e[s](t,i,n))return!1;return!0}:e[0]}function ge(e,t,i,n,s){for(var r,a=[],o=0,l=e.length,A=null!=t;o<l;o++)(r=e[o])&&(i&&!i(r,n,s)||(a.push(r),A&&t.push(o)));return a}function pe(e,t,i,n,s,r){return n&&!n[m]&&(n=pe(n)),s&&!s[m]&&(s=pe(s,r)),te((function(r,a,l,A){var c,u,h,d,g=[],p=[],m=a.length,C=r||function(e,t,i){for(var n=0,s=t.length;n<s;n++)Z(e,t[n],i);return i}(t||"*",l.nodeType?[l]:l,[]),I=!e||!r&&t?C:ge(C,g,e,l,A);if(i?i(I,d=s||(r?e:m||n)?
// ...intermediate processing is necessary
[]:
// ...otherwise use results directly
a,l,A):d=I,n)for(c=ge(d,p),n(c,[],l,A),u=c.length;u--;)(h=c[u])&&(d[p[u]]=!(I[p[u]]=h));if(r){if(s||e){if(s){for(c=[],u=d.length;u--;)(h=d[u])&&c.push(I[u]=h);s(null,d=[],c,A)}for(u=d.length;u--;)(h=d[u])&&(c=s?o.call(r,h):g[u])>-1&&(r[c]=!(a[c]=h))}}else d=ge(d===a?d.splice(m,d.length):d),s?s(null,a,d,A):f.apply(a,d)}))}function fe(e){for(var t,i,s,a=e.length,l=n.relative[e[0].type],A=l||n.relative[" "],c=l?1:0,u=he((function(e){return e===t}),A,!0),h=he((function(e){return o.call(t,e)>-1}),A,!0),d=[function(e,i,n){var s=!l&&(n||i!=r)||((t=i).nodeType?u(e,i,n):h(e,i,n));return t=null,s}];c<a;c++)if(i=n.relative[e[c].type])d=[he(de(d),i)];else{if((i=n.filter[e[c].type].apply(null,e[c].matches))[m]){for(s=++c;s<a&&!n.relative[e[s].type];s++);return pe(c>1&&de(d),c>1&&ue(
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(x,"$1"),i,c<s&&fe(e.slice(c,s)),s<a&&fe(e=e.slice(s)),s<a&&ue(e))}d.push(i)}return de(d)}function me(e,t){var i,s=[],a=[],o=b[e+" "];if(!o){for(t||(t=ce(e)),i=t.length;i--;)(o=fe(t[i]))[m]?s.push(o):a.push(o);o=b(e,function(e,t){var i=t.length>0,s=e.length>0,a=function(a,o,l,c,u){var d,g,p,m=0,I="0",v=a&&[],B=[],b=r,E=a||s&&n.find.TAG("*",u),Q=C+=null==b?1:Math.random()||.1,_=E.length;for(u&&(r=o==A||o||u);I!==_&&null!=(d=E[I]);I++){if(s&&d){for(g=0,o||d.ownerDocument==A||(le(d),l=!h);p=e[g++];)if(p(d,o||A,l)){f.call(c,d);break}u&&(C=Q)}i&&((d=!p&&d)&&m--,a&&v.push(d))}if(m+=I,i&&I!==m){for(g=0;p=t[g++];)p(v,B,o,l);if(a){if(m>0)for(;I--;)v[I]||B[I]||(B[I]=w.call(c));B=ge(B)}f.apply(c,B),u&&!a&&B.length>0&&m+t.length>1&&y.uniqueSort(c)}return u&&(C=Q,r=b),v};return i?te(a):a}(a,s)),o.selector=e}return o}function Ce(e,t,i,s){var r,a,o,l,A,c="function"==typeof e&&e,u=!s&&ce(e=c.selector||e);if(i=i||[],1===u.length){if((a=u[0]=u[0].slice(0)).length>2&&"ID"===(o=a[0]).type&&9===t.nodeType&&h&&n.relative[a[1].type]){if(!(t=(n.find.ID(o.matches[0].replace(J,z),t)||[])[0]))return i;c&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(r=q.needsContext.test(e)?0:a.length;r--&&(o=a[r],!n.relative[l=o.type]);)if((A=n.find[l])&&(s=A(o.matches[0].replace(J,z),j.test(a[0].type)&&oe(t.parentNode)||t))){if(a.splice(r,1),!(e=s.length&&ue(a)))return f.apply(i,s),i;break}}return(c||me(e,u))(s,t,!h,i,!t||j.test(e)&&oe(t.parentNode)||t),i}Ae.prototype=n.filters=n.pseudos,n.setFilters=new Ae,d.sortStable=m.split("").sort(D).join("")===m,le(),d.sortDetached=ie((function(e){return 1&e.compareDocumentPosition(A.createElement("fieldset"))})),y.find=Z,y.expr[":"]=y.expr.pseudos,y.unique=y.uniqueSort,Z.compile=me,Z.select=Ce,Z.setDocument=le,Z.tokenize=ce,Z.escape=y.escapeSelector,Z.getText=y.text,Z.isXML=y.isXMLDoc,Z.selectors=y.expr,Z.support=y.support,Z.uniqueSort=y.uniqueSort}();var M=function(e,t,i){for(var n=[],s=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(s&&y(e).is(i))break;n.push(e)}return n},R=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},N=y.expr.match.needsContext,L=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function U(e,t,i){return g(t)?y.grep(e,(function(e,n){return!!t.call(e,n,e)!==i})):t.nodeType?y.grep(e,(function(e){return e===t!==i})):"string"!=typeof t?y.grep(e,(function(e){return o.call(t,e)>-1!==i})):y.filter(t,e,i)}y.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?y.find.matchesSelector(n,e)?[n]:[]:y.find.matches(e,y.grep(t,(function(e){return 1===e.nodeType})))},y.fn.extend({find:function(e){var t,i,n=this.length,s=this;if("string"!=typeof e)return this.pushStack(y(e).filter((function(){for(t=0;t<n;t++)if(y.contains(s[t],this))return!0})));for(i=this.pushStack([]),t=0;t<n;t++)y.find(e,s[t],i);return n>1?y.uniqueSort(i):i},filter:function(e){return this.pushStack(U(this,e||[],!1))},not:function(e){return this.pushStack(U(this,e||[],!0))},is:function(e){return!!U(this,
// If this is a positional/relative selector, check membership in the returned set
// so $("p:first").is("p:last") won't return true for a doc with two "p".
"string"==typeof e&&N.test(e)?y(e):e||[],!1).length}});var H,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(y.fn.init=function(e,t,i){var n,s;if(!e)return this;if(i=i||H,"string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:P.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof y?t[0]:t,y.merge(this,y.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:f,!0)),L.test(n[1])&&y.isPlainObject(t))for(n in t)g(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return(s=f.getElementById(n[2]))&&(this[0]=s,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==i.ready?i.ready(e):
// Execute immediately if ready is not present
e(y):y.makeArray(e,this)}).prototype=y.fn,H=y(f);var O=/^(?:parents|prev(?:Until|All))/,G={children:!0,contents:!0,next:!0,prev:!0};function K(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}y.fn.extend({has:function(e){var t=y(e,this),i=t.length;return this.filter((function(){for(var e=0;e<i;e++)if(y.contains(this,t[e]))return!0}))},closest:function(e,t){var i,n=0,s=this.length,r=[],a="string"!=typeof e&&y(e);if(!N.test(e))for(;n<s;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(a?a.index(i)>-1:
// Don't pass non-elements to jQuery#find
1===i.nodeType&&y.find.matchesSelector(i,e))){r.push(i);break}return this.pushStack(r.length>1?y.uniqueSort(r):r)},
// Determine the position of an element within the set
index:function(e){return e?"string"==typeof e?o.call(y(e),this[0]):o.call(this,
// If it receives a jQuery object, the first element is used
e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(y.uniqueSort(y.merge(this.get(),y(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),y.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return M(e,"parentNode")},parentsUntil:function(e,t,i){return M(e,"parentNode",i)},next:function(e){return K(e,"nextSibling")},prev:function(e){return K(e,"previousSibling")},nextAll:function(e){return M(e,"nextSibling")},prevAll:function(e){return M(e,"previousSibling")},nextUntil:function(e,t,i){return M(e,"nextSibling",i)},prevUntil:function(e,t,i){return M(e,"previousSibling",i)},siblings:function(e){return R((e.parentNode||{}).firstChild,e)},children:function(e){return R(e.firstChild)},contents:function(e){return null!=e.contentDocument&&// Support: IE 11+
// <object> elements with no `data` attribute has an object
// `contentDocument` with a `null` prototype.
n(e.contentDocument)?e.contentDocument:(E(e,"template")&&(e=e.content||e),y.merge([],e.childNodes))}},(function(e,t){y.fn[e]=function(i,n){var s=y.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=y.filter(n,s)),this.length>1&&(G[e]||y.uniqueSort(s),O.test(e)&&s.reverse()),this.pushStack(s)}}));var q=/[^\x20\t\r\n\f]+/g;function Y(e){return e}function V(e){throw e}function W(e,t,i,n){var s;try{e&&g(s=e.promise)?s.call(e).done(t).fail(i):e&&g(s=e.then)?s.call(e,t,i):t.apply(void 0,[e].slice(n))}catch(r){i.apply(void 0,[r])}}y.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return y.each(e.match(q)||[],(function(e,i){t[i]=!0})),t}(e):y.extend({},e);var t,i,n,s,r=[],a=[],o=-1,l=function(){for(s=s||e.once,n=t=!0;a.length;o=-1)for(i=a.shift();++o<r.length;)!1===r[o].apply(i[0],i[1])&&e.stopOnFalse&&(o=r.length,i=!1);e.memory||(i=!1),t=!1,s&&(r=i?[]:"")},A={
// Add a callback or a collection of callbacks to the list
add:function(){return r&&(i&&!t&&(o=r.length-1,a.push(i)),function t(i){y.each(i,(function(i,n){g(n)?e.unique&&A.has(n)||r.push(n):n&&n.length&&"string"!==I(n)&&t(n)}))}(arguments),i&&!t&&l()),this},
// Remove a callback from the list
remove:function(){return y.each(arguments,(function(e,t){for(var i;(i=y.inArray(t,r,i))>-1;)r.splice(i,1),i<=o&&o--})),this},
// Check if a given callback is in the list.
// If no argument is given, return whether or not list has callbacks attached.
has:function(e){return e?y.inArray(e,r)>-1:r.length>0},
// Remove all callbacks from the list
empty:function(){return r&&(r=[]),this},
// Disable .fire and .add
// Abort any current/pending executions
// Clear all callbacks and values
disable:function(){return s=a=[],r=i="",this},disabled:function(){return!r},
// Disable .fire
// Also disable .add unless we have memory (since it would have no effect)
// Abort any pending executions
lock:function(){return s=a=[],i||t||(r=i=""),this},locked:function(){return!!s},
// Call all callbacks with the given context and arguments
fireWith:function(e,i){return s||(i=[e,(i=i||[]).slice?i.slice():i],a.push(i),t||l()),this},
// Call all the callbacks with the given arguments
fire:function(){return A.fireWith(this,arguments),this},
// To know if the callbacks have already been called at least once
fired:function(){return!!n}};return A},y.extend({Deferred:function(t){var i=[
// action, add listener, callbacks,
// ... .then handlers, argument index, [final state]
["notify","progress",y.Callbacks("memory"),y.Callbacks("memory"),2],["resolve","done",y.Callbacks("once memory"),y.Callbacks("once memory"),0,"resolved"],["reject","fail",y.Callbacks("once memory"),y.Callbacks("once memory"),1,"rejected"]],n="pending",s={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return s.then(null,e)},
// Keep pipe for back-compat
pipe:function(){var e=arguments;return y.Deferred((function(t){y.each(i,(function(i,n){var s=g(e[n[4]])&&e[n[4]];r[n[1]]((function(){var e=s&&s.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[n[0]+"With"](this,s?[e]:arguments)}))})),e=null})).promise()},then:function(t,n,s){var r=0;function a(t,i,n,s){return function(){var o=this,l=arguments,A=function(){var e,A;if(!(t<r)){if((e=n.apply(o,l))===i.promise())throw new TypeError("Thenable self-resolution");A=e&&(// Support: Promises/A+ section 2.3.4
// https://promisesaplus.com/#point-64
// Only check objects and functions for thenability
"object"==typeof e||"function"==typeof e)&&e.then,g(A)?s?A.call(e,a(r,i,Y,s),a(r,i,V,s)):(r++,A.call(e,a(r,i,Y,s),a(r,i,V,s),a(r,i,Y,i.notifyWith))):(n!==Y&&(o=void 0,l=[e]),(s||i.resolveWith)(o,l))}},c=s?A:function(){try{A()}catch(I2){y.Deferred.exceptionHook&&y.Deferred.exceptionHook(I2,c.error),t+1>=r&&(n!==V&&(o=void 0,l=[I2]),i.rejectWith(o,l))}};t?c():(y.Deferred.getErrorHook?c.error=y.Deferred.getErrorHook():y.Deferred.getStackHook&&(c.error=y.Deferred.getStackHook()),e.setTimeout(c))}}return y.Deferred((function(e){i[0][3].add(a(0,e,g(s)?s:Y,e.notifyWith)),i[1][3].add(a(0,e,g(t)?t:Y)),i[2][3].add(a(0,e,g(n)?n:V))})).promise()},
// Get a promise for this deferred
// If obj is provided, the promise aspect is added to the object
promise:function(e){return null!=e?y.extend(e,s):s}},r={};return y.each(i,(function(e,t){var a=t[2],o=t[5];s[t[1]]=a.add,o&&a.add((function(){n=o}),
// rejected_callbacks.disable
// fulfilled_callbacks.disable
i[3-e][2].disable,
// rejected_handlers.disable
// fulfilled_handlers.disable
i[3-e][3].disable,
// progress_callbacks.lock
i[0][2].lock,
// progress_handlers.lock
i[0][3].lock),a.add(t[3].fire),r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this},r[t[0]+"With"]=a.fireWith})),s.promise(r),t&&t.call(r,r),r},
// Deferred helper
when:function(e){var t=arguments.length,i=t,n=Array(i),r=s.call(arguments),a=y.Deferred(),o=function(e){return function(i){n[e]=this,r[e]=arguments.length>1?s.call(arguments):i,--t||a.resolveWith(n,r)}};if(t<=1&&(W(e,a.done(o(i)).resolve,a.reject,!t),"pending"===a.state()||g(r[i]&&r[i].then)))return a.then();for(;i--;)W(r[i],o(i),a.reject);return a.promise()}});var j=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;y.Deferred.exceptionHook=function(t,i){e.console&&e.console.warn&&t&&j.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,i)},y.readyException=function(t){e.setTimeout((function(){throw t}))};var J=y.Deferred();function z(){f.removeEventListener("DOMContentLoaded",z),e.removeEventListener("load",z),y.ready()}y.fn.ready=function(e){return J.then(e).catch((function(e){y.readyException(e)})),this},y.extend({
// Is the DOM ready to be used? Set to true once it occurs.
isReady:!1,
// A counter to track how many items to wait for before
// the ready event fires. See trac-6781
readyWait:1,
// Handle when the DOM is ready
ready:function(e){(!0===e?--y.readyWait:y.isReady)||(y.isReady=!0,!0!==e&&--y.readyWait>0||J.resolveWith(f,[y]))}}),y.ready.then=J.then,"complete"===f.readyState||"loading"!==f.readyState&&!f.documentElement.doScroll?e.setTimeout(y.ready):(f.addEventListener("DOMContentLoaded",z),e.addEventListener("load",z));var X=function(e,t,i,n,s,r,a){var o=0,l=e.length,A=null==i;if("object"===I(i))for(o in s=!0,i)X(e,t,o,i[o],!0,r,a);else if(void 0!==n&&(s=!0,g(n)||(a=!0),A&&(a?(t.call(e,n),t=null):(A=t,t=function(e,t,i){return A.call(y(e),i)})),t))for(;o<l;o++)t(e[o],i,a?n:n.call(e[o],o,t(e[o],i)));return s?e:A?t.call(e):l?t(e[0],i):r},$=/^-ms-/,Z=/-([a-z])/g;function ee(e,t){return t.toUpperCase()}function te(e){return e.replace($,"ms-").replace(Z,ee)}var ie=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function ne(){this.expando=y.expando+ne.uid++}ne.uid=1,ne.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ie(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,s=this.cache(e);if("string"==typeof t)s[te(t)]=i;else for(n in t)s[te(n)]=t[n];return s},get:function(e,t){return void 0===t?this.cache(e):
// Always use camelCase key (gh-2257)
e[this.expando]&&e[this.expando][te(t)]},access:function(e,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(e,t):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,n=e[this.expando];if(void 0!==n){if(void 0!==t){i=(t=Array.isArray(t)?t.map(te):(t=te(t))in n?[t]:t.match(q)||[]).length;for(;i--;)delete n[t[i]]}(void 0===t||y.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!y.isEmptyObject(t)}};var se=new ne,re=new ne,ae=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,oe=/[A-Z]/g;function le(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(oe,"-$&").toLowerCase(),"string"==typeof(i=e.getAttribute(n))){try{i=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ae.test(e)?JSON.parse(e):e)}(i)}catch(I2){}re.set(e,t,i)}else i=void 0;return i}y.extend({hasData:function(e){return re.hasData(e)||se.hasData(e)},data:function(e,t,i){return re.access(e,t,i)},removeData:function(e,t){re.remove(e,t)},
// TODO: Now that all calls to _data and _removeData have been replaced
// with direct calls to dataPriv methods, these can be deprecated.
_data:function(e,t,i){return se.access(e,t,i)},_removeData:function(e,t){se.remove(e,t)}}),y.fn.extend({data:function(e,t){var i,n,s,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(s=re.get(r),1===r.nodeType&&!se.get(r,"hasDataAttrs"))){for(i=a.length;i--;)a[i]&&0===(n=a[i].name).indexOf("data-")&&(n=te(n.slice(5)),le(r,n,s[n]));se.set(r,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each((function(){re.set(this,e)})):X(this,(function(t){var i;if(r&&void 0===t)return void 0!==(i=re.get(r,e))||void 0!==(i=le(r,e))?i:void 0;this.each((function(){re.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){re.remove(this,e)}))}}),y.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=se.get(e,t),i&&(!n||Array.isArray(i)?n=se.access(e,t,y.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=y.queue(e,t),n=i.length,s=i.shift(),r=y._queueHooks(e,t);"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===t&&i.unshift("inprogress"),delete r.stop,s.call(e,(function(){y.dequeue(e,t)}),r)),!n&&r&&r.empty.fire()},
// Not public - generate a queueHooks object, or return the current one
_queueHooks:function(e,t){var i=t+"queueHooks";return se.get(e,i)||se.access(e,i,{empty:y.Callbacks("once memory").add((function(){se.remove(e,[t+"queue",i])}))})}}),y.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?y.queue(this[0],e):void 0===t?this:this.each((function(){var i=y.queue(this,e,t);y._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&y.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){y.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},
// Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
promise:function(e,t){var i,n=1,s=y.Deferred(),r=this,a=this.length,o=function(){--n||s.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(i=se.get(r[a],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(o));return o(),s.promise(t)}});var Ae=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ce=new RegExp("^(?:([+-])=|)("+Ae+")([a-z%]*)$","i"),ue=["Top","Right","Bottom","Left"],he=f.documentElement,de=function(e){return y.contains(e.ownerDocument,e)},ge={composed:!0};he.getRootNode&&(de=function(e){return y.contains(e.ownerDocument,e)||e.getRootNode(ge)===e.ownerDocument});var pe=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&// Otherwise, check computed style
// Support: Firefox <=43 - 45
// Disconnected elements can have computed display: none, so first confirm that elem is
// in the document.
de(e)&&"none"===y.css(e,"display")};function fe(e,t,i,n){var s,r,a=20,o=n?function(){return n.cur()}:function(){return y.css(e,t,"")},l=o(),A=i&&i[3]||(y.cssNumber[t]?"":"px"),c=e.nodeType&&(y.cssNumber[t]||"px"!==A&&+l)&&ce.exec(y.css(e,t));if(c&&c[3]!==A){for(l/=2,A=A||c[3],c=+l||1;a--;)y.style(e,t,c+A),(1-r)*(1-(r=o()/l||.5))<=0&&(a=0),c/=r;c*=2,y.style(e,t,c+A),i=i||[]}return i&&(c=+c||+l||0,s=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=A,n.start=c,n.end=s)),s}var me={};function Ce(e){var t,i=e.ownerDocument,n=e.nodeName,s=me[n];return s||(t=i.body.appendChild(i.createElement(n)),s=y.css(t,"display"),t.parentNode.removeChild(t),"none"===s&&(s="block"),me[n]=s,s)}function Ie(e,t){for(var i,n,s=[],r=0,a=e.length;r<a;r++)(n=e[r]).style&&(i=n.style.display,t?("none"===i&&(s[r]=se.get(n,"display")||null,s[r]||(n.style.display="")),""===n.style.display&&pe(n)&&(s[r]=Ce(n))):"none"!==i&&(s[r]="none",se.set(n,"display",i)));for(r=0;r<a;r++)null!=s[r]&&(e[r].style.display=s[r]);return e}y.fn.extend({show:function(){return Ie(this,!0)},hide:function(){return Ie(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){pe(this)?y(this).show():y(this).hide()}))}});var ve,Be,ye=/^(?:checkbox|radio)$/i,be=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ee=/^$|^module$|\/(?:java|ecma)script/i;ve=f.createDocumentFragment().appendChild(f.createElement("div")),(Be=f.createElement("input")).setAttribute("type","radio"),Be.setAttribute("checked","checked"),Be.setAttribute("name","t"),ve.appendChild(Be),d.checkClone=ve.cloneNode(!0).cloneNode(!0).lastChild.checked,ve.innerHTML="<textarea>x</textarea>",d.noCloneChecked=!!ve.cloneNode(!0).lastChild.defaultValue,ve.innerHTML="<option></option>",d.option=!!ve.lastChild;var we={
// XHTML parsers do not magically insert elements in the
// same way that tag soup parsers do. So we cannot shorten
// this by omitting <tbody> or other required elements.
thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Qe(e,t){var i;return i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&E(e,t)?y.merge([e],i):i}function _e(e,t){for(var i=0,n=e.length;i<n;i++)se.set(e[i],"globalEval",!t||se.get(t[i],"globalEval"))}we.tbody=we.tfoot=we.colgroup=we.caption=we.thead,we.th=we.td,d.option||(we.optgroup=we.option=[1,"<select multiple='multiple'>","</select>"]);var Se=/<|&#?\w+;/;function xe(e,t,i,n,s){for(var r,a,o,l,A,c,u=t.createDocumentFragment(),h=[],d=0,g=e.length;d<g;d++)if((r=e[d])||0===r)if("object"===I(r))y.merge(h,r.nodeType?[r]:r);else if(Se.test(r)){for(a=a||u.appendChild(t.createElement("div")),o=(be.exec(r)||["",""])[1].toLowerCase(),l=we[o]||we._default,a.innerHTML=l[1]+y.htmlPrefilter(r)+l[2],c=l[0];c--;)a=a.lastChild;y.merge(h,a.childNodes),(a=u.firstChild).textContent=""}else h.push(t.createTextNode(r));for(u.textContent="",d=0;r=h[d++];)if(n&&y.inArray(r,n)>-1)s&&s.push(r);else if(A=de(r),a=Qe(u.appendChild(r),"script"),A&&_e(a),i)for(c=0;r=a[c++];)Ee.test(r.type||"")&&i.push(r);return u}var ke=/^([^.]*)(?:\.(.+)|)/;function De(){return!0}function Fe(){return!1}function Te(e,t,i,n,s,r){var a,o;if("object"==typeof t){for(o in"string"!=typeof i&&(n=n||i,i=void 0),t)Te(e,o,i,n,t[o],r);return e}if(null==n&&null==s?(s=i,n=i=void 0):null==s&&("string"==typeof i?(s=n,n=void 0):(s=n,n=i,i=void 0)),!1===s)s=Fe;else if(!s)return e;return 1===r&&(a=s,s=function(e){return y().off(e),a.apply(this,arguments)},s.guid=a.guid||(a.guid=y.guid++)),e.each((function(){y.event.add(this,t,s,n,i)}))}function Me(e,t,i){i?(se.set(e,t,!1),y.event.add(e,t,{namespace:!1,handler:function(e){var i,n=se.get(this,t);if(1&e.isTrigger&&this[t]){if(n)(y.event.special[t]||{}).delegateType&&e.stopPropagation();else if(n=s.call(arguments),se.set(this,t,n),this[t](),i=se.get(this,t),se.set(this,t,!1),n!==i)return e.stopImmediatePropagation(),e.preventDefault(),i}else n&&(se.set(this,t,y.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=De)}})):void 0===se.get(e,t)&&y.event.add(e,t,De)}y.event={global:{},add:function(e,t,i,n,s){var r,a,o,l,A,c,u,h,d,g,p,f=se.get(e);if(ie(e))for(i.handler&&(i=(r=i).handler,s=r.selector),s&&y.find.matchesSelector(he,s),i.guid||(i.guid=y.guid++),(l=f.events)||(l=f.events=Object.create(null)),(a=f.handle)||(a=f.handle=function(t){return void 0!==y&&y.event.triggered!==t.type?y.event.dispatch.apply(e,arguments):void 0}),A=(t=(t||"").match(q)||[""]).length;A--;)d=p=(o=ke.exec(t[A])||[])[1],g=(o[2]||"").split(".").sort(),d&&(u=y.event.special[d]||{},d=(s?u.delegateType:u.bindType)||d,u=y.event.special[d]||{},c=y.extend({type:d,origType:p,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&y.expr.match.needsContext.test(s),namespace:g.join(".")},r),(h=l[d])||((h=l[d]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,n,g,a)||e.addEventListener&&e.addEventListener(d,a)),u.add&&(u.add.call(e,c),c.handler.guid||(c.handler.guid=i.guid)),s?h.splice(h.delegateCount++,0,c):h.push(c),y.event.global[d]=!0)},
// Detach an event or set of events from an element
remove:function(e,t,i,n,s){var r,a,o,l,A,c,u,h,d,g,p,f=se.hasData(e)&&se.get(e);if(f&&(l=f.events)){for(A=(t=(t||"").match(q)||[""]).length;A--;)if(d=p=(o=ke.exec(t[A])||[])[1],g=(o[2]||"").split(".").sort(),d){for(u=y.event.special[d]||{},h=l[d=(n?u.delegateType:u.bindType)||d]||[],o=o[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=h.length;r--;)c=h[r],!s&&p!==c.origType||i&&i.guid!==c.guid||o&&!o.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(h.splice(r,1),c.selector&&h.delegateCount--,u.remove&&u.remove.call(e,c));a&&!h.length&&(u.teardown&&!1!==u.teardown.call(e,g,f.handle)||y.removeEvent(e,d,f.handle),delete l[d])}else for(d in l)y.event.remove(e,d+t[A],i,n,!0);y.isEmptyObject(l)&&se.remove(e,"handle events")}},dispatch:function(e){var t,i,n,s,r,a,o=new Array(arguments.length),l=y.event.fix(e),A=(se.get(this,"events")||Object.create(null))[l.type]||[],c=y.event.special[l.type]||{};for(o[0]=l,t=1;t<arguments.length;t++)o[t]=arguments[t];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(a=y.event.handlers.call(this,l,A),t=0;(s=a[t++])&&!l.isPropagationStopped();)for(l.currentTarget=s.elem,i=0;(r=s.handlers[i++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==r.namespace&&!l.rnamespace.test(r.namespace)||(l.handleObj=r,l.data=r.data,void 0!==(n=((y.event.special[r.origType]||{}).handle||r.handler).apply(s.elem,o))&&!1===(l.result=n)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(e,t){var i,n,s,r,a,o=[],l=t.delegateCount,A=e.target;if(l&&// Support: IE <=9
// Black-hole SVG <use> instance trees (trac-13180)
A.nodeType&&// Support: Firefox <=42
// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
// Support: IE 11 only
// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
!("click"===e.type&&e.button>=1))for(;A!==this;A=A.parentNode||this)if(1===A.nodeType&&("click"!==e.type||!0!==A.disabled)){for(r=[],a={},i=0;i<l;i++)void 0===a[s=(n=t[i]).selector+" "]&&(a[s]=n.needsContext?y(s,this).index(A)>-1:y.find(s,this,null,[A]).length),a[s]&&r.push(n);r.length&&o.push({elem:A,handlers:r})}return A=this,l<t.length&&o.push({elem:A,handlers:t.slice(l)}),o},addProp:function(e,t){Object.defineProperty(y.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[y.expando]?e:new y.Event(e)},special:{load:{
// Prevent triggered image.load events from bubbling to window.load
noBubble:!0},click:{
// Utilize native event to ensure correct state for checkable inputs
setup:function(e){var t=this||e;return ye.test(t.type)&&t.click&&E(t,"input")&&Me(t,"click",!0),!1},trigger:function(e){var t=this||e;return ye.test(t.type)&&t.click&&E(t,"input")&&Me(t,"click"),!0},
// For cross-browser consistency, suppress native .click() on links
// Also prevent it if we're currently inside a leveraged native-event stack
_default:function(e){var t=e.target;return ye.test(t.type)&&t.click&&E(t,"input")&&se.get(t,"click")||E(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},y.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i)},y.Event=function(e,t){if(!(this instanceof y.Event))return new y.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&// Support: Android <=2.3 only
!1===e.returnValue?De:Fe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&y.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[y.expando]=!0},y.Event.prototype={constructor:y.Event,isDefaultPrevented:Fe,isPropagationStopped:Fe,isImmediatePropagationStopped:Fe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=De,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=De,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=De,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},y.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},y.event.addProp),y.each({focus:"focusin",blur:"focusout"},(function(e,t){function i(e){if(f.documentMode){var i=se.get(this,"handle"),n=y.event.fix(e);n.type="focusin"===e.type?"focus":"blur",n.isSimulated=!0,i(e),n.target===n.currentTarget&&i(n)}else y.event.simulate(t,e.target,y.event.fix(e))}y.event.special[e]={
// Utilize native event if possible so blur/focus sequence is correct
setup:function(){var n;if(Me(this,e,!0),!f.documentMode)return!1;(n=se.get(this,t))||this.addEventListener(t,i),se.set(this,t,(n||0)+1)},trigger:function(){return Me(this,e),!0},teardown:function(){var e;if(!f.documentMode)return!1;(e=se.get(this,t)-1)?se.set(this,t,e):(this.removeEventListener(t,i),se.remove(this,t))},
// Suppress native focus or blur if we're currently inside
// a leveraged native-event stack
_default:function(t){return se.get(t.target,e)},delegateType:t},y.event.special[t]={setup:function(){var n=this.ownerDocument||this.document||this,s=f.documentMode?this:n,r=se.get(s,t);r||(f.documentMode?this.addEventListener(t,i):n.addEventListener(e,i,!0)),se.set(s,t,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,s=f.documentMode?this:n,r=se.get(s,t)-1;r?se.set(s,t,r):(f.documentMode?this.removeEventListener(t,i):n.removeEventListener(e,i,!0),se.remove(s,t))}}})),y.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){y.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=e.relatedTarget,s=e.handleObj;return n&&(n===this||y.contains(this,n))||(e.type=s.origType,i=s.handler.apply(this,arguments),e.type=t),i}}})),y.fn.extend({on:function(e,t,i,n){return Te(this,e,t,i,n)},one:function(e,t,i,n){return Te(this,e,t,i,n,1)},off:function(e,t,i){var n,s;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,y(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(s in e)this.off(s,t,e[s]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=Fe),this.each((function(){y.event.remove(this,e,i,t)}))}});var Re=/<script|<style|<link/i,Ne=/checked\s*(?:[^=]|=\s*.checked.)/i,Le=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ue(e,t){return E(e,"table")&&E(11!==t.nodeType?t:t.firstChild,"tr")&&y(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var i,n,s,r,a,o;if(1===t.nodeType){if(se.hasData(e)&&(o=se.get(e).events))for(s in se.remove(t,"handle events"),o)for(i=0,n=o[s].length;i<n;i++)y.event.add(t,s,o[s][i]);re.hasData(e)&&(r=re.access(e),a=y.extend({},r),re.set(t,a))}}function Ge(e,t,i,n){t=r(t);var s,a,o,l,A,c,u=0,h=e.length,p=h-1,f=t[0],m=g(f);if(m||h>1&&"string"==typeof f&&!d.checkClone&&Ne.test(f))return e.each((function(s){var r=e.eq(s);m&&(t[0]=f.call(this,s,r.html())),Ge(r,t,i,n)}));if(h&&(a=(s=xe(t,e[0].ownerDocument,!1,e,n)).firstChild,1===s.childNodes.length&&(s=a),a||n)){for(l=(o=y.map(Qe(s,"script"),He)).length;u<h;u++)A=s,u!==p&&(A=y.clone(A,!0,!0),l&&y.merge(o,Qe(A,"script"))),i.call(e[u],A,u);if(l)for(c=o[o.length-1].ownerDocument,y.map(o,Pe),u=0;u<l;u++)A=o[u],Ee.test(A.type||"")&&!se.access(A,"globalEval")&&y.contains(c,A)&&(A.src&&"module"!==(A.type||"").toLowerCase()?y._evalUrl&&!A.noModule&&y._evalUrl(A.src,{nonce:A.nonce||A.getAttribute("nonce")},c):C(A.textContent.replace(Le,""),A,c))}return e}function Ke(e,t,i){for(var n,s=t?y.filter(t,e):e,r=0;null!=(n=s[r]);r++)i||1!==n.nodeType||y.cleanData(Qe(n)),n.parentNode&&(i&&de(n)&&_e(Qe(n,"script")),n.parentNode.removeChild(n));return e}y.extend({htmlPrefilter:function(e){return e},clone:function(e,t,i){var n,s,r,a,o,l,A,c=e.cloneNode(!0),u=de(e);if(!(d.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||y.isXMLDoc(e)))for(a=Qe(c),n=0,s=(r=Qe(e)).length;n<s;n++)o=r[n],l=a[n],A=void 0,"input"===(A=l.nodeName.toLowerCase())&&ye.test(o.type)?l.checked=o.checked:"input"!==A&&"textarea"!==A||(l.defaultValue=o.defaultValue);if(t)if(i)for(r=r||Qe(e),a=a||Qe(c),n=0,s=r.length;n<s;n++)Oe(r[n],a[n]);else Oe(e,c);return(a=Qe(c,"script")).length>0&&_e(a,!u&&Qe(e,"script")),c},cleanData:function(e){for(var t,i,n,s=y.event.special,r=0;void 0!==(i=e[r]);r++)if(ie(i)){if(t=i[se.expando]){if(t.events)for(n in t.events)s[n]?y.event.remove(i,n):y.removeEvent(i,n,t.handle);i[se.expando]=void 0}i[re.expando]&&(i[re.expando]=void 0)}}}),y.fn.extend({detach:function(e){return Ke(this,e,!0)},remove:function(e){return Ke(this,e)},text:function(e){return X(this,(function(e){return void 0===e?y.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ge(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ue(this,e).appendChild(e)}))},prepend:function(){return Ge(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ue(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ge(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ge(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(y.cleanData(Qe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return y.clone(this,e,t)}))},html:function(e){return X(this,(function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Re.test(e)&&!we[(be.exec(e)||["",""])[1].toLowerCase()]){e=y.htmlPrefilter(e);try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(y.cleanData(Qe(t,!1)),t.innerHTML=e);t=0}catch(I2){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ge(this,arguments,(function(t){var i=this.parentNode;y.inArray(this,e)<0&&(y.cleanData(Qe(this)),i&&i.replaceChild(t,this))}),e)}}),y.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){y.fn[e]=function(e){for(var i,n=[],s=y(e),r=s.length-1,o=0;o<=r;o++)i=o===r?this:this.clone(!0),y(s[o])[t](i),a.apply(n,i.get());return this.pushStack(n)}}));var qe=new RegExp("^("+Ae+")(?!px)[a-z%]+$","i"),Ye=/^--/,Ve=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=e),i.getComputedStyle(t)},We=function(e,t,i){var n,s,r={};for(s in t)r[s]=e.style[s],e.style[s]=t[s];for(s in n=i.call(e),t)e.style[s]=r[s];return n},je=new RegExp(ue.join("|"),"i");function Je(e,t,i){var n,s,r,a,o=Ye.test(t),l=e.style;return(i=i||Ve(e))&&(a=i.getPropertyValue(t)||i[t],o&&a&&(a=a.replace(x,"$1")||void 0),""!==a||de(e)||(a=y.style(e,t)),!d.pixelBoxStyles()&&qe.test(a)&&je.test(t)&&(n=l.width,s=l.minWidth,r=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=i.width,l.width=n,l.minWidth=s,l.maxWidth=r)),void 0!==a?
// Support: IE <=9 - 11 only
// IE returns zIndex value as an integer.
a+"":a}function ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){A.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",he.appendChild(A).appendChild(c);var t=e.getComputedStyle(c);n="1%"!==t.top,l=12===i(t.marginLeft),c.style.right="60%",a=36===i(t.right),s=36===i(t.width),c.style.position="absolute",r=12===i(c.offsetWidth/3),he.removeChild(A),c=null}}function i(e){return Math.round(parseFloat(e))}var n,s,r,a,o,l,A=f.createElement("div"),c=f.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",d.clearCloneStyle="content-box"===c.style.backgroundClip,y.extend(d,{boxSizingReliable:function(){return t(),s},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),r},
// Support: IE 9 - 11+, Edge 15 - 18+
// IE/Edge misreport `getComputedStyle` of table rows with width/height
// set in CSS while `offset*` properties report correct values.
// Behavior in IE 9 is more subtle than in newer versions & it passes
// some versions of this test; make sure not to make it pass there!
// Support: Firefox 70+
// Only Firefox includes border widths
// in computed dimensions. (gh-4529)
reliableTrDimensions:function(){var t,i,n,s;return null==o&&(t=f.createElement("table"),i=f.createElement("tr"),n=f.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",i.style.cssText="box-sizing:content-box;border:1px solid",i.style.height="1px",n.style.height="9px",n.style.display="block",he.appendChild(t).appendChild(i).appendChild(n),s=e.getComputedStyle(i),o=parseInt(s.height,10)+parseInt(s.borderTopWidth,10)+parseInt(s.borderBottomWidth,10)===i.offsetHeight,he.removeChild(t)),o}}))}();var Xe=["Webkit","Moz","ms"],$e=f.createElement("div").style,Ze={};function et(e){var t=y.cssProps[e]||Ze[e];return t||(e in $e?e:Ze[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),i=Xe.length;i--;)if((e=Xe[i]+t)in $e)return e}(e)||e)}var tt=/^(none|table(?!-c[ea]).+)/,it={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function st(e,t,i){var n=ce.exec(t);return n?
// Guard against undefined "subtract", e.g., when used as in cssHooks
Math.max(0,n[2]-(i||0))+(n[3]||"px"):t}function rt(e,t,i,n,s,r){var a="width"===t?1:0,o=0,l=0,A=0;if(i===(n?"border":"content"))return 0;for(;a<4;a+=2)"margin"===i&&(A+=y.css(e,i+ue[a],!0,s)),n?("content"===i&&(l-=y.css(e,"padding"+ue[a],!0,s)),"margin"!==i&&(l-=y.css(e,"border"+ue[a]+"Width",!0,s))):(l+=y.css(e,"padding"+ue[a],!0,s),"padding"!==i?l+=y.css(e,"border"+ue[a]+"Width",!0,s):o+=y.css(e,"border"+ue[a]+"Width",!0,s));return!n&&r>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-l-o-.5))||0),l+A}function at(e,t,i){var n=Ve(e),s=(!d.boxSizingReliable()||i)&&"border-box"===y.css(e,"boxSizing",!1,n),r=s,a=Je(e,t,n),o="offset"+t[0].toUpperCase()+t.slice(1);if(qe.test(a)){if(!i)return a;a="auto"}return(!d.boxSizingReliable()&&s||// Support: IE 10 - 11+, Edge 15 - 18+
// IE/Edge misreport `getComputedStyle` of table rows with width/height
// set in CSS while `offset*` properties report correct values.
// Interestingly, in some cases IE 9 doesn't suffer from this issue.
!d.reliableTrDimensions()&&E(e,"tr")||// Fall back to offsetWidth/offsetHeight when value is "auto"
// This happens for inline elements with no explicit setting (gh-3571)
"auto"===a||// Support: Android <=4.1 - 4.3 only
// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
!parseFloat(a)&&"inline"===y.css(e,"display",!1,n))&&// Make sure the element is visible & connected
e.getClientRects().length&&(s="border-box"===y.css(e,"boxSizing",!1,n),(r=o in e)&&(a=e[o])),(a=parseFloat(a)||0)+rt(e,t,i||(s?"border":"content"),r,n,
// Provide the current computed size to request scroll gutter calculation (gh-3589)
a)+"px"}function ot(e,t,i,n,s){return new ot.prototype.init(e,t,i,n,s)}y.extend({
// Add in style property hooks for overriding the default
// behavior of getting and setting a style property
cssHooks:{opacity:{get:function(e,t){if(t){var i=Je(e,"opacity");return""===i?"1":i}}}},
// Don't automatically add "px" to these possibly-unitless properties
cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,
// SVG-related
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},
// Add in properties whose names you wish to fix before
// setting or getting the value
cssProps:{},
// Get and set the style property on a DOM Node
style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,r,a,o=te(t),l=Ye.test(t),A=e.style;if(l||(t=et(o)),a=y.cssHooks[t]||y.cssHooks[o],void 0===i)return a&&"get"in a&&void 0!==(s=a.get(e,!1,n))?s:A[t];"string"==(r=typeof i)&&(s=ce.exec(i))&&s[1]&&(i=fe(e,t,s),r="number"),null!=i&&i==i&&("number"!==r||l||(i+=s&&s[3]||(y.cssNumber[o]?"":"px")),d.clearCloneStyle||""!==i||0!==t.indexOf("background")||(A[t]="inherit"),a&&"set"in a&&void 0===(i=a.set(e,i,n))||(l?A.setProperty(t,i):A[t]=i))}},css:function(e,t,i,n){var s,r,a,o=te(t);return Ye.test(t)||(t=et(o)),(a=y.cssHooks[t]||y.cssHooks[o])&&"get"in a&&(s=a.get(e,!0,i)),void 0===s&&(s=Je(e,t,n)),"normal"===s&&t in nt&&(s=nt[t]),""===i||i?(r=parseFloat(s),!0===i||isFinite(r)?r||0:s):s}}),y.each(["height","width"],(function(e,t){y.cssHooks[t]={get:function(e,i,n){if(i)return!tt.test(y.css(e,"display"))||// Support: Safari 8+
// Table columns in Safari have non-zero offsetWidth & zero
// getBoundingClientRect().width unless display is changed.
// Support: IE <=11 only
// Running getBoundingClientRect on a disconnected node
// in IE throws an error.
e.getClientRects().length&&e.getBoundingClientRect().width?at(e,t,n):We(e,it,(function(){return at(e,t,n)}))},set:function(e,i,n){var s,r=Ve(e),a=!d.scrollboxSize()&&"absolute"===r.position,o=(a||n)&&"border-box"===y.css(e,"boxSizing",!1,r),l=n?rt(e,t,n,o,r):0;return o&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-rt(e,t,"border",!1,r)-.5)),l&&(s=ce.exec(i))&&"px"!==(s[3]||"px")&&(e.style[t]=i,i=y.css(e,t)),st(0,i,l)}}})),y.cssHooks.marginLeft=ze(d.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Je(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),y.each({margin:"",padding:"",border:"Width"},(function(e,t){y.cssHooks[e+t]={expand:function(i){for(var n=0,s={},r="string"==typeof i?i.split(" "):[i];n<4;n++)s[e+ue[n]+t]=r[n]||r[n-2]||r[0];return s}},"margin"!==e&&(y.cssHooks[e+t].set=st)})),y.fn.extend({css:function(e,t){return X(this,(function(e,t,i){var n,s,r={},a=0;if(Array.isArray(t)){for(n=Ve(e),s=t.length;a<s;a++)r[t[a]]=y.css(e,t[a],!1,n);return r}return void 0!==i?y.style(e,t,i):y.css(e,t)}),e,t,arguments.length>1)}}),y.Tween=ot,ot.prototype={constructor:ot,init:function(e,t,i,n,s,r){this.elem=e,this.prop=i,this.easing=s||y.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=r||(y.cssNumber[i]?"":"px")},cur:function(){var e=ot.propHooks[this.prop];return e&&e.get?e.get(this):ot.propHooks._default.get(this)},run:function(e){var t,i=ot.propHooks[this.prop];return this.options.duration?this.pos=t=y.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):ot.propHooks._default.set(this),this}},ot.prototype.init.prototype=ot.prototype,ot.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=y.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){y.fx.step[e.prop]?y.fx.step[e.prop](e):1!==e.elem.nodeType||!y.cssHooks[e.prop]&&null==e.elem.style[et(e.prop)]?e.elem[e.prop]=e.now:y.style(e.elem,e.prop,e.now+e.unit)}}},ot.propHooks.scrollTop=ot.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},y.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},y.fx=ot.prototype.init,y.fx.step={};var lt,At,ct=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function ht(){At&&(!1===f.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(ht):e.setTimeout(ht,y.fx.interval),y.fx.tick())}function dt(){return e.setTimeout((function(){lt=void 0})),lt=Date.now()}function gt(e,t){var i,n=0,s={height:e};for(t=t?1:0;n<4;n+=2-t)s["margin"+(i=ue[n])]=s["padding"+i]=e;return t&&(s.opacity=s.width=e),s}function pt(e,t,i){for(var n,s=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),r=0,a=s.length;r<a;r++)if(n=s[r].call(i,t,e))return n}function ft(e,t,i){var n,s,r=0,a=ft.prefilters.length,o=y.Deferred().always((function(){delete l.elem})),l=function(){if(s)return!1;for(var t=lt||dt(),i=Math.max(0,A.startTime+A.duration-t),n=1-(i/A.duration||0),r=0,a=A.tweens.length;r<a;r++)A.tweens[r].run(n);return o.notifyWith(e,[A,n,i]),n<1&&a?i:(a||o.notifyWith(e,[A,1,0]),o.resolveWith(e,[A]),!1)},A=o.promise({elem:e,props:y.extend({},t),opts:y.extend(!0,{specialEasing:{},easing:y.easing._default},i),originalProperties:t,originalOptions:i,startTime:lt||dt(),duration:i.duration,tweens:[],createTween:function(t,i){var n=y.Tween(e,A.opts,t,i,A.opts.specialEasing[t]||A.opts.easing);return A.tweens.push(n),n},stop:function(t){var i=0,n=t?A.tweens.length:0;if(s)return this;for(s=!0;i<n;i++)A.tweens[i].run(1);return t?(o.notifyWith(e,[A,1,0]),o.resolveWith(e,[A,t])):o.rejectWith(e,[A,t]),this}}),c=A.props;for(function(e,t){var i,n,s,r,a;for(i in e)if(s=t[n=te(i)],r=e[i],Array.isArray(r)&&(s=r[1],r=e[i]=r[0]),i!==n&&(e[n]=r,delete e[i]),(a=y.cssHooks[n])&&"expand"in a)for(i in r=a.expand(r),delete e[n],r)i in e||(e[i]=r[i],t[i]=s);else t[n]=s}(c,A.opts.specialEasing);r<a;r++)if(n=ft.prefilters[r].call(A,e,c,A.opts))return g(n.stop)&&(y._queueHooks(A.elem,A.opts.queue).stop=n.stop.bind(n)),n;return y.map(c,pt,A),g(A.opts.start)&&A.opts.start.call(e,A),A.progress(A.opts.progress).done(A.opts.done,A.opts.complete).fail(A.opts.fail).always(A.opts.always),y.fx.timer(y.extend(l,{elem:e,anim:A,queue:A.opts.queue})),A}y.Animation=y.extend(ft,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return fe(i.elem,e,ce.exec(t),i),i}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(q);for(var i,n=0,s=e.length;n<s;n++)i=e[n],ft.tweeners[i]=ft.tweeners[i]||[],ft.tweeners[i].unshift(t)},prefilters:[function(e,t,i){var n,s,r,a,o,l,A,c,u="width"in t||"height"in t,h=this,d={},g=e.style,p=e.nodeType&&pe(e),f=se.get(e,"fxshow");for(n in i.queue||(null==(a=y._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,o=a.empty.fire,a.empty.fire=function(){a.unqueued||o()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,y.queue(e,"fx").length||a.empty.fire()}))}))),t)if(s=t[n],ct.test(s)){if(delete t[n],r=r||"toggle"===s,s===(p?"hide":"show")){if("show"!==s||!f||void 0===f[n])continue;p=!0}d[n]=f&&f[n]||y.style(e,n)}if((l=!y.isEmptyObject(t))||!y.isEmptyObject(d))for(n in u&&1===e.nodeType&&(i.overflow=[g.overflow,g.overflowX,g.overflowY],null==(A=f&&f.display)&&(A=se.get(e,"display")),"none"===(c=y.css(e,"display"))&&(A?c=A:(Ie([e],!0),A=e.style.display||A,c=y.css(e,"display"),Ie([e]))),("inline"===c||"inline-block"===c&&null!=A)&&"none"===y.css(e,"float")&&(l||(h.done((function(){g.display=A})),null==A&&(c=g.display,A="none"===c?"":c)),g.display="inline-block")),i.overflow&&(g.overflow="hidden",h.always((function(){g.overflow=i.overflow[0],g.overflowX=i.overflow[1],g.overflowY=i.overflow[2]}))),l=!1,d)l||(f?"hidden"in f&&(p=f.hidden):f=se.access(e,"fxshow",{display:A}),r&&(f.hidden=!p),p&&Ie([e],!0),h.done((function(){for(n in p||Ie([e]),se.remove(e,"fxshow"),d)y.style(e,n,d[n])}))),l=pt(p?f[n]:0,n,h),n in f||(f[n]=l.start,p&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),y.speed=function(e,t,i){var n=e&&"object"==typeof e?y.extend({},e):{complete:i||!i&&t||g(e)&&e,duration:e,easing:i&&t||t&&!g(t)&&t};return y.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in y.fx.speeds?n.duration=y.fx.speeds[n.duration]:n.duration=y.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){g(n.old)&&n.old.call(this),n.queue&&y.dequeue(this,n.queue)},n},y.fn.extend({fadeTo:function(e,t,i,n){return this.filter(pe).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var s=y.isEmptyObject(e),r=y.speed(t,i,n),a=function(){var t=ft(this,y.extend({},e),r);(s||se.get(this,"finish"))&&t.stop(!0)};return a.finish=a,s||!1===r.queue?this.each(a):this.queue(r.queue,a)},stop:function(e,t,i){var n=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,s=null!=e&&e+"queueHooks",r=y.timers,a=se.get(this);if(s)a[s]&&a[s].stop&&n(a[s]);else for(s in a)a[s]&&a[s].stop&&ut.test(s)&&n(a[s]);for(s=r.length;s--;)r[s].elem!==this||null!=e&&r[s].queue!==e||(r[s].anim.stop(i),t=!1,r.splice(s,1));!t&&i||y.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,i=se.get(this),n=i[e+"queue"],s=i[e+"queueHooks"],r=y.timers,a=n?n.length:0;for(i.finish=!0,y.queue(this,e,[]),s&&s.stop&&s.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<a;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish}))}}),y.each(["toggle","show","hide"],(function(e,t){var i=y.fn[t];y.fn[t]=function(e,n,s){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(gt(t,!0),e,n,s)}})),y.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){y.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}})),y.timers=[],y.fx.tick=function(){var e,t=0,i=y.timers;for(lt=Date.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||y.fx.stop(),lt=void 0},y.fx.timer=function(e){y.timers.push(e),y.fx.start()},y.fx.interval=13,y.fx.start=function(){At||(At=!0,ht())},y.fx.stop=function(){At=null},y.fx.speeds={slow:600,fast:200,
// Default speed
_default:400},y.fn.delay=function(t,i){return t=y.fx&&y.fx.speeds[t]||t,i=i||"fx",this.queue(i,(function(i,n){var s=e.setTimeout(i,t);n.stop=function(){e.clearTimeout(s)}}))},function(){var e=f.createElement("input"),t=f.createElement("select").appendChild(f.createElement("option"));e.type="checkbox",d.checkOn=""!==e.value,d.optSelected=t.selected,(e=f.createElement("input")).value="t",e.type="radio",d.radioValue="t"===e.value}();var mt,Ct=y.expr.attrHandle;y.fn.extend({attr:function(e,t){return X(this,y.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){y.removeAttr(this,e)}))}}),y.extend({attr:function(e,t,i){var n,s,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?y.prop(e,t,i):(1===r&&y.isXMLDoc(e)||(s=y.attrHooks[t.toLowerCase()]||(y.expr.match.bool.test(t)?mt:void 0)),void 0!==i?null===i?void y.removeAttr(e,t):s&&"set"in s&&void 0!==(n=s.set(e,i,t))?n:(e.setAttribute(t,i+""),i):s&&"get"in s&&null!==(n=s.get(e,t))?n:null==(n=y.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!d.radioValue&&"radio"===t&&E(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n=0,s=t&&t.match(q);if(s&&1===e.nodeType)for(;i=s[n++];)e.removeAttribute(i)}}),mt={set:function(e,t,i){return!1===t?y.removeAttr(e,i):e.setAttribute(i,i),i}},y.each(y.expr.match.bool.source.match(/\w+/g),(function(e,t){var i=Ct[t]||y.find.attr;Ct[t]=function(e,t,n){var s,r,a=t.toLowerCase();return n||(r=Ct[a],Ct[a]=s,s=null!=i(e,t,n)?a:null,Ct[a]=r),s}}));var It=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;function Bt(e){return(e.match(q)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(q)||[]}y.fn.extend({prop:function(e,t){return X(this,y.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[y.propFix[e]||e]}))}}),y.extend({prop:function(e,t,i){var n,s,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&y.isXMLDoc(e)||(t=y.propFix[t]||t,s=y.propHooks[t]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(e,i,t))?n:e[t]=i:s&&"get"in s&&null!==(n=s.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=y.find.attr(e,"tabindex");return t?parseInt(t,10):It.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(y.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),y.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){y.propFix[this.toLowerCase()]=this})),y.fn.extend({addClass:function(e){var t,i,n,s,r,a;return g(e)?this.each((function(t){y(this).addClass(e.call(this,t,yt(this)))})):(t=bt(e)).length?this.each((function(){if(n=yt(this),i=1===this.nodeType&&" "+Bt(n)+" "){for(r=0;r<t.length;r++)s=t[r],i.indexOf(" "+s+" ")<0&&(i+=s+" ");a=Bt(i),n!==a&&this.setAttribute("class",a)}})):this},removeClass:function(e){var t,i,n,s,r,a;return g(e)?this.each((function(t){y(this).removeClass(e.call(this,t,yt(this)))})):arguments.length?(t=bt(e)).length?this.each((function(){if(n=yt(this),i=1===this.nodeType&&" "+Bt(n)+" "){for(r=0;r<t.length;r++)for(s=t[r];i.indexOf(" "+s+" ")>-1;)i=i.replace(" "+s+" "," ");a=Bt(i),n!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var i,n,s,r,a=typeof e,o="string"===a||Array.isArray(e);return g(e)?this.each((function(i){y(this).toggleClass(e.call(this,i,yt(this),t),t)})):"boolean"==typeof t&&o?t?this.addClass(e):this.removeClass(e):(i=bt(e),this.each((function(){if(o)for(r=y(this),s=0;s<i.length;s++)n=i[s],r.hasClass(n)?r.removeClass(n):r.addClass(n);else void 0!==e&&"boolean"!==a||((n=yt(this))&&se.set(this,"__className__",n),this.setAttribute&&this.setAttribute("class",n||!1===e?"":se.get(this,"__className__")||""))})))},hasClass:function(e){var t,i,n=0;for(t=" "+e+" ";i=this[n++];)if(1===i.nodeType&&(" "+Bt(yt(i))+" ").indexOf(t)>-1)return!0;return!1}});var Et=/\r/g;y.fn.extend({val:function(e){var t,i,n,s=this[0];return arguments.length?(n=g(e),this.each((function(i){var s;1===this.nodeType&&(null==(s=n?e.call(this,i,y(this).val()):e)?s="":"number"==typeof s?s+="":Array.isArray(s)&&(s=y.map(s,(function(e){return null==e?"":e+""}))),(t=y.valHooks[this.type]||y.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,s,"value")||(this.value=s))}))):s?(t=y.valHooks[s.type]||y.valHooks[s.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(s,"value"))?i:"string"==typeof(i=s.value)?i.replace(Et,""):null==i?"":i:void 0}}),y.extend({valHooks:{option:{get:function(e){var t=y.find.attr(e,"value");return null!=t?t:
// Support: IE <=10 - 11 only
// option.text throws exceptions (trac-14686, trac-14858)
// Strip and collapse whitespace
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
Bt(y.text(e))}},select:{get:function(e){var t,i,n,s=e.options,r=e.selectedIndex,a="select-one"===e.type,o=a?null:[],l=a?r+1:s.length;for(n=r<0?l:a?r:0;n<l;n++)if(((i=s[n]).selected||n===r)&&// Don't return options that are disabled or in a disabled optgroup
!i.disabled&&(!i.parentNode.disabled||!E(i.parentNode,"optgroup"))){if(t=y(i).val(),a)return t;o.push(t)}return o},set:function(e,t){for(var i,n,s=e.options,r=y.makeArray(t),a=s.length;a--;)((n=s[a]).selected=y.inArray(y.valHooks.option.get(n),r)>-1)&&(i=!0);return i||(e.selectedIndex=-1),r}}}}),y.each(["radio","checkbox"],(function(){y.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=y.inArray(y(e).val(),t)>-1}},d.checkOn||(y.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var wt=e.location,Qt={guid:Date.now()},_t=/\?/;y.parseXML=function(t){var i,n;if(!t||"string"!=typeof t)return null;try{i=(new e.DOMParser).parseFromString(t,"text/xml")}catch(I2){}return n=i&&i.getElementsByTagName("parsererror")[0],i&&!n||y.error("Invalid XML: "+(n?y.map(n.childNodes,(function(e){return e.textContent})).join("\n"):t)),i};var St=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};y.extend(y.event,{trigger:function(t,i,n,s){var r,a,o,l,A,u,h,d,m=[n||f],C=c.call(t,"type")?t.type:t,I=c.call(t,"namespace")?t.namespace.split("."):[];if(a=d=o=n=n||f,3!==n.nodeType&&8!==n.nodeType&&!St.test(C+y.event.triggered)&&(C.indexOf(".")>-1&&(I=C.split("."),C=I.shift(),I.sort()),A=C.indexOf(":")<0&&"on"+C,(t=t[y.expando]?t:new y.Event(C,"object"==typeof t&&t)).isTrigger=s?2:3,t.namespace=I.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+I.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),i=null==i?[t]:y.makeArray(i,[t]),h=y.event.special[C]||{},s||!h.trigger||!1!==h.trigger.apply(n,i))){if(!s&&!h.noBubble&&!p(n)){for(l=h.delegateType||C,St.test(l+C)||(a=a.parentNode);a;a=a.parentNode)m.push(a),o=a;o===(n.ownerDocument||f)&&m.push(o.defaultView||o.parentWindow||e)}for(r=0;(a=m[r++])&&!t.isPropagationStopped();)d=a,t.type=r>1?l:h.bindType||C,(u=(se.get(a,"events")||Object.create(null))[t.type]&&se.get(a,"handle"))&&u.apply(a,i),(u=A&&a[A])&&u.apply&&ie(a)&&(t.result=u.apply(a,i),!1===t.result&&t.preventDefault());return t.type=C,s||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(m.pop(),i)||!ie(n)||A&&g(n[C])&&!p(n)&&((o=n[A])&&(n[A]=null),y.event.triggered=C,t.isPropagationStopped()&&d.addEventListener(C,xt),n[C](),t.isPropagationStopped()&&d.removeEventListener(C,xt),y.event.triggered=void 0,o&&(n[A]=o)),t.result}},
// Piggyback on a donor event to simulate a different one
// Used only for `focus(in | out)` events
simulate:function(e,t,i){var n=y.extend(new y.Event,i,{type:e,isSimulated:!0});y.event.trigger(n,null,t)}}),y.fn.extend({trigger:function(e,t){return this.each((function(){y.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var i=this[0];if(i)return y.event.trigger(e,t,i,!0)}});var kt=/\[\]$/,Dt=/\r?\n/g,Ft=/^(?:submit|button|image|reset|file)$/i,Tt=/^(?:input|select|textarea|keygen)/i;function Mt(e,t,i,n){var s;if(Array.isArray(t))y.each(t,(function(t,s){i||kt.test(e)?n(e,s):Mt(e+"["+("object"==typeof s&&null!=s?t:"")+"]",s,i,n)}));else if(i||"object"!==I(t))n(e,t);else for(s in t)Mt(e+"["+s+"]",t[s],i,n)}y.param=function(e,t){var i,n=[],s=function(e,t){var i=g(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!y.isPlainObject(e))y.each(e,(function(){s(this.name,this.value)}));else for(i in e)Mt(i,e[i],t,s);return n.join("&")},y.fn.extend({serialize:function(){return y.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=y.prop(this,"elements");return e?y.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!y(this).is(":disabled")&&Tt.test(this.nodeName)&&!Ft.test(e)&&(this.checked||!ye.test(e))})).map((function(e,t){var i=y(this).val();return null==i?null:Array.isArray(i)?y.map(i,(function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}})):{name:t.name,value:i.replace(Dt,"\r\n")}})).get()}});var Rt=/%20/g,Nt=/#.*$/,Lt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,Pt=/^\/\//,Ot={},Gt={},Kt="*/".concat("*"),qt=f.createElement("a");function Yt(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,s=0,r=t.toLowerCase().match(q)||[];if(g(i))for(;n=r[s++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function Vt(e,t,i,n){var s={},r=e===Gt;function a(o){var l;return s[o]=!0,y.each(e[o]||[],(function(e,o){var A=o(t,i,n);return"string"!=typeof A||r||s[A]?r?!(l=A):void 0:(t.dataTypes.unshift(A),a(A),!1)})),l}return a(t.dataTypes[0])||!s["*"]&&a("*")}function Wt(e,t){var i,n,s=y.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((s[i]?e:n||(n={}))[i]=t[i]);return n&&y.extend(!0,e,n),e}qt.href=wt.href,y.extend({
// Counter for holding the number of active queries
active:0,
// Last-Modified header cache for next request
lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",
/*
        timeout: 0,
        data: null,
        dataType: null,
        username: null,
        password: null,
        cache: null,
        throws: false,
        traditional: false,
        headers: {},
        */
accepts:{"*":Kt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},
// Data converters
// Keys separate source (or catchall "*") and destination types with a single space
converters:{
// Convert anything to text
"* text":String,
// Text to html (true = no transformation)
"text html":!0,
// Evaluate text as a json expression
"text json":JSON.parse,
// Parse text as xml
"text xml":y.parseXML},
// For options that shouldn't be deep extended:
// you can add your own custom options here if
// and when you create one that shouldn't be
// deep extended (see ajaxExtend)
flatOptions:{url:!0,context:!0}},
// Creates a full fledged settings object into target
// with both ajaxSettings and settings fields.
// If target is omitted, writes into ajaxSettings.
ajaxSetup:function(e,t){return t?
// Building a settings object
Wt(Wt(e,y.ajaxSettings),t):
// Extending ajaxSettings
Wt(y.ajaxSettings,e)},ajaxPrefilter:Yt(Ot),ajaxTransport:Yt(Gt),
// Main method
ajax:function(t,i){"object"==typeof t&&(i=t,t=void 0),i=i||{};var n,s,r,a,o,l,A,c,u,h,d=y.ajaxSetup({},i),g=d.context||d,p=d.context&&(g.nodeType||g.jquery)?y(g):y.event,m=y.Deferred(),C=y.Callbacks("once memory"),I=d.statusCode||{},v={},B={},b="canceled",E={readyState:0,
// Builds headers hashtable if needed
getResponseHeader:function(e){var t;if(A){if(!a)for(a={};t=Ut.exec(r);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},
// Raw string
getAllResponseHeaders:function(){return A?r:null},
// Caches the header
setRequestHeader:function(e,t){return null==A&&(e=B[e.toLowerCase()]=B[e.toLowerCase()]||e,v[e]=t),this},
// Overrides response content-type header
overrideMimeType:function(e){return null==A&&(d.mimeType=e),this},
// Status-dependent callbacks
statusCode:function(e){var t;if(e)if(A)E.always(e[E.status]);else for(t in e)I[t]=[I[t],e[t]];return this},
// Cancel the request
abort:function(e){var t=e||b;return n&&n.abort(t),w(0,t),this}};if(m.promise(E),d.url=((t||d.url||wt.href)+"").replace(Pt,wt.protocol+"//"),d.type=i.method||i.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(q)||[""],null==d.crossDomain){l=f.createElement("a");try{l.href=d.url,l.href=l.href,d.crossDomain=qt.protocol+"//"+qt.host!=l.protocol+"//"+l.host}catch(I2){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=y.param(d.data,d.traditional)),Vt(Ot,d,i,E),A)return E;for(u in(c=y.event&&d.global)&&0==y.active++&&y.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ht.test(d.type),s=d.url.replace(Nt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Rt,"+")):(h=d.url.slice(s.length),d.data&&(d.processData||"string"==typeof d.data)&&(s+=(_t.test(s)?"&":"?")+d.data,delete d.data),!1===d.cache&&(s=s.replace(Lt,"$1"),h=(_t.test(s)?"&":"?")+"_="+Qt.guid+++h),d.url=s+h),d.ifModified&&(y.lastModified[s]&&E.setRequestHeader("If-Modified-Since",y.lastModified[s]),y.etag[s]&&E.setRequestHeader("If-None-Match",y.etag[s])),(d.data&&d.hasContent&&!1!==d.contentType||i.contentType)&&E.setRequestHeader("Content-Type",d.contentType),E.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Kt+"; q=0.01":""):d.accepts["*"]),d.headers)E.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(!1===d.beforeSend.call(g,E,d)||A))return E.abort();if(b="abort",C.add(d.complete),E.done(d.success),E.fail(d.error),n=Vt(Gt,d,i,E)){if(E.readyState=1,c&&p.trigger("ajaxSend",[E,d]),A)return E;d.async&&d.timeout>0&&(o=e.setTimeout((function(){E.abort("timeout")}),d.timeout));try{A=!1,n.send(v,w)}catch(I2){if(A)throw I2;w(-1,I2)}}else w(-1,"No Transport");function w(t,i,a,l){var u,h,f,v,B,b=i;A||(A=!0,o&&e.clearTimeout(o),n=void 0,r=l||"",E.readyState=t>0?4:0,u=t>=200&&t<300||304===t,a&&(v=function(e,t,i){for(var n,s,r,a,o=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(s in o)if(o[s]&&o[s].test(n)){l.unshift(s);break}if(l[0]in i)r=l[0];else{for(s in i){if(!l[0]||e.converters[s+" "+l[0]]){r=s;break}a||(a=s)}r=r||a}if(r)return r!==l[0]&&l.unshift(r),i[r]}(d,E,a)),!u&&y.inArray("script",d.dataTypes)>-1&&y.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),v=function(e,t,i,n){var s,r,a,o,l,A={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)A[a.toLowerCase()]=e.converters[a];for(r=c.shift();r;)if(e.responseFields[r]&&(i[e.responseFields[r]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=c.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=A[l+" "+r]||A["* "+r]))for(s in A)if((o=s.split(" "))[1]===r&&(a=A[l+" "+o[0]]||A["* "+o[0]])){!0===a?a=A[s]:!0!==A[s]&&(r=o[0],c.unshift(o[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(I2){return{state:"parsererror",error:a?I2:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}(d,v,E,u),u?(d.ifModified&&((B=E.getResponseHeader("Last-Modified"))&&(y.lastModified[s]=B),(B=E.getResponseHeader("etag"))&&(y.etag[s]=B)),204===t||"HEAD"===d.type?b="nocontent":304===t?b="notmodified":(b=v.state,h=v.data,u=!(f=v.error))):(f=b,!t&&b||(b="error",t<0&&(t=0))),E.status=t,E.statusText=(i||b)+"",u?m.resolveWith(g,[h,b,E]):m.rejectWith(g,[E,b,f]),E.statusCode(I),I=void 0,c&&p.trigger(u?"ajaxSuccess":"ajaxError",[E,d,u?h:f]),C.fireWith(g,[E,b]),c&&(p.trigger("ajaxComplete",[E,d]),--y.active||y.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,i){return y.get(e,t,i,"json")},getScript:function(e,t){return y.get(e,void 0,t,"script")}}),y.each(["get","post"],(function(e,t){y[t]=function(e,i,n,s){return g(i)&&(s=s||n,n=i,i=void 0),y.ajax(y.extend({url:e,type:t,dataType:s,data:i,success:n},y.isPlainObject(e)&&e))}})),y.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),y._evalUrl=function(e,t,i){return y.ajax({url:e,
// Make this explicit, since user can override this through ajaxSetup (trac-11264)
type:"GET",dataType:"script",cache:!0,async:!1,global:!1,
// Only evaluate the response if it is successful (gh-4126)
// dataFilter is not invoked for failure responses, so using it instead
// of the default converter is kludgy but it works.
converters:{"text script":function(){}},dataFilter:function(e){y.globalEval(e,t,i)}})},y.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=y(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return g(e)?this.each((function(t){y(this).wrapInner(e.call(this,t))})):this.each((function(){var t=y(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)}))},wrap:function(e){var t=g(e);return this.each((function(i){y(this).wrapAll(t?e.call(this,i):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){y(this).replaceWith(this.childNodes)})),this}}),y.expr.pseudos.hidden=function(e){return!y.expr.pseudos.visible(e)},y.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},y.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(I2){}};var jt={
// File protocol always yields status code 0, assume 200
0:200,
// Support: IE <=9 only
// trac-1450: sometimes IE returns 1223 when it should be 204
1223:204},Jt=y.ajaxSettings.xhr();d.cors=!!Jt&&"withCredentials"in Jt,d.ajax=Jt=!!Jt,y.ajaxTransport((function(t){var i,n;if(d.cors||Jt&&!t.crossDomain)return{send:function(s,r){var a,o=t.xhr();if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)o[a]=t.xhrFields[a];for(a in t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||s["X-Requested-With"]||(s["X-Requested-With"]="XMLHttpRequest"),s)o.setRequestHeader(a,s[a]);i=function(e){return function(){i&&(i=n=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===e?o.abort():"error"===e?"number"!=typeof o.status?r(0,"error"):r(
// File: protocol always yields status 0; see trac-8605, trac-14207
o.status,o.statusText):r(jt[o.status]||o.status,o.statusText,
// Support: IE <=9 only
// IE9 has no XHR2 but throws on binary (trac-11426)
// For XHR2 non-text, let the caller handle it (gh-2498)
"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=i(),n=o.onerror=o.ontimeout=i("error"),void 0!==o.onabort?o.onabort=n:o.onreadystatechange=function(){4===o.readyState&&e.setTimeout((function(){i&&n()}))},i=i("abort");try{o.send(t.hasContent&&t.data||null)}catch(I2){if(i)throw I2}},abort:function(){i&&i()}}})),y.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),y.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return y.globalEval(e),e}}}),y.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),y.ajaxTransport("script",(function(e){var t,i;if(e.crossDomain||e.scriptAttrs)return{send:function(n,s){t=y("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",i=function(e){t.remove(),i=null,e&&s("error"===e.type?404:200,e.type)}),f.head.appendChild(t[0])},abort:function(){i&&i()}}}));var zt,Xt=[],$t=/(=)\?(?=&|$)|\?\?/;y.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||y.expando+"_"+Qt.guid++;return this[e]=!0,e}}),y.ajaxPrefilter("json jsonp",(function(t,i,n){var s,r,a,o=!1!==t.jsonp&&($t.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&$t.test(t.data)&&"data");if(o||"jsonp"===t.dataTypes[0])return s=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,o?t[o]=t[o].replace($t,"$1"+s):!1!==t.jsonp&&(t.url+=(_t.test(t.url)?"&":"?")+t.jsonp+"="+s),t.converters["script json"]=function(){return a||y.error(s+" was not called"),a[0]},t.dataTypes[0]="json",r=e[s],e[s]=function(){a=arguments},n.always((function(){void 0===r?y(e).removeProp(s):e[s]=r,t[s]&&(t.jsonpCallback=i.jsonpCallback,Xt.push(s)),a&&g(r)&&r(a[0]),a=r=void 0})),"script"})),d.createHTMLDocument=((zt=f.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===zt.childNodes.length),y.parseHTML=function(e,t,i){return"string"!=typeof e?[]:("boolean"==typeof t&&(i=t,t=!1),t||(d.createHTMLDocument?((n=(t=f.implementation.createHTMLDocument("")).createElement("base")).href=f.location.href,t.head.appendChild(n)):t=f),r=!i&&[],(s=L.exec(e))?[t.createElement(s[1])]:(s=xe([e],t,r),r&&r.length&&y(r).remove(),y.merge([],s.childNodes)));var n,s,r},y.fn.load=function(e,t,i){var n,s,r,a=this,o=e.indexOf(" ");return o>-1&&(n=Bt(e.slice(o)),e=e.slice(0,o)),g(t)?(i=t,t=void 0):t&&"object"==typeof t&&(s="POST"),a.length>0&&y.ajax({url:e,
// If "type" variable is undefined, then "GET" method will be used.
// Make value of this field explicit since
// user can override it through ajaxSetup method
type:s||"GET",dataType:"html",data:t}).done((function(e){r=arguments,a.html(n?
// If a selector was specified, locate the right elements in a dummy div
// Exclude scripts to avoid IE 'Permission Denied' errors
y("<div>").append(y.parseHTML(e)).find(n):
// Otherwise use the full result
e)})).always(i&&function(e,t){a.each((function(){i.apply(this,r||[e.responseText,t,e])}))}),this},y.expr.pseudos.animated=function(e){return y.grep(y.timers,(function(t){return e===t.elem})).length},y.offset={setOffset:function(e,t,i){var n,s,r,a,o,l,A=y.css(e,"position"),c=y(e),u={};"static"===A&&(e.style.position="relative"),o=c.offset(),r=y.css(e,"top"),l=y.css(e,"left"),("absolute"===A||"fixed"===A)&&(r+l).indexOf("auto")>-1?(a=(n=c.position()).top,s=n.left):(a=parseFloat(r)||0,s=parseFloat(l)||0),g(t)&&(t=t.call(e,i,y.extend({},o))),null!=t.top&&(u.top=t.top-o.top+a),null!=t.left&&(u.left=t.left-o.left+s),"using"in t?t.using.call(e,u):c.css(u)}},y.fn.extend({
// offset() relates an element's border box to the document origin
offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){y.offset.setOffset(this,e,t)}));var t,i,n=this[0];return n?n.getClientRects().length?(t=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}:void 0},
// position() relates an element's margin box to its offset parent's padding box
// This corresponds to the behavior of CSS absolute positioning
position:function(){if(this[0]){var e,t,i,n=this[0],s={top:0,left:0};if("fixed"===y.css(n,"position"))t=n.getBoundingClientRect();else{for(t=this.offset(),i=n.ownerDocument,e=n.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&"static"===y.css(e,"position");)e=e.parentNode;e&&e!==n&&1===e.nodeType&&((s=y(e).offset()).top+=y.css(e,"borderTopWidth",!0),s.left+=y.css(e,"borderLeftWidth",!0))}return{top:t.top-s.top-y.css(n,"marginTop",!0),left:t.left-s.left-y.css(n,"marginLeft",!0)}}},
// This method will return documentElement in the following cases:
// 1) For the element inside the iframe without offsetParent, this method will return
//    documentElement of the parent window
// 2) For the hidden or detached element
// 3) For body or html element, i.e. in case of the html node - it will return itself
// but those exceptions were never presented as a real life use-cases
// and might be considered as more preferable results.
// This logic, however, is not guaranteed and can change at any point in the future
offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===y.css(e,"position");)e=e.offsetParent;return e||he}))}}),y.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var i="pageYOffset"===t;y.fn[e]=function(n){return X(this,(function(e,n,s){var r;if(p(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===s)return r?r[t]:e[n];r?r.scrollTo(i?r.pageXOffset:s,i?s:r.pageYOffset):e[n]=s}),e,n,arguments.length)}})),y.each(["top","left"],(function(e,t){y.cssHooks[t]=ze(d.pixelPosition,(function(e,i){if(i)return i=Je(e,t),qe.test(i)?y(e).position()[t]+"px":i}))})),y.each({Height:"height",Width:"width"},(function(e,t){y.each({padding:"inner"+e,content:t,"":"outer"+e},(function(i,n){y.fn[n]=function(s,r){var a=arguments.length&&(i||"boolean"!=typeof s),o=i||(!0===s||!0===r?"margin":"border");return X(this,(function(t,i,s){var r;return p(t)?0===n.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===s?
// Get width or height on the element, requesting but not forcing parseFloat
y.css(t,i,o):
// Set width or height on the element
y.style(t,i,s,o)}),t,a?s:void 0,a)}}))})),y.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){y.fn[t]=function(e){return this.on(t,e)}})),y.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),y.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){y.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}));var Zt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;y.proxy=function(e,t){var i,n,r;if("string"==typeof t&&(i=e[t],t=e,e=i),g(e))return n=s.call(arguments,2),r=function(){return e.apply(t||this,n.concat(s.call(arguments)))},r.guid=e.guid=e.guid||y.guid++,r},y.holdReady=function(e){e?y.readyWait++:y.ready(!0)},y.isArray=Array.isArray,y.parseJSON=JSON.parse,y.nodeName=E,y.isFunction=g,y.isWindow=p,y.camelCase=te,y.type=I,y.now=Date.now,y.isNumeric=function(e){var t=y.type(e);return("number"===t||"string"===t)&&// parseFloat NaNs numeric-cast false positives ("")
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
// subtraction forces infinities to NaN
!isNaN(e-parseFloat(e))},y.trim=function(e){return null==e?"":(e+"").replace(Zt,"$1")};var ei=e.jQuery,ti=e.$;return y.noConflict=function(t){return e.$===y&&(e.$=ti),t&&e.jQuery===y&&(e.jQuery=ei),y},void 0===t&&(e.jQuery=e.$=y),y};const PC=RC(HC.exports=LC.document?UC(LC,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return UC(e)}),OC={ActiBookOne_version:"7.21.0",
// viewer版本号
ActiBookOne_Flg:"1",
// viewer版本号
API_Domain:"",
// api域名
share_facebook:"http://www.facebook.com/sharer.php?u=",share_twitter:"http://twitter.com/share?url=",share_LINE:"http://line.me/R/msg/text/?",prefixDivText_Page:"page_divText_",
// 页面文本信息ID前缀
prefixCanvas_Page:"page_canvasView_",
// 页面PDF渲染ID前缀
prefixCanvas_Toc:"toc_canvas_",
// 侧边栏一览功能pdf渲染前缀
filesPath:"attachments/",
// 文件配置路径
pdfsPath:"encrypt.pdf",
// pdf配置路径
thumbnailPath:"thumbnails/",
// 微缩图配置路径
jsonsPath:"jsons-",
// jsons配置路径
pageImgPath:"images/1/",
// 图片配置路径
compatiblePageImgPath:"images/3/",
// 兼容模式下，3倍图配置路径
pageImgType:".png",
// 图片配置格式
Link_Type_Video:"1",
// link视频类型
Link_Type_Audio:"2",
// link音频类型
Link_Type_File:"3",
// link音频类型
Link_Type_Goto:"4",
// link内部连接跳转类型
Link_Type_URL:"5",
// linkURL类型
File_Type_Video:"mp4",
// file视频类型
File_Type_Audio:"mp3",
// file音频类型
divLink_Main:"main_divLink_id",
// 页面内置linkID
prefixDivLink_Page:"page_divLink_",
// 页面内置linkID前缀
ADD:"ADD",UPDATE:"UPDATE",mediaFormatLimit:["mp3","mp4"],
// 多媒体格式限制
fileFormatLimit:["mp3","mp4","jpg","jpeg","pdf","gif","png","txt","doc","xls","ppt","docx","pptx","xlsx"],
// 文件格式限制
terminalOs_others:0,terminalOs_windows:1,terminalOs_mac:2,terminalOs_iOS:3,terminalOs_Android:4,terminalType_others:0,terminalType_pc_browser:1,terminalType_phone_browser:2,terminalType_pad_browser:3,terminalType_phone_app:4,terminalType_pad_app:5,readFrom_noWire:0,readFrom_direct:1,readFrom_site:2,readFrom_siteOther:3,readFrom_LINE:4,readFrom_Twitter:5,readFrom_Facebook:6,readFrom_QRcode:7,readFrom_download:8,readFrom_browsingHistory:9,readType_DL:0,readType_Site:1,readType_embedded:2,kinesis_log_viewer_type_H5:1,kinesis_log_device_type_pc:1,kinesis_log_device_type_phone:2,kinesis_log_device_type_tablet:3,kinesis_log_browser_type:["others","chrome","firefox","ie","edge","safari"],kinesis_log_os_type:["others","windows","mac os","ios","android"],kinesis_log_actionType_open:1,
//第一次打开书的参数
kinesis_log_actionType_paging:2,
//翻页时发送的参数
kinesis_log_actionType_link_click:3,
//打开的类型是link类型
kinesis_log_actionType_search:4,
//搜索结果的类型
kinesis_log_actionType_dwell_time:5,
//发送时间的参数
kinesis_log_actionType_paging_reissue:99,
// 倒屏时, 补发缺失的页码
memo_link_type_inlink:1,
// memo内部link
memo_link_type_outlink:2,
// 外部link
memo_init_parameter:{
// memo初始化参数
id:"",
// memo_id {时间戳}_Random(8)
x:0,
// memo顶点坐标 x
y:0,
// memo顶点坐标 y
layer:1,
// memo层级关系
color:"",
// memo主题 (red/blue/yellow)
text:"",
// memo内容
linkType:"",
// memo类型 (内部Link：1，外部Link：2 )
linkDetail:"",
// memoLink内容
width:"300px",
// memo初始化宽度
height:"320px",
// memo初始化高度
foldStatus:"0"}},GC=function(e,t,i){return!(e=parseInt(e))||"NaN"===e.toString()||e<=t?e=t:e>i&&(e=i),e},KC=function(){return window.navigator.userAgent.toLowerCase().indexOf("chrome")>0},qC=function(e){return PC("<a></a>").html(e).text()},YC=function(){window.parent.gotoTop_poste&&window.parent.gotoTop_poste()},VC=function(e){var t=document.createElement("div");null!=t.textContent?t.textContent=e:t.innerText=e;var i=t.innerHTML;return t=null,i},WC=function(e){PC(e),PC(document).on("touchstart",e,(function(e){PC(this).data("isMoved",0)})),PC(document).on("touchmove",e,(function(e){PC(this).data("isMoved",1)})),PC(document).on("touchend",e,(function(e){0==PC(this).data("isMoved")&&(e.preventDefault(),PC(this).trigger("tapOne",[e]))}))},jC=function(){PC("video").on("contextmenu",(function(){return!1}))};Date.prototype.format=function(e){var t={"M+":this.getMonth()+1,
//月份
"d+":this.getDate(),
//日
"h+":this.getHours(),
//小时
"m+":this.getMinutes(),
//分
"s+":this.getSeconds(),
//秒
"q+":Math.floor((this.getMonth()+3)/3),
//季度
S:this.getMilliseconds()};for(var i in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),t)new RegExp("("+i+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[i]:("00"+t[i]).substr((""+t[i]).length)));return e};const JC=TC("pdfInfo",(()=>{var e={};if(1==new URLSearchParams(window.location.search).get("super")||window.parent&&window.parent.initViewer){let u={cover:"1",direction:"l",speadMode:"1",linkColor:"#B97676",link_alpha:"0.24",linkTwinkle:"4",baseUrl:"https://dev-file.actibookone.com/contents/529/9127-20210616170045/",urlSignature:"?Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc0ODUwNzA2Mn19fV19&Signature=N1jgEa4LV5AFEDS1DNX3WFpLj50JDu6Cc87dxCUjtJJz14gXV9UfpjUfwnX56q3ZxC3LZwMdYlBKjTx69Y6Mazt~6LnqdhZnlttTFiV5exla5nbsNM-ikEHBu6g5SiKEyxTfG~lIvVHX4d8qGfm4BE2cob9IwHDW4IYnEr8yBe-nGEi~z8YFoBEj6CsS1-USGm69CXxm6vGN7Wt94nazCYxhTDURI-WDAdp4svmaPnNVoxvYFadj9RHTGImjp~33RGrcBTpxpmuR5~gu4GkJoxQMcKTrix8DAg6H9uwxj3FEW2aFlp7cuU0FFBLLUW8I~ZILrUb277aFAW7xuIw4eg__&Key-Pair-Id=APKAJK5A3SFO3YROR4MQ",readProgress:"8",contentTitle:"MS日本語スタイルガイド",readType:"1",readFrom:"1",contentDetailUrl:"https://dev-wang.actibookone.com/content/detail?param=eyJjb250ZW50TnVtIjo5MTI3fQ==",customizeDate:"20250430151609",totalPageTime:"79",contentNum:"9127",callAppUrl:"poste:///readType=1&amp;contentNum=9127&amp;pageNo=8&amp;userNum=0&amp;readFrom=1&amp;keyword=",embedFlg:"0",userNum:"0",keyword:"",shareBaseUrl:"https://dev-wang.actibookone.com/",printableFlg:"1",apiUrl:"https://dev-api.actibookone.com",shareableFlg:"1",contentInfoDispFlg:"1",appButtonDispFlg:"1",dispLanguage:"1",envType:"dev",clientNum:"529",compatibleFlg:"0",contentUpdateDate:"2021-06-16 17:00:45",contentType:"pdf",siteTitle:"aaa",enlargeSizes:"300,500,700",cutFlg:"1",ccfp_URL:"https://dev-ccfp.cloudcircus.ai/ccfp.js",imgType:"png",freeuseFlg:"0"};window.parent&&window.parent.initViewer&&(u=window.parent.initViewer()),e={...u},"1"==u.embedFlg&&(PC("body").addClass("embed_flg"),e.embed_flg=u.embedFlg,e.readType=OC.readType_embedded),e.API_Domain=u.apiUrl,e.imgType="."+e.imgType,u.callAppUrl&&(e.callAppUrl=qC(u.callAppUrl));var t=u.keyword||"";t&&(t=qC(u.keyword),e.searchValueArr=t.split(/[ |　]+/g)),e.totalPageNo=parseInt(u.totalPageTime),e.totalPageTime=parseInt(u.totalPageTime);var i="l"===u.direction?"ltr":"rtl";e.direction=i;var n="1"==u.cover;e.hasCover=n;var s="0"==u.speadMode?"single":"double";e.spread_mode=s,e.spread_mode_init=s;let h=u.userNum+"_"+u.contentNum;e.readProgressKey=h,(!(g=iI(e,h))||"NaN"===g.toString()||g<=1||g>parseInt(u.totalPageTime))&&(g=1),e.readProgress=g;var r="One"+u.contentNum+"Content";e.password=r,e.link_color=u.linkColor,e.link_twinkle=u.linkTwinkle,e.url_Prefix=u.baseUrl,e.url_Suffix=u.urlSignature,e.customize_date=u.customizeDate;for(var a=(u.enlargeSizes||"300").split(","),o=[1,2],l=1,A=0;A<a.length;A++){var c=parseInt(a[A])/100;c>l&&(l=c),o.push(c)}o.sort((function(e,t){return e-t})),e.zoomScale_max=l,e.zoomScale_list=o,OC.jsonsPath,e.customize_date,tI(e),eI(e),XC(e),e.siteNum=u.clientNum||"",e.siteTitle=u.siteTitle||"",e.initViewerAttr=u}else{let t=zC();e={...t},OC.API_Domain=t.apiUrl,e.viewerType="DL",e.totalPageNo=t.totalPageTime,e.imgType="."+t.imgType||"png",e.readProgress=1,e.password="One"+t.contentNum+"Content";var u="",h=null,d=null;window.parent.getParams?d=(h=window.parent).getParams():window.opener&&window.opener.getParams&&(d=(h=window.opener).getParams()),e.readType=OC.readType_DL;var g=null,p=null;h&&d?(p=d.readFrom,u=d.shareBaseUrl||"",d.callAppUrl&&(e.callAppUrl=qC(d.callAppUrl)),e.indexUrl=d.indexUrl,e.contentInfoDispFlg=d.contentInfoDispFlg):(u=window.location.href.split("?")[0]).indexOf("pdfViewer/#/pc")>0?u=u.replace("pdfViewer/#/pc",""):u.indexOf("pdfViewer/#/sd")>0?u=u.replace("pdfViewer/#/sd",""):u.indexOf("pdfViewer/")>0&&(u=u.replace("pdfViewer/","")),e.shareBaseUrl=u;let i="0"+"_"+t.contentNum;e.readProgressKey=i,(!(g=iI(i))||"NaN"===g.toString()||g<=1||g>parseInt(t.totalPageTime))&&(g=1),e.readProgress=g,e.readFrom=p,e.userNum="0",e.isMatchByPage=!1;let n=t.configJson;"string"==typeof t.configJson&&(n=JSON.parse(t.configJson)),e.direction="l"===n.direction?"ltr":"rtl",e.hasCover="1"==n.cover;s="0"==n.spead_mode?"single":"double";e.spread_mode=s,e.spread_mode_init=s,e.link_color=n.link_color,e.link_twinkle=n.link_twinkle,e.link_alpha=n.link_alpha,e.appButtonDispFlg=n.link_alpha;let r="../",a="",o="";e.url_Prefix=r,e.url_Suffix=a,e.customize_date=o;let l=(t.enlargeSizes||"300").split(","),A=[1,2],c=1;for(let e=0;e<l.length;e++){let t=parseInt(l[e])/100;t>c&&(c=t),A.push(t)}A.sort((function(e,t){return e-t})),e.zoomScale_max=c,e.zoomScale_list=A,tI(e),eI(e),XC(e),e.siteNum=t.clientNum||"",e.siteTitle=t.siteTitle||""}return{tmpInfo:e,...e,get:t=>e[t]??"",set:(t,i)=>{e[t]=i}}})),zC=()=>{let e;return PC.ajax({type:"GET",url:"../jsons/configinfo.json",async:!1,dataType:"json",success:function(t){e=t,PC("title").text(t.contentTitle)},error:function(e){}}),e},XC=function(e){var t=e.url_Prefix,i=e.url_Suffix,n="jsons";e.customize_date&&(n=OC.jsonsPath+e.customize_date),PC.ajax({type:"GET",url:t+n+"/customize.json"+i,async:!1,dataType:"json",success:function(t){if(t&&t.length>0)e.customizeJsons=t;else{let t=ZC(e);e.customizeJsons=t}$C(e)},error:function(){let t=ZC(e);e.customizeJsons=t,$C(e)}})},$C=function(e){let t=e.customizeJsons||[],i=1;for(let n=0;n<t.length;n++)if(!0===t[n].isContent){i=t[n].target;break}e.pageStart=i},ZC=function(e){let t=e.totalPageNo,i=[];if(t&&t>0)for(let n=0;n<t;n++){let e={};e.show=String(n+1),e.target=Number(n+1),e.isContent=!0,i.push(e)}return i},eI=function(e){var t=e.url_Prefix,i=e.url_Suffix,n="jsons";e.customize_date&&(n=OC.jsonsPath+e.customize_date);var s={size:[]};PC.ajax({type:"GET",url:t+n+"/contentinfo.json"+i,async:!1,dataType:"json",success:function(t){var i=(s=t).size[0].p1.x,n=s.size[0].p1.y;e.first_width=i,e.first_height=n,e.pdfSize=s.pdfSize,e.hasText=s.hasText},error:function(e){}})},tI=function(e){var t=e.url_Prefix,i=e.url_Suffix,n="jsons";e.customize_date&&(n=OC.jsonsPath+e.customize_date),PC.ajax({type:"GET",url:t+n+"/contentlist.json"+i,async:!1,dataType:"json",success:function(t){e.chapterJsons=t||[]},error:function(t){e.chapterJsons=[]}})},iI=function(e,t){let i,n,s="";if(PC(window.document).parents("iframe").prevObject.each((function(){let e=nI(this.referrer);null!=s&&""!==s||(s=e.pNo)})),null==s||""===s){"1"!=e.embed_flg&&(n=sI("pNo"));let s=localStorage.getItem(t);i=n||(s||1),(!i||parseInt(i)>e.totalPageNo)&&(i=1)}else i=s;return parseInt(i)},nI=function(e){let t={pNo:""};if(null!=e){let i=e.split("?");if(i.length>1){let e=i[1].split("&");for(let i=0;i<e.length;i++){let n=e[i].split("=");t[n[0]]=n[1]}}}return t},sI=function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)");try{var i=window.top.location.search.substr(1).match(t);return null!=i?decodeURIComponent(i[2]):""}catch(n){return""}},rI=TC("i18n",(()=>{const e=JC(),t=cF();var i=aI.en,n=e.dispLanguage;"1"==n?(i=aI.ja,PC("body").addClass("one-lane-ja")):"2"==n?(i=aI.en,PC("body").addClass("one-lane-en")):"3"==n?(i=aI.cn,PC("body").addClass("one-lane-cn")):"4"==n&&(i=aI.tw,PC("body").addClass("one-lane-tw"));const s=qf((()=>n=>{let s=e.totalPageNo;n>s&&(n=s),n=t.updateTurnCurrPage(n);let r="";return r=i.memo_inlink_content_joint_text.indexOf("{N}")>-1?i.memo_inlink_content_joint_text.replace("{N}",n):n+i.memo_inlink_content_joint_text,r}));return{...i,getMemoInlinkContentJointText:s}})),aI={ja:{pc_sidewrap__thumbnail__text:"サムネイル",pc_sidewrap__contents__text:"目次",pc_sidewrap__mome__text:"付箋一覧",pc_toolbar__search__placeholder:"コンテンツ内の文字を検索",pc_toolbar__zoom_in__text:"拡大",pc_toolbar__zoom_out__text:"縮小",pc_toolbar__pen__text:"ペン",pc_toolbar__memo__text:"付箋",pc_toolbar__cut__text:"切り抜き",pc_toolbar__cut__save:"保存",pc_toolbar__cut__cancel:"キャンセル",pc_toolbar__print__text:"印刷",pc_toolbar__first__text:"最初のページへ",pc_toolbar__previous__text:"前のページへ",pc_toolbar__next__text:"次のページへ",pc_toolbar__last__text:"最後のページへ",pc_toolbar__search__page__text:"のページへ",pc_toolbar__search__Retrieval:"検索中",pc_toolbar__search__piece:"件",pc_toolbar__search__failed:"ページロードする時に失敗しました。",pc_toolbar__search__result:"の検索結果 : ",pc_right_sidebar__share__text:"シェア",pc_right_sidebar__full_srceen__text:"フルスクリーン",pc_right_sidebar__print__text:"印刷",pc_bottom_Choice_print_left:"左ページ",pc_bottom_Choice_print_right:"右ページ",pc_bottom_Choice_print_double:"両ページ",pc_bottom_Choice_print_whole:"全てのページ",pc_bottom_Choice_print_current:"現在のページ",pc_print_title_text:"印刷する範囲を選択してください",pc_print_Popup_title_left_top:"印刷できないページが含んでいます",pc_print_Popup_title_left_bottom:"左ページが存在しません",pc_print_Popup_title_right_bottom:"右ページが存在しません",pc_print_single_option:"単ページ印刷",pc_ptint_double_option:"見開き印刷",pc_share_dialog__title__text:"このコンテンツをシェア",pc_share_dialog__copy_button__text:"コピー",pc_share_dialog__twitter_title__text:"このページの情報をX（旧Twitter）でシェアできます。",pc_embed_share_dialog__title__text:"このコンテンツをシェア",pc_embed_share_dialog__copy_button__text:"URLをコピー",pad_sidebar__search__placeholder:"コンテンツ内の文字を検索",pad_sidebar__search_clean_button__text:"クリア",pad_footer__back_button__text:"戻る",pad_footer__larger_button__text:"拡大",pad_footer__normal_button__text:"通常",pad_share_content__title__text:"シェア",pad_share_content__copy_button__text:"URLをコピー",pad_share_content__content_url_title__text:"URLをコピーしました",sd_sidebar__search__placeholder:"コンテンツ内の文字を検索",sd_sidebar__search_clean_button__text:"クリア",sd_footer__back_button__text:"戻る",sd_footer__larger_button__text:"拡大",sd_footer__normal_button__text:"通常",sd_toolbar__search__result:"の検索結果 : ",sd_share_content__title__text:"シェア",sd_share_content__copy_button__text:"URLをコピー",sd_share_content__content_url_title__text:"URLをコピーしました",embedded_sd_share_content__app_button__text:"アプリで見る",embedded_sd_share_content__browser_button__text:"コンテンツを見る",embedded_sd_share_content__qrcode_contents_text__1:"QRコードを読み取ることで、",embedded_sd_share_content__qrcode_contents_text__2:"コンテンツの共有ができます。",memo_cleanLinkInfo_text:"設定したリンクを解除します。本当によろしいですか？",memo_cleanLinkMemo_text:"この付箋を削除します。本当によろしいですか？",memo_inlink_content_joint_text:"ページ目",memo_button_yes_text:"はい",memo_button_no_text:"いいえ",memo_select_template_title_text:"付箋の色を選択してください",memo_select_template_option_yellow_text:"黄色",memo_select_template_option_red_text:"赤色",memo_select_template_option_blue_text:"青色",memo_select_template_option_selected_text:"画面をクリックして付箋を貼り付ける場所を選択してください。",memo_select_template_option_selected_button:"作成済みの付箋一覧を見る",memo_template_title_text:"付箋",memo_template_control_close_title_text:"付箋を\n削除します",memo_template_control_clean_link_title_text:"設定したリンク先\nを解除します",memo_template_control_text_placeholder_text:"ここをタップしてテキストを入力してください。",memo_template_control_unfold_text:"リンク先",memo_template_control_button_edit_text:"編集する",memo_template_control_type_radio_1_text:"コンテンツ内のページ",memo_template_control_type_radio_2_text:"URL",memo_template_control_outlink_placeholder_text:"URLを入力してください",memo_template_control_inlink_title_1_text:"ページ番号を選択",memo_template_control_inlink_title_2_text:"ページ",memo_add_overstep_maxNum_10_text:"ページ毎に付箋の数は10個までです。",memo_add_overstep_maxNum_20_text:"見開きありの場合、2ページ合わせて20個までの付箋が作成できます。",painter_clear_painter_text:"描画した内容を全て削除します。本当によろしいですか？",painter_mobile_clear_painter_text:"描画した内容を全て削除します。<br>本当によろしいですか？",painter_curve_title_text:"フリーハンド\n描画ツール",painter_straightline_title_text:"直線描画\nツール",painter_lineWidth_title_text:"ペン先／太さ\n選択",painter_color_title_text:"色選択",painter_back_title_text:"描画内容を\nひとつ戻す",painter_clear_title_text:"描画内容\nを全削除",checkContentNum_error_text:"別コンテンツが開かれていますので、<br>本閲覧ページが無効になりました。",mobile_memo_create_text_1:"画面をタップして付箋を貼り付ける",mobile_memo_create_text_2:"場所を選択してください。",mobile_memo_create_button_text:"キャンセル",mobile_memo_text_dialog_text_title:"付箋メモ内容の編集",mobile_memo_text_dialog_text_placeholder:"ここをタップしてテキストを入力してくださ い。",mobile_memo_text_dialog_outlink_title:"リンク先URLの編集",mobile_memo_text_dialog_outlink_placeholder:"URLを入力してください",mobile_memo_text_dialog_save:"保存",mobile_memo_text_dialog_cancel:"キャンセル",mobile_memo_text_save_dialog_text:"編集した内容を保存します、<br>よろしいですか？",mobile_memo_text_cancel_dialog_text:"編集した内容を破棄します、<br>よろしいですか？"},en:{pc_sidewrap__thumbnail__text:"Thumbnail",pc_sidewrap__contents__text:"Contents",pc_sidewrap__mome__text:"Notes list",pc_toolbar__search__placeholder:"Search for text in content",pc_toolbar__zoom_in__text:"Zoom in",pc_toolbar__zoom_out__text:"Zoom out",pc_toolbar__pen__text:"Pen",pc_toolbar__memo__text:"Sticky note",pc_toolbar__cut__text:"Crop out",pc_toolbar__cut__save:"Save",pc_toolbar__cut__cancel:"Cancel",pc_toolbar__print__text:"Print",pc_toolbar__first__text:"First page",pc_toolbar__previous__text:"Previous page",pc_toolbar__next__text:"Next page",pc_toolbar__last__text:"Last page",pc_toolbar__search__page__text:"Page",pc_toolbar__search__Retrieval:"Searching",pc_toolbar__search__piece:"results",pc_toolbar__search__failed:"Searching failed.",pc_toolbar__search__result:"Search result : ",pc_right_sidebar__share__text:"Share",pc_right_sidebar__full_srceen__text:"Full screen",pc_right_sidebar__print__text:"Print",pc_bottom_Choice_print_left:"Left page",pc_bottom_Choice_print_right:"Right page",pc_bottom_Choice_print_double:"Double pages",pc_bottom_Choice_print_whole:"Whole book",pc_bottom_Choice_print_current:"Current page",pc_print_title_text:"Please select the area to print",pc_print_Popup_title_left_top:"Includes unprintable pages",pc_print_Popup_title_left_bottom:"Left page does not exist",pc_print_Popup_title_right_bottom:"Right page does not exist",pc_print_single_option:"Single page printing",pc_ptint_double_option:"Double page printing",pc_share_dialog__title__text:"Share this content",pc_share_dialog__copy_button__text:"Copy",pc_share_dialog__twitter_title__text:"This page can be shared on X (former Twitter).",pc_embed_share_dialog__title__text:"Share this content",pc_embed_share_dialog__copy_button__text:"Copy URL",pad_sidebar__search__placeholder:"Search for text in content",pad_sidebar__search_clean_button__text:"Clear",pad_footer__back_button__text:"Back",pad_footer__larger_button__text:"Enlarge",pad_footer__normal_button__text:"Normal",pad_share_content__title__text:"Share",pad_share_content__copy_button__text:"Copy URL",pad_share_content__content_url_title__text:"URL has been copied",sd_sidebar__search__placeholder:"Search for text in content",sd_sidebar__search_clean_button__text:"Clear",sd_footer__back_button__text:"Back",sd_footer__larger_button__text:"Enlarge",sd_footer__normal_button__text:"Normal",sd_toolbar__search__result:"Search result : ",sd_share_content__title__text:"Share",sd_share_content__copy_button__text:"Copy URL",sd_share_content__content_url_title__text:"URL has been copied",embedded_sd_share_content__app_button__text:"View in APP",embedded_sd_share_content__browser_button__text:"View content",embedded_sd_share_content__qrcode_contents_text__1:"You can share the content by scanning this QR code.",memo_cleanLinkInfo_text:"Are you sure you want to release the set link？",memo_cleanLinkMemo_text:"Are you sure you want to delete this sticky note？",memo_inlink_content_joint_text:"Page {N}",memo_button_yes_text:"Yes",memo_button_no_text:"No",memo_select_template_title_text:"Please select the color of the sticky note",memo_select_template_option_yellow_text:"Yellow",memo_select_template_option_red_text:"Red",memo_select_template_option_blue_text:"Blue",memo_select_template_option_selected_text:"Click on the page and select the location where the sticky note will be pasted.",memo_select_template_option_selected_button:"View the list of sticky notes",memo_template_title_text:"Sticky note",memo_template_control_close_title_text:"Delete \n sticky notes",memo_template_control_clean_link_title_text:"Release \n the set link",memo_template_control_text_placeholder_text:"Tap here to enter text.",memo_template_control_unfold_text:"Link destination",memo_template_control_button_edit_text:"Edit",memo_template_control_type_radio_1_text:"Page in content",memo_template_control_type_radio_2_text:"URL",memo_template_control_outlink_placeholder_text:"Please enter the URL",memo_template_control_inlink_title_1_text:"Select page number",memo_template_control_inlink_title_2_text:"Page",memo_add_overstep_maxNum_10_text:"Create up to 10 sticky notes per page.",memo_add_overstep_maxNum_20_text:"In spead mode, you can create up to 20 sticky notes on 2 pages.",painter_clear_painter_text:"Are you sure you want to delete all the drawn contents？",painter_mobile_clear_painter_text:"Delete all the drawn contents. <br> Are you sure?",painter_curve_title_text:"Freehand \n drawing tools",painter_straightline_title_text:"Line \n drawing tool",painter_lineWidth_title_text:"Select \n pen tip/thickness",painter_color_title_text:"Select color",painter_back_title_text:"Undo \n the last drawing",painter_clear_title_text:"Delete \n all drawing",checkContentNum_error_text:"This browsing page has been disabled<br>because another content is open.",mobile_memo_create_text_1:"Tap the page to paste a sticky note",mobile_memo_create_text_2:"Please select a location.",mobile_memo_create_button_text:"Cancel",mobile_memo_text_dialog_text_title:"Editing sticky note contents",mobile_memo_text_dialog_text_placeholder:"Tap here to enter text.",mobile_memo_text_dialog_outlink_title:"Editing link URL",mobile_memo_text_dialog_outlink_placeholder:"Please enter the URL",mobile_memo_text_dialog_save:"Save",mobile_memo_text_dialog_cancel:"Cancel",mobile_memo_text_save_dialog_text:"Save the edited content.<br>Are you sure?",mobile_memo_text_cancel_dialog_text:"Discard the edited content.<br>Are you sure?"},cn:{pc_sidewrap__thumbnail__text:"缩略图",pc_sidewrap__contents__text:"目录",pc_sidewrap__mome__text:"便签一览",pc_toolbar__search__placeholder:"搜索内容中的文字",pc_toolbar__zoom_in__text:"放大",pc_toolbar__zoom_out__text:"缩小",pc_toolbar__pen__text:"画笔",pc_toolbar__memo__text:"便签",pc_toolbar__cut__text:"截图",pc_toolbar__cut__save:"保存",pc_toolbar__cut__cancel:"取消",pc_toolbar__print__text:"打印",pc_toolbar__first__text:"首页",pc_toolbar__previous__text:"上一页",pc_toolbar__next__text:"下一页",pc_toolbar__last__text:"尾页",pc_toolbar__search__page__text:"页",pc_toolbar__search__Retrieval:"搜索中",pc_toolbar__search__piece:"条",pc_toolbar__search__failed:"搜索失败",pc_toolbar__search__result:"搜索结果",pc_right_sidebar__share__text:"分享",pc_right_sidebar__full_srceen__text:"全屏",pc_right_sidebar__print__text:"打印",pc_bottom_Choice_print_left:"左页",pc_bottom_Choice_print_right:"右页",pc_bottom_Choice_print_double:"两页",pc_bottom_Choice_print_whole:"所有页面",pc_bottom_Choice_print_current:"当前页面",pc_print_title_text:"请选择打印区域",pc_print_Popup_title_left_top:"包含不能打印的页面",pc_print_Popup_title_left_bottom:"左页不存在",pc_print_Popup_title_right_bottom:"右页不存在",pc_print_single_option:"单页打印",pc_ptint_double_option:"双页打印",pc_share_dialog__title__text:"分享该内容",pc_share_dialog__copy_button__text:"复制",pc_share_dialog__twitter_title__text:"分享本网页至 X（旧 Twitter）。",pc_embed_share_dialog__title__text:"分享该内容",pc_embed_share_dialog__copy_button__text:"复制URL",pad_sidebar__search__placeholder:"搜索内容中的文字",pad_sidebar__search_clean_button__text:"清除",pad_footer__back_button__text:"返回",pad_footer__larger_button__text:"扩大",pad_footer__normal_button__text:"普通",pad_share_content__title__text:"分享",pad_share_content__copy_button__text:"复制URL",pad_share_content__content_url_title__text:"已复制URL",sd_sidebar__search__placeholder:"搜索内容中的文字",sd_sidebar__search_clean_button__text:"清除",sd_footer__back_button__text:"返回",sd_footer__larger_button__text:"扩大",sd_footer__normal_button__text:"普通",sd_toolbar__search__result:"搜索结果 ： ",sd_share_content__title__text:"分享",sd_share_content__copy_button__text:"复制URL",sd_share_content__content_url_title__text:"已复制URL",embedded_sd_share_content__app_button__text:"在应用中查看",embedded_sd_share_content__browser_button__text:"查看内容",embedded_sd_share_content__qrcode_contents_text__1:"您可以通过扫描二维码进行分享。",memo_cleanLinkInfo_text:"确定要消除已设定的链接吗？",memo_cleanLinkMemo_text:"确定要删除此便签吗？",memo_inlink_content_joint_text:"第{N}页",memo_button_yes_text:"是",memo_button_no_text:"否",memo_select_template_title_text:"请选择便签颜色",memo_select_template_option_yellow_text:"黄色",memo_select_template_option_red_text:"红色",memo_select_template_option_blue_text:"蓝色",memo_select_template_option_selected_text:"点击页面，选择粘贴便签的位置。",memo_select_template_option_selected_button:"查看已作成便签一览",memo_template_title_text:"便签",memo_template_control_close_title_text:"删除便签",memo_template_control_clean_link_title_text:"消除已设定的连接",memo_template_control_text_placeholder_text:"点击此处输入文字。",memo_template_control_unfold_text:"链接地址",memo_template_control_button_edit_text:"编辑",memo_template_control_type_radio_1_text:"内容中的页面",memo_template_control_type_radio_2_text:"网址",memo_template_control_outlink_placeholder_text:"请输入网址",memo_template_control_inlink_title_1_text:"请选择页码",memo_template_control_inlink_title_2_text:"页",memo_add_overstep_maxNum_10_text:"每页最多创建10个便签。",memo_add_overstep_maxNum_20_text:"双页表示时，两页合计最多可以创建20个便签。",painter_clear_painter_text:"确定要删除所有绘制的内容吗？",painter_mobile_clear_painter_text:"删除所有绘制的内容。<br>确定吗？",painter_curve_title_text:"手绘工具",painter_straightline_title_text:"直线工具",painter_lineWidth_title_text:"选择\n画笔类型/粗细",painter_color_title_text:"选择颜色",painter_back_title_text:"撤销上一个\n绘制内容",painter_clear_title_text:"删除全部\n绘制内容",checkContentNum_error_text:"当前浏览页面已被禁用，因为已打开其他内容。",mobile_memo_create_text_1:"点击页面粘贴便签",mobile_memo_create_text_2:"请选择位置。",mobile_memo_create_button_text:"取消",mobile_memo_text_dialog_text_title:"编辑便签内容",mobile_memo_text_dialog_text_placeholder:"点击此处输入文字。",mobile_memo_text_dialog_outlink_title:"编辑链接",mobile_memo_text_dialog_outlink_placeholder:"请输入网址",mobile_memo_text_dialog_save:"保存",mobile_memo_text_dialog_cancel:"取消",mobile_memo_text_save_dialog_text:"保存已编辑的内容。<br> 确定吗？",mobile_memo_text_cancel_dialog_text:"放弃已编辑的内容。<br> 确定吗？"},tw:{pc_sidewrap__thumbnail__text:"縮略圖",pc_sidewrap__contents__text:"目錄",pc_sidewrap__mome__text:"便簽一覽",pc_toolbar__search__placeholder:"搜索內容中的文字",pc_toolbar__zoom_in__text:"放大",pc_toolbar__zoom_out__text:"縮小",pc_toolbar__pen__text:"畫筆",pc_toolbar__memo__text:"便簽",pc_toolbar__cut__text:"裁剪",pc_toolbar__cut__save:"存儲",pc_toolbar__cut__cancel:"取消",pc_toolbar__print__text:"打印",pc_toolbar__first__text:"首頁",pc_toolbar__previous__text:"上一頁",pc_toolbar__next__text:"下一頁",pc_toolbar__last__text:"尾頁",pc_toolbar__search__page__text:"頁",pc_toolbar__search__Retrieval:"搜索中",pc_toolbar__search__piece:"條",pc_toolbar__search__failed:"搜索失敗。",pc_toolbar__search__result:"搜索結果 ： ",pc_right_sidebar__share__text:"分享",pc_right_sidebar__full_srceen__text:"全屏",pc_right_sidebar__print__text:"打印",pc_bottom_Choice_print_left:"左頁",pc_bottom_Choice_print_right:"右頁",pc_bottom_Choice_print_double:"雙頁",pc_bottom_Choice_print_whole:"全頁",pc_bottom_Choice_print_current:"當前頁",pc_print_title_text:"請選擇打印區域",pc_print_Popup_title_left_top:"包含不能打印的页面",pc_print_Popup_title_left_bottom:"左頁不存在",pc_print_Popup_title_right_bottom:"右頁不存在",pc_print_single_option:"單頁打印",pc_ptint_double_option:"雙頁打印",pc_share_dialog__title__text:"分享該內容",pc_share_dialog__copy_button__text:"複製",pc_share_dialog__twitter_title__text:"分享本網頁至 X（舊 Twitter）。",pc_embed_share_dialog__title__text:"分享該內容",pc_embed_share_dialog__copy_button__text:"複製URL",pad_sidebar__search__placeholder:"搜索內容中的文字",pad_sidebar__search_clean_button__text:"清除",pad_footer__back_button__text:"返回",pad_footer__larger_button__text:"擴大",pad_footer__normal_button__text:"普通",pad_share_content__title__text:"分享",pad_share_content__copy_button__text:"複製URL",pad_share_content__content_url_title__text:"已複製URL",sd_sidebar__search__placeholder:"搜索內容中的文字",sd_sidebar__search_clean_button__text:"清除",sd_footer__back_button__text:"返回",sd_footer__larger_button__text:"擴大",sd_footer__normal_button__text:"普通",sd_toolbar__search__result:"搜索結果 ： ",sd_share_content__title__text:"分享",sd_share_content__copy_button__text:"複製URL",sd_share_content__content_url_title__text:"已複製URL",embedded_sd_share_content__app_button__text:"在應用中查看",embedded_sd_share_content__browser_button__text:"查看內容",embedded_sd_share_content__qrcode_contents_text__1:"您可以通過掃描二維碼進行分享。",memo_cleanLinkInfo_text:"確定要消除已設定的鏈接嗎？",memo_cleanLinkMemo_text:"確定要刪除此便簽嗎？",memo_inlink_content_joint_text:"第{N}頁",memo_button_yes_text:"是",memo_button_no_text:"否",memo_select_template_title_text:"請選擇便簽顏色",memo_select_template_option_yellow_text:"黃色",memo_select_template_option_red_text:"紅色",memo_select_template_option_blue_text:"藍色",memo_select_template_option_selected_text:"點擊頁面，選擇粘貼便簽的位置。",memo_select_template_option_selected_button:"查看已作成便簽一覽",memo_template_title_text:"便簽",memo_template_control_close_title_text:"刪除便簽",memo_template_control_clean_link_title_text:"消除已設定的連接",memo_template_control_text_placeholder_text:"點擊此處輸入文字。",memo_template_control_unfold_text:"鏈接地址",memo_template_control_button_edit_text:"編輯",memo_template_control_type_radio_1_text:"內容中的頁面",memo_template_control_type_radio_2_text:"網址",memo_template_control_outlink_placeholder_text:"請輸入網址",memo_template_control_inlink_title_1_text:"請選擇頁碼",memo_template_control_inlink_title_2_text:"頁",memo_add_overstep_maxNum_10_text:"每頁做多創建10個便簽。",memo_add_overstep_maxNum_20_text:"雙頁表示時，兩頁合計最多可以創建20個便簽。",painter_clear_painter_text:"確定要刪除所有繪制的內容嗎？",painter_mobile_clear_painter_text:"刪除所以繪制的內容。<br>確定嗎？",painter_curve_title_text:"手繪工具",painter_straightline_title_text:"直線工具",painter_lineWidth_title_text:"選擇\n畫筆類型/粗細",painter_color_title_text:"選擇顏色",painter_back_title_text:"撤銷上一個\n繪製內容",painter_clear_title_text:"刪除全部\n繪製內容",checkContentNum_error_text:"當前瀏覽頁面已被禁用，因為已打開其他內容。",mobile_memo_create_text_1:"點擊頁面粘貼便簽",mobile_memo_create_text_2:"請選擇位置。",mobile_memo_create_button_text:"取消",mobile_memo_text_dialog_text_title:"編輯便簽內容",mobile_memo_text_dialog_text_placeholder:"點擊此處輸入文字。",mobile_memo_text_dialog_outlink_title:"編輯鏈接",mobile_memo_text_dialog_outlink_placeholder:"請輸入網址",mobile_memo_text_dialog_save:"保存",mobile_memo_text_dialog_cancel:"取消",mobile_memo_text_save_dialog_text:"保存已編輯的內容。<br> 確定嗎？",mobile_memo_text_cancel_dialog_text:"放棄已編輯的內容。<br> 確定嗎？"}};var oI="undefined"!=typeof window?window:void 0!==MC?MC:"undefined"!=typeof self?self:{};const lI=RC(oI),AI=NC(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var cI,uI=void 0!==MC?MC:"undefined"!=typeof window?window:{},hI=AI;"undefined"!=typeof document?cI=document:(cI=uI["__GLOBAL_DOCUMENT_CACHE@4"])||(cI=uI["__GLOBAL_DOCUMENT_CACHE@4"]=hI);var dI=cI;const gI=RC(dI);var pI={exports:{}};function fI(){return fI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},fI.apply(null,arguments)}const mI=NC(Object.freeze(Object.defineProperty({__proto__:null,get default(){return fI}},Symbol.toStringTag,{value:"Module"})));var CI=function(e){if(!e)return!1;var t=II.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(// IE8 and below
e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},II=Object.prototype.toString;function vI(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return BI(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return BI(e,t)}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function BI(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var yI=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(e,t){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);var i=this.typeToInterceptorsMap_.get(e);return!i.has(t)&&(i.add(t),!0)},t.removeInterceptor=function(e,t){var i=this.typeToInterceptorsMap_.get(e);return!(!i||!i.has(t))&&(i.delete(t),!0)},t.clearInterceptorsByType=function(e){return!!this.typeToInterceptorsMap_.get(e)&&(this.typeToInterceptorsMap_.delete(e),this.typeToInterceptorsMap_.set(e,new Set),!0)},t.clear=function(){return!!this.typeToInterceptorsMap_.size&&(this.typeToInterceptorsMap_=new Map,!0)},t.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set},t.execute=function(e,t){for(var i,n=vI(this.getForType(e));!(i=n()).done;){var s=i.value;try{t=s(t)}catch(I2){}}return t},e}(),bI=function(){function e(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(e){this.maxAttempts_=e},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(e){this.delayFactor_=e},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(e){this.fuzzFactor_=e},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(e){this.initialDelay_=e},t.createRetry=function(e){var t=void 0===e?{}:e,i=t.maxAttempts,n=t.delayFactor,s=t.fuzzFactor,r=t.initialDelay;return new EI({maxAttempts:i||this.maxAttempts_,delayFactor:n||this.delayFactor_,fuzzFactor:s||this.fuzzFactor_,initialDelay:r||this.initialDelay_})},e}(),EI=function(){function e(e){this.maxAttempts_=e.maxAttempts,this.delayFactor_=e.delayFactor,this.fuzzFactor_=e.fuzzFactor,this.currentDelay_=e.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var e=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+e},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),t=this.getCurrentMaxPossibleDelay();return e+Math.random()*(t-e)},e}(),wI=oI;var QI=function(e,t){return void 0===t&&(t=!1),function(i,n,s){if(i)e(i);else if(n.statusCode>=400&&n.statusCode<=599){var r=s;if(t)if(wI.TextDecoder){var a=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce((function(e,t){var i=t.split("="),n=i[0],s=i[1];return"charset"===n.trim()?s.trim():e}),"utf-8")}(n.headers&&n.headers["content-type"]);try{r=new TextDecoder(a).decode(s)}catch(I2){}}else r=String.fromCharCode.apply(null,new Uint8Array(s));e({cause:r})}else e(null,s)}},_I=oI,SI=mI,xI=CI,kI=yI,DI=bI;MI.httpHandler=QI,MI.requestInterceptorsStorage=new kI,MI.responseInterceptorsStorage=new kI,MI.retryManager=new DI;
/**
 * @license
 * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
 * Copyright (c) 2014 David Björklund
 * Available under the MIT license
 * <https://github.com/kesla/parse-headers/blob/master/LICENCE>
 */
var FI=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var i=e.indexOf(":"),n=e.slice(0,i).trim().toLowerCase(),s=e.slice(i+1).trim();void 0===t[n]?t[n]=s:Array.isArray(t[n])?t[n].push(s):t[n]=[t[n],s]})),t):t};function TI(e,t,i){var n=e;return xI(t)?(i=t,"string"==typeof e&&(n={uri:e})):n=SI({},t,{uri:e}),n.callback=i,n}function MI(e,t,i){return RI(t=TI(e,t,i))}function RI(e){if(void 0===e.callback)throw new Error("callback argument missing");if(e.requestType&&MI.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},i=MI.requestInterceptorsStorage.execute(e.requestType,t);e.uri=i.uri,e.headers=i.headers,e.body=i.body,e.metadata=i.metadata,e.retry=i.retry,e.timeout=i.timeout}var n=!1,s=function(t,i,s){n||(n=!0,e.callback(t,i,s))};function r(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(I2){}return null}(c),m)try{e=JSON.parse(e)}catch(I2){}return e}function a(t){if(clearTimeout(u),clearTimeout(e.retryTimeout),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,A||!MI.retryManager.getIsEnabled()||!e.retry||!e.retry.shouldRetry()){if(e.requestType&&MI.responseInterceptorsStorage.getIsEnabled()){var i={headers:C.headers||{},body:C.body,responseUrl:c.responseURL,responseType:c.responseType},n=MI.responseInterceptorsStorage.execute(e.requestType,i);C.body=n.body,C.headers=n.headers}return s(t,C)}e.retryTimeout=setTimeout((function(){e.retry.moveToNextAttempt(),e.xhr=c,RI(e)}),e.retry.getCurrentFuzzedDelay())}function o(){if(!A){var t;clearTimeout(u),clearTimeout(e.retryTimeout),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var i=C,n=null;if(0!==t?(i={body:r(),statusCode:t,method:d,headers:{},url:h,rawRequest:c},c.getAllResponseHeaders&&(i.headers=FI(c.getAllResponseHeaders()))):n=new Error("Internal XMLHttpRequest Error"),e.requestType&&MI.responseInterceptorsStorage.getIsEnabled()){var a={headers:i.headers||{},body:i.body,responseUrl:c.responseURL,responseType:c.responseType},o=MI.responseInterceptorsStorage.execute(e.requestType,a);i.body=o.body,i.headers=o.headers}return s(n,i,i.body)}}var l,A,c=e.xhr||null;c||(c=e.cors||e.useXDR?new MI.XDomainRequest:new MI.XMLHttpRequest);var u,h=c.url=e.uri||e.url,d=c.method=e.method||"GET",g=e.body||e.data,p=c.headers=e.headers||{},f=!!e.sync,m=!1,C={body:void 0,headers:{},statusCode:0,method:d,url:h,rawRequest:c};if("json"in e&&!1!==e.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),g=JSON.stringify(!0===e.json?g:e.json))),c.onreadystatechange=function(){4!==c.readyState||MI.responseInterceptorsStorage.getIsEnabled()||setTimeout(o,0)},c.onload=o,c.onerror=a,c.onprogress=function(){},c.onabort=function(){A=!0,clearTimeout(e.retryTimeout)},c.ontimeout=a,c.open(d,h,!f,e.username,e.password),f||(c.withCredentials=!!e.withCredentials),!f&&e.timeout>0&&(u=setTimeout((function(){if(!A){A=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",a(e)}}),e.timeout)),c.setRequestHeader)for(l in p)p.hasOwnProperty(l)&&c.setRequestHeader(l,p[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(g||null),c}pI.exports=MI,pI.exports.default=MI,MI.XMLHttpRequest=_I.XMLHttpRequest||function(){},MI.XDomainRequest="withCredentials"in new MI.XMLHttpRequest?MI.XMLHttpRequest:_I.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}(["get","put","post","patch","head","delete"],(function(e){MI["delete"===e?"del":e]=function(t,i,n){return(i=TI(t,i,n)).method=e.toUpperCase(),RI(i)}}));const NI=RC(pI.exports);var LI={exports:{}},UI=dI,HI=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function PI(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function OI(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function GI(){this.values=HI(null)}function KI(e,t,i,n){var s=n?e.split(n):[e];for(var r in s)if("string"==typeof s[r]){var a=s[r].split(i);if(2===a.length)t(a[0].trim(),a[1].trim())}}function qI(e,t,i){var n=e;function s(){var t=OI(e);if(null===t)throw new PI(PI.Errors.BadTimeStamp,"Malformed timestamp: "+n);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function r(){e=e.replace(/^\s+/,"")}if(r(),t.startTime=s(),r(),"--\x3e"!==e.substr(0,3))throw new PI(PI.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);e=e.substr(3),r(),t.endTime=s(),r(),function(e,t){var n=new GI;KI(e,(function(e,t){switch(e){case"region":for(var s=i.length-1;s>=0;s--)if(i[s].id===t){n.set(e,i[s].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var r=t.split(","),a=r[0];n.integer(e,a),n.percent(e,a)&&n.set("snapToLines",!1),n.alt(e,a,["auto"]),2===r.length&&n.alt("lineAlign",r[1],["start","center","end"]);break;case"position":r=t.split(","),n.percent(e,r[0]),2===r.length&&n.alt("positionAlign",r[1],["start","center","end"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical","");try{t.line=n.get("line","auto")}catch(I2){}t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100);try{t.align=n.get("align","center")}catch(I2){t.align=n.get("align","middle")}try{t.position=n.get("position","auto")}catch(I2){t.position=n.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=n.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}PI.prototype=HI(Error.prototype),PI.prototype.constructor=PI,PI.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},GI.prototype={
// Only accept the first assignment to any key.
set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},
// Return the value for a key, or a default value.
// If 'defaultKey' is passed then 'dflt' is assumed to be an object with
// a number of possible default values as properties where 'defaultKey' is
// the key of the property that will be chosen; otherwise it's assumed to be
// a single value.
get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},
// Check whether we have a value for a key.
has:function(e){return e in this.values},
// Accept a setting if its one of the given alternatives.
alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},
// Accept a setting if its a valid (signed) integer.
integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},
// Accept a setting if its a valid percentage.
percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var YI=UI.createElement&&UI.createElement("textarea"),VI={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},WI={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},jI={v:"title",lang:"lang"},JI={rt:"ruby"};function zI(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function n(t,i){var n=VI[t];if(!n)return null;var s=e.document.createElement(n),r=jI[t];return r&&i&&(s[r]=i.trim()),s}for(var s,r,a,o,l=e.document.createElement("div"),A=l,c=[];null!==(s=i());)if("<"!==s[0])A.appendChild(e.document.createTextNode((r=s,YI.innerHTML=r,r=YI.textContent,YI.textContent="",r)));else{if("/"===s[1]){c.length&&c[c.length-1]===s.substr(2).replace(">","")&&(c.pop(),A=A.parentNode);continue}var u,h=OI(s.substr(1,s.length-2));if(h){u=e.document.createProcessingInstruction("timestamp",h),A.appendChild(u);continue}var d=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!d)continue;if(!(u=n(d[1],d[3])))continue;if(a=A,JI[(o=u).localName]&&JI[o.localName]!==a.localName)continue;if(d[2]){var g=d[2].split(".");g.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(WI.hasOwnProperty(i)){var n=t?"background-color":"color",s=WI[i];u.style[n]=s}})),u.className=g.join(" ")}c.push(d[1]),A.appendChild(u),A=u}return l}var XI=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function $I(e){for(var t=0;t<XI.length;t++){var i=XI[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function ZI(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function n(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function s(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\n|\r)/);return r?(e.length=0,r[0]):i}return"ruby"===t.tagName?s(e):t.childNodes?(n(e,t),s(e)):void 0}for(n(t,e);i=s(t);)for(var r=0;r<i.length;r++)if($I(i.charCodeAt(r)))return"rtl";return"ltr"}function ev(){}function tv(e,t,i){ev.call(this),this.cue=t,this.cueDiv=zI(e,t.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:ZI(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var s=0;switch(t.positionAlign){case"start":case"line-left":s=t.position;break;case"center":s=t.position-t.size/2;break;case"end":case"line-right":s=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(s,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(s,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function iv(e){var t,i,n,s;if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,s=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||s,this.height=e.height||i,this.bottom=e.bottom||s+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight}function nv(e,t,i,n){var s=new iv(t),r=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,s=0;s<i.length&&i[s]!==t;s++)"showing"===i[s].mode&&n++;return-1*++n}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width"}var A=s.lineHeight,c=A*Math.round(a),u=i[l]+A,h=o[0];Math.abs(c)>u&&(c=c<0?-1:1,c*=Math.ceil(u/A)*A),a<0&&(c+=""===r.vertical?i.height:i.width,o=o.reverse()),s.move(h,c)}else{var d=s.lineHeight/i.height*100;switch(r.lineAlign){case"center":a-=d/2;break;case"end":a-=d}switch(r.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],s=new iv(t)}var g=function(e,t){for(var s,r=new iv(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(n);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(s=new iv(e),a=l),e=new iv(r)}return s||r}(s,o);t.move(g.toCSSCompatValues(i))}function sv(){}ev.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},ev.prototype.formatStyle=function(e,t){return 0===e?0:e+t},tv.prototype=HI(ev.prototype),tv.prototype.constructor=tv,iv.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},iv.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},iv.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},iv.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},iv.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},iv.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},iv.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},iv.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},sv.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},sv.convertCueToDOMTree=function(e,t){return e&&t?zI(e,t):null};sv.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var n=e.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",i.appendChild(n),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var s=[],r=iv.getSimpleBoxPosition(n),a={font:Math.round(.05*r.height*100)/100+"px sans-serif"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new tv(e,o,a),n.appendChild(i.div),nv(0,i,r,s),o.displayState=i.div,s.push(iv.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)n.appendChild(t[o].displayState)},sv.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},sv.Parser.prototype={
// If the error is a ParsingError then report it to the consumer if
// possible. If it's not a ParsingError then throw it like normal.
reportOrThrowError:function(e){if(!(e instanceof PI))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){for(var e=t.buffer,i=0;i<e.length&&"\r"!==e[i]&&"\n"!==e[i];)++i;var n=e.substr(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.substr(i),n}function n(e){e.match(/X-TIMESTAMP-MAP/)?KI(e,(function(e,i){if("X-TIMESTAMP-MAP"===e)!function(e){var i=new GI;KI(e,(function(e,t){switch(e){case"MPEGT":i.integer(e+"S",t);break;case"LOCA":i.set(e+"L",OI(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}(i)}),/=/):KI(e,(function(e,i){if("Region"===e)!function(e){var i=new GI;if(KI(e,(function(e,t){switch(e){case"id":i.set(e,t);break;case"width":i.percent(e,t);break;case"lines":i.integer(e,t);break;case"regionanchor":case"viewportanchor":var n=t.split(",");if(2!==n.length)break;var s=new GI;if(s.percent("x",n[0]),s.percent("y",n[1]),!s.has("x")||!s.has("y"))break;i.set(e+"X",s.get("x")),i.set(e+"Y",s.get("y"));break;case"scroll":i.alt(e,t,["up"])}}),/=/,/\s/),i.has("id")){var n=new(t.vttjs.VTTRegion||t.window.VTTRegion);n.width=i.get("width",100),n.lines=i.get("lines",3),n.regionAnchorX=i.get("regionanchorX",0),n.regionAnchorY=i.get("regionanchorY",100),n.viewportAnchorX=i.get("viewportanchorX",0),n.viewportAnchorY=i.get("viewportanchorY",100),n.scroll=i.get("scroll",""),t.onregion&&t.onregion(n),t.regionList.push({id:i.get("id"),region:n})}}(i)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var s;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var r=(s=i()).match(/^WEBVTT([ \t].*)?$/);if(!r||!r[0])throw new PI(PI.Errors.BadSignature);t.state="HEADER"}for(var a=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:s=i(),t.state){case"HEADER":/:/.test(s)?n(s):s||(t.state="ID");continue;case"NOTE":s||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(s)){t.state="NOTE";break}if(!s)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(I2){t.cue.align="middle"}if(t.state="CUE",-1===s.indexOf("--\x3e")){t.cue.id=s;continue}case"CUE":try{qI(s,t.cue,t.regionList)}catch(I2){t.reportOrThrowError(I2),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var o=-1!==s.indexOf("--\x3e");if(!s||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=s.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":s||(t.state="ID");continue}}}catch(I2){t.reportOrThrowError(I2),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new PI(PI.Errors.BadSignature)}catch(I2){e.reportOrThrowError(I2)}return e.onflush&&e.onflush(),this}};var rv=sv,av={"":1,lr:1,rl:1},ov={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function lv(e){return"string"==typeof e&&(!!ov[e.toLowerCase()]&&e.toLowerCase())}function Av(e,t,i){this.hasBeenReset=!1;var n="",s=!1,r=e,a=t,o=i,l=null,A="",c=!0,u="auto",h="start",d="auto",g="auto",p=100,f="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n},set:function(e){n=""+e}},pauseOnExit:{enumerable:!0,get:function(){return s},set:function(e){s=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return A},set:function(e){var t=function(e){return"string"==typeof e&&!!av[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");A=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(e){c=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=lv(e);t&&(h=t,this.hasBeenReset=!0)}},position:{enumerable:!0,get:function(){return d},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");d=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=lv(e);t&&(g=t,this.hasBeenReset=!0)}},size:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");p=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return f},set:function(e){var t=lv(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");f=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Av.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var cv=Av,uv={"":!0,up:!0};function hv(e){return"number"==typeof e&&e>=0&&e<=100}var dv=function(){var e=100,t=3,i=0,n=100,s=0,r=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!hv(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return n},set:function(e){if(!hv(e))throw new Error("RegionAnchorX must be between 0 and 100.");n=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!hv(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!hv(e))throw new Error("ViewportAnchorY must be between 0 and 100.");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!hv(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return"string"==typeof e&&!!uv[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t||(a=t)}}})},gv=oI,pv=LI.exports={WebVTT:rv,VTTCue:cv,VTTRegion:dv};gv.vttjs=pv,gv.WebVTT=pv.WebVTT;var fv=pv.VTTCue,mv=pv.VTTRegion,Cv=gv.VTTCue,Iv=gv.VTTRegion;pv.shim=function(){gv.VTTCue=fv,gv.VTTRegion=mv},pv.restore=function(){gv.VTTCue=Cv,gv.VTTRegion=Iv},gv.VTTCue||pv.shim();const vv=RC(LI.exports);var Bv="https://example.com",yv=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=lI.location&&lI.location.href||"");var i=/^\/\//.test(e),n=!lI.location&&!/\/\//i.test(e);e=new lI.URL(e,lI.location||Bv);var s=new URL(t,e);return n?s.href.slice(19):i?s.href.slice(s.protocol.length):s.href},bv=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(var s=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,s)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();function Ev(e){for(var t,i=(t=e,lI.atob?lI.atob(t):Buffer.from(t,"base64").toString("binary")),n=new Uint8Array(i.length),s=0;s<i.length;s++)n[s]=i.charCodeAt(s);return n}
/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class wv extends bv{constructor(){super(),this.buffer=""}
/**
   * Add new data to be parsed.
   *
   * @param {string} data the text to process
   */push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const Qv=String.fromCharCode(9),_v=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Sv=function(e){const t={};if(!e)return t;const i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))'));let n,s=i.length;for(;s--;)""!==i[s]&&(n=/([^=]*)=(.*)/.exec(i[s]).slice(1),n[0]=n[0].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^['"](.*)['"]$/g,"$1"),t[n[0]]=n[1]);return t},xv=e=>{const t=e.split("x"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i};class kv extends bv{constructor(){super(),this.customParsers=[],this.tagMappers=[]}
/**
   * Parses an additional line of input.
   *
   * @param {string} line a single line of an M3U8 file to parse
   */push(e){let t,i;if(0===(e=e.trim()).length)return;if("#"!==e[0])return void this.trigger("data",{type:"uri",uri:e});this.tagMappers.reduce(((t,i)=>{const n=i(e);return n===e?t:t.concat([n])}),[e]).forEach((e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e),t)this.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(e),t)return i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger("data",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),void this.trigger("data",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=fI(_v(t[1]),{type:"tag",tagType:"byterange"}),void this.trigger("data",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:"tag",tagType:"map"},t[1]){const e=Sv(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=_v(e.BYTERANGE))}this.trigger("data",i)}else{if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t)return i={type:"tag",tagType:"stream-inf"},t[1]&&(i.attributes=Sv(t[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=xv(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))),void this.trigger("data",i);if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:"tag",tagType:"media"},t[1]&&(i.attributes=Sv(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:"tag",tagType:"program-date-time"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:"tag",tagType:"key"},t[1]&&(i.attributes=Sv(t[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger("data",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:"tag",tagType:"start"},t[1]&&(i.attributes=Sv(t[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"skip"},i.attributes=Sv(t[1]),i.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(i.attributes["SKIPPED-SEGMENTS"]=parseInt(i.attributes["SKIPPED-SEGMENTS"],10)),i.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(i.attributes["RECENTLY-REMOVED-DATERANGES"]=i.attributes["RECENTLY-REMOVED-DATERANGES"].split(Qv)),void this.trigger("data",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"part"},i.attributes=Sv(t[1]),["DURATION"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty("BYTERANGE")&&(i.attributes.byterange=_v(i.attributes.BYTERANGE)),void this.trigger("data",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"server-control"},i.attributes=Sv(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger("data",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"part-inf"},i.attributes=Sv(t[1]),["PART-TARGET"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger("data",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"preload-hint"},i.attributes=Sv(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t="BYTERANGE-LENGTH"===e?"length":"offset";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger("data",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"rendition-report"},i.attributes=Sv(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger("data",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:"tag",tagType:"daterange"},i.attributes=Sv(t[1]),["ID","CLASS"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),["START-DATE","END-DATE"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),["DURATION","PLANNED-DURATION"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["END-ON-NEXT"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const n=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),s=/^\d+(\.\d+)?$/.test(i.attributes[t]);i.attributes[t]=n?i.attributes[t].toString(16):s?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger("data",i)}else if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t)this.trigger("data",{type:"tag",tagType:"independent-segments"});else if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(e),t)this.trigger("data",{type:"tag",tagType:"i-frames-only"});else{if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(e),t)return i={type:"tag",tagType:"content-steering"},i.attributes=Sv(t[1]),void this.trigger("data",i);if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(e),t)return i={type:"tag",tagType:"i-frame-playlist"},i.attributes=Sv(t[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=xv(i.attributes.RESOLUTION)),i.attributes["AVERAGE-BANDWIDTH"]&&(i.attributes["AVERAGE-BANDWIDTH"]=parseInt(i.attributes["AVERAGE-BANDWIDTH"],10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),void this.trigger("data",i);if(t=/^#EXT-X-DEFINE:(.*)$/.exec(e),t)return i={type:"tag",tagType:"define"},i.attributes=Sv(t[1]),void this.trigger("data",i);this.trigger("data",{type:"tag",data:e.slice(4)})}}}}else this.trigger("data",{type:"comment",text:e.slice(1)})}))}
/**
   * Add a parser for custom headers
   *
   * @param {Object}   options              a map of options for the added parser
   * @param {RegExp}   options.expression   a regular expression to match the custom header
   * @param {string}   options.customType   the custom type to register to the output
   * @param {Function} [options.dataParser] function to parse the line into an object
   * @param {boolean}  [options.segment]    should tag data be attached to the segment object
   */addParser({expression:e,customType:t,dataParser:i,segment:n}){"function"!=typeof i&&(i=e=>e),this.customParsers.push((s=>{if(e.exec(s))return this.trigger("data",{type:"custom",data:i(s),customType:t,segment:n}),!0}))}
/**
   * Add a custom header mapper
   *
   * @param {Object}   options
   * @param {RegExp}   options.expression   a regular expression to match the custom header
   * @param {Function} options.map          function to translate tag into a different tag
   */addTagMapper({expression:e,map:t}){this.tagMappers.push((i=>e.test(i)?t(i):i))}}const Dv=function(e){const t={};return Object.keys(e).forEach((function(i){var n;t[(n=i,n.toLowerCase().replace(/-(\w)/g,(e=>e[1].toUpperCase())))]=e[i]})),t},Fv=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:n}=e;if(!t)return;const s="#EXT-X-SERVER-CONTROL",r="holdBack",a="partHoldBack",o=i&&3*i,l=n&&2*n;i&&!t.hasOwnProperty(r)&&(t[r]=o,this.trigger("info",{message:`${s} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[r]<o&&(this.trigger("warn",{message:`${s} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${o})`}),t[r]=o),n&&!t.hasOwnProperty(a)&&(t[a]=3*n,this.trigger("info",{message:`${s} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),n&&t[a]<l&&(this.trigger("warn",{message:`${s} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};let Tv=class extends bv{constructor(e={}){super(),this.lineStream=new wv,this.parseStream=new kv,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const t=this,i=[];let n,s,r={},a=!1;const o=function(){},l={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}};let A=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let c=0,u=0;const h={};this.on("end",(()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&n&&(r.map=n),!r.key&&s&&(r.key=s),r.timeline||"number"!=typeof A||(r.timeline=A),this.manifest.preloadSegment=r)})),this.parseStream.on("data",(function(e){let d,g;if(t.manifest.definitions)for(const i in t.manifest.definitions)if(e.uri&&(e.uri=e.uri.replace(`{$${i}}`,t.manifest.definitions[i])),e.attributes)for(const n in e.attributes)"string"==typeof e.attributes[n]&&(e.attributes[n]=e.attributes[n].replace(`{$${i}}`,t.manifest.definitions[i]));({tag(){({version(){e.version&&(this.manifest.version=e.version)},"allow-cache"(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const t={};"length"in e&&(r.byterange=t,t.length=e.length,"offset"in e||(e.offset=c)),"offset"in e&&(r.byterange=t,t.offset=e.offset),c=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.title&&(r.title=e.title),e.duration>0&&(r.duration=e.duration),0===e.duration&&(r.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("com.microsoft.playready"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:e.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,
// remove '0x' from the key id string
keyId:e.attributes.KEYID.substring(2)},
// decode the base64-encoded PSSH box
pssh:Ev(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),s={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(s.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else s=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence"(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence"(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,A=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type"(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),s&&(n.key=s)},"stream-inf"(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(r.attributes||(r.attributes={}),fI(r.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});const t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes["GROUP-ID"]]=t[e.attributes["GROUP-ID"]]||{},d=t[e.attributes["GROUP-ID"]],g={default:/yes/i.test(e.attributes.DEFAULT)},g.default?g.autoselect=!0:g.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(g.language=e.attributes.LANGUAGE),e.attributes.URI&&(g.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(g.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(g.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(g.forced=/yes/i.test(e.attributes.FORCED)),d[e.attributes.NAME]=g},discontinuity(){A+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time"(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),r.dateTimeString=e.dateTimeString,r.dateTimeObject=e.dateTimeObject;const{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(e.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight(((e,t)=>(t.programDateTime=e-1e3*t.duration,t.programDateTime)),this.lastProgramDateTime)},targetduration(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,Fv.call(this,this.manifest))},start(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out"(){r.cueOut=e.data},"cue-out-cont"(){r.cueOutCont=e.data},"cue-in"(){r.cueIn=e.data},skip(){this.manifest.skip=Dv(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part(){a=!0;const t=this.manifest.segments.length,i=Dv(e.attributes);r.parts=r.parts||[],r.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty("offset")||(i.byterange.offset=u),u=i.byterange.offset+i.byterange.length);const n=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${n} for segment #${t}`,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(((e,t)=>{e.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})}))},"server-control"(){const t=this.manifest.serverControl=Dv(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Fv.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const t=this.manifest.segments.length,i=Dv(e.attributes),n=i.type&&"PART"===i.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty("offset")||(i.byterange.offset=n?u:0,n&&(u=i.byterange.offset+i.byterange.length)));const s=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${s} for segment #${t}`,e.attributes,["TYPE","URI"]),i.type)for(let e=0;e<r.preloadHints.length-1;e++){const n=r.preloadHints[e];n.type&&(n.type===i.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${s} for segment #${t} has the same TYPE ${i.type} as preload hint #${e}`}))}},"rendition-report"(){const t=Dv(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);const i=this.manifest.renditionReports.length-1,n=["LAST-MSN","URI"];a&&n.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${i}`,e.attributes,n)},"part-inf"(){this.manifest.partInf=Dv(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Fv.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(Dv(e.attributes));const t=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${t}`,e.attributes,["ID","START-DATE"]);const i=this.manifest.dateRanges[t];i.endDate&&i.startDate&&new Date(i.endDate)<new Date(i.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),i.duration&&i.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),i.plannedDuration&&i.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const n=!!i.endOnNext;if(n&&!i.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),n&&(i.duration||i.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),i.duration&&i.endDate){const e=i.startDate.getTime()+1e3*i.duration;this.manifest.dateRanges[t].endDate=new Date(e)}if(h[i.id]){for(const t in h[i.id])if(i[t]&&JSON.stringify(h[i.id][t])!==JSON.stringify(i[t])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const e=this.manifest.dateRanges.findIndex((e=>e.id===i.id));this.manifest.dateRanges[e]=fI(this.manifest.dateRanges[e],i),h[i.id]=fI(h[i.id],i),this.manifest.dateRanges.pop()}else h[i.id]=i},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=Dv(e.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",e.attributes,["SERVER-URI"])},
/** @this {Parser} */
define(){this.manifest.definitions=this.manifest.definitions||{};const t=(e,t)=>{e in this.manifest.definitions?this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${e}`}):this.manifest.definitions[e]=t};if("QUERYPARAM"in e.attributes){if("NAME"in e.attributes||"IMPORT"in e.attributes)return void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});const i=this.params.get(e.attributes.QUERYPARAM);return i?void t(e.attributes.QUERYPARAM,decodeURIComponent(i)):void this.trigger("error",{message:`EXT-X-DEFINE: No query param ${e.attributes.QUERYPARAM}`})}return"NAME"in e.attributes?"IMPORT"in e.attributes?void this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"}):"VALUE"in e.attributes&&"string"==typeof e.attributes.VALUE?void t(e.attributes.NAME,e.attributes.VALUE):void this.trigger("error",{message:`EXT-X-DEFINE: No value for ${e.attributes.NAME}`}):"IMPORT"in e.attributes?this.mainDefinitions[e.attributes.IMPORT]?void t(e.attributes.IMPORT,this.mainDefinitions[e.attributes.IMPORT]):void this.trigger("error",{message:`EXT-X-DEFINE: No value ${e.attributes.IMPORT} to import, or IMPORT used on main playlist`}):void this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:e.attributes,uri:e.uri,timeline:A}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",e.attributes,["BANDWIDTH","URI"])}}[e.tagType]||o).call(t)},uri(){r.uri=e.uri,i.push(r),this.manifest.targetDuration&&!("duration"in r)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),r.duration=this.manifest.targetDuration),s&&(r.key=s),r.timeline=A,n&&(r.map=n),u=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){e.segment?(r.custom=r.custom||{},r.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(t)}))}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger("warn",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,i){const n=[];i.forEach((function(e){t.hasOwnProperty(e)||n.push(e)})),n.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${n.join(", ")}`})}
/**
   * Parse the input string and update the manifest object.
   *
   * @param {string} chunk a potentially incomplete portion of the manifest
   */push(e){this.lineStream.push(e)}
/**
   * Flush any remaining input. This can be handy if the last line of an M3U8
   * manifest did not contain a trailing newline but the file has been
   * completely received.
   */end(){this.lineStream.push("\n"),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}
/**
   * Add an additional parser for non-standard tags
   *
   * @param {Object}   options              a map of options for the added parser
   * @param {RegExp}   options.expression   a regular expression to match the custom header
   * @param {string}   options.customType   the custom type to register to the output
   * @param {Function} [options.dataParser] function to parse the line into an object
   * @param {boolean}  [options.segment]    should tag data be attached to the segment object
   */addParser(e){this.parseStream.addParser(e)}
/**
   * Add a custom header mapper
   *
   * @param {Object}   options
   * @param {RegExp}   options.expression   a regular expression to match the custom header
   * @param {Function} options.map          function to translate tag into a different tag
   */addTagMapper(e){this.parseStream.addTagMapper(e)}};var Mv,Rv,Nv={
// to determine mime types
mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,
// to determine if a codec is audio or video
video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,
// mux.js support regex
muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,
// match nothing as muxer does not support text right now.
// there cannot never be a character before the start of a string
// so this matches nothing.
muxerText:/a^/},Lv=["video","audio","text"],Uv=["Video","Audio","Text"],Hv=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})):e},Pv=function(e){void 0===e&&(e="");var t=e.split(","),i=[];return t.forEach((function(e){var t;e=e.trim(),Lv.forEach((function(n){var s=Nv[n].exec(e.toLowerCase());if(s&&!(s.length<=1)){t=n;var r=e.substring(0,s[1].length),a=e.replace(r,"");i.push({type:r,details:a,mediaType:n})}})),t||i.push({type:e,details:"",mediaType:"unknown"})})),i},Ov=function(e){return void 0===e&&(e=""),Nv.audio.test(e.trim().toLowerCase())},Gv=function(e){if(e&&"string"==typeof e){var t,i=e.toLowerCase().split(",").map((function(e){return Hv(e.trim())})),n="video";1===i.length&&Ov(i[0])?n="audio":1===i.length&&(void 0===(t=i[0])&&(t=""),Nv.text.test(t.trim().toLowerCase()))&&(n="application");var s="mp4";return i.every((function(e){return Nv.mp4.test(e)}))?s="mp4":i.every((function(e){return Nv.webm.test(e)}))?s="webm":i.every((function(e){return Nv.ogg.test(e)}))&&(s="ogg"),n+"/"+s+';codecs="'+e+'"'}},Kv=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=!1),lI.MediaSource&&lI.MediaSource.isTypeSupported&&lI.MediaSource.isTypeSupported(Gv(e))||t&&lI.ManagedMediaSource&&lI.ManagedMediaSource.isTypeSupported&&lI.ManagedMediaSource.isTypeSupported(Gv(e))||!1},qv=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<Uv.length;t++){if(Nv["muxer"+Uv[t]].test(e))return!0}return!1}))},Yv="mp4a.40.2",Vv=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,Wv=/^application\/dash\+xml/i,jv=function(e){return Vv.test(e)?"hls":Wv.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null},Jv=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},zv=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||Jv(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Xv=lI.BigInt||Number,$v=[Xv("0x1"),Xv("0x100"),Xv("0x10000"),Xv("0x1000000"),Xv("0x100000000"),Xv("0x10000000000"),Xv("0x1000000000000"),Xv("0x100000000000000"),Xv("0x10000000000000000")];Mv=new Uint16Array([65484]),255===(Rv=new Uint8Array(Mv.buffer,Mv.byteOffset,Mv.byteLength))[0]||Rv[0];var Zv,eB,tB=function(e,t){var i=void 0===t?{}:t,n=i.signed,s=void 0!==n&&n,r=i.le,a=void 0!==r&&r;e=zv(e);var o=a?"reduce":"reduceRight",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,n){var s=a?n:Math.abs(n+1-e.length);return t+Xv(i)*$v[s]}),Xv(0));if(s){var A=$v[e.length]/Xv(2)-Xv(1);(l=Xv(l))>A&&(l-=A,l-=A,l-=Xv(2))}return Number(l)},iB=function(e,t){var i={}.le,n=void 0!==i&&i;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0),e=Xv(e);for(var s,r=(s=e,Math.ceil(function(e){return e.toString(2).length}(s)/8)),a=new Uint8Array(new ArrayBuffer(r)),o=0;o<r;o++){var l=n?o:Math.abs(o+1-a.length);a[l]=Number(e/$v[o]&Xv(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},nB=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i},sB=function(e,t,i){var n=void 0===i?{}:i,s=n.offset,r=void 0===s?0:s,a=n.mask,o=void 0===a?[]:a;e=zv(e);var l=(t=zv(t)).every?t.every:Array.prototype.every;return t.length&&e.length-r>=t.length&&// ie 11 doesn't support every on uin8
l.call(t,(function(t,i){return t===(o[i]?o[i]&e[r+i]:e[r+i])}))},rB={},aB={},oB={};function lB(){if(Zv)return oB;function e(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}Zv=1;var t=e({
/**
     * `text/html`, the only mime type that triggers treating an XML document as HTML.
     *
     * @see DOMParser.SupportedType.isHTML
     * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration
     * @see https://en.wikipedia.org/wiki/HTML Wikipedia
     * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN
     * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec
     */
HTML:"text/html",
/**
     * Helper method to check a mime type if it indicates an HTML document
     *
     * @param {string} [value]
     * @returns {boolean}
     *
     * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration
     * @see https://en.wikipedia.org/wiki/HTML Wikipedia
     * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN
     * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring 	 */
isHTML:function(e){return e===t.HTML},
/**
     * `application/xml`, the standard mime type for XML documents.
     *
     * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration
     * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303
     * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia
     */
XML_APPLICATION:"application/xml",
/**
     * `text/html`, an alias for `application/xml`.
     *
     * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303
     * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration
     * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia
     */
XML_TEXT:"text/xml",
/**
     * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,
     * but is parsed as an XML document.
     *
     * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration
     * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec
     * @see https://en.wikipedia.org/wiki/XHTML Wikipedia
     */
XML_XHTML_APPLICATION:"application/xhtml+xml",
/**
     * `image/svg+xml`,
     *
     * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration
     * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1
     * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia
     */
XML_SVG_IMAGE:"image/svg+xml"}),i=e({
/**
     * The XHTML namespace.
     *
     * @see http://www.w3.org/1999/xhtml
     */
HTML:"http://www.w3.org/1999/xhtml",
/**
     * Checks if `uri` equals `NAMESPACE.HTML`.
     *
     * @param {string} [uri]
     *
     * @see NAMESPACE.HTML
     */
isHTML:function(e){return e===i.HTML},
/**
     * The SVG namespace.
     *
     * @see http://www.w3.org/2000/svg
     */
SVG:"http://www.w3.org/2000/svg",
/**
     * The `xml:` namespace.
     *
     * @see http://www.w3.org/XML/1998/namespace
     */
XML:"http://www.w3.org/XML/1998/namespace",
/**
     * The `xmlns:` namespace
     *
     * @see https://www.w3.org/2000/xmlns/
     */
XMLNS:"http://www.w3.org/2000/xmlns/"});return oB.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},oB.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"==typeof i.find)return i.find.call(e,t);for(var n=0;n<e.length;n++)if(Object.prototype.hasOwnProperty.call(e,n)){var s=e[n];if(t.call(void 0,s,n,e))return s}},oB.freeze=e,oB.MIME_TYPE=t,oB.NAMESPACE=i,oB}function AB(){if(eB)return aB;eB=1;var e=lB(),t=e.find,i=e.NAMESPACE;function n(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function r(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(n):[]}(e);return Object.keys(t.reduce(s,{}))}function a(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function o(e,t){var i=e.prototype;if(!(i instanceof t)){let n=function(){};n.prototype=t.prototype,n=new n,a(i,n),e.prototype=i=n}i.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),i.constructor=e)}var l={},A=l.ELEMENT_NODE=1,c=l.ATTRIBUTE_NODE=2,u=l.TEXT_NODE=3,h=l.CDATA_SECTION_NODE=4,d=l.ENTITY_REFERENCE_NODE=5,g=l.ENTITY_NODE=6,p=l.PROCESSING_INSTRUCTION_NODE=7,f=l.COMMENT_NODE=8,m=l.DOCUMENT_NODE=9,C=l.DOCUMENT_TYPE_NODE=10,I=l.DOCUMENT_FRAGMENT_NODE=11,v=l.NOTATION_NODE=12,B={},y={};B.INDEX_SIZE_ERR=(y[1]="Index size error",1),B.DOMSTRING_SIZE_ERR=(y[2]="DOMString size error",2);var b=B.HIERARCHY_REQUEST_ERR=(y[3]="Hierarchy request error",3);B.WRONG_DOCUMENT_ERR=(y[4]="Wrong document",4),B.INVALID_CHARACTER_ERR=(y[5]="Invalid character",5),B.NO_DATA_ALLOWED_ERR=(y[6]="No data allowed",6),B.NO_MODIFICATION_ALLOWED_ERR=(y[7]="No modification allowed",7);var E=B.NOT_FOUND_ERR=(y[8]="Not found",8);B.NOT_SUPPORTED_ERR=(y[9]="Not supported",9);var w=B.INUSE_ATTRIBUTE_ERR=(y[10]="Attribute in use",10);function Q(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,y[e]),this.message=y[e],Error.captureStackTrace&&Error.captureStackTrace(this,Q);return i.code=e,t&&(this.message=this.message+": "+t),i}function _(){}function S(e,t){this._node=e,this._refresh=t,x(this)}function x(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(fe(e,"length",i.length),!e.$$length||i.length<e.$$length)for(var n=i.length;n in e;n++)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n];a(i,e),e._inc=t}}function k(){}function D(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function F(e,t,n,s){if(s?t[D(t,s)]=n:t[t.length++]=n,e){n.ownerElement=e;var r=e.ownerDocument;r&&(s&&H(r,e,s),function(e,t,n){e&&e._inc++;var s=n.namespaceURI;s===i.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(r,e,n))}}function T(e,t,i){var n=D(t,i);if(!(n>=0))throw new Q(E,new Error(e.tagName+"@"+i));for(var s=t.length-1;n<s;)t[n]=t[++n];if(t.length=s,e){var r=e.ownerDocument;r&&(H(r,e,i),i.ownerElement=null)}}function M(){}function R(){}function N(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function L(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(L(e,t))return!0}while(e=e.nextSibling)}function U(){this.ownerDocument=this}function H(e,t,n,s){e&&e._inc++,n.namespaceURI===i.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function P(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{for(var s=t.firstChild,r=0;s;)n[r++]=s,s=s.nextSibling;n.length=r,delete n[n.length]}}}function O(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,P(e.ownerDocument,e),t}function G(e){return e&&e.nodeType===R.DOCUMENT_TYPE_NODE}function K(e){return e&&e.nodeType===R.ELEMENT_NODE}function q(e){return e&&e.nodeType===R.TEXT_NODE}function Y(e,i){var n=e.childNodes||[];if(t(n,K)||G(i))return!1;var s=t(n,G);return!(i&&s&&n.indexOf(s)>n.indexOf(i))}function V(e,i){var n=e.childNodes||[];if(t(n,(function(e){return K(e)&&e!==i})))return!1;var s=t(n,G);return!(i&&s&&n.indexOf(s)>n.indexOf(i))}function W(e,t,i){if(!function(e){return e&&(e.nodeType===R.DOCUMENT_NODE||e.nodeType===R.DOCUMENT_FRAGMENT_NODE||e.nodeType===R.ELEMENT_NODE)}(e))throw new Q(b,"Unexpected parent node type "+e.nodeType);if(i&&i.parentNode!==e)throw new Q(E,"child not in parent");if(
// 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException.
!function(e){return e&&(K(e)||q(e)||G(e)||e.nodeType===R.DOCUMENT_FRAGMENT_NODE||e.nodeType===R.COMMENT_NODE||e.nodeType===R.PROCESSING_INSTRUCTION_NODE)}(t)||// 5. If either `node` is a Text node and `parent` is a document,
// the sax parser currently adds top level text nodes, this will be fixed in 0.9.0
// || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)
// or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException.
G(t)&&e.nodeType!==R.DOCUMENT_NODE)throw new Q(b,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function j(e,i,n){var s=e.childNodes||[],r=i.childNodes||[];if(i.nodeType===R.DOCUMENT_FRAGMENT_NODE){var a=r.filter(K);if(a.length>1||t(r,q))throw new Q(b,"More than one element or text in fragment");if(1===a.length&&!Y(e,n))throw new Q(b,"Element in fragment can not be inserted before doctype")}if(K(i)&&!Y(e,n))throw new Q(b,"Only one element can be added and only after doctype");if(G(i)){if(t(s,G))throw new Q(b,"Only one doctype is allowed");var o=t(s,K);if(n&&s.indexOf(o)<s.indexOf(n))throw new Q(b,"Doctype can only be inserted before an element");if(!n&&o)throw new Q(b,"Doctype can not be appended since element is present")}}function J(e,i,n){var s=e.childNodes||[],r=i.childNodes||[];if(i.nodeType===R.DOCUMENT_FRAGMENT_NODE){var a=r.filter(K);if(a.length>1||t(r,q))throw new Q(b,"More than one element or text in fragment");if(1===a.length&&!V(e,n))throw new Q(b,"Element in fragment can not be inserted before doctype")}if(K(i)&&!V(e,n))throw new Q(b,"Only one element can be added and only after doctype");if(G(i)){if(t(s,(function(e){return G(e)&&e!==n})))throw new Q(b,"Only one doctype is allowed");var o=t(s,K);if(n&&s.indexOf(o)<s.indexOf(n))throw new Q(b,"Doctype can only be inserted before an element")}}function z(e,t,i,n){W(e,t,i),e.nodeType===R.DOCUMENT_NODE&&(n||j)(e,t,i);var s=t.parentNode;if(s&&s.removeChild(t),t.nodeType===I){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,a.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return P(e.ownerDocument||e,e),t.nodeType==I&&(t.firstChild=t.lastChild=null),t}function X(){this._nsMap={}}function $(){}function Z(){}function ee(){}function te(){}function ie(){}function ne(){}function se(){}function re(){}function ae(){}function oe(){}function le(){}function Ae(){}function ce(e,t){var i=[],n=9==this.nodeType&&this.documentElement||this,s=n.prefix,r=n.namespaceURI;if(r&&null==s&&null==(s=n.lookupPrefix(r)))var a=[{namespace:r,prefix:null}];return de(this,i,e,t,a),i.join("")}function ue(e,t,n){var s=e.prefix||"",r=e.namespaceURI;if(!r)return!1;if("xml"===s&&r===i.XML||r===i.XMLNS)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix===s)return o.namespace!==r}return!0}function he(e,t,i){e.push(" ",t,'="',i.replace(/[<>&"\t\n\r]/g,N),'"')}function de(e,t,n,s,r){if(r||(r=[]),s){if(!(e=s(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case A:var a=e.attributes,o=a.length,l=e.firstChild,g=e.tagName,v=g;if(!(n=i.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var B,y=0;y<a.length;y++)if("xmlns"===a.item(y).name){B=a.item(y).value;break}if(!B)for(var b=r.length-1;b>=0;b--){if(""===(E=r[b]).prefix&&E.namespace===e.namespaceURI){B=E.namespace;break}}if(B!==e.namespaceURI)for(b=r.length-1;b>=0;b--){var E;if((E=r[b]).namespace===e.namespaceURI){E.prefix&&(v=E.prefix+":"+g);break}}}t.push("<",v);for(var w=0;w<o;w++){"xmlns"==(Q=a.item(w)).prefix?r.push({prefix:Q.localName,namespace:Q.value}):"xmlns"==Q.nodeName&&r.push({prefix:"",namespace:Q.value})}for(w=0;w<o;w++){var Q,_,S;if(ue(Q=a.item(w),0,r))he(t,(_=Q.prefix||"")?"xmlns:"+_:"xmlns",S=Q.namespaceURI),r.push({prefix:_,namespace:S});de(Q,t,n,s,r)}if(g===v&&ue(e,0,r))he(t,(_=e.prefix||"")?"xmlns:"+_:"xmlns",S=e.namespaceURI),r.push({prefix:_,namespace:S});if(l||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(g)){if(t.push(">"),n&&/^script$/i.test(g))for(;l;)l.data?t.push(l.data):de(l,t,n,s,r.slice()),l=l.nextSibling;else for(;l;)de(l,t,n,s,r.slice()),l=l.nextSibling;t.push("</",v,">")}else t.push("/>");return;case m:case I:for(l=e.firstChild;l;)de(l,t,n,s,r.slice()),l=l.nextSibling;return;case c:return he(t,e.name,e.value);case u:return t.push(e.data.replace(/[<&>]/g,N));case h:return t.push("<![CDATA[",e.data,"]]>");case f:return t.push("\x3c!--",e.data,"--\x3e");case C:var x=e.publicId,k=e.systemId;if(t.push("<!DOCTYPE ",e.name),x)t.push(" PUBLIC ",x),k&&"."!=k&&t.push(" ",k),t.push(">");else if(k&&"."!=k)t.push(" SYSTEM ",k,">");else{var D=e.internalSubset;D&&t.push(" [",D,"]"),t.push(">")}return;case p:return t.push("<?",e.target," ",e.data,"?>");case d:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ge(e,t,i){var n;switch(t.nodeType){case A:(n=t.cloneNode(!1)).ownerDocument=e;case I:break;case c:i=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,i)for(var s=t.firstChild;s;)n.appendChild(ge(e,s,i)),s=s.nextSibling;return n}function pe(e,t,i){var n=new t.constructor;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var r=t[s];"object"!=typeof r&&r!=n[s]&&(n[s]=r)}switch(t.childNodes&&(n.childNodes=new _),n.ownerDocument=e,n.nodeType){case A:var a=t.attributes,o=n.attributes=new k,l=a.length;o._ownerElement=n;for(var u=0;u<l;u++)n.setAttributeNode(pe(e,a.item(u),!0));break;case c:i=!0}if(i)for(var h=t.firstChild;h;)n.appendChild(pe(e,h,i)),h=h.nextSibling;return n}function fe(e,t,i){e[t]=i}B.INVALID_STATE_ERR=(y[11]="Invalid state",11),B.SYNTAX_ERR=(y[12]="Syntax error",12),B.INVALID_MODIFICATION_ERR=(y[13]="Invalid modification",13),B.NAMESPACE_ERR=(y[14]="Invalid namespace",14),B.INVALID_ACCESS_ERR=(y[15]="Invalid access",15),Q.prototype=Error.prototype,a(B,Q),_.prototype={
/**
     * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.
     * @standard level1
     */
length:0,
/**
     * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.
     * @standard level1
     * @param index  unsigned long
     *   Index into the collection.
     * @return Node
     * 	The node at the indexth position in the NodeList, or null if that is not a valid index.
     */
item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],n=0;n<this.length;n++)de(this[n],i,e,t);return i.join("")},
/**
     * @private
     * @param {function (Node):boolean} predicate
     * @returns {Node[]}
     */
filter:function(e){return Array.prototype.filter.call(this,e)},
/**
     * @private
     * @param {Node} item
     * @returns {number}
     */
indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},S.prototype.item=function(e){return x(this),this[e]||null},o(S,_),k.prototype={length:0,item:_.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new Q(w);var i=this.getNamedItem(e.nodeName);return F(this._ownerElement,this,e,i),i},
/* returns Node */
setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new Q(w);return t=this.getNamedItemNS(e.namespaceURI,e.localName),F(this._ownerElement,this,e,t),t},
/* returns Node */
removeNamedItem:function(e){var t=this.getNamedItem(e);return T(this._ownerElement,this,t),t},
// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
//for level2
removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return T(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var n=this[i];if(n.localName==t&&n.namespaceURI==e)return n}return null}},M.prototype={
/**
     * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported.
     * The different implementations fairly diverged in what kind of features were reported.
     * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.
     *
     * @deprecated It is deprecated and modern browsers return true in all cases.
     *
     * @param {string} feature
     * @param {string} [version]
     * @returns {boolean} always true
     *
     * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN
     * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core
     * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard
     */
hasFeature:function(e,t){return!0},
/**
     * Creates an XML Document object of the specified type with its document element.
     *
     * __It behaves slightly different from the description in the living standard__:
     * - There is no interface/class `XMLDocument`, it returns a `Document` instance.
     * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared.
     * - this implementation is not validating names or qualified names
     *   (when parsing XML strings, the SAX parser takes care of that)
     *
     * @param {string|null} namespaceURI
     * @param {string} qualifiedName
     * @param {DocumentType=null} doctype
     * @returns {Document}
     *
     * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN
     * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial)
     * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument  DOM Level 2 Core
     *
     * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract
     * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names
     * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names
     */
createDocument:function(e,t,i){var n=new U;if(n.implementation=this,n.childNodes=new _,n.doctype=i||null,i&&n.appendChild(i),t){var s=n.createElementNS(e,t);n.appendChild(s)}return n},
/**
     * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.
     *
     * __This behavior is slightly different from the in the specs__:
     * - this implementation is not validating names or qualified names
     *   (when parsing XML strings, the SAX parser takes care of that)
     *
     * @param {string} qualifiedName
     * @param {string} [publicId]
     * @param {string} [systemId]
     * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation
     * 				  or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`
     *
     * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN
     * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core
     * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard
     *
     * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract
     * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names
     * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names
     */
createDocumentType:function(e,t,i){var n=new ne;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=i||"",n}},R.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,
// Modified in DOM Level 2:
insertBefore:function(e,t){return z(this,e,t)},replaceChild:function(e,t){z(this,e,t,J),t&&this.removeChild(t)},removeChild:function(e){return O(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return pe(this.ownerDocument||this,this,e)},
// Modified in DOM Level 2:
normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==u&&e.nodeType==u?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},
// Introduced in DOM Level 2:
isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},
// Introduced in DOM Level 2:
hasAttributes:function(){return this.attributes.length>0},
/**
     * Look up the prefix associated to the given namespace URI, starting from this node.
     * **The default namespace declarations are ignored by this method.**
     * See Namespace Prefix Lookup for details on the algorithm used by this method.
     *
     * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._
     *
     * @param {string | null} namespaceURI
     * @returns {string | null}
     * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix
     * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo
     * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix
     * @see https://github.com/xmldom/xmldom/issues/322
     */
lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&i[n]===e)return n;t=t.nodeType==c?t.ownerDocument:t.parentNode}return null},
// Introduced in DOM Level 3:
lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==c?t.ownerDocument:t.parentNode}return null},
// Introduced in DOM Level 3:
isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},a(l,R),a(l,R.prototype),U.prototype={
//implementation : null,
nodeName:"#document",nodeType:m,
/**
     * The DocumentType node of the document.
     *
     * @readonly
     * @type DocumentType
     */
doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==I){for(var i=e.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,t),i=n}return e}return z(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===A&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),O(this,e)},replaceChild:function(e,t){z(this,e,t,J),e.ownerDocument=this,t&&this.removeChild(t),K(e)&&(this.documentElement=e)},
// Introduced in DOM Level 2:
importNode:function(e,t){return ge(this,e,t)},
// Introduced in DOM Level 2:
getElementById:function(e){var t=null;return L(this.documentElement,(function(i){if(i.nodeType==A&&i.getAttribute("id")==e)return t=i,!0})),t},
/**
     * The `getElementsByClassName` method of `Document` interface returns an array-like object
     * of all child elements which have **all** of the given class name(s).
     *
     * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters.
     *
     *
     * Warning: This is a live LiveNodeList.
     * Changes in the DOM will reflect in the array as the changes occur.
     * If an element selected by this array no longer qualifies for the selector,
     * it will automatically be removed. Be aware of this for iteration purposes.
     *
     * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace
     *
     * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName
     * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname
     */
getElementsByClassName:function(e){var t=r(e);return new S(this,(function(i){var n=[];return t.length>0&&L(i.documentElement,(function(s){if(s!==i&&s.nodeType===A){var a=s.getAttribute("class");if(a){var o=e===a;if(!o){var l=r(a);o=t.every((c=l,function(e){return c&&-1!==c.indexOf(e)}))}o&&n.push(s)}}var c})),n}))},
//document factory method:
createElement:function(e){var t=new X;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new _,(t.attributes=new k)._ownerElement=t,t},createDocumentFragment:function(){var e=new oe;return e.ownerDocument=this,e.childNodes=new _,e},createTextNode:function(e){var t=new ee;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new te;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new le;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new $;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ae;return t.ownerDocument=this,t.nodeName=e,t},
// Introduced in DOM Level 2:
createElementNS:function(e,t){var i=new X,n=t.split(":"),s=i.attributes=new k;return i.childNodes=new _,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,s._ownerElement=i,i},
// Introduced in DOM Level 2:
createAttributeNS:function(e,t){var i=new $,n=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,i}},o(U,R),X.prototype={nodeType:A,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},
//four real opeartion method
appendChild:function(e){return e.nodeType===I?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,P(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},
//get real attribute name,and remove it by removeAttributeNode
removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+i,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new S(this,(function(t){var i=[];return L(t,(function(n){n===t||n.nodeType!=A||"*"!==e&&n.tagName!=e||i.push(n)})),i}))},getElementsByTagNameNS:function(e,t){return new S(this,(function(i){var n=[];return L(i,(function(s){s===i||s.nodeType!==A||"*"!==e&&s.namespaceURI!==e||"*"!==t&&s.localName!=t||n.push(s)})),n}))}},U.prototype.getElementsByTagName=X.prototype.getElementsByTagName,U.prototype.getElementsByTagNameNS=X.prototype.getElementsByTagNameNS,o(X,R),$.prototype.nodeType=c,o($,R),Z.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(y[b])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},o(Z,R),ee.prototype={nodeName:"#text",nodeType:u,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},o(ee,Z),te.prototype={nodeName:"#comment",nodeType:f},o(te,Z),ie.prototype={nodeName:"#cdata-section",nodeType:h},o(ie,Z),ne.prototype.nodeType=C,o(ne,R),se.prototype.nodeType=v,o(se,R),re.prototype.nodeType=g,o(re,R),ae.prototype.nodeType=d,o(ae,R),oe.prototype.nodeName="#document-fragment",oe.prototype.nodeType=I,o(oe,R),le.prototype.nodeType=p,o(le,R),Ae.prototype.serializeToString=function(e,t,i){return ce.call(e,t,i)},R.prototype.toString=ce;try{if(Object.defineProperty){let e=function(t){switch(t.nodeType){case A:case I:var i=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&i.push(e(t)),t=t.nextSibling;return i.join("");default:return t.nodeValue}};Object.defineProperty(S.prototype,"length",{get:function(){return x(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return e(this)},set:function(e){switch(this.nodeType){case A:case I:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),fe=function(e,t,i){e["$$"+t]=i}}}catch(I2){}return aB.DocumentType=ne,aB.DOMException=Q,aB.DOMImplementation=M,aB.Element=X,aB.Node=R,aB.NodeList=_,aB.XMLSerializer=Ae,aB}var cB,uB={},hB={};var dB,gB,pB,fB={};function mB(){if(dB)return fB;dB=1;var e=lB().NAMESPACE,t=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+t.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),n=new RegExp("^"+t.source+i.source+"*(?::"+t.source+i.source+"*)?$");function s(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function r(){}function a(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function o(t,i,n,s,r,a){function o(e,t,i){n.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),n.addValue(e,
// @see https://www.w3.org/TR/xml/#AVNormalize
// since the xmldom sax parser does not "interpret" DTD the following is not implemented:
// - recursive replacement of (DTD) entity references
// - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA
t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,r),i)}for(var l,A=++i,c=0;;){var u=t.charAt(A);switch(u){case"=":if(1===c)l=t.slice(i,A),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(a.warning('attribute value must after "="'),l=t.slice(i,A)),i=A+1,!((A=t.indexOf(u,i))>0))throw new Error("attribute value no end '"+u+"' match");o(l,h=t.slice(i,A),i-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');o(l,h=t.slice(i,A),i),a.warning('attribute "'+l+'" missed start quot('+u+")!!"),i=A+1,c=5}break;case"/":switch(c){case 0:n.setTagName(t.slice(i,A));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:break;case 2:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==c&&n.setTagName(t.slice(i,A)),A;case">":switch(c){case 0:n.setTagName(t.slice(i,A));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=t.slice(i,A)).slice(-1)&&(n.closed=!0,h=h.slice(0,-1));case 2:2===c&&(h=l),4==c?(a.warning('attribute "'+h+'" missed quot(")!'),o(l,h,i)):(e.isHTML(s[""])&&h.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),o(h,h,i));break;case 3:throw new Error("attribute value missed!!")}return A;case"":u=" ";default:if(u<=" ")switch(c){case 0:n.setTagName(t.slice(i,A)),c=6;break;case 1:l=t.slice(i,A),c=2;break;case 4:var h=t.slice(i,A);a.warning('attribute "'+h+'" missed quot(")!!'),o(l,h,i);case 5:c=6}else switch(c){case 2:n.tagName,e.isHTML(s[""])&&l.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,i),i=A,c=1;break;case 5:a.warning('attribute space is required"'+l+'"!!');case 6:c=1,i=A;break;case 3:c=4,i=A;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}A++}}function l(t,i,n){for(var s=t.tagName,r=null,a=t.length;a--;){var o=t[a],l=o.qName,A=o.value;if((g=l.indexOf(":"))>0)var c=o.prefix=l.slice(0,g),h=l.slice(g+1),d="xmlns"===c&&h;else h=l,c=null,d="xmlns"===l&&"";o.localName=h,!1!==d&&(null==r&&(r={},u(n,n={})),n[d]=r[d]=A,o.uri=e.XMLNS,i.startPrefixMapping(d,A))}for(a=t.length;a--;){(c=(o=t[a]).prefix)&&("xml"===c&&(o.uri=e.XML),"xmlns"!==c&&(o.uri=n[c||""]))}var g;(g=s.indexOf(":"))>0?(c=t.prefix=s.slice(0,g),h=t.localName=s.slice(g+1)):(c=null,h=t.localName=s);var p=t.uri=n[c||""];if(i.startElement(p,h,s,t),!t.closed)return t.currentNSMap=n,t.localNSMap=r,!0;if(i.endElement(p,h,s),r)for(c in r)Object.prototype.hasOwnProperty.call(r,c)&&i.endPrefixMapping(c)}function A(e,t,i,n,s){if(/^(?:script|textarea)$/i.test(i)){var r=e.indexOf("</"+i+">",t),a=e.substring(t+1,r);if(/[&<]/.test(a))return/^script$/i.test(i)?(s.characters(a,0,a.length),r):(a=a.replace(/&#?\w+;/g,n),s.characters(a,0,a.length),r)}return t+1}function c(e,t,i,n){var s=n[i];return null==s&&((s=e.lastIndexOf("</"+i+">"))<t&&(s=e.lastIndexOf("</"+i)),n[i]=s),s<t}function u(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function h(e,t,i,n){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(s=e.indexOf("--\x3e",t+4))>t?(i.comment(e,t+4,s-t-4),s+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var s=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,s-t-9),i.endCDATA(),s+3}var r=function(e,t){var i,n=[],s=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;s.lastIndex=t,s.exec(e);for(;i=s.exec(e);)if(n.push(i),i[1])return n}(e,t),a=r.length;if(a>1&&/!doctype/i.test(r[0][0])){var o=r[1][0],l=!1,A=!1;a>3&&(/^public$/i.test(r[2][0])?(l=r[3][0],A=a>4&&r[4][0]):/^system$/i.test(r[2][0])&&(A=r[3][0]));var c=r[a-1];return i.startDTD(o,l,A),i.endDTD(),c.index+c[0].length}return-1}function d(e,t,i){var n=e.indexOf("?>",t);if(n){var s=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return s?(s[0].length,i.processingInstruction(s[1],s[2]),n+2):-1}return-1}function g(){this.attributeNames={}}return s.prototype=new Error,s.prototype.name=s.name,r.prototype={parse:function(t,i,n){var r=this.domBuilder;r.startDocument(),u(i,i={}),function(t,i,n,r,u){function p(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function f(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?p(parseInt(t.substr(1).replace("x","0x"))):(u.error("entity not found:"+e),e)}function m(e){if(e>w){var i=t.substring(w,e).replace(/&#?\w+;/g,f);y&&C(w),r.characters(i,0,e-w),w=e}}function C(e,i){for(;e>=v&&(i=B.exec(t));)I=i.index,v=I+i[0].length,y.lineNumber++;y.columnNumber=e-I+1}var I=0,v=0,B=/.*(?:\r\n?|\n)|.*$/g,y=r.locator,b=[{currentNSMap:i}],E={},w=0;for(;;){try{var Q=t.indexOf("<",w);if(Q<0){if(!t.substr(w).match(/^\s*$/)){var _=r.doc,S=_.createTextNode(t.substr(w));_.appendChild(S),r.currentElement=S}return}switch(Q>w&&m(Q),t.charAt(Q+1)){case"/":var x=t.indexOf(">",Q+3),k=t.substring(Q+2,x).replace(/[ \t\n\r]+$/g,""),D=b.pop();x<0?(k=t.substring(Q+2).replace(/[\s<].*/,""),u.error("end tag name: "+k+" is not complete:"+D.tagName),x=Q+1+k.length):k.match(/\s</)&&(k=k.replace(/[\s<].*/,""),u.error("end tag name: "+k+" maybe not complete"),x=Q+1+k.length);var F=D.localNSMap,T=D.tagName==k;if(T||D.tagName&&D.tagName.toLowerCase()==k.toLowerCase()){if(r.endElement(D.uri,D.localName,k),F)for(var M in F)Object.prototype.hasOwnProperty.call(F,M)&&r.endPrefixMapping(M);T||u.fatalError("end tag name: "+k+" is not match the current start tagName:"+D.tagName)}else b.push(D);x++;break;case"?":y&&C(Q),x=d(t,Q,r);break;case"!":y&&C(Q),x=h(t,Q,r,u);break;default:y&&C(Q);var R=new g,N=b[b.length-1].currentNSMap,L=(x=o(t,Q,R,N,f,u),R.length);if(!R.closed&&c(t,x,R.tagName,E)&&(R.closed=!0,n.nbsp||u.warning("unclosed xml attribute")),y&&L){for(var U=a(y,{}),H=0;H<L;H++){var P=R[H];C(P.offset),P.locator=a(y,{})}r.locator=U,l(R,r,N)&&b.push(R),r.locator=y}else l(R,r,N)&&b.push(R);e.isHTML(R.uri)&&!R.closed?x=A(t,x,R.tagName,f,r):x++}}catch(I2){if(I2 instanceof s)throw I2;u.error("element parse error: "+I2),x=-1}x>w?w=x:m(Math.max(Q,w)+1)}}(t,i,n,r,this.errorHandler),r.endDocument()}},g.prototype={setTagName:function(e){if(!n.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!n.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}
//	,getIndex:function(uri, localName)){
//		if(localName){

//		}else{
//			var qName = uri
//		}
//	},
//	getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},
//	getType:function(uri,localName){}
//	getType:function(i){},
},fB.XMLReader=r,fB.ParseError=s,fB}function CB(){if(gB)return uB;gB=1;var e,t,i=lB(),n=AB(),s=(cB||(cB=1,e=hB,t=lB().freeze,e.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ﬃ",fflig:"ﬀ",ffllig:"ﬄ",Ffr:"𝔉",ffr:"𝔣",filig:"ﬁ",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"ﬂ",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"Ĳ",ijlig:"ĳ",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ŉ",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),e.entityMap=e.HTML_ENTITIES),hB),r=mB(),a=n.DOMImplementation,o=i.NAMESPACE,l=r.ParseError,A=r.XMLReader;function c(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function u(e){this.options=e||{locator:{}}}function h(){this.cdata=!1}function d(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function g(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function p(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function f(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}return u.prototype.parseFromString=function(e,t){var i=this.options,n=new A,r=i.domBuilder||new h,a=i.errorHandler,l=i.locator,u=i.xmlns||{},d=/\/x?html?$/.test(t),p=d?s.HTML_ENTITIES:s.XML_ENTITIES;l&&r.setDocumentLocator(l),n.errorHandler=function(e,t,i){if(!e){if(t instanceof h)return t;e=t}var n={},s=e instanceof Function;function r(t){var r=e[t];!r&&s&&(r=2==e.length?function(i){e(t,i)}:e),n[t]=r&&function(e){r("[xmldom "+t+"]\t"+e+g(i))}||function(){}}return i=i||{},r("warning"),r("error"),r("fatalError"),n}(a,r,l),n.domBuilder=i.domBuilder||r,d&&(u[""]=o.HTML),u.xml=u.xml||o.XML;var f=i.normalizeLineEndings||c;return e&&"string"==typeof e?n.parse(f(e),u,p):n.errorHandler.error("invalid doc source"),r.doc},h.prototype={startDocument:function(){this.doc=(new a).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var s=this.doc,r=s.createElementNS(e,i||t),a=n.length;f(this,r),this.currentElement=r,this.locator&&d(this.locator,r);for(var o=0;o<a;o++){e=n.getURI(o);var l=n.getValue(o),A=(i=n.getQName(o),s.createAttributeNS(e,i));this.locator&&d(n.getLocator(o),A),A.value=A.nodeValue=l,r.setAttributeNode(A)}},endElement:function(e,t,i){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&d(this.locator,i),f(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=p.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&d(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},
//LexicalHandler
comment:function(e,t,i){e=p.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&d(this.locator,n),f(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var s=n.createDocumentType(e,t,i);this.locator&&d(this.locator,s),f(this,s),this.doc.doctype=s}},
/**
     * @see org.xml.sax.ErrorHandler
     * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html
     */
warning:function(e){g(this.locator)},error:function(e){console.error("[xmldom error]\t"+e,g(this.locator))},fatalError:function(e){throw new l(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){h.prototype[e]=function(){return null}})),uB.__DOMHandler=h,uB.normalizeLineEndings=c,uB.DOMParser=u,uB}function IB(){if(pB)return rB;pB=1;var e=AB();return rB.DOMImplementation=e.DOMImplementation,rB.XMLSerializer=e.XMLSerializer,rB.DOMParser=CB().DOMParser,rB}var vB=IB();
/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const BB=e=>!!e&&"object"==typeof e,yB=(...e)=>e.reduce(((e,t)=>("object"!=typeof t||Object.keys(t).forEach((i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):BB(e[i])&&BB(t[i])?e[i]=yB(e[i],t[i]):e[i]=t[i]})),e)),{}),bB=e=>Object.keys(e).map((t=>e[t])),EB=e=>e.reduce(((e,t)=>e.concat(t)),[]),wB=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t};var QB="INVALID_NUMBER_OF_PERIOD",_B="DASH_EMPTY_MANIFEST",SB="DASH_INVALID_XML",xB="NO_BASE_URL",kB="SEGMENT_TIME_UNSPECIFIED",DB="UNSUPPORTED_UTC_TIMING_SCHEME";const FB=({baseUrl:e="",source:t="",range:i="",indexRange:n=""})=>{const s={uri:t,resolvedUri:yv(e||"",t)};if(i||n){const e=(i||n).split("-");let t,r=lI.BigInt?lI.BigInt(e[0]):parseInt(e[0],10),a=lI.BigInt?lI.BigInt(e[1]):parseInt(e[1],10);r<Number.MAX_SAFE_INTEGER&&"bigint"==typeof r&&(r=Number(r)),a<Number.MAX_SAFE_INTEGER&&"bigint"==typeof a&&(a=Number(a)),t="bigint"==typeof a||"bigint"==typeof r?lI.BigInt(a)-lI.BigInt(r)+lI.BigInt(1):a-r+1,"bigint"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),s.byterange={length:t,offset:r}}return s},TB=e=>(e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),MB={
/**
   * Returns the entire range of available segments for a static MPD
   *
   * @param {Object} attributes
   *        Inheritied MPD attributes
   * @return {{ start: number, end: number }}
   *         The start and end numbers for available segments
   */
static(e){const{duration:t,timescale:i=1,sourceDuration:n,periodDuration:s}=e,r=TB(e.endNumber),a=t/i;return"number"==typeof r?{start:0,end:r}:"number"==typeof s?{start:0,end:s/a}:{start:0,end:n/a}},
/**
   * Returns the current live window range of available segments for a dynamic MPD
   *
   * @param {Object} attributes
   *        Inheritied MPD attributes
   * @return {{ start: number, end: number }}
   *         The start and end numbers for available segments
   */
dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:n,timescale:s=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,A=TB(e.endNumber),c=(t+i)/1e3,u=n+a,h=c+o-u,d=Math.ceil(h*s/r),g=Math.floor((c-u-l)*s/r),p=Math.floor((c-u)*s/r);return{start:Math.max(0,g),end:"number"==typeof A?A:Math.min(d,p)}}},RB=e=>{const{type:t,duration:i,timescale:n=1,periodDuration:s,sourceDuration:r}=e,{start:a,end:o}=MB[t](e),l=((e,t)=>{const i=[];for(let n=e;n<t;n++)i.push(n);return i})(a,o).map((e=>t=>{const{duration:i,timescale:n=1,periodStart:s,startNumber:r=1}=e;return{number:r+t,duration:i/n,timeline:s,time:t*i}})(e));if("static"===t){const e=l.length-1,t="number"==typeof s?s:r;l[e].duration=t-i/n*e}return l},NB=e=>{const{baseUrl:t,initialization:i={},sourceDuration:n,indexRange:s="",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(xB);const A=FB({baseUrl:t,source:i.sourceURL,range:i.range}),c=FB({baseUrl:t,source:t,indexRange:s});if(c.map=A,l){const t=RB(e);t.length&&(c.duration=t[0].duration,c.timeline=t[0].timeline)}else n&&(c.duration=n,c.timeline=r);return c.presentationTime=a||r,c.number=o,[c]},LB=(e,t,i)=>{const n=e.sidx.map?e.sidx.map:null,s=e.sidx.duration,r=e.timeline||0,a=e.sidx.byterange,o=a.offset+a.length,l=t.timescale,A=t.references.filter((e=>1!==e.referenceType)),c=[],u=e.endList?"static":"dynamic",h=e.sidx.timeline;let d,g=h,p=e.mediaSequence||0;d="bigint"==typeof t.firstOffset?lI.BigInt(o)+t.firstOffset:o+t.firstOffset;for(let f=0;f<A.length;f++){const e=t.references[f],a=e.referencedSize,o=e.subsegmentDuration;let A;A="bigint"==typeof d?d+lI.BigInt(a)-lI.BigInt(1):d+a-1;const m=NB({baseUrl:i,timescale:l,timeline:r,periodStart:h,presentationTime:g,number:p,duration:o,sourceDuration:s,indexRange:`${d}-${A}`,type:u})[0];n&&(m.map=n),c.push(m),d+="bigint"==typeof d?lI.BigInt(a):a,g+=o/l,p++}return e.segments=c,e},UB=["AUDIO","SUBTITLES"],HB=1/60,PB=e=>{return(t=e,i=({timeline:e})=>e,bB(t.reduce(((e,t)=>(t.forEach((t=>{e[i(t)]=t})),e)),{}))).sort(((e,t)=>e.timeline>t.timeline?1:-1));var t,i},OB=e=>{let t=[];var i,n;return i=e,n=(e,i,n,s)=>{t=t.concat(e.playlists||[])},UB.forEach((function(e){for(var t in i.mediaGroups[e])for(var s in i.mediaGroups[e][t]){var r=i.mediaGroups[e][t][s];n(r,e,t,s)}})),t},GB=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach(((t,i)=>{t.number=e.mediaSequence+i}))},KB=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(OB(e)),n=t.playlists.concat(OB(t));return t.timelineStarts=PB([e.timelineStarts,t.timelineStarts]),(({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach((t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const n=((e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null})(e,t.attributes.NAME);if(!n)return;if(t.sidx)return;const s=t.segments[0],r=n.segments.findIndex((function(e){return Math.abs(e.presentationTime-s.presentationTime)<HB}));if(-1===r)return GB({playlist:t,mediaSequence:n.mediaSequence+n.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!n.segments.length&&t.timeline>n.timeline||n.segments.length&&t.timeline>n.segments[n.segments.length-1].timeline)&&t.discontinuitySequence--);n.segments[r].discontinuity&&!s.discontinuity&&(s.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),GB({playlist:t,mediaSequence:n.segments[r].number})}))})({oldPlaylists:i,newPlaylists:n,timelineStarts:t.timelineStarts}),t},qB=e=>e&&e.uri+"-"+(e=>{let t;return t="bigint"==typeof e.offset||"bigint"==typeof e.length?lI.BigInt(e.offset)+lI.BigInt(e.length)-lI.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`})(e.byterange),YB=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach((e=>{const t=bB(e.reduce(((e,t)=>{const i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({
// Although they represent the same number, it's important to have both to make it
// compatible with HLS potentially having a similar attribute.
start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{}));i=i.concat(t)})),i.map((e=>{var t,i;return e.discontinuityStarts=(t=e.segments||[],i="discontinuity",t.reduce(((e,t,n)=>(t[i]&&e.push(n),e)),[])),e}))},VB=(e,t)=>{const i=qB(e.sidx),n=i&&t[i]&&t[i].sidx;return n&&LB(e,n,e.sidx.resolvedUri),e},WB=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=VB(e[i],t);return e},jB=({attributes:e,segments:t,sidx:i,discontinuityStarts:n})=>{const s={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:n,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(s.attributes["FRAME-RATE"]=e.frameRate),e.contentProtection&&(s.contentProtection=e.contentProtection),e.serviceLocation&&(s.attributes.serviceLocation=e.serviceLocation),i&&(s.sidx=i),s},JB=({attributes:e})=>"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType,zB=({attributes:e})=>"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType,XB=({attributes:e})=>"text/vtt"===e.mimeType||"text"===e.contentType,$B=e=>e?Object.keys(e).reduce(((t,i)=>{const n=e[i];return t.concat(n.playlists)}),[]):[],ZB=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:n={},previousManifest:s,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:A}=e[0].attributes,c=YB(e.filter(JB)).map(jB),u=YB(e.filter(zB)),h=YB(e.filter(XB)),d=e.map((e=>e.attributes.captionServices)).filter(Boolean),g={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:a,playlists:WB(c,n)};A>=0&&(g.minimumUpdatePeriod=1e3*A),t&&(g.locations=t),i&&(g.contentSteering=i),"dynamic"===o&&(g.suggestedPresentationDelay=l),r&&r.length>0&&(g.eventStream=r);const p=0===g.playlists.length,f=u.length?((e,t={},i=!1)=>{let n;const s=e.reduce(((e,s)=>{const r=s.attributes.role&&s.attributes.role.value||"",a=s.attributes.lang||"";let o=s.attributes.label||"main";if(a&&!s.attributes.label){const e=r?` (${r})`:"";o=`${s.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===r,playlists:[],uri:""});const l=VB((({attributes:e,segments:t,sidx:i,mediaSequence:n,discontinuitySequence:s,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,"PROGRAM-ID":1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:s,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:n,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o})(s,i),t);return e[o].playlists.push(l),void 0===n&&"main"===r&&(n=s,n.default=!0),e}),{});n||(s[Object.keys(s)[0]].default=!0);return s})(u,n,p):null,m=h.length?((e,t={})=>e.reduce(((e,i)=>{const n=i.attributes.label||i.attributes.lang||"text",s=i.attributes.lang||"und";return e[n]||(e[n]={language:s,default:!1,autoselect:!1,playlists:[],uri:""}),e[n].playlists.push(VB((({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:n,discontinuitySequence:s})=>{void 0===t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:n,discontinuitySequence:s,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a})(i),t)),e}),{}))(h,n):null,C=c.concat($B(f),$B(m)),I=C.map((({timelineStarts:e})=>e));var v,B;return g.timelineStarts=PB(I),v=C,B=g.timelineStarts,v.forEach((e=>{e.mediaSequence=0,e.discontinuitySequence=B.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach(((e,t)=>{e.number=t}))})),f&&(g.mediaGroups.AUDIO.audio=f),m&&(g.mediaGroups.SUBTITLES.subs=m),d.length&&(g.mediaGroups["CLOSED-CAPTIONS"].cc=d.reduce(((e,t)=>t?(t.forEach((t=>{const{channel:i,language:n}=t;e[n]={autoselect:!1,default:!1,instreamId:i,language:n},t.hasOwnProperty("aspectRatio")&&(e[n].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[n].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[n]["3D"]=t["3D"])})),e):e),{})),s?KB({oldManifest:s,newManifest:g}):g},ey=(e,t,i)=>{const{NOW:n,clientOffset:s,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,A=(n+s)/1e3+l-(r+o);return Math.ceil((A*a-t)/i)},ty=(e,t)=>{const{type:i,minimumUpdatePeriod:n=0,media:s="",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,A=[];let c=-1;for(let u=0;u<t.length;u++){const h=t[u],d=h.d,g=h.r||0,p=h.t||0;let f;if(c<0&&(c=p),p&&p>c&&(c=p),g<0){const o=u+1;f=o===t.length?"dynamic"===i&&n>0&&s.indexOf("$Number$")>0?ey(e,c,d):(r*a-c)/d:(t[o].t-c)/d}else f=g+1;const m=o+A.length+f;let C=o+A.length;for(;C<m;)A.push({number:C,duration:d/a,time:c,timeline:l}),c+=d,C++}return A},iy=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,ny=(e,t)=>e.replace(iy,(e=>(t,i,n,s)=>{if("$$"===t)return"$";if(void 0===e[i])return t;const r=""+e[i];return"RepresentationID"===i?r:(s=n?parseInt(s,10):1,r.length>=s?r:`${new Array(s-r.length+1).join("0")}${r}`)})(t)),sy=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=e,s=FB({baseUrl:e.baseUrl,source:ny(n.sourceURL,i),range:n.range}),r=((e,t)=>e.duration||t?e.duration?RB(e):ty(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}])(e,t);return r.map((t=>{i.Number=t.number,i.Time=t.time;const n=ny(e.media||"",i),r=e.timescale||1,a=e.presentationTimeOffset||0,o=
// Even if the @t attribute is not specified for the segment, segment.time is
// calculated in mpd-parser prior to this, so it's assumed to be available.
e.periodStart+(t.time-a)/r;return{uri:n,timeline:t.timeline,duration:t.duration,resolvedUri:yv(e.baseUrl||"",n),map:s,number:t.number,presentationTime:o}}))},ry=(e,t)=>{const{duration:i,segmentUrls:n=[],periodStart:s}=e;if(!i&&!t||i&&t)throw new Error(kB);const r=n.map((t=>((e,t)=>{const{baseUrl:i,initialization:n={}}=e,s=FB({baseUrl:i,source:n.sourceURL,range:n.range}),r=FB({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=s,r})(e,t)));let a;i&&(a=RB(e)),t&&(a=ty(e,t));return a.map(((t,i)=>{if(r[i]){const n=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return n.timeline=t.timeline,n.duration=t.duration,n.number=t.number,n.presentationTime=s+(t.time-o)/a,n}})).filter((e=>e))},ay=({attributes:e,segmentInfo:t})=>{let i,n;t.template?(n=sy,i=yB(e,t.template)):t.base?(n=NB,i=yB(e,t.base)):t.list&&(n=ry,i=yB(e,t.list));const s={attributes:e};if(!n)return s;const r=n(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce(((e,t)=>Math.max(e,Math.ceil(t.duration))),0):i.duration=0;return s.attributes=i,s.segments=r,t.base&&i.indexRange&&(s.sidx=r[0],s.segments=[]),s},oy=(e,t)=>wB(e.childNodes).filter((({tagName:e})=>e===t)),ly=e=>e.textContent.trim(),Ay=e=>{const t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;const[i,n,s,r,a,o]=t.slice(1);return 31536e3*parseFloat(i||0)+2592e3*parseFloat(n||0)+86400*parseFloat(s||0)+3600*parseFloat(r||0)+60*parseFloat(a||0)+parseFloat(o||0)},cy={
/**
   * Specifies the duration of the entire Media Presentation. Format is a duration string
   * as specified in ISO 8601
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The duration in seconds
   */
mediaPresentationDuration:e=>Ay(e),
/**
   * Specifies the Segment availability start time for all Segments referred to in this
   * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability
   * time. Format is a date string as specified in ISO 8601
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The date as seconds from unix epoch
   */
availabilityStartTime(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},
/**
   * Specifies the smallest period between potential changes to the MPD. Format is a
   * duration string as specified in ISO 8601
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The duration in seconds
   */
minimumUpdatePeriod:e=>Ay(e),
/**
   * Specifies the suggested presentation delay. Format is a
   * duration string as specified in ISO 8601
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The duration in seconds
   */
suggestedPresentationDelay:e=>Ay(e),
/**
   * specifices the type of mpd. Can be either "static" or "dynamic"
   *
   * @param {string} value
   *        value of attribute as a string
   *
   * @return {string}
   *         The type as a string
   */
type:e=>e,
/**
   * Specifies the duration of the smallest time shifting buffer for any Representation
   * in the MPD. Format is a duration string as specified in ISO 8601
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The duration in seconds
   */
timeShiftBufferDepth:e=>Ay(e),
/**
   * Specifies the PeriodStart time of the Period relative to the availabilityStarttime.
   * Format is a duration string as specified in ISO 8601
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The duration in seconds
   */
start:e=>Ay(e),
/**
   * Specifies the width of the visual presentation
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The parsed width
   */
width:e=>parseInt(e,10),
/**
   * Specifies the height of the visual presentation
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The parsed height
   */
height:e=>parseInt(e,10),
/**
   * Specifies the bitrate of the representation
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The parsed bandwidth
   */
bandwidth:e=>parseInt(e,10),
/**
   * Specifies the frame rate of the representation
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The parsed frame rate
   */
frameRate:e=>(e=>parseFloat(e.split("/").reduce(((e,t)=>e/t))))(e),
/**
   * Specifies the number of the first Media Segment in this Representation in the Period
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The parsed number
   */
startNumber:e=>parseInt(e,10),
/**
   * Specifies the timescale in units per seconds
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The parsed timescale
   */
timescale:e=>parseInt(e,10),
/**
   * Specifies the presentationTimeOffset.
   *
   * @param {string} value
   *        value of the attribute as a string
   *
   * @return {number}
   *         The parsed presentationTimeOffset
   */
presentationTimeOffset:e=>parseInt(e,10),
/**
   * Specifies the constant approximate Segment duration
   * NOTE: The <Period> element also contains an @duration attribute. This duration
   *       specifies the duration of the Period. This attribute is currently not
   *       supported by the rest of the parser, however we still check for it to prevent
   *       errors.
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The parsed duration
   */
duration(e){const t=parseInt(e,10);return isNaN(t)?Ay(e):t},
/**
   * Specifies the Segment duration, in units of the value of the @timescale.
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The parsed duration
   */
d:e=>parseInt(e,10),
/**
   * Specifies the MPD start time, in @timescale units, the first Segment in the series
   * starts relative to the beginning of the Period
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The parsed time
   */
t:e=>parseInt(e,10),
/**
   * Specifies the repeat count of the number of following contiguous Segments with the
   * same duration expressed by the value of @d
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {number}
   *         The parsed number
   */
r:e=>parseInt(e,10),
/**
   * Specifies the presentationTime.
   *
   * @param {string} value
   *        value of the attribute as a string
   *
   * @return {number}
   *         The parsed presentationTime
   */
presentationTime:e=>parseInt(e,10),
/**
   * Default parser for all other attributes. Acts as a no-op and just returns the value
   * as a string
   *
   * @param {string} value
   *        value of attribute as a string
   * @return {string}
   *         Unparsed value
   */
DEFAULT:e=>e},uy=e=>e&&e.attributes?wB(e.attributes).reduce(((e,t)=>{const i=cy[t.name]||cy.DEFAULT;return e[t.name]=i(t.value),e}),{}):{},hy={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime",
// ISO_IEC 23009-1_2022 5.8.5.2.2 The mp4 Protection Scheme
"urn:mpeg:dash:mp4protection:2011":"mp4protection"},dy=(e,t)=>t.length?EB(e.map((function(e){return t.map((function(t){const i=ly(t),n=yv(e.baseUrl,i),s=yB(uy(t),{baseUrl:n});return n!==i&&!s.serviceLocation&&e.serviceLocation&&(s.serviceLocation=e.serviceLocation),s}))}))):e,gy=e=>{const t=oy(e,"SegmentTemplate")[0],i=oy(e,"SegmentList")[0],n=i&&oy(i,"SegmentURL").map((e=>yB({tag:"SegmentURL"},uy(e)))),s=oy(e,"SegmentBase")[0],r=i||t,a=r&&oy(r,"SegmentTimeline")[0],o=i||s||t,l=o&&oy(o,"Initialization")[0],A=t&&uy(t);A&&l?A.initialization=l&&uy(l):A&&A.initialization&&(A.initialization={sourceURL:A.initialization});const c={template:A,segmentTimeline:a&&oy(a,"S").map((e=>uy(e))),list:i&&yB(uy(i),{segmentUrls:n,initialization:uy(l)}),base:s&&yB(uy(s),{initialization:uy(l)})};return Object.keys(c).forEach((e=>{c[e]||delete c[e]})),c},py=e=>EB(oy(e.node,"EventStream").map((t=>{const i=uy(t),n=i.schemeIdUri;return oy(t,"Event").map((t=>{const s=uy(t),r=s.presentationTime||0,a=i.timescale||1,o=s.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:n,value:i.value,id:s.id,start:l,end:l+o/a,messageData:ly(t)||s.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}}))}))),fy=(e,t,i)=>n=>{const s=uy(n),r=dy(t,oy(n,"BaseURL")),a=oy(n,"Role")[0],o={role:uy(a)};let l=yB(e,s,o);const A=oy(n,"Accessibility")[0],c=(e=>{if("urn:scte:dash:cc:cea-608:2015"===e.schemeIdUri)return("string"!=typeof e.value?[]:e.value.split(";")).map((e=>{let t,i;return i=e,/^CC\d=/.test(e)?[t,i]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:i}}));if("urn:scte:dash:cc:cea-708:2015"===e.schemeIdUri)return("string"!=typeof e.value?[]:e.value.split(";")).map((e=>{const t={
// service or channel number 1-63
channel:void 0,
// language is a 3ALPHA per ISO 639.2/B
// field is required
language:void 0,
// BIT 1/0 or ?
// default value is 1, meaning 16:9 aspect ratio, 0 is 4:3, ? is unknown
aspectRatio:1,
// BIT 1/0
// easy reader flag indicated the text is tailed to the needs of beginning readers
// default 0, or off
easyReader:0,
// BIT 1/0
// If 3d metadata is present (CEA-708.1) then 1
// default 0
"3D":0};if(/=/.test(e)){const[i,n=""]=e.split("=");t.channel=i,t.language=e,n.split(",").forEach((e=>{const[i,n]=e.split(":");"lang"===i?t.language=n:"er"===i?t.easyReader=Number(n):"war"===i?t.aspectRatio=Number(n):"3D"===i&&(t["3D"]=Number(n))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t}))})(uy(A));c&&(l=yB(l,{captionServices:c}));const u=oy(n,"Label")[0];if(u&&u.childNodes.length){const e=u.childNodes[0].nodeValue.trim();l=yB(l,{label:e})}const h=oy(n,"ContentProtection").reduce(((e,t)=>{const i=uy(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const n=hy[i.schemeIdUri];if(n){e[n]={attributes:i};const s=oy(t,"cenc:pssh")[0];if(s){const t=ly(s);e[n].pssh=t&&Ev(t)}}return e}),{});Object.keys(h).length&&(l=yB(l,{contentProtection:h}));const d=gy(n),g=oy(n,"Representation"),p=yB(i,d);return EB(g.map(((e,t,i)=>n=>{const s=oy(n,"BaseURL"),r=dy(t,s),a=yB(e,uy(n)),o=gy(n);return r.map((e=>({segmentInfo:yB(i,o),attributes:yB(a,e)})))})(l,r,p)))},my=(e,t)=>(i,n)=>{const s=dy(t,oy(i.node,"BaseURL")),r=yB(e,{periodStart:i.attributes.start});"number"==typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=oy(i.node,"AdaptationSet"),o=gy(i.node);return EB(a.map(fy(r,s,o)))},Cy=(e,t)=>{if(e.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!e.length)return null;const i=yB({serverURL:ly(e[0])},uy(e[0]));return i.queryBeforeStart="true"===i.queryBeforeStart,i},Iy=e=>{if(""===e)throw new Error(_B);const t=new vB.DOMParser;let i,n;try{i=t.parseFromString(e,"application/xml"),n=i&&"MPD"===i.documentElement.tagName?i.documentElement:null}catch(I2){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(SB);return n},vy=(e,t={})=>{const i=((e,t={})=>{const{manifestUri:i="",NOW:n=Date.now(),clientOffset:s=0,eventHandler:
// TODO: For now, we are expecting an eventHandler callback function
// to be passed into the mpd parser as an option.
// In the future, we should enable stream parsing by using the Stream class from vhs-utils.
// This will support new features including a standardized event handler.
// See the m3u8 parser for examples of how stream parsing is currently used for HLS parsing.
// https://github.com/videojs/vhs-utils/blob/88d6e10c631e57a5af02c5a62bc7376cd456b4f5/src/stream.js#L9
r=function(){}}=t,a=oy(e,"Period");if(!a.length)throw new Error(QB);const o=oy(e,"Location"),l=uy(e),A=dy([{baseUrl:i}],oy(e,"BaseURL")),c=oy(e,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=n,l.clientOffset=s,o.length&&(l.locations=o.map(ly));const u=[];return a.forEach(((e,t)=>{const i=uy(e),n=u[t-1];i.start=(({attributes:e,priorPeriodAttributes:t,mpdType:i})=>"number"==typeof e.start?e.start:t&&"number"==typeof t.start&&"number"==typeof t.duration?t.start+t.duration:t||"static"!==i?null:0)({attributes:i,priorPeriodAttributes:n?n.attributes:null,mpdType:l.type}),u.push({node:e,attributes:i})})),{locations:l.locations,contentSteeringInfo:Cy(c,r),
// TODO: There are occurences where this `representationInfo` array contains undesired
// duplicates. This generally occurs when there are multiple BaseURL nodes that are
// direct children of the MPD node. When we attempt to resolve URLs from a combination of the
// parent BaseURL and a child BaseURL, and the value does not resolve,
// we end up returning the child BaseURL multiple times.
// We need to determine a way to remove these duplicates in a safe way.
// See: https://github.com/videojs/mpd-parser/pull/17#discussion_r162750527
representationInfo:EB(u.map(my(l,A))),eventStream:EB(u.map(py))}})(Iy(e),t),n=i.representationInfo.map(ay);return ZB({dashPlaylists:n,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},By=e=>(e=>{const t=oy(e,"UTCTiming")[0];if(!t)return null;const i=uy(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;default:throw new Error(DB)}return i})(Iy(e));var yy=Math.pow(2,32),by=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*yy+i.getUint32(4)},Ey=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12;0===i.version?(i.earliestPresentationTime=t.getUint32(n),i.firstOffset=t.getUint32(n+4),n+=8):(i.earliestPresentationTime=by(e.subarray(n)),i.firstOffset=by(e.subarray(n+8)),n+=16),n+=2;var s=t.getUint16(n);for(n+=2;s>0;n+=12,s--)i.references.push({referenceType:(128&e[n])>>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)});return i};const wy=RC(Ey);var Qy=zv([73,68,51]),_y=function e(t,i){return void 0===i&&(i=0),(t=zv(t)).length-i<10||!sB(t,Qy,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=zv(e))[t+5],n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?n+20:n+10}(t,i),e(t,i))},Sy=function(e){return"string"==typeof e?nB(e):e},xy=function e(t,i,n){void 0===n&&(n=!1),i=function(e){return Array.isArray(e)?e.map((function(e){return Sy(e)})):[Sy(e)]}(i),t=zv(t);var s=[];if(!i.length)return s;for(var r=0;r<t.length;){var a=(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0,o=t.subarray(r+4,r+8);if(0===a)break;var l=r+a;if(l>t.length){if(n)break;l=t.length}var A=t.subarray(r+8,l);sB(o,i[0])&&(1===i.length?s.push(A):s.push.apply(s,e(A,i.slice(1),n))),r=l}return s},ky={EBML:zv([26,69,223,163]),DocType:zv([66,130]),Segment:zv([24,83,128,103]),SegmentInfo:zv([21,73,169,102]),Tracks:zv([22,84,174,107]),Track:zv([174]),TrackNumber:zv([215]),DefaultDuration:zv([35,227,131]),TrackEntry:zv([174]),TrackType:zv([131]),FlagDefault:zv([136]),CodecID:zv([134]),CodecPrivate:zv([99,162]),VideoTrack:zv([224]),AudioTrack:zv([225]),
// Not used yet, but will be used for live webm/mkv
// see https://www.matroska.org/technical/basics.html#block-structure
// see https://www.matroska.org/technical/basics.html#simpleblock-structure
Cluster:zv([31,67,182,117]),Timestamp:zv([231]),TimestampScale:zv([42,215,177]),BlockGroup:zv([160]),BlockDuration:zv([155]),Block:zv([161]),SimpleBlock:zv([163])},Dy=[128,64,32,16,8,4,2,1],Fy=function(e,t,i,n){void 0===i&&(i=!0),void 0===n&&(n=!1);var s=function(e){for(var t=1,i=0;i<Dy.length&&!(e&Dy[i]);i++)t++;return t}(e[t]),r=e.subarray(t,t+s);return i&&((r=Array.prototype.slice.call(e,t,t+s))[0]^=Dy[s-1]),{length:s,value:tB(r,{signed:n}),bytes:r}},Ty=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?iB(t):t},My=function e(t,i,n){if(n>=i.length)return i.length;var s=Fy(i,n,!1);if(sB(t.bytes,s.bytes))return n;var r=Fy(i,n+s.length);return e(t,i,n+r.length+r.value+s.length)},Ry=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return Ty(e)})):[Ty(e)]}(i),t=zv(t);var n=[];if(!i.length)return n;for(var s=0;s<t.length;){var r=Fy(t,s,!1),a=Fy(t,s+r.length),o=s+r.length+a.length;127===a.value&&(a.value=My(r,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,A=t.subarray(o,l);sB(i[0],r.bytes)&&(1===i.length?n.push(A):n=n.concat(e(A,i.slice(1)))),s+=r.length+a.length+A.length}return n},Ny=zv([0,0,0,1]),Ly=zv([0,0,1]),Uy=zv([0,0,3]),Hy=function(e){for(var t=[],i=1;i<e.length-2;)sB(e.subarray(i,i+3),Uy)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var n=e.length-t.length,s=new Uint8Array(n),r=0;for(i=0;i<n;r++,i++)r===t[0]&&(r++,t.shift()),s[i]=e[r];return s},Py=function(e,t,i,n){e=zv(e),i=[].concat(i);for(var s,r=0,a=0;r<e.length&&(a<n||s);){var o=void 0;if(sB(e.subarray(r),Ny)?o=4:sB(e.subarray(r),Ly)&&(o=3),o){if(a++,s)return Hy(e.subarray(s,r));var l=void 0;"h264"===t?l=31&e[r+o]:"h265"===t&&(l=e[r+o]>>1&63),-1!==i.indexOf(l)&&(s=r+o),r+=o+("h264"===t?1:2)}else r++}return e.subarray(0,0)},Oy={
// "webm" string literal in hex
webm:zv([119,101,98,109]),
// "matroska" string literal in hex
matroska:zv([109,97,116,114,111,115,107,97]),
// "fLaC" string literal in hex
flac:zv([102,76,97,67]),
// "OggS" string literal in hex
ogg:zv([79,103,103,83]),
// ac-3 sync byte, also works for ec-3 as that is simply a codec
// of ac-3
ac3:zv([11,119]),
// "RIFF" string literal in hex used for wav and avi
riff:zv([82,73,70,70]),
// "AVI" string literal in hex
avi:zv([65,86,73]),
// "WAVE" string literal in hex
wav:zv([87,65,86,69]),
// "ftyp3g" string literal in hex
"3gp":zv([102,116,121,112,51,103]),
// "ftyp" string literal in hex
mp4:zv([102,116,121,112]),
// "styp" string literal in hex
fmp4:zv([115,116,121,112]),
// "ftypqt" string literal in hex
mov:zv([102,116,121,112,113,116]),
// moov string literal in hex
moov:zv([109,111,111,118]),
// moof string literal in hex
moof:zv([109,111,111,102])},Gy={aac:function(e){var t=_y(e);return sB(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=_y(e);return sB(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=Ry(e,[ky.EBML,ky.DocType])[0];return sB(t,Oy.webm)},mkv:function(e){var t=Ry(e,[ky.EBML,ky.DocType])[0];return sB(t,Oy.matroska)},mp4:function(e){return!Gy["3gp"](e)&&!Gy.mov(e)&&(!(!sB(e,Oy.mp4,{offset:4})&&!sB(e,Oy.fmp4,{offset:4}))||(!(!sB(e,Oy.moof,{offset:4})&&!sB(e,Oy.moov,{offset:4}))||void 0))},mov:function(e){return sB(e,Oy.mov,{offset:4})},"3gp":function(e){return sB(e,Oy["3gp"],{offset:4})},ac3:function(e){var t=_y(e);return sB(e,Oy.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=_y(e);return sB(e,Oy.flac,{offset:t})},ogg:function(e){return sB(e,Oy.ogg)},avi:function(e){return sB(e,Oy.riff)&&sB(e,Oy.avi,{offset:8})},wav:function(e){return sB(e,Oy.riff)&&sB(e,Oy.wav,{offset:8})},h264:function(e){return function(e,t,i){return Py(e,"h264",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return Py(e,"h265",t,i)}(e,[32,33],3).length}},Ky=Object.keys(Gy).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);Ky.forEach((function(e){var t=Gy[e];Gy[e]=function(e){return t(zv(e))}}));var qy,Yy,Vy,Wy,jy=Gy,Jy=function(e){e=zv(e);for(var t=0;t<Ky.length;t++){var i=Ky[t];if(jy[i](e))return i}return""},zy=9e4;var Xy=zy,$y=(qy=function(e){return e*zy},Yy=function(e,t){return e*t},Vy=function(e){return e/zy},Wy=function(e,t){return e/t},"8.21.0");
/**
 * @license
 * Video.js 8.21.0 <http://videojs.com/>
 * Copyright Brightcove, Inc. <https://www.brightcove.com/>
 * Available under Apache License Version 2.0
 * <https://github.com/videojs/video.js/blob/main/LICENSE>
 *
 * Includes vtt.js <https://github.com/mozilla/vtt.js>
 * Available under Apache License Version 2.0
 * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
 */const Zy={},eb=function(e,t){return Zy[e]=Zy[e]||[],t&&(Zy[e]=Zy[e].concat(t)),Zy[e]},tb=function(e,t){const i=eb(e).indexOf(t);return!(i<=-1)&&(Zy[e]=Zy[e].slice(),Zy[e].splice(i,1),!0)},ib={prefixed:!0},nb=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],
// WebKit
["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],sb=nb[0];let rb;for(let _=0;_<nb.length;_++)if(nb[_][1]in gI){rb=nb[_];break}if(rb){for(let e=0;e<rb.length;e++)ib[sb[e]]=rb[e];ib.prefixed=rb[0]!==sb[0]}let ab=[];const ob=function e(t,i=":",n=""){let s,r="info";function a(...e){s("log",r,e)}return s=((e,t,i)=>(n,s,r)=>{const a=t.levels[s],o=new RegExp(`^(${a})$`);let l=e;if("log"!==n&&r.unshift(n.toUpperCase()+":"),i&&(l=`%c${e}`,r.unshift(i)),r.unshift(l+":"),ab){ab.push([].concat(r));const e=ab.length-1e3;ab.splice(0,e>0?e:0)}if(!lI.console)return;let A=lI.console[n];A||"debug"!==n||(A=lI.console.info||lI.console.log),A&&a&&o.test(n)&&A[Array.isArray(r)?"apply":"call"](lI.console,r)})(t,a,n),a.createLogger=(s,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${s}`,o,void 0!==a?a:n)},a.createNewLogger=(t,i,n)=>e(t,i,n),a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},a.level=e=>{if("string"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error(`"${e}" in not a valid log level`);r=e}return r},a.history=()=>ab?[].concat(ab):[],a.history.filter=e=>(ab||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),a.history.clear=()=>{ab&&(ab.length=0)},a.history.disable=()=>{null!==ab&&(ab.length=0,ab=null)},a.history.enable=()=>{null===ab&&(ab=[])},a.error=(...e)=>s("error",r,e),a.warn=(...e)=>s("warn",r,e),a.debug=(...e)=>s("debug",r,e),a}("VIDEOJS"),lb=ob.createLogger,Ab=Object.prototype.toString,cb=function(e){return db(e)?Object.keys(e):[]};function ub(e,t){cb(e).forEach((i=>t(e[i],i)))}function hb(e,t,i=0){return cb(e).reduce(((i,n)=>t(i,e[n],n)),i)}function db(e){return!!e&&"object"==typeof e}function gb(e){return db(e)&&"[object Object]"===Ab.call(e)&&e.constructor===Object}function pb(...e){const t={};return e.forEach((e=>{e&&ub(e,((e,i)=>{gb(e)?(gb(t[i])||(t[i]={}),t[i]=pb(t[i],e)):t[i]=e}))})),t}function fb(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const n=e[i];t.push(n)}return t}function mb(e,t,i,n=!0){const s=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return s(e),e}};return n&&(r.set=s),Object.defineProperty(e,t,r)}var Cb=Object.freeze({__proto__:null,each:ub,reduce:hb,isObject:db,isPlain:gb,merge:pb,values:fb,defineLazyProperty:mb});let Ib,vb=!1,Bb=null,yb=!1,bb=!1,Eb=!1,wb=!1,Qb=!1,_b=null,Sb=null;const xb=Boolean(lI.cast&&lI.cast.framework&&lI.cast.framework.CastReceiverContext);let kb=null,Db=!1,Fb=!1,Tb=!1,Mb=!1,Rb=!1,Nb=!1,Lb=!1;const Ub=Boolean(qb()&&("ontouchstart"in lI||lI.navigator.maxTouchPoints||lI.DocumentTouch&&lI.document instanceof lI.DocumentTouch)),Hb=lI.navigator&&lI.navigator.userAgentData;if(Hb&&Hb.platform&&Hb.brands&&(yb="Android"===Hb.platform,Eb=Boolean(Hb.brands.find((e=>"Microsoft Edge"===e.brand))),wb=Boolean(Hb.brands.find((e=>"Chromium"===e.brand))),Qb=!Eb&&wb,_b=Sb=(Hb.brands.find((e=>"Chromium"===e.brand))||{}).version||null,Fb="Windows"===Hb.platform),!wb){const e=lI.navigator&&lI.navigator.userAgent||"";vb=/iPod/i.test(e),Bb=function(){const t=e.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),yb=/Android/i.test(e),Ib=function(){const t=e.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;const i=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return i&&n?parseFloat(t[1]+"."+t[2]):i||null}(),bb=/Firefox/i.test(e),Eb=/Edg/i.test(e),wb=/Chrome/i.test(e)||/CriOS/i.test(e),Qb=!Eb&&wb,_b=Sb=function(){const t=e.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),kb=function(){const t=/MSIE\s(\d+)\.\d/.exec(e);let i=t&&parseFloat(t[1]);return!i&&/Trident\/7.0/i.test(e)&&/rv:11.0/.test(e)&&(i=11),i}(),Rb=/Tizen/i.test(e),Nb=/Web0S/i.test(e),Lb=Rb||Nb,Db=/Safari/i.test(e)&&!Qb&&!yb&&!Eb&&!Lb,Fb=/Windows/i.test(e),Tb=/iPad/i.test(e)||Db&&Ub&&!/iPhone/i.test(e),Mb=/iPhone/i.test(e)&&!Tb}const Pb=Mb||Tb||vb,Ob=(Db||Pb)&&!Qb;var Gb=Object.freeze({__proto__:null,get IS_IPOD(){return vb},get IOS_VERSION(){return Bb},get IS_ANDROID(){return yb},get ANDROID_VERSION(){return Ib},get IS_FIREFOX(){return bb},get IS_EDGE(){return Eb},get IS_CHROMIUM(){return wb},get IS_CHROME(){return Qb},get CHROMIUM_VERSION(){return _b},get CHROME_VERSION(){return Sb},IS_CHROMECAST_RECEIVER:xb,get IE_VERSION(){return kb},get IS_SAFARI(){return Db},get IS_WINDOWS(){return Fb},get IS_IPAD(){return Tb},get IS_IPHONE(){return Mb},get IS_TIZEN(){return Rb},get IS_WEBOS(){return Nb},get IS_SMART_TV(){return Lb},TOUCH_ENABLED:Ub,IS_IOS:Pb,IS_ANY_SAFARI:Ob});function Kb(e){return"string"==typeof e&&Boolean(e.trim())}function qb(){return gI===lI.document}function Yb(e){return db(e)&&1===e.nodeType}function Vb(){try{return lI.parent!==lI.self}catch(e){return!0}}function Wb(e){return function(t,i){if(!Kb(t))return gI[e](null);Kb(i)&&(i=gI.querySelector(i));const n=Yb(i)?i:gI;return n[e]&&n[e](t)}}function jb(e="div",t={},i={},n){const s=gI.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];"textContent"===e?Jb(s,i):s[e]===i&&"tabIndex"!==e||(s[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){s.setAttribute(e,i[e])})),n&&gE(s,n),s}function Jb(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function zb(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Xb(e,t){return function(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}(t),e.classList.contains(t)}function $b(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e}function Zb(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e):(ob.warn("removeClass was called with an element that doesn't exist"),null)}function eE(e,t,i){return"function"==typeof i&&(i=i(e,t)),"boolean"!=typeof i&&(i=void 0),t.split(/\s+/).forEach((t=>e.classList.toggle(t,i))),e}function tE(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const n=t[i];null==n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)}))}function iE(e){const t={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(e&&e.attributes&&e.attributes.length>0){const n=e.attributes;for(let e=n.length-1;e>=0;e--){const s=n[e].name;let r=n[e].value;i.includes(s)&&(r=null!==r),t[s]=r}}return t}function nE(e,t){return e.getAttribute(t)}function sE(e,t,i){e.setAttribute(t,i)}function rE(e,t){e.removeAttribute(t)}function aE(){gI.body.focus(),gI.onselectstart=function(){return!1}}function oE(){gI.onselectstart=function(){return!0}}function lE(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(IE(e,"height"))),i.width||(i.width=parseFloat(IE(e,"width"))),i}}function AE(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let n=0,s=0;for(;e.offsetParent&&e!==gI[ib.fullscreenElement];)n+=e.offsetLeft,s+=e.offsetTop,e=e.offsetParent;return{left:n,top:s,width:t,height:i}}function cE(e,t){const i={x:0,y:0};if(Pb){let t=e;for(;t&&"html"!==t.nodeName.toLowerCase();){const e=IE(t,"transform");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&lI.WebKitCSSMatrix){const e=lI.getComputedStyle(t.assignedSlot.parentElement).transform,n=new lI.WebKitCSSMatrix(e);i.x+=n.m41,i.y+=n.m42}t=t.parentNode||t.host}}const n={},s=AE(t.target),r=AE(e),a=r.width,o=r.height;let l=t.offsetY-(r.top-s.top),A=t.offsetX-(r.left-s.left);return t.changedTouches&&(A=t.changedTouches[0].pageX-r.left,l=t.changedTouches[0].pageY+r.top,Pb&&(A-=i.x,l-=i.y)),n.y=1-Math.max(0,Math.min(1,l/o)),n.x=Math.max(0,Math.min(1,A/a)),n}function uE(e){return db(e)&&3===e.nodeType}function hE(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function dE(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>("function"==typeof e&&(e=e()),Yb(e)||uE(e)?e:"string"==typeof e&&/\S/.test(e)?gI.createTextNode(e):void 0))).filter((e=>e))}function gE(e,t){return dE(t).forEach((t=>e.appendChild(t))),e}function pE(e,t){return gE(hE(e),t)}function fE(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||("mousedown"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons)))}const mE=Wb("querySelector"),CE=Wb("querySelectorAll");function IE(e,t){if(!e||!t)return"";if("function"==typeof lI.getComputedStyle){let i;try{i=lI.getComputedStyle(e)}catch(I2){return""}return i?i.getPropertyValue(t)||i[t]:""}return""}function vE(e){[...gI.styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(""),n=gI.createElement("style");n.textContent=i,e.document.head.appendChild(n)}catch(I2){const n=gI.createElement("link");n.rel="stylesheet",n.type=t.type,n.media=t.media.mediaText,n.href=t.href,e.document.head.appendChild(n)}}))}var BE=Object.freeze({__proto__:null,isReal:qb,isEl:Yb,isInFrame:Vb,createEl:jb,textContent:Jb,prependTo:zb,hasClass:Xb,addClass:$b,removeClass:Zb,toggleClass:eE,setAttributes:tE,getAttributes:iE,getAttribute:nE,setAttribute:sE,removeAttribute:rE,blockTextSelection:aE,unblockTextSelection:oE,getBoundingClientRect:lE,findPosition:AE,getPointerPosition:cE,isTextNode:uE,emptyEl:hE,normalizeContent:dE,appendContent:gE,insertContent:pE,isSingleLeftClick:fE,$:mE,$$:CE,computedStyle:IE,copyStyleSheetsToWindow:vE});let yE,bE=!1;const EE=function(){if(!1===yE.options.autoSetup)return;const e=Array.prototype.slice.call(gI.getElementsByTagName("video")),t=Array.prototype.slice.call(gI.getElementsByTagName("audio")),i=Array.prototype.slice.call(gI.getElementsByTagName("video-js")),n=e.concat(t,i);if(n&&n.length>0)for(let s=0,r=n.length;s<r;s++){const e=n[s];if(!e||!e.getAttribute){wE(1);break}if(void 0===e.player){null!==e.getAttribute("data-setup")&&yE(e)}}else bE||wE(1)};function wE(e,t){qb()&&(t&&(yE=t),lI.setTimeout(EE,e))}function QE(){bE=!0,lI.removeEventListener("load",QE)}qb()&&("complete"===gI.readyState?QE():lI.addEventListener("load",QE));const _E=function(e){const t=gI.createElement("style");return t.className=e,t},SE=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var xE=new WeakMap;let kE,DE=3;function FE(){return DE++}function TE(e,t){if(!xE.has(e))return;const i=xE.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&xE.delete(e)}function ME(e,t,i,n){i.forEach((function(i){e(t,i,n)}))}function RE(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const n=e||lI.event;e={};const s=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const t in n)s.includes(t)||"returnValue"===t&&n.preventDefault||(e[t]=n[t]);if(e.target||(e.target=e.srcElement||gI),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=gI.documentElement,i=gI.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const NE=["touchstart","touchmove"];function LE(e,t,i){if(Array.isArray(t))return ME(LE,e,t,i);xE.has(e)||xE.set(e,{});const n=xE.get(e);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),i.guid||(i.guid=FE()),n.handlers[t].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,i){if(n.disabled)return;t=RE(t);const s=n.handlers[t.type];if(s){const n=s.slice(0);for(let s=0,r=n.length;s<r&&!t.isImmediatePropagationStopped();s++)try{n[s].call(e,t,i)}catch(I2){ob.error(I2)}}}),1===n.handlers[t].length)if(e.addEventListener){let i=!1;(function(){if("boolean"!=typeof kE){kE=!1;try{const e=Object.defineProperty({},"passive",{get(){kE=!0}});lI.addEventListener("test",null,e),lI.removeEventListener("test",null,e)}catch(I2){}}return kE})()&&NE.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,n.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,n.dispatcher)}function UE(e,t,i){if(!xE.has(e))return;const n=xE.get(e);if(!n.handlers)return;if(Array.isArray(t))return ME(UE,e,t,i);const s=function(e,t){n.handlers[t]=[],TE(e,t)};if(void 0===t){for(const t in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},t)&&s(e,t);return}const r=n.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);TE(e,t)}else s(e,t)}function HE(e,t,i){const n=xE.has(e)?xE.get(e):{},s=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=RE(t),n.dispatcher&&n.dispatcher.call(e,t,i),s&&!t.isPropagationStopped()&&!0===t.bubbles)HE.call(null,s,t,i);else if(!s&&!t.defaultPrevented&&t.target&&t.target[t.type]){xE.has(t.target)||xE.set(t.target,{});const e=xE.get(t.target);t.target[t.type]&&(e.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function PE(e,t,i){if(Array.isArray(t))return ME(PE,e,t,i);const n=function(){UE(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||FE(),LE(e,t,n)}function OE(e,t,i){const n=function(){UE(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||FE(),LE(e,t,n)}var GE=Object.freeze({__proto__:null,fixEvent:RE,on:LE,off:UE,trigger:HE,one:PE,any:OE});const KE=30,qE=function(e,t,i){t.guid||(t.guid=FE());const n=t.bind(e);return n.guid=i?i+"_"+t.guid:t.guid,n},YE=function(e,t){let i=lI.performance.now();return function(...n){const s=lI.performance.now();s-i>=t&&(e(...n),i=s)}},VE=function(e,t,i,n=lI){let s;const r=function(){const r=this,a=arguments;let o=function(){s=null,o=null,i||e.apply(r,a)};!s&&i&&e.apply(r,a),n.clearTimeout(s),s=n.setTimeout(o,t)};return r.cancel=()=>{n.clearTimeout(s),s=null},r};var WE=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:KE,bind_:qE,throttle:YE,debounce:VE});let jE;class JE{
/**
   * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a
   * function that will get called when an event with a certain name gets triggered.
   *
   * @param {string|string[]} type
   *        An event name or an array of event names.
   *
   * @param {Function} fn
   *        The function to call with `EventTarget`s
   */
on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},LE(this,e,t),this.addEventListener=i}
/**
   * Removes an `event listener` for a specific event from an instance of `EventTarget`.
   * This makes it so that the `event listener` will no longer get called when the
   * named event happens.
   *
   * @param {string|string[]} type
   *        An event name or an array of event names.
   *
   * @param {Function} fn
   *        The function to remove.
   */off(e,t){UE(this,e,t)}
/**
   * This function will add an `event listener` that gets triggered only once. After the
   * first trigger it will get removed. This is like adding an `event listener`
   * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.
   *
   * @param {string|string[]} type
   *        An event name or an array of event names.
   *
   * @param {Function} fn
   *        The function to be called once for each event name.
   */one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},PE(this,e,t),this.addEventListener=i}
/**
   * This function will add an `event listener` that gets triggered only once and is
   * removed from all events. This is like adding an array of `event listener`s
   * with {@link EventTarget#on} that calls {@link EventTarget#off} on all events the
   * first time it is triggered.
   *
   * @param {string|string[]} type
   *        An event name or an array of event names.
   *
   * @param {Function} fn
   *        The function to be called once for each event name.
   */any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},OE(this,e,t),this.addEventListener=i}
/**
   * This function causes an event to happen. This will then cause any `event listeners`
   * that are waiting for that event, to get called. If there are no `event listeners`
   * for an event then nothing will happen.
   *
   * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.
   * Trigger will also call the `on` + `uppercaseEventName` function.
   *
   * Example:
   * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call
   * `onClick` if it exists.
   *
   * @param {string|EventTarget~Event|Object} event
   *        The name of the event, an `Event`, or an object with a key of type set to
   *        an event name.
   */trigger(e){const t=e.type||e;"string"==typeof e&&(e={type:t}),e=RE(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),HE(this,e)}queueTrigger(e){jE||(jE=new Map);const t=e.type||e;let i=jE.get(this);i||(i=new Map,jE.set(this,i));const n=i.get(t);i.delete(t),lI.clearTimeout(n);const s=lI.setTimeout((()=>{i.delete(t),0===i.size&&(i=null,jE.delete(this)),this.trigger(e)}),0);i.set(t,s)}}JE.prototype.allowedEvents_={},JE.prototype.addEventListener=JE.prototype.on,JE.prototype.removeEventListener=JE.prototype.off,JE.prototype.dispatchEvent=JE.prototype.trigger;const zE=e=>"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e,XE=e=>e instanceof JE||!!e.eventBusEl_&&["on","one","off","trigger"].every((t=>"function"==typeof e[t])),$E=e=>
// The regex here verifies that the `type` contains at least one non-
// whitespace character.
"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length,ZE=(e,t,i)=>{if(!e||!e.nodeName&&!XE(e))throw new Error(`Invalid target for ${zE(t)}#${i}; must be a DOM node or evented object.`)},ew=(e,t,i)=>{if(!$E(e))throw new Error(`Invalid event type for ${zE(t)}#${i}; must be a non-empty string or array.`)},tw=(e,t,i)=>{if("function"!=typeof e)throw new Error(`Invalid listener for ${zE(t)}#${i}; must be a function.`)},iw=(e,t,i)=>{const n=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let s,r,a;return n?(s=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(s=t[0],r=t[1],a=t[2]),ZE(s,e,i),ew(r,e,i),tw(a,e,i),a=qE(e,a),{isTargetingSelf:n,target:s,type:r,listener:a}},nw=(e,t,i,n)=>{ZE(e,e,t),e.nodeName?GE[t](e,i,n):e[t](i,n)},sw={
/**
   * Add a listener to an event (or events) on this object or another evented
   * object.
   *
   * @param  {string|Array|Element|Object} targetOrType
   *         If this is a string or array, it represents the event type(s)
   *         that will trigger the listener.
   *
   *         Another evented object can be passed here instead, which will
   *         cause the listener to listen for events on _that_ object.
   *
   *         In either case, the listener's `this` value will be bound to
   *         this object.
   *
   * @param  {string|Array|Function} typeOrListener
   *         If the first argument was a string or array, this should be the
   *         listener function. Otherwise, this is a string or array of event
   *         type(s).
   *
   * @param  {Function} [listener]
   *         If the first argument was another evented object, this will be
   *         the listener function.
   */
on(...e){const{isTargetingSelf:t,target:i,type:n,listener:s}=iw(this,e,"on");if(nw(i,"on",n,s),!t){const e=()=>this.off(i,n,s);e.guid=s.guid;const t=()=>this.off("dispose",e);t.guid=s.guid,nw(this,"on","dispose",e),nw(i,"on","dispose",t)}},
/**
   * Add a listener to an event (or events) on this object or another evented
   * object. The listener will be called once per event and then removed.
   *
   * @param  {string|Array|Element|Object} targetOrType
   *         If this is a string or array, it represents the event type(s)
   *         that will trigger the listener.
   *
   *         Another evented object can be passed here instead, which will
   *         cause the listener to listen for events on _that_ object.
   *
   *         In either case, the listener's `this` value will be bound to
   *         this object.
   *
   * @param  {string|Array|Function} typeOrListener
   *         If the first argument was a string or array, this should be the
   *         listener function. Otherwise, this is a string or array of event
   *         type(s).
   *
   * @param  {Function} [listener]
   *         If the first argument was another evented object, this will be
   *         the listener function.
   */
one(...e){const{isTargetingSelf:t,target:i,type:n,listener:s}=iw(this,e,"one");if(t)nw(i,"one",n,s);else{const e=(...t)=>{this.off(i,n,e),s.apply(null,t)};e.guid=s.guid,nw(i,"one",n,e)}},
/**
   * Add a listener to an event (or events) on this object or another evented
   * object. The listener will only be called once for the first event that is triggered
   * then removed.
   *
   * @param  {string|Array|Element|Object} targetOrType
   *         If this is a string or array, it represents the event type(s)
   *         that will trigger the listener.
   *
   *         Another evented object can be passed here instead, which will
   *         cause the listener to listen for events on _that_ object.
   *
   *         In either case, the listener's `this` value will be bound to
   *         this object.
   *
   * @param  {string|Array|Function} typeOrListener
   *         If the first argument was a string or array, this should be the
   *         listener function. Otherwise, this is a string or array of event
   *         type(s).
   *
   * @param  {Function} [listener]
   *         If the first argument was another evented object, this will be
   *         the listener function.
   */
any(...e){const{isTargetingSelf:t,target:i,type:n,listener:s}=iw(this,e,"any");if(t)nw(i,"any",n,s);else{const e=(...t)=>{this.off(i,n,e),s.apply(null,t)};e.guid=s.guid,nw(i,"any",n,e)}},
/**
   * Removes listener(s) from event(s) on an evented object.
   *
   * @param  {string|Array|Element|Object} [targetOrType]
   *         If this is a string or array, it represents the event type(s).
   *
   *         Another evented object can be passed here instead, in which case
   *         ALL 3 arguments are _required_.
   *
   * @param  {string|Array|Function} [typeOrListener]
   *         If the first argument was a string or array, this may be the
   *         listener function. Otherwise, this is a string or array of event
   *         type(s).
   *
   * @param  {Function} [listener]
   *         If the first argument was another evented object, this will be
   *         the listener function; otherwise, _all_ listeners bound to the
   *         event type(s) will be removed.
   */
off(e,t,i){if(!e||$E(e))UE(this.eventBusEl_,e,t);else{const n=e,s=t;ZE(n,this,"off"),ew(s,this,"off"),tw(i,this,"off"),i=qE(this,i),this.off("dispose",i),n.nodeName?(UE(n,s,i),UE(n,"dispose",i)):XE(n)&&(n.off(s,i),n.off("dispose",i))}},
/**
   * Fire an event on this evented object, causing its listeners to be called.
   *
   * @param   {string|Object} event
   *          An event type or an object with a type property.
   *
   * @param   {Object} [hash]
   *          An additional object to pass along to listeners.
   *
   * @return {boolean}
   *          Whether or not the default behavior was prevented.
   */
trigger(e,t){ZE(this.eventBusEl_,this,"trigger");const i=e&&"string"!=typeof e?e.type:e;if(!$E(i))throw new Error(`Invalid event type for ${zE(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return HE(this.eventBusEl_,e,t)}};function rw(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=jb("span",{className:"vjs-event-bus"});return Object.assign(e,sw),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on("dispose",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&xE.has(e)&&xE.delete(e)})),lI.setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const aw={
/**
   * A hash containing arbitrary keys and values representing the state of
   * the object.
   *
   * @type {Object}
   */
state:{},
/**
   * Set the state of an object by mutating its
   * {@link module:stateful~StatefulMixin.state|state} object in place.
   *
   * @fires   module:stateful~StatefulMixin#statechanged
   * @param   {Object|Function} stateUpdates
   *          A new set of properties to shallow-merge into the plugin state.
   *          Can be a plain object or a function returning a plain object.
   *
   * @return {Object|undefined}
   *          An object containing changes that occurred. If no changes
   *          occurred, returns `undefined`.
   */
setState(e){let t;return"function"==typeof e&&(e=e()),ub(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&XE(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function ow(e,t){return Object.assign(e,aw),e.state=Object.assign({},e.state,t),"function"==typeof e.handleStateChanged&&XE(e)&&e.on("statechanged",e.handleStateChanged),e}const lw=function(e){return"string"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},Aw=function(e){return"string"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},cw=function(e,t){return Aw(e)===Aw(t)};var uw=Object.freeze({__proto__:null,toLowerCase:lw,toTitleCase:Aw,titleCaseEquals:cw});class hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of component options.
   *
   * @param {Object[]} [options.children]
   *        An array of children objects to initialize this component with. Children objects have
   *        a name property that will be used if more than one component of the same type needs to be
   *        added.
   *
   * @param  {string} [options.className]
   *         A class or space separated list of classes to add the component
   *
   * @param {ReadyCallback} [ready]
   *        Function that gets called when the `Component` is ready.
   */
constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=pb({},this.options_),t=this.options_=pb(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||"no_player";this.id_=`${t}_component_${FE()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach((e=>this.addClass(e))),["on","off","one","any","trigger"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(rw(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),ow(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}
// `on`, `off`, `one`, `any` and `trigger` are here so tsc includes them in definitions.
// They are replaced or removed in the constructor
/**
   * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a
   * function that will get called when an event with a certain name gets triggered.
   *
   * @param {string|string[]} type
   *        An event name or an array of event names.
   *
   * @param {Function} fn
   *        The function to call with `EventTarget`s
   */
/**
   * Removes an `event listener` for a specific event from an instance of `EventTarget`.
   * This makes it so that the `event listener` will no longer get called when the
   * named event happens.
   *
   * @param {string|string[]} type
   *        An event name or an array of event names.
   *
   * @param {Function} [fn]
   *        The function to remove. If not specified, all listeners managed by Video.js will be removed.
   */
/**
   * This function will add an `event listener` that gets triggered only once. After the
   * first trigger it will get removed. This is like adding an `event listener`
   * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.
   *
   * @param {string|string[]} type
   *        An event name or an array of event names.
   *
   * @param {Function} fn
   *        The function to be called once for each event name.
   */
/**
   * This function will add an `event listener` that gets triggered only once and is
   * removed from all events. This is like adding an array of `event listener`s
   * with {@link EventTarget#on} that calls {@link EventTarget#off} on all events the
   * first time it is triggered.
   *
   * @param {string|string[]} type
   *        An event name or an array of event names.
   *
   * @param {Function} fn
   *        The function to be called once for each event name.
   */
/**
   * This function causes an event to happen. This will then cause any `event listeners`
   * that are waiting for that event, to get called. If there are no `event listeners`
   * for an event then nothing will happen.
   *
   * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.
   * Trigger will also call the `on` + `uppercaseEventName` function.
   *
   * Example:
   * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call
   * `onClick` if it exists.
   *
   * @param {string|Event|Object} event
   *        The name of the event, an `Event`, or an object with a key of type set to
   *        an event name.
   *
   * @param {Object} [hash]
   *        Optionally extra argument to pass through to an event listener
   */
/**
   * Dispose of the `Component` and all child components.
   *
   * @fires Component#dispose
   *
   * @param {Object} options
   * @param {Element} options.originalEl element with which to replace player element
   */
dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}
/**
   * Determine whether or not this component has been disposed.
   *
   * @return {boolean}
   *         If the component has been disposed, will be `true`. Otherwise, `false`.
   */isDisposed(){return Boolean(this.isDisposed_)}
/**
   * Return the {@link Player} that the `Component` has attached to.
   *
   * @return {Player}
   *         The player that this `Component` has attached to.
   */player(){return this.player_}
/**
   * Deep merge of options objects with new options.
   * > Note: When both `obj` and `options` contain properties whose values are objects.
   *         The two properties get merged using {@link module:obj.merge}
   *
   * @param {Object} obj
   *        The object that contains new options.
   *
   * @return {Object}
   *         A new object of `this.options_` and `obj` merged together.
   */options(e){return e?(this.options_=pb(this.options_,e),this.options_):this.options_}
/**
   * Get the `Component`s DOM element
   *
   * @return {Element}
   *         The DOM element for this `Component`.
   */el(){return this.el_}
/**
   * Create the `Component`s DOM element.
   *
   * @param {string} [tagName]
   *        Element's DOM node type. e.g. 'div'
   *
   * @param {Object} [properties]
   *        An object of properties that should be set.
   *
   * @param {Object} [attributes]
   *        An object of attributes that should be set.
   *
   * @return {Element}
   *         The element that gets created.
   */createEl(e,t,i){return jb(e,t,i)}
/**
   * Localize a string given the string in english.
   *
   * If tokens are provided, it'll try and run a simple token replacement on the provided string.
   * The tokens it looks for look like `{1}` with the index being 1-indexed into the tokens array.
   *
   * If a `defaultValue` is provided, it'll use that over `string`,
   * if a value isn't found in provided language files.
   * This is useful if you want to have a descriptive key for token replacement
   * but have a succinct localized string and not require `en.json` to be included.
   *
   * Currently, it is used for the progress bar timing.
   * ```js
   * {
   *   "progress bar timing: currentTime={1} duration={2}": "{1} of {2}"
   * }
   * ```
   * It is then used like so:
   * ```js
   * this.localize('progress bar timing: currentTime={1} duration{2}',
   *               [this.player_.currentTime(), this.player_.duration()],
   *               '{1} of {2}');
   * ```
   *
   * Which outputs something like: `01:23 of 24:56`.
   *
   *
   * @param {string} string
   *        The string to localize and the key to lookup in the language files.
   * @param {string[]} [tokens]
   *        If the current item has token replacements, provide the tokens here.
   * @param {string} [defaultValue]
   *        Defaults to `string`. Can be a default value to use for token replacement
   *        if the lookup key is needed to be separate.
   *
   * @return {string}
   *         The localized string or if no localization exists the english string.
   */localize(e,t,i=e){const n=this.player_.language&&this.player_.language(),s=this.player_.languages&&this.player_.languages(),r=s&&s[n],a=n&&n.split("-")[0],o=s&&s[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){const n=t[i-1];let s=n;return void 0===n&&(s=e),s}))),l}
/**
   * Handles language change for the player in components. Should be overridden by sub-components.
   *
   * @abstract
   */handleLanguagechange(){}
/**
   * Return the `Component`s DOM element. This is where children get inserted.
   * This will usually be the the same as the element returned in {@link Component#el}.
   *
   * @return {Element}
   *         The content element for this `Component`.
   */contentEl(){return this.contentEl_||this.el_}
/**
   * Get this `Component`s ID
   *
   * @return {string}
   *         The id of this `Component`
   */id(){return this.id_}
/**
   * Get the `Component`s name. The name gets used to reference the `Component`
   * and is set during registration.
   *
   * @return {string}
   *         The name of this `Component`.
   */name(){return this.name_}
/**
   * Get an array of all child components
   *
   * @return {Array}
   *         The children
   */children(){return this.children_}
/**
   * Returns the child `Component` with the given `id`.
   *
   * @param {string} id
   *        The id of the child `Component` to get.
   *
   * @return {Component|undefined}
   *         The child `Component` with the given `id` or undefined.
   */getChildById(e){return this.childIndex_[e]}
/**
   * Returns the child `Component` with the given `name`.
   *
   * @param {string} name
   *        The name of the child `Component` to get.
   *
   * @return {Component|undefined}
   *         The child `Component` with the given `name` or undefined.
   */getChild(e){if(e)return this.childNameIndex_[e]}
/**
   * Returns the descendant `Component` following the givent
   * descendant `names`. For instance ['foo', 'bar', 'baz'] would
   * try to get 'foo' on the current component, 'bar' on the 'foo'
   * component and 'baz' on the 'bar' component and return undefined
   * if any of those don't exist.
   *
   * @param {...string[]|...string} names
   *        The name of the child `Component` to get.
   *
   * @return {Component|undefined}
   *         The descendant `Component` following the given descendant
   *         `names` or undefined.
   */getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}
/**
   * Adds an SVG icon element to another element or component.
   *
   * @param {string} iconName
   *        The name of icon. A list of all the icon names can be found at 'sandbox/svg-icons.html'
   *
   * @param {Element} [el=this.el()]
   *        Element to set the title on. Defaults to the current Component's element.
   *
   * @return {Element}
   *        The newly created icon element.
   */setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i="http://www.w3.org/2000/svg",n=jb("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),s=gI.createElementNS(i,"svg");s.setAttributeNS(null,"viewBox","0 0 512 512");const r=gI.createElementNS(i,"use");return s.appendChild(r),r.setAttributeNS(null,"href",`#vjs-icon-${e}`),n.appendChild(s),this.iconIsSet_?t.replaceChild(n,t.querySelector(".vjs-icon-placeholder")):t.appendChild(n),this.iconIsSet_=!0,n}
/**
   * Add a child `Component` inside the current `Component`.
   *
   * @param {string|Component} child
   *        The name or instance of a child to add.
   *
   * @param {Object} [options={}]
   *        The key/value store of options that will get passed to children of
   *        the child.
   *
   * @param {number} [index=this.children_.length]
   *        The index to attempt to add a child into.
   *
   *
   * @return {Component}
   *         The `Component` that gets added as a child. When using a string the
   *         `Component` will get created by this process.
   */addChild(e,t={},i=this.children_.length){let n,s;if("string"==typeof e){s=Aw(e);const i=t.componentClass||s;t.name=s;const r=hw.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if("function"!=typeof r)return null;n=new r(this.player_||this,t)}else n=e;if(n.parentComponent_&&n.parentComponent_.removeChild(n),this.children_.splice(i,0,n),n.parentComponent_=this,"function"==typeof n.id&&(this.childIndex_[n.id()]=n),s=s||n.name&&Aw(n.name()),s&&(this.childNameIndex_[s]=n,this.childNameIndex_[lw(s)]=n),"function"==typeof n.el&&n.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Yb(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(n.el(),e)}return n}
/**
   * Remove a child `Component` from this `Component`s list of children. Also removes
   * the child `Component`s element from this `Component`s element.
   *
   * @param {Component} component
   *        The child `Component` to remove.
   */removeChild(e){if("string"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Aw(e.name())]=null,this.childNameIndex_[lw(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}
/**
   * Add and initialize default child `Component`s based upon options.
   */initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let n=e.opts;if(void 0!==t[i]&&(n=t[i]),!1===n)return;!0===n&&(n={}),n.playerOptions=this.options_.playerOptions;const s=this.addChild(i,n);s&&(this[i]=s)};let n;const s=hw.getComponent("Tech");n=Array.isArray(e)?e:Object.keys(e),n.concat(Object.keys(this.options_).filter((function(e){return!n.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,n;return"string"==typeof t?(i=t,n=e[i]||this.options_[i]||{}):(i=t.name,n=t),{name:i,opts:n}})).filter((e=>{const t=hw.getComponent(e.opts.componentClass||Aw(e.name));return t&&!s.isTech(t)})).forEach(i)}}
/**
   * Builds the default DOM class name. Should be overridden by sub-components.
   *
   * @return {string}
   *         The DOM class name for this object.
   *
   * @abstract
   */buildCSSClass(){return""}
/**
   * Bind a listener to the component's ready state.
   * Different from event listeners in that if the ready event has already happened
   * it will trigger the function immediately.
   *
   * @param {ReadyCallback} fn
   *        Function that gets called when the `Component` is ready.
   */ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}
/**
   * Trigger all the ready listeners for this `Component`.
   *
   * @fires Component#ready
   */triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)}
/**
   * Find a single DOM element matching a `selector`. This can be within the `Component`s
   * `contentEl()` or another custom context.
   *
   * @param {string} selector
   *        A valid CSS selector, which will be passed to `querySelector`.
   *
   * @param {Element|string} [context=this.contentEl()]
   *        A DOM element within which to query. Can also be a selector string in
   *        which case the first matching element will get used as context. If
   *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns
   *        nothing it falls back to `document`.
   *
   * @return {Element|null}
   *         the dom element that was found, or null
   *
   * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)
   */$(e,t){return mE(e,t||this.contentEl())}
/**
   * Finds all DOM element matching a `selector`. This can be within the `Component`s
   * `contentEl()` or another custom context.
   *
   * @param {string} selector
   *        A valid CSS selector, which will be passed to `querySelectorAll`.
   *
   * @param {Element|string} [context=this.contentEl()]
   *        A DOM element within which to query. Can also be a selector string in
   *        which case the first matching element will get used as context. If
   *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns
   *        nothing it falls back to `document`.
   *
   * @return {NodeList}
   *         a list of dom elements that were found
   *
   * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)
   */$$(e,t){return CE(e,t||this.contentEl())}
/**
   * Check if a component's element has a CSS class name.
   *
   * @param {string} classToCheck
   *        CSS class name to check.
   *
   * @return {boolean}
   *         - True if the `Component` has the class.
   *         - False if the `Component` does not have the class`
   */hasClass(e){return Xb(this.el_,e)}
/**
   * Add a CSS class name to the `Component`s element.
   *
   * @param {...string} classesToAdd
   *        One or more CSS class name to add.
   */addClass(...e){$b(this.el_,...e)}
/**
   * Remove a CSS class name from the `Component`s element.
   *
   * @param {...string} classesToRemove
   *        One or more CSS class name to remove.
   */removeClass(...e){Zb(this.el_,...e)}
/**
   * Add or remove a CSS class name from the component's element.
   * - `classToToggle` gets added when {@link Component#hasClass} would return false.
   * - `classToToggle` gets removed when {@link Component#hasClass} would return true.
   *
   * @param  {string} classToToggle
   *         The class to add or remove. Passed to DOMTokenList's toggle()
   *
   * @param  {boolean|Dom.PredicateCallback} [predicate]
   *         A boolean or function that returns a boolean. Passed to DOMTokenList's toggle().
   */toggleClass(e,t){eE(this.el_,e,t)}
/**
   * Show the `Component`s element if it is hidden by removing the
   * 'vjs-hidden' class name from it.
   */show(){this.removeClass("vjs-hidden")}
/**
   * Hide the `Component`s element if it is currently showing by adding the
   * 'vjs-hidden` class name to it.
   */hide(){this.addClass("vjs-hidden")}
/**
   * Lock a `Component`s element in its visible state by adding the 'vjs-lock-showing'
   * class name to it. Used during fadeIn/fadeOut.
   *
   * @private
   */lockShowing(){this.addClass("vjs-lock-showing")}
/**
   * Unlock a `Component`s element from its visible state by removing the 'vjs-lock-showing'
   * class name from it. Used during fadeIn/fadeOut.
   *
   * @private
   */unlockShowing(){this.removeClass("vjs-lock-showing")}
/**
   * Get the value of an attribute on the `Component`s element.
   *
   * @param {string} attribute
   *        Name of the attribute to get the value from.
   *
   * @return {string|null}
   *         - The value of the attribute that was asked for.
   *         - Can be an empty string on some browsers if the attribute does not exist
   *           or has no value
   *         - Most browsers will return null if the attribute does not exist or has
   *           no value.
   *
   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute}
   */getAttribute(e){return nE(this.el_,e)}
/**
   * Set the value of an attribute on the `Component`'s element
   *
   * @param {string} attribute
   *        Name of the attribute to set.
   *
   * @param {string} value
   *        Value to set the attribute to.
   *
   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute}
   */setAttribute(e,t){sE(this.el_,e,t)}
/**
   * Remove an attribute from the `Component`s element.
   *
   * @param {string} attribute
   *        Name of the attribute to remove.
   *
   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute}
   */removeAttribute(e){rE(this.el_,e)}
/**
   * Get or set the width of the component based upon the CSS styles.
   * See {@link Component#dimension} for more detailed information.
   *
   * @param {number|string} [num]
   *        The width that you want to set postfixed with '%', 'px' or nothing.
   *
   * @param {boolean} [skipListeners]
   *        Skip the componentresize event trigger
   *
   * @return {number|undefined}
   *         The width when getting, zero if there is no width
   */width(e,t){return this.dimension("width",e,t)}
/**
   * Get or set the height of the component based upon the CSS styles.
   * See {@link Component#dimension} for more detailed information.
   *
   * @param {number|string} [num]
   *        The height that you want to set postfixed with '%', 'px' or nothing.
   *
   * @param {boolean} [skipListeners]
   *        Skip the componentresize event trigger
   *
   * @return {number|undefined}
   *         The height when getting, zero if there is no height
   */height(e,t){return this.dimension("height",e,t)}
/**
   * Set both the width and height of the `Component` element at the same time.
   *
   * @param  {number|string} width
   *         Width to set the `Component`s element to.
   *
   * @param  {number|string} height
   *         Height to set the `Component`s element to.
   */dimensions(e,t){this.width(e,!0),this.height(t)}
/**
   * Get or set width or height of the `Component` element. This is the shared code
   * for the {@link Component#width} and {@link Component#height}.
   *
   * Things to know:
   * - If the width or height in an number this will return the number postfixed with 'px'.
   * - If the width/height is a percent this will return the percent postfixed with '%'
   * - Hidden elements have a width of 0 with `window.getComputedStyle`. This function
   *   defaults to the `Component`s `style.width` and falls back to `window.getComputedStyle`.
   *   See [this]{@link http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/}
   *   for more information
   * - If you want the computed style of the component, use {@link Component#currentWidth}
   *   and {@link {Component#currentHeight}
   *
   * @fires Component#componentresize
   *
   * @param {string} widthOrHeight
   8        'width' or 'height'
   *
   * @param  {number|string} [num]
   8         New dimension
   *
   * @param  {boolean} [skipListeners]
   *         Skip componentresize event trigger
   *
   * @return {number|undefined}
   *         The dimension when getting or 0 if unset
   */dimension(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;const n=this.el_.style[e],s=n.indexOf("px");return-1!==s?parseInt(n.slice(0,s),10):parseInt(this.el_["offset"+Aw(e)],10)}
/**
   * Get the computed width or the height of the component's element.
   *
   * Uses `window.getComputedStyle`.
   *
   * @param {string} widthOrHeight
   *        A string containing 'width' or 'height'. Whichever one you want to get.
   *
   * @return {number}
   *         The dimension that gets asked for or 0 if nothing was set
   *         for that dimension.
   */currentDimension(e){let t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=IE(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${Aw(e)}`;t=this.el_[i]}return t}
/**
   * An object that contains width and height values of the `Component`s
   * computed style. Uses `window.getComputedStyle`.
   *
   * @typedef {Object} Component~DimensionObject
   *
   * @property {number} width
   *           The width of the `Component`s computed style.
   *
   * @property {number} height
   *           The height of the `Component`s computed style.
   */
/**
   * Get an object that contains computed width and height values of the
   * component's element.
   *
   * Uses `window.getComputedStyle`.
   *
   * @return {Component~DimensionObject}
   *         The computed dimensions of the component's element.
   */currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}
/**
   * Get the computed width of the component's element.
   *
   * Uses `window.getComputedStyle`.
   *
   * @return {number}
   *         The computed width of the component's element.
   */currentWidth(){return this.currentDimension("width")}
/**
   * Get the computed height of the component's element.
   *
   * Uses `window.getComputedStyle`.
   *
   * @return {number}
   *         The computed height of the component's element.
   */currentHeight(){return this.currentDimension("height")}
/**
   * Retrieves the position and size information of the component's element.
   *
   * @return {Object} An object with `boundingClientRect` and `center` properties.
   *         - `boundingClientRect`: An object with properties `x`, `y`, `width`,
   *           `height`, `top`, `right`, `bottom`, and `left`, representing
   *           the bounding rectangle of the element.
   *         - `center`: An object with properties `x` and `y`, representing
   *           the center point of the element. `width` and `height` are set to 0.
   */getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}
/**
   * Set the focus to this component
   */focus(){this.el_.focus()}
/**
   * Remove the focus from this component
   */blur(){this.el_.blur()}
/**
   * When this Component receives a `keydown` event which it does not process,
   *  it passes the event to the Player for handling.
   *
   * @param {KeyboardEvent} event
   *        The `keydown` event that caused this function to be called.
   */handleKeyDown(e){this.player_&&("Tab"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}
/**
   * Many components used to have a `handleKeyPress` method, which was poorly
   * named because it listened to a `keydown` event. This method name now
   * delegates to `handleKeyDown`. This means anyone calling `handleKeyPress`
   * will not see their method calls stop working.
   *
   * @param {KeyboardEvent} event
   *        The event that caused this function to be called.
   */handleKeyPress(e){this.handleKeyDown(e)}
/**
   * Emit a 'tap' events when touch event support gets detected. This gets used to
   * support toggling the controls through a tap on the video. They get enabled
   * because every sub-component would have extra overhead otherwise.
   *
   * @protected
   * @fires Component#tap
   * @listens Component#touchstart
   * @listens Component#touchmove
   * @listens Component#touchleave
   * @listens Component#touchcancel
   * @listens Component#touchend
    */emitTapEvents(){let e=0,t=null;let i;this.on("touchstart",(function(n){1===n.touches.length&&(t={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},e=lI.performance.now(),i=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)i=!1;else if(t){const n=e.touches[0].pageX-t.pageX,s=e.touches[0].pageY-t.pageY;Math.sqrt(n*n+s*s)>10&&(i=!1)}}));const n=function(){i=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",(function(n){if(t=null,!0===i){lI.performance.now()-e<200&&(n.preventDefault(),this.trigger("tap"))}}))}
/**
   * This function reports user activity whenever touch events happen. This can get
   * turned off by any sub-components that wants touch events to act another way.
   *
   * Report user touch activity when touch events occur. User activity gets used to
   * determine when controls should show/hide. It is simple when it comes to mouse
   * events, because any mouse event should show the controls. So we capture mouse
   * events that bubble up to the player and report activity when that happens.
   * With touch events it isn't as easy as `touchstart` and `touchend` toggle player
   * controls. So touch events can't help us at the player level either.
   *
   * User activity gets checked asynchronously. So what could happen is a tap event
   * on the video turns the controls off. Then the `touchend` event bubbles up to
   * the player. Which, if it reported user activity, would turn the controls right
   * back on. We also don't want to completely block touch events from bubbling up.
   * Furthermore a `touchmove` event and anything other than a tap, should not turn
   * controls back on.
   *
   * @listens Component#touchstart
   * @listens Component#touchmove
   * @listens Component#touchend
   * @listens Component#touchcancel
   */enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=qE(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}
/**
   * A callback that has no parameters and is bound into `Component`s context.
   *
   * @callback Component~GenericCallback
   * @this Component
   */
/**
   * Creates a function that runs after an `x` millisecond timeout. This function is a
   * wrapper around `window.setTimeout`. There are a few reasons to use this one
   * instead though:
   * 1. It gets cleared via  {@link Component#clearTimeout} when
   *    {@link Component#dispose} gets called.
   * 2. The function callback will gets turned into a {@link Component~GenericCallback}
   *
   * > Note: You can't use `window.clearTimeout` on the id returned by this function. This
   *         will cause its dispose listener not to get cleaned up! Please use
   *         {@link Component#clearTimeout} or {@link Component#dispose} instead.
   *
   * @param {Component~GenericCallback} fn
   *        The function that will be run after `timeout`.
   *
   * @param {number} timeout
   *        Timeout in milliseconds to delay before executing the specified function.
   *
   * @return {number}
   *         Returns a timeout ID that gets used to identify the timeout. It can also
   *         get used in {@link Component#clearTimeout} to clear the timeout that
   *         was set.
   *
   * @listens Component#dispose
   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout}
   */setTimeout(e,t){var i;return e=qE(this,e),this.clearTimersOnDispose_(),i=lI.setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}
/**
   * Clears a timeout that gets created via `window.setTimeout` or
   * {@link Component#setTimeout}. If you set a timeout via {@link Component#setTimeout}
   * use this function instead of `window.clearTimout`. If you don't your dispose
   * listener will not get cleaned up until {@link Component#dispose}!
   *
   * @param {number} timeoutId
   *        The id of the timeout to clear. The return value of
   *        {@link Component#setTimeout} or `window.setTimeout`.
   *
   * @return {number}
   *         Returns the timeout id that was cleared.
   *
   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearTimeout}
   */clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),lI.clearTimeout(e)),e}
/**
   * Creates a function that gets run every `x` milliseconds. This function is a wrapper
   * around `window.setInterval`. There are a few reasons to use this one instead though.
   * 1. It gets cleared via  {@link Component#clearInterval} when
   *    {@link Component#dispose} gets called.
   * 2. The function callback will be a {@link Component~GenericCallback}
   *
   * @param {Component~GenericCallback} fn
   *        The function to run every `x` seconds.
   *
   * @param {number} interval
   *        Execute the specified function every `x` milliseconds.
   *
   * @return {number}
   *         Returns an id that can be used to identify the interval. It can also be be used in
   *         {@link Component#clearInterval} to clear the interval.
   *
   * @listens Component#dispose
   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval}
   */setInterval(e,t){e=qE(this,e),this.clearTimersOnDispose_();const i=lI.setInterval(e,t);return this.setIntervalIds_.add(i),i}
/**
   * Clears an interval that gets created via `window.setInterval` or
   * {@link Component#setInterval}. If you set an interval via {@link Component#setInterval}
   * use this function instead of `window.clearInterval`. If you don't your dispose
   * listener will not get cleaned up until {@link Component#dispose}!
   *
   * @param {number} intervalId
   *        The id of the interval to clear. The return value of
   *        {@link Component#setInterval} or `window.setInterval`.
   *
   * @return {number}
   *         Returns the interval id that was cleared.
   *
   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearInterval}
   */clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),lI.clearInterval(e)),e}
/**
   * Queues up a callback to be passed to requestAnimationFrame (rAF), but
   * with a few extra bonuses:
   *
   * - Supports browsers that do not support rAF by falling back to
   *   {@link Component#setTimeout}.
   *
   * - The callback is turned into a {@link Component~GenericCallback} (i.e.
   *   bound to the component).
   *
   * - Automatic cancellation of the rAF callback is handled if the component
   *   is disposed before it is called.
   *
   * @param  {Component~GenericCallback} fn
   *         A function that will be bound to this component and executed just
   *         before the browser's next repaint.
   *
   * @return {number}
   *         Returns an rAF ID that gets used to identify the timeout. It can
   *         also be used in {@link Component#cancelAnimationFrame} to cancel
   *         the animation frame callback.
   *
   * @listens Component#dispose
   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame}
   */requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=qE(this,e),t=lI.requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}
/**
   * Request an animation frame, but only one named animation
   * frame will be queued. Another will never be added until
   * the previous one finishes.
   *
   * @param {string} name
   *        The name to give this requestAnimationFrame
   *
   * @param  {Component~GenericCallback} fn
   *         A function that will be bound to this component and executed just
   *         before the browser's next repaint.
   */requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=qE(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}
/**
   * Cancels a current named animation frame if it exists.
   *
   * @param {string} name
   *        The name of the requestAnimationFrame to cancel.
   */cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}
/**
   * Cancels a queued callback passed to {@link Component#requestAnimationFrame}
   * (rAF).
   *
   * If you queue an rAF callback via {@link Component#requestAnimationFrame},
   * use this function instead of `window.cancelAnimationFrame`. If you don't,
   * your dispose listener will not get cleaned up until {@link Component#dispose}!
   *
   * @param {number} id
   *        The rAF ID to clear. The return value of {@link Component#requestAnimationFrame}.
   *
   * @return {number}
   *         Returns the rAF ID that was cleared.
   *
   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/cancelAnimationFrame}
   */cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),lI.cancelAnimationFrame(e)),e}
/**
   * A function to setup `requestAnimationFrame`, `setTimeout`,
   * and `setInterval`, clearing on dispose.
   *
   * > Previously each timer added and removed dispose listeners on it's own.
   * For better performance it was decided to batch them all, and use `Set`s
   * to track outstanding timer ids.
   *
   * @private
   */clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}
/**
    * Decide whether an element is actually disabled or not.
    *
    * @function isActuallyDisabled
    * @param element {Node}
    * @return {boolean}
    *
    * @see {@link https://html.spec.whatwg.org/multipage/semantics-other.html#concept-element-disabled}
    */getIsDisabled(){return Boolean(this.el_.disabled)}
/**
    * Decide whether the element is expressly inert or not.
    *
    * @see {@link https://html.spec.whatwg.org/multipage/interaction.html#expressly-inert}
    * @function isExpresslyInert
    * @param element {Node}
    * @return {boolean}
    */getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}
/**
   * Determine whether or not this component can be considered as focusable component.
   *
   * @param {HTMLElement} el - The HTML element representing the component.
   * @return {boolean}
   *         If the component can be focused, will be `true`. Otherwise, `false`.
   */getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}
/**
   * Determine whether or not this component is currently visible/enabled/etc...
   *
   * @param {HTMLElement} el - The HTML element representing the component.
   * @return {boolean}
   *         If the component can is currently visible & enabled, will be `true`. Otherwise, `false`.
   */getIsAvailableToBeFocused(e){function t(e){const t=lI.getComputedStyle(e,null),i=t.getPropertyValue("visibility");return"none"!==t.getPropertyValue("display")&&!["hidden","collapse"].includes(i)}return e||(e=this.el()),!!(function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(gI.documentElement.clientWidth||lI.innerWidth))return!1;if(t.y<0)return!1;if(t.y>(gI.documentElement.clientHeight||lI.innerHeight))return!1;let i=gI.elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}}(e)&&(i=e,t(i.parentElement)&&t(i)&&"0"!==i.style.opacity&&"0px"!==lI.getComputedStyle(i).height&&"0px"!==lI.getComputedStyle(i).width)&&(!e.parentElement||e.tabIndex>=0));var i}
/**
   * Register a `Component` with `videojs` given the name and the component.
   *
   * > NOTE: {@link Tech}s should not be registered as a `Component`. {@link Tech}s
   *         should be registered using {@link Tech.registerTech} or
   *         {@link videojs:videojs.registerTech}.
   *
   * > NOTE: This function can also be seen on videojs as
   *         {@link videojs:videojs.registerComponent}.
   *
   * @param {string} name
   *        The name of the `Component` to register.
   *
   * @param {Component} ComponentToRegister
   *        The `Component` class to register.
   *
   * @return {Component}
   *         The `Component` that was registered.
   */static registerComponent(e,t){if("string"!=typeof e||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const i=hw.getComponent("Tech"),n=i&&i.isTech(t),s=hw===t||hw.prototype.isPrototypeOf(t.prototype);if(n||!s){let t;throw t=n?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error(`Illegal component, "${e}"; ${t}.`)}e=Aw(e),hw.components_||(hw.components_={});const r=hw.getComponent("Player");if("Player"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0&&t.map((t=>e[t])).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return hw.components_[e]=t,hw.components_[lw(e)]=t,t}
/**
   * Get a `Component` based on the name it was registered with.
   *
   * @param {string} name
   *        The Name of the component to get.
   *
   * @return {typeof Component}
   *         The `Component` that got registered under the given name.
   */static getComponent(e){if(e&&hw.components_)return hw.components_[e]}}function dw(e,t,i,n){return function(e,t,i){if("number"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,n,i.length-1),i[n][t]}function gw(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:dw.bind(null,"start",0,e),end:dw.bind(null,"end",1,e)},lI.Symbol&&lI.Symbol.iterator&&(t[lI.Symbol.iterator]=()=>(e||[]).values()),t}function pw(e,t){return Array.isArray(e)?gw(e):void 0===e||void 0===t?gw():gw([[e,t]])}hw.registerComponent("Component",hw);const fw=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),n=Math.floor(e/60%60),s=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(s=n=i="-"),s=s>0||a>0?s+":":"",n=((s||r>=10)&&n<10?"0"+n:n)+":",i=i<10?"0"+i:i,s+n+i};let mw=fw;function Cw(e){mw=e}function Iw(){mw=fw}function vw(e,t=e){return mw(e,t)}var Bw=Object.freeze({__proto__:null,createTimeRanges:pw,createTimeRange:pw,setFormatTime:Cw,resetFormatTime:Iw,formatTime:vw});function yw(e,t){let i,n,s=0;if(!t)return 0;e&&e.length||(e=pw(0,0));for(let r=0;r<e.length;r++)i=e.start(r),n=e.end(r),n>t&&(n=t),s+=n-i;return s/t}function bw(e){if(e instanceof bw)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:db(e)&&("number"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=bw.defaultMessages[this.code]||"")}function Ew(e){return null!=e&&"function"==typeof e.then}function ww(e){Ew(e)&&e.then(null,(e=>{}))}bw.prototype.code=0,bw.prototype.message="",bw.prototype.status=null,bw.prototype.metadata=null,bw.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],bw.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},bw.MEDIA_ERR_CUSTOM=0,bw.prototype.MEDIA_ERR_CUSTOM=0,bw.MEDIA_ERR_ABORTED=1,bw.prototype.MEDIA_ERR_ABORTED=1,bw.MEDIA_ERR_NETWORK=2,bw.prototype.MEDIA_ERR_NETWORK=2,bw.MEDIA_ERR_DECODE=3,bw.prototype.MEDIA_ERR_DECODE=3,bw.MEDIA_ERR_SRC_NOT_SUPPORTED=4,bw.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,bw.MEDIA_ERR_ENCRYPTED=5,bw.prototype.MEDIA_ERR_ENCRYPTED=5;const Qw=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(((t,i,n)=>(e[i]&&(t[i]=e[i]),t)),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})};var _w=function(e){const t=e.$$("track"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=Qw(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(Qw))},Sw=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>i.addCue(e)))})),t.textTracks()};const xw="vjs-modal-dialog";class kw extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {ContentDescriptor} [options.content=undefined]
   *        Provide customized content for this modal.
   *
   * @param {string} [options.description]
   *        A text description for the modal, primarily for accessibility.
   *
   * @param {boolean} [options.fillAlways=false]
   *        Normally, modals are automatically filled only the first time
   *        they open. This tells the modal to refresh its content
   *        every time it opens.
   *
   * @param {string} [options.label]
   *        A text label for the modal, primarily for accessibility.
   *
   * @param {boolean} [options.pauseOnOpen=true]
   *        If `true`, playback will will be paused if playing when
   *        the modal opens, and resumed when it closes.
   *
   * @param {boolean} [options.temporary=true]
   *        If `true`, the modal can only be opened once; it will be
   *        disposed as soon as it's closed.
   *
   * @param {boolean} [options.uncloseable=false]
   *        If `true`, the user will not be able to close the modal
   *        through the UI in the normal ways. Programmatic closing is
   *        still possible.
   */
constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=jb("div",{className:`${xw}-content`},{role:"document"}),this.descEl_=jb("p",{className:`${xw}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),Jb(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}
/**
   * Create the `ModalDialog`'s DOM element
   *
   * @return {Element}
   *         The DOM element that gets created.
   */createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`${xw} vjs-hidden ${super.buildCSSClass()}`}
/**
   * Returns the label string for this modal. Primarily used for accessibility.
   *
   * @return {string}
   *         the localized or raw label of this modal.
   */label(){return this.localize(this.options_.label||"Modal Window")}
/**
   * Returns the description string for this modal. Primarily used for
   * accessibility.
   *
   * @return {string}
   *         The localized or raw description of this modal.
   */description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}
/**
   * Opens the modal.
   *
   * @fires ModalDialog#beforemodalopen
   * @fires ModalDialog#modalopen
   */open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}
/**
   * If the `ModalDialog` is currently open or closed.
   *
   * @param  {boolean} [value]
   *         If given, it will open (`true`) or close (`false`) the modal.
   *
   * @return {boolean}
   *         the current open state of the modaldialog
   */opened(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_}
/**
   * Closes the modal, does nothing if the `ModalDialog` is
   * not open.
   *
   * @fires ModalDialog#beforemodalclose
   * @fires ModalDialog#modalclose
   */close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}
/**
   * Check to see if the `ModalDialog` is closeable via the UI.
   *
   * @param  {boolean} [value]
   *         If given as a boolean, it will set the `closeable` option.
   *
   * @return {boolean}
   *         Returns the final value of the closable option.
   */closeable(e){if("boolean"==typeof e){const t=this.closeable_=!!e;let i=this.getChild("closeButton");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=e,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}
/**
   * Fill the modal's content element with the modal's "content" option.
   * The content element will be emptied before this change takes place.
   */fill(){this.fillWith(this.content())}
/**
   * Fill the modal's content element with arbitrary content.
   * The content element will be emptied before this change takes place.
   *
   * @fires ModalDialog#beforemodalfill
   * @fires ModalDialog#modalfill
   *
   * @param {ContentDescriptor} [content]
   *        The same rules apply to this as apply to the `content` option.
   */fillWith(e){const t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),pE(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);const s=this.getChild("closeButton");s&&i.appendChild(s.el_),this.trigger("aftermodalfill")}
/**
   * Empties the content element. This happens anytime the modal is filled.
   *
   * @fires ModalDialog#beforemodalempty
   * @fires ModalDialog#modalempty
   */empty(){this.trigger("beforemodalempty"),hE(this.contentEl()),this.trigger("modalempty")}
/**
   * Gets or sets the modal content, which gets normalized before being
   * rendered into the DOM.
   *
   * This does not update the DOM or fill the modal, but it is called during
   * that process.
   *
   * @param  {ContentDescriptor} [value]
   *         If defined, sets the internal content value to be used on the
   *         next call(s) to `fill`. This value is normalized before being
   *         inserted. To "clear" the internal content value, pass `null`.
   *
   * @return {ContentDescriptor}
   *         The current content of the modal dialog
   */content(e){return void 0!==e&&(this.content_=e),this.content_}
/**
   * conditionally focus the modal dialog if focus was previously on the player.
   *
   * @private
   */conditionalFocus_(){const e=gI.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}
/**
   * conditionally blur the element and refocus the last focused element
   *
   * @private
   */conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}
/**
   * Keydown handler. Attached when modal is focused.
   *
   * @listens keydown
   */handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),"Escape"===e.key&&this.closeable())return e.preventDefault(),void this.close();if("Tab"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(":focus");let n;for(let s=0;s<t.length;s++)if(i===t[s]){n=s;break}gI.activeElement===this.el_&&(n=0),e.shiftKey&&0===n?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||n!==t.length-1||(t[0].focus(),e.preventDefault())}
/**
   * get all focusable elements
   *
   * @private
   */focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(e=>(e instanceof lI.HTMLAnchorElement||e instanceof lI.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof lI.HTMLInputElement||e instanceof lI.HTMLSelectElement||e instanceof lI.HTMLTextAreaElement||e instanceof lI.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof lI.HTMLIFrameElement||e instanceof lI.HTMLObjectElement||e instanceof lI.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")))}}kw.prototype.options_={pauseOnOpen:!0,temporary:!0},hw.registerComponent("ModalDialog",kw);class Dw extends JE{
/**
   * Create an instance of this class
   *
   * @param { Track[] } tracks
   *        A list of tracks to initialize the list with.
   *
   * @abstract
   */
constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}
/**
   * Add a {@link Track} to the `TrackList`
   *
   * @param {Track} track
   *        The audio, video, or text track to add to the list.
   *
   * @fires TrackList#addtrack
   */addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},XE(e)&&e.addEventListener("labelchange",e.labelchange_)}
/**
   * Remove a {@link Track} from the `TrackList`
   *
   * @param {Track} rtrack
   *        The audio, video, or text track to remove from the list.
   *
   * @fires TrackList#removetrack
   */removeTrack(e){let t;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}
/**
   * Get a Track from the TrackList by a tracks id
   *
   * @param {string} id - the id of the track to get
   * @method getTrackById
   * @return {Track}
   * @private
   */getTrackById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const n=this[i];if(n.id===e){t=n;break}}return t}}Dw.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const _ in Dw.prototype.allowedEvents_)Dw.prototype["on"+_]=null;const Fw=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};const Tw=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class Mw extends Dw{
/**
   * Add a {@link TextTrack} to the `TextTrackList`
   *
   * @param {TextTrack} track
   *        The text track to add to the list.
   *
   * @fires TrackList#addtrack
   */
addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}}class Rw{
/**
   * Create an instance of this class..
   *
   * @param {Array} cues
   *        A list of cues to be initialized with
   */
constructor(e){Rw.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}
/**
   * A setter for cues in this list. Creates getters
   * an an index for the cues.
   *
   * @param {Array} cues
   *        An array of cues to set
   *
   * @private
   */setCues_(e){const t=this.length||0;let i=0;const n=e.length;this.cues_=e,this.length_=e.length;const s=function(e){""+e in this||Object.defineProperty(this,""+e,{get(){return this.cues_[e]}})};if(t<n)for(i=t;i<n;i++)s.call(this,i)}
/**
   * Get a `TextTrackCue` that is currently in the `TextTrackCueList` by id.
   *
   * @param {string} id
   *        The id of the cue that should be searched for.
   *
   * @return {TextTrackCueList~TextTrackCue|null}
   *         A single cue or null if none was found.
   */getCueById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const n=this[i];if(n.id===e){t=n;break}}return t}}const Nw={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Lw={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Uw={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Hw={disabled:"disabled",hidden:"hidden",showing:"showing"};class Pw extends JE{
/**
   * Create an instance of this class.
   *
   * @param {Object} [options={}]
   *        Object of option names and values
   *
   * @param {string} [options.kind='']
   *        A valid kind for the track type you are creating.
   *
   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]
   *        A unique id for this AudioTrack.
   *
   * @param {string} [options.label='']
   *        The menu label for this track.
   *
   * @param {string} [options.language='']
   *        A valid two character language code.
   *
   * @abstract
   */
constructor(e={}){super();const t={id:e.id||"vjs_track_"+FE(),kind:e.kind||"",language:e.language||""};let i=e.label||"";for(const n in t)Object.defineProperty(this,n,{get:()=>t[n],set(){}});Object.defineProperty(this,"label",{get:()=>i,set(e){e!==i&&(i=e,this.trigger("labelchange"))}})}}const Ow=function(e){return new URL(e,gI.baseURI)},Gw=function(e){return new URL(e,gI.baseURI).href},Kw=function(e){if("string"==typeof e){const t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},qw=function(e,t=lI.location){return Ow(e).origin!==t.origin};var Yw=Object.freeze({__proto__:null,parseUrl:Ow,getAbsoluteURL:Gw,getFileExtension:Kw,isCrossOrigin:qw});const Vw=function(e,t){const i=new lI.WebVTT.Parser(lI,lI.vttjs,lI.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(lI.console&&lI.console.groupCollapsed&&lI.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),n.forEach((e=>ob.error(e))),lI.console&&lI.console.groupEnd&&lI.console.groupEnd()),i.flush()},Ww=function(e,t){const i={uri:e},n=qw(e);n&&(i.cors=n);const s="use-credentials"===t.tech_.crossOrigin();s&&(i.withCredentials=s),NI(i,qE(this,(function(e,i,n){if(e)return ob.error(e,i);t.loaded_=!0,"function"!=typeof lI.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(e=>{if("vttjserror"!==e.type)return Vw(n,t);ob.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):Vw(n,t)})))};class jw extends Pw{
/**
   * Create an instance of this class.
   *
   * @param {Object} options={}
   *        Object of option names and values
   *
   * @param {Tech} options.tech
   *        A reference to the tech that owns this TextTrack.
   *
   * @param {TextTrack~Kind} [options.kind='subtitles']
   *        A valid text track kind.
   *
   * @param {TextTrack~Mode} [options.mode='disabled']
   *        A valid text track mode.
   *
   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]
   *        A unique id for this TextTrack.
   *
   * @param {string} [options.label='']
   *        The menu label for this track.
   *
   * @param {string} [options.language='']
   *        A valid two character language code.
   *
   * @param {string} [options.srclang='']
   *        A valid two character language code. An alternative, but deprioritized
   *        version of `options.language`
   *
   * @param {string} [options.src]
   *        A url to TextTrack cues.
   *
   * @param {boolean} [options.default]
   *        If this track should default to on or off.
   */
constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=pb(e,{kind:Uw[e.kind]||"subtitles",language:e.language||e.srclang||""});let i=Hw[t.mode]||"disabled";const n=t.default;"metadata"!==t.kind&&"chapters"!==t.kind||(i="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const s=new Rw(this.cues_),r=new Rw(this.activeCues_);let a=!1;this.timeupdateHandler=qE(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));this.tech_.one("dispose",(()=>{this.stopTracking()})),"disabled"!==i&&this.startTracking(),Object.defineProperties(this,{
/**
       * @memberof TextTrack
       * @member {boolean} default
       *         If this track was set to be on or off by default. Cannot be changed after
       *         creation.
       * @instance
       *
       * @readonly
       */
default:{get:()=>n,set(){}},
/**
       * @memberof TextTrack
       * @member {string} mode
       *         Set the mode of this TextTrack to a valid {@link TextTrack~Mode}. Will
       *         not be set if setting to an invalid mode.
       * @instance
       *
       * @fires TextTrack#modechange
       */
mode:{get:()=>i,set(e){Hw[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||Ww(this.src,this),this.stopTracking(),"disabled"!==i&&this.startTracking(),this.trigger("modechange"))}},
/**
       * @memberof TextTrack
       * @member {TextTrackCueList} cues
       *         The text track cue list for this TextTrack.
       * @instance
       */
cues:{get(){return this.loaded_?s:null},set(){}},
/**
       * @memberof TextTrack
       * @member {TextTrackCueList} activeCues
       *         The list text track cues that are currently active for this TextTrack.
       * @instance
       */
activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,n=this.cues.length;i<n;i++){const n=this.cues[i];n.startTime<=e&&n.endTime>=e&&t.push(n)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let i=0;i<t.length;i++)-1===this.activeCues_.indexOf(t[i])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},
// /!\ Keep this setter empty (see the timeupdate handler above)
set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||"subtitles"!==t.kind&&"captions"!==t.kind)&&Ww(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}
/**
   * Add a cue to the internal list of cues.
   *
   * @param {TextTrack~Cue} cue
   *        The cue to add to our internal list
   */addCue(e){let t=e;if(!("getCueAsHTML"in t)){t=new lI.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let n=0;n<i.length;n++)i[n]!==this&&i[n].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}
/**
   * Remove a cue from our internal list
   *
   * @param {TextTrack~Cue} removeCue
   *        The cue to remove from our internal list
   */removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}jw.prototype.allowedEvents_={cuechange:"cuechange"};class Jw extends Pw{
/**
   * Create an instance of this class.
   *
   * @param {Object} [options={}]
   *        Object of option names and values
   *
   * @param {AudioTrack~Kind} [options.kind='']
   *        A valid audio track kind
   *
   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]
   *        A unique id for this AudioTrack.
   *
   * @param {string} [options.label='']
   *        The menu label for this track.
   *
   * @param {string} [options.language='']
   *        A valid two character language code.
   *
   * @param {boolean} [options.enabled]
   *        If this track is the one that is currently playing. If this track is part of
   *        an {@link AudioTrackList}, only one {@link AudioTrack} will be enabled.
   */
constructor(e={}){const t=pb(e,{kind:Lw[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"enabled",{get:()=>i,set(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class zw extends Pw{
/**
   * Create an instance of this class.
   *
   * @param {Object} [options={}]
   *        Object of option names and values
   *
   * @param {string} [options.kind='']
   *        A valid {@link VideoTrack~Kind}
   *
   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]
   *        A unique id for this AudioTrack.
   *
   * @param {string} [options.label='']
   *        The menu label for this track.
   *
   * @param {string} [options.language='']
   *        A valid two character language code.
   *
   * @param {boolean} [options.selected]
   *        If this track is the one that is currently playing.
   */
constructor(e={}){const t=pb(e,{kind:Nw[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"selected",{get:()=>i,set(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class Xw extends JE{
/**
   * Create an instance of this class.
   *
   * @param {Object} options={}
   *        Object of option names and values
   *
   * @param {Tech} options.tech
   *        A reference to the tech that owns this HTMLTrackElement.
   *
   * @param {TextTrack~Kind} [options.kind='subtitles']
   *        A valid text track kind.
   *
   * @param {TextTrack~Mode} [options.mode='disabled']
   *        A valid text track mode.
   *
   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]
   *        A unique id for this TextTrack.
   *
   * @param {string} [options.label='']
   *        The menu label for this track.
   *
   * @param {string} [options.language='']
   *        A valid two character language code.
   *
   * @param {string} [options.srclang='']
   *        A valid two character language code. An alternative, but deprioritized
   *        version of `options.language`
   *
   * @param {string} [options.src]
   *        A url to TextTrack cues.
   *
   * @param {boolean} [options.default]
   *        If this track should default to on or off.
   */
constructor(e={}){let t;super();const i=new jw(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{
/**
       * @memberof HTMLTrackElement
       * @member {HTMLTrackElement~ReadyState} readyState
       *         The current ready state of the track element.
       * @instance
       */
readyState:{get:()=>t},
/**
       * @memberof HTMLTrackElement
       * @member {TextTrack} track
       *         The underlying TextTrack object.
       * @instance
       *
       */
track:{get:()=>i}}),t=Xw.NONE,i.addEventListener("loadeddata",(()=>{t=Xw.LOADED,this.trigger({type:"load",target:this})}))}}Xw.prototype.allowedEvents_={load:"load"},Xw.NONE=0,Xw.LOADING=1,Xw.LOADED=2,Xw.ERROR=3;const $w={audio:{ListClass:class extends Dw{
/**
   * Create an instance of this class.
   *
   * @param {AudioTrack[]} [tracks=[]]
   *        A list of `AudioTrack` to instantiate the list with.
   */
constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Fw(e,e[t]);break}super(e),this.changing_=!1}
/**
   * Add an {@link AudioTrack} to the `AudioTrackList`.
   *
   * @param {AudioTrack} track
   *        The AudioTrack to add to the list
   *
   * @fires TrackList#addtrack
   */addTrack(e){e.enabled&&Fw(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Fw(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}},TrackClass:Jw,capitalName:"Audio"},video:{ListClass:class extends Dw{
/**
   * Create an instance of this class.
   *
   * @param {VideoTrack[]} [tracks=[]]
   *        A list of `VideoTrack` to instantiate the list with.
   */
constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Tw(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}
/**
   * Add a {@link VideoTrack} to the `VideoTrackList`.
   *
   * @param {VideoTrack} track
   *        The VideoTrack to add to the list
   *
   * @fires TrackList#addtrack
   */addTrack(e){e.selected&&Tw(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Tw(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}},TrackClass:zw,capitalName:"Video"},text:{ListClass:Mw,TrackClass:jw,capitalName:"Text"}};Object.keys($w).forEach((function(e){$w[e].getterName=`${e}Tracks`,$w[e].privateName=`${e}Tracks_`}));const Zw={remoteText:{ListClass:Mw,TrackClass:jw,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:class{
/**
   * Create an instance of this class.
   *
   * @param {HtmlTrackElement[]} [tracks=[]]
   *        A list of `HtmlTrackElement` to instantiate the list with.
   */
constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}
/**
   * Add an {@link HtmlTrackElement} to the `HtmlTrackElementList`
   *
   * @param {HtmlTrackElement} trackElement
   *        The track element to add to the list.
   *
   * @private
   */addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}
/**
   * Get an {@link HtmlTrackElement} from the `HtmlTrackElementList` given an
   * {@link TextTrack}.
   *
   * @param {TextTrack} track
   *        The track associated with a track element.
   *
   * @return {HtmlTrackElement|undefined}
   *         The track element that was found or undefined.
   *
   * @private
   */getTrackElementByTrack_(e){let t;for(let i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}
/**
   * Remove a {@link HtmlTrackElement} from the `HtmlTrackElementList`
   *
   * @param {HtmlTrackElement} trackElement
   *        The track element to remove from the list.
   *
   * @private
   */removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}},TrackClass:Xw,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},eQ=Object.assign({},$w,Zw);Zw.names=Object.keys(Zw),$w.names=Object.keys($w),eQ.names=[].concat(Zw.names).concat($w.names);class tQ extends hw{
/**
  * Create an instance of this Tech.
  *
  * @param {Object} [options]
  *        The key/value store of player options.
  *
  * @param {Function} [ready]
  *        Callback function to call when the `HTML5` Tech is ready.
  */
constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",(function(){this.hasStarted_=!0})),this.on("loadstart",(function(){this.hasStarted_=!1})),eQ.names.forEach((t=>{const i=eQ[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new eQ.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}
/**
   * A special function to trigger source set in a way that will allow player
   * to re-trigger if the player or tech are not ready yet.
   *
   * @fires Tech#sourceset
   * @param {string} src The source string at the time of the source changing.
   */triggerSourceset(e){this.isReady_||this.one("ready",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:"sourceset"})}
/* Fallbacks for unsupported event types
  ================================================================================ */
/**
   * Polyfill the `progress` event for browsers that don't support it natively.
   *
   * @see {@link Tech#trackProgress}
   */manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}
/**
   * Turn off the polyfill for `progress` events that was created in
   * {@link Tech#manualProgressOn}
   */manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}
/**
   * This is used to trigger a `progress` event when the buffered percent changes. It
   * sets an interval function that will be called every 500 milliseconds to check if the
   * buffer end percent has changed.
   *
   * > This function is called by {@link Tech#manualProgressOn}
   *
   * @param {Event} event
   *        The `ready` event that caused this to run.
   *
   * @listens Tech#ready
   * @fires Tech#progress
   */trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(qE(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}
/**
   * Update our internal duration on a `durationchange` event by calling
   * {@link Tech#duration}.
   *
   * @param {Event} event
   *        The `durationchange` event that caused this to run.
   *
   * @listens Tech#durationchange
   */onDurationChange(e){this.duration_=this.duration()}
/**
   * Get and create a `TimeRange` object for buffering.
   *
   * @return {TimeRange}
   *         The time range object that was created.
   */buffered(){return pw(0,0)}
/**
   * Get the percentage of the current video that is currently buffered.
   *
   * @return {number}
   *         A number from 0 to 1 that represents the decimal percentage of the
   *         video that is buffered.
   *
   */bufferedPercent(){return yw(this.buffered(),this.duration_)}
/**
   * Turn off the polyfill for `progress` events that was created in
   * {@link Tech#manualProgressOn}
   * Stop manually tracking progress events by clearing the interval that was set in
   * {@link Tech#trackProgress}.
   */stopTrackingProgress(){this.clearInterval(this.progressInterval)}
/**
   * Polyfill the `timeupdate` event for browsers that don't support it.
   *
   * @see {@link Tech#trackCurrentTime}
   */manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}
/**
   * Turn off the polyfill for `timeupdate` events that was created in
   * {@link Tech#manualTimeUpdatesOn}
   */manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}
/**
   * Sets up an interval function to track current time and trigger `timeupdate` every
   * 250 milliseconds.
   *
   * @listens Tech#play
   * @triggers Tech#timeupdate
   */trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)}
/**
   * Stop the interval function created in {@link Tech#trackCurrentTime} so that the
   * `timeupdate` event is no longer triggered.
   *
   * @listens {Tech#pause}
   */stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}
/**
   * Turn off all event polyfills, clear the `Tech`s {@link AudioTrackList},
   * {@link VideoTrackList}, and {@link TextTrackList}, and dispose of this Tech.
   *
   * @fires Component#dispose
   */dispose(){this.clearTracks($w.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}
/**
   * Clear out a single `TrackList` or an array of `TrackLists` given their names.
   *
   * > Note: Techs without source handlers should call this between sources for `video`
   *         & `audio` tracks. You don't want to use them between tracks!
   *
   * @param {string[]|string} types
   *        TrackList names to clear, valid names are `video`, `audio`, and
   *        `text`.
   */clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const n=t[i];"text"===e&&this.removeRemoteTextTrack(n),t.removeTrack(n)}}))}
/**
   * Remove any TextTracks added via addRemoteTextTrack that are
   * flagged for automatic garbage collection
   */cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}
/**
   * Reset the tech, which will removes all sources and reset the internal readyState.
   *
   * @abstract
   */reset(){}
/**
   * Get the value of `crossOrigin` from the tech.
   *
   * @abstract
   *
   * @see {Html5#crossOrigin}
   */crossOrigin(){}
/**
   * Set the value of `crossOrigin` on the tech.
   *
   * @abstract
   *
   * @param {string} crossOrigin the crossOrigin value
   * @see {Html5#setCrossOrigin}
   */setCrossOrigin(){}
/**
   * Get or set an error on the Tech.
   *
   * @param {MediaError} [err]
   *        Error to set on the Tech
   *
   * @return {MediaError|null}
   *         The current error object on the tech, or null if there isn't one.
   */error(e){return void 0!==e&&(this.error_=new bw(e),this.trigger("error")),this.error_}
/**
   * Returns the `TimeRange`s that have been played through for the current source.
   *
   * > NOTE: This implementation is incomplete. It does not track the played `TimeRange`.
   *         It only checks whether the source has played at all or not.
   *
   * @return {TimeRange}
   *         - A single time range if this video has played
   *         - An empty set of ranges if not.
   */played(){return this.hasStarted_?pw(0,0):pw()}
/**
   * Start playback
   *
   * @abstract
   *
   * @see {Html5#play}
   */play(){}
/**
   * Set whether we are scrubbing or not
   *
   * @abstract
   * @param {boolean} _isScrubbing
   *                  - true for we are currently scrubbing
   *                  - false for we are no longer scrubbing
   *
   * @see {Html5#setScrubbing}
   */setScrubbing(e){}
/**
   * Get whether we are scrubbing or not
   *
   * @abstract
   *
   * @see {Html5#scrubbing}
   */scrubbing(){}
/**
   * Causes a manual time update to occur if {@link Tech#manualTimeUpdatesOn} was
   * previously called.
   *
   * @param {number} _seconds
   *        Set the current time of the media to this.
   * @fires Tech#timeupdate
   */setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}
/**
   * Turn on listeners for {@link VideoTrackList}, {@link {AudioTrackList}, and
   * {@link TextTrackList} events.
   *
   * This adds {@link EventTarget~EventListeners} for `addtrack`, and  `removetrack`.
   *
   * @fires Tech#audiotrackchange
   * @fires Tech#videotrackchange
   * @fires Tech#texttrackchange
   */initTrackListeners(){$w.names.forEach((e=>{const t=$w[e],i=()=>{this.trigger(`${e}trackchange`)},n=this[t.getterName]();n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),this.on("dispose",(()=>{n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)}))}))}
/**
   * Emulate TextTracks using vtt.js if necessary
   *
   * @fires Tech#vttjsloaded
   * @fires Tech#vttjserror
   */addWebVttScript_(){if(!lI.WebVTT)if(gI.body.contains(this.el())){if(!this.options_["vtt.js"]&&gb(vv)&&Object.keys(vv).length>0)return void this.trigger("vttjsloaded");const e=gI.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",(()=>{e.onload=null,e.onerror=null})),lI.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}
/**
   * Emulate texttracks
   *
   */emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),n=t=>e.removeTrack(t.track);t.on("addtrack",i),t.on("removetrack",n),this.addWebVttScript_();const s=()=>this.trigger("texttrackchange"),r=()=>{s();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener("cuechange",s),"showing"===i.mode&&i.addEventListener("cuechange",s)}};r(),e.addEventListener("change",r),e.addEventListener("addtrack",r),e.addEventListener("removetrack",r),this.on("dispose",(function(){t.off("addtrack",i),t.off("removetrack",n),e.removeEventListener("change",r),e.removeEventListener("addtrack",r),e.removeEventListener("removetrack",r);for(let t=0;t<e.length;t++){e[t].removeEventListener("cuechange",s)}}))}
/**
   * Create and returns a remote {@link TextTrack} object.
   *
   * @param {string} kind
   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)
   *
   * @param {string} [label]
   *        Label to identify the text track
   *
   * @param {string} [language]
   *        Two letter language abbreviation
   *
   * @return {TextTrack}
   *         The TextTrack that gets created.
   */addTextTrack(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,i,n,s={}){const r=e.textTracks();s.kind=t,i&&(s.label=i),n&&(s.language=n),s.tech=e;const a=new eQ.text.TrackClass(s);return r.addTrack(a),a}(this,e,t,i)}
/**
   * Create an emulated TextTrack for use by addRemoteTextTrack
   *
   * This is intended to be overridden by classes that inherit from
   * Tech in order to create native or custom TextTracks.
   *
   * @param {Object} options
   *        The object should contain the options to initialize the TextTrack with.
   *
   * @param {string} [options.kind]
   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).
   *
   * @param {string} [options.label].
   *        Label to identify the text track
   *
   * @param {string} [options.language]
   *        Two letter language abbreviation.
   *
   * @return {HTMLTrackElement}
   *         The track element that gets created.
   */createRemoteTextTrack(e){const t=pb(e,{tech:this});return new Zw.remoteTextEl.TrackClass(t)}
/**
   * Creates a remote text track object and returns an html track element.
   *
   * > Note: This can be an emulated {@link HTMLTrackElement} or a native one.
   *
   * @param {Object} options
   *        See {@link Tech#createRemoteTextTrack} for more detailed properties.
   *
   * @param {boolean} [manualCleanup=false]
   *        - When false: the TextTrack will be automatically removed from the video
   *          element whenever the source changes
   *        - When True: The TextTrack will have to be cleaned up manually
   *
   * @return {HTMLTrackElement}
   *         An Html Track Element.
   *
   */addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return"boolean"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}
/**
   * Remove a remote text track from the remote `TextTrackList`.
   *
   * @param {TextTrack} track
   *        `TextTrack` to remove from the `TextTrackList`
   */removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}
/**
   * Gets available media playback quality metrics as specified by the W3C's Media
   * Playback Quality API.
   *
   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}
   *
   * @return {Object}
   *         An object with supported media playback quality metrics
   *
   * @abstract
   */getVideoPlaybackQuality(){return{}}
/**
   * Attempt to create a floating video window always on top of other windows
   * so that users may continue consuming media while they interact with other
   * content sites, or applications on their device.
   *
   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}
   *
   * @return {Promise|undefined}
   *         A promise with a Picture-in-Picture window if the browser supports
   *         Promises (or one was passed in as an option). It returns undefined
   *         otherwise.
   *
   * @abstract
   */requestPictureInPicture(){return Promise.reject()}
/**
   * A method to check for the value of the 'disablePictureInPicture' <video> property.
   * Defaults to true, as it should be considered disabled if the tech does not support pip
   *
   * @abstract
   */disablePictureInPicture(){return!0}
/**
   * A method to set or unset the 'disablePictureInPicture' <video> property.
   *
   * @abstract
   */setDisablePictureInPicture(){}
/**
   * A fallback implementation of requestVideoFrameCallback using requestAnimationFrame
   *
   * @param {function} cb
   * @return {number} request id
   */requestVideoFrameCallback(e){const t=FE();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}
/**
   * A fallback implementation of cancelVideoFrameCallback
   *
   * @param {number} id id of callback to be cancelled
   */cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}
/**
   * A method to set a poster from a `Tech`.
   *
   * @abstract
   */setPoster(){}
/**
   * A method to check for the presence of the 'playsinline' <video> attribute.
   *
   * @abstract
   */playsinline(){}
/**
   * A method to set or unset the 'playsinline' <video> attribute.
   *
   * @abstract
   */setPlaysinline(){}
/**
   * Attempt to force override of native audio tracks.
   *
   * @param {boolean} override - If set to true native audio will be overridden,
   * otherwise native audio will potentially be used.
   *
   * @abstract
   */overrideNativeAudioTracks(e){}
/**
   * Attempt to force override of native video tracks.
   *
   * @param {boolean} override - If set to true native video will be overridden,
   * otherwise native video will potentially be used.
   *
   * @abstract
   */overrideNativeVideoTracks(e){}
/**
   * Check if the tech can support the given mime-type.
   *
   * The base tech does not support any type, but source handlers might
   * overwrite this.
   *
   * @param  {string} _type
   *         The mimetype to check for support
   *
   * @return {string}
   *         'probably', 'maybe', or empty string
   *
   * @see [Spec]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType}
   *
   * @abstract
   */canPlayType(e){return""}
/**
   * Check if the type is supported by this tech.
   *
   * The base tech does not support any type, but source handlers might
   * overwrite this.
   *
   * @param {string} _type
   *        The media type to check
   * @return {string} Returns the native video element's response
   */static canPlayType(e){return""}
/**
   * Check if the tech can support the given source
   *
   * @param {Object} srcObj
   *        The source object
   * @param {Object} options
   *        The options passed to the tech
   * @return {string} 'probably', 'maybe', or '' (empty string)
   */static canPlaySource(e,t){return tQ.canPlayType(e.type)}
/*
   * Return whether the argument is a Tech or not.
   * Can be passed either a Class like `Html5` or a instance like `player.tech_`
   *
   * @param {Object} component
   *        The item to check
   *
   * @return {boolean}
   *         Whether it is a tech or not
   *         - True if it is a tech
   *         - False if it is not
   */static isTech(e){return e.prototype instanceof tQ||e instanceof tQ||e===tQ}
/**
   * Registers a `Tech` into a shared list for videojs.
   *
   * @param {string} name
   *        Name of the `Tech` to register.
   *
   * @param {Object} tech
   *        The `Tech` class to register.
   */static registerTech(e,t){if(tQ.techs_||(tQ.techs_={}),!tQ.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!tQ.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!tQ.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Aw(e),tQ.techs_[e]=t,tQ.techs_[lw(e)]=t,"Tech"!==e&&tQ.defaultTechOrder_.push(e),t}
/**
   * Get a `Tech` from the shared list by name.
   *
   * @param {string} name
   *        `camelCase` or `TitleCase` name of the Tech to get
   *
   * @return {Tech|undefined}
   *         The `Tech` or undefined if there was no tech with the name requested.
   */static getTech(e){if(e)return tQ.techs_&&tQ.techs_[e]?tQ.techs_[e]:(e=Aw(e),lI&&lI.videojs&&lI.videojs[e]?(ob.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),lI.videojs[e]):void 0)}}eQ.names.forEach((function(e){const t=eQ[e];tQ.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),tQ.prototype.featuresVolumeControl=!0,tQ.prototype.featuresMuteControl=!0,tQ.prototype.featuresFullscreenResize=!1,tQ.prototype.featuresPlaybackRate=!1,tQ.prototype.featuresProgressEvents=!1,tQ.prototype.featuresSourceset=!1,tQ.prototype.featuresTimeupdateEvents=!1,tQ.prototype.featuresNativeTextTracks=!1,tQ.prototype.featuresVideoFrameCallback=!1,tQ.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let n=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let n;for(let e=0;e<i.length;e++)if(n=i[e].canPlayType(t),n)return n;return""},e.selectSourceHandler=function(t,i){const n=e.sourceHandlers||[];let s;for(let e=0;e<n.length;e++)if(s=n[e].canHandleSource(t,i),s)return n[e];return null},e.canPlaySource=function(t,i){const n=e.selectSourceHandler(t,i);return n?n.canHandleSource(t,i):""};["seekable","seeking","duration"].forEach((function(e){const t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:ob.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},hw.registerComponent("Tech",tQ),tQ.registerTech("Tech",tQ),tQ.defaultTechOrder_=[];const iQ={},nQ={},sQ={};function rQ(e,t,i){e.setTimeout((()=>uQ(t,iQ[t.type],i,e)),1)}function aQ(e,t,i,n=null){const s="call"+Aw(i),r=e.reduce(cQ(s),n),a=r===sQ,o=a?null:t[i](r);return function(e,t,i,n){for(let s=e.length-1;s>=0;s--){const r=e[s];r[t]&&r[t](n,i)}}(e,i,o,a),o}const oQ={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},lQ={setCurrentTime:1,setMuted:1,setVolume:1},AQ={play:1,pause:1};function cQ(e){return(t,i)=>t===sQ?sQ:i[e]?i[e](t):t}function uQ(e={},t=[],i,n,s=[],r=!1){const[a,...o]=t;if("string"==typeof a)uQ(e,iQ[a],i,n,s,r);else if(a){const t=function(e,t){const i=nQ[e.id()];let n=null;if(null==i)return n=t(e),nQ[e.id()]=[[t,n]],n;for(let s=0;s<i.length;s++){const[e,r]=i[s];e===t&&(n=r)}return null===n&&(n=t(e),i.push([t,n])),n}(n,a);if(!t.setSource)return s.push(t),uQ(e,o,i,n,s,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return uQ(e,o,i,n,s,r);s.push(t),uQ(l,e.type===l.type?o:iQ[l.type],i,n,s,r)}))}else o.length?uQ(e,o,i,n,s,r):r?i(e,s):uQ(e,iQ["*"],i,n,s,!0)}const hQ={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},dQ=function(e=""){const t=Kw(e);return hQ[t.toLowerCase()]||""},gQ=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=gQ(e),Array.isArray(e)?t=t.concat(e):db(e)&&t.push(e)})),e=t}else e="string"==typeof e&&e.trim()?[pQ({src:e})]:db(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[pQ(e)]:[];return e};function pQ(e){if(!e.type){const t=dQ(e.src);t&&(e.type=t)}return e}const fQ=Rb?10009:Nb?461:8,mQ={codes:{play:415,pause:19,ff:417,rw:412,back:fQ},names:{415:"play",19:"pause",417:"ff",412:"rw",[fQ]:"back"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class CQ extends JE{
/**
   * Constructs a SpatialNavigation instance with initial settings.
   * Sets up the player instance, and prepares the spatial navigation system.
   *
   * @class
   * @param {Player} player - The Video.js player instance to which the spatial navigation is attached.
   */
constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}
/**
   * Starts the spatial navigation by adding a keydown event listener to the video container.
   * This method ensures that the event listener is added only once.
   */start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on("modalclose",(()=>{this.refocusComponent()})),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}
/**
   * Stops the spatial navigation by removing the keydown event listener from the video container.
   * Also sets the `isListening_` flag to false.
   */stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}
/**
   * Responds to keydown events for spatial navigation and media control.
   *
   * Determines if spatial navigation or media control is active and handles key inputs accordingly.
   *
   * @param {KeyboardEvent} event - The keydown event to be handled.
   */onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if(mQ.isEventKey(t,"play")||mQ.isEventKey(t,"pause")||mQ.isEventKey(t,"ff")||mQ.isEventKey(t,"rw")){t.preventDefault();const e=mQ.getEventName(t);this.performMediaAction_(e)}else mQ.isEventKey(t,"Back")&&e.target&&"function"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}
/**
   * Performs media control actions based on the given key input.
   *
   * Controls the playback and seeking functionalities of the media player.
   *
   * @param {string} key - The key representing the media action to be performed.
   *   Accepted keys: 'play', 'pause', 'ff' (fast-forward), 'rw' (rewind).
   */performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+5);break;case"rw":this.userSeek_(this.player_.currentTime()-5)}}
/**
   * Prevent liveThreshold from causing seeks to seem like they
   * are not happening from a user perspective.
   *
   * @param {number} ct
   *        current time to seek to
   */userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}
/**
   * Pauses the spatial navigation functionality.
   * This method sets a flag that can be used to temporarily disable the navigation logic.
   */pause(){this.isPaused_=!0}
/**
   * Resumes the spatial navigation functionality if it has been paused.
   * This method resets the pause flag, re-enabling the navigation logic.
   */resume(){this.isPaused_=!1}
/**
   * Handles Player Blur.
   *
   * @param {string|Event|Object} event
   *        The name of the event, an `Event`, or an object with a key of type set to
   *        an event name.
   *
   * Calls for handling of the Player Blur if:
   * *The next focused element is not a child of current focused element &
   * The next focused element is not a child of the Player.
   * *There is no next focused element
   */handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const n=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(".video-js")),t.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(n&&"CloseButton"===n.name()?this.refocusComponent():(this.pause(),n&&n.el()&&(this.lastFocusedComponent_=n)))}
/**
   * Handles the Player focus event.
   *
   * Calls for handling of the Player Focus if current element is focusable.
   */handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}
/**
   * Gets a set of focusable components.
   *
   * @return {Array}
   *         Returns an array of focusable components.
   */updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const n of e)n.hasOwnProperty("el_")&&n.getIsFocusable()&&n.getIsAvailableToBeFocused(n.el())&&t.push(n),n.hasOwnProperty("children_")&&n.children_.length>0&&i(n.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty("el_")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty("children_")&&e.children_.length>0?i(e.children_):e.hasOwnProperty("items")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if("ErrorDisplay"===e.name_&&e.opened_){const i=e.el_.querySelector(".vjs-errors-ok-button-container");if(i){i.querySelectorAll("button").forEach(((e,i)=>{t.push({name:()=>"ModalButton"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},
// Asume that the following are always focusable
getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}}})),this.focusableComponents=t,this.focusableComponents}
/**
   * Finds a suitable child element within the provided component's DOM element.
   *
   * @param {Object} component - The component containing the DOM element to search within.
   * @return {HTMLElement|null} Returns the suitable child element if found, or null if not found.
   */findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const n=t(i.children[e]);if(n)return n}return null}(e.el()):null}
/**
   * Gets the currently focused component from the list of focusable components.
   * If a target element is provided, it uses that element to find the corresponding
   * component. If no target is provided, it defaults to using the document's currently
   * active element.
   *
   * @param {HTMLElement} [target] - The DOM element to check against the focusable components.
   *                                 If not provided, `document.activeElement` is used.
   * @return {Component|null} - Returns the focused component if found among the focusable components,
   *                            otherwise returns null if no matching component is found.
   */getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const i of this.focusableComponents)if(i.el()===t)return i}
/**
   * Adds a component to the array of focusable components.
   *
   * @param {Component} component
   *        The `Component` to be added.
   */add(e){const t=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}
/**
   * Removes component from the array of focusable components.
   *
   * @param {Component} component - The component to be removed from the focusable components array.
   */remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}
/**
   * Clears array of focusable components.
   */clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}
/**
   * Navigates to the next focusable component based on the specified direction.
   *
   * @param {string} direction 'up', 'down', 'left', 'right'
   */move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),n=this.focusableComponents.filter((n=>n!==t&&this.isInDirection_(i.boundingClientRect,n.getPositions().boundingClientRect,e))),s=this.findBestCandidate_(i.center,n,e);s?this.focus(s):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:t})}
/**
   * Finds the best candidate on the current center position,
   * the list of candidates, and the specified navigation direction.
   *
   * @param {Object} currentCenter The center position of the current focused component element.
   * @param {Array} candidates An array of candidate components to receive focus.
   * @param {string} direction The direction of navigation ('up', 'down', 'left', 'right').
   * @return {Object|null} The component that is the best candidate for receiving focus.
   */findBestCandidate_(e,t,i){let n=1/0,s=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<n&&(n=a,s=r)}return s}
/**
   * Determines if a target rectangle is in the specified navigation direction
   * relative to a source rectangle.
   *
   * @param {Object} srcRect The bounding rectangle of the source element.
   * @param {Object} targetRect The bounding rectangle of the target element.
   * @param {string} direction The navigation direction ('up', 'down', 'left', 'right').
   * @return {boolean} True if the target is in the specified direction relative to the source.
   */isInDirection_(e,t,i){switch(i){case"right":return t.left>=e.right;case"left":return t.right<=e.left;case"down":return t.top>=e.bottom;case"up":return t.bottom<=e.top;default:return!1}}
/**
   * Focus the last focused component saved before blur on player.
   */refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}
/**
   * Focuses on a given component.
   * If the component is available to be focused, it focuses on the component.
   * If not, it attempts to find a suitable DOM child within the component and focuses on it.
   *
   * @param {Component} component - The component to be focused.
   */focus(e){"object"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}
/**
   * Calculates the distance between two points, adjusting the calculation based on
   * the specified navigation direction.
   *
   * @param {Object} center1 The center point of the first element.
   * @param {Object} center2 The center point of the second element.
   * @param {string} direction The direction of navigation ('up', 'down', 'left', 'right').
   * @return {number} The calculated distance between the two centers.
   */calculateDistance_(e,t,i){const n=Math.abs(e.x-t.x),s=Math.abs(e.y-t.y);let r;switch(i){case"right":case"left":r=n+100*s;break;case"up":r=2*s+.5*n;break;case"down":r=5*s+n;break;default:r=n+s}return r}
/**
   * This gets called by 'handlePlayerBlur_' if 'spatialNavigation' is enabled.
   * Searches for the first 'TextTrackSelect' inside of modal to focus.
   *
   * @private
   */searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if("TextTrackSelect"===t.constructor.name){e.focus(t);break}}}hw.registerComponent("MediaLoader",class extends hw{
/**
   * Create an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should attach to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {Function} [ready]
   *        The function that is run when this component is ready.
   */
constructor(e,t,i){if(super(e,pb({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let n=0,s=t.playerOptions.techOrder;n<s.length;n++){const t=Aw(s[n]);let i=tQ.getTech(t);if(t||(i=hw.getComponent(t)),i&&i.isSupported()){e.loadTech_(t);break}}}});class IQ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param  {Player} player
   *         The `Player` that this class should be attached to.
   *
   * @param  {Object} [options]
   *         The key/value store of component options.
   *
   * @param  {function} [options.clickHandler]
   *         The function to call when the button is clicked / activated
   *
   * @param  {string} [options.controlText]
   *         The text to set on the button
   *
   * @param  {string} [options.className]
   *         A class or space separated list of classes to add the component
   *
   */
constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}
/**
   * Create the `ClickableComponent`s DOM element.
   *
   * @param {string} [tag=div]
   *        The element's node type.
   *
   * @param {Object} [props={}]
   *        An object of properties that should be set on the element.
   *
   * @param {Object} [attributes={}]
   *        An object of attributes that should be set on the element.
   *
   * @return {Element}
   *         The element that gets created.
   */createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&ob.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;const n=jb(e,t,i);return this.player_.options_.experimentalSvgIcons||n.appendChild(jb("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}dispose(){this.controlTextEl_=null,super.dispose()}
/**
   * Create a control text element on this `ClickableComponent`
   *
   * @param {Element} [el]
   *        Parent element for the control text.
   *
   * @return {Element}
   *         The control text element that gets created.
   */createControlTextEl(e){return this.controlTextEl_=jb("span",{className:"vjs-control-text"},{
// let the screen reader user know that the text of the element may change
"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}
/**
   * Get or set the localize text to use for the controls on the `ClickableComponent`.
   *
   * @param {string} [text]
   *        Control text for element.
   *
   * @param {Element} [el=this.el()]
   *        Element to set the title on.
   *
   * @return {string}
   *         - The control text when getting
   */controlText(e,t=this.el()){if(void 0===e)return this.controlText_||"Need Text";const i=this.localize(e);this.controlText_=e,Jb(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",i)}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}
/**
   * Enable this `ClickableComponent`
   */enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}
/**
   * Disable this `ClickableComponent`
   */disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}
/**
   * Handles language change in ClickableComponent for the player in components
   *
   *
   */handleLanguagechange(){this.controlText(this.controlText_)}
/**
   * Event handler that is called when a `ClickableComponent` receives a
   * `click` or `tap` event.
   *
   * @param {Event} event
   *        The `tap` or `click` event that caused this function to be called.
   *
   * @listens tap
   * @listens click
   * @abstract
   */handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}
/**
   * Event handler that is called when a `ClickableComponent` receives a
   * `keydown` event.
   *
   * By default, if the key is Space or Enter, it will trigger a `click` event.
   *
   * @param {KeyboardEvent} event
   *        The `keydown` event that caused this function to be called.
   *
   * @listens keydown
   */handleKeyDown(e){" "===e.key||"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}hw.registerComponent("ClickableComponent",IQ);class vQ extends IQ{
/**
   * Create an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should attach to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on("posterchange",this.update_)}
/**
   * Clean up and dispose of the `PosterImage`.
   */dispose(){this.player().off("posterchange",this.update_),super.dispose()}
/**
   * Create the `PosterImage`s DOM element.
   *
   * @return {Element}
   *         The element that gets created.
   */createEl(){return jb("div",{className:"vjs-poster"})}
/**
   * Get or set the `PosterImage`'s crossOrigin option.
   *
   * @param {string|null} [value]
   *        The value to set the crossOrigin to. If an argument is
   *        given, must be one of `'anonymous'` or `'use-credentials'`, or 'null'.
   *
   * @return {string|null}
   *         - The current crossOrigin value of the `Player` when getting.
   *         - undefined when setting
   */crossOrigin(e){if(void 0===e)return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||"anonymous"===e||"use-credentials"===e?this.$("img")&&(this.$("img").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  "anonymous" or "use-credentials", given "${e}"`)}
/**
   * An {@link EventTarget~EventListener} for {@link Player#posterchange} events.
   *
   * @listens Player#posterchange
   *
   * @param {Event} [event]
   *        The `Player#posterchange` event that triggered this function.
   */update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}
/**
   * Set the source of the `PosterImage` depending on the display method. (Re)creates
   * the inner picture and img elementss when needed.
   *
   * @param {string} [url]
   *        The URL to the source for the `PosterImage`. If not specified or falsy,
   *        any source and ant inner picture/img are removed.
   */setSrc(e){e?(this.$("img")||this.el_.appendChild(jb("picture",{className:"vjs-poster",
// Don't want poster to be tabbable.
tabIndex:-1},{},jb("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e):this.el_.textContent=""}
/**
   * An {@link EventTarget~EventListener} for clicks on the `PosterImage`. See
   * {@link ClickableComponent#handleClick} for instances where this will be triggered.
   *
   * @listens tap
   * @listens click
   * @listens keydown
   *
   * @param {Event} event
   +        The `click`, `tap` or `keydown` event that caused this function to be called.
   */handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?ww(this.player_.play()):this.player_.pause())}}vQ.prototype.crossorigin=vQ.prototype.crossOrigin,hw.registerComponent("PosterImage",vQ);const BQ="#222",yQ="#ccc",bQ={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function EQ(e,t){let i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function wQ(e,t,i){try{e.style[t]=i}catch(I2){return}}function QQ(e){return e?`${e}px`:""}hw.registerComponent("TextTrackDisplay",class extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {Function} [ready]
   *        The function to call when `TextTrackDisplay` is ready.
   */
constructor(e,t,i){super(e,t,i);const n=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on("loadstart",(e=>this.toggleDisplay(e))),e.on("texttrackchange",(e=>this.updateDisplay(e))),e.on("loadedmetadata",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(qE(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on("fullscreenchange",n),e.on("playerresize",n);const t=lI.screen.orientation||lI,i=lI.screen.orientation?"change":"orientationchange";t.addEventListener(i,n),e.on("dispose",(()=>t.removeEventListener(i,n)));const s=this.options_.playerOptions.tracks||[];for(let e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()})))}
/**
  * Preselect a track following this precedence:
  * - matches the previously selected {@link TextTrack}'s language and kind
  * - matches the previously selected {@link TextTrack}'s language only
  * - is the first default captions track
  * - is the first default descriptions track
  *
  * @listens Player#loadstart
  */preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let n,s,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,n=null,s=null):o.default&&("descriptions"!==o.kind||n?o.kind in e&&!s&&(s=o):n=o)}r?r.mode="showing":s?s.mode="showing":n&&(n.mode="showing")}
/**
   * Turn display of {@link TextTrack}'s from the current state into the other state.
   * There are only two states:
   * - 'shown'
   * - 'hidden'
   *
   * @listens Player#loadstart
   */toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}
/**
   * Create the {@link Component}'s DOM element.
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}
/**
   * Clear all displayed {@link TextTrack}s.
   */clearDisplay(){"function"==typeof lI.WebVTT&&lI.WebVTT.processCues(lI,[],this.el_)}
/**
   * Update the displayed TextTrack when a either a {@link Player#texttrackchange} or
   * a {@link Player#fullscreenchange} is fired.
   *
   * @listens Player#texttrackchange
   * @listens Player#fullscreenchange
   */updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const n=e[i];"showing"===n.mode&&t.push(n)}return void this.updateForTrack(t)}let i=null,n=null,s=e.length;for(;s--;){const t=e[s];"showing"===t.mode&&("descriptions"===t.kind?i=t:n=t)}if(n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i)),!lI.CSS.supports("inset","10px")){const e=this.el_,t=e.querySelectorAll(".vjs-text-track-cue"),i=this.player_.controlBar.el_.getBoundingClientRect().height,n=this.player_.el_.getBoundingClientRect().height;e.style="",wQ(e,"position","relative"),wQ(e,"height",n-i+"px"),wQ(e,"top","unset"),wQ(e,"bottom",Lb?n+"px":"0px"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(" ");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:"unset"})}}))}}
/**
   * Updates the displayed TextTrack to be sure it overlays the video when a either
   * a {@link Player#texttrackchange} or a {@link Player#fullscreenchange} is fired.
   */updateDisplayOverlay(){if(!this.player_.videoHeight()||!lI.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,n=this.player_.videoWidth()/this.player_.videoHeight();let s=0,r=0;Math.abs(i-n)>.1&&(i>n?s=Math.round((e-t*n)/2):r=Math.round((t-e/n)/2)),wQ(this.el_,"insetInline",QQ(s)),wQ(this.el_,"insetBlock",QQ(r))}
/**
   * Style {@Link TextTrack} activeCues according to {@Link TextTrackSettings}.
   *
   * @param {TextTrack} track
   *        Text track object containing active cues to style.
   */updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let n=i.length;for(;n--;){const e=i[n];if(!e)continue;const s=e.displayState;if(t.color&&(s.firstChild.style.color=t.color),t.textOpacity&&wQ(s.firstChild,"color",EQ(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(s.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&wQ(s.firstChild,"backgroundColor",EQ(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?wQ(s,"backgroundColor",EQ(t.windowColor,t.windowOpacity)):s.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?s.firstChild.style.textShadow=`2px 2px 3px ${BQ}, 2px 2px 4px ${BQ}, 2px 2px 5px ${BQ}`:"raised"===t.edgeStyle?s.firstChild.style.textShadow=`1px 1px ${BQ}, 2px 2px ${BQ}, 3px 3px ${BQ}`:"depressed"===t.edgeStyle?s.firstChild.style.textShadow=`1px 1px ${yQ}, 0 1px ${yQ}, -1px -1px ${BQ}, 0 -1px ${BQ}`:"uniform"===t.edgeStyle&&(s.firstChild.style.textShadow=`0 0 4px ${BQ}, 0 0 4px ${BQ}, 0 0 4px ${BQ}, 0 0 4px ${BQ}`)),t.fontPercent&&1!==t.fontPercent){const e=lI.parseFloat(s.style.fontSize);s.style.fontSize=e*t.fontPercent+"px",s.style.height="auto",s.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=bQ[t.fontFamily])}}
/**
   * Add an {@link TextTrack} to to the {@link Tech}s {@link TextTrackList}.
   *
   * @param {TextTrack|TextTrack[]} tracks
   *        Text track object or text track array to be added to the list.
   */updateForTrack(e){if(Array.isArray(e)||(e=[e]),"function"!=typeof lI.WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const n=e[i];for(let e=0;e<n.activeCues.length;++e)t.push(n.activeCues[e])}lI.WebVTT.processCues(lI,t,this.el_);for(let i=0;i<e.length;++i){const t=e[i];for(let e=0;e<t.activeCues.length;++e){const n=t.activeCues[e].displayState;$b(n,"vjs-text-track-cue","vjs-text-track-cue-"+(t.language?t.language:i)),t.language&&sE(n,"lang",t.language)}this.player_.textTrackSettings&&this.updateDisplayState(t)}}});hw.registerComponent("LoadingSpinner",class extends hw{
/**
   * Create the `LoadingSpinner`s DOM element.
   *
   * @return {Element}
   *         The dom element that gets created.
   */
createEl(){const e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),i=jb("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),n=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return n.appendChild(i),n}
/**
   * Update control text on languagechange
   */handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}});let _Q=class extends IQ{
/**
   * Create the `Button`s DOM element.
   *
   * @param {string} [tag="button"]
   *        The element's node type. This argument is IGNORED: no matter what
   *        is passed, it will always create a `button` element.
   *
   * @param {Object} [props={}]
   *        An object of properties that should be set on the element.
   *
   * @param {Object} [attributes={}]
   *        An object of attributes that should be set on the element.
   *
   * @return {Element}
   *         The element that gets created.
   */
createEl(e,t={},i={}){const n=jb("button",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({
// Necessary since the default button type is "submit"
type:"button"},i));return this.player_.options_.experimentalSvgIcons||n.appendChild(jb("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}
/**
   * Add a child `Component` inside of this `Button`.
   *
   * @param {string|Component} child
   *        The name or instance of a child to add.
   *
   * @param {Object} [options={}]
   *        The key/value store of options that will get passed to children of
   *        the child.
   *
   * @return {Component}
   *         The `Component` that gets added as a child. When using a string the
   *         `Component` will get created by this process.
   *
   * @deprecated since version 5
   */addChild(e,t={}){const i=this.constructor.name;return ob.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),hw.prototype.addChild.call(this,e,t)}
/**
   * Enable the `Button` element so that it can be activated or clicked. Use this with
   * {@link Button#disable}.
   */enable(){super.enable(),this.el_.removeAttribute("disabled")}
/**
   * Disable the `Button` element so that it cannot be activated or clicked. Use this with
   * {@link Button#enable}.
   */disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}
/**
   * This gets called when a `Button` has focus and `keydown` is triggered via a key
   * press.
   *
   * @param {KeyboardEvent} event
   *        The event that caused this function to get called.
   *
   * @listens keydown
   */handleKeyDown(e){" "!==e.key&&"Enter"!==e.key?super.handleKeyDown(e):e.stopPropagation()}};hw.registerComponent("Button",_Q);class SQ extends _Q{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",(e=>this.handleMouseDown(e)))}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object. Always returns 'vjs-big-play-button'.
   */buildCSSClass(){return"vjs-big-play-button"}
/**
   * This gets called when a `BigPlayButton` "clicked". See {@link ClickableComponent}
   * for more detailed information on what a click can be.
   *
   * @param {KeyboardEvent|MouseEvent|TouchEvent} event
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){const t=this.player_.play();if(this.mouseused_&&"clientX"in e&&"clientY"in e)return ww(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(!n)return void this.player_.tech(!0).focus();const s=()=>n.focus();Ew(t)?t.then(s,(()=>{})):this.setTimeout(s,1)}
/**
   * Event handler that is called when a `BigPlayButton` receives a
   * `keydown` event.
   *
   * @param {KeyboardEvent} event
   *        The `keydown` event that caused this function to be called.
   *
   * @listens keydown
   */handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}
/**
   * Handle `mousedown` events on the `BigPlayButton`.
   *
   * @param {MouseEvent} event
   *        `mousedown` or `touchstart` event that triggered this function
   *
   * @listens mousedown
   */handleMouseDown(e){this.mouseused_=!0}}SQ.prototype.controlText_="Play Video",hw.registerComponent("BigPlayButton",SQ);hw.registerComponent("CloseButton",class extends _Q{
/**
  * Creates an instance of the this class.
  *
  * @param  {Player} player
  *         The `Player` that this class should be attached to.
  *
  * @param  {Object} [options]
  *         The key/value store of player options.
  */
constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}
/**
  * Builds the default DOM `className`.
  *
  * @return {string}
  *         The DOM `className` for this object.
  */buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}
/**
   * This gets called when a `CloseButton` gets clicked. See
   * {@link ClickableComponent#handleClick} for more information on when
   * this will be triggered
   *
   * @param {Event} event
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   * @fires CloseButton#close
   */handleClick(e){this.trigger({type:"close",bubbles:!1})}
/**
   * Event handler that is called when a `CloseButton` receives a
   * `keydown` event.
   *
   * By default, if the key is Esc, it will trigger a `click` event.
   *
   * @param {KeyboardEvent} event
   *        The `keydown` event that caused this function to be called.
   *
   * @listens keydown
   */handleKeyDown(e){"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}});class xQ extends _Q{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options={}]
   *        The key/value store of player options.
   */
constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon("play"),this.on(e,"play",(e=>this.handlePlay(e))),this.on(e,"pause",(e=>this.handlePause(e))),t.replay&&this.on(e,"ended",(e=>this.handleEnded(e)))}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}
/**
   * This gets called when an `PlayToggle` is "clicked". See
   * {@link ClickableComponent} for more detailed information on what a click can be.
   *
   * @param {Event} [event]
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){this.player_.paused()?ww(this.player_.play()):this.player_.pause()}
/**
   * This gets called once after the video has ended and the user seeks so that
   * we can change the replay button back to a play button.
   *
   * @param {Event} [event]
   *        The event that caused this function to run.
   *
   * @listens Player#seeked
   */handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}
/**
   * Add the vjs-playing class to the element so it can change appearance.
   *
   * @param {Event} [event]
   *        The event that caused this function to run.
   *
   * @listens Player#play
   */handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}
/**
   * Add the vjs-paused class to the element so it can change appearance.
   *
   * @param {Event} [event]
   *        The event that caused this function to run.
   *
   * @listens Player#pause
   */handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}
/**
   * Add the vjs-ended class to the element so it can change appearance
   *
   * @param {Event} [event]
   *        The event that caused this function to run.
   *
   * @listens Player#ended
   */handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",(e=>this.handleSeeked(e)))}}xQ.prototype.controlText_="Play",hw.registerComponent("PlayToggle",xQ);class kQ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.on(e,["timeupdate","ended","seeking"],(e=>this.update(e))),this.updateTextNode_()}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),i=jb("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return t.appendChild(i),this.contentEl_=jb("span",{className:`${e}-display`},{
// span elements have no implicit role, but some screen readers (notably VoiceOver)
// treat them as a break between items in the DOM when using arrow keys
// (or left-to-right swipes on iOS) to read contents of a page. Using
// role='presentation' causes VoiceOver to NOT treat this span as a break.
role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}
/**
   * Updates the displayed time according to the `updateContent` function which is defined in the child class.
   *
   * @param {Event} [event]
   *          The `timeupdate`, `ended` or `seeking` (if enableSmoothSeeking is true) event that caused this function to be called.
   */update(e){(this.player_.options_.enableSmoothSeeking||"seeking"!==e.type)&&this.updateContent(e)}
/**
   * Updates the time display text node with a new time
   *
   * @param {number} [time=0] the time to update to
   *
   * @private
   */updateTextNode_(e=0){e=vw(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,ob.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=gI.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}
/**
   * To be filled out in the child class, should update the displayed time
   * in accordance with the fact that the current time has changed.
   *
   * @param {Event} [event]
   *        The `timeupdate`  event that caused this to run.
   *
   * @listens Player#timeupdate
   */updateContent(e){}}kQ.prototype.labelText_="Time",kQ.prototype.controlText_="Time",hw.registerComponent("TimeDisplay",kQ);class DQ extends kQ{
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */
buildCSSClass(){return"vjs-current-time"}
/**
   * Update current time display
   *
   * @param {Event} [event]
   *        The `timeupdate` event that caused this function to run.
   *
   * @listens Player#timeupdate
   */updateContent(e){let t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}DQ.prototype.labelText_="Current Time",DQ.prototype.controlText_="Current Time",hw.registerComponent("CurrentTimeDisplay",DQ);class FQ extends kQ{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,"durationchange",i),this.on(e,"loadstart",i),this.on(e,"loadedmetadata",i)}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return"vjs-duration"}
/**
   * Update duration time display.
   *
   * @param {Event} [event]
   *        The `durationchange`, `timeupdate`, or `loadedmetadata` event that caused
   *        this function to be called.
   *
   * @listens Player#durationchange
   * @listens Player#timeupdate
   * @listens Player#loadedmetadata
   */updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}FQ.prototype.labelText_="Duration",FQ.prototype.controlText_="Duration",hw.registerComponent("DurationDisplay",FQ);hw.registerComponent("TimeDivider",class extends hw{
/**
   * Create the component's DOM element
   *
   * @return {Element}
   *         The element that was created.
   */
createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{
// this element and its contents can be hidden from assistive techs since
// it is made extraneous by the announcement of the control text
// for the current time and duration displays
"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}});class TQ extends kQ{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.on(e,"durationchange",(e=>this.updateContent(e)))}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return"vjs-remaining-time"}
/**
   * Create the `Component`'s DOM element with the "minus" character prepend to the time
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(jb("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}
/**
   * Update remaining time display.
   *
   * @param {Event} [event]
   *        The `timeupdate` or `durationchange` event that caused this to run.
   *
   * @listens Player#timeupdate
   * @listens Player#durationchange
   */updateContent(e){if("number"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}TQ.prototype.labelText_="Remaining Time",TQ.prototype.controlText_="Remaining Time",hw.registerComponent("RemainingTimeDisplay",TQ);hw.registerComponent("LiveDisplay",class extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",(e=>this.updateShowing(e)))}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=jb("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(jb("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(gI.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}
/**
   * Check the duration to see if the LiveDisplay should be showing or not. Then show/hide
   * it accordingly
   *
   * @param {Event} [event]
   *        The {@link Player#durationchange} event that caused this function to run.
   *
   * @listens Player#durationchange
   */updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class MQ extends _Q{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=jb("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}
/**
   * Update the state of this button if we are at the live edge
   * or not
   */updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}
/**
   * On click bring us as near to the live point as possible.
   * This requires that we wait for the next `live-seekable-change`
   * event which will happen every segment length seconds.
   */handleClick(){this.player_.liveTracker.seekToLiveEdge()}
/**
   * Dispose of the element and stop tracking
   */dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function RQ(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}MQ.prototype.controlText_="Seek to live, currently playing live",hw.registerComponent("SeekToLive",MQ);var NQ=Object.freeze({__proto__:null,clamp:RQ});let LQ=class extends hw{
/**
  * Create an instance of this class
  *
  * @param {Player} player
  *        The `Player` that this class should be attached to.
  *
  * @param {Object} [options]
  *        The key/value store of player options.
  */
constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}
/**
   * Are controls are currently enabled for this slider or not.
   *
   * @return {boolean}
   *         true if controls are enabled, false otherwise
   */enabled(){return this.enabled_}
/**
   * Enable controls for this slider if they are disabled
   */enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}
/**
   * Disable controls for this slider if they are enabled
   */disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}
/**
   * Create the `Slider`s DOM element.
   *
   * @param {string} type
   *        Type of element to create.
   *
   * @param {Object} [props={}]
   *        List of properties in Object form.
   *
   * @param {Object} [attributes={}]
   *        list of attributes in Object form.
   *
   * @return {Element}
   *         The element that gets created.
   */createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}
/**
   * Handle `mousedown` or `touchstart` events on the `Slider`.
   *
   * @param {MouseEvent} event
   *        `mousedown` or `touchstart` event that triggered this function
   *
   * @listens mousedown
   * @listens touchstart
   * @fires Slider#slideractive
   */handleMouseDown(e){const t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Qb||e.preventDefault(),aE(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}
/**
   * Handle the `mousemove`, `touchmove`, and `mousedown` events on this `Slider`.
   * The `mousemove` and `touchmove` events will only only trigger this function during
   * `mousedown` and `touchstart`. This is due to {@link Slider#handleMouseDown} and
   * {@link Slider#handleMouseUp}.
   *
   * @param {MouseEvent} event
   *        `mousedown`, `mousemove`, `touchstart`, or `touchmove` event that triggered
   *        this function
   * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false.
   *
   * @listens mousemove
   * @listens touchmove
   */handleMouseMove(e){}
/**
   * Handle `mouseup` or `touchend` events on the `Slider`.
   *
   * @param {MouseEvent} event
   *        `mouseup` or `touchend` event that triggered this function.
   *
   * @listens touchend
   * @listens mouseup
   * @fires Slider#sliderinactive
   */handleMouseUp(e){const t=this.bar.el_.ownerDocument;oE(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}
/**
   * Update the progress bar of the `Slider`.
   *
   * @return {number}
   *          The percentage of progress the progress bar represents as a
   *          number from 0 to 1.
   */update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",(()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(100*e).toFixed(2)+"%"}))),e}
/**
   * Get the percentage of the bar that should be filled
   * but clamped and rounded.
   *
   * @return {number}
   *         percentage filled that the slider is
   */getProgress(){return Number(RQ(this.getPercent(),0,1).toFixed(4))}
/**
   * Calculate distance for slider
   *
   * @param {Event} event
   *        The event that caused this function to run.
   *
   * @return {number}
   *         The current position of the Slider.
   *         - position.x for vertical `Slider`s
   *         - position.y for horizontal `Slider`s
   */calculateDistance(e){const t=cE(this.el_,e);return this.vertical()?t.y:t.x}
/**
   * Handle a `keydown` event on the `Slider`. Watches for left, right, up, and down
   * arrow keys. This function will only be called when the slider has focus. See
   * {@link Slider#handleFocus} and {@link Slider#handleBlur}.
   *
   * @param {KeyboardEvent} event
   *        the `keydown` event that caused this function to run.
   *
   * @listens keydown
   */handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,n=t&&t.horizontalSeek;i?n&&"ArrowLeft"===e.key||!n&&"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):n&&"ArrowRight"===e.key||!n&&"ArrowUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e):"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):"ArrowUp"===e.key||"ArrowRight"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}
/**
   * Listener for click events on slider, used to prevent clicks
   *   from bubbling up to parent elements like button menus.
   *
   * @param {Object} event
   *        Event that caused this object to run
   */handleClick(e){e.stopPropagation(),e.preventDefault()}
/**
   * Get/set if slider is horizontal for vertical
   *
   * @param {boolean} [bool]
   *        - true if slider is vertical,
   *        - false is horizontal
   *
   * @return {boolean}
   *         - true if slider is vertical, and getting
   *         - false if the slider is horizontal, and getting
   */vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}};hw.registerComponent("Slider",LQ);const UQ=(e,t)=>RQ(e/t*100,0,100).toFixed(2)+"%";hw.registerComponent("LoadProgressBar",class extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",(e=>this.update(e)))}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=jb("span",{className:"vjs-control-text"}),i=jb("span",{textContent:this.localize("Loaded")}),n=gI.createTextNode(": ");return this.percentageEl_=jb("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(n),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}
/**
   * Update progress bar
   *
   * @param {Event} [event]
   *        The `progress` event that caused this function to run.
   *
   * @listens Player#progress
   */update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),n=this.player_.bufferedEnd(),s=this.partEls_,r=UQ(n,i);this.percent_!==r&&(this.el_.style.width=r,Jb(this.percentageEl_,r),this.percent_=r);for(let a=0;a<t.length;a++){const e=t.start(a),i=t.end(a);let r=s[a];r||(r=this.el_.appendChild(jb()),s[a]=r),r.dataset.start===e&&r.dataset.end===i||(r.dataset.start=e,r.dataset.end=i,r.style.left=UQ(e,n),r.style.width=UQ(i-e,n))}for(let a=s.length;a>t.length;a--)this.el_.removeChild(s[a-1]);s.length=t.length}))}});hw.registerComponent("TimeTooltip",class extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The {@link Player} that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.update=YE(qE(this,this.update),KE)}
/**
   * Create the time tooltip DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}
/**
   * Updates the position of the time tooltip relative to the `SeekBar`.
   *
   * @param {Object} seekBarRect
   *        The `ClientRect` for the {@link SeekBar} element.
   *
   * @param {number} seekBarPoint
   *        A number from 0 to 1, representing a horizontal reference point
   *        from the left edge of the {@link SeekBar}
   */update(e,t,i){const n=AE(this.el_),s=lE(this.player_.el()),r=e.width*t;if(!s||!n)return;let a=e.left-s.left+r,o=e.width-r+(s.right-e.right);o||(o=e.width-r,a=r);let l=n.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>n.width&&(l=n.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}
/**
   * Write the time to the tooltip DOM element.
   *
   * @param {string} content
   *        The formatted time for the tooltip.
   */write(e){Jb(this.el_,e)}
/**
   * Updates the position of the time tooltip relative to the `SeekBar`.
   *
   * @param {Object} seekBarRect
   *        The `ClientRect` for the {@link SeekBar} element.
   *
   * @param {number} seekBarPoint
   *        A number from 0 to 1, representing a horizontal reference point
   *        from the left edge of the {@link SeekBar}
   *
   * @param {number} time
   *        The time to update the tooltip to, not used during live playback
   *
   * @param {Function} cb
   *        A function that will be called during the request animation frame
   *        for tooltips that need to do additional animations from the default
   */updateTime(e,t,i,n){this.requestNamedAnimationFrame("TimeTooltip#updateTime",(()=>{let s;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;s=(i<1?"":"-")+vw(i,e)}else s=vw(i,r);this.update(e,t,s),n&&n()}))}});class HQ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The {@link Player} that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.setIcon("circle"),this.update=YE(qE(this,this.update),KE)}
/**
   * Create the the DOM element for this class.
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}
/**
   * Enqueues updates to its own DOM as well as the DOM of its
   * {@link TimeTooltip} child.
   *
   * @param {Object} seekBarRect
   *        The `ClientRect` for the {@link SeekBar} element.
   *
   * @param {number} seekBarPoint
   *        A number from 0 to 1, representing a horizontal reference point
   *        from the left edge of the {@link SeekBar}
   */update(e,t){const i=this.getChild("timeTooltip");if(!i)return;const n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,n)}}HQ.prototype.options_={children:[]},Pb||yb||HQ.prototype.options_.children.push("timeTooltip"),hw.registerComponent("PlayProgressBar",HQ);class PQ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The {@link Player} that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.update=YE(qE(this,this.update),KE)}
/**
   * Create the DOM element for this class.
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}
/**
   * Enqueues updates to its own DOM as well as the DOM of its
   * {@link TimeTooltip} child.
   *
   * @param {Object} seekBarRect
   *        The `ClientRect` for the {@link SeekBar} element.
   *
   * @param {number} seekBarPoint
   *        A number from 0 to 1, representing a horizontal reference point
   *        from the left edge of the {@link SeekBar}
   */update(e,t){const i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+"px"}))}}PQ.prototype.options_={children:["timeTooltip"]},hw.registerComponent("MouseTimeDisplay",PQ);class OQ extends LQ{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){(t=pb(OQ.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(Pb||yb);(!Pb&&!yb||i)&&t.children.splice(1,0,"mouseTimeDisplay"),super(e,t),this.shouldDisableSeekWhileScrubbingOnMobile_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}
/**
   * Sets the event handlers
   *
   * @private
   */setEventHandlers_(){this.update_=qE(this,this.update),this.update=YE(this.update_,KE),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in gI&&"visibilityState"in gI&&this.on(gI,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){"hidden"===gI.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,KE))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}
/**
   * This function updates the play progress bar and accessibility
   * attributes to whatever is passed in.
   *
   * @param {Event} [event]
   *        The `timeupdate` or `ended` event that caused this to run.
   *
   * @listens Player#timeupdate
   *
   * @return {number}
   *          The current percent at a number from 0-1
   */update(e){if("hidden"===gI.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",(()=>{const e=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),i=this.player_.liveTracker;let n=this.player_.duration();i&&i.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===e&&this.duration_===n||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[vw(e,n),vw(n,n)],"{1} of {2}")),this.currentTime_=e,this.duration_=n),this.bar&&this.bar.update(lE(this.el()),this.getProgress())})),t}
/**
   * Prevent liveThreshold from causing seeks to seem like they
   * are not happening from a user perspective.
   *
   * @param {number} ct
   *        current time to seek to
   */userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}
/**
   * Get the value of current time but allows for smooth scrubbing,
   * when player can't keep up.
   *
   * @return {number}
   *         The current time value to display
   *
   * @private
   */getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}
/**
   * Get the percentage of media played so far.
   *
   * @return {number}
   *         The percentage of media played so far (0 to 1).
   */getPercent(){if(this.pendingSeekTime_)return this.pendingSeekTime_/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}
/**
   * Handle mouse down on seek bar
   *
   * @param {MouseEvent} event
   *        The `mousedown` event that caused this to run.
   *
   * @listens mousedown
   */handleMouseDown(e){fE(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbingOnMobile_||this.player_.pause(),super.handleMouseDown(e))}
/**
   * Handle mouse move on seek bar
   *
   * @param {MouseEvent} event
   *        The `mousemove` event that caused this to run.
   * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false
   *
   * @listens mousemove
   */handleMouseMove(e,t=!1){if(!fE(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const n=this.calculateDistance(e),s=this.player_.liveTracker;if(s&&s.isLive()){if(n>=.99)return void s.seekToLiveEdge();const e=s.seekableStart(),t=s.liveCurrentTime();if(i=e+n*s.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=n*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbingOnMobile_?this.pendingSeekTime_=i:this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}
/**
   * Handle mouse up on seek bar
   *
   * @param {MouseEvent} event
   *        The `mouseup` event that caused this to run.
   *
   * @listens mouseup
   */handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime_&&(this.userSeek_(this.pendingSeekTime_),this.pendingSeekTime_=null),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?ww(this.player_.play()):this.update_()}
/**
   * Move more quickly fast forward for keyboard-only users
   */stepForward(){this.userSeek_(this.player_.currentTime()+5)}
/**
   * Move more quickly rewind for keyboard-only users
   */stepBack(){this.userSeek_(this.player_.currentTime()-5)}
/**
   * Toggles the playback state of the player
   * This gets called when enter or space is used on the seekbar
   *
   * @param {KeyboardEvent} event
   *        The `keydown` event that caused this function to be called
   *
   */handleAction(e){this.player_.paused()?this.player_.play():this.player_.pause()}
/**
   * Called when this SeekBar has focus and a key gets pressed down.
   * Supports the following keys:
   *
   *   Space or Enter key fire a click event
   *   Home key moves to start of the timeline
   *   End key moves to end of the timeline
   *   Digit "0" through "9" keys move to 0%, 10% ... 80%, 90% of the timeline
   *   PageDown key moves back a larger step than ArrowDown
   *   PageUp key moves forward a large step
   *
   * @param {KeyboardEvent} event
   *        The `keydown` event that caused this function to be called.
   *
   * @listens keydown
   */handleKeyDown(e){const t=this.player_.liveTracker;if(" "===e.key||"Enter"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if("Home"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if("End"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else"PageDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):"PageUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in gI&&"visibilityState"in gI&&this.off(gI,"visibilitychange",this.toggleVisibility_),super.dispose()}}OQ.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},hw.registerComponent("SeekBar",OQ);class GQ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.handleMouseMove=YE(qE(this,this.handleMouseMove),KE),this.throttledHandleMouseSeek=YE(qE(this,this.handleMouseSeek),KE),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}
/**
   * When the mouse moves over the `ProgressControl`, the pointer position
   * gets passed down to the `MouseTimeDisplay` component.
   *
   * @param {Event} event
   *        The `mousemove` event that caused this function to run.
   *
   * @listen mousemove
   */handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const i=t.getChild("playProgressBar"),n=t.getChild("mouseTimeDisplay");if(!i&&!n)return;const s=t.el(),r=AE(s);let a=cE(s,e).x;a=RQ(a,0,1),n&&n.update(r,a),i&&i.update(r,t.getProgress())}
/**
   * A throttled version of the {@link ProgressControl#handleMouseSeek} listener.
   *
   * @method ProgressControl#throttledHandleMouseSeek
   * @param {Event} event
   *        The `mousemove` event that caused this function to run.
   *
   * @listen mousemove
   * @listen touchmove
   */
/**
   * Handle `mousemove` or `touchmove` events on the `ProgressControl`.
   *
   * @param {Event} event
   *        `mousedown` or `touchstart` event that triggered this function
   *
   * @listens mousemove
   * @listens touchmove
   */handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}
/**
   * Are controls are currently enabled for this progress control.
   *
   * @return {boolean}
   *         true if controls are enabled, false otherwise
   */enabled(){return this.enabled_}
/**
   * Disable all controls on the progress control and its children
   */disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&ww(this.player_.play())}}
/**
   * Enable all controls on the progress control and its children
   */enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}
/**
   * Cleanup listeners after the user finishes interacting with the progress controls
   */removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}
/**
   * Handle `mousedown` or `touchstart` events on the `ProgressControl`.
   *
   * @param {Event} event
   *        `mousedown` or `touchstart` event that triggered this function
   *
   * @listens mousedown
   * @listens touchstart
   */handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}
/**
   * Handle `mouseup` or `touchend` events on the `ProgressControl`.
   *
   * @param {Event} event
   *        `mouseup` or `touchend` event that triggered this function.
   *
   * @listens touchend
   * @listens mouseup
   */handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}GQ.prototype.options_={children:["seekBar"]},hw.registerComponent("ProgressControl",GQ);class KQ extends _Q{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @listens Player#enterpictureinpicture
   * @listens Player#leavepictureinpicture
   */
constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],(e=>this.handlePictureInPictureChange(e))),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}
/**
   * Displays or hides the button depending on the audio mode detection.
   * Exits picture-in-picture if it is enabled when switching to audio mode.
   */handlePictureInPictureAudioModeChange(){"audio"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}
/**
   * Enables or disables button based on availability of a Picture-In-Picture mode.
   *
   * Enabled if
   * - `player.options().enableDocumentPictureInPicture` is true and
   *   window.documentPictureInPicture is available; or
   * - `player.disablePictureInPicture()` is false and
   *   element.requestPictureInPicture is available
   */handlePictureInPictureEnabledChange(){gI.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in lI?this.enable():this.disable()}
/**
   * Handles enterpictureinpicture and leavepictureinpicture on the player and change control text accordingly.
   *
   * @param {Event} [event]
   *        The {@link Player#enterpictureinpicture} or {@link Player#leavepictureinpicture} event that caused this function to be
   *        called.
   *
   * @listens Player#enterpictureinpicture
   * @listens Player#leavepictureinpicture
   */handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}
/**
   * This gets called when an `PictureInPictureToggle` is "clicked". See
   * {@link ClickableComponent} for more detailed information on what a click can be.
   *
   * @param {Event} [event]
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}
/**
   * Show the `Component`s element if it is hidden by removing the
   * 'vjs-hidden' class name from it only in browsers that support the Picture-in-Picture API.
   */show(){"function"==typeof gI.exitPictureInPicture&&super.show()}}KQ.prototype.controlText_="Picture-in-Picture",hw.registerComponent("PictureInPictureToggle",KQ);class qQ extends _Q{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",(e=>this.handleFullscreenChange(e))),!1===gI[e.fsApi_.fullscreenEnabled]&&this.disable()}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}
/**
   * Handles fullscreenchange on the player and change control text accordingly.
   *
   * @param {Event} [event]
   *        The {@link Player#fullscreenchange} event that caused this function to be
   *        called.
   *
   * @listens Player#fullscreenchange
   */handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}
/**
   * This gets called when an `FullscreenToggle` is "clicked". See
   * {@link ClickableComponent} for more detailed information on what a click can be.
   *
   * @param {Event} [event]
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}qQ.prototype.controlText_="Fullscreen",hw.registerComponent("FullscreenToggle",qQ);hw.registerComponent("VolumeLevel",class extends hw{
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */
createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}});hw.registerComponent("VolumeLevelTooltip",class extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The {@link Player} that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.update=YE(qE(this,this.update),KE)}
/**
   * Create the volume tooltip DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}
/**
   * Updates the position of the tooltip relative to the `VolumeBar` and
   * its content text.
   *
   * @param {Object} rangeBarRect
   *        The `ClientRect` for the {@link VolumeBar} element.
   *
   * @param {number} rangeBarPoint
   *        A number from 0 to 1, representing a horizontal/vertical reference point
   *        from the left edge of the {@link VolumeBar}
   *
   * @param {boolean} vertical
   *        Referees to the Volume control position
   *        in the control bar{@link VolumeControl}
   *
   */update(e,t,i,n){if(!i){const i=lE(this.el_),n=lE(this.player_.el()),s=e.width*t;if(!n||!i)return;const r=e.left-n.left+s,a=e.width-s+(n.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${n}%`)}
/**
   * Write the volume to the tooltip DOM element.
   *
   * @param {string} content
   *        The formatted volume for the tooltip.
   */write(e){Jb(this.el_,e)}
/**
   * Updates the position of the volume tooltip relative to the `VolumeBar`.
   *
   * @param {Object} rangeBarRect
   *        The `ClientRect` for the {@link VolumeBar} element.
   *
   * @param {number} rangeBarPoint
   *        A number from 0 to 1, representing a horizontal/vertical reference point
   *        from the left edge of the {@link VolumeBar}
   *
   * @param {boolean} vertical
   *        Referees to the Volume control position
   *        in the control bar{@link VolumeControl}
   *
   * @param {number} volume
   *        The volume level to update the tooltip to
   *
   * @param {Function} cb
   *        A function that will be called during the request animation frame
   *        for tooltips that need to do additional animations from the default
   */updateVolume(e,t,i,n,s){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(()=>{this.update(e,t,i,n.toFixed(0)),s&&s()}))}});class YQ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The {@link Player} that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.update=YE(qE(this,this.update),KE)}
/**
   * Create the DOM element for this class.
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}
/**
   * Enquires updates to its own DOM as well as the DOM of its
   * {@link VolumeLevelTooltip} child.
   *
   * @param {Object} rangeBarRect
   *        The `ClientRect` for the {@link VolumeBar} element.
   *
   * @param {number} rangeBarPoint
   *        A number from 0 to 1, representing a horizontal/vertical reference point
   *        from the left edge of the {@link VolumeBar}
   *
   * @param {boolean} vertical
   *        Referees to the Volume control position
   *        in the control bar{@link VolumeControl}
   *
   */update(e,t,i){const n=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,n,(()=>{i?this.el_.style.bottom=e.height*t+"px":this.el_.style.left=e.width*t+"px"}))}}YQ.prototype.options_={children:["volumeLevelTooltip"]},hw.registerComponent("MouseVolumeLevelDisplay",YQ);class VQ extends LQ{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.on("slideractive",(e=>this.updateLastVolume_(e))),this.on(e,"volumechange",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}
/**
   * Handle mouse down on volume bar
   *
   * @param {Event} event
   *        The `mousedown` event that caused this to run.
   *
   * @listens mousedown
   */handleMouseDown(e){fE(e)&&super.handleMouseDown(e)}
/**
   * Handle movement events on the {@link VolumeMenuButton}.
   *
   * @param {Event} event
   *        The event that caused this function to run.
   *
   * @listens mousemove
   */handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const i=this.el(),n=lE(i),s=this.vertical();let r=cE(i,e);r=s?r.y:r.x,r=RQ(r,0,1),t.update(n,r,s)}fE(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}
/**
   * If the player is muted unmute it.
   */checkMuted(){this.player_.muted()&&this.player_.muted(!1)}
/**
   * Get percent of volume level
   *
   * @return {number}
   *         Volume level percent as a decimal number.
   */getPercent(){return this.player_.muted()?0:this.player_.volume()}
/**
   * Increase volume level for keyboard users
   */stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}
/**
   * Decrease volume level for keyboard users
   */stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}
/**
   * Update ARIA accessibility attributes
   *
   * @param {Event} [event]
   *        The `volumechange` event that caused this function to run.
   *
   * @listens Player#volumechange
   */updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}
/**
   * Returns the current value of the player volume as a percentage
   *
   * @private
   */volumeAsPercentage_(){return Math.round(100*this.player_.volume())}
/**
   * When user starts dragging the VolumeBar, store the volume and listen for
   * the end of the drag. When the drag ends, if the volume was set to zero,
   * set lastVolume to the stored volume.
   *
   * @listens slideractive
   * @private
   */updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}VQ.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Pb||yb||VQ.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),VQ.prototype.playerEvent="volumechange",hw.registerComponent("VolumeBar",VQ);class WQ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options={}]
   *        The key/value store of player options.
   */
constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||gb(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.throttledHandleMouseMove=YE(qE(this,this.handleMouseMove),KE),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on("mousedown",(e=>this.handleMouseDown(e))),this.on("touchstart",(e=>this.handleMouseDown(e))),this.on("mousemove",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,["focus","slideractive"],(()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")})),this.on(this.volumeBar,["blur","sliderinactive"],(()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")}))}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}
/**
   * Handle `mousedown` or `touchstart` events on the `VolumeControl`.
   *
   * @param {Event} event
   *        `mousedown` or `touchstart` event that triggered this function
   *
   * @listens mousedown
   * @listens touchstart
   */handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}
/**
   * Handle `mouseup` or `touchend` events on the `VolumeControl`.
   *
   * @param {Event} event
   *        `mouseup` or `touchend` event that triggered this function.
   *
   * @listens touchend
   * @listens mouseup
   */handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}
/**
   * Handle `mousedown` or `touchstart` events on the `VolumeControl`.
   *
   * @param {Event} event
   *        `mousedown` or `touchstart` event that triggered this function
   *
   * @listens mousedown
   * @listens touchstart
   */handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}WQ.prototype.options_={children:["volumeBar"]},hw.registerComponent("VolumeControl",WQ);class jQ extends _Q{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.on(e,["loadstart","volumechange"],(e=>this.update(e)))}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}
/**
   * This gets called when an `MuteToggle` is "clicked". See
   * {@link ClickableComponent} for more detailed information on what a click can be.
   *
   * @param {Event} [event]
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}
/**
   * Update the `MuteToggle` button based on the state of `volume` and `muted`
   * on the player.
   *
   * @param {Event} [event]
   *        The {@link Player#loadstart} event if this function was called
   *        through an event.
   *
   * @listens Player#loadstart
   * @listens Player#volumechange
   */update(e){this.updateIcon_(),this.updateControlText_()}
/**
   * Update the appearance of the `MuteToggle` icon.
   *
   * Possible states (given `level` variable below):
   * - 0: crossed out
   * - 1: zero bars of volume
   * - 2: one bar of volume
   * - 3: two bars of volume
   *
   * @private
   */updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon("volume-high"),Pb&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),Zb(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?" ":""}vjs-vol-${t}`),"")),$b(this.el_,`vjs-vol-${t}`)}
/**
   * If `muted` has changed on the player, update the control text
   * (`title` attribute on `vjs-mute-control` element and content of
   * `vjs-control-text` element).
   *
   * @private
   */updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)}}jQ.prototype.controlText_="Mute",hw.registerComponent("MuteToggle",jQ);class JQ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options={}]
   *        The key/value store of player options.
   */
constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||gb(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,["loadstart"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,"keyup",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,"keyup",(e=>this.handleVolumeControlKeyUp(e))),this.on("keydown",(e=>this.handleKeyPress(e))),this.on("mouseover",(e=>this.handleMouseOver(e))),this.on("mouseout",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}
/**
   * Add vjs-slider-active class to the VolumePanel
   *
   * @listens VolumeControl#slideractive
   * @private
   */sliderActive_(){this.addClass("vjs-slider-active")}
/**
   * Removes vjs-slider-active class to the VolumePanel
   *
   * @listens VolumeControl#sliderinactive
   * @private
   */sliderInactive_(){this.removeClass("vjs-slider-active")}
/**
   * Adds vjs-hidden or vjs-mute-toggle-only to the VolumePanel
   * depending on MuteToggle and VolumeControl state
   *
   * @listens Player#loadstart
   * @private
   */volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}
/**
   * Dispose of the `volume-panel` and all child components.
   */dispose(){this.handleMouseOut(),super.dispose()}
/**
   * Handles `keyup` events on the `VolumeControl`, looking for ESC, which closes
   * the volume panel and sets focus on `MuteToggle`.
   *
   * @param {Event} event
   *        The `keyup` event that caused this function to be called.
   *
   * @listens keyup
   */handleVolumeControlKeyUp(e){"Escape"===e.key&&this.muteToggle.focus()}
/**
   * This gets called when a `VolumePanel` gains hover via a `mouseover` event.
   * Turns on listening for `mouseover` event. When they happen it
   * calls `this.handleMouseOver`.
   *
   * @param {Event} event
   *        The `mouseover` event that caused this function to be called.
   *
   * @listens mouseover
   */handleMouseOver(e){this.addClass("vjs-hover"),LE(gI,"keyup",this.handleKeyPressHandler_)}
/**
   * This gets called when a `VolumePanel` gains hover via a `mouseout` event.
   * Turns on listening for `mouseout` event. When they happen it
   * calls `this.handleMouseOut`.
   *
   * @param {Event} event
   *        The `mouseout` event that caused this function to be called.
   *
   * @listens mouseout
   */handleMouseOut(e){this.removeClass("vjs-hover"),UE(gI,"keyup",this.handleKeyPressHandler_)}
/**
   * Handles `keyup` event on the document or `keydown` event on the `VolumePanel`,
   * looking for ESC, which hides the `VolumeControl`.
   *
   * @param {Event} event
   *        The keypress that triggered this event.
   *
   * @listens keydown | keyup
   */handleKeyPress(e){"Escape"===e.key&&this.handleMouseOut()}}JQ.prototype.options_={children:["muteToggle","volumeControl"]},hw.registerComponent("VolumePanel",JQ);class zQ extends _Q{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}
/**
   * On click, skips forward in the duration/seekable range by a configurable amount of seconds.
   * If the time left in the duration/seekable range is less than the configured 'skip forward' time,
   * skips to end of duration/seekable range.
   *
   * Handle a click on a `SkipForward` button
   *
   * @param {EventTarget~Event} event
   *        The `click` event that caused this function
   *        to be called
   */handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()?i.seekableEnd():this.player_.duration();let s;s=t+this.skipTime<=n?t+this.skipTime:n,this.player_.currentTime(s)}
/**
   * Update control text on languagechange
   */handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}zQ.prototype.controlText_="Skip Forward",hw.registerComponent("SkipForward",zQ);class XQ extends _Q{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}
/**
   * On click, skips backward in the video by a configurable amount of seconds.
   * If the current time in the video is less than the configured 'skip backward' time,
   * skips to beginning of video or seekable range.
   *
   * Handle a click on a `SkipBackward` button
   *
   * @param {EventTarget~Event} event
   *        The `click` event that caused this function
   *        to be called
   */handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()&&i.seekableStart();let s;s=n&&t-this.skipTime<=n?n:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(s)}
/**
   * Update control text on languagechange
   */handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}XQ.prototype.controlText_="Skip Backward",hw.registerComponent("SkipBackward",XQ);let $Q=class extends hw{
/**
   * Create an instance of this class.
   *
   * @param {Player} player
   *        the player that this component should attach to
   *
   * @param {Object} [options]
   *        Object of option names and values
   *
   */
constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}
/**
   * Add event listeners to the {@link MenuItem}.
   *
   * @param {Object} component
   *        The instance of the `MenuItem` to add listeners to.
   *
   */addEventListenerForItem(e){e instanceof hw&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}
/**
   * Remove event listeners from the {@link MenuItem}.
   *
   * @param {Object} component
   *        The instance of the `MenuItem` to remove listeners.
   *
   */removeEventListenerForItem(e){e instanceof hw&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}
/**
   * This method will be called indirectly when the component has been added
   * before the component adds to the new menu instance by `addItem`.
   * In this case, the original menu instance will remove the component
   * by calling `removeChild`.
   *
   * @param {Object} component
   *        The instance of the `MenuItem`
   */removeChild(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}
/**
   * Add a {@link MenuItem} to the menu.
   *
   * @param {Object|string} component
   *        The name or instance of the `MenuItem` to add.
   *
   */addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}
/**
   * Create the `Menu`s DOM element.
   *
   * @return {Element}
   *         the element that was created
   */createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=jb(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),LE(t,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}
/**
   * Called when a `MenuItem` loses focus.
   *
   * @param {Event} event
   *        The `blur` event that caused this function to be called.
   *
   * @listens blur
   */handleBlur(e){const t=e.relatedTarget||gI.activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}
/**
   * Called when a `MenuItem` gets clicked or tapped.
   *
   * @param {Event} event
   *        The `click` or `tap` event that caused this function to be called.
   *
   * @listens click,tap
   */handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}}
/**
   * Handle a `keydown` event on this menu. This listener is added in the constructor.
   *
   * @param {KeyboardEvent} event
   *        A `keydown` event that happened on the menu.
   *
   * @listens keydown
   */handleKeyDown(e){"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}
/**
   * Move to next (lower) menu item for keyboard users.
   */stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}
/**
   * Move to previous (higher) menu item for keyboard users.
   */stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}
/**
   * Set focus on a {@link MenuItem} in the `Menu`.
   *
   * @param {Object|string} [item=0]
   *        Index of child item set focus on.
   */focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}};hw.registerComponent("Menu",$Q);class ZQ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options={}]
   *        The key/value store of player options.
   */
constructor(e,t={}){super(e,t),this.menuButton_=new _Q(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const i=_Q.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+i,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const n=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,"tap",n),this.on(this.menuButton_,"click",n),this.on(this.menuButton_,"keydown",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,"mouseenter",(()=>{this.addClass("vjs-hover"),this.menu.show(),LE(gI,"keyup",this.handleMenuKeyUp_)})),this.on("mouseleave",(e=>this.handleMouseLeave(e))),this.on("keydown",(e=>this.handleSubmenuKeyDown(e)))}
/**
   * Update the menu based on the current state of its items.
   */update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}
/**
   * Create the menu and add all items to it.
   *
   * @return {Menu}
   *         The constructed menu
   */createMenu(){const e=new $Q(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=jb("li",{className:"vjs-menu-title",textContent:Aw(this.options_.title),tabIndex:-1}),i=new hw(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}
/**
   * Create the list of menu items. Specific to each subclass.
   *
   * @abstract
   */createItems(){}
/**
   * Create the `MenuButtons`s DOM element.
   *
   * @return {Element}
   *         The element that gets created.
   */createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}
/**
   * Overwrites the `setIcon` method from `Component`.
   * In this case, we want the icon to be appended to the menuButton.
   *
   * @param {string} name
   *         The icon name to be added.
   */setIcon(e){super.setIcon(e,this.menuButton_.el_)}
/**
   * Allow sub components to stack CSS class names for the wrapper element
   *
   * @return {string}
   *         The constructed wrapper DOM `className`
   */buildWrapperCSSClass(){let e="vjs-menu-button";!0===this.options_.inline?e+="-inline":e+="-popup";return`vjs-menu-button ${e} ${_Q.prototype.buildCSSClass()} ${super.buildCSSClass()}`}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){let e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}
/**
   * Get or set the localized control text that will be used for accessibility.
   *
   * > NOTE: This will come from the internal `menuButton_` element.
   *
   * @param {string} [text]
   *        Control text for element.
   *
   * @param {Element} [el=this.menuButton_.el()]
   *        Element to set the title on.
   *
   * @return {string}
   *         - The control text when getting
   */controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}
/**
   * Dispose of the `menu-button` and all child components.
   */dispose(){this.handleMouseLeave(),super.dispose()}
/**
   * Handle a click on a `MenuButton`.
   * See {@link ClickableComponent#handleClick} for instances where this is called.
   *
   * @param {Event} event
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}
/**
   * Handle `mouseleave` for `MenuButton`.
   *
   * @param {Event} event
   *        The `mouseleave` event that caused this function to be called.
   *
   * @listens mouseleave
   */handleMouseLeave(e){this.removeClass("vjs-hover"),UE(gI,"keyup",this.handleMenuKeyUp_)}
/**
   * Set the focus to the actual button, not to this element
   */focus(){this.menuButton_.focus()}
/**
   * Remove the focus from the actual button, not this element
   */blur(){this.menuButton_.blur()}
/**
   * Handle tab, escape, down arrow, and up arrow keys for `MenuButton`. See
   * {@link ClickableComponent#handleKeyDown} for instances where this is called.
   *
   * @param {Event} event
   *        The `keydown` event that caused this function to be called.
   *
   * @listens keydown
   */handleKeyDown(e){"Escape"===e.key||"Tab"===e.key?(this.buttonPressed_&&this.unpressButton(),"Tab"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):"Up"!==e.key&&("Down"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}
/**
   * Handle a `keyup` event on a `MenuButton`. The listener for this is added in
   * the constructor.
   *
   * @param {Event} event
   *        Key press event
   *
   * @listens keyup
   */handleMenuKeyUp(e){"Escape"!==e.key&&"Tab"!==e.key||this.removeClass("vjs-hover")}
/**
   * This method name now delegates to `handleSubmenuKeyDown`. This means
   * anyone calling `handleSubmenuKeyPress` will not see their method calls
   * stop working.
   *
   * @param {Event} event
   *        The event that caused this function to be called.
   */handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}
/**
   * Handle a `keydown` event on a sub-menu. The listener for this is added in
   * the constructor.
   *
   * @param {Event} event
   *        Key press event
   *
   * @listens keydown
   */handleSubmenuKeyDown(e){"Escape"!==e.key&&"Tab"!==e.key||(this.buttonPressed_&&this.unpressButton(),"Tab"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}
/**
   * Put the current `MenuButton` into a pressed state.
   */pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Pb&&Vb())return;this.menu.focus()}}
/**
   * Take the current `MenuButton` out of a pressed state.
   */unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}
/**
   * Disable the `MenuButton`. Don't allow it to be clicked.
   */disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}
/**
   * Enable the `MenuButton`. Allow it to be clicked.
   */enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}hw.registerComponent("MenuButton",ZQ);class e_ extends ZQ{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const n=qE(this,this.update);i.addEventListener("removetrack",n),i.addEventListener("addtrack",n),i.addEventListener("labelchange",n),this.player_.on("ready",n),this.player_.on("dispose",(function(){i.removeEventListener("removetrack",n),i.removeEventListener("addtrack",n),i.removeEventListener("labelchange",n)}))}}hw.registerComponent("TrackButton",e_);let t_=class extends IQ{
/**
   * Creates an instance of the this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options={}]
   *        The key/value store of player options.
   *
   */
constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}
/**
   * Create the `MenuItem's DOM element
   *
   * @param {string} [type=li]
   *        Element's node type, not actually used, always set to `li`.
   *
   * @param {Object} [props={}]
   *        An object of properties that should be set on the element
   *
   * @param {Object} [attrs={}]
   *        An object of attributes that should be set on the element
   *
   * @return {Element}
   *         The element that gets created.
   */createEl(e,t,i){this.nonIconControl=!0;const n=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},t),i),s=jb("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?n.appendChild(s):n.replaceChild(s,n.querySelector(".vjs-icon-placeholder")),n}
/**
   * Ignore keys which are used by the menu, but pass any other ones up. See
   * {@link ClickableComponent#handleKeyDown} for instances where this is called.
   *
   * @param {KeyboardEvent} event
   *        The `keydown` event that caused this function to be called.
   *
   * @listens keydown
   */handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}
/**
   * Any click on a `MenuItem` puts it into the selected state.
   * See {@link ClickableComponent#handleClick} for instances where this is called.
   *
   * @param {Event} event
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){this.selected(!0)}
/**
   * Set the state for this menu item as selected or not.
   *
   * @param {boolean} selected
   *        if the menu item is selected or not
   */selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}};hw.registerComponent("MenuItem",t_);class i_ extends t_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){const i=t.track,n=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const s=(...e)=>{this.handleTracksChange.apply(this,e)},r=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on(["loadstart","texttrackchange"],s),n.addEventListener("change",s),n.addEventListener("selectedlanguagechange",r),this.on("dispose",(function(){e.off(["loadstart","texttrackchange"],s),n.removeEventListener("change",s),n.removeEventListener("selectedlanguagechange",r)})),void 0===n.onchange){let e;this.on(["tap","click"],(function(){if("object"!=typeof lI.Event)try{e=new lI.Event("change")}catch(t){}e||(e=gI.createEvent("Event"),e.initEvent("change",!0,!0)),n.dispatchEvent(e)}))}this.handleTracksChange()}
/**
   * This gets called when an `TextTrackMenuItem` is "clicked". See
   * {@link ClickableComponent} for more detailed information on what a click can be.
   *
   * @param {Event} event
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let n=0;n<i.length;n++){const e=i[n];-1!==this.kinds.indexOf(e.kind)&&(e===t?"showing"!==e.mode&&(e.mode="showing"):"disabled"!==e.mode&&(e.mode="disabled"))}}
/**
   * Handle text track list change
   *
   * @param {Event} event
   *        The `change` event that caused this function to be called.
   *
   * @listens TextTrackList#change
   */handleTracksChange(e){const t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if("showing"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}hw.registerComponent("TextTrackMenuItem",i_);class n_ extends i_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){t.track={player:e,
// it is no longer necessary to store `kind` or `kinds` on the track itself
// since they are now stored in the `kinds` property of all instances of
// TextTrackMenuItem, but this will remain for backwards compatibility
kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,super(e,t)}
/**
   * Handle text track change
   *
   * @param {Event} event
   *        The event that caused this function to run
   */handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let n=0,s=t.length;n<s;n++){const e=t[n];if(this.options_.kinds.indexOf(e.kind)>-1&&"showing"===e.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let n=0,s=t.length;n<s;n++){const e=t[n];if(["captions","descriptions","subtitles"].indexOf(e.kind)>-1&&"showing"===e.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}
/**
   * Update control text and label on languagechange
   */handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}hw.registerComponent("OffTextTrackMenuItem",n_);class s_ extends e_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options={}]
   *        The key/value store of player options.
   */
constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}
/**
   * Create a menu item for each text track
   *
   * @param {TextTrackMenuItem[]} [items=[]]
   *        Existing array of items to use during creation
   *
   * @return {TextTrackMenuItem[]}
   *         Array of menu items that were created
   */createItems(e=[],t=i_){let i;this.label_&&(i=`${this.label_} off`),e.push(new n_(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let s=0;s<n.length;s++){const i=n[s];if(this.kinds_.indexOf(i.kind)>-1){const n=new t(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,
// MenuItem is selectable
selectable:!0,
// MenuItem is NOT multiSelectable (i.e. only one can be marked "selected" at a time)
multiSelectable:!1});n.addClass(`vjs-${i.kind}-menu-item`),e.push(n)}}return e}}hw.registerComponent("TextTrackButton",s_);class r_ extends t_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){const i=t.track,n=t.cue,s=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=n.text,t.selected=n.startTime<=s&&s<n.endTime,super(e,t),this.track=i,this.cue=n}
/**
   * This gets called when an `ChaptersTrackMenuItem` is "clicked". See
   * {@link ClickableComponent} for more detailed information on what a click can be.
   *
   * @param {Event} [event]
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}hw.registerComponent("ChaptersTrackMenuItem",r_);class a_ extends s_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {Function} [ready]
   *        The function to call when this function is ready.
   */
constructor(e,t,i){super(e,t,i),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}
/**
   * Update the menu based on the current state of its items.
   *
   * @param {Event} [event]
   *        An event that triggered this function to run.
   *
   * @listens TextTrackList#addtrack
   * @listens TextTrackList#removetrack
   * @listens TextTrackList#change
   */update(e){if(e&&e.track&&"chapters"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}
/**
   * Set the currently selected track for the chapters button.
   *
   * @param {TextTrack} track
   *        The new track to select. Nothing will change if this is the currently selected
   *        track.
   */setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}
/**
   * Find the track object that is currently in use by this ChaptersButton
   *
   * @return {TextTrack|undefined}
   *         The current track or undefined if none was found.
   */findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}
/**
   * Get the caption for the ChaptersButton based on the track label. This will also
   * use the current tracks localized kind as a fallback if a label does not exist.
   *
   * @return {string}
   *         The tracks current label or the localized track kind.
   */getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(Aw(this.kind_))}
/**
   * Create menu from chapter track
   *
   * @return {Menu}
   *         New menu for the chapter buttons
   */createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}
/**
   * Create a menu item for each text track
   *
   * @return  {TextTrackMenuItem[]}
   *         Array of menu items
   */createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,n=t.length;i<n;i++){const n=t[i],s=new r_(this.player_,{track:this.track_,cue:n});e.push(s)}return e}}a_.prototype.kind_="chapters",a_.prototype.controlText_="Chapters",hw.registerComponent("ChaptersButton",a_);class o_ extends s_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {Function} [ready]
   *        The function to call when this component is ready.
   */
constructor(e,t,i){super(e,t,i),this.setIcon("audio-description");const n=e.textTracks(),s=qE(this,this.handleTracksChange);n.addEventListener("change",s),this.on("dispose",(function(){n.removeEventListener("change",s)}))}
/**
   * Handle text track change
   *
   * @param {Event} event
   *        The event that caused this function to run
   *
   * @listens TextTrackList#change
   */handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let n=0,s=t.length;n<s;n++){const e=t[n];if(e.kind!==this.kind_&&"showing"===e.mode){i=!0;break}}i?this.disable():this.enable()}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}o_.prototype.kind_="descriptions",o_.prototype.controlText_="Descriptions",hw.registerComponent("DescriptionsButton",o_);class l_ extends s_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {Function} [ready]
   *        The function to call when this component is ready.
   */
constructor(e,t,i){super(e,t,i),this.setIcon("subtitles")}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}l_.prototype.kind_="subtitles",l_.prototype.controlText_="Subtitles",hw.registerComponent("SubtitlesButton",l_);class A_ extends i_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",super(e,t),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+t.kind+" settings dialog")}
/**
   * This gets called when an `CaptionSettingsMenuItem` is "clicked". See
   * {@link ClickableComponent} for more detailed information on what a click can be.
   *
   * @param {Event} [event]
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){this.player().getChild("textTrackSettings").open()}
/**
   * Update control text and label on languagechange
   */handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}hw.registerComponent("CaptionSettingsMenuItem",A_);class c_ extends s_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {Function} [ready]
   *        The function to call when this component is ready.
   */
constructor(e,t,i){super(e,t,i),this.setIcon("captions")}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}
/**
   * Create caption menu items
   *
   * @return {CaptionSettingsMenuItem[]}
   *         The array of current menu items.
   */createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new A_(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}c_.prototype.kind_="captions",c_.prototype.controlText_="Captions",hw.registerComponent("CaptionsButton",c_);class u_ extends i_{createEl(e,t,i){const n=super.createEl(e,t,i),s=n.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",n):s.appendChild(jb("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(jb("span",{className:"vjs-control-text",
// space added as the text will visually flow with the
// label
textContent:` ${this.localize("Captions")}`}))),n}}hw.registerComponent("SubsCapsMenuItem",u_);class h_ extends s_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {Function} [ready]
   *        The function to call when this component is ready.
   */
constructor(e,t={}){super(e,t),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(Aw(this.label_))}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}
/**
   * Create caption/subtitles menu items
   *
   * @return {CaptionSettingsMenuItem[]}
   *         The array of current menu items.
   */createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new A_(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,u_),e}}h_.prototype.kinds_=["captions","subtitles"],h_.prototype.controlText_="Subtitles",hw.registerComponent("SubsCapsButton",h_);class d_ extends t_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){const i=t.track,n=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const s=(...e)=>{this.handleTracksChange.apply(this,e)};n.addEventListener("change",s),this.on("dispose",(()=>{n.removeEventListener("change",s)}))}createEl(e,t,i){const n=super.createEl(e,t,i),s=n.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(s.appendChild(jb("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(jb("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),n}
/**
   * This gets called when an `AudioTrackMenuItem is "clicked". See {@link ClickableComponent}
   * for more detailed information on what a click can be.
   *
   * @param {Event} [event]
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}
/**
   * Handle any {@link AudioTrack} change.
   *
   * @param {Event} [event]
   *        The {@link AudioTrackList#change} event that caused this to run.
   *
   * @listens AudioTrackList#change
   */handleTracksChange(e){this.selected(this.track.enabled)}}hw.registerComponent("AudioTrackMenuItem",d_);class g_ extends e_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options={}]
   *        The key/value store of player options.
   */
constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon("audio")}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}
/**
   * Create a menu item for each audio track
   *
   * @param {AudioTrackMenuItem[]} [items=[]]
   *        An array of existing menu items to use.
   *
   * @return {AudioTrackMenuItem[]}
   *         An array of menu items
   */createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const n=t[i];e.push(new d_(this.player_,{track:n,
// MenuItem is selectable
selectable:!0,
// MenuItem is NOT multiSelectable (i.e. only one can be marked "selected" at a time)
multiSelectable:!1}))}return e}}g_.prototype.controlText_="Audio Track",hw.registerComponent("AudioTrackButton",g_);class p_ extends t_{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){const i=t.rate,n=parseFloat(i,10);t.label=i,t.selected=n===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=n,this.on(e,"ratechange",(e=>this.update(e)))}
/**
   * This gets called when an `PlaybackRateMenuItem` is "clicked". See
   * {@link ClickableComponent} for more detailed information on what a click can be.
   *
   * @param {Event} [event]
   *        The `keydown`, `tap`, or `click` event that caused this function to be
   *        called.
   *
   * @listens tap
   * @listens click
   */handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}
/**
   * Update the PlaybackRateMenuItem when the playbackrate changes.
   *
   * @param {Event} [event]
   *        The `ratechange` event that caused this function to run.
   *
   * @listens Player#ratechange
   */update(e){this.selected(this.player().playbackRate()===this.rate)}}p_.prototype.contentElType="button",hw.registerComponent("PlaybackRateMenuItem",p_);class f_ extends ZQ{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   */
constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",(e=>this.updateVisibility(e))),this.on(e,"ratechange",(e=>this.updateLabel(e))),this.on(e,"playbackrateschange",(e=>this.handlePlaybackRateschange(e)))}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=jb("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}
/**
   * Create the list of menu items. Specific to each subclass.
   *
   */createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new p_(this.player(),{rate:e[i]+"x"}));return t}
/**
   * On playbackrateschange, update the menu to account for the new items.
   *
   * @listens Player#playbackrateschange
   */handlePlaybackRateschange(e){this.update()}
/**
   * Get possible playback rates
   *
   * @return {Array}
   *         All possible playback rates
   */playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}
/**
   * Get whether playback rates is supported by the tech
   * and an array of playback rates exists
   *
   * @return {boolean}
   *         Whether changing playback rate is supported
   */playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}
/**
   * Hide playback rate controls when they're no playback rate options to select
   *
   * @param {Event} [event]
   *        The event that caused this function to run.
   *
   * @listens Player#loadstart
   */updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}
/**
   * Update button label when rate changed
   *
   * @param {Event} [event]
   *        The event that caused this function to run.
   *
   * @listens Player#ratechange
   */updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}f_.prototype.controlText_="Playback Rate",hw.registerComponent("PlaybackRateMenuButton",f_);class m_ extends hw{
/**
  * Builds the default DOM `className`.
  *
  * @return {string}
  *         The DOM `className` for this object.
  */
buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(e="div",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}hw.registerComponent("Spacer",m_);hw.registerComponent("CustomControlSpacer",class extends m_{
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   */
buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){return super.createEl("div",{className:this.buildCSSClass(),
// No-flex/table-cell mode requires there be some content
// in the cell to fill the remaining space of the table.
textContent:" "})}});class C_ extends hw{
/**
   * Create the `Component`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */
createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}C_.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},hw.registerComponent("ControlBar",C_);class I_ extends kw{
/**
   * Creates an instance of this class.
   *
   * @param  {Player} player
   *         The `Player` that this class should be attached to.
   *
   * @param  {Object} [options]
   *         The key/value store of player options.
   */
constructor(e,t){super(e,t),this.on(e,"error",(e=>{this.open(e)}))}
/**
   * Builds the default DOM `className`.
   *
   * @return {string}
   *         The DOM `className` for this object.
   *
   * @deprecated Since version 5.
   */buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}
/**
   * Gets the localized error message based on the `Player`s error.
   *
   * @return {string}
   *         The `Player`s error message localized or an empty string.
   */content(){const e=this.player().error();return e?this.localize(e.message):""}}I_.prototype.options_=Object.assign({},kw.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),hw.registerComponent("ErrorDisplay",I_);class v_ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {ContentDescriptor} [options.content=undefined]
   *        Provide customized content for this modal.
   *
   * @param {string} [options.legendId]
   *        A text with part of an string to create atribute of aria-labelledby.
   *
   * @param {string} [options.id]
   *        A text with part of an string to create atribute of aria-labelledby.
   *
   * @param {Array} [options.SelectOptions]
   *        Array that contains the value & textContent of for each of the
   *        options elements.
   */
constructor(e,t={}){super(e,t),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}
/**
   * Create the `TextTrackSelect`'s DOM element
   *
   * @return {Element}
   *         The DOM element that gets created.
   */createEl(){this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim();return jb("select",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${FE()}`)+"-"+e[1].replace(/\W+/g,""),i=jb("option",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${t}`),i})))}}hw.registerComponent("TextTrackSelect",v_);class B_ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {ContentDescriptor} [options.content=undefined]
   *        Provide customized content for this modal.
   *
   * @param {string} [options.legendId]
   *        A text with part of an string to create atribute of aria-labelledby.
   *        It passes to 'TextTrackSelect'.
   *
   * @param {string} [options.id]
   *        A text with part of an string to create atribute of aria-labelledby.
   *        It passes to 'TextTrackSelect'.
   *
   * @param {string} [options.legendText]
   *        A text to use as the text content of the legend element.
   *
   * @param {Array} [options.selects]
   *        Array that contains the selects that are use to create 'selects'
   *        components.
   *
   * @param {Array} [options.SelectOptions]
   *        Array that contains the value & textContent of for each of the
   *        options elements, it passes to 'TextTrackSelect'.
   *
   * @param {string} [options.type]
   *        Conditions if some DOM elements will be added to the fieldset
   *        component.
   *
   * @param {Object} [options.selectConfigs]
   *        Object with the following properties that are the selects configurations:
   *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,
   *        fontPercent, textOpacity, windowColor, windowOpacity.
   *        These properties are use to configure the 'TextTrackSelect' Component.
   */
constructor(e,t={}){super(e,t);const i=jb("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const n=this.options_.selects;for(const s of n){const t=this.options_.selectConfigs[s],i=t.className,n=t.id.replace("%s",this.options_.id_);let r=null;const a=`vjs_select_${FE()}`;if("colors"===this.options_.type){r=jb("span",{className:i});const e=jb("label",{id:n,className:"vjs-label",textContent:this.localize(t.label)});e.setAttribute("for",a),r.appendChild(e)}const o=new v_(e,{SelectOptions:t.options,legendId:this.options_.legendId,id:a,labelId:n});this.addChild(o),"colors"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}
/**
   * Create the `TextTrackFieldset`'s DOM element
   *
   * @return {Element}
   *         The DOM element that gets created.
   */createEl(){return jb("fieldset",{
// Prefixing classes of elements within a player with "vjs-"
// is a convention used in Video.js.
className:this.options_.className})}}hw.registerComponent("TextTrackFieldset",B_);class y_ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {ContentDescriptor} [options.content=undefined]
   *        Provide customized content for this modal.
   *
   * @param {Array} [options.fieldSets]
   *        Array that contains the configurations for the selects.
   *
   * @param {Object} [options.selectConfigs]
   *        Object with the following properties that are the select confugations:
   *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,
   *        fontPercent, textOpacity, windowColor, windowOpacity.
   *        it passes to 'TextTrackFieldset'.
   */
constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,n=new B_(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(n);const s=new B_(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s);const r=new B_(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(r)}
/**
   * Create the `TextTrackSettingsColors`'s DOM element
   *
   * @return {Element}
   *         The DOM element that gets created.
   */createEl(){return jb("div",{className:"vjs-track-settings-colors"})}}hw.registerComponent("TextTrackSettingsColors",y_);class b_ extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {ContentDescriptor} [options.content=undefined]
   *        Provide customized content for this modal.
   *
   * @param {Array} [options.fieldSets]
   *        Array that contains the configurations for the selects.
   *
   * @param {Object} [options.selectConfigs]
   *        Object with the following properties that are the select confugations:
   *        backgroundColor, backgroundOpacity, color, edgeStyle, fontFamily,
   *        fontPercent, textOpacity, windowColor, windowOpacity.
   *        it passes to 'TextTrackFieldset'.
   */
constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,n=new B_(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(n);const s=new B_(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s);const r=new B_(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(r)}
/**
   * Create the `TextTrackSettingsFont`'s DOM element
   *
   * @return {Element}
   *         The DOM element that gets created.
   */createEl(){return jb("div",{className:"vjs-track-settings-font"})}}hw.registerComponent("TextTrackSettingsFont",b_);class E_ extends hw{constructor(e,t={}){super(e,t);const i=this.localize("restore all settings to the default values"),n=new _Q(e,{controlText:i,className:"vjs-default-button"});n.el().classList.remove("vjs-control","vjs-button"),n.el().textContent=this.localize("Reset"),this.addChild(n);const s=new _Q(e,{controlText:i,className:"vjs-done-button"});s.el().classList.remove("vjs-control","vjs-button"),s.el().textContent=this.localize("Done"),this.addChild(s)}
/**
   * Create the `TrackSettingsControls`'s DOM element
   *
   * @return {Element}
   *         The DOM element that gets created.
   */createEl(){return jb("div",{className:"vjs-track-settings-controls"})}}hw.registerComponent("TrackSettingsControls",E_);const w_="vjs-text-track-settings",Q_=["#000","Black"],__=["#00F","Blue"],S_=["#0FF","Cyan"],x_=["#0F0","Green"],k_=["#F0F","Magenta"],D_=["#F00","Red"],F_=["#FFF","White"],T_=["#FF0","Yellow"],M_=["1","Opaque"],R_=["0.5","Semi-Transparent"],N_=["0","Transparent"],L_={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Q_,F_,D_,x_,__,T_,k_,S_],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[M_,R_,N_],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[F_,Q_,D_,x_,__,T_,k_,S_],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:e=>"1.00"===e?null:Number(e)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[M_,R_],className:"vjs-text-opacity vjs-opacity"},
// Options for this object are defined below.
windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},
// Options for this object are defined below.
windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[N_,R_,M_],className:"vjs-window-opacity vjs-opacity"}};function U_(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}L_.windowColor.options=L_.backgroundColor.options;hw.registerComponent("TextTrackSettings",class extends kw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *         The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *         The key/value store of player options.
   */
constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=jb("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new y_(e,{textTrackComponentid:this.id_,selectConfigs:L_,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(t);const i=new b_(e,{textTrackComponentid:this.id_,selectConfigs:L_,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(i);const n=new E_(e);this.addChild(n)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(".vjs-default-button"),["click","tap"],(()=>{this.setDefaults(),this.updateDisplay()})),ub(L_,(e=>{this.on(this.$(e.selector),"change",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}
/**
   * Gets an object of text track settings (or null).
   *
   * @return {Object}
   *         An object with config values parsed from the DOM or localStorage.
   */getValues(){return hb(L_,((e,t,i)=>{const n=(s=this.$(t.selector),r=t.parser,U_(s.options[s.options.selectedIndex].value,r));var s,r;return void 0!==n&&(e[i]=n),e}),{})}
/**
   * Sets text track settings from an object of values.
   *
   * @param {Object} values
   *        An object with config values parsed from the DOM or localStorage.
   */setValues(e){ub(L_,((t,i)=>{!function(e,t,i){if(t)for(let n=0;n<e.options.length;n++)if(U_(e.options[n].value,i)===t){e.selectedIndex=n;break}}(this.$(t.selector),e[i],t.parser)}))}
/**
   * Sets all `<select>` elements to their default values.
   */setDefaults(){ub(L_,(e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t}))}
/**
   * Restore texttrack settings from localStorage
   */restoreSettings(){let e;try{e=JSON.parse(lI.localStorage.getItem(w_))}catch(t){ob.warn(t)}e&&this.setValues(e)}
/**
   * Save text track settings to localStorage
   */saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?lI.localStorage.setItem(w_,JSON.stringify(e)):lI.localStorage.removeItem(w_)}catch(t){ob.warn(t)}}
/**
   * Update display of text track settings
   */updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}
/**
   * Repopulate dialog with new localizations on languagechange
   */handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}});hw.registerComponent("ResizeManager",class extends hw{
/**
   * Create the ResizeManager.
   *
   * @param {Object} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of ResizeManager options.
   *
   * @param {Object} [options.ResizeObserver]
   *        A polyfill for ResizeObserver can be passed in here.
   *        If this is set to null it will ignore the native ResizeObserver and fall back to the iframe fallback.
   */
constructor(e,t){let i=t.ResizeObserver||lI.ResizeObserver;null===t.ResizeObserver&&(i=!1);super(e,pb({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||lI.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=VE((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){UE(this,"resize",e),UE(this,"unload",t),t=null};LE(this.el_.contentWindow,"unload",t),LE(this.el_.contentWindow,"resize",e)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}
/**
   * Called when a resize is triggered on the iframe or a resize is observed via the ResizeObserver
   *
   * @fires Player#playerresize
   */resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}});const H_={trackingThreshold:20,liveTolerance:15};hw.registerComponent("LiveTracker",class extends hw{
/**
   * Creates an instance of this class.
   *
   * @param {Player} player
   *        The `Player` that this class should be attached to.
   *
   * @param {Object} [options]
   *        The key/value store of player options.
   *
   * @param {number} [options.trackingThreshold=20]
   *        Number of seconds of live window (seekableEnd - seekableStart) that
   *        media needs to have before the liveui will be shown.
   *
   * @param {number} [options.liveTolerance=15]
   *        Number of seconds behind live that we have to be
   *        before we will be considered non-live. Note that this will only
   *        be used when playing at the live edge. This allows large seekable end
   *        changes to not effect whether we are live or not.
   */
constructor(e,t){super(e,pb(H_,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,"durationchange",(e=>this.handleDurationchange(e))),this.on(this.player_,"canplay",(()=>this.toggleTracking()))}
/**
   * all the functionality for tracking when seek end changes
   * and for tracking how far past seek end we should be
   */trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(lI.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const n=this.liveCurrentTime(),s=this.player_.currentTime();let r=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-s)>this.options_.liveTolerance;this.timeupdateSeen_&&n!==1/0||(r=!1),r!==this.behindLiveEdge_&&(this.behindLiveEdge_=r,this.trigger("liveedgechange"))}
/**
   * handle a durationchange event on the player
   * and start/stop tracking accordingly.
   */handleDurationchange(){this.toggleTracking()}
/**
   * start/stop tracking
   */toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}
/**
   * start tracking live playback
   */startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,KE),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}
/**
   * handle the first timeupdate on the player if it wasn't already playing
   * when live tracker started tracking.
   */handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}
/**
   * Keep track of what time a seek starts, and listen for seeked
   * to find where a seek ends.
   */handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}
/**
   * handle the first play on the player, and make sure that we seek
   * right to the live edge.
   */handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}
/**
   * Stop tracking, and set all internal variables to
   * their initial value.
   */reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}
/**
   * The next seeked event is from the user. Meaning that any seek
   * > 2s behind live will be considered behind live for real and
   * liveTolerance will be ignored.
   */nextSeekedFromUser(){this.nextSeekedFromUser_=!0}
/**
   * stop tracking live playback
   */stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}
/**
   * A helper to get the player seekable end
   * so that we don't have to null check everywhere
   *
   * @return {number}
   *         The furthest seekable end or Infinity.
   */seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}
/**
   * A helper to get the player seekable start
   * so that we don't have to null check everywhere
   *
   * @return {number}
   *         The earliest seekable start or 0.
   */seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}
/**
   * Get the live time window aka
   * the amount of time between seekable start and
   * live current time.
   *
   * @return {number}
   *         The amount of seconds that are seekable in
   *         the live video.
   */liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}
/**
   * Determines if the player is live, only checks if this component
   * is tracking live playback or not
   *
   * @return {boolean}
   *         Whether liveTracker is tracking
   */isLive(){return this.isTracking()}
/**
   * Determines if currentTime is at the live edge and won't fall behind
   * on each seekableendchange
   *
   * @return {boolean}
   *         Whether playback is at the live edge
   */atLiveEdge(){return!this.behindLiveEdge()}
/**
   * get what we expect the live current time to be
   *
   * @return {number}
   *         The expected live current time
   */liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}
/**
   * The number of seconds that have occurred after seekable end
   * changed. This will be reset to 0 once seekable end changes.
   *
   * @return {number}
   *         Seconds past the current seekable end
   */pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}
/**
   * If we are currently behind the live edge, aka currentTime will be
   * behind on a seekableendchange
   *
   * @return {boolean}
   *         If we are behind the live edge
   */behindLiveEdge(){return this.behindLiveEdge_}
/**
   * Whether live tracker is currently tracking or not.
   */isTracking(){return"number"==typeof this.trackingInterval_}
/**
   * Seek to the live edge if we are behind the live edge
   */seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}
/**
   * Dispose of liveTracker
   */dispose(){this.stopTracking(),super.dispose()}});hw.registerComponent("TitleBar",class extends hw{constructor(e,t){super(e,t),this.on("statechanged",(e=>this.updateDom_())),this.updateDom_()}
/**
   * Create the `TitleBar`'s DOM element
   *
   * @return {Element}
   *         The element that was created.
   */createEl(){return this.els={title:jb("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${FE()}`}),description:jb("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${FE()}`})},jb("div",{className:"vjs-title-bar"},{},fb(this.els))}
/**
   * Updates the DOM based on the component's state object.
   */updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach((e=>{const n=this.state[e],s=this.els[e],r=i[e];hE(s),n&&Jb(s,n),t&&(t.removeAttribute(r),n&&t.setAttribute(r,s.id))})),this.state.title||this.state.description?this.show():this.hide()}
/**
   * Update the contents of the title bar component with new title and
   * description text.
   *
   * If both title and description are missing, the title bar will be hidden.
   *
   * If either title or description are present, the title bar will be visible.
   *
   * NOTE: Any previously set value will be preserved. To unset a previously
   * set value, you must pass an empty string or null.
   *
   * For example:
   *
   * ```
   * update({title: 'foo', description: 'bar'}) // title: 'foo', description: 'bar'
   * update({description: 'bar2'}) // title: 'foo', description: 'bar2'
   * update({title: ''}) // title: '', description: 'bar2'
   * update({title: 'foo', description: null}) // title: 'foo', description: null
   * ```
   *
   * @param  {Object} [options={}]
   *         An options object. When empty, the title bar will be hidden.
   *
   * @param  {string} [options.title]
   *         A title to display in the title bar.
   *
   * @param  {string} [options.description]
   *         A description to display in the title bar.
   */update(e){this.setState(e)}
/**
   * Dispose the component.
   */dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}});const P_={initialDisplay:4e3,position:[],takeFocus:!1};hw.registerComponent("TransientButton",class extends _Q{
/**
   * TransientButton constructor
   *
   * @param {Player} player The button's player
   * @param {TransientButtonOptions} options Options for the transient button
   */
constructor(e,t){super(e,t=pb(P_,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],(e=>{this.removeClass("force-display")}))}
/**
   * Return CSS class including position classes
   *
   * @return {string} CSS class list
   */buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(" ")}`}
/**
   * Create the button element
   *
   * @return {HTMLButtonElement} The button element
   */createEl(){const e=jb("button",{},{type:"button",class:this.buildCSSClass()},jb("span"));return this.controlTextEl_=e.querySelector("span"),e}
/**
   * Show the button. The button will remain visible for the `initialDisplay` time, default 4s,
   * and when there is user activity.
   */show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass("force-display")}),this.options_.initialDisplay)}
/**
   * Hide the display, even if during the `initialDisplay` time.
   */hide(){this.removeClass("force-display"),super.hide()}
/**
   * Dispose the component
   */dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const O_=e=>{const t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;const i=e.$$("source"),n=[];let s="";if(!i.length)return!1;for(let r=0;r<i.length;r++){const e=i[r].src;e&&-1===n.indexOf(e)&&n.push(e)}return!!n.length&&(1===n.length&&(s=n[0]),e.triggerSourceset(s),!0)},G_=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=gI.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=gI.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText="",lI.Element.prototype.appendChild.call(this,i),this.innerHTML}}),K_=(e,t)=>{let i={};for(let n=0;n<e.length&&(i=Object.getOwnPropertyDescriptor(e[n],t),!(i&&i.set&&i.get));n++);return i.enumerable=!0,i.configurable=!0,i},q_=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},n=(e=>K_([e.el(),lI.HTMLMediaElement.prototype,lI.Element.prototype,G_],"innerHTML"))(e),s=i=>(...n)=>{const s=i.apply(t,n);return O_(e),s};["append","appendChild","insertAdjacentHTML"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=s(i[e]))})),Object.defineProperty(t,"innerHTML",pb(n,{set:s(n.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,"innerHTML",n)},e.one("sourceset",t.resetSourceWatch_)},Y_=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?Gw(lI.Element.prototype.getAttribute.call(this,"src")):""},set(e){return lI.Element.prototype.setAttribute.call(this,"src",e),e}}),V_=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>K_([e.el(),lI.HTMLMediaElement.prototype,Y_],"src"))(e),n=t.setAttribute,s=t.load;Object.defineProperty(t,"src",pb(i,{set:n=>{const s=i.set.call(t,n);return e.triggerSourceset(t.src),s}})),t.setAttribute=(i,s)=>{const r=n.call(t,i,s);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=s.call(t);return O_(e)||(e.triggerSourceset(""),q_(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):O_(e)||q_(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=s,t.setAttribute=n,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class W_ extends tQ{
/**
  * Create an instance of this Tech.
  *
  * @param {Object} [options]
  *        The key/value store of player options.
  *
  * @param {Function} [ready]
  *        Callback function to call when the `HTML5` Tech is ready.
  */
constructor(e,t){super(e,t);const i=e.source;let n=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&"VIDEO"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const s=e[t];"track"===s.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(s),this.remoteTextTracks().addTrack(s.track),this.textTracks().addTrack(s.track),n||this.el_.hasAttribute("crossorigin")||!qw(s.src)||(n=!0)):i.push(s))}for(let n=0;n<i.length;n++)this.el_.removeChild(i[n])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&n&&ob.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),this.restoreMetadataTracksInIOSNativePlayer_(),(Ub||Mb)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}
/**
   * Dispose of `HTML5` media element and remove all tracks.
   */dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),W_.disposeMediaElement(this.el_),this.options_=null,super.dispose()}
/**
   * Modify the media element so that we can detect when
   * the source is changed. Fires `sourceset` just after the source has changed
   */setupSourcesetHandling_(){V_(this)}
/**
   * When a captions track is enabled in the iOS Safari native player, all other
   * tracks are disabled (including metadata tracks), which nulls all of their
   * associated cue points. This will restore metadata tracks to their pre-fullscreen
   * state in those cases so that cue points are not needlessly lost.
   *
   * @private
   */restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const n=e[i];"metadata"===n.kind&&t.push({track:n,storedMode:n.mode})}};i(),e.addEventListener("change",i),this.on("dispose",(()=>e.removeEventListener("change",i)));const n=()=>{for(let e=0;e<t.length;e++){const i=t[e];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(()=>{e.removeEventListener("change",i),e.removeEventListener("change",n),e.addEventListener("change",n)})),this.on("webkitendfullscreen",(()=>{e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",n)}))}
/**
   * Attempt to force override of tracks for the given type
   *
   * @param {string} type - Track type to override, possible values include 'Audio',
   * 'Video', and 'Text'.
   * @param {boolean} override - If set to true native audio/video will be overridden,
   * otherwise native audio/video will potentially be used.
   * @private
   */overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}
/**
   * Attempt to force override of native audio tracks.
   *
   * @param {boolean} override - If set to true native audio will be overridden,
   * otherwise native audio will potentially be used.
   */overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}
/**
   * Attempt to force override of native video tracks.
   *
   * @param {boolean} override - If set to true native video will be overridden,
   * otherwise native video will potentially be used.
   */overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}
/**
   * Proxy native track list events for the given type to our track
   * lists if the browser we are playing in supports that type of track list.
   *
   * @param {string} name - Track type; values include 'audio', 'video', and 'text'
   * @private
   */proxyNativeTracksForType_(e){const t=$w[e],i=this.el()[t.getterName],n=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const s={change:t=>{const i={type:"change",target:n,currentTarget:n,srcElement:n};n.trigger(i),"text"===e&&this[Zw.remoteText.getterName]().trigger(i)},addtrack(e){n.addTrack(e.track)},removetrack(e){n.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<n.length;t++){let s=!1;for(let e=0;e<i.length;e++)if(i[e]===n[t]){s=!0;break}s||e.push(n[t])}for(;e.length;)n.removeTrack(e.shift())};this[t.getterName+"Listeners_"]=s,Object.keys(s).forEach((e=>{const t=s[e];i.addEventListener(e,t),this.on("dispose",(n=>i.removeEventListener(e,t)))})),this.on("loadstart",r),this.on("dispose",(e=>this.off("loadstart",r)))}
/**
   * Proxy all native track list events to our track lists if the browser we are playing
   * in supports that type of track list.
   *
   * @private
   */proxyNativeTracks_(){$w.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}
/**
   * Create the `Html5` Tech's DOM element.
   *
   * @return {Element}
   *         The element that gets created.
   */createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),W_.disposeMediaElement(e),e=t}else{e=gI.createElement("video");const t=pb({},this.options_.tag&&iE(this.options_.tag));Ub&&!0===this.options_.nativeControlsForTouch||delete t.controls,tE(e,Object.assign(t,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&sE(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let i=0;i<t.length;i++){const n=t[i],s=this.options_[n];void 0!==s&&(s?sE(e,n,n):rE(e,n),e[n]=s)}return e}
/**
   * This will be triggered if the loadstart event has already fired, before videojs was
   * ready. Two known examples of when this can happen are:
   * 1. If we're loading the playback object after it has started loading
   * 2. The media is already playing the (often with autoplay on) then
   *
   * This function will fire another loadstart so that videojs can catchup.
   *
   * @fires Tech#loadstart
   *
   * @return {undefined}
   *         returns nothing.
   */handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on("loadstart",t);const i=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",i),void this.ready((function(){this.off("loadstart",t),this.off("loadedmetadata",i),e||this.trigger("loadstart")}))}const t=["loadstart"];t.push("loadedmetadata"),e.readyState>=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}
/**
   * Set whether we are scrubbing or not.
   * This is used to decide whether we should use `fastSeek` or not.
   * `fastSeek` is used to provide trick play on Safari browsers.
   *
   * @param {boolean} isScrubbing
   *                  - true for we are currently scrubbing
   *                  - false for we are no longer scrubbing
   */setScrubbing(e){this.isScrubbing_=e}
/**
   * Get whether we are scrubbing or not.
   *
   * @return {boolean} isScrubbing
   *                  - true for we are currently scrubbing
   *                  - false for we are no longer scrubbing
   */scrubbing(){return this.isScrubbing_}
/**
   * Set current time for the `HTML5` tech.
   *
   * @param {number} seconds
   *        Set the current time of the media to this.
   */setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ob?this.el_.fastSeek(e):this.el_.currentTime=e}catch(I2){ob(I2,"Video is not ready. (Video.js)")}}
/**
   * Get the current duration of the HTML5 media element.
   *
   * @return {number}
   *         The duration of the media or 0 if there is no duration.
   */duration(){if(this.el_.duration===1/0&&yb&&Qb&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}
/**
   * Get the current width of the HTML5 media element.
   *
   * @return {number}
   *         The width of the HTML5 media element.
   */width(){return this.el_.offsetWidth}
/**
   * Get the current height of the HTML5 media element.
   *
   * @return {number}
   *         The height of the HTML5 media element.
   */height(){return this.el_.offsetHeight}
/**
   * Proxy iOS `webkitbeginfullscreen` and `webkitendfullscreen` into
   * `fullscreenchange` event.
   *
   * @private
   * @fires fullscreenchange
   * @listens webkitendfullscreen
   * @listens webkitbeginfullscreen
   * @listens webkitbeginfullscreen
   */proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,
// set a flag in case another tech triggers fullscreenchange
nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",(()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)}))}
/**
   * Check if fullscreen is supported on the video el.
   *
   * @return {boolean}
   *         - True if fullscreen is supported.
   *         - False if fullscreen is not supported.
   */supportsFullScreen(){return"function"==typeof this.el_.webkitEnterFullScreen}
/**
   * Request that the `HTML5` Tech enter fullscreen.
   */enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)ww(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(I2){this.trigger("fullscreenerror",I2)}}),0);else try{e.webkitEnterFullScreen()}catch(I2){this.trigger("fullscreenerror",I2)}}
/**
   * Request that the `HTML5` Tech exit fullscreen.
   */exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}
/**
   * Create a floating video window always on top of other windows so that users may
   * continue consuming media while they interact with other content sites, or
   * applications on their device.
   *
   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}
   *
   * @return {Promise}
   *         A promise with a Picture-in-Picture window.
   */requestPictureInPicture(){return this.el_.requestPictureInPicture()}
/**
   * Native requestVideoFrameCallback if supported by browser/tech, or fallback
   * Don't use rVCF on Safari when DRM is playing, as it doesn't fire
   * Needs to be checked later than the constructor
   * This will be a false positive for clear sources loaded after a Fairplay source
   *
   * @param {function} cb function to call
   * @return {number} id of request
   */requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}
/**
   * Native or fallback requestVideoFrameCallback
   *
   * @param {number} id request id to cancel
   */cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}
/**
   * A getter/setter for the `Html5` Tech's source object.
   * > Note: Please use {@link Html5#setSource}
   *
   * @param {Tech~SourceObject} [src]
   *        The source object you want to set on the `HTML5` techs element.
   *
   * @return {Tech~SourceObject|undefined}
   *         - The current source object when a source is not passed in.
   *         - undefined when setting
   *
   * @deprecated Since version 5.
   */src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}
/**
   * Add a <source> element to the <video> element.
   *
   * @param {string} srcUrl
   *        The URL of the video source.
   *
   * @param {string} [mimeType]
   *        The MIME type of the video source. Optional but recommended.
   *
   * @return {boolean}
   *         Returns true if the source element was successfully added, false otherwise.
   */addSourceElement(e,t){if(!e)return ob.error("Invalid source URL."),!1;const i={src:e};t&&(i.type=t);const n=jb("source",{},i);return this.el_.appendChild(n),!0}
/**
   * Remove a <source> element from the <video> element by its URL.
   *
   * @param {string} srcUrl
   *        The URL of the source to remove.
   *
   * @return {boolean}
   *         Returns true if the source element was successfully removed, false otherwise.
   */removeSourceElement(e){if(!e)return ob.error("Source URL is required to remove the source element."),!1;const t=this.el_.querySelectorAll("source");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return ob.warn(`No matching source element found with src: ${e}`),!1}
/**
   * Reset the tech by removing all sources and then calling
   * {@link Html5.resetMediaElement}.
   */reset(){W_.resetMediaElement(this.el_)}
/**
   * Get the current source on the `HTML5` Tech. Falls back to returning the source from
   * the HTML5 media element.
   *
   * @return {Tech~SourceObject}
   *         The current source object from the HTML5 tech. With a fallback to the
   *         elements source.
   */currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}
/**
   * Set controls attribute for the HTML5 media Element.
   *
   * @param {string} val
   *        Value to set the controls attribute to
   */setControls(e){this.el_.controls=!!e}
/**
   * Create and returns a remote {@link TextTrack} object.
   *
   * @param {string} kind
   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)
   *
   * @param {string} [label]
   *        Label to identify the text track
   *
   * @param {string} [language]
   *        Two letter language abbreviation
   *
   * @return {TextTrack}
   *         The TextTrack that gets created.
   */addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}
/**
   * Creates either native TextTrack or an emulated TextTrack depending
   * on the value of `featuresNativeTextTracks`
   *
   * @param {Object} options
   *        The object should contain the options to initialize the TextTrack with.
   *
   * @param {string} [options.kind]
   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).
   *
   * @param {string} [options.label]
   *        Label to identify the text track
   *
   * @param {string} [options.language]
   *        Two letter language abbreviation.
   *
   * @param {boolean} [options.default]
   *        Default this track to on.
   *
   * @param {string} [options.id]
   *        The internal id to assign this track.
   *
   * @param {string} [options.src]
   *        A source url for the track.
   *
   * @return {HTMLTrackElement}
   *         The track element that gets created.
   */createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=gI.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}
/**
   * Creates a remote text track object and returns an html track element.
   *
   * @param {Object} options The object should contain values for
   * kind, language, label, and src (location of the WebVTT file)
   * @param {boolean} [manualCleanup=false] if set to true, the TextTrack
   * will not be removed from the TextTrackList and HtmlTrackElementList
   * after a source change
   * @return {HTMLTrackElement} An Html Track Element.
   * This can be an emulated {@link HTMLTrackElement} or a native one.
   *
   */addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}
/**
   * Remove remote `TextTrack` from `TextTrackList` object
   *
   * @param {TextTrack} track
   *        `TextTrack` object to remove
   */removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}
/**
   * Gets available media playback quality metrics as specified by the W3C's Media
   * Playback Quality API.
   *
   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}
   *
   * @return {Object}
   *         An object with supported media playback quality metrics
   */getVideoPlaybackQuality(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),lI.performance&&(e.creationTime=lI.performance.now()),e}}mb(W_,"TEST_VID",(function(){if(!qb())return;const e=gI.createElement("video"),t=gI.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e})),W_.isSupported=function(){try{W_.TEST_VID.volume=.5}catch(I2){return!1}return!(!W_.TEST_VID||!W_.TEST_VID.canPlayType)},W_.canPlayType=function(e){return W_.TEST_VID.canPlayType(e)},W_.canPlaySource=function(e,t){return W_.canPlayType(e.type)},W_.canControlVolume=function(){try{const e=W_.TEST_VID.volume;W_.TEST_VID.volume=e/2+.1;const t=e!==W_.TEST_VID.volume;return t&&Pb?(lI.setTimeout((()=>{W_&&W_.prototype&&(W_.prototype.featuresVolumeControl=e!==W_.TEST_VID.volume)})),!1):t}catch(I2){return!1}},W_.canMuteVolume=function(){try{const e=W_.TEST_VID.muted;return W_.TEST_VID.muted=!e,W_.TEST_VID.muted?sE(W_.TEST_VID,"muted","muted"):rE(W_.TEST_VID,"muted"),e!==W_.TEST_VID.muted}catch(I2){return!1}},W_.canControlPlaybackRate=function(){if(yb&&Qb&&Sb<58)return!1;try{const e=W_.TEST_VID.playbackRate;return W_.TEST_VID.playbackRate=e/2+.1,e!==W_.TEST_VID.playbackRate}catch(I2){return!1}},W_.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(gI.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(gI.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(gI.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(gI.createElement("audio"),"innerHTML",{get:e,set:e})}catch(I2){return!1}return!0},W_.supportsNativeTextTracks=function(){return Ob||Pb&&Qb},W_.supportsNativeVideoTracks=function(){return!(!W_.TEST_VID||!W_.TEST_VID.videoTracks)},W_.supportsNativeAudioTracks=function(){return!(!W_.TEST_VID||!W_.TEST_VID.audioTracks)},W_.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function([e,t]){mb(W_.prototype,e,(()=>W_[t]()),!0)})),W_.prototype.featuresVolumeControl=W_.canControlVolume(),W_.prototype.movingMediaElementInDOM=!Pb,W_.prototype.featuresFullscreenResize=!0,W_.prototype.featuresProgressEvents=!0,W_.prototype.featuresTimeupdateEvents=!0,W_.prototype.featuresVideoFrameCallback=!(!W_.TEST_VID||!W_.TEST_VID.requestVideoFrameCallback),W_.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(I2){}}()}},W_.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll("source");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(I2){}}()},[
/**
   * Get the value of `muted` from the media element. `muted` indicates
   * that the volume for the media should be set to silent. This does not actually change
   * the `volume` attribute.
   *
   * @method Html5#muted
   * @return {boolean}
   *         - True if the value of `volume` should be ignored and the audio set to silent.
   *         - False if the value of `volume` should be used.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}
   */
"muted",
/**
   * Get the value of `defaultMuted` from the media element. `defaultMuted` indicates
   * whether the media should start muted or not. Only changes the default state of the
   * media. `muted` and `defaultMuted` can have different values. {@link Html5#muted} indicates the
   * current state.
   *
   * @method Html5#defaultMuted
   * @return {boolean}
   *         - The value of `defaultMuted` from the media element.
   *         - True indicates that the media should start muted.
   *         - False indicates that the media should not start muted
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}
   */
"defaultMuted",
/**
   * Get the value of `autoplay` from the media element. `autoplay` indicates
   * that the media should start to play as soon as the page is ready.
   *
   * @method Html5#autoplay
   * @return {boolean}
   *         - The value of `autoplay` from the media element.
   *         - True indicates that the media should start as soon as the page loads.
   *         - False indicates that the media should not start as soon as the page loads.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}
   */
"autoplay",
/**
   * Get the value of `controls` from the media element. `controls` indicates
   * whether the native media controls should be shown or hidden.
   *
   * @method Html5#controls
   * @return {boolean}
   *         - The value of `controls` from the media element.
   *         - True indicates that native controls should be showing.
   *         - False indicates that native controls should be hidden.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-controls}
   */
"controls",
/**
   * Get the value of `loop` from the media element. `loop` indicates
   * that the media should return to the start of the media and continue playing once
   * it reaches the end.
   *
   * @method Html5#loop
   * @return {boolean}
   *         - The value of `loop` from the media element.
   *         - True indicates that playback should seek back to start once
   *           the end of a media is reached.
   *         - False indicates that playback should not loop back to the start when the
   *           end of the media is reached.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}
   */
"loop",
/**
   * Get the value of `playsinline` from the media element. `playsinline` indicates
   * to the browser that non-fullscreen playback is preferred when fullscreen
   * playback is the native default, such as in iOS Safari.
   *
   * @method Html5#playsinline
   * @return {boolean}
   *         - The value of `playsinline` from the media element.
   *         - True indicates that the media should play inline.
   *         - False indicates that the media should not play inline.
   *
   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}
   */
"playsinline"].forEach((function(e){W_.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),[
/**
   * Set the value of `muted` on the media element. `muted` indicates that the current
   * audio level should be silent.
   *
   * @method Html5#setMuted
   * @param {boolean} muted
   *        - True if the audio should be set to silent
   *        - False otherwise
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}
   */
"muted",
/**
   * Set the value of `defaultMuted` on the media element. `defaultMuted` indicates that the current
   * audio level should be silent, but will only effect the muted level on initial playback..
   *
   * @method Html5.prototype.setDefaultMuted
   * @param {boolean} defaultMuted
   *        - True if the audio should be set to silent
   *        - False otherwise
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}
   */
"defaultMuted",
/**
   * Set the value of `autoplay` on the media element. `autoplay` indicates
   * that the media should start to play as soon as the page is ready.
   *
   * @method Html5#setAutoplay
   * @param {boolean} autoplay
   *         - True indicates that the media should start as soon as the page loads.
   *         - False indicates that the media should not start as soon as the page loads.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}
   */
"autoplay",
/**
   * Set the value of `loop` on the media element. `loop` indicates
   * that the media should return to the start of the media and continue playing once
   * it reaches the end.
   *
   * @method Html5#setLoop
   * @param {boolean} loop
   *         - True indicates that playback should seek back to start once
   *           the end of a media is reached.
   *         - False indicates that playback should not loop back to the start when the
   *           end of the media is reached.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}
   */
"loop",
/**
   * Set the value of `playsinline` from the media element. `playsinline` indicates
   * to the browser that non-fullscreen playback is preferred when fullscreen
   * playback is the native default, such as in iOS Safari.
   *
   * @method Html5#setPlaysinline
   * @param {boolean} playsinline
   *         - True indicates that the media should play inline.
   *         - False indicates that the media should not play inline.
   *
   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}
   */
"playsinline"].forEach((function(e){W_.prototype["set"+Aw(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),[
/**
   * Get the value of `paused` from the media element. `paused` indicates whether the media element
   * is currently paused or not.
   *
   * @method Html5#paused
   * @return {boolean}
   *         The value of `paused` from the media element.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-paused}
   */
"paused",
/**
   * Get the value of `currentTime` from the media element. `currentTime` indicates
   * the current second that the media is at in playback.
   *
   * @method Html5#currentTime
   * @return {number}
   *         The value of `currentTime` from the media element.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-currenttime}
   */
"currentTime",
/**
   * Get the value of `buffered` from the media element. `buffered` is a `TimeRange`
   * object that represents the parts of the media that are already downloaded and
   * available for playback.
   *
   * @method Html5#buffered
   * @return {TimeRange}
   *         The value of `buffered` from the media element.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered}
   */
"buffered",
/**
   * Get the value of `volume` from the media element. `volume` indicates
   * the current playback volume of audio for a media. `volume` will be a value from 0
   * (silent) to 1 (loudest and default).
   *
   * @method Html5#volume
   * @return {number}
   *         The value of `volume` from the media element. Value will be between 0-1.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}
   */
"volume",
/**
   * Get the value of `poster` from the media element. `poster` indicates
   * that the url of an image file that can/will be shown when no media data is available.
   *
   * @method Html5#poster
   * @return {string}
   *         The value of `poster` from the media element. Value will be a url to an
   *         image.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-video-poster}
   */
"poster",
/**
   * Get the value of `preload` from the media element. `preload` indicates
   * what should download before the media is interacted with. It can have the following
   * values:
   * - none: nothing should be downloaded
   * - metadata: poster and the first few frames of the media may be downloaded to get
   *   media dimensions and other metadata
   * - auto: allow the media and metadata for the media to be downloaded before
   *    interaction
   *
   * @method Html5#preload
   * @return {string}
   *         The value of `preload` from the media element. Will be 'none', 'metadata',
   *         or 'auto'.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}
   */
"preload",
/**
   * Get the value of the `error` from the media element. `error` indicates any
   * MediaError that may have occurred during playback. If error returns null there is no
   * current error.
   *
   * @method Html5#error
   * @return {MediaError|null}
   *         The value of `error` from the media element. Will be `MediaError` if there
   *         is a current error and null otherwise.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-error}
   */
"error",
/**
   * Get the value of `seeking` from the media element. `seeking` indicates whether the
   * media is currently seeking to a new position or not.
   *
   * @method Html5#seeking
   * @return {boolean}
   *         - The value of `seeking` from the media element.
   *         - True indicates that the media is currently seeking to a new position.
   *         - False indicates that the media is not seeking to a new position at this time.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seeking}
   */
"seeking",
/**
   * Get the value of `seekable` from the media element. `seekable` returns a
   * `TimeRange` object indicating ranges of time that can currently be `seeked` to.
   *
   * @method Html5#seekable
   * @return {TimeRange}
   *         The value of `seekable` from the media element. A `TimeRange` object
   *         indicating the current ranges of time that can be seeked to.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seekable}
   */
"seekable",
/**
   * Get the value of `ended` from the media element. `ended` indicates whether
   * the media has reached the end or not.
   *
   * @method Html5#ended
   * @return {boolean}
   *         - The value of `ended` from the media element.
   *         - True indicates that the media has ended.
   *         - False indicates that the media has not ended.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-ended}
   */
"ended",
/**
   * Get the value of `playbackRate` from the media element. `playbackRate` indicates
   * the rate at which the media is currently playing back. Examples:
   *   - if playbackRate is set to 2, media will play twice as fast.
   *   - if playbackRate is set to 0.5, media will play half as fast.
   *
   * @method Html5#playbackRate
   * @return {number}
   *         The value of `playbackRate` from the media element. A number indicating
   *         the current playback speed of the media, where 1 is normal speed.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}
   */
"playbackRate",
/**
   * Get the value of `defaultPlaybackRate` from the media element. `defaultPlaybackRate` indicates
   * the rate at which the media is currently playing back. This value will not indicate the current
   * `playbackRate` after playback has started, use {@link Html5#playbackRate} for that.
   *
   * Examples:
   *   - if defaultPlaybackRate is set to 2, media will play twice as fast.
   *   - if defaultPlaybackRate is set to 0.5, media will play half as fast.
   *
   * @method Html5.prototype.defaultPlaybackRate
   * @return {number}
   *         The value of `defaultPlaybackRate` from the media element. A number indicating
   *         the current playback speed of the media, where 1 is normal speed.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}
   */
"defaultPlaybackRate",
/**
   * Get the value of 'disablePictureInPicture' from the video element.
   *
   * @method Html5#disablePictureInPicture
   * @return {boolean} value
   *         - The value of `disablePictureInPicture` from the video element.
   *         - True indicates that the video can't be played in Picture-In-Picture mode
   *         - False indicates that the video can be played in Picture-In-Picture mode
   *
   * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip}
   */
"disablePictureInPicture",
/**
   * Get the value of `played` from the media element. `played` returns a `TimeRange`
   * object representing points in the media timeline that have been played.
   *
   * @method Html5#played
   * @return {TimeRange}
   *         The value of `played` from the media element. A `TimeRange` object indicating
   *         the ranges of time that have been played.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-played}
   */
"played",
/**
   * Get the value of `networkState` from the media element. `networkState` indicates
   * the current network state. It returns an enumeration from the following list:
   * - 0: NETWORK_EMPTY
   * - 1: NETWORK_IDLE
   * - 2: NETWORK_LOADING
   * - 3: NETWORK_NO_SOURCE
   *
   * @method Html5#networkState
   * @return {number}
   *         The value of `networkState` from the media element. This will be a number
   *         from the list in the description.
   *
   * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-networkstate}
   */
"networkState",
/**
   * Get the value of `readyState` from the media element. `readyState` indicates
   * the current state of the media element. It returns an enumeration from the
   * following list:
   * - 0: HAVE_NOTHING
   * - 1: HAVE_METADATA
   * - 2: HAVE_CURRENT_DATA
   * - 3: HAVE_FUTURE_DATA
   * - 4: HAVE_ENOUGH_DATA
   *
   * @method Html5#readyState
   * @return {number}
   *         The value of `readyState` from the media element. This will be a number
   *         from the list in the description.
   *
   * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#ready-states}
   */
"readyState",
/**
   * Get the value of `videoWidth` from the video element. `videoWidth` indicates
   * the current width of the video in css pixels.
   *
   * @method Html5#videoWidth
   * @return {number}
   *         The value of `videoWidth` from the video element. This will be a number
   *         in css pixels.
   *
   * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}
   */
"videoWidth",
/**
   * Get the value of `videoHeight` from the video element. `videoHeight` indicates
   * the current height of the video in css pixels.
   *
   * @method Html5#videoHeight
   * @return {number}
   *         The value of `videoHeight` from the video element. This will be a number
   *         in css pixels.
   *
   * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}
   */
"videoHeight",
/**
   * Get the value of `crossOrigin` from the media element. `crossOrigin` indicates
   * to the browser that should sent the cookies along with the requests for the
   * different assets/playlists
   *
   * @method Html5#crossOrigin
   * @return {string}
   *         - anonymous indicates that the media should not sent cookies.
   *         - use-credentials indicates that the media should sent cookies along the requests.
   *
   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}
   */
"crossOrigin"].forEach((function(e){W_.prototype[e]=function(){return this.el_[e]}})),[
/**
   * Set the value of `volume` on the media element. `volume` indicates the current
   * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and
   * so on.
   *
   * @method Html5#setVolume
   * @param {number} percentAsDecimal
   *        The volume percent as a decimal. Valid range is from 0-1.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}
   */
"volume",
/**
   * Set the value of `src` on the media element. `src` indicates the current
   * {@link Tech~SourceObject} for the media.
   *
   * @method Html5#setSrc
   * @param {Tech~SourceObject} src
   *        The source object to set as the current source.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-src}
   */
"src",
/**
   * Set the value of `poster` on the media element. `poster` is the url to
   * an image file that can/will be shown when no media data is available.
   *
   * @method Html5#setPoster
   * @param {string} poster
   *        The url to an image that should be used as the `poster` for the media
   *        element.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-poster}
   */
"poster",
/**
   * Set the value of `preload` on the media element. `preload` indicates
   * what should download before the media is interacted with. It can have the following
   * values:
   * - none: nothing should be downloaded
   * - metadata: poster and the first few frames of the media may be downloaded to get
   *   media dimensions and other metadata
   * - auto: allow the media and metadata for the media to be downloaded before
   *    interaction
   *
   * @method Html5#setPreload
   * @param {string} preload
   *         The value of `preload` to set on the media element. Must be 'none', 'metadata',
   *         or 'auto'.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}
   */
"preload",
/**
   * Set the value of `playbackRate` on the media element. `playbackRate` indicates
   * the rate at which the media should play back. Examples:
   *   - if playbackRate is set to 2, media will play twice as fast.
   *   - if playbackRate is set to 0.5, media will play half as fast.
   *
   * @method Html5#setPlaybackRate
   * @return {number}
   *         The value of `playbackRate` from the media element. A number indicating
   *         the current playback speed of the media, where 1 is normal speed.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}
   */
"playbackRate",
/**
   * Set the value of `defaultPlaybackRate` on the media element. `defaultPlaybackRate` indicates
   * the rate at which the media should play back upon initial startup. Changing this value
   * after a video has started will do nothing. Instead you should used {@link Html5#setPlaybackRate}.
   *
   * Example Values:
   *   - if playbackRate is set to 2, media will play twice as fast.
   *   - if playbackRate is set to 0.5, media will play half as fast.
   *
   * @method Html5.prototype.setDefaultPlaybackRate
   * @return {number}
   *         The value of `defaultPlaybackRate` from the media element. A number indicating
   *         the current playback speed of the media, where 1 is normal speed.
   *
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultplaybackrate}
   */
"defaultPlaybackRate",
/**
   * Prevents the browser from suggesting a Picture-in-Picture context menu
   * or to request Picture-in-Picture automatically in some cases.
   *
   * @method Html5#setDisablePictureInPicture
   * @param {boolean} value
   *         The true value will disable Picture-in-Picture mode.
   *
   * @see [Spec]{@link https://w3c.github.io/picture-in-picture/#disable-pip}
   */
"disablePictureInPicture",
/**
   * Set the value of `crossOrigin` from the media element. `crossOrigin` indicates
   * to the browser that should sent the cookies along with the requests for the
   * different assets/playlists
   *
   * @method Html5#setCrossOrigin
   * @param {string} crossOrigin
   *         - anonymous indicates that the media should not sent cookies.
   *         - use-credentials indicates that the media should sent cookies along the requests.
   *
   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}
   */
"crossOrigin"].forEach((function(e){W_.prototype["set"+Aw(e)]=function(t){this.el_[e]=t}})),[
/**
   * A wrapper around the media elements `pause` function. This will call the `HTML5`
   * media elements `pause` function.
   *
   * @method Html5#pause
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-pause}
   */
"pause",
/**
   * A wrapper around the media elements `load` function. This will call the `HTML5`s
   * media element `load` function.
   *
   * @method Html5#load
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-load}
   */
"load",
/**
   * A wrapper around the media elements `play` function. This will call the `HTML5`s
   * media element `play` function.
   *
   * @method Html5#play
   * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-play}
   */
"play"].forEach((function(e){W_.prototype[e]=function(){return this.el_[e]()}})),tQ.withSourceHandlers(W_),W_.nativeSourceHandler={},W_.nativeSourceHandler.canPlayType=function(e){try{return W_.TEST_VID.canPlayType(e)}catch(I2){return""}},W_.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return W_.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=Kw(e.src);return W_.nativeSourceHandler.canPlayType(`video/${t}`)}return""},W_.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},W_.nativeSourceHandler.dispose=function(){},W_.registerSourceHandler(W_.nativeSourceHandler),tQ.registerTech("Html5",W_);const j_=[
/**
   * Fired while the user agent is downloading media data.
   *
   * @event Player#progress
   * @type {Event}
   */
/**
   * Retrigger the `progress` event that was triggered by the {@link Tech}.
   *
   * @private
   * @method Player#handleTechProgress_
   * @fires Player#progress
   * @listens Tech#progress
   */
"progress",
/**
   * Fires when the loading of an audio/video is aborted.
   *
   * @event Player#abort
   * @type {Event}
   */
/**
   * Retrigger the `abort` event that was triggered by the {@link Tech}.
   *
   * @private
   * @method Player#handleTechAbort_
   * @fires Player#abort
   * @listens Tech#abort
   */
"abort",
/**
   * Fires when the browser is intentionally not getting media data.
   *
   * @event Player#suspend
   * @type {Event}
   */
/**
   * Retrigger the `suspend` event that was triggered by the {@link Tech}.
   *
   * @private
   * @method Player#handleTechSuspend_
   * @fires Player#suspend
   * @listens Tech#suspend
   */
"suspend",
/**
   * Fires when the current playlist is empty.
   *
   * @event Player#emptied
   * @type {Event}
   */
/**
   * Retrigger the `emptied` event that was triggered by the {@link Tech}.
   *
   * @private
   * @method Player#handleTechEmptied_
   * @fires Player#emptied
   * @listens Tech#emptied
   */
"emptied",
/**
   * Fires when the browser is trying to get media data, but data is not available.
   *
   * @event Player#stalled
   * @type {Event}
   */
/**
   * Retrigger the `stalled` event that was triggered by the {@link Tech}.
   *
   * @private
   * @method Player#handleTechStalled_
   * @fires Player#stalled
   * @listens Tech#stalled
   */
"stalled",
/**
   * Fires when the browser has loaded meta data for the audio/video.
   *
   * @event Player#loadedmetadata
   * @type {Event}
   */
/**
   * Retrigger the `loadedmetadata` event that was triggered by the {@link Tech}.
   *
   * @private
   * @method Player#handleTechLoadedmetadata_
   * @fires Player#loadedmetadata
   * @listens Tech#loadedmetadata
   */
"loadedmetadata",
/**
   * Fires when the browser has loaded the current frame of the audio/video.
   *
   * @event Player#loadeddata
   * @type {event}
   */
/**
   * Retrigger the `loadeddata` event that was triggered by the {@link Tech}.
   *
   * @private
   * @method Player#handleTechLoaddeddata_
   * @fires Player#loadeddata
   * @listens Tech#loadeddata
   */
"loadeddata",
/**
   * Fires when the current playback position has changed.
   *
   * @event Player#timeupdate
   * @type {event}
   */
/**
   * Retrigger the `timeupdate` event that was triggered by the {@link Tech}.
   *
   * @private
   * @method Player#handleTechTimeUpdate_
   * @fires Player#timeupdate
   * @listens Tech#timeupdate
   */
"timeupdate",
/**
   * Fires when the video's intrinsic dimensions change
   *
   * @event Player#resize
   * @type {event}
   */
/**
   * Retrigger the `resize` event that was triggered by the {@link Tech}.
   *
   * @private
   * @method Player#handleTechResize_
   * @fires Player#resize
   * @listens Tech#resize
   */
"resize",
/**
   * Fires when the volume has been changed
   *
   * @event Player#volumechange
   * @type {event}
   */
/**
   * Retrigger the `volumechange` event that was triggered by the {@link Tech}.
   *
   * @private
   * @method Player#handleTechVolumechange_
   * @fires Player#volumechange
   * @listens Tech#volumechange
   */
"volumechange",
/**
   * Fires when the text track has been changed
   *
   * @event Player#texttrackchange
   * @type {event}
   */
/**
   * Retrigger the `texttrackchange` event that was triggered by the {@link Tech}.
   *
   * @private
   * @method Player#handleTechTexttrackchange_
   * @fires Player#texttrackchange
   * @listens Tech#texttrackchange
   */
"texttrackchange"],J_={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},z_=["tiny","xsmall","small","medium","large","xlarge","huge"],X_={};z_.forEach((e=>{const t="x"===e.charAt(0)?`x-${e.substring(1)}`:e;X_[e]=`vjs-layout-${t}`}));const $_={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class Z_ extends hw{
/**
   * Create an instance of this class.
   *
   * @param {Element} tag
   *        The original video DOM element used for configuring options.
   *
   * @param {Object} [options]
   *        Object of option names and values.
   *
   * @param {PlayerReadyCallback} [ready]
   *        Ready callback function.
   */
constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${FE()}`,(t=Object.assign(Z_.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest("[lang]");i&&(t.language=i.getAttribute("lang"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=lb(this.id_),this.fsApi_=ib,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&iE(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=Z_.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if("function"!=typeof this[e])throw new Error(`plugin "${e}" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),rw(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(LE(gI,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const n=pb(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})),t.debug&&this.debug(!0),this.options_.playerOptions=n,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new lI.DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg">\n  <defs>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-play">\n      <path d="M16 10v28l22-14z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-pause">\n      <path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-audio">\n      <path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-captions">\n      <path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">\n      <path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">\n      <path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">\n      <path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">\n      <path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">\n      <path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">\n      <path d="M14 18v12h8l10 10V8L22 18h-8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">\n      <path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">\n      <path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-spinner">\n      <path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>\n    </symbol>\n    <symbol viewBox="0 0 24 24" id="vjs-icon-hd">\n      <path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-chapters">\n      <path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>\n    </symbol>\n    <symbol viewBox="0 0 40 40" id="vjs-icon-downloading">\n      <path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download">\n      <path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">\n      <path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">\n      <path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-share">\n      <path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-cog">\n      <path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-square">\n      <path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-circle">\n      <circle cx="24" cy="24" r="20"></circle>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">\n      <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">\n      <path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-cancel">\n      <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-replay">\n      <path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-repeat">\n      <path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">\n      <path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">\n      <path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">\n      <path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">\n      <path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">\n      <path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">\n      <path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>\n    </symbol>\n    <symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">\n      <g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-next-item">\n      <path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">\n      <path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">\n      <path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-cast">\n      <path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">\n      <path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>\n    </symbol>\n    <symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">\n      <path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>\n      <path fill="none" d="M-1-3h24v24H-1z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">\n      <path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">\n      <path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">\n      <path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">\n      <path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">\n      <path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>\n    </symbol>\n  </defs>\n</svg>',"image/svg+xml");if(e.querySelector("parsererror"))ob.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display="none",this.el_.appendChild(t),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio("audio"===e.nodeName.toLowerCase()),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new CQ(this),this.addClass("vjs-spatial-navigation-enabled")),Ub&&this.addClass("vjs-touch-enabled"),Pb||this.addClass("vjs-workinghover"),Z_.players[this.id_]=this;const s=$y.split(".")[0];this.addClass(`vjs-v${s}`),this.userActive(!0),this.reportUserActivity(),this.one("play",(e=>this.listenForUserActivity_(e))),this.on("keydown",(e=>this.handleKeyDown(e))),this.on("languagechange",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}
/**
   * Destroys the video player and does any necessary cleanup.
   *
   * This is especially helpful if you are dynamically adding and removing videos
   * to/from the DOM.
   *
   * @fires Player#dispose
   */dispose(){var e;this.trigger("dispose"),this.off("dispose"),UE(gI,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),UE(gI,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),Z_.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),e=this,nQ.hasOwnProperty(e.id())&&delete nQ[e.id()],eQ.names.forEach((e=>{const t=this[eQ[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}
/**
   * Create the `Player`'s DOM element.
   *
   * @return {Element}
   *         The DOM element that gets created.
   */createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");const n="video-js"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:n||(e=this.el_=super.createEl("div"));const s=iE(t);if(n){for(e=this.el_=t,t=this.tag=gI.createElement("video");e.children.length;)t.appendChild(e.firstChild);Xb(e,"video-js")||$b(e,"video-js"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(I2){}}))}t.setAttribute("tabindex","-1"),s.tabindex="-1",Qb&&Fb&&(t.setAttribute("role","application"),s.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(i){n&&"class"===i||e.setAttribute(i,s[i]),n&&t.setAttribute(i,s[i])})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=e.player=this,this.addClass("vjs-paused");const r=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter((e=>Gb[e])).map((e=>"vjs-device-"+e.substring(3).toLowerCase().replace(/\_/g,"-")));if(this.addClass(...r),!0!==lI.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=_E("vjs-styles-dimensions");const e=mE(".vjs-styles-defaults"),t=mE("head");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=t.getElementsByTagName("a");for(let o=0;o<a.length;o++){const e=a.item(o);$b(e,"vjs-hidden"),e.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),zb(t,e),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=e,e}
/**
   * Get or set the `Player`'s crossOrigin option. For the HTML5 player, this
   * sets the `crossOrigin` property on the `<video>` tag to control the CORS
   * behavior.
   *
   * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}
   *
   * @param {string|null} [value]
   *        The value to set the `Player`'s crossOrigin to. If an argument is
   *        given, must be one of `'anonymous'` or `'use-credentials'`, or 'null'.
   *
   * @return {string|null|undefined}
   *         - The current crossOrigin value of the `Player` when getting.
   *         - undefined when setting
   */crossOrigin(e){if(void 0===e)return this.techGet_("crossOrigin");null===e||"anonymous"===e||"use-credentials"===e?(this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)):ob.warn(`crossOrigin must be null,  "anonymous" or "use-credentials", given "${e}"`)}
/**
   * A getter/setter for the `Player`'s width. Returns the player's configured value.
   * To get the current width use `currentWidth()`.
   *
   * @param {number|string} [value]
   *        CSS value to set the `Player`'s width to.
   *
   * @return {number|undefined}
   *         - The current width of the `Player` when getting.
   *         - Nothing when setting
   */width(e){return this.dimension("width",e)}
/**
   * A getter/setter for the `Player`'s height. Returns the player's configured value.
   * To get the current height use `currentheight()`.
   *
   * @param {number|string} [value]
   *        CSS value to set the `Player`'s height to.
   *
   * @return {number|undefined}
   *         - The current height of the `Player` when getting.
   *         - Nothing when setting
   */height(e){return this.dimension("height",e)}
/**
   * A getter/setter for the `Player`'s width & height.
   *
   * @param {string} dimension
   *        This string can be:
   *        - 'width'
   *        - 'height'
   *
   * @param {number|string} [value]
   *        Value for dimension specified in the first argument.
   *
   * @return {number}
   *         The dimension arguments value when getting (width/height).
   */dimension(e,t){const i=e+"_";if(void 0===t)return this[i]||0;if(""===t||"auto"===t)return this[i]=void 0,void this.updateStyleEl_();const n=parseFloat(t);isNaN(n)?ob.error(`Improper value "${t}" supplied for for ${e}`):(this[i]=n,this.updateStyleEl_())}
/**
   * A getter/setter/toggler for the vjs-fluid `className` on the `Player`.
   *
   * Turning this on will turn off fill mode.
   *
   * @param {boolean} [bool]
   *        - A value of true adds the class.
   *        - A value of false removes the class.
   *        - No value will be a getter.
   *
   * @return {boolean|undefined}
   *         - The value of fluid when getting.
   *         - `undefined` when setting.
   */fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,XE(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),i=()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)},XE(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass("vjs-fluid"),this.updateStyleEl_()}
/**
   * A getter/setter/toggler for the vjs-fill `className` on the `Player`.
   *
   * Turning this on will turn off fluid mode.
   *
   * @param {boolean} [bool]
   *        - A value of true adds the class.
   *        - A value of false removes the class.
   *        - No value will be a getter.
   *
   * @return {boolean|undefined}
   *         - The value of fluid when getting.
   *         - `undefined` when setting.
   */fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}
/**
   * Get/Set the aspect ratio
   *
   * @param {string} [ratio]
   *        Aspect ratio for player
   *
   * @return {string|undefined}
   *         returns the current aspect ratio when getting
   */
/**
   * A getter/setter for the `Player`'s aspect ratio.
   *
   * @param {string} [ratio]
   *        The value to set the `Player`'s aspect ratio to.
   *
   * @return {string|undefined}
   *         - The current aspect ratio of the `Player` when getting.
   *         - undefined when setting
   */aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}
/**
   * Update styles of the `Player` element (height, width and aspect ratio).
   *
   * @private
   * @listens Tech#loadedmetadata
   */updateStyleEl_(){if(!0===lI.VIDEOJS_NO_DYNAMIC_STYLE){const e="number"==typeof this.width_?this.width_:this.options_.width,t="number"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,n;i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";const s=i.split(":"),r=s[1]/s[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),SE(this.styleEl_,`\n      .${n} {\n        width: ${e}px;\n        height: ${t}px;\n      }\n\n      .${n}.vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: ${100*r}%;\n      }\n    `)}
/**
   * Load/Create an instance of playback {@link Tech} including element
   * and API methods. Then append the `Tech` element in `Player` as a child.
   *
   * @param {string} techName
   *        name of the playback technology
   *
   * @param {string} source
   *        video source
   *
   * @private
   */loadTech_(e,t){this.tech_&&this.unloadTech_();const i=Aw(e),n=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(tQ.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let s=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(s=!1);const r={source:t,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${n}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};eQ.names.forEach((e=>{const t=eQ[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[n]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=tQ.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(r),this.tech_.ready(qE(this,this.handleTechReady_),!0),Sw(this.textTracksJson_||[],this.tech_),j_.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${Aw(e)}_`](t)))})),Object.keys(J_).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${J_[e]}_`].bind(this),event:t}):this[`handleTech${J_[e]}_`](t)}))})),this.on(this.tech_,"loadstart",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,"sourceset",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,"waiting",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,"ended",(e=>this.handleTechEnded_(e))),this.on(this.tech_,"seeking",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,"play",(e=>this.handleTechPlay_(e))),this.on(this.tech_,"pause",(e=>this.handleTechPause_(e))),this.on(this.tech_,"durationchange",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,"fullscreenchange",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,"fullscreenerror",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,"enterpictureinpicture",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,"leavepictureinpicture",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,"error",(e=>this.handleTechError_(e))),this.on(this.tech_,"posterchange",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,"textdata",(e=>this.handleTechTextData_(e))),this.on(this.tech_,"ratechange",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||zb(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}
/**
   * Unload and dispose of the current playback {@link Tech}.
   *
   * @private
   */unloadTech_(){eQ.names.forEach((e=>{const t=eQ[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=_w(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}
/**
   * Return a reference to the current {@link Tech}.
   * It will print a warning by default about the danger of using the tech directly
   * but any argument that is passed in will silence the warning.
   *
   * @param {*} [safety]
   *        Anything passed in to silence the warning
   *
   * @return {Tech}
   *         The Tech
   */tech(e){return void 0===e&&ob.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_}
/**
   * An object that contains Video.js version.
   *
   * @typedef {Object} PlayerVersion
   *
   * @property {string} 'video.js' - Video.js version
   */
/**
   * Returns an object with Video.js version.
   *
   * @return {PlayerVersion}
   *          An object with Video.js version.
   */version(){return{"video.js":$y}}
/**
   * Set up click and touch listeners for the playback element
   *
   * - On desktops: a click on the video itself will toggle playback
   * - On mobile devices: a click on the video toggles controls
   *   which is done by toggling the user state between active and
   *   inactive
   * - A tap can signal that a user has become active or has become inactive
   *   e.g. a quick tap on an iPhone movie should reveal the controls. Another
   *   quick tap should hide them again (signaling the user is in an inactive
   *   viewing state)
   * - In addition to this, we still want the user to be considered inactive after
   *   a few seconds of inactivity.
   *
   * > Note: the only part of iOS interaction we can't mimic with this setup
   * is a touch and hold on the video element counting as activity in order to
   * keep the controls showing, but that shouldn't be an issue. A touch and hold
   * on any controls will still keep the user active
   *
   * @private
   */addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}
/**
   * Remove the listeners used for click and tap controls. This is needed for
   * toggling to controls disabled, where a tap/touch should do nothing.
   *
   * @private
   */removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}
/**
   * Player waits for the tech to be ready
   *
   * @private
   */handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}
/**
   * Retrigger the `loadstart` event that was triggered by the {@link Tech}.
   *
   * @fires Player#loadstart
   * @listens Tech#loadstart
   * @private
   */handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())}
/**
   * Handle autoplay string values, rather than the typical boolean
   * values that should be handled by the tech. Note that this is not
   * part of any specification. Valid values and what they do can be
   * found on the autoplay getter at Player#autoplay()
   */manualAutoplay_(e){if(!this.tech_||"string"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Ew(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||""}`)}))};let i;return"any"!==e||this.muted()?i="muted"!==e||this.muted()?this.play():t():(i=this.play(),Ew(i)&&(i=i.catch(t))),Ew(i)?i.then((()=>{this.trigger({type:"autoplay-success",autoplay:e})})).catch((()=>{this.trigger({type:"autoplay-failure",autoplay:e})})):void 0}
/**
   * Update the internal source caches so that we return the correct source from
   * `src()`, `currentSource()`, and `currentSources()`.
   *
   * > Note: `currentSources` will not be updated if the source that is passed in exists
   *         in the current `currentSources` cache.
   *
   *
   * @param {Tech~SourceObject} srcObj
   *        A string or object source to update our caches to.
   */updateSourceCaches_(e=""){let t=e,i="";"string"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const n=e.$$("source");for(let s=0;s<n.length;s++){const e=n[s];if(e.type&&e.src&&e.src===t)return e.type}return dQ(t)})(this,t)),this.cache_.source=pb({},e,{src:t,type:i});const n=this.cache_.sources.filter((e=>e.src&&e.src===t)),s=[],r=this.$$("source"),a=[];for(let o=0;o<r.length;o++){const e=iE(r[o]);s.push(e),e.src&&e.src===t&&a.push(e.src)}a.length&&!n.length?this.cache_.sources=s:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}
/**
   * *EXPERIMENTAL* Fired when the source is set or changed on the {@link Tech}
   * causing the media element to reload.
   *
   * It will fire for the initial source and each subsequent source.
   * This event is a custom event from Video.js and is triggered by the {@link Tech}.
   *
   * The event object for this event contains a `src` property that will contain the source
   * that was available when the event was triggered. This is generally only necessary if Video.js
   * is switching techs while the source was being changed.
   *
   * It is also fired when `load` is called on the player (or media element)
   * because the {@link https://html.spec.whatwg.org/multipage/media.html#dom-media-load|specification for `load`}
   * says that the resource selection algorithm needs to be aborted and restarted.
   * In this case, it is very likely that the `src` property will be set to the
   * empty string `""` to indicate we do not know what the source will be but
   * that it is changing.
   *
   * *This event is currently still experimental and may change in minor releases.*
   * __To use this, pass `enableSourceset` option to the player.__
   *
   * @event Player#sourceset
   * @type {Event}
   * @prop {string} src
   *                The source url available when the `sourceset` was triggered.
   *                It will be an empty string if we cannot know what the source is
   *                but know that the source will change.
   */
/**
   * Retrigger the `sourceset` event that was triggered by the {@link Tech}.
   *
   * @fires Player#sourceset
   * @listens Tech#sourceset
   * @private
   */handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,n=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(n)&&(!this.lastSource_||this.lastSource_.tech!==n&&this.lastSource_.player!==i)&&(t=()=>{}),t(n),e.src||this.tech_.any(["sourceset","loadstart"],(e=>{if("sourceset"===e.type)return;const t=this.techGet_("currentSrc");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}
/**
   * Add/remove the vjs-has-started class
   *
   *
   * @param {boolean} request
   *        - true: adds the class
   *        - false: remove the class
   *
   * @return {boolean}
   *         the boolean value of hasStarted_
   */hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}
/**
   * Fired whenever the media begins or resumes playback
   *
   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play}
   * @fires Player#play
   * @listens Tech#play
   * @private
   */handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}
/**
   * Retrigger the `ratechange` event that was triggered by the {@link Tech}.
   *
   * If there were any events queued while the playback rate was zero, fire
   * those events now.
   *
   * @private
   * @method Player#handleTechRateChange_
   * @fires Player#ratechange
   * @listens Tech#ratechange
   */handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}
/**
   * Retrigger the `waiting` event that was triggered by the {@link Tech}.
   *
   * @fires Player#waiting
   * @listens Tech#waiting
   * @private
   */handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}
/**
   * Retrigger the `canplay` event that was triggered by the {@link Tech}.
   * > Note: This is not consistent between browsers. See #1351
   *
   * @fires Player#canplay
   * @listens Tech#canplay
   * @private
   */handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}
/**
   * Retrigger the `canplaythrough` event that was triggered by the {@link Tech}.
   *
   * @fires Player#canplaythrough
   * @listens Tech#canplaythrough
   * @private
   */handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}
/**
   * Retrigger the `playing` event that was triggered by the {@link Tech}.
   *
   * @fires Player#playing
   * @listens Tech#playing
   * @private
   */handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}
/**
   * Retrigger the `seeking` event that was triggered by the {@link Tech}.
   *
   * @fires Player#seeking
   * @listens Tech#seeking
   * @private
   */handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}
/**
   * Retrigger the `seeked` event that was triggered by the {@link Tech}.
   *
   * @fires Player#seeked
   * @listens Tech#seeked
   * @private
   */handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}
/**
   * Retrigger the `pause` event that was triggered by the {@link Tech}.
   *
   * @fires Player#pause
   * @listens Tech#pause
   * @private
   */handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}
/**
   * Retrigger the `ended` event that was triggered by the {@link Tech}.
   *
   * @fires Player#ended
   * @listens Tech#ended
   * @private
   */handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}
/**
   * Fired when the duration of the media resource is first known or changed
   *
   * @listens Tech#durationchange
   * @private
   */handleTechDurationChange_(){this.duration(this.techGet_("duration"))}
/**
   * Handle a click on the media element to play/pause
   *
   * @param {Event} event
   *        the event that caused this function to trigger
   *
   * @listens Tech#click
   * @private
   */handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?ww(this.play()):this.pause()))}
/**
   * Handle a double-click on the media element to enter/exit fullscreen,
   * or exit documentPictureInPicture mode
   *
   * @param {Event} event
   *        the event that caused this function to trigger
   *
   * @listens Tech#dblclick
   * @private
   */handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(t=>t.contains(e.target)))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!gI.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}
/**
   * Handle a tap on the media element. It will toggle the user
   * activity state, which hides and shows the controls.
   *
   * @listens Tech#tap
   * @private
   */handleTechTap_(){this.userActive(!this.userActive())}
/**
   * Handle touch to start
   *
   * @listens Tech#touchstart
   * @private
   */handleTechTouchStart_(){this.userWasActive=this.userActive()}
/**
   * Handle touch to move
   *
   * @listens Tech#touchmove
   * @private
   */handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}
/**
   * Handle touch to end
   *
   * @param {Event} event
   *        the touchend event that triggered
   *        this function
   *
   * @listens Tech#touchend
   * @private
   */handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}
/**
   * @private
   */toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}
/**
   * when the document fschange event triggers it calls this
   */documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let n=gI[this.fsApi_.fullscreenElement]===i;!n&&i.matches&&(n=i.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}
/**
   * Handle Tech Fullscreen Change
   *
   * @param {Event} event
   *        the fullscreenchange event that triggered this function
   *
   * @param {Object} data
   *        the data that was sent with the event
   *
   * @private
   * @listens Tech#fullscreenchange
   * @fires Player#fullscreenchange
   */handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(()=>{this.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}
/**
   * @private
   */togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}
/**
   * Handle Tech Enter Picture-in-Picture.
   *
   * @param {Event} event
   *        the enterpictureinpicture event that triggered this function
   *
   * @private
   * @listens Tech#enterpictureinpicture
   */handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}
/**
   * Handle Tech Leave Picture-in-Picture.
   *
   * @param {Event} event
   *        the leavepictureinpicture event that triggered this function
   *
   * @private
   * @listens Tech#leavepictureinpicture
   */handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}
/**
   * Fires when an error occurred during the loading of an audio/video.
   *
   * @private
   * @listens Tech#error
   */handleTechError_(){const e=this.tech_.error();e&&this.error(e)}
/**
   * Retrigger the `textdata` event that was triggered by the {@link Tech}.
   *
   * @fires Player#textdata
   * @listens Tech#textdata
   * @private
   */handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}
/**
   * Get object for cached values.
   *
   * @return {Object}
   *         get the current object cache
   */getCache(){return this.cache_}
/**
   * Resets the internal cache object.
   *
   * Using this function outside the player constructor or reset method may
   * have unintended side-effects.
   *
   * @private
   */resetCache_(){this.cache_={
// Right now, the currentTime is not _really_ cached because it is always
// retrieved from the tech (see: currentTime). However, for completeness,
// we set it to zero here to ensure that if we do start actually caching
// it, we reset it along with everything else.
currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}
/**
   * Pass values to the playback tech
   *
   * @param {string} [method]
   *        the method to call
   *
   * @param {Object} [arg]
   *        the argument to pass
   *
   * @private
   */techCall_(e,t){this.ready((function(){if(e in lQ)return function(e,t,i,n){return t[i](e.reduce(cQ(i),n))}(this.middleware_,this.tech_,e,t);if(e in AQ)return aQ(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(I2){throw ob(I2),I2}}),!0)}
/**
   * Mediate attempt to call playback tech method
   * and return the value of the method called.
   *
   * @param {string} method
   *        Tech method
   *
   * @return {*}
   *         Value returned by the tech method called, undefined if tech
   *         is not ready or tech method is not present
   *
   * @private
   */techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in oQ)return function(e,t,i){return e.reduceRight(cQ(i),t[i]())}(this.middleware_,this.tech_,e);if(e in AQ)return aQ(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(I2){if(void 0===this.tech_[e])throw ob(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,I2),I2;if("TypeError"===I2.name)throw ob(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,I2),this.tech_.isReady_=!1,I2;throw ob(I2),I2}}}
/**
   * Attempt to begin playback at the first opportunity.
   *
   * @return {Promise|undefined}
   *         Returns a promise if the browser supports Promises (or one
   *         was passed in as an option). This promise will be resolved on
   *         the return value of play. If this is undefined it will fulfill the
   *         promise chain otherwise the promise chain will be fulfilled when
   *         the promise from play is fulfilled.
   */play(){return new Promise((e=>{this.play_(e)}))}
/**
   * The actual logic for play, takes a callback that will be resolved on the
   * return value of play. This allows us to resolve to the play promise if there
   * is one on modern browsers.
   *
   * @private
   * @param {Function} [callback]
   *        The callback that should be called when the techs play is actually called
   */play_(e=ww){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(Ob||Pb);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!t&&i&&this.load());const n=this.techGet_("play");i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===n?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)}
/**
   * These functions will be run when if play is terminated. If play
   * runPlayCallbacks_ is run these function will not be run. This allows us
   * to differentiate between a terminated play and an actual call to play.
   */runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}
/**
   * When a callback to play is delayed we have to run these
   * callbacks when play is actually called on the tech. This function
   * runs the callbacks that were delayed and accepts the return value
   * from the tech.
   *
   * @param {undefined|Promise} val
   *        The return value from the tech.
   */runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}
/**
   * Pause the video playback
   */pause(){this.techCall_("pause")}
/**
   * Check if the player is paused or has yet to play
   *
   * @return {boolean}
   *         - false: if the media is currently playing
   *         - true: if media is not currently playing
   */paused(){return!1!==this.techGet_("paused")}
/**
   * Get a TimeRange object representing the current ranges of time that the user
   * has played.
   *
   * @return {TimeRange}
   *         A time range object that represents all the increments of time that have
   *         been played.
   */played(){return this.techGet_("played")||pw(0,0)}
/**
   * Sets or returns whether or not the user is "scrubbing". Scrubbing is
   * when the user has clicked the progress bar handle and is
   * dragging it along the progress bar.
   *
   * @param {boolean} [isScrubbing]
   *        whether the user is or is not scrubbing
   *
   * @return {boolean|undefined}
   *         - The value of scrubbing when getting
   *         - Nothing when setting
   */scrubbing(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}
/**
   * Get or set the current time (in seconds)
   *
   * @param {number|string} [seconds]
   *        The time to seek to in seconds
   *
   * @return {number|undefined}
   *         - the current time in seconds when getting
   *         - Nothing when setting
   */currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_)))}
/**
   * Apply the value of initTime stored in cache as currentTime.
   *
   * @private
   */applyInitTime_(){this.currentTime(this.cache_.initTime)}
/**
   * Normally gets the length in time of the video in seconds;
   * in all but the rarest use cases an argument will NOT be passed to the method
   *
   * > **NOTE**: The video must have started loading before the duration can be
   * known, and depending on preload behaviour may not be known until the video starts
   * playing.
   *
   * @fires Player#durationchange
   *
   * @param {number} [seconds]
   *        The duration of the video to set in seconds
   *
   * @return {number|undefined}
   *         - The duration of the video in seconds when getting
   *         - Nothing when setting
   */duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}
/**
   * Calculates how much time is left in the video. Not part
   * of the native video API.
   *
   * @return {number}
   *         The time remaining in seconds
   */remainingTime(){return this.duration()-this.currentTime()}
/**
   * A remaining time function that is intended to be used when
   * the time is to be displayed directly to the user.
   *
   * @return {number}
   *         The rounded time remaining in seconds
   */remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}
// Kind of like an array of portions of the video that have been downloaded.
/**
   * Get a TimeRange object with an array of the times of the video
   * that have been downloaded. If you just want the percent of the
   * video that's been downloaded, use bufferedPercent.
   *
   * @see [Buffered Spec]{@link http://dev.w3.org/html5/spec/video.html#dom-media-buffered}
   *
   * @return {TimeRange}
   *         A mock {@link TimeRanges} object (following HTML spec)
   */
buffered(){let e=this.techGet_("buffered");return e&&e.length||(e=pw(0,0)),e}
/**
   * Get the TimeRanges of the media that are currently available
   * for seeking to.
   *
   * @see [Seekable Spec]{@link https://html.spec.whatwg.org/multipage/media.html#dom-media-seekable}
   *
   * @return {TimeRange}
   *         A mock {@link TimeRanges} object (following HTML spec)
   */seekable(){let e=this.techGet_("seekable");return e&&e.length||(e=pw(0,0)),e}
/**
   * Returns whether the player is in the "seeking" state.
   *
   * @return {boolean} True if the player is in the seeking state, false if not.
   */seeking(){return this.techGet_("seeking")}
/**
   * Returns whether the player is in the "ended" state.
   *
   * @return {boolean} True if the player is in the ended state, false if not.
   */ended(){return this.techGet_("ended")}
/**
   * Returns the current state of network activity for the element, from
   * the codes in the list below.
   * - NETWORK_EMPTY (numeric value 0)
   *   The element has not yet been initialised. All attributes are in
   *   their initial states.
   * - NETWORK_IDLE (numeric value 1)
   *   The element's resource selection algorithm is active and has
   *   selected a resource, but it is not actually using the network at
   *   this time.
   * - NETWORK_LOADING (numeric value 2)
   *   The user agent is actively trying to download data.
   * - NETWORK_NO_SOURCE (numeric value 3)
   *   The element's resource selection algorithm is active, but it has
   *   not yet found a resource to use.
   *
   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states
   * @return {number} the current network activity state
   */networkState(){return this.techGet_("networkState")}
/**
   * Returns a value that expresses the current state of the element
   * with respect to rendering the current playback position, from the
   * codes in the list below.
   * - HAVE_NOTHING (numeric value 0)
   *   No information regarding the media resource is available.
   * - HAVE_METADATA (numeric value 1)
   *   Enough of the resource has been obtained that the duration of the
   *   resource is available.
   * - HAVE_CURRENT_DATA (numeric value 2)
   *   Data for the immediate current playback position is available.
   * - HAVE_FUTURE_DATA (numeric value 3)
   *   Data for the immediate current playback position is available, as
   *   well as enough data for the user agent to advance the current
   *   playback position in the direction of playback.
   * - HAVE_ENOUGH_DATA (numeric value 4)
   *   The user agent estimates that enough data is available for
   *   playback to proceed uninterrupted.
   *
   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate
   * @return {number} the current playback rendering state
   */readyState(){return this.techGet_("readyState")}
/**
   * Get the percent (as a decimal) of the video that's been downloaded.
   * This method is not a part of the native HTML video API.
   *
   * @return {number}
   *         A decimal between 0 and 1 representing the percent
   *         that is buffered 0 being 0% and 1 being 100%
   */bufferedPercent(){return yw(this.buffered(),this.duration())}
/**
   * Get the ending time of the last buffered time range
   * This is used in the progress bar to encapsulate all time ranges.
   *
   * @return {number}
   *         The end of the last buffered time range
   */bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}
/**
   * Get or set the current volume of the media
   *
   * @param  {number} [percentAsDecimal]
   *         The new volume as a decimal percent:
   *         - 0 is muted/0%/off
   *         - 1.0 is 100%/full
   *         - 0.5 is half volume or 50%
   *
   * @return {number|undefined}
   *         The current volume as a percent when getting
   */volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)}
/**
   * Get the current muted state, or turn mute on or off
   *
   * @param {boolean} [muted]
   *        - true to mute
   *        - false to unmute
   *
   * @return {boolean|undefined}
   *         - true if mute is on and getting
   *         - false if mute is off and getting
   *         - nothing if setting
   */muted(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)}
/**
   * Get the current defaultMuted state, or turn defaultMuted on or off. defaultMuted
   * indicates the state of muted on initial playback.
   *
   * ```js
   *   var myPlayer = videojs('some-player-id');
   *
   *   myPlayer.src("http://www.example.com/path/to/video.mp4");
   *
   *   // get, should be false
   *   console.log(myPlayer.defaultMuted());
   *   // set to true
   *   myPlayer.defaultMuted(true);
   *   // get should be true
   *   console.log(myPlayer.defaultMuted());
   * ```
   *
   * @param {boolean} [defaultMuted]
   *        - true to mute
   *        - false to unmute
   *
   * @return {boolean|undefined}
   *         - true if defaultMuted is on and getting
   *         - false if defaultMuted is off and getting
   *         - Nothing when setting
   */defaultMuted(e){return void 0!==e&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}
/**
   * Get the last volume, or set it
   *
   * @param  {number} [percentAsDecimal]
   *         The new last volume as a decimal percent:
   *         - 0 is muted/0%/off
   *         - 1.0 is 100%/full
   *         - 0.5 is half volume or 50%
   *
   * @return {number|undefined}
   *         - The current value of lastVolume as a percent when getting
   *         - Nothing when setting
   *
   * @private
   */lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}
/**
   * Check if current tech can support native fullscreen
   * (e.g. with built in controls like iOS)
   *
   * @return {boolean}
   *         if native fullscreen is supported
   */supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}
/**
   * Check if the player is in fullscreen mode or tell the player that it
   * is or is not in fullscreen mode.
   *
   * > NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official
   * property and instead document.fullscreenElement is used. But isFullscreen is
   * still a valuable property for internal player workings.
   *
   * @param  {boolean} [isFS]
   *         Set the players current fullscreen state
   *
   * @return {boolean|undefined}
   *         - true if fullscreen is on and getting
   *         - false if fullscreen is off and getting
   *         - Nothing when setting
   */isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_}
/**
   * Increase the size of the video to full screen
   * In some browsers, full screen is not supported natively, so it enters
   * "full window mode", where the video fills the browser window.
   * In browsers and devices that support native full screen, sometimes the
   * browser's default controls will be shown, and not the Video.js custom skin.
   * This includes most mobile devices (iOS, Android) and older versions of
   * Safari.
   *
   * @param  {Object} [fullscreenOptions]
   *         Override the player fullscreen options
   *
   * @fires Player#fullscreenchange
   */requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,n)=>{function s(){t.off("fullscreenerror",a),t.off("fullscreenchange",r)}function r(){s(),i()}function a(e,t){s(),n(t)}t.one("fullscreenchange",r),t.one("fullscreenerror",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(s,s),o.then(i,n))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}
/**
   * Return the video to its normal size after having been in full screen mode
   *
   * @fires Player#fullscreenchange
   */exitFullscreen(){const e=this;return new Promise(((t,i)=>{function n(){e.off("fullscreenerror",r),e.off("fullscreenchange",s)}function s(){n(),t()}function r(e,t){n(),i(t)}e.one("fullscreenchange",s),e.one("fullscreenerror",r);const a=e.exitFullscreenHelper_();a&&(a.then(n,n),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=gI[this.fsApi_.exitFullscreen]();return e&&ww(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}
/**
   * When fullscreen isn't supported we can stretch the
   * video container to as wide as the browser will let us.
   *
   * @fires Player#enterFullWindow
   */enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=gI.documentElement.style.overflow,LE(gI,"keydown",this.boundFullWindowOnEscKey_),gI.documentElement.style.overflow="hidden",$b(gI.body,"vjs-full-window"),this.trigger("enterFullWindow")}
/**
   * Check for call to either exit full window or
   * full screen on ESC key
   *
   * @param {string} event
   *        Event to check for key press
   */fullWindowOnEscKey(e){"Escape"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}
/**
   * Exit full window
   *
   * @fires Player#exitFullWindow
   */exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,UE(gI,"keydown",this.boundFullWindowOnEscKey_),gI.documentElement.style.overflow=this.docOrigOverflow,Zb(gI.body,"vjs-full-window"),this.trigger("exitFullWindow")}
/**
   * Get or set disable Picture-in-Picture mode.
   *
   * @param {boolean} [value]
   *                  - true will disable Picture-in-Picture mode
   *                  - false will enable Picture-in-Picture mode
   */disablePictureInPicture(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}
/**
   * Check if the player is in Picture-in-Picture mode or tell the player that it
   * is or is not in Picture-in-Picture mode.
   *
   * @param  {boolean} [isPiP]
   *         Set the players current Picture-in-Picture state
   *
   * @return {boolean|undefined}
   *         - true if Picture-in-Picture is on and getting
   *         - false if Picture-in-Picture is off and getting
   *         - nothing if setting
   */isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}
/**
   * Create a floating video window always on top of other windows so that users may
   * continue consuming media while they interact with other content sites, or
   * applications on their device.
   *
   * This can use document picture-in-picture or element picture in picture
   *
   * Set `enableDocumentPictureInPicture` to `true` to use docPiP on a supported browser
   * Else set `disablePictureInPicture` to `false` to disable elPiP on a supported browser
   *
   *
   * @see [Spec]{@link https://w3c.github.io/picture-in-picture/}
   * @see [Spec]{@link https://wicg.github.io/document-picture-in-picture/}
   *
   * @fires Player#enterpictureinpicture
   *
   * @return {Promise}
   *         A promise with a Picture-in-Picture window.
   */requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&lI.documentPictureInPicture){const e=gI.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(jb("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),lI.documentPictureInPicture.requestWindow({
// The aspect ratio won't be correct, Chrome bug https://crbug.com/1407629
width:this.videoWidth(),height:this.videoHeight()}).then((t=>(vE(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:t}),t.addEventListener("pagehide",(t=>{const i=t.target.querySelector(".video-js");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")})),t)))}return"pictureInPictureEnabled"in gI&&!1===this.disablePictureInPicture()?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}
/**
   * Exit Picture-in-Picture mode.
   *
   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}
   *
   * @fires Player#leavepictureinpicture
   *
   * @return {Promise}
   *         A promise.
   */exitPictureInPicture(){return lI.documentPictureInPicture&&lI.documentPictureInPicture.window?(lI.documentPictureInPicture.window.close(),Promise.resolve()):"pictureInPictureEnabled"in gI?gI.exitPictureInPicture():void 0}
/**
   * Called when this Player has focus and a key gets pressed down, or when
   * any Component of this player receives a key press that it doesn't handle.
   * This allows player-wide hotkeys (either as defined below, or optionally
   * by an external function).
   *
   * @param {KeyboardEvent} event
   *        The `keydown` event that caused this function to be called.
   *
   * @listens keydown
   */handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;(e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}
/**
   * Called when this Player receives a hotkey keydown event.
   * Supported player-wide hotkeys are:
   *
   *   f          - toggle fullscreen
   *   m          - toggle mute
   *   k or Space - toggle play/pause
   *
   * @param {Event} event
   *        The `keydown` event that caused this function to be called.
   */handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=t=>"f"===e.key.toLowerCase(),muteKey:n=t=>"m"===e.key.toLowerCase(),playPauseKey:s=t=>"k"===e.key.toLowerCase()||" "===e.key.toLowerCase()}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=hw.getComponent("FullscreenToggle");!1!==gI[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(n.call(this,e)){e.preventDefault(),e.stopPropagation();hw.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();hw.getComponent("PlayToggle").prototype.handleClick.call(this,e)}}
/**
   * Check whether the player can play a given mimetype
   *
   * @see https://www.w3.org/TR/2011/WD-html5-20110113/video.html#dom-navigator-canplaytype
   *
   * @param {string} type
   *        The mimetype to check
   *
   * @return {string}
   *         'probably', 'maybe', or '' (empty string)
   */canPlayType(e){let t;for(let i=0,n=this.options_.techOrder;i<n.length;i++){const s=n[i];let r=tQ.getTech(s);if(r||(r=hw.getComponent(s)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else ob.error(`The "${s}" tech is undefined. Skipped browser support check for that tech.`)}return""}
/**
   * Select source based on tech-order or source-order
   * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,
   * defaults to tech-order selection
   *
   * @param {Array} sources
   *        The sources for a media asset
   *
   * @return {Object|boolean}
   *         Object of source and tech order or false
   */selectSource(e){const t=this.options_.techOrder.map((e=>[e,tQ.getTech(e)])).filter((([e,t])=>t?t.isSupported():(ob.error(`The "${e}" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let n;return e.some((e=>t.some((t=>{if(n=i(e,t),n)return!0})))),n};let n;const s=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return n=this.options_.sourceOrder?i(e,t,(r=s,(e,t)=>r(t,e))):i(t,e,s),n||!1}
/**
   * Executes source setting and getting logic
   *
   * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]
   *        A SourceObject, an array of SourceObjects, or a string referencing
   *        a URL to a media source. It is _highly recommended_ that an object
   *        or array of objects is used here, so that source selection
   *        algorithms can take the `type` into account.
   *
   *        If not provided, this method acts as a getter.
   * @param {boolean} [isRetry]
   *        Indicates whether this is being called internally as a result of a retry
   *
   * @return {string|undefined}
   *         If the `source` argument is missing, returns the current source
   *         URL. Otherwise, returns nothing/undefined.
   */handleSrc_(e,t){if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const i=gQ(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),rQ(this,i[0],((e,n)=>{this.middleware_=n,t||(this.cache_.sources=i),this.updateSourceCaches_(e);if(this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var s,r;s=n,r=this.tech_,s.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off("error",e)};this.one("error",e),this.one("playing",t),this.resetRetryOnError_=()=>{this.off("error",e),this.off("playing",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}
/**
   * Get or set the video source.
   *
   * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]
   *        A SourceObject, an array of SourceObjects, or a string referencing
   *        a URL to a media source. It is _highly recommended_ that an object
   *        or array of objects is used here, so that source selection
   *        algorithms can take the `type` into account.
   *
   *        If not provided, this method acts as a getter.
   *
   * @return {string|undefined}
   *         If the `source` argument is missing, returns the current source
   *         URL. Otherwise, returns nothing/undefined.
   */src(e){return this.handleSrc_(e,!1)}
/**
   * Set the source object on the tech, returns a boolean that indicates whether
   * there is a tech that can play the source or not
   *
   * @param {Tech~SourceObject} source
   *        The source object to set on the Tech
   *
   * @return {boolean}
   *         - True if there is no Tech to playback this source
   *         - False otherwise
   *
   * @private
   */src_(e){const t=this.selectSource([e]);return!t||(cw(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}
/**
   * Add a <source> element to the <video> element.
   *
   * @param {string} srcUrl
   *        The URL of the video source.
   *
   * @param {string} [mimeType]
   *        The MIME type of the video source. Optional but recommended.
   *
   * @return {boolean}
   *         Returns true if the source element was successfully added, false otherwise.
   */addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}
/**
   * Remove a <source> element from the <video> element by its URL.
   *
   * @param {string} srcUrl
   *        The URL of the source to remove.
   *
   * @return {boolean}
   *         Returns true if the source element was successfully removed, false otherwise.
   */removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}
/**
   * Begin loading the src data.
   */load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_("load")}
/**
   * Reset the player. Loads the first tech in the techOrder,
   * removes all the text tracks in the existing `tech`,
   * and calls `reset` on the `tech`.
   */reset(){if(this.paused())this.doReset_();else{ww(this.play().then((()=>this.doReset_())))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),XE(this)&&this.trigger("playerreset")}
/**
   * Reset Control Bar's UI by calling sub-methods that reset
   * all of Control Bar's components
   */resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}
/**
   * Reset tech's progress so progress bar is reset in the UI
   */resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:n}=this.controlBar||{},{seekBar:s}=i||{};e&&e.updateContent(),t&&t.updateContent(),n&&n.updateContent(),s&&(s.update(),s.loadProgressBar&&s.loadProgressBar.update())}
/**
   * Reset Playback ratio
   */resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}
/**
   * Reset Volume bar
   */resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}
/**
   * Returns all of the current source objects.
   *
   * @return {Tech~SourceObject[]}
   *         The current source objects
   */currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}
/**
   * Returns the current source object.
   *
   * @return {Tech~SourceObject}
   *         The current source object
   */currentSource(){return this.cache_.source||{}}
/**
   * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4
   * Can be used in conjunction with `currentType` to assist in rebuilding the current source object.
   *
   * @return {string}
   *         The current source
   */currentSrc(){return this.currentSource()&&this.currentSource().src||""}
/**
   * Get the current source type e.g. video/mp4
   * This can allow you rebuild the current source object so that you could load the same
   * source and tech later
   *
   * @return {string}
   *         The source MIME type
   */currentType(){return this.currentSource()&&this.currentSource().type||""}
/**
   * Get or set the preload attribute
   *
   * @param {'none'|'auto'|'metadata'} [value]
   *        Preload mode to pass to tech
   *
   * @return {string|undefined}
   *         - The preload attribute value when getting
   *         - Nothing when setting
   */preload(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")}
/**
   * Get or set the autoplay option. When this is a boolean it will
   * modify the attribute on the tech. When this is a string the attribute on
   * the tech will be removed and `Player` will handle autoplay on loadstarts.
   *
   * @param {boolean|'play'|'muted'|'any'} [value]
   *        - true: autoplay using the browser behavior
   *        - false: do not autoplay
   *        - 'play': call play() on every loadstart
   *        - 'muted': call muted() then play() on every loadstart
   *        - 'any': call play() on every loadstart. if that fails call muted() then play().
   *        - *: values other than those listed here will be set `autoplay` to true
   *
   * @return {boolean|string|undefined}
   *         - The current value of autoplay when getting
   *         - Nothing when setting
   */autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}
/**
   * Set or unset the playsinline attribute.
   * Playsinline tells the browser that non-fullscreen playback is preferred.
   *
   * @param {boolean} [value]
   *        - true means that we should try to play inline by default
   *        - false means that we should use the browser's default playback mode,
   *          which in most cases is inline. iOS Safari is a notable exception
   *          and plays fullscreen by default.
   *
   * @return {string|undefined}
   *         - the current value of playsinline
   *         - Nothing when setting
   *
   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}
   */playsinline(e){return void 0!==e&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}
/**
   * Get or set the loop attribute on the video element.
   *
   * @param {boolean} [value]
   *        - true means that we should loop the video
   *        - false means that we should not loop the video
   *
   * @return {boolean|undefined}
   *         - The current value of loop when getting
   *         - Nothing when setting
   */loop(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")}
/**
   * Get or set the poster image source url
   *
   * @fires Player#posterchange
   *
   * @param {string} [src]
   *        Poster image source URL
   *
   * @return {string|undefined}
   *         - The current value of poster when getting
   *         - Nothing when setting
   */poster(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}
/**
   * Some techs (e.g. YouTube) can provide a poster source in an
   * asynchronous way. We want the poster component to use this
   * poster source so that it covers up the tech's controls.
   * (YouTube's play button). However we only want to use this
   * source if the player user hasn't set a poster through
   * the normal APIs.
   *
   * @fires Player#posterchange
   * @listens Tech#posterchange
   * @private
   */handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}
/**
   * Get or set whether or not the controls are showing.
   *
   * @fires Player#controlsenabled
   *
   * @param {boolean} [bool]
   *        - true to turn controls on
   *        - false to turn controls off
   *
   * @return {boolean|undefined}
   *         - The current value of controls when getting
   *         - Nothing when setting
   */controls(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}
/**
   * Toggle native controls on/off. Native controls are the controls built into
   * devices (e.g. default iPhone controls) or other techs
   * (e.g. Vimeo Controls)
   * **This should only be set by the current tech, because only the tech knows
   * if it can support native controls**
   *
   * @fires Player#usingnativecontrols
   * @fires Player#usingcustomcontrols
   *
   * @param {boolean} [bool]
   *        - true to turn native controls on
   *        - false to turn native controls off
   *
   * @return {boolean|undefined}
   *         - The current value of native controls when getting
   *         - Nothing when setting
   */usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}
/**
   * Set or get the current MediaError
   *
   * @fires Player#error
   *
   * @param  {MediaError|string|number} [err]
   *         A MediaError or a string/number to be turned
   *         into a MediaError
   *
   * @return {MediaError|null|undefined}
   *         - The current MediaError when getting (or null)
   *         - Nothing when setting
   */error(e){if(void 0===e)return this.error_||null;if(eb("beforeerror").forEach((t=>{const i=t(this,e);db(i)&&!Array.isArray(i)||"string"==typeof i||"number"==typeof i||null===i?e=i:this.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=null,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new bw(e),this.addClass("vjs-error"),ob.error(`(CODE:${this.error_.code} ${bw.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),eb("error").forEach((e=>e(this,this.error_)))}
/**
   * Report user activity
   *
   * @param {Object} event
   *        Event object
   */reportUserActivity(e){this.userActivity_=!0}
/**
   * Get/set if user is active
   *
   * @fires Player#useractive
   * @fires Player#userinactive
   *
   * @param {boolean} [bool]
   *        - true if the user is active
   *        - false if the user is inactive
   *
   * @return {boolean|undefined}
   *         - The current value of userActive when getting
   *         - Nothing when setting
   */userActive(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}
/**
   * Listen for user activity based on timeout value
   *
   * @private
   */listenForUserActivity_(){let e,t,i;const n=qE(this,this.reportUserActivity),s=function(t){n(),this.clearInterval(e)};this.on("mousedown",(function(){n(),this.clearInterval(e),e=this.setInterval(n,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,n())})),this.on("mouseup",s),this.on("mouseleave",s);const r=this.getChild("controlBar");let a;!r||Pb||yb||(r.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",n),this.on("keyup",n);this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}
/**
   * Gets or sets the current playback rate. A playback rate of
   * 1.0 represents normal speed and 0.5 would indicate half-speed
   * playback, for instance.
   *
   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate
   *
   * @param {number} [rate]
   *       New playback rate to set.
   *
   * @return {number|undefined}
   *         - The current playback rate when getting or 1.0
   *         - Nothing when setting
   */playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)}
/**
   * Gets or sets the current default playback rate. A default playback rate of
   * 1.0 represents normal speed and 0.5 would indicate half-speed playback, for instance.
   * defaultPlaybackRate will only represent what the initial playbackRate of a video was, not
   * not the current playbackRate.
   *
   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-defaultplaybackrate
   *
   * @param {number} [rate]
   *       New default playback rate to set.
   *
   * @return {number|undefined}
   *         - The default playback rate when getting or 1.0
   *         - Nothing when setting
   */defaultPlaybackRate(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}
/**
   * Gets or sets the audio flag
   *
   * @param {boolean} [bool]
   *        - true signals that this is an audio player
   *        - false signals that this is not an audio player
   *
   * @return {boolean|undefined}
   *         - The current value of isAudio when getting
   *         - Nothing when setting
   */isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass("vjs-hidden")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}
/**
   * Get the current audioOnlyMode state or set audioOnlyMode to true or false.
   *
   * Setting this to `true` will hide all player components except the control bar,
   * as well as control bar components needed only for video.
   *
   * @param {boolean} [value]
   *         The value to set audioOnlyMode to.
   *
   * @return {Promise|boolean}
   *        A Promise is returned when setting the state, and a boolean when getting
   *        the present state
   */audioOnlyMode(e){if("boolean"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}
/**
   * Get the current audioPosterMode state or set audioPosterMode to true or false
   *
   * @param {boolean} [value]
   *         The value to set audioPosterMode to.
   *
   * @return {Promise|boolean}
   *         A Promise is returned when setting the state, and a boolean when getting
   *        the present state
   */audioPosterMode(e){if("boolean"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){return this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.enablePosterModeUI_()}))}return Promise.resolve().then((()=>{this.disablePosterModeUI_()}))}
/**
   * A helper method for adding a {@link TextTrack} to our
   * {@link TextTrackList}.
   *
   * In addition to the W3C settings we allow adding additional info through options.
   *
   * @see http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack
   *
   * @param {string} [kind]
   *        the kind of TextTrack you are adding
   *
   * @param {string} [label]
   *        the label to give the TextTrack label
   *
   * @param {string} [language]
   *        the language to set on the TextTrack
   *
   * @return {TextTrack|undefined}
   *         the TextTrack that was added or undefined
   *         if there is no tech
   */addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}
/**
   * Create a remote {@link TextTrack} and an {@link HTMLTrackElement}.
   *
   * @param {Object} options
   *        Options to pass to {@link HTMLTrackElement} during creation. See
   *        {@link HTMLTrackElement} for object properties that you should use.
   *
   * @param {boolean} [manualCleanup=false] if set to true, the TextTrack will not be removed
   *                                        from the TextTrackList and HtmlTrackElementList
   *                                        after a source change
   *
   * @return {HtmlTrackElement}
   *         the HTMLTrackElement that was created and added
   *         to the HtmlTrackElementList and the remote
   *         TextTrackList
   *
   */addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}
/**
   * Remove a remote {@link TextTrack} from the respective
   * {@link TextTrackList} and {@link HtmlTrackElementList}.
   *
   * @param {Object} track
   *        Remote {@link TextTrack} to remove
   *
   * @return {undefined}
   *         does not return anything
   */removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}
/**
   * Gets available media playback quality metrics as specified by the W3C's Media
   * Playback Quality API.
   *
   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}
   *
   * @return {Object|undefined}
   *         An object with supported media playback quality metrics or undefined if there
   *         is no tech or the tech does not support it.
   */getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}
/**
   * Get video width
   *
   * @return {number}
   *         current video width
   */videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}
/**
   * Get video height
   *
   * @return {number}
   *         current video height
   */videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}
/**
   * Set or get the player's language code.
   *
   * Changing the language will trigger
   * [languagechange]{@link Player#event:languagechange}
   * which Components can use to update control text.
   * ClickableComponent will update its control text by default on
   * [languagechange]{@link Player#event:languagechange}.
   *
   * @fires Player#languagechange
   *
   * @param {string} [code]
   *        the language code to set the player to
   *
   * @return {string|undefined}
   *         - The current language code when getting
   *         - Nothing when setting
   */language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),XE(this)&&this.trigger("languagechange"))}
/**
   * Get the player's language dictionary
   * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time
   * Languages specified directly in the player options have precedence
   *
   * @return {Array}
   *         An array of of supported languages
   */languages(){return pb(Z_.prototype.options_.languages,this.languages_)}
/**
   * returns a JavaScript object representing the current track
   * information. **DOES not return it as JSON**
   *
   * @return {Object}
   *         Object representing the current of track info
   */toJSON(){const e=pb(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let n=t[i];n=pb(n),n.player=void 0,e.tracks[i]=n}return e}
/**
   * Creates a simple modal dialog (an instance of the {@link ModalDialog}
   * component) that immediately overlays the player with arbitrary
   * content and removes itself when closed.
   *
   * @param {string|Function|Element|Array|null} content
   *        Same as {@link ModalDialog#content}'s param of the same name.
   *        The most straight-forward usage is to provide a string or DOM
   *        element.
   *
   * @param {Object} [options]
   *        Extra options which will be passed on to the {@link ModalDialog}.
   *
   * @return {ModalDialog}
   *         the {@link ModalDialog} that was created
   */createModal(e,t){(t=t||{}).content=e||"";const i=new kw(this,t);return this.addChild(i),i.on("dispose",(()=>{this.removeChild(i)})),i.open(),i}
/**
   * Change breakpoint classes when the player resizes.
   *
   * @private
   */updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<z_.length;i++){const n=z_[i];if(t<=this.breakpoints_[n]){if(e===n)return;e&&this.removeClass(X_[e]),this.addClass(X_[n]),this.breakpoint_=n;break}}}
/**
   * Removes the current breakpoint.
   *
   * @private
   */removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}
/**
   * Get or set breakpoints on the player.
   *
   * Calling this method with an object or `true` will remove any previous
   * custom breakpoints and start from the defaults again.
   *
   * @param  {Object|boolean} [breakpoints]
   *         If an object is given, it can be used to provide custom
   *         breakpoints. If `true` is given, will set default breakpoints.
   *         If this argument is not given, will simply return the current
   *         breakpoints.
   *
   * @param  {number} [breakpoints.tiny]
   *         The maximum width for the "vjs-layout-tiny" class.
   *
   * @param  {number} [breakpoints.xsmall]
   *         The maximum width for the "vjs-layout-x-small" class.
   *
   * @param  {number} [breakpoints.small]
   *         The maximum width for the "vjs-layout-small" class.
   *
   * @param  {number} [breakpoints.medium]
   *         The maximum width for the "vjs-layout-medium" class.
   *
   * @param  {number} [breakpoints.large]
   *         The maximum width for the "vjs-layout-large" class.
   *
   * @param  {number} [breakpoints.xlarge]
   *         The maximum width for the "vjs-layout-x-large" class.
   *
   * @param  {number} [breakpoints.huge]
   *         The maximum width for the "vjs-layout-huge" class.
   *
   * @return {Object}
   *         An object mapping breakpoint names to maximum width values.
   */breakpoints(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Object.assign({},$_,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}
/**
   * Get or set a flag indicating whether or not this player should adjust
   * its UI based on its dimensions.
   *
   * @param  {boolean} [value]
   *         Should be `true` if the player should adjust its UI based on its
   *         dimensions; otherwise, should be `false`.
   *
   * @return {boolean|undefined}
   *         Will be `true` if this player should adjust its UI based on its
   *         dimensions; otherwise, will be `false`.
   *         Nothing if setting
   */responsive(e){if(void 0===e)return this.responsive_;return(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}
/**
   * Get current breakpoint name, if any.
   *
   * @return {string}
   *         If there is currently a breakpoint set, returns a the key from the
   *         breakpoints object matching it. Otherwise, returns an empty string.
   */currentBreakpoint(){return this.breakpoint_}
/**
   * Get the current breakpoint class name.
   *
   * @return {string}
   *         The matching class name (e.g. `"vjs-layout-tiny"` or
   *         `"vjs-layout-large"`) for the current breakpoint. Empty string if
   *         there is no current breakpoint.
   */currentBreakpointClass(){return X_[this.breakpoint_]||""}
/**
   * An object that describes a single piece of media.
   *
   * Properties that are not part of this type description will be retained; so,
   * this can be viewed as a generic metadata storage mechanism as well.
   *
   * @see      {@link https://wicg.github.io/mediasession/#the-mediametadata-interface}
   * @typedef  {Object} Player~MediaObject
   *
   * @property {string} [album]
   *           Unused, except if this object is passed to the `MediaSession`
   *           API.
   *
   * @property {string} [artist]
   *           Unused, except if this object is passed to the `MediaSession`
   *           API.
   *
   * @property {Object[]} [artwork]
   *           Unused, except if this object is passed to the `MediaSession`
   *           API. If not specified, will be populated via the `poster`, if
   *           available.
   *
   * @property {string} [poster]
   *           URL to an image that will display before playback.
   *
   * @property {Tech~SourceObject|Tech~SourceObject[]|string} [src]
   *           A single source object, an array of source objects, or a string
   *           referencing a URL to a media source. It is _highly recommended_
   *           that an object or array of objects is used here, so that source
   *           selection algorithms can take the `type` into account.
   *
   * @property {string} [title]
   *           Unused, except if this object is passed to the `MediaSession`
   *           API.
   *
   * @property {Object[]} [textTracks]
   *           An array of objects to be used to create text tracks, following
   *           the {@link https://www.w3.org/TR/html50/embedded-content-0.html#the-track-element|native track element format}.
   *           For ease of removal, these will be created as "remote" text
   *           tracks and set to automatically clean up on source changes.
   *
   *           These objects may have properties like `src`, `kind`, `label`,
   *           and `language`, see {@link Tech#createRemoteTextTrack}.
   */
/**
   * Populate the player using a {@link Player~MediaObject|MediaObject}.
   *
   * @param  {Player~MediaObject} media
   *         A media object.
   *
   * @param  {Function} ready
   *         A callback to be called when the player is ready.
   */loadMedia(e,t){if(!e||"object"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=pb(e);const{artist:n,artwork:s,description:r,poster:a,src:o,textTracks:l,title:A}=this.cache_.media;!s&&a&&(this.cache_.media.artwork=[{src:a,type:dQ(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:A,description:r||n||""}),this.ready(t)}
/**
   * Get a clone of the current {@link Player~MediaObject} for this player.
   *
   * If the `loadMedia` method has not been used, will attempt to return a
   * {@link Player~MediaObject} based on the current state of the player.
   *
   * @return {Player~MediaObject}
   */getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:dQ(t.poster)}]),t}return pb(this.cache_.media)}
/**
   * Gets tag settings
   *
   * @param {Element} tag
   *        The player tag
   *
   * @return {Object}
   *         An object containing all of the settings
   *         for a player tag
   */static getTagSettings(e){const t={sources:[],tracks:[]},i=iE(e),n=i["data-setup"];if(Xb(e,"vjs-fill")&&(i.fill=!0),Xb(e,"vjs-fluid")&&(i.fluid=!0),null!==n)try{Object.assign(i,JSON.parse(n||"{}"))}catch(I2){ob.error("data-setup",I2)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,n=i.length;e<n;e++){const n=i[e],s=n.nodeName.toLowerCase();"source"===s?t.sources.push(iE(n)):"track"===s&&t.tracks.push(iE(n))}}return t}
/**
   * Set debug mode to enable/disable logs at info level.
   *
   * @param {boolean} enabled
   * @fires Player#debugon
   * @fires Player#debugoff
   * @return {boolean|undefined}
   */debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}
/**
   * Set or get current playback rates.
   * Takes an array and updates the playback rates menu with the new items.
   * Pass in an empty array to hide the menu.
   * Values other than arrays are ignored.
   *
   * @fires Player#playbackrateschange
   * @param {number[]} [newRates]
   *                   The new rates that the playback rates menu should update to.
   *                   An empty array will hide the menu
   * @return {number[]} When used as a getter will return the current playback rates
   */playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>"number"==typeof e))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}
/**
   * Reports whether or not a player has a plugin available.
   *
   * This does not report whether or not the plugin has ever been initialized
   * on this player. For that, [usingPlugin]{@link Player#usingPlugin}.
   *
   * @method hasPlugin
   * @param  {string}  name
   *         The name of a plugin.
   *
   * @return {boolean}
   *         Whether or not this player has the requested plugin available.
   */
/**
   * Reports whether or not a player is using a plugin by name.
   *
   * For basic plugins, this only reports whether the plugin has _ever_ been
   * initialized on this player.
   *
   * @method Player#usingPlugin
   * @param  {string} name
   *         The name of a plugin.
   *
   * @return {boolean}
   *         Whether or not this player is using the requested plugin.
   */}eQ.names.forEach((function(e){const t=eQ[e];Z_.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Z_.prototype.crossorigin=Z_.prototype.crossOrigin,Z_.players={};const eS=lI.navigator;Z_.prototype.options_={
// Default order of fallback technology
techOrder:tQ.defaultTechOrder_,html5:{},
// enable sourceset by default
enableSourceset:!0,
// default inactivity timeout
inactivityTimeout:2e3,
// default playback rates
playbackRates:[],
// Add playback rate selection by adding rates
// 'playbackRates': [0.5, 1, 1.5, 2],
liveui:!1,
// Included control sets
children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:eS&&(eS.languages&&eS.languages[0]||eS.userLanguage||eS.language)||"en",
// locales and their language translations
languages:{},
// Default message to show when a video cannot be played.
notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},
// Default smooth seeking to false
enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1},j_.forEach((function(e){Z_.prototype[`handleTech${Aw(e)}_`]=function(){return this.trigger(e)}})),hw.registerComponent("Player",Z_);const tS="plugin",iS="activePlugins_",nS={},sS=e=>nS.hasOwnProperty(e),rS=e=>sS(e)?nS[e]:void 0,aS=(e,t)=>{e[iS]=e[iS]||{},e[iS][t]=!0},oS=(e,t,i)=>{const n=(i?"before":"")+"pluginsetup";e.trigger(n,t),e.trigger(n+":"+t.name,t)},lS=(e,t)=>(t.prototype.name=e,function(...i){oS(this,{name:e,plugin:t,instance:null},!0);const n=new t(...[this,...i]);return this[e]=()=>n,oS(this,n.getEventHash()),n});class AS{
/**
   * Creates an instance of this class.
   *
   * Sub-classes should call `super` to ensure plugins are properly initialized.
   *
   * @param {Player} player
   *        A Video.js player instance.
   */
constructor(e){if(this.constructor===AS)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),rw(this),delete this.trigger,ow(this,this.constructor.defaultState),aS(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}
/**
   * Get the version of the plugin that was set on <pluginName>.VERSION
   */version(){return this.constructor.VERSION}
/**
   * Each event triggered by plugins includes a hash of additional data with
   * conventional properties.
   *
   * This returns that object or mutates an existing hash.
   *
   * @param   {Object} [hash={}]
   *          An object to be used as event an event hash.
   *
   * @return {PluginEventHash}
   *          An event hash object with provided properties mixed-in.
   */getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}
/**
   * Triggers an event on the plugin object and overrides
   * {@link module:evented~EventedMixin.trigger|EventedMixin.trigger}.
   *
   * @param   {string|Object} event
   *          An event type or an object with a type property.
   *
   * @param   {Object} [hash={}]
   *          Additional data hash to merge with a
   *          {@link PluginEventHash|PluginEventHash}.
   *
   * @return {boolean}
   *          Whether or not default was prevented.
   */trigger(e,t={}){return HE(this.eventBusEl_,e,this.getEventHash(t))}
/**
   * Handles "statechanged" events on the plugin. No-op by default, override by
   * subclassing.
   *
   * @abstract
   * @param    {Event} e
   *           An event object provided by a "statechanged" event.
   *
   * @param    {Object} e.changes
   *           An object describing changes that occurred with the "statechanged"
   *           event.
   */handleStateChanged(e){}
/**
   * Disposes a plugin.
   *
   * Subclasses can override this if they want, but for the sake of safety,
   * it's probably best to subscribe the "dispose" event.
   *
   * @fires Plugin#dispose
   */dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[iS][e]=!1,this.player=this.state=null,t[e]=lS(e,nS[e])}
/**
   * Determines if a plugin is a basic plugin (i.e. not a sub-class of `Plugin`).
   *
   * @param   {string|Function} plugin
   *          If a string, matches the name of a plugin. If a function, will be
   *          tested directly.
   *
   * @return {boolean}
   *          Whether or not a plugin is a basic plugin.
   */static isBasic(e){const t="string"==typeof e?rS(e):e;return"function"==typeof t&&!AS.prototype.isPrototypeOf(t.prototype)}
/**
   * Register a Video.js plugin.
   *
   * @param   {string} name
   *          The name of the plugin to be registered. Must be a string and
   *          must not match an existing plugin or a method on the `Player`
   *          prototype.
   *
   * @param   {typeof Plugin|Function} plugin
   *          A sub-class of `Plugin` or a function for basic plugins.
   *
   * @return {typeof Plugin|Function}
   *          For advanced plugins, a factory function for that plugin. For
   *          basic plugins, a wrapper function that initializes the plugin.
   */static registerPlugin(e,t){if("string"!=typeof e)throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(sS(e))ob.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(Z_.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if("function"!=typeof t)throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return nS[e]=t,e!==tS&&(AS.isBasic(t)?Z_.prototype[e]=function(e,t){const i=function(){oS(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return aS(this,e),oS(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):Z_.prototype[e]=lS(e,t)),t}
/**
   * De-register a Video.js plugin.
   *
   * @param  {string} name
   *         The name of the plugin to be de-registered. Must be a string that
   *         matches an existing plugin.
   *
   * @throws {Error}
   *         If an attempt is made to de-register the base plugin.
   */static deregisterPlugin(e){if(e===tS)throw new Error("Cannot de-register base plugin.");sS(e)&&(delete nS[e],delete Z_.prototype[e])}
/**
   * Gets an object containing multiple Video.js plugins.
   *
   * @param   {Array} [names]
   *          If provided, should be an array of plugin names. Defaults to _all_
   *          plugin names.
   *
   * @return {Object|undefined}
   *          An object containing plugin(s) associated with their name(s) or
   *          `undefined` if no matching plugins exist).
   */static getPlugins(e=Object.keys(nS)){let t;return e.forEach((e=>{const i=rS(e);i&&(t=t||{},t[e]=i)})),t}
/**
   * Gets a plugin's version, if available
   *
   * @param   {string} name
   *          The name of a plugin.
   *
   * @return {string}
   *          The plugin's version or an empty string.
   */static getPluginVersion(e){const t=rS(e);return t&&t.VERSION||""}}function cS(e,t,i,n){return function(e,t){let i=!1;return function(...n){return i||ob.warn(e),i=!0,t.apply(this,n)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,n)}AS.getPlugin=rS,AS.BASE_PLUGIN_NAME=tS,AS.registerPlugin(tS,AS),Z_.prototype.usingPlugin=function(e){return!!this[iS]&&!0===this[iS][e]},Z_.prototype.hasPlugin=function(e){return!!sS(e)};const uS=e=>0===e.indexOf("#")?e.slice(1):e;function hS(e,t,i){let n=hS.getPlayer(e);if(n)return t&&ob.warn(`Player "${e}" is already initialised. Options will not be applied.`),i&&n.ready(i),n;const s="string"==typeof e?mE("#"+uS(e)):e;if(!Yb(s))throw new TypeError("The element or ID supplied is not valid. (videojs)");const r="getRootNode"in s&&s.getRootNode()instanceof lI.ShadowRoot?s.getRootNode():s.ownerDocument.body;s.ownerDocument.defaultView&&r.contains(s)||ob.warn("The element supplied is not included in the DOM"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player")?s.parentNode:s).cloneNode(!0)),eb("beforesetup").forEach((e=>{const i=e(s,pb(t));db(i)&&!Array.isArray(i)?t=pb(t,i):ob.error("please return an object in beforesetup hooks")}));const a=hw.getComponent("Player");return n=new a(s,t,i),eb("setup").forEach((e=>e(n))),n}if(hS.hooks_=Zy,hS.hooks=eb,hS.hook=function(e,t){eb(e,t)},hS.hookOnce=function(e,t){eb(e,[].concat(t).map((t=>{const i=(...n)=>(tb(e,i),t(...n));return i})))},hS.removeHook=tb,!0!==lI.VIDEOJS_NO_DYNAMIC_STYLE&&qb()){let e=mE(".vjs-styles-defaults");if(!e){e=_E("vjs-styles-defaults");const t=mE("head");t&&t.insertBefore(e,t.firstChild),SE(e,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: 56.25%\n      }\n    ")}}wE(1,hS),hS.VERSION=$y,hS.options=Z_.prototype.options_,hS.getPlayers=()=>Z_.players,hS.getPlayer=e=>{const t=Z_.players;let i;if("string"==typeof e){const n=uS(e),s=t[n];if(s)return s;i=mE("#"+n)}else i=e;if(Yb(i)){const{player:e,playerId:n}=i;if(e||t[n])return e||t[n]}},hS.getAllPlayers=()=>
// Disposed players leave a key with a `null` value, so we need to make sure
// we filter those out.
Object.keys(Z_.players).map((e=>Z_.players[e])).filter(Boolean),hS.players=Z_.players,hS.getComponent=hw.getComponent,hS.registerComponent=(e,t)=>(tQ.isTech(t)&&ob.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),hw.registerComponent.call(hw,e,t)),hS.getTech=tQ.getTech,hS.registerTech=tQ.registerTech,hS.use=function(e,t){iQ[e]=iQ[e]||[],iQ[e].push(t)},Object.defineProperty(hS,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(hS.middleware,"TERMINATOR",{value:sQ,writeable:!1,enumerable:!0}),hS.browser=Gb,hS.obj=Cb,hS.mergeOptions=cS(9,"videojs.mergeOptions","videojs.obj.merge",pb),hS.defineLazyProperty=cS(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",mb),hS.bind=cS(9,"videojs.bind","native Function.prototype.bind",qE),hS.registerPlugin=AS.registerPlugin,hS.deregisterPlugin=AS.deregisterPlugin,hS.plugin=(e,t)=>(ob.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),AS.registerPlugin(e,t)),hS.getPlugins=AS.getPlugins,hS.getPlugin=AS.getPlugin,hS.getPluginVersion=AS.getPluginVersion,hS.addLanguage=function(e,t){return e=(""+e).toLowerCase(),hS.options.languages=pb(hS.options.languages,{[e]:t}),hS.options.languages[e]},hS.log=ob,hS.createLogger=lb,hS.time=Bw,hS.createTimeRange=cS(9,"videojs.createTimeRange","videojs.time.createTimeRanges",pw),hS.createTimeRanges=cS(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",pw),hS.formatTime=cS(9,"videojs.formatTime","videojs.time.formatTime",vw),hS.setFormatTime=cS(9,"videojs.setFormatTime","videojs.time.setFormatTime",Cw),hS.resetFormatTime=cS(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",Iw),hS.parseUrl=cS(9,"videojs.parseUrl","videojs.url.parseUrl",Ow),hS.isCrossOrigin=cS(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",qw),hS.EventTarget=JE,hS.any=OE,hS.on=LE,hS.one=PE,hS.off=UE,hS.trigger=HE,hS.xhr=NI,hS.TextTrack=jw,hS.AudioTrack=Jw,hS.VideoTrack=zw,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((e=>{hS[e]=function(){return ob.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),BE[e].apply(null,arguments)}})),hS.computedStyle=cS(9,"videojs.computedStyle","videojs.dom.computedStyle",IE),hS.dom=BE,hS.fn=WE,hS.num=NQ,hS.str=uw,hS.url=Yw,hS.Error={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};
/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */
class dS{
/**
   * Creates a QualityLevel
   *
   * @param {Representation|Object} representation The representation of the quality level
   * @param {string}   representation.id        Unique id of the QualityLevel
   * @param {number=}  representation.width     Resolution width of the QualityLevel
   * @param {number=}  representation.height    Resolution height of the QualityLevel
   * @param {number}   representation.bandwidth Bitrate of the QualityLevel
   * @param {number=}  representation.frameRate Frame-rate of the QualityLevel
   * @param {Function} representation.enabled   Callback to enable/disable QualityLevel
   */
constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{
/**
       * Get whether the QualityLevel is enabled.
       *
       * @return {boolean} True if the QualityLevel is enabled.
       */
get:()=>t.enabled_(),
/**
       * Enable or disable the QualityLevel.
       *
       * @param {boolean} enable true to enable QualityLevel, false to disable.
       */
set(e){t.enabled_(e)}}),t}}class gS extends hS.EventTarget{
/**
   * Creates a QualityLevelList.
   */
constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get:()=>e.selectedIndex_}),Object.defineProperty(e,"length",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}
/**
   * Adds a quality level to the list.
   *
   * @param {Representation|Object} representation The representation of the quality level
   * @param {string}   representation.id        Unique id of the QualityLevel
   * @param {number=}  representation.width     Resolution width of the QualityLevel
   * @param {number=}  representation.height    Resolution height of the QualityLevel
   * @param {number}   representation.bandwidth Bitrate of the QualityLevel
   * @param {number=}  representation.frameRate Frame-rate of the QualityLevel
   * @param {Function} representation.enabled   Callback to enable/disable QualityLevel
   * @return {QualityLevel} the QualityLevel added to the list
   * @method addQualityLevel
   */addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new dS(e),""+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}
/**
   * Removes a quality level from the list.
   *
   * @param {QualityLevel} qualityLevel The QualityLevel to remove from the list.
   * @return {QualityLevel|null} the QualityLevel removed or null if nothing removed
   * @method removeQualityLevel
   */removeQualityLevel(e){let t=null;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}
/**
   * Searches for a QualityLevel with the given id.
   *
   * @param {string} id The id of the QualityLevel to find.
   * @return {QualityLevel|null} The QualityLevel with id, or null if not found.
   * @method getQualityLevelById
   */getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}
/**
   * Resets the list of QualityLevels to empty
   *
   * @method dispose
   */dispose(){this.selectedIndex_=-1,this.levels_.length=0}}gS.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const _ in gS.prototype.allowedEvents_)gS.prototype["on"+_]=null;var pS="4.1.0";const fS=function(e){return function(e){const t=e.qualityLevels,i=new gS,n=function(){i.dispose(),e.qualityLevels=t,e.off("dispose",n)};return e.on("dispose",n),e.qualityLevels=()=>i,e.qualityLevels.VERSION=pS,i}(this,hS.obj.merge({},e))};hS.registerPlugin("qualityLevels",fS),fS.VERSION=pS;
/*! @name @videojs/http-streaming @version 3.16.2 @license Apache-2.0 */
const mS=yv,CS=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,IS=e=>hS.log.debug?hS.log.debug.bind(hS,"VHS:",`${e} >`):function(){};function vS(...e){const t=hS.obj||hS;return(t.merge||t.mergeOptions).apply(t,e)}function BS(...e){const t=hS.time||hS;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const yS=1/30,bS=.1,ES=function(e,t){const i=[];let n;if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&i.push([e.start(n),e.end(n)]);return BS(i)},wS=function(e,t){return ES(e,(function(e,i){return e-bS<=t&&i+bS>=t}))},QS=function(e,t){return ES(e,(function(e){return e-yS>=t}))},_S=e=>{const t=[];if(!e||!e.length)return"";for(let i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},SS=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},xS=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},kS=function(e,t){let i=0;if(!e||!e.length)return i;for(let n=0;n<e.length;n++){const s=e.start(n),r=e.end(n);t>r||(i+=t>s&&t<=r?r-t:r-s)}return i},DS=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(i+=e.partTargetDuration)})),i},FS=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(n,s){e.push({duration:n.duration,segmentIndex:i,partIndex:s,part:n,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),TS=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},MS=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let n=(i||[]).reduce(((e,t)=>e+("PART"===t.type?1:0)),0);return n+=t&&t.length?t.length:0,n},RS=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=TS(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},NS=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const n=function(e,t){let i=0,n=t-e.mediaSequence,s=e.segments[n];if(s){if(void 0!==s.start)return{result:s.start,precise:!0};if(void 0!==s.end)return{result:s.end-s.duration,precise:!0}}for(;n--;){if(s=e.segments[n],void 0!==s.end)return{result:i+s.end,precise:!0};if(i+=DS(e,s),void 0!==s.start)return{result:i+s.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(n.precise)return n.result;const s=function(e,t){let i,n=0,s=t-e.mediaSequence;for(;s<e.segments.length;s++){if(i=e.segments[s],void 0!==i.start)return{result:i.start-n,precise:!0};if(n+=DS(e,i),void 0!==i.end)return{result:i.end-n,precise:!0}}return{result:-1,precise:!1}}(e,t);return s.precise?s.result:n.result+i},LS=function(e,t,i){if(!e)return 0;if("number"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return lI.Infinity}return NS(e,t,i)},US=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:n}){let s=0;if(i>n&&([i,n]=[n,i]),i<0){for(let t=i;t<Math.min(0,n);t++)s+=e;i=0}for(let r=i;r<n;r++)s+=t[r].duration;return s},HS=function(e,t,i,n){if(!e||!e.segments)return null;if(e.endList)return LS(e);if(null===t)return null;t=t||0;let s=NS(e,e.mediaSequence+e.segments.length,t);return i&&(s-=n="number"==typeof n?n:RS(null,e)),Math.max(0,s)},PS=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},OS=function(e){return e.excludeUntil&&e.excludeUntil===1/0},GS=function(e){const t=PS(e);return!e.disabled&&!t},KS=function(e,t){return t.attributes&&t.attributes[e]},qS=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!GS(e)&&(e.attributes.BANDWIDTH||0)<i)).length},YS=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),VS=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let n=!1;for(const s in i){for(const e in i[s])if(n=t(i[s][e]),n)break;if(n)break}return!!n},WS=e=>{if(!e||!e.playlists||!e.playlists.length){return VS(e,(e=>e.playlists&&e.playlists.length||e.uri))}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],n=i.attributes&&i.attributes.CODECS;if(n&&n.split(",").every((e=>Ov(e))))continue;if(!VS(e,(e=>YS(i,e))))return!1}return!0};var jS={liveEdgeDelay:RS,duration:LS,seekable:function(e,t,i){const n=t||0;let s=HS(e,t,!0,i);return null===s?BS():(s<n&&(s=n),BS(n,s))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:n,startTime:s,exactManifestTimings:r}){let a=t-s;const o=FS(e);let l=0;for(let A=0;A<o.length;A++){const e=o[A];if(i===e.segmentIndex&&("number"!=typeof n||"number"!=typeof e.partIndex||n===e.partIndex)){l=A;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+yS<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:s-US({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let A=l;A<o.length;A++){const t=o[A];a-=t.duration;const i=t.duration>yS;if(!(0===a)&&!(i&&a+yS>=0)||A===o.length-1){if(r){if(a>0)continue}else if(a-yS>=0)continue;return{partIndex:t.partIndex,segmentIndex:t.segmentIndex,startTime:s+US({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:A})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:GS,isDisabled:function(e){return e.disabled},isExcluded:PS,isIncompatible:OS,playlistEnd:HS,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:KS,estimateSegmentRequestTime:function(e,t,i,n=0){if(!KS("BANDWIDTH",i))return NaN;return(e*i.attributes.BANDWIDTH-8*n)/t},isLowestEnabledRendition:qS,isAudioOnly:WS,playlistMatch:YS,segmentDurationWithParts:DS};const{log:JS}=hS,zS=(e,t)=>`${e}-${t}`,XS=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,$S=(e,t)=>{e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((i=>{if(e.mediaGroups[i])for(const n in e.mediaGroups[i])for(const s in e.mediaGroups[i][n]){const r=e.mediaGroups[i][n][s];t(r,i,n,s)}}))},ZS=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},ex=(e,t,i=XS)=>{e.uri=t;for(let s=0;s<e.playlists.length;s++)if(!e.playlists[s].uri){const t=`placeholder-uri-${s}`;e.playlists[s].uri=t}const n=WS(e);$S(e,((t,s,r,a)=>{if(!t.playlists||!t.playlists.length){if(n&&"AUDIO"===s&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[fI({},t)]}t.playlists.forEach((function(t,n){const o=i(s,r,a,t),l=zS(n,o);t.uri?t.resolvedUri=t.resolvedUri||mS(e.uri,t.uri):(t.uri=0===n?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];ZS({playlist:i,id:zS(t,i.uri)}),i.resolvedUri=mS(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||JS.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}})(e),(e=>{$S(e,(t=>{t.uri&&(t.resolvedUri=mS(e.uri,t.uri))}))})(e)};class tx{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,n)=>{if(!this.processedDateRanges_.has(n)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const ix=({requestType:e,request:t,error:i,parseFailure:n})=>{const s=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=s&&!r||n;if(i&&r)a.error=fI({},i),a.errorType=hS.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=hS.Error.NetworkRequestAborted;else if(t.timedout)a.erroType=hS.Error.NetworkRequestTimeout;else if(o){const e=n?hS.Error.NetworkBodyParserFailed:hS.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},{EventTarget:nx}=hS,sx=(e,t)=>{if(!e)return t;const i=vS(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let n=0;n<t.parts.length;n++)e.parts&&e.parts[n]&&(i.parts[n]=vS(e.parts[n],t.parts[n]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},rx=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=mS(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=mS(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=mS(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=mS(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=mS(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=mS(t,e.uri))}))},ax=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if("MAP"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},ox=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,lx=(e,t,i=ox)=>{const n=vS(e,{}),s=n.playlists[t.id];if(!s)return null;if(i(s,t))return null;t.segments=ax(t);const r=vS(s,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,s.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const n=e.slice(),s=t.slice();i=i||0;const r=[];let a;for(let o=0;o<s.length;o++){const e=n[o+i],t=s[o];e?(a=e.map||a,r.push(sx(e,t))):(a&&!t.map&&(t.map=a),r.push(t))}return r})(s.segments,t.segments,t.mediaSequence-s.mediaSequence)}r.segments.forEach((e=>{rx(e,r.resolvedUri)}));for(let a=0;a<n.playlists.length;a++)n.playlists[a].id===t.id&&(n.playlists[a]=r);return n.playlists[t.id]=r,n.playlists[t.uri]=r,$S(e,((e,i,n,s)=>{if(e.playlists)for(let a=0;a<e.playlists.length;a++)t.id===e.playlists[a].id&&(e.playlists[a]=r)})),n},Ax=(e,t)=>{const i=e.segments||[],n=i[i.length-1],s=n&&n.parts&&n.parts[n.parts.length-1],r=s&&s.duration||n&&n.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},cx=(e,t,i)=>{if(!e)return;const n=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:s}=e.attributes;n.push({id:e.id,bandwidth:t,resolution:i,codecs:s})})),{type:t,isLive:i,renditions:n}};class ux extends nx{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=IS("PlaylistLoader");const{withCredentials:n=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=n,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const s=t.options_;this.customTagParsers=s&&s.customTagParsers||[],this.customTagMappers=s&&s.customTagMappers||[],this.llhls=s&&s.llhls,this.dateRangesStorage_=new tx,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if("HAVE_METADATA"!==this.state)return;const e=this.media();let t=mS(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let n=t.mediaSequence+t.segments.length;if(e){const s=e.parts||[],r=MS(t)-1;r>-1&&r!==s.length-1&&(i._HLS_part=r),(r>-1||s.length)&&n--}i._HLS_msn=n}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const t=new lI.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:"hls-playlist"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:n,id:s}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[s],status:e.status,message:`HLS playlist request error at URL: ${n}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:ix({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:t}){try{return(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:n=[],customTagMappers:s=[],llhls:r})=>{const a=new Tv;e&&a.on("warn",e),t&&a.on("info",t),n.forEach((e=>a.addParser(e))),s.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=TS(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),JS.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}catch(i){this.error=i,this.error.metadata={errorType:hS.Error.StreamingHlsPlaylistParserError,error:i}}}
/**
   * Update the playlist loader's state in response to a new or updated playlist.
   *
   * @param {string} [playlistString]
   *        Playlist string (if playlistObject is not provided)
   * @param {Object} [playlistObject]
   *        Playlist object (if playlistString is not provided)
   * @param {string} url
   *        URL of playlist
   * @param {string} id
   *        ID to use for playlist
   */haveMetadata({playlistString:e,playlistObject:t,url:i,id:n}){this.request=null,this.state="HAVE_METADATA";const s={playlistInfo:{type:"media",uri:i}};this.trigger({type:"playlistparsestart",metadata:s});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),ZS({playlist:r,uri:i,id:n});const a=lx(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[n]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Ax(this.media(),!!a)),s.parsedPlaylist=cx(this.main.playlists,s.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:s}),this.trigger("loadedplaylist")}
/**
    * Abort any outstanding work and clean up.
    */dispose(){this.trigger("dispose"),this.stopRequest(),lI.clearTimeout(this.mediaUpdateTimeout),lI.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new tx,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}
/**
    * When called without any arguments, returns the currently
    * active media playlist. When called with a single argument,
    * triggers the playlist loader to asynchronously switch to the
    * specified media playlist. Calling this method while the
    * loader is in the HAVE_NOTHING causes an error to be emitted
    * but otherwise has no effect.
    *
    * @param {Object=} playlist the parsed media playlist
    * object to switch to
    * @param {boolean=} shouldDelay whether we should delay the request by half target duration
    *
    * @return {Playlist} the current loaded media
    */media(e,t){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(lI.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=lI.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,n=!this.media_||e.id!==this.media_.id,s=this.main.playlists[e.id];if(s&&s.endList||// handle the case of a playlist object (e.g., if using vhs-json with a resolved
// media playlist or, for the case of demuxed audio, a resolved audio media group)
e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(n&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Ax(e,!0)),!n)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const r={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:r}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},((t,n)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=CS(e.resolvedUri,n),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:"playlistrequestcomplete",metadata:r}),this.haveMetadata({playlistString:n.responseText,url:e.uri,id:e.id}),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")}}))}
/**
   * pause loading of the playlist
   */pause(){this.mediaUpdateTimeout&&(lI.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}
/**
   * start loading of the playlist
   */load(e){this.mediaUpdateTimeout&&(lI.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=lI.setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(lI.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=lI.setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)}),e))}
/**
   * start loading of the playlist
   */start(){if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=lI.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,
// MEDIA_ERR_NETWORK
code:2,metadata:ix({requestType:i.requestType,request:i,error:t})},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=CS(this.src,i),this.trigger({type:"playlistparsestart",metadata:e});const n=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=cx(n.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(n)}))}srcUri(){return"string"==typeof this.src?this.src:this.src.uri}
/**
   * Given a manifest object that's either a main or media playlist, trigger the proper
   * events and set the state of the playlist loader.
   *
   * If the manifest object represents a main playlist, `loadedplaylist` will be
   * triggered to allow listeners to select a playlist. If none is selected, the loader
   * will default to the first one in the playlists array.
   *
   * If the manifest object represents a media playlist, `loadedplaylist` will be
   * triggered followed by `loadedmetadata`, as the only available playlist is loaded.
   *
   * In the case of a media playlist, a main playlist object wrapper with one playlist
   * will be created so that all logic can handle playlists in the same fashion (as an
   * assumed manifest object schema).
   *
   * @param {Object} manifest
   *        The parsed manifest object
   */setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists)return this.main=e,ex(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=ax(e),e.segments.forEach((t=>{rx(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||lI.location.href;this.main=((e,t)=>{const i=zS(0,t),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:lI.location.href,resolvedUri:lI.location.href,playlists:[{uri:t,id:i,resolvedUri:t,
// m3u8-parser does not attach an attributes property to media playlists so make
// sure that the property is attached to avoid undefined reference errors
attributes:{}}]};return n.playlists[i]=n.playlists[0],n.playlists[t]=n.playlists[0],n})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}
/**
   * Updates or deletes a preexisting pathway clone.
   * Ensures that all playlists related to the old pathway clone are
   * either updated or deleted.
   *
   * @param {Object} clone On update, the pathway clone object for the newly updated pathway clone.
   *        On delete, the old pathway clone object to be deleted.
   * @param {boolean} isUpdate True if the pathway is to be updated,
   *        false if it is meant to be deleted.
   */updateOrDeleteClone(e,t){const i=this.main,n=e.ID;let s=i.playlists.length;for(;s--;){const r=i.playlists[s];if(r.attributes["PATHWAY-ID"]===n){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=zS(n,t),o=this.createCloneAttributes_(n,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[s]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(s,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}
/**
   * Updates or deletes media data based on the pathway clone object.
   * Due to the complexity of the media groups and playlists, in all cases
   * we remove all of the old media groups and playlists.
   * On updates, we then create new media groups and playlists based on the
   * new pathway clone object.
   *
   * @param {Object} clone The pathway clone object for the newly updated pathway clone.
   * @param {boolean} isUpdate True if the pathway is to be updated,
   *        false if it is meant to be deleted.
   */updateOrDeleteCloneMedia(e,t){const i=this.main,n=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][n])for(const t in i.mediaGroups[e])if(t===n){for(const n in i.mediaGroups[e][t]){i.mediaGroups[e][t][n].playlists.forEach(((e,t)=>{const n=i.playlists[e.id],s=n.id,r=n.resolvedUri;delete i.playlists[s],delete i.playlists[r]}))}delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}
/**
   * Given a pathway clone object, clones all necessary playlists.
   *
   * @param {Object} clone The pathway clone object.
   * @param {Object} basePlaylist The original playlist to clone from.
   */addClonePathway(e,t={}){const i=this.main,n=i.playlists.length,s=this.createCloneURI_(t.resolvedUri,e),r=zS(e.ID,s),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[n]=o,i.playlists[r]=o,i.playlists[s]=o,this.createClonedMediaGroups_(e)}
/**
   * Given a pathway clone object we create clones of all media.
   * In this function, all necessary information and updated playlists
   * are added to the `mediaGroup` object.
   * Playlists are also added to the `playlists` array so the media groups
   * will be properly linked.
   *
   * @param {Object} clone The pathway clone object.
   */createClonedMediaGroups_(e){const t=e.ID,i=e["BASE-ID"],n=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((s=>{if(n.mediaGroups[s]&&!n.mediaGroups[s][t])for(const r in n.mediaGroups[s])if(r===i){n.mediaGroups[s][t]={};for(const i in n.mediaGroups[s][r]){const a=n.mediaGroups[s][r][i];n.mediaGroups[s][t][i]=fI({},a);const o=n.mediaGroups[s][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=n.playlists[r.id],A=XS(s,t,i),c=zS(t,A);if(l&&!n.playlists[c]){const t=this.createClonePlaylist_(l,c,e),i=t.resolvedUri;n.playlists[c]=t,n.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,c,e)}))}}}))}
/**
   * Using the original playlist to be cloned, and the pathway clone object
   * information, we create a new playlist.
   *
   * @param {Object} basePlaylist  The original playlist to be cloned from.
   * @param {string} id The desired id of the newly cloned playlist.
   * @param {Object} clone The pathway clone object.
   * @param {Object} attributes An optional object to populate the `attributes` property in the playlist.
   *
   * @return {Object} The combined cloned playlist.
   */createClonePlaylist_(e,t,i,n){const s=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:s,uri:s,id:t};return e.segments&&(r.segments=[]),n&&(r.attributes=n),vS(e,r)}
/**
   * Generates an updated URI for a cloned pathway based on the original
   * pathway's URI and the paramaters from the pathway clone object in the
   * content steering server response.
   *
   * @param {string} baseUri URI to be updated in the cloned pathway.
   * @param {Object} clone The pathway clone object.
   *
   * @return {string} The updated URI for the cloned pathway.
   */createCloneURI_(e,t){const i=new URL(e);i.hostname=t["URI-REPLACEMENT"].HOST;const n=t["URI-REPLACEMENT"].PARAMS;for(const s of Object.keys(n))i.searchParams.set(s,n[s]);return i.href}
/**
   * Helper function to create the attributes needed for the new clone.
   * This mainly adds the necessary media attributes.
   *
   * @param {string} id The pathway clone object ID.
   * @param {Object} oldAttributes The old attributes to compare to.
   * @return {Object} The new attributes to add to the playlist.
   */createCloneAttributes_(e,t){const i={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((n=>{t[n]&&(i[n]=e)})),i}
/**
   * Returns the key ID set from a playlist
   *
   * @param {playlist} playlist to fetch the key ID set from.
   * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.
   */getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const n=e.contentProtection[i].attributes.keyId;n&&t.add(n.toLowerCase())}return t}}}const hx=function(e,t,i,n){const s="arraybuffer"===e.responseType?e.response:e.responseText;!t&&s&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=s.byteLength||s.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(s||e.responseText)))),n(t,e)},gx=function(){const e=function e(t,i){t=vS({timeout:45e3},t);const n=e.beforeRequest||hS.Vhs.xhr.beforeRequest,s=e._requestCallbackSet||hS.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||hS.Vhs.xhr._responseCallbackSet;n&&"function"==typeof n&&(hS.log.warn("beforeRequest is deprecated, use onRequest instead."),s.add(n));const a=!0===hS.Vhs.xhr.original?hS.xhr:hS.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(s,t);s.delete(n);const l=a(o||t,(function(e,t){return((e,t,i,n)=>{e&&e.size&&e.forEach((e=>{e(t,i,n)}))})(r,l,e,t),hx(l,e,t,i)})),A=l.abort;return l.abort=function(){return l.aborted=!0,A.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},px=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t="bigint"==typeof e.offset||"bigint"==typeof e.length?lI.BigInt(e.offset)+lI.BigInt(e.length)-lI.BigInt(1):e.offset+e.length-1,"bytes="+i+"-"+t}(e.byterange)),t},fx=function(e,t){return e.start(t)+"-"+e.end(t)},mx=function(e,t){const i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},Cx=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ix=function(e){const t={};return Object.keys(e).forEach((i=>{const n=e[i];Jv(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n})),t},vx=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Bx=function(e){return e.resolvedUri},yx=e=>{const t=Array.prototype.slice.call(e),i=16;let n,s,r="";for(let a=0;a<t.length/i;a++)n=t.slice(a*i,a*i+i).map(mx).join(""),s=t.slice(a*i,a*i+i).map(Cx).join(""),r+=n+" "+s+"\n";return r};var bx=Object.freeze({__proto__:null,createTransferableMessage:Ix,initSegmentId:vx,segmentKeyId:Bx,hexDump:yx,tagDump:({bytes:e})=>yx(e),textRanges:e=>{let t,i="";for(t=0;t<e.length;t++)i+=fx(e,t)+" ";return i}});const Ex=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!e||void 0===t)return i({message:"getProgramTime: playlist and time must be provided"});const n=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,n=0;for(let r=0;r<t.segments.length&&(i=t.segments[r],n=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:n+i.duration,!(e<=n));r++);const s=t.segments[t.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>n){if(e>n+.25*s.duration)return null;i=s}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:n-i.duration,
// Because videoTimingInfo is only set after transmux, it is the only way to get
// accurate timing values.
type:i.videoTimingInfo?"accurate":"estimate"}})(t,e);if(!n)return i({message:"valid programTime was not found"});if("estimate"===n.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:n.estimatedStart});const s={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,n=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*n)})(t,n.segment);return r&&(s.programDateTime=r.toISOString()),i(null,s)},wx=({programTime:e,playlist:t,retryCount:i=2,seekTo:n,pauseAfterSeek:s=!0,tech:r,callback:a})=>{if(!a)throw new Error("seekToProgramTime: callback must be provided");if(void 0===e||!t||!n)return a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!t.endList&&!r.hasStarted_)return a({message:"player must be playing a live stream to start buffering"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(I2){return null}if(!t||!t.segments||0===t.segments.length)return null;let n=t.segments[0];if(i<new Date(n.dateTimeObject))return null;for(let l=0;l<t.segments.length-1&&(n=t.segments[l],!(i<new Date(t.segments[l+1].dateTimeObject)));l++);const s=t.segments[t.segments.length-1],r=s.dateTimeObject,a=s.videoTimingInfo?(o=s.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:s.duration+.25*s.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(n=s),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:jS.duration(t,t.mediaSequence+t.segments.indexOf(n)),
// Although, given that all segments have accurate date time objects, the segment
// selected should be accurate, unless the video has been transmuxed at some point
// (determined by the presence of the videoTimingInfo object), the segment's "player
// time" (the start time in the player) can't be considered accurate.
type:n.videoTimingInfo?"accurate":"estimate"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,A=((e,t)=>{let i,n;try{i=new Date(e),n=new Date(t)}catch(I2){}const s=i.getTime();return(n.getTime()-s)/1e3})(l.dateTimeObject,e);if("estimate"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(n(o.estimatedStart+A),void r.one("seeked",(()=>{wx({programTime:e,playlist:t,retryCount:i-1,seekTo:n,pauseAfterSeek:s,tech:r,callback:a})})));const c=l.start+A;r.one("seeked",(()=>a(null,r.currentTime()))),s&&r.pause(),n(c)},Qx=(e,t)=>{if(4===e.readyState)return t()},_x=(e,t,i,n)=>{let s,r=[],a=!1;const o=function(e,t,n,s){return t.abort(),a=!0,i(e,t,n,s)},l=function(e,t){if(a)return;if(e)return e.metadata=ix({requestType:n,request:t,error:e}),o(e,t,"",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e})),t.length<=1)return zv(t[0]);var n=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),s=new Uint8Array(n),r=0;return t.forEach((function(e){e=zv(e),s.set(e,r),r+=e.byteLength})),s}(r,nB(i,!0)),s=s||_y(r),r.length<10||s&&r.length<s+2)return Qx(t,(()=>o(e,t,"",r)));const l=Jy(r);return"ts"===l&&r.length<188||!l&&r.length<376?Qx(t,(()=>o(e,t,"",r))):o(null,t,l,r)},A=t({uri:e,beforeSend(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function({total:t,loaded:i}){return hx(e,null,{statusCode:e.status},l)}))}},(function(e,t){return hx(A,e,t,l)}));return A},{EventTarget:Sx}=hS,xx=function(e,t){if(!ox(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const n=e.segments[i],s=t.segments[i];if(n.uri!==s.uri)return!1;if(!n.byterange&&!s.byterange)continue;const r=n.byterange,a=s.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},kx=(e,t,i,n)=>`placeholder-uri-${e}-${t}-${n.attributes.NAME||i}`,Dx=(e,t,i)=>{let n=!0,s=vS(e,{
// These are top level properties that can be updated
duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let r=0;r<t.playlists.length;r++){const e=t.playlists[r];if(e.sidx){const t=qB(e.sidx);i&&i[t]&&i[t].sidx&&LB(e,i[t].sidx,e.sidx.resolvedUri)}const a=lx(s,e,xx);a&&(s=a,n=!1)}return $S(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=lx(s,e.playlists[0],xx);o&&(s=o,r in s.mediaGroups[t][i]||(s.mediaGroups[t][i][r]=e),s.mediaGroups[t][i][r].playlists[0]=s.playlists[a],n=!1)}})),((e,t)=>{$S(e,((i,n,s,r)=>{t.mediaGroups[n][s]&&r in t.mediaGroups[n][s]||delete e.mediaGroups[n][s][r]}))})(s,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(n=!1),n?null:s},Fx=(e,t)=>(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length,Tx=(e,t)=>{const i={};for(const n in e){const s=e[n].sidx;if(s){const e=qB(s);if(!t[e])break;const n=t[e].sidxInfo;Fx(n,s)&&(i[e]=t[e])}}return i};class Mx extends Sx{
// DashPlaylistLoader must accept either a src url or a playlist because subsequent
// playlist loader setups from media groups will expect to be able to pass a playlist
// (since there aren't external URLs to media playlists with DASH)
constructor(e,t,i={},n){super(),this.isPaused_=!0,this.mainPlaylistLoader_=n||this,n||(this.isMain_=!0);const{withCredentials:s=!1}=i;if(this.vhs_=t,this.withCredentials=s,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",(()=>{this.refreshXml_()})),this.on("mediaupdatetimeout",(()=>{this.refreshMedia_(this.media().id)})),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=IS("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,
// MEDIA_ERR_NETWORK
code:2,metadata:e.metadata}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)}
/**
   * Verify that the container of the sidx segment can be parsed
   * and if it can, get and parse that segment.
   */addSidxSegments_(e,t,i){const n=e.sidx&&qB(e.sidx);if(!e.sidx||!n||this.mainPlaylistLoader_.sidxMapping_[n])return lI.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=lI.setTimeout((()=>i(!1)),0));const s=CS(e.sidx.resolvedUri),r=(s,r)=>{if(this.requestErrored_(s,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=wy(zv(r.response).subarray(8))}catch(I2){return I2.metadata=ix({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(I2,r,t)}return a[n]={sidxInfo:e.sidx,sidx:l},LB(e,l,e.sidx.resolvedUri),i(!0)};this.request=_x(s,this.vhs_.xhr,((t,i,n,a)=>{if(t)return r(t,i);if(!n||"mp4"!==n){const t=n||"unknown";return r({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${s}`,
// response is just bytes in this case
// but we really don't want to return that.
response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,
// MEDIA_ERR_NETWORK
code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(a.length>=l+o)return r(t,{response:a.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:s,responseType:"arraybuffer",requestType:"dash-sidx",headers:px({byterange:e.sidx.byterange})},r)}),"dash-sidx")}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},lI.clearTimeout(this.minimumUpdatePeriodTimeout_),lI.clearTimeout(this.mediaRequest_),lI.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if("string"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,lI.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),"HAVE_MAIN_MANIFEST"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),lI.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(lI.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,lI.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=lI.setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){if(this.started=!0,!this.isMain_)return lI.clearTimeout(this.mediaRequest_),void(this.mediaRequest_=lI.setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},((i,n)=>{if(i){const{requestType:e}=n;i.metadata=ix({requestType:e,request:n,error:i})}if(this.requestErrored_(i,n))return void("HAVE_NOTHING"===this.state&&(this.started=!1));this.trigger({type:"manifestrequestcomplete",metadata:t});const s=n.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?this.mainLoaded_=Date.parse(n.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=CS(this.mainPlaylistLoader_.srcUrl,n),s?(this.handleMain_(),void this.syncClientServerClock_((()=>e(n,s)))):e(n,s)}))}
/**
   * Parses the main xml for UTCTiming node to sync the client clock to the server
   * clock. If the UTCTiming node requires a HEAD or GET request, that request is made.
   *
   * @param {Function} done
   *        Function to call when clock sync has completed
   */syncClientServerClock_(e){const t=By(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):"DIRECT"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:mS(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},((i,n)=>{if(!this.request)return;if(i){const{requestType:t}=n;return this.error.metadata=ix({requestType:t,request:n,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let s;s="HEAD"===t.method?n.responseHeaders&&n.responseHeaders.date?Date.parse(n.responseHeaders.date):this.mainLoaded_:Date.parse(n.responseText),this.mainPlaylistLoader_.clientOffset_=s-Date.now(),e()})))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){lI.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:"manifestparsestart",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:n,previousManifest:s})=>{const r=vy(e,{manifestUri:t,clientOffset:i,sidxMapping:n,previousManifest:s});return ex(r,t,kx),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(s){this.error=s,this.error.metadata={errorType:hS.Error.StreamingDashManifestParserError,error:s},this.trigger("error")}e&&(i=Dx(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const n=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(n&&n!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=n),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:n}=i,s=[];i.playlists.forEach((e=>{s.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!n,renditions:s};t.parsedManifest=r,this.trigger({type:"manifestparsecomplete",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(lI.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=lI.setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)}
/**
   * Sends request to refresh the main xml and updates the parsed main manifest
   */refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=Tx(e.playlists,t);return $S(e,((e,n,s,r)=>{if(e.playlists&&e.playlists.length){const n=e.playlists;i=vS(i,Tx(n,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}
/**
   * Refreshes the media playlist by re-parsing the main xml and updating playlist
   * references. If this is an alternate loader, the updated parsed manifest is retrieved
   * from the main loader.
   */refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=lI.setTimeout((()=>{this.trigger("mediaupdatetimeout"),e()}),Ax(this.media(),Boolean(i))))};e()}this.trigger("loadedplaylist")}
/**
   * Takes eventstream data from a parsed DASH manifest and adds it to the metadata text track.
   *
   * @param {manifest} newMain the newly parsed manifest
   */addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack("EventStream",e,this.mainPlaylistLoader_.main.duration)}}
/**
   * Returns the key ID set from a playlist
   *
   * @param {playlist} playlist to fetch the key ID set from.
   * @return a Set of 32 digit hex strings that represent the unique keyIds for that playlist.
   */getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const n=e.contentProtection[i].attributes["cenc:default_KID"];n&&t.add(n.replace(/-/g,"").toLowerCase())}return t}}}var Rx={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,
// 0.5 MB/s
INITIAL_BANDWIDTH:4194304,
// A fudge factor to apply to advertised playlist bitrates to account for
// temporary flucations in client bandwidth
BANDWIDTH_VARIANCE:1.2,
// How much of the buffer must be filled before we consider upswitching
BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,
// TODO: Remove this when experimentalBufferBasedABR is removed
EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,
// If the buffer is greater than the high water line, we won't switch down
BUFFER_HIGH_WATER_LINE:30};const Nx=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Lx=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(I2){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=Nx(new Worker(t));i.objURL=t;const n=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),n.call(this)},i}},Ux=function(e){return`var browserWorkerPolyFill = ${Nx.toString()};\nbrowserWorkerPolyFill(self);\n`+e},Hx=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},Px=Ux(Hx((function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var n;return!!e[t]&&(n=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){var i,n,s,r;if(i=e[t])if(2===arguments.length)for(s=i.length,n=0;n<s;++n)i[n].call(this,arguments[1]);else{for(r=[],n=arguments.length,n=1;n<arguments.length;++n)r.push(arguments[n]);for(s=i.length,n=0;n<s;++n)i[n].apply(this,r)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},t.prototype.push=function(e){this.trigger("data",e)},t.prototype.flush=function(e){this.trigger("done",e)},t.prototype.partialFlush=function(e){this.trigger("partialdone",e)},t.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},t.prototype.reset=function(e){this.trigger("reset",e)};var i,n,s,r,a,o,l,A,c,u,h,d,g,p,f,m,C,I,v,B,y,b,E,w,Q,_,S,x,k,D,F,T,M,R,N,L,U,H,P,O,G=t,K=Math.pow(2,32),q={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*K+i.getUint32(4)},MAX_UINT32:K},Y=q.MAX_UINT32;!function(){var e;if(b={avc1:[],
// codingname
avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],
// codingname
mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in b)b.hasOwnProperty(e)&&(b[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),Q=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),w=new Uint8Array([0,0,0,1]),_=new Uint8Array([0,
// version 0
0,0,0,
// flags
0,0,0,0,
// pre_defined
118,105,100,101,
// handler_type: 'vide'
0,0,0,0,
// reserved
0,0,0,0,
// reserved
0,0,0,0,
// reserved
86,105,100,101,111,72,97,110,100,108,101,114,0]),S=new Uint8Array([0,
// version 0
0,0,0,
// flags
0,0,0,0,
// pre_defined
115,111,117,110,
// handler_type: 'soun'
0,0,0,0,
// reserved
0,0,0,0,
// reserved
0,0,0,0,
// reserved
83,111,117,110,100,72,97,110,100,108,101,114,0]),x={video:_,audio:S},F=new Uint8Array([0,
// version 0
0,0,0,
// flags
0,0,0,1,
// entry_count
0,0,0,12,
// entry_size
117,114,108,32,
// 'url' type
0,
// version 0
0,0,1]),D=new Uint8Array([0,
// version
0,0,0,
// flags
0,0,
// balance, 0 means centered
0,0]),T=new Uint8Array([0,
// version
0,0,0,
// flags
0,0,0,0]),M=T,R=new Uint8Array([0,
// version
0,0,0,
// flags
0,0,0,0,
// sample_size
0,0,0,0]),N=T,k=new Uint8Array([0,
// version
0,0,1,
// flags
0,0,
// graphicsmode
0,0,0,0,0,0])}}(),i=function(e){var t,i,n=[],s=0;for(t=1;t<arguments.length;t++)n.push(arguments[t]);for(t=n.length;t--;)s+=n[t].byteLength;for(i=new Uint8Array(s+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,s=8;t<n.length;t++)i.set(n[t],s),s+=n[t].byteLength;return i},n=function(){return i(b.dinf,i(b.dref,F))},s=function(e){return i(b.esds,new Uint8Array([0,
// version
0,0,0,
// flags
// ES_Descriptor
3,
// tag, ES_DescrTag
25,
// length
0,0,
// ES_ID
0,
// streamDependenceFlag, URL_flag, reserved, streamPriority
// DecoderConfigDescriptor
4,
// tag, DecoderConfigDescrTag
17,
// length
64,
// object type
21,
// streamType
0,6,0,
// bufferSizeDB
0,0,218,192,
// maxBitrate
0,0,218,192,
// avgBitrate
// DecoderSpecificInfo
5,
// tag, DecoderSpecificInfoTag
2,
// length
// ISO/IEC 14496-3, AudioSpecificConfig
// for samplingFrequencyIndex see ISO/IEC 13818-7:2006, 8.1.3.2.2, Table 35
e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return i(b.hdlr,x[e])},p=function(e){var t=new Uint8Array([0,
// version 0
0,0,0,
// flags
0,0,0,2,
// creation_time
0,0,0,3,
// modification_time
0,1,95,144,
// timescale, 90,000 "ticks" per second
e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,
// duration
85,196,
// 'und' language (undetermined)
0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(b.mdhd,t)},g=function(e){return i(b.mdia,p(e),f(e.type),o(e))},a=function(e){return i(b.mfhd,new Uint8Array([0,0,0,0,
// flags
(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return i(b.minf,"video"===e.type?i(b.vmhd,k):i(b.smhd,D),n(),C(e))},l=function(e,t){for(var n=[],s=t.length;s--;)n[s]=v(t[s]);return i.apply(null,[b.moof,a(e)].concat(n))},A=function(e){for(var t=e.length,n=[];t--;)n[t]=h(e[t]);return i.apply(null,[b.moov,u(4294967295)].concat(n).concat(c(e)))},c=function(e){for(var t=e.length,n=[];t--;)n[t]=B(e[t]);return i.apply(null,[b.mvex].concat(n))},u=function(e){var t=new Uint8Array([0,
// version 0
0,0,0,
// flags
0,0,0,1,
// creation_time
0,0,0,2,
// modification_time
0,1,95,144,
// timescale, 90,000 "ticks" per second
(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,
// duration
0,1,0,0,
// 1.0 rate
1,0,
// 1.0 volume
0,0,
// reserved
0,0,0,0,
// reserved
0,0,0,0,
// reserved
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,
// transformation: unity matrix
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
// pre_defined
255,255,255,255]);return i(b.mvhd,t)},m=function(e){var t,n,s=e.samples||[],r=new Uint8Array(4+s.length);for(n=0;n<s.length;n++)t=s[n].flags,r[n+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(b.sdtp,r)},C=function(e){return i(b.stbl,I(e),i(b.stts,N),i(b.stsc,M),i(b.stsz,R),i(b.stco,T))},I=function(e){return i(b.stsd,new Uint8Array([0,
// version 0
0,0,0,
// flags
0,0,0,1]),"video"===e.type?L(e):U(e))},L=function(e){var t,n,s=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<s.length;t++)a.push((65280&s[t].byteLength)>>>8),a.push(255&s[t].byteLength),a=a.concat(Array.prototype.slice.call(s[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(n=[b.avc1,new Uint8Array([0,0,0,0,0,0,
// reserved
0,1,
// data_reference_index
0,0,
// pre_defined
0,0,
// reserved
0,0,0,0,0,0,0,0,0,0,0,0,
// pre_defined
(65280&e.width)>>8,255&e.width,
// width
(65280&e.height)>>8,255&e.height,
// height
0,72,0,0,
// horizresolution
0,72,0,0,
// vertresolution
0,0,0,0,
// reserved
0,1,
// frame_count
19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,
// compressorname
0,24,
// depth = 24
17,17]),i(b.avcC,new Uint8Array([1,
// configurationVersion
e.profileIdc,
// AVCProfileIndication
e.profileCompatibility,
// profile_compatibility
e.levelIdc,
// AVCLevelIndication
255].concat([s.length],
// numOfSequenceParameterSets
a,
// "SPS"
[r.length],
// numOfPictureParameterSets
o))),i(b.btrt,new Uint8Array([0,28,156,128,
// bufferSizeDB
0,45,198,192,
// maxBitrate
0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],A=e.sarRatio[1];n.push(i(b.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&A)>>24,(16711680&A)>>16,(65280&A)>>8,255&A])))}return i.apply(null,n)},U=function(e){return i(b.mp4a,new Uint8Array([
// SampleEntry, ISO/IEC 14496-12
0,0,0,0,0,0,
// reserved
0,1,
// data_reference_index
// AudioSampleEntry, ISO/IEC 14496-12
0,0,0,0,
// reserved
0,0,0,0,
// reserved
(65280&e.channelcount)>>8,255&e.channelcount,
// channelcount
(65280&e.samplesize)>>8,255&e.samplesize,
// samplesize
0,0,
// pre_defined
0,0,
// reserved
(65280&e.samplerate)>>8,255&e.samplerate,0,0]),s(e))},d=function(e){var t=new Uint8Array([0,
// version 0
0,0,7,
// flags
0,0,0,0,
// creation_time
0,0,0,0,
// modification_time
(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,
// track_ID
0,0,0,0,
// reserved
(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,
// duration
0,0,0,0,0,0,0,0,
// reserved
0,0,
// layer
0,0,
// alternate_group
1,0,
// non-audio track volume
0,0,
// reserved
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,
// transformation: unity matrix
(65280&e.width)>>8,255&e.width,0,0,
// width
(65280&e.height)>>8,255&e.height,0,0]);return i(b.tkhd,t)},v=function(e){var t,n,s,r,a,o;return t=i(b.tfhd,new Uint8Array([0,
// version 0
0,0,58,
// flags
(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,
// track_ID
0,0,0,1,
// sample_description_index
0,0,0,0,
// default_sample_duration
0,0,0,0,
// default_sample_size
0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/Y),o=Math.floor(e.baseMediaDecodeTime%Y),n=i(b.tfdt,new Uint8Array([1,
// version 1
0,0,0,
// flags
// baseMediaDecodeTime
a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(s=y(e,92),i(b.traf,t,n,s)):(r=m(e),s=y(e,r.length+92),i(b.traf,t,n,s,r))},h=function(e){return e.duration=e.duration||4294967295,i(b.trak,d(e),g(e))},B=function(e){var t=new Uint8Array([0,
// version 0
0,0,0,
// flags
(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,
// track_ID
0,0,0,1,
// default_sample_description_index
0,0,0,0,
// default_sample_duration
0,0,0,0,
// default_sample_size
0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),i(b.trex,t)},O=function(e,t){var i=0,n=0,s=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(s=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,
// version 0
0,i|n|s|r,1,
// flags
(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,
// sample_count
(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},P=function(e,t){var n,s,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=O(a,t),(s=new Uint8Array(r.length+16*a.length)).set(r),n=r.length,l=0;l<a.length;l++)o=a[l],s[n++]=(4278190080&o.duration)>>>24,s[n++]=(16711680&o.duration)>>>16,s[n++]=(65280&o.duration)>>>8,s[n++]=255&o.duration,s[n++]=(4278190080&o.size)>>>24,s[n++]=(16711680&o.size)>>>16,s[n++]=(65280&o.size)>>>8,s[n++]=255&o.size,s[n++]=o.flags.isLeading<<2|o.flags.dependsOn,s[n++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,s[n++]=61440&o.flags.degradationPriority,s[n++]=15&o.flags.degradationPriority,s[n++]=(4278190080&o.compositionTimeOffset)>>>24,s[n++]=(16711680&o.compositionTimeOffset)>>>16,s[n++]=(65280&o.compositionTimeOffset)>>>8,s[n++]=255&o.compositionTimeOffset;return i(b.trun,s)},H=function(e,t){var n,s,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=O(a,t),(n=new Uint8Array(r.length+8*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],n[s++]=(4278190080&o.duration)>>>24,n[s++]=(16711680&o.duration)>>>16,n[s++]=(65280&o.duration)>>>8,n[s++]=255&o.duration,n[s++]=(4278190080&o.size)>>>24,n[s++]=(16711680&o.size)>>>16,n[s++]=(65280&o.size)>>>8,n[s++]=255&o.size;return i(b.trun,n)},y=function(e,t){return"audio"===e.type?H(e,t):P(e,t)};var V,W,j,J,z,X,$,Z,ee={ftyp:r=function(){return i(b.ftyp,E,w,E,Q)},mdat:function(e){return i(b.mdat,e)},moof:l,moov:A,initSegment:function(e){var t,i=r(),n=A(e);return(t=new Uint8Array(i.byteLength+n.byteLength)).set(i),t.set(n,i.byteLength),t}},te=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ie={groupNalsIntoFrames:function(e){var t,i,n=[],s=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,n.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(i=e[t]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,s.byteLength+=n.byteLength,s.nalCount+=n.length,s.duration+=n.duration,s.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return s.length&&(!n.duration||n.duration<=0)&&(n.duration=s[s.length-1].duration),s.byteLength+=n.byteLength,s.nalCount+=n.length,s.duration+=n.duration,s.push(n),s},groupFramesIntoGops:function(e){var t,i,n=[],s=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(n.length&&(s.push(n),s.byteLength+=n.byteLength,s.nalCount+=n.nalCount,s.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return s.length&&n.duration<=0&&(n.duration=s[s.length-1].duration),s.byteLength+=n.byteLength,s.nalCount+=n.nalCount,s.duration+=n.duration,s.push(n),s},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},generateSampleTable:function(e,t){var i,n,s,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],n=0;n<r.length;n++)a=r[n],o+=(s=te(a,o)).size,l.push(s);return l},concatenateNalData:function(e){var t,i,n,s,r,a,o=0,l=e.byteLength,A=e.nalCount,c=new Uint8Array(l+4*A),u=new DataView(c.buffer);for(t=0;t<e.length;t++)for(s=e[t],i=0;i<s.length;i++)for(r=s[i],n=0;n<r.length;n++)a=r[n],u.setUint32(o,a.data.byteLength),o+=4,c.set(a.data,o),o+=a.data.byteLength;return c},generateSampleTableForFrame:function(e,t){var i,n=[];return i=te(e,t||0),n.push(i),n},concatenateNalDataForFrame:function(e){var t,i,n=0,s=e.byteLength,r=e.length,a=new Uint8Array(s+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(n,i.data.byteLength),n+=4,a.set(i.data,n),n+=i.data.byteLength;return a}},ne=[33,16,5,32,164,27],se=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(e){for(var t=[];e--;)t.push(0);return t},ae=9e4;X=function(e,t){return W(z(e,t))},$=function(e,t){return j(J(e),t)},Z=function(e,t,i){return J(i?e:e-t)};var oe={ONE_SECOND_IN_TS:ae,secondsToVideoTs:W=function(e){return e*ae},secondsToAudioTs:j=function(e,t){return e*t},videoTsToSeconds:J=function(e){return e/ae},audioTsToSeconds:z=function(e,t){return e/t},audioTsToVideoTs:X,videoTsToAudioTs:$,metadataTsToSeconds:Z},le=function(){if(!V){var e={96e3:[ne,[227,64],re(154),[56]],88200:[ne,[231],re(170),[56]],64e3:[ne,[248,192],re(240),[56]],48e3:[ne,[255,192],re(268),[55,148,128],re(54),[112]],44100:[ne,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[ne,[255,192],re(268),[55,234],re(226),[112]],24e3:[ne,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[ne,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[se,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[se,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[se,re(268),[3,121,16],re(47),[7]]};t=e,V=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return V},Ae=oe,ce={prefixWithSilence:function(e,t,i,n){var s,r,a,o,l,A=0,c=0,u=0;if(t.length&&(s=Ae.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(Ae.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&n&&(A=s-Math.max(i,n),u=(c=Math.floor(A/r))*r),!(c<1||u>Ae.ONE_SECOND_IN_TS/2))){for((a=le()[e.samplerate])||(a=t[0].data),o=0;o<c;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(Ae.videoTsToAudioTs(u,e.samplerate)),u}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push({size:i.data.byteLength,duration:1024});return n},concatenateFrameData:function(e){var t,i,n=0,s=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],s.set(i.data,n),n+=i.data.byteLength;return s}},ue=oe.ONE_SECOND_IN_TS,he={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,n=e.minSegmentDts;return t||(n-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===e.type&&(i*=e.samplerate/ue,i=Math.floor(i)),i},collectDtsInfo:function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))}},de={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},n=0,s=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)s+=255,t++;if(s+=e[t++],!i.payload&&4===n){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=n,i.payloadSize=s,i.payload=e.subarray(t,t+s);break}i.payload=void 0}t+=s,n=0,s=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,n,s,r,a=[];if(!(64&t[0]))return a;for(n=31&t[0],i=0;i<n;i++)r={type:3&t[(s=3*i)+2],pts:e},4&t[s+2]&&(r.ccData=t[s+3]<<8|t[s+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,n=e.byteLength,s=[],r=1;r<n-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(s.push(r+2),r+=2):r++;if(0===s.length)return e;t=n-s.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===s[0]&&(a++,s.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},ge=G,pe=de,fe=function(e){e=e||{},fe.prototype.init.call(this),this.parse708captions_="boolean"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Qe(0,0),
// eslint-disable-line no-use-before-define
new Qe(0,1),
// eslint-disable-line no-use-before-define
new Qe(1,0),
// eslint-disable-line no-use-before-define
new Qe(1,1)],this.parse708captions_&&(this.cc708Stream_=new Be({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};fe.prototype=new ge,fe.prototype.push=function(e){var t,i,n;if("sei_rbsp"===e.nalUnitType&&(t=pe.parseSei(e.escapedRBSP)).payload&&t.payloadType===pe.USER_DATA_REGISTERED_ITU_T_T35&&(i=pe.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=pe.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},fe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},fe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},fe.prototype.flush=function(){return this.flushStream("flush")},fe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},fe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},fe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},fe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},fe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},fe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},fe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var me={127:9834,
// ♪
4128:32,
// Transparent Space
4129:160,
// Nob-breaking Transparent Space
4133:8230,
// …
4138:352,
// Š
4140:338,
// Œ
4144:9608,
// █
4145:8216,
// ‘
4146:8217,
// ’
4147:8220,
// “
4148:8221,
// ”
4149:8226,
// •
4153:8482,
// ™
4154:353,
// š
4156:339,
// œ
4157:8480,
// ℠
4159:376,
// Ÿ
4214:8539,
// ⅛
4215:8540,
// ⅜
4216:8541,
// ⅝
4217:8542,
// ⅞
4218:9168,
// ⏐
4219:9124,
// ⎤
4220:9123,
// ⎣
4221:9135,
// ⎯
4222:9126,
// ⎦
4223:9121,
// ⎡
4256:12600},Ce=function(e){return 32<=e&&e<=127||160<=e&&e<=255},Ie=function(e){this.windowNum=e,this.reset()};Ie.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Ie.prototype.getText=function(){return this.rows.join("\n")},Ie.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Ie.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ie.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Ie.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Ie.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var ve=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new Ie(-1),this.windows=[],this.stream=i,"string"==typeof t&&this.createTextDecoder(t)};ve.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new Ie(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},ve.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},ve.prototype.createTextDecoder=function(e){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Be=function(e){e=e||{},Be.prototype.init.call(this);var t,i=this,n=e.captionServices||{},s={};Object.keys(n).forEach((e=>{t=n[e],/^SERVICE/.test(e)&&(s[e]=t.encoding)})),this.serviceEncodings=s,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Be.prototype=new ge,Be.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Be.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,n=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},Be.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,n=null,s=0,r=t[s++];for(e.seq=r>>6,e.sizeCode=63&r;s<t.length;s++)n=31&(r=t[s++]),7===(i=r>>5)&&n>0&&(i=r=t[s++]),this.pushServiceBlock(i,s,n),n>0&&(s+=n-1)},Be.prototype.pushServiceBlock=function(e,t,i){var n,s=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,s));s<t+i&&s<r.length;s++)n=r[s],Ce(n)?s=this.handleText(s,a):24===n?s=this.multiByteCharacter(s,a):16===n?s=this.extendedCommands(s,a):128<=n&&n<=135?s=this.setCurrentWindow(s,a):152<=n&&n<=159?s=this.defineWindow(s,a):136===n?s=this.clearWindows(s,a):140===n?s=this.deleteWindows(s,a):137===n?s=this.displayWindows(s,a):138===n?s=this.hideWindows(s,a):139===n?s=this.toggleWindows(s,a):151===n?s=this.setWindowAttributes(s,a):144===n?s=this.setPenAttributes(s,a):145===n?s=this.setPenColor(s,a):146===n?s=this.setPenLocation(s,a):143===n?a=this.reset(s,a):8===n?a.currentWindow.backspace():12===n?a.currentWindow.clearText():13===n?a.currentWindow.pendingNewLine=!0:14===n?a.currentWindow.clearText():141===n&&s++},Be.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return Ce(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Be.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Be.prototype.initService=function(e,t){var i,n,s=this;return(i="SERVICE"+e)in this.serviceEncodings&&(n=this.serviceEncodings[i]),this.services[e]=new ve(e,n,s),this.services[e].init(this.getPts(t),(function(t){s.flushDisplayed(t,s.services[e])})),this.services[e]},Be.prototype.handleText=function(e,t,i){var n,s,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,A=this.current708Packet.data,c=o?4096:0,u=A[e],h=A[e+1],d=t.currentWindow;if(l?(s=[u,h],e++):s=[u],t.textDecoder_&&!o)n=t.textDecoder_.decode(new Uint8Array(s));else if(l){const e=s.map((e=>("0"+(255&e).toString(16)).slice(-2))).join("");n=String.fromCharCode(parseInt(e,16))}else a=me[r=c|u]||r,n=4096&r&&r===a?"":String.fromCharCode(a);return d.pendingNewLine&&!d.isEmpty()&&d.newLine(this.getPts(e)),d.pendingNewLine=!1,d.addText(n),e},Be.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,n=i[e+1],s=i[e+2];return Ce(n)&&Ce(s)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Be.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Be.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,n=i[e],s=7&n;t.setCurrentWindow(s);var r=t.currentWindow;return n=i[++e],r.visible=(32&n)>>5,r.rowLock=(16&n)>>4,r.columnLock=(8&n)>>3,r.priority=7&n,n=i[++e],r.relativePositioning=(128&n)>>7,r.anchorVertical=127&n,n=i[++e],r.anchorHorizontal=n,n=i[++e],r.anchorPoint=(240&n)>>4,r.rowCount=15&n,n=i[++e],r.columnCount=63&n,n=i[++e],r.windowStyle=(56&n)>>3,r.penStyle=7&n,r.virtualRowCount=r.rowCount+1,e},Be.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],s=t.currentWindow.winAttr;return n=i[++e],s.fillOpacity=(192&n)>>6,s.fillRed=(48&n)>>4,s.fillGreen=(12&n)>>2,s.fillBlue=3&n,n=i[++e],s.borderType=(192&n)>>6,s.borderRed=(48&n)>>4,s.borderGreen=(12&n)>>2,s.borderBlue=3&n,n=i[++e],s.borderType+=(128&n)>>5,s.wordWrap=(64&n)>>6,s.printDirection=(48&n)>>4,s.scrollDirection=(12&n)>>2,s.justify=3&n,n=i[++e],s.effectSpeed=(240&n)>>4,s.effectDirection=(12&n)>>2,s.displayEffect=3&n,e},Be.prototype.flushDisplayed=function(e,t){for(var i=[],n=0;n<8;n++)t.windows[n].visible&&!t.windows[n].isEmpty()&&i.push(t.windows[n].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},Be.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Be.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var s=0;s<8;s++)i&1<<s&&(t.windows[s].visible=1);return e},Be.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var s=0;s<8;s++)i&1<<s&&(t.windows[s].visible=0);return e},Be.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var s=0;s<8;s++)i&1<<s&&(t.windows[s].visible^=1);return e},Be.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var s=0;s<8;s++)i&1<<s&&t.windows[s].clearText();return e},Be.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var s=0;s<8;s++)i&1<<s&&t.windows[s].reset();return e},Be.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],s=t.currentWindow.penAttr;return n=i[++e],s.textTag=(240&n)>>4,s.offset=(12&n)>>2,s.penSize=3&n,n=i[++e],s.italics=(128&n)>>7,s.underline=(64&n)>>6,s.edgeType=(56&n)>>3,s.fontStyle=7&n,e},Be.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,n=i[e],s=t.currentWindow.penColor;return n=i[++e],s.fgOpacity=(192&n)>>6,s.fgRed=(48&n)>>4,s.fgGreen=(12&n)>>2,s.fgBlue=3&n,n=i[++e],s.bgOpacity=(192&n)>>6,s.bgRed=(48&n)>>4,s.bgGreen=(12&n)>>2,s.bgBlue=3&n,n=i[++e],s.edgeRed=(48&n)>>4,s.edgeGreen=(12&n)>>2,s.edgeBlue=3&n,e},Be.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,n=i[e],s=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,n=i[++e],s.row=15&n,n=i[++e],s.column=63&n,e},Be.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var ye={42:225,
// á
92:233,
// é
94:237,
// í
95:243,
// ó
96:250,
// ú
123:231,
// ç
124:247,
// ÷
125:209,
// Ñ
126:241,
// ñ
127:9608,
// █
304:174,
// ®
305:176,
// °
306:189,
// ½
307:191,
// ¿
308:8482,
// ™
309:162,
// ¢
310:163,
// £
311:9834,
// ♪
312:224,
// à
313:160,
314:232,
// è
315:226,
// â
316:234,
// ê
317:238,
// î
318:244,
// ô
319:251,
// û
544:193,
// Á
545:201,
// É
546:211,
// Ó
547:218,
// Ú
548:220,
// Ü
549:252,
// ü
550:8216,
// ‘
551:161,
// ¡
552:42,
// *
553:39,
// '
554:8212,
// —
555:169,
// ©
556:8480,
// ℠
557:8226,
// •
558:8220,
// “
559:8221,
// ”
560:192,
// À
561:194,
// Â
562:199,
// Ç
563:200,
// È
564:202,
// Ê
565:203,
// Ë
566:235,
// ë
567:206,
// Î
568:207,
// Ï
569:239,
// ï
570:212,
// Ô
571:217,
// Ù
572:249,
// ù
573:219,
// Û
574:171,
// «
575:187,
// »
800:195,
// Ã
801:227,
// ã
802:205,
// Í
803:204,
// Ì
804:236,
// ì
805:210,
// Ò
806:242,
// ò
807:213,
// Õ
808:245,
// õ
809:123,
// {
810:125,
// }
811:92,
// \
812:94,
// ^
813:95,
// _
814:124,
// |
815:126,
// ~
816:196,
// Ä
817:228,
// ä
818:214,
// Ö
819:246,
// ö
820:223,
// ß
821:165,
// ¥
822:164,
// ¤
823:9474,
// │
824:197,
// Å
825:229,
// å
826:216,
// Ø
827:248,
// ø
828:9484,
// ┌
829:9488,
// ┐
830:9492,
// └
831:9496},be=function(e){return null===e?"":(e=ye[e]||e,String.fromCharCode(e))},Ee=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],we=function(){for(var e=[],t=15;t--;)e.push({text:"",indent:0,offset:0});return e},Qe=function(e,t){Qe.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,s,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,s=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=we();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=we();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=we()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(n,s))r=be((n=(3&n)<<8)|s),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(n,s))"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=be((n=(3&n)<<8)|s),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(n,s))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14&~s||this.addFormatting(e.pts,["i"]),1&~s||this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,s)){const e=3&s;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(n,s)){var a=Ee.indexOf(7968&t);if("rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&s&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),!(16&~t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(s)&&(14&~s||this.addFormatting(e.pts,["i"]))}else this.isNormalChar(n)&&(0===s&&(s=null),r=be(n),r+=be(s),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Qe.prototype=new ge,Qe.prototype.flushDisplayed=function(e){const t=e=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+e+"."})},i=[];this.displayed_.forEach(((e,n)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(I2){t(n)}e.text.length&&i.push({
// The text to be displayed in the caption from this specific row, with whitespace removed.
text:e.text,
// Value between 1 and 15 representing the PAC row used to calculate line height.
line:n+1,
// A number representing the indent position by percentage (CEA-608 PAC indent code).
// The value will be a number between 10 and 80. Offset is used to add an aditional
// value to the position if necessary.
position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(n)})),i.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Qe.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=we(),this.nonDisplayed_=we(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Qe.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Qe.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Qe.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Qe.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Qe.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Qe.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Qe.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Qe.prototype.isNormalChar=function(e){return e>=32&&e<=127},Qe.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=we(),this.displayed_=we()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:"",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Qe.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,i)},Qe.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},Qe.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Qe.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Qe.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Qe.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var _e={CaptionStream:fe,Cea608Stream:Qe,Cea708Stream:Be},Se={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},xe=G,ke="shared",De=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Fe=function(e){var t,i;Fe.prototype.init.call(this),this.type_=e||ke,this.push=function(e){"metadata"!==e.type?this.type_!==ke&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=De(e.dts,i),e.pts=De(e.pts,i),t=e.dts,this.trigger("data",e)):this.trigger("data",e)},this.flush=function(){i=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Fe.prototype=new xe;var Te,Me={TimestampRolloverStream:Fe,handleRollover:De},Re=(e,t,i)=>{if(!e)return-1;for(var n=i;n<e.length;n++)if(e[n]===t)return n;return-1},Ne=3,Le=function(e,t,i){var n,s="";for(n=t;n<i;n++)s+="%"+("00"+e[n].toString(16)).slice(-2);return s},Ue=function(e,t,i){return decodeURIComponent(Le(e,t,i))},He=function(e,t,i){return unescape(Le(e,t,i))},Pe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Oe={APIC:function(e){var t,i,n=1;e.data[0]===Ne&&((t=Re(e.data,0,n))<0||(e.mimeType=He(e.data,n,t),n=t+1,e.pictureType=e.data[n],n++,(i=Re(e.data,0,n))<0||(e.description=Ue(e.data,n,i),n=i+1,"--\x3e"===e.mimeType?e.url=He(e.data,n,e.data.length):e.pictureData=e.data.subarray(n,e.data.length))))},"T*":function(e){e.data[0]===Ne&&(e.value=Ue(e.data,1,e.data.length).replace(/\0*$/,""),e.values=e.value.split("\0"))},TXXX:function(e){var t;e.data[0]===Ne&&-1!==(t=Re(e.data,0,1))&&(e.description=Ue(e.data,1,t),e.value=Ue(e.data,t+1,e.data.length).replace(/\0*$/,""),e.data=e.value)},"W*":function(e){e.url=He(e.data,0,e.data.length).replace(/\0.*$/,"")},WXXX:function(e){var t;e.data[0]===Ne&&-1!==(t=Re(e.data,0,1))&&(e.description=Ue(e.data,1,t),e.url=He(e.data,t+1,e.data.length).replace(/\0.*$/,""))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=He(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},Ge={parseId3Frames:function(e){var t,i=10,n=0,s=[];if(!(e.length<10||e[0]!=="I".charCodeAt(0)||e[1]!=="D".charCodeAt(0)||e[2]!=="3".charCodeAt(0))){n=Pe(e.subarray(6,10)),n+=10,64&e[5]&&(i+=4,i+=Pe(e.subarray(10,14)),n-=Pe(e.subarray(16,20)));do{if((t=Pe(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,Oe[r.id]?Oe[r.id](r):"T"===r.id[0]?Oe["T*"](r):"W"===r.id[0]&&Oe["W*"](r),s.push(r),i+=10,i+=t}while(i<n);return s}},parseSyncSafeInteger:Pe,frameParsers:Oe},Ke=Se,qe=Ge;(Te=function(e){var t,i={
// the bytes of the program-level descriptor field in MP2T
// see ISO/IEC 13818-1:2013 (E), section 2.6 "Program and
// program element descriptors"
descriptor:e&&e.descriptor},n=0,s=[],r=0;if(Te.prototype.init.call(this),this.dispatchType=Ke.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(r=0,s.length=0),0===s.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(s.push(e),r+=e.data.byteLength,1===s.length&&(n=qe.parseSyncSafeInteger(e.data.subarray(6,10)),n+=10),!(r<n)){for(t={data:new Uint8Array(n),frames:[],pts:s[0].pts,dts:s[0].dts},l=0;l<n;)t.data.set(s[0].data.subarray(0,n-l),l),l+=s[0].data.byteLength,r-=s[0].data.byteLength,s.shift();i=10,64&t.data[5]&&(i+=4,i+=qe.parseSyncSafeInteger(t.data.subarray(10,14)),n-=qe.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=qe.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,qe.frameParsers[o.id]?qe.frameParsers[o.id](o):"T"===o.id[0]?qe.frameParsers["T*"](o):"W"===o.id[0]&&qe.frameParsers["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var A=o.data,c=(1&A[3])<<30|A[4]<<22|A[5]<<14|A[6]<<6|A[7]>>>2;c*=4,c+=3&A[7],o.timeStamp=c,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),i+=10,i+=a}while(i<n);this.trigger("data",t)}}}).prototype=new G;var Ye,Ve,We,je=Te,Je=G,ze=_e,Xe=Se,$e=Me.TimestampRolloverStream,Ze=188;(Ye=function(){var e=new Uint8Array(Ze),t=0;Ye.prototype.init.call(this),this.push=function(i){var n,s=0,r=Ze;for(t?((n=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),n.set(i,t),t=0):n=i;r<n.byteLength;)71!==n[s]||71!==n[r]?(s++,r++):(this.trigger("data",n.subarray(s,r)),s+=Ze,r+=Ze);s<n.byteLength&&(e.set(n.subarray(s),0),t=n.byteLength-s)},this.flush=function(){t===Ze&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new Je,(Ve=function(){var e,t,i,n;Ve.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,n){var s=0;n.payloadUnitStartIndicator&&(s+=e[s]+1),"pat"===n.type?t(e.subarray(s),n):i(e.subarray(s),n)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],n.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=n.pmtPid},i=function(e,t){var i,s;if(1&e[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&e[1])<<8|e[2])-4,s=12+((15&e[10])<<8|e[11]);s<i;){var r=e[s],a=(31&e[s+1])<<8|e[s+2];r===Xe.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=a:r===Xe.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=a:r===Xe.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][a]=r),s+=5+((15&e[s+3])<<8|e[s+4])}t.programMapTable=n.programMapTable}},this.push=function(t){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(n+=t[n]+1),0===i.pid)i.type="pat",e(t.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",e(t.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,n,i]):this.processPes_(t,n,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Xe.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Xe.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=new Je,Ve.STREAM_TYPES={h264:27,adts:15},(We=function(){var e,t=this,i=!1,n={data:[],size:0},s={data:[],size:0},r={data:[],size:0},a=function(e,i,n){var s,r,a=new Uint8Array(e.size),o={type:i},l=0,A=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,A),A+=r.data.byteLength;!function(e,t){var i;const n=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===n&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=!!(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),s="video"===i||o.packetLength<=e.size,(n||s)&&(e.size=0,e.data.length=0),s&&t.trigger("data",o)}};We.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Xe.H264_STREAM_TYPE:e=n,t="video";break;case Xe.ADTS_STREAM_TYPE:e=s,t="audio";break;case Xe.METADATA_STREAM_TYPE:e=r,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),i=!0,t.trigger("data",n)}})[o.type]()},this.reset=function(){n.size=0,n.data.length=0,s.size=0,s.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(n,"video"),a(s,"audio"),a(r,"timed-metadata")},this.flush=function(){if(!i&&e){var n={type:"metadata",tracks:[]};null!==e.video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}i=!1,this.flushStreams_(),this.trigger("done")}}).prototype=new Je;var et={PAT_PID:0,MP2T_PACKET_LENGTH:Ze,TransportPacketStream:Ye,TransportParseStream:Ve,ElementaryStream:We,TimestampRolloverStream:$e,CaptionStream:ze.CaptionStream,Cea608Stream:ze.Cea608Stream,Cea708Stream:ze.Cea708Stream,MetadataStream:je};for(var tt in Xe)Xe.hasOwnProperty(tt)&&(et[tt]=Xe[tt]);var it,nt=et,st=oe.ONE_SECOND_IN_TS,rt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(it=function(e){var t,i=0;it.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(n){var s,r,a,o,l,A=0;if(e||(i=0),"audio"===n.type){var c;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+n.data.byteLength)).set(a),t.set(n.data,a.byteLength)):t=n.data;A+7<t.length;)if(255===t[A]&&240==(246&t[A+1])){if("number"==typeof c&&(this.skipWarn_(c,A),c=null),r=2*(1&~t[A+1]),s=(3&t[A+3])<<11|t[A+4]<<3|(224&t[A+5])>>5,l=(o=1024*(1+(3&t[A+6])))*st/rt[(60&t[A+2])>>>2],t.byteLength-A<s)break;this.trigger("data",{pts:n.pts+i*l,dts:n.dts+i*l,sampleCount:o,audioobjecttype:1+(t[A+2]>>>6&3),channelcount:(1&t[A+2])<<2|(192&t[A+3])>>>6,samplerate:rt[(60&t[A+2])>>>2],samplingfrequencyindex:(60&t[A+2])>>>2,
// assume ISO/IEC 14496-12 AudioSampleEntry default of 16
samplesize:16,
// data is the frame without it's header
data:t.subarray(A+7+r,A+s)}),i++,A+=s}else"number"!=typeof c&&(c=A),A++;"number"==typeof c&&(this.skipWarn_(c,A),c=null),t=t.subarray(A)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new G;var at,ot,lt,At=it,ct=G,ut=function(e){var t=e.byteLength,i=0,n=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+n},this.loadWord=function(){var s=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");r.set(e.subarray(s,s+a)),i=new DataView(r.buffer).getUint32(0),n=8*a,t-=a},this.skipBits=function(e){var s;n>e?(i<<=e,n-=e):(e-=n,e-=8*(s=Math.floor(e/8)),t-=s,this.loadWord(),i<<=e,n-=e)},this.readBits=function(e){var s=Math.min(n,e),r=i>>>32-s;return(n-=s)>0?i<<=s:t>0&&this.loadWord(),(s=e-s)>0?r<<s|this.readBits(s):r},this.skipLeadingZeros=function(){var e;for(e=0;e<n;++e)if(i&2147483648>>>e)return i<<=e,n-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(ot=function(){var e,t,i=0;ot.prototype.init.call(this),this.push=function(n){var s;t?((s=new Uint8Array(t.byteLength+n.data.byteLength)).set(t),s.set(n.data,t.byteLength),t=s):t=n.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new ct,lt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,
// TODO: the three profiles below don't
// appear to have sps data in the specificiation anymore?
138:!0,139:!0,134:!0},(at=function(){var e,t,i,n,s,r,a,o=new ot;at.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,n=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:i,dts:n,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=s(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=s(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,n=8,s=8;for(i=0;i<e;i++)0!==s&&(s=(n+t.readExpGolomb()+256)%256),n=0===s?n:s},s=function(e){for(var t,i,n=e.byteLength,s=[],r=1;r<n-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(s.push(r+2),r+=2):r++;if(0===s.length)return e;t=n-s.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===s[0]&&(a++,s.shift()),i[r]=e[a];return i},r=function(e){var t,i,n,s,r,o,l,A,c,u,h,d,g=0,p=0,f=0,m=0,C=[1,1];if(i=(t=new ut(e)).readUnsignedByte(),s=t.readUnsignedByte(),n=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),lt[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,d=0;d<h;d++)t.readBoolean()&&a(d<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),d=0;d<l;d++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),A=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(g=t.readUnsignedExpGolomb(),p=t.readUnsignedExpGolomb(),f=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:C=[1,1];break;case 2:C=[12,11];break;case 3:C=[10,11];break;case 4:C=[16,11];break;case 5:C=[40,33];break;case 6:C=[24,11];break;case 7:C=[20,11];break;case 8:C=[32,11];break;case 9:C=[80,33];break;case 10:C=[18,11];break;case 11:C=[15,11];break;case 12:C=[64,33];break;case 13:C=[160,99];break;case 14:C=[4,3];break;case 15:C=[3,2];break;case 16:C=[2,1];break;case 255:C=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}C&&(C[0],C[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:s,width:16*(A+1)-2*g-2*p,height:(2-u)*(c+1)*16-2*f-2*m,
// sar is sample aspect ratio
sarRatio:C}}}).prototype=new ct;var ht,dt={H264Stream:at,NalByteStream:ot},gt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],pt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},ft=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=pt(e,t),ft(e,t))},mt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ct={isLikelyAacData:function(e){var t=ft(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&// verify that the 2 layer bits are 0, aka this
// is not mp3 data but aac data.
16==(22&e[t+1])},parseId3TagSize:pt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&!(240&~e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return gt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,n;t=10,64&e[5]&&(t+=4,t+=mt(e.subarray(10,14)));do{if((i=mt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){n=e.subarray(t+10,t+i+10);for(var s=0;s<n.byteLength;s++)if(0===n[s]){var r=unescape(function(e,t,i){var n,s="";for(n=t;n<i;n++)s+="%"+("00"+e[n].toString(16)).slice(-2);return s}(n,0,s));if("com.apple.streaming.transportStreamTimestamp"===r){var a=n.subarray(s+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},It=Ct;(ht=function(){var e=new Uint8Array,t=0;ht.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var n,s,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255&~e[l]||240&~e[l+1])l++;else{if(e.length-l<7)break;if(l+(o=It.parseAdtsSize(e,l))>e.length)break;r={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",r),l+=o}else{if(e.length-l<10)break;if(l+(o=It.parseId3TagSize(e,l))>e.length)break;s={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",s),l+=o}n=e.length-l,e=n>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new G;var vt,Bt,yt,bt,Et=G,wt=ee,Qt=ie,_t=ce,St=he,xt=nt,kt=oe,Dt=At,Ft=dt.H264Stream,Tt=ht,Mt=Ct.isLikelyAacData,Rt=oe.ONE_SECOND_IN_TS,Nt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Lt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ut=function(e,t){t.stream=e,this.trigger("log",t)},Ht=function(e,t){for(var i=Object.keys(t),n=0;n<i.length;n++){var s=i[n];"headOfPipeline"!==s&&t[s].on&&t[s].on("log",Ut.bind(e,s))}},Pt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Ot=function(e,t,i,n,s,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(n-t),pts:e+(s-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};(Bt=function(e,t){var i,n=[],s=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,Bt.prototype.init.call(this),this.push=function(t){St.collectDtsInfo(e,t),e&&Nt.forEach((function(i){e[i]=t[i]})),n.push(t)},this.setEarliestDts=function(e){s=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,A,c,u,h,d;0!==n.length?(o=_t.trimAdtsFramesByEarliestDts(n,e,s),e.baseMediaDecodeTime=St.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),d=_t.prefixWithSilence(e,o,r,a),e.samples=_t.generateSampleTable(o),A=wt.mdat(_t.concatenateFrameData(o)),n=[],l=wt.moof(i,[e]),c=new Uint8Array(l.byteLength+A.byteLength),i++,c.set(l),c.set(A,l.byteLength),St.clearDtsInfo(e),u=Math.ceil(1024*Rt/e.samplerate),o.length&&(h=o.length*u,this.trigger("segmentTimingInfo",Ot(
// The audio track's baseMediaDecodeTime is in audio clock cycles, but the
// frame info is in video clock cycles. Convert to match expectation of
// listeners (that all timestamps will be based on video clock cycles).
kt.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),
// frame times are already in video clock, as is segment duration
o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,d||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){St.clearDtsInfo(e),n=[],this.trigger("reset")}}).prototype=new Et,(vt=function(e,t){var i,n,s,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,vt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){St.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],Lt.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||s||(s=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var n,s,o,l,A,c,u,h,d=0;r.length&&"access_unit_delimiter_rbsp"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=Qt.groupNalsIntoFrames(r),(o=Qt.groupFramesIntoGops(n))[0][0].keyFrame||((s=this.getGopForFusion_(r[0],e))?(d=s.duration,o.unshift(s),o.byteLength+=s.byteLength,o.nalCount+=s.nalCount,o.pts=s.pts,o.dts=s.dts,o.duration+=s.duration):o=Qt.extendFirstKeyFrame(o)),a.length){var g;if(!(g=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");St.clearDtsInfo(e),o=g}St.collectDtsInfo(e,o),e.samples=Qt.generateSampleTable(o),A=wt.mdat(Qt.concatenateNalData(o)),e.baseMediaDecodeTime=St.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),u=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",Ot(e.baseMediaDecodeTime,u.dts,u.pts,h.dts+h.duration,h.pts+h.duration,d)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=wt.moof(i,[e]),c=new Uint8Array(l.byteLength+A.byteLength),i++,c.set(l),c.set(A,l.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){St.clearDtsInfo(e),n=void 0,s=void 0},this.getGopForFusion_=function(t){var i,n,s,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)s=(r=this.gopCache_[a]).gop,e.pps&&Pt(e.pps[0],r.pps[0])&&e.sps&&Pt(e.sps[0],r.sps[0])&&(s.dts<e.timelineStartInfo.dts||(i=t.dts-s.dts-s.duration)>=-1e4&&i<=45e3&&(!n||o>i)&&(n=r,o=i));return n?n.gop:null},this.alignGopsAtStart_=function(e){var t,i,n,s,r,o,l,A;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(n=a[t],s=e[i],n.pts!==s.pts);)s.pts>n.pts?t++:(i++,r-=s.byteLength,o-=s.nalCount,l-=s.duration);return 0===i?e:i===e.length?null:((A=e.slice(i)).byteLength=r,A.duration=l,A.nalCount=o,A.pts=A[0].pts,A.dts=A[0].dts,A)},this.alignGopsAtEnd_=function(e){var t,i,n,s,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(n=a[t],s=e[i],n.pts===s.pts){o=!0;break}n.pts>s.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var A=e.slice(l),c=A.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return A.byteLength=c.byteLength,A.duration=c.duration,A.nalCount=c.nalCount,A.pts=A[0].pts,A.dts=A[0].dts,A},this.alignGopsWith=function(e){a=e}}).prototype=new Et,(bt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,bt.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new Et,bt.prototype.flush=function(e){var t,i,n,s,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Lt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Nt.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,n=wt.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(n.byteLength),a.initSegment.set(n),a.data=new Uint8Array(this.pendingBytes),s=0;s<this.pendingBoxes.length;s++)a.data.set(this.pendingBoxes[s],r),r+=this.pendingBoxes[s].byteLength;for(s=0;s<this.pendingCaptions.length;s++)(t=this.pendingCaptions[s]).startTime=kt.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=kt.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(s=0;s<this.pendingMetadata.length;s++)(i=this.pendingMetadata[s]).cueTime=kt.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),s=0;s<a.captions.length;s++)t=a.captions[s],this.trigger("caption",t);for(s=0;s<a.metadata.length;s++)i=a.metadata[s],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},bt.prototype.setRemux=function(e){this.remuxTracks=e},(yt=function(e){var t,i,n=this,s=!0;yt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var s={};this.transmuxPipeline_=s,s.type="aac",s.metadataStream=new xt.MetadataStream,s.aacStream=new Tt,s.audioTimestampRolloverStream=new xt.TimestampRolloverStream("audio"),s.timedMetadataTimestampRolloverStream=new xt.TimestampRolloverStream("timed-metadata"),s.adtsStream=new Dt,s.coalesceStream=new bt(e,s.metadataStream),s.headOfPipeline=s.aacStream,s.aacStream.pipe(s.audioTimestampRolloverStream).pipe(s.adtsStream),s.aacStream.pipe(s.timedMetadataTimestampRolloverStream).pipe(s.metadataStream).pipe(s.coalesceStream),s.metadataStream.on("timestamp",(function(e){s.aacStream.setTimestamp(e.timeStamp)})),s.aacStream.on("data",(function(r){"timed-metadata"!==r.type&&"audio"!==r.type||s.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio"},s.coalesceStream.numberOfTracks++,s.audioSegmentStream=new Bt(i,e),s.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),s.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),s.adtsStream.pipe(s.audioSegmentStream).pipe(s.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t}))})),s.coalesceStream.on("data",this.trigger.bind(this,"data")),s.coalesceStream.on("done",this.trigger.bind(this,"done")),Ht(this,s)},this.setupTsPipeline=function(){var s={};this.transmuxPipeline_=s,s.type="ts",s.metadataStream=new xt.MetadataStream,s.packetStream=new xt.TransportPacketStream,s.parseStream=new xt.TransportParseStream,s.elementaryStream=new xt.ElementaryStream,s.timestampRolloverStream=new xt.TimestampRolloverStream,s.adtsStream=new Dt,s.h264Stream=new Ft,s.captionStream=new xt.CaptionStream(e),s.coalesceStream=new bt(e,s.metadataStream),s.headOfPipeline=s.packetStream,s.packetStream.pipe(s.parseStream).pipe(s.elementaryStream).pipe(s.timestampRolloverStream),s.timestampRolloverStream.pipe(s.h264Stream),s.timestampRolloverStream.pipe(s.adtsStream),s.timestampRolloverStream.pipe(s.metadataStream).pipe(s.coalesceStream),s.h264Stream.pipe(s.captionStream).pipe(s.coalesceStream),s.elementaryStream.on("data",(function(r){var a;if("metadata"===r.type){for(a=r.tracks.length;a--;)t||"video"!==r.tracks[a].type?i||"audio"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime;t&&!s.videoSegmentStream&&(s.coalesceStream.numberOfTracks++,s.videoSegmentStream=new vt(t,e),s.videoSegmentStream.on("log",n.getLogTrigger_("videoSegmentStream")),s.videoSegmentStream.on("timelineStartInfo",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,s.audioSegmentStream.setEarliestDts(t.dts-n.baseMediaDecodeTime))})),s.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),s.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),s.videoSegmentStream.on("baseMediaDecodeTime",(function(e){i&&s.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),s.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),s.h264Stream.pipe(s.videoSegmentStream).pipe(s.coalesceStream)),i&&!s.audioSegmentStream&&(s.coalesceStream.numberOfTracks++,s.audioSegmentStream=new Bt(i,e),s.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),s.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),s.audioSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"audioSegmentTimingInfo")),s.adtsStream.pipe(s.audioSegmentStream).pipe(s.coalesceStream)),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t})}})),s.coalesceStream.on("data",this.trigger.bind(this,"data")),s.coalesceStream.on("id3Frame",(function(e){e.dispatchType=s.metadataStream.dispatchType,n.trigger("id3Frame",e)})),s.coalesceStream.on("caption",this.trigger.bind(this,"caption")),s.coalesceStream.on("done",this.trigger.bind(this,"done")),Ht(this,s)},this.setBaseMediaDecodeTime=function(n){var s=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,St.clearDtsInfo(i),s.audioTimestampRolloverStream&&s.audioTimestampRolloverStream.discontinuity()),t&&(s.videoSegmentStream&&(s.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,St.clearDtsInfo(t),s.captionStream.reset()),s.timestampRolloverStream&&s.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger("log",i)}},this.push=function(e){if(s){var t=Mt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),s=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){s=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Et;var Gt,Kt,qt,Yt,Vt,Wt,jt,Jt,zt,Xt={Transmuxer:yt,VideoSegmentStream:vt,AudioSegmentStream:Bt,AUDIO_PROPERTIES:Nt,VIDEO_PROPERTIES:Lt,
// exported for testing
generateSegmentTimingInfo:Ot},$t=function(e){return e>>>0},Zt=function(e){return("00"+e.toString(16)).slice(-2)},ei=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},ti=$t,ii=ei,ni=function(e,t){var i,n,s,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)n=ti(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),s=ii(e.subarray(i+4,i+8)),r=n>1?i+n:e.byteLength,s===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=ni(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},si=ni,ri=$t,ai=q.getUint64,oi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=ai(e.subarray(4)):t.baseMediaDecodeTime=ri(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},li=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},s=1&n.flags[2],r=2&n.flags[2],a=8&n.flags[2],o=16&n.flags[2],l=32&n.flags[2],A=65536&n.flags[0],c=131072&n.flags[0];return t=8,s&&(t+=4,n.baseDataOffset=i.getUint32(12),t+=4),r&&(n.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(n.defaultSampleDuration=i.getUint32(t),t+=4),o&&(n.defaultSampleSize=i.getUint32(t),t+=4),l&&(n.defaultSampleFlags=i.getUint32(t)),A&&(n.durationIsEmpty=!0),!s&&c&&(n.baseDataOffsetIsMoof=!0),n},Ai=q.getUint64,ci=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ui=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),s=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],A=8&i.flags[1],c=n.getUint32(4),u=8;for(s&&(i.dataOffset=n.getInt32(u),u+=4),r&&c&&(t={flags:ci(e.subarray(u,u+4))},u+=4,a&&(t.duration=n.getUint32(u),u+=4),o&&(t.size=n.getUint32(u),u+=4),A&&(1===i.version?t.compositionTimeOffset=n.getInt32(u):t.compositionTimeOffset=n.getUint32(u),u+=4),i.samples.push(t),c--);c--;)t={},a&&(t.duration=n.getUint32(u),u+=4),o&&(t.size=n.getUint32(u),u+=4),l&&(t.flags=ci(e.subarray(u,u+4)),u+=4),A&&(1===i.version?t.compositionTimeOffset=n.getInt32(u):t.compositionTimeOffset=n.getUint32(u),u+=4),i.samples.push(t);return i},hi=q.getUint64,di=function(e){return new Date(1e3*e-20828448e5)},gi=ei,pi=function(e){var t,i,n=new DataView(e.buffer,e.byteOffset,e.byteLength),s=[];for(t=0;t+4<e.length;t+=i)if(i=n.getUint32(t),t+=4,i<=0)s.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:s.push("slice_layer_without_partitioning_rbsp");break;case 5:s.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:s.push("sei_rbsp");break;case 7:s.push("seq_parameter_set_rbsp");break;case 8:s.push("pic_parameter_set_rbsp");break;case 9:s.push("access_unit_delimiter_rbsp");break;default:s.push("UNKNOWN NAL - "+e[t]&31)}return s},fi={
// codingname, not a first-class box type. stsd entries share the
// same format as real boxes so the parsing infrastructure can be
// shared
avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:Gt(e.subarray(78,e.byteLength))}},avcC:function(e){var t,i,n,s,r=new DataView(e.buffer,e.byteOffset,e.byteLength),a={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},o=31&e[5];for(n=6,s=0;s<o;s++)i=r.getUint16(n),n+=2,a.sps.push(new Uint8Array(e.subarray(n,n+i))),n+=i;for(t=e[n],n++,s=0;s<t;s++)i=r.getUint16(n),n+=2,a.pps.push(new Uint8Array(e.subarray(n,n+i))),n+=i;return a},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},edts:function(e){return{boxes:Gt(e)}},elst:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),edits:[]},s=i.getUint32(4);for(t=8;s;s--)0===n.version?(n.edits.push({segmentDuration:i.getUint32(t),mediaTime:i.getInt32(t+4),mediaRate:i.getUint16(t+8)+i.getUint16(t+10)/65536}),t+=12):(n.edits.push({segmentDuration:hi(e.subarray(t)),mediaTime:hi(e.subarray(t+8)),mediaRate:i.getUint16(t+16)+i.getUint16(t+18)/65536}),t+=20);return n},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={majorBrand:gi(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},n=8;n<e.byteLength;)i.compatibleBrands.push(gi(e.subarray(n,n+4))),n+=4;return i},dinf:function(e){return{boxes:Gt(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:Gt(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:gi(e.subarray(8,12)),name:""},i=8;for(i=24;i<e.byteLength;i++){if(0===e[i]){i++;break}t.name+=String.fromCharCode(e[i])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:pi(e)}},mdhd:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,s={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===s.version?(n+=4,s.creationTime=di(i.getUint32(n)),n+=8,s.modificationTime=di(i.getUint32(n)),n+=4,s.timescale=i.getUint32(n),n+=8,s.duration=i.getUint32(n)):(s.creationTime=di(i.getUint32(n)),n+=4,s.modificationTime=di(i.getUint32(n)),n+=4,s.timescale=i.getUint32(n),n+=4,s.duration=i.getUint32(n)),n+=4,t=i.getUint16(n),s.language+=String.fromCharCode(96+(t>>10)),s.language+=String.fromCharCode(96+((992&t)>>5)),s.language+=String.fromCharCode(96+(31&t)),s},mdia:function(e){return{boxes:Gt(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:Gt(e)}},
// codingname, not a first-class box type. stsd entries share the
// same format as real boxes so the parsing infrastructure can be
// shared
mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={
// 6 bytes reserved
dataReferenceIndex:t.getUint16(6),
// 4 + 4 bytes reserved
channelcount:t.getUint16(16),samplesize:t.getUint16(18),
// 2 bytes pre_defined
// 2 bytes reserved
samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(i.streamDescriptor=Gt(e.subarray(28))[0]),i},moof:function(e){return{boxes:Gt(e)}},moov:function(e){return{boxes:Gt(e)}},mvex:function(e){return{boxes:Gt(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=di(t.getUint32(i)),i+=8,n.modificationTime=di(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=8,n.duration=t.getUint32(i)):(n.creationTime=di(t.getUint32(i)),i+=4,n.modificationTime=di(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=4,n.duration=t.getUint32(i)),i+=4,n.rate=t.getUint16(i)+t.getUint16(i+2)/16,i+=4,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,i+=8,n.matrix=new Uint32Array(e.subarray(i,i+36)),i+=36,i+=24,n.nextTrackId=t.getUint32(i),n},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)i.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return i},sidx:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12;0===i.version?(i.earliestPresentationTime=t.getUint32(n),i.firstOffset=t.getUint32(n+4),n+=8):(i.earliestPresentationTime=Ai(e.subarray(n)),i.firstOffset=Ai(e.subarray(n+8)),n+=16),n+=2;var s=t.getUint16(n);for(n+=2;s>0;n+=12,s--)i.references.push({referenceType:(128&e[n])>>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)});return i},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:Gt(e)}},ctts:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),compositionOffsets:[]},s=i.getUint32(4);for(t=8;s;t+=8,s--)n.compositionOffsets.push({sampleCount:i.getUint32(t),sampleOffset:i[0===n.version?"getUint32":"getInt32"](t+4)});return n},stss:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),syncSamples:[]},s=i.getUint32(4);for(t=8;s;t+=4,s--)n.syncSamples.push(i.getUint32(t));return n},stco:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},s=i.getUint32(4);for(t=8;s;t+=4,s--)n.chunkOffsets.push(i.getUint32(t));return n},stsc:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n=i.getUint32(4),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;n;t+=12,n--)s.sampleToChunks.push({firstChunk:i.getUint32(t),samplesPerChunk:i.getUint32(t+4),sampleDescriptionIndex:i.getUint32(t+8)});return s},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:Gt(e.subarray(8))}},stsz:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)n.entries.push(i.getUint32(t));return n},stts:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},s=i.getUint32(4);for(t=8;s;t+=8,s--)n.timeToSamples.push({sampleCount:i.getUint32(t),sampleDelta:i.getUint32(t+4)});return n},styp:function(e){return fi.ftyp(e)},tfdt:oi,tfhd:li,tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=di(t.getUint32(i)),i+=8,n.modificationTime=di(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=8,n.duration=t.getUint32(i)):(n.creationTime=di(t.getUint32(i)),i+=4,n.modificationTime=di(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=4,n.duration=t.getUint32(i)),i+=4,i+=8,n.layer=t.getUint16(i),i+=2,n.alternateGroup=t.getUint16(i),i+=2,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,n.matrix=new Uint32Array(e.subarray(i,i+36)),i+=36,n.width=t.getUint16(i)+t.getUint16(i+2)/65536,i+=4,n.height=t.getUint16(i)+t.getUint16(i+2)/65536,n},traf:function(e){return{boxes:Gt(e)}},trak:function(e){return{boxes:Gt(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:ui,"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}},mi={inspect:Gt=function(e){for(var t,i,n,s,r,a=0,o=[],l=new ArrayBuffer(e.length),A=new Uint8Array(l),c=0;c<e.length;++c)A[c]=e[c];for(t=new DataView(l);a<e.byteLength;)i=t.getUint32(a),n=gi(e.subarray(a+4,a+8)),s=i>1?a+i:e.byteLength,(r=(fi[n]||function(e){return{data:e}})(e.subarray(a+8,s))).size=i,r.type=n,o.push(r),a=s;return o},textify:Kt=function(e,t){var i;return t=t||0,i=new Array(2*t+1).join(" "),e.map((function(e,n){return i+e.type+"\n"+// the type is already included and handle child boxes separately
Object.keys(e).filter((function(e){return"type"!==e&&"boxes"!==e})).map((function(t){var n=i+"  "+t+": ",s=e[t];if(s instanceof Uint8Array||s instanceof Uint32Array){var r=Array.prototype.slice.call(new Uint8Array(s.buffer,s.byteOffset,s.byteLength)).map((function(e){return" "+("00"+e.toString(16)).slice(-2)})).join("").match(/.{1,24}/g);return r?1===r.length?n+"<"+r.join("").slice(1)+">":n+"<\n"+r.map((function(e){return i+"  "+e})).join("\n")+"\n"+i+"  >":n+"<>"}return n+JSON.stringify(s,null,2).split("\n").map((function(e,t){return 0===t?e:i+"  "+e})).join("\n")})).join("\n")+(// recursively textify the child boxes
e.boxes?"\n"+Kt(e.boxes,t+1):"")})).join("\n")},parseType:gi,findBox:si,parseTraf:fi.traf,parseTfdt:fi.tfdt,parseHdlr:fi.hdlr,parseTfhd:fi.tfhd,parseTrun:fi.trun,parseSidx:fi.sidx},Ci=function(e){for(var t=0,i=String.fromCharCode(e[t]),n="";"\0"!==i;)n+=i,t++,i=String.fromCharCode(e[t]);return n+=i},Ii=q.getUint64,vi=function(e,t){var i="\0"!==t.scheme_id_uri,n=0===e&&Bi(t.presentation_time_delta)&&i,s=1===e&&Bi(t.presentation_time)&&i;return!(e>1)&&n||s},Bi=function(e){return void 0!==e||null!==e},yi="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},bi=$t,Ei=Zt,wi=si,Qi=ei,_i={parseEmsgBox:function(e){var t,i,n,s,r,a,o,l=4,A=e[0];if(0===A)l+=(t=Ci(e.subarray(l))).length,l+=(i=Ci(e.subarray(l))).length,n=(c=new DataView(e.buffer)).getUint32(l),l+=4,r=c.getUint32(l),l+=4,a=c.getUint32(l),l+=4,o=c.getUint32(l),l+=4;else if(1===A){var c;n=(c=new DataView(e.buffer)).getUint32(l),l+=4,s=Ii(e.subarray(l)),l+=8,a=c.getUint32(l),l+=4,o=c.getUint32(l),l+=4,l+=(t=Ci(e.subarray(l))).length,l+=(i=Ci(e.subarray(l))).length}var u={scheme_id_uri:t,value:i,
// if timescale is undefined or 0 set to 1 
timescale:n||1,presentation_time:s,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return vi(A,u)?u:void 0},scaleTime:function(e,t,i,n){return e||0===e?e/t:n+i/t}},Si=li,xi=ui,ki=oi,Di=q.getUint64,Fi=yi,Ti=Ge.parseId3Frames;qt=function(e){return wi(e,["moov","trak"]).reduce((function(e,t){var i,n,s,r,a;return(i=wi(t,["tkhd"])[0])?(n=i[0],r=bi(i[s=0===n?12:20]<<24|i[s+1]<<16|i[s+2]<<8|i[s+3]),(a=wi(t,["mdia","mdhd"])[0])?(s=0===(n=a[0])?12:20,e[r]=bi(a[s]<<24|a[s+1]<<16|a[s+2]<<8|a[s+3]),e):null):null}),{})},Yt=function(e,t){var i=wi(t,["moof","traf"]).reduce((function(t,i){var n,s=wi(i,["tfhd"])[0],r=bi(s[4]<<24|s[5]<<16|s[6]<<8|s[7]),a=e[r]||9e4,o=wi(i,["tfdt"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let A;return"bigint"==typeof(n=1===o[0]?Di(o.subarray(4,12)):l.getUint32(4))?A=n/Fi.BigInt(a):"number"!=typeof n||isNaN(n)||(A=n/a),A<Number.MAX_SAFE_INTEGER&&(A=Number(A)),A<t&&(t=A),t}),1/0);return"bigint"==typeof i||isFinite(i)?i:0},Vt=function(e,t){var i,n=wi(t,["moof","traf"]),s=0,r=0;if(n&&n.length){var a=wi(n[0],["tfhd"])[0],o=wi(n[0],["trun"])[0],l=wi(n[0],["tfdt"])[0];if(a)i=Si(a).trackId;if(l)s=ki(l).baseMediaDecodeTime;if(o){var A=xi(o);A.samples&&A.samples.length&&(r=A.samples[0].compositionTimeOffset||0)}}var c=e[i]||9e4;"bigint"==typeof s&&(r=Fi.BigInt(r),c=Fi.BigInt(c));var u=(s+r)/c;return"bigint"==typeof u&&u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u},Wt=function(e){var t=wi(e,["moov","trak"]),i=[];return t.forEach((function(e){var t=wi(e,["mdia","hdlr"]),n=wi(e,["tkhd"]);t.forEach((function(e,t){var s,r,a=Qi(e.subarray(8,12)),o=n[t];"vide"===a&&(r=0===(s=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?s.getUint32(12):s.getUint32(20),i.push(r))}))})),i},jt=function(e){var t=wi(e,["moov","trak"]),i=[];return t.forEach((function(e){var t,n,s={},r=wi(e,["tkhd"])[0];r&&(n=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),s.id=0===n?t.getUint32(12):t.getUint32(20));var a=wi(e,["mdia","hdlr"])[0];if(a){var o=Qi(a.subarray(8,12));s.type="vide"===o?"video":"soun"===o?"audio":o}var l=wi(e,["mdia","minf","stbl","stsd"])[0];if(l){var A=l.subarray(8);s.codec=Qi(A.subarray(4,8));var c,u=wi(A,[s.codec])[0];u&&(/^[asm]vc[1-9]$/i.test(s.codec)?(c=u.subarray(78),"avcC"===Qi(c.subarray(4,8))&&c.length>11?(s.codec+=".",s.codec+=Ei(c[9]),s.codec+=Ei(c[10]),s.codec+=Ei(c[11])):s.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(s.codec)?(c=u.subarray(28),"esds"===Qi(c.subarray(4,8))&&c.length>20&&0!==c[19]?(s.codec+="."+Ei(c[19]),s.codec+="."+Ei(c[20]>>>2&63).replace(/^0/,"")):s.codec="mp4a.40.2"):s.codec=s.codec.toLowerCase())}var h=wi(e,["mdia","mdhd"])[0];h&&(s.timescale=Jt(h)),i.push(s)})),i},zt=function(e,t=0){return wi(e,["emsg"]).map((e=>{var i=_i.parseEmsgBox(new Uint8Array(e)),n=Ti(i.message_data);return{cueTime:_i.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:_i.scaleTime(i.event_duration,i.timescale),frames:n}}))};var Mi={
// export mp4 inspector's findBox and parseType for backwards compatibility
findBox:wi,parseType:Qi,timescale:qt,startTime:Yt,compositionStartTime:Vt,videoTrackIds:Wt,tracks:jt,getTimescaleFromMediaHeader:Jt=function(e){var t=0===e[0]?12:20;return bi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},getEmsgID3:zt};const{parseTrun:Ri}=mi,{findBox:Ni}=Mi;var Li=yi,Ui={getMdatTrafPairs:function(e){var t=Ni(e,["moof","traf"]),i=Ni(e,["mdat"]),n=[];return i.forEach((function(e,i){var s=t[i];n.push({mdat:e,traf:s})})),n},parseSamples:function(e,t,i){var n=t,s=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=Ri(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=s),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=n,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof n?(e.pts=n+Li.BigInt(e.compositionTimeOffset),n+=Li.BigInt(e.duration)):(e.pts=n+e.compositionTimeOffset,n+=e.duration)})),o=o.concat(t)})),o}},Hi=de.discardEmulationPreventionBytes,Pi=_e.CaptionStream,Oi=si,Gi=oi,Ki=li,{getMdatTrafPairs:qi,parseSamples:Yi}=Ui,Vi=function(e,t){for(var i=e,n=0;n<t.length;n++){var s=t[n];if(i<s.size)return s;i-=s.size}return null},Wi=function(e,t){var i={};return qi(e).forEach((function(e){var n,s=e.mdat,r=e.traf,a=Oi(r,["tfhd"]),o=Ki(a[0]),l=o.trackId,A=Oi(r,["tfdt"]),c=A.length>0?Gi(A[0]).baseMediaDecodeTime:0,u=Oi(r,["trun"]);t===l&&u.length>0&&(n=function(e,t,i){var n,s,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(s=0;s+4<e.length;s+=r)if(r=o.getUint32(s),s+=4,!(r<=0))switch(31&e[s]){case 6:var A=e.subarray(s+1,s+1+r),c=Vi(s,t);if(n={nalUnitType:"sei_rbsp",size:r,data:A,escapedRBSP:Hi(A),trackId:i},c)n.pts=c.pts,n.dts=c.dts,a=c;else{if(!a){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+s+" for trackId "+i+". See mux.js#223."});break}n.pts=a.pts,n.dts=a.dts}l.seiNals.push(n)}return l}(s,Yi(u,c,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(n.seiNals),i[l].logs=i[l].logs.concat(n.logs))})),i},ji=function(){var e,t,i,n,s,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Pi,a=!0,r=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/n,e.endTime=e.endPts/n,s.captions.push(e),s.captionStreams[e.stream]=!0})),e.on("log",(function(e){s.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||n!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],n=a[i];else if(null===i||!n)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var n=Wi(e,t)[t]||{};return{seiNals:n.seiNals,logs:n.logs,timescale:i}}(e,i,n),o&&o.logs&&(s.logs=s.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),s):s.logs.length?{logs:s.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){s.captions=[],s.captionStreams={},s.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,n=null,s?this.clearParsedCaptions():s={captions:[],
// CC1, CC2, CC3, CC4
captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Ji}=mi,zi=si,{getTimescaleFromMediaHeader:Xi}=Mi,{parseSamples:$i,getMdatTrafPairs:Zi}=Ui;var en=function(){let e=9e4;this.init=function(t){const i=zi(t,["moov","trak","mdia","mdhd"])[0];i&&(e=Xi(i))},this.parseSegment=function(t){const i=[],n=Zi(t);let s=0;return n.forEach((function(t){const n=t.mdat,r=t.traf,a=zi(r,["tfdt"])[0],o=zi(r,["tfhd"])[0],l=zi(r,["trun"]);if(a){const e=Ji(a);s=e.baseMediaDecodeTime}if(l.length&&o){const t=$i(l,s,o);let r=0;t.forEach((function(t){const s=new TextDecoder("utf-8"),a=n.slice(r,r+t.size);if(zi(a,["vtte"])[0])return void(r+=t.size);zi(a,["vttc"]).forEach((function(n){const r=zi(n,["payl"])[0],a=zi(n,["sttg"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let A,c;if(r)try{A=s.decode(r)}catch(I2){console.error(I2)}if(a)try{c=s.decode(a)}catch(I2){console.error(I2)}t.duration&&A&&i.push({cueText:A,start:o,end:l,settings:c})})),r+=t.size}))}})),i}},tn=Se,nn=function(e){var t=31&e[1];return t<<=8,t|=e[2]},sn=function(e){return!!(64&e[1])},rn=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},an=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},on={parseType:function(e,t){var i=nn(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},parsePat:function(e){var t=sn(e),i=4+rn(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=sn(e),n=4+rn(e);if(i&&(n+=e[n]+1),1&e[n+5]){var s;s=3+((15&e[n+1])<<8|e[n+2])-4;for(var r=12+((15&e[n+10])<<8|e[n+11]);r<s;){var a=n+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:sn,parsePesType:function(e,t){switch(t[nn(e)]){case tn.H264_STREAM_TYPE:return"video";case tn.ADTS_STREAM_TYPE:return"audio";case tn.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!sn(e))return null;var t=4+rn(e);if(t>=e.byteLength)return null;var i,n=null;return 192&(i=e[t+7])&&((n={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,n.pts*=4,n.pts+=(6&e[t+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,n.dts*=4,n.dts+=(6&e[t+18])>>>1)),n},videoPacketContainsKeyFrame:function(e){for(var t=4+rn(e),i=e.subarray(t),n=0,s=0,r=!1;s<i.byteLength-3;s++)if(1===i[s+2]){n=s+5;break}for(;n<i.byteLength;)switch(i[n]){case 0:if(0!==i[n-1]){n+=2;break}if(0!==i[n-2]){n++;break}s+3!==n-2&&"slice_layer_without_partitioning_rbsp_idr"===an(31&i[s+3])&&(r=!0);do{n++}while(1!==i[n]&&n<i.length);s=n-2,n+=3;break;case 1:if(0!==i[n-1]||0!==i[n-2]){n+=3;break}"slice_layer_without_partitioning_rbsp_idr"===an(31&i[s+3])&&(r=!0),s=n-2,n+=3;break;default:n+=3}return i=i.subarray(s),n-=s,s=0,i&&i.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===an(31&i[s+3])&&(r=!0),r}},ln=Se,An=Me.handleRollover,cn={};cn.ts=on,cn.aac=Ct;var un=oe.ONE_SECOND_IN_TS,hn=188,dn=71,gn=function(e,t,i){for(var n,s,r,a,o=0,l=hn,A=!1;l<=e.byteLength;)if(e[o]!==dn||e[l]!==dn&&l!==e.byteLength)o++,l++;else{if(n=e.subarray(o,l),"pes"===cn.ts.parseType(n,t.pid))s=cn.ts.parsePesType(n,t.table),r=cn.ts.parsePayloadUnitStartIndicator(n),"audio"===s&&r&&(a=cn.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),A=!0);if(A)break;o+=hn,l+=hn}for(o=(l=e.byteLength)-hn,A=!1;o>=0;)if(e[o]!==dn||e[l]!==dn&&l!==e.byteLength)o--,l--;else{if(n=e.subarray(o,l),"pes"===cn.ts.parseType(n,t.pid))s=cn.ts.parsePesType(n,t.table),r=cn.ts.parsePayloadUnitStartIndicator(n),"audio"===s&&r&&(a=cn.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),A=!0);if(A)break;o-=hn,l-=hn}},pn=function(e,t,i){for(var n,s,r,a,o,l,A,c=0,u=hn,h=!1,d={data:[],size:0};u<e.byteLength;)if(e[c]!==dn||e[u]!==dn)c++,u++;else{if(n=e.subarray(c,u),"pes"===cn.ts.parseType(n,t.pid))if(s=cn.ts.parsePesType(n,t.table),r=cn.ts.parsePayloadUnitStartIndicator(n),"video"===s&&(r&&!h&&(a=cn.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),h=!0),!i.firstKeyFrame)){if(r&&0!==d.size){for(o=new Uint8Array(d.size),l=0;d.data.length;)A=d.data.shift(),o.set(A,l),l+=A.byteLength;if(cn.ts.videoPacketContainsKeyFrame(o)){var g=cn.ts.parsePesTime(o);g&&(i.firstKeyFrame=g,i.firstKeyFrame.type="video")}d.size=0}d.data.push(n),d.size+=n.byteLength}if(h&&i.firstKeyFrame)break;c+=hn,u+=hn}for(c=(u=e.byteLength)-hn,h=!1;c>=0;)if(e[c]!==dn||e[u]!==dn)c--,u--;else{if(n=e.subarray(c,u),"pes"===cn.ts.parseType(n,t.pid))s=cn.ts.parsePesType(n,t.table),r=cn.ts.parsePayloadUnitStartIndicator(n),"video"===s&&r&&(a=cn.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),h=!0);if(h)break;c-=hn,u-=hn}},fn=function(e){var t={pid:null,table:null},i={};for(var n in function(e,t){for(var i,n=0,s=hn;s<e.byteLength;)if(e[n]!==dn||e[s]!==dn)n++,s++;else{switch(i=e.subarray(n,s),cn.ts.parseType(i,t.pid)){case"pat":t.pid=cn.ts.parsePat(i);break;case"pmt":var r=cn.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}n+=hn,s+=hn}}(e,t),t.table){if(t.table.hasOwnProperty(n))switch(t.table[n]){case ln.H264_STREAM_TYPE:i.video=[],pn(e,t,i),0===i.video.length&&delete i.video;break;case ln.ADTS_STREAM_TYPE:i.audio=[],gn(e,t,i),0===i.audio.length&&delete i.audio}}return i},mn=function(e,t){var i;return i=cn.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,n=0,s=null,r=null,a=0,o=0;e.length-o>=3;){switch(cn.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){i=!0;break}if((a=cn.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=cn.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){i=!0;break}if((a=cn.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===s&&(t=e.subarray(o,o+a),s=cn.aac.parseSampleRate(t)),n++,o+=a;break;default:o++}if(i)return null}if(null===s||null===r)return null;var l=un/s;return{audio:[{type:"audio",dts:r,pts:r},{type:"audio",dts:r+1024*n*l,pts:r+1024*n*l}]}}(e):fn(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=An(e.dts,i),e.pts=An(e.pts,i),e.dtsTime=e.dts/un,e.ptsTime=e.pts/un}))}if(e.video&&e.video.length){var n=t;if((void 0===n||isNaN(n))&&(n=e.video[0].dts),e.video.forEach((function(e){e.dts=An(e.dts,n),e.pts=An(e.pts,n),e.dtsTime=e.dts/un,e.ptsTime=e.pts/un})),e.firstKeyFrame){var s=e.firstKeyFrame;s.dts=An(s.dts,n),s.pts=An(s.pts,n),s.dtsTime=s.dts/un,s.ptsTime=s.pts/un}}}(i,t),i):null};class Cn{constructor(e,t){this.options=t||{},this.self=e,this.init()}
/**
     * initialize our web worker and wire all the events.
     */init(){var e,t;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Xt.Transmuxer(this.options),e=this.self,(t=this.transmuxer).on("data",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const n=t.data;t.data=n.buffer,e.postMessage({action:"data",segment:t,byteOffset:n.byteOffset,byteLength:n.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})})),t.on("audioSegmentTimingInfo",(function(t){const i={start:{decode:oe.videoTsToSeconds(t.start.dts),presentation:oe.videoTsToSeconds(t.start.pts)},end:{decode:oe.videoTsToSeconds(t.end.dts),presentation:oe.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:oe.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=oe.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:i})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:oe.videoTsToSeconds(t.start),end:oe.videoTsToSeconds(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}pushMp4Captions(e){this.captionParser||(this.captionParser=new ji,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}
/**
     * Initializes the WebVttParser and passes the init segment.
     *
     * @param {Uint8Array} data mp4 boxed WebVTT init segment data
     */initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new en);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}
/**
     * Parse an mp4 encapsulated WebVTT segment and return an array of cues.
     *
     * @param {Uint8Array} data a text/webvtt segment
     * @return {Object[]} an array of parsed cue objects
     */getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new en);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Mi.startTime(e,t);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Mi.tracks(e);this.self.postMessage({action:"probeMp4Tracks",tracks:t,data:e},[e.buffer])}
/**
     * Probes an mp4 segment for EMSG boxes containing ID3 data.
     * https://aomediacodec.github.io/id3-emsg/
     *
     * @param {Uint8Array} data segment data
     * @param {number} offset segment start time
     * @return {Object[]} an array of ID3 frames
     */probeEmsgID3({data:e,offset:t}){const i=Mi.getEmsgID3(e,t);this.self.postMessage({action:"probeEmsgID3",id3Frames:i,emsgData:e},[e.buffer])}
/**
     * Probe an mpeg2-ts segment to determine the start time of the segment in it's
     * internal "media time," as well as whether it contains video and/or audio.
     *
     * @private
     * @param {Uint8Array} bytes - segment bytes
     * @param {number} baseStartTime
     *        Relative reference timestamp used when adjusting frame timestamps for rollover.
     *        This value should be in seconds, as it's converted to a 90khz clock within the
     *        function body.
     * @return {Object} The start time of the current segment in "media time" as well as
     *                  whether it contains video and/or audio
     */probeTs({data:e,baseStartTime:t}){const i="number"!=typeof t||isNaN(t)?void 0:t*oe.ONE_SECOND_IN_TS,n=mn(e,i);let s=null;n&&(s={
// each type's time info comes back as an array of 2 times, start and end
hasVideo:n.video&&2===n.video.length||!1,hasAudio:n.audio&&2===n.audio.length||!1},s.hasVideo&&(s.videoStart=n.video[0].ptsTime),s.hasAudio&&(s.audioStart=n.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:s,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}
/**
     * Adds data (a ts segment) to the start of the transmuxer pipeline for
     * processing.
     *
     * @param {ArrayBuffer} data data to push into the muxer
     */push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}
/**
     * Recreate the transmuxer so that the next segment added via `push`
     * start with a fresh transmuxer.
     */reset(){this.transmuxer.reset()}
/**
     * Set the value that will be used as the `baseMediaDecodeTime` time for the
     * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`
     * set relative to the first based on the PTS values.
     *
     * @param {Object} data used to set the timestamp offset in the muxer
     */setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(oe.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(oe.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}
/**
     * Forces the pipeline to finish processing the last segment and emit it's
     * results.
     *
     * @param {Object} data event data, not really used
     */flush(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new Cn(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new Cn(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var Ox=Lx(Px);const Gx=e=>{const{transmuxer:t,bytes:i,audioAppendStart:n,gopsToAlignWith:s,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:A,onVideoSegmentTimingInfo:c,onAudioSegmentTimingInfo:u,onId3:h,onCaptions:d,onDone:g,onEndedTimeline:p,onTransmuxerLog:f,isEndOfTimeline:m,segment:C,triggerSegmentEventFn:I}=e,v={buffer:[]};let B=m;if(t.onmessage=i=>{t.currentTransmux===e&&("data"===i.data.action&&((e,t,i)=>{const{type:n,initSegment:s,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:A}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const c=e.data.segment.boxes||{data:e.data.segment.data},u={type:n,
// cast ArrayBuffer to TypedArray
data:new Uint8Array(c.data,c.data.byteOffset,c.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};void 0!==l&&(u.videoFrameDtsTime=l),void 0!==A&&(u.videoFramePtsTime=A),i(u)})(i,v,a),"trackinfo"===i.data.action&&o(i.data.trackInfo),"gopInfo"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,v),"audioTimingInfo"===i.data.action&&l(i.data.audioTimingInfo),"videoTimingInfo"===i.data.action&&A(i.data.videoTimingInfo),"videoSegmentTimingInfo"===i.data.action&&c(i.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===i.data.action&&u(i.data.audioSegmentTimingInfo),"id3Frame"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),"caption"===i.data.action&&d(i.data.caption),"endedtimeline"===i.data.action&&(B=!1,p()),"log"===i.data.action&&f(i.data.log),"transmuxed"===i.data.type&&(B||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:v,callback:g}),Kx(t))))},t.onerror=()=>{const e={message:"Received an error message from the transmuxer worker",metadata:{errorType:hS.Error.StreamingFailedToTransmuxSegment,segmentInfo:Lk({segment:C})}};g(null,e)},n&&t.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(s)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:s}),void 0!==r&&t.postMessage({action:"setRemux",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,n=i instanceof ArrayBuffer?0:i.byteOffset;I({type:"segmenttransmuxingstart",segment:C}),t.postMessage({action:"push",
// Send the typed-array of data as an ArrayBuffer so that
// it can be sent as a "Transferable" and avoid the costly
// memory copy
data:e,
// To recreate the original typed-array, we need information
// about what portion of the ArrayBuffer it was a view into
byteOffset:n,byteLength:i.byteLength},[e])}m&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Kx=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():Gx(e.currentTransmux))},qx=(e,t)=>{e.postMessage({action:t}),Kx(e)},Yx=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void qx(t,e);t.transmuxQueue.push(qx.bind(null,t,e))},Vx=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void Gx(e);e.transmuxer.transmuxQueue.push(e)};var Wx=e=>{Yx("reset",e)},jx=e=>{const t=new Ox;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:"init",options:e}),t};const Jx=function(e){const t=e.transmuxer,i=e.endAction||e.action,n=e.callback,s=fI({},e,{endAction:null,transmuxer:null,callback:null}),r=s=>{s.data.action===i&&(t.removeEventListener("message",r),s.data.data&&(s.data.data=new Uint8Array(s.data.data,e.byteOffset||0,e.byteLength||s.data.data.byteLength),e.data&&(e.data=s.data.data)),n(s.data))};if(t.addEventListener("message",r),e.data){const i=e.data instanceof ArrayBuffer;s.byteOffset=i?0:e.data.byteOffset,s.byteLength=e.data.byteLength;const n=[i?e.data:e.data.buffer];t.postMessage(s,n)}else t.postMessage(s)},zx=2,Xx=-101,$x=-102,Zx="wvtt",ek=e=>{e.forEach((e=>{e.abort()}))},tk=(e,t)=>{const{requestType:i}=t,n=ix({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Xx,xhr:t,metadata:n}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:$x,xhr:t,metadata:n}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:zx,xhr:t,metadata:n}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:zx,xhr:t,metadata:n}:null},ik=(e,t,i,n)=>(s,r)=>{const a=r.response,o=tk(s,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:zx,xhr:r},e);const l=new DataView(a),A=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=A;const c={uri:r.uri};return n({type:"segmentkeyloadcomplete",segment:e,keyInfo:c}),i(null,e)},nk=(e,t)=>{const i=Jy(e.map.bytes);if("mp4"!==i){const n=e.map.resolvedUri||e.map.uri,s=i||"unknown";return t({internal:!0,message:`Found unsupported ${s} container for initialization segment at URL: ${n}`,code:zx,metadata:{mediaType:s}})}Jx({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:n})=>(e.map.bytes=n,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),"text"===t.type&&((e,t)=>{t===Zx&&e.transmuxer.postMessage({action:"initMp4WebVttParser",data:e.map.bytes})})(e,t.codec))})),t(null))})},sk=({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:n})=>(s,r)=>{const a=tk(s,r);if(a)return t(a,e);n({type:"segmentloaded",segment:e});const o=
// although responseText "should" exist, this guard serves to prevent an error being
// thrown for two primary cases:
// 1. the mime type override stops working, or is not implemented for a specific
//    browser
// 2. when using mock XHR libraries like sinon that do not allow the override behavior
"arraybuffer"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)},rk=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:A,dataFn:c,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:d})=>{const g=e.map&&e.map.tracks||{},p=Boolean(g.audio&&g.video);let f=n.bind(null,e,"audio","start");const m=n.bind(null,e,"audio","end");let C=n.bind(null,e,"video","start");const I=n.bind(null,e,"video","end");Jx({action:"probeTs",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:n=>{e.bytes=t=n.data;const g=n.result;g&&(i(e,{hasAudio:g.hasAudio,hasVideo:g.hasVideo,isMuxed:p}),i=null),Vx({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:p,onData:t=>{t.type="combined"===t.type?"video":t.type,c(e,t)},onTrackInfo:t=>{i&&(p&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{f&&void 0!==e.start&&(f(e.start),f=null),m&&void 0!==e.end&&m(e.end)},onVideoTimingInfo:e=>{C&&void 0!==e.start&&(C(e.start),C=null),I&&void 0!==e.end&&I(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};d({type:"segmenttransmuxingtiminginfoavailable",segment:e,timingInfo:i}),s(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};d({type:"segmenttransmuxingtiminginfoavailable",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{A()},onTransmuxerLog:h,onDone:(t,i)=>{u&&(t.type="combined"===t.type?"video":t.type,d({type:"segmenttransmuxingcomplete",segment:e}),u(i,e,t))},segment:e,triggerSegmentEventFn:d})}})},ak=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:A,dataFn:c,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:d})=>{let g=new Uint8Array(t);if(function(e){return xy(e,["moof"]).length>0}(g)){e.isFmp4=!0;const{tracks:s}=e.map;if(s.text&&(!s.audio||!s.video))return c(e,{data:g,type:"text"}),void((e,t,i)=>{t===Zx&&Jx({action:"getMp4WebVttText",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:n})=>{e.bytes=t,i(null,e,{mp4VttCues:n})}})})(e,s.text.codec,u);const r={isFmp4:!0,hasVideo:!!s.video,hasAudio:!!s.audio};s.audio&&s.audio.codec&&"enca"!==s.audio.codec&&(r.audioCodec=s.audio.codec),s.video&&s.video.codec&&"encv"!==s.video.codec&&(r.videoCodec=s.video.codec),s.video&&s.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{c(e,{data:g,type:r.hasAudio&&!r.isMuxed?"audio":"video"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),u(null,e,{})};Jx({action:"probeMp4StartTime",timescales:e.map.timescales,data:g,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=g=i,r.hasAudio&&!r.isMuxed&&n(e,"audio","start",a),r.hasVideo&&n(e,"video","start",a),Jx({action:"probeEmsgID3",data:g,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:n})=>{t=i.buffer,e.bytes=g=i,s.video&&i.byteLength&&e.transmuxer?Jx({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:e.transmuxer,data:g,timescales:e.map.timescales,trackIds:[s.video.id],callback:i=>{t=i.data.buffer,e.bytes=g=i.data,i.logs.forEach((function(e){h(vS(e,{stream:"mp4CaptionParser"}))})),l(i.captions,n)}}):l(void 0,n)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=Jy(g)),"ts"!==e.container&&"aac"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void u(null,e,{});rk({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:A,dataFn:c,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:d})}else u(null,e,{})},ok=function({id:e,key:t,encryptedBytes:i,decryptionWorker:n,segment:s,doneFn:r},a){const o=t=>{if(t.data.source===e){n.removeEventListener("message",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;n.onerror=()=>{const e="An error occurred in the decryption worker",t=Lk({segment:s}),i={message:e,metadata:{error:new Error(e),errorType:hS.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:s.key.resolvedUri||s.map.key.resolvedUri}}};r(i,s)},n.addEventListener("message",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),n.postMessage(Ix({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},lk=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:A,dataFn:c,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:d})=>{let g=0,p=!1;return(f,m)=>{if(!p){if(f)return p=!0,ek(e),u(f,m);if(g+=1,g===e.length){const g=function(){if(m.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:A,dataFn:c,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:d})=>{d({type:"segmentdecryptionstart"}),ok({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:u},(e=>{t.bytes=e,d({type:"segmentdecryptioncomplete",segment:t}),ak({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:A,dataFn:c,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:d})}))})({decryptionWorker:t,segment:m,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:A,dataFn:c,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:d});ak({segment:m,bytes:m.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:A,dataFn:c,doneFn:u,onTransmuxerLog:h,triggerSegmentEventFn:d})};if(m.endOfAllRequests=Date.now(),m.map&&m.map.encryptedBytes&&!m.map.bytes)return d({type:"segmentdecryptionstart",segment:m}),ok({decryptionWorker:t,
// add -init to the "id" to differentiate between segment
// and init segment decryption, just in case they happen
// at the same time at some point in the future.
id:m.requestId+"-init",encryptedBytes:m.map.encryptedBytes,key:m.map.key,segment:m,doneFn:u},(t=>{m.map.bytes=t,d({type:"segmentdecryptioncomplete",segment:m}),nk(m,(t=>{if(t)return ek(e),u(t,m);g()}))}));g()}}}},Ak=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:A,dataFn:c})=>i=>{if(!i.target.aborted)return e.stats=vS(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},ck=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:n,abortFn:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:A,id3Fn:c,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:d,dataFn:g,doneFn:p,onTransmuxerLog:f,triggerSegmentEventFn:m})=>{const C=[],I=lk({activeXhrs:C,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:A,id3Fn:c,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:d,dataFn:g,doneFn:p,onTransmuxerLog:f,triggerSegmentEventFn:m});if(n.key&&!n.key.bytes){const i=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&i.push(n.map.key);const s=vS(t,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),r=ik(n,i,I,m);m({type:"segmentkeyloadstart",segment:n,keyInfo:{uri:n.key.resolvedUri}});const a=e(s,r);C.push(a)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){const i=vS(t,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),s=ik(n,[n.map.key],I,m);m({type:"segmentkeyloadstart",segment:n,keyInfo:{uri:n.map.key.resolvedUri}});const r=e(i,s);C.push(r)}const i=vS(t,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:px(n.map),requestType:"segment-media-initialization"}),s=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(n,s)=>{const r=tk(n,s);if(r)return t(r,e);const a=new Uint8Array(s.response);if(i({type:"segmentloaded",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,nk(e,(function(i){if(i)return i.xhr=s,i.status=s.status,t(i,e);t(null,e)}))})({segment:n,finishProcessingFn:I,triggerSegmentEventFn:m});m({type:"segmentloadstart",segment:n});const r=e(i,s);C.push(r)}const v=vS(t,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:px(n),requestType:"segment"}),B=sk({segment:n,finishProcessingFn:I,responseType:v.responseType,triggerSegmentEventFn:m});m({type:"segmentloadstart",segment:n});const y=e(v,B);y.addEventListener("progress",Ak({segment:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:A,id3Fn:c,captionsFn:u,isEndOfTimeline:h,endedTimelineFn:d,dataFn:g})),C.push(y);const b={};return C.forEach((e=>{e.addEventListener("loadend",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:b,abortFn:s}))})),()=>ek(C)},uk=IS("CodecUtils"),hk=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},dk=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:n})=>{t[e]=t[e]||[],t[e].push(Hv(`${i}${n}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return uk(`multiple ${e} codecs found as attributes: ${t[e].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},gk=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},pk=function(e,t){const i=t.attributes||{},n=dk(function(e){const t=e.attributes||{};if(t.CODECS)return Pv(t.CODECS)}(t)||[]);if(hk(e,t)&&!n.audio&&!((e,t)=>{if(!hk(e,t))return!0;const i=t.attributes||{},n=e.mediaGroups.AUDIO[i.AUDIO];for(const s in n)if(!n[s].uri&&!n[s].playlists)return!0;return!1})(e,t)){const t=dk(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var n in i){var s=i[n];if(s.default&&s.playlists)return Pv(s.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);t.audio&&(n.audio=t.audio)}return n},fk=IS("PlaylistSelector"),mk=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},Ck=function(e,t){if(!e)return"";const i=lI.getComputedStyle(e);return i?i[t]:""},Ik=function(e,t){const i=e.slice();e.sort((function(e,n){const s=t(e,n);return 0===s?i.indexOf(e)-i.indexOf(n):s}))},vk=function(e,t){let i,n;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||lI.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||lI.Number.MAX_VALUE,i-n};let Bk=function(e,t,i,n,s,r){if(!e)return;const a={bandwidth:t,width:i,height:n,limitRenditionByPlayerDimensions:s};let o=e.playlists;jS.isAudioOnly(e)&&(o=r.getAudioTrackPlaylists_(),a.audioOnly=!0);let l=o.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||lI.Number.MAX_VALUE,{bandwidth:t,width:i,height:n,playlist:e}}));Ik(l,((e,t)=>e.bandwidth-t.bandwidth)),l=l.filter((e=>!jS.isIncompatible(e.playlist)));let A=l.filter((e=>jS.isEnabled(e.playlist)));A.length||(A=l.filter((e=>!jS.isDisabled(e.playlist))));const c=A.filter((e=>e.bandwidth*Rx.BANDWIDTH_VARIANCE<t));let u=c[c.length-1];const h=c.filter((e=>e.bandwidth===u.bandwidth))[0];if(!1===s){const e=h||A[0]||l[0];if(e&&e.playlist){let t="sortedPlaylistReps";return h&&(t="bandwidthBestRep"),A[0]&&(t="enabledPlaylistReps"),fk(`choosing ${mk(e)} using ${t} with options`,a),e.playlist}return fk("could not choose a playlist with options",a),null}const d=c.filter((e=>e.width&&e.height));Ik(d,((e,t)=>e.width-t.width));const g=d.filter((e=>e.width===i&&e.height===n));u=g[g.length-1];const p=g.filter((e=>e.bandwidth===u.bandwidth))[0];let f,m,C,I;if(p||(f=d.filter((e=>e.width>i||e.height>n)),m=f.filter((e=>e.width===f[0].width&&e.height===f[0].height)),u=m[m.length-1],C=m.filter((e=>e.bandwidth===u.bandwidth))[0]),r.leastPixelDiffSelector){const e=d.map((e=>(e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-n),e)));Ik(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),I=e[0]}const v=I||C||p||h||A[0]||l[0];if(v&&v.playlist){let e="sortedPlaylistReps";return I?e="leastPixelDiffRep":C?e="resolutionPlusOneRep":p?e="resolutionBestRep":h?e="bandwidthBestRep":A[0]&&(e="enabledPlaylistReps"),fk(`choosing ${mk(v)} using ${e} with options`,a),v.playlist}return fk("could not choose a playlist with options",a),null};const yk=function(){let e=this.useDevicePixelRatio&&lI.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Bk(this.playlists.main,this.systemBandwidth,parseInt(Ck(this.tech_.el(),"width"),10)*e,parseInt(Ck(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.playlistController_)};function bk(e){try{return new URL(e).pathname.split("/").slice(-2).join("/")}catch(I2){return""}}const Ek=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:n})=>{if(!t)return;const s=lI.WebKitDataCue||lI.VTTCue,r=e.metadataTrack_;if(!r)return;if(t.forEach((e=>{const t=e.cueTime+i;!("number"!=typeof t||lI.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new s(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:()=>(hS.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key)},value:{get:()=>(hS.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data)},privateData:{get:()=>(hS.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data)}})}(i),r.addCue(i)}))})),!r.cues||!r.cues.length)return;const a=r.cues,o=[];for(let c=0;c<a.length;c++)a[c]&&o.push(a[c]);const l=o.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),A=Object.keys(l).sort(((e,t)=>Number(e)-Number(t)));A.forEach(((e,t)=>{const i=l[e],s=isFinite(n)?n:e,r=Number(A[t+1])||s;i.forEach((e=>{e.endTime=r}))}))},wk={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},Qk=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),_k=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,hS.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Sk=function(e,t,i){let n,s;if(i&&i.cues)for(n=i.cues.length;n--;)s=i.cues[n],s.startTime>=e&&s.endTime<=t&&i.removeCue(s)},xk=e=>"number"==typeof e&&isFinite(e),kk=1/60,Dk=e=>{const{startOfSegment:t,duration:i,segment:n,part:s,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:A,timeline:c}=e,u=o.length-1;let h="mediaIndex/partIndex increment";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(h+=` with independent ${e.independent}`);const d="number"==typeof A,g=e.segment.uri?"segment":"pre-segment",p=d?MS({preloadSegment:n})-1:0;return`${g} [${r+l}/${r+u}]`+(d?` part [${A}/${p}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(d?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${t}] duration [${i}] timeline [${c}] selected by [${h}] playlist [${a}]`},Fk=e=>`${e}TimingInfo`,Tk=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:n,audioDisabled:s})=>{if(t===i)return!1;if("audio"===n){const t=e.lastTimelineChange({type:"main"});return!t||t.to!==i}if("main"===n&&s){const t=e.pendingTimelineChange({type:"audio"});return!t||t.to!==i}return!1},Mk=e=>{const t=e.pendingSegment_;if(!t)return;if(Tk({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:"audio"}),i=e.pendingTimelineChange({type:"main"}),n=t&&i,s=n&&t.to!==i.to;return!(!n||-1===t.from||-1===i.from||!s)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=e.timelineChangeController_.pendingTimelineChange({type:"main"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger("audioTimelineBehind");e.timelineChangeController_.trigger("fixBadTimelineChange")}},Rk=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+yS,Nk=(e,t)=>{if("hls"!==t)return null;const i=(e=>{let t=0;return["video","audio"].forEach((function(i){const n=e[`${i}TimingInfo`];if(!n)return;const{start:s,end:r}=n;let a;"bigint"==typeof s||"bigint"==typeof r?a=lI.BigInt(r)-lI.BigInt(s):"number"==typeof s&&"number"==typeof r&&(a=r-s),void 0!==a&&a>t&&(t=a)})),"bigint"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const n=e.playlist.targetDuration,s=Rk({segmentDuration:i,maxDuration:2*n}),r=Rk({segmentDuration:i,maxDuration:n}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${n}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return s||r?{severity:s?"warn":"info",message:a}:null},Lk=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),n=Boolean(t.map&&!t.map.bytes),s=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:s,duration:t.duration,isEncrypted:i,isMediaInitialization:n}};class Uk extends hS.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=IS(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Mk(this)})),this.sourceUpdater_.on("codecschange",(e=>{this.trigger(fI({type:"codecschange"},e))})),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Mk(this)})),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",(e=>{this.trigger(fI({type:"timelinechange"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():Mk(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Mk(this)}))}
/**
   * TODO: Current sync controller consists of many hls-specific strategies
   * media sequence sync is also hls-specific, and we would like to be protocol-agnostic on this level
   * this should be a part of the sync-controller and sync controller should expect different strategy list based on the protocol.
   *
   * @return {MediaSequenceSync|null}
   * @private
   */get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return jx({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}
/**
   * reset all of our media stats
   *
   * @private
   */resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}
/**
   * dispose of the SegmentLoader and reset to the default state
   */dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&lI.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}
/**
   * abort anything that is currently doing on with the SegmentLoader
   * and reset to a default state
   */abort(){if("WAITING"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}
/**
   * abort all pending xhr requests and null any pending segements
   *
   * @private
   */abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,lI.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}
/**
   * set an error on the segment loader and null out any pending segements
   *
   * @param {Error} error the error to set on the SegmentLoader
   * @return {Error} the error that was set or that is currently set
   */error(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Wx(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}
/**
   * Indicates which time ranges are buffered
   *
   * @return {TimeRange}
   *         TimeRange object representing the current buffered ranges
   */buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return BS();if("main"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:n}=e;if(i&&t&&!this.audioDisabled_&&!n)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}
/**
   * Gets and sets init segment for the provided map
   *
   * @param {Object} map
   *        The map object representing the init segment to get or set
   * @param {boolean=} set
   *        If true, the init segment for the provided map should be saved
   * @return {Object}
   *         map object for desired init segment
   */initSegmentForMap(e,t=!1){if(!e)return null;const i=vx(e);let n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e}
/**
   * Gets and sets key for the provided key
   *
   * @param {Object} key
   *        The key object representing the key to get or set
   * @param {boolean=} set
   *        If true, the key for the provided key should be saved
   * @return {Object}
   *         Key object for desired key
   */segmentKey(e,t=!1){if(!e)return null;const i=Bx(e);let n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});const s={resolvedUri:(n||e).resolvedUri};return n&&(s.bytes=n.bytes),s}
/**
   * Returns true if all configuration required for loading is present, otherwise false.
   *
   * @return {boolean} True if the all configuration is ready for loading
   * @private
   */couldBeginLoading_(){return this.playlist_&&!this.paused()}
/**
   * load a playlist and start to fill the buffer
   */load(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))}
/**
   * Once all the starting parameters have been specified, begin
   * operation. This method should only be invoked from the INIT
   * state.
   *
   * @private
   */init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}
/**
   * set a playlist on the segment loader
   *
   * @param {PlaylistLoader} media the playlist to set on the segment loader
   */playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let s=null;if(i&&(i.id?s=i.id:i.uri&&(s=i.uri)),this.logger_(`playlist update [${s} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\ncurrentTime: ${this.currentTime_()}\nbufferedEnd: ${xS(this.buffered_())}\n`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){!e.endList&&"number"==typeof e.partTargetDuration?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger("playlistupdate")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}n&&(n.mediaIndex-=r,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex]),n.partIndex>=0&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}
/**
   * Prevent the loader from fetching additional segments. If there
   * is a segment request outstanding, it will finish processing
   * before the loader halts. A segment loader can be unpaused by
   * calling load().
   */pause(){this.checkBufferTimeout_&&(lI.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}
/**
   * Returns whether the segment loader is fetching additional
   * segments when given the opportunity. This property can be
   * modified through calls to pause() and load().
   */paused(){return null===this.checkBufferTimeout_}
/**
   * Delete all the buffered data and reset the SegmentLoader
   *
   * @param {Function} [done] an optional callback to be executed when the remove
   * operation is complete
   */resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}
/**
   * Force the SegmentLoader to resync and start loading around the currentTime instead
   * of starting at the end of the buffer
   *
   * Useful for fast quality changes
   */resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}
/**
   * Force the SegmentLoader to restart synchronization and make a conservative guess
   * before returning to the simple walk-forward method
   */resyncLoader(){this.transmuxer_&&Wx(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;"hls"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}
/**
   * Remove any data in the source buffer between start and end times
   *
   * @param {number} start - the start time of the region to remove from the buffer
   * @param {number} end - the end time of the region to remove from the buffer
   * @param {Function} [done] - an optional callback to be executed when the remove
   * @param {boolean} force - force all remove operations to happen
   * operation is complete
   */remove(e,t,i=()=>{},n=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_("skipping remove because end ${end} is <= start ${start}");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_("skipping remove because no source updater or starting media info");let s=1;const r=()=>{s--,0===s&&i()};!n&&this.audioDisabled_||(s++,this.sourceUpdater_.removeAudio(e,t,r)),(n||"main"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,n)=>{const s=Math.ceil((t-n)*Xy),r=Math.ceil((i-n)*Xy),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=s););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),s++,this.sourceUpdater_.removeVideo(e,t,r));for(const a in this.inbandTextTracks_)Sk(e,t,this.inbandTextTracks_[a]);Sk(e,t,this.segmentMetadataTrack_),r()}
/**
   * (re-)schedule monitorBufferTick_ to run as soon as possible
   *
   * @private
   */monitorBuffer_(){this.checkBufferTimeout_&&lI.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=lI.setTimeout(this.monitorBufferTick_.bind(this),1)}
/**
   * As long as the SegmentLoader is in the READY state, periodically
   * invoke fillBuffer_().
   *
   * @private
   */monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&lI.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=lI.setTimeout(this.monitorBufferTick_.bind(this),500)}
/**
   * fill the buffer with segements unless the sourceBuffers are
   * currently updating
   *
   * Note: this function should only ever be called by monitorBuffer_
   * and never directly
   *
   * @private
   */fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Lk({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:t}),"number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}
/**
   * Determines if we should call endOfStream on the media source based
   * on the state of the buffer or if appened segment was the final
   * segment in the playlist.
   *
   * @param {number} [mediaIndex] the media index of segment we last appended
   * @param {Object} [playlist] a media playlist object
   * @return {boolean} do we need to call endOfStream on the MediaSource
   */isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const n="number"==typeof e&&t.segments[e],s=e+1===t.segments.length,r=!n||!n.parts||i+1===n.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&s&&r}
/**
   * Determines what request should be made given current segment loader state.
   *
   * @return {Object} a request object that describes the segment/part to load
   */chooseNextRequest_(){const e=this.buffered_(),t=xS(e)||0,i=kS(e,this.currentTime_()),n=!this.hasPlayed_()&&i>=1,s=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||n||s)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const n=[];let s=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(n.push(r),s+=a.duration,s>i))return r}return 0===n.length?0:n[n.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i="number"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,n;const s=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\nFor TargetTime: ${s}.\nCurrentTime: ${this.currentTime_()}\nBufferedEnd: ${t}\nFetch At Buffer: ${this.fetchAtBuffer_}\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(s);if(!t){const e="No sync info found while using media sequence sync";return this.error({message:e,metadata:{errorType:hS.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,n=t.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const t=jS.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:s,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,n=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${s}`:`currentTime ${s}`,a.mediaIndex=e,a.startOfSegment=n,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&"number"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||"number"==typeof a.partIndex&&!l)return null;"number"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const A=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!A&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent="previous segment")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");const c=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&c&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const n=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return n?(n.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),n):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:n,startOfSegment:s,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,A=i.segments[n],c="number"==typeof a&&A.parts[a],u={requestId:"segment-loader-"+Math.random(),
// resolve the segment URL relative to the playlist
uri:c&&c.resolvedUri||A.resolvedUri,
// the segment's mediaIndex at the time it was requested
mediaIndex:n,partIndex:c?a:null,
// whether or not to update the SegmentLoader's state with this
// segment's mediaIndex
isSyncRequest:r,startOfSegment:s,
// the segment's playlist
playlist:i,
// unencrypted bytes of the segment
bytes:null,
// when a key is defined for this segment, the encrypted bytes
encryptedBytes:null,
// The target timestampOffset for this segment when we append it
// to the source buffer
timestampOffset:null,
// The timeline that the segment is in
timeline:A.timeline,
// The expected duration of the segment in seconds
duration:c&&c.duration||A.duration,
// retain the segment in case the playlist updates while doing an async process
segment:A,part:c,byteLength:0,transmuxer:this.transmuxer_,
// type of getMediaInfoForTime that was used to get this segment
getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;u.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:A.timeline,currentTimeline:this.currentTimeline_,startOfSegment:s,buffered:this.buffered_(),overrideCheck:h});const d=xS(this.sourceUpdater_.audioBuffered());return"number"==typeof d&&(u.audioAppendStart=d-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(u.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const n=Math.ceil((t-i+3)*Xy);let s;for(s=0;s<e.length&&!(e[s].pts>n);s++);return e.slice(s)})(this.gopBuffer_,
// since the transmuxer is using the actual timing values, but the time is
// adjusted by the timestmap offset, we must adjust the value here
this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),u}
// get the timestampoffset for a segment,
// added so that vtt segment loader can override and prevent
// adding timestamp offsets.
timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:n,overrideCheck:s})=>s||e!==t?e<t?i:n.length?n.end(n.length-1):i:null)(e)}
/**
   * Determines if the network has enough bandwidth to complete the current segment
   * request in a timely manner. If not, the request will be aborted early and bandwidth
   * updated to trigger a playlist switch.
   *
   * @param {Object} stats
   *        Object containing stats about the request timing and size
   * @private
   */earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||// Don't abort if the current playlist is on the lowestEnabledRendition
// TODO: Replace using timeout with a boolean indicating whether this playlist is
//       the lowestEnabledRendition.
!this.xhrOptions_.timeout||// Don't abort if we have no bandwidth information to estimate segment sizes
!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,s=jS.estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(s<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:n,duration:s,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,A=t.playlists.filter((e=>!jS.isIncompatible(e)));let c=A.filter(jS.isEnabled);c.length||(c=A.filter((e=>!jS.isDisabled(e))));const u=c.filter(jS.hasAttribute.bind(null,"BANDWIDTH")).map((e=>{const t=l.getSyncPoint(e,s,o,i)?1:2;return{playlist:e,rebufferingImpact:jS.estimateSegmentRequestTime(r,n,e)*t-a}})),h=u.filter((e=>e.rebufferingImpact<=0));return Ik(h,((e,t)=>vk(t.playlist,e.playlist))),h.length?h[0]:(Ik(u,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),u[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=s-r-a.rebufferingImpact;let l=.5;r<=yS&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Rx.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Dk(e)}`),this.mediaRequestsAborted+=1}
/**
   * XHR `progress` event handler
   *
   * @param {Event}
   *        The XHR `progress` event
   * @param {Object} simpleSegment
   *        A simplified segment object copy
   * @private
   */handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:n}=t,s={segmentInfo:Lk({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:n}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:s}),this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),n=Object.keys(t).sort();if(i.length!==n.length)return!1;for(let s=0;s<i.length;s++){const r=i[s];if(r!==n[s])return!1;if(e[r]!==t[r])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():Mk(this)))}handleTimingInfo_(e,t,i,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const s=this.pendingSegment_,r=Fk(t);s[r]=s[r]||{},s[r][i]=n,this.logger_(`timinginfo: ${t} - ${i} - ${n}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Mk(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_("SegmentLoader received no captions from a caption event");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),n={};t.forEach((e=>{n[e.stream]=n[e.stream]||{
// Infinity, as any other value will be less than this
startTime:1/0,captions:[],
// 0 as an other value will be more than this
endTime:0};const t=n[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(n).forEach((e=>{const{startTime:t,endTime:s,captions:r}=n[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${s} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:"usage",name:"vhs-608"});let n=i;/^cc708_/.test(i)&&(n="SERVICE"+i.split("_")[1]);const s=t.textTracks().getTrackById(n);if(s)e[i]=s;else{let s=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[n];o&&(s=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:"captions",id:n,
// TODO: investigate why this doesn't seem to turn the caption on by default
default:a,label:s,language:r},!1).track}}}(a,this.vhs_.tech_,e),Sk(t,s,a[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const n=lI.WebKitDataCue||lI.VTTCue;t.forEach((t=>{const s=t.stream;t.content?t.content.forEach((r=>{const a=new n(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align="left",a.position=r.position,a.positionAlign="line-left",e[s].addCue(a)})):e[s].addCue(new n(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:r,inbandTextTracks:a,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}
/**
   * Determines whether the loader has enough info to load the next segment.
   *
   * @return {boolean}
   *         Whether or not the loader has enough info to load the next segment
   */hasEnoughInfoToLoad_(){if("audio"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||
// Technically, instead of waiting to load a segment on timeline changes, a segment
// can be requested and downloaded and only wait before it is transmuxed or parsed.
// But in practice, there are a few reasons why it is better to wait until a loader
// is ready to append that segment before requesting and downloading:
// 1. Because audio and main loaders cross discontinuities together, if this loader
//    is waiting for the other to catch up, then instead of requesting another
//    segment and using up more bandwidth, by not yet loading, more bandwidth is
//    allotted to the loader currently behind.
// 2. media-segment-request doesn't have to have logic to consider whether a segment
// is ready to be processed or not, isolating the queueing behavior to the loader.
// 3. The audio loader bases some of its segment properties on timing information
//    provided by the main loader, meaning that, if the logic for waiting on
//    processing was in media-segment-request, then it would also need to know how
//    to re-generate the segment information after the main loader caught up.
!Tk({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:n,isMuxed:s}=t;return!(n&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!s&&!e.audioTimingInfo)&&!Tk({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return Mk(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[Fk(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&e&&e.hasVideo;let n;t&&(n=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:n,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:n}){if(i){const e=vx(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=n,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},n){const s=this.sourceUpdater_.audioBuffered(),r=this.sourceUpdater_.videoBuffered();s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+SS(s).join(", ")),r.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+SS(r).join(", "));const a=s.length?s.start(0):0,o=s.length?s.end(s.length-1):0,l=r.length?r.start(0):0,A=r.length?r.end(r.length-1):0;if(o-a<=1&&A-l<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${SS(s).join(", ")}, video buffer: ${SS(r).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const c=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${c}`),this.remove(0,c,(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=lI.setTimeout((()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},n){n&&(22!==n.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",n),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:hS.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:n,bytes:s}){if(!s){const e=[n];let t=n.byteLength;i&&(e.unshift(i),t+=i.byteLength),s=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Lk({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:s},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:s}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const n=this.pendingSegment_.segment,s=`${e}TimingInfo`;n[s]||(n[s]={}),n[s].transmuxerPrependedSeconds=i.prependedContentDuration||0,n[s].transmuxedPresentationStart=i.start.presentation,n[s].transmuxedDecodeStart=i.start.decode,n[s].transmuxedPresentationEnd=i.end.presentation,n[s].transmuxedDecodeEnd=i.end.decode,n[s].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:n}=t;if(!n||!n.byteLength)return;if("audio"===i&&this.audioDisabled_)return;const s=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:s,data:n})}
/**
   * load a specific segment from a request into the buffer
   *
   * @private
   */loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_())return Mk(this),void this.loadQueue_.push((()=>{const t=fI({},e,{forceTimestampOffset:!0});fI(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),n=null!==this.mediaIndex,s=e.timeline!==this.currentTimeline_&&// currentTimeline starts at -1, so we shouldn't end the timeline switching to 0,
// the first timeline
e.timeline>0,r=i||n&&s;this.logger_(`Requesting\n${bk(e.uri)}\n${Dk(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=ck({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:n})=>{this.logger_(`${Dk(e)} logged from transmuxer stream ${n} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:n,timingInfo:s})=>{const r={segmentInfo:Lk({segment:t})};i&&(r.keyInfo=i),n&&(r.trackInfo=n),s&&(r.timingInfo=s),this.trigger({type:e,metadata:r})}})}
/**
   * trim the back buffer so that we don't have too much data
   * in the source buffer
   *
   * @private
   *
   * @param {Object} segmentInfo - the current segment
   */trimBackBuffer_(e){const t=((e,t,i)=>{let n=t-Rx.BACK_BUFFER_LENGTH;e.length&&(n=Math.max(n,e.start(0)));const s=t-i;return Math.min(s,n)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}
/**
   * created a simplified copy of the segment object with just the
   * information necessary to perform the XHR and decryption
   *
   * @private
   *
   * @param {Object} segmentInfo - the current segment
   * @return {Object} a simplified segment object copy
   */createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,n=e.segment.key||e.segment.map&&e.segment.map.key,s=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:n,isMediaInitialization:s},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<kk)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}
/**
   * Handle the callback from the segmentRequest function and set the
   * associated SegmentLoader state and errors if necessary
   *
   * @private
   */segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===$x)return;return this.pause(),e.code===Xx?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}const n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),n.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const n=t[0].pts;let s=0;for(;s<e.length&&!(e[s].pts>=n);s++);return e.slice(0,s).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(n)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:n,currentVideoTimestampOffset:s,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===n+s?a.start:n}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),void this.trigger("error");const{hasAudio:i,hasVideo:n,isMuxed:s}=t,r="main"===this.loaderType_&&n,a=!this.audioDisabled_&&i&&!s;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>"main"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||// we don't yet have the start for whatever media type (video or audio) has
// priority, timing-wise, so we must wait
"number"!=typeof e.timingInfo.start||// already updated the timestamp offset for this segment
e.changedTimestampOffset||// the alt audio loader should not be responsible for setting the timestamp offset
"main"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&"number"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end="number"==typeof i.end?
// End time may not exist in a case where we aren't parsing the full segment (one
// current example is the case of fmp4), so use the rough duration to calculate an
// end time.
i.end:i.start+e.duration)}
/**
   * callback to run when appendBuffer is finished. detects if we are
   * in a good state to do things with the data we got, or if we need
   * to wait for more
   *
   * @private
   */handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Lk({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:e})}if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});const t=Nk(e,this.sourceType_);if(t&&("warn"===t.severity?hS.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Dk(e)}`);this.logger_(`Appended ${Dk(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const i=e.segment,n=e.part,s=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=n&&n.end&&this.currentTime_()-n.end>3*e.playlist.partTargetDuration;if(s||r)return this.logger_(`bad ${s?"segment":"part"} ${Dk(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}
/**
   * Records the current throughput of the decrypt, transmux, and append
   * portion of the semgment pipeline. `throughput.rate` is a the cumulative
   * moving average of the throughput. `throughput.count` is the number of
   * data points in the average.
   *
   * @private
   * @param {Object} segmentInfo the object returned by loadSegment
   */recordThroughput_(e){if(e.duration<kk)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}
/**
   * Adds a cue to the segment-metadata track with some metadata information about the
   * segment
   *
   * @private
   * @param {Object} segmentInfo
   *        the object returned by loadSegment
   * @method addSegmentMetadataCue_
   */addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,n=t.end;if(!xk(i)||!xk(n))return;Sk(i,n,this.segmentMetadataTrack_);const s=lI.WebKitDataCue||lI.VTTCue,r={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:n},a=new s(i,n,JSON.stringify(r));a.value=r,this.segmentMetadataTrack_.addCue(a)}}function Hk(){}const Pk=function(e){return"string"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Ok=["video","audio"],Gk=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},Kk=(e,t)=>{if(0===t.queue.length)return;let i=0,n=t.queue[i];if("mediaSource"!==n.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!Gk(e,t)){if(n.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const n=t[i];if("mediaSource"===n.type)return null;if(n.type===e)return i}return null})(e,t.queue),null===i)return;n=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=n,n.action(e,t),n.doneFn?void 0:(t.queuePending[e]=null,void Kk(e,t))}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),n.action(t),n.doneFn&&n.doneFn(),Kk("audio",t),Kk("video",t))},qk=(e,t)=>{const i=t[`${e}Buffer`],n=Pk(e);i&&(i.removeEventListener("updateend",t[`on${n}UpdateEnd_`]),i.removeEventListener("error",t[`on${n}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},Yk=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),Vk=(e,t,i)=>(n,s)=>{const r=s[`${n}Buffer`];if(Yk(s.mediaSource,r)){s.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${n}Buffer`);try{r.appendBuffer(e)}catch(I2){s.logger_(`Error with code ${I2.code} `+(22===I2.code?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${t.mediaIndex} to ${n}Buffer`),s.queuePending[n]=null,i(I2)}}},Wk=(e,t)=>(i,n)=>{const s=n[`${i}Buffer`];if(Yk(n.mediaSource,s)){n.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{s.remove(e,t)}catch(I2){n.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},jk=e=>(t,i)=>{const n=i[`${t}Buffer`];Yk(i.mediaSource,n)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),n.timestampOffset=e)},Jk=e=>(t,i)=>{e()},zk=e=>t=>{if("open"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||""})`);try{t.mediaSource.endOfStream(e)}catch(I2){hS.log.warn("Failed to call media source endOfStream",I2)}}},Xk=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(I2){hS.log.warn("Failed to set media source duration",I2)}},$k=()=>(e,t)=>{if("open"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(Yk(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(I2){hS.log.warn(`Failed to abort on ${e}Buffer`,I2)}}},Zk=(e,t)=>i=>{const n=Pk(e),s=Gv(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(s);r.addEventListener("updateend",i[`on${n}UpdateEnd_`]),r.addEventListener("error",i[`on${n}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},eD=e=>t=>{const i=t[`${e}Buffer`];if(qk(e,t),Yk(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(I2){hS.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,I2)}}},tD=e=>(t,i)=>{const n=i[`${t}Buffer`],s=Gv(e);if(!Yk(i.mediaSource,n))return;const r=e.substring(0,e.indexOf(".")),a=i.codecs[t];if(a.substring(0,a.indexOf("."))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:"codecschange",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{n.changeType(s),i.codecs[t]=e}catch(I2){o.errorType=hS.Error.StreamingCodecsChangeError,o.error=I2,I2.metadata=o,i.error_=I2,i.trigger("error"),hS.log.warn(`Failed to changeType on ${t}Buffer`,I2)}},iD=({type:e,sourceUpdater:t,action:i,doneFn:n,name:s})=>{t.queue.push({type:e,action:i,doneFn:n,name:s}),Kk(e,t)},nD=(e,t)=>i=>{const n=function(e){if(0===e.length)return"Buffered Ranges are empty";let t="Buffered Ranges: \n";for(let i=0;i<e.length;i++){const n=e.start(i),s=e.end(i);t+=`${n} --\x3e ${s}. Duration (${s-n})\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received "updateend" event for ${e} Source Buffer: `,n),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}Kk(e,t)};class sD extends hS.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Kk("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=IS("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=nD("video",this),this.onAudioUpdateEnd_=nD("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}
/**
   * Add a type of source buffer to the media source.
   *
   * @param {string} type
   *        The type of source buffer to add.
   *
   * @param {string} codec
   *        The codec to add the source buffer with.
   */addSourceBuffer(e,t){iD({type:"mediaSource",sourceUpdater:this,action:Zk(e,t),name:"addSourceBuffer"})}
/**
   * call abort on a source buffer.
   *
   * @param {string} type
   *        The type of source buffer to call abort on.
   */abort(e){iD({type:e,sourceUpdater:this,action:$k(e),name:"abort"})}
/**
   * Call removeSourceBuffer and remove a specific type
   * of source buffer on the mediaSource.
   *
   * @param {string} type
   *        The type of source buffer to remove.
   */removeSourceBuffer(e){this.canRemoveSourceBuffer()?iD({type:"mediaSource",sourceUpdater:this,action:eD(e),name:"removeSourceBuffer"}):hS.log.error("removeSourceBuffer is not supported!")}
/**
   * Whether or not the removeSourceBuffer function is supported
   * on the mediaSource.
   *
   * @return {boolean}
   *          if removeSourceBuffer can be called.
   */canRemoveSourceBuffer(){return!hS.browser.IS_FIREFOX&&lI.MediaSource&&lI.MediaSource.prototype&&"function"==typeof lI.MediaSource.prototype.removeSourceBuffer}
/**
   * Whether or not the changeType function is supported
   * on our SourceBuffers.
   *
   * @return {boolean}
   *         if changeType can be called.
   */static canChangeType(){return lI.SourceBuffer&&lI.SourceBuffer.prototype&&"function"==typeof lI.SourceBuffer.prototype.changeType}
/**
   * Whether or not the changeType function is supported
   * on our SourceBuffers.
   *
   * @return {boolean}
   *         if changeType can be called.
   */canChangeType(){return this.constructor.canChangeType()}
/**
   * Call the changeType function on a source buffer, given the code and type.
   *
   * @param {string} type
   *        The type of source buffer to call changeType on.
   *
   * @param {string} codec
   *        The codec string to change type with on the source buffer.
   */changeType(e,t){this.canChangeType()?iD({type:e,sourceUpdater:this,action:tD(t),name:"changeType"}):hS.log.error("changeType is not supported!")}
/**
   * Add source buffers with a codec or, if they are already created,
   * call changeType on source buffers using changeType.
   *
   * @param {Object} codecs
   *        Codecs to switch to
   */addOrChangeSourceBuffers(e){if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}
/**
   * Queue an update to append an ArrayBuffer.
   *
   * @param {MediaObject} object containing audioBytes and/or videoBytes
   * @param {Function} done the function to call when done
   * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data
   */appendBuffer(e,t){const{segmentInfo:i,type:n,bytes:s}=e;if(this.processedAppend_=!0,"audio"===n&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${s.length} until video append`);if(iD({type:n,sourceUpdater:this,action:Vk(s,i||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===n){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}
/**
   * Get the audio buffer's buffered timerange.
   *
   * @return {TimeRange}
   *         The audio buffer's buffered time range
   */audioBuffered(){return Yk(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:BS()}
/**
   * Get the video buffer's buffered timerange.
   *
   * @return {TimeRange}
   *         The video buffer's buffered time range
   */videoBuffered(){return Yk(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:BS()}
/**
   * Get a combined video/audio buffer's buffered timerange.
   *
   * @return {TimeRange}
   *         the combined time range
   */buffered(){const e=Yk(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Yk(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,n=null,s=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return BS();let o=e.length;for(;o--;)r.push({time:e.start(o),type:"start"}),r.push({time:e.end(o),type:"end"});for(o=t.length;o--;)r.push({time:t.start(o),type:"start"}),r.push({time:t.end(o),type:"end"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)"start"===r[o].type?(s++,2===s&&(i=r[o].time)):"end"===r[o].type&&(s--,1===s&&(n=r[o].time)),null!==i&&null!==n&&(a.push([i,n]),i=null,n=null);return BS(a)}(this.audioBuffered(),this.videoBuffered())}
/**
   * Add a callback to the queue that will set duration on the mediaSource.
   *
   * @param {number} duration
   *        The duration to set
   *
   * @param {Function} [doneFn]
   *        function to run after duration has been set.
   */setDuration(e,t=Hk){iD({type:"mediaSource",sourceUpdater:this,action:Xk(e),name:"duration",doneFn:t})}
/**
   * Add a mediaSource endOfStream call to the queue
   *
   * @param {Error} [error]
   *        Call endOfStream with an error
   *
   * @param {Function} [doneFn]
   *        A function that should be called when the
   *        endOfStream call has finished.
   */endOfStream(e=null,t=Hk){"string"!=typeof e&&(e=void 0),iD({type:"mediaSource",sourceUpdater:this,action:zk(e),name:"endOfStream",doneFn:t})}
/**
   * Queue an update to remove a time range from the buffer.
   *
   * @param {number} start where to start the removal
   * @param {number} end where to end the removal
   * @param {Function} [done=noop] optional callback to be executed when the remove
   * operation is complete
   * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end
   */removeAudio(e,t,i=Hk){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?iD({type:"audio",sourceUpdater:this,action:Wk(e,t),doneFn:i,name:"remove"}):i()}
/**
   * Queue an update to remove a time range from the buffer.
   *
   * @param {number} start where to start the removal
   * @param {number} end where to end the removal
   * @param {Function} [done=noop] optional callback to be executed when the remove
   * operation is complete
   * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end
   */removeVideo(e,t,i=Hk){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?iD({type:"video",sourceUpdater:this,action:Wk(e,t),doneFn:i,name:"remove"}):i()}
/**
   * Whether the underlying sourceBuffer is updating or not
   *
   * @return {boolean} the updating status of the SourceBuffer
   */updating(){return!(!Gk("audio",this)&&!Gk("video",this))}
/**
   * Set/get the timestampoffset on the audio SourceBuffer
   *
   * @return {number} the timestamp offset
   */audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&// no point in updating if it's the same
this.audioTimestampOffset_!==e&&(iD({type:"audio",sourceUpdater:this,action:jk(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}
/**
   * Set/get the timestampoffset on the video SourceBuffer
   *
   * @return {number} the timestamp offset
   */videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&// no point in updating if it's the same
this.videoTimestampOffset_!==e&&(iD({type:"video",sourceUpdater:this,action:jk(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}
/**
   * Add a function to the queue that will be called
   * when it is its turn to run in the audio queue.
   *
   * @param {Function} callback
   *        The callback to queue.
   */audioQueueCallback(e){this.audioBuffer&&iD({type:"audio",sourceUpdater:this,action:Jk(e),name:"callback"})}
/**
   * Add a function to the queue that will be called
   * when it is its turn to run in the video queue.
   *
   * @param {Function} callback
   *        The callback to queue.
   */videoQueueCallback(e){this.videoBuffer&&iD({type:"video",sourceUpdater:this,action:Jk(e),name:"callback"})}
/**
   * dispose of the source updater and the underlying sourceBuffer
   */dispose(){this.trigger("dispose"),Ok.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>qk(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const rD=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),aD=new Uint8Array("\n\n".split("").map((e=>e.charCodeAt(0))));class oD extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class lD extends Uk{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}
/**
   * Indicates which time ranges are buffered
   *
   * @return {TimeRange}
   *         TimeRange object representing the current buffered ranges
   */buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return BS();const e=this.subtitlesTrack_.cues;return BS([[e[0].startTime,e[e.length-1].startTime]])}
/**
   * Gets and sets init segment for the provided map
   *
   * @param {Object} map
   *        The map object representing the init segment to get or set
   * @param {boolean=} set
   *        If true, the init segment for the provided map should be saved
   * @return {Object}
   *         map object for desired init segment
   */initSegmentForMap(e,t=!1){if(!e)return null;const i=vx(e);let n=this.initSegments_[i];if(t&&!n&&e.bytes){const t=aD.byteLength+e.bytes.byteLength,s=new Uint8Array(t);s.set(e.bytes),s.set(aD,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:s}}return n||e}
/**
   * Returns true if all configuration required for loading is present, otherwise false.
   *
   * @return {boolean} True if the all configuration is ready for loading
   * @private
   */couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}
/**
   * Once all the starting parameters have been specified, begin
   * operation. This method should only be invoked from the INIT
   * state.
   *
   * @private
   */init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}
/**
   * Set a subtitle track on the segment loader to add subtitles to
   *
   * @param {TextTrack=} track
   *        The text track to add loaded subtitles to
   * @return {TextTrack}
   *        Returns the subtitles track
   */track(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}
/**
   * Remove any data in the source buffer between start and end times
   *
   * @param {number} start - the start time of the region to remove from the buffer
   * @param {number} end - the end time of the region to remove from the buffer
   */remove(e,t){Sk(e,t,this.subtitlesTrack_)}
/**
   * fill the buffer with segements unless the sourceBuffers are
   * currently updating
   *
   * Note: this function should only ever be called by monitorBuffer_
   * and never directly
   *
   * @private
   */fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};return this.syncController_.one("timestampoffset",e),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}
// never set a timestamp offset for vtt segments.
timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}
/**
   * Prevents the segment loader from requesting segments we know contain no subtitles
   * by walking forward until we find the next segment that we don't know whether it is
   * empty or not.
   *
   * @param {Object} segmentInfo
   *        a segment info object that describes the current segment
   * @return {Object}
   *         a segment info object that describes the current segment
   */skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}
/**
   * append a decrypted segement to the SourceBuffer through a SourceUpdater
   *
   * @private
   */segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state="READY");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Xx&&this.handleTimeout_(),e.code===$x?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const n=this.pendingSegment_,s=i.mp4VttCues&&i.mp4VttCues.length;s&&(n.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(n.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const r=n.segment;if(r.map&&(r.map.bytes=t.map.bytes),n.bytes=t.bytes,"function"!=typeof lI.WebVTT&&"function"==typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:"Error loading vtt.js"})));r.requested=!0;try{this.parseVTTCues_(n)}catch(I2){return void this.stopForError({message:I2.message,metadata:{errorType:hS.Error.StreamingVttParserError,error:I2}})}if(s||this.updateTimeMapping_(n,this.syncController_.timelines[n.timeline],this.playlist_),n.cues.length?n.timingInfo={start:n.cues[0].startTime,end:n.cues[n.cues.length-1].endTime}:n.timingInfo={start:n.startOfSegment,end:n.startOfSegment+n.duration},n.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");n.byteLength=n.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,n.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new lI.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let n=t.length-1;n>=0;n--){const s=t[n],r=`${s.startTime}-${s.endTime}-${s.text}`;i[r]?e.removeCue(s):i[r]=s}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&"vtt"===e.type,n=t&&"text"===t.type;i&&n&&super.handleData_(e,t)}updateTimingInfoEnd_(){}
/**
   * Utility function for converting mp4 webvtt cue objects into VTTCues.
   *
   * @param {Object} segmentInfo with mp4 webvtt cues for parsing into VTTCue objecs
   */parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const n=i.start+t,s=i.end+t,r=new lI.VTTCue(n,s,i.cueText);i.settings&&i.settings.split(" ").forEach((e=>{const t=e.split(":"),i=t[0],n=t[1];r[i]=isNaN(n)?n:Number(n)})),e.cues.push(r)}))}
/**
   * Uses the WebVTT parser to parse the segment response
   *
   * @throws NoVttJsError
   *
   * @param {Object} segmentInfo
   *        a segment info object that describes the current segment
   * @private
   */parseVTTCues_(e){let t,i=!1;if("function"!=typeof lI.WebVTT)throw new oD;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);"function"==typeof lI.TextDecoder?t=new lI.TextDecoder("utf8"):(t=lI.WebVTT.StringDecoder(),i=!0);const n=new lI.WebVTT.Parser(lI,lI.vttjs,t);if(n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=t=>{e.timestampmap=t},n.onparsingerror=e=>{hS.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=rD(t)),n.parse(t)}let s=e.bytes;i&&(s=rD(s)),n.parse(s),n.flush()}
/**
   * Updates the start and end times of any cues parsed by the WebVTT parser using
   * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping
   * from the SyncController
   *
   * @param {Object} segmentInfo
   *        a segment info object that describes the current segment
   * @param {Object} mappingObj
   *        object containing a mapping from TS to media time
   * @param {Object} playlist
   *        the playlist object containing the segment
   * @private
   */updateTimeMapping_(e,t,i){const n=e.segment;if(!t)return;if(!e.cues.length)return void(n.empty=!0);const{MPEGTS:s,LOCAL:r}=e.timestampmap,a=s/Xy-r+t.mapping;if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,n=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(n,0),e.endTime=Math.max(n+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,s-n.duration)}}}
/**
   * MPEG-TS PES timestamps are limited to 2^33.
   * Once they reach 2^33, they roll over to 0.
   * mux.js handles PES timestamp rollover for the following scenarios:
   * [forward rollover(right)] ->
   *    PES timestamps monotonically increase, and once they reach 2^33, they roll over to 0
   * [backward rollover(left)] -->
   *    we seek back to position before rollover.
   *
   * According to the HLS SPEC:
   * When synchronizing WebVTT with PES timestamps, clients SHOULD account
   * for cases where the 33-bit PES timestamps have wrapped and the WebVTT
   * cue times have not.  When the PES timestamp wraps, the WebVTT Segment
   * SHOULD have a X-TIMESTAMP-MAP header that maps the current WebVTT
   * time to the new (low valued) PES timestamp.
   *
   * So we want to handle rollover here and align VTT Cue start/end time to the player's time.
   */handleRollover_(e,t){if(null===t)return e;let i=e*Xy;const n=t*Xy;let s;for(s=n<i?-8589934592:8589934592;Math.abs(i-n)>4294967296;)i+=s;return i/Xy}}const AD=function(e,t){const i=e.cues;for(let n=0;n<i.length;n++){const e=i[n];if(t>=e.adStartTime&&t<=e.adEndTime)return e}return null};class cD{
/**
   * @param {number} start - media sequence start
   * @param {number} end - media sequence end
   * @param {number} segmentIndex - index for associated segment
   * @param {number|null} [partIndex] - index for associated part
   * @param {boolean} [appended] - appended indicator
   *
   */
constructor({start:e,end:t,segmentIndex:i,partIndex:n=null,appended:s=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=n,this.appended_=s}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class uD{
/**
   *
   * @param {SyncInfo} segmentSyncInfo - sync info for a given segment
   * @param {Array<SyncInfo>} [partsSyncInfo] - sync infos for a list of parts for a given segment
   */
constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class hD{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}
/**
   * update sync storage
   *
   * @param {Object} playlist
   * @param {number} currentTime
   *
   * @return {void}
   */update(e,t){const{mediaSequence:i,segments:n}=e;if(this.isReliable_=this.isReliablePlaylist_(i,n),this.isReliable_)return this.updateStorage_(n,i,this.calculateBaseTime_(i,n,t))}
/**
   * @param {number} targetTime
   * @return {SyncInfo|null}
   */getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const n of i)if(n.isInRange(e))return n}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const n=new Map;let s="\n",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,A=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),c=new cD({start:o,end:l,appended:A,segmentIndex:t});e.syncInfo=c;let u=r;const h=(e.parts||[]).map(((e,n)=>{const r=u,o=u+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[n]&&i.partsSyncInfo[n].isAppended),A=new cD({start:r,end:o,appended:l,segmentIndex:t,partIndex:n});return u=o,s+=`Media Sequence: ${a}.${n} | Range: ${r} --\x3e ${o} | Appended: ${l}\n`,e.syncInfo=A,A}));n.set(a,new uD(c,h)),s+=`${bk(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\x3e ${l} | Appended: ${A}\n`,a++,r=l})),this.end_=r,this.storage_=n,this.diagnostics_=s}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const n=Math.min(...this.storage_.keys());if(e<n){const i=n-e;let s=this.storage_.get(n).segmentSyncInfo.start;for(let e=0;e<i;e++){s-=t[e].duration}return s}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class dD extends hD{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const gD=[
// Stategy "VOD": Handle the VOD-case where the sync-point is *always*
//                the equivalence display-time 0 === segment-index 0
{name:"VOD",run:(e,t,i,n,s)=>{if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"MediaSequence",
/**
     * run media sequence strategy
     *
     * @param {SyncController} syncController
     * @param {Object} playlist
     * @param {number} duration
     * @param {number} currentTimeline
     * @param {number} currentTime
     * @param {string} type
     */
run:(e,t,i,n,s,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(s);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},
// Stategy "ProgramDateTime": We have a program-date-time tag in this playlist
{name:"ProgramDateTime",run:(e,t,i,n,s)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=FS(t);s=s||0;for(let l=0;l<o.length;l++){const i=o[t.endList||0===s?l:o.length-(l+1)],n=i.segment,A=e.timelineToDatetimeMappings[n.timeline];if(!A||!n.dateTimeObject)continue;let c=n.dateTimeObject.getTime()/1e3+A;if(n.parts&&"number"==typeof i.partIndex)for(let e=0;e<i.partIndex;e++)c+=n.parts[e].duration;const u=Math.abs(s-c);if(null!==a&&(0===u||a<u))break;a=u,r={time:c,segmentIndex:i.segmentIndex,partIndex:i.partIndex}}return r}},
// Stategy "Segment": We have a known time mapping for a timeline and a
//                    segment in the current timeline with timing data
{name:"Segment",run:(e,t,i,n,s)=>{let r=null,a=null;s=s||0;const o=FS(t);for(let l=0;l<o.length;l++){const e=o[t.endList||0===s?l:o.length-(l+1)],i=e.segment,A=e.part&&e.part.start||i&&i.start;if(i.timeline===n&&void 0!==A){const t=Math.abs(s-A);if(null!==a&&a<t)break;(!r||null===a||a>=t)&&(a=t,r={time:A,segmentIndex:e.segmentIndex,partIndex:e.partIndex})}}return r}},
// Stategy "Discontinuity": We have a discontinuity with a known
//                          display-time
{name:"Discontinuity",run:(e,t,i,n,s)=>{let r=null;if(s=s||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let n=0;n<t.discontinuityStarts.length;n++){const a=t.discontinuityStarts[n],o=t.discontinuitySequence+n+1,l=e.discontinuities[o];if(l){const e=Math.abs(s-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},
// Stategy "Playlist": We have a playlist with a known mapping of
//                     segment index to display time
{name:"Playlist",run:(e,t,i,n,s)=>{if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}}return null}}];class pD extends hS.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new hD,i=new dD(t),n=new dD(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:n},this.logger_=IS("SyncController")}
/**
   *
   * @param {string} loaderType
   * @return {MediaSequenceSync|null}
   */getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}
/**
   * Find a sync-point for the playlist specified
   *
   * A sync-point is defined as a known mapping from display-time to
   * a segment-index in the current playlist.
   *
   * @param {Playlist} playlist
   *        The playlist that needs a sync-point
   * @param {number} duration
   *        Duration of the MediaSource (Infinite if playing a live source)
   * @param {number} currentTimeline
   *        The last timeline from which a segment was loaded
   * @param {number} currentTime
   *        Current player's time
   * @param {string} type
   *        Segment loader type
   * @return {Object}
   *          A sync-point object
   */getSyncPoint(e,t,i,n,s){if(t!==1/0){return gD.find((({name:e})=>"VOD"===e)).run(this,e,t)}const r=this.runStrategies_(e,t,i,n,s);if(!r.length)return null;for(const a of r){const{syncPoint:t,strategy:i}=a,{segmentIndex:s,time:r}=t;if(s<0)continue;const o=r,l=o+e.segments[s].duration;if(this.logger_(`Strategy: ${i}. Current time: ${n}. selected segment: ${s}. Time: [${o} -> ${l}]}`),n>=o&&n<l)return this.logger_("Found sync point with exact match: ",t),t}return this.selectSyncPoint_(r,{key:"time",value:n})}
/**
   * Calculate the amount of time that has expired off the playlist during playback
   *
   * @param {Playlist} playlist
   *        Playlist object to calculate expired from
   * @param {number} duration
   *        Duration of the MediaSource (Infinity if playling a live source)
   * @return {number|null}
   *          The amount of time that has expired off the playlist during playback. Null
   *          if no sync-points for the playlist can be found.
   */getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+US({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:n.segmentIndex,endIndex:0}))}
/**
   * Runs each sync-point strategy and returns a list of sync-points returned by the
   * strategies
   *
   * @private
   * @param {Playlist} playlist
   *        The playlist that needs a sync-point
   * @param {number} duration
   *        Duration of the MediaSource (Infinity if playing a live source)
   * @param {number} currentTimeline
   *        The last timeline from which a segment was loaded
   * @param {number} currentTime
   *        Current player's time
   * @param {string} type
   *        Segment loader type
   * @return {Array}
   *          A list of sync-point objects
   */runStrategies_(e,t,i,n,s){const r=[];for(let a=0;a<gD.length;a++){const o=gD[a],l=o.run(this,e,t,i,n,s);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}
/**
   * Selects the sync-point nearest the specified target
   *
   * @private
   * @param {Array} syncPoints
   *        List of sync-points to select from
   * @param {Object} target
   *        Object specifying the property and value we are targeting
   * @param {string} target.key
   *        Specifies the property to target. Must be either 'time' or 'segmentIndex'
   * @param {number} target.value
   *        The value to target for the specified key.
   * @return {Object}
   *          The sync-point nearest the target
   */selectSyncPoint_(e,t){let i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),s=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<n&&(n=a,i=e[r].syncPoint,s=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${s}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+("number"==typeof i.partIndex?`,partIndex:${i.partIndex}`:"")+"]"),i}
/**
   * Save any meta-data present on the segments when segments leave
   * the live window to the playlist to allow for synchronization at the
   * playlist level later.
   *
   * @param {Playlist} oldPlaylist - The previous active playlist
   * @param {Playlist} newPlaylist - The updated and most current playlist
   */saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)hS.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let n=i-1;n>=0;n--){const i=e.segments[n];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}
/**
   * Save the mapping from playlist's ProgramDateTime to display. This should only happen
   * before segments start to load.
   *
   * @param {Playlist} playlist - The currently active playlist
   */setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}
/**
   * Calculates and saves timeline mappings, playlist sync info, and segment timing values
   * based on the latest timing information.
   *
   * @param {Object} options
   *        Options object
   * @param {SegmentInfo} options.segmentInfo
   *        The current active request information
   * @param {boolean} options.shouldSaveTimelineMapping
   *        If there's a timeline change, determines if the timeline mapping should be
   *        saved for timeline mapping and program date time mappings.
   */saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),n=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:n.start}));const s=n.dateTimeObject;n.discontinuity&&t&&s&&(this.timelineToDatetimeMappings[n.timeline]=-s.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}
/**
   * Use the "media time" for a segment to generate a mapping to "display time" and
   * save that display time to the segment.
   *
   * @private
   * @param {SegmentInfo} segmentInfo
   *        The current active request information
   * @param {Object} timingInfo
   *        The start and end time of the current segment in "media time"
   * @param {boolean} shouldSaveTimelineMapping
   *        If there's a timeline change, determines if the timeline mapping should be
   *        saved in timelines.
   * @return {boolean}
   *          Returns false if segment time mapping could not be calculated
   */calculateSegmentTimeMapping_(e,t,i){const n=e.segment,s=e.part;let r,a,o=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return s&&(s.start=r,s.end=a),(!n.start||r<n.start)&&(n.start=r),n.end=a,!0}
/**
   * Each time we have discontinuity in the playlist, attempt to calculate the location
   * in display of the start of the discontinuity and save that. We also save an accuracy
   * value so that we save values with the most accuracy (closest to 0.)
   *
   * @private
   * @param {SegmentInfo} segmentInfo - The current active request information
   */saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let n=0;n<t.discontinuityStarts.length;n++){const s=t.discontinuityStarts[n],r=t.discontinuitySequence+n+1,a=s-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let n;n=a<0?i.start-US({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:s}):i.end+US({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:s}),this.discontinuities[r]={time:n,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class fD extends hS.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return"number"==typeof t&&"number"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if("number"==typeof t&&"number"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const n={timelineChangeInfo:{from:t,to:i}};this.trigger({type:"timelinechange",metadata:n})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const mD=Ux(Hx((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);else for(var s=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,s)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();
/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */let t=null;class i{constructor(e){let i,n,s;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],n=t[4],s=i[4];let r,a,o;const l=[],A=[];let c,u,h,d,g,p;for(r=0;r<256;r++)A[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!n[a];a^=c||1,o=A[o]||1)for(d=o^o<<1^o<<2^o<<3^o<<4,d=d>>8^255&d^99,n[a]=d,s[d]=a,h=l[u=l[c=l[a]]],p=16843009*h^65537*u^257*c^16843008*a,g=257*l[d]^16843008*d,r=0;r<4;r++)t[r][a]=g=g<<24^g>>>8,i[r][d]=p=p<<24^p>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");const A=e.slice(0),c=[];for(this._key=[A,c],i=o;i<4*o+28;i++)s=A[i-1],(i%o==0||8===o&&i%o==4)&&(s=r[s>>>24]<<24^r[s>>16&255]<<16^r[s>>8&255]<<8^r[255&s],i%o==0&&(s=s<<8^s>>>24^l<<24,l=l<<1^283*(l>>7))),A[i]=A[i-o]^s;for(n=0;i;n++,i--)s=A[3&n?i:i-4],c[n]=i<=4||n<4?s:a[0][r[s>>>24]]^a[1][r[s>>16&255]]^a[2][r[s>>8&255]]^a[3][r[255&s]]}
/**
     * Decrypt 16 bytes, specified as four 32-bit words.
     *
     * @param {number} encrypted0 the first word to decrypt
     * @param {number} encrypted1 the second word to decrypt
     * @param {number} encrypted2 the third word to decrypt
     * @param {number} encrypted3 the fourth word to decrypt
     * @param {Int32Array} out the array to write the decrypted words
     * into
     * @param {number} offset the offset into the output array to start
     * writing results
     * @return {Array} The plaintext.
     */decrypt(e,t,i,n,s,r){const a=this._key[1];let o,l,A,c=e^a[0],u=n^a[1],h=i^a[2],d=t^a[3];const g=a.length/4-2;let p,f=4;const m=this._tables[1],C=m[0],I=m[1],v=m[2],B=m[3],y=m[4];for(p=0;p<g;p++)o=C[c>>>24]^I[u>>16&255]^v[h>>8&255]^B[255&d]^a[f],l=C[u>>>24]^I[h>>16&255]^v[d>>8&255]^B[255&c]^a[f+1],A=C[h>>>24]^I[d>>16&255]^v[c>>8&255]^B[255&u]^a[f+2],d=C[d>>>24]^I[c>>16&255]^v[u>>8&255]^B[255&h]^a[f+3],f+=4,c=o,u=l,h=A;for(p=0;p<4;p++)s[(3&-p)+r]=y[c>>>24]<<24^y[u>>16&255]<<16^y[h>>8&255]<<8^y[255&d]^a[f++],o=c,c=u,u=h,h=d,d=o}}class n extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}
/**
     * process an async job
     *
     * @private
     */processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}
/**
     * push a job into the stream
     *
     * @param {Function} job the job to push into the stream
     */push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const s=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class r{constructor(e,t,i,a){const o=r.STEP,l=new Int32Array(e.buffer),A=new Uint8Array(e.byteLength);let c=0;for(this.asyncStream_=new n,this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+o),t,i,A)),c=o;c<l.length;c+=o)i=new Uint32Array([s(l[c-4]),s(l[c-3]),s(l[c-2]),s(l[c-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+o),t,i,A));this.asyncStream_.push((function(){var e;
/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */a(null,(e=A).subarray(0,e.byteLength-e[e.byteLength-1]))}))}
/**
     * a getter for step the maximum number of bytes to process at one time
     *
     * @return {number} the value of step 32000
     */static get STEP(){return 32e3}
/**
     * @private
     */decryptChunk_(e,t,n,r){return function(){const a=function(e,t,n){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new i(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let A,c,u,h,d,g,p,f,m;for(A=n[0],c=n[1],u=n[2],h=n[3],m=0;m<r.length;m+=4)d=s(r[m]),g=s(r[m+1]),p=s(r[m+2]),f=s(r[m+3]),a.decrypt(d,g,p,f,l,m),l[m]=s(l[m]^A),l[m+1]=s(l[m+1]^c),l[m+2]=s(l[m+2]^u),l[m+3]=s(l[m+3]^h),A=d,c=g,u=p,h=f;return o}(e,t,n);r.set(a,e.byteOffset)}}}var a,o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};a="undefined"!=typeof window?window:void 0!==o?o:"undefined"!=typeof self?self:{};var l=a.BigInt||Number;l("0x1"),l("0x100"),l("0x10000"),l("0x1000000"),l("0x100000000"),l("0x10000000000"),l("0x1000000000000"),l("0x100000000000000"),l("0x10000000000000000"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const A=function(e){const t={};return Object.keys(e).forEach((i=>{const n=e[i];var s;s=n,("function"===ArrayBuffer.isView?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n})),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),n=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),s=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new r(i,n,s,(function(e,i){self.postMessage(A({source:t.source,decrypted:i}),[i.buffer])}))}})));var CD=Lx(mD);const ID=e=>{let t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},vD=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},BD=(e,t)=>{t.activePlaylistLoader=e,e.load()},yD={
/**
   * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters
   * an error.
   *
   * @param {string} type
   *        MediaGroup type
   * @param {Object} settings
   *        Object containing required information for media groups
   * @return {Function}
   *         Error handler. Logs warning (or error if the playlist is excluded) to
   *         console and switches back to default audio track.
   * @function onError.AUDIO
   */
AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:n}=t,s=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(s!==o){hS.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else n({error:{message:"Problem encountered loading the default audio track."}})}
/**
   * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters
   * an error.
   *
   * @param {string} type
   *        MediaGroup type
   * @param {Object} settings
   *        Object containing required information for media groups
   * @return {Function}
   *         Error handler. Logs warning to console and disables the active subtitle track
   * @function onError.SUBTITLES
   */,SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;hS.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const n=i.activeTrack();n&&(n.mode="disabled"),i.onTrackChanged()}},bD={
/**
   * Setup event listeners for audio playlist loader
   *
   * @param {string} type
   *        MediaGroup type
   * @param {PlaylistLoader|null} playlistLoader
   *        PlaylistLoader to register listeners on
   * @param {Object} settings
   *        Object containing required information for media groups
   * @function setupListeners.AUDIO
   */
AUDIO:(e,t,i)=>{if(!t)return;const{tech:n,requestOptions:s,segmentLoaders:{[e]:r}}=i;t.on("loadedmetadata",(()=>{const e=t.media();r.playlist(e,s),(!n.paused()||e.endList&&"none"!==n.preload())&&r.load()})),t.on("loadedplaylist",(()=>{r.playlist(t.media(),s),n.paused()||r.load()})),t.on("error",yD[e](e,i))},
/**
   * Setup event listeners for subtitle playlist loader
   *
   * @param {string} type
   *        MediaGroup type
   * @param {PlaylistLoader|null} playlistLoader
   *        PlaylistLoader to register listeners on
   * @param {Object} settings
   *        Object containing required information for media groups
   * @function setupListeners.SUBTITLES
   */
SUBTITLES:(e,t,i)=>{const{tech:n,requestOptions:s,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on("loadedmetadata",(()=>{const e=t.media();r.playlist(e,s),r.track(a.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&r.load()})),t.on("loadedplaylist",(()=>{r.playlist(t.media(),s),n.paused()||r.load()})),t.on("error",yD[e](e,i))}},ED={
/**
   * Setup PlaylistLoaders and AudioTracks for the audio groups
   *
   * @param {string} type
   *        MediaGroup type
   * @param {Object} settings
   *        Object containing required information for media groups
   * @function initialize.AUDIO
   */
AUDIO:(e,t)=>{const{vhs:i,sourceType:n,segmentLoaders:{[e]:s},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:A}},mainPlaylistLoader:c}=t,u=WS(c.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},u&&(a[e].main.default.playlists=c.main.playlists));for(const h in a[e]){o[h]||(o[h]=[]);for(const s in a[e][h]){let d,g=a[e][h][s];if(u?(A(`AUDIO group '${h}' label '${s}' is a main playlist`),g.isMainPlaylist=!0,d=null):d="vhs-json"===n&&g.playlists?new ux(g.playlists[0],i,r):g.resolvedUri?new ux(g.resolvedUri,i,r):g.playlists&&"dash"===n?new Mx(g.playlists[0],i,r,c):null,g=vS({id:s,playlistLoader:d},g),bD[e](e,g.playlistLoader,t),o[h].push(g),void 0===l[s]){const e=new hS.AudioTrack({id:s,kind:ID(g),enabled:!1,language:g.language,default:g.default,label:s});l[s]=e}}}s.on("error",yD[e](e,t))},
/**
   * Setup PlaylistLoaders and TextTracks for the subtitle groups
   *
   * @param {string} type
   *        MediaGroup type
   * @param {Object} settings
   *        Object containing required information for media groups
   * @function initialize.SUBTITLES
   */
SUBTITLES:(e,t)=>{const{tech:i,vhs:n,sourceType:s,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:A}},mainPlaylistLoader:c}=t;for(const u in o[e]){l[u]||(l[u]=[]);for(const r in o[e][u]){if(!n.options_.useForcedSubtitles&&o[e][u][r].forced)continue;let h,d=o[e][u][r];if("hls"===s)h=new ux(d.resolvedUri,n,a);else if("dash"===s){if(!d.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;h=new Mx(d.playlists[0],n,a,c)}else"vhs-json"===s&&(h=new ux(
// if the vhs-json object included the media playlist, use the media playlist
// as provided, otherwise use the resolved URI to load the playlist
d.playlists?d.playlists[0]:d.resolvedUri,n,a));if(d=vS({id:r,playlistLoader:h},d),bD[e](e,d.playlistLoader,t),l[u].push(d),void 0===A[r]){const e=i.addRemoteTextTrack({id:r,kind:"subtitles",default:d.default&&d.autoselect,language:d.language,label:r},!1).track;A[r]=e}}}r.on("error",yD[e](e,t))},
/**
   * Setup TextTracks for the closed-caption groups
   *
   * @param {String} type
   *        MediaGroup type
   * @param {Object} settings
   *        Object containing required information for media groups
   * @function initialize['CLOSED-CAPTIONS']
   */
"CLOSED-CAPTIONS":(e,t)=>{const{tech:i,main:{mediaGroups:n},mediaTypes:{[e]:{groups:s,tracks:r}}}=t;for(const a in n[e]){s[a]||(s[a]=[]);for(const t in n[e][a]){const o=n[e][a][t];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let A={label:t,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[A.instreamId]&&(A=vS(A,l[A.instreamId])),void 0===A.default&&delete A.default,s[a].push(vS({id:t},o)),void 0===r[t]){const e=i.addRemoteTextTrack({id:A.instreamId,kind:"captions",default:A.default,language:A.language,label:A.label},!1).track;r[t]=e}}}}},wD=(e,t)=>{for(let i=0;i<e.length;i++){if(YS(t,e[i]))return!0;if(e[i].playlists&&wD(e[i].playlists,t))return!0}return!1},QD={
/**
   * Returns a function used to get the active track of type provided
   *
   * @param {string} type
   *        MediaGroup type
   * @param {Object} settings
   *        Object containing required information for media groups
   * @return {Function}
   *         Function that returns the active media track for the provided type. Returns
   *         null if no track is active
   * @function activeTrack.AUDIO
   */
AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null}
/**
   * Returns a function used to get the active track of type provided
   *
   * @param {string} type
   *        MediaGroup type
   * @param {Object} settings
   *        Object containing required information for media groups
   * @return {Function}
   *         Function that returns the active media track for the provided type. Returns
   *         null if no track is active
   * @function activeTrack.SUBTITLES
   */,SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if("showing"===i[e].mode||"hidden"===i[e].mode)return i[e];return null}},_D=e=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{ED[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:n,vhs:s,segmentLoaders:{AUDIO:r,main:a}}=e;["AUDIO","SUBTITLES"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:n,mediaTypes:{[e]:{groups:s}}}=t,r=n.media();if(!r)return null;let a=null;r.attributes[e]&&(a=s[r.attributes[e]]);const o=Object.keys(s);if(!a)if("AUDIO"===e&&o.length>1&&WS(t.main))for(let e=0;e<o.length;e++){const t=s[o[e]];if(wD(t,r)){a=t;break}}else s.main?a=s.main:1===o.length&&(a=s[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=QD[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:n},mediaTypes:{[e]:s}}=t,r=s.activeTrack(),a=s.getActiveGroup(),o=s.activePlaylistLoader,l=s.lastGroup_;a&&l&&a.id===l.id||(s.lastGroup_=a,s.lastTrack_=r,vD(i,s),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),BD(a.playlistLoader,s)):o&&n.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:n}}=t;n.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:n,main:s},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,A=r.lastTrack_;if((!A||!a||A.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,vD(n,r),o)){if(o.isMainPlaylist){if(!a||!A||a.id===A.id)return;const e=t.vhs.playlistController_,n=e.selectPlaylist();if(e.media()===n)return;return r.logger_(`track change. Switching main audio from ${A.id} to ${a.id}`),i.pause(),s.resetEverything(),void e.fastQualityChange_(n)}if("AUDIO"===e){if(!o.playlistLoader)return s.setAudio(!0),void s.resetEverything();n.setAudio(!0),s.setAudio(!1)}l!==o.playlistLoader?(n.track&&n.track(a),n.resetEverything(),BD(o.playlistLoader,r)):BD(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on("mediachange",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanged()))})),i.on("mediachanging",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"})};n.audioTracks().addEventListener("change",l),n.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),s.on("dispose",(()=>{n.audioTracks().removeEventListener("change",l),n.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),n.clearTracks("audio");for(const A in t.AUDIO.tracks)n.audioTracks().addTrack(t.AUDIO.tracks[A])};class SD{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=mS(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class xD extends hS.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new SD,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=IS("Content Steering"),this.xhr_=e,this.getBandwidth_=t}
/**
   * Assigns the content steering tag properties to the steering controller
   *
   * @param {string} baseUrl the baseURL from the main manifest for resolving the steering manifest url
   * @param {Object} steeringTag the content steering tag from the main manifest
   */assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger("error");i.startsWith("data:")?this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1)):(this.steeringManifest.reloadUri=mS(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering"))}
/**
   * Requests the content steering manifest and parse the response. This should only be called after
   * assignTagProperties was called with a content steering tag.
   *
   * @param {string} initialUri The optional uri to make the request with.
   *    If set, the request should be made with exactly what is passed in this variable.
   *    This scenario should only happen once on initalization.
   */requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),void this.dispose();const n={contentSteeringInfo:{uri:i}};this.trigger({type:"contentsteeringloadstart",metadata:n}),this.request_=this.xhr_({uri:i,requestType:"content-steering-manifest"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders["retry-after"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let s;this.trigger({type:"contentsteeringloadcomplete",metadata:n});try{s=JSON.parse(this.request_.responseText)}catch(a){const e={errorType:hS.Error.StreamingContentSteeringParserError,error:a};this.trigger({type:"error",metadata:e})}this.assignSteeringProperties_(s);const r={contentSteeringInfo:n.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:r}),this.startTTLTimeout_()}))}
/**
   * Set the proxy server URL and add the steering manifest url as a URI encoded parameter.
   *
   * @param {string} steeringUrl the steering manifest url
   * @return the steering manifest url to a proxy server with all parameters set
   */setProxyServerUrl_(e){const t=new lI.URL(e),i=new lI.URL(this.proxyServerUrl_);return i.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}
/**
   * Decodes and parses the data uri encoded steering manifest
   *
   * @param {string} dataUri the data uri to be decoded and parsed.
   */decodeDataUriManifest_(e){const t=JSON.parse(lI.atob(e));this.assignSteeringProperties_(t)}
/**
   * Set the HLS or DASH content steering manifest request query parameters. For example:
   * _HLS_pathway="<CURRENT-PATHWAY-ID>" and _HLS_throughput=<THROUGHPUT>
   * _DASH_pathway and _DASH_throughput
   *
   * @param {string} uri to add content steering server parameters to.
   * @return a new uri as a string with the added steering query parameters.
   */setSteeringParams_(e){const t=new lI.URL(e),i=this.getPathway(),n=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(n){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,n)}return t.toString()}
/**
   * Assigns the current steering manifest properties and to the SteeringManifest object
   *
   * @param {Object} steeringJson the raw JSON steering manifest
   */assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger("error");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger("content-steering"))}
/**
   * Returns the pathway to use for steering decisions
   *
   * @return {string} returns the current pathway or the default
   */getPathway(){return this.currentPathway||this.defaultPathway}
/**
   * Chooses the manifest request URI based on proxy URIs and server URLs.
   * Also accounts for exclusion on certain manifest URIs.
   *
   * @param {string} reloadUri the base uri before parameters
   *
   * @return {string} the final URI for the request to the manifest server.
   */getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}
/**
   * Start the timeout for re-requesting the steering manifest at the TTL interval.
   *
   * @param {number} ttl time in seconds of the timeout. Defaults to the
   *        ttl interval in the steering manifest
   */startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=lI.setTimeout((()=>{this.requestSteeringManifest()}),t)}
/**
   * Clear the TTL timeout if necessary.
   */clearTTLTimeout_(){lI.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}
/**
   * aborts any current steering xhr and sets the current request object to null
   */abort(){this.request_&&this.request_.abort(),this.request_=null}
/**
   * aborts steering requests clears the ttl timeout and resets all properties.
   */dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new SD}
/**
   * adds a pathway to the available pathways set
   *
   * @param {string} pathway the pathway string to add
   */addAvailablePathway(e){e&&this.availablePathways_.add(e)}
/**
   * Clears all pathways from the available pathways set
   */clearAvailablePathways(){this.availablePathways_.clear()}
/**
   * Removes a pathway from the available pathways set.
   */excludePathway(e){return this.availablePathways_.delete(e)}
/**
   * Checks the refreshed DASH manifest content steering tag for changes.
   *
   * @param {string} baseURL new steering tag on DASH manifest refresh
   * @param {Object} newTag the new tag to check for changes
   * @return a true or false whether the new tag has different values
   */didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(mS(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let kD;const DD=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],FD=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class TD extends hS.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...n)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,n)}),t)}})(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:i,tech:n,bandwidth:s,externVhs:r,useCueTags:a,playlistExclusionDuration:o,enableLowInitialPlaylist:l,sourceType:A,cacheEncryptionKeys:c,bufferBasedABR:u,leastPixelDiffSelector:h,captionServices:d,experimentalUseMMS:g}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:p}=e;null==p&&(p=1/0),kD=r,this.bufferBasedABR=Boolean(u),this.leastPixelDiffSelector=Boolean(h),this.withCredentials=i,this.tech_=n,this.vhs_=n.vhs,this.player_=e.player_,this.sourceType_=A,this.useCueTags_=a,this.playlistExclusionDuration=o,this.maxPlaylistRetries=p,this.enableLowInitialPlaylist=l,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:p,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Hk,activeTrack:Hk,getActiveGroup:Hk,onGroupChanged:Hk,onTrackChanged:Hk,lastTrack_:null,logger_:IS(`MediaGroups[${t}]`)}})),e})(),g&&lI.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new lI.ManagedMediaSource,this.usingManagedMediaSource_=!0,hS.log("Using ManagedMediaSource")):lI.MediaSource&&(this.mediaSource=new lI.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=BS(),this.hasPlayed_=!1,this.syncController_=new pD(e),this.segmentMetadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new CD,this.sourceUpdater_=new sD(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new fD,this.keyStatusMap_=new Map;const f={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:d,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:s,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:c,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_="dash"===this.sourceType_?new Mx(t,this.vhs_,vS(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new ux(t,this.vhs_,vS(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Uk(vS(f,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Uk(vS(f,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new lD(vS(f,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){n.off("vttjserror",s),e()}function s(){n.off("vttjsloaded",i),t()}n.one("vttjsloaded",i),n.one("vttjserror",s),n.addWebVttScript_()}))}),e);this.contentSteeringController_=new xD(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",(()=>this.startABRTimer_())),this.tech_.on("pause",(()=>this.stopABRTimer_())),this.tech_.on("play",(()=>this.startABRTimer_()))),DD.forEach((e=>{this[e+"_"]=FD.bind(this,e)})),this.logger_=IS("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const m="none"===this.tech_.preload()?"play":"loadstart";this.tech_.one(m,(()=>{const e=Date.now();this.tech_.one("loadeddata",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}
/**
   * Run selectPlaylist and switch to the new playlist if we should
   *
   * @param {string} [reason=abr] a reason for why the ABR check is made
   * @private
   */checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const n=this.media(),s=n&&(n.id||n.uri),r=e&&(e.id||e.uri);if(s&&s!==r){this.logger_(`switch media ${s} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:"renditionselected",metadata:i}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}
/**
   * A function that ensures we switch our playlists inside of `mediaTypes`
   * to match the current `serviceLocation` provided by the contentSteering controller.
   * We want to check media types of `AUDIO`, `SUBTITLES`, and `CLOSED-CAPTIONS`.
   *
   * This should only be called on a DASH playback scenario while using content steering.
   * This is necessary due to differences in how media in HLS manifests are generally tied to
   * a video playlist, where in DASH that is not always the case.
   */switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,n=this.contentSteeringController_.getPathway();if(i&&n){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===n));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}
/**
   * Start a timer that periodically calls checkABR_
   *
   * @private
   */startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=lI.setInterval((()=>this.checkABR_()),250)}
/**
   * Stop the timer that periodically calls checkABR_
   *
   * @private
   */stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(lI.clearInterval(this.abrTimer_),this.abrTimer_=null)}
/**
   * Get a list of playlists for the currently selected audio playlist
   *
   * @return {Array} the array of audio playlists
   */getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,n=Object.keys(i);let s;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)s=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||n.length&&i[n[0]];for(const t in e)if(e[t].default){s={label:t};break}}if(!s)return t;const r=[];for(const a in i)if(i[a][s.label]){const t=i[a][s.label];if(t.playlists&&t.playlists.length)r.push.apply(r,t.playlists);else if(t.uri)r.push(t);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const t=e.playlists[i];t.attributes&&t.attributes.AUDIO&&t.attributes.AUDIO===a&&r.push(t)}}return r.length?r:t}
/**
   * Register event handlers on the main playlist loader. A helper
   * function for construction time.
   *
   * @private
   */setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;qS(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),_D({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(()=>{this.trigger("selectedinitialmedia")}))})),this.mainPlaylistLoader_.on("loadedplaylist",(()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial");if(!("vhs-json"===this.sourceType_&&this.initialMedia_.segments))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on("error",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on("mediachanging",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on("mediachange",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;qS(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,"dash"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})})),this.mainPlaylistLoader_.on("playlistunchanged",(()=>{const e=this.mainPlaylistLoader_.media();if("playlist-unchanged"===e.lastExcludeReason_)return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))})),this.mainPlaylistLoader_.on("renditiondisabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})})),this.mainPlaylistLoader_.on("renditionenabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}));["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger(fI({},e))}))}))}
/**
   * Given an updated media playlist (whether it was loaded for the first time, or
   * refreshed for live playlists), update any relevant properties and state to reflect
   * changes in the media that should be accounted for (e.g., cues and duration).
   *
   * @param {Object} updatedPlaylist the updated media playlist object
   *
   * @private
   */handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}
/**
   * A helper function for triggerring presence usage events once per source
   *
   * @private
   */triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let n=!0;const s=Object.keys(i.AUDIO);for(const r in i.AUDIO)for(const e in i.AUDIO[r]){i.AUDIO[r][e].uri||(n=!1)}n&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),kD.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),s.length&&Object.keys(i.AUDIO[s[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),n=this.bufferLowWaterLine(),s=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:n,bufferLowWaterLine:s,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!n)return hS.log.warn("We received no playlist to switch to. Please check your stream."),!1;const A=`allowing switch ${e&&e.id||"null"} -> ${n.id}`;if(!e)return l(`${A} as current playlist is not set`),!0;if(n.id===e.id)return!1;const c=Boolean(wS(t,i).length);if(!e.endList)return c||"number"!=typeof e.partTargetDuration?(l(`${A} as current playlist is live`),!0):(l(`not ${A} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const u=kS(t,i),h=o?Rx.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Rx.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${A} as duration < max low water line (${a} < ${h})`),!0;const d=n.attributes.BANDWIDTH,g=e.attributes.BANDWIDTH;if(d<g&&(!o||u<r)){let e=`${A} as next bandwidth < current bandwidth (${d} < ${g})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${u} < ${r})`),l(e),!0}if((!o||d>g)&&u>=s){let e=`${A} as forwardBuffer >= bufferLowWaterLine (${u} >= ${s})`;return o&&(e+=` and next bandwidth > current bandwidth (${d} > ${g})`),l(e),!0}return l(`not ${A} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:n,bufferHighWaterLine:s,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}
/**
   * Register event handlers on the segment loaders. A helper function
   * for construction time.
   *
   * @private
   */setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",(()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("timeout",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",(()=>{this.trigger("progress")})),this.mainSegmentLoader_.on("error",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on("appenderror",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("ended",(()=>{this.logger_("main segment loader ended"),this.onEndOfStream()})),this.timelineChangeController_.on("audioTimelineBehind",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on("fixBadTimelineChange",(()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on("earlyabort",(e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}));["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(fI({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger(fI({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger(fI({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}
/**
   * Call load on our SegmentLoaders
   */load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}
/**
   * Call pause on our SegmentLoaders
   */pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}
/**
   * Re-tune playback quality level for the current player
   * conditions. This method will perform destructive actions like removing
   * already buffered content in order to readjust the currently active
   * playlist quickly. This is good for manual quality changes
   *
   * @private
   */fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}
/**
   * Begin playback.
   */play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}
/**
   * Seek to the latest media position if this is a live video and the
   * player and video are loaded and initialized.
   */setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let n=i;if(e.start){const s=e.start.timeOffset;n=s<0?Math.max(i+s,t.start(0)):Math.min(i,s)}this.trigger("firstplay"),this.tech_.setCurrentTime(n)}return this.hasPlayed_=!0,this.load(),!0}
/**
   * handle the sourceopen event on the MediaSource
   *
   * @private
   */handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(e=>{}))}this.trigger("sourceopen")}
/**
   * handle the sourceended event on the MediaSource
   *
   * @private
   */handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}
/**
   * handle the durationchange event on the MediaSource
   *
   * @private
   */handleDurationChange_(){this.tech_.trigger("durationchange")}
/**
   * Calls endOfStream on the media source when all active stream types have called
   * endOfStream
   *
   * @param {string} streamType
   *        Stream type of the segment loader that called endOfStream
   * @private
   */onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}
/**
   * Check if a playlist has stopped being updated
   *
   * @param {Object} playlist the media playlist object
   * @return {boolean} whether the playlist has stopped being updated or not
   */stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=kD.Playlist.playlistEnd(e,t),n=this.tech_.currentTime(),s=this.tech_.buffered();if(!s.length)return i-n<=bS;const r=s.end(s.length-1);return r-n<=bS&&i-r<=bS}
/**
   * Exclude a playlist for a set amount of time, making it unavailable for selection by
   * the rendition selection algorithm, then force a new playlist (rendition) selection.
   *
   * @param {Object=} playlistToExclude
   *                  the playlist to exclude, defaults to the currently selected playlist
   * @param {Object=} error
   *                  an optional error
   * @param {number=} playlistExclusionDuration
   *                  an optional number of seconds to exclude the playlist
   */excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));e.playlistErrors_++;const n=this.mainPlaylistLoader_.main.playlists,s=n.filter(GS),r=1===s.length&&s[0]===e;if(1===n.length&&i!==1/0)return hS.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;n.forEach((i=>{if(i===e)return;const n=i.excludeUntil;void 0!==n&&n!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(hS.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const l=t.internal?this.logger_:hS.log.warn,A=t.message?" "+t.message:"";l(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${A} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const c=o.targetDuration/2*1e3||5e3,u="number"==typeof o.lastRequest&&Date.now()-o.lastRequest<=c;return this.switchMedia_(o,"exclude",r||u)}
/**
   * Pause all segment/playlist loaders
   */pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}
/**
   * Call a set of functions in order on playlist loaders, segment loaders,
   * or both types of loaders.
   *
   * @param {string} filter
   *        Filter loaders that should call fnNames using a string. Can be:
   *        * all - run on all loaders
   *        * audio - run on all audio loaders
   *        * subtitle - run on all subtitle loaders
   *        * main - run on the main loaders
   *
   * @param {Array|string} fnNames
   *        A string or array of function names to call.
   */delegateLoaders_(e,t){const i=[],n="all"===e;(n||"main"===e)&&i.push(this.mainPlaylistLoader_);const s=[];(n||"audio"===e)&&s.push("AUDIO"),(n||"subtitle"===e)&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),["main","audio","subtitle"].forEach((t=>{const n=this[`${t}SegmentLoader_`];!n||e!==t&&"all"!==e||i.push(n)})),i.forEach((e=>t.forEach((t=>{"function"==typeof e[t]&&e[t]()}))))}
/**
   * set the current time on all segment loaders
   *
   * @param {TimeRange} currentTime the current time to set
   * @return {TimeRange} the current time
   */setCurrentTime(e){const t=wS(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}
/**
   * get the current duration
   *
   * @return {TimeRange} the duration
   */duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:kD.Playlist.duration(e):1/0:0}
/**
   * check the seekable range
   *
   * @return {TimeRange} the seekable range
   */seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const n=this.syncController_.getMediaSequenceSync(t);if(n&&n.isReliable){const e=n.start,t=n.end;if(!isFinite(e)||!isFinite(t))return null;const s=kD.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i),r=Math.max(0,t-s);return r<e?null:BS([[e,r]])}const s=this.syncController_.getExpiredTime(i,this.duration());if(null===s)return null;const r=kD.Playlist.seekable(i,s,kD.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),n=e.end(0),s=t.start(0),r=t.end(0);return s>n||i>r?e:BS([[Math.max(i,s),Math.min(n,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${_S(this.seekable_)}]`);const n={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:n}),this.tech_.trigger("seekablechanged")}
/**
   * Update the player duration
   */updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=kD.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}
/**
   * dispose of the PlaylistController and everything
   * that it controls
   */dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const i in t)t[i].forEach((e=>{e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}
/**
   * return the main playlist object if we have one
   *
   * @return {Object} the main playlist object that we parsed
   */main(){return this.mainPlaylistLoader_.main}
/**
   * return the currently selected playlist
   *
   * @return {Object} the currently selected playlist object that we parsed
   */media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}
// find from and to for codec switch event
getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=pk(this.main(),t),n={},s=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(n.video=i.video||e.main.videoCodec||"avc1.4d400d"),e.main.isMuxed&&(n.video+=`,${i.audio||e.main.audioCodec||Yv}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||s)&&(n.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||Yv,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!n.audio&&!n.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const r=(e,t)=>e?Kv(t,this.usingManagedMediaSource_):qv(t),a={};let o;if(["video","audio"].forEach((function(t){if(n.hasOwnProperty(t)&&!r(e[t].isFmp4,n[t])){const i=e[t].isFmp4?"browser":"muxer";a[i]=a[i]||[],a[i].push(n[t]),"audio"===t&&(o=i)}})),s&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): "${n.audio}"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if(["video","audio"].forEach((t=>{const i=(Pv(this.sourceUpdater_.codecs[t]||"")[0]||{}).type,s=(Pv(n[t]||"")[0]||{}).type;i&&s&&i.toLowerCase()!==s.toLowerCase()&&e.push(`"${this.sourceUpdater_.codecs[t]}" -> "${n[t]}"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return n}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=", "),e+=`${t} does not support codec(s): "${a[t].join(",")}"`)),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}
/**
   * Create source buffers and exlude any incompatible renditions.
   *
   * @private
   */tryToCreateSourceBuffers_(){if("open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}
/**
   * Excludes playlists with codecs that are unsupported by the muxer and browser.
   */excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const n=e[i];if(-1!==t.indexOf(n.id))return;t.push(n.id);const s=pk(this.main,n),r=[];!s.audio||qv(s.audio)||Kv(s.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${s.audio}`),!s.video||qv(s.video)||Kv(s.video,this.usingManagedMediaSource_)||r.push(`video codec ${s.video}`),s.text&&"stpp.ttml.im1t"===s.text&&r.push(`text codec ${s.text}`),r.length&&(n.excludeUntil=1/0,this.logger_(`excluding ${n.id} for unsupported: ${r.join(", ")}`))}))}
/**
   * Exclude playlists that are known to be codec or
   * stream-incompatible with the SourceBuffer configuration. For
   * instance, Media Source Extensions would cause the video element to
   * stall waiting for video data if you switched from a variant with
   * video and audio to an audio-only one.
   *
   * @param {Object} media a media playlist compatible with the current
   * set of SourceBuffers. Variants in the current main playlist that
   * do not appear to have compatible codec or stream configurations
   * will be excluded from the default playlist selection algorithm
   * indefinitely.
   * @private
   */excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,n=dk(Pv(e)),s=gk(n),r=n.video&&Pv(n.video)[0]||null,a=n.audio&&Pv(n.audio)[0]||null;Object.keys(i).forEach((e=>{const n=i[e];if(-1!==t.indexOf(n.id)||n.excludeUntil===1/0)return;t.push(n.id);const o=[],l=pk(this.mainPlaylistLoader_.main,n),A=gk(l);if(l.audio||l.video){if(A!==s&&o.push(`codec count "${A}" !== "${s}"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&Pv(l.video)[0]||null,t=l.audio&&Pv(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec "${e.type}" !== "${r.type}"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec "${t.type}" !== "${a.type}"`)}o.length&&(n.excludeUntil=1/0,this.logger_(`excluding ${n.id}: ${o.join(" && ")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let n,s=i;for(let r=0;r<e.segments.length;r++){const i=e.segments[r];if(n||(n=AD(t,s+i.duration/2)),n){if("cueIn"in i){n.endTime=s,n.adEndTime=s,s+=i.duration,n=null;continue}if(s<n.endTime){s+=i.duration;continue}n.endTime+=i.duration}else if("cueOut"in i&&(n=new lI.VTTCue(s,s+i.duration,i.cueOut),n.adStartTime=s,n.adEndTime=s+parseFloat(i.cueOut),t.addCue(n)),"cueOutCont"in i){const[e,r]=i.cueOutCont.split("/").map(parseFloat);n=new lI.VTTCue(s,s+i.duration,""),n.adStartTime=s-e,n.adEndTime=n.adStartTime+r,t.addCue(n)}s+=i.duration}}(e,this.cueTagsTrack_,t)}
/**
   * Calculates the desired forward buffer length based on current time
   *
   * @return {number} Desired forward buffer length in seconds
   */goalBufferLength(){const e=this.tech_.currentTime(),t=Rx.GOAL_BUFFER_LENGTH,i=Rx.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,Rx.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)}
/**
   * Calculates the desired buffer low water line based on current time
   *
   * @return {number} Desired buffer low water line in seconds
   */bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Rx.BUFFER_LOW_WATER_LINE,i=Rx.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,Rx.MAX_BUFFER_LOW_WATER_LINE),s=Math.max(t,Rx.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?s:n)}bufferHighWaterLine(){return Rx.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){_k(this.inbandTextTracks_,"com.apple.streaming",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const n=lI.WebKitDataCue||lI.VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Qk.has(t))continue;const s=new n(e.startTime,e.endTime,"");s.id=e.id,s.type="com.apple.quicktime.HLS",s.value={key:wk[t],data:e[t]},"scte35Out"!==t&&"scte35In"!==t||(s.value.data=new Uint8Array(s.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(s)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const n=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();_k(this.inbandTextTracks_,e,this.tech_),Ek({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:n,videoDuration:i})}
/**
   * Utility for getting the pathway or service location from an HLS or DASH playlist.
   *
   * @param {Object} playlist for getting pathway from.
   * @return the pathway attribute of a playlist
   */pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}
/**
   * Initialize available pathways and apply the tag properties.
   */initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one("canplay",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}
/**
   * Reset the content steering controller and re-init.
   */resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}
/**
   * Attaches the listeners for content steering.
   */attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this));["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger(fI({},e))}))})),"dash"===this.sourceType_&&this.mainPlaylistLoader_.on("loadedplaylist",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const n of e.playlists){const e=n.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}
/**
   * Simple exclude and change playlist logic for content steering.
   */excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let n=!1;Object.keys(t).forEach((s=>{const r=t[s],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&"content-steering"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,n=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_="content-steering",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(n=!0)}})),n&&this.changeSegmentPathway_()}
/**
   * Add, update, or delete playlists and media groups for
   * the pathway clones for HLS Content Steering.
   *
   * See https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/
   *
   * NOTE: Pathway cloning does not currently support the `PER_VARIANT_URIS` and
   * `PER_RENDITION_URIS` as we do not handle `STABLE-VARIANT-ID` or
   * `STABLE-RENDITION-ID` values.
   */handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,n]of t.entries()){i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(n),this.contentSteeringController_.excludePathway(e))}for(const[n,s]of i.entries()){const i=t.get(n);if(i)this.equalPathwayClones_(i,s)||(this.mainPlaylistLoader_.updateOrDeleteClone(s,!0),this.contentSteeringController_.addAvailablePathway(n));else{e.filter((e=>e.attributes["PATHWAY-ID"]===s["BASE-ID"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(s,e)})),this.contentSteeringController_.addAvailablePathway(n)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}
/**
   * Determines whether two pathway clone objects are equivalent.
   *
   * @param {Object} a The first pathway clone object.
   * @param {Object} b The second pathway clone object.
   * @return {boolean} True if the pathway clone objects are equal, false otherwise.
   */equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const i=e["URI-REPLACEMENT"].PARAMS,n=t["URI-REPLACEMENT"].PARAMS;for(const s in i)if(i[s]!==n[s])return!1;for(const s in n)if(i[s]!==n[s])return!1;return!0}
/**
   * Changes the current playlists for audio, video and subtitles after a new pathway
   * is chosen from content steering.
   */changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),"DASH"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}
/**
   * Iterates through playlists and check their keyId set and compare with the
   * keyStatusMap, only enable playlists that have a usable key. If the playlist
   * has no keyId leave it enabled by default.
   */excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t="non-usable";this.mainPlaylistLoader_.main.playlists.forEach((i=>{const n=this.mainPlaylistLoader_.getKeyIdSet(i);n&&n.size&&n.forEach((n=>{const s="usable",r=this.keyStatusMap_.has(n)&&this.keyStatusMap_.get(n)===s,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${n} is ${s}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${n} doesn't exist in the keyStatusMap or is not ${s}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,n=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&n&&(delete e.excludeUntil,hS.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}
/**
   * Adds a keystatus to the keystatus map, tries to convert to string if necessary.
   *
   * @param {any} keyId the keyId to add a status for
   * @param {string} status the status of the keyId
   */addKeyStatus_(e,t){const i=("string"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,"0"))).join("")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}
/**
   * Utility function for adding key status to the keyStatusMap and filtering usable encrypted playlists.
   *
   * @param {any} keyId the keyId from the keystatuschange event
   * @param {string} status the key status string
   */updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class MD{constructor(e,t,i){const{playlistController_:n}=e,s=n.fastQualityChange_.bind(n);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}var r,a,o;this.codecs=pk(n.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=s,e=>{const t=r.main.playlists[a],i=OS(t),n=GS(t);if(void 0===e)return n;e?delete t.disabled:t.disabled=!0;const s={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:"fast-quality"};return e===n||i||(e?(o(t),r.trigger({type:"renditionenabled",metadata:s})):r.trigger({type:"renditiondisabled",metadata:s})),e})}}const RD=["seeking","seeked","pause","playing","error"];class ND extends hS.EventTarget{
/**
   * Represents an PlaybackWatcher object.
   *
   * @class
   * @param {Object} options an object that includes the tech and settings
   */
constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=IS("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),n=()=>this.techWaiting_(),s=()=>this.resetTimeUpdate_(),r=this.playlistController_,a=["main","subtitle","audio"],o={};a.forEach((e=>{o[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},r[`${e}SegmentLoader_`].on("appendsdone",o[e].updateend),r[`${e}SegmentLoader_`].on("playlistupdate",o[e].reset),this.tech_.on(["seeked","seeking"],o[e].reset)}));const l=e=>{["main","audio"].forEach((t=>{r[`${t}SegmentLoader_`][e]("appended",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),l("off"))},this.clearSeekingAppendCheck_=()=>l("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),l("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",n),this.tech_.on(RD,s),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",n),this.tech_.off(RD,s),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),a.forEach((e=>{r[`${e}SegmentLoader_`].off("appendsdone",o[e].updateend),r[`${e}SegmentLoader_`].off("playlistupdate",o[e].reset),this.tech_.off(["seeked","seeking"],o[e].reset)})),this.checkCurrentTimeTimeout_&&lI.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}
/**
   * Periodically check current time to see if playback stopped
   *
   * @private
   */monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&lI.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=lI.setTimeout(this.monitorCurrentTime_.bind(this),250)}
/**
   * Reset stalled download stats for a specific type of loader
   *
   * @param {string} type
   *        The segment loader type to check.
   *
   * @listens SegmentLoader#playlistupdate
   * @listens Tech#seeking
   * @listens Tech#seeked
   */resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}
/**
   * Checks on every segment `appendsdone` to see
   * if segment appends are making progress. If they are not
   * and we are still downloading bytes. We exclude the playlist.
   *
   * @param {string} type
   *        The segment loader type to check.
   *
   * @listens SegmentLoader#appendsdone
   */checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],n=i.buffered_(),s=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],n);if(this[`${e}Buffered_`]=n,s){const i={bufferedRanges:n};return t.trigger({type:"bufferedrangeschanged",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:SS(n)}),this[`${e}StalledDownloads_`]<10||(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),"subtitle"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}
/**
   * The purpose of this function is to emulate the "waiting" event on
   * browsers that do not emit it when they are waiting for more
   * data to continue playback
   *
   * @private
   */checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+bS>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(BS([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}
/**
   * Resets the 'timeupdate' mechanism designed to detect that we are stalled
   *
   * @private
   */resetTimeUpdate_(){this.consecutiveUpdates=0}
/**
   * Fixes situations where there's a bad seek
   *
   * @return {boolean} whether an action was taken to fix the seek
   * @private
   */fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)){i=e.end(e.length-1)}if(this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(// if the playlist is too short and the seekable range is an exact time (can
// happen in live with a 3 segment playlist), then don't use a time delta
t===e.end(0)?0:bS)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${_S(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const n=this.playlistController_.sourceUpdater_,s=this.tech_.buffered(),r=n.audioBuffer?n.audioBuffered():null,a=n.videoBuffer?n.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-yS),A=[r,a];for(let u=0;u<A.length;u++){if(!A[u])continue;if(kS(A[u],t)<l)return!1}const c=QS(s,t);return 0!==c.length&&(i=c.start(0)+bS,this.logger_(`Buffered region starts (${c.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}
/**
   * Handler for situations when we determine the player is waiting.
   *
   * @private
   */waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=wS(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}
/**
   * Handler for situations when the tech fires a `waiting` event
   *
   * @return {boolean}
   *         True if an action (or none) was needed to correct the waiting. False if no
   *         checks passed
   * @private
   */techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,n=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const s=QS(n,t);return s.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${s.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,n=!1){if(!e.length)return!1;let s=e.end(e.length-1)+bS;const r=!i.endList,a="number"==typeof i.partTargetDuration;return r&&(a||n)&&(s=e.end(e.length-1)+3*i.targetDuration),t>s}beforeSeekableWindow_(e,t){return!!(e.length&&// can't fall before 0 and 0 seekable start identifies VOD stream
e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let n;if(e.length&&t.length){const s=wS(e,i-3),r=wS(e,i),a=wS(t,i);a.length&&!r.length&&s.length&&(n={start:s.end(0),end:a.end(0)})}else{QS(e,i).length||(n=this.gapFromVideoUnderflow_(e,i))}return!!n&&(this.logger_(`Encountered a gap in video from ${n.start} to ${n.end}. Seeking to current time ${i}`),!0)}
/**
   * Timer callback. If playback still has not proceeded, then we seek
   * to the start of the next buffered region.
   *
   * @private
   */skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),n=QS(t,i);if(this.resetTimeUpdate_(),0===n.length||i!==e)return;this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+yS);const s={gapInfo:{from:i,to:n.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:s}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return BS();const t=[];for(let i=1;i<e.length;i++){const n=e.end(i-1),s=e.start(i);t.push([n,s])}return BS(t)}(e);for(let n=0;n<i.length;n++){const e=i.start(n),s=i.end(n);if(t-e<4&&t-e>2)return{start:e,end:s}}return null}}const LD={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},UD=function(e,t){let i=0,n=0;const s=vS(LD,t);e.ready((()=>{e.trigger({type:"usage",name:"vhs-error-reload-initialized"})}));const r=function(){n&&e.currentTime(n)},a=function(t){null!=t&&(n=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",r),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.play())},o=function(){if(Date.now()-i<1e3*s.errorInterval)e.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(s.getSource&&"function"==typeof s.getSource)return i=Date.now(),s.getSource.call(e,a);hS.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function(){e.off("loadedmetadata",r),e.off("error",o),e.off("dispose",l)};e.on("error",o),e.on("dispose",l),e.reloadSourceOnError=function(t){l(),UD(e,t)}},HD=function(e){UD(this,e)};var PD="3.16.2";const OD={PlaylistLoader:ux,Playlist:jS,utils:bx,STANDARD_PLAYLIST_SELECTOR:yk,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(jS.isEnabled);Ik(e,((e,t)=>vk(e,t)));return e.filter((e=>!!pk(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:yk,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let n=this.useDevicePixelRatio&&lI.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(n=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Bk(this.playlists.main,t,parseInt(Ck(this.tech_.el(),"width"),10)*n,parseInt(Ck(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions,this.playlistController_)}},comparePlaylistBandwidth:vk,comparePlaylistResolution:function(e,t){let i,n;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||lI.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),n=n||lI.Number.MAX_VALUE,i===n&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n},xhr:gx()};Object.keys(Rx).forEach((e=>{Object.defineProperty(OD,e,{get:()=>(hS.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Rx[e]),set(t){hS.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),"number"!=typeof t||t<0?hS.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Rx[e]=t}})}));const GD="videojs-vhs",KD=function(e,t){const i=t.media();let n=-1;for(let s=0;s<e.length;s++)if(e[s].id===i.id){n=s;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})};OD.canPlaySource=function(){return hS.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const qD=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:n})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const s=((e,t)=>e.reduce(((e,i)=>{if(!i.contentProtection)return e;const n=t.reduce(((e,t)=>{const n=i.contentProtection[t];return n&&n.pssh&&(e[t]={pssh:n.pssh}),e}),{});return Object.keys(n).length&&e.push(n),e}),[]))(i?n.concat([i]):n,Object.keys(t)),r=[],a=[];return s.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one("keysessioncreated",t)}))),r.push(new Promise(((i,n)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?n(e):i()}))})))})),Promise.race([
// If a session was previously created, these will all finish resolving without
// creating a new session, otherwise it will take until the end of all license
// requests, which is why the key session check is used (to make setup much faster).
Promise.all(r),
// Once a single session is created, the browser knows DRM will be used.
Promise.race(a)])},YD=({player:e,sourceKeySystems:t,media:i,audioMedia:n})=>{const s=((e,t,i)=>{if(!e)return e;let n={};t&&t.attributes&&t.attributes.CODECS&&(n=dk(Pv(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(n.audio=i.attributes.CODECS);const s=Gv(n.video),r=Gv(n.audio),a={};for(const o in e)a[o]={},r&&(a[o].audioContentType=r),s&&(a[o].videoContentType=s),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(a[o].pssh=t.contentProtection[o].pssh),"string"==typeof e[o]&&(a[o].url=e[o]);return vS(e,a)})(t,i,n);return!!s&&(e.currentSource().keySystems=s,!(s&&!e.eme)||(hS.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},VD=()=>{if(!lI.localStorage)return null;const e=lI.localStorage.getItem(GD);if(!e)return null;try{return JSON.parse(e)}catch(I2){return null}},WD=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},jD=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},JD=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},zD=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};OD.supportsNativeHls=function(){if(!gI||!gI.createElement)return!1;const e=gI.createElement("video");if(!hS.getTech("Html5").isSupported())return!1;return[
// Apple santioned
"application/vnd.apple.mpegurl",
// Apple sanctioned for backwards compatibility
"audio/mpegurl",
// Very common
"audio/x-mpegurl",
// Very common
"application/x-mpegurl",
// Included for completeness
"video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),OD.supportsNativeDash=!!(gI&&gI.createElement&&hS.getTech("Html5").isSupported())&&/maybe|probably/i.test(gI.createElement("video").canPlayType("application/dash+xml")),OD.supportsTypeNatively=e=>"hls"===e?OD.supportsNativeHls:"dash"===e&&OD.supportsNativeDash,OD.isSupported=function(){return hS.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},OD.xhr.onRequest=function(e){WD(OD.xhr,e)},OD.xhr.onResponse=function(e){jD(OD.xhr,e)},OD.xhr.offRequest=function(e){JD(OD.xhr,e)},OD.xhr.offResponse=function(e){zD(OD.xhr,e)};const XD=hS.getComponent("Component");class $D extends XD{constructor(e,t,i){if(super(t,i.vhs),"number"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=IS("VhsHandler"),t.options_&&t.options_.playerId){const e=hS.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(gI,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(e=>{const t=gI.fullscreenElement||gI.webkitFullscreenElement||gI.mozFullScreenElement||gI.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}
/**
   * Set VHS options based on options from configuration, as well as partial
   * options to be passed at a later time.
   *
   * @param {Object} options A partial chunk of config options
   */setOptions_(e={}){if(this.options_=vS(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=VD();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Rx.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Rx.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio;const t=this.options_.customPixelRatio;"number"==typeof t&&t>=0&&(this.customPixelRatio=t)}
// alias for public method to set options
setOptions(e={}){this.setOptions_(e)}
/**
   * called when player.src gets called, handle a new source
   *
   * @param {Object} src the source object to handle
   */src(e,t){if(!e)return;var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(i.substring(i.indexOf(",")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=OD,this.options_.sourceType=jv(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new TD(this.options_);const n=vS({liveRangeSafeTimeDelta:bS},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new ND(n),this.attachStreamingEventListeners_(),this.playlistController_.on("error",(()=>{const e=hS.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const s=this.options_.bufferBasedABR?OD.movingAverageBandwidthSelector(.55):OD.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.playlistController_.selectInitialPlaylist=OD.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=lI.navigator.connection||lI.navigator.mozConnection||lI.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const n=1e3*t.downlink*1e3;e=n>=i&&e>=i?Math.max(e,n):n}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},
/**
       * `systemBandwidth` is a combination of two serial processes bit-rates. The first
       * is the network bitrate provided by `bandwidth` and the second is the bitrate of
       * the entire process after that - decryption, transmuxing, and appending - provided
       * by `throughput`.
       *
       * Since the two process are serial, the overall system bandwidth is given by:
       *   sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)
       */
systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;return Math.floor(1/(e+t))},set(){hS.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>SS(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>SS(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!lI.localStorage)return!1;let t=VD();t=t?vS(t,e):e;try{lI.localStorage.setItem(GD,JSON.stringify(t))}catch(I2){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on("selectedinitialmedia",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=WS(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!OS(e))).map(((t,i)=>new MD(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",(()=>{this.setupEme_()})),this.on(this.playlistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.playlistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=lI.URL.createObjectURL(this.playlistController_.mediaSource),(hS.browser.IS_ANY_SAFARI||hS.browser.IS_IOS)&&this.options_.overrideNative&&"hls"===this.options_.sourceType&&"function"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),qD({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media keys for EME",code:3})}))}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}
/**
   * If necessary and EME is available, sets up EME options and waits for key session
   * creation.
   *
   * This function also updates the source updater so taht it can be used, as for some
   * browsers, EME must be configured before content is appended (if appending unencrypted
   * content before encrypted content).
   */setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=YD({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}
/**
   * Initializes the quality levels and sets listeners to update them.
   *
   * @method setupQualityLevels_
   * @private
   */setupQualityLevels_(){const e=hS.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",(()=>{var e,t;e=this.qualityLevels_,(t=this).representations().forEach((t=>{e.addQualityLevel(t)})),KD(e,t.playlists)})),this.playlists.on("mediachange",(()=>{KD(this.qualityLevels_,this.playlists)})))}
/**
   * return the version
   */static version(){return{"@videojs/http-streaming":PD,"mux.js":"7.1.0","mpd-parser":"1.3.1","m3u8-parser":"7.2.0","aes-decrypter":"4.0.2"}}
/**
   * return the version
   */version(){return this.constructor.version()}canChangeType(){return sD.canChangeType()}
/**
   * Begin playing the video.
   */play(){this.playlistController_.play()}
/**
   * a wrapper around the function in PlaylistController
   */setCurrentTime(e){this.playlistController_.setCurrentTime(e)}
/**
   * a wrapper around the function in PlaylistController
   */duration(){return this.playlistController_.duration()}
/**
   * a wrapper around the function in PlaylistController
   */seekable(){return this.playlistController_.seekable()}
/**
   * Abort all outstanding work and cleanup.
   */dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&lI.URL.revokeObjectURL&&(lI.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return Ex({playlist:this.playlistController_.media(),time:e,callback:t})}
// the player must be playing before calling this
seekToProgramTime(e,t,i=!0,n=2){return wx({programTime:e,playlist:this.playlistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}
/**
   * Adds the onRequest, onResponse, offRequest and offResponse functions
   * to the VhsHandler xhr Object.
   */setupXhrHooks_(){this.xhr.onRequest=e=>{WD(this.xhr,e)},this.xhr.onResponse=e=>{jD(this.xhr,e)},this.xhr.offRequest=e=>{JD(this.xhr,e)},this.xhr.offResponse=e=>{zD(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger(fI({},e))}))})),["gapjumped","playedrangeschanged"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger(fI({},e))}))}))}}const ZD={name:"videojs-http-streaming",VERSION:PD,canHandleSource(e,t={}){const i=vS(hS.options,t);return!(!i.vhs.experimentalUseMMS&&!Kv("avc1.4d400d,mp4a.40.2",!1))&&ZD.canPlayType(e.type,i)},handleSource(e,t,i={}){const n=vS(hS.options,i);return t.vhs=new $D(e,t,n),t.vhs.xhr=gx(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=jv(e);if(!i)return"";const n=ZD.getOverrideNative(t);return!OD.supportsTypeNatively(i)||n?"maybe":""},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(hS.browser.IS_ANY_SAFARI||hS.browser.IS_IOS),{overrideNative:n=i}=t;return n}};Kv("avc1.4d400d,mp4a.40.2",!0)&&hS.getTech("Html5").registerSourceHandler(ZD,0),hS.VhsHandler=$D,hS.VhsSourceHandler=ZD,hS.Vhs=OD,hS.use||hS.registerComponent("Vhs",OD),hS.options.vhs=hS.options.vhs||{},hS.getPlugin&&hS.getPlugin("reloadSourceOnError")||hS.registerPlugin("reloadSourceOnError",HD);const eF={"Audio Player":"オーディオプレイヤー","Video Player":"ビデオプレイヤー",Play:"再生",Pause:"一時停止",Replay:"もう一度見る","Current Time":"現在の時間",Duration:"長さ","Remaining Time":"残りの時間","Stream Type":"ストリームの種類",LIVE:"ライブ","Seek to live, currently behind live":"ライブまで再生位置を指定、現在ライブが遅れています。","Seek to live, currently playing live":"ライブまで再生位置を指定、現在ライブ中。",Loaded:"ロード済み",Progress:"進行状況","Progress Bar":"シークバー","progress bar timing: currentTime={1} duration={2}":"{2}の{1}",Fullscreen:"フルスクリーン","Exit Fullscreen":"フルスクリーン以外",Mute:"ミュート",Unmute:"サウンドをオン","Playback Rate":"再生レート",Subtitles:"サブタイトル","subtitles off":"サブタイトル オフ",Captions:"キャプション","captions off":"キャプション オフ",Chapters:"チャプター",Descriptions:"ディスクリプション","descriptions off":"ディスクリプションオフ","Audio Track":"音声トラック","Volume Level":"ボリュームレベル","You aborted the media playback":"動画再生を中止しました","A network error caused the media download to fail part-way.":"ネットワーク エラーにより動画のダウンロードが途中で失敗しました","The media could not be loaded, either because the server or network failed or because the format is not supported.":"サーバーまたはネットワークのエラー、またはフォーマットがサポートされていないため、動画をロードできませんでした","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"破損の問題、またはお使いのブラウザがサポートしていない機能が動画に使用されていたため、動画の再生が中止されました","No compatible source was found for this media.":"この動画に対して互換性のあるソースが見つかりませんでした","The media is encrypted and we do not have the keys to decrypt it.":"メディアは暗号化されており、解読するためのキーがありません。","Play Video":"ビデオを再生する",Close:"閉じる","Close Modal Dialog":"ダイアログボックスを閉じる","Modal Window":"ダイアログボックス","This is a modal window":"これはダイアログボックスです","This modal can be closed by pressing the Escape key or activating the close button.":"このダイアログボックスは、Escキーを押すか、閉じるボタンを押して閉じることができま",", opens captions settings dialog":", 書き起こし字幕の設定を開く",", opens subtitles settings dialog":", 字幕の設定を開く",", opens descriptions settings dialog":", ディスクリプションの設定を開く",", selected":", 選択済み","captions settings":"書き起こし字幕の設定","subtitles settings":"字幕の設定","descriptions settings":"ディスクリプションの設定",Text:"テキスト",White:"白",Black:"黒",Red:"赤",Green:"緑",Blue:"青",Yellow:"黄",Magenta:"赤紫",Cyan:"シアン",Background:"背景",Window:"ウィンドウ",Transparent:"透明","Semi-Transparent":"半透明",Opaque:"不透明","Font Size":"文字サイズ","Text Edge Style":"テキストのアウトラインのスタイル",None:"なし",Raised:"浮き出し",Depressed:"浮き彫り",Uniform:"均一","Drop shadow":"影付き","Font Family":"フォントの種類","Proportional Sans-Serif":"セリフなし可変幅フォント","Monospace Sans-Serif":"セリフなし等幅フォント","Proportional Serif":"セリフあり可変幅フォント","Monospace Serif":"セリフあり等幅フォント",Casual:"カジュアル",Script:"スクリプト","Small Caps":"スモールキャピタル",Reset:"リセット","restore all settings to the default values":"すべての設定をデフォルト値に戻す",Done:"終了","Caption Settings Dialog":"書き起こし字幕設定ダイアログ","Beginning of dialog window. Escape will cancel and close the window.":"ダイアログボックスの開始。Escキーでキャンセルしてウィンドウを閉じます。","End of dialog window.":"ダイアログボックスの終了","{1} is loading.":"{1}は読み込み中です。","Exit Picture-in-Picture":"ピクチャーインピクチャー機能の終了","Picture-in-Picture":"ピクチャーインピクチャー","No content":"コンテンツなし",Color:"色",Opacity:"不透明度","Text Background":"テキスト背景","Caption Area Background":"キャプション領域背景","Skip forward {1} seconds":"{1}秒進む","Skip backward {1} seconds":"{1}秒戻る"},tF={"Audio Player":"Audio Player","Video Player":"Video Player",Play:"Play",Pause:"Pause",Replay:"Replay","Current Time":"Current Time",Duration:"Duration","Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:"LIVE","Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:"Loaded",Progress:"Progress","Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:"Fullscreen","Exit Fullscreen":"Exit Fullscreen",Mute:"Mute",Unmute:"Unmute","Playback Rate":"Playback Rate",Subtitles:"Subtitles","subtitles off":"subtitles off",Captions:"Captions","captions off":"captions off",Chapters:"Chapters",Descriptions:"Descriptions","descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:"Close","Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:"Text",White:"White",Black:"Black",Red:"Red",Green:"Green",Blue:"Blue",Yellow:"Yellow",Magenta:"Magenta",Cyan:"Cyan",Background:"Background",Window:"Window",Transparent:"Transparent","Semi-Transparent":"Semi-Transparent",Opaque:"Opaque","Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:"None",Raised:"Raised",Depressed:"Depressed",Uniform:"Uniform","Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:"Casual",Script:"Script","Small Caps":"Small Caps",Reset:"Reset","restore all settings to the default values":"restore all settings to the default values",Done:"Done","Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:"Color",Opacity:"Opacity","Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},iF={Play:"播放",Pause:"暂停","Current Time":"当前时间",Duration:"时长","Remaining Time":"剩余时间","Stream Type":"媒体流类型",LIVE:"直播",Loaded:"加载完成",Progress:"进度",Fullscreen:"全屏","Exit Fullscreen":"退出全屏","Picture-in-Picture":"画中画","Exit Picture-in-Picture":"退出画中画",Mute:"静音",Unmute:"开启音效","Playback Rate":"播放速度",Subtitles:"字幕","subtitles off":"关闭字幕",Captions:"内嵌字幕","captions off":"关闭内嵌字幕",Chapters:"节目段落","Close Modal Dialog":"关闭弹窗",Descriptions:"描述","descriptions off":"关闭描述","Audio Track":"音轨","You aborted the media playback":"视频播放被终止","A network error caused the media download to fail part-way.":"网络错误导致视频下载中途失败。","The media could not be loaded, either because the server or network failed or because the format is not supported.":"视频因格式不支持或者服务器或网络的问题无法加载。","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"由于视频文件损坏或是该视频使用了你的浏览器不支持的功能，播放终止。","No compatible source was found for this media.":"无法找到此视频兼容的源。","The media is encrypted and we do not have the keys to decrypt it.":"视频已加密，无法解密。","Play Video":"播放视频",Close:"关闭","Modal Window":"弹窗","This is a modal window":"这是一个弹窗","This modal can be closed by pressing the Escape key or activating the close button.":"可以按ESC按键或启用关闭按钮来关闭此弹窗。",", opens captions settings dialog":", 开启标题设置弹窗",", opens subtitles settings dialog":", 开启字幕设置弹窗",", opens descriptions settings dialog":", 开启描述设置弹窗",", selected":", 选择","captions settings":"字幕设定","Audio Player":"音频播放器","Video Player":"视频播放器",Replay:"重新播放","Progress Bar":"进度条","Volume Level":"音量","subtitles settings":"字幕设定","descriptions settings":"描述设定",Text:"文字",White:"白",Black:"黑",Red:"红",Green:"绿",Blue:"蓝",Yellow:"黄",Magenta:"紫红",Cyan:"青",Background:"背景",Window:"窗口",Transparent:"透明","Semi-Transparent":"半透明",Opaque:"不透明","Font Size":"字体尺寸","Text Edge Style":"字体边缘样式",None:"无",Raised:"浮雕",Depressed:"压低",Uniform:"均匀",Dropshadow:"下阴影","Font Family":"字体库","Proportional Sans-Serif":"比例无细体","Monospace Sans-Serif":"单间隔无细体","Proportional Serif":"比例细体","Monospace Serif":"单间隔细体",Casual:"舒适",Script:"手写体","Small Caps":"小型大写字体",Reset:"重置","restore all settings to the default values":"恢复全部设定至预设值",Done:"完成","Caption Settings Dialog":"字幕设定窗口","Beginning of dialog window. Escape will cancel and close the window.":"打开对话窗口。Escape键将取消并关闭对话窗口","End of dialog window.":"结束对话窗口","Seek to live, currently behind live":"尝试直播，当前为延时播放","Seek to live, currently playing live":"尝试直播，当前为实时播放","progress bar timing: currentTime={1} duration={2}":"{1}/{2}","{1} is loading.":"正在加载 {1}。","No content":"无内容",Color:"颜色",Opacity:"不透明度","Text Background":"文本背景","Caption Area Background":"字幕区域背景","Skip forward {1} seconds":"快进 {1} 秒","Skip backward {1} seconds":"快退 {1} 秒"},nF={Play:"播放",Pause:"暫停","Current Time":"目前時間",Duration:"總共時間","Remaining Time":"剩餘時間","Stream Type":"串流類型",LIVE:"直播",Loaded:"載入完畢",Progress:"進度",Fullscreen:"全螢幕","Exit Fullscreen":"退出全螢幕","Picture-in-Picture":"子母畫面","Exit Picture-in-Picture":"離開子母畫面",Mute:"靜音",Unmute:"開啟音效","Playback Rate":" 播放速率",Subtitles:"字幕","subtitles off":"關閉字幕",Captions:"內嵌字幕","captions off":"關閉內嵌字幕",Chapters:"章節","Close Modal Dialog":"關閉對話框",Descriptions:"描述","descriptions off":"關閉描述","Audio Track":"音軌","You aborted the media playback":"影片播放已終止","A network error caused the media download to fail part-way.":"網路錯誤導致影片下載失敗。","The media could not be loaded, either because the server or network failed or because the format is not supported.":"因格式不支援、伺服器或網路的問題無法載入媒體。","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"由於影片檔案損毀或是該影片使用了您的瀏覽器不支援的功能，已終止播放媒體。","No compatible source was found for this media.":"無法找到相容此媒體的來源。","The media is encrypted and we do not have the keys to decrypt it.":"媒體已加密，無法解密。","Play Video":"播放影片",Close:"關閉","Modal Window":"強制回應視窗","This is a modal window":"此為強制回應視窗","This modal can be closed by pressing the Escape key or activating the close button.":"可以按ESC按鍵或關閉按鈕來關閉此視窗。",", opens captions settings dialog":", 開啟標題設定對話框",", opens subtitles settings dialog":", 開啟字幕設定對話框",", opens descriptions settings dialog":", 開啟描述設定對話框",", selected":", 選擇","captions settings":"字幕設定","Audio Player":"音訊播放器","Video Player":"視訊播放器",Replay:"重播","Progress Bar":"進度列","Volume Level":"音量","subtitles settings":"字幕設定","descriptions settings":"描述設定",Text:"文字",White:"白",Black:"黑",Red:"紅",Green:"綠",Blue:"藍",Yellow:"黃",Magenta:"紫紅",Cyan:"青",Background:"背景",Window:"視窗",Transparent:"透明","Semi-Transparent":"半透明",Opaque:"不透明","Font Size":"字型尺寸","Text Edge Style":"字型邊緣樣式",None:"無",Raised:"浮雕",Depressed:"壓低",Uniform:"均勻","Drop shadow":"下陰影","Font Family":"字型系列","Proportional Sans-Serif":"調和間距無襯線字型","Monospace Sans-Serif":"等寬無襯線字型","Proportional Serif":"調和間距襯線字型","Monospace Serif":"等寬襯線字型",Casual:"輕便的",Script:"手寫體","Small Caps":"小型大寫字體",Reset:"重置","restore all settings to the default values":"恢復全部設定至預設值",Done:"完成","Caption Settings Dialog":"字幕設定對話框","Beginning of dialog window. Escape will cancel and close the window.":"開始對話視窗。離開會取消並關閉視窗","End of dialog window.":"結束對話視窗","Seek to live, currently behind live":"快轉至直播，目前為稍早畫面","Seek to live, currently playing live":"快轉至直播，目前為現場畫面","progress bar timing: currentTime={1} duration={2}":"{1}/{2}","{1} is loading.":"{1} 正在載入。","No content":"沒有內容",Color:"顏色",Opacity:"不透明度","Text Background":"文字背景","Caption Area Background":"字幕區域背景","Skip forward {1} seconds":"快轉 {1} 秒","Skip backward {1} seconds":"倒轉 {1} 秒"},sF=TC("linkUtil",(()=>{let e=JC();var t=parseInt(e.totalPageNo),i=null;const n=function(){var e={src:""};PC("#pageLink_audio_id").attr(e),PC("#pageLink_audio_id").parent().hide()},s=function(){let t=cF();var i=parseInt(PC("#pageLink_audio_id").attr("pageno"));t.isViewPagenosContainsPageno(i)||n();var s=e.get("spread_mode");PC("#main_divLink_id > div.link_layer").each((function(){var e=PC(this),i=parseInt(e.attr("pageno"));PC(this).removeClass("double-page single-page"),t.isViewPagenosContainsPageno(i)?("double"==s?PC(this).addClass("double-page"):PC(this).addClass("single-page"),"L"===t.isPositionByPageno(i)?PC(this).css("float","left"):PC(this).css("float","right")):PC("video",this).each((function(){this.pause()}))}))};return{stopPlayAudio:n,resetPageLinkFun:function(){let n=cF();i||function(){var t=e.url_Prefix,n=e.url_Suffix,s="jsons";e.customize_date&&(s=OC.jsonsPath+e.customize_date),PC.ajax({type:"GET",url:t+s+"/links.json"+n,async:!1,dataType:"json",success:function(e){i=e},error:function(e){}})}();let r=i;var a=e.get("url_Prefix"),o=e.get("url_Suffix"),l=e.get("link_alpha"),A=OC.prefixDivLink_Page;0==PC("#main_divLink_id").length&&PC("#book_main").append("<div id='main_divLink_id' class='link-layer' style='z-index: "+(t+100)+";'></div>");let c=PC("#main_divLink_id"),u=n.getViewPagenos().slice(0);u=u.sort();for(let e=0;e<u.length;e++){var h=A+u[e];0==PC("#"+h).length&&c.append("<div class='link_layer' pageno='"+u[e]+"' id='"+h+"'></div>")}if(s(),!r)return;let d=!!(navigator.userAgent.match(/(iPad)/)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1);PC("#main_divLink_id > div.link_layer").each((function(){var i=PC(this),s=parseInt(i.attr("pageno")),A=r["p"+s];return!A||A.length<=0||(n.isCurrentPagenosContainsPageno(s)?PC("> div",i).length>0||void PC.each(A,(function(){this.pageno=s;var n={};if(n.top=100*parseFloat(this.y)+"%",n.left=100*parseFloat(this.x)+"%",n.width=100*parseFloat(this.w)+"%",n.height=100*parseFloat(this.h)+"%",this.type===OC.Link_Type_Video){var r={background:"#000000",width:"100%",height:"99%"},A={};A.src=a+"attachments/"+this.target+o,A.controls="controls",A.playsinline="playsinline",A.autobuffer="autobuffer",A.id="star-video-"+ +new Date,KC&&1==this.autoplay&&(A.autoplay="autoplay");var c=null;c=(device.mobile()||device.ios())&&1==this.autoplay?PC("<video class='video-js vjs-has-started' muted='muted' autoplay='autoplay' playsinline='playsinline' controlsList='nodownload'>").css(r).attr(A):PC("<video class='video-js vjs-has-started' controlsList='nodownload' crossOrigin='anonymous'>").css(r).attr(A),KC&&1==this.autoplay&&(c[0].oncanplay=function(){this.play()}),(p=PC("<div>").addClass("linkBlockArea").css(n).css("z-index",t+150)).append(c),i.append(p);var u=!1;(device.mobile()||device.tablet()||d||1==this.autoplay)&&(u=!0);var h=e.get("dispLanguage"),g="en";"1"==h?(g="ja",hS.addLanguage(g,eF)):"2"==h?(g="en",hS.addLanguage(g,tF)):"3"==h?(g="zh-CN",hS.addLanguage(g,iF)):"4"==h&&(g="zh-TW",hS.addLanguage(g,nF)),hS(A.id,{language:g,controls:!0,fluid:!1,bigPlayButton:!1,preload:"auto",autoplay:1==this.autoplay,muted:u,inactivityTimeout:6e3,sources:[{src:A.src}]},(function(){if(device.ios()&&(device.tablet()||d)&&screenfull&&screenfull.raw){var e=PC(".vjs-fullscreen-control").clone(!1);e.removeClass("vjs-fullscreen-control").addClass("vjs-fullscreen-control-star"),PC(".vjs-fullscreen-control").after(e).remove();var t=PC("video")[0];WC(".vjs-fullscreen-control-star"),PC(".vjs-fullscreen-control-star").on("tapOne",(function(){screenfull.request(t)}))}this.on("play",(function(){PC("audio").each((function(){this.pause(),PC(this).parent().hide()}))}))})),jC()}else{n.opacity=l||0==l?l:.5,n.background=e.get("link_color");var p=PC("<div>").addClass("linkBlockArea").addClass("linkTwinkle").css(n).css("z-index",t+150).data("info",this).attr("pageno",s);this.type!=OC.Link_Type_URL||!this.target||0!=this.target.toLowerCase().indexOf("mailto:")&&0!=this.target.toLowerCase().indexOf("tel:")?p.addClass("linkBlock"):p.html('<a class="url-link" target="_blank" href="'+this.target+'"></a>'),i.append(p)}})):(PC(this).empty(),!0))})),0==l||setTimeout((function(){var t=PC("#book_main div.link-layer div.linkTwinkle"),i=parseFloat(e.get("link_twinkle"));t.each((function(){this.style["animation-iteration-count"]=i})),t.addClass("link_twinkle")}),250)}}}));var rF,aF={exports:{}};
/*! Hammer.JS - v2.0.7 - 2016-04-22
 * http://hammerjs.github.io/
 *
 * Copyright (c) 2016 Jorik Tangelder;
 * Licensed under the MIT license */rF=aF,function(e,t,i,n){var s,r=["","webkit","Moz","MS","ms","o"],a=t.createElement("div"),o=Math.round,l=Math.abs,A=Date.now;function c(e,t,i){return setTimeout(m(e,i),t)}function u(e,t,i){return!!Array.isArray(e)&&(h(e,i[t],i),!0)}function h(e,t,i){var s;if(e)if(e.forEach)e.forEach(t,i);else if(e.length!==n)for(s=0;s<e.length;)t.call(i,e[s],s,e),s++;else for(s in e)e.hasOwnProperty(s)&&t.call(i,e[s],s,e)}function d(t,i,n){var s="DEPRECATED METHOD: "+i+"\n"+n+" AT \n";return function(){var i=new Error("get-stack-trace"),n=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=e.console&&(e.console.warn||e.console.log);return r&&r.call(e.console,s,n),t.apply(this,arguments)}}s="function"!=typeof Object.assign?function(e){if(e===n||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var s=arguments[i];if(s!==n&&null!==s)for(var r in s)s.hasOwnProperty(r)&&(t[r]=s[r])}return t}:Object.assign;var g=d((function(e,t,i){for(var s=Object.keys(t),r=0;r<s.length;)(!i||i&&e[s[r]]===n)&&(e[s[r]]=t[s[r]]),r++;return e}),"extend","Use `assign`."),p=d((function(e,t){return g(e,t,!0)}),"merge","Use `assign`.");function f(e,t,i){var n,r=t.prototype;(n=e.prototype=Object.create(r)).constructor=e,n._super=r,i&&s(n,i)}function m(e,t){return function(){return e.apply(t,arguments)}}function C(e,t){return"function"==typeof e?e.apply(t&&t[0]||n,t):e}function I(e,t){return e===n?t:e}function v(e,t,i){h(E(t),(function(t){e.addEventListener(t,i,!1)}))}function B(e,t,i){h(E(t),(function(t){e.removeEventListener(t,i,!1)}))}function y(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function b(e,t){return e.indexOf(t)>-1}function E(e){return e.trim().split(/\s+/g)}function w(e,t,i){if(e.indexOf&&!i)return e.indexOf(t);for(var n=0;n<e.length;){if(i&&e[n][i]==t||!i&&e[n]===t)return n;n++}return-1}function Q(e){return Array.prototype.slice.call(e,0)}function _(e,t,i){for(var n=[],s=[],r=0;r<e.length;){var a=e[r][t];w(s,a)<0&&n.push(e[r]),s[r]=a,r++}return n=n.sort((function(e,i){return e[t]>i[t]})),n}function S(e,t){for(var i,s,a=t[0].toUpperCase()+t.slice(1),o=0;o<r.length;){if((s=(i=r[o])?i+a:t)in e)return s;o++}return n}var x=1;function k(t){var i=t.ownerDocument||t;return i.defaultView||i.parentWindow||e}var D="ontouchstart"in e,F=S(e,"PointerEvent")!==n,T=D&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),M="touch",R="mouse",N=24,L=["x","y"],U=["clientX","clientY"];function H(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){C(e.options.enable,[e])&&i.handler(t)},this.init()}function P(e,t,i){var s=i.pointers.length,r=i.changedPointers.length,a=1&t&&s-r==0,o=12&t&&s-r==0;i.isFirst=!!a,i.isFinal=!!o,a&&(e.session={}),i.eventType=t,function(e,t){var i=e.session,s=t.pointers,r=s.length;i.firstInput||(i.firstInput=O(t)),r>1&&!i.firstMultiple?i.firstMultiple=O(t):1===r&&(i.firstMultiple=!1);var a=i.firstInput,o=i.firstMultiple,c=o?o.center:a.center,u=t.center=G(s);t.timeStamp=A(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=V(c,u),t.distance=Y(c,u),function(e,t){var i=t.center,n=e.offsetDelta||{},s=e.prevDelta||{},r=e.prevInput||{};1!==t.eventType&&4!==r.eventType||(s=e.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=e.offsetDelta={x:i.x,y:i.y}),t.deltaX=s.x+(i.x-n.x),t.deltaY=s.y+(i.y-n.y)}(i,t),t.offsetDirection=q(t.deltaX,t.deltaY);var h,d,g=K(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=g.x,t.overallVelocityY=g.y,t.overallVelocity=l(g.x)>l(g.y)?g.x:g.y,t.scale=o?(h=o.pointers,Y((d=s)[0],d[1],U)/Y(h[0],h[1],U)):1,t.rotation=o?function(e,t){return V(t[1],t[0],U)+V(e[1],e[0],U)}(o.pointers,s):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,function(e,t){var i,s,r,a,o=e.lastInterval||t,A=t.timeStamp-o.timeStamp;if(8!=t.eventType&&(A>25||o.velocity===n)){var c=t.deltaX-o.deltaX,u=t.deltaY-o.deltaY,h=K(A,c,u);s=h.x,r=h.y,i=l(h.x)>l(h.y)?h.x:h.y,a=q(c,u),e.lastInterval=t}else i=o.velocity,s=o.velocityX,r=o.velocityY,a=o.direction;t.velocity=i,t.velocityX=s,t.velocityY=r,t.direction=a}(i,t);var p=e.element;y(t.srcEvent.target,p)&&(p=t.srcEvent.target),t.target=p}(e,i),e.emit("hammer.input",i),e.recognize(i),e.session.prevInput=i}function O(e){for(var t=[],i=0;i<e.pointers.length;)t[i]={clientX:o(e.pointers[i].clientX),clientY:o(e.pointers[i].clientY)},i++;return{timeStamp:A(),pointers:t,center:G(t),deltaX:e.deltaX,deltaY:e.deltaY}}function G(e){var t=e.length;if(1===t)return{x:o(e[0].clientX),y:o(e[0].clientY)};for(var i=0,n=0,s=0;s<t;)i+=e[s].clientX,n+=e[s].clientY,s++;return{x:o(i/t),y:o(n/t)}}function K(e,t,i){return{x:t/e||0,y:i/e||0}}function q(e,t){return e===t?1:l(e)>=l(t)?e<0?2:4:t<0?8:16}function Y(e,t,i){i||(i=L);var n=t[i[0]]-e[i[0]],s=t[i[1]]-e[i[1]];return Math.sqrt(n*n+s*s)}function V(e,t,i){i||(i=L);var n=t[i[0]]-e[i[0]],s=t[i[1]]-e[i[1]];return 180*Math.atan2(s,n)/Math.PI}H.prototype={
/**
       * should handle the inputEvent data and trigger the callback
       * @virtual
       */
handler:function(){},
/**
       * bind the events
       */
init:function(){this.evEl&&v(this.element,this.evEl,this.domHandler),this.evTarget&&v(this.target,this.evTarget,this.domHandler),this.evWin&&v(k(this.element),this.evWin,this.domHandler)},
/**
       * unbind the events
       */
destroy:function(){this.evEl&&B(this.element,this.evEl,this.domHandler),this.evTarget&&B(this.target,this.evTarget,this.domHandler),this.evWin&&B(k(this.element),this.evWin,this.domHandler)}};var W={mousedown:1,mousemove:2,mouseup:4},j="mousedown",J="mousemove mouseup";function z(){this.evEl=j,this.evWin=J,this.pressed=!1,H.apply(this,arguments)}f(z,H,{
/**
       * handle mouse events
       * @param {Object} ev
       */
handler:function(e){var t=W[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:R,srcEvent:e}))}});var X={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},$={2:M,3:"pen",4:R,5:"kinect"},Z="pointerdown",ee="pointermove pointerup pointercancel";function te(){this.evEl=Z,this.evWin=ee,H.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}e.MSPointerEvent&&!e.PointerEvent&&(Z="MSPointerDown",ee="MSPointerMove MSPointerUp MSPointerCancel"),f(te,H,{
/**
       * handle mouse events
       * @param {Object} ev
       */
handler:function(e){var t=this.store,i=!1,n=e.type.toLowerCase().replace("ms",""),s=X[n],r=$[e.pointerType]||e.pointerType,a=r==M,o=w(t,e.pointerId,"pointerId");1&s&&(0===e.button||a)?o<0&&(t.push(e),o=t.length-1):12&s&&(i=!0),o<0||(t[o]=e,this.callback(this.manager,s,{pointers:t,changedPointers:[e],pointerType:r,srcEvent:e}),i&&t.splice(o,1))}});var ie={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ne(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,H.apply(this,arguments)}function se(e,t){var i=Q(e.touches),n=Q(e.changedTouches);return 12&t&&(i=_(i.concat(n),"identifier")),[i,n]}f(ne,H,{handler:function(e){var t=ie[e.type];if(1===t&&(this.started=!0),this.started){var i=se.call(this,e,t);12&t&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:M,srcEvent:e})}}});var re={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ae="touchstart touchmove touchend touchcancel";function oe(){this.evTarget=ae,this.targetIds={},H.apply(this,arguments)}function le(e,t){var i=Q(e.touches),n=this.targetIds;if(3&t&&1===i.length)return n[i[0].identifier]=!0,[i,i];var s,r,a=Q(e.changedTouches),o=[],l=this.target;if(r=i.filter((function(e){return y(e.target,l)})),1===t)for(s=0;s<r.length;)n[r[s].identifier]=!0,s++;for(s=0;s<a.length;)n[a[s].identifier]&&o.push(a[s]),12&t&&delete n[a[s].identifier],s++;return o.length?[
// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
_(r.concat(o),"identifier"),o]:void 0}function Ae(){H.apply(this,arguments);var e=m(this.handler,this);this.touch=new oe(this.manager,e),this.mouse=new z(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function ce(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,ue.call(this,t)):12&e&&ue.call(this,t)}function ue(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var i={x:t.clientX,y:t.clientY};this.lastTouches.push(i);var n=this.lastTouches;setTimeout((function(){var e=n.indexOf(i);e>-1&&n.splice(e,1)}),2500)}}function he(e){for(var t=e.srcEvent.clientX,i=e.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var s=this.lastTouches[n],r=Math.abs(t-s.x),a=Math.abs(i-s.y);if(r<=25&&a<=25)return!0}return!1}f(oe,H,{handler:function(e){var t=re[e.type],i=le.call(this,e,t);i&&this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:M,srcEvent:e})}}),f(Ae,H,{
/**
       * handle mouse and touch events
       * @param {Hammer} manager
       * @param {String} inputEvent
       * @param {Object} inputData
       */
handler:function(e,t,i){var n=i.pointerType==M,s=i.pointerType==R;if(!(s&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)ce.call(this,t,i);else if(s&&he.call(this,i))return;this.callback(e,t,i)}},
/**
       * remove the event listeners
       */
destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var de=S(a.style,"touchAction"),ge=de!==n,pe="compute",fe="auto",me="manipulation",Ce="none",Ie="pan-x",ve="pan-y",Be=function(){if(!ge)return!1;var t={},i=e.CSS&&e.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){t[n]=!i||e.CSS.supports("touch-action",n)})),t}();function ye(e,t){this.manager=e,this.set(t)}ye.prototype={
/**
       * set the touchAction value on the element or enable the polyfill
       * @param {String} value
       */
set:function(e){e==pe&&(e=this.compute()),ge&&this.manager.element.style&&Be[e]&&(this.manager.element.style[de]=e),this.actions=e.toLowerCase().trim()},
/**
       * just re-set the touchAction value
       */
update:function(){this.set(this.manager.options.touchAction)},
/**
       * compute the value for the touchAction property based on the recognizer's settings
       * @returns {String} value
       */
compute:function(){var e=[];return h(this.manager.recognizers,(function(t){C(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(b(e,Ce))return Ce;var t=b(e,Ie),i=b(e,ve);return t&&i?Ce:t||i?t?Ie:ve:b(e,me)?me:fe}(e.join(" "))},
/**
       * this method is called on each input cycle and provides the preventing of the browser behavior
       * @param {Object} input
       */
preventDefaults:function(e){var t=e.srcEvent,i=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var n=this.actions,s=b(n,Ce)&&!Be[Ce],r=b(n,ve)&&!Be[ve],a=b(n,Ie)&&!Be[Ie];if(s){var o=1===e.pointers.length,l=e.distance<2,A=e.deltaTime<250;if(o&&l&&A)return}if(!a||!r)return s||r&&6&i||a&&i&N?this.preventSrc(t):void 0}},
/**
       * call preventDefault to prevent the browser's default behavior (scrolling in most cases)
       * @param {Object} srcEvent
       */
preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var be=32;function Ee(e){this.options=s({},this.defaults,e||{}),this.id=x++,this.manager=null,this.options.enable=I(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function we(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Qe(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function _e(e,t){var i=t.manager;return i?i.get(e):e}function Se(){Ee.apply(this,arguments)}function xe(){Se.apply(this,arguments),this.pX=null,this.pY=null}function ke(){Se.apply(this,arguments)}function De(){Ee.apply(this,arguments),this._timer=null,this._input=null}function Fe(){Se.apply(this,arguments)}function Te(){Se.apply(this,arguments)}function Me(){Ee.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Re(e,t){return(t=t||{}).recognizers=I(t.recognizers,Re.defaults.preset),new Ne(e,t)}function Ne(e,t){var i;this.options=s({},Re.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((i=this).options.inputClass||(F?te:T?oe:D?Ae:z))(i,P),this.touchAction=new ye(this,this.options.touchAction),Le(this,!0),h(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function Le(e,t){var i,n=e.element;n.style&&(h(e.options.cssProps,(function(s,r){i=S(n.style,r),t?(e.oldCssProps[i]=n.style[i],n.style[i]=s):n.style[i]=e.oldCssProps[i]||""})),t||(e.oldCssProps={}))}Ee.prototype={
/**
       * @virtual
       * @type {Object}
       */
defaults:{},
/**
       * set options
       * @param {Object} options
       * @return {Recognizer}
       */
set:function(e){return s(this.options,e),this.manager&&this.manager.touchAction.update(),this},
/**
       * recognize simultaneous with an other recognizer.
       * @param {Recognizer} otherRecognizer
       * @returns {Recognizer} this
       */
recognizeWith:function(e){if(u(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=_e(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},
/**
       * drop the simultaneous link. it doesnt remove the link on the other recognizer.
       * @param {Recognizer} otherRecognizer
       * @returns {Recognizer} this
       */
dropRecognizeWith:function(e){return u(e,"dropRecognizeWith",this)||(e=_e(e,this),delete this.simultaneous[e.id]),this},
/**
       * recognizer can only run when an other is failing
       * @param {Recognizer} otherRecognizer
       * @returns {Recognizer} this
       */
requireFailure:function(e){if(u(e,"requireFailure",this))return this;var t=this.requireFail;return-1===w(t,e=_e(e,this))&&(t.push(e),e.requireFailure(this)),this},
/**
       * drop the requireFailure link. it does not remove the link on the other recognizer.
       * @param {Recognizer} otherRecognizer
       * @returns {Recognizer} this
       */
dropRequireFailure:function(e){if(u(e,"dropRequireFailure",this))return this;e=_e(e,this);var t=w(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},
/**
       * has require failures boolean
       * @returns {boolean}
       */
hasRequireFailures:function(){return this.requireFail.length>0},
/**
       * if the recognizer can recognize simultaneous with an other recognizer
       * @param {Recognizer} otherRecognizer
       * @returns {Boolean}
       */
canRecognizeWith:function(e){return!!this.simultaneous[e.id]},
/**
       * You should use `tryEmit` instead of `emit` directly to check
       * that all the needed recognizers has failed before emitting.
       * @param {Object} input
       */
emit:function(e){var t=this,i=this.state;function n(i){t.manager.emit(i,e)}i<8&&n(t.options.event+we(i)),n(t.options.event),e.additionalEvent&&n(e.additionalEvent),i>=8&&n(t.options.event+we(i))},
/**
       * Check that all the require failure recognizers has failed,
       * if true, it emits a gesture event,
       * otherwise, setup the state to FAILED.
       * @param {Object} input
       */
tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=be},
/**
       * can we emit?
       * @returns {boolean}
       */
canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},
/**
       * update the recognizer
       * @param {Object} inputData
       */
recognize:function(e){var t=s({},e);if(!C(this.options.enable,[this,t]))return this.reset(),void(this.state=be);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},
/**
       * return the state of the recognizer
       * the actual recognizing happens in this method
       * @virtual
       * @param {Object} inputData
       * @returns {Const} STATE
       */
process:function(e){},
// jshint ignore:line
/**
       * return the preferred touch-action
       * @virtual
       * @returns {Array}
       */
getTouchAction:function(){},
/**
       * called when the gesture isn't allowed to recognize
       * like when another is being recognized or it is disabled
       * @virtual
       */
reset:function(){}},f(Se,Ee,{
/**
       * @namespace
       * @memberof AttrRecognizer
       */
defaults:{
/**
         * @type {Number}
         * @default 1
         */
pointers:1},
/**
       * Used to check if it the recognizer receives valid input, like input.distance > 10.
       * @memberof AttrRecognizer
       * @param {Object} input
       * @returns {Boolean} recognized
       */
attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},
/**
       * Process the input and return the state for the recognizer
       * @memberof AttrRecognizer
       * @param {Object} input
       * @returns {*} State
       */
process:function(e){var t=this.state,i=e.eventType,n=6&t,s=this.attrTest(e);return n&&(8&i||!s)?16|t:n||s?4&i?8|t:2&t?4|t:2:be}}),f(xe,Se,{
/**
       * @namespace
       * @memberof PanRecognizer
       */
defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(ve),e&N&&t.push(Ie),t},directionTest:function(e){var t=this.options,i=!0,n=e.distance,s=e.direction,r=e.deltaX,a=e.deltaY;return s&t.direction||(6&t.direction?(s=0===r?1:r<0?2:4,i=r!=this.pX,n=Math.abs(e.deltaX)):(s=0===a?1:a<0?8:16,i=a!=this.pY,n=Math.abs(e.deltaY))),e.direction=s,i&&n>t.threshold&&s&t.direction},attrTest:function(e){return Se.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Qe(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),f(ke,Se,{
/**
       * @namespace
       * @memberof PinchRecognizer
       */
defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ce]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),f(De,Ee,{
/**
       * @namespace
       * @memberof PressRecognizer
       */
defaults:{event:"press",pointers:1,time:251,
// minimal time of the pointer to be pressed
threshold:9},getTouchAction:function(){return[fe]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance<t.threshold,s=e.deltaTime>t.time;if(this._input=e,!n||!i||12&e.eventType&&!s)this.reset();else if(1&e.eventType)this.reset(),this._timer=c((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return be},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=A(),this.manager.emit(this.options.event,this._input)))}}),f(Fe,Se,{
/**
       * @namespace
       * @memberof RotateRecognizer
       */
defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ce]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),f(Te,Se,{
/**
       * @namespace
       * @memberof SwipeRecognizer
       */
defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return xe.prototype.getTouchAction.call(this)},attrTest:function(e){var t,i=this.options.direction;return 30&i?t=e.overallVelocity:6&i?t=e.overallVelocityX:i&N&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&i&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&l(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Qe(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),f(Me,Ee,{
/**
       * @namespace
       * @memberof PinchRecognizer
       */
defaults:{event:"tap",pointers:1,taps:1,interval:300,
// max time between the multi-tap taps
time:250,
// max time of the pointer to be down (like finger on the screen)
threshold:9,
// a minimal movement is ok, but keep it low
posThreshold:10},getTouchAction:function(){return[me]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance<t.threshold,s=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(n&&s&&i){if(4!=e.eventType)return this.failTimeout();var r=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||Y(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&r?this.count+=1:this.count=1,this._input=e,0==this.count%t.taps)return this.hasRequireFailures()?(this._timer=c((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return be},failTimeout:function(){return this._timer=c((function(){this.state=be}),this.options.interval,this),be},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Re.VERSION="2.0.7",Re.defaults={
/**
       * set if DOM events are being triggered.
       * But this is slower and unused by simple implementations, so disabled by default.
       * @type {Boolean}
       * @default false
       */
domEvents:!1,
/**
       * The value for the touchAction property/fallback.
       * When set to `compute` it will magically set the correct value based on the added recognizers.
       * @type {String}
       * @default compute
       */
touchAction:pe,
/**
       * @type {Boolean}
       * @default true
       */
enable:!0,
/**
       * EXPERIMENTAL FEATURE -- can be removed/changed
       * Change the parent input target element.
       * If Null, then it is being set the to main element.
       * @type {Null|EventTarget}
       * @default null
       */
inputTarget:null,
/**
       * force an input class
       * @type {Null|Function}
       * @default null
       */
inputClass:null,
/**
       * Default recognizer setup when calling `Hammer()`
       * When creating a new Manager these will be skipped.
       * @type {Array}
       */
preset:[
// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
[Fe,{enable:!1}],[ke,{enable:!1},["rotate"]],[Te,{direction:6}],[xe,{direction:6},["swipe"]],[Me],[Me,{event:"doubletap",taps:2},["tap"]],[De]],
/**
       * Some CSS properties can be used to improve the working of Hammer.
       * Add them to this method and they will be set when creating a new Manager.
       * @namespace
       */
cssProps:{
/**
         * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.
         * @type {String}
         * @default 'none'
         */
userSelect:"none",
/**
         * Disable the Windows Phone grippers when pressing an element.
         * @type {String}
         * @default 'none'
         */
touchSelect:"none",
/**
         * Disables the default callout shown when you touch and hold a touch target.
         * On iOS, when you touch and hold a touch target such as a link, Safari displays
         * a callout containing information about the link. This property allows you to disable that callout.
         * @type {String}
         * @default 'none'
         */
touchCallout:"none",
/**
         * Specifies whether zooming is enabled. Used by IE10>
         * @type {String}
         * @default 'none'
         */
contentZooming:"none",
/**
         * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.
         * @type {String}
         * @default 'none'
         */
userDrag:"none",
/**
         * Overrides the highlight color shown when the user taps a link or a JavaScript
         * clickable element in iOS. This property obeys the alpha value, if specified.
         * @type {String}
         * @default 'rgba(0,0,0,0)'
         */
tapHighlightColor:"rgba(0,0,0,0)"}},Ne.prototype={
/**
       * set options
       * @param {Object} options
       * @returns {Manager}
       */
set:function(e){return s(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},
/**
       * stop recognizing for this session.
       * This session will be discarded, when a new [input]start event is fired.
       * When forced, the recognizer cycle is stopped immediately.
       * @param {Boolean} [force]
       */
stop:function(e){this.session.stopped=e?2:1},
/**
       * run the recognizers!
       * called by the inputHandler function on every movement of the pointers (touches)
       * it walks through all the recognizers and tries to detect the gesture that is being made
       * @param {Object} inputData
       */
recognize:function(e){var t=this.session;if(!t.stopped){var i;this.touchAction.preventDefaults(e);var n=this.recognizers,s=t.curRecognizer;(!s||s&&8&s.state)&&(s=t.curRecognizer=null);for(var r=0;r<n.length;)i=n[r],2===t.stopped||// 1
s&&i!=s&&// 2
!i.canRecognizeWith(s)?i.reset():i.recognize(e),!s&&14&i.state&&(s=t.curRecognizer=i),r++}},
/**
       * get a recognizer by its event name.
       * @param {Recognizer|String} recognizer
       * @returns {Recognizer|Null}
       */
get:function(e){if(e instanceof Ee)return e;for(var t=this.recognizers,i=0;i<t.length;i++)if(t[i].options.event==e)return t[i];return null},
/**
       * add a recognizer to the manager
       * existing recognizers with the same event name will be removed
       * @param {Recognizer} recognizer
       * @returns {Recognizer|Manager}
       */
add:function(e){if(u(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},
/**
       * remove a recognizer by name or instance
       * @param {Recognizer|String} recognizer
       * @returns {Manager}
       */
remove:function(e){if(u(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,i=w(t,e);-1!==i&&(t.splice(i,1),this.touchAction.update())}return this},
/**
       * bind event
       * @param {String} events
       * @param {Function} handler
       * @returns {EventEmitter} this
       */
on:function(e,t){if(e!==n&&t!==n){var i=this.handlers;return h(E(e),(function(e){i[e]=i[e]||[],i[e].push(t)})),this}},
/**
       * unbind event, leave emit blank to remove all handlers
       * @param {String} events
       * @param {Function} [handler]
       * @returns {EventEmitter} this
       */
off:function(e,t){if(e!==n){var i=this.handlers;return h(E(e),(function(e){t?i[e]&&i[e].splice(w(i[e],t),1):delete i[e]})),this}},
/**
       * emit event to the listeners
       * @param {String} event
       * @param {Object} data
       */
emit:function(e,i){this.options.domEvents&&function(e,i){var n=t.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=i,i.target.dispatchEvent(n)}(e,i);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){i.type=e,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var s=0;s<n.length;)n[s](i),s++}},
/**
       * destroy the manager and unbinds all events
       * it doesn't unbind dom events, that is the user own responsibility
       */
destroy:function(){this.element&&Le(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},s(Re,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:be,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:N,DIRECTION_ALL:30,Manager:Ne,Input:H,TouchAction:ye,TouchInput:oe,MouseInput:z,PointerEventInput:te,TouchMouseInput:Ae,SingleTouchInput:ne,Recognizer:Ee,AttrRecognizer:Se,Tap:Me,Pan:xe,Swipe:Te,Pinch:ke,Rotate:Fe,Press:De,on:v,off:B,each:h,merge:p,extend:g,assign:s,inherit:f,bindFn:m,prefixed:S}),(void 0!==e?e:"undefined"!=typeof self?self:{}).Hammer=Re,rF.exports?rF.exports=Re:e.Hammer=Re}(window,document);const oF=RC(aF.exports);function lF(e,t,i){var n,s=i||{},r=s.noTrailing,a=void 0!==r&&r,o=s.noLeading,l=void 0!==o&&o,A=s.debounceMode,c=void 0===A?void 0:A,u=!1,h=0;function d(){n&&clearTimeout(n)}function g(){for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];var o=this,A=Date.now()-h;function g(){h=Date.now(),t.apply(o,s)}function p(){n=void 0}u||(l||!c||n||g(),d(),void 0===c&&A>e?l?(h=Date.now(),a||(n=setTimeout(c?p:g,e))):g():!0!==a&&(n=setTimeout(c?p:g,void 0===c?e-A:e)))}return g.cancel=function(e){var t=(e||{}).upcomingOnly,i=void 0!==t&&t;d(),u=!i},g}function AF(e,t,i){var n={}.atBegin;return lF(e,t,{debounceMode:!1!==(void 0!==n&&n)})}const cF=TC("turnUtil",(()=>{const e=JC(),t=sF(),i=RF(),n=cAe(),s=uAe(),r=PDe(),a=Wfe(),o=bme(),l=mTe();let A=parseInt(e.totalPageNo);e.set("currentZoomScale",1);let c=zh(null),u=zh(""),h=zh(!1),d=zh(!1),g=Lh({fromType:"turn_page",fromPage:0,targetPage:0});Pp(d,(t=>{(e.get("currentZoomScale")>1||1==e.get("totalPageNo")||!0===a.screenshotStatus)&&(t=!0),d.value=t,PC("#book_main").turn("disable",t)}));const p=function(t){var i=e.url_Prefix,n=e.url_Suffix,s=OC.pageImgPath,r=e.get("imgType")||OC.pageImgType,a=encodeURI(i+s+t+r+n);return t>A||t<1?"":a},f=function(t){let i=e.get("spread_mode"),n=e.get("direction"),s=e.get("hasCover");return"single"!=i&&("rtl"==n&&!s||"ltr"==n&&s?t%2==1?"R":"L":t%2!=1?"R":"L")},m=function(t){let i=!!(navigator.userAgent.match(/(iPad)/)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),n="";if(device.mobile())if(void 0===t){n=PC("#index_main > div.pack_book_div").width()>PC("#index_main > div.pack_book_div").height()?e.get("spread_mode_init"):"single"}else n=t?e.get("spread_mode_init"):"single";else if(device.tablet()||i){let t=PC("#index_main > div.pack_book_div").width();n=PC("#index_main > div.pack_book_div").height()+50>t?"single":e.get("spread_mode_init")}else n=e.get("spread_mode_init");return e.set("spread_mode",n),"single"==n?PC("#book_main").data("single_fast_pageing",!0):PC("#book_main").data("single_fast_pageing",!1),n},C=function(){let t=e.get("first_width"),i=e.get("first_height"),n=e.get("spread_mode");"single"===n||(t*=2);let s=Math.round(PC("#index_main > div.pack_book_div").width()),r=Math.round(PC("#index_main > div.pack_book_div").height());e.set("book_max_width",s),e.set("book_max_height",r);let a=0,o=0;t/i>=s/r?(a=s,o=Math.round(i*(s/t))):(o=r,a=Math.round(t*(r/i))),a%2==1&&a++,e.set("book_width",a),e.set("book_height",o),"single"===n?e.set("page_width",a):e.set("page_width",Math.floor(a/2)),e.set("page_height",o)},I=function(){let t=e.get("currentZoomScale"),i=e.get("book_width"),n=e.get("book_height"),s=Math.floor(i*t);return s%2==1&&s--,{width:s,height:Math.floor(n*t)}},v=function(){let e=PC("#book_main").turn("view"),t=PC.inArray(0,e);return t>-1&&e.splice(t,1),e},B=function(){let a=parseInt(e.get("totalPageNo")),A=e.get("direction"),c=e.get("hasCover"),u=e.get("readProgress"),h=e.get("spread_mode"),d=I();PC("#book_main").turn({width:d.width,height:d.height,elevation:100,duration:800,
// 延迟时间
acceleration:!1,
// 是否加速
page:u,
// 当前显示页码
cover:c,
// 是否有封面
pages:a,
// 总页码
direction:A,
// 翻页方向
display:h,
// 单双页模式
when:{missing:function(e,t){for(let i=0;i<t.length;i++){let e=t[i],n=PC('<div style="background: #cac9cd;">                                        <div class="book-bg-active book_page" id="book_page_'+e+'">                                            </div>                                        <img class="acti-page-pen-img" pageno="'+e+'" id="pen_img_p'+e+'">                                        <canvas class="bookCanvas" id="search_canvas_'+e+'" style="z-index: '+(a+20)+';"></canvas>                                    </div>');PC("#book_main").turn("addPage",n,e)}0===PC("#main_painter_id").length&&n.initPainter()},turning:function(){let i=e.get("spread_mode"),a=PC("div.p-temporal > div").attr("pageno"),l=v(),A=l[0];"single"==i&&a!=A&&PC("div.p-temporal > div").empty(),window.pageTurning=!0,o.commonState.printDialogVisible=!1,s.memoState.showViewList.length=0,t.stopPlayAudio(),PC("#main_divLink_id").html(""),n.painterInfo.linesTotal>0&&n.painterInfo.openPainterTool&&n.saveCanvasToImg(!0,l),PC("#main_painter_id").css("pointer-events","none"),r.stopDelayedSendLog()},turned:function(){window.pageTurning=!1,device.mobile()&&(window.page_pressed=!1);let a=v();o.changeHistoryPram("pNo",a[0]);for(var A=0;A<a.length;A++){var c=a[A],u=new Image;u.pageno=c,u.onload=function(){PC("#book_page_"+this.pageno).addClass("book-bg-active")},u.src=p(c)}PC("div.p-temporal > div").empty(),t.resetPageLinkFun(),_(),function(e){if(v()[0]!=e)return!1;var t=PC("div.p-temporal > div");if(0==t.length)return!1;t.empty();let i=document.createElement("img");i.src=p(e),t.append(i).attr("pageno",e)}(v()[0]),l.initShareUrl(),r.sendLogByActionTpye(OC.kinesis_log_actionType_paging),r.sendKinesisDetailLog(g.fromType,g.fromPage,g.targetPage),r.sendKinesisDetailLog("read"),r.sendKinesisViewLog(),g.fromType="turn_page",g.fromPage=0,g.targetPage=0,s.renderPageMemoList(),n.resetPagePainterLayer(),n.loadOldPageUrl(),n.painterInfo.openPainterTool&&PC("#main_painter_id").css("pointer-events",""),b();let h=H(Math.max(...a));PC("#goto_page_input").val(h),PC("#acti-header-container .acti_book_pageno").html(h),"1"==e.get("compatibleFlg")?(PC(".bookCanvasBox")&&PC(".bookCanvasBox").css({display:"block"}),i.fullRect()):i.pdfDocument&&i.rendingTextLayer(a).then((()=>{i.searchwithinPDF("highlight",a)})),o.updateLocalProgress(Math.max(1,...a)),PC("#goto_page_input").val(H(a[0])),y(a)},pressed:function(){window.page_pressed=!0,PC("#book_main div.link-layer").hide()},start:function(t){if(window.pageTurning);else{let i=e.get("spread_mode");v()[0],"single"==i&&0==PC("div.p-temporal > div").length&&PC(t.target).flip("_moveFoldingPage",!0)}return!0},end:function(){device.mobile()&&(window.page_pressed=!1),PC("#book_main div.link-layer").show()}}})},y=e=>{window.parent&&window.parent.viewerNotifyWebPaged&&window.parent.viewerNotifyWebPaged(e[0],e[1]||0)},b=()=>{let t=parseInt(e.get("totalPageNo")),i=e.get("direction");PC("div.toolbar_button").addClass("active").removeClass("disabled"),M(1)&&("ltr"===i?PC("div.toolbar-previous, div.toolbar-first").removeClass("active").addClass("disabled"):PC("div.toolbar-next, div.toolbar-last").removeClass("active").addClass("disabled")),M(t)&&("ltr"===i?PC("div.toolbar-next, div.toolbar-last").removeClass("active").addClass("disabled"):PC("div.toolbar-previous, div.toolbar-first").removeClass("active").addClass("disabled"))},E=function(){let t=e.get("book_width"),i=e.get("book_height"),n=e.get("book_max_width"),s=e.get("book_max_height");i<=s?PC("#book_main").css("top",(s-i)/2):PC("#book_main").css("top",0),t<=n?PC("#book_main").css("left",(n-t)/2):PC("#book_main").css("left",0)},w=function(){let t=e.get("pageHammerObject");t.off("swiperight"),t.off("swipeleft"),d.value=!0},Q=function(){let t=e.get("pageHammerObject");t.on("swiperight",(function(e){e.preventDefault();let t=PC("#book_main").turn("options");t.direction&&"rtl"===t.direction?PC("#book_main").turn("next"):PC("#book_main").turn("previous")})),t.on("swipeleft",(function(e){e.preventDefault();let t=PC("#book_main").turn("options");t.direction&&"rtl"===t.direction?PC("#book_main").turn("previous"):PC("#book_main").turn("next")})),d.value=!1},_=()=>{var e;let t=OC.prefixCanvas_Toc,i=v(),n=PC("#"+t+i[0]),s=!!(navigator.userAgent.match(/(iPad)/)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1);if(device.mobile()||(device.tablet()||s)&&!device.windowsTablet()){if(PC("#acti-mobile-toc-content div.page_group.active").removeClass("active"),n.length>0){PC.each(i,(function(){PC("#"+t+this).parents("div.page_group:first").addClass("active")}));let e=PC("#acti-mobile-toc-content"),n=PC("#"+t+i[0]).parents("div.page_group:first").width(),s=PC("#acti-mobile-toc-content").width();if(1===i.length){let r=PC("#"+t+i[0]).parents("div.page_group:first").position().left+e.scrollLeft();e.scrollLeft(r-s/2+n/2+8)}else{let r=0;PC.each(i,(function(){PC("#"+t+this).parents("div.page-left:first").length>0&&(r=PC("#"+t+this).parents("div.page-left:first").position().left+e.scrollLeft())})),e.scrollLeft(r-s/2+n+8+4)}PC("#acti-mobile-toc-content > div").trigger("touchmove.top")}}else{let t=i[0];PC("#toc-content-box .image-border").removeClass("image-border right_border left_border");let n=PC("#pageno_"+t).parent(),s=parseInt(n.attr("data-idx"));if(i.map((e=>{PC(`#toc-content-box #pageno_${e}`).addClass("image-border")})),c){let i=PC(`#pageno_${t}`).height(),n=PC(".scroll-content").height()/2,r=(null==(e=document.getElementsByClassName("toc-page-line")[s])?void 0:e.offsetTop)||0;c.value.setScrollTop(r-n+i)}}},S=function(){let t=I();PC("#book_main").turn("size",t.width,t.height),"1"==e.get("compatibleFlg")?(k(),x()):D(),n.resetPainterCanvasScale()};lF(100,(()=>{}));const x=()=>{PC("#book_main").turn("view").map((e=>{PC("#search_canvas_"+e).width("100%")}))},k=()=>{PC(".book-bg-active").each((function(t){if(0===PC(this).children().length){let t=PC(this).attr("id").replace(/[^0-9]/gi,""),i=e.url_Prefix,n=e.url_Suffix,s=OC.compatiblePageImgPath,r=e.get("imgType")||OC.pageImgType,a=encodeURI(i+s+t+r+n),o=PC("<div class='expandDiv'></div>");PC(this).append(o);let l="url("+a+") center center / contain no-repeat";o.css({width:"100%",height:"100%",background:l});let A=PC(this).css("backgroundPosition");A&&o.css({backgroundPosition:A})}}))},D=AF(200,(async()=>{if(PC(".canvasWrapper").remove(),1===e.get("currentZoomScale"))return PC(".textLayer").show(),void PC(".textLayer").css("--scale-factor",e.get("page_width")/e.get("first_width"));var t=v();let n=Yh(i.pdfDocument),s=I(),r=U(),a=r.width,o=r.height,l=s.height/e.get("first_height");PC(".textLayer").css("--scale-factor",l),t.map((e=>{const t=document.createElement("canvas"),i=document.createElement("div");i.className="canvasWrapper",i.style.width="100%",i.appendChild(t);let s=document.getElementById("book_page_"+e);const l=t.getContext("2d");n.getPage(e).then((e=>{const n=e.getViewport({scale:1*CSS_UNITS});let A,c;n.width/n.height>=a/o?(A=a,c=n.height*(a/n.width)):(c=o,A=n.width*(o/n.height)),i.style.height=o-c<=2?"100%":c/o*100+"%",t.width=A,t.height=c;const u=e.getViewport({scale:r.width/n.width*CSS_UNITS});e.render({canvasContext:l,viewport:u,layers:{text:!1,annotations:!1,vector:!1,raster:!0}}).promise.then((()=>{s.appendChild(i),PC(".textLayer").show()}))}))}))})),F=function(t,i){if(a.screenshotStatus)return;var n=PC.event.fix(t),s=PC(n.target).hasClass("link_layer")?PC(n.target):PC(n.target).parents("div.link_layer:first"),r=PC(n.target).hasClass("zoom-button")?PC(n.target):PC(n.target).parents(".zoom-button:first"),o=PC(n.target).hasClass("painter-layer")?PC(n.target):PC(n.target).parents(".painter-layer:first");!s.length&&!r.length&&o.length,"0"===e.get("compatibleFlg")&&PC(".textLayer").hide();var l,A=e.get("currentZoomScale");if(e.set("currentZoomScale",i),n.clientX)l=n;else if(t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches.length)l=t.originalEvent.changedTouches[0];else{if(!t.changedPointers||!t.changedPointers.length)return!1;l=t.changedPointers[0]}var c=l.clientX-parseInt(PC("div.pack_book_div").css("margin-left")),u=l.clientY;PC("#acti-header-container").length&&(u-=PC("#acti-header-container").height()),r.length>0&&(c=PC(window).width()/2,u=PC(window).height()/2);var h=c-PC("#book_main")[0].offsetLeft,d=u-PC("#book_main")[0].offsetTop||0;if(S(),device.windows()){let e=N();e.off("panstart"),e.off("panmove"),e.off("panend")}else{var g=PC.isTouch?{down:"touchstart",move:"touchmove",up:"touchend"}:{down:"mousedown",move:"mousemove",up:"mouseup"};PC("#book_main").off(g.down+".pageZoom"),PC(document).off(g.move+".pageZoom"),PC(document).off(g.up+".pageZoom")}if(1!=i){var p=PC("#book_main").width(),f=PC("#book_main").height(),m=e.get("book_max_width"),C=e.get("book_max_height");h=h/A*i-c,d=d/A*i-u;var I=p-m,v=f-C;p>=m?(h<0?h=0:I<h&&(h=I),h=-h):h=(m-p)/2,f>=C?(d<0?d=0:v<d&&(d=v),d=-d):d=(C-f)/2,PC("#book_main").css({left:h+"px",top:d+"px"}),L(),w()}else E(),w(),Q()},T=t=>{let i=e.get("spread_mode"),n=m(t);PC("#book_main").turn("display",n),i!==n&&"double"===n&&y(v())},M=function(e){let t=v();return PC.inArray(e,t)>-1};var R=null;const N=()=>(R||(R=new oF.Manager(document.getElementById("book_main"),{clearStore:!0})).add(new oF.Pan({threshold:0,pointers:0})),R),L=function(){if(device.windows()){let e=N();e.on("panstart",i),e.on("panmove",n),e.on("panend",s)}else{var t=PC.isTouch?{down:"touchstart",move:"touchmove",up:"touchend"}:{down:"mousedown",move:"mousemove",up:"mouseup"};PC("#book_main").on(t.down+".pageZoom",i),PC(document).on(t.move+".pageZoom",n),PC(document).on(t.up+".pageZoom",s)}function i(e){if(e.targetTouches&&e.targetTouches.length>1)return!1;if(PC(e.target).closest(".memo-content-box").length>0)return;if(PC(e.target).closest(".jsPanel-theme-sd-memo").length>0)return;if(PC(e.target).closest("#main_painter_id").length>0)return;if(a.screenshotStatus)return;var t,i=parseInt(PC("#book_main").css("left")),n=parseInt(PC("#book_main").css("top"));if(e.clientX)t=e;else if(e.originalEvent)t=e.originalEvent.changedTouches[0];else{if(!e.srcEvent)return;t=e.srcEvent}let s={x:i,y:n,clientX:t.clientX,clientY:t.clientY,droping:!0};PC("#book_main").data("dev",s)}function n(t){if(t.targetTouches&&t.targetTouches.length>1)return!1;var i=PC("#book_main").data("dev");if(i&&i.droping){var n;if(t.preventDefault(),t.clientX)n=t;else if(t.originalEvent)n=t.originalEvent.changedTouches[0];else{if(!t.srcEvent)return;n=t.srcEvent}var s=n.clientX,r=n.clientY,a=s-i.clientX+i.x,o=r-i.clientY+i.y,l=PC("#book_main").width(),A=PC("#book_main").height(),c=e.get("book_max_width"),u=e.get("book_max_height"),h={};l>=c&&(h.left=a+"px"),A>=u&&(h.top=o+"px"),PC("#book_main").css(h)}}function s(t){var i=PC("#book_main").width(),n=PC("#book_main").height(),s=e.get("book_max_width"),r=e.get("book_max_height"),a=parseInt(PC("#book_main").css("left")),o=parseInt(PC("#book_main").css("top")),l=i-s,A=n-r,c={};i>=s&&(a>0?c.left="0px":l<-a&&(c.left=-l+"px")),n>=r&&(o>0?c.top="0px":A<-o&&(c.top=-A+"px")),PC("#book_main").animate(c,100),PC("#book_main").data("dev",null)}},U=function(){let t,i,n=e.get("spread_mode"),s=I();return t="single"===n?s.width:s.width/2,i=s.height,{width:t,height:i}},H=t=>{let i=e.get("customizeJsons"),n=t;return i.map(((e,i)=>{t==i+1&&(n=e.show)})),n},P=t=>e.get("userNum")+"_"+e.get("shareBaseUrl")+"_"+e.get("contentNum")+"_"+t+"_"+(e.get("embed_flg")||0),O=AF(10,(()=>{if(!h.value){if(n.saveCanvasToImg(n.painterInfo.openPainterTool),e.set("currentZoomScale",1),d.value=!1,T(),C(),S(),E(),G(),_(),n.resetPagePainterLayer(),"desktop"!==device.type){s.renderPageMemoList();let e=H(Math.max(...v()));PC("#goto_page_input").val(e),PC("#acti-header-container .acti_book_pageno").html(e)}a.setScreenshotWH(),t.resetPageLinkFun(),PC.isTouch?(PC("#book_main").off("touchstart.pageZoom"),PC(document).off("touchmove.pageZoom"),PC(document).off("touchend.pageZoom")):(PC("#book_main").off("mousedown.pageZoom"),PC(document).off("mousemove.pageZoom"),PC(document).off("mouseup.pageZoom")),s.resetAllMemoPosition()}})),G=()=>{if(n.painterInfo.openPainterTool||i.show_dialog){let e=PC(".painter_dialog");if(i.show_dialog&&(e=PC("#search_dialog")),!e.length)return;let t=PC(window).width(),n=PC(window).height(),s=e.offset().left,r=e.offset().top,a=e.width(),o=e.width();if(t-s<a){let i=t-a;i<0&&(i=0);let n=i/t*100+"%";e.css({left:n})}if(n-r<o){let t=n-o;t<0&&(t=0),e.css({top:t/n*100+"%"})}}};return{getBookSize:I,setScrollRef:e=>{c=e},isResizingElement:h,turnDisable:d,initBook:function(){!function(){for(var e="",t=1;t<=A;t++)e+="#book_page_"+t+'.book-bg-active {background: url("'+p(t)+'") center center / contain no-repeat;}',"L"===f(t)?(e+="#book_page_"+t+" {background-position: right !important;}",e+="#book_page_"+t+" > img {float: right !important;}",e+="#book_page_"+t+" .canvasWrapper {right: 0 !important;}"):"R"===f(t)&&(e+="#book_page_"+t+" {background-position: left !important;}",e+="#book_page_"+t+" > img {float: left !important;}",e+="#book_page_"+t+" .canvasWrapper {left: 0 !important;}");var i=document.getElementsByTagName("HEAD").item(0),n=document.createElement("style");n.type="text/css",n.innerHTML=e,i.appendChild(n)}(),m(),C(),B(),E();var t=new oF(document.getElementById("main_divLink_id"));e.set("pageHammerObject",t),1==A?d.value=!0:Q()},pdfViewZoomFun:F,getViewPagenos:()=>{let t=e.get("totalPageNo"),i=v();for(let e=0;e<2;e++){let e=i[i.length-1]+1;if(e>t)break;i.push(e)}for(let e=1;e<=2;e++){let t=i[0]-e;if(t<1)break;i.push(t)}return i},isCurrentPagenosContainsPageno:M,isViewPagenosContainsPageno:function(e){let t=PC("#book_main").turn("view");return PC.inArray(e,t)>-1},isPositionByPageno:f,getCurrentPagenos:v,getPageSize:U,gotoPageByTarget:(t,i=0,n="turn_page",s=0)=>{if(a.screenshotStatus)return;if(g.fromType=n,g.fromPage=s,g.targetPage=i,PC("#book_main").turn("disable",!1),"rtl"===e.get("direction"))switch(t){case"first":t="last";break;case"last":t="first";break;case"next":t="previous";break;case"previous":t="next"}switch(t){case"first":PC("#book_main").turn("page",1);break;case"last":PC("#book_main").turn("page",e.totalPageNo);break;case"next":PC("#book_main").turn("next");break;case"previous":PC("#book_main").turn("previous");break;case"toPageno":PC("#book_main").turn("page",i)}let r=e.get("currentZoomScale")>1||1==e.get("totalPageNo");PC("#book_main").turn("disable",r)},updateTurnCurrPage:H,inputShowPageStr:u,setTargetByPage:t=>{let i=e.get("totalPageNo"),n=e.get("pageStart"),s=1;if("NaN"!=String(Number(t))&&0!=Number(t)&&String(Number(t)).indexOf(".")<0)s=Number(t),s=s+n-1,s=GC(s,1,i);else{let i=e.get("customizeJsons"),n=e.get("chapterJsons"),r=!1;for(let e=0;e<i.length;e++)if(t==i[e].show){s=i[e].target,r=!0;break}if(!r){let e=[];for(let s=0;s<n.length;s++)t==n[s].title&&(e.push(n[s].target),r=!0);let i=e[0];for(let t=1;t<e.length;t++)i>e[t]&&(i=e[t]);s=i}}return s},getStorageDataByPageno:(e,t=!1)=>{let i=P(e);return JSON.parse(window.localStorage.getItem(i))||{}},setStorageDataByPageno:async(e,t)=>{let i=P(e);await window.localStorage.setItem(i,JSON.stringify(t))},getPageImgByPageno:p,window_resize:O,changeSpreadMode:T,binkSelectedAndPosition:_,doubleClick:function(t){if(window.pageTurning)return!1;if(PC(t.target).closest(".memo-content-box").length>0)return!1;var i=Math.round(e.get("currentZoomScale"))||1,n=e.get("zoomScale_max"),s=e.get("zoomScale_list");if(i>=n||i<=0)i=1;else for(let e=0;e<s.length;e++)if(s[e]>i){i=s[e];break}F(t,i)}}})),uF=TC("pdfMain",(()=>{const e=RF(),t=function(e){if(e.pdfPage)return Promise.resolve(e.pdfPage);if(c.has(e))return c.get(e);var t=n.getPage(e.id).then((function(t){return e.pdfPage||e.setPdfPage(t),c.delete(e),t})).catch((function(t){console.error("Unable to get page for page view",t),c.delete(e)}));return c.set(e,t),t},i=JC();var n=null,s=null,r="",a="",o="",l="";var A;A=i.password,A=md5(A),r=A=(A=md5(A)).toLowerCase(),a=i.url_Prefix,o=i.url_Suffix,l=OC.pdfsPath,s=hF;let c=new WeakMap;return{currentPageno:1,loadPageLoadObj:function(t){if("1"==i.get("compatibleFlg"))return!1;let n=AppOptions.getAll(OptionKind.WORKER);n.workerSrc="./js/pdf/build/pdf.worker.mjs",n["useGPU "]=!0,pdfjsLib.disableWorker=!1,pdfjsLib.disableStream=!1,pdfjsLib.disableXfa=!0;for(let e in n)pdfjsLib.GlobalWorkerOptions[e]=n[e];let s=Object.create(null);s.url=encodeURI(a+l+o);let A=AppOptions.getAll(OptionKind.API);A.cMapUrl="./js/pdf/web/cmaps/";for(let e in A){let t=A[e];s[e]=t}let c=pdfjsLib.getDocument(s);c.onPassword=function(e,t){if(t==pdfjsLib.PasswordResponses.NEED_PASSWORD)e(r);else if(t==pdfjsLib.PasswordResponses.INCORRECT_PASSWORD)return alert("Viewer Error!"),!1};var u=+i.pdfSize;c.onProgress=function(e){if(u&&u>0){var t=(e.loaded/u*100).toFixed(2);PC("#load_pdf_progress > div").css("width",t+"%")}},PC("#load_pdf_progress").show(),c.promise.then((function(t){e.setDocument(t)}),(function(e){!function(e){e&&e.name}(e)}))},renderingQueue:s,forceRendering:function(e){if(!e||!n)return!1;function i(){s.renderView(e)}t(e).then((function(t){e.pdfPage||e.setPdfPage(t),i()}),(function(t){e.error="load_error",i()}))}}}));let hF={pdfViewer:null,pdfSearchViewer:null,onIdle:null,highestPriorityPage:null,idleTimeout:null,printing:!1,viewPagenos:[],
// 当前缓存页
currentPagenos:[],
// 当前展示页
/**
  * @param {PDFViewer} pdfViewer
  */
setViewer:function(e){this.pdfViewer=e},
/**
  * @param {IRenderableView} view
  * @returns {boolean}
  */
isHighestPriority:function(e){return this.highestPriorityPage===e.renderingId},
/**
  * @param {Object} currentlyVisiblePages
  */
renderHighestPriority:function(){const e=uF();this.printing=!0,this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),this.pdfViewer.forceRendering()||(e.pdfWorker_search&&e.pdfWorker_search.destroy(),e.pdfWorker_thumbnail&&e.pdfWorker_thumbnail.destroy(),this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),CLEANUP_TIMEOUT)),this.printing=!1)},
/**
  * @param {Object} visible
  * @param {Array} views
  * @param {boolean} scrolledDown
  */
getHighestPriority:function(e,t){if(!t)return!1;for(let i=0;i<t.length;i++){let n=e["p"+t[i]];if(n&&!this.isViewFinished(n))return n}return null},
/**
  * @param {IRenderableView} view
  * @returns {boolean}
  */
isViewFinished:function(e){return e.renderingState===RenderingStates.FINISHED},
/**
  * Render a page or thumbnail view. This calls the appropriate function
  * based on the views state. If the view is already rendered it will return
  * `false`.
  *
  * @param {IRenderableView} view
  */
renderView:function(e){var t=this;let i=!!(navigator.userAgent.match(/(iPad)/)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),n=function(){if(t.printing=!1,t.renderHighestPriority(),"search"==e.loadType&&e.id==App.searchViewerController.totalPageNo){var n="";n=device.mobile()?App.i18n.sd_toolbar__search__result:App.i18n.pc_toolbar__search__result;var s=App.searchViewerController.get("matchResultArray");let e="";(device.mobile()||device.tablet()||i)&&(e="「"+pdfInfoStore.get("searchValueArr").join(" ")+"」"),PC("#acti_search_resultNum_div").text(e+n+s.length+App.i18n.pc_toolbar__search__piece)}};if(e.error)return e.errorFun&&e.errorFun(),n(),!1;switch(e.renderingState){case RenderingStates.FINISHED:return!1;case RenderingStates.PAUSED:this.highestPriorityPage=e.renderingId,e.resume();break;case RenderingStates.RUNNING:this.highestPriorityPage=e.renderingId;break;case RenderingStates.INITIAL:this.highestPriorityPage=e.renderingId;try{e.draw().then(n,n)}catch(s){n()}}return!0}};var dF={exports:{}};!function(e){!function(t,i){e.exports?e.exports=i(IB().DOMParser):t.X2JS=i()}(MC,(function(e){return function(t){(t=t||{}).arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.jsAttributeFilter=t.jsAttributeFilter,t.jsAttributeConverter=t.jsAttributeConverter,t.attributeConverters=t.attributeConverters||[],t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],t.xmldomOptions=t.xmldomOptions||{},void 0===t.enableToStringFunc&&(t.enableToStringFunc=!0),void 0===t.skipEmptyTextNodesForObj&&(t.skipEmptyTextNodesForObj=!0),void 0===t.stripWhitespaces&&(t.stripWhitespaces=!0),void 0===t.useDoubleQuotes&&(t.useDoubleQuotes=!0),void 0===t.ignoreRoot&&(t.ignoreRoot=!1),void 0===t.escapeMode&&(t.escapeMode=!0),void 0===t.attributePrefix&&(t.attributePrefix="_"),void 0===t.selfClosingElements&&(t.selfClosingElements=!0),void 0===t.keepCData&&(t.keepCData=!1),void 0===t.keepText&&(t.keepText=!1),void 0===t.jsDateUTC&&(t.jsDateUTC=!1),function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"})}();var i=1,n=3,s=4,r=8,a=9;function o(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}function l(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):e}function A(e,i,n){if("property"===t.arrayAccessForm)e[i]instanceof Array?e[i+"_asArray"]=e[i]:e[i+"_asArray"]=[e[i]];if(!(e[i]instanceof Array)&&t.arrayAccessFormPaths.length>0){for(var s=!1,r=0;r<t.arrayAccessFormPaths.length;r++){var a=t.arrayAccessFormPaths[r];if("string"==typeof a){if(a===n){s=!0;break}}else if(a instanceof RegExp){if(a.test(n)){s=!0;break}}else if("function"==typeof a&&a(i,n)){s=!0;break}}s&&(e[i]=[e[i]])}}function c(e){var t=e.split(/[-T:+Z]/g),i=new Date(t[0],t[1]-1,t[2]),n=t[5].split(".");if(i.setHours(t[3],t[4],n[0]),n.length>1&&i.setMilliseconds(n[1]),t[6]&&t[7]){var s=60*t[6]+Number(t[7]);s=0+("-"===(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*s:s),i.setMinutes(i.getMinutes()-s-i.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(i=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds())));return i}function u(e,i){for(var n={__cnt:0},s=e.childNodes,a=0;a<s.length;a++){var l=s.item(a),u=o(l);l.nodeType!==r&&(n.__cnt++,null==n[u]?(n[u]=h(l,i+"."+u),A(n,u,i+"."+u)):(n[u]instanceof Array||(n[u]=[n[u]],A(n,u,i+"."+u)),n[u][n[u].length]=h(l,i+"."+u)))}for(var d=0;d<e.attributes.length;d++){var g=e.attributes.item(d);n.__cnt++;for(var p=g.value,f=0;f<t.attributeConverters.length;f++){var m=t.attributeConverters[f];m.test.call(null,g.name,g.value)&&(p=m.convert.call(null,g.name,g.value))}n[t.attributePrefix+g.name]=p}var C=e.prefix;return C&&(n.__cnt++,n.__prefix=C),n["#text"]&&(n.__text=n["#text"],n.__text instanceof Array&&(n.__text=n.__text.join("\n")),t.escapeMode&&(n.__text=n.__text.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&amp;/g,"&")),t.stripWhitespaces&&(n.__text=n.__text.trim()),delete n["#text"],"property"===t.arrayAccessForm&&delete n["#text_asArray"],n.__text=function(e,i,n){if(t.datetimeAccessFormPaths.length>0)for(var s=n.split(".#")[0],r=0;r<t.datetimeAccessFormPaths.length;r++){var a=t.datetimeAccessFormPaths[r];if("string"==typeof a){if(a===s)return c(e)}else if(a instanceof RegExp){if(a.test(s))return c(e)}else if("function"==typeof a&&a(s))return c(e)}return e}(n.__text,0,i+".#text")),n.hasOwnProperty("#cdata-section")&&(n.__cdata=n["#cdata-section"],delete n["#cdata-section"],"property"===t.arrayAccessForm&&delete n["#cdata-section_asArray"]),1===n.__cnt&&n.__text&&!t.keepText?n=n.__text:0===n.__cnt&&"text"===t.emptyNodeForm?n="":n.__cnt>1&&void 0!==n.__text&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&""===n.__text||""===n.__text.trim())&&delete n.__text,delete n.__cnt,t.keepCData||n.hasOwnProperty("__text")||!n.hasOwnProperty("__cdata")||1!==Object.keys(n).length?(t.enableToStringFunc&&(n.__text||n.__cdata)&&(n.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),n):n.__cdata?n.__cdata:""}function h(e,r){return e.nodeType===a?function(e){for(var n={},s=e.childNodes,r=0;r<s.length;r++){var a=s.item(r);if(a.nodeType===i){var l=o(a);t.ignoreRoot?n=h(a,l):n[l]=h(a,l)}}return n}(e):e.nodeType===i?u(e,r):e.nodeType===n||e.nodeType===s?e.nodeValue:null}function d(e,i,n,s){var r="<"+(e&&e.__prefix?e.__prefix+":":"")+i;if(n)for(var a=0;a<n.length;a++){var o=n[a],A=e[o];t.escapeMode&&(A=l(A)),r+=" "+o.substr(t.attributePrefix.length)+"=",t.useDoubleQuotes?r+='"'+A+'"':r+="'"+A+"'"}return r+=s?" />":">"}function g(e,t){return"</"+(e&&e.__prefix?e.__prefix+":":"")+t+">"}function p(e,i){return"property"===t.arrayAccessForm&&(n=i.toString(),s="_asArray",-1!==n.indexOf(s,n.length-s.length))||0===i.toString().indexOf(t.attributePrefix)||0===i.toString().indexOf("__")||e[i]instanceof Function;var n,s}function f(e){var t=0;if(e instanceof Object)for(var i in e)p(e,i)||t++;return t}function m(e){var i=[];if(e instanceof Object)for(var n in e)-1===n.toString().indexOf("__")&&0===n.toString().indexOf(t.attributePrefix)&&i.push(n);return i}function C(e){var i="";return e instanceof Object?i+=function(e){var i="";return e.__cdata&&(i+="<![CDATA["+e.__cdata+"]]>"),(e.__text||"number"==typeof e.__text||"boolean"==typeof e.__text)&&(t.escapeMode?i+=l(e.__text):i+=e.__text),i}(e):null!==e&&(t.escapeMode?i+=l(e):i+=e),i}function I(e,i,n){var s="";if(t.jsAttributeFilter&&t.jsAttributeFilter.call(null,i,e))return s;if(t.jsAttributeConverter&&(e=t.jsAttributeConverter.call(null,i,e)),null!=e&&""!==e||!t.selfClosingElements)if("object"==typeof e)if("[object Array]"===Object.prototype.toString.call(e))s+=function(e,t,i){var n="";if(0===e.length)n+=d(e,t,i,!0);else for(var s=0;s<e.length;s++)n+=I(e[s],t,m(e[s]));return n}(e,i,n);else if(e instanceof Date)s+=d(e,i,n,!1),s+=t.jsDateUTC?e.toUTCString():e.toISOString(),s+=g(e,i);else{f(e)>0||"number"==typeof e.__text||"boolean"==typeof e.__text||e.__text||e.__cdata?(s+=d(e,i,n,!1),s+=v(e),s+=g(e,i)):t.selfClosingElements?s+=d(e,i,n,!0):(s+=d(e,i,n,!1),s+=g(e,i))}else s+=d(e,i,n,!1),s+=C(e),s+=g(e,i);else s+=d(e,i,n,!0);return s}function v(e){var t="";if(f(e)>0)for(var i in e)if(!p(e,i)){var n=e[i];t+=I(n,i,m(n))}return t+=C(e)}function B(i){if(void 0===i)return null;if("string"!=typeof i)return null;var n=null,s=null;if(e)s=(n=new e(t.xmldomOptions)).parseFromString(i,"text/xml");else if(window&&window.DOMParser){n=new window.DOMParser;var r=null;if(!(window.ActiveXObject||"ActiveXObject"in window)&&document.all&&!document.addEventListener)try{r=n.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(a){r=null}try{s=n.parseFromString(i,"text/xml"),null!==r&&s.getElementsByTagNameNS(r,"parsererror").length>0&&(s=null)}catch(a){s=null}}else 0===i.indexOf("<?")&&(i=i.substr(i.indexOf("?>")+2)),(s=new ActiveXObject("Microsoft.XMLDOM")).async="false",s.loadXML(i);return s}this.asArray=function(e){return null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?c(e):e},this.xml2dom=function(e){return B(e)},this.dom2js=function(e){return h(e,null)},this.js2dom=function(e){return B(this.js2xml(e))},this.xml2js=function(e){var t=B(e);return null!=t?this.dom2js(t):null},this.js2xml=function(e){return v(e)},this.getVersion=function(){return"3.4.4"}}}))}(dF);const gF=RC(dF.exports);var pF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fF=window.device,mF={},CF=[];window.device=mF;var IF=window.document.documentElement,vF=window.navigator.userAgent.toLowerCase(),BF=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","pov_tv","hbbtv","ce-html"];function yF(e,t){return-1!==e.indexOf(t)}function bF(e){return yF(vF,e)}function EF(e){return IF.className.match(new RegExp(e,"i"))}function wF(e){var t=null;EF(e)||(t=IF.className.replace(/^\s+|\s+$/g,""),IF.className=t+" "+e)}function QF(e){EF(e)&&(IF.className=IF.className.replace(" "+e,""))}function _F(){mF.landscape()?(QF("portrait"),wF("landscape"),SF("landscape")):(QF("landscape"),wF("portrait"),SF("portrait")),DF()}function SF(e){for(var t=0;t<CF.length;t++)CF[t](e)}mF.macos=function(){return bF("mac")},mF.ios=function(){return mF.iphone()||mF.ipod()||mF.ipad()},mF.iphone=function(){return!mF.windows()&&bF("iphone")},mF.ipod=function(){return bF("ipod")},mF.ipad=function(){var e="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return bF("ipad")||e},mF.android=function(){return!mF.windows()&&bF("android")},mF.androidPhone=function(){return mF.android()&&bF("mobile")},mF.androidTablet=function(){return mF.android()&&!bF("mobile")},mF.blackberry=function(){return bF("blackberry")||bF("bb10")},mF.blackberryPhone=function(){return mF.blackberry()&&!bF("tablet")},mF.blackberryTablet=function(){return mF.blackberry()&&bF("tablet")},mF.windows=function(){return bF("windows")},mF.windowsPhone=function(){return mF.windows()&&bF("phone")},mF.windowsTablet=function(){return mF.windows()&&bF("touch")&&!mF.windowsPhone()},mF.fxos=function(){return(bF("(mobile")||bF("(tablet"))&&bF(" rv:")},mF.fxosPhone=function(){return mF.fxos()&&bF("mobile")},mF.fxosTablet=function(){return mF.fxos()&&bF("tablet")},mF.meego=function(){return bF("meego")},mF.cordova=function(){return window.cordova&&"file:"===location.protocol},mF.nodeWebkit=function(){return"object"===pF(window.process)},mF.mobile=function(){return mF.androidPhone()||mF.iphone()||mF.ipod()||mF.windowsPhone()||mF.blackberryPhone()||mF.fxosPhone()||mF.meego()},mF.tablet=function(){return mF.ipad()||mF.androidTablet()||mF.blackberryTablet()||mF.windowsTablet()||mF.fxosTablet()},mF.desktop=function(){return!mF.tablet()&&!mF.mobile()},mF.television=function(){for(var e=0;e<BF.length;){if(bF(BF[e]))return!0;e++}return!1},mF.portrait=function(){return screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?yF(screen.orientation.type,"portrait"):mF.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?90!==Math.abs(window.orientation):window.innerHeight/window.innerWidth>1},mF.landscape=function(){return screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?yF(screen.orientation.type,"landscape"):mF.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?90===Math.abs(window.orientation):window.innerHeight/window.innerWidth<1},mF.noConflict=function(){return window.device=fF,this},mF.ios()?mF.ipad()?wF("ios ipad tablet"):mF.iphone()?wF("ios iphone mobile"):mF.ipod()&&wF("ios ipod mobile"):mF.macos()?wF("macos desktop"):mF.android()?mF.androidTablet()?wF("android tablet"):wF("android mobile"):mF.blackberry()?mF.blackberryTablet()?wF("blackberry tablet"):wF("blackberry mobile"):mF.windows()?mF.windowsTablet()?wF("windows tablet"):mF.windowsPhone()?wF("windows mobile"):wF("windows desktop"):mF.fxos()?mF.fxosTablet()?wF("fxos tablet"):wF("fxos mobile"):mF.meego()?wF("meego mobile"):mF.nodeWebkit()?wF("node-webkit"):mF.television()?wF("television"):mF.desktop()&&wF("desktop"),mF.cordova()&&wF("cordova"),mF.onChangeOrientation=function(e){"function"==typeof e&&CF.push(e)};var xF="resize";function kF(e){for(var t=0;t<e.length;t++)if(mF[e[t]]())return e[t];return"unknown"}function DF(){mF.orientation=kF(["portrait","landscape"])}Object.prototype.hasOwnProperty.call(window,"onorientationchange")&&(xF="orientationchange"),window.addEventListener?window.addEventListener(xF,_F,!1):window.attachEvent?window.attachEvent(xF,_F):window[xF]=_F,_F(),mF.type=kF(["mobile","tablet","desktop"]),mF.os=kF(["ios","iphone","ipad","ipod","android","blackberry","macos","windows","fxos","meego","television"]),DF();var FF={exports:{}};
/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */!function(e,t){(function(){var i,n="Expected a function",s="__lodash_hash_undefined__",r="__lodash_placeholder__",a=16,o=32,l=64,A=128,c=256,u=1/0,h=9007199254740991,d=NaN,g=4294967295,p=[["ary",A],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",o],["partialRight",l],["rearg",c]],f="[object Arguments]",m="[object Array]",C="[object Boolean]",I="[object Date]",v="[object Error]",B="[object Function]",y="[object GeneratorFunction]",b="[object Map]",E="[object Number]",w="[object Object]",Q="[object Promise]",_="[object RegExp]",S="[object Set]",x="[object String]",k="[object Symbol]",D="[object WeakMap]",F="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",N="[object Int8Array]",L="[object Int16Array]",U="[object Int32Array]",H="[object Uint8Array]",P="[object Uint8ClampedArray]",O="[object Uint16Array]",G="[object Uint32Array]",K=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,j=RegExp(V.source),J=RegExp(W.source),z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(ie.source),se=/^\s+/,re=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,Ae=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,fe=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,Ce=/^(?:0|[1-9]\d*)$/,Ie=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,Be=/['\n\r\u2028\u2029\\]/g,ye="\\ud800-\\udfff",be="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",we="a-z\\xdf-\\xf6\\xf8-\\xff",Qe="A-Z\\xc0-\\xd6\\xd8-\\xde",_e="\\ufe0e\\ufe0f",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xe="['’]",ke="["+ye+"]",De="["+Se+"]",Fe="["+be+"]",Te="\\d+",Me="["+Ee+"]",Re="["+we+"]",Ne="[^"+ye+Se+Te+Ee+we+Qe+"]",Le="\\ud83c[\\udffb-\\udfff]",Ue="[^"+ye+"]",He="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",Oe="["+Qe+"]",Ge="\\u200d",Ke="(?:"+Re+"|"+Ne+")",qe="(?:"+Oe+"|"+Ne+")",Ye="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Fe+"|"+Le+")"+"?",je="["+_e+"]?",Je=je+We+("(?:"+Ge+"(?:"+[Ue,He,Pe].join("|")+")"+je+We+")*"),ze="(?:"+[Me,He,Pe].join("|")+")"+Je,Xe="(?:"+[Ue+Fe+"?",Fe,He,Pe,ke].join("|")+")",$e=RegExp(xe,"g"),Ze=RegExp(Fe,"g"),et=RegExp(Le+"(?="+Le+")|"+Xe+Je,"g"),tt=RegExp([Oe+"?"+Re+"+"+Ye+"(?="+[De,Oe,"$"].join("|")+")",qe+"+"+Ve+"(?="+[De,Oe+Ke,"$"].join("|")+")",Oe+"?"+Ke+"+"+Ye,Oe+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,ze].join("|"),"g"),it=RegExp("["+Ge+ye+be+_e+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,st=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,at={};at[M]=at[R]=at[N]=at[L]=at[U]=at[H]=at[P]=at[O]=at[G]=!0,at[f]=at[m]=at[F]=at[C]=at[T]=at[I]=at[v]=at[B]=at[b]=at[E]=at[w]=at[_]=at[S]=at[x]=at[D]=!1;var ot={};ot[f]=ot[m]=ot[F]=ot[T]=ot[C]=ot[I]=ot[M]=ot[R]=ot[N]=ot[L]=ot[U]=ot[b]=ot[E]=ot[w]=ot[_]=ot[S]=ot[x]=ot[k]=ot[H]=ot[P]=ot[O]=ot[G]=!0,ot[v]=ot[B]=ot[D]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},At=parseFloat,ct=parseInt,ut="object"==typeof MC&&MC&&MC.Object===Object&&MC,ht="object"==typeof self&&self&&self.Object===Object&&self,dt=ut||ht||Function("return this")(),gt=t&&!t.nodeType&&t,pt=gt&&e&&!e.nodeType&&e,ft=pt&&pt.exports===gt,mt=ft&&ut.process,Ct=function(){try{var e=pt&&pt.require&&pt.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(I2){}}(),It=Ct&&Ct.isArrayBuffer,vt=Ct&&Ct.isDate,Bt=Ct&&Ct.isMap,yt=Ct&&Ct.isRegExp,bt=Ct&&Ct.isSet,Et=Ct&&Ct.isTypedArray;function wt(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function Qt(e,t,i,n){for(var s=-1,r=null==e?0:e.length;++s<r;){var a=e[s];t(n,a,i(a),e)}return n}function _t(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}function St(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}function xt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(!t(e[i],i,e))return!1;return!0}function kt(e,t){for(var i=-1,n=null==e?0:e.length,s=0,r=[];++i<n;){var a=e[i];t(a,i,e)&&(r[s++]=a)}return r}function Dt(e,t){return!!(null==e?0:e.length)&&Ot(e,t,0)>-1}function Ft(e,t,i){for(var n=-1,s=null==e?0:e.length;++n<s;)if(i(t,e[n]))return!0;return!1}function Tt(e,t){for(var i=-1,n=null==e?0:e.length,s=Array(n);++i<n;)s[i]=t(e[i],i,e);return s}function Mt(e,t){for(var i=-1,n=t.length,s=e.length;++i<n;)e[s+i]=t[i];return e}function Rt(e,t,i,n){var s=-1,r=null==e?0:e.length;for(n&&r&&(i=e[++s]);++s<r;)i=t(i,e[s],s,e);return i}function Nt(e,t,i,n){var s=null==e?0:e.length;for(n&&s&&(i=e[--s]);s--;)i=t(i,e[s],s,e);return i}function Lt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}var Ut=Yt("length");function Ht(e,t,i){var n;return i(e,(function(e,i,s){if(t(e,i,s))return n=i,!1})),n}function Pt(e,t,i,n){for(var s=e.length,r=i+(n?1:-1);n?r--:++r<s;)if(t(e[r],r,e))return r;return-1}function Ot(e,t,i){return t==t?function(e,t,i){var n=i-1,s=e.length;for(;++n<s;)if(e[n]===t)return n;return-1}(e,t,i):Pt(e,Kt,i)}function Gt(e,t,i,n){for(var s=i-1,r=e.length;++s<r;)if(n(e[s],t))return s;return-1}function Kt(e){return e!=e}function qt(e,t){var i=null==e?0:e.length;return i?jt(e,t)/i:d}function Yt(e){return function(t){return null==t?i:t[e]}}function Vt(e){return function(t){return null==e?i:e[t]}}function Wt(e,t,i,n,s){return s(e,(function(e,s,r){i=n?(n=!1,e):t(i,e,s,r)})),i}function jt(e,t){for(var n,s=-1,r=e.length;++s<r;){var a=t(e[s]);a!==i&&(n=n===i?a:n+a)}return n}function Jt(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function zt(e){return e?e.slice(0,hi(e)+1).replace(se,""):e}function Xt(e){return function(t){return e(t)}}function $t(e,t){return Tt(t,(function(t){return e[t]}))}function Zt(e,t){return e.has(t)}function ei(e,t){for(var i=-1,n=e.length;++i<n&&Ot(t,e[i],0)>-1;);return i}function ti(e,t){for(var i=e.length;i--&&Ot(t,e[i],0)>-1;);return i}var ii=Vt({
// Latin-1 Supplement block.
"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss",
// Latin Extended-A block.
"Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),ni=Vt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function si(e){return"\\"+lt[e]}function ri(e){return it.test(e)}function ai(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i}function oi(e,t){return function(i){return e(t(i))}}function li(e,t){for(var i=-1,n=e.length,s=0,a=[];++i<n;){var o=e[i];o!==t&&o!==r||(e[i]=r,a[s++]=i)}return a}function Ai(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}function ci(e){return ri(e)?function(e){var t=et.lastIndex=0;for(;et.test(e);)++t;return t}(e):Ut(e)}function ui(e){return ri(e)?function(e){return e.match(et)||[]}(e):function(e){return e.split("")}(e)}function hi(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var di=Vt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var gi=function e(t){var re,ye=(t=null==t?dt:gi.defaults(dt.Object(),t,gi.pick(dt,st))).Array,be=t.Date,Ee=t.Error,we=t.Function,Qe=t.Math,_e=t.Object,Se=t.RegExp,xe=t.String,ke=t.TypeError,De=ye.prototype,Fe=we.prototype,Te=_e.prototype,Me=t["__core-js_shared__"],Re=Fe.toString,Ne=Te.hasOwnProperty,Le=0,Ue=(re=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+re:"",He=Te.toString,Pe=Re.call(_e),Oe=dt._,Ge=Se("^"+Re.call(Ne).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ke=ft?t.Buffer:i,qe=t.Symbol,Ye=t.Uint8Array,Ve=Ke?Ke.allocUnsafe:i,We=oi(_e.getPrototypeOf,_e),je=_e.create,Je=Te.propertyIsEnumerable,ze=De.splice,Xe=qe?qe.isConcatSpreadable:i,et=qe?qe.iterator:i,it=qe?qe.toStringTag:i,lt=function(){try{var e=ur(_e,"defineProperty");return e({},"",{}),e}catch(I2){}}(),ut=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,ht=be&&be.now!==dt.Date.now&&be.now,gt=t.setTimeout!==dt.setTimeout&&t.setTimeout,pt=Qe.ceil,mt=Qe.floor,Ct=_e.getOwnPropertySymbols,Ut=Ke?Ke.isBuffer:i,Vt=t.isFinite,pi=De.join,fi=oi(_e.keys,_e),mi=Qe.max,Ci=Qe.min,Ii=be.now,vi=t.parseInt,Bi=Qe.random,yi=De.reverse,bi=ur(t,"DataView"),Ei=ur(t,"Map"),wi=ur(t,"Promise"),Qi=ur(t,"Set"),_i=ur(t,"WeakMap"),Si=ur(_e,"create"),xi=_i&&new _i,ki={},Di=Pr(bi),Fi=Pr(Ei),Ti=Pr(wi),Mi=Pr(Qi),Ri=Pr(_i),Ni=qe?qe.prototype:i,Li=Ni?Ni.valueOf:i,Ui=Ni?Ni.toString:i;function Hi(e){if(no(e)&&!Va(e)&&!(e instanceof Ki)){if(e instanceof Gi)return e;if(Ne.call(e,"__wrapped__"))return Or(e)}return new Gi(e)}var Pi=function(){function e(){}return function(t){if(!io(t))return{};if(je)return je(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Oi(){}function Gi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Ki(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function qi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Yi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Vi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Wi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Vi;++t<i;)this.add(e[t])}function ji(e){var t=this.__data__=new Yi(e);this.size=t.size}function Ji(e,t){var i=Va(e),n=!i&&Ya(e),s=!i&&!n&&za(e),r=!i&&!n&&!s&&uo(e),a=i||n||s||r,o=a?Jt(e.length,xe):[],l=o.length;for(var A in e)!t&&!Ne.call(e,A)||a&&(// Safari 9 has enumerable `arguments.length` in strict mode.
"length"==A||// Node.js 0.10 has enumerable non-index properties on buffers.
s&&("offset"==A||"parent"==A)||// PhantomJS 2 has enumerable non-index properties on typed arrays.
r&&("buffer"==A||"byteLength"==A||"byteOffset"==A)||// Skip index properties.
Cr(A,l))||o.push(A);return o}function zi(e){var t=e.length;return t?e[jn(0,t-1)]:i}function Xi(e,t){return Mr(xs(e),on(t,0,e.length))}function $i(e){return Mr(xs(e))}function Zi(e,t,n){(n!==i&&!Ga(e[t],n)||n===i&&!(t in e))&&rn(e,t,n)}function en(e,t,n){var s=e[t];Ne.call(e,t)&&Ga(s,n)&&(n!==i||t in e)||rn(e,t,n)}function tn(e,t){for(var i=e.length;i--;)if(Ga(e[i][0],t))return i;return-1}function nn(e,t,i,n){return hn(e,(function(e,s,r){t(n,e,i(e),r)})),n}function sn(e,t){return e&&ks(t,Mo(t),e)}function rn(e,t,i){"__proto__"==t&&lt?lt(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function an(e,t){for(var n=-1,s=t.length,r=ye(s),a=null==e;++n<s;)r[n]=a?i:xo(e,t[n]);return r}function on(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ln(e,t,n,s,r,a){var o,l=1&t,A=2&t,c=4&t;if(n&&(o=r?n(e,s,r,a):n(e)),o!==i)return o;if(!io(e))return e;var u=Va(e);if(u){if(o=function(e){var t=e.length,i=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(i.index=e.index,i.input=e.input);return i}(e),!l)return xs(e,o)}else{var h=gr(e),d=h==B||h==y;if(za(e))return bs(e,l);if(h==w||h==f||d&&!r){if(o=A||d?{}:fr(e),!l)return A?function(e,t){return ks(e,dr(e),t)}(e,function(e,t){return e&&ks(t,Ro(t),e)}(o,e)):function(e,t){return ks(e,hr(e),t)}(e,sn(o,e))}else{if(!ot[h])return r?e:{};o=function(e,t,i){var n=e.constructor;switch(t){case F:return Es(e);case C:case I:return new n(+e);case T:return function(e,t){var i=t?Es(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case M:case R:case N:case L:case U:case H:case P:case O:case G:return ws(e,i);case b:return new n;case E:case x:return new n(e);case _:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new n;case k:return s=e,Li?_e(Li.call(s)):{}}var s}(e,h,l)}}a||(a=new ji);var g=a.get(e);if(g)return g;a.set(e,o),lo(e)?e.forEach((function(i){o.add(ln(i,t,n,i,e,a))})):so(e)&&e.forEach((function(i,s){o.set(s,ln(i,t,n,s,e,a))}));var p=u?i:(c?A?sr:nr:A?Ro:Mo)(e);return _t(p||e,(function(i,s){p&&(i=e[s=i]),en(o,s,ln(i,t,n,s,e,a))})),o}function An(e,t,n){var s=n.length;if(null==e)return!s;for(e=_e(e);s--;){var r=n[s],a=t[r],o=e[r];if(o===i&&!(r in e)||!a(o))return!1}return!0}function cn(e,t,s){if("function"!=typeof e)throw new ke(n);return kr((function(){e.apply(i,s)}),t)}function un(e,t,i,n){var s=-1,r=Dt,a=!0,o=e.length,l=[],A=t.length;if(!o)return l;i&&(t=Tt(t,Xt(i))),n?(r=Ft,a=!1):t.length>=200&&(r=Zt,a=!1,t=new Wi(t));e:for(;++s<o;){var c=e[s],u=null==i?c:i(c);if(c=n||0!==c?c:0,a&&u==u){for(var h=A;h--;)if(t[h]===u)continue e;l.push(c)}else r(t,u,n)||l.push(c)}return l}Hi.templateSettings={
/**
         * Used to detect `data` property values to be HTML-escaped.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
escape:z,
/**
         * Used to detect code to be evaluated.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
evaluate:X,
/**
         * Used to detect `data` property values to inject.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
interpolate:$,
/**
         * Used to reference the data object in the template text.
         *
         * @memberOf _.templateSettings
         * @type {string}
         */
variable:"",
/**
         * Used to import variables into the compiled template.
         *
         * @memberOf _.templateSettings
         * @type {Object}
         */
imports:{
/**
           * A reference to the `lodash` function.
           *
           * @memberOf _.templateSettings.imports
           * @type {Function}
           */
_:Hi}},Hi.prototype=Oi.prototype,Hi.prototype.constructor=Hi,Gi.prototype=Pi(Oi.prototype),Gi.prototype.constructor=Gi,Ki.prototype=Pi(Oi.prototype),Ki.prototype.constructor=Ki,qi.prototype.clear=function(){this.__data__=Si?Si(null):{},this.size=0},qi.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qi.prototype.get=function(e){var t=this.__data__;if(Si){var n=t[e];return n===s?i:n}return Ne.call(t,e)?t[e]:i},qi.prototype.has=function(e){var t=this.__data__;return Si?t[e]!==i:Ne.call(t,e)},qi.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Si&&t===i?s:t,this},Yi.prototype.clear=function(){this.__data__=[],this.size=0},Yi.prototype.delete=function(e){var t=this.__data__,i=tn(t,e);return!(i<0)&&(i==t.length-1?t.pop():ze.call(t,i,1),--this.size,!0)},Yi.prototype.get=function(e){var t=this.__data__,n=tn(t,e);return n<0?i:t[n][1]},Yi.prototype.has=function(e){return tn(this.__data__,e)>-1},Yi.prototype.set=function(e,t){var i=this.__data__,n=tn(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},Vi.prototype.clear=function(){this.size=0,this.__data__={hash:new qi,map:new(Ei||Yi),string:new qi}},Vi.prototype.delete=function(e){var t=Ar(this,e).delete(e);return this.size-=t?1:0,t},Vi.prototype.get=function(e){return Ar(this,e).get(e)},Vi.prototype.has=function(e){return Ar(this,e).has(e)},Vi.prototype.set=function(e,t){var i=Ar(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},Wi.prototype.add=Wi.prototype.push=function(e){return this.__data__.set(e,s),this},Wi.prototype.has=function(e){return this.__data__.has(e)},ji.prototype.clear=function(){this.__data__=new Yi,this.size=0},ji.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},ji.prototype.get=function(e){return this.__data__.get(e)},ji.prototype.has=function(e){return this.__data__.has(e)},ji.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Yi){var n=i.__data__;if(!Ei||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Vi(n)}return i.set(e,t),this.size=i.size,this};var hn=Ts(vn),dn=Ts(Bn,!0);function gn(e,t){var i=!0;return hn(e,(function(e,n,s){return i=!!t(e,n,s)})),i}function pn(e,t,n){for(var s=-1,r=e.length;++s<r;){var a=e[s],o=t(a);if(null!=o&&(l===i?o==o&&!co(o):n(o,l)))var l=o,A=a}return A}function fn(e,t){var i=[];return hn(e,(function(e,n,s){t(e,n,s)&&i.push(e)})),i}function mn(e,t,i,n,s){var r=-1,a=e.length;for(i||(i=mr),s||(s=[]);++r<a;){var o=e[r];t>0&&i(o)?t>1?mn(o,t-1,i,n,s):Mt(s,o):n||(s[s.length]=o)}return s}var Cn=Ms(),In=Ms(!0);function vn(e,t){return e&&Cn(e,t,Mo)}function Bn(e,t){return e&&In(e,t,Mo)}function yn(e,t){return kt(t,(function(t){return Za(e[t])}))}function bn(e,t){for(var n=0,s=(t=Is(t,e)).length;null!=e&&n<s;)e=e[Hr(t[n++])];return n&&n==s?e:i}function En(e,t,i){var n=t(e);return Va(e)?n:Mt(n,i(e))}function wn(e){return null==e?e===i?"[object Undefined]":"[object Null]":it&&it in _e(e)?function(e){var t=Ne.call(e,it),n=e[it];try{e[it]=i;var s=!0}catch(I2){}var r=He.call(e);s&&(t?e[it]=n:delete e[it]);return r}(e):function(e){return He.call(e)}(e)}function Qn(e,t){return e>t}function _n(e,t){return null!=e&&Ne.call(e,t)}function Sn(e,t){return null!=e&&t in _e(e)}function xn(e,t,n){for(var s=n?Ft:Dt,r=e[0].length,a=e.length,o=a,l=ye(a),A=1/0,c=[];o--;){var u=e[o];o&&t&&(u=Tt(u,Xt(t))),A=Ci(u.length,A),l[o]=!n&&(t||r>=120&&u.length>=120)?new Wi(o&&u):i}u=e[0];var h=-1,d=l[0];e:for(;++h<r&&c.length<A;){var g=u[h],p=t?t(g):g;if(g=n||0!==g?g:0,!(d?Zt(d,p):s(c,p,n))){for(o=a;--o;){var f=l[o];if(!(f?Zt(f,p):s(e[o],p,n)))continue e}d&&d.push(p),c.push(g)}}return c}function kn(e,t,n){var s=null==(e=_r(e,t=Is(t,e)))?e:e[Hr($r(t))];return null==s?i:wt(s,e,n)}function Dn(e){return no(e)&&wn(e)==f}function Fn(e,t,n,s,r){return e===t||(null==e||null==t||!no(e)&&!no(t)?e!=e&&t!=t:function(e,t,n,s,r,a){var o=Va(e),l=Va(t),A=o?m:gr(e),c=l?m:gr(t),u=(A=A==f?w:A)==w,h=(c=c==f?w:c)==w,d=A==c;if(d&&za(e)){if(!za(t))return!1;o=!0,u=!1}if(d&&!u)return a||(a=new ji),o||uo(e)?tr(e,t,n,s,r,a):function(e,t,i,n,s,r,a){switch(i){case T:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case F:return!(e.byteLength!=t.byteLength||!r(new Ye(e),new Ye(t)));case C:case I:case E:return Ga(+e,+t);case v:return e.name==t.name&&e.message==t.message;case _:case x:return e==t+"";case b:var o=ai;case S:var l=1&n;if(o||(o=Ai),e.size!=t.size&&!l)return!1;var A=a.get(e);if(A)return A==t;n|=2,a.set(e,t);var c=tr(o(e),o(t),n,s,r,a);return a.delete(e),c;case k:if(Li)return Li.call(e)==Li.call(t)}return!1}(e,t,A,n,s,r,a);if(!(1&n)){var g=u&&Ne.call(e,"__wrapped__"),p=h&&Ne.call(t,"__wrapped__");if(g||p){var B=g?e.value():e,y=p?t.value():t;return a||(a=new ji),r(B,y,n,s,a)}}if(!d)return!1;return a||(a=new ji),function(e,t,n,s,r,a){var o=1&n,l=nr(e),A=l.length,c=nr(t),u=c.length;if(A!=u&&!o)return!1;var h=A;for(;h--;){var d=l[h];if(!(o?d in t:Ne.call(t,d)))return!1}var g=a.get(e),p=a.get(t);if(g&&p)return g==t&&p==e;var f=!0;a.set(e,t),a.set(t,e);var m=o;for(;++h<A;){var C=e[d=l[h]],I=t[d];if(s)var v=o?s(I,C,d,t,e,a):s(C,I,d,e,t,a);if(!(v===i?C===I||r(C,I,n,s,a):v)){f=!1;break}m||(m="constructor"==d)}if(f&&!m){var B=e.constructor,y=t.constructor;B==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof B&&B instanceof B&&"function"==typeof y&&y instanceof y||(f=!1)}return a.delete(e),a.delete(t),f}(e,t,n,s,r,a)}(e,t,n,s,Fn,r))}function Tn(e,t,n,s){var r=n.length,a=r,o=!s;if(null==e)return!a;for(e=_e(e);r--;){var l=n[r];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++r<a;){var A=(l=n[r])[0],c=e[A],u=l[1];if(o&&l[2]){if(c===i&&!(A in e))return!1}else{var h=new ji;if(s)var d=s(c,u,A,e,t,h);if(!(d===i?Fn(u,c,3,s,h):d))return!1}}return!0}function Mn(e){return!(!io(e)||(t=e,Ue&&Ue in t))&&(Za(e)?Ge:fe).test(Pr(e));var t}function Rn(e){return"function"==typeof e?e:null==e?al:"object"==typeof e?Va(e)?On(e[0],e[1]):Pn(e):pl(e)}function Nn(e){if(!br(e))return fi(e);var t=[];for(var i in _e(e))Ne.call(e,i)&&"constructor"!=i&&t.push(i);return t}function Ln(e){if(!io(e))return function(e){var t=[];if(null!=e)for(var i in _e(e))t.push(i);return t}(e);var t=br(e),i=[];for(var n in e)("constructor"!=n||!t&&Ne.call(e,n))&&i.push(n);return i}function Un(e,t){return e<t}function Hn(e,t){var i=-1,n=ja(e)?ye(e.length):[];return hn(e,(function(e,s,r){n[++i]=t(e,s,r)})),n}function Pn(e){var t=cr(e);return 1==t.length&&t[0][2]?wr(t[0][0],t[0][1]):function(i){return i===e||Tn(i,e,t)}}function On(e,t){return vr(e)&&Er(t)?wr(Hr(e),t):function(n){var s=xo(n,e);return s===i&&s===t?ko(n,e):Fn(t,s,3)}}function Gn(e,t,n,s,r){e!==t&&Cn(t,(function(a,o){if(r||(r=new ji),io(a))!function(e,t,n,s,r,a,o){var l=Sr(e,n),A=Sr(t,n),c=o.get(A);if(c)return void Zi(e,n,c);var u=a?a(l,A,n+"",e,t,o):i,h=u===i;if(h){var d=Va(A),g=!d&&za(A),p=!d&&!g&&uo(A);u=A,d||g||p?Va(l)?u=l:Ja(l)?u=xs(l):g?(h=!1,u=bs(A,!0)):p?(h=!1,u=ws(A,!0)):u=[]:ao(A)||Ya(A)?(u=l,Ya(l)?u=vo(l):io(l)&&!Za(l)||(u=fr(A))):h=!1}h&&(o.set(A,u),r(u,A,s,a,o),o.delete(A));Zi(e,n,u)}(e,t,o,n,Gn,s,r);else{var l=s?s(Sr(e,o),a,o+"",e,t,r):i;l===i&&(l=a),Zi(e,o,l)}}),Ro)}function Kn(e,t){var n=e.length;if(n)return Cr(t+=t<0?n:0,n)?e[t]:i}function qn(e,t,i){t=t.length?Tt(t,(function(e){return Va(e)?function(t){return bn(t,1===e.length?e[0]:e)}:e})):[al];var n=-1;return t=Tt(t,Xt(lr())),function(e,t){var i=e.length;for(e.sort(t);i--;)e[i]=e[i].value;return e}(Hn(e,(function(e,i,s){return{criteria:Tt(t,(function(t){return t(e)})),index:++n,value:e}})),(function(e,t){return function(e,t,i){var n=-1,s=e.criteria,r=t.criteria,a=s.length,o=i.length;for(;++n<a;){var l=Qs(s[n],r[n]);if(l)return n>=o?l:l*("desc"==i[n]?-1:1)}return e.index-t.index}(e,t,i)}))}function Yn(e,t,i){for(var n=-1,s=t.length,r={};++n<s;){var a=t[n],o=bn(e,a);i(o,a)&&Zn(r,Is(a,e),o)}return r}function Vn(e,t,i,n){var s=n?Gt:Ot,r=-1,a=t.length,o=e;for(e===t&&(t=xs(t)),i&&(o=Tt(e,Xt(i)));++r<a;)for(var l=0,A=t[r],c=i?i(A):A;(l=s(o,c,l,n))>-1;)o!==e&&ze.call(o,l,1),ze.call(e,l,1);return e}function Wn(e,t){for(var i=e?t.length:0,n=i-1;i--;){var s=t[i];if(i==n||s!==r){var r=s;Cr(s)?ze.call(e,s,1):us(e,s)}}return e}function jn(e,t){return e+mt(Bi()*(t-e+1))}function Jn(e,t){var i="";if(!e||t<1||t>h)return i;do{t%2&&(i+=e),(t=mt(t/2))&&(e+=e)}while(t);return i}function zn(e,t){return Dr(Qr(e,t,al),e+"")}function Xn(e){return zi(Ko(e))}function $n(e,t){var i=Ko(e);return Mr(i,on(t,0,i.length))}function Zn(e,t,n,s){if(!io(e))return e;for(var r=-1,a=(t=Is(t,e)).length,o=a-1,l=e;null!=l&&++r<a;){var A=Hr(t[r]),c=n;if("__proto__"===A||"constructor"===A||"prototype"===A)return e;if(r!=o){var u=l[A];(c=s?s(u,A,l):i)===i&&(c=io(u)?u:Cr(t[r+1])?[]:{})}en(l,A,c),l=l[A]}return e}var es=xi?function(e,t){return xi.set(e,t),e}:al,ts=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:nl(t),writable:!0})}:al;function is(e){return Mr(Ko(e))}function ns(e,t,i){var n=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(i=i>s?s:i)<0&&(i+=s),s=t>i?0:i-t>>>0,t>>>=0;for(var r=ye(s);++n<s;)r[n]=e[n+t];return r}function ss(e,t){var i;return hn(e,(function(e,n,s){return!(i=t(e,n,s))})),!!i}function rs(e,t,i){var n=0,s=null==e?n:e.length;if("number"==typeof t&&t==t&&s<=2147483647){for(;n<s;){var r=n+s>>>1,a=e[r];null!==a&&!co(a)&&(i?a<=t:a<t)?n=r+1:s=r}return s}return as(e,t,al,i)}function as(e,t,n,s){var r=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=n(t))!=t,l=null===t,A=co(t),c=t===i;r<a;){var u=mt((r+a)/2),h=n(e[u]),d=h!==i,g=null===h,p=h==h,f=co(h);if(o)var m=s||p;else m=c?p&&(s||d):l?p&&d&&(s||!g):A?p&&d&&!g&&(s||!f):!g&&!f&&(s?h<=t:h<t);m?r=u+1:a=u}return Ci(a,4294967294)}function os(e,t){for(var i=-1,n=e.length,s=0,r=[];++i<n;){var a=e[i],o=t?t(a):a;if(!i||!Ga(o,l)){var l=o;r[s++]=0===a?0:a}}return r}function ls(e){return"number"==typeof e?e:co(e)?d:+e}function As(e){if("string"==typeof e)return e;if(Va(e))return Tt(e,As)+"";if(co(e))return Ui?Ui.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function cs(e,t,i){var n=-1,s=Dt,r=e.length,a=!0,o=[],l=o;if(i)a=!1,s=Ft;else if(r>=200){var A=t?null:Js(e);if(A)return Ai(A);a=!1,s=Zt,l=new Wi}else l=t?[]:o;e:for(;++n<r;){var c=e[n],u=t?t(c):c;if(c=i||0!==c?c:0,a&&u==u){for(var h=l.length;h--;)if(l[h]===u)continue e;t&&l.push(u),o.push(c)}else s(l,u,i)||(l!==o&&l.push(u),o.push(c))}return o}function us(e,t){return null==(e=_r(e,t=Is(t,e)))||delete e[Hr($r(t))]}function hs(e,t,i,n){return Zn(e,t,i(bn(e,t)),n)}function ds(e,t,i,n){for(var s=e.length,r=n?s:-1;(n?r--:++r<s)&&t(e[r],r,e););return i?ns(e,n?0:r,n?r+1:s):ns(e,n?r+1:0,n?s:r)}function gs(e,t){var i=e;return i instanceof Ki&&(i=i.value()),Rt(t,(function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))}),i)}function ps(e,t,i){var n=e.length;if(n<2)return n?cs(e[0]):[];for(var s=-1,r=ye(n);++s<n;)for(var a=e[s],o=-1;++o<n;)o!=s&&(r[s]=un(r[s]||a,e[o],t,i));return cs(mn(r,1),t,i)}function fs(e,t,n){for(var s=-1,r=e.length,a=t.length,o={};++s<r;){var l=s<a?t[s]:i;n(o,e[s],l)}return o}function ms(e){return Ja(e)?e:[]}function Cs(e){return"function"==typeof e?e:al}function Is(e,t){return Va(e)?e:vr(e,t)?[e]:Ur(Bo(e))}var vs=zn;function Bs(e,t,n){var s=e.length;return n=n===i?s:n,!t&&n>=s?e:ns(e,t,n)}var ys=ut||function(e){return dt.clearTimeout(e)};function bs(e,t){if(t)return e.slice();var i=e.length,n=Ve?Ve(i):new e.constructor(i);return e.copy(n),n}function Es(e){var t=new e.constructor(e.byteLength);return new Ye(t).set(new Ye(e)),t}function ws(e,t){var i=t?Es(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Qs(e,t){if(e!==t){var n=e!==i,s=null===e,r=e==e,a=co(e),o=t!==i,l=null===t,A=t==t,c=co(t);if(!l&&!c&&!a&&e>t||a&&o&&A&&!l&&!c||s&&o&&A||!n&&A||!r)return 1;if(!s&&!a&&!c&&e<t||c&&n&&r&&!s&&!a||l&&n&&r||!o&&r||!A)return-1}return 0}function _s(e,t,i,n){for(var s=-1,r=e.length,a=i.length,o=-1,l=t.length,A=mi(r-a,0),c=ye(l+A),u=!n;++o<l;)c[o]=t[o];for(;++s<a;)(u||s<r)&&(c[i[s]]=e[s]);for(;A--;)c[o++]=e[s++];return c}function Ss(e,t,i,n){for(var s=-1,r=e.length,a=-1,o=i.length,l=-1,A=t.length,c=mi(r-o,0),u=ye(c+A),h=!n;++s<c;)u[s]=e[s];for(var d=s;++l<A;)u[d+l]=t[l];for(;++a<o;)(h||s<r)&&(u[d+i[a]]=e[s++]);return u}function xs(e,t){var i=-1,n=e.length;for(t||(t=ye(n));++i<n;)t[i]=e[i];return t}function ks(e,t,n,s){var r=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var l=t[a],A=s?s(n[l],e[l],l,n,e):i;A===i&&(A=e[l]),r?rn(n,l,A):en(n,l,A)}return n}function Ds(e,t){return function(i,n){var s=Va(i)?Qt:nn,r=t?t():{};return s(i,e,lr(n,2),r)}}function Fs(e){return zn((function(t,n){var s=-1,r=n.length,a=r>1?n[r-1]:i,o=r>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(r--,a):i,o&&Ir(n[0],n[1],o)&&(a=r<3?i:a,r=1),t=_e(t);++s<r;){var l=n[s];l&&e(t,l,s,a)}return t}))}function Ts(e,t){return function(i,n){if(null==i)return i;if(!ja(i))return e(i,n);for(var s=i.length,r=t?s:-1,a=_e(i);(t?r--:++r<s)&&!1!==n(a[r],r,a););return i}}function Ms(e){return function(t,i,n){for(var s=-1,r=_e(t),a=n(t),o=a.length;o--;){var l=a[e?o:++s];if(!1===i(r[l],l,r))break}return t}}function Rs(e){return function(t){var n=ri(t=Bo(t))?ui(t):i,s=n?n[0]:t.charAt(0),r=n?Bs(n,1).join(""):t.slice(1);return s[e]()+r}}function Ns(e){return function(t){return Rt(el(Vo(t).replace($e,"")),e,"")}}function Ls(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=Pi(e.prototype),n=e.apply(i,t);return io(n)?n:i}}function Us(e){return function(t,n,s){var r=_e(t);if(!ja(t)){var a=lr(n,3);t=Mo(t),n=function(e){return a(r[e],e,r)}}var o=e(t,n,s);return o>-1?r[a?t[o]:o]:i}}function Hs(e){return ir((function(t){var s=t.length,r=s,a=Gi.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new ke(n);if(a&&!l&&"wrapper"==ar(o))var l=new Gi([],!0)}for(r=l?r:s;++r<s;){var A=ar(o=t[r]),c="wrapper"==A?rr(o):i;l=c&&Br(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[ar(c[0])].apply(l,c[3]):1==o.length&&Br(o)?l[A]():l.thru(o)}return function(){var e=arguments,i=e[0];if(l&&1==e.length&&Va(i))return l.plant(i).value();for(var n=0,r=s?t[n].apply(this,e):i;++n<s;)r=t[n].call(this,r);return r}}))}function Ps(e,t,n,s,r,a,o,l,c,u){var h=t&A,d=1&t,g=2&t,p=24&t,f=512&t,m=g?i:Ls(e);return function A(){for(var C=arguments.length,I=ye(C),v=C;v--;)I[v]=arguments[v];if(p)var B=or(A),y=function(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&++n;return n}(I,B);if(s&&(I=_s(I,s,r,p)),a&&(I=Ss(I,a,o,p)),C-=y,p&&C<u){var b=li(I,B);return Ws(e,t,Ps,A.placeholder,n,I,b,l,c,u-C)}var E=d?n:this,w=g?E[e]:e;return C=I.length,l?I=function(e,t){var n=e.length,s=Ci(t.length,n),r=xs(e);for(;s--;){var a=t[s];e[s]=Cr(a,n)?r[a]:i}return e}(I,l):f&&C>1&&I.reverse(),h&&c<C&&(I.length=c),this&&this!==dt&&this instanceof A&&(w=m||Ls(w)),w.apply(E,I)}}function Os(e,t){return function(i,n){return function(e,t,i,n){return vn(e,(function(e,s,r){t(n,i(e),s,r)})),n}(i,e,t(n),{})}}function Gs(e,t){return function(n,s){var r;if(n===i&&s===i)return t;if(n!==i&&(r=n),s!==i){if(r===i)return s;"string"==typeof n||"string"==typeof s?(n=As(n),s=As(s)):(n=ls(n),s=ls(s)),r=e(n,s)}return r}}function Ks(e){return ir((function(t){return t=Tt(t,Xt(lr())),zn((function(i){var n=this;return e(t,(function(e){return wt(e,n,i)}))}))}))}function qs(e,t){var n=(t=t===i?" ":As(t)).length;if(n<2)return n?Jn(t,e):t;var s=Jn(t,pt(e/ci(t)));return ri(t)?Bs(ui(s),0,e).join(""):s.slice(0,e)}function Ys(e){return function(t,n,s){return s&&"number"!=typeof s&&Ir(t,n,s)&&(n=s=i),t=fo(t),n===i?(n=t,t=0):n=fo(n),function(e,t,i,n){for(var s=-1,r=mi(pt((t-e)/(i||1)),0),a=ye(r);r--;)a[n?r:++s]=e,e+=i;return a}(t,n,s=s===i?t<n?1:-1:fo(s),e)}}function Vs(e){return function(t,i){return"string"==typeof t&&"string"==typeof i||(t=Io(t),i=Io(i)),e(t,i)}}function Ws(e,t,n,s,r,a,A,c,u,h){var d=8&t;t|=d?o:l,4&(t&=~(d?l:o))||(t&=-4);var g=[e,t,r,d?a:i,d?A:i,d?i:a,d?i:A,c,u,h],p=n.apply(i,g);return Br(e)&&xr(p,g),p.placeholder=s,Fr(p,e,t)}function js(e){var t=Qe[e];return function(e,i){if(e=Io(e),(i=null==i?0:Ci(mo(i),292))&&Vt(e)){var n=(Bo(e)+"e").split("e");return+((n=(Bo(t(n[0]+"e"+(+n[1]+i)))+"e").split("e"))[0]+"e"+(+n[1]-i))}return t(e)}}var Js=Qi&&1/Ai(new Qi([,-0]))[1]==u?function(e){return new Qi(e)}:ul;function zs(e){return function(t){var i=gr(t);return i==b?ai(t):i==S?function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=[e,e]})),i}(t):function(e,t){return Tt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xs(e,t,s,u,h,d,g,p){var f=2&t;if(!f&&"function"!=typeof e)throw new ke(n);var m=u?u.length:0;if(m||(t&=-97,u=h=i),g=g===i?g:mi(mo(g),0),p=p===i?p:mo(p),m-=h?h.length:0,t&l){var C=u,I=h;u=h=i}var v=f?i:rr(e),B=[e,t,s,u,h,C,I,d,g,p];if(v&&function(e,t){var i=e[1],n=t[1],s=i|n,a=s<131,o=n==A&&8==i||n==A&&i==c&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==i;if(!a&&!o)return e;1&n&&(e[2]=t[2],s|=1&i?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?_s(u,l,t[4]):l,e[4]=u?li(e[3],r):t[4]}(l=t[5])&&(u=e[5],e[5]=u?Ss(u,l,t[6]):l,e[6]=u?li(e[5],r):t[6]);(l=t[7])&&(e[7]=l);n&A&&(e[8]=null==e[8]?t[8]:Ci(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=s}(B,v),e=B[0],t=B[1],s=B[2],u=B[3],h=B[4],!(p=B[9]=B[9]===i?f?0:e.length:mi(B[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)y=8==t||t==a?function(e,t,n){var s=Ls(e);return function r(){for(var a=arguments.length,o=ye(a),l=a,A=or(r);l--;)o[l]=arguments[l];var c=a<3&&o[0]!==A&&o[a-1]!==A?[]:li(o,A);return(a-=c.length)<n?Ws(e,t,Ps,r.placeholder,i,o,c,i,i,n-a):wt(this&&this!==dt&&this instanceof r?s:e,this,o)}}(e,t,p):t!=o&&33!=t||h.length?Ps.apply(i,B):function(e,t,i,n){var s=1&t,r=Ls(e);return function t(){for(var a=-1,o=arguments.length,l=-1,A=n.length,c=ye(A+o),u=this&&this!==dt&&this instanceof t?r:e;++l<A;)c[l]=n[l];for(;o--;)c[l++]=arguments[++a];return wt(u,s?i:this,c)}}(e,t,s,u);else var y=function(e,t,i){var n=1&t,s=Ls(e);return function t(){return(this&&this!==dt&&this instanceof t?s:e).apply(n?i:this,arguments)}}(e,t,s);return Fr((v?es:xr)(y,B),e,t)}function $s(e,t,n,s){return e===i||Ga(e,Te[n])&&!Ne.call(s,n)?t:e}function Zs(e,t,n,s,r,a){return io(e)&&io(t)&&(a.set(t,e),Gn(e,t,i,Zs,a),a.delete(t)),e}function er(e){return ao(e)?i:e}function tr(e,t,n,s,r,a){var o=1&n,l=e.length,A=t.length;if(l!=A&&!(o&&A>l))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var h=-1,d=!0,g=2&n?new Wi:i;for(a.set(e,t),a.set(t,e);++h<l;){var p=e[h],f=t[h];if(s)var m=o?s(f,p,h,t,e,a):s(p,f,h,e,t,a);if(m!==i){if(m)continue;d=!1;break}if(g){if(!Lt(t,(function(e,t){if(!Zt(g,t)&&(p===e||r(p,e,n,s,a)))return g.push(t)}))){d=!1;break}}else if(p!==f&&!r(p,f,n,s,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function ir(e){return Dr(Qr(e,i,Wr),e+"")}function nr(e){return En(e,Mo,hr)}function sr(e){return En(e,Ro,dr)}var rr=xi?function(e){return xi.get(e)}:ul;function ar(e){for(var t=e.name+"",i=ki[t],n=Ne.call(ki,t)?i.length:0;n--;){var s=i[n],r=s.func;if(null==r||r==e)return s.name}return t}function or(e){return(Ne.call(Hi,"placeholder")?Hi:e).placeholder}function lr(){var e=Hi.iteratee||ol;return e=e===ol?Rn:e,arguments.length?e(arguments[0],arguments[1]):e}function Ar(e,t){var i,n,s=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?s["string"==typeof t?"string":"hash"]:s.map}function cr(e){for(var t=Mo(e),i=t.length;i--;){var n=t[i],s=e[n];t[i]=[n,s,Er(s)]}return t}function ur(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Mn(n)?n:i}var hr=Ct?function(e){return null==e?[]:(e=_e(e),kt(Ct(e),(function(t){return Je.call(e,t)})))}:Cl,dr=Ct?function(e){for(var t=[];e;)Mt(t,hr(e)),e=We(e);return t}:Cl,gr=wn;function pr(e,t,i){for(var n=-1,s=(t=Is(t,e)).length,r=!1;++n<s;){var a=Hr(t[n]);if(!(r=null!=e&&i(e,a)))break;e=e[a]}return r||++n!=s?r:!!(s=null==e?0:e.length)&&to(s)&&Cr(a,s)&&(Va(e)||Ya(e))}function fr(e){return"function"!=typeof e.constructor||br(e)?{}:Pi(We(e))}function mr(e){return Va(e)||Ya(e)||!!(Xe&&e&&e[Xe])}function Cr(e,t){var i=typeof e;return!!(t=null==t?h:t)&&("number"==i||"symbol"!=i&&Ce.test(e))&&e>-1&&e%1==0&&e<t}function Ir(e,t,i){if(!io(i))return!1;var n=typeof t;return!!("number"==n?ja(i)&&Cr(t,i.length):"string"==n&&t in i)&&Ga(i[t],e)}function vr(e,t){if(Va(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!co(e))||(ee.test(e)||!Z.test(e)||null!=t&&e in _e(t))}function Br(e){var t=ar(e),i=Hi[t];if("function"!=typeof i||!(t in Ki.prototype))return!1;if(e===i)return!0;var n=rr(i);return!!n&&e===n[0]}(bi&&gr(new bi(new ArrayBuffer(1)))!=T||Ei&&gr(new Ei)!=b||wi&&gr(wi.resolve())!=Q||Qi&&gr(new Qi)!=S||_i&&gr(new _i)!=D)&&(gr=function(e){var t=wn(e),n=t==w?e.constructor:i,s=n?Pr(n):"";if(s)switch(s){case Di:return T;case Fi:return b;case Ti:return Q;case Mi:return S;case Ri:return D}return t});var yr=Me?Za:Il;function br(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Te)}function Er(e){return e==e&&!io(e)}function wr(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in _e(n)))}}function Qr(e,t,n){return t=mi(t===i?e.length-1:t,0),function(){for(var i=arguments,s=-1,r=mi(i.length-t,0),a=ye(r);++s<r;)a[s]=i[t+s];s=-1;for(var o=ye(t+1);++s<t;)o[s]=i[s];return o[t]=n(a),wt(e,this,o)}}function _r(e,t){return t.length<2?e:bn(e,ns(t,0,-1))}function Sr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var xr=Tr(es),kr=gt||function(e,t){return dt.setTimeout(e,t)},Dr=Tr(ts);function Fr(e,t,i){var n=t+"";return Dr(e,function(e,t){var i=t.length;if(!i)return e;var n=i-1;return t[n]=(i>1?"& ":"")+t[n],t=t.join(i>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return _t(p,(function(i){var n="_."+i[0];t&i[1]&&!Dt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(le):[]}(n),i)))}function Tr(e){var t=0,n=0;return function(){var s=Ii(),r=16-(s-n);if(n=s,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Mr(e,t){var n=-1,s=e.length,r=s-1;for(t=t===i?s:t;++n<t;){var a=jn(n,r),o=e[a];e[a]=e[n],e[n]=o}return e.length=t,e}var Rr,Nr,Lr,Ur=(Rr=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,(function(e,i,n,s){t.push(n?s.replace(ue,"$1"):i||e)})),t},Nr=Na(Rr,(function(e){return 500===Lr.size&&Lr.clear(),e})),Lr=Nr.cache,Nr);function Hr(e){if("string"==typeof e||co(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Pr(e){if(null!=e){try{return Re.call(e)}catch(I2){}try{return e+""}catch(I2){}}return""}function Or(e){if(e instanceof Ki)return e.clone();var t=new Gi(e.__wrapped__,e.__chain__);return t.__actions__=xs(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Gr=zn((function(e,t){return Ja(e)?un(e,mn(t,1,Ja,!0)):[]})),Kr=zn((function(e,t){var n=$r(t);return Ja(n)&&(n=i),Ja(e)?un(e,mn(t,1,Ja,!0),lr(n,2)):[]})),qr=zn((function(e,t){var n=$r(t);return Ja(n)&&(n=i),Ja(e)?un(e,mn(t,1,Ja,!0),i,n):[]}));function Yr(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var s=null==i?0:mo(i);return s<0&&(s=mi(n+s,0)),Pt(e,lr(t,3),s)}function Vr(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var r=s-1;return n!==i&&(r=mo(n),r=n<0?mi(s+r,0):Ci(r,s-1)),Pt(e,lr(t,3),r,!0)}function Wr(e){return(null==e?0:e.length)?mn(e,1):[]}function jr(e){return e&&e.length?e[0]:i}var Jr=zn((function(e){var t=Tt(e,ms);return t.length&&t[0]===e[0]?xn(t):[]})),zr=zn((function(e){var t=$r(e),n=Tt(e,ms);return t===$r(n)?t=i:n.pop(),n.length&&n[0]===e[0]?xn(n,lr(t,2)):[]})),Xr=zn((function(e){var t=$r(e),n=Tt(e,ms);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?xn(n,i,t):[]}));function $r(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zr=zn(ea);function ea(e,t){return e&&e.length&&t&&t.length?Vn(e,t):e}var ta=ir((function(e,t){var i=null==e?0:e.length,n=an(e,t);return Wn(e,Tt(t,(function(e){return Cr(e,i)?+e:e})).sort(Qs)),n}));function ia(e){return null==e?e:yi.call(e)}var na=zn((function(e){return cs(mn(e,1,Ja,!0))})),sa=zn((function(e){var t=$r(e);return Ja(t)&&(t=i),cs(mn(e,1,Ja,!0),lr(t,2))})),ra=zn((function(e){var t=$r(e);return t="function"==typeof t?t:i,cs(mn(e,1,Ja,!0),i,t)}));function aa(e){if(!e||!e.length)return[];var t=0;return e=kt(e,(function(e){if(Ja(e))return t=mi(e.length,t),!0})),Jt(t,(function(t){return Tt(e,Yt(t))}))}function oa(e,t){if(!e||!e.length)return[];var n=aa(e);return null==t?n:Tt(n,(function(e){return wt(t,i,e)}))}var la=zn((function(e,t){return Ja(e)?un(e,t):[]})),Aa=zn((function(e){return ps(kt(e,Ja))})),ca=zn((function(e){var t=$r(e);return Ja(t)&&(t=i),ps(kt(e,Ja),lr(t,2))})),ua=zn((function(e){var t=$r(e);return t="function"==typeof t?t:i,ps(kt(e,Ja),i,t)})),ha=zn(aa);var da=zn((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,oa(e,n)}));function ga(e){var t=Hi(e);return t.__chain__=!0,t}function pa(e,t){return t(e)}var fa=ir((function(e){var t=e.length,n=t?e[0]:0,s=this.__wrapped__,r=function(t){return an(t,e)};return!(t>1||this.__actions__.length)&&s instanceof Ki&&Cr(n)?((s=s.slice(n,+n+(t?1:0))).__actions__.push({func:pa,args:[r],thisArg:i}),new Gi(s,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(r)}));var ma=Ds((function(e,t,i){Ne.call(e,i)?++e[i]:rn(e,i,1)}));var Ca=Us(Yr),Ia=Us(Vr);function va(e,t){return(Va(e)?_t:hn)(e,lr(t,3))}function Ba(e,t){return(Va(e)?St:dn)(e,lr(t,3))}var ya=Ds((function(e,t,i){Ne.call(e,i)?e[i].push(t):rn(e,i,[t])}));var ba=zn((function(e,t,i){var n=-1,s="function"==typeof t,r=ja(e)?ye(e.length):[];return hn(e,(function(e){r[++n]=s?wt(t,e,i):kn(e,t,i)})),r})),Ea=Ds((function(e,t,i){rn(e,i,t)}));function wa(e,t){return(Va(e)?Tt:Hn)(e,lr(t,3))}var Qa=Ds((function(e,t,i){e[i?0:1].push(t)}),(function(){return[[],[]]}));var _a=zn((function(e,t){if(null==e)return[];var i=t.length;return i>1&&Ir(e,t[0],t[1])?t=[]:i>2&&Ir(t[0],t[1],t[2])&&(t=[t[0]]),qn(e,mn(t,1),[])})),Sa=ht||function(){return dt.Date.now()};function xa(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xs(e,A,i,i,i,i,t)}function ka(e,t){var s;if("function"!=typeof t)throw new ke(n);return e=mo(e),function(){return--e>0&&(s=t.apply(this,arguments)),e<=1&&(t=i),s}}var Da=zn((function(e,t,i){var n=1;if(i.length){var s=li(i,or(Da));n|=o}return Xs(e,n,t,i,s)})),Fa=zn((function(e,t,i){var n=3;if(i.length){var s=li(i,or(Fa));n|=o}return Xs(t,n,e,i,s)}));function Ta(e,t,s){var r,a,o,l,A,c,u=0,h=!1,d=!1,g=!0;if("function"!=typeof e)throw new ke(n);function p(t){var n=r,s=a;return r=a=i,u=t,l=e.apply(s,n)}function f(e){var n=e-c;return c===i||n>=t||n<0||d&&e-u>=o}function m(){var e=Sa();if(f(e))return C(e);A=kr(m,function(e){var i=t-(e-c);return d?Ci(i,o-(e-u)):i}(e))}function C(e){return A=i,g&&r?p(e):(r=a=i,l)}function I(){var e=Sa(),n=f(e);if(r=arguments,a=this,c=e,n){if(A===i)return function(e){return u=e,A=kr(m,t),h?p(e):l}(c);if(d)return ys(A),A=kr(m,t),p(c)}return A===i&&(A=kr(m,t)),l}return t=Io(t)||0,io(s)&&(h=!!s.leading,o=(d="maxWait"in s)?mi(Io(s.maxWait)||0,t):o,g="trailing"in s?!!s.trailing:g),I.cancel=function(){A!==i&&ys(A),u=0,r=c=a=A=i},I.flush=function(){return A===i?l:C(Sa())},I}var Ma=zn((function(e,t){return cn(e,1,t)})),Ra=zn((function(e,t,i){return cn(e,Io(t)||0,i)}));function Na(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ke(n);var i=function(){var n=arguments,s=t?t.apply(this,n):n[0],r=i.cache;if(r.has(s))return r.get(s);var a=e.apply(this,n);return i.cache=r.set(s,a)||r,a};return i.cache=new(Na.Cache||Vi),i}function La(e){if("function"!=typeof e)throw new ke(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Na.Cache=Vi;var Ua=vs((function(e,t){var i=(t=1==t.length&&Va(t[0])?Tt(t[0],Xt(lr())):Tt(mn(t,1),Xt(lr()))).length;return zn((function(n){for(var s=-1,r=Ci(n.length,i);++s<r;)n[s]=t[s].call(this,n[s]);return wt(e,this,n)}))})),Ha=zn((function(e,t){var n=li(t,or(Ha));return Xs(e,o,i,t,n)})),Pa=zn((function(e,t){var n=li(t,or(Pa));return Xs(e,l,i,t,n)})),Oa=ir((function(e,t){return Xs(e,c,i,i,i,t)}));function Ga(e,t){return e===t||e!=e&&t!=t}var Ka=Vs(Qn),qa=Vs((function(e,t){return e>=t})),Ya=Dn(function(){return arguments}())?Dn:function(e){return no(e)&&Ne.call(e,"callee")&&!Je.call(e,"callee")},Va=ye.isArray,Wa=It?Xt(It):function(e){return no(e)&&wn(e)==F};function ja(e){return null!=e&&to(e.length)&&!Za(e)}function Ja(e){return no(e)&&ja(e)}var za=Ut||Il,Xa=vt?Xt(vt):function(e){return no(e)&&wn(e)==I};function $a(e){if(!no(e))return!1;var t=wn(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ao(e)}function Za(e){if(!io(e))return!1;var t=wn(e);return t==B||t==y||"[object AsyncFunction]"==t||"[object Proxy]"==t}function eo(e){return"number"==typeof e&&e==mo(e)}function to(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function io(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function no(e){return null!=e&&"object"==typeof e}var so=Bt?Xt(Bt):function(e){return no(e)&&gr(e)==b};function ro(e){return"number"==typeof e||no(e)&&wn(e)==E}function ao(e){if(!no(e)||wn(e)!=w)return!1;var t=We(e);if(null===t)return!0;var i=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Re.call(i)==Pe}var oo=yt?Xt(yt):function(e){return no(e)&&wn(e)==_};var lo=bt?Xt(bt):function(e){return no(e)&&gr(e)==S};function Ao(e){return"string"==typeof e||!Va(e)&&no(e)&&wn(e)==x}function co(e){return"symbol"==typeof e||no(e)&&wn(e)==k}var uo=Et?Xt(Et):function(e){return no(e)&&to(e.length)&&!!at[wn(e)]};var ho=Vs(Un),go=Vs((function(e,t){return e<=t}));function po(e){if(!e)return[];if(ja(e))return Ao(e)?ui(e):xs(e);if(et&&e[et])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[et]());var t=gr(e);return(t==b?ai:t==S?Ai:Ko)(e)}function fo(e){return e?(e=Io(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function mo(e){var t=fo(e),i=t%1;return t==t?i?t-i:t:0}function Co(e){return e?on(mo(e),0,g):0}function Io(e){if("number"==typeof e)return e;if(co(e))return d;if(io(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=io(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=zt(e);var i=pe.test(e);return i||me.test(e)?ct(e.slice(2),i?2:8):ge.test(e)?d:+e}function vo(e){return ks(e,Ro(e))}function Bo(e){return null==e?"":As(e)}var yo=Fs((function(e,t){if(br(t)||ja(t))ks(t,Mo(t),e);else for(var i in t)Ne.call(t,i)&&en(e,i,t[i])})),bo=Fs((function(e,t){ks(t,Ro(t),e)})),Eo=Fs((function(e,t,i,n){ks(t,Ro(t),e,n)})),wo=Fs((function(e,t,i,n){ks(t,Mo(t),e,n)})),Qo=ir(an);var _o=zn((function(e,t){e=_e(e);var n=-1,s=t.length,r=s>2?t[2]:i;for(r&&Ir(t[0],t[1],r)&&(s=1);++n<s;)for(var a=t[n],o=Ro(a),l=-1,A=o.length;++l<A;){var c=o[l],u=e[c];(u===i||Ga(u,Te[c])&&!Ne.call(e,c))&&(e[c]=a[c])}return e})),So=zn((function(e){return e.push(i,Zs),wt(Lo,i,e)}));function xo(e,t,n){var s=null==e?i:bn(e,t);return s===i?n:s}function ko(e,t){return null!=e&&pr(e,t,Sn)}var Do=Os((function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=He.call(t)),e[t]=i}),nl(al)),Fo=Os((function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=He.call(t)),Ne.call(e,t)?e[t].push(i):e[t]=[i]}),lr),To=zn(kn);function Mo(e){return ja(e)?Ji(e):Nn(e)}function Ro(e){return ja(e)?Ji(e,!0):Ln(e)}var No=Fs((function(e,t,i){Gn(e,t,i)})),Lo=Fs((function(e,t,i,n){Gn(e,t,i,n)})),Uo=ir((function(e,t){var i={};if(null==e)return i;var n=!1;t=Tt(t,(function(t){return t=Is(t,e),n||(n=t.length>1),t})),ks(e,sr(e),i),n&&(i=ln(i,7,er));for(var s=t.length;s--;)us(i,t[s]);return i}));var Ho=ir((function(e,t){return null==e?{}:function(e,t){return Yn(e,t,(function(t,i){return ko(e,i)}))}(e,t)}));function Po(e,t){if(null==e)return{};var i=Tt(sr(e),(function(e){return[e]}));return t=lr(t),Yn(e,i,(function(e,i){return t(e,i[0])}))}var Oo=zs(Mo),Go=zs(Ro);function Ko(e){return null==e?[]:$t(e,Mo(e))}var qo=Ns((function(e,t,i){return t=t.toLowerCase(),e+(i?Yo(t):t)}));function Yo(e){return Zo(Bo(e).toLowerCase())}function Vo(e){return(e=Bo(e))&&e.replace(Ie,ii).replace(Ze,"")}var Wo=Ns((function(e,t,i){return e+(i?"-":"")+t.toLowerCase()})),jo=Ns((function(e,t,i){return e+(i?" ":"")+t.toLowerCase()})),Jo=Rs("toLowerCase");var zo=Ns((function(e,t,i){return e+(i?"_":"")+t.toLowerCase()}));var Xo=Ns((function(e,t,i){return e+(i?" ":"")+Zo(t)}));var $o=Ns((function(e,t,i){return e+(i?" ":"")+t.toUpperCase()})),Zo=Rs("toUpperCase");function el(e,t,n){return e=Bo(e),(t=n?i:t)===i?function(e){return nt.test(e)}(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.match(Ae)||[]}(e):e.match(t)||[]}var tl=zn((function(e,t){try{return wt(e,i,t)}catch(I2){return $a(I2)?I2:new Ee(I2)}})),il=ir((function(e,t){return _t(t,(function(t){t=Hr(t),rn(e,t,Da(e[t],e))})),e}));function nl(e){return function(){return e}}var sl=Hs(),rl=Hs(!0);function al(e){return e}function ol(e){return Rn("function"==typeof e?e:ln(e,1))}var ll=zn((function(e,t){return function(i){return kn(i,e,t)}})),Al=zn((function(e,t){return function(i){return kn(e,i,t)}}));function cl(e,t,i){var n=Mo(t),s=yn(t,n);null!=i||io(t)&&(s.length||!n.length)||(i=t,t=e,e=this,s=yn(t,Mo(t)));var r=!(io(i)&&"chain"in i&&!i.chain),a=Za(e);return _t(s,(function(i){var n=t[i];e[i]=n,a&&(e.prototype[i]=function(){var t=this.__chain__;if(r||t){var i=e(this.__wrapped__);return(i.__actions__=xs(this.__actions__)).push({func:n,args:arguments,thisArg:e}),i.__chain__=t,i}return n.apply(e,Mt([this.value()],arguments))})})),e}function ul(){}var hl=Ks(Tt),dl=Ks(xt),gl=Ks(Lt);function pl(e){return vr(e)?Yt(Hr(e)):function(e){return function(t){return bn(t,e)}}(e)}var fl=Ys(),ml=Ys(!0);function Cl(){return[]}function Il(){return!1}var vl=Gs((function(e,t){return e+t}),0),Bl=js("ceil"),yl=Gs((function(e,t){return e/t}),1),bl=js("floor");var El,wl=Gs((function(e,t){return e*t}),1),Ql=js("round"),_l=Gs((function(e,t){return e-t}),0);return Hi.after=function(e,t){if("function"!=typeof t)throw new ke(n);return e=mo(e),function(){if(--e<1)return t.apply(this,arguments)}},Hi.ary=xa,Hi.assign=yo,Hi.assignIn=bo,Hi.assignInWith=Eo,Hi.assignWith=wo,Hi.at=Qo,Hi.before=ka,Hi.bind=Da,Hi.bindAll=il,Hi.bindKey=Fa,Hi.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Va(e)?e:[e]},Hi.chain=ga,Hi.chunk=function(e,t,n){t=(n?Ir(e,t,n):t===i)?1:mi(mo(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var r=0,a=0,o=ye(pt(s/t));r<s;)o[a++]=ns(e,r,r+=t);return o},Hi.compact=function(e){for(var t=-1,i=null==e?0:e.length,n=0,s=[];++t<i;){var r=e[t];r&&(s[n++]=r)}return s},Hi.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ye(e-1),i=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Mt(Va(i)?xs(i):[i],mn(t,1))},Hi.cond=function(e){var t=null==e?0:e.length,i=lr();return e=t?Tt(e,(function(e){if("function"!=typeof e[1])throw new ke(n);return[i(e[0]),e[1]]})):[],zn((function(i){for(var n=-1;++n<t;){var s=e[n];if(wt(s[0],this,i))return wt(s[1],this,i)}}))},Hi.conforms=function(e){return function(e){var t=Mo(e);return function(i){return An(i,e,t)}}(ln(e,1))},Hi.constant=nl,Hi.countBy=ma,Hi.create=function(e,t){var i=Pi(e);return null==t?i:sn(i,t)},Hi.curry=function e(t,n,s){var r=Xs(t,8,i,i,i,i,i,n=s?i:n);return r.placeholder=e.placeholder,r},Hi.curryRight=function e(t,n,s){var r=Xs(t,a,i,i,i,i,i,n=s?i:n);return r.placeholder=e.placeholder,r},Hi.debounce=Ta,Hi.defaults=_o,Hi.defaultsDeep=So,Hi.defer=Ma,Hi.delay=Ra,Hi.difference=Gr,Hi.differenceBy=Kr,Hi.differenceWith=qr,Hi.drop=function(e,t,n){var s=null==e?0:e.length;return s?ns(e,(t=n||t===i?1:mo(t))<0?0:t,s):[]},Hi.dropRight=function(e,t,n){var s=null==e?0:e.length;return s?ns(e,0,(t=s-(t=n||t===i?1:mo(t)))<0?0:t):[]},Hi.dropRightWhile=function(e,t){return e&&e.length?ds(e,lr(t,3),!0,!0):[]},Hi.dropWhile=function(e,t){return e&&e.length?ds(e,lr(t,3),!0):[]},Hi.fill=function(e,t,n,s){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Ir(e,t,n)&&(n=0,s=r),function(e,t,n,s){var r=e.length;for((n=mo(n))<0&&(n=-n>r?0:r+n),(s=s===i||s>r?r:mo(s))<0&&(s+=r),s=n>s?0:Co(s);n<s;)e[n++]=t;return e}(e,t,n,s)):[]},Hi.filter=function(e,t){return(Va(e)?kt:fn)(e,lr(t,3))},Hi.flatMap=function(e,t){return mn(wa(e,t),1)},Hi.flatMapDeep=function(e,t){return mn(wa(e,t),u)},Hi.flatMapDepth=function(e,t,n){return n=n===i?1:mo(n),mn(wa(e,t),n)},Hi.flatten=Wr,Hi.flattenDeep=function(e){return(null==e?0:e.length)?mn(e,u):[]},Hi.flattenDepth=function(e,t){return(null==e?0:e.length)?mn(e,t=t===i?1:mo(t)):[]},Hi.flip=function(e){return Xs(e,512)},Hi.flow=sl,Hi.flowRight=rl,Hi.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,n={};++t<i;){var s=e[t];n[s[0]]=s[1]}return n},Hi.functions=function(e){return null==e?[]:yn(e,Mo(e))},Hi.functionsIn=function(e){return null==e?[]:yn(e,Ro(e))},Hi.groupBy=ya,Hi.initial=function(e){return(null==e?0:e.length)?ns(e,0,-1):[]},Hi.intersection=Jr,Hi.intersectionBy=zr,Hi.intersectionWith=Xr,Hi.invert=Do,Hi.invertBy=Fo,Hi.invokeMap=ba,Hi.iteratee=ol,Hi.keyBy=Ea,Hi.keys=Mo,Hi.keysIn=Ro,Hi.map=wa,Hi.mapKeys=function(e,t){var i={};return t=lr(t,3),vn(e,(function(e,n,s){rn(i,t(e,n,s),e)})),i},Hi.mapValues=function(e,t){var i={};return t=lr(t,3),vn(e,(function(e,n,s){rn(i,n,t(e,n,s))})),i},Hi.matches=function(e){return Pn(ln(e,1))},Hi.matchesProperty=function(e,t){return On(e,ln(t,1))},Hi.memoize=Na,Hi.merge=No,Hi.mergeWith=Lo,Hi.method=ll,Hi.methodOf=Al,Hi.mixin=cl,Hi.negate=La,Hi.nthArg=function(e){return e=mo(e),zn((function(t){return Kn(t,e)}))},Hi.omit=Uo,Hi.omitBy=function(e,t){return Po(e,La(lr(t)))},Hi.once=function(e){return ka(2,e)},Hi.orderBy=function(e,t,n,s){return null==e?[]:(Va(t)||(t=null==t?[]:[t]),Va(n=s?i:n)||(n=null==n?[]:[n]),qn(e,t,n))},Hi.over=hl,Hi.overArgs=Ua,Hi.overEvery=dl,Hi.overSome=gl,Hi.partial=Ha,Hi.partialRight=Pa,Hi.partition=Qa,Hi.pick=Ho,Hi.pickBy=Po,Hi.property=pl,Hi.propertyOf=function(e){return function(t){return null==e?i:bn(e,t)}},Hi.pull=Zr,Hi.pullAll=ea,Hi.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?Vn(e,t,lr(i,2)):e},Hi.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Vn(e,t,i,n):e},Hi.pullAt=ta,Hi.range=fl,Hi.rangeRight=ml,Hi.rearg=Oa,Hi.reject=function(e,t){return(Va(e)?kt:fn)(e,La(lr(t,3)))},Hi.remove=function(e,t){var i=[];if(!e||!e.length)return i;var n=-1,s=[],r=e.length;for(t=lr(t,3);++n<r;){var a=e[n];t(a,n,e)&&(i.push(a),s.push(n))}return Wn(e,s),i},Hi.rest=function(e,t){if("function"!=typeof e)throw new ke(n);return zn(e,t=t===i?t:mo(t))},Hi.reverse=ia,Hi.sampleSize=function(e,t,n){return t=(n?Ir(e,t,n):t===i)?1:mo(t),(Va(e)?Xi:$n)(e,t)},Hi.set=function(e,t,i){return null==e?e:Zn(e,t,i)},Hi.setWith=function(e,t,n,s){return s="function"==typeof s?s:i,null==e?e:Zn(e,t,n,s)},Hi.shuffle=function(e){return(Va(e)?$i:is)(e)},Hi.slice=function(e,t,n){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&Ir(e,t,n)?(t=0,n=s):(t=null==t?0:mo(t),n=n===i?s:mo(n)),ns(e,t,n)):[]},Hi.sortBy=_a,Hi.sortedUniq=function(e){return e&&e.length?os(e):[]},Hi.sortedUniqBy=function(e,t){return e&&e.length?os(e,lr(t,2)):[]},Hi.split=function(e,t,n){return n&&"number"!=typeof n&&Ir(e,t,n)&&(t=n=i),(n=n===i?g:n>>>0)?(e=Bo(e))&&("string"==typeof t||null!=t&&!oo(t))&&!(t=As(t))&&ri(e)?Bs(ui(e),0,n):e.split(t,n):[]},Hi.spread=function(e,t){if("function"!=typeof e)throw new ke(n);return t=null==t?0:mi(mo(t),0),zn((function(i){var n=i[t],s=Bs(i,0,t);return n&&Mt(s,n),wt(e,this,s)}))},Hi.tail=function(e){var t=null==e?0:e.length;return t?ns(e,1,t):[]},Hi.take=function(e,t,n){return e&&e.length?ns(e,0,(t=n||t===i?1:mo(t))<0?0:t):[]},Hi.takeRight=function(e,t,n){var s=null==e?0:e.length;return s?ns(e,(t=s-(t=n||t===i?1:mo(t)))<0?0:t,s):[]},Hi.takeRightWhile=function(e,t){return e&&e.length?ds(e,lr(t,3),!1,!0):[]},Hi.takeWhile=function(e,t){return e&&e.length?ds(e,lr(t,3)):[]},Hi.tap=function(e,t){return t(e),e},Hi.throttle=function(e,t,i){var s=!0,r=!0;if("function"!=typeof e)throw new ke(n);return io(i)&&(s="leading"in i?!!i.leading:s,r="trailing"in i?!!i.trailing:r),Ta(e,t,{leading:s,maxWait:t,trailing:r})},Hi.thru=pa,Hi.toArray=po,Hi.toPairs=Oo,Hi.toPairsIn=Go,Hi.toPath=function(e){return Va(e)?Tt(e,Hr):co(e)?[e]:xs(Ur(Bo(e)))},Hi.toPlainObject=vo,Hi.transform=function(e,t,i){var n=Va(e),s=n||za(e)||uo(e);if(t=lr(t,4),null==i){var r=e&&e.constructor;i=s?n?new r:[]:io(e)&&Za(r)?Pi(We(e)):{}}return(s?_t:vn)(e,(function(e,n,s){return t(i,e,n,s)})),i},Hi.unary=function(e){return xa(e,1)},Hi.union=na,Hi.unionBy=sa,Hi.unionWith=ra,Hi.uniq=function(e){return e&&e.length?cs(e):[]},Hi.uniqBy=function(e,t){return e&&e.length?cs(e,lr(t,2)):[]},Hi.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?cs(e,i,t):[]},Hi.unset=function(e,t){return null==e||us(e,t)},Hi.unzip=aa,Hi.unzipWith=oa,Hi.update=function(e,t,i){return null==e?e:hs(e,t,Cs(i))},Hi.updateWith=function(e,t,n,s){return s="function"==typeof s?s:i,null==e?e:hs(e,t,Cs(n),s)},Hi.values=Ko,Hi.valuesIn=function(e){return null==e?[]:$t(e,Ro(e))},Hi.without=la,Hi.words=el,Hi.wrap=function(e,t){return Ha(Cs(t),e)},Hi.xor=Aa,Hi.xorBy=ca,Hi.xorWith=ua,Hi.zip=ha,Hi.zipObject=function(e,t){return fs(e||[],t||[],en)},Hi.zipObjectDeep=function(e,t){return fs(e||[],t||[],Zn)},Hi.zipWith=da,Hi.entries=Oo,Hi.entriesIn=Go,Hi.extend=bo,Hi.extendWith=Eo,cl(Hi,Hi),Hi.add=vl,Hi.attempt=tl,Hi.camelCase=qo,Hi.capitalize=Yo,Hi.ceil=Bl,Hi.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=Io(n))==n?n:0),t!==i&&(t=(t=Io(t))==t?t:0),on(Io(e),t,n)},Hi.clone=function(e){return ln(e,4)},Hi.cloneDeep=function(e){return ln(e,5)},Hi.cloneDeepWith=function(e,t){return ln(e,5,t="function"==typeof t?t:i)},Hi.cloneWith=function(e,t){return ln(e,4,t="function"==typeof t?t:i)},Hi.conformsTo=function(e,t){return null==t||An(e,t,Mo(t))},Hi.deburr=Vo,Hi.defaultTo=function(e,t){return null==e||e!=e?t:e},Hi.divide=yl,Hi.endsWith=function(e,t,n){e=Bo(e),t=As(t);var s=e.length,r=n=n===i?s:on(mo(n),0,s);return(n-=t.length)>=0&&e.slice(n,r)==t},Hi.eq=Ga,Hi.escape=function(e){return(e=Bo(e))&&J.test(e)?e.replace(W,ni):e},Hi.escapeRegExp=function(e){return(e=Bo(e))&&ne.test(e)?e.replace(ie,"\\$&"):e},Hi.every=function(e,t,n){var s=Va(e)?xt:gn;return n&&Ir(e,t,n)&&(t=i),s(e,lr(t,3))},Hi.find=Ca,Hi.findIndex=Yr,Hi.findKey=function(e,t){return Ht(e,lr(t,3),vn)},Hi.findLast=Ia,Hi.findLastIndex=Vr,Hi.findLastKey=function(e,t){return Ht(e,lr(t,3),Bn)},Hi.floor=bl,Hi.forEach=va,Hi.forEachRight=Ba,Hi.forIn=function(e,t){return null==e?e:Cn(e,lr(t,3),Ro)},Hi.forInRight=function(e,t){return null==e?e:In(e,lr(t,3),Ro)},Hi.forOwn=function(e,t){return e&&vn(e,lr(t,3))},Hi.forOwnRight=function(e,t){return e&&Bn(e,lr(t,3))},Hi.get=xo,Hi.gt=Ka,Hi.gte=qa,Hi.has=function(e,t){return null!=e&&pr(e,t,_n)},Hi.hasIn=ko,Hi.head=jr,Hi.identity=al,Hi.includes=function(e,t,i,n){e=ja(e)?e:Ko(e),i=i&&!n?mo(i):0;var s=e.length;return i<0&&(i=mi(s+i,0)),Ao(e)?i<=s&&e.indexOf(t,i)>-1:!!s&&Ot(e,t,i)>-1},Hi.indexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var s=null==i?0:mo(i);return s<0&&(s=mi(n+s,0)),Ot(e,t,s)},Hi.inRange=function(e,t,n){return t=fo(t),n===i?(n=t,t=0):n=fo(n),function(e,t,i){return e>=Ci(t,i)&&e<mi(t,i)}(e=Io(e),t,n)},Hi.invoke=To,Hi.isArguments=Ya,Hi.isArray=Va,Hi.isArrayBuffer=Wa,Hi.isArrayLike=ja,Hi.isArrayLikeObject=Ja,Hi.isBoolean=function(e){return!0===e||!1===e||no(e)&&wn(e)==C},Hi.isBuffer=za,Hi.isDate=Xa,Hi.isElement=function(e){return no(e)&&1===e.nodeType&&!ao(e)},Hi.isEmpty=function(e){if(null==e)return!0;if(ja(e)&&(Va(e)||"string"==typeof e||"function"==typeof e.splice||za(e)||uo(e)||Ya(e)))return!e.length;var t=gr(e);if(t==b||t==S)return!e.size;if(br(e))return!Nn(e).length;for(var i in e)if(Ne.call(e,i))return!1;return!0},Hi.isEqual=function(e,t){return Fn(e,t)},Hi.isEqualWith=function(e,t,n){var s=(n="function"==typeof n?n:i)?n(e,t):i;return s===i?Fn(e,t,i,n):!!s},Hi.isError=$a,Hi.isFinite=function(e){return"number"==typeof e&&Vt(e)},Hi.isFunction=Za,Hi.isInteger=eo,Hi.isLength=to,Hi.isMap=so,Hi.isMatch=function(e,t){return e===t||Tn(e,t,cr(t))},Hi.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Tn(e,t,cr(t),n)},Hi.isNaN=function(e){return ro(e)&&e!=+e},Hi.isNative=function(e){if(yr(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mn(e)},Hi.isNil=function(e){return null==e},Hi.isNull=function(e){return null===e},Hi.isNumber=ro,Hi.isObject=io,Hi.isObjectLike=no,Hi.isPlainObject=ao,Hi.isRegExp=oo,Hi.isSafeInteger=function(e){return eo(e)&&e>=-9007199254740991&&e<=h},Hi.isSet=lo,Hi.isString=Ao,Hi.isSymbol=co,Hi.isTypedArray=uo,Hi.isUndefined=function(e){return e===i},Hi.isWeakMap=function(e){return no(e)&&gr(e)==D},Hi.isWeakSet=function(e){return no(e)&&"[object WeakSet]"==wn(e)},Hi.join=function(e,t){return null==e?"":pi.call(e,t)},Hi.kebabCase=Wo,Hi.last=$r,Hi.lastIndexOf=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var r=s;return n!==i&&(r=(r=mo(n))<0?mi(s+r,0):Ci(r,s-1)),t==t?function(e,t,i){for(var n=i+1;n--;)if(e[n]===t)return n;return n}(e,t,r):Pt(e,Kt,r,!0)},Hi.lowerCase=jo,Hi.lowerFirst=Jo,Hi.lt=ho,Hi.lte=go,Hi.max=function(e){return e&&e.length?pn(e,al,Qn):i},Hi.maxBy=function(e,t){return e&&e.length?pn(e,lr(t,2),Qn):i},Hi.mean=function(e){return qt(e,al)},Hi.meanBy=function(e,t){return qt(e,lr(t,2))},Hi.min=function(e){return e&&e.length?pn(e,al,Un):i},Hi.minBy=function(e,t){return e&&e.length?pn(e,lr(t,2),Un):i},Hi.stubArray=Cl,Hi.stubFalse=Il,Hi.stubObject=function(){return{}},Hi.stubString=function(){return""},Hi.stubTrue=function(){return!0},Hi.multiply=wl,Hi.nth=function(e,t){return e&&e.length?Kn(e,mo(t)):i},Hi.noConflict=function(){return dt._===this&&(dt._=Oe),this},Hi.noop=ul,Hi.now=Sa,Hi.pad=function(e,t,i){e=Bo(e);var n=(t=mo(t))?ci(e):0;if(!t||n>=t)return e;var s=(t-n)/2;return qs(mt(s),i)+e+qs(pt(s),i)},Hi.padEnd=function(e,t,i){e=Bo(e);var n=(t=mo(t))?ci(e):0;return t&&n<t?e+qs(t-n,i):e},Hi.padStart=function(e,t,i){e=Bo(e);var n=(t=mo(t))?ci(e):0;return t&&n<t?qs(t-n,i)+e:e},Hi.parseInt=function(e,t,i){return i||null==t?t=0:t&&(t=+t),vi(Bo(e).replace(se,""),t||0)},Hi.random=function(e,t,n){if(n&&"boolean"!=typeof n&&Ir(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=fo(e),t===i?(t=e,e=0):t=fo(t)),e>t){var s=e;e=t,t=s}if(n||e%1||t%1){var r=Bi();return Ci(e+r*(t-e+At("1e-"+((r+"").length-1))),t)}return jn(e,t)},Hi.reduce=function(e,t,i){var n=Va(e)?Rt:Wt,s=arguments.length<3;return n(e,lr(t,4),i,s,hn)},Hi.reduceRight=function(e,t,i){var n=Va(e)?Nt:Wt,s=arguments.length<3;return n(e,lr(t,4),i,s,dn)},Hi.repeat=function(e,t,n){return t=(n?Ir(e,t,n):t===i)?1:mo(t),Jn(Bo(e),t)},Hi.replace=function(){var e=arguments,t=Bo(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Hi.result=function(e,t,n){var s=-1,r=(t=Is(t,e)).length;for(r||(r=1,e=i);++s<r;){var a=null==e?i:e[Hr(t[s])];a===i&&(s=r,a=n),e=Za(a)?a.call(e):a}return e},Hi.round=Ql,Hi.runInContext=e,Hi.sample=function(e){return(Va(e)?zi:Xn)(e)},Hi.size=function(e){if(null==e)return 0;if(ja(e))return Ao(e)?ci(e):e.length;var t=gr(e);return t==b||t==S?e.size:Nn(e).length},Hi.snakeCase=zo,Hi.some=function(e,t,n){var s=Va(e)?Lt:ss;return n&&Ir(e,t,n)&&(t=i),s(e,lr(t,3))},Hi.sortedIndex=function(e,t){return rs(e,t)},Hi.sortedIndexBy=function(e,t,i){return as(e,t,lr(i,2))},Hi.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var n=rs(e,t);if(n<i&&Ga(e[n],t))return n}return-1},Hi.sortedLastIndex=function(e,t){return rs(e,t,!0)},Hi.sortedLastIndexBy=function(e,t,i){return as(e,t,lr(i,2),!0)},Hi.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var i=rs(e,t,!0)-1;if(Ga(e[i],t))return i}return-1},Hi.startCase=Xo,Hi.startsWith=function(e,t,i){return e=Bo(e),i=null==i?0:on(mo(i),0,e.length),t=As(t),e.slice(i,i+t.length)==t},Hi.subtract=_l,Hi.sum=function(e){return e&&e.length?jt(e,al):0},Hi.sumBy=function(e,t){return e&&e.length?jt(e,lr(t,2)):0},Hi.template=function(e,t,n){var s=Hi.templateSettings;n&&Ir(e,t,n)&&(t=i),e=Bo(e),t=Eo({},t,s,$s);var r,a,o=Eo({},t.imports,s.imports,$s),l=Mo(o),A=$t(o,l),c=0,u=t.interpolate||ve,h="__p += '",d=Se((t.escape||ve).source+"|"+u.source+"|"+(u===$?he:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),g="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(d,(function(t,i,n,s,o,l){return n||(n=s),h+=e.slice(c,l).replace(Be,si),i&&(r=!0,h+="' +\n__e("+i+") +\n'"),o&&(a=!0,h+="';\n"+o+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=l+t.length,t})),h+="';\n";var p=Ne.call(t,"variable")&&t.variable;if(p){if(ce.test(p))throw new Ee("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(K,""):h).replace(q,"$1").replace(Y,"$1;"),h="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var f=tl((function(){return we(l,g+"return "+h).apply(i,A)}));if(f.source=h,$a(f))throw f;return f},Hi.times=function(e,t){if((e=mo(e))<1||e>h)return[];var i=g,n=Ci(e,g);t=lr(t),e-=g;for(var s=Jt(n,t);++i<e;)t(i);return s},Hi.toFinite=fo,Hi.toInteger=mo,Hi.toLength=Co,Hi.toLower=function(e){return Bo(e).toLowerCase()},Hi.toNumber=Io,Hi.toSafeInteger=function(e){return e?on(mo(e),-9007199254740991,h):0===e?e:0},Hi.toString=Bo,Hi.toUpper=function(e){return Bo(e).toUpperCase()},Hi.trim=function(e,t,n){if((e=Bo(e))&&(n||t===i))return zt(e);if(!e||!(t=As(t)))return e;var s=ui(e),r=ui(t);return Bs(s,ei(s,r),ti(s,r)+1).join("")},Hi.trimEnd=function(e,t,n){if((e=Bo(e))&&(n||t===i))return e.slice(0,hi(e)+1);if(!e||!(t=As(t)))return e;var s=ui(e);return Bs(s,0,ti(s,ui(t))+1).join("")},Hi.trimStart=function(e,t,n){if((e=Bo(e))&&(n||t===i))return e.replace(se,"");if(!e||!(t=As(t)))return e;var s=ui(e);return Bs(s,ei(s,ui(t))).join("")},Hi.truncate=function(e,t){var n=30,s="...";if(io(t)){var r="separator"in t?t.separator:r;n="length"in t?mo(t.length):n,s="omission"in t?As(t.omission):s}var a=(e=Bo(e)).length;if(ri(e)){var o=ui(e);a=o.length}if(n>=a)return e;var l=n-ci(s);if(l<1)return s;var A=o?Bs(o,0,l).join(""):e.slice(0,l);if(r===i)return A+s;if(o&&(l+=A.length-l),oo(r)){if(e.slice(l).search(r)){var c,u=A;for(r.global||(r=Se(r.source,Bo(de.exec(r))+"g")),r.lastIndex=0;c=r.exec(u);)var h=c.index;A=A.slice(0,h===i?l:h)}}else if(e.indexOf(As(r),l)!=l){var d=A.lastIndexOf(r);d>-1&&(A=A.slice(0,d))}return A+s},Hi.unescape=function(e){return(e=Bo(e))&&j.test(e)?e.replace(V,di):e},Hi.uniqueId=function(e){var t=++Le;return Bo(e)+t},Hi.upperCase=$o,Hi.upperFirst=Zo,Hi.each=va,Hi.eachRight=Ba,Hi.first=jr,cl(Hi,(El={},vn(Hi,(function(e,t){Ne.call(Hi.prototype,t)||(El[t]=e)})),El),{chain:!1}),Hi.VERSION="4.17.21",_t(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Hi[e].placeholder=Hi})),_t(["drop","take"],(function(e,t){Ki.prototype[e]=function(n){n=n===i?1:mi(mo(n),0);var s=this.__filtered__&&!t?new Ki(this):this.clone();return s.__filtered__?s.__takeCount__=Ci(n,s.__takeCount__):s.__views__.push({size:Ci(n,g),type:e+(s.__dir__<0?"Right":"")}),s},Ki.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),_t(["filter","map","takeWhile"],(function(e,t){var i=t+1,n=1==i||3==i;Ki.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lr(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}})),_t(["head","last"],(function(e,t){var i="take"+(t?"Right":"");Ki.prototype[e]=function(){return this[i](1).value()[0]}})),_t(["initial","tail"],(function(e,t){var i="drop"+(t?"":"Right");Ki.prototype[e]=function(){return this.__filtered__?new Ki(this):this[i](1)}})),Ki.prototype.compact=function(){return this.filter(al)},Ki.prototype.find=function(e){return this.filter(e).head()},Ki.prototype.findLast=function(e){return this.reverse().find(e)},Ki.prototype.invokeMap=zn((function(e,t){return"function"==typeof e?new Ki(this):this.map((function(i){return kn(i,e,t)}))})),Ki.prototype.reject=function(e){return this.filter(La(lr(e)))},Ki.prototype.slice=function(e,t){e=mo(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Ki(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=mo(t))<0?n.dropRight(-t):n.take(t-e)),n)},Ki.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ki.prototype.toArray=function(){return this.take(g)},vn(Ki.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),s=/^(?:head|last)$/.test(t),r=Hi[s?"take"+("last"==t?"Right":""):t],a=s||/^find/.test(t);r&&(Hi.prototype[t]=function(){var t=this.__wrapped__,o=s?[1]:arguments,l=t instanceof Ki,A=o[0],c=l||Va(t),u=function(e){var t=r.apply(Hi,Mt([e],o));return s&&h?t[0]:t};c&&n&&"function"==typeof A&&1!=A.length&&(l=c=!1);var h=this.__chain__,d=!!this.__actions__.length,g=a&&!h,p=l&&!d;if(!a&&c){t=p?t:new Ki(this);var f=e.apply(t,o);return f.__actions__.push({func:pa,args:[u],thisArg:i}),new Gi(f,h)}return g&&p?e.apply(this,o):(f=this.thru(u),g?s?f.value()[0]:f.value():f)})})),_t(["pop","push","shift","sort","splice","unshift"],(function(e){var t=De[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Hi.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var s=this.value();return t.apply(Va(s)?s:[],e)}return this[i]((function(i){return t.apply(Va(i)?i:[],e)}))}})),vn(Ki.prototype,(function(e,t){var i=Hi[t];if(i){var n=i.name+"";Ne.call(ki,n)||(ki[n]=[]),ki[n].push({name:t,func:i})}})),ki[Ps(i,2).name]=[{name:"wrapper",func:i}],Ki.prototype.clone=function(){var e=new Ki(this.__wrapped__);return e.__actions__=xs(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=xs(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=xs(this.__views__),e},Ki.prototype.reverse=function(){if(this.__filtered__){var e=new Ki(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ki.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=Va(e),n=t<0,s=i?e.length:0,r=function(e,t,i){var n=-1,s=i.length;for(;++n<s;){var r=i[n],a=r.size;switch(r.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Ci(t,e+a);break;case"takeRight":e=mi(e,t-a)}}return{start:e,end:t}}(0,s,this.__views__),a=r.start,o=r.end,l=o-a,A=n?o:a-1,c=this.__iteratees__,u=c.length,h=0,d=Ci(l,this.__takeCount__);if(!i||!n&&s==l&&d==l)return gs(e,this.__actions__);var g=[];e:for(;l--&&h<d;){for(var p=-1,f=e[A+=t];++p<u;){var m=c[p],C=m.iteratee,I=m.type,v=C(f);if(2==I)f=v;else if(!v){if(1==I)continue e;break e}}g[h++]=f}return g},Hi.prototype.at=fa,Hi.prototype.chain=function(){return ga(this)},Hi.prototype.commit=function(){return new Gi(this.value(),this.__chain__)},Hi.prototype.next=function(){this.__values__===i&&(this.__values__=po(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Hi.prototype.plant=function(e){for(var t,n=this;n instanceof Oi;){var s=Or(n);s.__index__=0,s.__values__=i,t?r.__wrapped__=s:t=s;var r=s;n=n.__wrapped__}return r.__wrapped__=e,t},Hi.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ki){var t=e;return this.__actions__.length&&(t=new Ki(this)),(t=t.reverse()).__actions__.push({func:pa,args:[ia],thisArg:i}),new Gi(t,this.__chain__)}return this.thru(ia)},Hi.prototype.toJSON=Hi.prototype.valueOf=Hi.prototype.value=function(){return gs(this.__wrapped__,this.__actions__)},Hi.prototype.first=Hi.prototype.head,et&&(Hi.prototype[et]=function(){return this}),Hi}();pt?((pt.exports=gi)._=gi,gt._=gi):dt._=gi}).call(MC)}(FF,FF.exports);const TF=RC(FF.exports),MF=new gF,RF=TC("searchView",{state:()=>({searchKeyword:"",pdfLoadStatus:0,
//pdf加载状态，0未加载，1加载中，2加载完成
showSearchTotalLine:!1,searchValue:"",searchValueArr:[],searchResultList:{},isMatchByPage:!0,
// 是否通过页面检索(true: and检索, false: or检索)
numPages:0,
//pdf总页数
//img模式
searchList:[],show_dialog:!1,newSearchIndexArr:{},newXmlSizeArr:{},pwdPassword:"",url_Prefix:"",url_Suffix:"",pageContents:"",imgTextArray:[],xmlTextDataObj:[],currentHeightLine:[],
//当前选中的高亮文字
currentPageInfo:{},
//pdf模式
pageContentMap:{},pdfDocument:null,searchLocal:!1,searchActionStatus:0,
//1:检索中， 2:检索完成
searchResultArray:[],selectedKeywordInfo:{},searchType:""}),getters:{},actions:{
// 4)绘制关键词矩形
fullRect(){let e=this.currentPageInfo;const t=cF();e=new Proxy(e,{}),t.getCurrentPagenos().map((t=>{let i=this.resetRectinfo(t),n=PC("#search_canvas_"+t)[0].getContext("2d");if(i&&i.length)for(let s=0,r=i.length;s<r;s++){let r=i[s].split(","),a=Number(r[0]),o=Number(r[1]),l=Number(r[2]),A=Number(r[3]);e.divIndexArray&&e.divIndexArray.indexOf(s)>-1&&e.pageno==t?n.fillStyle="rgba(255,147,106,.6)":n.fillStyle="rgba(255,245,118,.6)",n.fillRect(a,o,l,A)}}))},
// 6)根据当前比率，重置矩形信息
resetRectinfo(e){if(!this.newXmlSizeArr[e])return[];var t=PC("#search_canvas_"+e).parent().width(),i=PC("#search_canvas_"+e).parent().height();document.getElementById("search_canvas_"+e).width=t,document.getElementById("search_canvas_"+e).height=i;let n=PC("#search_canvas_"+e).width(),s=this.newXmlSizeArr[e].w/n,r=this.newSearchIndexArr[e],a=[];return r&&r.length&&(a=r.map((function(e){let t=e.split(",");return t=t.map((function(e){return e/s})),e=t.join(",")}))),a},setDocument(e){e&&(this.pdfDocument=e,this.pdfLoadStatus=2)},
// 定义处理单个页面的异步函数
async processSinglePage(e,t,i){try{const n=await t.getPage(e),s=n.getViewport({scale:1.3333333333333333}),r=await n.getTextContent({normalizeWhitespace:!0}),a=document.getElementById("book_page_"+e),o=document.createElement("div");o.className="textLayer",90===n.rotate&&(o.style.transform="rotate(90deg)",o.style.transformOrigin="top left",o.style.left="100%"),a&&(PC(a).empty(),a.appendChild(o));const l=new pdfjsLib.TextLayer({textContentSource:r,container:o,viewport:s});o.style.setProperty("--scale-factor",PC("#book_main").height()/i.get("first_height")),o.style.setProperty("--scale-round-x","1px"),o.style.setProperty("--scale-round-y","1px"),await l.render();const{textDivs:A,textContentItemsStr:c,container:u}=l;let h=[],d=1,g=[];c.map(((e,t)=>{h.push(e);let i={_spanIdx:t,_Pos:d,_Len:e.length,_Content:e};d+=i._Len,g.push(i)})),this.pageContentMap[e]={
// container,
textArray:g,allTextContent:h.join(""),textDivs:A,
// textContentItemsStr,
textContent:r}}catch(n){console.error(`处理第 ${e} 页时出错:`,n)}},renderPageTextLayerByPdf(e){JC(),Yh(this.pdfDocument),e.map((e=>{PC(`#book_page_${e}`).empty()}))},
//异步获取pdf文本层，用于全文检索
rendingTextLayer(e){const t=JC();let i=Yh(this.pdfDocument);this.numPages=i.numPages;let n=[];return e.map((e=>{n.push(this.processSinglePage(e,i,t))})),Promise.all(n)},checkKeywordInParagraph(e,t,i){let n=[];t.map((e=>{let t=e.keyword.length;e.indexList.map((e=>{for(let i=e;i<e+t;i++)n.push(i+1)}))}));let s=[];return i.map((t=>{let i=parseInt(t._Pos),r=i+parseInt(t._Len)-1,a=n.filter((e=>e>=i&&e<=r));if(a.length){let i=t._Content.split(""),n="",r=[];i.map(((e,i)=>{a.findIndex((e=>e==parseInt(t._Pos)+i))>-1?r.push(e):(r.length&&(n+=this.joinHeigText(r),r=[]),n+=e)})),r.length&&(n+=this.joinHeigText(r),r=[]);let o={pageno:e,text:n,spanIdx:t._spanIdx,baseText:t._Content};s.push(o)}})),s},joinHeigText:e=>`<span class="highlight">${e.join("")}</span>`,
//在全部text中查找关键词，返回关键词位置列表
searchKeywordInText(e,t){e=e.map((e=>e.toLowerCase())),t=t.toLowerCase();let i=[];if(e.forEach((e=>{let n={keyword:e,indexList:[]},s=0;for(;-1!==(s=t.indexOf(e,s));)n.indexList.push(s),s++;i.push(n)})),this.isMatchByPage){i.every((e=>e.indexList.length>0))||(i=[])}else i=i.filter((e=>e.indexList.length>0));return i},async searchAction(){if(!this.searchValueArr.length)return;const e=JC();let t=e.get("compatibleFlg"),i=e.get("viewerType");"1"==t?(await this.searchwithinImg(i),this.fullRect(),this.searchActionStatus=2):this.searchwithinPDF("search")},async searchwithinImg(e,t=1){const i=JC(),n=i.get("totalPageNo"),s=i.get("url_Prefix"),r=i.get("url_Suffix");let a=Math.min(t+10,n);const o=[];if(!1===this.searchLocal){for(let i=t;i<=a;i++){let t="DL"===e?"../text/"+i+".xml":s+"text/"+i+".xml"+r;o.push(this.loadXml(i,t))}try{await Promise.all(o),a<n&&await this.searchwithinImg(e,a+1)}catch(l){throw console.error("请求 XML 文件时出错:",l),l}}else this.xmlTextDataObj.forEach((e=>{this.calcFindMatch_compatible(e.pagenumNew,e.allText,e.allRect,e.textArray)}))},loadXml(e,t){return PC.get(t,{dataType:"xml"},(e=>{var t;let i=(new XMLSerializer).serializeToString(e);const n=MF.xml2js(i);let s=n.Page._num,r=n.Page._MediaBox.split(",");this.newXmlSizeArr[s]={w:r[2],h:r[3]};let a=Array.isArray(n.Page.Content.Text)?n.Page.Content.Text:(null==(t=n.Page.Content.Text)?void 0:t.hasOwnProperty("Tc"))?[n.Page.Content.Text]:[],o="",l=[];Array.isArray(a)?a.map(((e,t)=>{Array.isArray(e.Tc)||(e.Tc=[e.Tc]),o+=e._Content,l.push(...e.Tc)})):o+=(null==a?void 0:a._Content)||"";let A={pagenumNew:s,allText:o,allRect:l,textArray:a};this.xmlTextDataObj.push(A),this.calcFindMatch_compatible(s,o,l,a)}))},calcFindMatch_compatible:function(e,t,i){var n=e,s=t;let r=t,a=this.searchValueArr;if(0!==a.length){r=r.toLowerCase();var o=this.isMatchByPage,l=0,A=[];if(PC.each(a,(function(){if(""===this)return!0;for(var e=this.toLowerCase(),t=e.length,i=-t,n=!1;-1!==(i=r.indexOf(e,i+t));){for(var s=i,a=i+t;s<a;s++)A.push(s);n=!0}if(n)l++;else if(o)return l=-1,!1})),l<=0)return!1;A=TF.uniq(A),A=TF.sortBy(A);for(var c=/[,.\s，。]/g,u=-999,h=[],d=0;d<A.length;d++){var g=A[d];if(g>u){var p=r.substring(0,g).match(c),f=p?p[p.length-1]:" ";-1===(u=r.lastIndexOf(f,g))&&(u=0),g-u<30&&(g=u+30);var m=r.substring(g).match(c),C=m?m[0]:" ",I=0;-1===(I=r.indexOf(C,u+30))&&(I=r.length);for(var v=d,B=A[v],y=s.substring(u,B),b=1,E=[];v<A.length;v++){if(E.push(v),i[A[v]]&&i[A[v]]._rect){let e=i[A[v]]._rect.split(","),t=e[0]+","+e[1]+","+(Number(e[2])-Number(e[0]))+","+(Number(e[3])-Number(e[1]));h.push(t)}if(A[v+1]&&A[v+1]===A[v]+1)b++;else{var w=s.substr(B,b);if(y+="<span class='highlight'>"+(w=VC(w))+"</span>",!(A[v+1]&&A[v+1]<I)){B+=b;break}y+=s.substring(B+b,A[v+1]),B=A[v+1],b=1}}var Q=s.substring(B,I),_=y+=VC(Q);u=I;let e=cF().updateTurnCurrPage(n);e?e.length>15&&(e=e.slice(0,15)+"..."):e="";let t={text:_,pageno:n,divIndexArray:E};const a=[...this.searchResultArray,t].sort(((e,t)=>e.pageno-t.pageno));this.searchResultArray=a}}this.newSearchIndexArr[n]=h}},formatPos(e){let t=e.split(",");return[t[0],t[1],t[2]-t[0],t[3]-t[1]].join(",")},async searchwithinPDF(e,t=[]){this.searchType=e;let i=this.searchValueArr;if(2!==this.pdfLoadStatus)return;if(i.length<1)return;const n=Yh(this.pdfDocument).numPages;if(Object.keys(this.pageContentMap).length!==n){const e=Array.from({length:n},((e,t)=>t+1));await this.rendingTextLayer(e)}let s="search"===e?1:Math.min(...t),r=s<=this.numPages;for(this.getSearchResTotalNum();r;){let i=this._searchwithinPDF(s);!1===i?(r=!1,setTimeout((()=>{this.searchActionStatus=2}),1e3)):"search"===e?(this.searchResultList[s]=i,r=s++<=this.numPages):(r=s++<=Math.max(...t),this.setSelectedLinePdf(this.selectedKeywordInfo))}},_searchwithinPDF(e){let t=this.pageContentMap[e];if(!t)return!1;let{allTextContent:i,textArray:n,textDivs:s}=t,r=this.searchKeywordInText(this.searchValueArr,i),a=this.checkKeywordInParagraph(e,r,n);return this.calcFindMatch(e,i),a.map((e=>{s[e.spanIdx].innerHTML=e.text})),a},calcFindMatch(e,t){let i=t,n=t,s=this.searchValueArr;n=n.toLowerCase();let r=this.isMatchByPage,a=0,o=[];if(PC.each(s,(function(){if(""===this)return!0;let e=this.toLowerCase(),t=e.length,i=-t,s=!1;for(;i=n.indexOf(e,i+t),-1!==i;){for(let e=i,n=i+t;e<n;e++)o.push(e);s=!0}if(s)a++;else if(r)return a=-1,!1})),a<=0)return!1;o=TF.uniq(o),o=TF.sortBy(o);let l=/[,.\s，。]/g,A=-999;for(let c=0;c<o.length;c++){let t=o[c];if(t>A){let s=n.substring(0,t).match(l),r=s?s[s.length-1]:" ";A=n.lastIndexOf(r,t),-1===A&&(A=0),t-A<30&&(t=A+30);let a=n.substring(t).match(l),u=a?a[0]:" ",h=0;h=n.indexOf(u,A+30),-1===h&&(h=n.length);let d=c,g=o[d],p=i.substring(A,g),f=1,m=[];for(;d<o.length;d++)if(o[d+1]&&o[d+1]===o[d]+1)f++;else{let t=i.substr(g,f);t=VC(t),p+="<span class='highlight'>"+t+"</span>";let n=this.convertMatches([g],e,t);if(m.push(n[0]),!(o[d+1]&&o[d+1]<h)){g+=f;break}p+=i.substring(g+f,o[d+1]),g=o[d+1],f=1}let C=i.substring(g,h);p+=VC(C);let I=p;A=h;let v=cF().updateTurnCurrPage(e);v?v.length>15&&(v=v.slice(0,15)+"..."):v="";let B={text:I,pageno:e,divIndexArray:m};"search"===this.searchType&&this.searchResultArray.push(B)}}},convertMatches(e,t,i,n){var s=0,r=0,a=this.pageContentMap[t].textContent.items,o=a.length-1,l=i.length,A=[];if(!e)return A;for(var c=0,u=e.length;c<u;c++){for(var h=e[c];s!==o&&h>=r+a[s].str.length;)r+=a[s].str.length,s++;s===a.length&&console.error("Could not find a matching mapping");var d={begin:{divIdx:s,offset:h-r}};for(h+=n?n[c]:l;s!==o&&h>r+a[s].str.length;)r+=a[s].str.length,s++;d.end={divIdx:s,offset:h-r},A.push(d)}return A},getSearchResTotalNum(){let e=this.searchResultList,t=0;for(let i in e)Array.isArray(e[i])&&(t+=e[i].length);return t},clearSearch(e){this.show_dialog=!1,this.clearSearchResult(e),this.searchKeyword="",this.searchValueArr=[],this.newSearchIndexArr={},this.newXmlSizeArr={}},clearSearchResult(e){if(this.selectedKeywordInfo={},this.searchResultArray=[],this.currentPageInfo={},"1"==e){document.querySelectorAll(".bookCanvas").forEach((e=>{const t=e.getContext("2d");t&&t.clearRect(0,0,e.width,e.height)}))}else for(const t in this.searchResultList){let e=this.pageContentMap[t],{textDivs:i}=e;this.searchResultList[t].map((e=>{i[e.spanIdx].innerHTML=e.baseText}))}this.newSearchIndexArr={},this.newXmlSizeArr={},this.searchResultList={}},toPage(e,t){this.selectedKeywordInfo=e;const i=cF();i.getCurrentPagenos().includes(e.pageno)||i.gotoPageByTarget("toPageno",e.pageno,"turn_search"),1==t?this.setSelectedLineImg(e):this.setSelectedLinePdf(e)},setSelectedLineImg(e){this.currentPageInfo=e;const t=document.querySelector("#search_canvas_"+e.pageno),i=t.getContext("2d");i&&i.clearRect(0,0,t.width,t.height),this.fullRect()},
// 设置检索结果选中样式
setSelectedLinePdf:function(e){if(!(Object.keys(e).length<1)){var t=e.divIndexArray,i=this.pageContentMap[e.pageno].textDivs;PC("#book_main .highlight.selected").removeClass("selected");for(var n=0;n<t.length;n++){var s=t[n],r=s.begin.divIdx,a=s.end.divIdx,o=s.begin.offset,l=s.end.offset;if(s&&r==a)for(var A=0,c=0;c<i[r].childNodes.length;c++){var u=i[r].childNodes[c];A>=o&&A<=l&&1==u.nodeType&&PC(u).hasClass("highlight")&&PC(u).addClass("selected"),1==u.nodeType?A+=PC(u).text().length:3==u.nodeType&&(A+=u.length)}else{PC("span.highlight:last",i[r]).addClass("selected");for(c=r+1;c<a;c++)PC("span.highlight",i[c]).addClass("selected");PC("span.highlight:first",i[a]).addClass("selected")}}}},bindDragZoom(){const e=cF();PC("#search_dialog").css({width:"500px",height:"500px"}),PC("#search_dialog").draggable({containment:"parent"}),PC("#search_dialog").resizable({handles:"n, e, s, w, ne, se, sw, nw",
// 设置 8 个缩放角和边
containment:"parent",
// 限制调整大小在 .container 元素内
minWidth:300,minHeight:280,start:function(t,i){e.isResizingElement=!0,t.stopPropagation()},stop:function(t,i){t.stopPropagation(),e.isResizingElement=!1}})},async searchText(){var e;let t=bme();const i=JC();let n=1==PC('input[name="searchRadio"]:checked').val(),s=this.searchValueArr,r=this.searchKeyword.split(/[ |　]+/g);r=r.filter((e=>!!e));let a=i.get("compatibleFlg");if(r.length<1)return void("desktop"===mF.type&&this.clearSearch(a));if(r.join(",")===s.join(",")&&n===this.isMatchByPage)return t.showOnlyTools("search-pc"),!1;if(this.isMatchByPage=n,this.searchValueArr=r,await this.clearSearchResult(a),!r.length)return void(this.show_dialog=!1);"desktop"===mF.type||(this.showSearchTotalLine=!0),t.showOnlyTools("search-pc"),this.searchActionStatus=1,this.searchAction(),null==(e=PC(".search-box-ref")[0])||e.scrollTo({top:0});let o=PDe();o.sendLogByActionTpye(OC.kinesis_log_actionType_search),o.sendKinesisDetailLog("search"),o.logState.is_first_log=1}}});var NF={};!function(e){
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
var t,i,n,s,r,a,o,l,A,c,u,h,d,g,p,f=f||{version:"5.0.0"};if(e.fabric=f,"undefined"!=typeof document&&"undefined"!=typeof window)document instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document)?f.document=document:f.document=document.implementation.createHTMLDocument(""),f.window=window;else{var m=new AI.JSDOM(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window;f.document=m.document,f.jsdomImplForWrapper=AI.implForWrapper,f.nodeCanvas=AI.Canvas,f.window=m,DOMParser=f.window.DOMParser}function C(e,t){var i=e.canvas,n=t.targetCanvas,s=n.getContext("2d");s.translate(0,n.height),s.scale(1,-1);var r=i.height-n.height;s.drawImage(i,0,r,n.width,n.height,0,0,n.width,n.height)}function I(e,t){var i=t.targetCanvas.getContext("2d"),n=t.destinationWidth,s=t.destinationHeight,r=n*s*4,a=new Uint8Array(this.imageBuffer,0,r),o=new Uint8ClampedArray(this.imageBuffer,0,r);e.readPixels(0,0,n,s,e.RGBA,e.UNSIGNED_BYTE,a);var l=new ImageData(o,n,s);i.putImageData(l,0,0)}f.isTouchSupported="ontouchstart"in f.window||"ontouchstart"in f.document||f.window&&f.window.navigator&&f.window.navigator.maxTouchPoints>0,f.isLikelyNode="undefined"!=typeof Buffer&&"undefined"==typeof window,f.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","vector-effect","instantiated_by_use","clip-path"],f.DPI=96,f.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",f.commaWsp="(?:\\s+,?\\s*|,\\s*)",f.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,f.reNonWord=/[ \n\.,;!\?\-]/,f.fontPaths={},f.iMatrix=[1,0,0,1,0,0],f.svgNS="http://www.w3.org/2000/svg",f.perfLimitSizeTotal=2097152,f.maxCacheSideLimit=4096,f.minCacheSideLimit=256,f.charWidthsCache={},f.textureSize=2048,f.disableStyleCopyPaste=!1,f.enableGLFiltering=!0,f.devicePixelRatio=f.window.devicePixelRatio||f.window.webkitDevicePixelRatio||f.window.mozDevicePixelRatio||1,f.browserShadowBlurConstant=1,f.arcToSegmentsCache={},f.boundsOfCurveCache={},f.cachesBoundsOfCurve=!0,f.forceGLPutImageData=!1,f.initFilterBackend=function(){return f.enableGLFiltering&&f.isWebglSupported&&f.isWebglSupported(f.textureSize)?(f.maxTextureSize,new f.WebglFilterBackend({tileSize:f.textureSize})):f.Canvas2dFilterBackend?new f.Canvas2dFilterBackend:void 0},"undefined"!=typeof document&&"undefined"!=typeof window&&(window.fabric=f),function(){function e(e,t){if(this.__eventListeners[e]){var i=this.__eventListeners[e];t?i[i.indexOf(t)]=!1:f.util.array.fill(i,!1)}}function t(e,t){var i=function(){t.apply(this,arguments),this.off(e,i)}.bind(this);this.on(e,i)}f.Observable={fire:function(e,t){if(!this.__eventListeners)return this;var i=this.__eventListeners[e];if(!i)return this;for(var n=0,s=i.length;n<s;n++)i[n]&&i[n].call(this,t||{});return this.__eventListeners[e]=i.filter((function(e){return!1!==e})),this},on:function(e,t){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var i in e)this.on(i,e[i]);else this.__eventListeners[e]||(this.__eventListeners[e]=[]),this.__eventListeners[e].push(t);return this},once:function(e,i){if(1===arguments.length)for(var n in e)t.call(this,n,e[n]);else t.call(this,e,i);return this},off:function(t,i){if(!this.__eventListeners)return this;if(0===arguments.length)for(t in this.__eventListeners)e.call(this,t);else if(1===arguments.length&&"object"==typeof arguments[0])for(var n in t)e.call(this,n,t[n]);else e.call(this,t,i);return this}}}(),f.Collection={_objects:[],
/**
     * Adds objects to collection, Canvas or Group, then renders canvas
     * (if `renderOnAddRemove` is not `false`).
     * in case of Group no changes to bounding box are made.
     * Objects should be instances of (or inherit from) fabric.Object
     * Use of this function is highly discouraged for groups.
     * you can add a bunch of objects with the add method but then you NEED
     * to run a addWithUpdate call for the Group class or position/bbox will be wrong.
     * @param {...fabric.Object} object Zero or more fabric instances
     * @return {Self} thisArg
     * @chainable
     */
add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var e=0,t=arguments.length;e<t;e++)this._onObjectAdded(arguments[e]);return this.renderOnAddRemove&&this.requestRenderAll(),this},
/**
     * Inserts an object into collection at specified index, then renders canvas (if `renderOnAddRemove` is not `false`)
     * An object should be an instance of (or inherit from) fabric.Object
     * Use of this function is highly discouraged for groups.
     * you can add a bunch of objects with the insertAt method but then you NEED
     * to run a addWithUpdate call for the Group class or position/bbox will be wrong.
     * @param {Object} object Object to insert
     * @param {Number} index Index to insert object at
     * @param {Boolean} nonSplicing When `true`, no splicing (shifting) of objects occurs
     * @return {Self} thisArg
     * @chainable
     */
insertAt:function(e,t,i){var n=this._objects;return i?n[t]=e:n.splice(t,0,e),this._onObjectAdded&&this._onObjectAdded(e),this.renderOnAddRemove&&this.requestRenderAll(),this},
/**
     * Removes objects from a collection, then renders canvas (if `renderOnAddRemove` is not `false`)
     * @param {...fabric.Object} object Zero or more fabric instances
     * @return {Self} thisArg
     * @chainable
     */
remove:function(){for(var e,t=this._objects,i=!1,n=0,s=arguments.length;n<s;n++)-1!==(e=t.indexOf(arguments[n]))&&(i=!0,t.splice(e,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[n]));return this.renderOnAddRemove&&i&&this.requestRenderAll(),this},
/**
     * Executes given function for each object in this group
     * @param {Function} callback
     *                   Callback invoked with current object as first argument,
     *                   index - as second and an array of all objects - as third.
     *                   Callback is invoked in a context of Global Object (e.g. `window`)
     *                   when no `context` argument is given
     *
     * @param {Object} context Context (aka thisObject)
     * @return {Self} thisArg
     * @chainable
     */
forEachObject:function(e,t){for(var i=this.getObjects(),n=0,s=i.length;n<s;n++)e.call(t,i[n],n,i);return this},
/**
     * Returns an array of children objects of this instance
     * Type parameter introduced in 1.3.10
     * since 2.3.5 this method return always a COPY of the array;
     * @param {String} [type] When specified, only objects of this type are returned
     * @return {Array}
     */
getObjects:function(e){return void 0===e?this._objects.concat():this._objects.filter((function(t){return t.type===e}))},
/**
     * Returns object at specified index
     * @param {Number} index
     * @return {Self} thisArg
     */
item:function(e){return this._objects[e]},
/**
     * Returns true if collection contains no objects
     * @return {Boolean} true if collection is empty
     */
isEmpty:function(){return 0===this._objects.length},
/**
     * Returns a size of a collection (i.e: length of an array containing its objects)
     * @return {Number} Collection size
     */
size:function(){return this._objects.length},
/**
     * Returns true if collection contains an object
     * @param {Object} object Object to check against
     * @param {Boolean} [deep=false] `true` to check all descendants, `false` to check only `_objects`
     * @return {Boolean} `true` if collection contains an object
     */
contains:function(e,t){return this._objects.indexOf(e)>-1||!!t&&this._objects.some((function(t){return"function"==typeof t.contains&&t.contains(e,!0)}))},
/**
     * Returns number representation of a collection complexity
     * @return {Number} complexity
     */
complexity:function(){return this._objects.reduce((function(e,t){return e+=t.complexity?t.complexity():0}),0)}},f.CommonMethods={
/**
     * Sets object's properties from options
     * @param {Object} [options] Options object
     */
_setOptions:function(e){for(var t in e)this.set(t,e[t])},
/**
     * @private
     * @param {Object} [filler] Options object
     * @param {String} [property] property to set the Gradient to
     */
_initGradient:function(e,t){!e||!e.colorStops||e instanceof f.Gradient||this.set(t,new f.Gradient(e))},
/**
     * @private
     * @param {Object} [filler] Options object
     * @param {String} [property] property to set the Pattern to
     * @param {Function} [callback] callback to invoke after pattern load
     */
_initPattern:function(e,t,i){!e||!e.source||e instanceof f.Pattern?i&&i():this.set(t,new f.Pattern(e,i))},
/**
     * @private
     */
_setObject:function(e){for(var t in e)this._set(t,e[t])},
/**
     * Sets property to a given value. When changing position/dimension -related properties (left, top, scale, angle, etc.) `set` does not update position of object's borders/controls. If you need to update those, call `setCoords()`.
     * @param {String|Object} key Property name or object (if object, iterate over the object properties)
     * @param {Object|Function} value Property value (if function, the value is passed into it and its return value is used as a new one)
     * @return {fabric.Object} thisArg
     * @chainable
     */
set:function(e,t){return"object"==typeof e?this._setObject(e):this._set(e,t),this},_set:function(e,t){this[e]=t},
/**
     * Toggles specified property from `true` to `false` or from `false` to `true`
     * @param {String} property Property to toggle
     * @return {fabric.Object} thisArg
     * @chainable
     */
toggle:function(e){var t=this.get(e);return"boolean"==typeof t&&this.set(e,!t),this},
/**
     * Basic getter
     * @param {String} property Property name
     * @return {*} value of a property
     */
get:function(e){return this[e]}},function(e){var t=Math.sqrt,i=Math.atan2,n=Math.pow,s=Math.PI/180,r=Math.PI/2;f.util={
/**
       * Calculate the cos of an angle, avoiding returning floats for known results
       * @static
       * @memberOf fabric.util
       * @param {Number} angle the angle in radians or in degree
       * @return {Number}
       */
cos:function(e){if(0===e)return 1;switch(e<0&&(e=-e),e/r){case 1:case 3:return 0;case 2:return-1}return Math.cos(e)},
/**
       * Calculate the sin of an angle, avoiding returning floats for known results
       * @static
       * @memberOf fabric.util
       * @param {Number} angle the angle in radians or in degree
       * @return {Number}
       */
sin:function(e){if(0===e)return 0;var t=1;switch(e<0&&(t=-1),e/r){case 1:return t;case 2:return 0;case 3:return-t}return Math.sin(e)},
/**
       * Removes value from an array.
       * Presence of value (and its position in an array) is determined via `Array.prototype.indexOf`
       * @static
       * @memberOf fabric.util
       * @param {Array} array
       * @param {*} value
       * @return {Array} original array
       */
removeFromArray:function(e,t){var i=e.indexOf(t);return-1!==i&&e.splice(i,1),e},
/**
       * Returns random number between 2 specified ones.
       * @static
       * @memberOf fabric.util
       * @param {Number} min lower limit
       * @param {Number} max upper limit
       * @return {Number} random value (between min and max)
       */
getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e},
/**
       * Transforms degrees to radians.
       * @static
       * @memberOf fabric.util
       * @param {Number} degrees value in degrees
       * @return {Number} value in radians
       */
degreesToRadians:function(e){return e*s},
/**
       * Transforms radians to degrees.
       * @static
       * @memberOf fabric.util
       * @param {Number} radians value in radians
       * @return {Number} value in degrees
       */
radiansToDegrees:function(e){return e/s},
/**
       * Rotates `point` around `origin` with `radians`
       * @static
       * @memberOf fabric.util
       * @param {fabric.Point} point The point to rotate
       * @param {fabric.Point} origin The origin of the rotation
       * @param {Number} radians The radians of the angle for the rotation
       * @return {fabric.Point} The new rotated point
       */
rotatePoint:function(e,t,i){var n=new f.Point(e.x-t.x,e.y-t.y),s=f.util.rotateVector(n,i);return new f.Point(s.x,s.y).addEquals(t)},
/**
       * Rotates `vector` with `radians`
       * @static
       * @memberOf fabric.util
       * @param {Object} vector The vector to rotate (x and y)
       * @param {Number} radians The radians of the angle for the rotation
       * @return {Object} The new rotated point
       */
rotateVector:function(e,t){var i=f.util.sin(t),n=f.util.cos(t);return{x:e.x*n-e.y*i,y:e.x*i+e.y*n}},
/**
       * Creates a vetor from points represented as a point
       * @static
       * @memberOf fabric.util
       *
       * @typedef {Object} Point
       * @property {number} x
       * @property {number} y
       *
       * @param {Point} from
       * @param {Point} to
       * @returns {Point} vector
       */
createVector:function(e,t){return new f.Point(t.x-e.x,t.y-e.y)},
/**
       * Calculates angle between 2 vectors using dot product
       * @static
       * @memberOf fabric.util
       * @param {Point} a
       * @param {Point} b
       * @returns the angle in radian between the vectors
       */
calcAngleBetweenVectors:function(e,t){return Math.acos((e.x*t.x+e.y*t.y)/(Math.hypot(e.x,e.y)*Math.hypot(t.x,t.y)))},
/**
       * @static
       * @memberOf fabric.util
       * @param {Point} v
       * @returns {Point} vector representing the unit vector of pointing to the direction of `v`
       */
getHatVector:function(e){return new f.Point(e.x,e.y).multiply(1/Math.hypot(e.x,e.y))},
/**
       * @static
       * @memberOf fabric.util
       * @param {Point} A
       * @param {Point} B
       * @param {Point} C
       * @returns {{ vector: Point, angle: number }} vector representing the bisector of A and A's angle
       */
getBisector:function(e,t,i){var n=f.util.createVector(e,t),s=f.util.createVector(e,i),r=f.util.calcAngleBetweenVectors(n,s),a=r*(0===f.util.calcAngleBetweenVectors(f.util.rotateVector(n,r),s)?1:-1)/2;return{vector:f.util.getHatVector(f.util.rotateVector(n,a)),angle:r}},
/**
       * Project stroke width on points returning 2 projections for each point as follows:
       * - `miter`: 2 points corresponding to the outer boundary and the inner boundary of stroke.
       * - `bevel`: 2 points corresponding to the bevel boundaries, tangent to the bisector.
       * - `round`: same as `bevel`
       * Used to calculate object's bounding box
       * @static
       * @memberOf fabric.util
       * @param {Point[]} points
       * @param {Object} options
       * @param {number} options.strokeWidth
       * @param {'miter'|'bevel'|'round'} options.strokeLineJoin
       * @param {number} options.strokeMiterLimit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit
       * @param {boolean} options.strokeUniform
       * @param {number} options.scaleX
       * @param {number} options.scaleY
       * @param {boolean} [openPath] whether the shape is open or not, affects the calculations of the first and last points
       * @returns {fabric.Point[]} array of size 2n/4n of all suspected points
       */
projectStrokeOnPoints:function(e,t,i){var n=[],s=t.strokeWidth/2,r=t.strokeUniform?new f.Point(1/t.scaleX,1/t.scaleY):new f.Point(1,1),a=function(e){var t=s/Math.hypot(e.x,e.y);return new f.Point(e.x*t*r.x,e.y*t*r.y)};return e.length<=1||e.forEach((function(o,l){var A,c,u=new f.Point(o.x,o.y);0===l?(c=e[l+1],A=i?a(f.util.createVector(c,u)).addEquals(u):e[e.length-1]):l===e.length-1?(A=e[l-1],c=i?a(f.util.createVector(A,u)).addEquals(u):e[0]):(A=e[l-1],c=e[l+1]);var h,d,g=f.util.getBisector(u,A,c),p=g.vector,m=g.angle;if("miter"===t.strokeLineJoin&&(h=-s/Math.sin(m/2),d=new f.Point(p.x*h*r.x,p.y*h*r.y),Math.hypot(d.x,d.y)/s<=t.strokeMiterLimit))return n.push(u.add(d)),void n.push(u.subtract(d));h=-s*Math.SQRT2,d=new f.Point(p.x*h*r.x,p.y*h*r.y),n.push(u.add(d)),n.push(u.subtract(d))})),n},
/**
       * Apply transform t to point p
       * @static
       * @memberOf fabric.util
       * @param  {fabric.Point} p The point to transform
       * @param  {Array} t The transform
       * @param  {Boolean} [ignoreOffset] Indicates that the offset should not be applied
       * @return {fabric.Point} The transformed point
       */
transformPoint:function(e,t,i){return i?new f.Point(t[0]*e.x+t[2]*e.y,t[1]*e.x+t[3]*e.y):new f.Point(t[0]*e.x+t[2]*e.y+t[4],t[1]*e.x+t[3]*e.y+t[5])},
/**
       * Returns coordinates of points's bounding rectangle (left, top, width, height)
       * @param {Array} points 4 points array
       * @param {Array} [transform] an array of 6 numbers representing a 2x3 transform matrix
       * @return {Object} Object with left, top, width, height properties
       */
makeBoundingBoxFromPoints:function(e,t){if(t)for(var i=0;i<e.length;i++)e[i]=f.util.transformPoint(e[i],t);var n=[e[0].x,e[1].x,e[2].x,e[3].x],s=f.util.array.min(n),r=f.util.array.max(n)-s,a=[e[0].y,e[1].y,e[2].y,e[3].y],o=f.util.array.min(a);return{left:s,top:o,width:r,height:f.util.array.max(a)-o}},
/**
       * Invert transformation t
       * @static
       * @memberOf fabric.util
       * @param {Array} t The transform
       * @return {Array} The inverted transform
       */
invertTransform:function(e){var t=1/(e[0]*e[3]-e[1]*e[2]),i=[t*e[3],-t*e[1],-t*e[2],t*e[0]],n=f.util.transformPoint({x:e[4],y:e[5]},i,!0);return i[4]=-n.x,i[5]=-n.y,i},
/**
       * A wrapper around Number#toFixed, which contrary to native method returns number, not string.
       * @static
       * @memberOf fabric.util
       * @param {Number|String} number number to operate on
       * @param {Number} fractionDigits number of fraction digits to "leave"
       * @return {Number}
       */
toFixed:function(e,t){return parseFloat(Number(e).toFixed(t))},
/**
       * Converts from attribute value to pixel value if applicable.
       * Returns converted pixels or original value not converted.
       * @param {Number|String} value number to operate on
       * @param {Number} fontSize
       * @return {Number|String}
       */
parseUnit:function(e,t){var i=/\D{0,2}$/.exec(e),n=parseFloat(e);switch(t||(t=f.Text.DEFAULT_SVG_FONT_SIZE),i[0]){case"mm":return n*f.DPI/25.4;case"cm":return n*f.DPI/2.54;case"in":return n*f.DPI;case"pt":return n*f.DPI/72;case"pc":return n*f.DPI/72*12;case"em":return n*t;default:return n}},
/**
       * Function which always returns `false`.
       * @static
       * @memberOf fabric.util
       * @return {Boolean}
       */
falseFunction:function(){return!1},
/**
       * Returns klass "Class" object of given namespace
       * @memberOf fabric.util
       * @param {String} type Type of object (eg. 'circle')
       * @param {String} namespace Namespace to get klass "Class" object from
       * @return {Object} klass "Class"
       */
getKlass:function(e,t){return e=f.util.string.camelize(e.charAt(0).toUpperCase()+e.slice(1)),f.util.resolveNamespace(t)[e]},
/**
       * Returns array of attributes for given svg that fabric parses
       * @memberOf fabric.util
       * @param {String} type Type of svg element (eg. 'circle')
       * @return {Array} string names of supported attributes
       */
getSvgAttributes:function(e){var t=["instantiated_by_use","style","id","class"];switch(e){case"linearGradient":t=t.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":t=t.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":t=t.concat(["offset","stop-color","stop-opacity"])}return t},
/**
       * Returns object of given namespace
       * @memberOf fabric.util
       * @param {String} namespace Namespace string e.g. 'fabric.Image.filter' or 'fabric'
       * @return {Object} Object for given namespace (default fabric)
       */
resolveNamespace:function(t){if(!t)return f;var i,n=t.split("."),s=n.length,r=e||f.window;for(i=0;i<s;++i)r=r[n[i]];return r},
/**
       * Loads image element from given url and passes it to a callback
       * @memberOf fabric.util
       * @param {String} url URL representing an image
       * @param {Function} callback Callback; invoked with loaded image
       * @param {*} [context] Context to invoke callback in
       * @param {Object} [crossOrigin] crossOrigin value to set image element to
       */
loadImage:function(e,t,i,n){if(e){var s=f.util.createImage(),r=function(){t&&t.call(i,s,!1),s=s.onload=s.onerror=null};s.onload=r,s.onerror=function(){f.log("Error loading "+s.src),t&&t.call(i,null,!0),s=s.onload=s.onerror=null},0!==e.indexOf("data")&&null!=n&&(s.crossOrigin=n),"data:image/svg"===e.substring(0,14)&&(s.onload=null,f.util.loadImageInDom(s,r)),s.src=e}else t&&t.call(i,e)},
/**
       * Attaches SVG image with data: URL to the dom
       * @memberOf fabric.util
       * @param {Object} img Image object with data:image/svg src
       * @param {Function} callback Callback; invoked with loaded image
       * @return {Object} DOM element (div containing the SVG image)
       */
loadImageInDom:function(e,t){var i=f.document.createElement("div");i.style.width=i.style.height="1px",i.style.left=i.style.top="-100%",i.style.position="absolute",i.appendChild(e),f.document.querySelector("body").appendChild(i),e.onload=function(){t(),i.parentNode.removeChild(i),i=null}},
/**
       * Creates corresponding fabric instances from their object representations
       * @static
       * @memberOf fabric.util
       * @param {Array} objects Objects to enliven
       * @param {Function} callback Callback to invoke when all objects are created
       * @param {String} namespace Namespace to get klass "Class" object from
       * @param {Function} reviver Method for further parsing of object elements,
       * called after each fabric object created.
       */
enlivenObjects:function(e,t,i,n){var s=[],r=0,a=(e=e||[]).length;function o(){++r===a&&t&&t(s.filter((function(e){return e})))}a?e.forEach((function(e,t){e&&e.type?f.util.getKlass(e.type,i).fromObject(e,(function(i,r){r||(s[t]=i),n&&n(e,i,r),o()})):o()})):t&&t(s)},
/**
       * Creates corresponding fabric instances residing in an object, e.g. `clipPath`
       * @see {@link fabric.Object.ENLIVEN_PROPS}
       * @param {Object} object
       * @param {Object} [context] assign enlived props to this object (pass null to skip this)
       * @param {(objects:fabric.Object[]) => void} callback
       */
enlivenObjectEnlivables:function(e,t,i){var n=f.Object.ENLIVEN_PROPS.filter((function(t){return!!e[t]}));f.util.enlivenObjects(n.map((function(t){return e[t]})),(function(e){var s={};n.forEach((function(i,n){s[i]=e[n],t&&(t[i]=e[n])})),i&&i(s)}))},
/**
       * Create and wait for loading of patterns
       * @static
       * @memberOf fabric.util
       * @param {Array} patterns Objects to enliven
       * @param {Function} callback Callback to invoke when all objects are created
       * called after each fabric object created.
       */
enlivenPatterns:function(e,t){function i(){++s===r&&t&&t(n)}var n=[],s=0,r=(e=e||[]).length;r?e.forEach((function(e,t){e&&e.source?new f.Pattern(e,(function(e){n[t]=e,i()})):(n[t]=e,i())})):t&&t(n)},
/**
       * Groups SVG elements (usually those retrieved from SVG document)
       * @static
       * @memberOf fabric.util
       * @param {Array} elements SVG elements to group
       * @param {Object} [options] Options object
       * @param {String} path Value to set sourcePath to
       * @return {fabric.Object|fabric.Group}
       */
groupSVGElements:function(e,t,i){var n;return e&&1===e.length?e[0]:(t&&(t.width&&t.height?t.centerPoint={x:t.width/2,y:t.height/2}:(delete t.width,delete t.height)),n=new f.Group(e,t),void 0!==i&&(n.sourcePath=i),n)},
/**
       * Populates an object with properties of another object
       * @static
       * @memberOf fabric.util
       * @param {Object} source Source object
       * @param {Object} destination Destination object
       * @return {Array} properties Properties names to include
       */
populateWithProperties:function(e,t,i){if(i&&"[object Array]"===Object.prototype.toString.call(i))for(var n=0,s=i.length;n<s;n++)i[n]in e&&(t[i[n]]=e[i[n]])},
/**
       * Creates canvas element
       * @static
       * @memberOf fabric.util
       * @return {CanvasElement} initialized canvas element
       */
createCanvasElement:function(){return f.document.createElement("canvas")},
/**
       * Creates a canvas element that is a copy of another and is also painted
       * @param {CanvasElement} canvas to copy size and content of
       * @static
       * @memberOf fabric.util
       * @return {CanvasElement} initialized canvas element
       */
copyCanvasElement:function(e){var t=f.util.createCanvasElement();return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t},
/**
       * since 2.6.0 moved from canvas instance to utility.
       * @param {CanvasElement} canvasEl to copy size and content of
       * @param {String} format 'jpeg' or 'png', in some browsers 'webp' is ok too
       * @param {Number} quality <= 1 and > 0
       * @static
       * @memberOf fabric.util
       * @return {String} data url
       */
toDataURL:function(e,t,i){return e.toDataURL("image/"+t,i)},
/**
       * Creates image element (works on client and node)
       * @static
       * @memberOf fabric.util
       * @return {HTMLImageElement} HTML image element
       */
createImage:function(){return f.document.createElement("img")},
/**
       * Multiply matrix A by matrix B to nest transformations
       * @static
       * @memberOf fabric.util
       * @param  {Array} a First transformMatrix
       * @param  {Array} b Second transformMatrix
       * @param  {Boolean} is2x2 flag to multiply matrices as 2x2 matrices
       * @return {Array} The product of the two transform matrices
       */
multiplyTransformMatrices:function(e,t,i){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],i?0:e[0]*t[4]+e[2]*t[5]+e[4],i?0:e[1]*t[4]+e[3]*t[5]+e[5]]},
/**
       * Decomposes standard 2x3 matrix into transform components
       * @static
       * @memberOf fabric.util
       * @param  {Array} a transformMatrix
       * @return {Object} Components of transform
       */
qrDecompose:function(e){var r=i(e[1],e[0]),a=n(e[0],2)+n(e[1],2),o=t(a),l=(e[0]*e[3]-e[2]*e[1])/o,A=i(e[0]*e[2]+e[1]*e[3],a);return{angle:r/s,scaleX:o,scaleY:l,skewX:A/s,skewY:0,translateX:e[4],translateY:e[5]}},
/**
       * Returns a transform matrix starting from an object of the same kind of
       * the one returned from qrDecompose, useful also if you want to calculate some
       * transformations from an object that is not enlived yet
       * @static
       * @memberOf fabric.util
       * @param  {Object} options
       * @param  {Number} [options.angle] angle in degrees
       * @return {Number[]} transform matrix
       */
calcRotateMatrix:function(e){if(!e.angle)return f.iMatrix.concat();var t=f.util.degreesToRadians(e.angle),i=f.util.cos(t),n=f.util.sin(t);return[i,n,-n,i,0,0]},
/**
       * Returns a transform matrix starting from an object of the same kind of
       * the one returned from qrDecompose, useful also if you want to calculate some
       * transformations from an object that is not enlived yet.
       * is called DimensionsTransformMatrix because those properties are the one that influence
       * the size of the resulting box of the object.
       * @static
       * @memberOf fabric.util
       * @param  {Object} options
       * @param  {Number} [options.scaleX]
       * @param  {Number} [options.scaleY]
       * @param  {Boolean} [options.flipX]
       * @param  {Boolean} [options.flipY]
       * @param  {Number} [options.skewX]
       * @param  {Number} [options.skewY]
       * @return {Number[]} transform matrix
       */
calcDimensionsMatrix:function(e){var t=void 0===e.scaleX?1:e.scaleX,i=void 0===e.scaleY?1:e.scaleY,n=[e.flipX?-t:t,0,0,e.flipY?-i:i,0,0],s=f.util.multiplyTransformMatrices,r=f.util.degreesToRadians;return e.skewX&&(n=s(n,[1,0,Math.tan(r(e.skewX)),1],!0)),e.skewY&&(n=s(n,[1,Math.tan(r(e.skewY)),0,1],!0)),n},
/**
       * Returns a transform matrix starting from an object of the same kind of
       * the one returned from qrDecompose, useful also if you want to calculate some
       * transformations from an object that is not enlived yet
       * @static
       * @memberOf fabric.util
       * @param  {Object} options
       * @param  {Number} [options.angle]
       * @param  {Number} [options.scaleX]
       * @param  {Number} [options.scaleY]
       * @param  {Boolean} [options.flipX]
       * @param  {Boolean} [options.flipY]
       * @param  {Number} [options.skewX]
       * @param  {Number} [options.skewX]
       * @param  {Number} [options.translateX]
       * @param  {Number} [options.translateY]
       * @return {Number[]} transform matrix
       */
composeMatrix:function(e){var t=[1,0,0,1,e.translateX||0,e.translateY||0],i=f.util.multiplyTransformMatrices;return e.angle&&(t=i(t,f.util.calcRotateMatrix(e))),(1!==e.scaleX||1!==e.scaleY||e.skewX||e.skewY||e.flipX||e.flipY)&&(t=i(t,f.util.calcDimensionsMatrix(e))),t},
/**
       * reset an object transform state to neutral. Top and left are not accounted for
       * @static
       * @memberOf fabric.util
       * @param  {fabric.Object} target object to transform
       */
resetObjectTransform:function(e){e.scaleX=1,e.scaleY=1,e.skewX=0,e.skewY=0,e.flipX=!1,e.flipY=!1,e.rotate(0)},
/**
       * Extract Object transform values
       * @static
       * @memberOf fabric.util
       * @param  {fabric.Object} target object to read from
       * @return {Object} Components of transform
       */
saveObjectTransform:function(e){return{scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX,skewY:e.skewY,angle:e.angle,left:e.left,flipX:e.flipX,flipY:e.flipY,top:e.top}},
/**
       * Returns true if context has transparent pixel
       * at specified location (taking tolerance into account)
       * @param {CanvasRenderingContext2D} ctx context
       * @param {Number} x x coordinate
       * @param {Number} y y coordinate
       * @param {Number} tolerance Tolerance
       */
isTransparent:function(e,t,i,n){n>0&&(t>n?t-=n:t=0,i>n?i-=n:i=0);var s,r=!0,a=e.getImageData(t,i,2*n||1,2*n||1),o=a.data.length;for(s=3;s<o&&!1!==(r=a.data[s]<=0);s+=4);return a=null,r},
/**
       * Parse preserveAspectRatio attribute from element
       * @param {string} attribute to be parsed
       * @return {Object} an object containing align and meetOrSlice attribute
       */
parsePreserveAspectRatioAttribute:function(e){var t,i="meet",n=e.split(" ");return n&&n.length&&("meet"!==(i=n.pop())&&"slice"!==i?(t=i,i="meet"):n.length&&(t=n.pop())),{meetOrSlice:i,alignX:"none"!==t?t.slice(1,4):"none",alignY:"none"!==t?t.slice(5,8):"none"}},
/**
       * Clear char widths cache for the given font family or all the cache if no
       * fontFamily is specified.
       * Use it if you know you are loading fonts in a lazy way and you are not waiting
       * for custom fonts to load properly when adding text objects to the canvas.
       * If a text object is added when its own font is not loaded yet, you will get wrong
       * measurement and so wrong bounding boxes.
       * After the font cache is cleared, either change the textObject text content or call
       * initDimensions() to trigger a recalculation
       * @memberOf fabric.util
       * @param {String} [fontFamily] font family to clear
       */
clearFabricFontCache:function(e){(e=(e||"").toLowerCase())?f.charWidthsCache[e]&&delete f.charWidthsCache[e]:f.charWidthsCache={}},
/**
       * Given current aspect ratio, determines the max width and height that can
       * respect the total allowed area for the cache.
       * @memberOf fabric.util
       * @param {Number} ar aspect ratio
       * @param {Number} maximumArea Maximum area you want to achieve
       * @return {Object.x} Limited dimensions by X
       * @return {Object.y} Limited dimensions by Y
       */
limitDimsByArea:function(e,t){var i=Math.sqrt(t*e),n=Math.floor(t/i);return{x:Math.floor(i),y:n}},capValue:function(e,t,i){return Math.max(e,Math.min(t,i))},
/**
       * Finds the scale for the object source to fit inside the object destination,
       * keeping aspect ratio intact.
       * respect the total allowed area for the cache.
       * @memberOf fabric.util
       * @param {Object | fabric.Object} source
       * @param {Number} source.height natural unscaled height of the object
       * @param {Number} source.width natural unscaled width of the object
       * @param {Object | fabric.Object} destination
       * @param {Number} destination.height natural unscaled height of the object
       * @param {Number} destination.width natural unscaled width of the object
       * @return {Number} scale factor to apply to source to fit into destination
       */
findScaleToFit:function(e,t){return Math.min(t.width/e.width,t.height/e.height)},
/**
       * Finds the scale for the object source to cover entirely the object destination,
       * keeping aspect ratio intact.
       * respect the total allowed area for the cache.
       * @memberOf fabric.util
       * @param {Object | fabric.Object} source
       * @param {Number} source.height natural unscaled height of the object
       * @param {Number} source.width natural unscaled width of the object
       * @param {Object | fabric.Object} destination
       * @param {Number} destination.height natural unscaled height of the object
       * @param {Number} destination.width natural unscaled width of the object
       * @return {Number} scale factor to apply to source to cover destination
       */
findScaleToCover:function(e,t){return Math.max(t.width/e.width,t.height/e.height)},
/**
       * given an array of 6 number returns something like `"matrix(...numbers)"`
       * @memberOf fabric.util
       * @param {Array} transform an array with 6 numbers
       * @return {String} transform matrix for svg
       * @return {Object.y} Limited dimensions by Y
       */
matrixToSVG:function(e){return"matrix("+e.map((function(e){return f.util.toFixed(e,f.Object.NUM_FRACTION_DIGITS)})).join(" ")+")"},
/**
       * given an object and a transform, apply the inverse transform to the object,
       * this is equivalent to remove from that object that transformation, so that
       * added in a space with the removed transform, the object will be the same as before.
       * Removing from an object a transform that scale by 2 is like scaling it by 1/2.
       * Removing from an object a transfrom that rotate by 30deg is like rotating by 30deg
       * in the opposite direction.
       * This util is used to add objects inside transformed groups or nested groups.
       * @memberOf fabric.util
       * @param {fabric.Object} object the object you want to transform
       * @param {Array} transform the destination transform
       */
removeTransformFromObject:function(e,t){var i=f.util.invertTransform(t),n=f.util.multiplyTransformMatrices(i,e.calcOwnMatrix());f.util.applyTransformToObject(e,n)},
/**
       * given an object and a transform, apply the transform to the object.
       * this is equivalent to change the space where the object is drawn.
       * Adding to an object a transform that scale by 2 is like scaling it by 2.
       * This is used when removing an object from an active selection for example.
       * @memberOf fabric.util
       * @param {fabric.Object} object the object you want to transform
       * @param {Array} transform the destination transform
       */
addTransformToObject:function(e,t){f.util.applyTransformToObject(e,f.util.multiplyTransformMatrices(t,e.calcOwnMatrix()))},
/**
       * discard an object transform state and apply the one from the matrix.
       * @memberOf fabric.util
       * @param {fabric.Object} object the object you want to transform
       * @param {Array} transform the destination transform
       */
applyTransformToObject:function(e,t){var i=f.util.qrDecompose(t),n=new f.Point(i.translateX,i.translateY);e.flipX=!1,e.flipY=!1,e.set("scaleX",i.scaleX),e.set("scaleY",i.scaleY),e.skewX=i.skewX,e.skewY=i.skewY,e.angle=i.angle,e.setPositionByOrigin(n,"center","center")},
/**
       * given a width and height, return the size of the bounding box
       * that can contains the box with width/height with applied transform
       * described in options.
       * Use to calculate the boxes around objects for controls.
       * @memberOf fabric.util
       * @param {Number} width
       * @param {Number} height
       * @param {Object} options
       * @param {Number} options.scaleX
       * @param {Number} options.scaleY
       * @param {Number} options.skewX
       * @param {Number} options.skewY
       * @return {Object.x} width of containing
       * @return {Object.y} height of containing
       */
sizeAfterTransform:function(e,t,i){var n=e/2,s=t/2,r=[{x:-n,y:-s},{x:n,y:-s},{x:-n,y:s},{x:n,y:s}],a=f.util.calcDimensionsMatrix(i),o=f.util.makeBoundingBoxFromPoints(r,a);return{x:o.width,y:o.height}},
/**
       * Merges 2 clip paths into one visually equal clip path
       *
       * **IMPORTANT**:\
       * Does **NOT** clone the arguments, clone them proir if necessary.
       *
       * Creates a wrapper (group) that contains one clip path and is clipped by the other so content is kept where both overlap.
       * Use this method if both the clip paths may have nested clip paths of their own, so assigning one to the other's clip path property is not possible.
       *
       * In order to handle the `inverted` property we follow logic described in the following cases:\
       * **(1)** both clip paths are inverted - the clip paths pass the inverted prop to the wrapper and loose it themselves.\
       * **(2)** one is inverted and the other isn't - the wrapper shouldn't become inverted and the inverted clip path must clip the non inverted one to produce an identical visual effect.\
       * **(3)** both clip paths are not inverted - wrapper and clip paths remain unchanged.
       *
       * @memberOf fabric.util
       * @param {fabric.Object} c1
       * @param {fabric.Object} c2
       * @returns {fabric.Object} merged clip path
       */
mergeClipPaths:function(e,t){var i=e,n=t;i.inverted&&!n.inverted&&(i=t,n=e),f.util.applyTransformToObject(n,f.util.multiplyTransformMatrices(f.util.invertTransform(i.calcTransformMatrix()),n.calcTransformMatrix()));var s=i.inverted&&n.inverted;return s&&(i.inverted=n.inverted=!1),new f.Group([i],{clipPath:n,inverted:s})}}}(e),function(){var e=Array.prototype.join,t={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},i={m:"l",M:"L"};function n(e,t,i,n,s,r,a,o,l,A,c){var u=f.util.cos(e),h=f.util.sin(e),d=f.util.cos(t),g=f.util.sin(t),p=i*s*d-n*r*g+a,m=n*s*d+i*r*g+o;return["C",A+l*(-i*s*h-n*r*u),c+l*(-n*s*h+i*r*u),p+l*(i*s*g+n*r*d),m+l*(n*s*g-i*r*d),p,m]}function s(e,t,i,n){var s=Math.atan2(t,e),r=Math.atan2(n,i);return r>=s?r-s:2*Math.PI-(s-r)}function r(e,t,i){for(var r=i[1],a=i[2],o=i[3],l=i[4],A=i[5],c=function(e,t,i,r,a,o,l){var A=Math.PI,c=l*A/180,u=f.util.sin(c),h=f.util.cos(c),d=0,g=0,p=-h*e*.5-u*t*.5,m=-h*t*.5+u*e*.5,C=(i=Math.abs(i))*i,I=(r=Math.abs(r))*r,v=m*m,B=p*p,y=C*I-C*v-I*B,b=0;if(y<0){var E=Math.sqrt(1-y/(C*I));i*=E,r*=E}else b=(a===o?-1:1)*Math.sqrt(y/(C*v+I*B));var w=b*i*m/r,Q=-b*r*p/i,_=h*w-u*Q+.5*e,S=u*w+h*Q+.5*t,x=s(1,0,(p-w)/i,(m-Q)/r),k=s((p-w)/i,(m-Q)/r,(-p-w)/i,(-m-Q)/r);0===o&&k>0?k-=2*A:1===o&&k<0&&(k+=2*A);for(var D=Math.ceil(Math.abs(k/A*2)),F=[],T=k/D,M=8/3*Math.sin(T/4)*Math.sin(T/4)/Math.sin(T/2),R=x+T,N=0;N<D;N++)F[N]=n(x,R,h,u,i,r,_,S,M,d,g),d=F[N][5],g=F[N][6],x=R,R+=T;return F}(i[6]-e,i[7]-t,r,a,l,A,o),u=0,h=c.length;u<h;u++)c[u][1]+=e,c[u][2]+=t,c[u][3]+=e,c[u][4]+=t,c[u][5]+=e,c[u][6]+=t;return c}function a(e,t,i,n){return Math.sqrt((i-e)*(i-e)+(n-t)*(n-t))}function o(e,t,i,n,s,r,a,o){return function(l){var A,c=(A=l)*A*A,u=function(e){return 3*e*e*(1-e)}(l),h=function(e){return 3*e*(1-e)*(1-e)}(l),d=function(e){return(1-e)*(1-e)*(1-e)}(l);return{x:a*c+s*u+i*h+e*d,y:o*c+r*u+n*h+t*d}}}function l(e,t,i,n,s,r,a,o){return function(l){var A=1-l,c=3*A*A*(i-e)+6*A*l*(s-i)+3*l*l*(a-s),u=3*A*A*(n-t)+6*A*l*(r-n)+3*l*l*(o-r);return Math.atan2(u,c)}}function A(e,t,i,n,s,r){return function(a){var o,l=(o=a)*o,A=function(e){return 2*e*(1-e)}(a),c=function(e){return(1-e)*(1-e)}(a);return{x:s*l+i*A+e*c,y:r*l+n*A+t*c}}}function c(e,t,i,n,s,r){return function(a){var o=1-a,l=2*o*(i-e)+2*a*(s-i),A=2*o*(n-t)+2*a*(r-n);return Math.atan2(A,l)}}function u(e,t,i){var n,s,r={x:t,y:i},o=0;for(s=1;s<=100;s+=1)n=e(s/100),o+=a(r.x,r.y,n.x,n.y),r=n;return o}function h(e,t){for(var i,n,s,r=0,o=0,l=e.iterator,A={x:e.x,y:e.y},c=.01,u=e.angleFinder;o<t&&c>1e-4;)i=l(r),s=r,(n=a(A.x,A.y,i.x,i.y))+o>t?(r-=c,c/=2):(A=i,r+=c,o+=n);return i.angle=u(s),i}function d(e){for(var t,i,n,s,r=0,h=e.length,d=0,g=0,p=0,f=0,m=[],C=0;C<h;C++){switch(n={x:d,y:g,command:(t=e[C])[0]},t[0]){case"M":n.length=0,p=d=t[1],f=g=t[2];break;case"L":n.length=a(d,g,t[1],t[2]),d=t[1],g=t[2];break;case"C":i=o(d,g,t[1],t[2],t[3],t[4],t[5],t[6]),s=l(d,g,t[1],t[2],t[3],t[4],t[5],t[6]),n.iterator=i,n.angleFinder=s,n.length=u(i,d,g),d=t[5],g=t[6];break;case"Q":i=A(d,g,t[1],t[2],t[3],t[4]),s=c(d,g,t[1],t[2],t[3],t[4]),n.iterator=i,n.angleFinder=s,n.length=u(i,d,g),d=t[3],g=t[4];break;case"Z":case"z":n.destX=p,n.destY=f,n.length=a(d,g,p,f),d=p,g=f}r+=n.length,m.push(n)}return m.push({length:r,x:d,y:g}),m}f.util.joinPath=function(e){return e.map((function(e){return e.join(" ")})).join(" ")},f.util.parsePath=function(e){var n,s,r,a,o,l=[],A=[],c=f.rePathCommand,u="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",h="("+u+")"+f.commaWsp,d="([01])"+f.commaWsp+"?",g=new RegExp(h+"?"+h+"?"+h+d+d+h+"?("+u+")","g");if(!e||!e.match)return l;for(var p,m=0,C=(o=e.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi)).length;m<C;m++){a=(n=o[m]).slice(1).trim(),A.length=0;var I=n.charAt(0);if(p=[I],"a"===I.toLowerCase())for(var v;v=g.exec(a);)for(var B=1;B<v.length;B++)A.push(v[B]);else for(;r=c.exec(a);)A.push(r[0]);B=0;for(var y=A.length;B<y;B++)s=parseFloat(A[B]),isNaN(s)||p.push(s);var b=t[I.toLowerCase()],E=i[I]||I;if(p.length-1>b)for(var w=1,Q=p.length;w<Q;w+=b)l.push([I].concat(p.slice(w,w+b))),I=E;else l.push(p)}return l},f.util.makePathSimpler=function(e){var t,i,n,s,a,o,l=0,A=0,c=e.length,u=0,h=0,d=[];for(i=0;i<c;++i){switch(n=!1,(t=e[i].slice(0))[0]){case"l":t[0]="L",t[1]+=l,t[2]+=A;case"L":l=t[1],A=t[2];break;case"h":t[1]+=l;case"H":t[0]="L",t[2]=A,l=t[1];break;case"v":t[1]+=A;case"V":t[0]="L",A=t[1],t[1]=l,t[2]=A;break;case"m":t[0]="M",t[1]+=l,t[2]+=A;case"M":l=t[1],A=t[2],u=t[1],h=t[2];break;case"c":t[0]="C",t[1]+=l,t[2]+=A,t[3]+=l,t[4]+=A,t[5]+=l,t[6]+=A;case"C":a=t[3],o=t[4],l=t[5],A=t[6];break;case"s":t[0]="S",t[1]+=l,t[2]+=A,t[3]+=l,t[4]+=A;case"S":"C"===s?(a=2*l-a,o=2*A-o):(a=l,o=A),l=t[3],A=t[4],t[0]="C",t[5]=t[3],t[6]=t[4],t[3]=t[1],t[4]=t[2],t[1]=a,t[2]=o,a=t[3],o=t[4];break;case"q":t[0]="Q",t[1]+=l,t[2]+=A,t[3]+=l,t[4]+=A;case"Q":a=t[1],o=t[2],l=t[3],A=t[4];break;case"t":t[0]="T",t[1]+=l,t[2]+=A;case"T":"Q"===s?(a=2*l-a,o=2*A-o):(a=l,o=A),t[0]="Q",l=t[1],A=t[2],t[1]=a,t[2]=o,t[3]=l,t[4]=A;break;case"a":t[0]="A",t[6]+=l,t[7]+=A;case"A":n=!0,d=d.concat(r(l,A,t)),l=t[6],A=t[7];break;case"z":case"Z":l=u,A=h}n||d.push(t),s=t[0]}return d},f.util.getSmoothPathFromPoints=function(e,t){var i,n=[],s=new f.Point(e[0].x,e[0].y),r=new f.Point(e[1].x,e[1].y),a=e.length,o=1,l=0,A=a>2;for(t=t||0,A&&(o=e[2].x<r.x?-1:e[2].x===r.x?0:1,l=e[2].y<r.y?-1:e[2].y===r.y?0:1),n.push(["M",s.x-o*t,s.y-l*t]),i=1;i<a;i++){if(!s.eq(r)){var c=s.midPointFrom(r);n.push(["Q",s.x,s.y,c.x,c.y])}s=e[i],i+1<e.length&&(r=e[i+1])}return A&&(o=s.x>e[i-2].x?1:s.x===e[i-2].x?0:-1,l=s.y>e[i-2].y?1:s.y===e[i-2].y?0:-1),n.push(["L",s.x+o*t,s.y+l*t]),n},f.util.getPathSegmentsInfo=d,f.util.getBoundsOfCurve=function(t,i,n,s,r,a,o,l){var A;if(f.cachesBoundsOfCurve&&(A=e.call(arguments),f.boundsOfCurveCache[A]))return f.boundsOfCurveCache[A];var c,u,h,d,g,p,m,C,I=Math.sqrt,v=Math.min,B=Math.max,y=Math.abs,b=[],E=[[],[]];u=6*t-12*n+6*r,c=-3*t+9*n-9*r+3*o,h=3*n-3*t;for(var w=0;w<2;++w)if(w>0&&(u=6*i-12*s+6*a,c=-3*i+9*s-9*a+3*l,h=3*s-3*i),y(c)<1e-12){if(y(u)<1e-12)continue;0<(d=-h/u)&&d<1&&b.push(d)}else(m=u*u-4*h*c)<0||(0<(g=(-u+(C=I(m)))/(2*c))&&g<1&&b.push(g),0<(p=(-u-C)/(2*c))&&p<1&&b.push(p));for(var Q,_,S,x=b.length,k=x;x--;)Q=(S=1-(d=b[x]))*S*S*t+3*S*S*d*n+3*S*d*d*r+d*d*d*o,E[0][x]=Q,_=S*S*S*i+3*S*S*d*s+3*S*d*d*a+d*d*d*l,E[1][x]=_;E[0][k]=t,E[1][k]=i,E[0][k+1]=o,E[1][k+1]=l;var D=[{x:v.apply(null,E[0]),y:v.apply(null,E[1])},{x:B.apply(null,E[0]),y:B.apply(null,E[1])}];return f.cachesBoundsOfCurve&&(f.boundsOfCurveCache[A]=D),D},f.util.getPointOnPath=function(e,t,i){i||(i=d(e));for(var n=0;t-i[n].length>0&&n<i.length-2;)t-=i[n].length,n++;var s,r=i[n],a=t/r.length,o=r.command,l=e[n];switch(o){case"M":return{x:r.x,y:r.y,angle:0};case"Z":case"z":return(s=new f.Point(r.x,r.y).lerp(new f.Point(r.destX,r.destY),a)).angle=Math.atan2(r.destY-r.y,r.destX-r.x),s;case"L":return(s=new f.Point(r.x,r.y).lerp(new f.Point(l[1],l[2]),a)).angle=Math.atan2(l[2]-r.y,l[1]-r.x),s;case"C":case"Q":return h(r,t)}},f.util.transformPath=function(e,t,i){return i&&(t=f.util.multiplyTransformMatrices(t,[1,0,0,1,-i.x,-i.y])),e.map((function(e){for(var i=e.slice(0),n={},s=1;s<e.length-1;s+=2)n.x=e[s],n.y=e[s+1],n=f.util.transformPoint(n,t),i[s]=n.x,i[s+1]=n.y;return i}))}}(),function(){var e=Array.prototype.slice;function t(e,t,i){if(e&&0!==e.length){var n=e.length-1,s=t?e[n][t]:e[n];if(t)for(;n--;)i(e[n][t],s)&&(s=e[n][t]);else for(;n--;)i(e[n],s)&&(s=e[n]);return s}}f.util.array={fill:function(e,t){for(var i=e.length;i--;)e[i]=t;return e},invoke:function(t,i){for(var n=e.call(arguments,2),s=[],r=0,a=t.length;r<a;r++)s[r]=n.length?t[r][i].apply(t[r],n):t[r][i].call(t[r]);return s},min:function(e,i){return t(e,i,(function(e,t){return e<t}))},max:function(e,i){return t(e,i,(function(e,t){return e>=t}))}}}(),function(){function e(t,i,n){if(n)if(!f.isLikelyNode&&i instanceof Element)t=i;else if(i instanceof Array){t=[];for(var s=0,r=i.length;s<r;s++)t[s]=e({},i[s],n)}else if(i&&"object"==typeof i)for(var a in i)"canvas"===a||"group"===a?t[a]=null:i.hasOwnProperty(a)&&(t[a]=e({},i[a],n));else t=i;else for(var a in i)t[a]=i[a];return t}f.util.object={extend:e,clone:function(t,i){return e({},t,i)}},f.util.object.extend(f.util,f.Observable)}(),function(){function e(e,t){var i=e.charCodeAt(t);if(isNaN(i))return"";if(i<55296||i>57343)return e.charAt(t);if(55296<=i&&i<=56319){if(e.length<=t+1)throw"High surrogate without following low surrogate";var n=e.charCodeAt(t+1);if(56320>n||n>57343)throw"High surrogate without following low surrogate";return e.charAt(t)+e.charAt(t+1)}if(0===t)throw"Low surrogate without preceding high surrogate";var s=e.charCodeAt(t-1);if(55296>s||s>56319)throw"Low surrogate without preceding high surrogate";return!1}f.util.string={camelize:function(e){return e.replace(/-+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))},capitalize:function(e,t){return e.charAt(0).toUpperCase()+(t?e.slice(1):e.slice(1).toLowerCase())},escapeXml:function(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},graphemeSplit:function(t){var i,n=0,s=[];for(n=0;n<t.length;n++)!1!==(i=e(t,n))&&s.push(i);return s}}}(),function(){var e=Array.prototype.slice,t=function(){},i=function(){for(var e in{toString:1})if("toString"===e)return!1;return!0}(),n=function(e,t,n){for(var s in t)s in e.prototype&&"function"==typeof e.prototype[s]&&(t[s]+"").indexOf("callSuper")>-1?e.prototype[s]=function(e){return function(){var i=this.constructor.superclass;this.constructor.superclass=n;var s=t[e].apply(this,arguments);if(this.constructor.superclass=i,"initialize"!==e)return s}}(s):e.prototype[s]=t[s],i&&(t.toString!==Object.prototype.toString&&(e.prototype.toString=t.toString),t.valueOf!==Object.prototype.valueOf&&(e.prototype.valueOf=t.valueOf))};function s(){}function r(t){for(var i=null,n=this;n.constructor.superclass;){var s=n.constructor.superclass.prototype[t];if(n[t]!==s){i=s;break}n=n.constructor.superclass.prototype}return i?arguments.length>1?i.apply(this,e.call(arguments,1)):i.call(this):console.log("tried to callSuper "+t+", method not found in prototype chain",this)}f.util.createClass=function(){var i=null,a=e.call(arguments,0);function o(){this.initialize.apply(this,arguments)}"function"==typeof a[0]&&(i=a.shift()),o.superclass=i,o.subclasses=[],i&&(s.prototype=i.prototype,o.prototype=new s,i.subclasses.push(o));for(var l=0,A=a.length;l<A;l++)n(o,a[l],i);return o.prototype.initialize||(o.prototype.initialize=t),o.prototype.constructor=o,o.prototype.callSuper=r,o}}(),t=!!f.document.createElement("div").attachEvent,i=["touchstart","touchmove","touchend"],f.util.addListener=function(e,i,n,s){e&&e.addEventListener(i,n,!t&&s)},f.util.removeListener=function(e,i,n,s){e&&e.removeEventListener(i,n,!t&&s)},f.util.getPointer=function(e){var t=e.target,i=f.util.getScrollLeftTop(t),n=function(e){var t=e.changedTouches;return t&&t[0]?t[0]:e}(e);return{x:n.clientX+i.left,y:n.clientY+i.top}},f.util.isTouchEvent=function(e){return i.indexOf(e.type)>-1||"touch"===e.pointerType},n=f.document.createElement("div"),s="string"==typeof n.style.opacity,r="string"==typeof n.style.filter,a=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,o=function(e){return e},s?o=function(e,t){return e.style.opacity=t,e}:r&&(o=function(e,t){var i=e.style;return e.currentStyle&&!e.currentStyle.hasLayout&&(i.zoom=1),a.test(i.filter)?(t=t>=.9999?"":"alpha(opacity="+100*t+")",i.filter=i.filter.replace(a,t)):i.filter+=" alpha(opacity="+100*t+")",e}),f.util.setStyle=function(e,t){var i=e.style;if(!i)return e;if("string"==typeof t)return e.style.cssText+=";"+t,t.indexOf("opacity")>-1?o(e,t.match(/opacity:\s*(\d?\.?\d*)/)[1]):e;for(var n in t)"opacity"===n?o(e,t[n]):i["float"===n||"cssFloat"===n?void 0===i.styleFloat?"cssFloat":"styleFloat":n]=t[n];return e},function(){var e=Array.prototype.slice;var t,i,n,s,r=function(t){return e.call(t,0)};try{t=r(f.document.childNodes)instanceof Array}catch(l){}function a(e,t){var i=f.document.createElement(e);for(var n in t)"class"===n?i.className=t[n]:"for"===n?i.htmlFor=t[n]:i.setAttribute(n,t[n]);return i}function o(e){for(var t=0,i=0,n=f.document.documentElement,s=f.document.body||{scrollLeft:0,scrollTop:0};e&&(e.parentNode||e.host)&&((e=e.parentNode||e.host)===f.document?(t=s.scrollLeft||n.scrollLeft||0,i=s.scrollTop||n.scrollTop||0):(t+=e.scrollLeft||0,i+=e.scrollTop||0),1!==e.nodeType||"fixed"!==e.style.position););return{left:t,top:i}}t||(r=function(e){for(var t=new Array(e.length),i=e.length;i--;)t[i]=e[i];return t}),i=f.document.defaultView&&f.document.defaultView.getComputedStyle?function(e,t){var i=f.document.defaultView.getComputedStyle(e,null);return i?i[t]:void 0}:function(e,t){var i=e.style[t];return!i&&e.currentStyle&&(i=e.currentStyle[t]),i},n=f.document.documentElement.style,s="userSelect"in n?"userSelect":"MozUserSelect"in n?"MozUserSelect":"WebkitUserSelect"in n?"WebkitUserSelect":"KhtmlUserSelect"in n?"KhtmlUserSelect":"",f.util.makeElementUnselectable=function(e){return void 0!==e.onselectstart&&(e.onselectstart=f.util.falseFunction),s?e.style[s]="none":"string"==typeof e.unselectable&&(e.unselectable="on"),e},f.util.makeElementSelectable=function(e){return void 0!==e.onselectstart&&(e.onselectstart=null),s?e.style[s]="":"string"==typeof e.unselectable&&(e.unselectable=""),e},f.util.setImageSmoothing=function(e,t){e.imageSmoothingEnabled=e.imageSmoothingEnabled||e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled||e.oImageSmoothingEnabled,e.imageSmoothingEnabled=t},f.util.getById=function(e){return"string"==typeof e?f.document.getElementById(e):e},f.util.toArray=r,f.util.addClass=function(e,t){e&&-1===(" "+e.className+" ").indexOf(" "+t+" ")&&(e.className+=(e.className?" ":"")+t)},f.util.makeElement=a,f.util.wrapElement=function(e,t,i){return"string"==typeof t&&(t=a(t,i)),e.parentNode&&e.parentNode.replaceChild(t,e),t.appendChild(e),t},f.util.getScrollLeftTop=o,f.util.getElementOffset=function(e){var t,n,s=e&&e.ownerDocument,r={left:0,top:0},a={left:0,top:0},l={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!s)return a;for(var A in l)a[l[A]]+=parseInt(i(e,A),10)||0;return t=s.documentElement,void 0!==e.getBoundingClientRect&&(r=e.getBoundingClientRect()),n=o(e),{left:r.left+n.left-(t.clientLeft||0)+a.left,top:r.top+n.top-(t.clientTop||0)+a.top}},f.util.getNodeCanvas=function(e){var t=f.jsdomImplForWrapper(e);return t._canvas||t._image},f.util.cleanUpJsdomNode=function(e){if(f.isLikelyNode){var t=f.jsdomImplForWrapper(e);t&&(t._image=null,t._canvas=null,t._currentSrc=null,t._attributes=null,t._classList=null)}}}(),function(){function e(){}f.util.request=function(t,i){i||(i={});var n=i.method?i.method.toUpperCase():"GET",s=i.onComplete||function(){},r=new f.window.XMLHttpRequest,a=i.body||i.parameters;return r.onreadystatechange=function(){4===r.readyState&&(s(r),r.onreadystatechange=e)},"GET"===n&&(a=null,"string"==typeof i.parameters&&(t=function(e,t){return e+(/\?/.test(e)?"&":"?")+t}(t,i.parameters))),r.open(n,t,!0),"POST"!==n&&"PUT"!==n||r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send(a),r}}(),f.log=console.log,f.warn=console.warn,function(){var e=f.util.object.extend,t=f.util.object.clone,i=[];function n(){return!1}function s(e,t,i,n){return-i*Math.cos(e/n*(Math.PI/2))+i+t}f.util.object.extend(i,{
/**
       * cancel all running animations at the next requestAnimFrame
       * @returns {AnimationContext[]}
       */
cancelAll:function(){var e=this.splice(0);return e.forEach((function(e){e.cancel()})),e},
/**
       * cancel all running animations attached to canvas at the next requestAnimFrame
       * @param {fabric.Canvas} canvas
       * @returns {AnimationContext[]}
       */
cancelByCanvas:function(e){if(!e)return[];var t=this.filter((function(t){return"object"==typeof t.target&&t.target.canvas===e}));return t.forEach((function(e){e.cancel()})),t},
/**
       * cancel all running animations for target at the next requestAnimFrame
       * @param {*} target
       * @returns {AnimationContext[]}
       */
cancelByTarget:function(e){var t=this.findAnimationsByTarget(e);return t.forEach((function(e){e.cancel()})),t},
/**
       *
       * @param {CancelFunction} cancelFunc the function returned by animate
       * @returns {number}
       */
findAnimationIndex:function(e){return this.indexOf(this.findAnimation(e))},
/**
       *
       * @param {CancelFunction} cancelFunc the function returned by animate
       * @returns {AnimationContext | undefined} animation's options object
       */
findAnimation:function(e){return this.find((function(t){return t.cancel===e}))},
/**
       *
       * @param {*} target the object that is assigned to the target property of the animation context
       * @returns {AnimationContext[]} array of animation options object associated with target
       */
findAnimationsByTarget:function(e){return e?this.filter((function(t){return t.target===e})):[]}});var r=f.window.requestAnimationFrame||f.window.webkitRequestAnimationFrame||f.window.mozRequestAnimationFrame||f.window.oRequestAnimationFrame||f.window.msRequestAnimationFrame||function(e){return f.window.setTimeout(e,1e3/60)},a=f.window.cancelAnimationFrame||f.window.clearTimeout;function o(){return r.apply(f.window,arguments)}f.util.animate=function(i){i||(i={});var r,a=!1,l=function(){var e=f.runningAnimations.indexOf(r);return e>-1&&f.runningAnimations.splice(e,1)[0]};return r=e(t(i),{cancel:function(){return a=!0,l()},currentValue:"startValue"in i?i.startValue:0,completionRate:0,durationRate:0}),f.runningAnimations.push(r),o((function(e){var t,A=e||+new Date,c=i.duration||500,u=A+c,h=i.onChange||n,d=i.abort||n,g=i.onComplete||n,p=i.easing||s,f="startValue"in i?i.startValue:0,m="endValue"in i?i.endValue:100,C=i.byValue||m-f;i.onStart&&i.onStart(),function e(i){var n=(t=i||+new Date)>u?c:t-A,s=n/c,I=p(n,f,C,c),v=Math.abs((I-f)/C);if(r.currentValue=I,r.completionRate=v,r.durationRate=s,!a){if(!d(I,v,s))return t>u?(r.currentValue=m,r.completionRate=1,r.durationRate=1,h(m,1,1),g(m,1,1),void l()):(h(I,v,s),void o(e));l()}}(A)})),r.cancel},f.util.requestAnimFrame=o,f.util.cancelAnimFrame=function(){return a.apply(f.window,arguments)},f.runningAnimations=i}(),function(){function e(e,t,i){var n="rgba("+parseInt(e[0]+i*(t[0]-e[0]),10)+","+parseInt(e[1]+i*(t[1]-e[1]),10)+","+parseInt(e[2]+i*(t[2]-e[2]),10);return n+=","+(e&&t?parseFloat(e[3]+i*(t[3]-e[3])):1),n+=")"}f.util.animateColor=function(t,i,n,s){var r=new f.Color(t).getSource(),a=new f.Color(i).getSource(),o=s.onComplete,l=s.onChange;return s=s||{},f.util.animate(f.util.object.extend(s,{duration:n||500,startValue:r,endValue:a,byValue:a,easing:function(t,i,n,r){return e(i,n,s.colorEasing?s.colorEasing(t,r):1-Math.cos(t/r*(Math.PI/2)))},
// has to take in account for color restoring;
onComplete:function(t,i,n){if(o)return o(e(a,a,0),i,n)},onChange:function(t,i,n){if(l){if(Array.isArray(t))return l(e(t,t,0),i,n);l(t,i,n)}}}))}}(),function(){function e(e,t,i,n){return e<Math.abs(t)?(e=t,n=i/4):n=0===t&&0===e?i/(2*Math.PI)*Math.asin(1):i/(2*Math.PI)*Math.asin(t/e),{a:e,c:t,p:i,s:n}}function t(e,t,i){return e.a*Math.pow(2,10*(t-=1))*Math.sin((t*i-e.s)*(2*Math.PI)/e.p)}function i(e,t,i,s){return i-n(s-e,0,i,s)+t}function n(e,t,i,n){return(e/=n)<1/2.75?i*(7.5625*e*e)+t:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+t:i*(7.5625*(e-=2.625/2.75)*e+.984375)+t}f.util.ease={
/**
       * Quadratic easing in
       * @memberOf fabric.util.ease
       */
easeInQuad:function(e,t,i,n){return i*(e/=n)*e+t},
/**
       * Quadratic easing out
       * @memberOf fabric.util.ease
       */
easeOutQuad:function(e,t,i,n){return-i*(e/=n)*(e-2)+t},
/**
       * Quadratic easing in and out
       * @memberOf fabric.util.ease
       */
easeInOutQuad:function(e,t,i,n){return(e/=n/2)<1?i/2*e*e+t:-i/2*(--e*(e-2)-1)+t},
/**
       * Cubic easing in
       * @memberOf fabric.util.ease
       */
easeInCubic:function(e,t,i,n){return i*(e/=n)*e*e+t},easeOutCubic:function(e,t,i,n){return i*((e=e/n-1)*e*e+1)+t},easeInOutCubic:function(e,t,i,n){return(e/=n/2)<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,i,n){return i*(e/=n)*e*e*e+t},easeOutQuart:function(e,t,i,n){return-i*((e=e/n-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,i,n){return(e/=n/2)<1?i/2*e*e*e*e+t:-i/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,i,n){return i*(e/=n)*e*e*e*e+t},easeOutQuint:function(e,t,i,n){return i*((e=e/n-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,i,n){return(e/=n/2)<1?i/2*e*e*e*e*e+t:i/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,i,n){return-i*Math.cos(e/n*(Math.PI/2))+i+t},easeOutSine:function(e,t,i,n){return i*Math.sin(e/n*(Math.PI/2))+t},easeInOutSine:function(e,t,i,n){return-i/2*(Math.cos(Math.PI*e/n)-1)+t},easeInExpo:function(e,t,i,n){return 0===e?t:i*Math.pow(2,10*(e/n-1))+t},easeOutExpo:function(e,t,i,n){return e===n?t+i:i*(1-Math.pow(2,-10*e/n))+t},easeInOutExpo:function(e,t,i,n){return 0===e?t:e===n?t+i:(e/=n/2)<1?i/2*Math.pow(2,10*(e-1))+t:i/2*(2-Math.pow(2,-10*--e))+t},easeInCirc:function(e,t,i,n){return-i*(Math.sqrt(1-(e/=n)*e)-1)+t},easeOutCirc:function(e,t,i,n){return i*Math.sqrt(1-(e=e/n-1)*e)+t},easeInOutCirc:function(e,t,i,n){return(e/=n/2)<1?-i/2*(Math.sqrt(1-e*e)-1)+t:i/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(i,n,s,r){var a=0;return 0===i?n:1===(i/=r)?n+s:(a||(a=.3*r),-t(e(s,s,a,1.70158),i,r)+n)},easeOutElastic:function(t,i,n,s){var r=0;if(0===t)return i;if(1===(t/=s))return i+n;r||(r=.3*s);var a=e(n,n,r,1.70158);return a.a*Math.pow(2,-10*t)*Math.sin((t*s-a.s)*(2*Math.PI)/a.p)+a.c+i},easeInOutElastic:function(i,n,s,r){var a=0;if(0===i)return n;if(2===(i/=r/2))return n+s;a||(a=r*(.3*1.5));var o=e(s,s,a,1.70158);return i<1?-.5*t(o,i,r)+n:o.a*Math.pow(2,-10*(i-=1))*Math.sin((i*r-o.s)*(2*Math.PI)/o.p)*.5+o.c+n},easeInBack:function(e,t,i,n,s){return void 0===s&&(s=1.70158),i*(e/=n)*e*((s+1)*e-s)+t},easeOutBack:function(e,t,i,n,s){return void 0===s&&(s=1.70158),i*((e=e/n-1)*e*((s+1)*e+s)+1)+t},easeInOutBack:function(e,t,i,n,s){return void 0===s&&(s=1.70158),(e/=n/2)<1?i/2*(e*e*((1+(s*=1.525))*e-s))+t:i/2*((e-=2)*e*((1+(s*=1.525))*e+s)+2)+t},easeInBounce:i,easeOutBounce:n,easeInOutBounce:function(e,t,s,r){return e<r/2?.5*i(2*e,0,s,r)+t:.5*n(2*e-r,0,s,r)+.5*s+t}}}(),function(e){var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.util.object.clone,s=t.util.toFixed,r=t.util.parseUnit,a=t.util.multiplyTransformMatrices,o={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform","image-rendering":"imageSmoothing"},l={stroke:"strokeOpacity",fill:"fillOpacity"},A="font-size",c="clip-path";function u(e){return e in o?o[e]:e}function h(e,i,n,s){var o,l="[object Array]"===Object.prototype.toString.call(i);if("fill"!==e&&"stroke"!==e||"none"!==i){if("strokeUniform"===e)return"non-scaling-stroke"===i;if("strokeDashArray"===e)i="none"===i?null:i.replace(/,/g," ").split(/\s+/).map(parseFloat);else if("transformMatrix"===e)i=n&&n.transformMatrix?a(n.transformMatrix,t.parseTransformAttribute(i)):t.parseTransformAttribute(i);else if("visible"===e)i="none"!==i&&"hidden"!==i,n&&!1===n.visible&&(i=!1);else if("opacity"===e)i=parseFloat(i),n&&void 0!==n.opacity&&(i*=n.opacity);else if("textAnchor"===e)i="start"===i?"left":"end"===i?"right":"center";else if("charSpacing"===e)o=r(i,s)/s*1e3;else if("paintFirst"===e){var A=i.indexOf("fill"),c=i.indexOf("stroke");i="fill";(A>-1&&c>-1&&c<A||-1===A&&c>-1)&&(i="stroke")}else{if("href"===e||"xlink:href"===e||"font"===e)return i;if("imageSmoothing"===e)return"optimizeQuality"===i;o=l?i.map(r):r(i,s)}}else i="";return!l&&isNaN(o)?i:o}function d(e){return new RegExp("^("+e.join("|")+")\\b","i")}function g(e,t){var i,n,s,r,a=[];for(s=0,r=t.length;s<r;s++)i=t[s],n=e.getElementsByTagName(i),a=a.concat(Array.prototype.slice.call(n));return a}function p(e,t){var i,n=!0;return(i=f(e,t.pop()))&&t.length&&(n=function(e,t){var i,n=!0;for(;e.parentNode&&1===e.parentNode.nodeType&&t.length;)n&&(i=t.pop()),n=f(e=e.parentNode,i);return 0===t.length}(e,t)),i&&n&&0===t.length}function f(e,t){var i,n,s=e.nodeName,r=e.getAttribute("class"),a=e.getAttribute("id");if(i=new RegExp("^"+s,"i"),t=t.replace(i,""),a&&t.length&&(i=new RegExp("#"+a+"(?![a-zA-Z\\-]+)","i"),t=t.replace(i,"")),r&&t.length)for(n=(r=r.split(" ")).length;n--;)i=new RegExp("\\."+r[n]+"(?![a-zA-Z\\-]+)","i"),t=t.replace(i,"");return 0===t.length}function m(e,t){var i;if(e.getElementById&&(i=e.getElementById(t)),i)return i;var n,s,r,a=e.getElementsByTagName("*");for(s=0,r=a.length;s<r;s++)if(t===(n=a[s]).getAttribute("id"))return n}t.svgValidTagNamesRegEx=d(["path","circle","polygon","polyline","ellipse","rect","line","image","text"]),t.svgViewBoxElementsRegEx=d(["symbol","image","marker","pattern","view","svg"]),t.svgInvalidAncestorsRegEx=d(["pattern","defs","symbol","metadata","clipPath","mask","desc"]),t.svgValidParentsRegEx=d(["symbol","g","a","svg","clipPath","defs"]),t.cssRules={},t.gradientDefs={},t.clipPaths={},t.parseTransformAttribute=function(){function e(e,i,n){e[n]=Math.tan(t.util.degreesToRadians(i[0]))}var i=t.iMatrix,n=t.reNum,s=t.commaWsp,r="(?:"+("(?:(matrix)\\s*\\(\\s*("+n+")"+s+"("+n+")"+s+"("+n+")"+s+"("+n+")"+s+"("+n+")"+s+"("+n+")\\s*\\))")+"|"+("(?:(translate)\\s*\\(\\s*("+n+")(?:"+s+"("+n+"))?\\s*\\))")+"|"+("(?:(scale)\\s*\\(\\s*("+n+")(?:"+s+"("+n+"))?\\s*\\))")+"|"+("(?:(rotate)\\s*\\(\\s*("+n+")(?:"+s+"("+n+")"+s+"("+n+"))?\\s*\\))")+"|"+("(?:(skewX)\\s*\\(\\s*("+n+")\\s*\\))")+"|"+("(?:(skewY)\\s*\\(\\s*("+n+")\\s*\\))")+")",a=new RegExp("^\\s*(?:"+("(?:"+r+"(?:"+s+"*"+r+")*)")+"?)\\s*$"),o=new RegExp(r,"g");return function(n){var s=i.concat(),l=[];if(!n||n&&!a.test(n))return s;n.replace(o,(function(n){var a=new RegExp(r).exec(n).filter((function(e){return!!e})),o=a[1],A=a.slice(2).map(parseFloat);switch(o){case"translate":!function(e,t){e[4]=t[0],2===t.length&&(e[5]=t[1])}(s,A);break;case"rotate":A[0]=t.util.degreesToRadians(A[0]),function(e,i){var n=t.util.cos(i[0]),s=t.util.sin(i[0]),r=0,a=0;3===i.length&&(r=i[1],a=i[2]),e[0]=n,e[1]=s,e[2]=-s,e[3]=n,e[4]=r-(n*r-s*a),e[5]=a-(s*r+n*a)}(s,A);break;case"scale":!function(e,t){var i=t[0],n=2===t.length?t[1]:t[0];e[0]=i,e[3]=n}(s,A);break;case"skewX":e(s,A,2);break;case"skewY":e(s,A,1);break;case"matrix":s=A}l.push(s.concat()),s=i.concat()}));for(var A=l[0];l.length>1;)l.shift(),A=t.util.multiplyTransformMatrices(A,l[0]);return A}}();var C=new RegExp("^\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*,?\\s*("+t.reNum+"+)\\s*$");function I(e){if(!t.svgViewBoxElementsRegEx.test(e.nodeName))return{};var i,n,s,a,o,l,A=e.getAttribute("viewBox"),c=1,u=1,h=e.getAttribute("width"),d=e.getAttribute("height"),g=e.getAttribute("x")||0,p=e.getAttribute("y")||0,f=e.getAttribute("preserveAspectRatio")||"",m=!A||!(A=A.match(C)),I=!h||!d||"100%"===h||"100%"===d,v=m&&I,B={},y="",b=0,E=0;if(B.width=0,B.height=0,B.toBeParsed=v,m&&(g||p)&&e.parentNode&&"#document"!==e.parentNode.nodeName&&(y=" translate("+r(g)+" "+r(p)+") ",o=(e.getAttribute("transform")||"")+y,e.setAttribute("transform",o),e.removeAttribute("x"),e.removeAttribute("y")),v)return B;if(m)return B.width=r(h),B.height=r(d),B;if(i=-parseFloat(A[1]),n=-parseFloat(A[2]),s=parseFloat(A[3]),a=parseFloat(A[4]),B.minX=i,B.minY=n,B.viewBoxWidth=s,B.viewBoxHeight=a,I?(B.width=s,B.height=a):(B.width=r(h),B.height=r(d),c=B.width/s,u=B.height/a),"none"!==(f=t.util.parsePreserveAspectRatioAttribute(f)).alignX&&("meet"===f.meetOrSlice&&(u=c=c>u?u:c),"slice"===f.meetOrSlice&&(u=c=c>u?c:u),b=B.width-s*c,E=B.height-a*c,"Mid"===f.alignX&&(b/=2),"Mid"===f.alignY&&(E/=2),"Min"===f.alignX&&(b=0),"Min"===f.alignY&&(E=0)),1===c&&1===u&&0===i&&0===n&&0===g&&0===p)return B;if((g||p)&&"#document"!==e.parentNode.nodeName&&(y=" translate("+r(g)+" "+r(p)+") "),o=y+" matrix("+c+" 0 0 "+u+" "+(i*c+b)+" "+(n*u+E)+") ","svg"===e.nodeName){for(l=e.ownerDocument.createElementNS(t.svgNS,"g");e.firstChild;)l.appendChild(e.firstChild);e.appendChild(l)}else(l=e).removeAttribute("x"),l.removeAttribute("y"),o=l.getAttribute("transform")+o;return l.setAttribute("transform",o),B}function v(e,t){var i="xlink:href",n=m(e,t.getAttribute(i).substr(1));if(n&&n.getAttribute(i)&&v(e,n),["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"].forEach((function(e){n&&!t.hasAttribute(e)&&n.hasAttribute(e)&&t.setAttribute(e,n.getAttribute(e))})),!t.children.length)for(var s=n.cloneNode(!0);s.firstChild;)t.appendChild(s.firstChild);t.removeAttribute(i)}t.parseSVGDocument=function(e,i,s,r){if(e){!function(e){for(var i=g(e,["use","svg:use"]),n=0;i.length&&n<i.length;){var s=i[n],r=s.getAttribute("xlink:href")||s.getAttribute("href");if(null===r)return;var a,o,l,A,c=r.substr(1),u=s.getAttribute("x")||0,h=s.getAttribute("y")||0,d=m(e,c).cloneNode(!0),p=(d.getAttribute("transform")||"")+" translate("+u+", "+h+")",f=i.length,C=t.svgNS;if(I(d),/^svg$/i.test(d.nodeName)){var v=d.ownerDocument.createElementNS(C,"g");for(o=0,A=(l=d.attributes).length;o<A;o++)a=l.item(o),v.setAttributeNS(C,a.nodeName,a.nodeValue);for(;d.firstChild;)v.appendChild(d.firstChild);d=v}for(o=0,A=(l=s.attributes).length;o<A;o++)"x"!==(a=l.item(o)).nodeName&&"y"!==a.nodeName&&"xlink:href"!==a.nodeName&&"href"!==a.nodeName&&("transform"===a.nodeName?p=a.nodeValue+" "+p:d.setAttribute(a.nodeName,a.nodeValue));d.setAttribute("transform",p),d.setAttribute("instantiated_by_use","1"),d.removeAttribute("id"),s.parentNode.replaceChild(d,s),i.length===f&&n++}}(e);var a,o,l=t.Object.__uid++,A=I(e),c=t.util.toArray(e.getElementsByTagName("*"));if(A.crossOrigin=r&&r.crossOrigin,A.svgUid=l,0===c.length&&t.isLikelyNode){var u=[];for(a=0,o=(c=e.selectNodes('//*[name(.)!="svg"]')).length;a<o;a++)u[a]=c[a];c=u}var h=c.filter((function(e){return I(e),t.svgValidTagNamesRegEx.test(e.nodeName.replace("svg:",""))&&!function(e,t){for(;e&&(e=e.parentNode);)if(e.nodeName&&t.test(e.nodeName.replace("svg:",""))&&!e.getAttribute("instantiated_by_use"))return!0;return!1}(e,t.svgInvalidAncestorsRegEx)}));if(!h||h&&!h.length)i&&i([],{});else{var d={};c.filter((function(e){return"clipPath"===e.nodeName.replace("svg:","")})).forEach((function(e){var i=e.getAttribute("id");d[i]=t.util.toArray(e.getElementsByTagName("*")).filter((function(e){return t.svgValidTagNamesRegEx.test(e.nodeName.replace("svg:",""))}))})),t.gradientDefs[l]=t.getGradientDefs(e),t.cssRules[l]=t.getCSSRules(e),t.clipPaths[l]=d,t.parseElements(h,(function(e,n){i&&(i(e,A,n,c),delete t.gradientDefs[l],delete t.cssRules[l],delete t.clipPaths[l])}),n(A),s,r)}}};var B=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+t.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+t.reNum+"))?\\s+(.*)");i(t,{
/**
       * Parses a short font declaration, building adding its properties to a style object
       * @static
       * @function
       * @memberOf fabric
       * @param {String} value font declaration
       * @param {Object} oStyle definition
       */
parseFontDeclaration:function(e,t){var i=e.match(B);if(i){var n=i[1],s=i[3],a=i[4],o=i[5],l=i[6];n&&(t.fontStyle=n),s&&(t.fontWeight=isNaN(parseFloat(s))?s:parseFloat(s)),a&&(t.fontSize=r(a)),l&&(t.fontFamily=l),o&&(t.lineHeight="normal"===o?1:o)}},
/**
       * Parses an SVG document, returning all of the gradient declarations found in it
       * @static
       * @function
       * @memberOf fabric
       * @param {SVGDocument} doc SVG document to parse
       * @return {Object} Gradient definitions; key corresponds to element id, value -- to gradient definition element
       */
getGradientDefs:function(e){var t,i=g(e,["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"]),n=0,s={};for(n=i.length;n--;)(t=i[n]).getAttribute("xlink:href")&&v(e,t),s[t.getAttribute("id")]=t;return s},
/**
       * Returns an object of attributes' name/value, given element and an array of attribute names;
       * Parses parent "g" nodes recursively upwards.
       * @static
       * @memberOf fabric
       * @param {DOMElement} element Element to parse
       * @param {Array} attributes Array of attributes to parse
       * @return {Object} object containing parsed attributes' names/values
       */
parseAttributes:function(e,n,a){if(e){var o,d,g,f={};void 0===a&&(a=e.getAttribute("svgUid")),e.parentNode&&t.svgValidParentsRegEx.test(e.parentNode.nodeName)&&(f=t.parseAttributes(e.parentNode,n,a));var m=n.reduce((function(t,i){return(o=e.getAttribute(i))&&(t[i]=o),t}),{}),C=i(function(e,i){var n={};for(var s in t.cssRules[i])if(p(e,s.split(" ")))for(var r in t.cssRules[i][s])n[r]=t.cssRules[i][s][r];return n}(e,a),t.parseStyleAttribute(e));m=i(m,C),C[c]&&e.setAttribute(c,C[c]),d=g=f.fontSize||t.Text.DEFAULT_SVG_FONT_SIZE,m[A]&&(m[A]=d=r(m[A],g));var I,v,B={};for(var y in m)v=h(I=u(y),m[y],f,d),B[I]=v;B&&B.font&&t.parseFontDeclaration(B.font,B);var b=i(f,B);return t.svgValidParentsRegEx.test(e.nodeName)?b:function(e){for(var i in l)if(void 0!==e[l[i]]&&""!==e[i]){if(void 0===e[i]){if(!t.Object.prototype[i])continue;e[i]=t.Object.prototype[i]}if(0!==e[i].indexOf("url(")){var n=new t.Color(e[i]);e[i]=n.setAlpha(s(n.getAlpha()*e[l[i]],2)).toRgba()}}return e}(b)}},
/**
       * Transforms an array of svg elements to corresponding fabric.* instances
       * @static
       * @memberOf fabric
       * @param {Array} elements Array of elements to parse
       * @param {Function} callback Being passed an array of fabric instances (transformed from SVG elements)
       * @param {Object} [options] Options object
       * @param {Function} [reviver] Method for further parsing of SVG elements, called after each fabric object created.
       */
parseElements:function(e,i,n,s,r){new t.ElementsParser(e,i,n,s,r).parse()},
/**
       * Parses "style" attribute, retuning an object with values
       * @static
       * @memberOf fabric
       * @param {SVGElement} element Element to parse
       * @return {Object} Objects with values parsed from style attribute of an element
       */
parseStyleAttribute:function(e){var t={},i=e.getAttribute("style");return i?("string"==typeof i?function(e,t){var i,n;e.replace(/;\s*$/,"").split(";").forEach((function(e){var s=e.split(":");i=s[0].trim().toLowerCase(),n=s[1].trim(),t[i]=n}))}(i,t):function(e,t){var i,n;for(var s in e)void 0!==e[s]&&(i=s.toLowerCase(),n=e[s],t[i]=n)}(i,t),t):t},
/**
       * Parses "points" attribute, returning an array of values
       * @static
       * @memberOf fabric
       * @param {String} points points attribute string
       * @return {Array} array of points
       */
parsePointsAttribute:function(e){if(!e)return null;var t,i,n=[];for(t=0,i=(e=(e=e.replace(/,/g," ").trim()).split(/\s+/)).length;t<i;t+=2)n.push({x:parseFloat(e[t]),y:parseFloat(e[t+1])});return n},
/**
       * Returns CSS rules for a given SVG document
       * @static
       * @function
       * @memberOf fabric
       * @param {SVGDocument} doc SVG document to parse
       * @return {Object} CSS rules of this document
       */
getCSSRules:function(e){var i,n,s=e.getElementsByTagName("style"),r={};for(i=0,n=s.length;i<n;i++){var a=s[i].textContent;""!==(a=a.replace(/\/\*[\s\S]*?\*\//g,"")).trim()&&a.split("}").filter((function(e){return e.trim()})).forEach((function(e){var s=e.split("{"),a={},o=s[1].trim().split(";").filter((function(e){return e.trim()}));for(i=0,n=o.length;i<n;i++){var l=o[i].split(":"),A=l[0].trim(),c=l[1].trim();a[A]=c}(e=s[0].trim()).split(",").forEach((function(e){""!==(e=e.replace(/^svg/i,"").trim())&&(r[e]?t.util.object.extend(r[e],a):r[e]=t.util.object.clone(a))}))}))}return r},
/**
       * Takes url corresponding to an SVG document, and parses it into a set of fabric objects.
       * Note that SVG is fetched via XMLHttpRequest, so it needs to conform to SOP (Same Origin Policy)
       * @memberOf fabric
       * @param {String} url
       * @param {Function} callback
       * @param {Function} [reviver] Method for further parsing of SVG elements, called after each fabric object created.
       * @param {Object} [options] Object containing options for parsing
       * @param {String} [options.crossOrigin] crossOrigin crossOrigin setting to use for external resources
       */
loadSVGFromURL:function(e,i,n,s){e=e.replace(/^\n\s*/,"").trim(),new t.util.request(e,{method:"get",onComplete:function(e){var r=e.responseXML;if(!r||!r.documentElement)return i&&i(null),!1;t.parseSVGDocument(r.documentElement,(function(e,t,n,s){i&&i(e,t,n,s)}),n,s)}})},
/**
       * Takes string corresponding to an SVG document, and parses it into a set of fabric objects
       * @memberOf fabric
       * @param {String} string
       * @param {Function} callback
       * @param {Function} [reviver] Method for further parsing of SVG elements, called after each fabric object created.
       * @param {Object} [options] Object containing options for parsing
       * @param {String} [options.crossOrigin] crossOrigin crossOrigin setting to use for external resources
       */
loadSVGFromString:function(e,i,n,s){var r=(new t.window.DOMParser).parseFromString(e.trim(),"text/xml");t.parseSVGDocument(r.documentElement,(function(e,t,n,s){i(e,t,n,s)}),n,s)}})}(e),f.ElementsParser=function(e,t,i,n,s,r){this.elements=e,this.callback=t,this.options=i,this.reviver=n,this.svgUid=i&&i.svgUid||0,this.parsingOptions=s,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g,this.doc=r},(l=f.ElementsParser.prototype).parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},l.createObjects=function(){var e=this;this.elements.forEach((function(t,i){t.setAttribute("svgUid",e.svgUid),e.createObject(t,i)}))},l.findTag=function(e){return f[f.util.string.capitalize(e.tagName.replace("svg:",""))]},l.createObject=function(e,t){var i=this.findTag(e);if(i&&i.fromElement)try{i.fromElement(e,this.createCallback(t,e),this.options)}catch(n){f.log(n)}else this.checkIfDone()},l.createCallback=function(e,t){var i=this;return function(n){var s;i.resolveGradient(n,t,"fill"),i.resolveGradient(n,t,"stroke"),n instanceof f.Image&&n._originalElement&&(s=n.parsePreserveAspectRatioAttribute(t)),n._removeTransformMatrix(s),i.resolveClipPath(n,t),i.reviver&&i.reviver(t,n),i.instances[e]=n,i.checkIfDone()}},l.extractPropertyDefinition=function(e,t,i){var n=e[t],s=this.regexUrl;if(s.test(n)){s.lastIndex=0;var r=s.exec(n)[1];return s.lastIndex=0,f[i][this.svgUid][r]}},l.resolveGradient=function(e,t,i){var n=this.extractPropertyDefinition(e,i,"gradientDefs");if(n){var s=t.getAttribute(i+"-opacity"),r=f.Gradient.fromElement(n,e,s,this.options);e.set(i,r)}},l.createClipPathCallback=function(e,t){return function(e){e._removeTransformMatrix(),e.fillRule=e.clipRule,t.push(e)}},l.resolveClipPath=function(e,t){var i,n,s,r,a=this.extractPropertyDefinition(e,"clipPath","clipPaths");if(a){s=[],n=f.util.invertTransform(e.calcTransformMatrix());for(var o=a[0].parentNode,l=t;l.parentNode&&l.getAttribute("clip-path")!==e.clipPath;)l=l.parentNode;l.parentNode.appendChild(o);for(var A=0;A<a.length;A++)i=a[A],this.findTag(i).fromElement(i,this.createClipPathCallback(e,s),this.options);a=1===s.length?s[0]:new f.Group(s),r=f.util.multiplyTransformMatrices(n,a.calcTransformMatrix()),a.clipPath&&this.resolveClipPath(a,l);var c=f.util.qrDecompose(r);a.flipX=!1,a.flipY=!1,a.set("scaleX",c.scaleX),a.set("scaleY",c.scaleY),a.angle=c.angle,a.skewX=c.skewX,a.skewY=0,a.setPositionByOrigin({x:c.translateX,y:c.translateY},"center","center"),e.clipPath=a}else delete e.clipPath},l.checkIfDone=function(){0==--this.numElements&&(this.instances=this.instances.filter((function(e){return null!=e})),this.callback(this.instances,this.elements))},function(e){var t=e.fabric||(e.fabric={});function i(e,t){this.x=e,this.y=t}t.Point?t.warn("fabric.Point is already defined"):(t.Point=i,i.prototype=/** @lends fabric.Point.prototype */
{type:"point",constructor:i,
/**
       * Adds another point to this one and returns another one
       * @param {fabric.Point} that
       * @return {fabric.Point} new Point instance with added values
       */
add:function(e){return new i(this.x+e.x,this.y+e.y)},
/**
       * Adds another point to this one
       * @param {fabric.Point} that
       * @return {fabric.Point} thisArg
       * @chainable
       */
addEquals:function(e){return this.x+=e.x,this.y+=e.y,this},
/**
       * Adds value to this point and returns a new one
       * @param {Number} scalar
       * @return {fabric.Point} new Point with added value
       */
scalarAdd:function(e){return new i(this.x+e,this.y+e)},
/**
       * Adds value to this point
       * @param {Number} scalar
       * @return {fabric.Point} thisArg
       * @chainable
       */
scalarAddEquals:function(e){return this.x+=e,this.y+=e,this},
/**
       * Subtracts another point from this point and returns a new one
       * @param {fabric.Point} that
       * @return {fabric.Point} new Point object with subtracted values
       */
subtract:function(e){return new i(this.x-e.x,this.y-e.y)},
/**
       * Subtracts another point from this point
       * @param {fabric.Point} that
       * @return {fabric.Point} thisArg
       * @chainable
       */
subtractEquals:function(e){return this.x-=e.x,this.y-=e.y,this},
/**
       * Subtracts value from this point and returns a new one
       * @param {Number} scalar
       * @return {fabric.Point}
       */
scalarSubtract:function(e){return new i(this.x-e,this.y-e)},
/**
       * Subtracts value from this point
       * @param {Number} scalar
       * @return {fabric.Point} thisArg
       * @chainable
       */
scalarSubtractEquals:function(e){return this.x-=e,this.y-=e,this},
/**
       * Multiplies this point by a value and returns a new one
       * TODO: rename in scalarMultiply in 2.0
       * @param {Number} scalar
       * @return {fabric.Point}
       */
multiply:function(e){return new i(this.x*e,this.y*e)},
/**
       * Multiplies this point by a value
       * TODO: rename in scalarMultiplyEquals in 2.0
       * @param {Number} scalar
       * @return {fabric.Point} thisArg
       * @chainable
       */
multiplyEquals:function(e){return this.x*=e,this.y*=e,this},
/**
       * Divides this point by a value and returns a new one
       * TODO: rename in scalarDivide in 2.0
       * @param {Number} scalar
       * @return {fabric.Point}
       */
divide:function(e){return new i(this.x/e,this.y/e)},
/**
       * Divides this point by a value
       * TODO: rename in scalarDivideEquals in 2.0
       * @param {Number} scalar
       * @return {fabric.Point} thisArg
       * @chainable
       */
divideEquals:function(e){return this.x/=e,this.y/=e,this},
/**
       * Returns true if this point is equal to another one
       * @param {fabric.Point} that
       * @return {Boolean}
       */
eq:function(e){return this.x===e.x&&this.y===e.y},
/**
       * Returns true if this point is less than another one
       * @param {fabric.Point} that
       * @return {Boolean}
       */
lt:function(e){return this.x<e.x&&this.y<e.y},
/**
       * Returns true if this point is less than or equal to another one
       * @param {fabric.Point} that
       * @return {Boolean}
       */
lte:function(e){return this.x<=e.x&&this.y<=e.y},
/**
      
      	     * Returns true if this point is greater another one
      	     * @param {fabric.Point} that
      	     * @return {Boolean}
      	     */
gt:function(e){return this.x>e.x&&this.y>e.y},
/**
       * Returns true if this point is greater than or equal to another one
       * @param {fabric.Point} that
       * @return {Boolean}
       */
gte:function(e){return this.x>=e.x&&this.y>=e.y},
/**
       * Returns new point which is the result of linear interpolation with this one and another one
       * @param {fabric.Point} that
       * @param {Number} t , position of interpolation, between 0 and 1 default 0.5
       * @return {fabric.Point}
       */
lerp:function(e,t){return void 0===t&&(t=.5),t=Math.max(Math.min(1,t),0),new i(this.x+(e.x-this.x)*t,this.y+(e.y-this.y)*t)},
/**
       * Returns distance from this point and another one
       * @param {fabric.Point} that
       * @return {Number}
       */
distanceFrom:function(e){var t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)},
/**
       * Returns the point between this point and another one
       * @param {fabric.Point} that
       * @return {fabric.Point}
       */
midPointFrom:function(e){return this.lerp(e)},
/**
       * Returns a new point which is the min of this and another one
       * @param {fabric.Point} that
       * @return {fabric.Point}
       */
min:function(e){return new i(Math.min(this.x,e.x),Math.min(this.y,e.y))},
/**
       * Returns a new point which is the max of this and another one
       * @param {fabric.Point} that
       * @return {fabric.Point}
       */
max:function(e){return new i(Math.max(this.x,e.x),Math.max(this.y,e.y))},
/**
       * Returns string representation of this point
       * @return {String}
       */
toString:function(){return this.x+","+this.y},
/**
       * Sets x/y of this point
       * @param {Number} x
       * @param {Number} y
       * @chainable
       */
setXY:function(e,t){return this.x=e,this.y=t,this},
/**
       * Sets x of this point
       * @param {Number} x
       * @chainable
       */
setX:function(e){return this.x=e,this},
/**
       * Sets y of this point
       * @param {Number} y
       * @chainable
       */
setY:function(e){return this.y=e,this},
/**
       * Sets x/y of this point from another point
       * @param {fabric.Point} that
       * @chainable
       */
setFromPoint:function(e){return this.x=e.x,this.y=e.y,this},
/**
       * Swaps x/y of this point and another point
       * @param {fabric.Point} that
       */
swap:function(e){var t=this.x,i=this.y;this.x=e.x,this.y=e.y,e.x=t,e.y=i},
/**
       * return a cloned instance of the point
       * @return {fabric.Point}
       */
clone:function(){return new i(this.x,this.y)}})}(e),function(e){var t=e.fabric||(e.fabric={});function i(e){this.status=e,this.points=[]}t.Intersection?t.warn("fabric.Intersection is already defined"):(t.Intersection=i,t.Intersection.prototype=/** @lends fabric.Intersection.prototype */
{constructor:i,
/**
       * Appends a point to intersection
       * @param {fabric.Point} point
       * @return {fabric.Intersection} thisArg
       * @chainable
       */
appendPoint:function(e){return this.points.push(e),this},
/**
       * Appends points to intersection
       * @param {Array} points
       * @return {fabric.Intersection} thisArg
       * @chainable
       */
appendPoints:function(e){return this.points=this.points.concat(e),this}},t.Intersection.intersectLineLine=function(e,n,s,r){var a,o=(r.x-s.x)*(e.y-s.y)-(r.y-s.y)*(e.x-s.x),l=(n.x-e.x)*(e.y-s.y)-(n.y-e.y)*(e.x-s.x),A=(r.y-s.y)*(n.x-e.x)-(r.x-s.x)*(n.y-e.y);if(0!==A){var c=o/A,u=l/A;0<=c&&c<=1&&0<=u&&u<=1?(a=new i("Intersection")).appendPoint(new t.Point(e.x+c*(n.x-e.x),e.y+c*(n.y-e.y))):a=new i}else a=new i(0===o||0===l?"Coincident":"Parallel");return a},t.Intersection.intersectLinePolygon=function(e,t,n){var s,r,a,o,l=new i,A=n.length;for(o=0;o<A;o++)s=n[o],r=n[(o+1)%A],a=i.intersectLineLine(e,t,s,r),l.appendPoints(a.points);return l.points.length>0&&(l.status="Intersection"),l},t.Intersection.intersectPolygonPolygon=function(e,t){var n,s=new i,r=e.length;for(n=0;n<r;n++){var a=e[n],o=e[(n+1)%r],l=i.intersectLinePolygon(a,o,t);s.appendPoints(l.points)}return s.points.length>0&&(s.status="Intersection"),s},t.Intersection.intersectPolygonRectangle=function(e,n,s){var r=n.min(s),a=n.max(s),o=new t.Point(a.x,r.y),l=new t.Point(r.x,a.y),A=i.intersectLinePolygon(r,o,e),c=i.intersectLinePolygon(o,a,e),u=i.intersectLinePolygon(a,l,e),h=i.intersectLinePolygon(l,r,e),d=new i;return d.appendPoints(A.points),d.appendPoints(c.points),d.appendPoints(u.points),d.appendPoints(h.points),d.points.length>0&&(d.status="Intersection"),d})}(e),function(e){var t=e.fabric||(e.fabric={});function i(e){e?this._tryParsingColor(e):this.setSource([0,0,0,1])}function n(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}t.Color?t.warn("fabric.Color is already defined."):(t.Color=i,t.Color.prototype=/** @lends fabric.Color.prototype */
{
/**
       * @private
       * @param {String|Array} color Color value to parse
       */
_tryParsingColor:function(e){var t;e in i.colorNameMap&&(e=i.colorNameMap[e]),"transparent"===e&&(t=[255,255,255,0]),t||(t=i.sourceFromHex(e)),t||(t=i.sourceFromRgb(e)),t||(t=i.sourceFromHsl(e)),t||(t=[0,0,0,1]),t&&this.setSource(t)},
/**
       * Adapted from <a href="https://rawgithub.com/mjijackson/mjijackson.github.com/master/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript.html">https://github.com/mjijackson</a>
       * @private
       * @param {Number} r Red color value
       * @param {Number} g Green color value
       * @param {Number} b Blue color value
       * @return {Array} Hsl color
       */
_rgbToHsl:function(e,i,n){e/=255,i/=255,n/=255;var s,r,a,o=t.util.array.max([e,i,n]),l=t.util.array.min([e,i,n]);if(a=(o+l)/2,o===l)s=r=0;else{var A=o-l;switch(r=a>.5?A/(2-o-l):A/(o+l),o){case e:s=(i-n)/A+(i<n?6:0);break;case i:s=(n-e)/A+2;break;case n:s=(e-i)/A+4}s/=6}return[Math.round(360*s),Math.round(100*r),Math.round(100*a)]},
/**
       * Returns source of this color (where source is an array representation; ex: [200, 200, 100, 1])
       * @return {Array}
       */
getSource:function(){return this._source},
/**
       * Sets source of this color (where source is an array representation; ex: [200, 200, 100, 1])
       * @param {Array} source
       */
setSource:function(e){this._source=e},
/**
       * Returns color representation in RGB format
       * @return {String} ex: rgb(0-255,0-255,0-255)
       */
toRgb:function(){var e=this.getSource();return"rgb("+e[0]+","+e[1]+","+e[2]+")"},
/**
       * Returns color representation in RGBA format
       * @return {String} ex: rgba(0-255,0-255,0-255,0-1)
       */
toRgba:function(){var e=this.getSource();return"rgba("+e[0]+","+e[1]+","+e[2]+","+e[3]+")"},
/**
       * Returns color representation in HSL format
       * @return {String} ex: hsl(0-360,0%-100%,0%-100%)
       */
toHsl:function(){var e=this.getSource(),t=this._rgbToHsl(e[0],e[1],e[2]);return"hsl("+t[0]+","+t[1]+"%,"+t[2]+"%)"},
/**
       * Returns color representation in HSLA format
       * @return {String} ex: hsla(0-360,0%-100%,0%-100%,0-1)
       */
toHsla:function(){var e=this.getSource(),t=this._rgbToHsl(e[0],e[1],e[2]);return"hsla("+t[0]+","+t[1]+"%,"+t[2]+"%,"+e[3]+")"},
/**
       * Returns color representation in HEX format
       * @return {String} ex: FF5555
       */
toHex:function(){var e,t,i,n=this.getSource();return e=1===(e=n[0].toString(16)).length?"0"+e:e,t=1===(t=n[1].toString(16)).length?"0"+t:t,i=1===(i=n[2].toString(16)).length?"0"+i:i,e.toUpperCase()+t.toUpperCase()+i.toUpperCase()},
/**
       * Returns color representation in HEXA format
       * @return {String} ex: FF5555CC
       */
toHexa:function(){var e,t=this.getSource();return e=1===(e=(e=Math.round(255*t[3])).toString(16)).length?"0"+e:e,this.toHex()+e.toUpperCase()},
/**
       * Gets value of alpha channel for this color
       * @return {Number} 0-1
       */
getAlpha:function(){return this.getSource()[3]},
/**
       * Sets value of alpha channel for this color
       * @param {Number} alpha Alpha value 0-1
       * @return {fabric.Color} thisArg
       */
setAlpha:function(e){var t=this.getSource();return t[3]=e,this.setSource(t),this},
/**
       * Transforms color to its grayscale representation
       * @return {fabric.Color} thisArg
       */
toGrayscale:function(){var e=this.getSource(),t=parseInt((.3*e[0]+.59*e[1]+.11*e[2]).toFixed(0),10),i=e[3];return this.setSource([t,t,t,i]),this},
/**
       * Transforms color to its black and white representation
       * @param {Number} threshold
       * @return {fabric.Color} thisArg
       */
toBlackWhite:function(e){var t=this.getSource(),i=(.3*t[0]+.59*t[1]+.11*t[2]).toFixed(0),n=t[3];return e=e||127,i=Number(i)<Number(e)?0:255,this.setSource([i,i,i,n]),this},
/**
       * Overlays color with another color
       * @param {String|fabric.Color} otherColor
       * @return {fabric.Color} thisArg
       */
overlayWith:function(e){e instanceof i||(e=new i(e));var t,n=[],s=this.getAlpha(),r=this.getSource(),a=e.getSource();for(t=0;t<3;t++)n.push(Math.round(.5*r[t]+.5*a[t]));return n[3]=s,this.setSource(n),this}},t.Color.reRGBa=/^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*((?:\d*\.?\d+)?)\s*)?\)$/i,t.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i,t.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,t.Color.colorNameMap={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},t.Color.fromRgb=function(e){return i.fromSource(i.sourceFromRgb(e))},t.Color.sourceFromRgb=function(e){var t=e.match(i.reRGBa);if(t){var n=parseInt(t[1],10)/(/%$/.test(t[1])?100:1)*(/%$/.test(t[1])?255:1),s=parseInt(t[2],10)/(/%$/.test(t[2])?100:1)*(/%$/.test(t[2])?255:1),r=parseInt(t[3],10)/(/%$/.test(t[3])?100:1)*(/%$/.test(t[3])?255:1);return[parseInt(n,10),parseInt(s,10),parseInt(r,10),t[4]?parseFloat(t[4]):1]}},t.Color.fromRgba=i.fromRgb,t.Color.fromHsl=function(e){return i.fromSource(i.sourceFromHsl(e))},t.Color.sourceFromHsl=function(e){var t=e.match(i.reHSLa);if(t){var s,r,a,o=(parseFloat(t[1])%360+360)%360/360,l=parseFloat(t[2])/(/%$/.test(t[2])?100:1),A=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(0===l)s=r=a=A;else{var c=A<=.5?A*(l+1):A+l-A*l,u=2*A-c;s=n(u,c,o+1/3),r=n(u,c,o),a=n(u,c,o-1/3)}return[Math.round(255*s),Math.round(255*r),Math.round(255*a),t[4]?parseFloat(t[4]):1]}},t.Color.fromHsla=i.fromHsl,t.Color.fromHex=function(e){return i.fromSource(i.sourceFromHex(e))},t.Color.sourceFromHex=function(e){if(e.match(i.reHex)){var t=e.slice(e.indexOf("#")+1),n=3===t.length||4===t.length,s=8===t.length||4===t.length,r=n?t.charAt(0)+t.charAt(0):t.substring(0,2),a=n?t.charAt(1)+t.charAt(1):t.substring(2,4),o=n?t.charAt(2)+t.charAt(2):t.substring(4,6),l=s?n?t.charAt(3)+t.charAt(3):t.substring(6,8):"FF";return[parseInt(r,16),parseInt(a,16),parseInt(o,16),parseFloat((parseInt(l,16)/255).toFixed(2))]}},t.Color.fromSource=function(e){var t=new i;return t.setSource(e),t})}(e),function(e){var t=e.fabric||(e.fabric={}),i=["e","se","s","sw","w","nw","n","ne","e"],n=["ns","nesw","ew","nwse"],s={},r="left",a="top",o="right",l="bottom",A="center",c={top:l,bottom:a,left:o,right:r,center:A},u=t.util.radiansToDegrees,h=Math.sign||function(e){return(e>0)-(e<0)||+e};function d(e,t){var i=e.angle+u(Math.atan2(t.y,t.x))+360;return Math.round(i%360/45)}function g(e,i){var n=i.transform.target,s=n.canvas,r=t.util.object.clone(i);r.target=n,s&&s.fire("object:"+e,r),n.fire(e,i)}function p(e,t){var i=t.canvas,n=e[i.uniScaleKey];return i.uniformScaling&&!n||!i.uniformScaling&&n}function f(e){return e.originX===A&&e.originY===A}function m(e,t,i){var n=e.lockScalingX,s=e.lockScalingY;return!(!n||!s)||(!(t||!n&&!s||!i)||(!(!n||"x"!==t)||!(!s||"y"!==t)))}function C(e,t,i,n){return{e:e,transform:t,pointer:{x:i,y:n}}}function I(e){return function(t,i,n,s){var r=i.target,a=r.getCenterPoint(),o=r.translateToOriginPoint(a,i.originX,i.originY),l=e(t,i,n,s);return r.setPositionByOrigin(o,i.originX,i.originY),l}}function v(e,t){return function(i,n,s,r){var a=t(i,n,s,r);return a&&g(e,C(i,n,s,r)),a}}function B(e,i,n,s,r){var a=e.target,o=a.controls[e.corner],l=a.canvas.getZoom(),A=a.padding/l,c=a.toLocalPoint(new t.Point(s,r),i,n);return c.x>=A&&(c.x-=A),c.x<=-A&&(c.x+=A),c.y>=A&&(c.y-=A),c.y<=A&&(c.y+=A),c.x-=o.offsetX,c.y-=o.offsetY,c}function y(e){return e.flipX!==e.flipY}function b(e,t,i,n,s){if(0!==e[t]){var r=s/e._getTransformedDimensions()[n]*e[i];e.set(i,r)}}function E(e,t,i,n){var s,A=t.target,c=A._getTransformedDimensions(0,A.skewY),h=B(t,t.originX,t.originY,i,n),d=Math.abs(2*h.x)-c.x,g=A.skewX;d<2?s=0:(s=u(Math.atan2(d/A.scaleX,c.y/A.scaleY)),t.originX===r&&t.originY===l&&(s=-s),t.originX===o&&t.originY===a&&(s=-s),y(A)&&(s=-s));var p=g!==s;if(p){var f=A._getTransformedDimensions().y;A.set("skewX",s),b(A,"skewY","scaleY","y",f)}return p}function w(e,t,i,n){var s,A=t.target,c=A._getTransformedDimensions(A.skewX,0),h=B(t,t.originX,t.originY,i,n),d=Math.abs(2*h.y)-c.y,g=A.skewY;d<2?s=0:(s=u(Math.atan2(d/A.scaleY,c.x/A.scaleX)),t.originX===r&&t.originY===l&&(s=-s),t.originX===o&&t.originY===a&&(s=-s),y(A)&&(s=-s));var p=g!==s;if(p){var f=A._getTransformedDimensions().x;A.set("skewY",s),b(A,"skewX","scaleX","x",f)}return p}function Q(e,t,i,n,s){s=s||{};var r,a,o,l,A,u,d=t.target,g=d.lockScalingX,C=d.lockScalingY,I=s.by,v=p(e,d),y=m(d,I,v),b=t.gestureScale;if(y)return!1;if(b)a=t.scaleX*b,o=t.scaleY*b;else{if(r=B(t,t.originX,t.originY,i,n),A="y"!==I?h(r.x):1,u="x"!==I?h(r.y):1,t.signX||(t.signX=A),t.signY||(t.signY=u),d.lockScalingFlip&&(t.signX!==A||t.signY!==u))return!1;if(l=d._getTransformedDimensions(),v&&!I){var E=Math.abs(r.x)+Math.abs(r.y),w=t.original,Q=E/(Math.abs(l.x*w.scaleX/d.scaleX)+Math.abs(l.y*w.scaleY/d.scaleY));a=w.scaleX*Q,o=w.scaleY*Q}else a=Math.abs(r.x*d.scaleX/l.x),o=Math.abs(r.y*d.scaleY/l.y);f(t)&&(a*=2,o*=2),t.signX!==A&&"y"!==I&&(t.originX=c[t.originX],a*=-1,t.signX=A),t.signY!==u&&"x"!==I&&(t.originY=c[t.originY],o*=-1,t.signY=u)}var _=d.scaleX,S=d.scaleY;return I?("x"===I&&d.set("scaleX",a),"y"===I&&d.set("scaleY",o)):(!g&&d.set("scaleX",a),!C&&d.set("scaleY",o)),_!==d.scaleX||S!==d.scaleY}s.scaleCursorStyleHandler=function(e,t,n){var s=p(e,n),r="";if(0!==t.x&&0===t.y?r="x":0===t.x&&0!==t.y&&(r="y"),m(n,r,s))return"not-allowed";var a=d(n,t);return i[a]+"-resize"},s.skewCursorStyleHandler=function(e,t,i){var s="not-allowed";if(0!==t.x&&i.lockSkewingY)return s;if(0!==t.y&&i.lockSkewingX)return s;var r=d(i,t)%4;return n[r]+"-resize"},s.scaleSkewCursorStyleHandler=function(e,t,i){return e[i.canvas.altActionKey]?s.skewCursorStyleHandler(e,t,i):s.scaleCursorStyleHandler(e,t,i)},s.rotationWithSnapping=v("rotating",I((function(e,t,i,n){var s=t,r=s.target,a=r.translateToOriginPoint(r.getCenterPoint(),s.originX,s.originY);if(r.lockRotation)return!1;var o,l=Math.atan2(s.ey-a.y,s.ex-a.x),A=Math.atan2(n-a.y,i-a.x),c=u(A-l+s.theta);if(r.snapAngle>0){var h=r.snapAngle,d=r.snapThreshold||h,g=Math.ceil(c/h)*h,p=Math.floor(c/h)*h;Math.abs(c-p)<d?c=p:Math.abs(c-g)<d&&(c=g)}return c<0&&(c=360+c),c%=360,o=r.angle!==c,r.angle=c,o}))),s.scalingEqually=v("scaling",I((function(e,t,i,n){return Q(e,t,i,n)}))),s.scalingX=v("scaling",I((function(e,t,i,n){return Q(e,t,i,n,{by:"x"})}))),s.scalingY=v("scaling",I((function(e,t,i,n){return Q(e,t,i,n,{by:"y"})}))),s.scalingYOrSkewingX=function(e,t,i,n){return e[t.target.canvas.altActionKey]?s.skewHandlerX(e,t,i,n):s.scalingY(e,t,i,n)},s.scalingXOrSkewingY=function(e,t,i,n){return e[t.target.canvas.altActionKey]?s.skewHandlerY(e,t,i,n):s.scalingX(e,t,i,n)},s.changeWidth=v("resizing",I((function(e,t,i,n){var s=t.target,r=B(t,t.originX,t.originY,i,n),a=s.strokeWidth/(s.strokeUniform?s.scaleX:1),o=f(t)?2:1,l=s.width,A=Math.abs(r.x*o/s.scaleX)-a;return s.set("width",Math.max(A,0)),l!==A}))),s.skewHandlerX=function(e,t,i,n){var s,l=t.target,c=l.skewX,u=t.originY;return!l.lockSkewingX&&(0===c?s=B(t,A,A,i,n).x>0?r:o:(c>0&&(s=u===a?r:o),c<0&&(s=u===a?o:r),y(l)&&(s=s===r?o:r)),t.originX=s,v("skewing",I(E))(e,t,i,n))},s.skewHandlerY=function(e,t,i,n){var s,o=t.target,c=o.skewY,u=t.originX;return!o.lockSkewingY&&(0===c?s=B(t,A,A,i,n).y>0?a:l:(c>0&&(s=u===r?a:l),c<0&&(s=u===r?l:a),y(o)&&(s=s===a?l:a)),t.originY=s,v("skewing",I(w))(e,t,i,n))},s.dragHandler=function(e,t,i,n){var s=t.target,r=i-t.offsetX,a=n-t.offsetY,o=!s.get("lockMovementX")&&s.left!==r,l=!s.get("lockMovementY")&&s.top!==a;return o&&s.set("left",r),l&&s.set("top",a),(o||l)&&g("moving",C(e,t,i,n)),o||l},s.scaleOrSkewActionName=function(e,t,i){var n=e[i.canvas.altActionKey];return 0===t.x?n?"skewX":"scaleY":0===t.y?n?"skewY":"scaleX":void 0},s.rotationStyleHandler=function(e,t,i){return i.lockRotation?"not-allowed":t.cursorStyle},s.fireEvent=g,s.wrapWithFixedAnchor=I,s.wrapWithFireEvent=v,s.getLocalPoint=B,t.controlsUtils=s}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.util.degreesToRadians,n=t.controlsUtils;n.renderCircleControl=function(e,t,i,n,s){n=n||{};var r,a=this.sizeX||n.cornerSize||s.cornerSize,o=this.sizeY||n.cornerSize||s.cornerSize,l=void 0!==n.transparentCorners?n.transparentCorners:s.transparentCorners,A=l?"stroke":"fill",c=!l&&(n.cornerStrokeColor||s.cornerStrokeColor),u=t,h=i;e.save(),e.fillStyle=n.cornerColor||s.cornerColor,e.strokeStyle=n.cornerStrokeColor||s.cornerStrokeColor,a>o?(r=a,e.scale(1,o/a),h=i*a/o):o>a?(r=o,e.scale(a/o,1),u=t*o/a):r=a,e.lineWidth=1,e.beginPath(),e.arc(u,h,r/2,0,2*Math.PI,!1),e[A](),c&&e.stroke(),e.restore()},n.renderSquareControl=function(e,t,n,s,r){s=s||{};var a=this.sizeX||s.cornerSize||r.cornerSize,o=this.sizeY||s.cornerSize||r.cornerSize,l=void 0!==s.transparentCorners?s.transparentCorners:r.transparentCorners,A=l?"stroke":"fill",c=!l&&(s.cornerStrokeColor||r.cornerStrokeColor),u=a/2,h=o/2;e.save(),e.fillStyle=s.cornerColor||r.cornerColor,e.strokeStyle=s.cornerStrokeColor||r.cornerStrokeColor,e.lineWidth=1,e.translate(t,n),e.rotate(i(r.angle)),e[A+"Rect"](-u,-h,a,o),c&&e.strokeRect(-u,-h,a,o),e.restore()}}(e),function(e){var t=e.fabric||(e.fabric={});t.Control=function(e){for(var t in e)this[t]=e[t]},t.Control.prototype=/** @lends fabric.Control.prototype */
{
/**
       * keep track of control visibility.
       * mainly for backward compatibility.
       * if you do not want to see a control, you can remove it
       * from the controlset.
       * @type {Boolean}
       * @default true
       */
visible:!0,
/**
       * Name of the action that the control will likely execute.
       * This is optional. FabricJS uses to identify what the user is doing for some
       * extra optimizations. If you are writing a custom control and you want to know
       * somewhere else in the code what is going on, you can use this string here.
       * you can also provide a custom getActionName if your control run multiple actions
       * depending on some external state.
       * default to scale since is the most common, used on 4 corners by default
       * @type {String}
       * @default 'scale'
       */
actionName:"scale",
/**
       * Drawing angle of the control.
       * NOT used for now, but name marked as needed for internal logic
       * example: to reuse the same drawing function for different rotated controls
       * @type {Number}
       * @default 0
       */
angle:0,
/**
       * Relative position of the control. X
       * 0,0 is the center of the Object, while -0.5 (left) or 0.5 (right) are the extremities
       * of the bounding box.
       * @type {Number}
       * @default 0
       */
x:0,
/**
       * Relative position of the control. Y
       * 0,0 is the center of the Object, while -0.5 (top) or 0.5 (bottom) are the extremities
       * of the bounding box.
       * @type {Number}
       * @default 0
       */
y:0,
/**
       * Horizontal offset of the control from the defined position. In pixels
       * Positive offset moves the control to the right, negative to the left.
       * It used when you want to have position of control that does not scale with
       * the bounding box. Example: rotation control is placed at x:0, y: 0.5 on
       * the boundindbox, with an offset of 30 pixels vertically. Those 30 pixels will
       * stay 30 pixels no matter how the object is big. Another example is having 2
       * controls in the corner, that stay in the same position when the object scale.
       * of the bounding box.
       * @type {Number}
       * @default 0
       */
offsetX:0,
/**
       * Vertical offset of the control from the defined position. In pixels
       * Positive offset moves the control to the bottom, negative to the top.
       * @type {Number}
       * @default 0
       */
offsetY:0,
/**
       * Sets the length of the control. If null, defaults to object's cornerSize.
       * Expects both sizeX and sizeY to be set when set.
       * @type {?Number}
       * @default null
       */
sizeX:null,
/**
       * Sets the height of the control. If null, defaults to object's cornerSize.
       * Expects both sizeX and sizeY to be set when set.
       * @type {?Number}
       * @default null
       */
sizeY:null,
/**
       * Sets the length of the touch area of the control. If null, defaults to object's touchCornerSize.
       * Expects both touchSizeX and touchSizeY to be set when set.
       * @type {?Number}
       * @default null
       */
touchSizeX:null,
/**
       * Sets the height of the touch area of the control. If null, defaults to object's touchCornerSize.
       * Expects both touchSizeX and touchSizeY to be set when set.
       * @type {?Number}
       * @default null
       */
touchSizeY:null,
/**
       * Css cursor style to display when the control is hovered.
       * if the method `cursorStyleHandler` is provided, this property is ignored.
       * @type {String}
       * @default 'crosshair'
       */
cursorStyle:"crosshair",
/**
       * If controls has an offsetY or offsetX, draw a line that connects
       * the control to the bounding box
       * @type {Boolean}
       * @default false
       */
withConnection:!1,
/**
       * The control actionHandler, provide one to handle action ( control being moved )
       * @param {Event} eventData the native mouse event
       * @param {Object} transformData properties of the current transform
       * @param {Number} x x position of the cursor
       * @param {Number} y y position of the cursor
       * @return {Boolean} true if the action/event modified the object
       */
actionHandler:function(){},
/**
       * The control handler for mouse down, provide one to handle mouse down on control
       * @param {Event} eventData the native mouse event
       * @param {Object} transformData properties of the current transform
       * @param {Number} x x position of the cursor
       * @param {Number} y y position of the cursor
       * @return {Boolean} true if the action/event modified the object
       */
mouseDownHandler:function(){},
/**
       * The control mouseUpHandler, provide one to handle an effect on mouse up.
       * @param {Event} eventData the native mouse event
       * @param {Object} transformData properties of the current transform
       * @param {Number} x x position of the cursor
       * @param {Number} y y position of the cursor
       * @return {Boolean} true if the action/event modified the object
       */
mouseUpHandler:function(){},
/**
       * Returns control actionHandler
       * @param {Event} eventData the native mouse event
       * @param {fabric.Object} fabricObject on which the control is displayed
       * @param {fabric.Control} control control for which the action handler is being asked
       * @return {Function} the action handler
       */
getActionHandler:function(){return this.actionHandler},
/**
       * Returns control mouseDown handler
       * @param {Event} eventData the native mouse event
       * @param {fabric.Object} fabricObject on which the control is displayed
       * @param {fabric.Control} control control for which the action handler is being asked
       * @return {Function} the action handler
       */
getMouseDownHandler:function(){return this.mouseDownHandler},
/**
       * Returns control mouseUp handler
       * @param {Event} eventData the native mouse event
       * @param {fabric.Object} fabricObject on which the control is displayed
       * @param {fabric.Control} control control for which the action handler is being asked
       * @return {Function} the action handler
       */
getMouseUpHandler:function(){return this.mouseUpHandler},
/**
       * Returns control cursorStyle for css using cursorStyle. If you need a more elaborate
       * function you can pass one in the constructor
       * the cursorStyle property
       * @param {Event} eventData the native mouse event
       * @param {fabric.Control} control the current control ( likely this)
       * @param {fabric.Object} object on which the control is displayed
       * @return {String}
       */
cursorStyleHandler:function(e,t){return t.cursorStyle},
/**
       * Returns the action name. The basic implementation just return the actionName property.
       * @param {Event} eventData the native mouse event
       * @param {fabric.Control} control the current control ( likely this)
       * @param {fabric.Object} object on which the control is displayed
       * @return {String}
       */
getActionName:function(e,t){return t.actionName},
/**
       * Returns controls visibility
       * @param {fabric.Object} object on which the control is displayed
       * @param {String} controlKey key where the control is memorized on the
       * @return {Boolean}
       */
getVisibility:function(e,t){var i=e._controlsVisibility;return i&&void 0!==i[t]?i[t]:this.visible},
/**
       * Sets controls visibility
       * @param {Boolean} visibility for the object
       * @return {Void}
       */
setVisibility:function(e){this.visible=e},positionHandler:function(e,i){return t.util.transformPoint({x:this.x*e.x+this.offsetX,y:this.y*e.y+this.offsetY},i)},
/**
       * Returns the coords for this control based on object values.
       * @param {Number} objectAngle angle from the fabric object holding the control
       * @param {Number} objectCornerSize cornerSize from the fabric object holding the control (or touchCornerSize if
       *   isTouch is true)
       * @param {Number} centerX x coordinate where the control center should be
       * @param {Number} centerY y coordinate where the control center should be
       * @param {boolean} isTouch true if touch corner, false if normal corner
       */
calcCornerCoords:function(e,i,n,s,r){var a,o,l,A,c=r?this.touchSizeX:this.sizeX,u=r?this.touchSizeY:this.sizeY;if(c&&u&&c!==u){var h=Math.atan2(u,c),d=Math.sqrt(c*c+u*u)/2,g=h-t.util.degreesToRadians(e),p=Math.PI/2-h-t.util.degreesToRadians(e);a=d*t.util.cos(g),o=d*t.util.sin(g),l=d*t.util.cos(p),A=d*t.util.sin(p)}else{d=.7071067812*(c&&u?c:i);g=t.util.degreesToRadians(45-e);a=l=d*t.util.cos(g),o=A=d*t.util.sin(g)}return{tl:{x:n-A,y:s-l},tr:{x:n+a,y:s-o},bl:{x:n-a,y:s+o},br:{x:n+A,y:s+l}}},
/**
      * Render function for the control.
      * When this function runs the context is unscaled. unrotate. Just retina scaled.
      * all the functions will have to translate to the point left,top before starting Drawing
      * if they want to draw a control where the position is detected.
      * left and top are the result of the positionHandler function
      * @param {RenderingContext2D} ctx the context where the control will be drawn
      * @param {Number} left position of the canvas where we are about to render the control.
      * @param {Number} top position of the canvas where we are about to render the control.
      * @param {Object} styleOverride
      * @param {fabric.Object} fabricObject the object where the control is about to be rendered
      */
render:function(e,i,n,s,r){if("circle"===((s=s||{}).cornerStyle||r.cornerStyle))t.controlsUtils.renderCircleControl.call(this,e,i,n,s,r);else t.controlsUtils.renderSquareControl.call(this,e,i,n,s,r)}}}(e),function(){function e(e,t){var i,n,s,r,a=e.getAttribute("style"),o=e.getAttribute("offset")||0;if(o=(o=parseFloat(o)/(/%$/.test(o)?100:1))<0?0:o>1?1:o,a){var l=a.split(/\s*;\s*/);for(""===l[l.length-1]&&l.pop(),r=l.length;r--;){var A=l[r].split(/\s*:\s*/),c=A[0].trim(),u=A[1].trim();"stop-color"===c?i=u:"stop-opacity"===c&&(s=u)}}return i||(i=e.getAttribute("stop-color")||"rgb(0,0,0)"),s||(s=e.getAttribute("stop-opacity")),n=(i=new f.Color(i)).getAlpha(),s=isNaN(parseFloat(s))?1:parseFloat(s),s*=n*t,{offset:o,color:i.toRgb(),opacity:s}}var t=f.util.object.clone;f.Gradient=f.util.createClass(
/** @lends fabric.Gradient.prototype */
{
/**
         * Horizontal offset for aligning gradients coming from SVG when outside pathgroups
         * @type Number
         * @default 0
         */
offsetX:0,
/**
         * Vertical offset for aligning gradients coming from SVG when outside pathgroups
         * @type Number
         * @default 0
         */
offsetY:0,
/**
         * A transform matrix to apply to the gradient before painting.
         * Imported from svg gradients, is not applied with the current transform in the center.
         * Before this transform is applied, the origin point is at the top left corner of the object
         * plus the addition of offsetY and offsetX.
         * @type Number[]
         * @default null
         */
gradientTransform:null,
/**
         * coordinates units for coords.
         * If `pixels`, the number of coords are in the same unit of width / height.
         * If set as `percentage` the coords are still a number, but 1 means 100% of width
         * for the X and 100% of the height for the y. It can be bigger than 1 and negative.
         * allowed values pixels or percentage.
         * @type String
         * @default 'pixels'
         */
gradientUnits:"pixels",
/**
         * Gradient type linear or radial
         * @type String
         * @default 'pixels'
         */
type:"linear",
/**
         * Constructor
         * @param {Object} options Options object with type, coords, gradientUnits and colorStops
         * @param {Object} [options.type] gradient type linear or radial
         * @param {Object} [options.gradientUnits] gradient units
         * @param {Object} [options.offsetX] SVG import compatibility
         * @param {Object} [options.offsetY] SVG import compatibility
         * @param {Object[]} options.colorStops contains the colorstops.
         * @param {Object} options.coords contains the coords of the gradient
         * @param {Number} [options.coords.x1] X coordiante of the first point for linear or of the focal point for radial
         * @param {Number} [options.coords.y1] Y coordiante of the first point for linear or of the focal point for radial
         * @param {Number} [options.coords.x2] X coordiante of the second point for linear or of the center point for radial
         * @param {Number} [options.coords.y2] Y coordiante of the second point for linear or of the center point for radial
         * @param {Number} [options.coords.r1] only for radial gradient, radius of the inner circle
         * @param {Number} [options.coords.r2] only for radial gradient, radius of the external circle
         * @return {fabric.Gradient} thisArg
         */
initialize:function(e){e||(e={}),e.coords||(e.coords={});var t,i=this;Object.keys(e).forEach((function(t){i[t]=e[t]})),this.id?this.id+="_"+f.Object.__uid++:this.id=f.Object.__uid++,t={x1:e.coords.x1||0,y1:e.coords.y1||0,x2:e.coords.x2||0,y2:e.coords.y2||0},"radial"===this.type&&(t.r1=e.coords.r1||0,t.r2=e.coords.r2||0),this.coords=t,this.colorStops=e.colorStops.slice()},
/**
         * Adds another colorStop
         * @param {Object} colorStop Object with offset and color
         * @return {fabric.Gradient} thisArg
         */
addColorStop:function(e){for(var t in e){var i=new f.Color(e[t]);this.colorStops.push({offset:parseFloat(t),color:i.toRgb(),opacity:i.getAlpha()})}return this},
/**
         * Returns object representation of a gradient
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object}
         */
toObject:function(e){var t={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return f.util.populateWithProperties(this,t,e),t},
/* _TO_SVG_START_ */
/**
         * Returns SVG representation of an gradient
         * @param {Object} object Object to create a gradient for
         * @return {String} SVG representation of an gradient (linear/radial)
         */
toSVG:function(e,i){var n,s,r,a,o=t(this.coords,!0),l=(i=i||{},t(this.colorStops,!0)),A=o.r1>o.r2,c=this.gradientTransform?this.gradientTransform.concat():f.iMatrix.concat(),u=-this.offsetX,h=-this.offsetY,d=!!i.additionalTransform,g="pixels"===this.gradientUnits?"userSpaceOnUse":"objectBoundingBox";if(l.sort((function(e,t){return e.offset-t.offset})),"objectBoundingBox"===g?(u/=e.width,h/=e.height):(u+=e.width/2,h+=e.height/2),"path"===e.type&&"percentage"!==this.gradientUnits&&(u-=e.pathOffset.x,h-=e.pathOffset.y),c[4]-=u,c[5]-=h,a='id="SVGID_'+this.id+'" gradientUnits="'+g+'"',a+=' gradientTransform="'+(d?i.additionalTransform+" ":"")+f.util.matrixToSVG(c)+'" ',"linear"===this.type?r=["<linearGradient ",a,' x1="',o.x1,'" y1="',o.y1,'" x2="',o.x2,'" y2="',o.y2,'">\n']:"radial"===this.type&&(r=["<radialGradient ",a,' cx="',A?o.x1:o.x2,'" cy="',A?o.y1:o.y2,'" r="',A?o.r1:o.r2,'" fx="',A?o.x2:o.x1,'" fy="',A?o.y2:o.y1,'">\n']),"radial"===this.type){if(A)for((l=l.concat()).reverse(),n=0,s=l.length;n<s;n++)l[n].offset=1-l[n].offset;var p=Math.min(o.r1,o.r2);if(p>0){var m=p/Math.max(o.r1,o.r2);for(n=0,s=l.length;n<s;n++)l[n].offset+=m*(1-l[n].offset)}}for(n=0,s=l.length;n<s;n++){var C=l[n];r.push("<stop ",'offset="',100*C.offset+"%",'" style="stop-color:',C.color,void 0!==C.opacity?";stop-opacity: "+C.opacity:";",'"/>\n')}return r.push("linear"===this.type?"</linearGradient>\n":"</radialGradient>\n"),r.join("")},
/* _TO_SVG_END_ */
/**
         * Returns an instance of CanvasGradient
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @return {CanvasGradient}
         */
toLive:function(e){var t,i,n,s=f.util.object.clone(this.coords);if(this.type){for("linear"===this.type?t=e.createLinearGradient(s.x1,s.y1,s.x2,s.y2):"radial"===this.type&&(t=e.createRadialGradient(s.x1,s.y1,s.r1,s.x2,s.y2,s.r2)),i=0,n=this.colorStops.length;i<n;i++){var r=this.colorStops[i].color,a=this.colorStops[i].opacity,o=this.colorStops[i].offset;void 0!==a&&(r=new f.Color(r).setAlpha(a).toRgba()),t.addColorStop(o,r)}return t}}}),f.util.object.extend(f.Gradient,{
/* _FROM_SVG_START_ */
/**
       * Returns {@link fabric.Gradient} instance from an SVG element
       * @static
       * @memberOf fabric.Gradient
       * @param {SVGGradientElement} el SVG gradient element
       * @param {fabric.Object} instance
       * @param {String} opacityAttr A fill-opacity or stroke-opacity attribute to multiply to each stop's opacity.
       * @param {Object} svgOptions an object containing the size of the SVG in order to parse correctly gradients
       * that uses gradientUnits as 'userSpaceOnUse' and percentages.
       * @param {Object.number} viewBoxWidth width part of the viewBox attribute on svg
       * @param {Object.number} viewBoxHeight height part of the viewBox attribute on svg
       * @param {Object.number} width width part of the svg tag if viewBox is not specified
       * @param {Object.number} height height part of the svg tag if viewBox is not specified
       * @return {fabric.Gradient} Gradient instance
       * @see http://www.w3.org/TR/SVG/pservers.html#LinearGradientElement
       * @see http://www.w3.org/TR/SVG/pservers.html#RadialGradientElement
       */
fromElement:function(t,i,n,s){var r=parseFloat(n)/(/%$/.test(n)?100:1);r=r<0?0:r>1?1:r,isNaN(r)&&(r=1);var a,o,l,A,c=t.getElementsByTagName("stop"),u="userSpaceOnUse"===t.getAttribute("gradientUnits")?"pixels":"percentage",h=t.getAttribute("gradientTransform")||"",d=[],g=0,p=0;for("linearGradient"===t.nodeName||"LINEARGRADIENT"===t.nodeName?(a="linear",o=function(e){return{x1:e.getAttribute("x1")||0,y1:e.getAttribute("y1")||0,x2:e.getAttribute("x2")||"100%",y2:e.getAttribute("y2")||0}}(t)):(a="radial",o=function(e){return{x1:e.getAttribute("fx")||e.getAttribute("cx")||"50%",y1:e.getAttribute("fy")||e.getAttribute("cy")||"50%",r1:0,x2:e.getAttribute("cx")||"50%",y2:e.getAttribute("cy")||"50%",r2:e.getAttribute("r")||"50%"}}(t)),l=c.length;l--;)d.push(e(c[l],r));return A=f.parseTransformAttribute(h),function(e,t,i,n){var s,r;Object.keys(t).forEach((function(e){"Infinity"===(s=t[e])?r=1:"-Infinity"===s?r=0:(r=parseFloat(t[e],10),"string"==typeof s&&/^(\d+\.\d+)%|(\d+)%$/.test(s)&&(r*=.01,"pixels"===n&&("x1"!==e&&"x2"!==e&&"r2"!==e||(r*=i.viewBoxWidth||i.width),"y1"!==e&&"y2"!==e||(r*=i.viewBoxHeight||i.height)))),t[e]=r}))}(0,o,s,u),"pixels"===u&&(g=-i.left,p=-i.top),new f.Gradient({id:t.getAttribute("id"),type:a,coords:o,colorStops:d,gradientUnits:u,gradientTransform:A,offsetX:g,offsetY:p})}
/* _FROM_SVG_END_ */})}(),A=f.util.toFixed,f.Pattern=f.util.createClass(
/** @lends fabric.Pattern.prototype */
{
/**
         * Repeat property of a pattern (one of repeat, repeat-x, repeat-y or no-repeat)
         * @type String
         * @default
         */
repeat:"repeat",
/**
         * Pattern horizontal offset from object's left/top corner
         * @type Number
         * @default
         */
offsetX:0,
/**
         * Pattern vertical offset from object's left/top corner
         * @type Number
         * @default
         */
offsetY:0,
/**
         * crossOrigin value (one of "", "anonymous", "use-credentials")
         * @see https://developer.mozilla.org/en-US/docs/HTML/CORS_settings_attributes
         * @type String
         * @default
         */
crossOrigin:"",
/**
         * transform matrix to change the pattern, imported from svgs.
         * @type Array
         * @default
         */
patternTransform:null,
/**
         * Constructor
         * @param {Object} [options] Options object
         * @param {Function} [callback] function to invoke after callback init.
         * @return {fabric.Pattern} thisArg
         */
initialize:function(e,t){if(e||(e={}),this.id=f.Object.__uid++,this.setOptions(e),!e.source||e.source&&"string"!=typeof e.source)t&&t(this);else{var i=this;this.source=f.util.createImage(),f.util.loadImage(e.source,(function(e,n){i.source=e,t&&t(i,n)}),null,this.crossOrigin)}},
/**
         * Returns object representation of a pattern
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} Object representation of a pattern instance
         */
toObject:function(e){var t,i,n=f.Object.NUM_FRACTION_DIGITS;return"string"==typeof this.source.src?t=this.source.src:"object"==typeof this.source&&this.source.toDataURL&&(t=this.source.toDataURL()),i={type:"pattern",source:t,repeat:this.repeat,crossOrigin:this.crossOrigin,offsetX:A(this.offsetX,n),offsetY:A(this.offsetY,n),patternTransform:this.patternTransform?this.patternTransform.concat():null},f.util.populateWithProperties(this,i,e),i},
/* _TO_SVG_START_ */
/**
         * Returns SVG representation of a pattern
         * @param {fabric.Object} object
         * @return {String} SVG representation of a pattern
         */
toSVG:function(e){var t="function"==typeof this.source?this.source():this.source,i=t.width/e.width,n=t.height/e.height,s=this.offsetX/e.width,r=this.offsetY/e.height,a="";return"repeat-x"!==this.repeat&&"no-repeat"!==this.repeat||(n=1,r&&(n+=Math.abs(r))),"repeat-y"!==this.repeat&&"no-repeat"!==this.repeat||(i=1,s&&(i+=Math.abs(s))),t.src?a=t.src:t.toDataURL&&(a=t.toDataURL()),'<pattern id="SVGID_'+this.id+'" x="'+s+'" y="'+r+'" width="'+i+'" height="'+n+'">\n<image x="0" y="0" width="'+t.width+'" height="'+t.height+'" xlink:href="'+a+'"></image>\n</pattern>\n'},
/* _TO_SVG_END_ */
setOptions:function(e){for(var t in e)this[t]=e[t]},
/**
         * Returns an instance of CanvasPattern
         * @param {CanvasRenderingContext2D} ctx Context to create pattern
         * @return {CanvasPattern}
         */
toLive:function(e){var t=this.source;if(!t)return"";if(void 0!==t.src){if(!t.complete)return"";if(0===t.naturalWidth||0===t.naturalHeight)return""}return e.createPattern(t,this.repeat)}}),function(e){var t=e.fabric||(e.fabric={}),i=t.util.toFixed;t.Shadow?t.warn("fabric.Shadow is already defined."):(t.Shadow=t.util.createClass(
/** @lends fabric.Shadow.prototype */
{
/**
         * Shadow color
         * @type String
         * @default
         */
color:"rgb(0,0,0)",
/**
         * Shadow blur
         * @type Number
         */
blur:0,
/**
         * Shadow horizontal offset
         * @type Number
         * @default
         */
offsetX:0,
/**
         * Shadow vertical offset
         * @type Number
         * @default
         */
offsetY:0,
/**
         * Whether the shadow should affect stroke operations
         * @type Boolean
         * @default
         */
affectStroke:!1,
/**
         * Indicates whether toObject should include default values
         * @type Boolean
         * @default
         */
includeDefaultValues:!0,
/**
         * When `false`, the shadow will scale with the object.
         * When `true`, the shadow's offsetX, offsetY, and blur will not be affected by the object's scale.
         * default to false
         * @type Boolean
         * @default
         */
nonScaling:!1,
/**
         * Constructor
         * @param {Object|String} [options] Options object with any of color, blur, offsetX, offsetY properties or string (e.g. "rgba(0,0,0,0.2) 2px 2px 10px")
         * @return {fabric.Shadow} thisArg
         */
initialize:function(e){for(var i in"string"==typeof e&&(e=this._parseShadow(e)),e)this[i]=e[i];this.id=t.Object.__uid++},
/**
         * @private
         * @param {String} shadow Shadow value to parse
         * @return {Object} Shadow object with color, offsetX, offsetY and blur
         */
_parseShadow:function(e){var i=e.trim(),n=t.Shadow.reOffsetsAndBlur.exec(i)||[];return{color:(i.replace(t.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)").trim(),offsetX:parseFloat(n[1],10)||0,offsetY:parseFloat(n[2],10)||0,blur:parseFloat(n[3],10)||0}},
/**
         * Returns a string representation of an instance
         * @see http://www.w3.org/TR/css-text-decor-3/#text-shadow
         * @return {String} Returns CSS3 text-shadow declaration
         */
toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},
/* _TO_SVG_START_ */
/**
         * Returns SVG representation of a shadow
         * @param {fabric.Object} object
         * @return {String} SVG representation of a shadow
         */
toSVG:function(e){var n=40,s=40,r=t.Object.NUM_FRACTION_DIGITS,a=t.util.rotateVector({x:this.offsetX,y:this.offsetY},t.util.degreesToRadians(-e.angle)),o=new t.Color(this.color);return e.width&&e.height&&(n=100*i((Math.abs(a.x)+this.blur)/e.width,r)+20,s=100*i((Math.abs(a.y)+this.blur)/e.height,r)+20),e.flipX&&(a.x*=-1),e.flipY&&(a.y*=-1),'<filter id="SVGID_'+this.id+'" y="-'+s+'%" height="'+(100+2*s)+'%" x="-'+n+'%" width="'+(100+2*n)+'%" >\n\t<feGaussianBlur in="SourceAlpha" stdDeviation="'+i(this.blur?this.blur/2:0,r)+'"></feGaussianBlur>\n\t<feOffset dx="'+i(a.x,r)+'" dy="'+i(a.y,r)+'" result="oBlur" ></feOffset>\n\t<feFlood flood-color="'+o.toRgb()+'" flood-opacity="'+o.getAlpha()+'"/>\n\t<feComposite in2="oBlur" operator="in" />\n\t<feMerge>\n\t\t<feMergeNode></feMergeNode>\n\t\t<feMergeNode in="SourceGraphic"></feMergeNode>\n\t</feMerge>\n</filter>\n'},
/* _TO_SVG_END_ */
/**
         * Returns object representation of a shadow
         * @return {Object} Object representation of a shadow instance
         */
toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling};var e={},i=t.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke","nonScaling"].forEach((function(t){this[t]!==i[t]&&(e[t]=this[t])}),this),e}}),t.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(\d+(?:\.\d*)?(?:px)?)?(?:\s?|$)(?:$|\s)/)}(e),function(){if(f.StaticCanvas)f.warn("fabric.StaticCanvas is already defined.");else{var e=f.util.object.extend,t=f.util.getElementOffset,i=f.util.removeFromArray,n=f.util.toFixed,s=f.util.transformPoint,r=f.util.invertTransform,a=f.util.getNodeCanvas,o=f.util.createCanvasElement,l=new Error("Could not initialize `canvas` element");f.StaticCanvas=f.util.createClass(f.CommonMethods,
/** @lends fabric.StaticCanvas.prototype */
{
/**
         * Constructor
         * @param {HTMLElement | String} el &lt;canvas> element to initialize instance on
         * @param {Object} [options] Options object
         * @return {Object} thisArg
         */
initialize:function(e,t){t||(t={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(e,t)},
/**
         * Background color of canvas instance.
         * Should be set via {@link fabric.StaticCanvas#setBackgroundColor}.
         * @type {(String|fabric.Pattern)}
         * @default
         */
backgroundColor:"",
/**
         * Background image of canvas instance.
         * since 2.4.0 image caching is active, please when putting an image as background, add to the
         * canvas property a reference to the canvas it is on. Otherwise the image cannot detect the zoom
         * vale. As an alternative you can disable image objectCaching
         * @type fabric.Image
         * @default
         */
backgroundImage:null,
/**
         * Overlay color of canvas instance.
         * Should be set via {@link fabric.StaticCanvas#setOverlayColor}
         * @since 1.3.9
         * @type {(String|fabric.Pattern)}
         * @default
         */
overlayColor:"",
/**
         * Overlay image of canvas instance.
         * since 2.4.0 image caching is active, please when putting an image as overlay, add to the
         * canvas property a reference to the canvas it is on. Otherwise the image cannot detect the zoom
         * vale. As an alternative you can disable image objectCaching
         * @type fabric.Image
         * @default
         */
overlayImage:null,
/**
         * Indicates whether toObject/toDatalessObject should include default values
         * if set to false, takes precedence over the object value.
         * @type Boolean
         * @default
         */
includeDefaultValues:!0,
/**
         * Indicates whether objects' state should be saved
         * @type Boolean
         * @default
         */
stateful:!1,
/**
         * Indicates whether {@link fabric.Collection.add}, {@link fabric.Collection.insertAt} and {@link fabric.Collection.remove},
         * {@link fabric.StaticCanvas.moveTo}, {@link fabric.StaticCanvas.clear} and many more, should also re-render canvas.
         * Disabling this option will not give a performance boost when adding/removing a lot of objects to/from canvas at once
         * since the renders are quequed and executed one per frame.
         * Disabling is suggested anyway and managing the renders of the app manually is not a big effort ( canvas.requestRenderAll() )
         * Left default to true to do not break documentation and old app, fiddles.
         * @type Boolean
         * @default
         */
renderOnAddRemove:!0,
/**
         * Indicates whether object controls (borders/controls) are rendered above overlay image
         * @type Boolean
         * @default
         */
controlsAboveOverlay:!1,
/**
         * Indicates whether the browser can be scrolled when using a touchscreen and dragging on the canvas
         * @type Boolean
         * @default
         */
allowTouchScrolling:!1,
/**
         * Indicates whether this canvas will use image smoothing, this is on by default in browsers
         * @type Boolean
         * @default
         */
imageSmoothingEnabled:!0,
/**
         * The transformation (a Canvas 2D API transform matrix) which focuses the viewport
         * @type Array
         * @example <caption>Default transform</caption>
         * canvas.viewportTransform = [1, 0, 0, 1, 0, 0];
         * @example <caption>Scale by 70% and translate toward bottom-right by 50, without skewing</caption>
         * canvas.viewportTransform = [0.7, 0, 0, 0.7, 50, 50];
         * @default
         */
viewportTransform:f.iMatrix.concat(),
/**
         * if set to false background image is not affected by viewport transform
         * @since 1.6.3
         * @type Boolean
         * @default
         */
backgroundVpt:!0,
/**
         * if set to false overlya image is not affected by viewport transform
         * @since 1.6.3
         * @type Boolean
         * @default
         */
overlayVpt:!0,
/**
         * When true, canvas is scaled by devicePixelRatio for better rendering on retina screens
         * @type Boolean
         * @default
         */
enableRetinaScaling:!0,
/**
         * Describe canvas element extension over design
         * properties are tl,tr,bl,br.
         * if canvas is not zoomed/panned those points are the four corner of canvas
         * if canvas is viewportTransformed you those points indicate the extension
         * of canvas element in plain untrasformed coordinates
         * The coordinates get updated with @method calcViewportBoundaries.
         * @memberOf fabric.StaticCanvas.prototype
         */
vptCoords:{},
/**
         * Based on vptCoords and object.aCoords, skip rendering of objects that
         * are not included in current viewport.
         * May greatly help in applications with crowded canvas and use of zoom/pan
         * If One of the corner of the bounding box of the object is on the canvas
         * the objects get rendered.
         * @memberOf fabric.StaticCanvas.prototype
         * @type Boolean
         * @default
         */
skipOffscreen:!0,
/**
         * a fabricObject that, without stroke define a clipping area with their shape. filled in black
         * the clipPath object gets used when the canvas has rendered, and the context is placed in the
         * top left corner of the canvas.
         * clipPath will clip away controls, if you do not want this to happen use controlsAboveOverlay = true
         * @type fabric.Object
         */
clipPath:void 0,
/**
         * @private
         * @param {HTMLElement | String} el &lt;canvas> element to initialize instance on
         * @param {Object} [options] Options object
         */
_initStatic:function(e,t){var i=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(e),this._initOptions(t),this.interactive||this._initRetinaScaling(),t.overlayImage&&this.setOverlayImage(t.overlayImage,i),t.backgroundImage&&this.setBackgroundImage(t.backgroundImage,i),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor,i),t.overlayColor&&this.setOverlayColor(t.overlayColor,i),this.calcOffset()},
/**
         * @private
         */
_isRetinaScaling:function(){return f.devicePixelRatio>1&&this.enableRetinaScaling},
/**
         * @private
         * @return {Number} retinaScaling if applied, otherwise 1;
         */
getRetinaScaling:function(){return this._isRetinaScaling()?Math.max(1,f.devicePixelRatio):1},
/**
         * @private
         */
_initRetinaScaling:function(){if(this._isRetinaScaling()){var e=f.devicePixelRatio;this.__initRetinaScaling(e,this.lowerCanvasEl,this.contextContainer),this.upperCanvasEl&&this.__initRetinaScaling(e,this.upperCanvasEl,this.contextTop)}},__initRetinaScaling:function(e,t,i){t.setAttribute("width",this.width*e),t.setAttribute("height",this.height*e),i.scale(e,e)},
/**
         * Calculates canvas element offset relative to the document
         * This method is also attached as "resize" event handler of window
         * @return {fabric.Canvas} instance
         * @chainable
         */
calcOffset:function(){return this._offset=t(this.lowerCanvasEl),this},
/**
         * Sets {@link fabric.StaticCanvas#overlayImage|overlay image} for this canvas
         * @param {(fabric.Image|String)} image fabric.Image instance or URL of an image to set overlay to
         * @param {Function} callback callback to invoke when image is loaded and set as an overlay
         * @param {Object} [options] Optional options to set for the {@link fabric.Image|overlay image}.
         * @return {fabric.Canvas} thisArg
         * @chainable
         * @see {@link http://jsfiddle.net/fabricjs/MnzHT/|jsFiddle demo}
         * @example <caption>Normal overlayImage with left/top = 0</caption>
         * canvas.setOverlayImage('http://fabricjs.com/assets/jail_cell_bars.png', canvas.renderAll.bind(canvas), {
         *   // Needed to position overlayImage at 0/0
         *   originX: 'left',
         *   originY: 'top'
         * });
         * @example <caption>overlayImage with different properties</caption>
         * canvas.setOverlayImage('http://fabricjs.com/assets/jail_cell_bars.png', canvas.renderAll.bind(canvas), {
         *   opacity: 0.5,
         *   angle: 45,
         *   left: 400,
         *   top: 400,
         *   originX: 'left',
         *   originY: 'top'
         * });
         * @example <caption>Stretched overlayImage #1 - width/height correspond to canvas width/height</caption>
         * fabric.Image.fromURL('http://fabricjs.com/assets/jail_cell_bars.png', function(img, isError) {
         *    img.set({width: canvas.width, height: canvas.height, originX: 'left', originY: 'top'});
         *    canvas.setOverlayImage(img, canvas.renderAll.bind(canvas));
         * });
         * @example <caption>Stretched overlayImage #2 - width/height correspond to canvas width/height</caption>
         * canvas.setOverlayImage('http://fabricjs.com/assets/jail_cell_bars.png', canvas.renderAll.bind(canvas), {
         *   width: canvas.width,
         *   height: canvas.height,
         *   // Needed to position overlayImage at 0/0
         *   originX: 'left',
         *   originY: 'top'
         * });
         * @example <caption>overlayImage loaded from cross-origin</caption>
         * canvas.setOverlayImage('http://fabricjs.com/assets/jail_cell_bars.png', canvas.renderAll.bind(canvas), {
         *   opacity: 0.5,
         *   angle: 45,
         *   left: 400,
         *   top: 400,
         *   originX: 'left',
         *   originY: 'top',
         *   crossOrigin: 'anonymous'
         * });
         */
setOverlayImage:function(e,t,i){return this.__setBgOverlayImage("overlayImage",e,t,i)},
/**
         * Sets {@link fabric.StaticCanvas#backgroundImage|background image} for this canvas
         * @param {(fabric.Image|String)} image fabric.Image instance or URL of an image to set background to
         * @param {Function} callback Callback to invoke when image is loaded and set as background
         * @param {Object} [options] Optional options to set for the {@link fabric.Image|background image}.
         * @return {fabric.Canvas} thisArg
         * @chainable
         * @see {@link http://jsfiddle.net/djnr8o7a/28/|jsFiddle demo}
         * @example <caption>Normal backgroundImage with left/top = 0</caption>
         * canvas.setBackgroundImage('http://fabricjs.com/assets/honey_im_subtle.png', canvas.renderAll.bind(canvas), {
         *   // Needed to position backgroundImage at 0/0
         *   originX: 'left',
         *   originY: 'top'
         * });
         * @example <caption>backgroundImage with different properties</caption>
         * canvas.setBackgroundImage('http://fabricjs.com/assets/honey_im_subtle.png', canvas.renderAll.bind(canvas), {
         *   opacity: 0.5,
         *   angle: 45,
         *   left: 400,
         *   top: 400,
         *   originX: 'left',
         *   originY: 'top'
         * });
         * @example <caption>Stretched backgroundImage #1 - width/height correspond to canvas width/height</caption>
         * fabric.Image.fromURL('http://fabricjs.com/assets/honey_im_subtle.png', function(img, isError) {
         *    img.set({width: canvas.width, height: canvas.height, originX: 'left', originY: 'top'});
         *    canvas.setBackgroundImage(img, canvas.renderAll.bind(canvas));
         * });
         * @example <caption>Stretched backgroundImage #2 - width/height correspond to canvas width/height</caption>
         * canvas.setBackgroundImage('http://fabricjs.com/assets/honey_im_subtle.png', canvas.renderAll.bind(canvas), {
         *   width: canvas.width,
         *   height: canvas.height,
         *   // Needed to position backgroundImage at 0/0
         *   originX: 'left',
         *   originY: 'top'
         * });
         * @example <caption>backgroundImage loaded from cross-origin</caption>
         * canvas.setBackgroundImage('http://fabricjs.com/assets/honey_im_subtle.png', canvas.renderAll.bind(canvas), {
         *   opacity: 0.5,
         *   angle: 45,
         *   left: 400,
         *   top: 400,
         *   originX: 'left',
         *   originY: 'top',
         *   crossOrigin: 'anonymous'
         * });
         */
// TODO: fix stretched examples
setBackgroundImage:function(e,t,i){return this.__setBgOverlayImage("backgroundImage",e,t,i)},
/**
         * Sets {@link fabric.StaticCanvas#overlayColor|foreground color} for this canvas
         * @param {(String|fabric.Pattern)} overlayColor Color or pattern to set foreground color to
         * @param {Function} callback Callback to invoke when foreground color is set
         * @return {fabric.Canvas} thisArg
         * @chainable
         * @see {@link http://jsfiddle.net/fabricjs/pB55h/|jsFiddle demo}
         * @example <caption>Normal overlayColor - color value</caption>
         * canvas.setOverlayColor('rgba(255, 73, 64, 0.6)', canvas.renderAll.bind(canvas));
         * @example <caption>fabric.Pattern used as overlayColor</caption>
         * canvas.setOverlayColor({
         *   source: 'http://fabricjs.com/assets/escheresque_ste.png'
         * }, canvas.renderAll.bind(canvas));
         * @example <caption>fabric.Pattern used as overlayColor with repeat and offset</caption>
         * canvas.setOverlayColor({
         *   source: 'http://fabricjs.com/assets/escheresque_ste.png',
         *   repeat: 'repeat',
         *   offsetX: 200,
         *   offsetY: 100
         * }, canvas.renderAll.bind(canvas));
         */
setOverlayColor:function(e,t){return this.__setBgOverlayColor("overlayColor",e,t)},
/**
         * Sets {@link fabric.StaticCanvas#backgroundColor|background color} for this canvas
         * @param {(String|fabric.Pattern)} backgroundColor Color or pattern to set background color to
         * @param {Function} callback Callback to invoke when background color is set
         * @return {fabric.Canvas} thisArg
         * @chainable
         * @see {@link http://jsfiddle.net/fabricjs/hXzvk/|jsFiddle demo}
         * @example <caption>Normal backgroundColor - color value</caption>
         * canvas.setBackgroundColor('rgba(255, 73, 64, 0.6)', canvas.renderAll.bind(canvas));
         * @example <caption>fabric.Pattern used as backgroundColor</caption>
         * canvas.setBackgroundColor({
         *   source: 'http://fabricjs.com/assets/escheresque_ste.png'
         * }, canvas.renderAll.bind(canvas));
         * @example <caption>fabric.Pattern used as backgroundColor with repeat and offset</caption>
         * canvas.setBackgroundColor({
         *   source: 'http://fabricjs.com/assets/escheresque_ste.png',
         *   repeat: 'repeat',
         *   offsetX: 200,
         *   offsetY: 100
         * }, canvas.renderAll.bind(canvas));
         */
setBackgroundColor:function(e,t){return this.__setBgOverlayColor("backgroundColor",e,t)},
/**
         * @private
         * @param {String} property Property to set ({@link fabric.StaticCanvas#backgroundImage|backgroundImage}
         * or {@link fabric.StaticCanvas#overlayImage|overlayImage})
         * @param {(fabric.Image|String|null)} image fabric.Image instance, URL of an image or null to set background or overlay to
         * @param {Function} callback Callback to invoke when image is loaded and set as background or overlay. The first argument is the created image, the second argument is a flag indicating whether an error occurred or not.
         * @param {Object} [options] Optional options to set for the {@link fabric.Image|image}.
         */
__setBgOverlayImage:function(e,t,i,n){return"string"==typeof t?f.util.loadImage(t,(function(t,s){if(t){var r=new f.Image(t,n);this[e]=r,r.canvas=this}i&&i(t,s)}),this,n&&n.crossOrigin):(n&&t.setOptions(n),this[e]=t,t&&(t.canvas=this),i&&i(t,!1)),this},
/**
         * @private
         * @param {String} property Property to set ({@link fabric.StaticCanvas#backgroundColor|backgroundColor}
         * or {@link fabric.StaticCanvas#overlayColor|overlayColor})
         * @param {(Object|String|null)} color Object with pattern information, color value or null
         * @param {Function} [callback] Callback is invoked when color is set
         */
__setBgOverlayColor:function(e,t,i){return this[e]=t,this._initGradient(t,e),this._initPattern(t,e,i),this},
/**
         * @private
         */
_createCanvasElement:function(){var e=o();if(!e)throw l;if(e.style||(e.style={}),void 0===e.getContext)throw l;return e},
/**
         * @private
         * @param {Object} [options] Options object
         */
_initOptions:function(e){var t=this.lowerCanvasEl;this._setOptions(e),this.width=this.width||parseInt(t.width,10)||0,this.height=this.height||parseInt(t.height,10)||0,this.lowerCanvasEl.style&&(t.width=this.width,t.height=this.height,t.style.width=this.width+"px",t.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},
/**
         * Creates a bottom canvas
         * @private
         * @param {HTMLElement} [canvasEl]
         */
_createLowerCanvas:function(e){e&&e.getContext?this.lowerCanvasEl=e:this.lowerCanvasEl=f.util.getById(e)||this._createCanvasElement(),f.util.addClass(this.lowerCanvasEl,"lower-canvas"),this._originalCanvasStyle=this.lowerCanvasEl.style,this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},
/**
         * Returns canvas width (in px)
         * @return {Number}
         */
getWidth:function(){return this.width},
/**
         * Returns canvas height (in px)
         * @return {Number}
         */
getHeight:function(){return this.height},
/**
         * Sets width of this canvas instance
         * @param {Number|String} value                         Value to set width to
         * @param {Object}        [options]                     Options object
         * @param {Boolean}       [options.backstoreOnly=false] Set the given dimensions only as canvas backstore dimensions
         * @param {Boolean}       [options.cssOnly=false]       Set the given dimensions only as css dimensions
         * @return {fabric.Canvas} instance
         * @chainable true
         */
setWidth:function(e,t){return this.setDimensions({width:e},t)},
/**
         * Sets height of this canvas instance
         * @param {Number|String} value                         Value to set height to
         * @param {Object}        [options]                     Options object
         * @param {Boolean}       [options.backstoreOnly=false] Set the given dimensions only as canvas backstore dimensions
         * @param {Boolean}       [options.cssOnly=false]       Set the given dimensions only as css dimensions
         * @return {fabric.Canvas} instance
         * @chainable true
         */
setHeight:function(e,t){return this.setDimensions({height:e},t)},
/**
         * Sets dimensions (width, height) of this canvas instance. when options.cssOnly flag active you should also supply the unit of measure (px/%/em)
         * @param {Object}        dimensions                    Object with width/height properties
         * @param {Number|String} [dimensions.width]            Width of canvas element
         * @param {Number|String} [dimensions.height]           Height of canvas element
         * @param {Object}        [options]                     Options object
         * @param {Boolean}       [options.backstoreOnly=false] Set the given dimensions only as canvas backstore dimensions
         * @param {Boolean}       [options.cssOnly=false]       Set the given dimensions only as css dimensions
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
setDimensions:function(e,t){var i;for(var n in t=t||{},e)i=e[n],t.cssOnly||(this._setBackstoreDimension(n,e[n]),i+="px",this.hasLostContext=!0),t.backstoreOnly||this._setCssDimension(n,i);return this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(this.contextTop),this._initRetinaScaling(),this.calcOffset(),t.cssOnly||this.requestRenderAll(),this},
/**
         * Helper for setting width/height
         * @private
         * @param {String} prop property (width|height)
         * @param {Number} value value to set property to
         * @return {fabric.Canvas} instance
         * @chainable true
         */
_setBackstoreDimension:function(e,t){return this.lowerCanvasEl[e]=t,this.upperCanvasEl&&(this.upperCanvasEl[e]=t),this.cacheCanvasEl&&(this.cacheCanvasEl[e]=t),this[e]=t,this},
/**
         * Helper for setting css width/height
         * @private
         * @param {String} prop property (width|height)
         * @param {String} value value to set property to
         * @return {fabric.Canvas} instance
         * @chainable true
         */
_setCssDimension:function(e,t){return this.lowerCanvasEl.style[e]=t,this.upperCanvasEl&&(this.upperCanvasEl.style[e]=t),this.wrapperEl&&(this.wrapperEl.style[e]=t),this},
/**
         * Returns canvas zoom level
         * @return {Number}
         */
getZoom:function(){return this.viewportTransform[0]},
/**
         * Sets viewport transformation of this canvas instance
         * @param {Array} vpt a Canvas 2D API transform matrix
         * @return {fabric.Canvas} instance
         * @chainable true
         */
setViewportTransform:function(e){var t,i,n,s=this._activeObject,r=this.backgroundImage,a=this.overlayImage;for(this.viewportTransform=e,i=0,n=this._objects.length;i<n;i++)(t=this._objects[i]).group||t.setCoords(!0);return s&&s.setCoords(),r&&r.setCoords(!0),a&&a.setCoords(!0),this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll(),this},
/**
         * Sets zoom level of this canvas instance, the zoom centered around point
         * meaning that following zoom to point with the same point will have the visual
         * effect of the zoom originating from that point. The point won't move.
         * It has nothing to do with canvas center or visual center of the viewport.
         * @param {fabric.Point} point to zoom with respect to
         * @param {Number} value to set zoom to, less than 1 zooms out
         * @return {fabric.Canvas} instance
         * @chainable true
         */
zoomToPoint:function(e,t){var i=e,n=this.viewportTransform.slice(0);e=s(e,r(this.viewportTransform)),n[0]=t,n[3]=t;var a=s(e,n);return n[4]+=i.x-a.x,n[5]+=i.y-a.y,this.setViewportTransform(n)},
/**
         * Sets zoom level of this canvas instance
         * @param {Number} value to set zoom to, less than 1 zooms out
         * @return {fabric.Canvas} instance
         * @chainable true
         */
setZoom:function(e){return this.zoomToPoint(new f.Point(0,0),e),this},
/**
         * Pan viewport so as to place point at top left corner of canvas
         * @param {fabric.Point} point to move to
         * @return {fabric.Canvas} instance
         * @chainable true
         */
absolutePan:function(e){var t=this.viewportTransform.slice(0);return t[4]=-e.x,t[5]=-e.y,this.setViewportTransform(t)},
/**
         * Pans viewpoint relatively
         * @param {fabric.Point} point (position vector) to move by
         * @return {fabric.Canvas} instance
         * @chainable true
         */
relativePan:function(e){return this.absolutePan(new f.Point(-e.x-this.viewportTransform[4],-e.y-this.viewportTransform[5]))},
/**
         * Returns &lt;canvas> element corresponding to this instance
         * @return {HTMLCanvasElement}
         */
getElement:function(){return this.lowerCanvasEl},
/**
         * @private
         * @param {fabric.Object} obj Object that was added
         */
_onObjectAdded:function(e){this.stateful&&e.setupState(),e._set("canvas",this),e.setCoords(),this.fire("object:added",{target:e}),e.fire("added")},
/**
         * @private
         * @param {fabric.Object} obj Object that was removed
         */
_onObjectRemoved:function(e){this.fire("object:removed",{target:e}),e.fire("removed"),delete e.canvas},
/**
         * Clears specified context of canvas element
         * @param {CanvasRenderingContext2D} ctx Context to clear
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
clearContext:function(e){return e.clearRect(0,0,this.width,this.height),this},
/**
         * Returns context of canvas where objects are drawn
         * @return {CanvasRenderingContext2D}
         */
getContext:function(){return this.contextContainer},
/**
         * Clears all contexts (background, main, top) of an instance
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
clear:function(){return this.remove.apply(this,this.getObjects()),this.backgroundImage=null,this.overlayImage=null,this.backgroundColor="",this.overlayColor="",this._hasITextHandlers&&(this.off("mouse:up",this._mouseUpITextHandler),this._iTextInstances=null,this._hasITextHandlers=!1),this.clearContext(this.contextContainer),this.fire("canvas:cleared"),this.renderOnAddRemove&&this.requestRenderAll(),this},
/**
         * Renders the canvas
         * @return {fabric.Canvas} instance
         * @chainable
         */
renderAll:function(){var e=this.contextContainer;return this.renderCanvas(e,this._objects),this},
/**
         * Function created to be instance bound at initialization
         * used in requestAnimationFrame rendering
         * Let the fabricJS call it. If you call it manually you could have more
         * animationFrame stacking on to of each other
         * for an imperative rendering, use canvas.renderAll
         * @private
         * @return {fabric.Canvas} instance
         * @chainable
         */
renderAndReset:function(){this.isRendering=0,this.renderAll()},
/**
         * Append a renderAll request to next animation frame.
         * unless one is already in progress, in that case nothing is done
         * a boolean flag will avoid appending more.
         * @return {fabric.Canvas} instance
         * @chainable
         */
requestRenderAll:function(){return this.isRendering||(this.isRendering=f.util.requestAnimFrame(this.renderAndResetBound)),this},
/**
         * Calculate the position of the 4 corner of canvas with current viewportTransform.
         * helps to determinate when an object is in the current rendering viewport using
         * object absolute coordinates ( aCoords )
         * @return {Object} points.tl
         * @chainable
         */
calcViewportBoundaries:function(){var e={},t=this.width,i=this.height,n=r(this.viewportTransform);return e.tl=s({x:0,y:0},n),e.br=s({x:t,y:i},n),e.tr=new f.Point(e.br.x,e.tl.y),e.bl=new f.Point(e.tl.x,e.br.y),this.vptCoords=e,e},cancelRequestedRender:function(){this.isRendering&&(f.util.cancelAnimFrame(this.isRendering),this.isRendering=0)},
/**
         * Renders background, objects, overlay and controls.
         * @param {CanvasRenderingContext2D} ctx
         * @param {Array} objects to render
         * @return {fabric.Canvas} instance
         * @chainable
         */
renderCanvas:function(e,t){var i=this.viewportTransform,n=this.clipPath;this.cancelRequestedRender(),this.calcViewportBoundaries(),this.clearContext(e),f.util.setImageSmoothing(e,this.imageSmoothingEnabled),this.fire("before:render",{ctx:e}),this._renderBackground(e),e.save(),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),this._renderObjects(e,t),e.restore(),!this.controlsAboveOverlay&&this.interactive&&this.drawControls(e),n&&(n.canvas=this,n.shouldCache(),n._transformDone=!0,n.renderCache({forClipping:!0}),this.drawClipPathOnCanvas(e)),this._renderOverlay(e),this.controlsAboveOverlay&&this.interactive&&this.drawControls(e),this.fire("after:render",{ctx:e})},
/**
         * Paint the cached clipPath on the lowerCanvasEl
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
drawClipPathOnCanvas:function(e){var t=this.viewportTransform,i=this.clipPath;e.save(),e.transform(t[0],t[1],t[2],t[3],t[4],t[5]),e.globalCompositeOperation="destination-in",i.transform(e),e.scale(1/i.zoomX,1/i.zoomY),e.drawImage(i._cacheCanvas,-i.cacheTranslationX,-i.cacheTranslationY),e.restore()},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {Array} objects to render
         */
_renderObjects:function(e,t){var i,n;for(i=0,n=t.length;i<n;++i)t[i]&&t[i].render(e)},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {string} property 'background' or 'overlay'
         */
_renderBackgroundOrOverlay:function(e,t){var i=this[t+"Color"],n=this[t+"Image"],s=this.viewportTransform,r=this[t+"Vpt"];if(i||n){if(i){e.save(),e.beginPath(),e.moveTo(0,0),e.lineTo(this.width,0),e.lineTo(this.width,this.height),e.lineTo(0,this.height),e.closePath(),e.fillStyle=i.toLive?i.toLive(e,this):i,r&&e.transform(s[0],s[1],s[2],s[3],s[4],s[5]),e.transform(1,0,0,1,i.offsetX||0,i.offsetY||0);var a=i.gradientTransform||i.patternTransform;a&&e.transform(a[0],a[1],a[2],a[3],a[4],a[5]),e.fill(),e.restore()}n&&(e.save(),r&&e.transform(s[0],s[1],s[2],s[3],s[4],s[5]),n.render(e),e.restore())}},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_renderBackground:function(e){this._renderBackgroundOrOverlay(e,"background")},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_renderOverlay:function(e){this._renderBackgroundOrOverlay(e,"overlay")},
/**
         * Returns coordinates of a center of canvas.
         * Returned value is an object with top and left properties
         * @return {Object} object with "top" and "left" number values
         */
getCenter:function(){return{top:this.height/2,left:this.width/2}},
/**
         * Centers object horizontally in the canvas
         * @param {fabric.Object} object Object to center horizontally
         * @return {fabric.Canvas} thisArg
         */
centerObjectH:function(e){return this._centerObject(e,new f.Point(this.getCenter().left,e.getCenterPoint().y))},
/**
         * Centers object vertically in the canvas
         * @param {fabric.Object} object Object to center vertically
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
centerObjectV:function(e){return this._centerObject(e,new f.Point(e.getCenterPoint().x,this.getCenter().top))},
/**
         * Centers object vertically and horizontally in the canvas
         * @param {fabric.Object} object Object to center vertically and horizontally
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
centerObject:function(e){var t=this.getCenter();return this._centerObject(e,new f.Point(t.left,t.top))},
/**
         * Centers object vertically and horizontally in the viewport
         * @param {fabric.Object} object Object to center vertically and horizontally
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
viewportCenterObject:function(e){var t=this.getVpCenter();return this._centerObject(e,t)},
/**
         * Centers object horizontally in the viewport, object.top is unchanged
         * @param {fabric.Object} object Object to center vertically and horizontally
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
viewportCenterObjectH:function(e){var t=this.getVpCenter();return this._centerObject(e,new f.Point(t.x,e.getCenterPoint().y)),this},
/**
         * Centers object Vertically in the viewport, object.top is unchanged
         * @param {fabric.Object} object Object to center vertically and horizontally
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
viewportCenterObjectV:function(e){var t=this.getVpCenter();return this._centerObject(e,new f.Point(e.getCenterPoint().x,t.y))},
/**
         * Calculate the point in canvas that correspond to the center of actual viewport.
         * @return {fabric.Point} vpCenter, viewport center
         * @chainable
         */
getVpCenter:function(){var e=this.getCenter(),t=r(this.viewportTransform);return s({x:e.left,y:e.top},t)},
/**
         * @private
         * @param {fabric.Object} object Object to center
         * @param {fabric.Point} center Center point
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
_centerObject:function(e,t){return e.setPositionByOrigin(t,"center","center"),e.setCoords(),this.renderOnAddRemove&&this.requestRenderAll(),this},
/**
         * Returns dataless JSON representation of canvas
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {String} json string
         */
toDatalessJSON:function(e){return this.toDatalessObject(e)},
/**
         * Returns object representation of canvas
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} object representation of an instance
         */
toObject:function(e){return this._toObjectMethod("toObject",e)},
/**
         * Returns dataless object representation of canvas
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} object representation of an instance
         */
toDatalessObject:function(e){return this._toObjectMethod("toDatalessObject",e)},
/**
         * @private
         */
_toObjectMethod:function(t,i){var n=this.clipPath,s={version:f.version,objects:this._toObjects(t,i)};return n&&!n.excludeFromExport&&(s.clipPath=this._toObject(this.clipPath,t,i)),e(s,this.__serializeBgOverlay(t,i)),f.util.populateWithProperties(this,s,i),s},
/**
         * @private
         */
_toObjects:function(e,t){return this._objects.filter((function(e){return!e.excludeFromExport})).map((function(i){return this._toObject(i,e,t)}),this)},
/**
         * @private
         */
_toObject:function(e,t,i){var n;this.includeDefaultValues||(n=e.includeDefaultValues,e.includeDefaultValues=!1);var s=e[t](i);return this.includeDefaultValues||(e.includeDefaultValues=n),s},
/**
         * @private
         */
__serializeBgOverlay:function(e,t){var i={},n=this.backgroundImage,s=this.overlayImage,r=this.backgroundColor,a=this.overlayColor;return r&&r.toObject?r.excludeFromExport||(i.background=r.toObject(t)):r&&(i.background=r),a&&a.toObject?a.excludeFromExport||(i.overlay=a.toObject(t)):a&&(i.overlay=a),n&&!n.excludeFromExport&&(i.backgroundImage=this._toObject(n,e,t)),s&&!s.excludeFromExport&&(i.overlayImage=this._toObject(s,e,t)),i},
/* _TO_SVG_START_ */
/**
         * When true, getSvgTransform() will apply the StaticCanvas.viewportTransform to the SVG transformation. When true,
         * a zoomed canvas will then produce zoomed SVG output.
         * @type Boolean
         * @default
         */
svgViewportTransformation:!0,
/**
         * Returns SVG representation of canvas
         * @function
         * @param {Object} [options] Options object for SVG output
         * @param {Boolean} [options.suppressPreamble=false] If true xml tag is not included
         * @param {Object} [options.viewBox] SVG viewbox object
         * @param {Number} [options.viewBox.x] x-coordinate of viewbox
         * @param {Number} [options.viewBox.y] y-coordinate of viewbox
         * @param {Number} [options.viewBox.width] Width of viewbox
         * @param {Number} [options.viewBox.height] Height of viewbox
         * @param {String} [options.encoding=UTF-8] Encoding of SVG output
         * @param {String} [options.width] desired width of svg with or without units
         * @param {String} [options.height] desired height of svg with or without units
         * @param {Function} [reviver] Method for further parsing of svg elements, called after each fabric object converted into svg representation.
         * @return {String} SVG string
         * @tutorial {@link http://fabricjs.com/fabric-intro-part-3#serialization}
         * @see {@link http://jsfiddle.net/fabricjs/jQ3ZZ/|jsFiddle demo}
         * @example <caption>Normal SVG output</caption>
         * var svg = canvas.toSVG();
         * @example <caption>SVG output without preamble (without &lt;?xml ../>)</caption>
         * var svg = canvas.toSVG({suppressPreamble: true});
         * @example <caption>SVG output with viewBox attribute</caption>
         * var svg = canvas.toSVG({
         *   viewBox: {
         *     x: 100,
         *     y: 100,
         *     width: 200,
         *     height: 300
         *   }
         * });
         * @example <caption>SVG output with different encoding (default: UTF-8)</caption>
         * var svg = canvas.toSVG({encoding: 'ISO-8859-1'});
         * @example <caption>Modify SVG output with reviver function</caption>
         * var svg = canvas.toSVG(null, function(svg) {
         *   return svg.replace('stroke-dasharray: ; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; ', '');
         * });
         */
toSVG:function(e,t){e||(e={}),e.reviver=t;var i=[];return this._setSVGPreamble(i,e),this._setSVGHeader(i,e),this.clipPath&&i.push('<g clip-path="url(#'+this.clipPath.clipPathId+')" >\n'),this._setSVGBgOverlayColor(i,"background"),this._setSVGBgOverlayImage(i,"backgroundImage",t),this._setSVGObjects(i,t),this.clipPath&&i.push("</g>\n"),this._setSVGBgOverlayColor(i,"overlay"),this._setSVGBgOverlayImage(i,"overlayImage",t),i.push("</svg>"),i.join("")},
/**
         * @private
         */
_setSVGPreamble:function(e,t){t.suppressPreamble||e.push('<?xml version="1.0" encoding="',t.encoding||"UTF-8",'" standalone="no" ?>\n','<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" ','"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')},
/**
         * @private
         */
_setSVGHeader:function(e,t){var i,s=t.width||this.width,r=t.height||this.height,a='viewBox="0 0 '+this.width+" "+this.height+'" ',o=f.Object.NUM_FRACTION_DIGITS;t.viewBox?a='viewBox="'+t.viewBox.x+" "+t.viewBox.y+" "+t.viewBox.width+" "+t.viewBox.height+'" ':this.svgViewportTransformation&&(i=this.viewportTransform,a='viewBox="'+n(-i[4]/i[0],o)+" "+n(-i[5]/i[3],o)+" "+n(this.width/i[0],o)+" "+n(this.height/i[3],o)+'" '),e.push("<svg ",'xmlns="http://www.w3.org/2000/svg" ','xmlns:xlink="http://www.w3.org/1999/xlink" ','version="1.1" ','width="',s,'" ','height="',r,'" ',a,'xml:space="preserve">\n',"<desc>Created with Fabric.js ",f.version,"</desc>\n","<defs>\n",this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),this.createSVGClipPathMarkup(t),"</defs>\n")},createSVGClipPathMarkup:function(e){var t=this.clipPath;return t?(t.clipPathId="CLIPPATH_"+f.Object.__uid++,'<clipPath id="'+t.clipPathId+'" >\n'+this.clipPath.toClipPathSVG(e.reviver)+"</clipPath>\n"):""},
/**
         * Creates markup containing SVG referenced elements like patterns, gradients etc.
         * @return {String}
         */
createSVGRefElementsMarkup:function(){var e=this;return["background","overlay"].map((function(t){var i=e[t+"Color"];if(i&&i.toLive){var n=e[t+"Vpt"],s=e.viewportTransform,r={width:e.width/(n?s[0]:1),height:e.height/(n?s[3]:1)};return i.toSVG(r,{additionalTransform:n?f.util.matrixToSVG(s):""})}})).join("")},
/**
         * Creates markup containing SVG font faces,
         * font URLs for font faces must be collected by developers
         * and are not extracted from the DOM by fabricjs
         * @param {Array} objects Array of fabric objects
         * @return {String}
         */
createSVGFontFacesMarkup:function(){var e,t,i,n,s,r,a,o,l="",A={},c=f.fontPaths,u=[];for(this._objects.forEach((function e(t){u.push(t),t._objects&&t._objects.forEach(e)})),a=0,o=u.length;a<o;a++)if(t=(e=u[a]).fontFamily,-1!==e.type.indexOf("text")&&!A[t]&&c[t]&&(A[t]=!0,e.styles))for(s in i=e.styles)for(r in n=i[s])!A[t=n[r].fontFamily]&&c[t]&&(A[t]=!0);for(var h in A)l+=["\t\t@font-face {\n","\t\t\tfont-family: '",h,"';\n","\t\t\tsrc: url('",c[h],"');\n","\t\t}\n"].join("");return l&&(l=['\t<style type="text/css">',"<![CDATA[\n",l,"]]>","</style>\n"].join("")),l},
/**
         * @private
         */
_setSVGObjects:function(e,t){var i,n,s,r=this._objects;for(n=0,s=r.length;n<s;n++)(i=r[n]).excludeFromExport||this._setSVGObject(e,i,t)},
/**
         * @private
         */
_setSVGObject:function(e,t,i){e.push(t.toSVG(i))},
/**
         * @private
         */
_setSVGBgOverlayImage:function(e,t,i){this[t]&&!this[t].excludeFromExport&&this[t].toSVG&&e.push(this[t].toSVG(i))},
/**
         * @private
         */
_setSVGBgOverlayColor:function(e,t){var i=this[t+"Color"],n=this.viewportTransform,s=this.width,r=this.height;if(i)if(i.toLive){var a=i.repeat,o=f.util.invertTransform(n),l=this[t+"Vpt"]?f.util.matrixToSVG(o):"";e.push('<rect transform="'+l+" translate(",s/2,",",r/2,')"',' x="',i.offsetX-s/2,'" y="',i.offsetY-r/2,'" ','width="',"repeat-y"===a||"no-repeat"===a?i.source.width:s,'" height="',"repeat-x"===a||"no-repeat"===a?i.source.height:r,'" fill="url(#SVGID_'+i.id+')"',"></rect>\n")}else e.push('<rect x="0" y="0" width="100%" height="100%" ','fill="',i,'"',"></rect>\n")},
/* _TO_SVG_END_ */
/**
         * Moves an object or the objects of a multiple selection
         * to the bottom of the stack of drawn objects
         * @param {fabric.Object} object Object to send to back
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
sendToBack:function(e){if(!e)return this;var t,n,s,r=this._activeObject;if(e===r&&"activeSelection"===e.type)for(t=(s=r._objects).length;t--;)n=s[t],i(this._objects,n),this._objects.unshift(n);else i(this._objects,e),this._objects.unshift(e);return this.renderOnAddRemove&&this.requestRenderAll(),this},
/**
         * Moves an object or the objects of a multiple selection
         * to the top of the stack of drawn objects
         * @param {fabric.Object} object Object to send
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
bringToFront:function(e){if(!e)return this;var t,n,s,r=this._activeObject;if(e===r&&"activeSelection"===e.type)for(s=r._objects,t=0;t<s.length;t++)n=s[t],i(this._objects,n),this._objects.push(n);else i(this._objects,e),this._objects.push(e);return this.renderOnAddRemove&&this.requestRenderAll(),this},
/**
         * Moves an object or a selection down in stack of drawn objects
         * An optional parameter, intersecting allows to move the object in behind
         * the first intersecting object. Where intersection is calculated with
         * bounding box. If no intersection is found, there will not be change in the
         * stack.
         * @param {fabric.Object} object Object to send
         * @param {Boolean} [intersecting] If `true`, send object behind next lower intersecting object
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
sendBackwards:function(e,t){if(!e)return this;var n,s,r,a,o,l=this._activeObject,A=0;if(e===l&&"activeSelection"===e.type)for(o=l._objects,n=0;n<o.length;n++)s=o[n],(r=this._objects.indexOf(s))>0+A&&(a=r-1,i(this._objects,s),this._objects.splice(a,0,s)),A++;else 0!==(r=this._objects.indexOf(e))&&(a=this._findNewLowerIndex(e,r,t),i(this._objects,e),this._objects.splice(a,0,e));return this.renderOnAddRemove&&this.requestRenderAll(),this},
/**
         * @private
         */
_findNewLowerIndex:function(e,t,i){var n,s;if(i)for(n=t,s=t-1;s>=0;--s){if(e.intersectsWithObject(this._objects[s])||e.isContainedWithinObject(this._objects[s])||this._objects[s].isContainedWithinObject(e)){n=s;break}}else n=t-1;return n},
/**
         * Moves an object or a selection up in stack of drawn objects
         * An optional parameter, intersecting allows to move the object in front
         * of the first intersecting object. Where intersection is calculated with
         * bounding box. If no intersection is found, there will not be change in the
         * stack.
         * @param {fabric.Object} object Object to send
         * @param {Boolean} [intersecting] If `true`, send object in front of next upper intersecting object
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
bringForward:function(e,t){if(!e)return this;var n,s,r,a,o,l=this._activeObject,A=0;if(e===l&&"activeSelection"===e.type)for(n=(o=l._objects).length;n--;)s=o[n],(r=this._objects.indexOf(s))<this._objects.length-1-A&&(a=r+1,i(this._objects,s),this._objects.splice(a,0,s)),A++;else(r=this._objects.indexOf(e))!==this._objects.length-1&&(a=this._findNewUpperIndex(e,r,t),i(this._objects,e),this._objects.splice(a,0,e));return this.renderOnAddRemove&&this.requestRenderAll(),this},
/**
         * @private
         */
_findNewUpperIndex:function(e,t,i){var n,s,r;if(i)for(n=t,s=t+1,r=this._objects.length;s<r;++s){if(e.intersectsWithObject(this._objects[s])||e.isContainedWithinObject(this._objects[s])||this._objects[s].isContainedWithinObject(e)){n=s;break}}else n=t+1;return n},
/**
         * Moves an object to specified level in stack of drawn objects
         * @param {fabric.Object} object Object to send
         * @param {Number} index Position to move to
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
moveTo:function(e,t){return i(this._objects,e),this._objects.splice(t,0,e),this.renderOnAddRemove&&this.requestRenderAll()},
/**
         * Clears a canvas element and dispose objects
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
dispose:function(){return this.isRendering&&(f.util.cancelAnimFrame(this.isRendering),this.isRendering=0),this.forEachObject((function(e){e.dispose&&e.dispose(),f.runningAnimations&&f.runningAnimations.cancelByTarget(e)})),this._objects=[],this.backgroundImage&&this.backgroundImage.dispose&&this.backgroundImage.dispose(),this.backgroundImage=null,this.overlayImage&&this.overlayImage.dispose&&this.overlayImage.dispose(),this.overlayImage=null,this._iTextInstances=null,this.contextContainer=null,this.lowerCanvasEl.classList.remove("lower-canvas"),f.util.setStyle(this.lowerCanvasEl,this._originalCanvasStyle),delete this._originalCanvasStyle,this.lowerCanvasEl.setAttribute("width",this.width),this.lowerCanvasEl.setAttribute("height",this.height),f.util.cleanUpJsdomNode(this.lowerCanvasEl),this.lowerCanvasEl=void 0,this},
/**
         * Returns a string representation of an instance
         * @return {String} string representation of an instance
         */
toString:function(){return"#<fabric.Canvas ("+this.complexity()+"): { objects: "+this._objects.length+" }>"}}),e(f.StaticCanvas.prototype,f.Observable),e(f.StaticCanvas.prototype,f.Collection),e(f.StaticCanvas.prototype,f.DataURLExporter),e(f.StaticCanvas,
/** @lends fabric.StaticCanvas */
{
/**
         * @static
         * @type String
         * @default
         */
EMPTY_JSON:'{"objects": [], "background": "white"}',
/**
         * Provides a way to check support of some of the canvas methods
         * (either those of HTMLCanvasElement itself, or rendering context)
         *
         * @param {String} methodName Method to check support for;
         *                            Could be one of "setLineDash"
         * @return {Boolean | null} `true` if method is supported (or at least exists),
         *                          `null` if canvas element or context can not be initialized
         */
supports:function(e){var t=o();if(!t||!t.getContext)return null;var i=t.getContext("2d");return i&&"setLineDash"===e?void 0!==i.setLineDash:null}}),f.StaticCanvas.prototype.toJSON=f.StaticCanvas.prototype.toObject,f.isLikelyNode&&(f.StaticCanvas.prototype.createPNGStream=function(){var e=a(this.lowerCanvasEl);return e&&e.createPNGStream()},f.StaticCanvas.prototype.createJPEGStream=function(e){var t=a(this.lowerCanvasEl);return t&&t.createJPEGStream(e)})}}(),f.BaseBrush=f.util.createClass(
/** @lends fabric.BaseBrush.prototype */
{
/**
       * Color of a brush
       * @type String
       * @default
       */
color:"rgb(0, 0, 0)",
/**
       * Width of a brush, has to be a Number, no string literals
       * @type Number
       * @default
       */
width:1,
/**
       * Shadow object representing shadow of this shape.
       * <b>Backwards incompatibility note:</b> This property replaces "shadowColor" (String), "shadowOffsetX" (Number),
       * "shadowOffsetY" (Number) and "shadowBlur" (Number) since v1.2.12
       * @type fabric.Shadow
       * @default
       */
shadow:null,
/**
       * Line endings style of a brush (one of "butt", "round", "square")
       * @type String
       * @default
       */
strokeLineCap:"round",
/**
       * Corner style of a brush (one of "bevel", "round", "miter")
       * @type String
       * @default
       */
strokeLineJoin:"round",
/**
       * Maximum miter length (used for strokeLineJoin = "miter") of a brush's
       * @type Number
       * @default
       */
strokeMiterLimit:10,
/**
       * Stroke Dash Array.
       * @type Array
       * @default
       */
strokeDashArray:null,
/**
       * When `true`, the free drawing is limited to the whiteboard size. Default to false.
       * @type Boolean
       * @default false
      */
limitedToCanvasSize:!1,
/**
       * Sets brush styles
       * @private
       * @param {CanvasRenderingContext2D} ctx
       */
_setBrushStyles:function(e){e.strokeStyle=this.color,e.lineWidth=this.width,e.lineCap=this.strokeLineCap,e.miterLimit=this.strokeMiterLimit,e.lineJoin=this.strokeLineJoin,e.setLineDash(this.strokeDashArray||[])},
/**
       * Sets the transformation on given context
       * @param {RenderingContext2d} ctx context to render on
       * @private
       */
_saveAndTransform:function(e){var t=this.canvas.viewportTransform;e.save(),e.transform(t[0],t[1],t[2],t[3],t[4],t[5])},
/**
       * Sets brush shadow styles
       * @private
       */
_setShadow:function(){if(this.shadow){var e=this.canvas,t=this.shadow,i=e.contextTop,n=e.getZoom();e&&e._isRetinaScaling()&&(n*=f.devicePixelRatio),i.shadowColor=t.color,i.shadowBlur=t.blur*n,i.shadowOffsetX=t.offsetX*n,i.shadowOffsetY=t.offsetY*n}},needsFullRender:function(){return new f.Color(this.color).getAlpha()<1||!!this.shadow},
/**
       * Removes brush shadow styles
       * @private
       */
_resetShadow:function(){var e=this.canvas.contextTop;e.shadowColor="",e.shadowBlur=e.shadowOffsetX=e.shadowOffsetY=0},
/**
       * Check is pointer is outside canvas boundaries
       * @param {Object} pointer
       * @private
      */
_isOutSideCanvas:function(e){return e.x<0||e.x>this.canvas.getWidth()||e.y<0||e.y>this.canvas.getHeight()}}),f.PencilBrush=f.util.createClass(f.BaseBrush,
/** @lends fabric.PencilBrush.prototype */
{
/**
         * Discard points that are less than `decimate` pixel distant from each other
         * @type Number
         * @default 0.4
         */
decimate:.4,
/**
         * Draws a straight line between last recorded point to current pointer
         * Used for `shift` functionality
         *
         * @type boolean
         * @default false
         */
drawStraightLine:!1,
/**
         * The event modifier key that makes the brush draw a straight line.
         * If `null` or 'none' or any other string that is not a modifier key the feature is disabled.
         * @type {'altKey' | 'shiftKey' | 'ctrlKey' | 'none' | undefined | null}
         */
straightLineKey:"shiftKey",
/**
         * Constructor
         * @param {fabric.Canvas} canvas
         * @return {fabric.PencilBrush} Instance of a pencil brush
         */
initialize:function(e){this.canvas=e,this._points=[]},needsFullRender:function(){return this.callSuper("needsFullRender")||this._hasStraightLine},
/**
         * Invoked inside on mouse down and mouse move
         * @param {Object} pointer
         */
_drawSegment:function(e,t,i){var n=t.midPointFrom(i);return e.quadraticCurveTo(t.x,t.y,n.x,n.y),n},
/**
         * Invoked on mouse down
         * @param {Object} pointer
         */
onMouseDown:function(e,t){this.canvas._isMainEvent(t.e)&&(this.drawStraightLine=t.e[this.straightLineKey],this._prepareForDrawing(e),this._captureDrawingPath(e),this._render())},
/**
         * Invoked on mouse move
         * @param {Object} pointer
         */
onMouseMove:function(e,t){if(this.canvas._isMainEvent(t.e)&&(this.drawStraightLine=t.e[this.straightLineKey],(!0!==this.limitedToCanvasSize||!this._isOutSideCanvas(e))&&this._captureDrawingPath(e)&&this._points.length>1))if(this.needsFullRender())this.canvas.clearContext(this.canvas.contextTop),this._render();else{var i=this._points,n=i.length,s=this.canvas.contextTop;this._saveAndTransform(s),this.oldEnd&&(s.beginPath(),s.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(s,i[n-2],i[n-1],!0),s.stroke(),s.restore()}},
/**
         * Invoked on mouse up
         */
onMouseUp:function(e){return!this.canvas._isMainEvent(e.e)||(this.drawStraightLine=!1,this.oldEnd=void 0,this._finalizeAndAddPath(),!1)},
/**
         * @private
         * @param {Object} pointer Actual mouse position related to the canvas.
         */
_prepareForDrawing:function(e){var t=new f.Point(e.x,e.y);this._reset(),this._addPoint(t),this.canvas.contextTop.moveTo(t.x,t.y)},
/**
         * @private
         * @param {fabric.Point} point Point to be added to points array
         */
_addPoint:function(e){return!(this._points.length>1&&e.eq(this._points[this._points.length-1])||(this.drawStraightLine&&this._points.length>1&&(this._hasStraightLine=!0,this._points.pop()),this._points.push(e),0))},
/**
         * Clear points array and set contextTop canvas style.
         * @private
         */
_reset:function(){this._points=[],this._setBrushStyles(this.canvas.contextTop),this._setShadow(),this._hasStraightLine=!1},
/**
         * @private
         * @param {Object} pointer Actual mouse position related to the canvas.
         */
_captureDrawingPath:function(e){var t=new f.Point(e.x,e.y);return this._addPoint(t)},
/**
         * Draw a smooth path on the topCanvas using quadraticCurveTo
         * @private
         * @param {CanvasRenderingContext2D} [ctx]
         */
_render:function(e){var t,i,n=this._points[0],s=this._points[1];if(e=e||this.canvas.contextTop,this._saveAndTransform(e),e.beginPath(),2===this._points.length&&n.x===s.x&&n.y===s.y){var r=this.width/1e3;n=new f.Point(n.x,n.y),s=new f.Point(s.x,s.y),n.x-=r,s.x+=r}for(e.moveTo(n.x,n.y),t=1,i=this._points.length;t<i;t++)this._drawSegment(e,n,s),n=this._points[t],s=this._points[t+1];e.lineTo(n.x,n.y),e.stroke(),e.restore()},
/**
         * Converts points to SVG path
         * @param {Array} points Array of points
         * @return {(string|number)[][]} SVG path commands
         */
convertPointsToSVGPath:function(e){var t=this.width/1e3;return f.util.getSmoothPathFromPoints(e,t)},
/**
         * @private
         * @param {(string|number)[][]} pathData SVG path commands
         * @returns {boolean}
         */
_isEmptySVGPath:function(e){return"M 0 0 Q 0 0 0 0 L 0 0"===f.util.joinPath(e)},
/**
         * Creates fabric.Path object to add on canvas
         * @param {(string|number)[][]} pathData Path data
         * @return {fabric.Path} Path to add on canvas
         */
createPath:function(e){var t=new f.Path(e,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeMiterLimit:this.strokeMiterLimit,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray});return this.shadow&&(this.shadow.affectStroke=!0,t.shadow=new f.Shadow(this.shadow)),t},
/**
         * Decimate points array with the decimate value
         */
decimatePoints:function(e,t){if(e.length<=2)return e;var i,n=this.canvas.getZoom(),s=Math.pow(t/n,2),r=e.length-1,a=e[0],o=[a];for(i=1;i<r-1;i++)Math.pow(a.x-e[i].x,2)+Math.pow(a.y-e[i].y,2)>=s&&(a=e[i],o.push(a));return o.push(e[r]),o},
/**
         * On mouseup after drawing the path on contextTop canvas
         * we use the points captured to create an new fabric path object
         * and add it to the fabric canvas.
         */
_finalizeAndAddPath:function(){this.canvas.contextTop.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate));var e=this.convertPointsToSVGPath(this._points);if(this._isEmptySVGPath(e))this.canvas.requestRenderAll();else{var t=this.createPath(e);this.canvas.clearContext(this.canvas.contextTop),this.canvas.fire("before:path:created",{path:t}),this.canvas.add(t),this.canvas.requestRenderAll(),t.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:t})}}}),f.CircleBrush=f.util.createClass(f.BaseBrush,
/** @lends fabric.CircleBrush.prototype */
{
/**
       * Width of a brush
       * @type Number
       * @default
       */
width:10,
/**
       * Constructor
       * @param {fabric.Canvas} canvas
       * @return {fabric.CircleBrush} Instance of a circle brush
       */
initialize:function(e){this.canvas=e,this.points=[]},
/**
       * Invoked inside on mouse down and mouse move
       * @param {Object} pointer
       */
drawDot:function(e){var t=this.addPoint(e),i=this.canvas.contextTop;this._saveAndTransform(i),this.dot(i,t),i.restore()},dot:function(e,t){e.fillStyle=t.fill,e.beginPath(),e.arc(t.x,t.y,t.radius,0,2*Math.PI,!1),e.closePath(),e.fill()},
/**
       * Invoked on mouse down
       */
onMouseDown:function(e){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(e)},
/**
       * Render the full state of the brush
       * @private
       */
_render:function(){var e,t,i=this.canvas.contextTop,n=this.points;for(this._saveAndTransform(i),e=0,t=n.length;e<t;e++)this.dot(i,n[e]);i.restore()},
/**
       * Invoked on mouse move
       * @param {Object} pointer
       */
onMouseMove:function(e){!0===this.limitedToCanvasSize&&this._isOutSideCanvas(e)||(this.needsFullRender()?(this.canvas.clearContext(this.canvas.contextTop),this.addPoint(e),this._render()):this.drawDot(e))},
/**
       * Invoked on mouse up
       */
onMouseUp:function(){var e,t,i=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;var n=[];for(e=0,t=this.points.length;e<t;e++){var s=this.points[e],r=new f.Circle({radius:s.radius,left:s.x,top:s.y,originX:"center",originY:"center",fill:s.fill});this.shadow&&(r.shadow=new f.Shadow(this.shadow)),n.push(r)}var a=new f.Group(n);a.canvas=this.canvas,this.canvas.fire("before:path:created",{path:a}),this.canvas.add(a),this.canvas.fire("path:created",{path:a}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=i,this.canvas.requestRenderAll()},
/**
       * @param {Object} pointer
       * @return {fabric.Point} Just added pointer point
       */
addPoint:function(e){var t=new f.Point(e.x,e.y),i=f.util.getRandomInt(Math.max(0,this.width-20),this.width+20)/2,n=new f.Color(this.color).setAlpha(f.util.getRandomInt(0,100)/100).toRgba();return t.radius=i,t.fill=n,this.points.push(t),t}}),f.SprayBrush=f.util.createClass(f.BaseBrush,
/** @lends fabric.SprayBrush.prototype */
{
/**
       * Width of a spray
       * @type Number
       * @default
       */
width:10,
/**
       * Density of a spray (number of dots per chunk)
       * @type Number
       * @default
       */
density:20,
/**
       * Width of spray dots
       * @type Number
       * @default
       */
dotWidth:1,
/**
       * Width variance of spray dots
       * @type Number
       * @default
       */
dotWidthVariance:1,
/**
       * Whether opacity of a dot should be random
       * @type Boolean
       * @default
       */
randomOpacity:!1,
/**
       * Whether overlapping dots (rectangles) should be removed (for performance reasons)
       * @type Boolean
       * @default
       */
optimizeOverlapping:!0,
/**
       * Constructor
       * @param {fabric.Canvas} canvas
       * @return {fabric.SprayBrush} Instance of a spray brush
       */
initialize:function(e){this.canvas=e,this.sprayChunks=[]},
/**
       * Invoked on mouse down
       * @param {Object} pointer
       */
onMouseDown:function(e){this.sprayChunks.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.addSprayChunk(e),this.render(this.sprayChunkPoints)},
/**
       * Invoked on mouse move
       * @param {Object} pointer
       */
onMouseMove:function(e){!0===this.limitedToCanvasSize&&this._isOutSideCanvas(e)||(this.addSprayChunk(e),this.render(this.sprayChunkPoints))},
/**
       * Invoked on mouse up
       */
onMouseUp:function(){var e=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;for(var t=[],i=0,n=this.sprayChunks.length;i<n;i++)for(var s=this.sprayChunks[i],r=0,a=s.length;r<a;r++){var o=new f.Rect({width:s[r].width,height:s[r].width,left:s[r].x+1,top:s[r].y+1,originX:"center",originY:"center",fill:this.color});t.push(o)}this.optimizeOverlapping&&(t=this._getOptimizedRects(t));var l=new f.Group(t);this.shadow&&l.set("shadow",new f.Shadow(this.shadow)),this.canvas.fire("before:path:created",{path:l}),this.canvas.add(l),this.canvas.fire("path:created",{path:l}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=e,this.canvas.requestRenderAll()},
/**
       * @private
       * @param {Array} rects
       */
_getOptimizedRects:function(e){var t,i,n,s={};for(i=0,n=e.length;i<n;i++)s[t=e[i].left+""+e[i].top]||(s[t]=e[i]);var r=[];for(t in s)r.push(s[t]);return r},
/**
       * Render new chunk of spray brush
       */
render:function(e){var t,i,n=this.canvas.contextTop;for(n.fillStyle=this.color,this._saveAndTransform(n),t=0,i=e.length;t<i;t++){var s=e[t];void 0!==s.opacity&&(n.globalAlpha=s.opacity),n.fillRect(s.x,s.y,s.width,s.width)}n.restore()},
/**
       * Render all spray chunks
       */
_render:function(){var e,t,i=this.canvas.contextTop;for(i.fillStyle=this.color,this._saveAndTransform(i),e=0,t=this.sprayChunks.length;e<t;e++)this.render(this.sprayChunks[e]);i.restore()},
/**
       * @param {Object} pointer
       */
addSprayChunk:function(e){this.sprayChunkPoints=[];var t,i,n,s,r=this.width/2;for(s=0;s<this.density;s++){t=f.util.getRandomInt(e.x-r,e.x+r),i=f.util.getRandomInt(e.y-r,e.y+r),n=this.dotWidthVariance?f.util.getRandomInt(
// bottom clamp width to 1
Math.max(1,this.dotWidth-this.dotWidthVariance),this.dotWidth+this.dotWidthVariance):this.dotWidth;var a=new f.Point(t,i);a.width=n,this.randomOpacity&&(a.opacity=f.util.getRandomInt(0,100)/100),this.sprayChunkPoints.push(a)}this.sprayChunks.push(this.sprayChunkPoints)}}),f.PatternBrush=f.util.createClass(f.PencilBrush,
/** @lends fabric.PatternBrush.prototype */
{getPatternSrc:function(){var e=f.util.createCanvasElement(),t=e.getContext("2d");return e.width=e.height=25,t.fillStyle=this.color,t.beginPath(),t.arc(10,10,10,0,2*Math.PI,!1),t.closePath(),t.fill(),e},getPatternSrcFunction:function(){return String(this.getPatternSrc).replace("this.color",'"'+this.color+'"')},
/**
       * Creates "pattern" instance property
       * @param {CanvasRenderingContext2D} ctx
       */
getPattern:function(e){return e.createPattern(this.source||this.getPatternSrc(),"repeat")},
/**
       * Sets brush styles
       * @param {CanvasRenderingContext2D} ctx
       */
_setBrushStyles:function(e){this.callSuper("_setBrushStyles",e),e.strokeStyle=this.getPattern(e)},
/**
       * Creates path
       */
createPath:function(e){var t=this.callSuper("createPath",e),i=t._getLeftTopCoords().scalarAdd(t.strokeWidth/2);return t.stroke=new f.Pattern({source:this.source||this.getPatternSrcFunction(),offsetX:-i.x,offsetY:-i.y}),t}}),function(){var e=f.util.getPointer,t=f.util.degreesToRadians,i=f.util.isTouchEvent;for(var n in f.Canvas=f.util.createClass(f.StaticCanvas,
/** @lends fabric.Canvas.prototype */
{
/**
         * Constructor
         * @param {HTMLElement | String} el &lt;canvas> element to initialize instance on
         * @param {Object} [options] Options object
         * @return {Object} thisArg
         */
initialize:function(e,t){t||(t={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(e,t),this._initInteractive(),this._createCacheCanvas()},
/**
         * When true, objects can be transformed by one side (unproportionally)
         * when dragged on the corners that normally would not do that.
         * @type Boolean
         * @default
         * @since fabric 4.0 // changed name and default value
         */
uniformScaling:!0,
/**
         * Indicates which key switches uniform scaling.
         * values: 'altKey', 'shiftKey', 'ctrlKey'.
         * If `null` or 'none' or any other string that is not a modifier key
         * feature is disabled.
         * totally wrong named. this sounds like `uniform scaling`
         * if Canvas.uniformScaling is true, pressing this will set it to false
         * and viceversa.
         * @since 1.6.2
         * @type String
         * @default
         */
uniScaleKey:"shiftKey",
/**
         * When true, objects use center point as the origin of scale transformation.
         * <b>Backwards incompatibility note:</b> This property replaces "centerTransform" (Boolean).
         * @since 1.3.4
         * @type Boolean
         * @default
         */
centeredScaling:!1,
/**
         * When true, objects use center point as the origin of rotate transformation.
         * <b>Backwards incompatibility note:</b> This property replaces "centerTransform" (Boolean).
         * @since 1.3.4
         * @type Boolean
         * @default
         */
centeredRotation:!1,
/**
         * Indicates which key enable centered Transform
         * values: 'altKey', 'shiftKey', 'ctrlKey'.
         * If `null` or 'none' or any other string that is not a modifier key
         * feature is disabled feature disabled.
         * @since 1.6.2
         * @type String
         * @default
         */
centeredKey:"altKey",
/**
         * Indicates which key enable alternate action on corner
         * values: 'altKey', 'shiftKey', 'ctrlKey'.
         * If `null` or 'none' or any other string that is not a modifier key
         * feature is disabled feature disabled.
         * @since 1.6.2
         * @type String
         * @default
         */
altActionKey:"shiftKey",
/**
         * Indicates that canvas is interactive. This property should not be changed.
         * @type Boolean
         * @default
         */
interactive:!0,
/**
         * Indicates whether group selection should be enabled
         * @type Boolean
         * @default
         */
selection:!0,
/**
         * Indicates which key or keys enable multiple click selection
         * Pass value as a string or array of strings
         * values: 'altKey', 'shiftKey', 'ctrlKey'.
         * If `null` or empty or containing any other string that is not a modifier key
         * feature is disabled.
         * @since 1.6.2
         * @type String|Array
         * @default
         */
selectionKey:"shiftKey",
/**
         * Indicates which key enable alternative selection
         * in case of target overlapping with active object
         * values: 'altKey', 'shiftKey', 'ctrlKey'.
         * For a series of reason that come from the general expectations on how
         * things should work, this feature works only for preserveObjectStacking true.
         * If `null` or 'none' or any other string that is not a modifier key
         * feature is disabled.
         * @since 1.6.5
         * @type null|String
         * @default
         */
altSelectionKey:null,
/**
         * Color of selection
         * @type String
         * @default
         */
selectionColor:"rgba(100, 100, 255, 0.3)",
// blue
/**
         * Default dash array pattern
         * If not empty the selection border is dashed
         * @type Array
         */
selectionDashArray:[],
/**
         * Color of the border of selection (usually slightly darker than color of selection itself)
         * @type String
         * @default
         */
selectionBorderColor:"rgba(255, 255, 255, 0.3)",
/**
         * Width of a line used in object/group selection
         * @type Number
         * @default
         */
selectionLineWidth:1,
/**
         * Select only shapes that are fully contained in the dragged selection rectangle.
         * @type Boolean
         * @default
         */
selectionFullyContained:!1,
/**
         * Default cursor value used when hovering over an object on canvas
         * @type String
         * @default
         */
hoverCursor:"move",
/**
         * Default cursor value used when moving an object on canvas
         * @type String
         * @default
         */
moveCursor:"move",
/**
         * Default cursor value used for the entire canvas
         * @type String
         * @default
         */
defaultCursor:"default",
/**
         * Cursor value used during free drawing
         * @type String
         * @default
         */
freeDrawingCursor:"crosshair",
/**
         * Cursor value used for disabled elements ( corners with disabled action )
         * @type String
         * @since 2.0.0
         * @default
         */
notAllowedCursor:"not-allowed",
/**
         * Default element class that's given to wrapper (div) element of canvas
         * @type String
         * @default
         */
containerClass:"canvas-container",
/**
         * When true, object detection happens on per-pixel basis rather than on per-bounding-box
         * @type Boolean
         * @default
         */
perPixelTargetFind:!1,
/**
         * Number of pixels around target pixel to tolerate (consider active) during object detection
         * @type Number
         * @default
         */
targetFindTolerance:0,
/**
         * When true, target detection is skipped. Target detection will return always undefined.
         * click selection won't work anymore, events will fire with no targets.
         * if something is selected before setting it to true, it will be deselected at the first click.
         * area selection will still work. check the `selection` property too.
         * if you deactivate both, you should look into staticCanvas.
         * @type Boolean
         * @default
         */
skipTargetFind:!1,
/**
         * When true, mouse events on canvas (mousedown/mousemove/mouseup) result in free drawing.
         * After mousedown, mousemove creates a shape,
         * and then mouseup finalizes it and adds an instance of `fabric.Path` onto canvas.
         * @tutorial {@link http://fabricjs.com/fabric-intro-part-4#free_drawing}
         * @type Boolean
         * @default
         */
isDrawingMode:!1,
/**
         * Indicates whether objects should remain in current stack position when selected.
         * When false objects are brought to top and rendered as part of the selection group
         * @type Boolean
         * @default
         */
preserveObjectStacking:!1,
/**
         * Indicates the angle that an object will lock to while rotating.
         * @type Number
         * @since 1.6.7
         * @default
         */
snapAngle:0,
/**
         * Indicates the distance from the snapAngle the rotation will lock to the snapAngle.
         * When `null`, the snapThreshold will default to the snapAngle.
         * @type null|Number
         * @since 1.6.7
         * @default
         */
snapThreshold:null,
/**
         * Indicates if the right click on canvas can output the context menu or not
         * @type Boolean
         * @since 1.6.5
         * @default
         */
stopContextMenu:!1,
/**
         * Indicates if the canvas can fire right click events
         * @type Boolean
         * @since 1.6.5
         * @default
         */
fireRightClick:!1,
/**
         * Indicates if the canvas can fire middle click events
         * @type Boolean
         * @since 1.7.8
         * @default
         */
fireMiddleClick:!1,
/**
         * Keep track of the subTargets for Mouse Events
         * @type fabric.Object[]
         */
targets:[],
/**
         * When the option is enabled, PointerEvent is used instead of MouseEvent.
         * @type Boolean
         * @default
         */
enablePointerEvents:!1,
/**
         * Keep track of the hovered target
         * @type fabric.Object
         * @private
         */
_hoveredTarget:null,
/**
         * hold the list of nested targets hovered
         * @type fabric.Object[]
         * @private
         */
_hoveredTargets:[],
/**
         * @private
         */
_initInteractive:function(){this._currentTransform=null,this._groupSelector=null,this._initWrapperElement(),this._createUpperCanvas(),this._initEventListeners(),this._initRetinaScaling(),this.freeDrawingBrush=f.PencilBrush&&new f.PencilBrush(this),this.calcOffset()},
/**
         * Divides objects in two groups, one to render immediately
         * and one to render as activeGroup.
         * @return {Array} objects to render immediately and pushes the other in the activeGroup.
         */
_chooseObjectsToRender:function(){var e,t,i,n=this.getActiveObjects();if(n.length>0&&!this.preserveObjectStacking){t=[],i=[];for(var s=0,r=this._objects.length;s<r;s++)e=this._objects[s],-1===n.indexOf(e)?t.push(e):i.push(e);n.length>1&&(this._activeObject._objects=i),t.push.apply(t,i)}else t=this._objects;return t},
/**
         * Renders both the top canvas and the secondary container canvas.
         * @return {fabric.Canvas} instance
         * @chainable
         */
renderAll:function(){!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&(this.renderTopLayer(this.contextTop),this.hasLostContext=!1);var e=this.contextContainer;return this.renderCanvas(e,this._chooseObjectsToRender()),this},renderTopLayer:function(e){e.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(e),this.contextTopDirty=!0),e.restore()},
/**
         * Method to render only the top canvas.
         * Also used to render the group selection box.
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
renderTop:function(){var e=this.contextTop;return this.clearContext(e),this.renderTopLayer(e),this.fire("after:render"),this},
/**
         * @private
         */
_normalizePointer:function(e,t){var i=e.calcTransformMatrix(),n=f.util.invertTransform(i),s=this.restorePointerVpt(t);return f.util.transformPoint(s,n)},
/**
         * Returns true if object is transparent at a certain location
         * @param {fabric.Object} target Object to check
         * @param {Number} x Left coordinate
         * @param {Number} y Top coordinate
         * @return {Boolean}
         */
isTargetTransparent:function(e,t,i){if(e.shouldCache()&&e._cacheCanvas&&e!==this._activeObject){var n=this._normalizePointer(e,{x:t,y:i}),s=Math.max(e.cacheTranslationX+n.x*e.zoomX,0),r=Math.max(e.cacheTranslationY+n.y*e.zoomY,0);return f.util.isTransparent(e._cacheContext,Math.round(s),Math.round(r),this.targetFindTolerance)}var a=this.contextCache,o=e.selectionBackgroundColor,l=this.viewportTransform;return e.selectionBackgroundColor="",this.clearContext(a),a.save(),a.transform(l[0],l[1],l[2],l[3],l[4],l[5]),e.render(a),a.restore(),e.selectionBackgroundColor=o,f.util.isTransparent(a,t,i,this.targetFindTolerance)},
/**
         * takes an event and determines if selection key has been pressed
         * @private
         * @param {Event} e Event object
         */
_isSelectionKeyPressed:function(e){return"[object Array]"===Object.prototype.toString.call(this.selectionKey)?!!this.selectionKey.find((function(t){return!0===e[t]})):e[this.selectionKey]},
/**
         * @private
         * @param {Event} e Event object
         * @param {fabric.Object} target
         */
_shouldClearSelection:function(e,t){var i=this.getActiveObjects(),n=this._activeObject;return!t||t&&n&&i.length>1&&-1===i.indexOf(t)&&n!==t&&!this._isSelectionKeyPressed(e)||t&&!t.evented||t&&!t.selectable&&n&&n!==t},
/**
         * centeredScaling from object can't override centeredScaling from canvas.
         * this should be fixed, since object setting should take precedence over canvas.
         * also this should be something that will be migrated in the control properties.
         * as ability to define the origin of the transformation that the control provide.
         * @private
         * @param {fabric.Object} target
         * @param {String} action
         * @param {Boolean} altKey
         */
_shouldCenterTransform:function(e,t,i){var n;if(e)return"scale"===t||"scaleX"===t||"scaleY"===t||"resizing"===t?n=this.centeredScaling||e.centeredScaling:"rotate"===t&&(n=this.centeredRotation||e.centeredRotation),n?!i:i},
/**
         * should disappear before release 4.0
         * @private
         */
_getOriginFromCorner:function(e,t){var i={x:e.originX,y:e.originY};return"ml"===t||"tl"===t||"bl"===t?i.x="right":"mr"!==t&&"tr"!==t&&"br"!==t||(i.x="left"),"tl"===t||"mt"===t||"tr"===t?i.y="bottom":"bl"!==t&&"mb"!==t&&"br"!==t||(i.y="top"),i},
/**
         * @private
         * @param {Boolean} alreadySelected true if target is already selected
         * @param {String} corner a string representing the corner ml, mr, tl ...
         * @param {Event} e Event object
         * @param {fabric.Object} [target] inserted back to help overriding. Unused
         */
_getActionFromCorner:function(e,t,i,n){if(!t||!e)return"drag";var s=n.controls[t];return s.getActionName(i,s,n)},
/**
         * @private
         * @param {Event} e Event object
         * @param {fabric.Object} target
         */
_setupCurrentTransform:function(e,i,n){if(i){var s=this.getPointer(e),r=i.__corner,a=i.controls[r],o=n&&r?a.getActionHandler(e,i,a):f.controlsUtils.dragHandler,l=this._getActionFromCorner(n,r,e,i),A=this._getOriginFromCorner(i,r),c=e[this.centeredKey],u={target:i,action:l,actionHandler:o,corner:r,scaleX:i.scaleX,scaleY:i.scaleY,skewX:i.skewX,skewY:i.skewY,
// used by transation
offsetX:s.x-i.left,offsetY:s.y-i.top,originX:A.x,originY:A.y,ex:s.x,ey:s.y,lastX:s.x,lastY:s.y,
// unsure they are useful anymore.
// left: target.left,
// top: target.top,
theta:t(i.angle),
// end of unsure
width:i.width*i.scaleX,shiftKey:e.shiftKey,altKey:c,original:f.util.saveObjectTransform(i)};this._shouldCenterTransform(i,l,c)&&(u.originX="center",u.originY="center"),u.original.originX=A.x,u.original.originY=A.y,this._currentTransform=u,this._beforeTransform(e)}},
/**
         * Set the cursor type of the canvas element
         * @param {String} value Cursor type of the canvas element.
         * @see http://www.w3.org/TR/css3-ui/#cursor
         */
setCursor:function(e){this.upperCanvasEl.style.cursor=e},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx to draw the selection on
         */
_drawSelection:function(e){var t=this._groupSelector,i=new f.Point(t.ex,t.ey),n=f.util.transformPoint(i,this.viewportTransform),s=new f.Point(t.ex+t.left,t.ey+t.top),r=f.util.transformPoint(s,this.viewportTransform),a=Math.min(n.x,r.x),o=Math.min(n.y,r.y),l=Math.max(n.x,r.x),A=Math.max(n.y,r.y),c=this.selectionLineWidth/2;this.selectionColor&&(e.fillStyle=this.selectionColor,e.fillRect(a,o,l-a,A-o)),this.selectionLineWidth&&this.selectionBorderColor&&(e.lineWidth=this.selectionLineWidth,e.strokeStyle=this.selectionBorderColor,a+=c,o+=c,l-=c,A-=c,f.Object.prototype._setLineDash.call(this,e,this.selectionDashArray),e.strokeRect(a,o,l-a,A-o))},
/**
         * Method that determines what object we are clicking on
         * the skipGroup parameter is for internal use, is needed for shift+click action
         * 11/09/2018 TODO: would be cool if findTarget could discern between being a full target
         * or the outside part of the corner.
         * @param {Event} e mouse event
         * @param {Boolean} skipGroup when true, activeGroup is skipped and only objects are traversed through
         * @return {fabric.Object} the target found
         */
findTarget:function(e,t){if(!this.skipTargetFind){var n,s,r=this.getPointer(e,!0),a=this._activeObject,o=this.getActiveObjects(),l=i(e),A=o.length>1&&!t||1===o.length;if(this.targets=[],A&&a._findTargetCorner(r,l))return a;if(o.length>1&&!t&&a===this._searchPossibleTargets([a],r))return a;if(1===o.length&&a===this._searchPossibleTargets([a],r)){if(!this.preserveObjectStacking)return a;n=a,s=this.targets,this.targets=[]}var c=this._searchPossibleTargets(this._objects,r);return e[this.altSelectionKey]&&c&&n&&c!==n&&(c=n,this.targets=s),c}},
/**
         * Checks point is inside the object.
         * @param {Object} [pointer] x,y object of point coordinates we want to check.
         * @param {fabric.Object} obj Object to test against
         * @param {Object} [globalPointer] x,y object of point coordinates relative to canvas used to search per pixel target.
         * @return {Boolean} true if point is contained within an area of given object
         * @private
         */
_checkTarget:function(e,t,i){if(t&&t.visible&&t.evented&&// http://www.geog.ubc.ca/courses/klink/gis.notes/ncgia/u32.html
// http://idav.ucdavis.edu/~okreylos/TAship/Spring2000/PointInPolygon.html
t.containsPoint(e)){if(!this.perPixelTargetFind&&!t.perPixelTargetFind||t.isEditing)return!0;if(!this.isTargetTransparent(t,i.x,i.y))return!0}},
/**
         * Function used to search inside objects an object that contains pointer in bounding box or that contains pointerOnCanvas when painted
         * @param {Array} [objects] objects array to look into
         * @param {Object} [pointer] x,y object of point coordinates we want to check.
         * @return {fabric.Object} object that contains pointer
         * @private
         */
_searchPossibleTargets:function(e,t){for(var i,n,s=e.length;s--;){var r=e[s],a=r.group?this._normalizePointer(r.group,t):t;if(this._checkTarget(a,r,t)){(i=e[s]).subTargetCheck&&i instanceof f.Group&&(n=this._searchPossibleTargets(i._objects,t))&&this.targets.push(n);break}}return i},
/**
         * Returns pointer coordinates without the effect of the viewport
         * @param {Object} pointer with "x" and "y" number values
         * @return {Object} object with "x" and "y" number values
         */
restorePointerVpt:function(e){return f.util.transformPoint(e,f.util.invertTransform(this.viewportTransform))},
/**
         * Returns pointer coordinates relative to canvas.
         * Can return coordinates with or without viewportTransform.
         * ignoreZoom false gives back coordinates that represent
         * the point clicked on canvas element.
         * ignoreZoom true gives back coordinates after being processed
         * by the viewportTransform ( sort of coordinates of what is displayed
         * on the canvas where you are clicking.
         * ignoreZoom true = HTMLElement coordinates relative to top,left
         * ignoreZoom false, default = fabric space coordinates, the same used for shape position
         * To interact with your shapes top and left you want to use ignoreZoom true
         * most of the time, while ignoreZoom false will give you coordinates
         * compatible with the object.oCoords system.
         * of the time.
         * @param {Event} e
         * @param {Boolean} ignoreZoom
         * @return {Object} object with "x" and "y" number values
         */
getPointer:function(t,i){if(this._absolutePointer&&!i)return this._absolutePointer;if(this._pointer&&i)return this._pointer;var n,s=e(t),r=this.upperCanvasEl,a=r.getBoundingClientRect(),o=a.width||0,l=a.height||0;o&&l||("top"in a&&"bottom"in a&&(l=Math.abs(a.top-a.bottom)),"right"in a&&"left"in a&&(o=Math.abs(a.right-a.left))),this.calcOffset(),s.x=s.x-this._offset.left,s.y=s.y-this._offset.top,i||(s=this.restorePointerVpt(s));var A=this.getRetinaScaling();return 1!==A&&(s.x/=A,s.y/=A),n=0===o||0===l?{width:1,height:1}:{width:r.width/o,height:r.height/l},{x:s.x*n.width,y:s.y*n.height}},
/**
         * @private
         * @throws {CANVAS_INIT_ERROR} If canvas can not be initialized
         */
_createUpperCanvas:function(){var e=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,""),t=this.lowerCanvasEl,i=this.upperCanvasEl;i?i.className="":(i=this._createCanvasElement(),this.upperCanvasEl=i),f.util.addClass(i,"upper-canvas "+e),this.wrapperEl.appendChild(i),this._copyCanvasStyle(t,i),this._applyCanvasStyle(i),this.contextTop=i.getContext("2d")},
/**
         * @private
         */
_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},
/**
         * @private
         */
_initWrapperElement:function(){this.wrapperEl=f.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),f.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),f.util.makeElementUnselectable(this.wrapperEl)},
/**
         * @private
         * @param {HTMLElement} element canvas element to apply styles on
         */
_applyCanvasStyle:function(e){var t=this.width||e.width,i=this.height||e.height;f.util.setStyle(e,{position:"absolute",width:t+"px",height:i+"px",left:0,top:0,"touch-action":this.allowTouchScrolling?"manipulation":"none","-ms-touch-action":this.allowTouchScrolling?"manipulation":"none"}),e.width=t,e.height=i,f.util.makeElementUnselectable(e)},
/**
         * Copy the entire inline style from one element (fromEl) to another (toEl)
         * @private
         * @param {Element} fromEl Element style is copied from
         * @param {Element} toEl Element copied style is applied to
         */
_copyCanvasStyle:function(e,t){t.style.cssText=e.style.cssText},
/**
         * Returns context of canvas where object selection is drawn
         * @return {CanvasRenderingContext2D}
         */
getSelectionContext:function(){return this.contextTop},
/**
         * Returns &lt;canvas> element on which object selection is drawn
         * @return {HTMLCanvasElement}
         */
getSelectionElement:function(){return this.upperCanvasEl},
/**
         * Returns currently active object
         * @return {fabric.Object} active object
         */
getActiveObject:function(){return this._activeObject},
/**
         * Returns an array with the current selected objects
         * @return {fabric.Object} active object
         */
getActiveObjects:function(){var e=this._activeObject;return e?"activeSelection"===e.type&&e._objects?e._objects.slice(0):[e]:[]},
/**
         * @private
         * @param {fabric.Object} obj Object that was removed
         */
_onObjectRemoved:function(e){e===this._activeObject&&(this.fire("before:selection:cleared",{target:e}),this._discardActiveObject(),this.fire("selection:cleared",{target:e}),e.fire("deselected")),e===this._hoveredTarget&&(this._hoveredTarget=null,this._hoveredTargets=[]),this.callSuper("_onObjectRemoved",e)},
/**
         * @private
         * Compares the old activeObject with the current one and fires correct events
         * @param {fabric.Object} obj old activeObject
         */
_fireSelectionEvents:function(e,t){var i=!1,n=this.getActiveObjects(),s=[],r=[];e.forEach((function(e){-1===n.indexOf(e)&&(i=!0,e.fire("deselected",{e:t,target:e}),r.push(e))})),n.forEach((function(n){-1===e.indexOf(n)&&(i=!0,n.fire("selected",{e:t,target:n}),s.push(n))})),e.length>0&&n.length>0?i&&this.fire("selection:updated",{e:t,selected:s,deselected:r}):n.length>0?this.fire("selection:created",{e:t,selected:s}):e.length>0&&this.fire("selection:cleared",{e:t,deselected:r})},
/**
         * Sets given object as the only active object on canvas
         * @param {fabric.Object} object Object to set as an active one
         * @param {Event} [e] Event (passed along when firing "object:selected")
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
setActiveObject:function(e,t){var i=this.getActiveObjects();return this._setActiveObject(e,t),this._fireSelectionEvents(i,t),this},
/**
         * This is a private method for now.
         * This is supposed to be equivalent to setActiveObject but without firing
         * any event. There is commitment to have this stay this way.
         * This is the functional part of setActiveObject.
         * @private
         * @param {Object} object to set as active
         * @param {Event} [e] Event (passed along when firing "object:selected")
         * @return {Boolean} true if the selection happened
         */
_setActiveObject:function(e,t){return this._activeObject!==e&&(!!this._discardActiveObject(t,e)&&(!e.onSelect({e:t})&&(this._activeObject=e,!0)))},
/**
         * This is a private method for now.
         * This is supposed to be equivalent to discardActiveObject but without firing
         * any events. There is commitment to have this stay this way.
         * This is the functional part of discardActiveObject.
         * @param {Event} [e] Event (passed along when firing "object:deselected")
         * @param {Object} object to set as active
         * @return {Boolean} true if the selection happened
         * @private
         */
_discardActiveObject:function(e,t){var i=this._activeObject;if(i){if(i.onDeselect({e:e,object:t}))return!1;this._activeObject=null}return!0},
/**
         * Discards currently active object and fire events. If the function is called by fabric
         * as a consequence of a mouse event, the event is passed as a parameter and
         * sent to the fire function for the custom events. When used as a method the
         * e param does not have any application.
         * @param {event} e
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
discardActiveObject:function(e){var t=this.getActiveObjects(),i=this.getActiveObject();return t.length&&this.fire("before:selection:cleared",{target:i,e:e}),this._discardActiveObject(e),this._fireSelectionEvents(t,e),this},
/**
         * Clears a canvas element and removes all event listeners
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
dispose:function(){var e=this.wrapperEl;return this.removeListeners(),e.removeChild(this.upperCanvasEl),e.removeChild(this.lowerCanvasEl),this.contextCache=null,this.contextTop=null,["upperCanvasEl","cacheCanvasEl"].forEach(function(e){f.util.cleanUpJsdomNode(this[e]),this[e]=void 0}.bind(this)),e.parentNode&&e.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,f.StaticCanvas.prototype.dispose.call(this),this},
/**
         * Clears all contexts (background, main, top) of an instance
         * @return {fabric.Canvas} thisArg
         * @chainable
         */
clear:function(){return this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},
/**
         * Draws objects' controls (borders/controls)
         * @param {CanvasRenderingContext2D} ctx Context to render controls on
         */
drawControls:function(e){var t=this._activeObject;t&&t._renderControls(e)},
/**
         * @private
         */
_toObject:function(e,t,i){var n=this._realizeGroupTransformOnObject(e),s=this.callSuper("_toObject",e,t,i);return this._unwindGroupTransformOnObject(e,n),s},
/**
         * Realises an object's group transformation on it
         * @private
         * @param {fabric.Object} [instance] the object to transform (gets mutated)
         * @returns the original values of instance which were changed
         */
_realizeGroupTransformOnObject:function(e){if(e.group&&"activeSelection"===e.group.type&&this._activeObject===e.group){var t={};return["angle","flipX","flipY","left","scaleX","scaleY","skewX","skewY","top"].forEach((function(i){t[i]=e[i]})),f.util.addTransformToObject(e,this._activeObject.calcOwnMatrix()),t}return null},
/**
         * Restores the changed properties of instance
         * @private
         * @param {fabric.Object} [instance] the object to un-transform (gets mutated)
         * @param {Object} [originalValues] the original values of instance, as returned by _realizeGroupTransformOnObject
         */
_unwindGroupTransformOnObject:function(e,t){t&&e.set(t)},
/**
         * @private
         */
_setSVGObject:function(e,t,i){var n=this._realizeGroupTransformOnObject(t);this.callSuper("_setSVGObject",e,t,i),this._unwindGroupTransformOnObject(t,n)},setViewportTransform:function(e){this.renderOnAddRemove&&this._activeObject&&this._activeObject.isEditing&&this._activeObject.clearContextTop(),f.StaticCanvas.prototype.setViewportTransform.call(this,e)}}),f.StaticCanvas)"prototype"!==n&&(f.Canvas[n]=f.StaticCanvas[n])}(),function(){var e=f.util.addListener,t=f.util.removeListener,i={passive:!1};function n(e,t){return e.button&&e.button===t-1}f.util.object.extend(f.Canvas.prototype,
/** @lends fabric.Canvas.prototype */
{
/**
         * Contains the id of the touch event that owns the fabric transform
         * @type Number
         * @private
         */
mainTouchId:null,
/**
         * Adds mouse listeners to canvas
         * @private
         */
_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(e,"add")},
/**
         * return an event prefix pointer or mouse.
         * @private
         */
_getEventPrefix:function(){return this.enablePointerEvents?"pointer":"mouse"},addOrRemove:function(e,t){var n=this.upperCanvasEl,s=this._getEventPrefix();e(f.window,"resize",this._onResize),e(n,s+"down",this._onMouseDown),e(n,s+"move",this._onMouseMove,i),e(n,s+"out",this._onMouseOut),e(n,s+"enter",this._onMouseEnter),e(n,"wheel",this._onMouseWheel),e(n,"contextmenu",this._onContextMenu),e(n,"dblclick",this._onDoubleClick),e(n,"dragover",this._onDragOver),e(n,"dragenter",this._onDragEnter),e(n,"dragleave",this._onDragLeave),e(n,"drop",this._onDrop),this.enablePointerEvents||e(n,"touchstart",this._onTouchStart,i),"undefined"!=typeof eventjs&&t in eventjs&&(eventjs[t](n,"gesture",this._onGesture),eventjs[t](n,"drag",this._onDrag),eventjs[t](n,"orientation",this._onOrientationChange),eventjs[t](n,"shake",this._onShake),eventjs[t](n,"longpress",this._onLongPress))},
/**
         * Removes all event listeners
         */
removeListeners:function(){this.addOrRemove(t,"remove");var e=this._getEventPrefix();t(f.document,e+"up",this._onMouseUp),t(f.document,"touchend",this._onTouchEnd,i),t(f.document,e+"move",this._onMouseMove,i),t(f.document,"touchmove",this._onMouseMove,i)},
/**
         * @private
         */
_bindEvents:function(){this.eventsBound||(this._onMouseDown=this._onMouseDown.bind(this),this._onTouchStart=this._onTouchStart.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this),this._onMouseEnter=this._onMouseEnter.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this._onDoubleClick=this._onDoubleClick.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDragEnter=this._simpleEventHandler.bind(this,"dragenter"),this._onDragLeave=this._simpleEventHandler.bind(this,"dragleave"),this._onDrop=this._onDrop.bind(this),this.eventsBound=!0)},
/**
         * @private
         * @param {Event} [e] Event object fired on Event.js gesture
         * @param {Event} [self] Inner Event object
         */
_onGesture:function(e,t){this.__onTransformGesture&&this.__onTransformGesture(e,t)},
/**
         * @private
         * @param {Event} [e] Event object fired on Event.js drag
         * @param {Event} [self] Inner Event object
         */
_onDrag:function(e,t){this.__onDrag&&this.__onDrag(e,t)},
/**
         * @private
         * @param {Event} [e] Event object fired on wheel event
         */
_onMouseWheel:function(e){this.__onMouseWheel(e)},
/**
         * @private
         * @param {Event} e Event object fired on mousedown
         */
_onMouseOut:function(e){var t=this._hoveredTarget;this.fire("mouse:out",{target:t,e:e}),this._hoveredTarget=null,t&&t.fire("mouseout",{e:e});var i=this;this._hoveredTargets.forEach((function(n){i.fire("mouse:out",{target:t,e:e}),n&&t.fire("mouseout",{e:e})})),this._hoveredTargets=[],this._iTextInstances&&this._iTextInstances.forEach((function(e){e.isEditing&&e.hiddenTextarea.focus()}))},
/**
         * @private
         * @param {Event} e Event object fired on mouseenter
         */
_onMouseEnter:function(e){this._currentTransform||this.findTarget(e)||(this.fire("mouse:over",{target:null,e:e}),this._hoveredTarget=null,this._hoveredTargets=[])},
/**
         * @private
         * @param {Event} [e] Event object fired on Event.js orientation change
         * @param {Event} [self] Inner Event object
         */
_onOrientationChange:function(e,t){this.__onOrientationChange&&this.__onOrientationChange(e,t)},
/**
         * @private
         * @param {Event} [e] Event object fired on Event.js shake
         * @param {Event} [self] Inner Event object
         */
_onShake:function(e,t){this.__onShake&&this.__onShake(e,t)},
/**
         * @private
         * @param {Event} [e] Event object fired on Event.js shake
         * @param {Event} [self] Inner Event object
         */
_onLongPress:function(e,t){this.__onLongPress&&this.__onLongPress(e,t)},
/**
         * prevent default to allow drop event to be fired
         * @private
         * @param {Event} [e] Event object fired on Event.js shake
         */
_onDragOver:function(e){e.preventDefault();var t=this._simpleEventHandler("dragover",e);this._fireEnterLeaveEvents(t,e)},
/**
         * `drop:before` is a an event that allow you to schedule logic
         * before the `drop` event. Prefer `drop` event always, but if you need
         * to run some drop-disabling logic on an event, since there is no way
         * to handle event handlers ordering, use `drop:before`
         * @param {Event} e
         */
_onDrop:function(e){return this._simpleEventHandler("drop:before",e),this._simpleEventHandler("drop",e)},
/**
         * @private
         * @param {Event} e Event object fired on mousedown
         */
_onContextMenu:function(e){return this.stopContextMenu&&(e.stopPropagation(),e.preventDefault()),!1},
/**
         * @private
         * @param {Event} e Event object fired on mousedown
         */
_onDoubleClick:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"dblclick"),this._resetTransformEventData(e)},
/**
         * Return a the id of an event.
         * returns either the pointerId or the identifier or 0 for the mouse event
         * @private
         * @param {Event} evt Event object
         */
getPointerId:function(e){var t=e.changedTouches;return t?t[0]&&t[0].identifier:this.enablePointerEvents?e.pointerId:-1},
/**
         * Determines if an event has the id of the event that is considered main
         * @private
         * @param {evt} event Event object
         */
_isMainEvent:function(e){return!0===e.isPrimary||!1!==e.isPrimary&&("touchend"===e.type&&0===e.touches.length||(!e.changedTouches||e.changedTouches[0].identifier===this.mainTouchId))},
/**
         * @private
         * @param {Event} e Event object fired on mousedown
         */
_onTouchStart:function(n){n.preventDefault(),null===this.mainTouchId&&(this.mainTouchId=this.getPointerId(n)),this.__onMouseDown(n),this._resetTransformEventData();var s=this.upperCanvasEl,r=this._getEventPrefix();e(f.document,"touchend",this._onTouchEnd,i),e(f.document,"touchmove",this._onMouseMove,i),t(s,r+"down",this._onMouseDown)},
/**
         * @private
         * @param {Event} e Event object fired on mousedown
         */
_onMouseDown:function(n){this.__onMouseDown(n),this._resetTransformEventData();var s=this.upperCanvasEl,r=this._getEventPrefix();t(s,r+"move",this._onMouseMove,i),e(f.document,r+"up",this._onMouseUp),e(f.document,r+"move",this._onMouseMove,i)},
/**
         * @private
         * @param {Event} e Event object fired on mousedown
         */
_onTouchEnd:function(n){if(!(n.touches.length>0)){this.__onMouseUp(n),this._resetTransformEventData(),this.mainTouchId=null;var s=this._getEventPrefix();t(f.document,"touchend",this._onTouchEnd,i),t(f.document,"touchmove",this._onMouseMove,i);var r=this;this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout((function(){e(r.upperCanvasEl,s+"down",r._onMouseDown),r._willAddMouseDown=0}),400)}},
/**
         * @private
         * @param {Event} e Event object fired on mouseup
         */
_onMouseUp:function(n){this.__onMouseUp(n),this._resetTransformEventData();var s=this.upperCanvasEl,r=this._getEventPrefix();this._isMainEvent(n)&&(t(f.document,r+"up",this._onMouseUp),t(f.document,r+"move",this._onMouseMove,i),e(s,r+"move",this._onMouseMove,i))},
/**
         * @private
         * @param {Event} e Event object fired on mousemove
         */
_onMouseMove:function(e){!this.allowTouchScrolling&&e.preventDefault&&e.preventDefault(),this.__onMouseMove(e)},
/**
         * @private
         */
_onResize:function(){this.calcOffset()},
/**
         * Decides whether the canvas should be redrawn in mouseup and mousedown events.
         * @private
         * @param {Object} target
         */
_shouldRender:function(e){var t=this._activeObject;return!!(!!t!=!!e||t&&e&&t!==e)||(t&&t.isEditing,!1)},
/**
         * Method that defines the actions when mouse is released on canvas.
         * The method resets the currentTransform parameters, store the image corner
         * position in the image object and render the canvas on top.
         * @private
         * @param {Event} e Event object fired on mouseup
         */
__onMouseUp:function(e){var t,i=this._currentTransform,s=this._groupSelector,r=!1,a=!s||0===s.left&&0===s.top;if(this._cacheTransformEventData(e),t=this._target,this._handleEvent(e,"up:before"),n(e,3))this.fireRightClick&&this._handleEvent(e,"up",3,a);else{if(n(e,2))return this.fireMiddleClick&&this._handleEvent(e,"up",2,a),void this._resetTransformEventData();if(this.isDrawingMode&&this._isCurrentlyDrawing)this._onMouseUpInDrawingMode(e);else if(this._isMainEvent(e)){if(i&&(this._finalizeCurrentTransform(e),r=i.actionPerformed),!a){var o=t===this._activeObject;this._maybeGroupObjects(e),r||(r=this._shouldRender(t)||!o&&t===this._activeObject)}var l,A;if(t){if(l=t._findTargetCorner(this.getPointer(e,!0),f.util.isTouchEvent(e)),t.selectable&&t!==this._activeObject&&"up"===t.activeOn)this.setActiveObject(t,e),r=!0;else{var c=t.controls[l],u=c&&c.getMouseUpHandler(e,t,c);u&&u(e,i,(A=this.getPointer(e)).x,A.y)}t.isMoving=!1}if(i&&(i.target!==t||i.corner!==l)){var h=i.target&&i.target.controls[i.corner],d=h&&h.getMouseUpHandler(e,t,c);A=A||this.getPointer(e),d&&d(e,i,A.x,A.y)}this._setCursorFromEvent(e,t),this._handleEvent(e,"up",1,a),this._groupSelector=null,this._currentTransform=null,t&&(t.__corner=0),r?this.requestRenderAll():a||this.renderTop()}}},
/**
         * @private
         * Handle event firing for target and subtargets
         * @param {Event} e event from mouse
         * @param {String} eventType event to fire (up, down or move)
         * @return {Fabric.Object} target return the the target found, for internal reasons.
         */
_simpleEventHandler:function(e,t){var i=this.findTarget(t),n=this.targets,s={e:t,target:i,subTargets:n};if(this.fire(e,s),i&&i.fire(e,s),!n)return i;for(var r=0;r<n.length;r++)n[r].fire(e,s);return i},
/**
         * @private
         * Handle event firing for target and subtargets
         * @param {Event} e event from mouse
         * @param {String} eventType event to fire (up, down or move)
         * @param {fabric.Object} targetObj receiving event
         * @param {Number} [button] button used in the event 1 = left, 2 = middle, 3 = right
         * @param {Boolean} isClick for left button only, indicates that the mouse up happened without move.
         */
_handleEvent:function(e,t,i,n){var s=this._target,r=this.targets||[],a={e:e,target:s,subTargets:r,button:i||1,isClick:n||!1,pointer:this._pointer,absolutePointer:this._absolutePointer,transform:this._currentTransform};"up"===t&&(a.currentTarget=this.findTarget(e),a.currentSubTargets=this.targets),this.fire("mouse:"+t,a),s&&s.fire("mouse"+t,a);for(var o=0;o<r.length;o++)r[o].fire("mouse"+t,a)},
/**
         * @private
         * @param {Event} e send the mouse event that generate the finalize down, so it can be used in the event
         */
_finalizeCurrentTransform:function(e){var t=this._currentTransform,i=t.target,n={e:e,target:i,transform:t,action:t.action};i._scaling&&(i._scaling=!1),i.setCoords(),(t.actionPerformed||this.stateful&&i.hasStateChanged())&&this._fire("modified",n)},
/**
         * @private
         * @param {Event} e Event object fired on mousedown
         */
_onMouseDownInDrawingMode:function(e){this._isCurrentlyDrawing=!0,this.getActiveObject()&&this.discardActiveObject(e).requestRenderAll();var t=this.getPointer(e);this.freeDrawingBrush.onMouseDown(t,{e:e,pointer:t}),this._handleEvent(e,"down")},
/**
         * @private
         * @param {Event} e Event object fired on mousemove
         */
_onMouseMoveInDrawingMode:function(e){if(this._isCurrentlyDrawing){var t=this.getPointer(e);this.freeDrawingBrush.onMouseMove(t,{e:e,pointer:t})}this.setCursor(this.freeDrawingCursor),this._handleEvent(e,"move")},
/**
         * @private
         * @param {Event} e Event object fired on mouseup
         */
_onMouseUpInDrawingMode:function(e){var t=this.getPointer(e);this._isCurrentlyDrawing=this.freeDrawingBrush.onMouseUp({e:e,pointer:t}),this._handleEvent(e,"up")},
/**
         * Method that defines the actions when mouse is clicked on canvas.
         * The method inits the currentTransform parameters and renders all the
         * canvas so the current image can be placed on the top canvas and the rest
         * in on the container one.
         * @private
         * @param {Event} e Event object fired on mousedown
         */
__onMouseDown:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"down:before");var t=this._target;if(n(e,3))this.fireRightClick&&this._handleEvent(e,"down",3);else if(n(e,2))this.fireMiddleClick&&this._handleEvent(e,"down",2);else if(this.isDrawingMode)this._onMouseDownInDrawingMode(e);else if(this._isMainEvent(e)&&!this._currentTransform){var i=this._pointer;this._previousPointer=i;var s=this._shouldRender(t),r=this._shouldGroup(e,t);if(this._shouldClearSelection(e,t)?this.discardActiveObject(e):r&&(this._handleGrouping(e,t),t=this._activeObject),!this.selection||t&&(t.selectable||t.isEditing||t===this._activeObject)||(this._groupSelector={ex:this._absolutePointer.x,ey:this._absolutePointer.y,top:0,left:0}),t){var a=t===this._activeObject;t.selectable&&"down"===t.activeOn&&this.setActiveObject(t,e);var o=t._findTargetCorner(this.getPointer(e,!0),f.util.isTouchEvent(e));if(t.__corner=o,t===this._activeObject&&(o||!r)){this._setupCurrentTransform(e,t,a);var l=t.controls[o],A=(i=this.getPointer(e),l&&l.getMouseDownHandler(e,t,l));A&&A(e,this._currentTransform,i.x,i.y)}}this._handleEvent(e,"down"),(s||r)&&this.requestRenderAll()}},
/**
         * reset cache form common information needed during event processing
         * @private
         */
_resetTransformEventData:function(){this._target=null,this._pointer=null,this._absolutePointer=null},
/**
         * Cache common information needed during event processing
         * @private
         * @param {Event} e Event object fired on event
         */
_cacheTransformEventData:function(e){this._resetTransformEventData(),this._pointer=this.getPointer(e,!0),this._absolutePointer=this.restorePointerVpt(this._pointer),this._target=this._currentTransform?this._currentTransform.target:this.findTarget(e)||null},
/**
         * @private
         */
_beforeTransform:function(e){var t=this._currentTransform;this.stateful&&t.target.saveState(),this.fire("before:transform",{e:e,transform:t})},
/**
         * Method that defines the actions when mouse is hovering the canvas.
         * The currentTransform parameter will define whether the user is rotating/scaling/translating
         * an image or neither of them (only hovering). A group selection is also possible and would cancel
         * all any other type of action.
         * In case of an image transformation only the top canvas will be rendered.
         * @private
         * @param {Event} e Event object fired on mousemove
         */
__onMouseMove:function(e){var t,i;if(this._handleEvent(e,"move:before"),this._cacheTransformEventData(e),this.isDrawingMode)this._onMouseMoveInDrawingMode(e);else if(this._isMainEvent(e)){var n=this._groupSelector;n?(i=this._absolutePointer,n.left=i.x-n.ex,n.top=i.y-n.ey,this.renderTop()):this._currentTransform?this._transformObject(e):(t=this.findTarget(e)||null,this._setCursorFromEvent(e,t),this._fireOverOutEvents(t,e)),this._handleEvent(e,"move"),this._resetTransformEventData()}},
/**
         * Manage the mouseout, mouseover events for the fabric object on the canvas
         * @param {Fabric.Object} target the target where the target from the mousemove event
         * @param {Event} e Event object fired on mousemove
         * @private
         */
_fireOverOutEvents:function(e,t){var i=this._hoveredTarget,n=this._hoveredTargets,s=this.targets,r=Math.max(n.length,s.length);this.fireSyntheticInOutEvents(e,t,{oldTarget:i,evtOut:"mouseout",canvasEvtOut:"mouse:out",evtIn:"mouseover",canvasEvtIn:"mouse:over"});for(var a=0;a<r;a++)this.fireSyntheticInOutEvents(s[a],t,{oldTarget:n[a],evtOut:"mouseout",evtIn:"mouseover"});this._hoveredTarget=e,this._hoveredTargets=this.targets.concat()},
/**
         * Manage the dragEnter, dragLeave events for the fabric objects on the canvas
         * @param {Fabric.Object} target the target where the target from the onDrag event
         * @param {Event} e Event object fired on ondrag
         * @private
         */
_fireEnterLeaveEvents:function(e,t){var i=this._draggedoverTarget,n=this._hoveredTargets,s=this.targets,r=Math.max(n.length,s.length);this.fireSyntheticInOutEvents(e,t,{oldTarget:i,evtOut:"dragleave",evtIn:"dragenter"});for(var a=0;a<r;a++)this.fireSyntheticInOutEvents(s[a],t,{oldTarget:n[a],evtOut:"dragleave",evtIn:"dragenter"});this._draggedoverTarget=e},
/**
         * Manage the synthetic in/out events for the fabric objects on the canvas
         * @param {Fabric.Object} target the target where the target from the supported events
         * @param {Event} e Event object fired
         * @param {Object} config configuration for the function to work
         * @param {String} config.targetName property on the canvas where the old target is stored
         * @param {String} [config.canvasEvtOut] name of the event to fire at canvas level for out
         * @param {String} config.evtOut name of the event to fire for out
         * @param {String} [config.canvasEvtIn] name of the event to fire at canvas level for in
         * @param {String} config.evtIn name of the event to fire for in
         * @private
         */
fireSyntheticInOutEvents:function(e,t,i){var n,s,r,a=i.oldTarget,o=a!==e,l=i.canvasEvtIn,A=i.canvasEvtOut;o&&(n={e:t,target:e,previousTarget:a},s={e:t,target:a,nextTarget:e}),r=e&&o,a&&o&&(A&&this.fire(A,s),a.fire(i.evtOut,s)),r&&(l&&this.fire(l,n),e.fire(i.evtIn,n))},
/**
         * Method that defines actions when an Event Mouse Wheel
         * @param {Event} e Event object fired on mouseup
         */
__onMouseWheel:function(e){this._cacheTransformEventData(e),this._handleEvent(e,"wheel"),this._resetTransformEventData()},
/**
         * @private
         * @param {Event} e Event fired on mousemove
         */
_transformObject:function(e){var t=this.getPointer(e),i=this._currentTransform;i.reset=!1,i.shiftKey=e.shiftKey,i.altKey=e[this.centeredKey],this._performTransformAction(e,i,t),i.actionPerformed&&this.requestRenderAll()},
/**
         * @private
         */
_performTransformAction:function(e,t,i){var n=i.x,s=i.y,r=t.action,a=!1,o=t.actionHandler;o&&(a=o(e,t,n,s)),"drag"===r&&a&&(t.target.isMoving=!0,this.setCursor(t.target.moveCursor||this.moveCursor)),t.actionPerformed=t.actionPerformed||a},
/**
         * @private
         */
_fire:f.controlsUtils.fireEvent,
/**
         * Sets the cursor depending on where the canvas is being hovered.
         * Note: very buggy in Opera
         * @param {Event} e Event object
         * @param {Object} target Object that the mouse is hovering, if so.
         */
_setCursorFromEvent:function(e,t){if(!t)return this.setCursor(this.defaultCursor),!1;var i=t.hoverCursor||this.hoverCursor,n=this._activeObject&&"activeSelection"===this._activeObject.type?this._activeObject:null,s=(!n||!n.contains(t))&&t._findTargetCorner(this.getPointer(e,!0));s?this.setCursor(this.getCornerCursor(s,t,e)):(t.subTargetCheck&&this.targets.concat().reverse().map((function(e){i=e.hoverCursor||i})),this.setCursor(i))},
/**
         * @private
         */
getCornerCursor:function(e,t,i){var n=t.controls[e];return n.cursorStyleHandler(i,n,t)}})}(),c=Math.min,u=Math.max,f.util.object.extend(f.Canvas.prototype,
/** @lends fabric.Canvas.prototype */
{
/**
         * @private
         * @param {Event} e Event object
         * @param {fabric.Object} target
         * @return {Boolean}
         */
_shouldGroup:function(e,t){var i=this._activeObject;return i&&this._isSelectionKeyPressed(e)&&t&&t.selectable&&this.selection&&(i!==t||"activeSelection"===i.type)&&!t.onSelect({e:e})},
/**
         * @private
         * @param {Event} e Event object
         * @param {fabric.Object} target
         */
_handleGrouping:function(e,t){var i=this._activeObject;i.__corner||(t!==i||(t=this.findTarget(e,!0))&&t.selectable)&&(i&&"activeSelection"===i.type?this._updateActiveSelection(t,e):this._createActiveSelection(t,e))},
/**
         * @private
         */
_updateActiveSelection:function(e,t){var i=this._activeObject,n=i._objects.slice(0);i.contains(e)?(i.removeWithUpdate(e),this._hoveredTarget=e,this._hoveredTargets=this.targets.concat(),1===i.size()&&this._setActiveObject(i.item(0),t)):(i.addWithUpdate(e),this._hoveredTarget=i,this._hoveredTargets=this.targets.concat()),this._fireSelectionEvents(n,t)},
/**
         * @private
         */
_createActiveSelection:function(e,t){var i=this.getActiveObjects(),n=this._createGroup(e);this._hoveredTarget=n,this._setActiveObject(n,t),this._fireSelectionEvents(i,t)},
/**
         * @private
         * @param {Object} target
         */
_createGroup:function(e){var t=this._objects,i=t.indexOf(this._activeObject)<t.indexOf(e)?[this._activeObject,e]:[e,this._activeObject];return this._activeObject.isEditing&&this._activeObject.exitEditing(),new f.ActiveSelection(i,{canvas:this})},
/**
         * @private
         * @param {Event} e mouse event
         */
_groupSelectedObjects:function(e){var t,i=this._collectObjects(e);1===i.length?this.setActiveObject(i[0],e):i.length>1&&(t=new f.ActiveSelection(i.reverse(),{canvas:this}),this.setActiveObject(t,e))},
/**
         * @private
         */
_collectObjects:function(e){for(var t,i=[],n=this._groupSelector.ex,s=this._groupSelector.ey,r=n+this._groupSelector.left,a=s+this._groupSelector.top,o=new f.Point(c(n,r),c(s,a)),l=new f.Point(u(n,r),u(s,a)),A=!this.selectionFullyContained,h=n===r&&s===a,d=this._objects.length;d--&&!((t=this._objects[d])&&t.selectable&&t.visible&&(A&&t.intersectsWithRect(o,l,!0)||t.isContainedWithinRect(o,l,!0)||A&&t.containsPoint(o,null,!0)||A&&t.containsPoint(l,null,!0))&&(i.push(t),h)););return i.length>1&&(i=i.filter((function(t){return!t.onSelect({e:e})}))),i},
/**
         * @private
         */
_maybeGroupObjects:function(e){this.selection&&this._groupSelector&&this._groupSelectedObjects(e),this.setCursor(this.defaultCursor),this._groupSelector=null}}),f.util.object.extend(f.StaticCanvas.prototype,
/** @lends fabric.StaticCanvas.prototype */
{
/**
         * Exports canvas element to a dataurl image. Note that when multiplier is used, cropping is scaled appropriately
         * @param {Object} [options] Options object
         * @param {String} [options.format=png] The format of the output image. Either "jpeg" or "png"
         * @param {Number} [options.quality=1] Quality level (0..1). Only used for jpeg.
         * @param {Number} [options.multiplier=1] Multiplier to scale by, to have consistent
         * @param {Number} [options.left] Cropping left offset. Introduced in v1.2.14
         * @param {Number} [options.top] Cropping top offset. Introduced in v1.2.14
         * @param {Number} [options.width] Cropping width. Introduced in v1.2.14
         * @param {Number} [options.height] Cropping height. Introduced in v1.2.14
         * @param {Boolean} [options.enableRetinaScaling] Enable retina scaling for clone image. Introduce in 2.0.0
         * @return {String} Returns a data: URL containing a representation of the object in the format specified by options.format
         * @see {@link http://jsfiddle.net/fabricjs/NfZVb/|jsFiddle demo}
         * @example <caption>Generate jpeg dataURL with lower quality</caption>
         * var dataURL = canvas.toDataURL({
         *   format: 'jpeg',
         *   quality: 0.8
         * });
         * @example <caption>Generate cropped png dataURL (clipping of canvas)</caption>
         * var dataURL = canvas.toDataURL({
         *   format: 'png',
         *   left: 100,
         *   top: 100,
         *   width: 200,
         *   height: 200
         * });
         * @example <caption>Generate double scaled png dataURL</caption>
         * var dataURL = canvas.toDataURL({
         *   format: 'png',
         *   multiplier: 2
         * });
         */
toDataURL:function(e){e||(e={});var t=e.format||"png",i=e.quality||1,n=(e.multiplier||1)*(e.enableRetinaScaling?this.getRetinaScaling():1),s=this.toCanvasElement(n,e);return f.util.toDataURL(s,t,i)},
/**
         * Create a new HTMLCanvas element painted with the current canvas content.
         * No need to resize the actual one or repaint it.
         * Will transfer object ownership to a new canvas, paint it, and set everything back.
         * This is an intermediary step used to get to a dataUrl but also it is useful to
         * create quick image copies of a canvas without passing for the dataUrl string
         * @param {Number} [multiplier] a zoom factor.
         * @param {Object} [cropping] Cropping informations
         * @param {Number} [cropping.left] Cropping left offset.
         * @param {Number} [cropping.top] Cropping top offset.
         * @param {Number} [cropping.width] Cropping width.
         * @param {Number} [cropping.height] Cropping height.
         */
toCanvasElement:function(e,t){e=e||1;var i=((t=t||{}).width||this.width)*e,n=(t.height||this.height)*e,s=this.getZoom(),r=this.width,a=this.height,o=s*e,l=this.viewportTransform,A=(l[4]-(t.left||0))*e,c=(l[5]-(t.top||0))*e,u=this.interactive,h=[o,0,0,o,A,c],d=this.enableRetinaScaling,g=f.util.createCanvasElement(),p=this.contextTop;return g.width=i,g.height=n,this.contextTop=null,this.enableRetinaScaling=!1,this.interactive=!1,this.viewportTransform=h,this.width=i,this.height=n,this.calcViewportBoundaries(),this.renderCanvas(g.getContext("2d"),this._objects),this.viewportTransform=l,this.width=r,this.height=a,this.calcViewportBoundaries(),this.interactive=u,this.enableRetinaScaling=d,this.contextTop=p,g}}),f.util.object.extend(f.StaticCanvas.prototype,
/** @lends fabric.StaticCanvas.prototype */
{
/**
       * Populates canvas with data from the specified JSON.
       * JSON format must conform to the one of {@link fabric.Canvas#toJSON}
       * @param {String|Object} json JSON string or object
       * @param {Function} callback Callback, invoked when json is parsed
       *                            and corresponding objects (e.g: {@link fabric.Image})
       *                            are initialized
       * @param {Function} [reviver] Method for further parsing of JSON elements, called after each fabric object created.
       * @return {fabric.Canvas} instance
       * @chainable
       * @tutorial {@link http://fabricjs.com/fabric-intro-part-3#deserialization}
       * @see {@link http://jsfiddle.net/fabricjs/fmgXt/|jsFiddle demo}
       * @example <caption>loadFromJSON</caption>
       * canvas.loadFromJSON(json, canvas.renderAll.bind(canvas));
       * @example <caption>loadFromJSON with reviver</caption>
       * canvas.loadFromJSON(json, canvas.renderAll.bind(canvas), function(o, object) {
       *   // `o` = json object
       *   // `object` = fabric.Object instance
       *   // ... do some stuff ...
       * });
       */
loadFromJSON:function(e,t,i){if(e){var n="string"==typeof e?JSON.parse(e):f.util.object.clone(e),s=this,r=n.clipPath,a=this.renderOnAddRemove;return this.renderOnAddRemove=!1,delete n.clipPath,this._enlivenObjects(n.objects,(function(e){s.clear(),s._setBgOverlay(n,(function(){r?s._enlivenObjects([r],(function(i){s.clipPath=i[0],s.__setupCanvas.call(s,n,e,a,t)})):s.__setupCanvas.call(s,n,e,a,t)}))}),i),this}},
/**
       * @private
       * @param {Object} serialized Object with background and overlay information
       * @param {Array} restored canvas objects
       * @param {Function} cached renderOnAddRemove callback
       * @param {Function} callback Invoked after all background and overlay images/patterns loaded
       */
__setupCanvas:function(e,t,i,n){var s=this;t.forEach((function(e,t){s.insertAt(e,t)})),this.renderOnAddRemove=i,delete e.objects,delete e.backgroundImage,delete e.overlayImage,delete e.background,delete e.overlay,this._setOptions(e),this.renderAll(),n&&n()},
/**
       * @private
       * @param {Object} serialized Object with background and overlay information
       * @param {Function} callback Invoked after all background and overlay images/patterns loaded
       */
_setBgOverlay:function(e,t){var i={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(e.backgroundImage||e.overlayImage||e.background||e.overlay){var n=function(){i.backgroundImage&&i.overlayImage&&i.backgroundColor&&i.overlayColor&&t&&t()};this.__setBgOverlay("backgroundImage",e.backgroundImage,i,n),this.__setBgOverlay("overlayImage",e.overlayImage,i,n),this.__setBgOverlay("backgroundColor",e.background,i,n),this.__setBgOverlay("overlayColor",e.overlay,i,n)}else t&&t()},
/**
       * @private
       * @param {String} property Property to set (backgroundImage, overlayImage, backgroundColor, overlayColor)
       * @param {(Object|String)} value Value to set
       * @param {Object} loaded Set loaded property to true if property is set
       * @param {Object} callback Callback function to invoke after property is set
       */
__setBgOverlay:function(e,t,i,n){var s=this;if(!t)return i[e]=!0,void(n&&n());"backgroundImage"===e||"overlayImage"===e?f.util.enlivenObjects([t],(function(t){s[e]=t[0],i[e]=!0,n&&n()})):this["set"+f.util.string.capitalize(e,!0)](t,(function(){i[e]=!0,n&&n()}))},
/**
       * @private
       * @param {Array} objects
       * @param {Function} callback
       * @param {Function} [reviver]
       */
_enlivenObjects:function(e,t,i){e&&0!==e.length?f.util.enlivenObjects(e,(function(e){t&&t(e)}),null,i):t&&t([])},
/**
       * @private
       * @param {String} format
       * @param {Function} callback
       */
_toDataURL:function(e,t){this.clone((function(i){t(i.toDataURL(e))}))},
/**
       * @private
       * @param {String} format
       * @param {Number} multiplier
       * @param {Function} callback
       */
_toDataURLWithMultiplier:function(e,t,i){this.clone((function(n){i(n.toDataURLWithMultiplier(e,t))}))},
/**
       * Clones canvas instance
       * @param {Object} [callback] Receives cloned instance as a first argument
       * @param {Array} [properties] Array of properties to include in the cloned canvas and children
       */
clone:function(e,t){var i=JSON.stringify(this.toJSON(t));this.cloneWithoutData((function(t){t.loadFromJSON(i,(function(){e&&e(t)}))}))},
/**
       * Clones canvas instance without cloning existing data.
       * This essentially copies canvas dimensions, clipping properties, etc.
       * but leaves data empty (so that you can populate it with your own)
       * @param {Object} [callback] Receives cloned instance as a first argument
       */
cloneWithoutData:function(e){var t=f.util.createCanvasElement();t.width=this.width,t.height=this.height;var i=new f.Canvas(t);this.backgroundImage?(i.setBackgroundImage(this.backgroundImage.src,(function(){i.renderAll(),e&&e(i)})),i.backgroundImageOpacity=this.backgroundImageOpacity,i.backgroundImageStretch=this.backgroundImageStretch):e&&e(i)}}),function(e){var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.util.object.clone,s=t.util.toFixed,r=t.util.string.capitalize,a=t.util.degreesToRadians,o=!t.isLikelyNode;t.Object||(t.Object=t.util.createClass(t.CommonMethods,
/** @lends fabric.Object.prototype */
{
/**
         * Type of an object (rect, circle, path, etc.).
         * Note that this property is meant to be read-only and not meant to be modified.
         * If you modify, certain parts of Fabric (such as JSON loading) won't work correctly.
         * @type String
         * @default
         */
type:"object",
/**
         * Horizontal origin of transformation of an object (one of "left", "right", "center")
         * See http://jsfiddle.net/1ow02gea/244/ on how originX/originY affect objects in groups
         * @type String
         * @default
         */
originX:"left",
/**
         * Vertical origin of transformation of an object (one of "top", "bottom", "center")
         * See http://jsfiddle.net/1ow02gea/244/ on how originX/originY affect objects in groups
         * @type String
         * @default
         */
originY:"top",
/**
         * Top position of an object. Note that by default it's relative to object top. You can change this by setting originY={top/center/bottom}
         * @type Number
         * @default
         */
top:0,
/**
         * Left position of an object. Note that by default it's relative to object left. You can change this by setting originX={left/center/right}
         * @type Number
         * @default
         */
left:0,
/**
         * Object width
         * @type Number
         * @default
         */
width:0,
/**
         * Object height
         * @type Number
         * @default
         */
height:0,
/**
         * Object scale factor (horizontal)
         * @type Number
         * @default
         */
scaleX:1,
/**
         * Object scale factor (vertical)
         * @type Number
         * @default
         */
scaleY:1,
/**
         * When true, an object is rendered as flipped horizontally
         * @type Boolean
         * @default
         */
flipX:!1,
/**
         * When true, an object is rendered as flipped vertically
         * @type Boolean
         * @default
         */
flipY:!1,
/**
         * Opacity of an object
         * @type Number
         * @default
         */
opacity:1,
/**
         * Angle of rotation of an object (in degrees)
         * @type Number
         * @default
         */
angle:0,
/**
         * Angle of skew on x axes of an object (in degrees)
         * @type Number
         * @default
         */
skewX:0,
/**
         * Angle of skew on y axes of an object (in degrees)
         * @type Number
         * @default
         */
skewY:0,
/**
         * Size of object's controlling corners (in pixels)
         * @type Number
         * @default
         */
cornerSize:13,
/**
         * Size of object's controlling corners when touch interaction is detected
         * @type Number
         * @default
         */
touchCornerSize:24,
/**
         * When true, object's controlling corners are rendered as transparent inside (i.e. stroke instead of fill)
         * @type Boolean
         * @default
         */
transparentCorners:!0,
/**
         * Default cursor value used when hovering over this object on canvas
         * @type String
         * @default
         */
hoverCursor:null,
/**
         * Default cursor value used when moving this object on canvas
         * @type String
         * @default
         */
moveCursor:null,
/**
         * Padding between object and its controlling borders (in pixels)
         * @type Number
         * @default
         */
padding:0,
/**
         * Color of controlling borders of an object (when it's active)
         * @type String
         * @default
         */
borderColor:"rgb(178,204,255)",
/**
         * Array specifying dash pattern of an object's borders (hasBorder must be true)
         * @since 1.6.2
         * @type Array
         */
borderDashArray:null,
/**
         * Color of controlling corners of an object (when it's active)
         * @type String
         * @default
         */
cornerColor:"rgb(178,204,255)",
/**
         * Color of controlling corners of an object (when it's active and transparentCorners false)
         * @since 1.6.2
         * @type String
         * @default
         */
cornerStrokeColor:null,
/**
         * Specify style of control, 'rect' or 'circle'
         * @since 1.6.2
         * @type String
         */
cornerStyle:"rect",
/**
         * Array specifying dash pattern of an object's control (hasBorder must be true)
         * @since 1.6.2
         * @type Array
         */
cornerDashArray:null,
/**
         * When true, this object will use center point as the origin of transformation
         * when being scaled via the controls.
         * <b>Backwards incompatibility note:</b> This property replaces "centerTransform" (Boolean).
         * @since 1.3.4
         * @type Boolean
         * @default
         */
centeredScaling:!1,
/**
         * When true, this object will use center point as the origin of transformation
         * when being rotated via the controls.
         * <b>Backwards incompatibility note:</b> This property replaces "centerTransform" (Boolean).
         * @since 1.3.4
         * @type Boolean
         * @default
         */
centeredRotation:!0,
/**
         * Color of object's fill
         * takes css colors https://www.w3.org/TR/css-color-3/
         * @type String
         * @default
         */
fill:"rgb(0,0,0)",
/**
         * Fill rule used to fill an object
         * accepted values are nonzero, evenodd
         * <b>Backwards incompatibility note:</b> This property was used for setting globalCompositeOperation until v1.4.12 (use `fabric.Object#globalCompositeOperation` instead)
         * @type String
         * @default
         */
fillRule:"nonzero",
/**
         * Composite rule used for canvas globalCompositeOperation
         * @type String
         * @default
         */
globalCompositeOperation:"source-over",
/**
         * Background color of an object.
         * takes css colors https://www.w3.org/TR/css-color-3/
         * @type String
         * @default
         */
backgroundColor:"",
/**
         * Selection Background color of an object. colored layer behind the object when it is active.
         * does not mix good with globalCompositeOperation methods.
         * @type String
         * @default
         */
selectionBackgroundColor:"",
/**
         * When defined, an object is rendered via stroke and this property specifies its color
         * takes css colors https://www.w3.org/TR/css-color-3/
         * @type String
         * @default
         */
stroke:null,
/**
         * Width of a stroke used to render this object
         * @type Number
         * @default
         */
strokeWidth:1,
/**
         * Array specifying dash pattern of an object's stroke (stroke must be defined)
         * @type Array
         */
strokeDashArray:null,
/**
         * Line offset of an object's stroke
         * @type Number
         * @default
         */
strokeDashOffset:0,
/**
         * Line endings style of an object's stroke (one of "butt", "round", "square")
         * @type String
         * @default
         */
strokeLineCap:"butt",
/**
         * Corner style of an object's stroke (one of "bevel", "round", "miter")
         * @type String
         * @default
         */
strokeLineJoin:"miter",
/**
         * Maximum miter length (used for strokeLineJoin = "miter") of an object's stroke
         * @type Number
         * @default
         */
strokeMiterLimit:4,
/**
         * Shadow object representing shadow of this shape
         * @type fabric.Shadow
         * @default
         */
shadow:null,
/**
         * Opacity of object's controlling borders when object is active and moving
         * @type Number
         * @default
         */
borderOpacityWhenMoving:.4,
/**
         * Scale factor of object's controlling borders
         * bigger number will make a thicker border
         * border is 1, so this is basically a border thickness
         * since there is no way to change the border itself.
         * @type Number
         * @default
         */
borderScaleFactor:1,
/**
         * Minimum allowed scale value of an object
         * @type Number
         * @default
         */
minScaleLimit:0,
/**
         * When set to `false`, an object can not be selected for modification (using either point-click-based or group-based selection).
         * But events still fire on it.
         * @type Boolean
         * @default
         */
selectable:!0,
/**
         * When set to `false`, an object can not be a target of events. All events propagate through it. Introduced in v1.3.4
         * @type Boolean
         * @default
         */
evented:!0,
/**
         * When set to `false`, an object is not rendered on canvas
         * @type Boolean
         * @default
         */
visible:!0,
/**
         * When set to `false`, object's controls are not displayed and can not be used to manipulate object
         * @type Boolean
         * @default
         */
hasControls:!0,
/**
         * When set to `false`, object's controlling borders are not rendered
         * @type Boolean
         * @default
         */
hasBorders:!0,
/**
         * When set to `true`, objects are "found" on canvas on per-pixel basis rather than according to bounding box
         * @type Boolean
         * @default
         */
perPixelTargetFind:!1,
/**
         * When `false`, default object's values are not included in its serialization
         * @type Boolean
         * @default
         */
includeDefaultValues:!0,
/**
         * When `true`, object horizontal movement is locked
         * @type Boolean
         * @default
         */
lockMovementX:!1,
/**
         * When `true`, object vertical movement is locked
         * @type Boolean
         * @default
         */
lockMovementY:!1,
/**
         * When `true`, object rotation is locked
         * @type Boolean
         * @default
         */
lockRotation:!1,
/**
         * When `true`, object horizontal scaling is locked
         * @type Boolean
         * @default
         */
lockScalingX:!1,
/**
         * When `true`, object vertical scaling is locked
         * @type Boolean
         * @default
         */
lockScalingY:!1,
/**
         * When `true`, object horizontal skewing is locked
         * @type Boolean
         * @default
         */
lockSkewingX:!1,
/**
         * When `true`, object vertical skewing is locked
         * @type Boolean
         * @default
         */
lockSkewingY:!1,
/**
         * When `true`, object cannot be flipped by scaling into negative values
         * @type Boolean
         * @default
         */
lockScalingFlip:!1,
/**
         * When `true`, object is not exported in OBJECT/JSON
         * @since 1.6.3
         * @type Boolean
         * @default
         */
excludeFromExport:!1,
/**
         * When `true`, object is cached on an additional canvas.
         * When `false`, object is not cached unless necessary ( clipPath )
         * default to true
         * @since 1.7.0
         * @type Boolean
         * @default true
         */
objectCaching:o,
/**
         * When `true`, object properties are checked for cache invalidation. In some particular
         * situation you may want this to be disabled ( spray brush, very big, groups)
         * or if your application does not allow you to modify properties for groups child you want
         * to disable it for groups.
         * default to false
         * since 1.7.0
         * @type Boolean
         * @default false
         */
statefullCache:!1,
/**
         * When `true`, cache does not get updated during scaling. The picture will get blocky if scaled
         * too much and will be redrawn with correct details at the end of scaling.
         * this setting is performance and application dependant.
         * default to true
         * since 1.7.0
         * @type Boolean
         * @default true
         */
noScaleCache:!0,
/**
         * When `false`, the stoke width will scale with the object.
         * When `true`, the stroke will always match the exact pixel size entered for stroke width.
         * this Property does not work on Text classes or drawing call that uses strokeText,fillText methods
         * default to false
         * @since 2.6.0
         * @type Boolean
         * @default false
         * @type Boolean
         * @default false
         */
strokeUniform:!1,
/**
         * When set to `true`, object's cache will be rerendered next render call.
         * since 1.7.0
         * @type Boolean
         * @default true
         */
dirty:!0,
/**
         * keeps the value of the last hovered corner during mouse move.
         * 0 is no corner, or 'mt', 'ml', 'mtr' etc..
         * It should be private, but there is no harm in using it as
         * a read-only property.
         * @type number|string|any
         * @default 0
         */
__corner:0,
/**
         * Determines if the fill or the stroke is drawn first (one of "fill" or "stroke")
         * @type String
         * @default
         */
paintFirst:"fill",
/**
         * When 'down', object is set to active on mousedown/touchstart
         * When 'up', object is set to active on mouseup/touchend
         * Experimental. Let's see if this breaks anything before supporting officially
         * @private
         * since 4.4.0
         * @type String
         * @default 'down'
         */
activeOn:"down",
/**
         * List of properties to consider when checking if state
         * of an object is changed (fabric.Object#hasStateChanged)
         * as well as for history (undo/redo) purposes
         * @type Array
         */
stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow visible backgroundColor skewX skewY fillRule paintFirst clipPath strokeUniform".split(" "),
/**
         * List of properties to consider when checking if cache needs refresh
         * Those properties are checked by statefullCache ON ( or lazy mode if we want ) or from single
         * calls to Object.set(key, value). If the key is in this list, the object is marked as dirty
         * and refreshed at the next render
         * @type Array
         */
cacheProperties:"fill stroke strokeWidth strokeDashArray width height paintFirst strokeUniform strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit backgroundColor clipPath".split(" "),
/**
         * List of properties to consider for animating colors.
         * @type Array
         */
colorProperties:"fill stroke backgroundColor".split(" "),
/**
         * a fabricObject that, without stroke define a clipping area with their shape. filled in black
         * the clipPath object gets used when the object has rendered, and the context is placed in the center
         * of the object cacheCanvas.
         * If you want 0,0 of a clipPath to align with an object center, use clipPath.originX/Y to 'center'
         * @type fabric.Object
         */
clipPath:void 0,
/**
         * Meaningful ONLY when the object is used as clipPath.
         * if true, the clipPath will make the object clip to the outside of the clipPath
         * since 2.4.0
         * @type boolean
         * @default false
         */
inverted:!1,
/**
         * Meaningful ONLY when the object is used as clipPath.
         * if true, the clipPath will have its top and left relative to canvas, and will
         * not be influenced by the object transform. This will make the clipPath relative
         * to the canvas, but clipping just a particular object.
         * WARNING this is beta, this feature may change or be renamed.
         * since 2.4.0
         * @type boolean
         * @default false
         */
absolutePositioned:!1,
/**
         * Constructor
         * @param {Object} [options] Options object
         */
initialize:function(e){e&&this.setOptions(e)},
/**
         * Create a the canvas used to keep the cached copy of the object
         * @private
         */
_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=t.util.createCanvasElement(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0},
/**
         * Limit the cache dimensions so that X * Y do not cross fabric.perfLimitSizeTotal
         * and each side do not cross fabric.cacheSideLimit
         * those numbers are configurable so that you can get as much detail as you want
         * making bargain with performances.
         * @param {Object} dims
         * @param {Object} dims.width width of canvas
         * @param {Object} dims.height height of canvas
         * @param {Object} dims.zoomX zoomX zoom value to unscale the canvas before drawing cache
         * @param {Object} dims.zoomY zoomY zoom value to unscale the canvas before drawing cache
         * @return {Object}.width width of canvas
         * @return {Object}.height height of canvas
         * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
         * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
         */
_limitCacheSize:function(e){var i=t.perfLimitSizeTotal,n=e.width,s=e.height,r=t.maxCacheSideLimit,a=t.minCacheSideLimit;if(n<=r&&s<=r&&n*s<=i)return n<a&&(e.width=a),s<a&&(e.height=a),e;var o=n/s,l=t.util.limitDimsByArea(o,i),A=t.util.capValue,c=A(a,l.x,r),u=A(a,l.y,r);return n>c&&(e.zoomX/=n/c,e.width=c,e.capped=!0),s>u&&(e.zoomY/=s/u,e.height=u,e.capped=!0),e},
/**
         * Return the dimension and the zoom level needed to create a cache canvas
         * big enough to host the object to be cached.
         * @private
         * @return {Object}.x width of object to be cached
         * @return {Object}.y height of object to be cached
         * @return {Object}.width width of canvas
         * @return {Object}.height height of canvas
         * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
         * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
         */
_getCacheCanvasDimensions:function(){var e=this.getTotalObjectScaling(),t=this._getTransformedDimensions(0,0),i=t.x*e.scaleX/this.scaleX,n=t.y*e.scaleY/this.scaleY;return{
// for sure this ALIASING_LIMIT is slightly creating problem
// in situation in which the cache canvas gets an upper limit
// also objectScale contains already scaleX and scaleY
width:i+2,height:n+2,zoomX:e.scaleX,zoomY:e.scaleY,x:i,y:n}},
/**
         * Update width and height of the canvas for cache
         * returns true or false if canvas needed resize.
         * @private
         * @return {Boolean} true if the canvas has been resized
         */
_updateCacheCanvas:function(){var e=this.canvas;if(this.noScaleCache&&e&&e._currentTransform){var i=e._currentTransform.target,n=e._currentTransform.action;if(this===i&&n.slice&&"scale"===n.slice(0,5))return!1}var s,r,a=this._cacheCanvas,o=this._limitCacheSize(this._getCacheCanvasDimensions()),l=t.minCacheSideLimit,A=o.width,c=o.height,u=o.zoomX,h=o.zoomY,d=A!==this.cacheWidth||c!==this.cacheHeight,g=this.zoomX!==u||this.zoomY!==h,p=d||g,f=0,m=0,C=!1;if(d){var I=this._cacheCanvas.width,v=this._cacheCanvas.height,B=A>I||c>v;C=B||(A<.9*I||c<.9*v)&&I>l&&v>l,B&&!o.capped&&(A>l||c>l)&&(f=.1*A,m=.1*c)}return this instanceof t.Text&&this.path&&(p=!0,C=!0,f+=this.getHeightOfLine(0)*this.zoomX,m+=this.getHeightOfLine(0)*this.zoomY),!!p&&(C?(a.width=Math.ceil(A+f),a.height=Math.ceil(c+m)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,a.width,a.height)),s=o.x/2,r=o.y/2,this.cacheTranslationX=Math.round(a.width/2-s)+s,this.cacheTranslationY=Math.round(a.height/2-r)+r,this.cacheWidth=A,this.cacheHeight=c,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(u,h),this.zoomX=u,this.zoomY=h,!0)},
/**
         * Sets object's properties from options
         * @param {Object} [options] Options object
         */
setOptions:function(e){this._setOptions(e),this._initGradient(e.fill,"fill"),this._initGradient(e.stroke,"stroke"),this._initPattern(e.fill,"fill"),this._initPattern(e.stroke,"stroke")},
/**
         * Transforms context when rendering an object
         * @param {CanvasRenderingContext2D} ctx Context
         */
transform:function(e){var t=this.group&&!this.group._transformDone||this.group&&this.canvas&&e===this.canvas.contextTop,i=this.calcTransformMatrix(!t);e.transform(i[0],i[1],i[2],i[3],i[4],i[5])},
/**
         * Returns an object representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} Object representation of an instance
         */
toObject:function(e){var i=t.Object.NUM_FRACTION_DIGITS,n={type:this.type,version:t.version,originX:this.originX,originY:this.originY,left:s(this.left,i),top:s(this.top,i),width:s(this.width,i),height:s(this.height,i),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:s(this.strokeWidth,i),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeDashOffset:this.strokeDashOffset,strokeLineJoin:this.strokeLineJoin,strokeUniform:this.strokeUniform,strokeMiterLimit:s(this.strokeMiterLimit,i),scaleX:s(this.scaleX,i),scaleY:s(this.scaleY,i),angle:s(this.angle,i),flipX:this.flipX,flipY:this.flipY,opacity:s(this.opacity,i),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,skewX:s(this.skewX,i),skewY:s(this.skewY,i)};return this.clipPath&&!this.clipPath.excludeFromExport&&(n.clipPath=this.clipPath.toObject(e),n.clipPath.inverted=this.clipPath.inverted,n.clipPath.absolutePositioned=this.clipPath.absolutePositioned),t.util.populateWithProperties(this,n,e),this.includeDefaultValues||(n=this._removeDefaultValues(n)),n},
/**
         * Returns (dataless) object representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} Object representation of an instance
         */
toDatalessObject:function(e){return this.toObject(e)},
/**
         * @private
         * @param {Object} object
         */
_removeDefaultValues:function(e){var i=t.util.getKlass(e.type).prototype;return i.stateProperties.forEach((function(t){"left"!==t&&"top"!==t&&(e[t]===i[t]&&delete e[t],"[object Array]"===Object.prototype.toString.call(e[t])&&"[object Array]"===Object.prototype.toString.call(i[t])&&0===e[t].length&&0===i[t].length&&delete e[t])})),e},
/**
         * Returns a string representation of an instance
         * @return {String}
         */
toString:function(){return"#<fabric."+r(this.type)+">"},
/**
         * Return the object scale factor counting also the group scaling
         * @return {Object} object with scaleX and scaleY properties
         */
getObjectScaling:function(){if(!this.group)return{scaleX:this.scaleX,scaleY:this.scaleY};var e=t.util.qrDecompose(this.calcTransformMatrix());return{scaleX:Math.abs(e.scaleX),scaleY:Math.abs(e.scaleY)}},
/**
         * Return the object scale factor counting also the group scaling, zoom and retina
         * @return {Object} object with scaleX and scaleY properties
         */
getTotalObjectScaling:function(){var e=this.getObjectScaling(),t=e.scaleX,i=e.scaleY;if(this.canvas){var n=this.canvas.getZoom(),s=this.canvas.getRetinaScaling();t*=n*s,i*=n*s}return{scaleX:t,scaleY:i}},
/**
         * Return the object opacity counting also the group property
         * @return {Number}
         */
getObjectOpacity:function(){var e=this.opacity;return this.group&&(e*=this.group.getObjectOpacity()),e},
/**
         * @private
         * @param {String} key
         * @param {*} value
         * @return {fabric.Object} thisArg
         */
_set:function(e,i){var n="scaleX"===e||"scaleY"===e,s=this[e]!==i,r=!1;return n&&(i=this._constrainScale(i)),"scaleX"===e&&i<0?(this.flipX=!this.flipX,i*=-1):"scaleY"===e&&i<0?(this.flipY=!this.flipY,i*=-1):"shadow"!==e||!i||i instanceof t.Shadow?"dirty"===e&&this.group&&this.group.set("dirty",i):i=new t.Shadow(i),this[e]=i,s&&(r=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(e)>-1?(this.dirty=!0,r&&this.group.set("dirty",!0)):r&&this.stateProperties.indexOf(e)>-1&&this.group.set("dirty",!0)),this},
/**
         * This callback function is called by the parent group of an object every
         * time a non-delegated property changes on the group. It is passed the key
         * and value as parameters. Not adding in this function's signature to avoid
         * Travis build error about unused variables.
         */
setOnGroup:function(){},
/**
         * Retrieves viewportTransform from Object's canvas if possible
         * @method getViewportTransform
         * @memberOf fabric.Object.prototype
         * @return {Array}
         */
getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:t.iMatrix.concat()},
/*
         * @private
         * return if the object would be visible in rendering
         * @memberOf fabric.Object.prototype
         * @return {Boolean}
         */
isNotVisible:function(){return 0===this.opacity||!this.width&&!this.height&&0===this.strokeWidth||!this.visible},
/**
         * Renders an object on a specified context
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
render:function(e){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(e.save(),this._setupCompositeOperation(e),this.drawSelectionBackground(e),this.transform(e),this._setOpacity(e),this._setShadow(e,this),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(e)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(e),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),e.restore())},renderCache:function(e){e=e||{},this._cacheCanvas||this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext,e.forClipping),this.dirty=!1)},
/**
         * Remove cacheCanvas and its dimensions from the objects
         */
_removeCacheCanvas:function(){this._cacheCanvas=null,this.cacheWidth=0,this.cacheHeight=0},
/**
         * return true if the object will draw a stroke
         * Does not consider text styles. This is just a shortcut used at rendering time
         * We want it to be an approximation and be fast.
         * wrote to avoid extra caching, it has to return true when stroke happens,
         * can guess when it will not happen at 100% chance, does not matter if it misses
         * some use case where the stroke is invisible.
         * @since 3.0.0
         * @returns Boolean
         */
hasStroke:function(){return this.stroke&&"transparent"!==this.stroke&&0!==this.strokeWidth},
/**
         * return true if the object will draw a fill
         * Does not consider text styles. This is just a shortcut used at rendering time
         * We want it to be an approximation and be fast.
         * wrote to avoid extra caching, it has to return true when fill happens,
         * can guess when it will not happen at 100% chance, does not matter if it misses
         * some use case where the fill is invisible.
         * @since 3.0.0
         * @returns Boolean
         */
hasFill:function(){return this.fill&&"transparent"!==this.fill},
/**
         * When set to `true`, force the object to have its own cache, even if it is inside a group
         * it may be needed when your object behave in a particular way on the cache and always needs
         * its own isolated canvas to render correctly.
         * Created to be overridden
         * since 1.7.12
         * @returns Boolean
         */
needsItsOwnCache:function(){return!("stroke"!==this.paintFirst||!this.hasFill()||!this.hasStroke()||"object"!=typeof this.shadow)||!!this.clipPath},
/**
         * Decide if the object should cache or not. Create its own cache level
         * objectCaching is a global flag, wins over everything
         * needsItsOwnCache should be used when the object drawing method requires
         * a cache step. None of the fabric classes requires it.
         * Generally you do not cache objects in groups because the group outside is cached.
         * Read as: cache if is needed, or if the feature is enabled but we are not already caching.
         * @return {Boolean}
         */
shouldCache:function(){return this.ownCaching=this.needsItsOwnCache()||this.objectCaching&&(!this.group||!this.group.isOnACache()),this.ownCaching},
/**
         * Check if this object or a child object will cast a shadow
         * used by Group.shouldCache to know if child has a shadow recursively
         * @return {Boolean}
         */
willDrawShadow:function(){return!!this.shadow&&(0!==this.shadow.offsetX||0!==this.shadow.offsetY)},
/**
         * Execute the drawing operation for an object clipPath
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {fabric.Object} clipPath
         */
drawClipPathOnCache:function(e,i){if(e.save(),i.inverted?e.globalCompositeOperation="destination-out":e.globalCompositeOperation="destination-in",i.absolutePositioned){var n=t.util.invertTransform(this.calcTransformMatrix());e.transform(n[0],n[1],n[2],n[3],n[4],n[5])}i.transform(e),e.scale(1/i.zoomX,1/i.zoomY),e.drawImage(i._cacheCanvas,-i.cacheTranslationX,-i.cacheTranslationY),e.restore()},
/**
         * Execute the drawing operation for an object on a specified context
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
drawObject:function(e,t){var i=this.fill,n=this.stroke;t?(this.fill="black",this.stroke="",this._setClippingProperties(e)):this._renderBackground(e),this._render(e),this._drawClipPath(e,this.clipPath),this.fill=i,this.stroke=n},
/**
         * Prepare clipPath state and cache and draw it on instance's cache
         * @param {CanvasRenderingContext2D} ctx
         * @param {fabric.Object} clipPath
         */
_drawClipPath:function(e,t){t&&(t.canvas=this.canvas,t.shouldCache(),t._transformDone=!0,t.renderCache({forClipping:!0}),this.drawClipPathOnCache(e,t))},
/**
         * Paint the cached copy of the object on the target context.
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
drawCacheOnCanvas:function(e){e.scale(1/this.zoomX,1/this.zoomY),e.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)},
/**
         * Check if cache is dirty
         * @param {Boolean} skipCanvas skip canvas checks because this object is painted
         * on parent canvas.
         */
isCacheDirty:function(e){if(this.isNotVisible())return!1;if(this._cacheCanvas&&!e&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&!e){var t=this.cacheWidth/this.zoomX,i=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-t/2,-i/2,t,i)}return!0}return!1},
/**
         * Draws a background for the object big as its untransformed dimensions
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_renderBackground:function(e){if(this.backgroundColor){var t=this._getNonTransformedDimensions();e.fillStyle=this.backgroundColor,e.fillRect(-t.x/2,-t.y/2,t.x,t.y),this._removeShadow(e)}},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_setOpacity:function(e){this.group&&!this.group._transformDone?e.globalAlpha=this.getObjectOpacity():e.globalAlpha*=this.opacity},_setStrokeStyles:function(e,t){var i=t.stroke;i&&(e.lineWidth=t.strokeWidth,e.lineCap=t.strokeLineCap,e.lineDashOffset=t.strokeDashOffset,e.lineJoin=t.strokeLineJoin,e.miterLimit=t.strokeMiterLimit,i.toLive?"percentage"===i.gradientUnits||i.gradientTransform||i.patternTransform?this._applyPatternForTransformedGradient(e,i):(e.strokeStyle=i.toLive(e,this),this._applyPatternGradientTransform(e,i)):e.strokeStyle=t.stroke)},_setFillStyles:function(e,t){var i=t.fill;i&&(i.toLive?(e.fillStyle=i.toLive(e,this),this._applyPatternGradientTransform(e,t.fill)):e.fillStyle=i)},_setClippingProperties:function(e){e.globalAlpha=1,e.strokeStyle="transparent",e.fillStyle="#000000"},
/**
         * @private
         * Sets line dash
         * @param {CanvasRenderingContext2D} ctx Context to set the dash line on
         * @param {Array} dashArray array representing dashes
         */
_setLineDash:function(e,t){t&&0!==t.length&&(1&t.length&&t.push.apply(t,t),e.setLineDash(t))},
/**
         * Renders controls and borders for the object
         * the context here is not transformed
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {Object} [styleOverride] properties to override the object style
         */
_renderControls:function(e,i){var n,s,r,o=this.getViewportTransform(),l=this.calcTransformMatrix();s=void 0!==(i=i||{}).hasBorders?i.hasBorders:this.hasBorders,r=void 0!==i.hasControls?i.hasControls:this.hasControls,l=t.util.multiplyTransformMatrices(o,l),n=t.util.qrDecompose(l),e.save(),e.translate(n.translateX,n.translateY),e.lineWidth=1*this.borderScaleFactor,this.group||(e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),this.flipX&&(n.angle-=180),e.rotate(a(this.group?n.angle:this.angle)),i.forActiveSelection||this.group?s&&this.drawBordersInGroup(e,n,i):s&&this.drawBorders(e,i),r&&this.drawControls(e,i),e.restore()},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_setShadow:function(e){if(this.shadow){var i,n=this.shadow,s=this.canvas,r=s&&s.viewportTransform[0]||1,a=s&&s.viewportTransform[3]||1;i=n.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),s&&s._isRetinaScaling()&&(r*=t.devicePixelRatio,a*=t.devicePixelRatio),e.shadowColor=n.color,e.shadowBlur=n.blur*t.browserShadowBlurConstant*(r+a)*(i.scaleX+i.scaleY)/4,e.shadowOffsetX=n.offsetX*r*i.scaleX,e.shadowOffsetY=n.offsetY*a*i.scaleY}},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_removeShadow:function(e){this.shadow&&(e.shadowColor="",e.shadowBlur=e.shadowOffsetX=e.shadowOffsetY=0)},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {Object} filler fabric.Pattern or fabric.Gradient
         * @return {Object} offset.offsetX offset for text rendering
         * @return {Object} offset.offsetY offset for text rendering
         */
_applyPatternGradientTransform:function(e,t){if(!t||!t.toLive)return{offsetX:0,offsetY:0};var i=t.gradientTransform||t.patternTransform,n=-this.width/2+t.offsetX||0,s=-this.height/2+t.offsetY||0;return"percentage"===t.gradientUnits?e.transform(this.width,0,0,this.height,n,s):e.transform(1,0,0,1,n,s),i&&e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),{offsetX:n,offsetY:s}},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_renderPaintInOrder:function(e){"stroke"===this.paintFirst?(this._renderStroke(e),this._renderFill(e)):(this._renderFill(e),this._renderStroke(e))},
/**
         * @private
         * function that actually render something on the context.
         * empty here to allow Obects to work on tests to benchmark fabric functionalites
         * not related to rendering
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_render:function(){},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_renderFill:function(e){this.fill&&(e.save(),this._setFillStyles(e,this),"evenodd"===this.fillRule?e.fill("evenodd"):e.fill(),e.restore())},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_renderStroke:function(e){if(this.stroke&&0!==this.strokeWidth){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(e),e.save(),this.strokeUniform&&this.group){var t=this.getObjectScaling();e.scale(1/t.scaleX,1/t.scaleY)}else this.strokeUniform&&e.scale(1/this.scaleX,1/this.scaleY);this._setLineDash(e,this.strokeDashArray),this._setStrokeStyles(e,this),e.stroke(),e.restore()}},
/**
         * This function try to patch the missing gradientTransform on canvas gradients.
         * transforming a context to transform the gradient, is going to transform the stroke too.
         * we want to transform the gradient but not the stroke operation, so we create
         * a transformed gradient on a pattern and then we use the pattern instead of the gradient.
         * this method has drwabacks: is slow, is in low resolution, needs a patch for when the size
         * is limited.
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {fabric.Gradient} filler a fabric gradient instance
         */
_applyPatternForTransformedGradient:function(e,i){var n,s=this._limitCacheSize(this._getCacheCanvasDimensions()),r=t.util.createCanvasElement(),a=this.canvas.getRetinaScaling(),o=s.x/this.scaleX/a,l=s.y/this.scaleY/a;r.width=o,r.height=l,(n=r.getContext("2d")).beginPath(),n.moveTo(0,0),n.lineTo(o,0),n.lineTo(o,l),n.lineTo(0,l),n.closePath(),n.translate(o/2,l/2),n.scale(s.zoomX/this.scaleX/a,s.zoomY/this.scaleY/a),this._applyPatternGradientTransform(n,i),n.fillStyle=i.toLive(e),n.fill(),e.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),e.scale(a*this.scaleX/s.zoomX,a*this.scaleY/s.zoomY),e.strokeStyle=n.createPattern(r,"no-repeat")},
/**
         * This function is an helper for svg import. it returns the center of the object in the svg
         * untransformed coordinates
         * @private
         * @return {Object} center point from element coordinates
         */
_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},
/**
         * This function is an helper for svg import. it decompose the transformMatrix
         * and assign properties to object.
         * untransformed coordinates
         * @private
         * @chainable
         */
_assignTransformMatrixProps:function(){if(this.transformMatrix){var e=t.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",e.scaleX),this.set("scaleY",e.scaleY),this.angle=e.angle,this.skewX=e.skewX,this.skewY=0}},
/**
         * This function is an helper for svg import. it removes the transform matrix
         * and set to object properties that fabricjs can handle
         * @private
         * @param {Object} preserveAspectRatioOptions
         * @return {thisArg}
         */
_removeTransformMatrix:function(e){var i=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),i=t.util.transformPoint(i,this.transformMatrix)),this.transformMatrix=null,e&&(this.scaleX*=e.scaleX,this.scaleY*=e.scaleY,this.cropX=e.cropX,this.cropY=e.cropY,i.x+=e.offsetLeft,i.y+=e.offsetTop,this.width=e.width,this.height=e.height),this.setPositionByOrigin(i,"center","center")},
/**
         * Clones an instance, using a callback method will work for every object.
         * @param {Function} callback Callback is invoked with a clone as a first argument
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         */
clone:function(e,i){var n=this.toObject(i);this.constructor.fromObject?this.constructor.fromObject(n,e):t.Object._fromObject("Object",n,e)},
/**
         * Creates an instance of fabric.Image out of an object
         * makes use of toCanvasElement.
         * Once this method was based on toDataUrl and loadImage, so it also had a quality
         * and format option. toCanvasElement is faster and produce no loss of quality.
         * If you need to get a real Jpeg or Png from an object, using toDataURL is the right way to do it.
         * toCanvasElement and then toBlob from the obtained canvas is also a good option.
         * This method is sync now, but still support the callback because we did not want to break.
         * When fabricJS 5.0 will be planned, this will probably be changed to not have a callback.
         * @param {Function} callback callback, invoked with an instance as a first argument
         * @param {Object} [options] for clone as image, passed to toDataURL
         * @param {Number} [options.multiplier=1] Multiplier to scale by
         * @param {Number} [options.left] Cropping left offset. Introduced in v1.2.14
         * @param {Number} [options.top] Cropping top offset. Introduced in v1.2.14
         * @param {Number} [options.width] Cropping width. Introduced in v1.2.14
         * @param {Number} [options.height] Cropping height. Introduced in v1.2.14
         * @param {Boolean} [options.enableRetinaScaling] Enable retina scaling for clone image. Introduce in 1.6.4
         * @param {Boolean} [options.withoutTransform] Remove current object transform ( no scale , no angle, no flip, no skew ). Introduced in 2.3.4
         * @param {Boolean} [options.withoutShadow] Remove current object shadow. Introduced in 2.4.2
         * @return {fabric.Object} thisArg
         */
cloneAsImage:function(e,i){var n=this.toCanvasElement(i);return e&&e(new t.Image(n)),this},
/**
         * Converts an object into a HTMLCanvas element
         * @param {Object} options Options object
         * @param {Number} [options.multiplier=1] Multiplier to scale by
         * @param {Number} [options.left] Cropping left offset. Introduced in v1.2.14
         * @param {Number} [options.top] Cropping top offset. Introduced in v1.2.14
         * @param {Number} [options.width] Cropping width. Introduced in v1.2.14
         * @param {Number} [options.height] Cropping height. Introduced in v1.2.14
         * @param {Boolean} [options.enableRetinaScaling] Enable retina scaling for clone image. Introduce in 1.6.4
         * @param {Boolean} [options.withoutTransform] Remove current object transform ( no scale , no angle, no flip, no skew ). Introduced in 2.3.4
         * @param {Boolean} [options.withoutShadow] Remove current object shadow. Introduced in 2.4.2
         * @return {HTMLCanvasElement} Returns DOM element <canvas> with the fabric.Object
         */
toCanvasElement:function(e){e||(e={});var i=t.util,n=i.saveObjectTransform(this),s=this.group,r=this.shadow,a=Math.abs,o=(e.multiplier||1)*(e.enableRetinaScaling?t.devicePixelRatio:1);delete this.group,e.withoutTransform&&i.resetObjectTransform(this),e.withoutShadow&&(this.shadow=null);var l,A,c,u,h=t.util.createCanvasElement(),d=this.getBoundingRect(!0,!0),g=this.shadow,p={x:0,y:0};g&&(A=g.blur,l=g.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),p.x=2*Math.round(a(g.offsetX)+A)*a(l.scaleX),p.y=2*Math.round(a(g.offsetY)+A)*a(l.scaleY)),c=d.width+p.x,u=d.height+p.y,h.width=Math.ceil(c),h.height=Math.ceil(u);var f=new t.StaticCanvas(h,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1});"jpeg"===e.format&&(f.backgroundColor="#fff"),this.setPositionByOrigin(new t.Point(f.width/2,f.height/2),"center","center");var m=this.canvas;f.add(this);var C=f.toCanvasElement(o||1,e);return this.shadow=r,this.set("canvas",m),s&&(this.group=s),this.set(n).setCoords(),f._objects=[],f.dispose(),f=null,C},
/**
         * Converts an object into a data-url-like string
         * @param {Object} options Options object
         * @param {String} [options.format=png] The format of the output image. Either "jpeg" or "png"
         * @param {Number} [options.quality=1] Quality level (0..1). Only used for jpeg.
         * @param {Number} [options.multiplier=1] Multiplier to scale by
         * @param {Number} [options.left] Cropping left offset. Introduced in v1.2.14
         * @param {Number} [options.top] Cropping top offset. Introduced in v1.2.14
         * @param {Number} [options.width] Cropping width. Introduced in v1.2.14
         * @param {Number} [options.height] Cropping height. Introduced in v1.2.14
         * @param {Boolean} [options.enableRetinaScaling] Enable retina scaling for clone image. Introduce in 1.6.4
         * @param {Boolean} [options.withoutTransform] Remove current object transform ( no scale , no angle, no flip, no skew ). Introduced in 2.3.4
         * @param {Boolean} [options.withoutShadow] Remove current object shadow. Introduced in 2.4.2
         * @return {String} Returns a data: URL containing a representation of the object in the format specified by options.format
         */
toDataURL:function(e){return e||(e={}),t.util.toDataURL(this.toCanvasElement(e),e.format||"png",e.quality||1)},
/**
         * Returns true if specified type is identical to the type of an instance
         * @param {String} type Type to check against
         * @return {Boolean}
         */
isType:function(e){return this.type===e},
/**
         * Returns complexity of an instance
         * @return {Number} complexity of this instance (is 1 unless subclassed)
         */
complexity:function(){return 1},
/**
         * Returns a JSON representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} JSON
         */
toJSON:function(e){return this.toObject(e)},
/**
         * Sets "angle" of an instance with centered rotation
         * @param {Number} angle Angle value (in degrees)
         * @return {fabric.Object} thisArg
         * @chainable
         */
rotate:function(e){var t=("center"!==this.originX||"center"!==this.originY)&&this.centeredRotation;return t&&this._setOriginToCenter(),this.set("angle",e),t&&this._resetOrigin(),this},
/**
         * Centers object horizontally on canvas to which it was added last.
         * You might need to call `setCoords` on an object after centering, to update controls area.
         * @return {fabric.Object} thisArg
         * @chainable
         */
centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},
/**
         * Centers object horizontally on current viewport of canvas to which it was added last.
         * You might need to call `setCoords` on an object after centering, to update controls area.
         * @return {fabric.Object} thisArg
         * @chainable
         */
viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},
/**
         * Centers object vertically on canvas to which it was added last.
         * You might need to call `setCoords` on an object after centering, to update controls area.
         * @return {fabric.Object} thisArg
         * @chainable
         */
centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},
/**
         * Centers object vertically on current viewport of canvas to which it was added last.
         * You might need to call `setCoords` on an object after centering, to update controls area.
         * @return {fabric.Object} thisArg
         * @chainable
         */
viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},
/**
         * Centers object vertically and horizontally on canvas to which is was added last
         * You might need to call `setCoords` on an object after centering, to update controls area.
         * @return {fabric.Object} thisArg
         * @chainable
         */
center:function(){return this.canvas&&this.canvas.centerObject(this),this},
/**
         * Centers object on current viewport of canvas to which it was added last.
         * You might need to call `setCoords` on an object after centering, to update controls area.
         * @return {fabric.Object} thisArg
         * @chainable
         */
viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},
/**
         * Returns coordinates of a pointer relative to an object
         * @param {Event} e Event to operate upon
         * @param {Object} [pointer] Pointer to operate upon (instead of event)
         * @return {Object} Coordinates of a pointer (x, y)
         */
getLocalPointer:function(e,i){i=i||this.canvas.getPointer(e);var n=new t.Point(i.x,i.y),s=this._getLeftTopCoords();return this.angle&&(n=t.util.rotatePoint(n,s,a(-this.angle))),{x:n.x-s.x,y:n.y-s.y}},
/**
         * Sets canvas globalCompositeOperation for specific object
         * custom composition operation for the particular object can be specified using globalCompositeOperation property
         * @param {CanvasRenderingContext2D} ctx Rendering canvas context
         */
_setupCompositeOperation:function(e){this.globalCompositeOperation&&(e.globalCompositeOperation=this.globalCompositeOperation)},
/**
         * cancel instance's running animations
         */
dispose:function(){t.runningAnimations&&t.runningAnimations.cancelByTarget(this)}}),t.util.createAccessors&&t.util.createAccessors(t.Object),i(t.Object.prototype,t.Observable),t.Object.NUM_FRACTION_DIGITS=2,t.Object.ENLIVEN_PROPS=["clipPath"],t.Object._fromObject=function(e,i,s,r){var a=t[e];i=n(i,!0),t.util.enlivenPatterns([i.fill,i.stroke],(function(e){void 0!==e[0]&&(i.fill=e[0]),void 0!==e[1]&&(i.stroke=e[1]),t.util.enlivenObjectEnlivables(i,i,(function(){var e=r?new a(i[r],i):new a(i);s&&s(e)}))}))},t.Object.__uid=0)}(e),h=f.util.degreesToRadians,d={left:-.5,center:0,right:.5},g={top:-.5,center:0,bottom:.5},f.util.object.extend(f.Object.prototype,
/** @lends fabric.Object.prototype */
{
/**
         * Translates the coordinates from a set of origin to another (based on the object's dimensions)
         * @param {fabric.Point} point The point which corresponds to the originX and originY params
         * @param {String} fromOriginX Horizontal origin: 'left', 'center' or 'right'
         * @param {String} fromOriginY Vertical origin: 'top', 'center' or 'bottom'
         * @param {String} toOriginX Horizontal origin: 'left', 'center' or 'right'
         * @param {String} toOriginY Vertical origin: 'top', 'center' or 'bottom'
         * @return {fabric.Point}
         */
translateToGivenOrigin:function(e,t,i,n,s){var r,a,o,l=e.x,A=e.y;return"string"==typeof t?t=d[t]:t-=.5,"string"==typeof n?n=d[n]:n-=.5,"string"==typeof i?i=g[i]:i-=.5,"string"==typeof s?s=g[s]:s-=.5,a=s-i,((r=n-t)||a)&&(o=this._getTransformedDimensions(),l=e.x+r*o.x,A=e.y+a*o.y),new f.Point(l,A)},
/**
         * Translates the coordinates from origin to center coordinates (based on the object's dimensions)
         * @param {fabric.Point} point The point which corresponds to the originX and originY params
         * @param {String} originX Horizontal origin: 'left', 'center' or 'right'
         * @param {String} originY Vertical origin: 'top', 'center' or 'bottom'
         * @return {fabric.Point}
         */
translateToCenterPoint:function(e,t,i){var n=this.translateToGivenOrigin(e,t,i,"center","center");return this.angle?f.util.rotatePoint(n,e,h(this.angle)):n},
/**
         * Translates the coordinates from center to origin coordinates (based on the object's dimensions)
         * @param {fabric.Point} center The point which corresponds to center of the object
         * @param {String} originX Horizontal origin: 'left', 'center' or 'right'
         * @param {String} originY Vertical origin: 'top', 'center' or 'bottom'
         * @return {fabric.Point}
         */
translateToOriginPoint:function(e,t,i){var n=this.translateToGivenOrigin(e,"center","center",t,i);return this.angle?f.util.rotatePoint(n,e,h(this.angle)):n},
/**
         * Returns the real center coordinates of the object
         * @return {fabric.Point}
         */
getCenterPoint:function(){var e=new f.Point(this.left,this.top);return this.translateToCenterPoint(e,this.originX,this.originY)},
/**
         * Returns the coordinates of the object based on center coordinates
         * @param {fabric.Point} point The point which corresponds to the originX and originY params
         * @return {fabric.Point}
         */
// getOriginPoint: function(center) {
//   return this.translateToOriginPoint(center, this.originX, this.originY);
// },
/**
         * Returns the coordinates of the object as if it has a different origin
         * @param {String} originX Horizontal origin: 'left', 'center' or 'right'
         * @param {String} originY Vertical origin: 'top', 'center' or 'bottom'
         * @return {fabric.Point}
         */
getPointByOrigin:function(e,t){var i=this.getCenterPoint();return this.translateToOriginPoint(i,e,t)},
/**
         * Returns the point in local coordinates
         * @param {fabric.Point} point The point relative to the global coordinate system
         * @param {String} originX Horizontal origin: 'left', 'center' or 'right'
         * @param {String} originY Vertical origin: 'top', 'center' or 'bottom'
         * @return {fabric.Point}
         */
toLocalPoint:function(e,t,i){var n,s,r=this.getCenterPoint();return n=void 0!==t&&void 0!==i?this.translateToGivenOrigin(r,"center","center",t,i):new f.Point(this.left,this.top),s=new f.Point(e.x,e.y),this.angle&&(s=f.util.rotatePoint(s,r,-h(this.angle))),s.subtractEquals(n)},
/**
         * Returns the point in global coordinates
         * @param {fabric.Point} The point relative to the local coordinate system
         * @return {fabric.Point}
         */
// toGlobalPoint: function(point) {
//   return fabric.util.rotatePoint(point, this.getCenterPoint(), degreesToRadians(this.angle)).addEquals(new fabric.Point(this.left, this.top));
// },
/**
         * Sets the position of the object taking into consideration the object's origin
         * @param {fabric.Point} pos The new position of the object
         * @param {String} originX Horizontal origin: 'left', 'center' or 'right'
         * @param {String} originY Vertical origin: 'top', 'center' or 'bottom'
         * @return {void}
         */
setPositionByOrigin:function(e,t,i){var n=this.translateToCenterPoint(e,t,i),s=this.translateToOriginPoint(n,this.originX,this.originY);this.set("left",s.x),this.set("top",s.y)},
/**
         * @param {String} to One of 'left', 'center', 'right'
         */
adjustPosition:function(e){var t,i,n=h(this.angle),s=this.getScaledWidth(),r=f.util.cos(n)*s,a=f.util.sin(n)*s;t="string"==typeof this.originX?d[this.originX]:this.originX-.5,i="string"==typeof e?d[e]:e-.5,this.left+=r*(i-t),this.top+=a*(i-t),this.setCoords(),this.originX=e},
/**
         * Sets the origin/position of the object to it's center point
         * @private
         * @return {void}
         */
_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var e=this.getCenterPoint();this.originX="center",this.originY="center",this.left=e.x,this.top=e.y},
/**
         * Resets the origin/position of the object to it's original origin
         * @private
         * @return {void}
         */
_resetOrigin:function(){var e=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=e.x,this.top=e.y,this._originalOriginX=null,this._originalOriginY=null},
/**
         * @private
         */
_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}}),function(){var e=f.util,t=e.degreesToRadians,i=e.multiplyTransformMatrices,n=e.transformPoint;e.object.extend(f.Object.prototype,
/** @lends fabric.Object.prototype */
{
/**
         * Describe object's corner position in canvas element coordinates.
         * properties are depending on control keys and padding the main controls.
         * each property is an object with x, y and corner.
         * The `corner` property contains in a similar manner the 4 points of the
         * interactive area of the corner.
         * The coordinates depends from the controls positionHandler and are used
         * to draw and locate controls
         * @memberOf fabric.Object.prototype
         */
oCoords:null,
/**
         * Describe object's corner position in canvas object absolute coordinates
         * properties are tl,tr,bl,br and describe the four main corner.
         * each property is an object with x, y, instance of Fabric.Point.
         * The coordinates depends from this properties: width, height, scaleX, scaleY
         * skewX, skewY, angle, strokeWidth, top, left.
         * Those coordinates are useful to understand where an object is. They get updated
         * with oCoords but they do not need to be updated when zoom or panning change.
         * The coordinates get updated with @method setCoords.
         * You can calculate them without updating with @method calcACoords();
         * @memberOf fabric.Object.prototype
         */
aCoords:null,
/**
         * Describe object's corner position in canvas element coordinates.
         * includes padding. Used of object detection.
         * set and refreshed with setCoords.
         * @memberOf fabric.Object.prototype
         */
lineCoords:null,
/**
         * storage for object transform matrix
         */
ownMatrixCache:null,
/**
         * storage for object full transform matrix
         */
matrixCache:null,
/**
         * custom controls interface
         * controls are added by default_controls.js
         */
controls:{},
/**
         * return correct set of coordinates for intersection
         * this will return either aCoords or lineCoords.
         * @param {Boolean} absolute will return aCoords if true or lineCoords
         * @return {Object} {tl, tr, br, bl} points
         */
_getCoords:function(e,t){return t?e?this.calcACoords():this.calcLineCoords():(this.aCoords&&this.lineCoords||this.setCoords(!0),e?this.aCoords:this.lineCoords)},
/**
         * return correct set of coordinates for intersection
         * this will return either aCoords or lineCoords.
         * The coords are returned in an array.
         * @return {Array} [tl, tr, br, bl] of points
         */
getCoords:function(e,t){return i=this._getCoords(e,t),[new f.Point(i.tl.x,i.tl.y),new f.Point(i.tr.x,i.tr.y),new f.Point(i.br.x,i.br.y),new f.Point(i.bl.x,i.bl.y)];var i},
/**
         * Checks if object intersects with an area formed by 2 points
         * @param {Object} pointTL top-left point of area
         * @param {Object} pointBR bottom-right point of area
         * @param {Boolean} [absolute] use coordinates without viewportTransform
         * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords
         * @return {Boolean} true if object intersects with an area formed by 2 points
         */
intersectsWithRect:function(e,t,i,n){var s=this.getCoords(i,n);return"Intersection"===f.Intersection.intersectPolygonRectangle(s,e,t).status},
/**
         * Checks if object intersects with another object
         * @param {Object} other Object to test
         * @param {Boolean} [absolute] use coordinates without viewportTransform
         * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords
         * @return {Boolean} true if object intersects with another object
         */
intersectsWithObject:function(e,t,i){return"Intersection"===f.Intersection.intersectPolygonPolygon(this.getCoords(t,i),e.getCoords(t,i)).status||e.isContainedWithinObject(this,t,i)||this.isContainedWithinObject(e,t,i)},
/**
         * Checks if object is fully contained within area of another object
         * @param {Object} other Object to test
         * @param {Boolean} [absolute] use coordinates without viewportTransform
         * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords
         * @return {Boolean} true if object is fully contained within area of another object
         */
isContainedWithinObject:function(e,t,i){for(var n=this.getCoords(t,i),s=t?e.aCoords:e.lineCoords,r=0,a=e._getImageLines(s);r<4;r++)if(!e.containsPoint(n[r],a))return!1;return!0},
/**
         * Checks if object is fully contained within area formed by 2 points
         * @param {Object} pointTL top-left point of area
         * @param {Object} pointBR bottom-right point of area
         * @param {Boolean} [absolute] use coordinates without viewportTransform
         * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords
         * @return {Boolean} true if object is fully contained within area formed by 2 points
         */
isContainedWithinRect:function(e,t,i,n){var s=this.getBoundingRect(i,n);return s.left>=e.x&&s.left+s.width<=t.x&&s.top>=e.y&&s.top+s.height<=t.y},
/**
         * Checks if point is inside the object
         * @param {fabric.Point} point Point to check against
         * @param {Object} [lines] object returned from @method _getImageLines
         * @param {Boolean} [absolute] use coordinates without viewportTransform
         * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords
         * @return {Boolean} true if point is inside the object
         */
containsPoint:function(e,t,i,n){var s=this._getCoords(i,n),r=(t=t||this._getImageLines(s),this._findCrossPoints(e,t));return 0!==r&&r%2==1},
/**
         * Checks if object is contained within the canvas with current viewportTransform
         * the check is done stopping at first point that appears on screen
         * @param {Boolean} [calculate] use coordinates of current position instead of .aCoords
         * @return {Boolean} true if object is fully or partially contained within canvas
         */
isOnScreen:function(e){if(!this.canvas)return!1;var t=this.canvas.vptCoords.tl,i=this.canvas.vptCoords.br;return!!this.getCoords(!0,e).some((function(e){return e.x<=i.x&&e.x>=t.x&&e.y<=i.y&&e.y>=t.y}))||(!!this.intersectsWithRect(t,i,!0,e)||this._containsCenterOfCanvas(t,i,e))},
/**
         * Checks if the object contains the midpoint between canvas extremities
         * Does not make sense outside the context of isOnScreen and isPartiallyOnScreen
         * @private
         * @param {Fabric.Point} pointTL Top Left point
         * @param {Fabric.Point} pointBR Top Right point
         * @param {Boolean} calculate use coordinates of current position instead of .oCoords
         * @return {Boolean} true if the object contains the point
         */
_containsCenterOfCanvas:function(e,t,i){var n={x:(e.x+t.x)/2,y:(e.y+t.y)/2};return!!this.containsPoint(n,null,!0,i)},
/**
         * Checks if object is partially contained within the canvas with current viewportTransform
         * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords
         * @return {Boolean} true if object is partially contained within canvas
         */
isPartiallyOnScreen:function(e){if(!this.canvas)return!1;var t=this.canvas.vptCoords.tl,i=this.canvas.vptCoords.br;return!!this.intersectsWithRect(t,i,!0,e)||this.getCoords(!0,e).every((function(e){return(e.x>=i.x||e.x<=t.x)&&(e.y>=i.y||e.y<=t.y)}))&&this._containsCenterOfCanvas(t,i,e)},
/**
         * Method that returns an object with the object edges in it, given the coordinates of the corners
         * @private
         * @param {Object} oCoords Coordinates of the object corners
         */
_getImageLines:function(e){return{topline:{o:e.tl,d:e.tr},rightline:{o:e.tr,d:e.br},bottomline:{o:e.br,d:e.bl},leftline:{o:e.bl,d:e.tl}}},
/**
         * Helper method to determine how many cross points are between the 4 object edges
         * and the horizontal line determined by a point on canvas
         * @private
         * @param {fabric.Point} point Point to check
         * @param {Object} lines Coordinates of the object being evaluated
         */
// remove yi, not used but left code here just in case.
_findCrossPoints:function(e,t){var i,n,s,r=0;for(var a in t)if(!((s=t[a]).o.y<e.y&&s.d.y<e.y||s.o.y>=e.y&&s.d.y>=e.y||(s.o.x===s.d.x&&s.o.x>=e.x?n=s.o.x:(i=(s.d.y-s.o.y)/(s.d.x-s.o.x),n=-(e.y-0*e.x-(s.o.y-i*s.o.x))/(0-i)),n>=e.x&&(r+=1),2!==r)))break;return r},
/**
         * Returns coordinates of object's bounding rectangle (left, top, width, height)
         * the box is intended as aligned to axis of canvas.
         * @param {Boolean} [absolute] use coordinates without viewportTransform
         * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords / .aCoords
         * @return {Object} Object with left, top, width, height properties
         */
getBoundingRect:function(t,i){var n=this.getCoords(t,i);return e.makeBoundingBoxFromPoints(n)},
/**
         * Returns width of an object's bounding box counting transformations
         * before 2.0 it was named getWidth();
         * @return {Number} width value
         */
getScaledWidth:function(){return this._getTransformedDimensions().x},
/**
         * Returns height of an object bounding box counting transformations
         * before 2.0 it was named getHeight();
         * @return {Number} height value
         */
getScaledHeight:function(){return this._getTransformedDimensions().y},
/**
         * Makes sure the scale is valid and modifies it if necessary
         * @private
         * @param {Number} value
         * @return {Number}
         */
_constrainScale:function(e){return Math.abs(e)<this.minScaleLimit?e<0?-this.minScaleLimit:this.minScaleLimit:0===e?1e-4:e},
/**
         * Scales an object (equally by x and y)
         * @param {Number} value Scale factor
         * @return {fabric.Object} thisArg
         * @chainable
         */
scale:function(e){return this._set("scaleX",e),this._set("scaleY",e),this.setCoords()},
/**
         * Scales an object to a given width, with respect to bounding box (scaling by x/y equally)
         * @param {Number} value New width value
         * @param {Boolean} absolute ignore viewport
         * @return {fabric.Object} thisArg
         * @chainable
         */
scaleToWidth:function(e,t){var i=this.getBoundingRect(t).width/this.getScaledWidth();return this.scale(e/this.width/i)},
/**
         * Scales an object to a given height, with respect to bounding box (scaling by x/y equally)
         * @param {Number} value New height value
         * @param {Boolean} absolute ignore viewport
         * @return {fabric.Object} thisArg
         * @chainable
         */
scaleToHeight:function(e,t){var i=this.getBoundingRect(t).height/this.getScaledHeight();return this.scale(e/this.height/i)},calcLineCoords:function(){var i=this.getViewportTransform(),s=this.padding,r=t(this.angle),a=e.cos(r)*s,o=e.sin(r)*s,l=a+o,A=a-o,c=this.calcACoords(),u={tl:n(c.tl,i),tr:n(c.tr,i),bl:n(c.bl,i),br:n(c.br,i)};return s&&(u.tl.x-=A,u.tl.y-=l,u.tr.x+=l,u.tr.y-=A,u.bl.x-=l,u.bl.y+=A,u.br.x+=A,u.br.y+=l),u},calcOCoords:function(){var e=this._calcRotateMatrix(),t=this._calcTranslateMatrix(),n=this.getViewportTransform(),s=i(n,t),r=i(s,e),a=(r=i(r,[1/n[0],0,0,1/n[3],0,0]),this._calculateCurrentDimensions()),o={};return this.forEachControl((function(e,t,i){o[t]=e.positionHandler(a,r,i)})),o},calcACoords:function(){var e=this._calcRotateMatrix(),t=this._calcTranslateMatrix(),s=i(t,e),r=this._getTransformedDimensions(),a=r.x/2,o=r.y/2;return{
// corners
tl:n({x:-a,y:-o},s),tr:n({x:a,y:-o},s),bl:n({x:-a,y:o},s),br:n({x:a,y:o},s)}},
/**
         * Sets corner and controls position coordinates based on current angle, width and height, left and top.
         * oCoords are used to find the corners
         * aCoords are used to quickly find an object on the canvas
         * lineCoords are used to quickly find object during pointer events.
         * See {@link https://github.com/fabricjs/fabric.js/wiki/When-to-call-setCoords} and {@link http://fabricjs.com/fabric-gotchas}
         *
         * @param {Boolean} [skipCorners] skip calculation of oCoords.
         * @return {fabric.Object} thisArg
         * @chainable
         */
setCoords:function(e){return this.aCoords=this.calcACoords(),this.lineCoords=this.group?this.aCoords:this.calcLineCoords(),e||(this.oCoords=this.calcOCoords(),this._setCornerCoords&&this._setCornerCoords()),this},
/**
         * calculate rotation matrix of an object
         * @return {Array} rotation matrix for the object
         */
_calcRotateMatrix:function(){return e.calcRotateMatrix(this)},
/**
         * calculate the translation matrix for an object transform
         * @return {Array} rotation matrix for the object
         */
_calcTranslateMatrix:function(){var e=this.getCenterPoint();return[1,0,0,1,e.x,e.y]},transformMatrixKey:function(e){var t="_",i="";return!e&&this.group&&(i=this.group.transformMatrixKey(e)+t),i+this.top+t+this.left+t+this.scaleX+t+this.scaleY+t+this.skewX+t+this.skewY+t+this.angle+t+this.originX+t+this.originY+t+this.width+t+this.height+t+this.strokeWidth+this.flipX+this.flipY},
/**
         * calculate transform matrix that represents the current transformations from the
         * object's properties.
         * @param {Boolean} [skipGroup] return transform matrix for object not counting parent transformations
         * There are some situation in which this is useful to avoid the fake rotation.
         * @return {Array} transform matrix for the object
         */
calcTransformMatrix:function(e){var t=this.calcOwnMatrix();if(e||!this.group)return t;var n=this.transformMatrixKey(e),s=this.matrixCache||(this.matrixCache={});return s.key===n?s.value:(this.group&&(t=i(this.group.calcTransformMatrix(!1),t)),s.key=n,s.value=t,t)},
/**
         * calculate transform matrix that represents the current transformations from the
         * object's properties, this matrix does not include the group transformation
         * @return {Array} transform matrix for the object
         */
calcOwnMatrix:function(){var t=this.transformMatrixKey(!0),i=this.ownMatrixCache||(this.ownMatrixCache={});if(i.key===t)return i.value;var n=this._calcTranslateMatrix(),s={angle:this.angle,translateX:n[4],translateY:n[5],scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,flipX:this.flipX,flipY:this.flipY};return i.key=t,i.value=e.composeMatrix(s),i.value},
/*
         * Calculate object dimensions from its properties
         * @private
         * @return {Object} .x width dimension
         * @return {Object} .y height dimension
         */
_getNonTransformedDimensions:function(){var e=this.strokeWidth;return{x:this.width+e,y:this.height+e}},
/*
         * Calculate object bounding box dimensions from its properties scale, skew.
         * @param {Number} skewX, a value to override current skewX
         * @param {Number} skewY, a value to override current skewY
         * @private
         * @return {Object} .x width dimension
         * @return {Object} .y height dimension
         */
_getTransformedDimensions:function(t,i){void 0===t&&(t=this.skewX),void 0===i&&(i=this.skewY);var n,s,r,a=0===t&&0===i;if(this.strokeUniform?(s=this.width,r=this.height):(s=(n=this._getNonTransformedDimensions()).x,r=n.y),a)return this._finalizeDimensions(s*this.scaleX,r*this.scaleY);var o=e.sizeAfterTransform(s,r,{scaleX:this.scaleX,scaleY:this.scaleY,skewX:t,skewY:i});return this._finalizeDimensions(o.x,o.y)},
/*
         * Calculate object bounding box dimensions from its properties scale, skew.
         * @param Number width width of the bbox
         * @param Number height height of the bbox
         * @private
         * @return {Object} .x finalized width dimension
         * @return {Object} .y finalized height dimension
         */
_finalizeDimensions:function(e,t){return this.strokeUniform?{x:e+this.strokeWidth,y:t+this.strokeWidth}:{x:e,y:t}},
/*
         * Calculate object dimensions for controls box, including padding and canvas zoom.
         * and active selection
         * private
         */
_calculateCurrentDimensions:function(){var e=this.getViewportTransform(),t=this._getTransformedDimensions();return n(t,e,!0).scalarAdd(2*this.padding)}})}(),f.util.object.extend(f.Object.prototype,
/** @lends fabric.Object.prototype */
{
/**
       * Moves an object to the bottom of the stack of drawn objects
       * @return {fabric.Object} thisArg
       * @chainable
       */
sendToBack:function(){return this.group?f.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas&&this.canvas.sendToBack(this),this},
/**
       * Moves an object to the top of the stack of drawn objects
       * @return {fabric.Object} thisArg
       * @chainable
       */
bringToFront:function(){return this.group?f.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas&&this.canvas.bringToFront(this),this},
/**
       * Moves an object down in stack of drawn objects
       * @param {Boolean} [intersecting] If `true`, send object behind next lower intersecting object
       * @return {fabric.Object} thisArg
       * @chainable
       */
sendBackwards:function(e){return this.group?f.StaticCanvas.prototype.sendBackwards.call(this.group,this,e):this.canvas&&this.canvas.sendBackwards(this,e),this},
/**
       * Moves an object up in stack of drawn objects
       * @param {Boolean} [intersecting] If `true`, send object in front of next upper intersecting object
       * @return {fabric.Object} thisArg
       * @chainable
       */
bringForward:function(e){return this.group?f.StaticCanvas.prototype.bringForward.call(this.group,this,e):this.canvas&&this.canvas.bringForward(this,e),this},
/**
       * Moves an object to specified level in stack of drawn objects
       * @param {Number} index New position of object
       * @return {fabric.Object} thisArg
       * @chainable
       */
moveTo:function(e){return this.group&&"activeSelection"!==this.group.type?f.StaticCanvas.prototype.moveTo.call(this.group,this,e):this.canvas&&this.canvas.moveTo(this,e),this}}),function(){function e(e,t){if(t){if(t.toLive)return e+": url(#SVGID_"+t.id+"); ";var i=new f.Color(t),n=e+": "+i.toRgb()+"; ",s=i.getAlpha();return 1!==s&&(n+=e+"-opacity: "+s.toString()+"; "),n}return e+": none; "}var t=f.util.toFixed;f.util.object.extend(f.Object.prototype,
/** @lends fabric.Object.prototype */
{
/**
         * Returns styles-string for svg-export
         * @param {Boolean} skipShadow a boolean to skip shadow filter output
         * @return {String}
         */
getSvgStyles:function(t){var i=this.fillRule?this.fillRule:"nonzero",n=this.strokeWidth?this.strokeWidth:"0",s=this.strokeDashArray?this.strokeDashArray.join(" "):"none",r=this.strokeDashOffset?this.strokeDashOffset:"0",a=this.strokeLineCap?this.strokeLineCap:"butt",o=this.strokeLineJoin?this.strokeLineJoin:"miter",l=this.strokeMiterLimit?this.strokeMiterLimit:"4",A=void 0!==this.opacity?this.opacity:"1",c=this.visible?"":" visibility: hidden;",u=t?"":this.getSvgFilter(),h=e("fill",this.fill);return[e("stroke",this.stroke),"stroke-width: ",n,"; ","stroke-dasharray: ",s,"; ","stroke-linecap: ",a,"; ","stroke-dashoffset: ",r,"; ","stroke-linejoin: ",o,"; ","stroke-miterlimit: ",l,"; ",h,"fill-rule: ",i,"; ","opacity: ",A,";",u,c].join("")},
/**
         * Returns styles-string for svg-export
         * @param {Object} style the object from which to retrieve style properties
         * @param {Boolean} useWhiteSpace a boolean to include an additional attribute in the style.
         * @return {String}
         */
getSvgSpanStyles:function(t,i){var n="; ",s=t.fontFamily?"font-family: "+(-1===t.fontFamily.indexOf("'")&&-1===t.fontFamily.indexOf('"')?"'"+t.fontFamily+"'":t.fontFamily)+n:"",r=t.strokeWidth?"stroke-width: "+t.strokeWidth+n:"",a=(s=s,t.fontSize?"font-size: "+t.fontSize+"px"+n:""),o=t.fontStyle?"font-style: "+t.fontStyle+n:"",l=t.fontWeight?"font-weight: "+t.fontWeight+n:"",A=t.fill?e("fill",t.fill):"",c=t.stroke?e("stroke",t.stroke):"",u=this.getSvgTextDecoration(t);return u&&(u="text-decoration: "+u+n),[c,r,s,a,o,l,u,A,t.deltaY?"baseline-shift: "+-t.deltaY+"; ":"",i?"white-space: pre; ":""].join("")},
/**
         * Returns text-decoration property for svg-export
         * @param {Object} style the object from which to retrieve style properties
         * @return {String}
         */
getSvgTextDecoration:function(e){return["overline","underline","line-through"].filter((function(t){return e[t.replace("-","")]})).join(" ")},
/**
         * Returns filter for svg shadow
         * @return {String}
         */
getSvgFilter:function(){return this.shadow?"filter: url(#SVGID_"+this.shadow.id+");":""},
/**
         * Returns id attribute for svg output
         * @return {String}
         */
getSvgCommons:function(){return[this.id?'id="'+this.id+'" ':"",this.clipPath?'clip-path="url(#'+this.clipPath.clipPathId+')" ':""].join("")},
/**
         * Returns transform-string for svg-export
         * @param {Boolean} use the full transform or the single object one.
         * @return {String}
         */
getSvgTransform:function(e,t){var i=e?this.calcTransformMatrix():this.calcOwnMatrix();return'transform="'+f.util.matrixToSVG(i)+(t||"")+'" '},_setSVGBg:function(e){if(this.backgroundColor){var i=f.Object.NUM_FRACTION_DIGITS;e.push("\t\t<rect ",this._getFillAttributes(this.backgroundColor),' x="',t(-this.width/2,i),'" y="',t(-this.height/2,i),'" width="',t(this.width,i),'" height="',t(this.height,i),'"></rect>\n')}},
/**
         * Returns svg representation of an instance
         * @param {Function} [reviver] Method for further parsing of svg representation.
         * @return {String} svg representation of an instance
         */
toSVG:function(e){return this._createBaseSVGMarkup(this._toSVG(e),{reviver:e})},
/**
         * Returns svg clipPath representation of an instance
         * @param {Function} [reviver] Method for further parsing of svg representation.
         * @return {String} svg representation of an instance
         */
toClipPathSVG:function(e){return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(e),{reviver:e})},
/**
         * @private
         */
_createBaseClipPathSVGMarkup:function(e,t){var i=(t=t||{}).reviver,n=t.additionalTransform||"",s=[this.getSvgTransform(!0,n),this.getSvgCommons()].join(""),r=e.indexOf("COMMON_PARTS");return e[r]=s,i?i(e.join("")):e.join("")},
/**
         * @private
         */
_createBaseSVGMarkup:function(e,t){var i,n,s=(t=t||{}).noStyle,r=t.reviver,a=s?"":'style="'+this.getSvgStyles()+'" ',o=t.withShadow?'style="'+this.getSvgFilter()+'" ':"",l=this.clipPath,A=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",c=l&&l.absolutePositioned,u=this.stroke,h=this.fill,d=this.shadow,g=[],p=e.indexOf("COMMON_PARTS"),m=t.additionalTransform;return l&&(l.clipPathId="CLIPPATH_"+f.Object.__uid++,n='<clipPath id="'+l.clipPathId+'" >\n'+l.toClipPathSVG(r)+"</clipPath>\n"),c&&g.push("<g ",o,this.getSvgCommons()," >\n"),g.push("<g ",this.getSvgTransform(!1),c?"":o+this.getSvgCommons()," >\n"),i=[a,A,s?"":this.addPaintOrder()," ",m?'transform="'+m+'" ':""].join(""),e[p]=i,h&&h.toLive&&g.push(h.toSVG(this)),u&&u.toLive&&g.push(u.toSVG(this)),d&&g.push(d.toSVG(this)),l&&g.push(n),g.push(e.join("")),g.push("</g>\n"),c&&g.push("</g>\n"),r?r(g.join("")):g.join("")},addPaintOrder:function(){return"fill"!==this.paintFirst?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){var e=f.util.object.extend,t="stateProperties";function i(t,i,n){var s={};n.forEach((function(e){s[e]=t[e]})),e(t[i],s,!0)}function n(e,t,i){if(e===t)return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var s=0,r=e.length;s<r;s++)if(!n(e[s],t[s]))return!1;return!0}if(e&&"object"==typeof e){var a,o=Object.keys(e);if(!t||"object"!=typeof t||!i&&o.length!==Object.keys(t).length)return!1;for(s=0,r=o.length;s<r;s++)if("canvas"!==(a=o[s])&&"group"!==a&&!n(e[a],t[a]))return!1;return!0}}f.util.object.extend(f.Object.prototype,
/** @lends fabric.Object.prototype */
{
/**
         * Returns true if object state (one of its state properties) was changed
         * @param {String} [propertySet] optional name for the set of property we want to save
         * @return {Boolean} true if instance' state has changed since `{@link fabric.Object#saveState}` was called
         */
hasStateChanged:function(e){var i="_"+(e=e||t);return Object.keys(this[i]).length<this[e].length||!n(this[i],this,!0)},
/**
         * Saves state of an object
         * @param {Object} [options] Object with additional `stateProperties` array to include when saving state
         * @return {fabric.Object} thisArg
         */
saveState:function(e){var n=e&&e.propertySet||t,s="_"+n;return this[s]?(i(this,s,this[n]),e&&e.stateProperties&&i(this,s,e.stateProperties),this):this.setupState(e)},
/**
         * Setups state of an object
         * @param {Object} [options] Object with additional `stateProperties` array to include when saving state
         * @return {fabric.Object} thisArg
         */
setupState:function(e){var i=(e=e||{}).propertySet||t;return e.propertySet=i,this["_"+i]={},this.saveState(e),this}})}(),function(){var e=f.util.degreesToRadians;f.util.object.extend(f.Object.prototype,
/** @lends fabric.Object.prototype */
{
/**
         * Determines which corner has been clicked
         * @private
         * @param {Object} pointer The pointer indicating the mouse position
         * @return {String|Boolean} corner code (tl, tr, bl, br, etc.), or false if nothing is found
         */
_findTargetCorner:function(e,t){if(!this.hasControls||this.group||!this.canvas||this.canvas._activeObject!==this)return!1;var i,n,s,r=e.x,a=e.y,o=Object.keys(this.oCoords),l=o.length-1;for(this.__corner=0;l>=0;l--)if(s=o[l],this.isControlVisible(s)&&(n=this._getImageLines(t?this.oCoords[s].touchCorner:this.oCoords[s].corner),0!==(i=this._findCrossPoints({x:r,y:a},n))&&i%2==1))return this.__corner=s,s;return!1},
/**
         * Calls a function for each control. The function gets called,
         * with the control, the object that is calling the iterator and the control's key
         * @param {Function} fn function to iterate over the controls over
         */
forEachControl:function(e){for(var t in this.controls)e(this.controls[t],t,this)},
/**
         * Sets the coordinates of the draggable boxes in the corners of
         * the image used to scale/rotate it.
         * note: if we would switch to ROUND corner area, all of this would disappear.
         * everything would resolve to a single point and a pythagorean theorem for the distance
         * @private
         */
_setCornerCoords:function(){var e=this.oCoords;for(var t in e){var i=this.controls[t];e[t].corner=i.calcCornerCoords(this.angle,this.cornerSize,e[t].x,e[t].y,!1),e[t].touchCorner=i.calcCornerCoords(this.angle,this.touchCornerSize,e[t].x,e[t].y,!0)}},
/**
         * Draws a colored layer behind the object, inside its selection borders.
         * Requires public options: padding, selectionBackgroundColor
         * this function is called when the context is transformed
         * has checks to be skipped when the object is on a staticCanvas
         * @param {CanvasRenderingContext2D} ctx Context to draw on
         * @return {fabric.Object} thisArg
         * @chainable
         */
drawSelectionBackground:function(t){if(!this.selectionBackgroundColor||this.canvas&&!this.canvas.interactive||this.canvas&&this.canvas._activeObject!==this)return this;t.save();var i=this.getCenterPoint(),n=this._calculateCurrentDimensions(),s=this.canvas.viewportTransform;return t.translate(i.x,i.y),t.scale(1/s[0],1/s[3]),t.rotate(e(this.angle)),t.fillStyle=this.selectionBackgroundColor,t.fillRect(-n.x/2,-n.y/2,n.x,n.y),t.restore(),this},
/**
         * Draws borders of an object's bounding box.
         * Requires public properties: width, height
         * Requires public options: padding, borderColor
         * @param {CanvasRenderingContext2D} ctx Context to draw on
         * @param {Object} styleOverride object to override the object style
         * @return {fabric.Object} thisArg
         * @chainable
         */
drawBorders:function(e,t){t=t||{};var i=this._calculateCurrentDimensions(),n=this.borderScaleFactor,s=i.x+n,r=i.y+n,a=void 0!==t.hasControls?t.hasControls:this.hasControls,o=!1;return e.save(),e.strokeStyle=t.borderColor||this.borderColor,this._setLineDash(e,t.borderDashArray||this.borderDashArray),e.strokeRect(-s/2,-r/2,s,r),a&&(e.beginPath(),this.forEachControl((function(t,i,n){t.withConnection&&t.getVisibility(n,i)&&(o=!0,e.moveTo(t.x*s,t.y*r),e.lineTo(t.x*s+t.offsetX,t.y*r+t.offsetY))})),o&&e.stroke()),e.restore(),this},
/**
         * Draws borders of an object's bounding box when it is inside a group.
         * Requires public properties: width, height
         * Requires public options: padding, borderColor
         * @param {CanvasRenderingContext2D} ctx Context to draw on
         * @param {object} options object representing current object parameters
         * @param {Object} styleOverride object to override the object style
         * @return {fabric.Object} thisArg
         * @chainable
         */
drawBordersInGroup:function(e,t,i){i=i||{};var n=f.util.sizeAfterTransform(this.width,this.height,t),s=this.strokeWidth,r=this.strokeUniform,a=this.borderScaleFactor,o=n.x+s*(r?this.canvas.getZoom():t.scaleX)+a,l=n.y+s*(r?this.canvas.getZoom():t.scaleY)+a;return e.save(),this._setLineDash(e,i.borderDashArray||this.borderDashArray),e.strokeStyle=i.borderColor||this.borderColor,e.strokeRect(-o/2,-l/2,o,l),e.restore(),this},
/**
         * Draws corners of an object's bounding box.
         * Requires public properties: width, height
         * Requires public options: cornerSize, padding
         * @param {CanvasRenderingContext2D} ctx Context to draw on
         * @param {Object} styleOverride object to override the object style
         * @return {fabric.Object} thisArg
         * @chainable
         */
drawControls:function(e,t){t=t||{},e.save();var i,n,s=this.canvas.getRetinaScaling();return e.setTransform(s,0,0,s,0,0),e.strokeStyle=e.fillStyle=t.cornerColor||this.cornerColor,this.transparentCorners||(e.strokeStyle=t.cornerStrokeColor||this.cornerStrokeColor),this._setLineDash(e,t.cornerDashArray||this.cornerDashArray),this.setCoords(),this.group&&(i=this.group.calcTransformMatrix()),this.forEachControl((function(s,r,a){n=a.oCoords[r],s.getVisibility(a,r)&&(i&&(n=f.util.transformPoint(n,i)),s.render(e,n.x,n.y,t,a))})),e.restore(),this},
/**
         * Returns true if the specified control is visible, false otherwise.
         * @param {String} controlKey The key of the control. Possible values are 'tl', 'tr', 'br', 'bl', 'ml', 'mt', 'mr', 'mb', 'mtr'.
         * @returns {Boolean} true if the specified control is visible, false otherwise
         */
isControlVisible:function(e){return this.controls[e]&&this.controls[e].getVisibility(this,e)},
/**
         * Sets the visibility of the specified control.
         * @param {String} controlKey The key of the control. Possible values are 'tl', 'tr', 'br', 'bl', 'ml', 'mt', 'mr', 'mb', 'mtr'.
         * @param {Boolean} visible true to set the specified control visible, false otherwise
         * @return {fabric.Object} thisArg
         * @chainable
         */
setControlVisible:function(e,t){return this._controlsVisibility||(this._controlsVisibility={}),this._controlsVisibility[e]=t,this},
/**
         * Sets the visibility state of object controls.
         * @param {Object} [options] Options object
         * @param {Boolean} [options.bl] true to enable the bottom-left control, false to disable it
         * @param {Boolean} [options.br] true to enable the bottom-right control, false to disable it
         * @param {Boolean} [options.mb] true to enable the middle-bottom control, false to disable it
         * @param {Boolean} [options.ml] true to enable the middle-left control, false to disable it
         * @param {Boolean} [options.mr] true to enable the middle-right control, false to disable it
         * @param {Boolean} [options.mt] true to enable the middle-top control, false to disable it
         * @param {Boolean} [options.tl] true to enable the top-left control, false to disable it
         * @param {Boolean} [options.tr] true to enable the top-right control, false to disable it
         * @param {Boolean} [options.mtr] true to enable the middle-top-rotate control, false to disable it
         * @return {fabric.Object} thisArg
         * @chainable
         */
setControlsVisibility:function(e){for(var t in e||(e={}),e)this.setControlVisible(t,e[t]);return this},
/**
         * This callback function is called every time _discardActiveObject or _setActiveObject
         * try to to deselect this object. If the function returns true, the process is cancelled
         * @param {Object} [options] options sent from the upper functions
         * @param {Event} [options.e] event if the process is generated by an event
         */
onDeselect:function(){},
/**
         * This callback function is called every time _discardActiveObject or _setActiveObject
         * try to to select this object. If the function returns true, the process is cancelled
         * @param {Object} [options] options sent from the upper functions
         * @param {Event} [options.e] event if the process is generated by an event
         */
onSelect:function(){}})}(),f.util.object.extend(f.StaticCanvas.prototype,
/** @lends fabric.StaticCanvas.prototype */
{
/**
       * Animation duration (in ms) for fx* methods
       * @type Number
       * @default
       */
FX_DURATION:500,
/**
       * Centers object horizontally with animation.
       * @param {fabric.Object} object Object to center
       * @param {Object} [callbacks] Callbacks object with optional "onComplete" and/or "onChange" properties
       * @param {Function} [callbacks.onComplete] Invoked on completion
       * @param {Function} [callbacks.onChange] Invoked on every step of animation
       * @return {fabric.AnimationContext} context
       */
fxCenterObjectH:function(e,t){var i=function(){},n=(t=t||{}).onComplete||i,s=t.onChange||i,r=this;return f.util.animate({target:this,startValue:e.left,endValue:this.getCenter().left,duration:this.FX_DURATION,onChange:function(t){e.set("left",t),r.requestRenderAll(),s()},onComplete:function(){e.setCoords(),n()}})},
/**
       * Centers object vertically with animation.
       * @param {fabric.Object} object Object to center
       * @param {Object} [callbacks] Callbacks object with optional "onComplete" and/or "onChange" properties
       * @param {Function} [callbacks.onComplete] Invoked on completion
       * @param {Function} [callbacks.onChange] Invoked on every step of animation
       * @return {fabric.AnimationContext} context
       */
fxCenterObjectV:function(e,t){var i=function(){},n=(t=t||{}).onComplete||i,s=t.onChange||i,r=this;return f.util.animate({target:this,startValue:e.top,endValue:this.getCenter().top,duration:this.FX_DURATION,onChange:function(t){e.set("top",t),r.requestRenderAll(),s()},onComplete:function(){e.setCoords(),n()}})},
/**
       * Same as `fabric.Canvas#remove` but animated
       * @param {fabric.Object} object Object to remove
       * @param {Object} [callbacks] Callbacks object with optional "onComplete" and/or "onChange" properties
       * @param {Function} [callbacks.onComplete] Invoked on completion
       * @param {Function} [callbacks.onChange] Invoked on every step of animation
       * @return {fabric.AnimationContext} context
       */
fxRemove:function(e,t){var i=function(){},n=(t=t||{}).onComplete||i,s=t.onChange||i,r=this;return f.util.animate({target:this,startValue:e.opacity,endValue:0,duration:this.FX_DURATION,onChange:function(t){e.set("opacity",t),r.requestRenderAll(),s()},onComplete:function(){r.remove(e),n()}})}}),f.util.object.extend(f.Object.prototype,
/** @lends fabric.Object.prototype */
{
/**
       * Animates object's properties
       * @param {String|Object} property Property to animate (if string) or properties to animate (if object)
       * @param {Number|Object} value Value to animate property to (if string was given first) or options object
       * @return {fabric.Object} thisArg
       * @tutorial {@link http://fabricjs.com/fabric-intro-part-2#animation}
       * @return {fabric.AnimationContext | fabric.AnimationContext[]} animation context (or an array if passed multiple properties)
       *
       * As object — multiple properties
       *
       * object.animate({ left: ..., top: ... });
       * object.animate({ left: ..., top: ... }, { duration: ... });
       *
       * As string — one property
       *
       * object.animate('left', ...);
       * object.animate('left', { duration: ... });
       *
       */
animate:function(){if(arguments[0]&&"object"==typeof arguments[0]){var e,t,i=[],n=[];for(e in arguments[0])i.push(e);for(var s=0,r=i.length;s<r;s++)e=i[s],t=s!==r-1,n.push(this._animate(e,arguments[0][e],arguments[1],t));return n}return this._animate.apply(this,arguments)},
/**
       * @private
       * @param {String} property Property to animate
       * @param {String} to Value to animate to
       * @param {Object} [options] Options object
       * @param {Boolean} [skipCallbacks] When true, callbacks like onchange and oncomplete are not invoked
       */
_animate:function(e,t,i,n){var s,r=this;t=t.toString(),i=i?f.util.object.clone(i):{},~e.indexOf(".")&&(s=e.split("."));var a=r.colorProperties.indexOf(e)>-1||s&&r.colorProperties.indexOf(s[1])>-1,o=s?this.get(s[0])[s[1]]:this.get(e);"from"in i||(i.from=o),a||(t=~t.indexOf("=")?o+parseFloat(t.replace("=","")):parseFloat(t));var l={target:this,startValue:i.from,endValue:t,byValue:i.by,easing:i.easing,duration:i.duration,abort:i.abort&&function(e,t,n){return i.abort.call(r,e,t,n)},onChange:function(t,a,o){s?r[s[0]][s[1]]=t:r.set(e,t),n||i.onChange&&i.onChange(t,a,o)},onComplete:function(e,t,s){n||(r.setCoords(),i.onComplete&&i.onComplete(e,t,s))}};return a?f.util.animateColor(l.startValue,l.endValue,l.duration,l):f.util.animate(l)}}),function(e){var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.util.object.clone,s={x1:1,x2:1,y1:1,y2:1};function r(e,t){var i=e.origin,n=e.axis1,s=e.axis2,r=e.dimension,a=t.nearest,o=t.center,l=t.farthest;return function(){switch(this.get(i)){case a:return Math.min(this.get(n),this.get(s));case o:return Math.min(this.get(n),this.get(s))+.5*this.get(r);case l:return Math.max(this.get(n),this.get(s))}}}t.Line?t.warn("fabric.Line is already defined"):(t.Line=t.util.createClass(t.Object,
/** @lends fabric.Line.prototype */
{
/**
         * Type of an object
         * @type String
         * @default
         */
type:"line",
/**
         * x value or first line edge
         * @type Number
         * @default
         */
x1:0,
/**
         * y value or first line edge
         * @type Number
         * @default
         */
y1:0,
/**
         * x value or second line edge
         * @type Number
         * @default
         */
x2:0,
/**
         * y value or second line edge
         * @type Number
         * @default
         */
y2:0,cacheProperties:t.Object.prototype.cacheProperties.concat("x1","x2","y1","y2"),
/**
         * Constructor
         * @param {Array} [points] Array of points
         * @param {Object} [options] Options object
         * @return {fabric.Line} thisArg
         */
initialize:function(e,t){e||(e=[0,0,0,0]),this.callSuper("initialize",t),this.set("x1",e[0]),this.set("y1",e[1]),this.set("x2",e[2]),this.set("y2",e[3]),this._setWidthHeight(t)},
/**
         * @private
         * @param {Object} [options] Options
         */
_setWidthHeight:function(e){e||(e={}),this.width=Math.abs(this.x2-this.x1),this.height=Math.abs(this.y2-this.y1),this.left="left"in e?e.left:this._getLeftToOriginX(),this.top="top"in e?e.top:this._getTopToOriginY()},
/**
         * @private
         * @param {String} key
         * @param {*} value
         */
_set:function(e,t){return this.callSuper("_set",e,t),void 0!==s[e]&&this._setWidthHeight(),this},
/**
         * @private
         * @return {Number} leftToOriginX Distance from left edge of canvas to originX of Line.
         */
_getLeftToOriginX:r({
// property names
origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{
// possible values of origin
nearest:"left",center:"center",farthest:"right"}),
/**
         * @private
         * @return {Number} topToOriginY Distance from top edge of canvas to originY of Line.
         */
_getTopToOriginY:r({
// property names
origin:"originY",axis1:"y1",axis2:"y2",dimension:"height"},{
// possible values of origin
nearest:"top",center:"center",farthest:"bottom"}),
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_render:function(e){e.beginPath();var t=this.calcLinePoints();e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.lineWidth=this.strokeWidth;var i=e.strokeStyle;e.strokeStyle=this.stroke||e.fillStyle,this.stroke&&this._renderStroke(e),e.strokeStyle=i},
/**
         * This function is an helper for svg import. it returns the center of the object in the svg
         * untransformed coordinates
         * @private
         * @return {Object} center point from element coordinates
         */
_findCenterFromElement:function(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}},
/**
         * Returns object representation of an instance
         * @method toObject
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} object representation of an instance
         */
toObject:function(e){return i(this.callSuper("toObject",e),this.calcLinePoints())},
/*
         * Calculate object dimensions from its properties
         * @private
         */
_getNonTransformedDimensions:function(){var e=this.callSuper("_getNonTransformedDimensions");return"butt"===this.strokeLineCap&&(0===this.width&&(e.y-=this.strokeWidth),0===this.height&&(e.x-=this.strokeWidth)),e},
/**
         * Recalculates line points given width and height
         * @private
         */
calcLinePoints:function(){var e=this.x1<=this.x2?-1:1,t=this.y1<=this.y2?-1:1,i=e*this.width*.5,n=t*this.height*.5;return{x1:i,x2:e*this.width*-.5,y1:n,y2:t*this.height*-.5}},
/* _TO_SVG_START_ */
/**
         * Returns svg representation of an instance
         * @return {Array} an array of strings with the specific svg representation
         * of the instance
         */
_toSVG:function(){var e=this.calcLinePoints();return["<line ","COMMON_PARTS",'x1="',e.x1,'" y1="',e.y1,'" x2="',e.x2,'" y2="',e.y2,'" />\n']}
/* _TO_SVG_END_ */}),t.Line.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),t.Line.fromElement=function(e,n,s){s=s||{};var r=t.parseAttributes(e,t.Line.ATTRIBUTE_NAMES),a=[r.x1||0,r.y1||0,r.x2||0,r.y2||0];n(new t.Line(a,i(r,s)))},t.Line.fromObject=function(e,i){var s=n(e,!0);s.points=[e.x1,e.y1,e.x2,e.y2],t.Object._fromObject("Line",s,(function(e){delete e.points,i&&i(e)}),"points")})}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.util.degreesToRadians;t.Circle?t.warn("fabric.Circle is already defined."):(t.Circle=t.util.createClass(t.Object,
/** @lends fabric.Circle.prototype */
{
/**
         * Type of an object
         * @type String
         * @default
         */
type:"circle",
/**
         * Radius of this circle
         * @type Number
         * @default
         */
radius:0,
/**
         * degrees of start of the circle.
         * probably will change to degrees in next major version
         * @type Number 0 - 359
         * @default 0
         */
startAngle:0,
/**
         * End angle of the circle
         * probably will change to degrees in next major version
         * @type Number 1 - 360
         * @default 360
         */
endAngle:360,cacheProperties:t.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),
/**
         * @private
         * @param {String} key
         * @param {*} value
         * @return {fabric.Circle} thisArg
         */
_set:function(e,t){return this.callSuper("_set",e,t),"radius"===e&&this.setRadius(t),this},
/**
         * Returns object representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} object representation of an instance
         */
toObject:function(e){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(e))},
/* _TO_SVG_START_ */
/**
         * Returns svg representation of an instance
         * @return {Array} an array of strings with the specific svg representation
         * of the instance
         */
_toSVG:function(){var e,n=(this.endAngle-this.startAngle)%360;if(0===n)e=["<circle ","COMMON_PARTS",'cx="0" cy="0" ','r="',this.radius,'" />\n'];else{var s=i(this.startAngle),r=i(this.endAngle),a=this.radius;e=['<path d="M '+t.util.cos(s)*a+" "+t.util.sin(s)*a," A "+a+" "+a," 0 ",+(n>180?"1":"0")+" 1"," "+t.util.cos(r)*a+" "+t.util.sin(r)*a,'" ',"COMMON_PARTS"," />\n"]}return e},
/* _TO_SVG_END_ */
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx context to render on
         */
_render:function(e){e.beginPath(),e.arc(0,0,this.radius,i(this.startAngle),i(this.endAngle),!1),this._renderPaintInOrder(e)},
/**
         * Returns horizontal radius of an object (according to how an object is scaled)
         * @return {Number}
         */
getRadiusX:function(){return this.get("radius")*this.get("scaleX")},
/**
         * Returns vertical radius of an object (according to how an object is scaled)
         * @return {Number}
         */
getRadiusY:function(){return this.get("radius")*this.get("scaleY")},
/**
         * Sets radius of an object (and updates width accordingly)
         * @return {fabric.Circle} thisArg
         */
setRadius:function(e){return this.radius=e,this.set("width",2*e).set("height",2*e)}}),t.Circle.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),t.Circle.fromElement=function(e,i){var n,s=t.parseAttributes(e,t.Circle.ATTRIBUTE_NAMES);if(!("radius"in(n=s)&&n.radius>=0))throw new Error("value of `r` attribute is required and can not be negative");s.left=(s.left||0)-s.radius,s.top=(s.top||0)-s.radius,i(new t.Circle(s))},t.Circle.fromObject=function(e,i){t.Object._fromObject("Circle",e,i)})}(e),function(e){var t=e.fabric||(e.fabric={});t.Triangle?t.warn("fabric.Triangle is already defined"):(t.Triangle=t.util.createClass(t.Object,
/** @lends fabric.Triangle.prototype */
{
/**
         * Type of an object
         * @type String
         * @default
         */
type:"triangle",
/**
         * Width is set to 100 to compensate the old initialize code that was setting it to 100
         * @type Number
         * @default
         */
width:100,
/**
         * Height is set to 100 to compensate the old initialize code that was setting it to 100
         * @type Number
         * @default
         */
height:100,
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_render:function(e){var t=this.width/2,i=this.height/2;e.beginPath(),e.moveTo(-t,i),e.lineTo(0,-i),e.lineTo(t,i),e.closePath(),this._renderPaintInOrder(e)},
/* _TO_SVG_START_ */
/**
         * Returns svg representation of an instance
         * @return {Array} an array of strings with the specific svg representation
         * of the instance
         */
_toSVG:function(){var e=this.width/2,t=this.height/2;return["<polygon ","COMMON_PARTS",'points="',[-e+" "+t,"0 "+-t,e+" "+t].join(","),'" />']}
/* _TO_SVG_END_ */}),t.Triangle.fromObject=function(e,i){return t.Object._fromObject("Triangle",e,i)})}(e),function(e){var t=e.fabric||(e.fabric={}),i=2*Math.PI;t.Ellipse?t.warn("fabric.Ellipse is already defined."):(t.Ellipse=t.util.createClass(t.Object,
/** @lends fabric.Ellipse.prototype */
{
/**
         * Type of an object
         * @type String
         * @default
         */
type:"ellipse",
/**
         * Horizontal radius
         * @type Number
         * @default
         */
rx:0,
/**
         * Vertical radius
         * @type Number
         * @default
         */
ry:0,cacheProperties:t.Object.prototype.cacheProperties.concat("rx","ry"),
/**
         * Constructor
         * @param {Object} [options] Options object
         * @return {fabric.Ellipse} thisArg
         */
initialize:function(e){this.callSuper("initialize",e),this.set("rx",e&&e.rx||0),this.set("ry",e&&e.ry||0)},
/**
         * @private
         * @param {String} key
         * @param {*} value
         * @return {fabric.Ellipse} thisArg
         */
_set:function(e,t){switch(this.callSuper("_set",e,t),e){case"rx":this.rx=t,this.set("width",2*t);break;case"ry":this.ry=t,this.set("height",2*t)}return this},
/**
         * Returns horizontal radius of an object (according to how an object is scaled)
         * @return {Number}
         */
getRx:function(){return this.get("rx")*this.get("scaleX")},
/**
         * Returns Vertical radius of an object (according to how an object is scaled)
         * @return {Number}
         */
getRy:function(){return this.get("ry")*this.get("scaleY")},
/**
         * Returns object representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} object representation of an instance
         */
toObject:function(e){return this.callSuper("toObject",["rx","ry"].concat(e))},
/* _TO_SVG_START_ */
/**
         * Returns svg representation of an instance
         * @return {Array} an array of strings with the specific svg representation
         * of the instance
         */
_toSVG:function(){return["<ellipse ","COMMON_PARTS",'cx="0" cy="0" ','rx="',this.rx,'" ry="',this.ry,'" />\n']},
/* _TO_SVG_END_ */
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx context to render on
         */
_render:function(e){e.beginPath(),e.save(),e.transform(1,0,0,this.ry/this.rx,0,0),e.arc(0,0,this.rx,0,i,!1),e.restore(),this._renderPaintInOrder(e)}}),t.Ellipse.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),t.Ellipse.fromElement=function(e,i){var n=t.parseAttributes(e,t.Ellipse.ATTRIBUTE_NAMES);n.left=(n.left||0)-n.rx,n.top=(n.top||0)-n.ry,i(new t.Ellipse(n))},t.Ellipse.fromObject=function(e,i){t.Object._fromObject("Ellipse",e,i)})}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.util.object.extend;t.Rect?t.warn("fabric.Rect is already defined"):(t.Rect=t.util.createClass(t.Object,
/** @lends fabric.Rect.prototype */
{
/**
         * List of properties to consider when checking if state of an object is changed ({@link fabric.Object#hasStateChanged})
         * as well as for history (undo/redo) purposes
         * @type Array
         */
stateProperties:t.Object.prototype.stateProperties.concat("rx","ry"),
/**
         * Type of an object
         * @type String
         * @default
         */
type:"rect",
/**
         * Horizontal border radius
         * @type Number
         * @default
         */
rx:0,
/**
         * Vertical border radius
         * @type Number
         * @default
         */
ry:0,cacheProperties:t.Object.prototype.cacheProperties.concat("rx","ry"),
/**
         * Constructor
         * @param {Object} [options] Options object
         * @return {Object} thisArg
         */
initialize:function(e){this.callSuper("initialize",e),this._initRxRy()},
/**
         * Initializes rx/ry attributes
         * @private
         */
_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_render:function(e){var t=this.rx?Math.min(this.rx,this.width/2):0,i=this.ry?Math.min(this.ry,this.height/2):0,n=this.width,s=this.height,r=-this.width/2,a=-this.height/2,o=0!==t||0!==i,l=.4477152502;e.beginPath(),e.moveTo(r+t,a),e.lineTo(r+n-t,a),o&&e.bezierCurveTo(r+n-l*t,a,r+n,a+l*i,r+n,a+i),e.lineTo(r+n,a+s-i),o&&e.bezierCurveTo(r+n,a+s-l*i,r+n-l*t,a+s,r+n-t,a+s),e.lineTo(r+t,a+s),o&&e.bezierCurveTo(r+l*t,a+s,r,a+s-l*i,r,a+s-i),e.lineTo(r,a+i),o&&e.bezierCurveTo(r,a+l*i,r+l*t,a,r+t,a),e.closePath(),this._renderPaintInOrder(e)},
/**
         * Returns object representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} object representation of an instance
         */
toObject:function(e){return this.callSuper("toObject",["rx","ry"].concat(e))},
/* _TO_SVG_START_ */
/**
         * Returns svg representation of an instance
         * @return {Array} an array of strings with the specific svg representation
         * of the instance
         */
_toSVG:function(){return["<rect ","COMMON_PARTS",'x="',-this.width/2,'" y="',-this.height/2,'" rx="',this.rx,'" ry="',this.ry,'" width="',this.width,'" height="',this.height,'" />\n']}
/* _TO_SVG_END_ */}),t.Rect.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),t.Rect.fromElement=function(e,n,s){if(!e)return n(null);s=s||{};var r=t.parseAttributes(e,t.Rect.ATTRIBUTE_NAMES);r.left=r.left||0,r.top=r.top||0,r.height=r.height||0,r.width=r.width||0;var a=new t.Rect(i(s?t.util.object.clone(s):{},r));a.visible=a.visible&&a.width>0&&a.height>0,n(a)},t.Rect.fromObject=function(e,i){return t.Object._fromObject("Rect",e,i)})}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.util.array.min,s=t.util.array.max,r=t.util.toFixed,a=t.util.projectStrokeOnPoints;t.Polyline?t.warn("fabric.Polyline is already defined"):(t.Polyline=t.util.createClass(t.Object,
/** @lends fabric.Polyline.prototype */
{
/**
         * Type of an object
         * @type String
         * @default
         */
type:"polyline",
/**
         * Points array
         * @type Array
         * @default
         */
points:null,
/**
         * WARNING: Feature in progress
         * Calculate the exact bounding box taking in account strokeWidth on acute angles
         * this will be turned to true by default on fabric 6.0
         * maybe will be left in as an optimization since calculations may be slow
         * @deprecated
         * @type Boolean
         * @default false
         */
exactBoundingBox:!1,cacheProperties:t.Object.prototype.cacheProperties.concat("points"),
/**
         * Constructor
         * @param {Array} points Array of points (where each point is an object with x and y)
         * @param {Object} [options] Options object
         * @return {fabric.Polyline} thisArg
         * @example
         * var poly = new fabric.Polyline([
         *     { x: 10, y: 10 },
         *     { x: 50, y: 30 },
         *     { x: 40, y: 70 },
         *     { x: 60, y: 50 },
         *     { x: 100, y: 150 },
         *     { x: 40, y: 100 }
         *   ], {
         *   stroke: 'red',
         *   left: 100,
         *   top: 100
         * });
         */
initialize:function(e,t){t=t||{},this.points=e||[],this.callSuper("initialize",t),this._setPositionDimensions(t)},
/**
         * @private
         */
_projectStrokeOnPoints:function(){return a(this.points,this,!0)},_setPositionDimensions:function(e){var t,i=this._calcDimensions(e),n=this.exactBoundingBox?this.strokeWidth:0;this.width=i.width-n,this.height=i.height-n,e.fromSVG||(t=this.translateToGivenOrigin({
// this looks bad, but is one way to keep it optional for now.
x:i.left-this.strokeWidth/2+n/2,y:i.top-this.strokeWidth/2+n/2},"left","top",this.originX,this.originY)),void 0===e.left&&(this.left=e.fromSVG?i.left:t.x),void 0===e.top&&(this.top=e.fromSVG?i.top:t.y),this.pathOffset={x:i.left+this.width/2+n/2,y:i.top+this.height/2+n/2}},
/**
         * Calculate the polygon min and max point from points array,
         * returning an object with left, top, width, height to measure the
         * polygon size
         * @return {Object} object.left X coordinate of the polygon leftmost point
         * @return {Object} object.top Y coordinate of the polygon topmost point
         * @return {Object} object.width distance between X coordinates of the polygon leftmost and rightmost point
         * @return {Object} object.height distance between Y coordinates of the polygon topmost and bottommost point
         * @private
         */
_calcDimensions:function(){var e=this.exactBoundingBox?this._projectStrokeOnPoints():this.points,t=n(e,"x")||0,i=n(e,"y")||0;return{left:t,top:i,width:(s(e,"x")||0)-t,height:(s(e,"y")||0)-i}},
/**
         * Returns object representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} Object representation of an instance
         */
toObject:function(e){return i(this.callSuper("toObject",e),{points:this.points.concat()})},
/* _TO_SVG_START_ */
/**
         * Returns svg representation of an instance
         * @return {Array} an array of strings with the specific svg representation
         * of the instance
         */
_toSVG:function(){for(var e=[],i=this.pathOffset.x,n=this.pathOffset.y,s=t.Object.NUM_FRACTION_DIGITS,a=0,o=this.points.length;a<o;a++)e.push(r(this.points[a].x-i,s),",",r(this.points[a].y-n,s)," ");return["<"+this.type+" ","COMMON_PARTS",'points="',e.join(""),'" />\n']},
/* _TO_SVG_END_ */
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
commonRender:function(e){var t,i=this.points.length,n=this.pathOffset.x,s=this.pathOffset.y;if(!i||isNaN(this.points[i-1].y))return!1;e.beginPath(),e.moveTo(this.points[0].x-n,this.points[0].y-s);for(var r=0;r<i;r++)t=this.points[r],e.lineTo(t.x-n,t.y-s);return!0},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_render:function(e){this.commonRender(e)&&this._renderPaintInOrder(e)},
/**
         * Returns complexity of an instance
         * @return {Number} complexity of this instance
         */
complexity:function(){return this.get("points").length}}),t.Polyline.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(),t.Polyline.fromElementGenerator=function(e){return function(n,s,r){if(!n)return s(null);r||(r={});var a=t.parsePointsAttribute(n.getAttribute("points")),o=t.parseAttributes(n,t[e].ATTRIBUTE_NAMES);o.fromSVG=!0,s(new t[e](a,i(o,r)))}},t.Polyline.fromElement=t.Polyline.fromElementGenerator("Polyline"),t.Polyline.fromObject=function(e,i){return t.Object._fromObject("Polyline",e,i,"points")})}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.util.projectStrokeOnPoints;t.Polygon?t.warn("fabric.Polygon is already defined"):(t.Polygon=t.util.createClass(t.Polyline,
/** @lends fabric.Polygon.prototype */
{
/**
         * Type of an object
         * @type String
         * @default
         */
type:"polygon",
/**
         * @private
         */
_projectStrokeOnPoints:function(){return i(this.points,this)},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_render:function(e){this.commonRender(e)&&(e.closePath(),this._renderPaintInOrder(e))}}),t.Polygon.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(),t.Polygon.fromElement=t.Polyline.fromElementGenerator("Polygon"),t.Polygon.fromObject=function(e,i){t.Object._fromObject("Polygon",e,i,"points")})}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.util.array.min,n=t.util.array.max,s=t.util.object.extend,r=t.util.object.clone,a=Object.prototype.toString,o=t.util.toFixed;t.Path?t.warn("fabric.Path is already defined"):(t.Path=t.util.createClass(t.Object,
/** @lends fabric.Path.prototype */
{
/**
         * Type of an object
         * @type String
         * @default
         */
type:"path",
/**
         * Array of path points
         * @type Array
         * @default
         */
path:null,cacheProperties:t.Object.prototype.cacheProperties.concat("path","fillRule"),stateProperties:t.Object.prototype.stateProperties.concat("path"),
/**
         * Constructor
         * @param {Array|String} path Path data (sequence of coordinates and corresponding "command" tokens)
         * @param {Object} [options] Options object
         * @return {fabric.Path} thisArg
         */
initialize:function(e,t){delete(t=r(t||{})).path,this.callSuper("initialize",t),this._setPath(e||[],t)},
/**
        * @private
        * @param {Array|String} path Path data (sequence of coordinates and corresponding "command" tokens)
        * @param {Object} [options] Options object
        */
_setPath:function(e,i){var n="[object Array]"===a.call(e);this.path=t.util.makePathSimpler(n?e:t.util.parsePath(e)),t.Polyline.prototype._setPositionDimensions.call(this,i||{})},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx context to render path on
         */
_renderPathCommands:function(e){var t,i=0,n=0,s=0,r=0,a=0,o=0,l=-this.pathOffset.x,A=-this.pathOffset.y;e.beginPath();for(var c=0,u=this.path.length;c<u;++c)switch((t=this.path[c])[0]){case"L":s=t[1],r=t[2],e.lineTo(s+l,r+A);break;case"M":i=s=t[1],n=r=t[2],e.moveTo(s+l,r+A);break;case"C":s=t[5],r=t[6],a=t[3],o=t[4],e.bezierCurveTo(t[1]+l,t[2]+A,a+l,o+A,s+l,r+A);break;case"Q":e.quadraticCurveTo(t[1]+l,t[2]+A,t[3]+l,t[4]+A),s=t[3],r=t[4],a=t[1],o=t[2];break;case"z":case"Z":s=i,r=n,e.closePath()}},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx context to render path on
         */
_render:function(e){this._renderPathCommands(e),this._renderPaintInOrder(e)},
/**
         * Returns string representation of an instance
         * @return {String} string representation of an instance
         */
toString:function(){return"#<fabric.Path ("+this.complexity()+'): { "top": '+this.top+', "left": '+this.left+" }>"},
/**
         * Returns object representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} object representation of an instance
         */
toObject:function(e){return s(this.callSuper("toObject",e),{path:this.path.map((function(e){return e.slice()}))})},
/**
         * Returns dataless object representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} object representation of an instance
         */
toDatalessObject:function(e){var t=this.toObject(["sourcePath"].concat(e));return t.sourcePath&&delete t.path,t},
/* _TO_SVG_START_ */
/**
         * Returns svg representation of an instance
         * @return {Array} an array of strings with the specific svg representation
         * of the instance
         */
_toSVG:function(){return["<path ","COMMON_PARTS",'d="',t.util.joinPath(this.path),'" stroke-linecap="round" ',"/>\n"]},_getOffsetTransform:function(){var e=t.Object.NUM_FRACTION_DIGITS;return" translate("+o(-this.pathOffset.x,e)+", "+o(-this.pathOffset.y,e)+")"},
/**
         * Returns svg clipPath representation of an instance
         * @param {Function} [reviver] Method for further parsing of svg representation.
         * @return {String} svg representation of an instance
         */
toClipPathSVG:function(e){var t=this._getOffsetTransform();return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})},
/**
         * Returns svg representation of an instance
         * @param {Function} [reviver] Method for further parsing of svg representation.
         * @return {String} svg representation of an instance
         */
toSVG:function(e){var t=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:e,additionalTransform:t})},
/* _TO_SVG_END_ */
/**
         * Returns number representation of an instance complexity
         * @return {Number} complexity of this instance
         */
complexity:function(){return this.path.length},
/**
         * @private
         */
_calcDimensions:function(){for(var e,s,r=[],a=[],o=0,l=0,A=0,c=0,u=0,h=this.path.length;u<h;++u){switch((e=this.path[u])[0]){case"L":A=e[1],c=e[2],s=[];break;case"M":o=A=e[1],l=c=e[2],s=[];break;case"C":s=t.util.getBoundsOfCurve(A,c,e[1],e[2],e[3],e[4],e[5],e[6]),A=e[5],c=e[6];break;case"Q":s=t.util.getBoundsOfCurve(A,c,e[1],e[2],e[1],e[2],e[3],e[4]),A=e[3],c=e[4];break;case"z":case"Z":A=o,c=l}s.forEach((function(e){r.push(e.x),a.push(e.y)})),r.push(A),a.push(c)}var d=i(r)||0,g=i(a)||0;return{left:d,top:g,width:(n(r)||0)-d,height:(n(a)||0)-g}}}),t.Path.fromObject=function(e,i){if("string"==typeof e.sourcePath){var n=e.sourcePath;t.loadSVGFromURL(n,(function(t){var n=t[0];n.setOptions(e),i&&i(n)}))}else t.Object._fromObject("Path",e,i,"path")},t.Path.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat(["d"]),t.Path.fromElement=function(e,i,n){var r=t.parseAttributes(e,t.Path.ATTRIBUTE_NAMES);r.fromSVG=!0,i(new t.Path(r.d,s(r,n)))})}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.util.array.min,n=t.util.array.max;t.Group||(t.Group=t.util.createClass(t.Object,t.Collection,
/** @lends fabric.Group.prototype */
{
/**
         * Type of an object
         * @type String
         * @default
         */
type:"group",
/**
         * Width of stroke
         * @type Number
         * @default
         */
strokeWidth:0,
/**
         * Indicates if click, mouseover, mouseout events & hoverCursor should also check for subtargets
         * @type Boolean
         * @default
         */
subTargetCheck:!1,
/**
         * Groups are container, do not render anything on theyr own, ence no cache properties
         * @type Array
         * @default
         */
cacheProperties:[],
/**
         * setOnGroup is a method used for TextBox that is no more used since 2.0.0 The behavior is still
         * available setting this boolean to true.
         * @type Boolean
         * @since 2.0.0
         * @default
         */
useSetOnGroup:!1,
/**
         * Constructor
         * @param {Object} objects Group objects
         * @param {Object} [options] Options object
         * @param {Boolean} [isAlreadyGrouped] if true, objects have been grouped already.
         * @return {Object} thisArg
         */
initialize:function(e,t,i){t=t||{},this._objects=[],i&&this.callSuper("initialize",t),this._objects=e||[];for(var n=this._objects.length;n--;)this._objects[n].group=this;if(i)this._updateObjectsACoords();else{var s=t&&t.centerPoint;void 0!==t.originX&&(this.originX=t.originX),void 0!==t.originY&&(this.originY=t.originY),s||this._calcBounds(),this._updateObjectsCoords(s),delete t.centerPoint,this.callSuper("initialize",t)}this.setCoords()},
/**
         * @private
         */
_updateObjectsACoords:function(){for(var e=this._objects.length;e--;)this._objects[e].setCoords(true)},
/**
         * @private
         * @param {Boolean} [skipCoordsChange] if true, coordinates of objects enclosed in a group do not change
         */
_updateObjectsCoords:function(e){e=e||this.getCenterPoint();for(var t=this._objects.length;t--;)this._updateObjectCoords(this._objects[t],e)},
/**
         * @private
         * @param {Object} object
         * @param {fabric.Point} center, current center of group.
         */
_updateObjectCoords:function(e,t){var i=e.left,n=e.top;e.set({left:i-t.x,top:n-t.y}),e.group=this,e.setCoords(!0)},
/**
         * Returns string represenation of a group
         * @return {String}
         */
toString:function(){return"#<fabric.Group: ("+this.complexity()+")>"},
/**
         * Adds an object to a group; Then recalculates group's dimension, position.
         * @param {Object} object
         * @return {fabric.Group} thisArg
         * @chainable
         */
addWithUpdate:function(e){var i=!!this.group;return this._restoreObjectsState(),t.util.resetObjectTransform(this),e&&(i&&t.util.removeTransformFromObject(e,this.group.calcTransformMatrix()),this._objects.push(e),e.group=this,e._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.dirty=!0,i?this.group.addWithUpdate():this.setCoords(),this},
/**
         * Removes an object from a group; Then recalculates group's dimension, position.
         * @param {Object} object
         * @return {fabric.Group} thisArg
         * @chainable
         */
removeWithUpdate:function(e){return this._restoreObjectsState(),t.util.resetObjectTransform(this),this.remove(e),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},
/**
         * @private
         */
_onObjectAdded:function(e){this.dirty=!0,e.group=this,e._set("canvas",this.canvas)},
/**
         * @private
         */
_onObjectRemoved:function(e){this.dirty=!0,delete e.group},
/**
         * @private
         */
_set:function(e,i){var n=this._objects.length;if(this.useSetOnGroup)for(;n--;)this._objects[n].setOnGroup(e,i);if("canvas"===e)for(;n--;)this._objects[n]._set(e,i);t.Object.prototype._set.call(this,e,i)},
/**
         * Returns object representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} object representation of an instance
         */
toObject:function(e){var i=this.includeDefaultValues,n=this._objects.filter((function(e){return!e.excludeFromExport})).map((function(t){var n=t.includeDefaultValues;t.includeDefaultValues=i;var s=t.toObject(e);return t.includeDefaultValues=n,s})),s=t.Object.prototype.toObject.call(this,e);return s.objects=n,s},
/**
         * Returns object representation of an instance, in dataless mode.
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} object representation of an instance
         */
toDatalessObject:function(e){var i,n=this.sourcePath;if(n)i=n;else{var s=this.includeDefaultValues;i=this._objects.map((function(t){var i=t.includeDefaultValues;t.includeDefaultValues=s;var n=t.toDatalessObject(e);return t.includeDefaultValues=i,n}))}var r=t.Object.prototype.toDatalessObject.call(this,e);return r.objects=i,r},
/**
         * Renders instance on a given context
         * @param {CanvasRenderingContext2D} ctx context to render instance on
         */
render:function(e){this._transformDone=!0,this.callSuper("render",e),this._transformDone=!1},
/**
         * Decide if the object should cache or not. Create its own cache level
         * needsItsOwnCache should be used when the object drawing method requires
         * a cache step. None of the fabric classes requires it.
         * Generally you do not cache objects in groups because the group is already cached.
         * @return {Boolean}
         */
shouldCache:function(){var e=t.Object.prototype.shouldCache.call(this);if(e)for(var i=0,n=this._objects.length;i<n;i++)if(this._objects[i].willDrawShadow())return this.ownCaching=!1,!1;return e},
/**
         * Check if this object or a child object will cast a shadow
         * @return {Boolean}
         */
willDrawShadow:function(){if(t.Object.prototype.willDrawShadow.call(this))return!0;for(var e=0,i=this._objects.length;e<i;e++)if(this._objects[e].willDrawShadow())return!0;return!1},
/**
         * Check if this group or its parent group are caching, recursively up
         * @return {Boolean}
         */
isOnACache:function(){return this.ownCaching||this.group&&this.group.isOnACache()},
/**
         * Execute the drawing operation for an object on a specified context
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
drawObject:function(e){for(var t=0,i=this._objects.length;t<i;t++)this._objects[t].render(e);this._drawClipPath(e,this.clipPath)},
/**
         * Check if cache is dirty
         */
isCacheDirty:function(e){if(this.callSuper("isCacheDirty",e))return!0;if(!this.statefullCache)return!1;for(var t=0,i=this._objects.length;t<i;t++)if(this._objects[t].isCacheDirty(!0)){if(this._cacheCanvas){var n=this.cacheWidth/this.zoomX,s=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-n/2,-s/2,n,s)}return!0}return!1},
/**
         * Restores original state of each of group objects (original state is that which was before group was created).
         * if the nested boolean is true, the original state will be restored just for the
         * first group and not for all the group chain
         * @private
         * @param {Boolean} nested tell the function to restore object state up to the parent group and not more
         * @return {fabric.Group} thisArg
         * @chainable
         */
_restoreObjectsState:function(){var e=this.calcOwnMatrix();return this._objects.forEach((function(i){t.util.addTransformToObject(i,e),delete i.group,i.setCoords()})),this},
/**
         * Destroys a group (restoring state of its objects)
         * @return {fabric.Group} thisArg
         * @chainable
         */
destroy:function(){return this._objects.forEach((function(e){e.set("dirty",!0)})),this._restoreObjectsState()},dispose:function(){this.callSuper("dispose"),this.forEachObject((function(e){e.dispose&&e.dispose()})),this._objects=[]},
/**
         * make a group an active selection, remove the group from canvas
         * the group has to be on canvas for this to work.
         * @return {fabric.ActiveSelection} thisArg
         * @chainable
         */
toActiveSelection:function(){if(this.canvas){var e=this._objects,i=this.canvas;this._objects=[];var n=this.toObject();delete n.objects;var s=new t.ActiveSelection([]);return s.set(n),s.type="activeSelection",i.remove(this),e.forEach((function(e){e.group=s,e.dirty=!0,i.add(e)})),s.canvas=i,s._objects=e,i._activeObject=s,s.setCoords(),s}},
/**
         * Destroys a group (restoring state of its objects)
         * @return {fabric.Group} thisArg
         * @chainable
         */
ungroupOnCanvas:function(){return this._restoreObjectsState()},
/**
         * Sets coordinates of all objects inside group
         * @return {fabric.Group} thisArg
         * @chainable
         */
setObjectsCoords:function(){return this.forEachObject((function(e){e.setCoords(true)})),this},
/**
         * @private
         */
_calcBounds:function(e){for(var t,i,n,s,r=[],a=[],o=["tr","br","bl","tl"],l=0,A=this._objects.length,c=o.length;l<A;++l){for(n=(t=this._objects[l]).calcACoords(),s=0;s<c;s++)i=o[s],r.push(n[i].x),a.push(n[i].y);t.aCoords=n}this._getBounds(r,a,e)},
/**
         * @private
         */
_getBounds:function(e,s,r){var a=new t.Point(i(e),i(s)),o=new t.Point(n(e),n(s)),l=a.y||0,A=a.x||0,c=o.x-a.x||0,u=o.y-a.y||0;this.width=c,this.height=u,r||this.setPositionByOrigin({x:A,y:l},"left","top")},
/* _TO_SVG_START_ */
/**
         * Returns svg representation of an instance
         * @param {Function} [reviver] Method for further parsing of svg representation.
         * @return {String} svg representation of an instance
         */
_toSVG:function(e){for(var t=["<g ","COMMON_PARTS"," >\n"],i=0,n=this._objects.length;i<n;i++)t.push("\t\t",this._objects[i].toSVG(e));return t.push("</g>\n"),t},
/**
         * Returns styles-string for svg-export, specific version for group
         * @return {String}
         */
getSvgStyles:function(){var e=void 0!==this.opacity&&1!==this.opacity?"opacity: "+this.opacity+";":"",t=this.visible?"":" visibility: hidden;";return[e,this.getSvgFilter(),t].join("")},
/**
         * Returns svg clipPath representation of an instance
         * @param {Function} [reviver] Method for further parsing of svg representation.
         * @return {String} svg representation of an instance
         */
toClipPathSVG:function(e){for(var t=[],i=0,n=this._objects.length;i<n;i++)t.push("\t",this._objects[i].toClipPathSVG(e));return this._createBaseClipPathSVGMarkup(t,{reviver:e})}
/* _TO_SVG_END_ */}),t.Group.fromObject=function(e,i){var n=e.objects,s=t.util.object.clone(e,!0);delete s.objects,"string"!=typeof n?t.util.enlivenObjects(n,(function(n){var s=t.util.object.clone(e,!0);delete s.objects,t.util.enlivenObjectEnlivables(e,s,(function(){i&&i(new t.Group(n,s,!0))}))})):t.loadSVGFromURL(n,(function(r){var a=t.util.groupSVGElements(r,e,n);a.set(s),i&&i(a)}))})}(e),function(e){var t=e.fabric||(e.fabric={});t.ActiveSelection||(t.ActiveSelection=t.util.createClass(t.Group,
/** @lends fabric.ActiveSelection.prototype */
{
/**
         * Type of an object
         * @type String
         * @default
         */
type:"activeSelection",
/**
         * Constructor
         * @param {Object} objects ActiveSelection objects
         * @param {Object} [options] Options object
         * @return {Object} thisArg
         */
initialize:function(e,i){i=i||{},this._objects=e||[];for(var n=this._objects.length;n--;)this._objects[n].group=this;i.originX&&(this.originX=i.originX),i.originY&&(this.originY=i.originY),this._calcBounds(),this._updateObjectsCoords(),t.Object.prototype.initialize.call(this,i),this.setCoords()},
/**
         * Change te activeSelection to a normal group,
         * High level function that automatically adds it to canvas as
         * active object. no events fired.
         * @since 2.0.0
         * @return {fabric.Group}
         */
toGroup:function(){var e=this._objects.concat();this._objects=[];var i=t.Object.prototype.toObject.call(this),n=new t.Group([]);if(delete i.type,n.set(i),e.forEach((function(e){e.canvas.remove(e),e.group=n})),n._objects=e,!this.canvas)return n;var s=this.canvas;return s.add(n),s._activeObject=n,n.setCoords(),n},
/**
         * If returns true, deselection is cancelled.
         * @since 2.0.0
         * @return {Boolean} [cancel]
         */
onDeselect:function(){return this.destroy(),!1},
/**
         * Returns string representation of a group
         * @return {String}
         */
toString:function(){return"#<fabric.ActiveSelection: ("+this.complexity()+")>"},
/**
         * Decide if the object should cache or not. Create its own cache level
         * objectCaching is a global flag, wins over everything
         * needsItsOwnCache should be used when the object drawing method requires
         * a cache step. None of the fabric classes requires it.
         * Generally you do not cache objects in groups because the group outside is cached.
         * @return {Boolean}
         */
shouldCache:function(){return!1},
/**
         * Check if this group or its parent group are caching, recursively up
         * @return {Boolean}
         */
isOnACache:function(){return!1},
/**
         * Renders controls and borders for the object
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {Object} [styleOverride] properties to override the object style
         * @param {Object} [childrenOverride] properties to override the children overrides
         */
_renderControls:function(e,t,i){e.save(),e.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.callSuper("_renderControls",e,t),void 0===(i=i||{}).hasControls&&(i.hasControls=!1),i.forActiveSelection=!0;for(var n=0,s=this._objects.length;n<s;n++)this._objects[n]._renderControls(e,i);e.restore()}}),t.ActiveSelection.fromObject=function(e,i){t.util.enlivenObjects(e.objects,(function(n){delete e.objects,i&&i(new t.ActiveSelection(n,e,!0))}))})}(e),function(e){var t=f.util.object.extend;e.fabric||(e.fabric={}),e.fabric.Image?f.warn("fabric.Image is already defined."):(f.Image=f.util.createClass(f.Object,
/** @lends fabric.Image.prototype */
{
/**
         * Type of an object
         * @type String
         * @default
         */
type:"image",
/**
         * Width of a stroke.
         * For image quality a stroke multiple of 2 gives better results.
         * @type Number
         * @default
         */
strokeWidth:0,
/**
         * When calling {@link fabric.Image.getSrc}, return value from element src with `element.getAttribute('src')`.
         * This allows for relative urls as image src.
         * @since 2.7.0
         * @type Boolean
         * @default
         */
srcFromAttribute:!1,
/**
         * private
         * contains last value of scaleX to detect
         * if the Image got resized after the last Render
         * @type Number
         */
_lastScaleX:1,
/**
         * private
         * contains last value of scaleY to detect
         * if the Image got resized after the last Render
         * @type Number
         */
_lastScaleY:1,
/**
         * private
         * contains last value of scaling applied by the apply filter chain
         * @type Number
         */
_filterScalingX:1,
/**
         * private
         * contains last value of scaling applied by the apply filter chain
         * @type Number
         */
_filterScalingY:1,
/**
         * minimum scale factor under which any resizeFilter is triggered to resize the image
         * 0 will disable the automatic resize. 1 will trigger automatically always.
         * number bigger than 1 are not implemented yet.
         * @type Number
         */
minimumScaleTrigger:.5,
/**
         * List of properties to consider when checking if
         * state of an object is changed ({@link fabric.Object#hasStateChanged})
         * as well as for history (undo/redo) purposes
         * @type Array
         */
stateProperties:f.Object.prototype.stateProperties.concat("cropX","cropY"),
/**
         * List of properties to consider when checking if cache needs refresh
         * Those properties are checked by statefullCache ON ( or lazy mode if we want ) or from single
         * calls to Object.set(key, value). If the key is in this list, the object is marked as dirty
         * and refreshed at the next render
         * @type Array
         */
cacheProperties:f.Object.prototype.cacheProperties.concat("cropX","cropY"),
/**
         * key used to retrieve the texture representing this image
         * @since 2.0.0
         * @type String
         * @default
         */
cacheKey:"",
/**
         * Image crop in pixels from original image size.
         * @since 2.0.0
         * @type Number
         * @default
         */
cropX:0,
/**
         * Image crop in pixels from original image size.
         * @since 2.0.0
         * @type Number
         * @default
         */
cropY:0,
/**
         * Indicates whether this canvas will use image smoothing when painting this image.
         * Also influence if the cacheCanvas for this image uses imageSmoothing
         * @since 4.0.0-beta.11
         * @type Boolean
         * @default
         */
imageSmoothing:!0,
/**
         * Constructor
         * Image can be initialized with any canvas drawable or a string.
         * The string should be a url and will be loaded as an image.
         * Canvas and Image element work out of the box, while videos require extra code to work.
         * Please check video element events for seeking.
         * @param {HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | String} element Image element
         * @param {Object} [options] Options object
         * @param {function} [callback] callback function to call after eventual filters applied.
         * @return {fabric.Image} thisArg
         */
initialize:function(e,t){t||(t={}),this.filters=[],this.cacheKey="texture"+f.Object.__uid++,this.callSuper("initialize",t),this._initElement(e,t)},
/**
         * Returns image element which this instance if based on
         * @return {HTMLImageElement} Image element
         */
getElement:function(){return this._element||{}},
/**
         * Sets image element for this instance to a specified one.
         * If filters defined they are applied to new image.
         * You might need to call `canvas.renderAll` and `object.setCoords` after replacing, to render new image and update controls area.
         * @param {HTMLImageElement} element
         * @param {Object} [options] Options object
         * @return {fabric.Image} thisArg
         * @chainable
         */
setElement:function(e,t){return this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._element=e,this._originalElement=e,this._initConfig(t),0!==this.filters.length&&this.applyFilters(),this.resizeFilter&&this.applyResizeFilters(),this},
/**
         * Delete a single texture if in webgl mode
         */
removeTexture:function(e){var t=f.filterBackend;t&&t.evictCachesForKey&&t.evictCachesForKey(e)},
/**
         * Delete textures, reference to elements and eventually JSDOM cleanup
         */
dispose:function(){this.callSuper("dispose"),this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._cacheContext=void 0,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach(function(e){f.util.cleanUpJsdomNode(this[e]),this[e]=void 0}.bind(this))},
/**
         * Get the crossOrigin value (of the corresponding image element)
         */
getCrossOrigin:function(){return this._originalElement&&(this._originalElement.crossOrigin||null)},
/**
         * Returns original size of an image
         * @return {Object} Object with "width" and "height" properties
         */
getOriginalSize:function(){var e=this.getElement();return{width:e.naturalWidth||e.width,height:e.naturalHeight||e.height}},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_stroke:function(e){if(this.stroke&&0!==this.strokeWidth){var t=this.width/2,i=this.height/2;e.beginPath(),e.moveTo(-t,-i),e.lineTo(t,-i),e.lineTo(t,i),e.lineTo(-t,i),e.lineTo(-t,-i),e.closePath()}},
/**
         * Returns object representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} Object representation of an instance
         */
toObject:function(e){var i=[];this.filters.forEach((function(e){e&&i.push(e.toObject())}));var n=t(this.callSuper("toObject",["cropX","cropY"].concat(e)),{src:this.getSrc(),crossOrigin:this.getCrossOrigin(),filters:i});return this.resizeFilter&&(n.resizeFilter=this.resizeFilter.toObject()),n},
/**
         * Returns true if an image has crop applied, inspecting values of cropX,cropY,width,height.
         * @return {Boolean}
         */
hasCrop:function(){return this.cropX||this.cropY||this.width<this._element.width||this.height<this._element.height},
/* _TO_SVG_START_ */
/**
         * Returns svg representation of an instance
         * @return {Array} an array of strings with the specific svg representation
         * of the instance
         */
_toSVG:function(){var e,t=[],i=[],n=this._element,s=-this.width/2,r=-this.height/2,a="",o="";if(!n)return[];if(this.hasCrop()){var l=f.Object.__uid++;t.push('<clipPath id="imageCrop_'+l+'">\n','\t<rect x="'+s+'" y="'+r+'" width="'+this.width+'" height="'+this.height+'" />\n',"</clipPath>\n"),a=' clip-path="url(#imageCrop_'+l+')" '}if(this.imageSmoothing||(o='" image-rendering="optimizeSpeed'),i.push("\t<image ","COMMON_PARTS",'xlink:href="',this.getSvgSrc(!0),'" x="',s-this.cropX,'" y="',r-this.cropY,
// we're essentially moving origin of transformation from top/left corner to the center of the shape
// by wrapping it in container <g> element with actual transformation, then offsetting object to the top/left
// so that object's center aligns with container's left/top
'" width="',n.width||n.naturalWidth,'" height="',n.height||n.height,o,'"',a,"></image>\n"),this.stroke||this.strokeDashArray){var A=this.fill;this.fill=null,e=["\t<rect ",'x="',s,'" y="',r,'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),'"/>\n'],this.fill=A}return t="fill"!==this.paintFirst?t.concat(e,i):t.concat(i,e)},
/* _TO_SVG_END_ */
/**
         * Returns source of an image
         * @param {Boolean} filtered indicates if the src is needed for svg
         * @return {String} Source of an image
         */
getSrc:function(e){var t=e?this._element:this._originalElement;return t?t.toDataURL?t.toDataURL():this.srcFromAttribute?t.getAttribute("src"):t.src:this.src||""},
/**
         * Sets source of an image
         * @param {String} src Source string (URL)
         * @param {Function} [callback] Callback is invoked when image has been loaded (and all filters have been applied)
         * @param {Object} [options] Options object
         * @param {String} [options.crossOrigin] crossOrigin value (one of "", "anonymous", "use-credentials")
         * @see https://developer.mozilla.org/en-US/docs/HTML/CORS_settings_attributes
         * @return {fabric.Image} thisArg
         * @chainable
         */
setSrc:function(e,t,i){return f.util.loadImage(e,(function(e,n){this.setElement(e,i),this._setWidthHeight(),t&&t(this,n)}),this,i&&i.crossOrigin),this},
/**
         * Returns string representation of an instance
         * @return {String} String representation of an instance
         */
toString:function(){return'#<fabric.Image: { src: "'+this.getSrc()+'" }>'},applyResizeFilters:function(){var e=this.resizeFilter,t=this.minimumScaleTrigger,i=this.getTotalObjectScaling(),n=i.scaleX,s=i.scaleY,r=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!e||n>t&&s>t)return this._element=r,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=n,void(this._lastScaleY=s);f.filterBackend||(f.filterBackend=f.initFilterBackend());var a=f.util.createCanvasElement(),o=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,l=r.width,A=r.height;a.width=l,a.height=A,this._element=a,this._lastScaleX=e.scaleX=n,this._lastScaleY=e.scaleY=s,f.filterBackend.applyFilters([e],r,l,A,this._element,o),this._filterScalingX=a.width/this._originalElement.width,this._filterScalingY=a.height/this._originalElement.height},
/**
         * Applies filters assigned to this image (from "filters" array) or from filter param
         * @method applyFilters
         * @param {Array} filters to be applied
         * @param {Boolean} forResizing specify if the filter operation is a resize operation
         * @return {thisArg} return the fabric.Image object
         * @chainable
         */
applyFilters:function(e){if(e=(e=e||this.filters||[]).filter((function(e){return e&&!e.isNeutralState()})),this.set("dirty",!0),this.removeTexture(this.cacheKey+"_filtered"),0===e.length)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var t=this._originalElement,i=t.naturalWidth||t.width,n=t.naturalHeight||t.height;if(this._element===this._originalElement){var s=f.util.createCanvasElement();s.width=i,s.height=n,this._element=s,this._filteredEl=s}else this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,i,n),this._lastScaleX=1,this._lastScaleY=1;return f.filterBackend||(f.filterBackend=f.initFilterBackend()),f.filterBackend.applyFilters(e,this._originalElement,i,n,this._element,this.cacheKey),this._originalElement.width===this._element.width&&this._originalElement.height===this._element.height||(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height),this},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_render:function(e){f.util.setImageSmoothing(e,this.imageSmoothing),!0!==this.isMoving&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(e),this._renderPaintInOrder(e)},
/**
         * Paint the cached copy of the object on the target context.
         * it will set the imageSmoothing for the draw operation
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
drawCacheOnCanvas:function(e){f.util.setImageSmoothing(e,this.imageSmoothing),f.Object.prototype.drawCacheOnCanvas.call(this,e)},
/**
         * Decide if the object should cache or not. Create its own cache level
         * needsItsOwnCache should be used when the object drawing method requires
         * a cache step. None of the fabric classes requires it.
         * Generally you do not cache objects in groups because the group outside is cached.
         * This is the special image version where we would like to avoid caching where possible.
         * Essentially images do not benefit from caching. They may require caching, and in that
         * case we do it. Also caching an image usually ends in a loss of details.
         * A full performance audit should be done.
         * @return {Boolean}
         */
shouldCache:function(){return this.needsItsOwnCache()},_renderFill:function(e){var t=this._element;if(t){var i=this._filterScalingX,n=this._filterScalingY,s=this.width,r=this.height,a=Math.min,o=Math.max,l=o(this.cropX,0),A=o(this.cropY,0),c=t.naturalWidth||t.width,u=t.naturalHeight||t.height,h=l*i,d=A*n,g=a(s*i,c-h),p=a(r*n,u-d),f=-s/2,m=-r/2,C=a(s,c/i-l),I=a(r,u/n-A);t&&e.drawImage(t,h,d,g,p,f,m,C,I)}},
/**
         * needed to check if image needs resize
         * @private
         */
_needsResize:function(){var e=this.getTotalObjectScaling();return e.scaleX!==this._lastScaleX||e.scaleY!==this._lastScaleY},
/**
         * @private
         */
_resetWidthHeight:function(){this.set(this.getOriginalSize())},
/**
         * The Image class's initialization method. This method is automatically
         * called by the constructor.
         * @private
         * @param {HTMLImageElement|String} element The element representing the image
         * @param {Object} [options] Options object
         */
_initElement:function(e,t){this.setElement(f.util.getById(e),t),f.util.addClass(this.getElement(),f.Image.CSS_CANVAS)},
/**
         * @private
         * @param {Object} [options] Options object
         */
_initConfig:function(e){e||(e={}),this.setOptions(e),this._setWidthHeight(e)},
/**
         * @private
         * @param {Array} filters to be initialized
         * @param {Function} callback Callback to invoke when all fabric.Image.filters instances are created
         */
_initFilters:function(e,t){e&&e.length?f.util.enlivenObjects(e,(function(e){t&&t(e)}),"fabric.Image.filters"):t&&t()},
/**
         * @private
         * Set the width and the height of the image object, using the element or the
         * options.
         * @param {Object} [options] Object with width/height properties
         */
_setWidthHeight:function(e){e||(e={});var t=this.getElement();this.width=e.width||t.naturalWidth||t.width||0,this.height=e.height||t.naturalHeight||t.height||0},
/**
         * Calculate offset for center and scale factor for the image in order to respect
         * the preserveAspectRatio attribute
         * @private
         * @return {Object}
         */
parsePreserveAspectRatioAttribute:function(){var e,t=f.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),i=this._element.width,n=this._element.height,s=1,r=1,a=0,o=0,l=0,A=0,c=this.width,u=this.height,h={width:c,height:u};return!t||"none"===t.alignX&&"none"===t.alignY?(s=c/i,r=u/n):("meet"===t.meetOrSlice&&(e=(c-i*(s=r=f.util.findScaleToFit(this._element,h)))/2,"Min"===t.alignX&&(a=-e),"Max"===t.alignX&&(a=e),e=(u-n*r)/2,"Min"===t.alignY&&(o=-e),"Max"===t.alignY&&(o=e)),"slice"===t.meetOrSlice&&(e=i-c/(s=r=f.util.findScaleToCover(this._element,h)),"Mid"===t.alignX&&(l=e/2),"Max"===t.alignX&&(l=e),e=n-u/r,"Mid"===t.alignY&&(A=e/2),"Max"===t.alignY&&(A=e),i=c/s,n=u/r)),{width:i,height:n,scaleX:s,scaleY:r,offsetLeft:a,offsetTop:o,cropX:l,cropY:A}}}),f.Image.CSS_CANVAS="canvas-img",f.Image.prototype.getSvgSrc=f.Image.prototype.getSrc,f.Image.fromObject=function(e,t){var i=f.util.object.clone(e);f.util.loadImage(i.src,(function(e,n){n?t&&t(null,!0):f.Image.prototype._initFilters.call(i,i.filters,(function(n){i.filters=n||[],f.Image.prototype._initFilters.call(i,[i.resizeFilter],(function(n){i.resizeFilter=n[0],f.util.enlivenObjectEnlivables(i,i,(function(){var n=new f.Image(e,i);t(n,!1)}))}))}))}),null,i.crossOrigin)},f.Image.fromURL=function(e,t,i){f.util.loadImage(e,(function(e,n){t&&t(new f.Image(e,i),n)}),null,i&&i.crossOrigin)},f.Image.ATTRIBUTE_NAMES=f.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin image-rendering".split(" ")),f.Image.fromElement=function(e,i,n){var s=f.parseAttributes(e,f.Image.ATTRIBUTE_NAMES);f.Image.fromURL(s["xlink:href"],i,t(n?f.util.object.clone(n):{},s))})}(e),f.util.object.extend(f.Object.prototype,
/** @lends fabric.Object.prototype */
{
/**
       * @private
       * @return {Number} angle value
       */
_getAngleValueForStraighten:function(){var e=this.angle%360;return e>0?90*Math.round((e-1)/90):90*Math.round(e/90)},
/**
       * Straightens an object (rotating it from current angle to one of 0, 90, 180, 270, etc. depending on which is closer)
       * @return {fabric.Object} thisArg
       * @chainable
       */
straighten:function(){return this.rotate(this._getAngleValueForStraighten())},
/**
       * Same as {@link fabric.Object.prototype.straighten} but with animation
       * @param {Object} callbacks Object with callback functions
       * @param {Function} [callbacks.onComplete] Invoked on completion
       * @param {Function} [callbacks.onChange] Invoked on every step of animation
       * @return {fabric.Object} thisArg
       */
fxStraighten:function(e){var t=function(){},i=(e=e||{}).onComplete||t,n=e.onChange||t,s=this;return f.util.animate({target:this,startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(e){s.rotate(e),n()},onComplete:function(){s.setCoords(),i()}})}}),f.util.object.extend(f.StaticCanvas.prototype,
/** @lends fabric.StaticCanvas.prototype */
{
/**
       * Straightens object, then rerenders canvas
       * @param {fabric.Object} object Object to straighten
       * @return {fabric.Canvas} thisArg
       * @chainable
       */
straightenObject:function(e){return e.straighten(),this.requestRenderAll(),this},
/**
       * Same as {@link fabric.Canvas.prototype.straightenObject}, but animated
       * @param {fabric.Object} object Object to straighten
       * @return {fabric.Canvas} thisArg
       */
fxStraightenObject:function(e){return e.fxStraighten({onChange:this.requestRenderAllBound})}}),function(){function e(e,t){var i="precision "+t+" float;\nvoid main(){}",n=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,i),e.compileShader(n),!!e.getShaderParameter(n,e.COMPILE_STATUS)}function t(e){e&&e.tileSize&&(this.tileSize=e.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}f.isWebglSupported=function(t){if(f.isLikelyNode)return!1;t=t||f.WebglFilterBackend.prototype.tileSize;var i=document.createElement("canvas"),n=i.getContext("webgl")||i.getContext("experimental-webgl"),s=!1;if(n){f.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE),s=f.maxTextureSize>=t;for(var r=["highp","mediump","lowp"],a=0;a<3;a++)if(e(n,r[a])){f.webGlPrecision=r[a];break}}return this.isSupported=s,s},f.WebglFilterBackend=t,t.prototype=/** @lends fabric.WebglFilterBackend.prototype */
{tileSize:2048,
/**
       * Experimental. This object is a sort of repository of help layers used to avoid
       * of recreating them during frequent filtering. If you are previewing a filter with
       * a slider you probably do not want to create help layers every filter step.
       * in this object there will be appended some canvases, created once, resized sometimes
       * cleared never. Clearing is left to the developer.
       **/
resources:{},
/**
       * Setup a WebGL context suitable for filtering, and bind any needed event handlers.
       */
setupGLContext:function(e,t){this.dispose(),this.createWebGLCanvas(e,t),this.aPosition=new Float32Array([0,0,0,1,1,0,1,1]),this.chooseFastestCopyGLTo2DMethod(e,t)},
/**
       * Pick a method to copy data from GL context to 2d canvas.  In some browsers using
       * putImageData is faster than drawImage for that specific operation.
       */
chooseFastestCopyGLTo2DMethod:function(e,t){var i,n=void 0!==window.performance;try{new ImageData(1,1),i=!0}catch(I2){i=!1}var s="undefined"!=typeof ArrayBuffer,r="undefined"!=typeof Uint8ClampedArray;if(n&&i&&s&&r){var a=f.util.createCanvasElement(),o=new ArrayBuffer(e*t*4);if(f.forceGLPutImageData)return this.imageBuffer=o,void(this.copyGLTo2D=I);var l,A,c={imageBuffer:o,destinationWidth:e,destinationHeight:t,targetCanvas:a};a.width=e,a.height=t,l=window.performance.now(),C.call(c,this.gl,c),A=window.performance.now()-l,l=window.performance.now(),I.call(c,this.gl,c),A>window.performance.now()-l?(this.imageBuffer=o,this.copyGLTo2D=I):this.copyGLTo2D=C}},
/**
       * Create a canvas element and associated WebGL context and attaches them as
       * class properties to the GLFilterBackend class.
       */
createWebGLCanvas:function(e,t){var i=f.util.createCanvasElement();i.width=e,i.height=t;var n={alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1},s=i.getContext("webgl",n);s||(s=i.getContext("experimental-webgl",n)),s&&(s.clearColor(0,0,0,0),this.canvas=i,this.gl=s)},
/**
       * Attempts to apply the requested filters to the source provided, drawing the filtered output
       * to the provided target canvas.
       *
       * @param {Array} filters The filters to apply.
       * @param {HTMLImageElement|HTMLCanvasElement} source The source to be filtered.
       * @param {Number} width The width of the source input.
       * @param {Number} height The height of the source input.
       * @param {HTMLCanvasElement} targetCanvas The destination for filtered output to be drawn.
       * @param {String|undefined} cacheKey A key used to cache resources related to the source. If
       * omitted, caching will be skipped.
       */
applyFilters:function(e,t,i,n,s,r){var a,o=this.gl;r&&(a=this.getCachedTexture(r,t));var l={originalWidth:t.width||t.originalWidth,originalHeight:t.height||t.originalHeight,sourceWidth:i,sourceHeight:n,destinationWidth:i,destinationHeight:n,context:o,sourceTexture:this.createTexture(o,i,n,!a&&t),targetTexture:this.createTexture(o,i,n),originalTexture:a||this.createTexture(o,i,n,!a&&t),passes:e.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:s},A=o.createFramebuffer();return o.bindFramebuffer(o.FRAMEBUFFER,A),e.forEach((function(e){e&&e.applyTo(l)})),function(e){var t=e.targetCanvas,i=t.width,n=t.height,s=e.destinationWidth,r=e.destinationHeight;i===s&&n===r||(t.width=s,t.height=r)}(l),this.copyGLTo2D(o,l),o.bindTexture(o.TEXTURE_2D,null),o.deleteTexture(l.sourceTexture),o.deleteTexture(l.targetTexture),o.deleteFramebuffer(A),s.getContext("2d").setTransform(1,0,0,1,0,0),l},
/**
       * Detach event listeners, remove references, and clean up caches.
       */
dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},
/**
       * Wipe out WebGL-related caches.
       */
clearWebGLCaches:function(){this.programCache={},this.textureCache={}},
/**
       * Create a WebGL texture object.
       *
       * Accepts specific dimensions to initialize the texture to or a source image.
       *
       * @param {WebGLRenderingContext} gl The GL context to use for creating the texture.
       * @param {Number} width The width to initialize the texture at.
       * @param {Number} height The height to initialize the texture.
       * @param {HTMLImageElement|HTMLCanvasElement} textureImageSource A source for the texture data.
       * @returns {WebGLTexture}
       */
createTexture:function(e,t,i,n){var s=e.createTexture();return e.bindTexture(e.TEXTURE_2D,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t,i,0,e.RGBA,e.UNSIGNED_BYTE,null),s},
/**
       * Can be optionally used to get a texture from the cache array
       *
       * If an existing texture is not found, a new texture is created and cached.
       *
       * @param {String} uniqueId A cache key to use to find an existing texture.
       * @param {HTMLImageElement|HTMLCanvasElement} textureImageSource A source to use to create the
       * texture cache entry if one does not already exist.
       */
getCachedTexture:function(e,t){if(this.textureCache[e])return this.textureCache[e];var i=this.createTexture(this.gl,t.width,t.height,t);return this.textureCache[e]=i,i},
/**
       * Clear out cached resources related to a source image that has been
       * filtered previously.
       *
       * @param {String} cacheKey The cache key provided when the source image was filtered.
       */
evictCachesForKey:function(e){this.textureCache[e]&&(this.gl.deleteTexture(this.textureCache[e]),delete this.textureCache[e])},copyGLTo2D:C,
/**
       * Attempt to extract GPU information strings from a WebGL context.
       *
       * Useful information when debugging or blacklisting specific GPUs.
       *
       * @returns {Object} A GPU info object with renderer and vendor strings.
       */
captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var e=this.gl,t={renderer:"",vendor:""};if(!e)return t;var i=e.getExtension("WEBGL_debug_renderer_info");if(i){var n=e.getParameter(i.UNMASKED_RENDERER_WEBGL),s=e.getParameter(i.UNMASKED_VENDOR_WEBGL);n&&(t.renderer=n.toLowerCase()),s&&(t.vendor=s.toLowerCase())}return this.gpuInfo=t,t}}}(),function(){var e=function(){};function t(){}f.Canvas2dFilterBackend=t,t.prototype=/** @lends fabric.Canvas2dFilterBackend.prototype */
{evictCachesForKey:e,dispose:e,clearWebGLCaches:e,
/**
       * Experimental. This object is a sort of repository of help layers used to avoid
       * of recreating them during frequent filtering. If you are previewing a filter with
       * a slider you probably do not want to create help layers every filter step.
       * in this object there will be appended some canvases, created once, resized sometimes
       * cleared never. Clearing is left to the developer.
       **/
resources:{},
/**
       * Apply a set of filters against a source image and draw the filtered output
       * to the provided destination canvas.
       *
       * @param {EnhancedFilter} filters The filter to apply.
       * @param {HTMLImageElement|HTMLCanvasElement} sourceElement The source to be filtered.
       * @param {Number} sourceWidth The width of the source input.
       * @param {Number} sourceHeight The height of the source input.
       * @param {HTMLCanvasElement} targetCanvas The destination for filtered output to be drawn.
       */
applyFilters:function(e,t,i,n,s){var r=s.getContext("2d");r.drawImage(t,0,0,i,n);var a={sourceWidth:i,sourceHeight:n,imageData:r.getImageData(0,0,i,n),originalEl:t,originalImageData:r.getImageData(0,0,i,n),canvasEl:s,ctx:r,filterBackend:this};return e.forEach((function(e){e.applyTo(a)})),a.imageData.width===i&&a.imageData.height===n||(s.width=a.imageData.width,s.height=a.imageData.height),r.putImageData(a.imageData,0,0),a}}}(),f.Image=f.Image||{},f.Image.filters=f.Image.filters||{},f.Image.filters.BaseFilter=f.util.createClass(
/** @lends fabric.Image.filters.BaseFilter.prototype */
{
/**
       * Filter type
       * @param {String} type
       * @default
       */
type:"BaseFilter",
/**
       * Array of attributes to send with buffers. do not modify
       * @private
       */
vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvoid main() {\nvTexCoord = aPosition;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:"precision highp float;\nvarying vec2 vTexCoord;\nuniform sampler2D uTexture;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\n}",
/**
       * Constructor
       * @param {Object} [options] Options object
       */
initialize:function(e){e&&this.setOptions(e)},
/**
       * Sets filter's properties from options
       * @param {Object} [options] Options object
       */
setOptions:function(e){for(var t in e)this[t]=e[t]},
/**
       * Compile this filter's shader program.
       *
       * @param {WebGLRenderingContext} gl The GL canvas context to use for shader compilation.
       * @param {String} fragmentSource fragmentShader source for compilation
       * @param {String} vertexSource vertexShader source for compilation
       */
createProgram:function(e,t,i){t=t||this.fragmentSource,i=i||this.vertexSource,"highp"!==f.webGlPrecision&&(t=t.replace(/precision highp float/g,"precision "+f.webGlPrecision+" float"));var n=e.createShader(e.VERTEX_SHADER);if(e.shaderSource(n,i),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS))throw new Error(
// eslint-disable-next-line prefer-template
"Vertex shader compile error for "+this.type+": "+e.getShaderInfoLog(n));var s=e.createShader(e.FRAGMENT_SHADER);if(e.shaderSource(s,t),e.compileShader(s),!e.getShaderParameter(s,e.COMPILE_STATUS))throw new Error(
// eslint-disable-next-line prefer-template
"Fragment shader compile error for "+this.type+": "+e.getShaderInfoLog(s));var r=e.createProgram();if(e.attachShader(r,n),e.attachShader(r,s),e.linkProgram(r),!e.getProgramParameter(r,e.LINK_STATUS))throw new Error(
// eslint-disable-next-line prefer-template
'Shader link error for "${this.type}" '+e.getProgramInfoLog(r));var a=this.getAttributeLocations(e,r),o=this.getUniformLocations(e,r)||{};return o.uStepW=e.getUniformLocation(r,"uStepW"),o.uStepH=e.getUniformLocation(r,"uStepH"),{program:r,attributeLocations:a,uniformLocations:o}},
/**
       * Return a map of attribute names to WebGLAttributeLocation objects.
       *
       * @param {WebGLRenderingContext} gl The canvas context used to compile the shader program.
       * @param {WebGLShaderProgram} program The shader program from which to take attribute locations.
       * @returns {Object} A map of attribute names to attribute locations.
       */
getAttributeLocations:function(e,t){return{aPosition:e.getAttribLocation(t,"aPosition")}},
/**
       * Return a map of uniform names to WebGLUniformLocation objects.
       *
       * Intended to be overridden by subclasses.
       *
       * @param {WebGLRenderingContext} gl The canvas context used to compile the shader program.
       * @param {WebGLShaderProgram} program The shader program from which to take uniform locations.
       * @returns {Object} A map of uniform names to uniform locations.
       */
getUniformLocations:function(){return{}},
/**
       * Send attribute data from this filter to its shader program on the GPU.
       *
       * @param {WebGLRenderingContext} gl The canvas context used to compile the shader program.
       * @param {Object} attributeLocations A map of shader attribute names to their locations.
       */
sendAttributeData:function(e,t,i){var n=t.aPosition,s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.enableVertexAttribArray(n),e.vertexAttribPointer(n,2,e.FLOAT,!1,0,0),e.bufferData(e.ARRAY_BUFFER,i,e.STATIC_DRAW)},_setupFrameBuffer:function(e){var t,i,n=e.context;e.passes>1?(t=e.destinationWidth,i=e.destinationHeight,e.sourceWidth===t&&e.sourceHeight===i||(n.deleteTexture(e.targetTexture),e.targetTexture=e.filterBackend.createTexture(n,t,i)),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.targetTexture,0)):(n.bindFramebuffer(n.FRAMEBUFFER,null),n.finish())},_swapTextures:function(e){e.passes--,e.pass++;var t=e.targetTexture;e.targetTexture=e.sourceTexture,e.sourceTexture=t},
/**
       * Generic isNeutral implementation for one parameter based filters.
       * Used only in image applyFilters to discard filters that will not have an effect
       * on the image
       * Other filters may need their own version ( ColorMatrix, HueRotation, gamma, ComposedFilter )
       * @param {Object} options
       **/
isNeutralState:function(){var e=this.mainParameter,t=f.Image.filters[this.type].prototype;if(e){if(Array.isArray(t[e])){for(var i=t[e].length;i--;)if(this[e][i]!==t[e][i])return!1;return!0}return t[e]===this[e]}return!1},
/**
       * Apply this filter to the input image data provided.
       *
       * Determines whether to use WebGL or Canvas2D based on the options.webgl flag.
       *
       * @param {Object} options
       * @param {Number} options.passes The number of filters remaining to be executed
       * @param {Boolean} options.webgl Whether to use webgl to render the filter.
       * @param {WebGLTexture} options.sourceTexture The texture setup as the source to be filtered.
       * @param {WebGLTexture} options.targetTexture The texture where filtered output should be drawn.
       * @param {WebGLRenderingContext} options.context The GL context used for rendering.
       * @param {Object} options.programCache A map of compiled shader programs, keyed by filter type.
       */
applyTo:function(e){e.webgl?(this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)},
/**
       * Retrieves the cached shader.
       * @param {Object} options
       * @param {WebGLRenderingContext} options.context The GL context used for rendering.
       * @param {Object} options.programCache A map of compiled shader programs, keyed by filter type.
       */
retrieveShader:function(e){return e.programCache.hasOwnProperty(this.type)||(e.programCache[this.type]=this.createProgram(e.context)),e.programCache[this.type]},
/**
       * Apply this filter using webgl.
       *
       * @param {Object} options
       * @param {Number} options.passes The number of filters remaining to be executed
       * @param {Boolean} options.webgl Whether to use webgl to render the filter.
       * @param {WebGLTexture} options.originalTexture The texture of the original input image.
       * @param {WebGLTexture} options.sourceTexture The texture setup as the source to be filtered.
       * @param {WebGLTexture} options.targetTexture The texture where filtered output should be drawn.
       * @param {WebGLRenderingContext} options.context The GL context used for rendering.
       * @param {Object} options.programCache A map of compiled shader programs, keyed by filter type.
       */
applyToWebGL:function(e){var t=e.context,i=this.retrieveShader(e);0===e.pass&&e.originalTexture?t.bindTexture(t.TEXTURE_2D,e.originalTexture):t.bindTexture(t.TEXTURE_2D,e.sourceTexture),t.useProgram(i.program),this.sendAttributeData(t,i.attributeLocations,e.aPosition),t.uniform1f(i.uniformLocations.uStepW,1/e.sourceWidth),t.uniform1f(i.uniformLocations.uStepH,1/e.sourceHeight),this.sendUniformData(t,i.uniformLocations),t.viewport(0,0,e.destinationWidth,e.destinationHeight),t.drawArrays(t.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(e,t,i){e.activeTexture(i),e.bindTexture(e.TEXTURE_2D,t),e.activeTexture(e.TEXTURE0)},unbindAdditionalTexture:function(e,t){e.activeTexture(t),e.bindTexture(e.TEXTURE_2D,null),e.activeTexture(e.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(e){this[this.mainParameter]=e},
/**
       * Send uniform data from this filter to its shader program on the GPU.
       *
       * Intended to be overridden by subclasses.
       *
       * @param {WebGLRenderingContext} gl The canvas context used to compile the shader program.
       * @param {Object} uniformLocations A map of shader uniform names to their locations.
       */
sendUniformData:function(){},
/**
       * If needed by a 2d filter, this functions can create an helper canvas to be used
       * remember that options.targetCanvas is available for use till end of chain.
       */
createHelpLayer:function(e){if(!e.helpLayer){var t=document.createElement("canvas");t.width=e.sourceWidth,t.height=e.sourceHeight,e.helpLayer=t}},
/**
       * Returns object representation of an instance
       * @return {Object} Object representation of an instance
       */
toObject:function(){var e={type:this.type},t=this.mainParameter;return t&&(e[t]=this[t]),e},
/**
       * Returns a JSON representation of an instance
       * @return {Object} JSON
       */
toJSON:function(){return this.toObject()}}),f.Image.filters.BaseFilter.fromObject=function(e,t){var i=new f.Image.filters[e.type](e);return t&&t(i),i},function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.ColorMatrix=n(i.BaseFilter,
/** @lends fabric.Image.filters.ColorMatrix.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"ColorMatrix",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nuniform mat4 uColorMatrix;\nuniform vec4 uConstants;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor *= uColorMatrix;\ncolor += uConstants;\ngl_FragColor = color;\n}",
/**
         * Colormatrix for pixels.
         * array of 20 floats. Numbers in positions 4, 9, 14, 19 loose meaning
         * outside the -1, 1 range.
         * 0.0039215686 is the part of 1 that get translated to 1 in 2d
         * @param {Array} matrix array of 20 numbers.
         * @default
         */
matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],mainParameter:"matrix",
/**
         * Lock the colormatrix on the color part, skipping alpha, manly for non webgl scenario
         * to save some calculation
         */
colorsOnly:!0,
/**
         * Constructor
         * @param {Object} [options] Options object
         */
initialize:function(e){this.callSuper("initialize",e),this.matrix=this.matrix.slice(0)},
/**
         * Apply the ColorMatrix operation to a Uint8Array representing the pixels of an image.
         *
         * @param {Object} options
         * @param {ImageData} options.imageData The Uint8Array to be filtered.
         */
applyTo2d:function(e){var t,i,n,s,r,a=e.imageData.data,o=a.length,l=this.matrix,A=this.colorsOnly;for(r=0;r<o;r+=4)t=a[r],i=a[r+1],n=a[r+2],A?(a[r]=t*l[0]+i*l[1]+n*l[2]+255*l[4],a[r+1]=t*l[5]+i*l[6]+n*l[7]+255*l[9],a[r+2]=t*l[10]+i*l[11]+n*l[12]+255*l[14]):(s=a[r+3],a[r]=t*l[0]+i*l[1]+n*l[2]+s*l[3]+255*l[4],a[r+1]=t*l[5]+i*l[6]+n*l[7]+s*l[8]+255*l[9],a[r+2]=t*l[10]+i*l[11]+n*l[12]+s*l[13]+255*l[14],a[r+3]=t*l[15]+i*l[16]+n*l[17]+s*l[18]+255*l[19])},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uColorMatrix:e.getUniformLocation(t,"uColorMatrix"),uConstants:e.getUniformLocation(t,"uConstants")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){var i=this.matrix,n=[i[0],i[1],i[2],i[3],i[5],i[6],i[7],i[8],i[10],i[11],i[12],i[13],i[15],i[16],i[17],i[18]],s=[i[4],i[9],i[14],i[19]];e.uniformMatrix4fv(t.uColorMatrix,!1,n),e.uniform4fv(t.uConstants,s)}}),t.Image.filters.ColorMatrix.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Brightness=n(i.BaseFilter,
/** @lends fabric.Image.filters.Brightness.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"Brightness",
/**
         * Fragment source for the brightness program
         */
fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBrightness;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += uBrightness;\ngl_FragColor = color;\n}",
/**
         * Brightness value, from -1 to 1.
         * translated to -255 to 255 for 2d
         * 0.0039215686 is the part of 1 that get translated to 1 in 2d
         * @param {Number} brightness
         * @default
         */
brightness:0,
/**
         * Describe the property that is the filter parameter
         * @param {String} m
         * @default
         */
mainParameter:"brightness",
/**
        * Apply the Brightness operation to a Uint8ClampedArray representing the pixels of an image.
        *
        * @param {Object} options
        * @param {ImageData} options.imageData The Uint8ClampedArray to be filtered.
        */
applyTo2d:function(e){if(0!==this.brightness){var t,i=e.imageData.data,n=i.length,s=Math.round(255*this.brightness);for(t=0;t<n;t+=4)i[t]=i[t]+s,i[t+1]=i[t+1]+s,i[t+2]=i[t+2]+s}},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uBrightness:e.getUniformLocation(t,"uBrightness")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){e.uniform1f(t.uBrightness,this.brightness)}}),t.Image.filters.Brightness.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.Image.filters,s=t.util.createClass;n.Convolute=s(n.BaseFilter,
/** @lends fabric.Image.filters.Convolute.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"Convolute",
/*
         * Opaque value (true/false)
         */
opaque:!1,
/*
         * matrix for the filter, max 9x9
         */
matrix:[0,0,0,0,1,0,0,0,0],
/**
         * Fragment source for the brightness program
         */
fragmentSource:{Convolute_3_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1), uStepH * (h - 1));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 3.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_3_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1.0), uStepH * (h - 1.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 3.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_5_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 5.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_5_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 5.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_7_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 7.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_7_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 7.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_9_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 9.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_9_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 9.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}"},
/**
         * Constructor
         * @memberOf fabric.Image.filters.Convolute.prototype
         * @param {Object} [options] Options object
         * @param {Boolean} [options.opaque=false] Opaque value (true/false)
         * @param {Array} [options.matrix] Filter matrix
         */
/**
        * Retrieves the cached shader.
        * @param {Object} options
        * @param {WebGLRenderingContext} options.context The GL context used for rendering.
        * @param {Object} options.programCache A map of compiled shader programs, keyed by filter type.
        */
retrieveShader:function(e){var t=Math.sqrt(this.matrix.length),i=this.type+"_"+t+"_"+(this.opaque?1:0),n=this.fragmentSource[i];return e.programCache.hasOwnProperty(i)||(e.programCache[i]=this.createProgram(e.context,n)),e.programCache[i]},
/**
         * Apply the Brightness operation to a Uint8ClampedArray representing the pixels of an image.
         *
         * @param {Object} options
         * @param {ImageData} options.imageData The Uint8ClampedArray to be filtered.
         */
applyTo2d:function(e){var t,i,n,s,r,a,o,l,A,c,u,h,d,g=e.imageData,p=g.data,f=this.matrix,m=Math.round(Math.sqrt(f.length)),C=Math.floor(m/2),I=g.width,v=g.height,B=e.ctx.createImageData(I,v),y=B.data,b=this.opaque?1:0;for(u=0;u<v;u++)for(c=0;c<I;c++){for(r=4*(u*I+c),t=0,i=0,n=0,s=0,d=0;d<m;d++)for(h=0;h<m;h++)a=c+h-C,(o=u+d-C)<0||o>=v||a<0||a>=I||(l=4*(o*I+a),A=f[d*m+h],t+=p[l]*A,i+=p[l+1]*A,n+=p[l+2]*A,b||(s+=p[l+3]*A));y[r]=t,y[r+1]=i,y[r+2]=n,y[r+3]=b?p[r+3]:s}e.imageData=B},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uMatrix:e.getUniformLocation(t,"uMatrix"),uOpaque:e.getUniformLocation(t,"uOpaque"),uHalfSize:e.getUniformLocation(t,"uHalfSize"),uSize:e.getUniformLocation(t,"uSize")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){e.uniform1fv(t.uMatrix,this.matrix)},
/**
         * Returns object representation of an instance
         * @return {Object} Object representation of an instance
         */
toObject:function(){return i(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),t.Image.filters.Convolute.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Grayscale=n(i.BaseFilter,
/** @lends fabric.Image.filters.Grayscale.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"Grayscale",fragmentSource:{average:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat average = (color.r + color.b + color.g) / 3.0;\ngl_FragColor = vec4(average, average, average, color.a);\n}",lightness:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = (max(max(col.r, col.g),col.b) + min(min(col.r, col.g),col.b)) / 2.0;\ngl_FragColor = vec4(average, average, average, col.a);\n}",luminosity:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b;\ngl_FragColor = vec4(average, average, average, col.a);\n}"},
/**
         * Grayscale mode, between 'average', 'lightness', 'luminosity'
         * @param {String} type
         * @default
         */
mode:"average",mainParameter:"mode",
/**
         * Apply the Grayscale operation to a Uint8Array representing the pixels of an image.
         *
         * @param {Object} options
         * @param {ImageData} options.imageData The Uint8Array to be filtered.
         */
applyTo2d:function(e){var t,i,n=e.imageData.data,s=n.length,r=this.mode;for(t=0;t<s;t+=4)"average"===r?i=(n[t]+n[t+1]+n[t+2])/3:"lightness"===r?i=(Math.min(n[t],n[t+1],n[t+2])+Math.max(n[t],n[t+1],n[t+2]))/2:"luminosity"===r&&(i=.21*n[t]+.72*n[t+1]+.07*n[t+2]),n[t]=i,n[t+1]=i,n[t+2]=i},
/**
         * Retrieves the cached shader.
         * @param {Object} options
         * @param {WebGLRenderingContext} options.context The GL context used for rendering.
         * @param {Object} options.programCache A map of compiled shader programs, keyed by filter type.
         */
retrieveShader:function(e){var t=this.type+"_"+this.mode;if(!e.programCache.hasOwnProperty(t)){var i=this.fragmentSource[this.mode];e.programCache[t]=this.createProgram(e.context,i)}return e.programCache[t]},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uMode:e.getUniformLocation(t,"uMode")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){e.uniform1i(t.uMode,1)},
/**
         * Grayscale filter isNeutralState implementation
         * The filter is never neutral
         * on the image
         **/
isNeutralState:function(){return!1}}),t.Image.filters.Grayscale.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Invert=n(i.BaseFilter,
/** @lends fabric.Image.filters.Invert.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"Invert",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uInvert;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nif (uInvert == 1) {\ngl_FragColor = vec4(1.0 - color.r,1.0 -color.g,1.0 -color.b,color.a);\n} else {\ngl_FragColor = color;\n}\n}",
/**
         * Filter invert. if false, does nothing
         * @param {Boolean} invert
         * @default
         */
invert:!0,mainParameter:"invert",
/**
         * Apply the Invert operation to a Uint8Array representing the pixels of an image.
         *
         * @param {Object} options
         * @param {ImageData} options.imageData The Uint8Array to be filtered.
         */
applyTo2d:function(e){var t,i=e.imageData.data,n=i.length;for(t=0;t<n;t+=4)i[t]=255-i[t],i[t+1]=255-i[t+1],i[t+2]=255-i[t+2]},
/**
         * Invert filter isNeutralState implementation
         * Used only in image applyFilters to discard filters that will not have an effect
         * on the image
         * @param {Object} options
         **/
isNeutralState:function(){return!this.invert},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uInvert:e.getUniformLocation(t,"uInvert")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){e.uniform1i(t.uInvert,this.invert)}}),t.Image.filters.Invert.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.Image.filters,s=t.util.createClass;n.Noise=s(n.BaseFilter,
/** @lends fabric.Image.filters.Noise.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"Noise",
/**
         * Fragment source for the noise program
         */
fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uStepH;\nuniform float uNoise;\nuniform float uSeed;\nvarying vec2 vTexCoord;\nfloat rand(vec2 co, float seed, float vScale) {\nreturn fract(sin(dot(co.xy * vScale ,vec2(12.9898 , 78.233))) * 43758.5453 * (seed + 0.01) / 2.0);\n}\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += (0.5 - rand(vTexCoord, uSeed, 0.1 / uStepH)) * uNoise;\ngl_FragColor = color;\n}",
/**
         * Describe the property that is the filter parameter
         * @param {String} m
         * @default
         */
mainParameter:"noise",
/**
         * Noise value, from
         * @param {Number} noise
         * @default
         */
noise:0,
/**
         * Apply the Brightness operation to a Uint8ClampedArray representing the pixels of an image.
         *
         * @param {Object} options
         * @param {ImageData} options.imageData The Uint8ClampedArray to be filtered.
         */
applyTo2d:function(e){if(0!==this.noise){var t,i,n=e.imageData.data,s=n.length,r=this.noise;for(t=0,s=n.length;t<s;t+=4)i=(.5-Math.random())*r,n[t]+=i,n[t+1]+=i,n[t+2]+=i}},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uNoise:e.getUniformLocation(t,"uNoise"),uSeed:e.getUniformLocation(t,"uSeed")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){e.uniform1f(t.uNoise,this.noise/255),e.uniform1f(t.uSeed,Math.random())},
/**
         * Returns object representation of an instance
         * @return {Object} Object representation of an instance
         */
toObject:function(){return i(this.callSuper("toObject"),{noise:this.noise})}}),t.Image.filters.Noise.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Pixelate=n(i.BaseFilter,
/** @lends fabric.Image.filters.Pixelate.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"Pixelate",blocksize:4,mainParameter:"blocksize",
/**
         * Fragment source for the Pixelate program
         */
fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBlocksize;\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nfloat blockW = uBlocksize * uStepW;\nfloat blockH = uBlocksize * uStepW;\nint posX = int(vTexCoord.x / blockW);\nint posY = int(vTexCoord.y / blockH);\nfloat fposX = float(posX);\nfloat fposY = float(posY);\nvec2 squareCoords = vec2(fposX * blockW, fposY * blockH);\nvec4 color = texture2D(uTexture, squareCoords);\ngl_FragColor = color;\n}",
/**
         * Apply the Pixelate operation to a Uint8ClampedArray representing the pixels of an image.
         *
         * @param {Object} options
         * @param {ImageData} options.imageData The Uint8ClampedArray to be filtered.
         */
applyTo2d:function(e){var t,i,n,s,r,a,o,l,A,c,u,h=e.imageData,d=h.data,g=h.height,p=h.width;for(i=0;i<g;i+=this.blocksize)for(n=0;n<p;n+=this.blocksize)for(s=d[t=4*i*p+4*n],r=d[t+1],a=d[t+2],o=d[t+3],c=Math.min(i+this.blocksize,g),u=Math.min(n+this.blocksize,p),l=i;l<c;l++)for(A=n;A<u;A++)d[t=4*l*p+4*A]=s,d[t+1]=r,d[t+2]=a,d[t+3]=o},
/**
         * Indicate when the filter is not gonna apply changes to the image
         **/
isNeutralState:function(){return 1===this.blocksize},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uBlocksize:e.getUniformLocation(t,"uBlocksize"),uStepW:e.getUniformLocation(t,"uStepW"),uStepH:e.getUniformLocation(t,"uStepH")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){e.uniform1f(t.uBlocksize,this.blocksize)}}),t.Image.filters.Pixelate.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.util.object.extend,n=t.Image.filters,s=t.util.createClass;n.RemoveColor=s(n.BaseFilter,
/** @lends fabric.Image.filters.RemoveColor.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"RemoveColor",
/**
         * Color to remove, in any format understood by fabric.Color.
         * @param {String} type
         * @default
         */
color:"#FFFFFF",
/**
         * Fragment source for the brightness program
         */
fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uLow;\nuniform vec4 uHigh;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\nif(all(greaterThan(gl_FragColor.rgb,uLow.rgb)) && all(greaterThan(uHigh.rgb,gl_FragColor.rgb))) {\ngl_FragColor.a = 0.0;\n}\n}",
/**
         * distance to actual color, as value up or down from each r,g,b
         * between 0 and 1
         **/
distance:.02,
/**
         * For color to remove inside distance, use alpha channel for a smoother deletion
         * NOT IMPLEMENTED YET
         **/
useAlpha:!1,
/**
         * Constructor
         * @memberOf fabric.Image.filters.RemoveWhite.prototype
         * @param {Object} [options] Options object
         * @param {Number} [options.color=#RRGGBB] Threshold value
         * @param {Number} [options.distance=10] Distance value
         */
/**
         * Applies filter to canvas element
         * @param {Object} canvasEl Canvas element to apply filter to
         */
applyTo2d:function(e){var i,n,s,r,a=e.imageData.data,o=255*this.distance,l=new t.Color(this.color).getSource(),A=[l[0]-o,l[1]-o,l[2]-o],c=[l[0]+o,l[1]+o,l[2]+o];for(i=0;i<a.length;i+=4)n=a[i],s=a[i+1],r=a[i+2],n>A[0]&&s>A[1]&&r>A[2]&&n<c[0]&&s<c[1]&&r<c[2]&&(a[i+3]=0)},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uLow:e.getUniformLocation(t,"uLow"),uHigh:e.getUniformLocation(t,"uHigh")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,i){var n=new t.Color(this.color).getSource(),s=parseFloat(this.distance),r=[0+n[0]/255-s,0+n[1]/255-s,0+n[2]/255-s,1],a=[n[0]/255+s,n[1]/255+s,n[2]/255+s,1];e.uniform4fv(i.uLow,r),e.uniform4fv(i.uHigh,a)},
/**
         * Returns object representation of an instance
         * @return {Object} Object representation of an instance
         */
toObject:function(){return i(this.callSuper("toObject"),{color:this.color,distance:this.distance})}}),t.Image.filters.RemoveColor.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass,s={Brownie:[.5997,.34553,-.27082,0,.186,-.0377,.86095,.15059,0,-.1449,.24113,-.07441,.44972,0,-.02965,0,0,0,1,0],Vintage:[.62793,.32021,-.03965,0,.03784,.02578,.64411,.03259,0,.02926,.0466,-.08512,.52416,0,.02023,0,0,0,1,0],Kodachrome:[1.12855,-.39673,-.03992,0,.24991,-.16404,1.08352,-.05498,0,.09698,-.16786,-.56034,1.60148,0,.13972,0,0,0,1,0],Technicolor:[1.91252,-.85453,-.09155,0,.04624,-.30878,1.76589,-.10601,0,-.27589,-.2311,-.75018,1.84759,0,.12137,0,0,0,1,0],Polaroid:[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],Sepia:[.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0],BlackWhite:[1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,0,0,0,1,0]};for(var r in s)i[r]=n(i.ColorMatrix,
/** @lends fabric.Image.filters.Sepia.prototype */
{
/**
           * Filter type
           * @param {String} type
           * @default
           */
type:r,
/**
           * Colormatrix for the effect
           * array of 20 floats. Numbers in positions 4, 9, 14, 19 loose meaning
           * outside the -1, 1 range.
           * @param {Array} matrix array of 20 numbers.
           * @default
           */
matrix:s[r],
/**
           * Lock the matrix export for this kind of static, parameter less filters.
           */
mainParameter:!1,
/**
           * Lock the colormatrix on the color part, skipping alpha
           */
colorsOnly:!0}),t.Image.filters[r].fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric,i=t.Image.filters,n=t.util.createClass;i.BlendColor=n(i.BaseFilter,
/** @lends fabric.Image.filters.Blend.prototype */
{type:"BlendColor",
/**
         * Color to make the blend operation with. default to a reddish color since black or white
         * gives always strong result.
         **/
color:"#F95C63",
/**
         * Blend mode for the filter: one of multiply, add, diff, screen, subtract,
         * darken, lighten, overlay, exclusion, tint.
         **/
mode:"multiply",
/**
         * alpha value. represent the strength of the blend color operation.
         **/
alpha:1,
/**
         * Fragment source for the Multiply program
         */
fragmentSource:{multiply:"gl_FragColor.rgb *= uColor.rgb;\n",screen:"gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);\n",add:"gl_FragColor.rgb += uColor.rgb;\n",diff:"gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb);\n",subtract:"gl_FragColor.rgb -= uColor.rgb;\n",lighten:"gl_FragColor.rgb = max(gl_FragColor.rgb, uColor.rgb);\n",darken:"gl_FragColor.rgb = min(gl_FragColor.rgb, uColor.rgb);\n",exclusion:"gl_FragColor.rgb += uColor.rgb - 2.0 * (uColor.rgb * gl_FragColor.rgb);\n",overlay:"if (uColor.r < 0.5) {\ngl_FragColor.r *= 2.0 * uColor.r;\n} else {\ngl_FragColor.r = 1.0 - 2.0 * (1.0 - gl_FragColor.r) * (1.0 - uColor.r);\n}\nif (uColor.g < 0.5) {\ngl_FragColor.g *= 2.0 * uColor.g;\n} else {\ngl_FragColor.g = 1.0 - 2.0 * (1.0 - gl_FragColor.g) * (1.0 - uColor.g);\n}\nif (uColor.b < 0.5) {\ngl_FragColor.b *= 2.0 * uColor.b;\n} else {\ngl_FragColor.b = 1.0 - 2.0 * (1.0 - gl_FragColor.b) * (1.0 - uColor.b);\n}\n",tint:"gl_FragColor.rgb *= (1.0 - uColor.a);\ngl_FragColor.rgb += uColor.rgb;\n"},
/**
         * build the fragment source for the filters, joining the common part with
         * the specific one.
         * @param {String} mode the mode of the filter, a key of this.fragmentSource
         * @return {String} the source to be compiled
         * @private
         */
buildSource:function(e){return"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ngl_FragColor = color;\nif (color.a > 0.0) {\n"+this.fragmentSource[e]+"}\n}"},
/**
         * Retrieves the cached shader.
         * @param {Object} options
         * @param {WebGLRenderingContext} options.context The GL context used for rendering.
         * @param {Object} options.programCache A map of compiled shader programs, keyed by filter type.
         */
retrieveShader:function(e){var t,i=this.type+"_"+this.mode;return e.programCache.hasOwnProperty(i)||(t=this.buildSource(this.mode),e.programCache[i]=this.createProgram(e.context,t)),e.programCache[i]},
/**
         * Apply the Blend operation to a Uint8ClampedArray representing the pixels of an image.
         *
         * @param {Object} options
         * @param {ImageData} options.imageData The Uint8ClampedArray to be filtered.
         */
applyTo2d:function(e){var i,n,s,r,a,o,l,A=e.imageData.data,c=A.length,u=1-this.alpha;i=(l=new t.Color(this.color).getSource())[0]*this.alpha,n=l[1]*this.alpha,s=l[2]*this.alpha;for(var h=0;h<c;h+=4)switch(r=A[h],a=A[h+1],o=A[h+2],this.mode){case"multiply":A[h]=r*i/255,A[h+1]=a*n/255,A[h+2]=o*s/255;break;case"screen":A[h]=255-(255-r)*(255-i)/255,A[h+1]=255-(255-a)*(255-n)/255,A[h+2]=255-(255-o)*(255-s)/255;break;case"add":A[h]=r+i,A[h+1]=a+n,A[h+2]=o+s;break;case"diff":case"difference":A[h]=Math.abs(r-i),A[h+1]=Math.abs(a-n),A[h+2]=Math.abs(o-s);break;case"subtract":A[h]=r-i,A[h+1]=a-n,A[h+2]=o-s;break;case"darken":A[h]=Math.min(r,i),A[h+1]=Math.min(a,n),A[h+2]=Math.min(o,s);break;case"lighten":A[h]=Math.max(r,i),A[h+1]=Math.max(a,n),A[h+2]=Math.max(o,s);break;case"overlay":A[h]=i<128?2*r*i/255:255-2*(255-r)*(255-i)/255,A[h+1]=n<128?2*a*n/255:255-2*(255-a)*(255-n)/255,A[h+2]=s<128?2*o*s/255:255-2*(255-o)*(255-s)/255;break;case"exclusion":A[h]=i+r-2*i*r/255,A[h+1]=n+a-2*n*a/255,A[h+2]=s+o-2*s*o/255;break;case"tint":A[h]=i+r*u,A[h+1]=n+a*u,A[h+2]=s+o*u}},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uColor:e.getUniformLocation(t,"uColor")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,i){var n=new t.Color(this.color).getSource();n[0]=this.alpha*n[0]/255,n[1]=this.alpha*n[1]/255,n[2]=this.alpha*n[2]/255,n[3]=this.alpha,e.uniform4fv(i.uColor,n)},
/**
         * Returns object representation of an instance
         * @return {Object} Object representation of an instance
         */
toObject:function(){return{type:this.type,color:this.color,mode:this.mode,alpha:this.alpha}}}),t.Image.filters.BlendColor.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric,i=t.Image.filters,n=t.util.createClass;i.BlendImage=n(i.BaseFilter,
/** @lends fabric.Image.filters.BlendImage.prototype */
{type:"BlendImage",
/**
         * Color to make the blend operation with. default to a reddish color since black or white
         * gives always strong result.
         **/
image:null,
/**
         * Blend mode for the filter: one of multiply, add, diff, screen, subtract,
         * darken, lighten, overlay, exclusion, tint.
         **/
mode:"multiply",
/**
         * alpha value. represent the strength of the blend image operation.
         * not implemented.
         **/
alpha:1,vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nuniform mat3 uTransformMatrix;\nvoid main() {\nvTexCoord = aPosition;\nvTexCoord2 = (uTransformMatrix * vec3(aPosition, 1.0)).xy;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",
/**
         * Fragment source for the Multiply program
         */
fragmentSource:{multiply:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.rgba *= color2.rgba;\ngl_FragColor = color;\n}",mask:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.a = color2.a;\ngl_FragColor = color;\n}"},
/**
         * Retrieves the cached shader.
         * @param {Object} options
         * @param {WebGLRenderingContext} options.context The GL context used for rendering.
         * @param {Object} options.programCache A map of compiled shader programs, keyed by filter type.
         */
retrieveShader:function(e){var t=this.type+"_"+this.mode,i=this.fragmentSource[this.mode];return e.programCache.hasOwnProperty(t)||(e.programCache[t]=this.createProgram(e.context,i)),e.programCache[t]},applyToWebGL:function(e){var t=e.context,i=this.createTexture(e.filterBackend,this.image);this.bindAdditionalTexture(t,i,t.TEXTURE1),this.callSuper("applyToWebGL",e),this.unbindAdditionalTexture(t,t.TEXTURE1)},createTexture:function(e,t){return e.getCachedTexture(t.cacheKey,t._element)},
/**
         * Calculate a transformMatrix to adapt the image to blend over
         * @param {Object} options
         * @param {WebGLRenderingContext} options.context The GL context used for rendering.
         * @param {Object} options.programCache A map of compiled shader programs, keyed by filter type.
         */
calculateMatrix:function(){var e=this.image,t=e._element.width,i=e._element.height;return[1/e.scaleX,0,0,0,1/e.scaleY,0,-e.left/t,-e.top/i,1]},
/**
         * Apply the Blend operation to a Uint8ClampedArray representing the pixels of an image.
         *
         * @param {Object} options
         * @param {ImageData} options.imageData The Uint8ClampedArray to be filtered.
         */
applyTo2d:function(e){var i,n,s,r,a,o,l,A,c,u,h,d=e.imageData,g=e.filterBackend.resources,p=d.data,f=p.length,m=d.width,C=d.height,I=this.image;g.blendImage||(g.blendImage=t.util.createCanvasElement()),u=(c=g.blendImage).getContext("2d"),c.width!==m||c.height!==C?(c.width=m,c.height=C):u.clearRect(0,0,m,C),u.setTransform(I.scaleX,0,0,I.scaleY,I.left,I.top),u.drawImage(I._element,0,0,m,C),h=u.getImageData(0,0,m,C).data;for(var v=0;v<f;v+=4)switch(a=p[v],o=p[v+1],l=p[v+2],A=p[v+3],i=h[v],n=h[v+1],s=h[v+2],r=h[v+3],this.mode){case"multiply":p[v]=a*i/255,p[v+1]=o*n/255,p[v+2]=l*s/255,p[v+3]=A*r/255;break;case"mask":p[v+3]=r}},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uTransformMatrix:e.getUniformLocation(t,"uTransformMatrix"),uImage:e.getUniformLocation(t,"uImage")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){var i=this.calculateMatrix();e.uniform1i(t.uImage,1),e.uniformMatrix3fv(t.uTransformMatrix,!1,i)},
/**
         * Returns object representation of an instance
         * @return {Object} Object representation of an instance
         */
toObject:function(){return{type:this.type,image:this.image&&this.image.toObject(),mode:this.mode,alpha:this.alpha}}}),t.Image.filters.BlendImage.fromObject=function(e,i){t.Image.fromObject(e.image,(function(n){var s=t.util.object.clone(e);s.image=n,i(new t.Image.filters.BlendImage(s))}))}}(e),function(e){var t=e.fabric||(e.fabric={}),i=Math.pow,n=Math.floor,s=Math.sqrt,r=Math.abs,a=Math.round,o=Math.sin,l=Math.ceil,A=t.Image.filters,c=t.util.createClass;A.Resize=c(A.BaseFilter,
/** @lends fabric.Image.filters.Resize.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"Resize",
/**
         * Resize type
         * for webgl resizeType is just lanczos, for canvas2d can be:
         * bilinear, hermite, sliceHack, lanczos.
         * @param {String} resizeType
         * @default
         */
resizeType:"hermite",
/**
         * Scale factor for resizing, x axis
         * @param {Number} scaleX
         * @default
         */
scaleX:1,
/**
         * Scale factor for resizing, y axis
         * @param {Number} scaleY
         * @default
         */
scaleY:1,
/**
         * LanczosLobes parameter for lanczos filter, valid for resizeType lanczos
         * @param {Number} lanczosLobes
         * @default
         */
lanczosLobes:3,
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uDelta:e.getUniformLocation(t,"uDelta"),uTaps:e.getUniformLocation(t,"uTaps")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){e.uniform2fv(t.uDelta,this.horizontal?[1/this.width,0]:[0,1/this.height]),e.uniform1fv(t.uTaps,this.taps)},
/**
         * Retrieves the cached shader.
         * @param {Object} options
         * @param {WebGLRenderingContext} options.context The GL context used for rendering.
         * @param {Object} options.programCache A map of compiled shader programs, keyed by filter type.
         */
retrieveShader:function(e){var t=this.getFilterWindow(),i=this.type+"_"+t;if(!e.programCache.hasOwnProperty(i)){var n=this.generateShader(t);e.programCache[i]=this.createProgram(e.context,n)}return e.programCache[i]},getFilterWindow:function(){var e=this.tempScale;return Math.ceil(this.lanczosLobes/e)},getTaps:function(){for(var e=this.lanczosCreate(this.lanczosLobes),t=this.tempScale,i=this.getFilterWindow(),n=new Array(i),s=1;s<=i;s++)n[s-1]=e(s*t);return n},
/**
         * Generate vertex and shader sources from the necessary steps numbers
         * @param {Number} filterWindow
         */
generateShader:function(e){for(var t=new Array(e),i=this.fragmentSourceTOP,n=1;n<=e;n++)t[n-1]=n+".0 * uDelta";return i+="uniform float uTaps["+e+"];\n",i+="void main() {\n",i+="  vec4 color = texture2D(uTexture, vTexCoord);\n",i+="  float sum = 1.0;\n",t.forEach((function(e,t){i+="  color += texture2D(uTexture, vTexCoord + "+e+") * uTaps["+t+"];\n",i+="  color += texture2D(uTexture, vTexCoord - "+e+") * uTaps["+t+"];\n",i+="  sum += 2.0 * uTaps["+t+"];\n"})),i+="  gl_FragColor = color / sum;\n",i+="}"},fragmentSourceTOP:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\n",
/**
         * Apply the resize filter to the image
         * Determines whether to use WebGL or Canvas2D based on the options.webgl flag.
         *
         * @param {Object} options
         * @param {Number} options.passes The number of filters remaining to be executed
         * @param {Boolean} options.webgl Whether to use webgl to render the filter.
         * @param {WebGLTexture} options.sourceTexture The texture setup as the source to be filtered.
         * @param {WebGLTexture} options.targetTexture The texture where filtered output should be drawn.
         * @param {WebGLRenderingContext} options.context The GL context used for rendering.
         * @param {Object} options.programCache A map of compiled shader programs, keyed by filter type.
         */
applyTo:function(e){e.webgl?(e.passes++,this.width=e.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=e.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),e.destinationWidth=this.dW,this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e),e.sourceWidth=e.destinationWidth,this.height=e.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),e.destinationHeight=this.dH,this._setupFrameBuffer(e),this.applyToWebGL(e),this._swapTextures(e),e.sourceHeight=e.destinationHeight):this.applyTo2d(e)},isNeutralState:function(){return 1===this.scaleX&&1===this.scaleY},lanczosCreate:function(e){return function(t){if(t>=e||t<=-e)return 0;if(t<1.1920929e-7&&t>-1.1920929e-7)return 1;var i=(t*=Math.PI)/e;return o(t)/t*o(i)/i}},
/**
         * Applies filter to canvas element
         * @memberOf fabric.Image.filters.Resize.prototype
         * @param {Object} canvasEl Canvas element to apply filter to
         * @param {Number} scaleX
         * @param {Number} scaleY
         */
applyTo2d:function(e){var t=e.imageData,i=this.scaleX,n=this.scaleY;this.rcpScaleX=1/i,this.rcpScaleY=1/n;var s,r=t.width,o=t.height,l=a(r*i),A=a(o*n);"sliceHack"===this.resizeType?s=this.sliceByTwo(e,r,o,l,A):"hermite"===this.resizeType?s=this.hermiteFastResize(e,r,o,l,A):"bilinear"===this.resizeType?s=this.bilinearFiltering(e,r,o,l,A):"lanczos"===this.resizeType&&(s=this.lanczosResize(e,r,o,l,A)),e.imageData=s},
/**
         * Filter sliceByTwo
         * @param {Object} canvasEl Canvas element to apply filter to
         * @param {Number} oW Original Width
         * @param {Number} oH Original Height
         * @param {Number} dW Destination Width
         * @param {Number} dH Destination Height
         * @returns {ImageData}
         */
sliceByTwo:function(e,i,s,r,a){var o,l,A=e.imageData,c=.5,u=!1,h=!1,d=i*c,g=s*c,p=t.filterBackend.resources,f=0,m=0,C=i,I=0;for(p.sliceByTwo||(p.sliceByTwo=document.createElement("canvas")),((o=p.sliceByTwo).width<1.5*i||o.height<s)&&(o.width=1.5*i,o.height=s),(l=o.getContext("2d")).clearRect(0,0,1.5*i,s),l.putImageData(A,0,0),r=n(r),a=n(a);!u||!h;)i=d,s=g,r<n(d*c)?d=n(d*c):(d=r,u=!0),a<n(g*c)?g=n(g*c):(g=a,h=!0),l.drawImage(o,f,m,i,s,C,I,d,g),f=C,m=I,I+=g;return l.getImageData(f,m,r,a)},
/**
         * Filter lanczosResize
         * @param {Object} canvasEl Canvas element to apply filter to
         * @param {Number} oW Original Width
         * @param {Number} oH Original Height
         * @param {Number} dW Destination Width
         * @param {Number} dH Destination Height
         * @returns {ImageData}
         */
lanczosResize:function(e,t,a,o,A){var c=e.imageData.data,u=e.ctx.createImageData(o,A),h=u.data,d=this.lanczosCreate(this.lanczosLobes),g=this.rcpScaleX,p=this.rcpScaleY,f=2/this.rcpScaleX,m=2/this.rcpScaleY,C=l(g*this.lanczosLobes/2),I=l(p*this.lanczosLobes/2),v={},B={},y={};return function e(l){var b,E,w,Q,_,S,x,k,D,F,T;for(B.x=(l+.5)*g,y.x=n(B.x),b=0;b<A;b++){for(B.y=(b+.5)*p,y.y=n(B.y),_=0,S=0,x=0,k=0,D=0,E=y.x-C;E<=y.x+C;E++)if(!(E<0||E>=t)){F=n(1e3*r(E-B.x)),v[F]||(v[F]={});for(var M=y.y-I;M<=y.y+I;M++)M<0||M>=a||(T=n(1e3*r(M-B.y)),v[F][T]||(v[F][T]=d(s(i(F*f,2)+i(T*m,2))/1e3)),(w=v[F][T])>0&&(_+=w,S+=w*c[Q=4*(M*t+E)],x+=w*c[Q+1],k+=w*c[Q+2],D+=w*c[Q+3]))}h[Q=4*(b*o+l)]=S/_,h[Q+1]=x/_,h[Q+2]=k/_,h[Q+3]=D/_}return++l<o?e(l):u}(0)},
/**
         * bilinearFiltering
         * @param {Object} canvasEl Canvas element to apply filter to
         * @param {Number} oW Original Width
         * @param {Number} oH Original Height
         * @param {Number} dW Destination Width
         * @param {Number} dH Destination Height
         * @returns {ImageData}
         */
bilinearFiltering:function(e,t,i,s,r){var a,o,l,A,c,u,h,d,g,p=0,f=this.rcpScaleX,m=this.rcpScaleY,C=4*(t-1),I=e.imageData.data,v=e.ctx.createImageData(s,r),B=v.data;for(l=0;l<r;l++)for(A=0;A<s;A++)for(c=f*A-(a=n(f*A)),u=m*l-(o=n(m*l)),g=4*(o*t+a),h=0;h<4;h++)d=I[g+h]*(1-c)*(1-u)+I[g+4+h]*c*(1-u)+I[g+C+h]*u*(1-c)+I[g+C+4+h]*c*u,B[p++]=d;return v},
/**
         * hermiteFastResize
         * @param {Object} canvasEl Canvas element to apply filter to
         * @param {Number} oW Original Width
         * @param {Number} oH Original Height
         * @param {Number} dW Destination Width
         * @param {Number} dH Destination Height
         * @returns {ImageData}
         */
hermiteFastResize:function(e,t,i,a,o){for(var A=this.rcpScaleX,c=this.rcpScaleY,u=l(A/2),h=l(c/2),d=e.imageData.data,g=e.ctx.createImageData(a,o),p=g.data,f=0;f<o;f++)for(var m=0;m<a;m++){for(var C=4*(m+f*a),I=0,v=0,B=0,y=0,b=0,E=0,w=0,Q=(f+.5)*c,_=n(f*c);_<(f+1)*c;_++)for(var S=r(Q-(_+.5))/h,x=(m+.5)*A,k=S*S,D=n(m*A);D<(m+1)*A;D++){var F=r(x-(D+.5))/u,T=s(k+F*F);T>1&&T<-1||(I=2*T*T*T-3*T*T+1)>0&&(w+=I*d[(F=4*(D+_*t))+3],B+=I,d[F+3]<255&&(I=I*d[F+3]/250),y+=I*d[F],b+=I*d[F+1],E+=I*d[F+2],v+=I)}p[C]=y/v,p[C+1]=b/v,p[C+2]=E/v,p[C+3]=w/B}return g},
/**
         * Returns object representation of an instance
         * @return {Object} Object representation of an instance
         */
toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),t.Image.filters.Resize.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Contrast=n(i.BaseFilter,
/** @lends fabric.Image.filters.Contrast.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"Contrast",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uContrast;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast));\ncolor.rgb = contrastF * (color.rgb - 0.5) + 0.5;\ngl_FragColor = color;\n}",
/**
         * contrast value, range from -1 to 1.
         * @param {Number} contrast
         * @default 0
         */
contrast:0,mainParameter:"contrast",
/**
         * Constructor
         * @memberOf fabric.Image.filters.Contrast.prototype
         * @param {Object} [options] Options object
         * @param {Number} [options.contrast=0] Value to contrast the image up (-1...1)
         */
/**
          * Apply the Contrast operation to a Uint8Array representing the pixels of an image.
          *
          * @param {Object} options
          * @param {ImageData} options.imageData The Uint8Array to be filtered.
          */
applyTo2d:function(e){if(0!==this.contrast){var t,i=e.imageData.data,n=i.length,s=Math.floor(255*this.contrast),r=259*(s+255)/(255*(259-s));for(t=0;t<n;t+=4)i[t]=r*(i[t]-128)+128,i[t+1]=r*(i[t+1]-128)+128,i[t+2]=r*(i[t+2]-128)+128}},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uContrast:e.getUniformLocation(t,"uContrast")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){e.uniform1f(t.uContrast,this.contrast)}}),t.Image.filters.Contrast.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Saturation=n(i.BaseFilter,
/** @lends fabric.Image.filters.Saturation.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"Saturation",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uSaturation;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat rgMax = max(color.r, color.g);\nfloat rgbMax = max(rgMax, color.b);\ncolor.r += rgbMax != color.r ? (rgbMax - color.r) * uSaturation : 0.00;\ncolor.g += rgbMax != color.g ? (rgbMax - color.g) * uSaturation : 0.00;\ncolor.b += rgbMax != color.b ? (rgbMax - color.b) * uSaturation : 0.00;\ngl_FragColor = color;\n}",
/**
         * Saturation value, from -1 to 1.
         * Increases/decreases the color saturation.
         * A value of 0 has no effect.
         * 
         * @param {Number} saturation
         * @default
         */
saturation:0,mainParameter:"saturation",
/**
         * Constructor
         * @memberOf fabric.Image.filters.Saturate.prototype
         * @param {Object} [options] Options object
         * @param {Number} [options.saturate=0] Value to saturate the image (-1...1)
         */
/**
         * Apply the Saturation operation to a Uint8ClampedArray representing the pixels of an image.
         *
         * @param {Object} options
         * @param {ImageData} options.imageData The Uint8ClampedArray to be filtered.
         */
applyTo2d:function(e){if(0!==this.saturation){var t,i,n=e.imageData.data,s=n.length,r=-this.saturation;for(t=0;t<s;t+=4)i=Math.max(n[t],n[t+1],n[t+2]),n[t]+=i!==n[t]?(i-n[t])*r:0,n[t+1]+=i!==n[t+1]?(i-n[t+1])*r:0,n[t+2]+=i!==n[t+2]?(i-n[t+2])*r:0}},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uSaturation:e.getUniformLocation(t,"uSaturation")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){e.uniform1f(t.uSaturation,-this.saturation)}}),t.Image.filters.Saturation.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Vibrance=n(i.BaseFilter,
/** @lends fabric.Image.filters.Vibrance.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"Vibrance",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uVibrance;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat max = max(color.r, max(color.g, color.b));\nfloat avg = (color.r + color.g + color.b) / 3.0;\nfloat amt = (abs(max - avg) * 2.0) * uVibrance;\ncolor.r += max != color.r ? (max - color.r) * amt : 0.00;\ncolor.g += max != color.g ? (max - color.g) * amt : 0.00;\ncolor.b += max != color.b ? (max - color.b) * amt : 0.00;\ngl_FragColor = color;\n}",
/**
         * Vibrance value, from -1 to 1.
         * Increases/decreases the saturation of more muted colors with less effect on saturated colors.
         * A value of 0 has no effect.
         * 
         * @param {Number} vibrance
         * @default
         */
vibrance:0,mainParameter:"vibrance",
/**
         * Constructor
         * @memberOf fabric.Image.filters.Vibrance.prototype
         * @param {Object} [options] Options object
         * @param {Number} [options.vibrance=0] Vibrance value for the image (between -1 and 1)
         */
/**
         * Apply the Vibrance operation to a Uint8ClampedArray representing the pixels of an image.
         *
         * @param {Object} options
         * @param {ImageData} options.imageData The Uint8ClampedArray to be filtered.
         */
applyTo2d:function(e){if(0!==this.vibrance){var t,i,n,s,r=e.imageData.data,a=r.length,o=-this.vibrance;for(t=0;t<a;t+=4)i=Math.max(r[t],r[t+1],r[t+2]),n=(r[t]+r[t+1]+r[t+2])/3,s=2*Math.abs(i-n)/255*o,r[t]+=i!==r[t]?(i-r[t])*s:0,r[t+1]+=i!==r[t+1]?(i-r[t+1])*s:0,r[t+2]+=i!==r[t+2]?(i-r[t+2])*s:0}},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uVibrance:e.getUniformLocation(t,"uVibrance")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){e.uniform1f(t.uVibrance,-this.vibrance)}}),t.Image.filters.Vibrance.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Blur=n(i.BaseFilter,
/** @lends fabric.Image.filters.Blur.prototype */
{type:"Blur",
/*
        'gl_FragColor = vec4(0.0);',
        'gl_FragColor += texture2D(texture, vTexCoord + -7 * uDelta)*0.0044299121055113265;',
        'gl_FragColor += texture2D(texture, vTexCoord + -6 * uDelta)*0.00895781211794;',
        'gl_FragColor += texture2D(texture, vTexCoord + -5 * uDelta)*0.0215963866053;',
        'gl_FragColor += texture2D(texture, vTexCoord + -4 * uDelta)*0.0443683338718;',
        'gl_FragColor += texture2D(texture, vTexCoord + -3 * uDelta)*0.0776744219933;',
        'gl_FragColor += texture2D(texture, vTexCoord + -2 * uDelta)*0.115876621105;',
        'gl_FragColor += texture2D(texture, vTexCoord + -1 * uDelta)*0.147308056121;',
        'gl_FragColor += texture2D(texture, vTexCoord              )*0.159576912161;',
        'gl_FragColor += texture2D(texture, vTexCoord + 1 * uDelta)*0.147308056121;',
        'gl_FragColor += texture2D(texture, vTexCoord + 2 * uDelta)*0.115876621105;',
        'gl_FragColor += texture2D(texture, vTexCoord + 3 * uDelta)*0.0776744219933;',
        'gl_FragColor += texture2D(texture, vTexCoord + 4 * uDelta)*0.0443683338718;',
        'gl_FragColor += texture2D(texture, vTexCoord + 5 * uDelta)*0.0215963866053;',
        'gl_FragColor += texture2D(texture, vTexCoord + 6 * uDelta)*0.00895781211794;',
        'gl_FragColor += texture2D(texture, vTexCoord + 7 * uDelta)*0.0044299121055113265;',
        */
/* eslint-disable max-len */
fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\nconst float nSamples = 15.0;\nvec3 v3offset = vec3(12.9898, 78.233, 151.7182);\nfloat random(vec3 scale) {\nreturn fract(sin(dot(gl_FragCoord.xyz, scale)) * 43758.5453);\n}\nvoid main() {\nvec4 color = vec4(0.0);\nfloat total = 0.0;\nfloat offset = random(v3offset);\nfor (float t = -nSamples; t <= nSamples; t++) {\nfloat percent = (t + offset - 0.5) / nSamples;\nfloat weight = 1.0 - abs(percent);\ncolor += texture2D(uTexture, vTexCoord + uDelta * percent) * weight;\ntotal += weight;\n}\ngl_FragColor = color / total;\n}",
/* eslint-enable max-len */
/**
         * blur value, in percentage of image dimensions.
         * specific to keep the image blur constant at different resolutions
         * range between 0 and 1.
         */
blur:0,mainParameter:"blur",applyTo:function(e){e.webgl?(this.aspectRatio=e.sourceWidth/e.sourceHeight,e.passes++,this._setupFrameBuffer(e),this.horizontal=!0,this.applyToWebGL(e),this._swapTextures(e),this._setupFrameBuffer(e),this.horizontal=!1,this.applyToWebGL(e),this._swapTextures(e)):this.applyTo2d(e)},applyTo2d:function(e){e.imageData=this.simpleBlur(e)},simpleBlur:function(e){var i,n,s=e.filterBackend.resources,r=e.imageData.width,a=e.imageData.height;s.blurLayer1||(s.blurLayer1=t.util.createCanvasElement(),s.blurLayer2=t.util.createCanvasElement()),i=s.blurLayer1,n=s.blurLayer2,i.width===r&&i.height===a||(n.width=i.width=r,n.height=i.height=a);var o,l,A,c,u=i.getContext("2d"),h=n.getContext("2d"),d=15,g=.06*this.blur*.5;for(u.putImageData(e.imageData,0,0),h.clearRect(0,0,r,a),c=-15;c<=d;c++)A=g*(l=c/d)*r+(o=(Math.random()-.5)/4),h.globalAlpha=1-Math.abs(l),h.drawImage(i,A,o),u.drawImage(n,0,0),h.globalAlpha=1,h.clearRect(0,0,n.width,n.height);for(c=-15;c<=d;c++)A=g*(l=c/d)*a+(o=(Math.random()-.5)/4),h.globalAlpha=1-Math.abs(l),h.drawImage(i,o,A),u.drawImage(n,0,0),h.globalAlpha=1,h.clearRect(0,0,n.width,n.height);e.ctx.drawImage(i,0,0);var p=e.ctx.getImageData(0,0,i.width,i.height);return u.globalAlpha=1,u.clearRect(0,0,i.width,i.height),p},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{delta:e.getUniformLocation(t,"uDelta")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){var i=this.chooseRightDelta();e.uniform2fv(t.delta,i)},
/**
         * choose right value of image percentage to blur with
         * @returns {Array} a numeric array with delta values
         */
chooseRightDelta:function(){var e,t=1,i=[0,0];return this.horizontal?this.aspectRatio>1&&(t=1/this.aspectRatio):this.aspectRatio<1&&(t=this.aspectRatio),e=t*this.blur*.12,this.horizontal?i[0]=e:i[1]=e,i}}),i.Blur.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Gamma=n(i.BaseFilter,
/** @lends fabric.Image.filters.Gamma.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"Gamma",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec3 uGamma;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec3 correction = (1.0 / uGamma);\ncolor.r = pow(color.r, correction.r);\ncolor.g = pow(color.g, correction.g);\ncolor.b = pow(color.b, correction.b);\ngl_FragColor = color;\ngl_FragColor.rgb *= color.a;\n}",
/**
         * Gamma array value, from 0.01 to 2.2.
         * @param {Array} gamma
         * @default
         */
gamma:[1,1,1],
/**
         * Describe the property that is the filter parameter
         * @param {String} m
         * @default
         */
mainParameter:"gamma",
/**
         * Constructor
         * @param {Object} [options] Options object
         */
initialize:function(e){this.gamma=[1,1,1],i.BaseFilter.prototype.initialize.call(this,e)},
/**
         * Apply the Gamma operation to a Uint8Array representing the pixels of an image.
         *
         * @param {Object} options
         * @param {ImageData} options.imageData The Uint8Array to be filtered.
         */
applyTo2d:function(e){var t,i=e.imageData.data,n=this.gamma,s=i.length,r=1/n[0],a=1/n[1],o=1/n[2];for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),t=0,s=256;t<s;t++)this.rVals[t]=255*Math.pow(t/255,r),this.gVals[t]=255*Math.pow(t/255,a),this.bVals[t]=255*Math.pow(t/255,o);for(t=0,s=i.length;t<s;t+=4)i[t]=this.rVals[i[t]],i[t+1]=this.gVals[i[t+1]],i[t+2]=this.bVals[i[t+2]]},
/**
         * Return WebGL uniform locations for this filter's shader.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {WebGLShaderProgram} program This filter's compiled shader program.
         */
getUniformLocations:function(e,t){return{uGamma:e.getUniformLocation(t,"uGamma")}},
/**
         * Send data from this filter to its shader program's uniforms.
         *
         * @param {WebGLRenderingContext} gl The GL canvas context used to compile this filter's shader.
         * @param {Object} uniformLocations A map of string uniform names to WebGLUniformLocation objects
         */
sendUniformData:function(e,t){e.uniform3fv(t.uGamma,this.gamma)}}),t.Image.filters.Gamma.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.Composed=n(i.BaseFilter,
/** @lends fabric.Image.filters.Composed.prototype */
{type:"Composed",
/**
         * A non sparse array of filters to apply
         */
subFilters:[],
/**
         * Constructor
         * @param {Object} [options] Options object
         */
initialize:function(e){this.callSuper("initialize",e),this.subFilters=this.subFilters.slice(0)},
/**
         * Apply this container's filters to the input image provided.
         *
         * @param {Object} options
         * @param {Number} options.passes The number of filters remaining to be applied.
         */
applyTo:function(e){e.passes+=this.subFilters.length-1,this.subFilters.forEach((function(t){t.applyTo(e)}))},
/**
         * Serialize this filter into JSON.
         *
         * @returns {Object} A JSON representation of this filter.
         */
toObject:function(){return t.util.object.extend(this.callSuper("toObject"),{subFilters:this.subFilters.map((function(e){return e.toObject()}))})},isNeutralState:function(){return!this.subFilters.some((function(e){return!e.isNeutralState()}))}}),t.Image.filters.Composed.fromObject=function(e,i){var n=(e.subFilters||[]).map((function(e){return new t.Image.filters[e.type](e)})),s=new t.Image.filters.Composed({subFilters:n});return i&&i(s),s}}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.Image.filters,n=t.util.createClass;i.HueRotation=n(i.ColorMatrix,
/** @lends fabric.Image.filters.HueRotation.prototype */
{
/**
         * Filter type
         * @param {String} type
         * @default
         */
type:"HueRotation",
/**
         * HueRotation value, from -1 to 1.
         * the unit is radians
         * @param {Number} myParameter
         * @default
         */
rotation:0,
/**
         * Describe the property that is the filter parameter
         * @param {String} m
         * @default
         */
mainParameter:"rotation",calculateMatrix:function(){var e=this.rotation*Math.PI,i=t.util.cos(e),n=t.util.sin(e),s=1/3,r=Math.sqrt(s)*n,a=1-i;this.matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.matrix[0]=i+a/3,this.matrix[1]=s*a-r,this.matrix[2]=s*a+r,this.matrix[5]=s*a+r,this.matrix[6]=i+s*a,this.matrix[7]=s*a-r,this.matrix[10]=s*a-r,this.matrix[11]=s*a+r,this.matrix[12]=i+s*a},
/**
         * HueRotation isNeutralState implementation
         * Used only in image applyFilters to discard filters that will not have an effect
         * on the image
         * @param {Object} options
         **/
isNeutralState:function(e){return this.calculateMatrix(),i.BaseFilter.prototype.isNeutralState.call(this,e)},
/**
         * Apply this filter to the input image data provided.
         *
         * Determines whether to use WebGL or Canvas2D based on the options.webgl flag.
         *
         * @param {Object} options
         * @param {Number} options.passes The number of filters remaining to be executed
         * @param {Boolean} options.webgl Whether to use webgl to render the filter.
         * @param {WebGLTexture} options.sourceTexture The texture setup as the source to be filtered.
         * @param {WebGLTexture} options.targetTexture The texture where filtered output should be drawn.
         * @param {WebGLRenderingContext} options.context The GL context used for rendering.
         * @param {Object} options.programCache A map of compiled shader programs, keyed by filter type.
         */
applyTo:function(e){this.calculateMatrix(),i.BaseFilter.prototype.applyTo.call(this,e)}}),t.Image.filters.HueRotation.fromObject=t.Image.filters.BaseFilter.fromObject}(e),function(e){var t=e.fabric||(e.fabric={}),i=t.util.object.clone;if(t.Text)t.warn("fabric.Text is already defined");else{var n="fontFamily fontWeight fontSize text underline overline linethrough textAlign fontStyle lineHeight textBackgroundColor charSpacing styles direction path pathStartOffset pathSide pathAlign".split(" ");t.Text=t.util.createClass(t.Object,
/** @lends fabric.Text.prototype */
{
/**
         * Properties which when set cause object to change dimensions
         * @type Array
         * @private
         */
_dimensionAffectingProps:["fontSize","fontWeight","fontFamily","fontStyle","lineHeight","text","charSpacing","textAlign","styles","path","pathStartOffset","pathSide","pathAlign"],
/**
         * @private
         */
_reNewline:/\r?\n/,
/**
         * Use this regular expression to filter for whitespaces that is not a new line.
         * Mostly used when text is 'justify' aligned.
         * @private
         */
_reSpacesAndTabs:/[ \t\r]/g,
/**
         * Use this regular expression to filter for whitespace that is not a new line.
         * Mostly used when text is 'justify' aligned.
         * @private
         */
_reSpaceAndTab:/[ \t\r]/,
/**
         * Use this regular expression to filter consecutive groups of non spaces.
         * Mostly used when text is 'justify' aligned.
         * @private
         */
_reWords:/\S+/g,
/**
         * Type of an object
         * @type String
         * @default
         */
type:"text",
/**
         * Font size (in pixels)
         * @type Number
         * @default
         */
fontSize:40,
/**
         * Font weight (e.g. bold, normal, 400, 600, 800)
         * @type {(Number|String)}
         * @default
         */
fontWeight:"normal",
/**
         * Font family
         * @type String
         * @default
         */
fontFamily:"Times New Roman",
/**
         * Text decoration underline.
         * @type Boolean
         * @default
         */
underline:!1,
/**
         * Text decoration overline.
         * @type Boolean
         * @default
         */
overline:!1,
/**
         * Text decoration linethrough.
         * @type Boolean
         * @default
         */
linethrough:!1,
/**
         * Text alignment. Possible values: "left", "center", "right", "justify",
         * "justify-left", "justify-center" or "justify-right".
         * @type String
         * @default
         */
textAlign:"left",
/**
         * Font style . Possible values: "", "normal", "italic" or "oblique".
         * @type String
         * @default
         */
fontStyle:"normal",
/**
         * Line height
         * @type Number
         * @default
         */
lineHeight:1.16,
/**
         * Superscript schema object (minimum overlap)
         * @type {Object}
         * @default
         */
superscript:{size:.6,
// fontSize factor
baseline:-.35},
/**
         * Subscript schema object (minimum overlap)
         * @type {Object}
         * @default
         */
subscript:{size:.6,
// fontSize factor
baseline:.11},
/**
         * Background color of text lines
         * @type String
         * @default
         */
textBackgroundColor:"",
/**
         * List of properties to consider when checking if
         * state of an object is changed ({@link fabric.Object#hasStateChanged})
         * as well as for history (undo/redo) purposes
         * @type Array
         */
stateProperties:t.Object.prototype.stateProperties.concat(n),
/**
         * List of properties to consider when checking if cache needs refresh
         * @type Array
         */
cacheProperties:t.Object.prototype.cacheProperties.concat(n),
/**
         * When defined, an object is rendered via stroke and this property specifies its color.
         * <b>Backwards incompatibility note:</b> This property was named "strokeStyle" until v1.1.6
         * @type String
         * @default
         */
stroke:null,
/**
         * Shadow object representing shadow of this shape.
         * <b>Backwards incompatibility note:</b> This property was named "textShadow" (String) until v1.2.11
         * @type fabric.Shadow
         * @default
         */
shadow:null,
/**
         * fabric.Path that the text should follow.
         * since 4.6.0 the path will be drawn automatically.
         * if you want to make the path visible, give it a stroke and strokeWidth or fill value
         * if you want it to be hidden, assign visible = false to the path.
         * This feature is in BETA, and SVG import/export is not yet supported.
         * @type fabric.Path
         * @example
         * var textPath = new fabric.Text('Text on a path', {
         *     top: 150,
         *     left: 150,
         *     textAlign: 'center',
         *     charSpacing: -50,
         *     path: new fabric.Path('M 0 0 C 50 -100 150 -100 200 0', {
         *         strokeWidth: 1,
         *         visible: false
         *     }),
         *     pathSide: 'left',
         *     pathStartOffset: 0
         * });
         * @default
         */
path:null,
/**
         * Offset amount for text path starting position
         * Only used when text has a path
         * @type Number
         * @default
         */
pathStartOffset:0,
/**
         * Which side of the path the text should be drawn on.
         * Only used when text has a path
         * @type {String} 'left|right'
         * @default
         */
pathSide:"left",
/**
         * How text is aligned to the path. This property determines
         * the perpendicular position of each character relative to the path.
         * (one of "baseline", "center", "ascender", "descender")
         * This feature is in BETA, and its behavior may change
         * @type String
         * @default
         */
pathAlign:"baseline",
/**
         * @private
         */
_fontSizeFraction:.222,
/**
         * @private
         */
offsets:{underline:.1,linethrough:-.315,overline:-.88},
/**
         * Text Line proportion to font Size (in pixels)
         * @type Number
         * @default
         */
_fontSizeMult:1.13,
/**
         * additional space between characters
         * expressed in thousands of em unit
         * @type Number
         * @default
         */
charSpacing:0,
/**
         * Object containing character styles - top-level properties -> line numbers,
         * 2nd-level properties - character numbers
         * @type Object
         * @default
         */
styles:null,
/**
         * Reference to a context to measure text char or couple of chars
         * the cacheContext of the canvas will be used or a freshly created one if the object is not on canvas
         * once created it will be referenced on fabric._measuringContext to avoid creating a canvas for every
         * text object created.
         * @type {CanvasRenderingContext2D}
         * @default
         */
_measuringContext:null,
/**
         * Baseline shift, styles only, keep at 0 for the main text object
         * @type {Number}
         * @default
         */
deltaY:0,
/**
         * WARNING: EXPERIMENTAL. NOT SUPPORTED YET
         * determine the direction of the text.
         * This has to be set manually together with textAlign and originX for proper
         * experience.
         * some interesting link for the future
         * https://www.w3.org/International/questions/qa-bidi-unicode-controls
         * @since 4.5.0
         * @type {String} 'ltr|rtl'
         * @default
         */
direction:"ltr",
/**
         * Array of properties that define a style unit (of 'styles').
         * @type {Array}
         * @default
         */
_styleProperties:["stroke","strokeWidth","fill","fontFamily","fontSize","fontWeight","fontStyle","underline","overline","linethrough","deltaY","textBackgroundColor"],
/**
         * contains characters bounding boxes
         */
__charBounds:[],
/**
         * use this size when measuring text. To avoid IE11 rounding errors
         * @type {Number}
         * @default
         * @readonly
         * @private
         */
CACHE_FONT_SIZE:400,
/**
         * contains the min text width to avoid getting 0
         * @type {Number}
         * @default
         */
MIN_TEXT_WIDTH:2,
/**
         * Constructor
         * @param {String} text Text string
         * @param {Object} [options] Options object
         * @return {fabric.Text} thisArg
         */
initialize:function(e,t){this.styles=t&&t.styles||{},this.text=e,this.__skipDimension=!0,this.callSuper("initialize",t),this.path&&this.setPathInfo(),this.__skipDimension=!1,this.initDimensions(),this.setCoords(),this.setupState({propertySet:"_dimensionAffectingProps"})},
/**
         * If text has a path, it will add the extra information needed
         * for path and text calculations
         * @return {fabric.Text} thisArg
         */
setPathInfo:function(){var e=this.path;e&&(e.segmentsInfo=t.util.getPathSegmentsInfo(e.path))},
/**
         * Return a context for measurement of text string.
         * if created it gets stored for reuse
         * this is for internal use, please do not use it
         * @private
         * @param {String} text Text string
         * @param {Object} [options] Options object
         * @return {fabric.Text} thisArg
         */
getMeasuringContext:function(){return t._measuringContext||(t._measuringContext=this.canvas&&this.canvas.contextCache||t.util.createCanvasElement().getContext("2d")),t._measuringContext},
/**
         * @private
         * Divides text into lines of text and lines of graphemes.
         */
_splitText:function(){var e=this._splitTextIntoLines(this.text);return this.textLines=e.lines,this._textLines=e.graphemeLines,this._unwrappedTextLines=e._unwrappedLines,this._text=e.graphemeText,e},
/**
         * Initialize or update text dimensions.
         * Updates this.width and this.height with the proper values.
         * Does not return dimensions.
         */
initDimensions:function(){this.__skipDimension||(this._splitText(),this._clearCache(),this.path?(this.width=this.path.width,this.height=this.path.height):(this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,this.height=this.calcTextHeight()),-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.saveState({propertySet:"_dimensionAffectingProps"}))},
/**
         * Enlarge space boxes and shift the others
         */
enlargeSpaces:function(){for(var e,t,i,n,s,r,a,o=0,l=this._textLines.length;o<l;o++)if(("justify"===this.textAlign||o!==l-1&&!this.isEndOfWrapping(o))&&(n=0,s=this._textLines[o],(t=this.getLineWidth(o))<this.width&&(a=this.textLines[o].match(this._reSpacesAndTabs)))){i=a.length,e=(this.width-t)/i;for(var A=0,c=s.length;A<=c;A++)r=this.__charBounds[o][A],this._reSpaceAndTab.test(s[A])?(r.width+=e,r.kernedWidth+=e,r.left+=n,n+=e):r.left+=n}},
/**
         * Detect if the text line is ended with an hard break
         * text and itext do not have wrapping, return false
         * @return {Boolean}
         */
isEndOfWrapping:function(e){return e===this._textLines.length-1},
/**
         * Detect if a line has a linebreak and so we need to account for it when moving
         * and counting style.
         * It return always for text and Itext.
         * @return Number
         */
missingNewlineOffset:function(){return 1},
/**
         * Returns string representation of an instance
         * @return {String} String representation of text object
         */
toString:function(){return"#<fabric.Text ("+this.complexity()+'): { "text": "'+this.text+'", "fontFamily": "'+this.fontFamily+'" }>'},
/**
         * Return the dimension and the zoom level needed to create a cache canvas
         * big enough to host the object to be cached.
         * @private
         * @param {Object} dim.x width of object to be cached
         * @param {Object} dim.y height of object to be cached
         * @return {Object}.width width of canvas
         * @return {Object}.height height of canvas
         * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
         * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
         */
_getCacheCanvasDimensions:function(){var e=this.callSuper("_getCacheCanvasDimensions"),t=this.fontSize;return e.width+=t*e.zoomX,e.height+=t*e.zoomY,e},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_render:function(e){var t=this.path;t&&!t.isNotVisible()&&t._render(e),this._setTextStyles(e),this._renderTextLinesBackground(e),this._renderTextDecoration(e,"underline"),this._renderText(e),this._renderTextDecoration(e,"overline"),this._renderTextDecoration(e,"linethrough")},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_renderText:function(e){"stroke"===this.paintFirst?(this._renderTextStroke(e),this._renderTextFill(e)):(this._renderTextFill(e),this._renderTextStroke(e))},
/**
         * Set the font parameter of the context with the object properties or with charStyle
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {Object} [charStyle] object with font style properties
         * @param {String} [charStyle.fontFamily] Font Family
         * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
         * @param {String} [charStyle.fontWeight] Font weight
         * @param {String} [charStyle.fontStyle] Font style (italic|normal)
         */
_setTextStyles:function(e,t,i){if(e.textBaseline="alphabetical",this.path)switch(this.pathAlign){case"center":e.textBaseline="middle";break;case"ascender":e.textBaseline="top";break;case"descender":e.textBaseline="bottom"}e.font=this._getFontDeclaration(t,i)},
/**
         * calculate and return the text Width measuring each line.
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @return {Number} Maximum width of fabric.Text object
         */
calcTextWidth:function(){for(var e=this.getLineWidth(0),t=1,i=this._textLines.length;t<i;t++){var n=this.getLineWidth(t);n>e&&(e=n)}return e},
/**
         * @private
         * @param {String} method Method name ("fillText" or "strokeText")
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {String} line Text to render
         * @param {Number} left Left position of text
         * @param {Number} top Top position of text
         * @param {Number} lineIndex Index of a line in a text
         */
_renderTextLine:function(e,t,i,n,s,r){this._renderChars(e,t,i,n,s,r)},
/**
         * Renders the text background for lines, taking care of style
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_renderTextLinesBackground:function(e){if(this.textBackgroundColor||this.styleHas("textBackgroundColor")){for(var t,i,n,s,r,a,o,l=e.fillStyle,A=this._getLeftOffset(),c=this._getTopOffset(),u=0,h=0,d=this.path,g=0,p=this._textLines.length;g<p;g++)if(t=this.getHeightOfLine(g),this.textBackgroundColor||this.styleHas("textBackgroundColor",g)){n=this._textLines[g],i=this._getLineLeftOffset(g),h=0,u=0,s=this.getValueOfPropertyAt(g,0,"textBackgroundColor");for(var f=0,m=n.length;f<m;f++)r=this.__charBounds[g][f],a=this.getValueOfPropertyAt(g,f,"textBackgroundColor"),d?(e.save(),e.translate(r.renderLeft,r.renderTop),e.rotate(r.angle),e.fillStyle=a,a&&e.fillRect(-r.width/2,-t/this.lineHeight*(1-this._fontSizeFraction),r.width,t/this.lineHeight),e.restore()):a!==s?(o=A+i+u,"rtl"===this.direction&&(o=this.width-o-h),e.fillStyle=s,s&&e.fillRect(o,c,h,t/this.lineHeight),u=r.left,h=r.width,s=a):h+=r.kernedWidth;a&&!d&&(o=A+i+u,"rtl"===this.direction&&(o=this.width-o-h),e.fillStyle=a,e.fillRect(o,c,h,t/this.lineHeight)),c+=t}else c+=t;e.fillStyle=l,this._removeShadow(e)}},
/**
         * @private
         * @param {Object} decl style declaration for cache
         * @param {String} decl.fontFamily fontFamily
         * @param {String} decl.fontStyle fontStyle
         * @param {String} decl.fontWeight fontWeight
         * @return {Object} reference to cache
         */
getFontCache:function(e){var i=e.fontFamily.toLowerCase();t.charWidthsCache[i]||(t.charWidthsCache[i]={});var n=t.charWidthsCache[i],s=e.fontStyle.toLowerCase()+"_"+(e.fontWeight+"").toLowerCase();return n[s]||(n[s]={}),n[s]},
/**
         * measure and return the width of a single character.
         * possibly overridden to accommodate different measure logic or
         * to hook some external lib for character measurement
         * @private
         * @param {String} _char, char to be measured
         * @param {Object} charStyle style of char to be measured
         * @param {String} [previousChar] previous char
         * @param {Object} [prevCharStyle] style of previous char
         */
_measureChar:function(e,t,i,n){var s,r,a,o,l=this.getFontCache(t),A=i+e,c=this._getFontDeclaration(t)===this._getFontDeclaration(n),u=t.fontSize/this.CACHE_FONT_SIZE;if(i&&void 0!==l[i]&&(a=l[i]),void 0!==l[e]&&(o=s=l[e]),c&&void 0!==l[A]&&(o=(r=l[A])-a),void 0===s||void 0===a||void 0===r){var h=this.getMeasuringContext();this._setTextStyles(h,t,!0)}return void 0===s&&(o=s=h.measureText(e).width,l[e]=s),void 0===a&&c&&i&&(a=h.measureText(i).width,l[i]=a),c&&void 0===r&&(r=h.measureText(A).width,l[A]=r,o=r-a),{width:s*u,kernedWidth:o*u}},
/**
         * Computes height of character at given position
         * @param {Number} line the line index number
         * @param {Number} _char the character index number
         * @return {Number} fontSize of the character
         */
getHeightOfChar:function(e,t){return this.getValueOfPropertyAt(e,t,"fontSize")},
/**
         * measure a text line measuring all characters.
         * @param {Number} lineIndex line number
         * @return {Number} Line width
         */
measureLine:function(e){var t=this._measureLine(e);return 0!==this.charSpacing&&(t.width-=this._getWidthOfCharSpacing()),t.width<0&&(t.width=0),t},
/**
         * measure every grapheme of a line, populating __charBounds
         * @param {Number} lineIndex
         * @return {Object} object.width total width of characters
         * @return {Object} object.widthOfSpaces length of chars that match this._reSpacesAndTabs
         */
_measureLine:function(e){var i,n,s,r,a,o,l=0,A=this._textLines[e],c=new Array(A.length),u=0,h=this.path,d="right"===this.pathSide;for(this.__charBounds[e]=c,i=0;i<A.length;i++)n=A[i],r=this._getGraphemeBox(n,e,i,s),c[i]=r,l+=r.kernedWidth,s=n;if(c[i]={left:r?r.left+r.width:0,width:0,kernedWidth:0,height:this.fontSize},h){switch(o=h.segmentsInfo[h.segmentsInfo.length-1].length,(a=t.util.getPointOnPath(h.path,0,h.segmentsInfo)).x+=h.pathOffset.x,a.y+=h.pathOffset.y,this.textAlign){case"left":u=d?o-l:0;break;case"center":u=(o-l)/2;break;case"right":u=d?0:o-l}for(u+=this.pathStartOffset*(d?-1:1),i=d?A.length-1:0;d?i>=0:i<A.length;d?i--:i++)r=c[i],u>o?u%=o:u<0&&(u+=o),this._setGraphemeOnPath(u,r,a),u+=r.kernedWidth}return{width:l,numOfSpaces:0}},
/**
         * Calculate the angle  and the left,top position of the char that follow a path.
         * It appends it to graphemeInfo to be reused later at rendering
         * @private
         * @param {Number} positionInPath to be measured
         * @param {Object} graphemeInfo current grapheme box information
         * @param {Object} startingPoint position of the point
         */
_setGraphemeOnPath:function(e,i,n){var s=e+i.kernedWidth/2,r=this.path,a=t.util.getPointOnPath(r.path,s,r.segmentsInfo);i.renderLeft=a.x-n.x,i.renderTop=a.y-n.y,i.angle=a.angle+("right"===this.pathSide?Math.PI:0)},
/**
         * Measure and return the info of a single grapheme.
         * needs the the info of previous graphemes already filled
         * @private
         * @param {String} grapheme to be measured
         * @param {Number} lineIndex index of the line where the char is
         * @param {Number} charIndex position in the line
         * @param {String} [prevGrapheme] character preceding the one to be measured
         */
_getGraphemeBox:function(e,t,i,n,s){var r,a=this.getCompleteStyleDeclaration(t,i),o=n?this.getCompleteStyleDeclaration(t,i-1):{},l=this._measureChar(e,a,n,o),A=l.kernedWidth,c=l.width;0!==this.charSpacing&&(c+=r=this._getWidthOfCharSpacing(),A+=r);var u={width:c,left:0,height:a.fontSize,kernedWidth:A,deltaY:a.deltaY};if(i>0&&!s){var h=this.__charBounds[t][i-1];u.left=h.left+h.width+l.kernedWidth-l.width}return u},
/**
         * Calculate height of line at 'lineIndex'
         * @param {Number} lineIndex index of line to calculate
         * @return {Number}
         */
getHeightOfLine:function(e){if(this.__lineHeights[e])return this.__lineHeights[e];for(var t=this._textLines[e],i=this.getHeightOfChar(e,0),n=1,s=t.length;n<s;n++)i=Math.max(this.getHeightOfChar(e,n),i);return this.__lineHeights[e]=i*this.lineHeight*this._fontSizeMult},
/**
         * Calculate text box height
         */
calcTextHeight:function(){for(var e,t=0,i=0,n=this._textLines.length;i<n;i++)e=this.getHeightOfLine(i),t+=i===n-1?e/this.lineHeight:e;return t},
/**
         * @private
         * @return {Number} Left offset
         */
_getLeftOffset:function(){return"ltr"===this.direction?-this.width/2:this.width/2},
/**
         * @private
         * @return {Number} Top offset
         */
_getTopOffset:function(){return-this.height/2},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {String} method Method name ("fillText" or "strokeText")
         */
_renderTextCommon:function(e,t){e.save();for(var i=0,n=this._getLeftOffset(),s=this._getTopOffset(),r=0,a=this._textLines.length;r<a;r++){var o=this.getHeightOfLine(r),l=o/this.lineHeight,A=this._getLineLeftOffset(r);this._renderTextLine(t,e,this._textLines[r],n+A,s+i+l,r),i+=o}e.restore()},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_renderTextFill:function(e){(this.fill||this.styleHas("fill"))&&this._renderTextCommon(e,"fillText")},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_renderTextStroke:function(e){(this.stroke&&0!==this.strokeWidth||!this.isEmptyStyles())&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(e),e.save(),this._setLineDash(e,this.strokeDashArray),e.beginPath(),this._renderTextCommon(e,"strokeText"),e.closePath(),e.restore())},
/**
         * @private
         * @param {String} method fillText or strokeText.
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {Array} line Content of the line, splitted in an array by grapheme
         * @param {Number} left
         * @param {Number} top
         * @param {Number} lineIndex
         */
_renderChars:function(e,t,i,n,s,r){var a,o,l,A,c,u=this.getHeightOfLine(r),h=-1!==this.textAlign.indexOf("justify"),d="",g=0,p=this.path,f=!h&&0===this.charSpacing&&this.isEmptyStyles(r)&&!p,m="ltr"===this.direction,C="ltr"===this.direction?1:-1,I=t.canvas.getAttribute("dir");if(t.save(),I!==this.direction&&(t.canvas.setAttribute("dir",m?"ltr":"rtl"),t.direction=m?"ltr":"rtl",t.textAlign=m?"left":"right"),s-=u*this._fontSizeFraction/this.lineHeight,f)return this._renderChar(e,t,r,0,i.join(""),n,s,u),void t.restore();for(var v=0,B=i.length-1;v<=B;v++)A=v===B||this.charSpacing||p,d+=i[v],l=this.__charBounds[r][v],0===g?(n+=C*(l.kernedWidth-l.width),g+=l.width):g+=l.kernedWidth,h&&!A&&this._reSpaceAndTab.test(i[v])&&(A=!0),A||(a=a||this.getCompleteStyleDeclaration(r,v),o=this.getCompleteStyleDeclaration(r,v+1),A=this._hasStyleChanged(a,o)),A&&(p?(t.save(),t.translate(l.renderLeft,l.renderTop),t.rotate(l.angle),this._renderChar(e,t,r,v,d,-g/2,0,u),t.restore()):(c=n,this._renderChar(e,t,r,v,d,c,s,u)),d="",a=o,n+=C*g,g=0);t.restore()},
/**
         * This function try to patch the missing gradientTransform on canvas gradients.
         * transforming a context to transform the gradient, is going to transform the stroke too.
         * we want to transform the gradient but not the stroke operation, so we create
         * a transformed gradient on a pattern and then we use the pattern instead of the gradient.
         * this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
         * is limited.
         * @private
         * @param {fabric.Gradient} filler a fabric gradient instance
         * @return {CanvasPattern} a pattern to use as fill/stroke style
         */
_applyPatternGradientTransformText:function(e){var i,n=t.util.createCanvasElement(),s=this.width+this.strokeWidth,r=this.height+this.strokeWidth;return n.width=s,n.height=r,(i=n.getContext("2d")).beginPath(),i.moveTo(0,0),i.lineTo(s,0),i.lineTo(s,r),i.lineTo(0,r),i.closePath(),i.translate(s/2,r/2),i.fillStyle=e.toLive(i),this._applyPatternGradientTransform(i,e),i.fill(),i.createPattern(n,"no-repeat")},handleFiller:function(e,t,i){var n,s;return i.toLive?"percentage"===i.gradientUnits||i.gradientTransform||i.patternTransform?(n=-this.width/2,s=-this.height/2,e.translate(n,s),e[t]=this._applyPatternGradientTransformText(i),{offsetX:n,offsetY:s}):(e[t]=i.toLive(e,this),this._applyPatternGradientTransform(e,i)):(e[t]=i,{offsetX:0,offsetY:0})},_setStrokeStyles:function(e,t){return e.lineWidth=t.strokeWidth,e.lineCap=this.strokeLineCap,e.lineDashOffset=this.strokeDashOffset,e.lineJoin=this.strokeLineJoin,e.miterLimit=this.strokeMiterLimit,this.handleFiller(e,"strokeStyle",t.stroke)},_setFillStyles:function(e,t){return this.handleFiller(e,"fillStyle",t.fill)},
/**
         * @private
         * @param {String} method
         * @param {CanvasRenderingContext2D} ctx Context to render on
         * @param {Number} lineIndex
         * @param {Number} charIndex
         * @param {String} _char
         * @param {Number} left Left coordinate
         * @param {Number} top Top coordinate
         * @param {Number} lineHeight Height of the line
         */
_renderChar:function(e,t,i,n,s,r,a){var o,l,A=this._getStyleDeclaration(i,n),c=this.getCompleteStyleDeclaration(i,n),u="fillText"===e&&c.fill,h="strokeText"===e&&c.stroke&&c.strokeWidth;(h||u)&&(t.save(),u&&(o=this._setFillStyles(t,c)),h&&(l=this._setStrokeStyles(t,c)),t.font=this._getFontDeclaration(c),A&&A.textBackgroundColor&&this._removeShadow(t),A&&A.deltaY&&(a+=A.deltaY),u&&t.fillText(s,r-o.offsetX,a-o.offsetY),h&&t.strokeText(s,r-l.offsetX,a-l.offsetY),t.restore())},
/**
         * Turns the character into a 'superior figure' (i.e. 'superscript')
         * @param {Number} start selection start
         * @param {Number} end selection end
         * @returns {fabric.Text} thisArg
         * @chainable
         */
setSuperscript:function(e,t){return this._setScript(e,t,this.superscript)},
/**
         * Turns the character into an 'inferior figure' (i.e. 'subscript')
         * @param {Number} start selection start
         * @param {Number} end selection end
         * @returns {fabric.Text} thisArg
         * @chainable
         */
setSubscript:function(e,t){return this._setScript(e,t,this.subscript)},
/**
         * Applies 'schema' at given position
         * @private
         * @param {Number} start selection start
         * @param {Number} end selection end
         * @param {Number} schema
         * @returns {fabric.Text} thisArg
         * @chainable
         */
_setScript:function(e,t,i){var n=this.get2DCursorLocation(e,!0),s=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"fontSize"),r=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"deltaY"),a={fontSize:s*i.size,deltaY:r+s*i.baseline};return this.setSelectionStyles(a,e,t),this},
/**
         * @private
         * @param {Object} prevStyle
         * @param {Object} thisStyle
         */
_hasStyleChanged:function(e,t){return e.fill!==t.fill||e.stroke!==t.stroke||e.strokeWidth!==t.strokeWidth||e.fontSize!==t.fontSize||e.fontFamily!==t.fontFamily||e.fontWeight!==t.fontWeight||e.fontStyle!==t.fontStyle||e.deltaY!==t.deltaY},
/**
         * @private
         * @param {Object} prevStyle
         * @param {Object} thisStyle
         */
_hasStyleChangedForSvg:function(e,t){return this._hasStyleChanged(e,t)||e.overline!==t.overline||e.underline!==t.underline||e.linethrough!==t.linethrough},
/**
         * @private
         * @param {Number} lineIndex index text line
         * @return {Number} Line left offset
         */
_getLineLeftOffset:function(e){var t=this.getLineWidth(e),i=this.width-t,n=this.textAlign,s=this.direction,r=0,a=this.isEndOfWrapping(e);return"justify"===n||"justify-center"===n&&!a||"justify-right"===n&&!a||"justify-left"===n&&!a?0:("center"===n&&(r=i/2),"right"===n&&(r=i),"justify-center"===n&&(r=i/2),"justify-right"===n&&(r=i),"rtl"===s&&(r-=i),r)},
/**
         * @private
         */
_clearCache:function(){this.__lineWidths=[],this.__lineHeights=[],this.__charBounds=[]},
/**
         * @private
         */
_shouldClearDimensionCache:function(){var e=this._forceClearCache;return e||(e=this.hasStateChanged("_dimensionAffectingProps")),e&&(this.dirty=!0,this._forceClearCache=!1),e},
/**
         * Measure a single line given its index. Used to calculate the initial
         * text bounding box. The values are calculated and stored in __lineWidths cache.
         * @private
         * @param {Number} lineIndex line number
         * @return {Number} Line width
         */
getLineWidth:function(e){if(void 0!==this.__lineWidths[e])return this.__lineWidths[e];var t=this.measureLine(e).width;return this.__lineWidths[e]=t,t},_getWidthOfCharSpacing:function(){return 0!==this.charSpacing?this.fontSize*this.charSpacing/1e3:0},
/**
         * Retrieves the value of property at given character position
         * @param {Number} lineIndex the line number
         * @param {Number} charIndex the character number
         * @param {String} property the property name
         * @returns the value of 'property'
         */
getValueOfPropertyAt:function(e,t,i){var n=this._getStyleDeclaration(e,t);return n&&void 0!==n[i]?n[i]:this[i]},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_renderTextDecoration:function(e,t){if(this[t]||this.styleHas(t)){for(var i,n,s,r,a,o,l,A,c,u,h,d,g,p,f,m,C=this._getLeftOffset(),I=this._getTopOffset(),v=this.path,B=this._getWidthOfCharSpacing(),y=this.offsets[t],b=0,E=this._textLines.length;b<E;b++)if(i=this.getHeightOfLine(b),this[t]||this.styleHas(t,b)){l=this._textLines[b],p=i/this.lineHeight,r=this._getLineLeftOffset(b),u=0,h=0,A=this.getValueOfPropertyAt(b,0,t),m=this.getValueOfPropertyAt(b,0,"fill"),c=I+p*(1-this._fontSizeFraction),n=this.getHeightOfChar(b,0),a=this.getValueOfPropertyAt(b,0,"deltaY");for(var w=0,Q=l.length;w<Q;w++)if(d=this.__charBounds[b][w],g=this.getValueOfPropertyAt(b,w,t),f=this.getValueOfPropertyAt(b,w,"fill"),s=this.getHeightOfChar(b,w),o=this.getValueOfPropertyAt(b,w,"deltaY"),v&&g&&f)e.save(),e.fillStyle=m,e.translate(d.renderLeft,d.renderTop),e.rotate(d.angle),e.fillRect(-d.kernedWidth/2,y*s+o,d.kernedWidth,this.fontSize/15),e.restore();else if((g!==A||f!==m||s!==n||o!==a)&&h>0){var _=C+r+u;"rtl"===this.direction&&(_=this.width-_-h),A&&m&&(e.fillStyle=m,e.fillRect(_,c+y*n+a,h,this.fontSize/15)),u=d.left,h=d.width,A=g,m=f,n=s,a=o}else h+=d.kernedWidth;_=C+r+u;"rtl"===this.direction&&(_=this.width-_-h),e.fillStyle=f,g&&f&&e.fillRect(_,c+y*n+a,h-B,this.fontSize/15),I+=i}else I+=i;this._removeShadow(e)}},
/**
         * return font declaration string for canvas context
         * @param {Object} [styleObject] object
         * @returns {String} font declaration formatted for canvas context.
         */
_getFontDeclaration:function(e,i){var n=e||this,s=this.fontFamily,r=t.Text.genericFonts.indexOf(s.toLowerCase())>-1,a=void 0===s||s.indexOf("'")>-1||s.indexOf(",")>-1||s.indexOf('"')>-1||r?n.fontFamily:'"'+n.fontFamily+'"';return[
// node-canvas needs "weight style", while browsers need "style weight"
// verify if this can be fixed in JSDOM
t.isLikelyNode?n.fontWeight:n.fontStyle,t.isLikelyNode?n.fontStyle:n.fontWeight,i?this.CACHE_FONT_SIZE+"px":n.fontSize+"px",a].join(" ")},
/**
         * Renders text instance on a specified context
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
render:function(e){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",e)))},
/**
         * Returns the text as an array of lines.
         * @param {String} text text to split
         * @returns {Array} Lines in the text
         */
_splitTextIntoLines:function(e){for(var i=e.split(this._reNewline),n=new Array(i.length),s=["\n"],r=[],a=0;a<i.length;a++)n[a]=t.util.string.graphemeSplit(i[a]),r=r.concat(n[a],s);return r.pop(),{_unwrappedLines:n,lines:i,graphemeText:r,graphemeLines:n}},
/**
         * Returns object representation of an instance
         * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
         * @return {Object} Object representation of an instance
         */
toObject:function(e){var t=n.concat(e),s=this.callSuper("toObject",t);return s.styles=i(this.styles,!0),s.path&&(s.path=this.path.toObject()),s},
/**
         * Sets property to a given value. When changing position/dimension -related properties (left, top, scale, angle, etc.) `set` does not update position of object's borders/controls. If you need to update those, call `setCoords()`.
         * @param {String|Object} key Property name or object (if object, iterate over the object properties)
         * @param {Object|Function} value Property value (if function, the value is passed into it and its return value is used as a new one)
         * @return {fabric.Object} thisArg
         * @chainable
         */
set:function(e,t){this.callSuper("set",e,t);var i=!1,n=!1;if("object"==typeof e)for(var s in e)"path"===s&&this.setPathInfo(),i=i||-1!==this._dimensionAffectingProps.indexOf(s),n=n||"path"===s;else i=-1!==this._dimensionAffectingProps.indexOf(e),n="path"===e;return n&&this.setPathInfo(),i&&(this.initDimensions(),this.setCoords()),this},
/**
         * Returns complexity of an instance
         * @return {Number} complexity
         */
complexity:function(){return 1}}),t.Text.ATTRIBUTE_NAMES=t.SHARED_ATTRIBUTES.concat("x y dx dy font-family font-style font-weight font-size letter-spacing text-decoration text-anchor".split(" ")),t.Text.DEFAULT_SVG_FONT_SIZE=16,t.Text.fromElement=function(e,n,s){if(!e)return n(null);var r=t.parseAttributes(e,t.Text.ATTRIBUTE_NAMES),a=r.textAnchor||"left";if((s=t.util.object.extend(s?i(s):{},r)).top=s.top||0,s.left=s.left||0,r.textDecoration){var o=r.textDecoration;-1!==o.indexOf("underline")&&(s.underline=!0),-1!==o.indexOf("overline")&&(s.overline=!0),-1!==o.indexOf("line-through")&&(s.linethrough=!0),delete s.textDecoration}"dx"in r&&(s.left+=r.dx),"dy"in r&&(s.top+=r.dy),"fontSize"in s||(s.fontSize=t.Text.DEFAULT_SVG_FONT_SIZE);var l="";"textContent"in e?l=e.textContent:"firstChild"in e&&null!==e.firstChild&&"data"in e.firstChild&&null!==e.firstChild.data&&(l=e.firstChild.data),l=l.replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," ");var A=s.strokeWidth;s.strokeWidth=0;var c=new t.Text(l,s),u=c.getScaledHeight()/c.height,h=((c.height+c.strokeWidth)*c.lineHeight-c.height)*u,d=c.getScaledHeight()+h,g=0;"center"===a&&(g=c.getScaledWidth()/2),"right"===a&&(g=c.getScaledWidth()),c.set({left:c.left-g,top:c.top-(d-c.fontSize*(.07+c._fontSizeFraction))/c.lineHeight,strokeWidth:void 0!==A?A:1}),n(c)},t.Text.fromObject=function(e,n){var s=i(e),r=e.path;return delete s.path,t.Object._fromObject("Text",s,(function(e){r?t.Object._fromObject("Path",r,(function(t){e.set("path",t),n(e)}),"path"):n(e)}),"text")},t.Text.genericFonts=["sans-serif","serif","cursive","fantasy","monospace"],t.util.createAccessors&&t.util.createAccessors(t.Text)}}(e),f.util.object.extend(f.Text.prototype,
/** @lends fabric.Text.prototype */
{
/**
         * Returns true if object has no styling or no styling in a line
         * @param {Number} lineIndex , lineIndex is on wrapped lines.
         * @return {Boolean}
         */
isEmptyStyles:function(e){if(!this.styles)return!0;if(void 0!==e&&!this.styles[e])return!0;var t=void 0===e?this.styles:{line:this.styles[e]};for(var i in t)for(var n in t[i])for(var s in t[i][n])return!1;return!0},
/**
         * Returns true if object has a style property or has it ina specified line
         * This function is used to detect if a text will use a particular property or not.
         * @param {String} property to check for
         * @param {Number} lineIndex to check the style on
         * @return {Boolean}
         */
styleHas:function(e,t){if(!this.styles||!e||""===e)return!1;if(void 0!==t&&!this.styles[t])return!1;var i=void 0===t?this.styles:{0:this.styles[t]};for(var n in i)for(var s in i[n])if(void 0!==i[n][s][e])return!0;return!1},
/**
         * Check if characters in a text have a value for a property
         * whose value matches the textbox's value for that property.  If so,
         * the character-level property is deleted.  If the character
         * has no other properties, then it is also deleted.  Finally,
         * if the line containing that character has no other characters
         * then it also is deleted.
         *
         * @param {string} property The property to compare between characters and text.
         */
cleanStyle:function(e){if(!this.styles||!e||""===e)return!1;var t,i,n=this.styles,s=0,r=!0,a=0;for(var o in n){for(var l in t=0,n[o]){var A;s++,(A=n[o][l]).hasOwnProperty(e)?(i?A[e]!==i&&(r=!1):i=A[e],A[e]===this[e]&&delete A[e]):r=!1,0!==Object.keys(A).length?t++:delete n[o][l]}0===t&&delete n[o]}for(var c=0;c<this._textLines.length;c++)a+=this._textLines[c].length;r&&s===a&&(this[e]=i,this.removeStyle(e))},
/**
         * Remove a style property or properties from all individual character styles
         * in a text object.  Deletes the character style object if it contains no other style
         * props.  Deletes a line style object if it contains no other character styles.
         *
         * @param {String} props The property to remove from character styles.
         */
removeStyle:function(e){if(this.styles&&e&&""!==e){var t,i,n,s=this.styles;for(i in s){for(n in t=s[i])delete t[n][e],0===Object.keys(t[n]).length&&delete t[n];0===Object.keys(t).length&&delete s[i]}}},
/**
         * @private
         */
_extendStyles:function(e,t){var i=this.get2DCursorLocation(e);this._getLineStyle(i.lineIndex)||this._setLineStyle(i.lineIndex),this._getStyleDeclaration(i.lineIndex,i.charIndex)||this._setStyleDeclaration(i.lineIndex,i.charIndex,{}),f.util.object.extend(this._getStyleDeclaration(i.lineIndex,i.charIndex),t)},
/**
         * Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
         * @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
         * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
         */
get2DCursorLocation:function(e,t){void 0===e&&(e=this.selectionStart);for(var i=t?this._unwrappedTextLines:this._textLines,n=i.length,s=0;s<n;s++){if(e<=i[s].length)return{lineIndex:s,charIndex:e};e-=i[s].length+this.missingNewlineOffset(s)}return{lineIndex:s-1,charIndex:i[s-1].length<e?i[s-1].length:e}},
/**
         * Gets style of a current selection/cursor (at the start position)
         * if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
         * @param {Number} [startIndex] Start index to get styles at
         * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
         * @param {Boolean} [complete] get full style or not
         * @return {Array} styles an array with one, zero or more Style objects
         */
getSelectionStyles:function(e,t,i){void 0===e&&(e=this.selectionStart||0),void 0===t&&(t=this.selectionEnd||e);for(var n=[],s=e;s<t;s++)n.push(this.getStyleAtPosition(s,i));return n},
/**
         * Gets style of a current selection/cursor position
         * @param {Number} position  to get styles at
         * @param {Boolean} [complete] full style if true
         * @return {Object} style Style object at a specified index
         * @private
         */
getStyleAtPosition:function(e,t){var i=this.get2DCursorLocation(e);return(t?this.getCompleteStyleDeclaration(i.lineIndex,i.charIndex):this._getStyleDeclaration(i.lineIndex,i.charIndex))||{}},
/**
         * Sets style of a current selection, if no selection exist, do not set anything.
         * @param {Object} [styles] Styles object
         * @param {Number} [startIndex] Start index to get styles at
         * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
         * @return {fabric.IText} thisArg
         * @chainable
         */
setSelectionStyles:function(e,t,i){void 0===t&&(t=this.selectionStart||0),void 0===i&&(i=this.selectionEnd||t);for(var n=t;n<i;n++)this._extendStyles(n,e);return this._forceClearCache=!0,this},
/**
         * get the reference, not a clone, of the style object for a given character
         * @param {Number} lineIndex
         * @param {Number} charIndex
         * @return {Object} style object
         */
_getStyleDeclaration:function(e,t){var i=this.styles&&this.styles[e];return i?i[t]:null},
/**
         * return a new object that contains all the style property for a character
         * the object returned is newly created
         * @param {Number} lineIndex of the line where the character is
         * @param {Number} charIndex position of the character on the line
         * @return {Object} style object
         */
getCompleteStyleDeclaration:function(e,t){for(var i,n=this._getStyleDeclaration(e,t)||{},s={},r=0;r<this._styleProperties.length;r++)s[i=this._styleProperties[r]]=void 0===n[i]?this[i]:n[i];return s},
/**
         * @param {Number} lineIndex
         * @param {Number} charIndex
         * @param {Object} style
         * @private
         */
_setStyleDeclaration:function(e,t,i){this.styles[e][t]=i},
/**
         *
         * @param {Number} lineIndex
         * @param {Number} charIndex
         * @private
         */
_deleteStyleDeclaration:function(e,t){delete this.styles[e][t]},
/**
         * @param {Number} lineIndex
         * @return {Boolean} if the line exists or not
         * @private
         */
_getLineStyle:function(e){return!!this.styles[e]},
/**
         * Set the line style to an empty object so that is initialized
         * @param {Number} lineIndex
         * @private
         */
_setLineStyle:function(e){this.styles[e]={}},
/**
         * @param {Number} lineIndex
         * @private
         */
_deleteLineStyle:function(e){delete this.styles[e]}}),function(){function e(e){e.textDecoration&&(e.textDecoration.indexOf("underline")>-1&&(e.underline=!0),e.textDecoration.indexOf("line-through")>-1&&(e.linethrough=!0),e.textDecoration.indexOf("overline")>-1&&(e.overline=!0),delete e.textDecoration)}f.IText=f.util.createClass(f.Text,f.Observable,
/** @lends fabric.IText.prototype */
{
/**
         * Type of an object
         * @type String
         * @default
         */
type:"i-text",
/**
         * Index where text selection starts (or where cursor is when there is no selection)
         * @type Number
         * @default
         */
selectionStart:0,
/**
         * Index where text selection ends
         * @type Number
         * @default
         */
selectionEnd:0,
/**
         * Color of text selection
         * @type String
         * @default
         */
selectionColor:"rgba(17,119,255,0.3)",
/**
         * Indicates whether text is in editing mode
         * @type Boolean
         * @default
         */
isEditing:!1,
/**
         * Indicates whether a text can be edited
         * @type Boolean
         * @default
         */
editable:!0,
/**
         * Border color of text object while it's in editing mode
         * @type String
         * @default
         */
editingBorderColor:"rgba(102,153,255,0.25)",
/**
         * Width of cursor (in px)
         * @type Number
         * @default
         */
cursorWidth:2,
/**
         * Color of text cursor color in editing mode.
         * if not set (default) will take color from the text.
         * if set to a color value that fabric can understand, it will
         * be used instead of the color of the text at the current position.
         * @type String
         * @default
         */
cursorColor:"",
/**
         * Delay between cursor blink (in ms)
         * @type Number
         * @default
         */
cursorDelay:1e3,
/**
         * Duration of cursor fadein (in ms)
         * @type Number
         * @default
         */
cursorDuration:600,
/**
         * Indicates whether internal text char widths can be cached
         * @type Boolean
         * @default
         */
caching:!0,
/**
         * DOM container to append the hiddenTextarea.
         * An alternative to attaching to the document.body.
         * Useful to reduce laggish redraw of the full document.body tree and
         * also with modals event capturing that won't let the textarea take focus.
         * @type HTMLElement
         * @default
         */
hiddenTextareaContainer:null,
/**
         * @private
         */
_reSpace:/\s|\n/,
/**
         * @private
         */
_currentCursorOpacity:0,
/**
         * @private
         */
_selectionDirection:null,
/**
         * @private
         */
_abortCursorAnimation:!1,
/**
         * @private
         */
__widthOfSpace:[],
/**
         * Helps determining when the text is in composition, so that the cursor
         * rendering is altered.
         */
inCompositionMode:!1,
/**
         * Constructor
         * @param {String} text Text string
         * @param {Object} [options] Options object
         * @return {fabric.IText} thisArg
         */
initialize:function(e,t){this.callSuper("initialize",e,t),this.initBehavior()},
/**
         * Sets selection start (left boundary of a selection)
         * @param {Number} index Index to set selection start to
         */
setSelectionStart:function(e){e=Math.max(e,0),this._updateAndFire("selectionStart",e)},
/**
         * Sets selection end (right boundary of a selection)
         * @param {Number} index Index to set selection end to
         */
setSelectionEnd:function(e){e=Math.min(e,this.text.length),this._updateAndFire("selectionEnd",e)},
/**
         * @private
         * @param {String} property 'selectionStart' or 'selectionEnd'
         * @param {Number} index new position of property
         */
_updateAndFire:function(e,t){this[e]!==t&&(this._fireSelectionChanged(),this[e]=t),this._updateTextarea()},
/**
         * Fires the even of selection changed
         * @private
         */
_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},
/**
         * Initialize text dimensions. Render all text on given context
         * or on a offscreen canvas to get the text width with measureText.
         * Updates this.width and this.height with the proper values.
         * Does not return dimensions.
         * @private
         */
initDimensions:function(){this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this.callSuper("initDimensions")},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
render:function(e){this.clearContextTop(),this.callSuper("render",e),this.cursorOffsetCache={},this.renderCursorOrSelection()},
/**
         * @private
         * @param {CanvasRenderingContext2D} ctx Context to render on
         */
_render:function(e){this.callSuper("_render",e)},
/**
         * Prepare and clean the contextTop
         */
clearContextTop:function(e){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var t=this.canvas.contextTop,i=this.canvas.viewportTransform;t.save(),t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),this.transform(t),this._clearTextArea(t),e||t.restore()}},
/**
         * Renders cursor or selection (depending on what exists)
         * it does on the contextTop. If contextTop is not available, do nothing.
         */
renderCursorOrSelection:function(){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var e=this._getCursorBoundaries(),t=this.canvas.contextTop;this.clearContextTop(!0),this.selectionStart===this.selectionEnd?this.renderCursor(e,t):this.renderSelection(e,t),t.restore()}},_clearTextArea:function(e){var t=this.width+4,i=this.height+4;e.clearRect(-t/2,-i/2,t,i)},
/**
         * Returns cursor boundaries (left, top, leftOffset, topOffset)
         * @private
         * @param {Array} chars Array of characters
         * @param {String} typeOfBoundaries
         */
_getCursorBoundaries:function(e){void 0===e&&(e=this.selectionStart);var t=this._getLeftOffset(),i=this._getTopOffset(),n=this._getCursorBoundariesOffsets(e);return{left:t,top:i,leftOffset:n.left,topOffset:n.top}},
/**
         * @private
         */
_getCursorBoundariesOffsets:function(e){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;var t,i,n,s,r=0,a=0,o=this.get2DCursorLocation(e);n=o.charIndex,i=o.lineIndex;for(var l=0;l<i;l++)r+=this.getHeightOfLine(l);t=this._getLineLeftOffset(i);var A=this.__charBounds[i][n];return A&&(a=A.left),0!==this.charSpacing&&n===this._textLines[i].length&&(a-=this._getWidthOfCharSpacing()),s={top:r,left:t+(a>0?a:0)},"rtl"===this.direction&&(s.left*=-1),this.cursorOffsetCache=s,this.cursorOffsetCache},
/**
         * Renders cursor
         * @param {Object} boundaries
         * @param {CanvasRenderingContext2D} ctx transformed context to draw on
         */
renderCursor:function(e,t){var i=this.get2DCursorLocation(),n=i.lineIndex,s=i.charIndex>0?i.charIndex-1:0,r=this.getValueOfPropertyAt(n,s,"fontSize"),a=this.scaleX*this.canvas.getZoom(),o=this.cursorWidth/a,l=e.topOffset,A=this.getValueOfPropertyAt(n,s,"deltaY");l+=(1-this._fontSizeFraction)*this.getHeightOfLine(n)/this.lineHeight-r*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(e,t),t.fillStyle=this.cursorColor||this.getValueOfPropertyAt(n,s,"fill"),t.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,t.fillRect(e.left+e.leftOffset-o/2,l+e.top+A,o,r)},
/**
         * Renders text selection
         * @param {Object} boundaries Object with left/top/leftOffset/topOffset
         * @param {CanvasRenderingContext2D} ctx transformed context to draw on
         */
renderSelection:function(e,t){for(var i=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,n=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,s=-1!==this.textAlign.indexOf("justify"),r=this.get2DCursorLocation(i),a=this.get2DCursorLocation(n),o=r.lineIndex,l=a.lineIndex,A=r.charIndex<0?0:r.charIndex,c=a.charIndex<0?0:a.charIndex,u=o;u<=l;u++){var h,d=this._getLineLeftOffset(u)||0,g=this.getHeightOfLine(u),p=0,f=0;if(u===o&&(p=this.__charBounds[o][A].left),u>=o&&u<l)f=s&&!this.isEndOfWrapping(u)?this.width:this.getLineWidth(u)||5;else if(u===l)if(0===c)f=this.__charBounds[l][c].left;else{var m=this._getWidthOfCharSpacing();f=this.__charBounds[l][c-1].left+this.__charBounds[l][c-1].width-m}h=g,(this.lineHeight<1||u===l&&this.lineHeight>1)&&(g/=this.lineHeight);var C=e.left+d+p,I=f-p,v=g,B=0;this.inCompositionMode?(t.fillStyle=this.compositionColor||"black",v=1,B=g):t.fillStyle=this.selectionColor,"rtl"===this.direction&&(C=this.width-C-I),t.fillRect(C,e.top+e.topOffset+B,I,v),e.topOffset+=h}},
/**
         * High level function to know the height of the cursor.
         * the currentChar is the one that precedes the cursor
         * Returns fontSize of char at the current cursor
         * Unused from the library, is for the end user
         * @return {Number} Character font size
         */
getCurrentCharFontSize:function(){var e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fontSize")},
/**
         * High level function to know the color of the cursor.
         * the currentChar is the one that precedes the cursor
         * Returns color (fill) of char at the current cursor
         * if the text object has a pattern or gradient for filler, it will return that.
         * Unused by the library, is for the end user
         * @return {String | fabric.Gradient | fabric.Pattern} Character color (fill)
         */
getCurrentCharColor:function(){var e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fill")},
/**
         * Returns the cursor position for the getCurrent.. functions
         * @private
         */
_getCurrentCharIndex:function(){var e=this.get2DCursorLocation(this.selectionStart,!0),t=e.charIndex>0?e.charIndex-1:0;return{l:e.lineIndex,c:t}}}),f.IText.fromObject=function(t,i){if(e(t),t.styles)for(var n in t.styles)for(var s in t.styles[n])e(t.styles[n][s]);f.Object._fromObject("IText",t,i,"text")}}(),p=f.util.object.clone,f.util.object.extend(f.IText.prototype,
/** @lends fabric.IText.prototype */
{
/**
         * Initializes all the interactive behavior of IText
         */
initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1},
/**
         * Initializes "added" event handler
         */
initAddedHandler:function(){var e=this;this.on("added",(function(){var t=e.canvas;t&&(t._hasITextHandlers||(t._hasITextHandlers=!0,e._initCanvasHandlers(t)),t._iTextInstances=t._iTextInstances||[],t._iTextInstances.push(e))}))},initRemovedHandler:function(){var e=this;this.on("removed",(function(){var t=e.canvas;t&&(t._iTextInstances=t._iTextInstances||[],f.util.removeFromArray(t._iTextInstances,e),0===t._iTextInstances.length&&(t._hasITextHandlers=!1,e._removeCanvasHandlers(t)))}))},
/**
         * register canvas event to manage exiting on other instances
         * @private
         */
_initCanvasHandlers:function(e){e._mouseUpITextHandler=function(){e._iTextInstances&&e._iTextInstances.forEach((function(e){e.__isMousedown=!1}))},e.on("mouse:up",e._mouseUpITextHandler)},
/**
         * remove canvas event to manage exiting on other instances
         * @private
         */
_removeCanvasHandlers:function(e){e.off("mouse:up",e._mouseUpITextHandler)},
/**
         * @private
         */
_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},
/**
         * @private
         */
_animateCursor:function(e,t,i,n){var s;return s={isAborted:!1,abort:function(){this.isAborted=!0}},e.animate("_currentCursorOpacity",t,{duration:i,onComplete:function(){s.isAborted||e[n]()},onChange:function(){e.canvas&&e.selectionStart===e.selectionEnd&&e.renderCursorOrSelection()},abort:function(){return s.isAborted}}),s},
/**
         * @private
         */
_onTickComplete:function(){var e=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout((function(){e._currentTickCompleteState=e._animateCursor(e,0,this.cursorDuration/2,"_tick")}),100)},
/**
         * Initializes delayed cursor
         */
initDelayedCursor:function(e){var t=this,i=e?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout((function(){t._tick()}),i)},
/**
         * Aborts cursor animation and clears all timeouts
         */
abortCursorAnimation:function(){var e=this._currentTickState||this._currentTickCompleteState,t=this.canvas;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,e&&t&&t.clearContext(t.contextTop||t.contextContainer)},
/**
         * Selects entire text
         * @return {fabric.IText} thisArg
         * @chainable
         */
selectAll:function(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this},
/**
         * Returns selected text
         * @return {String}
         */
getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},
/**
         * Find new selection index representing start of current word according to current selection index
         * @param {Number} startFrom Current selection index
         * @return {Number} New selection index
         */
findWordBoundaryLeft:function(e){var t=0,i=e-1;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)t++,i--;for(;/\S/.test(this._text[i])&&i>-1;)t++,i--;return e-t},
/**
         * Find new selection index representing end of current word according to current selection index
         * @param {Number} startFrom Current selection index
         * @return {Number} New selection index
         */
findWordBoundaryRight:function(e){var t=0,i=e;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)t++,i++;for(;/\S/.test(this._text[i])&&i<this._text.length;)t++,i++;return e+t},
/**
         * Find new selection index representing start of current line according to current selection index
         * @param {Number} startFrom Current selection index
         * @return {Number} New selection index
         */
findLineBoundaryLeft:function(e){for(var t=0,i=e-1;!/\n/.test(this._text[i])&&i>-1;)t++,i--;return e-t},
/**
         * Find new selection index representing end of current line according to current selection index
         * @param {Number} startFrom Current selection index
         * @return {Number} New selection index
         */
findLineBoundaryRight:function(e){for(var t=0,i=e;!/\n/.test(this._text[i])&&i<this._text.length;)t++,i++;return e+t},
/**
         * Finds index corresponding to beginning or end of a word
         * @param {Number} selectionStart Index of a character
         * @param {Number} direction 1 or -1
         * @return {Number} Index of the beginning or end of a word
         */
searchWordBoundary:function(e,t){for(var i=this._text,n=this._reSpace.test(i[e])?e-1:e,s=i[n],r=f.reNonWord;!r.test(s)&&n>0&&n<i.length;)s=i[n+=t];return r.test(s)&&(n+=1===t?0:1),n},
/**
         * Selects a word based on the index
         * @param {Number} selectionStart Index of a character
         */
selectWord:function(e){e=e||this.selectionStart;var t=this.searchWordBoundary(e,-1),i=this.searchWordBoundary(e,1);this.selectionStart=t,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()},
/**
         * Selects a line based on the index
         * @param {Number} selectionStart Index of a character
         * @return {fabric.IText} thisArg
         * @chainable
         */
selectLine:function(e){e=e||this.selectionStart;var t=this.findLineBoundaryLeft(e),i=this.findLineBoundaryRight(e);return this.selectionStart=t,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea(),this},
/**
         * Enters editing state
         * @return {fabric.IText} thisArg
         * @chainable
         */
enterEditing:function(e){if(!this.isEditing&&this.editable)return this.canvas&&(this.canvas.calcOffset(),this.exitEditingOnOthers(this.canvas)),this.isEditing=!0,this.initHiddenTextarea(e),this.hiddenTextarea.focus(),this.hiddenTextarea.value=this.text,this._updateTextarea(),this._saveEditingProps(),this._setEditingProps(),this._textBeforeEdit=this.text,this._tick(),this.fire("editing:entered"),this._fireSelectionChanged(),this.canvas?(this.canvas.fire("text:editing:entered",{target:this}),this.initMouseMoveHandler(),this.canvas.requestRenderAll(),this):this},exitEditingOnOthers:function(e){e._iTextInstances&&e._iTextInstances.forEach((function(e){e.selected=!1,e.isEditing&&e.exitEditing()}))},
/**
         * Initializes "mousemove" event handler
         */
initMouseMoveHandler:function(){this.canvas.on("mouse:move",this.mouseMoveHandler)},
/**
         * @private
         */
mouseMoveHandler:function(e){if(this.__isMousedown&&this.isEditing){var t=this.getSelectionStartFromPointer(e.e),i=this.selectionStart,n=this.selectionEnd;(t===this.__selectionStartOnMouseDown&&i!==n||i!==t&&n!==t)&&(t>this.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=t):(this.selectionStart=t,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===i&&this.selectionEnd===n||(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},
/**
         * @private
         */
_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},
/**
         * convert from textarea to grapheme indexes
         */
fromStringToGraphemeSelection:function(e,t,i){var n=i.slice(0,e),s=f.util.string.graphemeSplit(n).length;if(e===t)return{selectionStart:s,selectionEnd:s};var r=i.slice(e,t);return{selectionStart:s,selectionEnd:s+f.util.string.graphemeSplit(r).length}},
/**
         * convert from fabric to textarea values
         */
fromGraphemeToStringSelection:function(e,t,i){var n=i.slice(0,e).join("").length;return e===t?{selectionStart:n,selectionEnd:n}:{selectionStart:n,selectionEnd:n+i.slice(e,t).join("").length}},
/**
         * @private
         */
_updateTextarea:function(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){var e=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=e.selectionStart,this.hiddenTextarea.selectionEnd=e.selectionEnd}this.updateTextareaPosition()}},
/**
         * @private
         */
updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords());var e=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=e.selectionEnd,this.inCompositionMode||(this.selectionStart=e.selectionStart),this.updateTextareaPosition()}},
/**
         * @private
         */
updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var e=this._calcTextareaPosition();this.hiddenTextarea.style.left=e.left,this.hiddenTextarea.style.top=e.top}},
/**
         * @private
         * @return {Object} style contains style for hiddenTextarea
         */
_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var e=this.inCompositionMode?this.compositionStart:this.selectionStart,t=this._getCursorBoundaries(e),i=this.get2DCursorLocation(e),n=i.lineIndex,s=i.charIndex,r=this.getValueOfPropertyAt(n,s,"fontSize")*this.lineHeight,a=t.leftOffset,o=this.calcTransformMatrix(),l={x:t.left+a,y:t.top+t.topOffset+r},A=this.canvas.getRetinaScaling(),c=this.canvas.upperCanvasEl,u=c.width/A,h=c.height/A,d=u-r,g=h-r,p=c.clientWidth/u,m=c.clientHeight/h;return l=f.util.transformPoint(l,o),(l=f.util.transformPoint(l,this.canvas.viewportTransform)).x*=p,l.y*=m,l.x<0&&(l.x=0),l.x>d&&(l.x=d),l.y<0&&(l.y=0),l.y>g&&(l.y=g),l.x+=this.canvas._offset.left,l.y+=this.canvas._offset.top,{left:l.x+"px",top:l.y+"px",fontSize:r+"px",charHeight:r}},
/**
         * @private
         */
_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},
/**
         * @private
         */
_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},
/**
         * Exits from editing state
         * @return {fabric.IText} thisArg
         * @chainable
         */
exitEditing:function(){var e=this._textBeforeEdit!==this.text,t=this.hiddenTextarea;return this.selected=!1,this.isEditing=!1,this.selectionEnd=this.selectionStart,t&&(t.blur&&t.blur(),t.parentNode&&t.parentNode.removeChild(t)),this.hiddenTextarea=null,this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),e&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),e&&this.canvas.fire("object:modified",{target:this})),this},
/**
         * @private
         */
_removeExtraneousStyles:function(){for(var e in this.styles)this._textLines[e]||delete this.styles[e]},
/**
         * remove and reflow a style block from start to end.
         * @param {Number} start linear start position for removal (included in removal)
         * @param {Number} end linear end position for removal ( excluded from removal )
         */
removeStyleFromTo:function(e,t){var i,n,s=this.get2DCursorLocation(e,!0),r=this.get2DCursorLocation(t,!0),a=s.lineIndex,o=s.charIndex,l=r.lineIndex,A=r.charIndex;if(a!==l){if(this.styles[a])for(i=o;i<this._unwrappedTextLines[a].length;i++)delete this.styles[a][i];if(this.styles[l])for(i=A;i<this._unwrappedTextLines[l].length;i++)(n=this.styles[l][i])&&(this.styles[a]||(this.styles[a]={}),this.styles[a][o+i-A]=n);for(i=a+1;i<=l;i++)delete this.styles[i];this.shiftLineStyles(l,a-l)}else if(this.styles[a]){n=this.styles[a];var c,u,h=A-o;for(i=o;i<A;i++)delete n[i];for(u in this.styles[a])(c=parseInt(u,10))>=A&&(n[c-h]=n[u],delete n[u])}},
/**
         * Shifts line styles up or down
         * @param {Number} lineIndex Index of a line
         * @param {Number} offset Can any number?
         */
shiftLineStyles:function(e,t){var i=p(this.styles);for(var n in this.styles){var s=parseInt(n,10);s>e&&(this.styles[s+t]=i[s],i[s-t]||delete this.styles[s])}},restartCursorIfNeeded:function(){this._currentTickState&&!this._currentTickState.isAborted&&this._currentTickCompleteState&&!this._currentTickCompleteState.isAborted||this.initDelayedCursor()},
/**
         * Handle insertion of more consecutive style lines for when one or more
         * newlines gets added to the text. Since current style needs to be shifted
         * first we shift the current style of the number lines needed, then we add
         * new lines from the last to the first.
         * @param {Number} lineIndex Index of a line
         * @param {Number} charIndex Index of a char
         * @param {Number} qty number of lines to add
         * @param {Array} copiedStyle Array of objects styles
         */
insertNewlineStyleObject:function(e,t,i,n){var s,r={},a=!1,o=this._unwrappedTextLines[e].length===t;for(var l in i||(i=1),this.shiftLineStyles(e,i),this.styles[e]&&(s=this.styles[e][0===t?t:t-1]),this.styles[e]){var A=parseInt(l,10);A>=t&&(a=!0,r[A-t]=this.styles[e][l],o&&0===t||delete this.styles[e][l])}var c=!1;for(a&&!o&&(this.styles[e+i]=r,c=!0),c&&i--;i>0;)n&&n[i-1]?this.styles[e+i]={0:p(n[i-1])}:s?this.styles[e+i]={0:p(s)}:delete this.styles[e+i],i--;this._forceClearCache=!0},
/**
         * Inserts style object for a given line/char index
         * @param {Number} lineIndex Index of a line
         * @param {Number} charIndex Index of a char
         * @param {Number} quantity number Style object to insert, if given
         * @param {Array} copiedStyle array of style objects
         */
insertCharStyleObject:function(e,t,i,n){this.styles||(this.styles={});var s=this.styles[e],r=s?p(s):{};for(var a in i||(i=1),r){var o=parseInt(a,10);o>=t&&(s[o+i]=r[o],r[o-i]||delete s[o])}if(this._forceClearCache=!0,n)for(;i--;)Object.keys(n[i]).length&&(this.styles[e]||(this.styles[e]={}),this.styles[e][t+i]=p(n[i]));else if(s)for(var l=s[t?t-1:1];l&&i--;)this.styles[e][t+i]=p(l)},
/**
         * Inserts style object(s)
         * @param {Array} insertedText Characters at the location where style is inserted
         * @param {Number} start cursor index for inserting style
         * @param {Array} [copiedStyle] array of style objects to insert.
         */
insertNewStyleBlock:function(e,t,i){for(var n=this.get2DCursorLocation(t,!0),s=[0],r=0,a=0;a<e.length;a++)"\n"===e[a]?s[++r]=0:s[r]++;for(s[0]>0&&(this.insertCharStyleObject(n.lineIndex,n.charIndex,s[0],i),i=i&&i.slice(s[0]+1)),r&&this.insertNewlineStyleObject(n.lineIndex,n.charIndex+s[0],r),a=1;a<r;a++)s[a]>0?this.insertCharStyleObject(n.lineIndex+a,0,s[a],i):i&&this.styles[n.lineIndex+a]&&i[0]&&(this.styles[n.lineIndex+a][0]=i[0]),i=i&&i.slice(s[a]+1);s[a]>0&&this.insertCharStyleObject(n.lineIndex+a,0,s[a],i)},
/**
         * Set the selectionStart and selectionEnd according to the new position of cursor
         * mimic the key - mouse navigation when shift is pressed.
         */
setSelectionStartEndWithShift:function(e,t,i){i<=e?(t===e?this._selectionDirection="left":"right"===this._selectionDirection&&(this._selectionDirection="left",this.selectionEnd=e),this.selectionStart=i):i>e&&i<t?"right"===this._selectionDirection?this.selectionEnd=i:this.selectionStart=i:(t===e?this._selectionDirection="right":"left"===this._selectionDirection&&(this._selectionDirection="right",this.selectionStart=t),this.selectionEnd=i)},setSelectionInBoundaries:function(){var e=this.text.length;this.selectionStart>e?this.selectionStart=e:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>e?this.selectionEnd=e:this.selectionEnd<0&&(this.selectionEnd=0)}}),f.util.object.extend(f.IText.prototype,
/** @lends fabric.IText.prototype */
{
/**
       * Initializes "dbclick" event handler
       */
initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},
/**
       * Default event handler to simulate triple click
       * @private
       */
onMouseDown:function(e){if(this.canvas){this.__newClickTime=+new Date;var t=e.pointer;this.isTripleClick(t)&&(this.fire("tripleclick",e),this._stopEvent(e.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=t,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(e){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===e.x&&this.__lastPointer.y===e.y},
/**
       * @private
       */
_stopEvent:function(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()},
/**
       * Initializes event handlers related to cursor or selection
       */
initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},
/**
       * Default handler for double click, select a word
       */
doubleClickHandler:function(e){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(e.e))},
/**
       * Default handler for triple click, select a line
       */
tripleClickHandler:function(e){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(e.e))},
/**
       * Initializes double and triple click event handlers
       */
initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},
/**
       * Default event handler for the basic functionalities needed on _mouseDown
       * can be overridden to do something different.
       * Scope of this implementation is: find the click position, set selectionStart
       * find selectionEnd, initialize the drawing of either cursor or selection area
       * initializing a mousedDown on a text area will cancel fabricjs knowledge of
       * current compositionMode. It will be set to false.
       */
_mouseDownHandler:function(e){!this.canvas||!this.editable||e.e.button&&1!==e.e.button||(this.__isMousedown=!0,this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(e.e)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},
/**
       * Default event handler for the basic functionalities needed on mousedown:before
       * can be overridden to do something different.
       * Scope of this implementation is: verify the object is already selected when mousing down
       */
_mouseDownHandlerBefore:function(e){!this.canvas||!this.editable||e.e.button&&1!==e.e.button||(this.selected=this===this.canvas._activeObject)},
/**
       * Initializes "mousedown" event handler
       */
initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},
/**
       * Initializes "mouseup" event handler
       */
initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},
/**
       * standard handler for mouse up, overridable
       * @private
       */
mouseUpHandler:function(e){if(this.__isMousedown=!1,!(!this.editable||this.group||e.transform&&e.transform.actionPerformed||e.e.button&&1!==e.e.button)){if(this.canvas){var t=this.canvas._activeObject;if(t&&t!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(e.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},
/**
       * Changes cursor location in a text depending on passed pointer (x/y) object
       * @param {Event} e Event object
       */
setCursorByClick:function(e){var t=this.getSelectionStartFromPointer(e),i=this.selectionStart,n=this.selectionEnd;e.shiftKey?this.setSelectionStartEndWithShift(i,n,t):(this.selectionStart=t,this.selectionEnd=t),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},
/**
       * Returns index of a character corresponding to where an object was clicked
       * @param {Event} e Event object
       * @return {Number} Index of a character
       */
getSelectionStartFromPointer:function(e){for(var t,i=this.getLocalPointer(e),n=0,s=0,r=0,a=0,o=0,l=0,A=this._textLines.length;l<A&&r<=i.y;l++)r+=this.getHeightOfLine(l)*this.scaleY,o=l,l>0&&(a+=this._textLines[l-1].length+this.missingNewlineOffset(l-1));s=this._getLineLeftOffset(o)*this.scaleX,t=this._textLines[o],"rtl"===this.direction&&(i.x=this.width*this.scaleX-i.x+s);for(var c=0,u=t.length;c<u&&(n=s,(s+=this.__charBounds[o][c].kernedWidth*this.scaleX)<=i.x);c++)a++;return this._getNewSelectionStartFromOffset(i,n,s,a,u)},
/**
       * @private
       */
_getNewSelectionStartFromOffset:function(e,t,i,n,s){var r=e.x-t,a=i-e.x,o=n+(a>r||a<0?0:1);return this.flipX&&(o=s-o),o>this._text.length&&(o=this._text.length),o}}),f.util.object.extend(f.IText.prototype,
/** @lends fabric.IText.prototype */
{
/**
       * Initializes hidden textarea (needed to bring up keyboard in iOS)
       */
initHiddenTextarea:function(){this.hiddenTextarea=f.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var e=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+e.top+"; left: "+e.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; paddingｰtop: "+e.fontSize+";",this.hiddenTextareaContainer?this.hiddenTextareaContainer.appendChild(this.hiddenTextarea):f.document.body.appendChild(this.hiddenTextarea),f.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),f.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),f.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),f.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),f.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),f.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),f.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),f.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),f.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(f.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},
/**
       * For functionalities on keyDown
       * Map a special key to a function of the instance/prototype
       * If you need different behaviour for ESC or TAB or arrows, you have to change
       * this map setting the name of a function that you build on the fabric.Itext or
       * your prototype.
       * the map change will affect all Instances unless you need for only some text Instances
       * in that case you have to clone this object and assign your Instance.
       * this.keysMap = fabric.util.object.clone(this.keysMap);
       * The function must be in fabric.Itext.prototype.myFunction And will receive event as args[0]
       */
keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},keysMapRtl:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorLeft",36:"moveCursorRight",37:"moveCursorRight",38:"moveCursorUp",39:"moveCursorLeft",40:"moveCursorDown"},
/**
       * For functionalities on keyUp + ctrl || cmd
       */
ctrlKeysMapUp:{67:"copy",88:"cut"},
/**
       * For functionalities on keyDown + ctrl || cmd
       */
ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},
/**
       * Handles keydown event
       * only used for arrows and combination of modifier keys.
       * @param {Event} e Event object
       */
onKeyDown:function(e){if(this.isEditing){var t="rtl"===this.direction?this.keysMapRtl:this.keysMap;if(e.keyCode in t)this[t[e.keyCode]](e);else{if(!(e.keyCode in this.ctrlKeysMapDown)||!e.ctrlKey&&!e.metaKey)return;this[this.ctrlKeysMapDown[e.keyCode]](e)}e.stopImmediatePropagation(),e.preventDefault(),e.keyCode>=33&&e.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},
/**
       * Handles keyup event
       * We handle KeyUp because ie11 and edge have difficulties copy/pasting
       * if a copy/cut event fired, keyup is dismissed
       * @param {Event} e Event object
       */
onKeyUp:function(e){!this.isEditing||this._copyDone||this.inCompositionMode?this._copyDone=!1:e.keyCode in this.ctrlKeysMapUp&&(e.ctrlKey||e.metaKey)&&(this[this.ctrlKeysMapUp[e.keyCode]](e),e.stopImmediatePropagation(),e.preventDefault(),this.canvas&&this.canvas.requestRenderAll())},
/**
       * Handles onInput event
       * @param {Event} e Event object
       */
onInput:function(e){var t=this.fromPaste;if(this.fromPaste=!1,e&&e.stopPropagation(),this.isEditing){var i,n,s,r,a,o=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,l=this._text.length,A=o.length,c=A-l,u=this.selectionStart,h=this.selectionEnd,d=u!==h;if(""===this.hiddenTextarea.value)return this.styles={},this.updateFromTextArea(),this.fire("changed"),void(this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll()));var g=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),p=u>g.selectionStart;d?(i=this._text.slice(u,h),c+=h-u):A<l&&(i=p?this._text.slice(h+c,h):this._text.slice(u,u-c)),n=o.slice(g.selectionEnd-c,g.selectionEnd),i&&i.length&&(n.length&&(s=this.getSelectionStyles(u,u+1,!1),s=n.map((function(){return s[0]}))),d?(r=u,a=h):p?(r=h-i.length,a=h):(r=h,a=h+i.length),this.removeStyleFromTo(r,a)),n.length&&(t&&n.join("")===f.copiedText&&!f.disableStyleCopyPaste&&(s=f.copiedTextStyle),this.insertNewStyleBlock(n,u,s)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())}},
/**
       * Composition start
       */
onCompositionStart:function(){this.inCompositionMode=!0},
/**
       * Composition end
       */
onCompositionEnd:function(){this.inCompositionMode=!1},
// /**
//  * Composition update
//  */
onCompositionUpdate:function(e){this.compositionStart=e.target.selectionStart,this.compositionEnd=e.target.selectionEnd,this.updateTextareaPosition()},
/**
       * Copies selected text
       * @param {Event} e Event object
       */
copy:function(){this.selectionStart!==this.selectionEnd&&(f.copiedText=this.getSelectedText(),f.disableStyleCopyPaste?f.copiedTextStyle=null:f.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},
/**
       * Pastes text
       * @param {Event} e Event object
       */
paste:function(){this.fromPaste=!0},
/**
       * @private
       * @param {Event} e Event object
       * @return {Object} Clipboard data object
       */
_getClipboardData:function(e){return e&&e.clipboardData||f.window.clipboardData},
/**
       * Finds the width in pixels before the cursor on the same line
       * @private
       * @param {Number} lineIndex
       * @param {Number} charIndex
       * @return {Number} widthBeforeCursor width before cursor
       */
_getWidthBeforeCursor:function(e,t){var i,n=this._getLineLeftOffset(e);return t>0&&(n+=(i=this.__charBounds[e][t-1]).left+i.width),n},
/**
       * Gets start offset of a selection
       * @param {Event} e Event object
       * @param {Boolean} isRight
       * @return {Number}
       */
getDownCursorOffset:function(e,t){var i=this._getSelectionForOffset(e,t),n=this.get2DCursorLocation(i),s=n.lineIndex;if(s===this._textLines.length-1||e.metaKey||34===e.keyCode)return this._text.length-i;var r=n.charIndex,a=this._getWidthBeforeCursor(s,r),o=this._getIndexOnLine(s+1,a);return this._textLines[s].slice(r).length+o+1+this.missingNewlineOffset(s)},
/**
       * private
       * Helps finding if the offset should be counted from Start or End
       * @param {Event} e Event object
       * @param {Boolean} isRight
       * @return {Number}
       */
_getSelectionForOffset:function(e,t){return e.shiftKey&&this.selectionStart!==this.selectionEnd&&t?this.selectionEnd:this.selectionStart},
/**
       * @param {Event} e Event object
       * @param {Boolean} isRight
       * @return {Number}
       */
getUpCursorOffset:function(e,t){var i=this._getSelectionForOffset(e,t),n=this.get2DCursorLocation(i),s=n.lineIndex;if(0===s||e.metaKey||33===e.keyCode)return-i;var r=n.charIndex,a=this._getWidthBeforeCursor(s,r),o=this._getIndexOnLine(s-1,a),l=this._textLines[s].slice(0,r),A=this.missingNewlineOffset(s-1);return-this._textLines[s-1].length+o-l.length+(1-A)},
/**
       * for a given width it founds the matching character.
       * @private
       */
_getIndexOnLine:function(e,t){for(var i,n,s=this._textLines[e],r=this._getLineLeftOffset(e),a=0,o=0,l=s.length;o<l;o++)if((r+=i=this.__charBounds[e][o].width)>t){n=!0;var A=r-i,c=r,u=Math.abs(A-t);a=Math.abs(c-t)<u?o:o-1;break}return n||(a=s.length-1),a},
/**
       * Moves cursor down
       * @param {Event} e Event object
       */
moveCursorDown:function(e){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",e)},
/**
       * Moves cursor up
       * @param {Event} e Event object
       */
moveCursorUp:function(e){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorUpOrDown("Up",e)},
/**
       * Moves cursor up or down, fires the events
       * @param {String} direction 'Up' or 'Down'
       * @param {Event} e Event object
       */
_moveCursorUpOrDown:function(e,t){var i=this["get"+e+"CursorOffset"](t,"right"===this._selectionDirection);t.shiftKey?this.moveCursorWithShift(i):this.moveCursorWithoutShift(i),0!==i&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},
/**
       * Moves cursor with shift
       * @param {Number} offset
       */
moveCursorWithShift:function(e){var t="left"===this._selectionDirection?this.selectionStart+e:this.selectionEnd+e;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,t),0!==e},
/**
       * Moves cursor up without shift
       * @param {Number} offset
       */
moveCursorWithoutShift:function(e){return e<0?(this.selectionStart+=e,this.selectionEnd=this.selectionStart):(this.selectionEnd+=e,this.selectionStart=this.selectionEnd),0!==e},
/**
       * Moves cursor left
       * @param {Event} e Event object
       */
moveCursorLeft:function(e){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorLeftOrRight("Left",e)},
/**
       * @private
       * @return {Boolean} true if a change happened
       */
_move:function(e,t,i){var n;if(e.altKey)n=this["findWordBoundary"+i](this[t]);else{if(!e.metaKey&&35!==e.keyCode&&36!==e.keyCode)return this[t]+="Left"===i?-1:1,!0;n=this["findLineBoundary"+i](this[t])}if(void 0!==typeof n&&this[t]!==n)return this[t]=n,!0},
/**
       * @private
       */
_moveLeft:function(e,t){return this._move(e,t,"Left")},
/**
       * @private
       */
_moveRight:function(e,t){return this._move(e,t,"Right")},
/**
       * Moves cursor left without keeping selection
       * @param {Event} e
       */
moveCursorLeftWithoutShift:function(e){var t=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&0!==this.selectionStart&&(t=this._moveLeft(e,"selectionStart")),this.selectionEnd=this.selectionStart,t},
/**
       * Moves cursor left while keeping selection
       * @param {Event} e
       */
moveCursorLeftWithShift:function(e){return"right"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveLeft(e,"selectionEnd"):0!==this.selectionStart?(this._selectionDirection="left",this._moveLeft(e,"selectionStart")):void 0},
/**
       * Moves cursor right
       * @param {Event} e Event object
       */
moveCursorRight:function(e){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",e)},
/**
       * Moves cursor right or Left, fires event
       * @param {String} direction 'Left', 'Right'
       * @param {Event} e Event object
       */
_moveCursorLeftOrRight:function(e,t){var i="moveCursor"+e+"With";this._currentCursorOpacity=1,t.shiftKey?i+="Shift":i+="outShift",this[i](t)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},
/**
       * Moves cursor right while keeping selection
       * @param {Event} e
       */
moveCursorRightWithShift:function(e){return"left"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveRight(e,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection="right",this._moveRight(e,"selectionEnd")):void 0},
/**
       * Moves cursor right without keeping selection
       * @param {Event} e Event object
       */
moveCursorRightWithoutShift:function(e){var t=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(t=this._moveRight(e,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,t},
/**
       * Removes characters from start/end
       * start/end ar per grapheme position in _text array.
       *
       * @param {Number} start
       * @param {Number} end default to start + 1
       */
removeChars:function(e,t){void 0===t&&(t=e+1),this.removeStyleFromTo(e,t),this._text.splice(e,t-e),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},
/**
       * insert characters at start position, before start position.
       * start  equal 1 it means the text get inserted between actual grapheme 0 and 1
       * if style array is provided, it must be as the same length of text in graphemes
       * if end is provided and is bigger than start, old text is replaced.
       * start/end ar per grapheme position in _text array.
       *
       * @param {String} text text to insert
       * @param {Array} style array of style objects
       * @param {Number} start
       * @param {Number} end default to start + 1
       */
insertChars:function(e,t,i,n){void 0===n&&(n=i),n>i&&this.removeStyleFromTo(i,n);var s=f.util.string.graphemeSplit(e);this.insertNewStyleBlock(s,i,t),this._text=[].concat(this._text.slice(0,i),s,this._text.slice(n)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),function(){var e=f.util.toFixed,t=/  +/g;f.util.object.extend(f.Text.prototype,
/** @lends fabric.Text.prototype */
{
/**
         * Returns SVG representation of an instance
         * @param {Function} [reviver] Method for further parsing of svg representation.
         * @return {String} svg representation of an instance
         */
_toSVG:function(){var e=this._getSVGLeftTopOffsets(),t=this._getSVGTextAndBg(e.textTop,e.textLeft);return this._wrapSVGTextAndBg(t)},
/**
         * Returns svg representation of an instance
         * @param {Function} [reviver] Method for further parsing of svg representation.
         * @return {String} svg representation of an instance
         */
toSVG:function(e){return this._createBaseSVGMarkup(this._toSVG(),{reviver:e,noStyle:!0,withShadow:!0})},
/**
         * @private
         */
_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},
/**
         * @private
         */
_wrapSVGTextAndBg:function(e){var t=this.getSvgTextDecoration(this);return[e.textBgRects.join(""),'\t\t<text xml:space="preserve" ',this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",t?'text-decoration="'+t+'" ':"",'style="',this.getSvgStyles(!0),'"',this.addPaintOrder()," >",e.textSpans.join(""),"</text>\n"]},
/**
         * @private
         * @param {Number} textTopOffset Text top offset
         * @param {Number} textLeftOffset Text left offset
         * @return {Object}
         */
_getSVGTextAndBg:function(e,t){var i,n=[],s=[],r=e;this._setSVGBg(s);for(var a=0,o=this._textLines.length;a<o;a++)i=this._getLineLeftOffset(a),(this.textBackgroundColor||this.styleHas("textBackgroundColor",a))&&this._setSVGTextLineBg(s,a,t+i,r),this._setSVGTextLineText(n,a,t+i,r),r+=this.getHeightOfLine(a);return{textSpans:n,textBgRects:s}},
/**
         * @private
         */
_createTextCharSpan:function(i,n,s,r){var a=i!==i.trim()||i.match(t),o=this.getSvgSpanStyles(n,a),l=o?'style="'+o+'"':"",A=n.deltaY,c="",u=f.Object.NUM_FRACTION_DIGITS;return A&&(c=' dy="'+e(A,u)+'" '),['<tspan x="',e(s,u),'" y="',e(r,u),'" ',c,l,">",f.util.string.escapeXml(i),"</tspan>"].join("")},_setSVGTextLineText:function(e,t,i,n){var s,r,a,o,l,A=this.getHeightOfLine(t),c=-1!==this.textAlign.indexOf("justify"),u="",h=0,d=this._textLines[t];n+=A*(1-this._fontSizeFraction)/this.lineHeight;for(var g=0,p=d.length-1;g<=p;g++)l=g===p||this.charSpacing,u+=d[g],a=this.__charBounds[t][g],0===h?(i+=a.kernedWidth-a.width,h+=a.width):h+=a.kernedWidth,c&&!l&&this._reSpaceAndTab.test(d[g])&&(l=!0),l||(s=s||this.getCompleteStyleDeclaration(t,g),r=this.getCompleteStyleDeclaration(t,g+1),l=this._hasStyleChangedForSvg(s,r)),l&&(o=this._getStyleDeclaration(t,g)||{},e.push(this._createTextCharSpan(u,o,i,n)),u="",s=r,i+=h,h=0)},_pushTextBgRect:function(t,i,n,s,r,a){var o=f.Object.NUM_FRACTION_DIGITS;t.push("\t\t<rect ",this._getFillAttributes(i),' x="',e(n,o),'" y="',e(s,o),'" width="',e(r,o),'" height="',e(a,o),'"></rect>\n')},_setSVGTextLineBg:function(e,t,i,n){for(var s,r,a=this._textLines[t],o=this.getHeightOfLine(t)/this.lineHeight,l=0,A=0,c=this.getValueOfPropertyAt(t,0,"textBackgroundColor"),u=0,h=a.length;u<h;u++)s=this.__charBounds[t][u],(r=this.getValueOfPropertyAt(t,u,"textBackgroundColor"))!==c?(c&&this._pushTextBgRect(e,c,i+A,n,l,o),A=s.left,l=s.width,c=r):l+=s.kernedWidth;r&&this._pushTextBgRect(e,r,i+A,n,l,o)},
/**
         * Adobe Illustrator (at least CS5) is unable to render rgba()-based fill values
         * we work around it by "moving" alpha channel into opacity attribute and setting fill's alpha to 1
         *
         * @private
         * @param {*} value
         * @return {String}
         */
_getFillAttributes:function(e){var t=e&&"string"==typeof e?new f.Color(e):"";return t&&t.getSource()&&1!==t.getAlpha()?'opacity="'+t.getAlpha()+'" fill="'+t.setAlpha(1).toRgb()+'"':'fill="'+e+'"'},
/**
         * @private
         */
_getSVGLineTopOffset:function(e){for(var t,i=0,n=0;n<e;n++)i+=this.getHeightOfLine(n);return t=this.getHeightOfLine(n),{lineTop:i,offset:(this._fontSizeMult-this._fontSizeFraction)*t/(this.lineHeight*this._fontSizeMult)}},
/**
         * Returns styles-string for svg-export
         * @param {Boolean} skipShadow a boolean to skip shadow filter output
         * @return {String}
         */
getSvgStyles:function(e){return f.Object.prototype.getSvgStyles.call(this,e)+" white-space: pre;"}})}(),function(e){var t=e.fabric||(e.fabric={});t.Textbox=t.util.createClass(t.IText,t.Observable,{
/**
       * Type of an object
       * @type String
       * @default
       */
type:"textbox",
/**
       * Minimum width of textbox, in pixels.
       * @type Number
       * @default
       */
minWidth:20,
/**
       * Minimum calculated width of a textbox, in pixels.
       * fixed to 2 so that an empty textbox cannot go to 0
       * and is still selectable without text.
       * @type Number
       * @default
       */
dynamicMinWidth:2,
/**
       * Cached array of text wrapping.
       * @type Array
       */
__cachedLines:null,
/**
       * Override standard Object class values
       */
lockScalingFlip:!0,
/**
       * Override standard Object class values
       * Textbox needs this on false
       */
noScaleCache:!1,
/**
       * Properties which when set cause object to change dimensions
       * @type Object
       * @private
       */
_dimensionAffectingProps:t.Text.prototype._dimensionAffectingProps.concat("width"),
/**
       * Use this regular expression to split strings in breakable lines
       * @private
       */
_wordJoiners:/[ \t\r]/,
/**
       * Use this boolean property in order to split strings that have no white space concept.
       * this is a cheap way to help with chinese/japanese
       * @type Boolean
       * @since 2.6.0
       */
splitByGrapheme:!1,
/**
       * Unlike superclass's version of this function, Textbox does not update
       * its width.
       * @private
       * @override
       */
initDimensions:function(){this.__skipDimension||(this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},
/**
       * Generate an object that translates the style object so that it is
       * broken up by visual lines (new lines and automatic wrapping).
       * The original text styles object is broken up by actual lines (new lines only),
       * which is only sufficient for Text / IText
       * @private
       */
_generateStyleMap:function(e){for(var t=0,i=0,n=0,s={},r=0;r<e.graphemeLines.length;r++)"\n"===e.graphemeText[n]&&r>0?(i=0,n++,t++):!this.splitByGrapheme&&this._reSpaceAndTab.test(e.graphemeText[n])&&r>0&&(i++,n++),s[r]={line:t,offset:i},n+=e.graphemeLines[r].length,i+=e.graphemeLines[r].length;return s},
/**
       * Returns true if object has a style property or has it on a specified line
       * @param {Number} lineIndex
       * @return {Boolean}
       */
styleHas:function(e,i){if(this._styleMap&&!this.isWrapping){var n=this._styleMap[i];n&&(i=n.line)}return t.Text.prototype.styleHas.call(this,e,i)},
/**
       * Returns true if object has no styling or no styling in a line
       * @param {Number} lineIndex , lineIndex is on wrapped lines.
       * @return {Boolean}
       */
isEmptyStyles:function(e){if(!this.styles)return!0;var t,i,n=0,s=!1,r=this._styleMap[e],a=this._styleMap[e+1];for(var o in r&&(e=r.line,n=r.offset),a&&(s=a.line===e,t=a.offset),i=void 0===e?this.styles:{line:this.styles[e]})for(var l in i[o])if(l>=n&&(!s||l<t))for(var A in i[o][l])return!1;return!0},
/**
       * @param {Number} lineIndex
       * @param {Number} charIndex
       * @private
       */
_getStyleDeclaration:function(e,t){if(this._styleMap&&!this.isWrapping){var i=this._styleMap[e];if(!i)return null;e=i.line,t=i.offset+t}return this.callSuper("_getStyleDeclaration",e,t)},
/**
       * @param {Number} lineIndex
       * @param {Number} charIndex
       * @param {Object} style
       * @private
       */
_setStyleDeclaration:function(e,t,i){var n=this._styleMap[e];e=n.line,t=n.offset+t,this.styles[e][t]=i},
/**
       * @param {Number} lineIndex
       * @param {Number} charIndex
       * @private
       */
_deleteStyleDeclaration:function(e,t){var i=this._styleMap[e];e=i.line,t=i.offset+t,delete this.styles[e][t]},
/**
       * probably broken need a fix
       * Returns the real style line that correspond to the wrapped lineIndex line
       * Used just to verify if the line does exist or not.
       * @param {Number} lineIndex
       * @returns {Boolean} if the line exists or not
       * @private
       */
_getLineStyle:function(e){var t=this._styleMap[e];return!!this.styles[t.line]},
/**
       * Set the line style to an empty object so that is initialized
       * @param {Number} lineIndex
       * @param {Object} style
       * @private
       */
_setLineStyle:function(e){var t=this._styleMap[e];this.styles[t.line]={}},
/**
       * Wraps text using the 'width' property of Textbox. First this function
       * splits text on newlines, so we preserve newlines entered by the user.
       * Then it wraps each line using the width of the Textbox by calling
       * _wrapLine().
       * @param {Array} lines The string array of text that is split into lines
       * @param {Number} desiredWidth width you want to wrap to
       * @returns {Array} Array of lines
       */
_wrapText:function(e,t){var i,n=[];for(this.isWrapping=!0,i=0;i<e.length;i++)n=n.concat(this._wrapLine(e[i],i,t));return this.isWrapping=!1,n},
/**
       * Helper function to measure a string of text, given its lineIndex and charIndex offset
       * it gets called when charBounds are not available yet.
       * @param {CanvasRenderingContext2D} ctx
       * @param {String} text
       * @param {number} lineIndex
       * @param {number} charOffset
       * @returns {number}
       * @private
       */
_measureWord:function(e,t,i){var n,s=0;i=i||0;for(var r=0,a=e.length;r<a;r++){s+=this._getGraphemeBox(e[r],t,r+i,n,true).kernedWidth,n=e[r]}return s},
/**
       * Wraps a line of text using the width of the Textbox and a context.
       * @param {Array} line The grapheme array that represent the line
       * @param {Number} lineIndex
       * @param {Number} desiredWidth width you want to wrap the line to
       * @param {Number} reservedSpace space to remove from wrapping for custom functionalities
       * @returns {Array} Array of line(s) into which the given text is wrapped
       * to.
       */
_wrapLine:function(e,i,n,s){var r=0,a=this.splitByGrapheme,o=[],l=[],A=a?t.util.string.graphemeSplit(e):e.split(this._wordJoiners),c="",u=0,h=a?"":" ",d=0,g=0,p=0,f=!0,m=this._getWidthOfCharSpacing();s=s||0;0===A.length&&A.push([]),n-=s;for(var C=0;C<A.length;C++)c=a?A[C]:t.util.string.graphemeSplit(A[C]),d=this._measureWord(c,i,u),u+=c.length,(r+=g+d-m)>n&&!f?(o.push(l),l=[],r=d,f=!0):r+=m,f||a||l.push(h),l=l.concat(c),g=a?0:this._measureWord([h],i,u),u++,f=!1,d>p&&(p=d);return C&&o.push(l),p+s>this.dynamicMinWidth&&(this.dynamicMinWidth=p-m+s),o},
/**
       * Detect if the text line is ended with an hard break
       * text and itext do not have wrapping, return false
       * @param {Number} lineIndex text to split
       * @return {Boolean}
       */
isEndOfWrapping:function(e){return!this._styleMap[e+1]||this._styleMap[e+1].line!==this._styleMap[e].line},
/**
       * Detect if a line has a linebreak and so we need to account for it when moving
       * and counting style.
       * @return Number
       */
missingNewlineOffset:function(e){return this.splitByGrapheme?this.isEndOfWrapping(e)?1:0:1},
/**
      * Gets lines of text to render in the Textbox. This function calculates
      * text wrapping on the fly every time it is called.
      * @param {String} text text to split
      * @returns {Array} Array of lines in the Textbox.
      * @override
      */
_splitTextIntoLines:function(e){for(var i=t.Text.prototype._splitTextIntoLines.call(this,e),n=this._wrapText(i.lines,this.width),s=new Array(n.length),r=0;r<n.length;r++)s[r]=n[r].join("");return i.lines=s,i.graphemeLines=n,i},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var e={};for(var t in this._styleMap)this._textLines[t]&&(e[this._styleMap[t].line]=1);for(var t in this.styles)e[t]||delete this.styles[t]},
/**
       * Returns object representation of an instance
       * @method toObject
       * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
       * @return {Object} object representation of an instance
       */
toObject:function(e){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(e))}}),t.Textbox.fromObject=function(e,i){return t.Object._fromObject("Textbox",e,i,"text")}}(e),function(){var e=f.controlsUtils,t=e.scaleSkewCursorStyleHandler,i=e.scaleCursorStyleHandler,n=e.scalingEqually,s=e.scalingYOrSkewingX,r=e.scalingXOrSkewingY,a=e.scaleOrSkewActionName,o=f.Object.prototype.controls;if(o.ml=new f.Control({x:-.5,y:0,cursorStyleHandler:t,actionHandler:r,getActionName:a}),o.mr=new f.Control({x:.5,y:0,cursorStyleHandler:t,actionHandler:r,getActionName:a}),o.mb=new f.Control({x:0,y:.5,cursorStyleHandler:t,actionHandler:s,getActionName:a}),o.mt=new f.Control({x:0,y:-.5,cursorStyleHandler:t,actionHandler:s,getActionName:a}),o.tl=new f.Control({x:-.5,y:-.5,cursorStyleHandler:i,actionHandler:n}),o.tr=new f.Control({x:.5,y:-.5,cursorStyleHandler:i,actionHandler:n}),o.bl=new f.Control({x:-.5,y:.5,cursorStyleHandler:i,actionHandler:n}),o.br=new f.Control({x:.5,y:.5,cursorStyleHandler:i,actionHandler:n}),o.mtr=new f.Control({x:0,y:-.5,actionHandler:e.rotationWithSnapping,cursorStyleHandler:e.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),f.Textbox){var l=f.Textbox.prototype.controls={};l.mtr=o.mtr,l.tr=o.tr,l.br=o.br,l.tl=o.tl,l.bl=o.bl,l.mt=o.mt,l.mb=o.mb,l.mr=new f.Control({x:.5,y:0,actionHandler:e.changeWidth,cursorStyleHandler:t,actionName:"resizing"}),l.ml=new f.Control({x:-.5,y:0,actionHandler:e.changeWidth,cursorStyleHandler:t,actionName:"resizing"})}}()}(NF);const LF=Symbol("INSTALLED_KEY"),UF=Symbol(),HF="el",PF=(e,t,i,n,s)=>{let r=`${e}-${t}`;return i&&(r+=`-${i}`),n&&(r+=`__${n}`),s&&(r+=`--${s}`),r},OF=Symbol("namespaceContextKey"),GF=e=>{const t=e||(kf()?pp(OF,zh(HF)):zh(HF));return qf((()=>ed(t)||HF))},KF=(e,t)=>{const i=GF(t);return{namespace:i,b:(t="")=>PF(i.value,e,t,"",""),e:t=>t?PF(i.value,e,"",t,""):"",m:t=>t?PF(i.value,e,"","",t):"",be:(t,n)=>t&&n?PF(i.value,e,t,n,""):"",em:(t,n)=>t&&n?PF(i.value,e,"",t,n):"",bm:(t,n)=>t&&n?PF(i.value,e,t,"",n):"",bem:(t,n,s)=>t&&n&&s?PF(i.value,e,t,n,s):"",is:(e,...t)=>{const i=!(t.length>=1)||t[0];return e&&i?`is-${e}`:""},cssVar:e=>{const t={};for(const n in e)e[n]&&(t[`--${i.value}-${n}`]=e[n]);return t},cssVarName:e=>`--${i.value}-${e}`,cssVarBlock:t=>{const n={};for(const s in t)t[s]&&(n[`--${i.value}-${e}-${s}`]=t[s]);return n},cssVarBlockName:t=>`--${i.value}-${e}-${t}`}};var qF="object"==typeof global&&global&&global.Object===Object&&global,YF="object"==typeof self&&self&&self.Object===Object&&self,VF=qF||YF||Function("return this")(),WF=VF.Symbol,jF=Object.prototype,JF=jF.hasOwnProperty,zF=jF.toString,XF=WF?WF.toStringTag:void 0;var $F=Object.prototype.toString;var ZF=WF?WF.toStringTag:void 0;function eT(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ZF&&ZF in Object(e)?function(e){var t=JF.call(e,XF),i=e[XF];try{e[XF]=void 0;var n=!0}catch(I2){}var s=zF.call(e);return n&&(t?e[XF]=i:delete e[XF]),s}(e):function(e){return $F.call(e)}(e)}function tT(e){return null!=e&&"object"==typeof e}function iT(e){return"symbol"==typeof e||tT(e)&&"[object Symbol]"==eT(e)}function nT(e,t){for(var i=-1,n=null==e?0:e.length,s=Array(n);++i<n;)s[i]=t(e[i],i,e);return s}var sT=Array.isArray,rT=WF?WF.prototype:void 0,aT=rT?rT.toString:void 0;function oT(e){if("string"==typeof e)return e;if(sT(e))return nT(e,oT)+"";if(iT(e))return aT?aT.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var lT=/\s/;var AT=/^\s+/;function cT(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&lT.test(e.charAt(t)););return t}(e)+1).replace(AT,""):e}function uT(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var hT=/^[-+]0x[0-9a-f]+$/i,dT=/^0b[01]+$/i,gT=/^0o[0-7]+$/i,pT=parseInt;function fT(e){if("number"==typeof e)return e;if(iT(e))return NaN;if(uT(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=uT(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=cT(e);var i=dT.test(e);return i||gT.test(e)?pT(e.slice(2),i?2:8):hT.test(e)?NaN:+e}function mT(e){return e}function CT(e){if(!uT(e))return!1;var t=eT(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var IT,vT=VF["__core-js_shared__"],BT=(IT=/[^.]+$/.exec(vT&&vT.keys&&vT.keys.IE_PROTO||""))?"Symbol(src)_1."+IT:"";var yT=Function.prototype.toString;function bT(e){if(null!=e){try{return yT.call(e)}catch(I2){}try{return e+""}catch(I2){}}return""}var ET=/^\[object .+?Constructor\]$/,wT=Function.prototype,QT=Object.prototype,_T=wT.toString,ST=QT.hasOwnProperty,xT=RegExp("^"+_T.call(ST).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kT(e){return!(!uT(e)||(t=e,BT&&BT in t))&&(CT(e)?xT:ET).test(bT(e));var t}function DT(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return kT(i)?i:void 0}var FT=DT(VF,"WeakMap"),TT=Object.create,MT=function(){function e(){}return function(t){if(!uT(t))return{};if(TT)return TT(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}();function RT(e,t){var i=-1,n=e.length;for(t||(t=Array(n));++i<n;)t[i]=e[i];return t}var NT=Date.now;var LT,UT,HT,PT=function(){try{var e=DT(Object,"defineProperty");return e({},"",{}),e}catch(I2){}}(),OT=PT?function(e,t){return PT(e,"toString",{configurable:!0,enumerable:!1,value:(i=t,function(){return i}),writable:!0});var i}:mT,GT=(LT=OT,UT=0,HT=0,function(){var e=NT(),t=16-(e-HT);if(HT=e,t>0){if(++UT>=800)return arguments[0]}else UT=0;return LT.apply(void 0,arguments)});function KT(e,t,i,n){for(var s=e.length,r=i+(n?1:-1);n?r--:++r<s;)if(t(e[r],r,e))return r;return-1}function qT(e){return e!=e}function YT(e,t){return!!(null==e?0:e.length)&&function(e,t,i){return t==t?function(e,t,i){for(var n=i-1,s=e.length;++n<s;)if(e[n]===t)return n;return-1}(e,t,i):KT(e,qT,i)}(e,t,0)>-1}var VT=/^(?:0|[1-9]\d*)$/;function WT(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&VT.test(e))&&e>-1&&e%1==0&&e<t}function jT(e,t,i){"__proto__"==t&&PT?PT(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function JT(e,t){return e===t||e!=e&&t!=t}var zT=Object.prototype.hasOwnProperty;function XT(e,t,i){var n=e[t];zT.call(e,t)&&JT(n,i)&&(void 0!==i||t in e)||jT(e,t,i)}function $T(e,t,i,n){var s=!i;i||(i={});for(var r=-1,a=t.length;++r<a;){var o=t[r],l=void 0;void 0===l&&(l=e[o]),s?jT(i,o,l):XT(i,o,l)}return i}var ZT=Math.max;function eM(e,t,i){return t=ZT(void 0===t?e.length-1:t,0),function(){for(var n=arguments,s=-1,r=ZT(n.length-t,0),a=Array(r);++s<r;)a[s]=n[t+s];s=-1;for(var o=Array(t+1);++s<t;)o[s]=n[s];return o[t]=i(a),function(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}(e,this,o)}}function tM(e,t){return GT(eM(e,t,mT),e+"")}function iM(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function nM(e){return null!=e&&iM(e.length)&&!CT(e)}var sM=Object.prototype;function rM(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||sM)}function aM(e){return tT(e)&&"[object Arguments]"==eT(e)}var oM=Object.prototype,lM=oM.hasOwnProperty,AM=oM.propertyIsEnumerable,cM=aM(function(){return arguments}())?aM:function(e){return tT(e)&&lM.call(e,"callee")&&!AM.call(e,"callee")};var uM="object"==typeof exports&&exports&&!exports.nodeType&&exports,hM=uM&&"object"==typeof module&&module&&!module.nodeType&&module,dM=hM&&hM.exports===uM?VF.Buffer:void 0,gM=(dM?dM.isBuffer:void 0)||function(){return!1},pM={};function fM(e){return function(t){return e(t)}}pM["[object Float32Array]"]=pM["[object Float64Array]"]=pM["[object Int8Array]"]=pM["[object Int16Array]"]=pM["[object Int32Array]"]=pM["[object Uint8Array]"]=pM["[object Uint8ClampedArray]"]=pM["[object Uint16Array]"]=pM["[object Uint32Array]"]=!0,pM["[object Arguments]"]=pM["[object Array]"]=pM["[object ArrayBuffer]"]=pM["[object Boolean]"]=pM["[object DataView]"]=pM["[object Date]"]=pM["[object Error]"]=pM["[object Function]"]=pM["[object Map]"]=pM["[object Number]"]=pM["[object Object]"]=pM["[object RegExp]"]=pM["[object Set]"]=pM["[object String]"]=pM["[object WeakMap]"]=!1;var mM="object"==typeof exports&&exports&&!exports.nodeType&&exports,CM=mM&&"object"==typeof module&&module&&!module.nodeType&&module,IM=CM&&CM.exports===mM&&qF.process,vM=function(){try{var e=CM&&CM.require&&CM.require("util").types;return e||IM&&IM.binding&&IM.binding("util")}catch(I2){}}(),BM=vM&&vM.isTypedArray,yM=BM?fM(BM):function(e){return tT(e)&&iM(e.length)&&!!pM[eT(e)]},bM=Object.prototype.hasOwnProperty;function EM(e,t){var i=sT(e),n=!i&&cM(e),s=!i&&!n&&gM(e),r=!i&&!n&&!s&&yM(e),a=i||n||s||r,o=a?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],l=o.length;for(var A in e)!t&&!bM.call(e,A)||a&&(// Safari 9 has enumerable `arguments.length` in strict mode.
"length"==A||// Node.js 0.10 has enumerable non-index properties on buffers.
s&&("offset"==A||"parent"==A)||// PhantomJS 2 has enumerable non-index properties on typed arrays.
r&&("buffer"==A||"byteLength"==A||"byteOffset"==A)||// Skip index properties.
WT(A,l))||o.push(A);return o}function wM(e,t){return function(i){return e(t(i))}}var QM=wM(Object.keys,Object),_M=Object.prototype.hasOwnProperty;function SM(e){return nM(e)?EM(e):function(e){if(!rM(e))return QM(e);var t=[];for(var i in Object(e))_M.call(e,i)&&"constructor"!=i&&t.push(i);return t}(e)}var xM=Object.prototype.hasOwnProperty;function kM(e){if(!uT(e))return function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}(e);var t=rM(e),i=[];for(var n in e)("constructor"!=n||!t&&xM.call(e,n))&&i.push(n);return i}function DM(e){return nM(e)?EM(e,!0):kM(e)}var FM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,TM=/^\w*$/;function MM(e,t){if(sT(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!iT(e))||(TM.test(e)||!FM.test(e)||null!=t&&e in Object(t))}var RM=DT(Object,"create");var NM=Object.prototype.hasOwnProperty;var LM=Object.prototype.hasOwnProperty;function UM(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function HM(e,t){for(var i=e.length;i--;)if(JT(e[i][0],t))return i;return-1}UM.prototype.clear=function(){this.__data__=RM?RM(null):{},this.size=0},UM.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},UM.prototype.get=function(e){var t=this.__data__;if(RM){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return NM.call(t,e)?t[e]:void 0},UM.prototype.has=function(e){var t=this.__data__;return RM?void 0!==t[e]:LM.call(t,e)},UM.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=RM&&void 0===t?"__lodash_hash_undefined__":t,this};var PM=Array.prototype.splice;function OM(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}OM.prototype.clear=function(){this.__data__=[],this.size=0},OM.prototype.delete=function(e){var t=this.__data__,i=HM(t,e);return!(i<0)&&(i==t.length-1?t.pop():PM.call(t,i,1),--this.size,!0)},OM.prototype.get=function(e){var t=this.__data__,i=HM(t,e);return i<0?void 0:t[i][1]},OM.prototype.has=function(e){return HM(this.__data__,e)>-1},OM.prototype.set=function(e,t){var i=this.__data__,n=HM(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};var GM=DT(VF,"Map");function KM(e,t){var i,n,s=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?s["string"==typeof t?"string":"hash"]:s.map}function qM(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}qM.prototype.clear=function(){this.size=0,this.__data__={hash:new UM,map:new(GM||OM),string:new UM}},qM.prototype.delete=function(e){var t=KM(this,e).delete(e);return this.size-=t?1:0,t},qM.prototype.get=function(e){return KM(this,e).get(e)},qM.prototype.has=function(e){return KM(this,e).has(e)},qM.prototype.set=function(e,t){var i=KM(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function YM(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,s=t?t.apply(this,n):n[0],r=i.cache;if(r.has(s))return r.get(s);var a=e.apply(this,n);return i.cache=r.set(s,a)||r,a};return i.cache=new(YM.Cache||qM),i}YM.Cache=qM;var VM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,WM=/\\(\\)?/g,jM=function(e){var t=YM(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(VM,(function(e,i,n,s){t.push(n?s.replace(WM,"$1"):i||e)})),t}));function JM(e,t){return sT(e)?e:MM(e,t)?[e]:jM(function(e){return null==e?"":oT(e)}(e))}function zM(e){if("string"==typeof e||iT(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function XM(e,t){for(var i=0,n=(t=JM(t,e)).length;null!=e&&i<n;)e=e[zM(t[i++])];return i&&i==n?e:void 0}function $M(e,t,i){var n=null==e?void 0:XM(e,t);return void 0===n?i:n}function ZM(e,t){for(var i=-1,n=t.length,s=e.length;++i<n;)e[s+i]=t[i];return e}var eR=WF?WF.isConcatSpreadable:void 0;function tR(e){return sT(e)||cM(e)||!!(eR&&e&&e[eR])}function iR(e,t,i,n,s){var r=-1,a=e.length;for(i||(i=tR),s||(s=[]);++r<a;){var o=e[r];t>0&&i(o)?t>1?iR(o,t-1,i,n,s):ZM(s,o):n||(s[s.length]=o)}return s}function nR(e){return(null==e?0:e.length)?iR(e,1):[]}function sR(e){return GT(eM(e,void 0,nR),e+"")}var rR=wM(Object.getPrototypeOf,Object),aR=Function.prototype,oR=Object.prototype,lR=aR.toString,AR=oR.hasOwnProperty,cR=lR.call(Object);function uR(e){if(!tT(e)||"[object Object]"!=eT(e))return!1;var t=rR(e);if(null===t)return!0;var i=AR.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&lR.call(i)==cR}function hR(){if(!arguments.length)return[];var e=arguments[0];return sT(e)?e:[e]}function dR(e){var t=this.__data__=new OM(e);this.size=t.size}dR.prototype.clear=function(){this.__data__=new OM,this.size=0},dR.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},dR.prototype.get=function(e){return this.__data__.get(e)},dR.prototype.has=function(e){return this.__data__.has(e)},dR.prototype.set=function(e,t){var i=this.__data__;if(i instanceof OM){var n=i.__data__;if(!GM||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new qM(n)}return i.set(e,t),this.size=i.size,this};var gR="object"==typeof exports&&exports&&!exports.nodeType&&exports,pR=gR&&"object"==typeof module&&module&&!module.nodeType&&module,fR=pR&&pR.exports===gR?VF.Buffer:void 0,mR=fR?fR.allocUnsafe:void 0;function CR(e,t){if(t)return e.slice();var i=e.length,n=mR?mR(i):new e.constructor(i);return e.copy(n),n}function IR(){return[]}var vR=Object.prototype.propertyIsEnumerable,BR=Object.getOwnPropertySymbols,yR=BR?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,s=0,r=[];++i<n;){var a=e[i];t(a,i,e)&&(r[s++]=a)}return r}(BR(e),(function(t){return vR.call(e,t)})))}:IR;var bR=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)ZM(t,yR(e)),e=rR(e);return t}:IR;function ER(e,t,i){var n=t(e);return sT(e)?n:ZM(n,i(e))}function wR(e){return ER(e,SM,yR)}function QR(e){return ER(e,DM,bR)}var _R=DT(VF,"DataView"),SR=DT(VF,"Promise"),xR=DT(VF,"Set"),kR="[object Map]",DR="[object Promise]",FR="[object Set]",TR="[object WeakMap]",MR="[object DataView]",RR=bT(_R),NR=bT(GM),LR=bT(SR),UR=bT(xR),HR=bT(FT),PR=eT;(_R&&PR(new _R(new ArrayBuffer(1)))!=MR||GM&&PR(new GM)!=kR||SR&&PR(SR.resolve())!=DR||xR&&PR(new xR)!=FR||FT&&PR(new FT)!=TR)&&(PR=function(e){var t=eT(e),i="[object Object]"==t?e.constructor:void 0,n=i?bT(i):"";if(n)switch(n){case RR:return MR;case NR:return kR;case LR:return DR;case UR:return FR;case HR:return TR}return t});var OR=Object.prototype.hasOwnProperty;var GR=VF.Uint8Array;function KR(e){var t=new e.constructor(e.byteLength);return new GR(t).set(new GR(e)),t}var qR=/\w*$/;var YR=WF?WF.prototype:void 0,VR=YR?YR.valueOf:void 0;function WR(e,t){var i=t?KR(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function jR(e,t,i){var n,s,r,a=e.constructor;switch(t){case"[object ArrayBuffer]":return KR(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var i=t?KR(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return WR(e,i);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(r=new(s=e).constructor(s.source,qR.exec(s))).lastIndex=s.lastIndex,r;case"[object Symbol]":return n=e,VR?Object(VR.call(n)):{}}}function JR(e){return"function"!=typeof e.constructor||rM(e)?{}:MT(rR(e))}var zR=vM&&vM.isMap,XR=zR?fM(zR):function(e){return tT(e)&&"[object Map]"==PR(e)};var $R=vM&&vM.isSet,ZR=$R?fM($R):function(e){return tT(e)&&"[object Set]"==PR(e)},eN="[object Arguments]",tN="[object Function]",iN="[object Object]",nN={};function sN(e,t,i,n,s,r){var a,o=1&t,l=2&t,A=4&t;if(i&&(a=s?i(e,n,s,r):i(e)),void 0!==a)return a;if(!uT(e))return e;var c=sT(e);if(c){if(a=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&OR.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!o)return RT(e,a)}else{var u=PR(e),h=u==tN||"[object GeneratorFunction]"==u;if(gM(e))return CR(e,o);if(u==iN||u==eN||h&&!s){if(a=l||h?{}:JR(e),!o)return l?function(e,t){return $T(e,bR(e),t)}(e,function(e,t){return e&&$T(t,DM(t),e)}(a,e)):function(e,t){return $T(e,yR(e),t)}(e,function(e,t){return e&&$T(t,SM(t),e)}(a,e))}else{if(!nN[u])return s?e:{};a=jR(e,u,o)}}r||(r=new dR);var d=r.get(e);if(d)return d;r.set(e,a),ZR(e)?e.forEach((function(n){a.add(sN(n,t,i,n,e,r))})):XR(e)&&e.forEach((function(n,s){a.set(s,sN(n,t,i,s,e,r))}));var g=c?void 0:(A?l?QR:wR:l?DM:SM)(e);return function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););}(g||e,(function(n,s){g&&(n=e[s=n]),XT(a,s,sN(n,t,i,s,e,r))})),a}nN[eN]=nN["[object Array]"]=nN["[object ArrayBuffer]"]=nN["[object DataView]"]=nN["[object Boolean]"]=nN["[object Date]"]=nN["[object Float32Array]"]=nN["[object Float64Array]"]=nN["[object Int8Array]"]=nN["[object Int16Array]"]=nN["[object Int32Array]"]=nN["[object Map]"]=nN["[object Number]"]=nN[iN]=nN["[object RegExp]"]=nN["[object Set]"]=nN["[object String]"]=nN["[object Symbol]"]=nN["[object Uint8Array]"]=nN["[object Uint8ClampedArray]"]=nN["[object Uint16Array]"]=nN["[object Uint32Array]"]=!0,nN["[object Error]"]=nN[tN]=nN["[object WeakMap]"]=!1;function rN(e){return sN(e,4)}function aN(e){return sN(e,5)}function oN(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new qM;++t<i;)this.add(e[t])}function lN(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}function AN(e,t){return e.has(t)}oN.prototype.add=oN.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},oN.prototype.has=function(e){return this.__data__.has(e)};function cN(e,t,i,n,s,r){var a=1&i,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var A=r.get(e),c=r.get(t);if(A&&c)return A==t&&c==e;var u=-1,h=!0,d=2&i?new oN:void 0;for(r.set(e,t),r.set(t,e);++u<o;){var g=e[u],p=t[u];if(n)var f=a?n(p,g,u,t,e,r):n(g,p,u,e,t,r);if(void 0!==f){if(f)continue;h=!1;break}if(d){if(!lN(t,(function(e,t){if(!AN(d,t)&&(g===e||s(g,e,i,n,r)))return d.push(t)}))){h=!1;break}}else if(g!==p&&!s(g,p,i,n,r)){h=!1;break}}return r.delete(e),r.delete(t),h}function uN(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i}function hN(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}var dN=WF?WF.prototype:void 0,gN=dN?dN.valueOf:void 0;var pN=Object.prototype.hasOwnProperty;var fN="[object Arguments]",mN="[object Array]",CN="[object Object]",IN=Object.prototype.hasOwnProperty;function vN(e,t,i,n,s,r){var a=sT(e),o=sT(t),l=a?mN:PR(e),A=o?mN:PR(t),c=(l=l==fN?CN:l)==CN,u=(A=A==fN?CN:A)==CN,h=l==A;if(h&&gM(e)){if(!gM(t))return!1;a=!0,c=!1}if(h&&!c)return r||(r=new dR),a||yM(e)?cN(e,t,i,n,s,r):function(e,t,i,n,s,r,a){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new GR(e),new GR(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return JT(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=uN;case"[object Set]":var l=1&n;if(o||(o=hN),e.size!=t.size&&!l)return!1;var A=a.get(e);if(A)return A==t;n|=2,a.set(e,t);var c=cN(o(e),o(t),n,s,r,a);return a.delete(e),c;case"[object Symbol]":if(gN)return gN.call(e)==gN.call(t)}return!1}(e,t,l,i,n,s,r);if(!(1&i)){var d=c&&IN.call(e,"__wrapped__"),g=u&&IN.call(t,"__wrapped__");if(d||g){var p=d?e.value():e,f=g?t.value():t;return r||(r=new dR),s(p,f,i,n,r)}}return!!h&&(r||(r=new dR),function(e,t,i,n,s,r){var a=1&i,o=wR(e),l=o.length;if(l!=wR(t).length&&!a)return!1;for(var A=l;A--;){var c=o[A];if(!(a?c in t:pN.call(t,c)))return!1}var u=r.get(e),h=r.get(t);if(u&&h)return u==t&&h==e;var d=!0;r.set(e,t),r.set(t,e);for(var g=a;++A<l;){var p=e[c=o[A]],f=t[c];if(n)var m=a?n(f,p,c,t,e,r):n(p,f,c,e,t,r);if(!(void 0===m?p===f||s(p,f,i,n,r):m)){d=!1;break}g||(g="constructor"==c)}if(d&&!g){var C=e.constructor,I=t.constructor;C==I||!("constructor"in e)||!("constructor"in t)||"function"==typeof C&&C instanceof C&&"function"==typeof I&&I instanceof I||(d=!1)}return r.delete(e),r.delete(t),d}(e,t,i,n,s,r))}function BN(e,t,i,n,s){return e===t||(null==e||null==t||!tT(e)&&!tT(t)?e!=e&&t!=t:vN(e,t,i,n,BN,s))}function yN(e){return e==e&&!uT(e)}function bN(e,t){return function(i){return null!=i&&(i[e]===t&&(void 0!==t||e in Object(i)))}}function EN(e){var t=function(e){for(var t=SM(e),i=t.length;i--;){var n=t[i],s=e[n];t[i]=[n,s,yN(s)]}return t}(e);return 1==t.length&&t[0][2]?bN(t[0][0],t[0][1]):function(i){return i===e||function(e,t,i,n){var s=i.length,r=s;if(null==e)return!r;for(e=Object(e);s--;){var a=i[s];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++s<r;){var o=(a=i[s])[0],l=e[o],A=a[1];if(a[2]){if(void 0===l&&!(o in e))return!1}else if(!BN(A,l,3,n,new dR))return!1}return!0}(i,0,t)}}function wN(e,t){return null!=e&&t in Object(e)}function QN(e,t){return null!=e&&function(e,t,i){for(var n=-1,s=(t=JM(t,e)).length,r=!1;++n<s;){var a=zM(t[n]);if(!(r=null!=e&&i(e,a)))break;e=e[a]}return r||++n!=s?r:!!(s=null==e?0:e.length)&&iM(s)&&WT(a,s)&&(sT(e)||cM(e))}(e,t,wN)}function _N(e){return MM(e)?(t=zM(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return XM(t,e)}}(e);var t}function SN(e){return"function"==typeof e?e:null==e?mT:"object"==typeof e?sT(e)?(t=e[0],i=e[1],MM(t)&&yN(i)?bN(zM(t),i):function(e){var n=$M(e,t);return void 0===n&&n===i?QN(e,t):BN(i,n,3)}):EN(e):_N(e);var t,i}var xN=function(e,t,i){for(var n=-1,s=Object(e),r=i(e),a=r.length;a--;){var o=r[++n];if(!1===t(s[o],o,s))break}return e};var kN,DN=(kN=function(e,t){return e&&xN(e,t,SM)},function(e,t){if(null==e)return e;if(!nM(e))return kN(e,t);for(var i=e.length,n=-1,s=Object(e);++n<i&&!1!==t(s[n],n,s););return e}),FN=function(){return VF.Date.now()},TN=Math.max,MN=Math.min;function RN(e,t,i){var n,s,r,a,o,l,A=0,c=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function d(t){var i=n,r=s;return n=s=void 0,A=t,a=e.apply(r,i)}function g(e){var i=e-l;return void 0===l||i>=t||i<0||u&&e-A>=r}function p(){var e=FN();if(g(e))return f(e);o=setTimeout(p,function(e){var i=t-(e-l);return u?MN(i,r-(e-A)):i}(e))}function f(e){return o=void 0,h&&n?d(e):(n=s=void 0,a)}function m(){var e=FN(),i=g(e);if(n=arguments,s=this,l=e,i){if(void 0===o)return function(e){return A=e,o=setTimeout(p,t),c?d(e):a}(l);if(u)return clearTimeout(o),o=setTimeout(p,t),d(l)}return void 0===o&&(o=setTimeout(p,t)),a}return t=fT(t)||0,uT(i)&&(c=!!i.leading,r=(u="maxWait"in i)?TN(fT(i.maxWait)||0,t):r,h="trailing"in i?!!i.trailing:h),m.cancel=function(){void 0!==o&&clearTimeout(o),A=0,n=l=s=o=void 0},m.flush=function(){return void 0===o?a:f(FN())},m}function NN(e,t,i){(void 0!==i&&!JT(e[t],i)||void 0===i&&!(t in e))&&jT(e,t,i)}function LN(e){return tT(e)&&nM(e)}function UN(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function HN(e,t,i,n,s,r,a){var o=UN(e,i),l=UN(t,i),A=a.get(l);if(A)NN(e,i,A);else{var c,u=r?r(o,l,i+"",e,t,a):void 0,h=void 0===u;if(h){var d=sT(l),g=!d&&gM(l),p=!d&&!g&&yM(l);u=l,d||g||p?sT(o)?u=o:LN(o)?u=RT(o):g?(h=!1,u=CR(l,!0)):p?(h=!1,u=WR(l,!0)):u=[]:uR(l)||cM(l)?(u=o,cM(o)?u=$T(c=o,DM(c)):uT(o)&&!CT(o)||(u=JR(l))):h=!1}h&&(a.set(l,u),s(u,l,n,r,a),a.delete(l)),NN(e,i,u)}}function PN(e,t,i,n,s){e!==t&&xN(t,(function(r,a){if(s||(s=new dR),uT(r))HN(e,t,a,i,PN,n,s);else{var o=n?n(UN(e,a),r,a+"",e,t,s):void 0;void 0===o&&(o=r),NN(e,a,o)}}),DM)}function ON(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var s=n-1;return KT(e,SN(t),s,!0)}function GN(e,t){var i=-1,n=nM(e)?Array(e.length):[];return DN(e,(function(e,s,r){n[++i]=t(e,s,r)})),n}function KN(e,t){return iR(function(e,t){return(sT(e)?nT:GN)(e,SN(t))}(e,t),1)}var qN=1/0;function YN(e){for(var t=-1,i=null==e?0:e.length,n={};++t<i;){var s=e[t];n[s[0]]=s[1]}return n}function VN(e,t){return t.length<2?e:XM(e,function(e,t,i){var n=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(i=i>s?s:i)<0&&(i+=s),s=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(s);++n<s;)r[n]=e[n+t];return r}(t,0,-1))}function WN(e,t){return BN(e,t)}function jN(e){return null==e}function JN(e){return void 0===e}var zN,XN=(zN=function(e,t,i){PN(e,t,i)},tM((function(e,t){var i=-1,n=t.length,s=n>1?t[n-1]:void 0,r=n>2?t[2]:void 0;for(s=zN.length>3&&"function"==typeof s?(n--,s):void 0,r&&function(e,t,i){if(!uT(i))return!1;var n=typeof t;return!!("number"==n?nM(i)&&WT(t,i.length):"string"==n&&t in i)&&JT(i[t],e)}(t[0],t[1],r)&&(s=n<3?void 0:s,n=1),e=Object(e);++i<n;){var a=t[i];a&&zN(e,a,i,s)}return e})));function $N(e,t){return null==(e=VN(e,t=JM(t,e)))||delete e[zM((i=t,n=null==i?0:i.length,n?i[n-1]:void 0))];var i,n}function ZN(e){return uR(e)?void 0:e}var eL=sR((function(e,t){var i={};if(null==e)return i;var n=!1;t=nT(t,(function(t){return t=JM(t,e),n||(n=t.length>1),t})),$T(e,QR(e),i),n&&(i=sN(i,7,ZN));for(var s=t.length;s--;)$N(i,t[s]);return i}));function tL(e,t,i,n){if(!uT(e))return e;for(var s=-1,r=(t=JM(t,e)).length,a=r-1,o=e;null!=o&&++s<r;){var l=zM(t[s]),A=i;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=a){var c=o[l];void 0===(A=void 0)&&(A=uT(c)?c:WT(t[s+1])?[]:{})}XT(o,l,A),o=o[l]}return e}function iL(e,t){return function(e,t,i){for(var n=-1,s=t.length,r={};++n<s;){var a=t[n],o=XM(e,a);i(o,a)&&tL(r,JM(a,e),o)}return r}(e,t,(function(t,i){return QN(e,i)}))}var nL=sR((function(e,t){return null==e?{}:iL(e,t)}));function sL(e,t,i){var n=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return uT(i)&&(n="leading"in i?!!i.leading:n,s="trailing"in i?!!i.trailing:s),RN(e,t,{leading:n,maxWait:t,trailing:s})}var rL=xR&&1/hN(new xR([,-0]))[1]==1/0?function(e){return new xR(e)}:function(){};var aL=tM((function(e){return function(e,t,i){var n=-1,s=YT,r=e.length,a=!0,o=[],l=o;if(r>=200){var A=rL(e);if(A)return hN(A);a=!1,s=AN,l=new oN}else l=o;e:for(;++n<r;){var c=e[n],u=c;if(c=0!==c?c:0,a&&u==u){for(var h=l.length;h--;)if(l[h]===u)continue e;o.push(c)}else s(l,u,i)||(l!==o&&l.push(u),o.push(c))}return o}(iR(e,1,LN,!0))}));const oL=e=>void 0===e,lL=e=>"boolean"==typeof e,AL=e=>"number"==typeof e,cL=e=>!e&&0!==e||Lc(e)&&0===e.length||qc(e)&&!Object.keys(e).length,uL=e=>"undefined"!=typeof Element&&e instanceof Element,hL=e=>jN(e),dL=e=>e===window;var gL,pL=Object.defineProperty,fL=Object.defineProperties,mL=Object.getOwnPropertyDescriptors,CL=Object.getOwnPropertySymbols,IL=Object.prototype.hasOwnProperty,vL=Object.prototype.propertyIsEnumerable,BL=(e,t,i)=>t in e?pL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;function yL(e,t){const i=Xh();return Hp((()=>{i.value=e()}),((e,t)=>fL(e,mL(t)))(((e,t)=>{for(var i in t||(t={}))IL.call(t,i)&&BL(e,i,t[i]);if(CL)for(var i of CL(t))vL.call(t,i)&&BL(e,i,t[i]);return e})({},t),{flush:null!=void 0?undefined:"sync"})),Hh(i)}const bL="undefined"!=typeof window,EL=e=>"function"==typeof e,wL=()=>{},QL=bL&&(null==(gL=null==window?void 0:window.navigator)?void 0:gL.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function _L(e){return"function"==typeof e?e():ed(e)}function SL(e,t){return function(...i){return new Promise(((n,s)=>{Promise.resolve(e((()=>t.apply(this,i)),{fn:t,thisArg:this,args:i})).then(n).catch(s)}))}}function xL(e,t){let i,n,s;const r=zh(!0),a=()=>{r.value=!0,s()};Pp(e,a,{flush:"sync"});const o=EL(t)?t:t.get,l=EL(t)?void 0:t.set,A=function(e){return new sd(e)}(((e,t)=>(n=e,s=t,{get:()=>(r.value&&(i=o(),r.value=!1),n(),i),set(e){null==l||l(e)}})));return Object.isExtensible(A)&&(A.trigger=a),A}function kL(e){return!!xu()&&(ku(e),!0)}function DL(e,t=200,i={}){return SL(function(e,t={}){let i,n,s=wL;const r=e=>{clearTimeout(e),s(),s=wL};return a=>{const o=_L(e),l=_L(t.maxWait);return i&&r(i),o<=0||void 0!==l&&l<=0?(n&&(r(n),n=null),Promise.resolve(a())):new Promise(((e,A)=>{s=t.rejectOnCancel?A:e,l&&!n&&(n=setTimeout((()=>{i&&r(i),n=null,e(a())}),l)),i=setTimeout((()=>{n&&r(n),n=null,e(a())}),o)}))}}(t,i),e)}function FL(e,t=200,i=!1,n=!0,s=!1){return SL(function(e,t=!0,i=!0,n=!1){let s,r,a=0,o=!0,l=wL;const A=()=>{s&&(clearTimeout(s),s=void 0,l(),l=wL)};return c=>{const u=_L(e),h=Date.now()-a,d=()=>r=c();return A(),u<=0?(a=Date.now(),d()):(h>u&&(i||!o)?(a=Date.now(),d()):t&&(r=new Promise(((e,t)=>{l=n?t:e,s=setTimeout((()=>{a=Date.now(),o=!0,e(d()),A()}),Math.max(0,u-h))}))),i||s||(s=setTimeout((()=>o=!0),u)),o=!1,r)}}(t,i,n,s),e)}function TL(e,t=!0){kf()?Eg(e):t?e():Qd(e)}function ML(e,t,i={}){const{immediate:n=!0}=i,s=zh(!1);let r=null;function a(){r&&(clearTimeout(r),r=null)}function o(){s.value=!1,a()}function l(...i){a(),s.value=!0,r=setTimeout((()=>{s.value=!1,r=null,e(...i)}),_L(t))}return n&&(s.value=!0,bL&&l()),kL(o),{isPending:Hh(s),start:l,stop:o}}function RL(e){var t;const i=_L(e);return null!=(t=null==i?void 0:i.$el)?t:i}const NL=bL?window:void 0,LL=bL?window.document:void 0;function UL(...e){let t,i,n,s;if("string"==typeof e[0]||Array.isArray(e[0])?([i,n,s]=e,t=NL):[t,i,n,s]=e,!t)return wL;Array.isArray(i)||(i=[i]),Array.isArray(n)||(n=[n]);const r=[],a=()=>{r.forEach((e=>e())),r.length=0},o=Pp((()=>[RL(t),_L(s)]),(([e,t])=>{a(),e&&r.push(...i.flatMap((i=>n.map((n=>((e,t,i,n)=>(e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)))(e,i,n,t))))))}),{immediate:!0,flush:"post"}),l=()=>{o(),a()};return kL(l),l}let HL=!1;function PL(e,t,i={}){const{window:n=NL,ignore:s=[],capture:r=!0,detectIframe:a=!1}=i;if(!n)return;QL&&!HL&&(HL=!0,Array.from(n.document.body.children).forEach((e=>e.addEventListener("click",wL))));let o=!0;const l=e=>s.some((t=>{if("string"==typeof t)return Array.from(n.document.querySelectorAll(t)).some((t=>t===e.target||e.composedPath().includes(t)));{const i=RL(t);return i&&(e.target===i||e.composedPath().includes(i))}})),A=[UL(n,"click",(i=>{const n=RL(e);n&&n!==i.target&&!i.composedPath().includes(n)&&(0===i.detail&&(o=!l(i)),o?t(i):o=!0)}),{passive:!0,capture:r}),UL(n,"pointerdown",(t=>{const i=RL(e);i&&(o=!t.composedPath().includes(i)&&!l(t))}),{passive:!0}),a&&UL(n,"blur",(i=>{var s;const r=RL(e);"IFRAME"!==(null==(s=n.document.activeElement)?void 0:s.tagName)||(null==r?void 0:r.contains(n.document.activeElement))||t(i)}))].filter(Boolean);return()=>A.forEach((e=>e()))}function OL(e,t=!1){const i=zh(),n=()=>i.value=Boolean(e());return n(),TL(n,t),i}const GL="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},KL="__vueuse_ssr_handlers__";GL[KL]=GL[KL]||{};var qL=Object.getOwnPropertySymbols,YL=Object.prototype.hasOwnProperty,VL=Object.prototype.propertyIsEnumerable;function WL(e,t,i={}){const n=i,{window:s=NL}=n,r=((e,t)=>{var i={};for(var n in e)YL.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&qL)for(var n of qL(e))t.indexOf(n)<0&&VL.call(e,n)&&(i[n]=e[n]);return i})(n,["window"]);let a;const o=OL((()=>s&&"ResizeObserver"in s)),l=()=>{a&&(a.disconnect(),a=void 0)},A=Pp((()=>RL(e)),(e=>{l(),o.value&&s&&e&&(a=new ResizeObserver(t),a.observe(e,r))}),{immediate:!0,flush:"post"}),c=()=>{l(),A()};return kL(c),{isSupported:o,stop:c}}function jL(e,t={}){const{reset:i=!0,windowResize:n=!0,windowScroll:s=!0,immediate:r=!0}=t,a=zh(0),o=zh(0),l=zh(0),A=zh(0),c=zh(0),u=zh(0),h=zh(0),d=zh(0);function g(){const t=RL(e);if(!t)return void(i&&(a.value=0,o.value=0,l.value=0,A.value=0,c.value=0,u.value=0,h.value=0,d.value=0));const n=t.getBoundingClientRect();a.value=n.height,o.value=n.bottom,l.value=n.left,A.value=n.right,c.value=n.top,u.value=n.width,h.value=n.x,d.value=n.y}return WL(e,g),Pp((()=>RL(e)),(e=>!e&&g())),s&&UL("scroll",g,{capture:!0,passive:!0}),n&&UL("resize",g,{passive:!0}),TL((()=>{r&&g()})),{height:a,bottom:o,left:l,right:A,top:c,width:u,x:h,y:d,update:g}}var JL,zL,XL=Object.getOwnPropertySymbols,$L=Object.prototype.hasOwnProperty,ZL=Object.prototype.propertyIsEnumerable;function eU(e,t,i={}){const n=i,{window:s=NL}=n,r=((e,t)=>{var i={};for(var n in e)$L.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&XL)for(var n of XL(e))t.indexOf(n)<0&&ZL.call(e,n)&&(i[n]=e[n]);return i})(n,["window"]);let a;const o=OL((()=>s&&"MutationObserver"in s)),l=()=>{a&&(a.disconnect(),a=void 0)},A=Pp((()=>RL(e)),(e=>{l(),o.value&&s&&e&&(a=new MutationObserver(t),a.observe(e,r))}),{immediate:!0}),c=()=>{l(),A()};return kL(c),{isSupported:o,stop:c}}(zL=JL||(JL={})).UP="UP",zL.RIGHT="RIGHT",zL.DOWN="DOWN",zL.LEFT="LEFT",zL.NONE="NONE";var tU=Object.defineProperty,iU=Object.getOwnPropertySymbols,nU=Object.prototype.hasOwnProperty,sU=Object.prototype.propertyIsEnumerable,rU=(e,t,i)=>t in e?tU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;function aU(e,t,i,n={}){var s,r,a;const{clone:o=!1,passive:l=!1,eventName:A,deep:c=!1,defaultValue:u}=n,h=kf(),d=i||(null==h?void 0:h.emit)||(null==(s=null==h?void 0:h.$emit)?void 0:s.bind(h))||(null==(a=null==(r=null==h?void 0:h.proxy)?void 0:r.$emit)?void 0:a.bind(null==h?void 0:h.proxy));let g=A;t||(t="modelValue"),g=A||g||`update:${t.toString()}`;const p=e=>{return o?EL(o)?o(e):(t=e,JSON.parse(JSON.stringify(t))):e;var t},f=()=>void 0!==e[t]?p(e[t]):u;if(l){const i=zh(f());return Pp((()=>e[t]),(e=>i.value=p(e))),Pp(i,(i=>{(i!==e[t]||c)&&d(g,i)}),{deep:c}),i}return qf({get:()=>f(),set(e){d(g,e)}})}((e,t)=>{for(var i in t||(t={}))nU.call(t,i)&&rU(e,i,t[i]);if(iU)for(var i of iU(t))sU.call(t,i)&&rU(e,i,t[i])})({linear:function(e){return e}},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});class oU extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function lU(e,t){throw new oU(`[${e}] ${t}`)}const AU={current:0},cU=zh(0),uU=Symbol("elZIndexContextKey"),hU=Symbol("zIndexContextKey"),dU=e=>{const t=kf()?pp(uU,AU):AU,i=e||(kf()?pp(hU,void 0):void 0),n=qf((()=>{const e=ed(i);return AL(e)?e:2e3})),s=qf((()=>n.value+cU.value));return!bL&&pp(uU),{initialZIndex:n,currentZIndex:s,nextZIndex:()=>(t.current++,cU.value=t.current,s.value)}};var gU={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const pU=e=>(t,i)=>fU(t,i,ed(e)),fU=(e,t,i)=>$M(i,e,e).replace(/\{(\w+)\}/g,((e,i)=>{var n;return`${null!=(n=null==t?void 0:t[i])?n:`{${i}}`}`})),mU=Symbol("localeContextKey"),CU=e=>{const t=e||pp(mU,zh());return(e=>({lang:qf((()=>ed(e).name)),locale:Jh(e)?e:zh(e),t:pU(e)}))(qf((()=>t.value||gU)))},IU="__epPropKey",vU=(e,t)=>{if(!qc(e)||qc(i=e)&&i[IU])return e;var i;const{values:n,required:s,default:r,type:a,validator:o}=e,l=n||o?i=>{let s=!1,a=[];if(n&&(a=Array.from(n),Nc(e,"default")&&a.push(r),s||(s=a.includes(i))),o&&(s||(s=o(i))),!s&&a.length>0){const e=[...new Set(a)].map((e=>JSON.stringify(e))).join(", ");Wf(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${e}], got value ${JSON.stringify(i)}.`)}return s}:void 0,A={type:a,required:!!s,validator:l,[IU]:!0};return Nc(e,"default")&&(A.default=r),A},BU=e=>YN(Object.entries(e).map((([e,t])=>[e,vU(t,e)]))),yU=["","default","small","large"],bU=vU({type:String,values:yU,required:!1}),EU=Symbol("size"),wU=()=>{const e=pp(EU,{});return qf((()=>ed(e.size)||""))},QU=Symbol("emptyValuesContextKey"),_U=["",void 0,null],SU=BU({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>Oc(e)?!e():!e}}),xU=(e,t)=>{const i=kf()?pp(QU,zh({})):zh({}),n=qf((()=>e.emptyValues||i.value.emptyValues||_U)),s=qf((()=>Oc(e.valueOnClear)?e.valueOnClear():void 0!==e.valueOnClear?e.valueOnClear:Oc(i.value.valueOnClear)?i.value.valueOnClear():void 0!==i.value.valueOnClear?i.value.valueOnClear:void 0!==t?t:undefined));return n.value.includes(s.value),{emptyValues:n,valueOnClear:s,isEmptyValue:e=>n.value.includes(e)}},kU=e=>Object.keys(e),DU=e=>Object.entries(e),FU=(e,t,i)=>({get value(){return $M(e,t,i)},set value(i){!function(e,t,i){null==e||tL(e,t,i)}(e,t,i)}}),TU=zh();function MU(e,t=void 0){const i=kf()?pp(UF,TU):TU;return e?qf((()=>{var n,s;return null!=(s=null==(n=i.value)?void 0:n[e])?s:t})):i}function RU(e,t){const i=MU(),n=KF(e,qf((()=>{var e;return(null==(e=i.value)?void 0:e.namespace)||HF}))),s=CU(qf((()=>{var e;return null==(e=i.value)?void 0:e.locale}))),r=dU(qf((()=>{var e;return(null==(e=i.value)?void 0:e.zIndex)||2e3}))),a=qf((()=>{var e;return ed(t)||(null==(e=i.value)?void 0:e.size)||""}));return NU(qf((()=>ed(i)||{}))),{ns:n,locale:s,zIndex:r,size:a}}const NU=(e,t,i=!1)=>{var n;const s=!!kf(),r=s?MU():void 0,a=null!=(n=null==t?void 0:t.provide)?n:s?gp:void 0;if(!a)return;const o=qf((()=>{const t=ed(e);return(null==r?void 0:r.value)?LU(r.value,t):t}));return a(UF,o),a(mU,qf((()=>o.value.locale))),a(OF,qf((()=>o.value.namespace))),a(hU,qf((()=>o.value.zIndex))),a(EU,{size:qf((()=>o.value.size||""))}),a(QU,qf((()=>({emptyValues:o.value.emptyValues,valueOnClear:o.value.valueOnClear})))),!i&&TU.value||(TU.value=o.value),o},LU=(e,t)=>{const i=[...new Set([...kU(e),...kU(t)])],n={};for(const s of i)n[s]=void 0!==t[s]?t[s]:e[s];return n},UU="update:modelValue",HU="change",PU="input",OU=BU({zIndex:{type:[Number,String],default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"}}),GU={scroll:({scrollTop:e,fixed:t})=>AL(e)&&lL(t),[HU]:e=>lL(e)};var KU=(e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i};const qU=e=>bL?window.requestAnimationFrame(e):setTimeout(e,16),YU=e=>bL?window.cancelAnimationFrame(e):clearTimeout(e),VU=(e="")=>e.split(" ").filter((e=>!!e.trim())),WU=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},jU=(e,t)=>{e&&t.trim()&&e.classList.add(...VU(t))},JU=(e,t)=>{e&&t.trim()&&e.classList.remove(...VU(t))},zU=(e,t)=>{var i;if(!bL||!e||!t)return"";let n=Zc(t);"float"===n&&(n="cssFloat");try{const t=e.style[n];if(t)return t;const s=null==(i=document.defaultView)?void 0:i.getComputedStyle(e,"");return s?s[n]:""}catch(I2){return e.style[n]}},XU=(e,t,i)=>{if(e&&t)if(qc(t))DU(t).forEach((([t,i])=>XU(e,t,i)));else{const n=Zc(t);e.style[n]=i}};function $U(e,t="px"){return e?AL(e)||Gc(i=e)&&!Number.isNaN(Number(i))?`${e}${t}`:Gc(e)?e:void 0:"";var i}const ZU=(e,t)=>{if(!bL)return!1;const i={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],n=zU(e,i);return["scroll","auto","overlay"].some((e=>n.includes(e)))},eH=(e,t)=>{if(!bL)return;let i=e;for(;i;){if([window,document,document.documentElement].includes(i))return window;if(ZU(i,t))return i;i=i.parentNode}return i};let tH;const iH=e=>{var t;if(!bL)return 0;if(void 0!==tH)return tH;const i=document.createElement("div");i.className=`${e}-scrollbar__wrap`,i.style.visibility="hidden",i.style.width="100px",i.style.position="absolute",i.style.top="-9999px",document.body.appendChild(i);const n=i.offsetWidth;i.style.overflow="scroll";const s=document.createElement("div");s.style.width="100%",i.appendChild(s);const r=s.offsetWidth;return null==(t=i.parentNode)||t.removeChild(i),tH=n-r,tH};function nH(e,t){if(!bL)return;if(!t)return void(e.scrollTop=0);const i=[];let n=t.offsetParent;for(;null!==n&&e!==n&&e.contains(n);)i.push(n),n=n.offsetParent;const s=t.offsetTop+i.reduce(((e,t)=>e+t.offsetTop),0),r=s+t.offsetHeight,a=e.scrollTop,o=a+e.clientHeight;s<a?e.scrollTop=s:r>o&&(e.scrollTop=r-e.clientHeight)}const sH=(e,t)=>dL(t)?e.ownerDocument.documentElement:t,rH=e=>dL(e)?window.scrollY:e.scrollTop,aH="ElAffix",oH=hg({...hg({name:aH}),props:OU,emits:GU,setup(e,{expose:t,emit:i}){const n=e,s=KF("affix"),r=Xh(),a=Xh(),o=Xh(),{height:l}=function(e={}){const{window:t=NL,initialWidth:i=1/0,initialHeight:n=1/0,listenOrientation:s=!0,includeScrollbar:r=!0}=e,a=zh(i),o=zh(n),l=()=>{t&&(r?(a.value=t.innerWidth,o.value=t.innerHeight):(a.value=t.document.documentElement.clientWidth,o.value=t.document.documentElement.clientHeight))};return l(),TL(l),UL("resize",l,{passive:!0}),s&&UL("orientationchange",l,{passive:!0}),{width:a,height:o}}(),{height:A,width:c,top:u,bottom:h,update:d}=jL(a,{windowScroll:!1}),g=jL(r),p=zh(!1),f=zh(0),m=zh(0),C=qf((()=>({height:p.value?`${A.value}px`:"",width:p.value?`${c.value}px`:""}))),I=qf((()=>{if(!p.value)return{};const e=n.offset?$U(n.offset):0;return{height:`${A.value}px`,width:`${c.value}px`,top:"top"===n.position?e:"",bottom:"bottom"===n.position?e:"",transform:m.value?`translateY(${m.value}px)`:"",zIndex:n.zIndex}})),v=()=>{if(!o.value)return;f.value=o.value instanceof Window?document.documentElement.scrollTop:o.value.scrollTop||0;const{position:e,target:t,offset:i}=n,s=i+A.value;if("top"===e)if(t){const e=g.bottom.value-s;p.value=i>u.value&&g.bottom.value>0,m.value=e<0?e:0}else p.value=i>u.value;else if(t){const e=l.value-g.top.value-s;p.value=l.value-i<h.value&&l.value>g.top.value,m.value=e<0?-e:0}else p.value=l.value-i<h.value};return Pp(p,(e=>i("change",e))),Eg((()=>{var e;n.target?(r.value=null!=(e=document.querySelector(n.target))?e:void 0,r.value||lU(aH,`Target does not exist: ${n.target}`)):r.value=document.documentElement,o.value=eH(a.value,!0),d()})),UL(o,"scroll",(()=>{d(),i("scroll",{scrollTop:f.value,fixed:p.value})})),Hp(v),t({update:v,updateRoot:d}),(e,t)=>(af(),cf("div",{ref_key:"root",ref:a,class:pu(ed(s).b()),style:cu(ed(C))},[ff("div",{class:pu({[ed(s).m("fixed")]:p.value}),style:cu(ed(I))},[Gg(e.$slots,"default")],6)],6))}});const lH=(e,t)=>{if(e.install=i=>{for(const n of[e,...Object.values(null!=t?t:{})])i.component(n.name,n)},t)for(const[i,n]of Object.entries(t))e[i]=n;return e},AH=(e,t)=>(e.install=i=>{e._context=i._context,i.config.globalProperties[t]=e},e),cH=e=>(e.install=xc,e),uH=lH(KU(oH,[["__file","affix.vue"]])),hH=BU({size:{type:[Number,String]},color:{type:String}}),dH=hg({...hg({name:"ElIcon",inheritAttrs:!1}),props:hH,setup(e){const t=e,i=KF("icon"),n=qf((()=>{const{size:e,color:i}=t;return e||i?{fontSize:oL(e)?void 0:$U(e),"--color":i}:{}}));return(e,t)=>(af(),cf("i",wf({class:ed(i).b(),style:ed(n)},e.$attrs),[Gg(e.$slots,"default")],16))}});const gH=lH(KU(dH,[["__file","icon.vue"]]));
/*! Element Plus Icons Vue v2.3.1 */var pH=hg({name:"AddLocation",__name:"add-location",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M288 896h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),ff("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),ff("path",{fill:"currentColor",d:"M544 384h96a32 32 0 1 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96v-96a32 32 0 0 1 64 0z"})]))}),fH=pH,mH=hg({name:"Aim",__name:"aim",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ff("path",{fill:"currentColor",d:"M512 96a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V128a32 32 0 0 1 32-32m0 576a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V704a32 32 0 0 1 32-32M96 512a32 32 0 0 1 32-32h192a32 32 0 0 1 0 64H128a32 32 0 0 1-32-32m576 0a32 32 0 0 1 32-32h192a32 32 0 1 1 0 64H704a32 32 0 0 1-32-32"})]))}),CH=mH,IH=hg({name:"AlarmClock",__name:"alarm-clock",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 832a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),ff("path",{fill:"currentColor",d:"m292.288 824.576 55.424 32-48 83.136a32 32 0 1 1-55.424-32zm439.424 0-55.424 32 48 83.136a32 32 0 1 0 55.424-32zM512 512h160a32 32 0 1 1 0 64H480a32 32 0 0 1-32-32V320a32 32 0 0 1 64 0zM90.496 312.256A160 160 0 0 1 312.32 90.496l-46.848 46.848a96 96 0 0 0-128 128L90.56 312.256zm835.264 0A160 160 0 0 0 704 90.496l46.848 46.848a96 96 0 0 1 128 128z"})]))}),vH=IH,BH=hg({name:"Apple",__name:"apple",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M599.872 203.776a189.44 189.44 0 0 1 64.384-4.672l2.624.128c31.168 1.024 51.2 4.096 79.488 16.32 37.632 16.128 74.496 45.056 111.488 89.344 96.384 115.264 82.752 372.8-34.752 521.728-7.68 9.728-32 41.6-30.72 39.936a426.624 426.624 0 0 1-30.08 35.776c-31.232 32.576-65.28 49.216-110.08 50.048-31.36.64-53.568-5.312-84.288-18.752l-6.528-2.88c-20.992-9.216-30.592-11.904-47.296-11.904-18.112 0-28.608 2.88-51.136 12.672l-6.464 2.816c-28.416 12.224-48.32 18.048-76.16 19.2-74.112 2.752-116.928-38.08-180.672-132.16-96.64-142.08-132.608-349.312-55.04-486.4 46.272-81.92 129.92-133.632 220.672-135.04 32.832-.576 60.288 6.848 99.648 22.72 27.136 10.88 34.752 13.76 37.376 14.272 16.256-20.16 27.776-36.992 34.56-50.24 13.568-26.304 27.2-59.968 40.704-100.8a32 32 0 1 1 60.8 20.224c-12.608 37.888-25.408 70.4-38.528 97.664zm-51.52 78.08c-14.528 17.792-31.808 37.376-51.904 58.816a32 32 0 1 1-46.72-43.776l12.288-13.248c-28.032-11.2-61.248-26.688-95.68-26.112-70.4 1.088-135.296 41.6-171.648 105.792C121.6 492.608 176 684.16 247.296 788.992c34.816 51.328 76.352 108.992 130.944 106.944 52.48-2.112 72.32-34.688 135.872-34.688 63.552 0 81.28 34.688 136.96 33.536 56.448-1.088 75.776-39.04 126.848-103.872 107.904-136.768 107.904-362.752 35.776-449.088-72.192-86.272-124.672-84.096-151.68-85.12-41.472-4.288-81.6 12.544-113.664 25.152z"})]))}),yH=BH,bH=hg({name:"ArrowDownBold",__name:"arrow-down-bold",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M104.704 338.752a64 64 0 0 1 90.496 0l316.8 316.8 316.8-316.8a64 64 0 0 1 90.496 90.496L557.248 791.296a64 64 0 0 1-90.496 0L104.704 429.248a64 64 0 0 1 0-90.496z"})]))}),EH=bH,wH=hg({name:"ArrowDown",__name:"arrow-down",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}),QH=wH,_H=hg({name:"ArrowLeftBold",__name:"arrow-left-bold",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0z"})]))}),SH=_H,xH=hg({name:"ArrowLeft",__name:"arrow-left",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}),kH=xH,DH=hg({name:"ArrowRightBold",__name:"arrow-right-bold",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M338.752 104.704a64 64 0 0 0 0 90.496l316.8 316.8-316.8 316.8a64 64 0 0 0 90.496 90.496l362.048-362.048a64 64 0 0 0 0-90.496L429.248 104.704a64 64 0 0 0-90.496 0z"})]))}),FH=DH,TH=hg({name:"ArrowRight",__name:"arrow-right",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}),MH=TH,RH=hg({name:"ArrowUpBold",__name:"arrow-up-bold",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M104.704 685.248a64 64 0 0 0 90.496 0l316.8-316.8 316.8 316.8a64 64 0 0 0 90.496-90.496L557.248 232.704a64 64 0 0 0-90.496 0L104.704 594.752a64 64 0 0 0 0 90.496z"})]))}),NH=RH,LH=hg({name:"ArrowUp",__name:"arrow-up",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}),UH=LH,HH=hg({name:"Avatar",__name:"avatar",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0"})]))}),PH=HH,OH=hg({name:"Back",__name:"back",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),ff("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}),GH=OH,KH=hg({name:"Baseball",__name:"baseball",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M195.2 828.8a448 448 0 1 1 633.6-633.6 448 448 0 0 1-633.6 633.6zm45.248-45.248a384 384 0 1 0 543.104-543.104 384 384 0 0 0-543.104 543.104"}),ff("path",{fill:"currentColor",d:"M497.472 96.896c22.784 4.672 44.416 9.472 64.896 14.528a256.128 256.128 0 0 0 350.208 350.208c5.056 20.48 9.856 42.112 14.528 64.896A320.128 320.128 0 0 1 497.472 96.896zM108.48 491.904a320.128 320.128 0 0 1 423.616 423.68c-23.04-3.648-44.992-7.424-65.728-11.52a256.128 256.128 0 0 0-346.496-346.432 1736.64 1736.64 0 0 1-11.392-65.728z"})]))}),qH=KH,YH=hg({name:"Basketball",__name:"basketball",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M778.752 788.224a382.464 382.464 0 0 0 116.032-245.632 256.512 256.512 0 0 0-241.728-13.952 762.88 762.88 0 0 1 125.696 259.584zm-55.04 44.224a699.648 699.648 0 0 0-125.056-269.632 256.128 256.128 0 0 0-56.064 331.968 382.72 382.72 0 0 0 181.12-62.336m-254.08 61.248A320.128 320.128 0 0 1 557.76 513.6a715.84 715.84 0 0 0-48.192-48.128 320.128 320.128 0 0 1-379.264 88.384 382.4 382.4 0 0 0 110.144 229.696 382.4 382.4 0 0 0 229.184 110.08zM129.28 481.088a256.128 256.128 0 0 0 331.072-56.448 699.648 699.648 0 0 0-268.8-124.352 382.656 382.656 0 0 0-62.272 180.8m106.56-235.84a762.88 762.88 0 0 1 258.688 125.056 256.512 256.512 0 0 0-13.44-241.088A382.464 382.464 0 0 0 235.84 245.248zm318.08-114.944c40.576 89.536 37.76 193.92-8.448 281.344a779.84 779.84 0 0 1 66.176 66.112 320.832 320.832 0 0 1 282.112-8.128 382.4 382.4 0 0 0-110.144-229.12 382.4 382.4 0 0 0-229.632-110.208zM828.8 828.8a448 448 0 1 1-633.6-633.6 448 448 0 0 1 633.6 633.6"})]))}),VH=YH,WH=hg({name:"BellFilled",__name:"bell-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M640 832a128 128 0 0 1-256 0zm192-64H134.4a38.4 38.4 0 0 1 0-76.8H192V448c0-154.88 110.08-284.16 256.32-313.6a64 64 0 1 1 127.36 0A320.128 320.128 0 0 1 832 448v243.2h57.6a38.4 38.4 0 0 1 0 76.8z"})]))}),jH=WH,JH=hg({name:"Bell",__name:"bell",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),ff("path",{fill:"currentColor",d:"M256 768h512V448a256 256 0 1 0-512 0zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320"}),ff("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}),zH=JH,XH=hg({name:"Bicycle",__name:"bicycle",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 832a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"}),ff("path",{fill:"currentColor",d:"M288 672h320q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),ff("path",{fill:"currentColor",d:"M768 832a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"}),ff("path",{fill:"currentColor",d:"M480 192a32 32 0 0 1 0-64h160a32 32 0 0 1 31.04 24.256l96 384a32 32 0 0 1-62.08 15.488L615.04 192zM96 384a32 32 0 0 1 0-64h128a32 32 0 0 1 30.336 21.888l64 192a32 32 0 1 1-60.672 20.224L200.96 384z"}),ff("path",{fill:"currentColor",d:"m373.376 599.808-42.752-47.616 320-288 42.752 47.616z"})]))}),$H=XH,ZH=hg({name:"BottomLeft",__name:"bottom-left",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 768h416a32 32 0 1 1 0 64H224a32 32 0 0 1-32-32V352a32 32 0 0 1 64 0z"}),ff("path",{fill:"currentColor",d:"M246.656 822.656a32 32 0 0 1-45.312-45.312l544-544a32 32 0 0 1 45.312 45.312l-544 544z"})]))}),eP=ZH,tP=hg({name:"BottomRight",__name:"bottom-right",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M352 768a32 32 0 1 0 0 64h448a32 32 0 0 0 32-32V352a32 32 0 0 0-64 0v416z"}),ff("path",{fill:"currentColor",d:"M777.344 822.656a32 32 0 0 0 45.312-45.312l-544-544a32 32 0 0 0-45.312 45.312z"})]))}),iP=tP,nP=hg({name:"Bottom",__name:"bottom",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M544 805.888V168a32 32 0 1 0-64 0v637.888L246.656 557.952a30.72 30.72 0 0 0-45.312 0 35.52 35.52 0 0 0 0 48.064l288 306.048a30.72 30.72 0 0 0 45.312 0l288-306.048a35.52 35.52 0 0 0 0-48 30.72 30.72 0 0 0-45.312 0L544 805.824z"})]))}),sP=nP,rP=hg({name:"Bowl",__name:"bowl",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M714.432 704a351.744 351.744 0 0 0 148.16-256H161.408a351.744 351.744 0 0 0 148.16 256zM288 766.592A415.68 415.68 0 0 1 96 416a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32 415.68 415.68 0 0 1-192 350.592V832a64 64 0 0 1-64 64H352a64 64 0 0 1-64-64zM493.248 320h-90.496l254.4-254.4a32 32 0 1 1 45.248 45.248zm187.328 0h-128l269.696-155.712a32 32 0 0 1 32 55.424zM352 768v64h320v-64z"})]))}),aP=rP,oP=hg({name:"Box",__name:"box",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M317.056 128 128 344.064V896h768V344.064L706.944 128zm-14.528-64h418.944a32 32 0 0 1 24.064 10.88l206.528 236.096A32 32 0 0 1 960 332.032V928a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V332.032a32 32 0 0 1 7.936-21.12L278.4 75.008A32 32 0 0 1 302.528 64z"}),ff("path",{fill:"currentColor",d:"M64 320h896v64H64z"}),ff("path",{fill:"currentColor",d:"M448 327.872V640h128V327.872L526.08 128h-28.16zM448 64h128l64 256v352a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V320z"})]))}),lP=oP,AP=hg({name:"Briefcase",__name:"briefcase",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M320 320V128h384v192h192v192H128V320zM128 576h768v320H128zm256-256h256.064V192H384z"})]))}),cP=AP,uP=hg({name:"BrushFilled",__name:"brush-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M608 704v160a96 96 0 0 1-192 0V704h-96a128 128 0 0 1-128-128h640a128 128 0 0 1-128 128zM192 512V128.064h640V512z"})]))}),hP=uP,dP=hg({name:"Brush",__name:"brush",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M896 448H128v192a64 64 0 0 0 64 64h192v192h256V704h192a64 64 0 0 0 64-64zm-770.752-64c0-47.552 5.248-90.24 15.552-128 14.72-54.016 42.496-107.392 83.2-160h417.28l-15.36 70.336L736 96h211.2c-24.832 42.88-41.92 96.256-51.2 160a663.872 663.872 0 0 0-6.144 128H960v256a128 128 0 0 1-128 128H704v160a32 32 0 0 1-32 32H352a32 32 0 0 1-32-32V768H192A128 128 0 0 1 64 640V384h61.248zm64 0h636.544c-2.048-45.824.256-91.584 6.848-137.216 4.48-30.848 10.688-59.776 18.688-86.784h-96.64l-221.12 141.248L561.92 160H256.512c-25.856 37.888-43.776 75.456-53.952 112.832-8.768 32.064-13.248 69.12-13.312 111.168z"})]))}),gP=dP,pP=hg({name:"Burger",__name:"burger",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M160 512a32 32 0 0 0-32 32v64a32 32 0 0 0 30.08 32H864a32 32 0 0 0 32-32v-64a32 32 0 0 0-32-32zm736-58.56A96 96 0 0 1 960 544v64a96 96 0 0 1-51.968 85.312L855.36 833.6a96 96 0 0 1-89.856 62.272H258.496A96 96 0 0 1 168.64 833.6l-52.608-140.224A96 96 0 0 1 64 608v-64a96 96 0 0 1 64-90.56V448a384 384 0 1 1 768 5.44M832 448a320 320 0 0 0-640 0zM512 704H188.352l40.192 107.136a32 32 0 0 0 29.952 20.736h507.008a32 32 0 0 0 29.952-20.736L835.648 704z"})]))}),fP=pP,mP=hg({name:"Calendar",__name:"calendar",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}),CP=mP,IP=hg({name:"CameraFilled",__name:"camera-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M160 224a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h704a64 64 0 0 0 64-64V288a64 64 0 0 0-64-64H748.416l-46.464-92.672A64 64 0 0 0 644.736 96H379.328a64 64 0 0 0-57.216 35.392L275.776 224zm352 435.2a115.2 115.2 0 1 0 0-230.4 115.2 115.2 0 0 0 0 230.4m0 140.8a256 256 0 1 1 0-512 256 256 0 0 1 0 512"})]))}),vP=IP,BP=hg({name:"Camera",__name:"camera",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M896 256H128v576h768zm-199.424-64-32.064-64h-304.96l-32 64zM96 192h160l46.336-92.608A64 64 0 0 1 359.552 64h304.96a64 64 0 0 1 57.216 35.328L768.192 192H928a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V224a32 32 0 0 1 32-32m416 512a160 160 0 1 0 0-320 160 160 0 0 0 0 320m0 64a224 224 0 1 1 0-448 224 224 0 0 1 0 448"})]))}),yP=BP,bP=hg({name:"CaretBottom",__name:"caret-bottom",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}),EP=bP,wP=hg({name:"CaretLeft",__name:"caret-left",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M672 192 288 511.936 672 832z"})]))}),QP=wP,_P=hg({name:"CaretRight",__name:"caret-right",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}),SP=_P,xP=hg({name:"CaretTop",__name:"caret-top",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}),kP=xP,DP=hg({name:"Cellphone",__name:"cellphone",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 128a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h512a128 128 0 0 1 128 128v640a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V192A128 128 0 0 1 256 64m128 128h256a32 32 0 1 1 0 64H384a32 32 0 0 1 0-64m128 640a64 64 0 1 1 0-128 64 64 0 0 1 0 128"})]))}),FP=DP,TP=hg({name:"ChatDotRound",__name:"chat-dot-round",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.056 461.056 0 0 1-206.912-48.384l-175.616 58.56z"}),ff("path",{fill:"currentColor",d:"M512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}),MP=TP,RP=hg({name:"ChatDotSquare",__name:"chat-dot-square",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"}),ff("path",{fill:"currentColor",d:"M512 499.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4z"})]))}),NP=RP,LP=hg({name:"ChatLineRound",__name:"chat-line-round",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.056 461.056 0 0 1-206.912-48.384l-175.616 58.56z"}),ff("path",{fill:"currentColor",d:"M352 576h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m32-192h256q32 0 32 32t-32 32H384q-32 0-32-32t32-32"})]))}),UP=LP,HP=hg({name:"ChatLineSquare",__name:"chat-line-square",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M160 826.88 273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"}),ff("path",{fill:"currentColor",d:"M352 512h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m0-192h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32"})]))}),PP=HP,OP=hg({name:"ChatRound",__name:"chat-round",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m174.72 855.68 130.048-43.392 23.424 11.392C382.4 849.984 444.352 864 512 864c223.744 0 384-159.872 384-352 0-192.832-159.104-352-384-352S128 319.168 128 512a341.12 341.12 0 0 0 69.248 204.288l21.632 28.8-44.16 110.528zm-45.248 82.56A32 32 0 0 1 89.6 896l56.512-141.248A405.12 405.12 0 0 1 64 512C64 299.904 235.648 96 512 96s448 203.904 448 416-173.44 416-448 416c-79.68 0-150.848-17.152-211.712-46.72l-170.88 56.96z"})]))}),GP=OP,KP=hg({name:"ChatSquare",__name:"chat-square",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"})]))}),qP=KP,YP=hg({name:"Check",__name:"check",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}),VP=YP,WP=hg({name:"Checked",__name:"checked",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M704 192h160v736H160V192h160.064v64H704zM311.616 537.28l-45.312 45.248L447.36 763.52l316.8-316.8-45.312-45.184L447.36 673.024zM384 192V96h256v96z"})]))}),jP=WP,JP=hg({name:"Cherry",__name:"cherry",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M261.056 449.6c13.824-69.696 34.88-128.96 63.36-177.728 23.744-40.832 61.12-88.64 112.256-143.872H320a32 32 0 0 1 0-64h384a32 32 0 1 1 0 64H554.752c14.912 39.168 41.344 86.592 79.552 141.76 47.36 68.48 84.8 106.752 106.304 114.304a224 224 0 1 1-84.992 14.784c-22.656-22.912-47.04-53.76-73.92-92.608-38.848-56.128-67.008-105.792-84.352-149.312-55.296 58.24-94.528 107.52-117.76 147.2-23.168 39.744-41.088 88.768-53.568 147.072a224.064 224.064 0 1 1-64.96-1.6zM288 832a160 160 0 1 0 0-320 160 160 0 0 0 0 320m448-64a160 160 0 1 0 0-320 160 160 0 0 0 0 320"})]))}),zP=JP,XP=hg({name:"Chicken",__name:"chicken",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M349.952 716.992 478.72 588.16a106.688 106.688 0 0 1-26.176-19.072 106.688 106.688 0 0 1-19.072-26.176L304.704 671.744c.768 3.072 1.472 6.144 2.048 9.216l2.048 31.936 31.872 1.984c3.136.64 6.208 1.28 9.28 2.112zm57.344 33.152a128 128 0 1 1-216.32 114.432l-1.92-32-32-1.92a128 128 0 1 1 114.432-216.32L416.64 469.248c-2.432-101.44 58.112-239.104 149.056-330.048 107.328-107.328 231.296-85.504 316.8 0 85.44 85.44 107.328 209.408 0 316.8-91.008 90.88-228.672 151.424-330.112 149.056L407.296 750.08zm90.496-226.304c49.536 49.536 233.344-7.04 339.392-113.088 78.208-78.208 63.232-163.072 0-226.304-63.168-63.232-148.032-78.208-226.24 0C504.896 290.496 448.32 474.368 497.792 523.84M244.864 708.928a64 64 0 1 0-59.84 59.84l56.32-3.52zm8.064 127.68a64 64 0 1 0 59.84-59.84l-56.32 3.52-3.52 56.32z"})]))}),$P=XP,ZP=hg({name:"ChromeFilled",__name:"chrome-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M938.67 512.01c0-44.59-6.82-87.6-19.54-128H682.67a212.372 212.372 0 0 1 42.67 128c.06 38.71-10.45 76.7-30.42 109.87l-182.91 316.8c235.65-.01 426.66-191.02 426.66-426.67z"}),ff("path",{fill:"currentColor",d:"M576.79 401.63a127.92 127.92 0 0 0-63.56-17.6c-22.36-.22-44.39 5.43-63.89 16.38s-35.79 26.82-47.25 46.02a128.005 128.005 0 0 0-2.16 127.44l1.24 2.13a127.906 127.906 0 0 0 46.36 46.61 127.907 127.907 0 0 0 63.38 17.44c22.29.2 44.24-5.43 63.68-16.33a127.94 127.94 0 0 0 47.16-45.79v-.01l1.11-1.92a127.984 127.984 0 0 0 .29-127.46 127.957 127.957 0 0 0-46.36-46.91"}),ff("path",{fill:"currentColor",d:"M394.45 333.96A213.336 213.336 0 0 1 512 298.67h369.58A426.503 426.503 0 0 0 512 85.34a425.598 425.598 0 0 0-171.74 35.98 425.644 425.644 0 0 0-142.62 102.22l118.14 204.63a213.397 213.397 0 0 1 78.67-94.21m117.56 604.72H512zm-97.25-236.73a213.284 213.284 0 0 1-89.54-86.81L142.48 298.6c-36.35 62.81-57.13 135.68-57.13 213.42 0 203.81 142.93 374.22 333.95 416.55h.04l118.19-204.71a213.315 213.315 0 0 1-122.77-21.91z"})]))}),eO=ZP,tO=hg({name:"CircleCheckFilled",__name:"circle-check-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}),iO=tO,nO=hg({name:"CircleCheck",__name:"circle-check",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ff("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}),sO=nO,rO=hg({name:"CircleCloseFilled",__name:"circle-close-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}),aO=rO,oO=hg({name:"CircleClose",__name:"circle-close",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),ff("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}),lO=oO,AO=hg({name:"CirclePlusFilled",__name:"circle-plus-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0v147.2z"})]))}),cO=AO,uO=hg({name:"CirclePlus",__name:"circle-plus",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),ff("path",{fill:"currentColor",d:"M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"}),ff("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}),hO=uO,dO=hg({name:"Clock",__name:"clock",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ff("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),ff("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}),gO=dO,pO=hg({name:"CloseBold",__name:"close-bold",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"})]))}),fO=pO,mO=hg({name:"Close",__name:"close",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}),CO=mO,IO=hg({name:"Cloudy",__name:"cloudy",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M598.4 831.872H328.192a256 256 0 0 1-34.496-510.528A352 352 0 1 1 598.4 831.872m-271.36-64h272.256a288 288 0 1 0-248.512-417.664L335.04 381.44l-34.816 3.584a192 192 0 0 0 26.88 382.848z"})]))}),vO=IO,BO=hg({name:"CoffeeCup",__name:"coffee-cup",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M768 192a192 192 0 1 1-8 383.808A256.128 256.128 0 0 1 512 768H320A256 256 0 0 1 64 512V160a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zm0 64v256a128 128 0 1 0 0-256M96 832h640a32 32 0 1 1 0 64H96a32 32 0 1 1 0-64m32-640v320a192 192 0 0 0 192 192h192a192 192 0 0 0 192-192V192z"})]))}),yO=BO,bO=hg({name:"Coffee",__name:"coffee",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M822.592 192h14.272a32 32 0 0 1 31.616 26.752l21.312 128A32 32 0 0 1 858.24 384h-49.344l-39.04 546.304A32 32 0 0 1 737.92 960H285.824a32 32 0 0 1-32-29.696L214.912 384H165.76a32 32 0 0 1-31.552-37.248l21.312-128A32 32 0 0 1 187.136 192h14.016l-6.72-93.696A32 32 0 0 1 226.368 64h571.008a32 32 0 0 1 31.936 34.304zm-64.128 0 4.544-64H260.736l4.544 64h493.184m-548.16 128H820.48l-10.688-64H214.208l-10.688 64h6.784m68.736 64 36.544 512H708.16l36.544-512z"})]))}),EO=bO,wO=hg({name:"Coin",__name:"coin",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m161.92 580.736 29.888 58.88C171.328 659.776 160 681.728 160 704c0 82.304 155.328 160 352 160s352-77.696 352-160c0-22.272-11.392-44.16-31.808-64.32l30.464-58.432C903.936 615.808 928 657.664 928 704c0 129.728-188.544 224-416 224S96 833.728 96 704c0-46.592 24.32-88.576 65.92-123.264z"}),ff("path",{fill:"currentColor",d:"m161.92 388.736 29.888 58.88C171.328 467.84 160 489.792 160 512c0 82.304 155.328 160 352 160s352-77.696 352-160c0-22.272-11.392-44.16-31.808-64.32l30.464-58.432C903.936 423.808 928 465.664 928 512c0 129.728-188.544 224-416 224S96 641.728 96 512c0-46.592 24.32-88.576 65.92-123.264z"}),ff("path",{fill:"currentColor",d:"M512 544c-227.456 0-416-94.272-416-224S284.544 96 512 96s416 94.272 416 224-188.544 224-416 224m0-64c196.672 0 352-77.696 352-160S708.672 160 512 160s-352 77.696-352 160 155.328 160 352 160"})]))}),QO=wO,_O=hg({name:"ColdDrink",__name:"cold-drink",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M768 64a192 192 0 1 1-69.952 370.88L480 725.376V896h96a32 32 0 1 1 0 64H320a32 32 0 1 1 0-64h96V725.376L76.8 273.536a64 64 0 0 1-12.8-38.4v-10.688a32 32 0 0 1 32-32h71.808l-65.536-83.84a32 32 0 0 1 50.432-39.424l96.256 123.264h337.728A192.064 192.064 0 0 1 768 64M656.896 192.448H800a32 32 0 0 1 32 32v10.624a64 64 0 0 1-12.8 38.4l-80.448 107.2a128 128 0 1 0-81.92-188.16v-.064zm-357.888 64 129.472 165.76a32 32 0 0 1-50.432 39.36l-160.256-205.12H144l304 404.928 304-404.928z"})]))}),SO=_O,xO=hg({name:"CollectionTag",__name:"collection-tag",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 128v698.88l196.032-156.864a96 96 0 0 1 119.936 0L768 826.816V128zm-32-64h576a32 32 0 0 1 32 32v797.44a32 32 0 0 1-51.968 24.96L531.968 720a32 32 0 0 0-39.936 0L243.968 918.4A32 32 0 0 1 192 893.44V96a32 32 0 0 1 32-32"})]))}),kO=xO,DO=hg({name:"Collection",__name:"collection",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M192 736h640V128H256a64 64 0 0 0-64 64zm64-672h608a32 32 0 0 1 32 32v672a32 32 0 0 1-32 32H160l-32 57.536V192A128 128 0 0 1 256 64"}),ff("path",{fill:"currentColor",d:"M240 800a48 48 0 1 0 0 96h592v-96zm0-64h656v160a64 64 0 0 1-64 64H240a112 112 0 0 1 0-224m144-608v250.88l96-76.8 96 76.8V128zm-64-64h320v381.44a32 32 0 0 1-51.968 24.96L480 384l-108.032 86.4A32 32 0 0 1 320 445.44z"})]))}),FO=DO,TO=hg({name:"Comment",__name:"comment",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M736 504a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112M128 128v640h192v160l224-160h352V128z"})]))}),MO=TO,RO=hg({name:"Compass",__name:"compass",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ff("path",{fill:"currentColor",d:"M725.888 315.008C676.48 428.672 624 513.28 568.576 568.64c-55.424 55.424-139.968 107.904-253.568 157.312a12.8 12.8 0 0 1-16.896-16.832c49.536-113.728 102.016-198.272 157.312-253.632 55.36-55.296 139.904-107.776 253.632-157.312a12.8 12.8 0 0 1 16.832 16.832"})]))}),NO=RO,LO=hg({name:"Connection",__name:"connection",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M640 384v64H448a128 128 0 0 0-128 128v128a128 128 0 0 0 128 128h320a128 128 0 0 0 128-128V576a128 128 0 0 0-64-110.848V394.88c74.56 26.368 128 97.472 128 181.056v128a192 192 0 0 1-192 192H448a192 192 0 0 1-192-192V576a192 192 0 0 1 192-192z"}),ff("path",{fill:"currentColor",d:"M384 640v-64h192a128 128 0 0 0 128-128V320a128 128 0 0 0-128-128H256a128 128 0 0 0-128 128v128a128 128 0 0 0 64 110.848v70.272A192.064 192.064 0 0 1 64 448V320a192 192 0 0 1 192-192h320a192 192 0 0 1 192 192v128a192 192 0 0 1-192 192z"})]))}),UO=LO,HO=hg({name:"Coordinate",__name:"coordinate",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M480 512h64v320h-64z"}),ff("path",{fill:"currentColor",d:"M192 896h640a64 64 0 0 0-64-64H256a64 64 0 0 0-64 64m64-128h512a128 128 0 0 1 128 128v64H128v-64a128 128 0 0 1 128-128m256-256a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512"})]))}),PO=HO,OO=hg({name:"CopyDocument",__name:"copy-document",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),ff("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}),GO=OO,KO=hg({name:"Cpu",__name:"cpu",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M320 256a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64zm0-64h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128H320a128 128 0 0 1-128-128V320a128 128 0 0 1 128-128"}),ff("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m-320 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 896a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m160 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m-320 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32M64 512a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0-160a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0 320a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m896-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0 320a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32"})]))}),qO=KO,YO=hg({name:"CreditCard",__name:"credit-card",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M896 324.096c0-42.368-2.496-55.296-9.536-68.48a52.352 52.352 0 0 0-22.144-22.08c-13.12-7.04-26.048-9.536-68.416-9.536H228.096c-42.368 0-55.296 2.496-68.48 9.536a52.352 52.352 0 0 0-22.08 22.144c-7.04 13.12-9.536 26.048-9.536 68.416v375.808c0 42.368 2.496 55.296 9.536 68.48a52.352 52.352 0 0 0 22.144 22.08c13.12 7.04 26.048 9.536 68.416 9.536h567.808c42.368 0 55.296-2.496 68.48-9.536a52.352 52.352 0 0 0 22.08-22.144c7.04-13.12 9.536-26.048 9.536-68.416zm64 0v375.808c0 57.088-5.952 77.76-17.088 98.56-11.136 20.928-27.52 37.312-48.384 48.448-20.864 11.136-41.6 17.088-98.56 17.088H228.032c-57.088 0-77.76-5.952-98.56-17.088a116.288 116.288 0 0 1-48.448-48.384c-11.136-20.864-17.088-41.6-17.088-98.56V324.032c0-57.088 5.952-77.76 17.088-98.56 11.136-20.928 27.52-37.312 48.384-48.448 20.864-11.136 41.6-17.088 98.56-17.088H795.84c57.088 0 77.76 5.952 98.56 17.088 20.928 11.136 37.312 27.52 48.448 48.384 11.136 20.864 17.088 41.6 17.088 98.56z"}),ff("path",{fill:"currentColor",d:"M64 320h896v64H64zm0 128h896v64H64zm128 192h256v64H192z"})]))}),VO=YO,WO=hg({name:"Crop",__name:"crop",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 768h672a32 32 0 1 1 0 64H224a32 32 0 0 1-32-32V96a32 32 0 0 1 64 0z"}),ff("path",{fill:"currentColor",d:"M832 224v704a32 32 0 1 1-64 0V256H96a32 32 0 0 1 0-64h704a32 32 0 0 1 32 32"})]))}),jO=WO,JO=hg({name:"DArrowLeft",__name:"d-arrow-left",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}),zO=JO,XO=hg({name:"DArrowRight",__name:"d-arrow-right",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}),$O=XO,ZO=hg({name:"DCaret",__name:"d-caret",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m512 128 288 320H224zM224 576h576L512 896z"})]))}),eG=ZO,tG=hg({name:"DataAnalysis",__name:"data-analysis",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m665.216 768 110.848 192h-73.856L591.36 768H433.024L322.176 960H248.32l110.848-192H160a32 32 0 0 1-32-32V192H64a32 32 0 0 1 0-64h896a32 32 0 1 1 0 64h-64v544a32 32 0 0 1-32 32zM832 192H192v512h640zM352 448a32 32 0 0 1 32 32v64a32 32 0 0 1-64 0v-64a32 32 0 0 1 32-32m160-64a32 32 0 0 1 32 32v128a32 32 0 0 1-64 0V416a32 32 0 0 1 32-32m160-64a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V352a32 32 0 0 1 32-32"})]))}),iG=tG,nG=hg({name:"DataBoard",__name:"data-board",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M32 128h960v64H32z"}),ff("path",{fill:"currentColor",d:"M192 192v512h640V192zm-64-64h768v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32z"}),ff("path",{fill:"currentColor",d:"M322.176 960H248.32l144.64-250.56 55.424 32zm453.888 0h-73.856L576 741.44l55.424-32z"})]))}),sG=nG,rG=hg({name:"DataLine",__name:"data-line",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M359.168 768H160a32 32 0 0 1-32-32V192H64a32 32 0 0 1 0-64h896a32 32 0 1 1 0 64h-64v544a32 32 0 0 1-32 32H665.216l110.848 192h-73.856L591.36 768H433.024L322.176 960H248.32zM832 192H192v512h640zM342.656 534.656a32 32 0 1 1-45.312-45.312L444.992 341.76l125.44 94.08L679.04 300.032a32 32 0 1 1 49.92 39.936L581.632 524.224 451.008 426.24 342.656 534.592z"})]))}),aG=rG,oG=hg({name:"DeleteFilled",__name:"delete-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"})]))}),lG=oG,AG=hg({name:"DeleteLocation",__name:"delete-location",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M288 896h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),ff("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),ff("path",{fill:"currentColor",d:"M384 384h256q32 0 32 32t-32 32H384q-32 0-32-32t32-32"})]))}),cG=AG,uG=hg({name:"Delete",__name:"delete",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}),hG=uG,dG=hg({name:"Dessert",__name:"dessert",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 416v-48a144 144 0 0 1 168.64-141.888 224.128 224.128 0 0 1 430.72 0A144 144 0 0 1 896 368v48a384 384 0 0 1-352 382.72V896h-64v-97.28A384 384 0 0 1 128 416m287.104-32.064h193.792a143.808 143.808 0 0 1 58.88-132.736 160.064 160.064 0 0 0-311.552 0 143.808 143.808 0 0 1 58.88 132.8zm-72.896 0a72 72 0 1 0-140.48 0h140.48m339.584 0h140.416a72 72 0 1 0-140.48 0zM512 736a320 320 0 0 0 318.4-288.064H193.6A320 320 0 0 0 512 736M384 896.064h256a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64"})]))}),gG=dG,pG=hg({name:"Discount",__name:"discount",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M224 704h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0L224 318.336zm0 64v128h576V768zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0"}),ff("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}),fG=pG,mG=hg({name:"DishDot",__name:"dish-dot",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m384.064 274.56.064-50.688A128 128 0 0 1 512.128 96c70.528 0 127.68 57.152 127.68 127.68v50.752A448.192 448.192 0 0 1 955.392 768H68.544A448.192 448.192 0 0 1 384 274.56zM96 832h832a32 32 0 1 1 0 64H96a32 32 0 1 1 0-64m32-128h768a384 384 0 1 0-768 0m447.808-448v-32.32a63.68 63.68 0 0 0-63.68-63.68 64 64 0 0 0-64 63.936V256z"})]))}),CG=mG,IG=hg({name:"Dish",__name:"dish",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M480 257.152V192h-96a32 32 0 0 1 0-64h256a32 32 0 1 1 0 64h-96v65.152A448 448 0 0 1 955.52 768H68.48A448 448 0 0 1 480 257.152M128 704h768a384 384 0 1 0-768 0M96 832h832a32 32 0 1 1 0 64H96a32 32 0 1 1 0-64"})]))}),vG=IG,BG=hg({name:"DocumentAdd",__name:"document-add",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m320 512V448h64v128h128v64H544v128h-64V640H352v-64z"})]))}),yG=BG,bG=hg({name:"DocumentChecked",__name:"document-checked",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M805.504 320 640 154.496V320zM832 384H576V128H192v768h640zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m318.4 582.144 180.992-180.992L704.64 510.4 478.4 736.64 320 578.304l45.248-45.312z"})]))}),EG=bG,wG=hg({name:"DocumentCopy",__name:"document-copy",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"})]))}),QG=wG,_G=hg({name:"DocumentDelete",__name:"document-delete",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M805.504 320 640 154.496V320zM832 384H576V128H192v768h640zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m308.992 546.304-90.496-90.624 45.248-45.248 90.56 90.496 90.496-90.432 45.248 45.248-90.496 90.56 90.496 90.496-45.248 45.248-90.496-90.496-90.56 90.496-45.248-45.248 90.496-90.496z"})]))}),SG=_G,xG=hg({name:"DocumentRemove",__name:"document-remove",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M805.504 320 640 154.496V320zM832 384H576V128H192v768h640zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m192 512h320v64H352z"})]))}),kG=xG,DG=hg({name:"Document",__name:"document",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}),FG=DG,TG=hg({name:"Download",__name:"download",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}),MG=TG,RG=hg({name:"Drizzling",__name:"drizzling",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m739.328 291.328-35.2-6.592-12.8-33.408a192.064 192.064 0 0 0-365.952 23.232l-9.92 40.896-41.472 7.04a176.32 176.32 0 0 0-146.24 173.568c0 97.28 78.72 175.936 175.808 175.936h400a192 192 0 0 0 35.776-380.672zM959.552 480a256 256 0 0 1-256 256h-400A239.808 239.808 0 0 1 63.744 496.192a240.32 240.32 0 0 1 199.488-236.8 256.128 256.128 0 0 1 487.872-30.976A256.064 256.064 0 0 1 959.552 480M288 800h64v64h-64zm192 0h64v64h-64zm-96 96h64v64h-64zm192 0h64v64h-64zm96-96h64v64h-64z"})]))}),NG=RG,LG=hg({name:"EditPen",__name:"edit-pen",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64h-448z"})]))}),UG=LG,HG=hg({name:"Edit",__name:"edit",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),ff("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}),PG=HG,OG=hg({name:"ElemeFilled",__name:"eleme-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M176 64h672c61.824 0 112 50.176 112 112v672a112 112 0 0 1-112 112H176A112 112 0 0 1 64 848V176c0-61.824 50.176-112 112-112m150.528 173.568c-152.896 99.968-196.544 304.064-97.408 456.96a330.688 330.688 0 0 0 456.96 96.64c9.216-5.888 17.6-11.776 25.152-18.56a18.24 18.24 0 0 0 4.224-24.32L700.352 724.8a47.552 47.552 0 0 0-65.536-14.272A234.56 234.56 0 0 1 310.592 641.6C240 533.248 271.104 387.968 379.456 316.48a234.304 234.304 0 0 1 276.352 15.168c1.664.832 2.56 2.56 3.392 4.224 5.888 8.384 3.328 19.328-5.12 25.216L456.832 489.6a47.552 47.552 0 0 0-14.336 65.472l16 24.384c5.888 8.384 16.768 10.88 25.216 5.056l308.224-199.936a19.584 19.584 0 0 0 6.72-23.488v-.896c-4.992-9.216-10.048-17.6-15.104-26.88-99.968-151.168-304.064-194.88-456.96-95.744zM786.88 504.704l-62.208 40.32c-8.32 5.888-10.88 16.768-4.992 25.216L760 632.32c5.888 8.448 16.768 11.008 25.152 5.12l31.104-20.16a55.36 55.36 0 0 0 16-76.48l-20.224-31.04a19.52 19.52 0 0 0-25.152-5.12z"})]))}),GG=OG,KG=hg({name:"Eleme",__name:"eleme",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M300.032 188.8c174.72-113.28 408-63.36 522.24 109.44 5.76 10.56 11.52 20.16 17.28 30.72v.96a22.4 22.4 0 0 1-7.68 26.88l-352.32 228.48c-9.6 6.72-22.08 3.84-28.8-5.76l-18.24-27.84a54.336 54.336 0 0 1 16.32-74.88l225.6-146.88c9.6-6.72 12.48-19.2 5.76-28.8-.96-1.92-1.92-3.84-3.84-4.8a267.84 267.84 0 0 0-315.84-17.28c-123.84 81.6-159.36 247.68-78.72 371.52a268.096 268.096 0 0 0 370.56 78.72 54.336 54.336 0 0 1 74.88 16.32l17.28 26.88c5.76 9.6 3.84 21.12-4.8 27.84-8.64 7.68-18.24 14.4-28.8 21.12a377.92 377.92 0 0 1-522.24-110.4c-113.28-174.72-63.36-408 111.36-522.24zm526.08 305.28a22.336 22.336 0 0 1 28.8 5.76l23.04 35.52a63.232 63.232 0 0 1-18.24 87.36l-35.52 23.04c-9.6 6.72-22.08 3.84-28.8-5.76l-46.08-71.04c-6.72-9.6-3.84-22.08 5.76-28.8l71.04-46.08z"})]))}),qG=KG,YG=hg({name:"ElementPlus",__name:"element-plus",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M839.7 734.7c0 33.3-17.9 41-17.9 41S519.7 949.8 499.2 960c-10.2 5.1-20.5 5.1-30.7 0 0 0-314.9-184.3-325.1-192-5.1-5.1-10.2-12.8-12.8-20.5V368.6c0-17.9 20.5-28.2 20.5-28.2L466 158.6c12.8-5.1 25.6-5.1 38.4 0 0 0 279 161.3 309.8 179.2 17.9 7.7 28.2 25.6 25.6 46.1-.1-5-.1 317.5-.1 350.8M714.2 371.2c-64-35.8-217.6-125.4-217.6-125.4-7.7-5.1-20.5-5.1-30.7 0L217.6 389.1s-17.9 10.2-17.9 23v297c0 5.1 5.1 12.8 7.7 17.9 7.7 5.1 256 148.5 256 148.5 7.7 5.1 17.9 5.1 25.6 0 15.4-7.7 250.9-145.9 250.9-145.9s12.8-5.1 12.8-30.7v-74.2l-276.5 169v-64c0-17.9 7.7-30.7 20.5-46.1L745 535c5.1-7.7 10.2-20.5 10.2-30.7v-66.6l-279 169v-69.1c0-15.4 5.1-30.7 17.9-38.4l220.1-128zM919 135.7c0-5.1-5.1-7.7-7.7-7.7h-58.9V66.6c0-5.1-5.1-5.1-10.2-5.1l-30.7 5.1c-5.1 0-5.1 2.6-5.1 5.1V128h-56.3c-5.1 0-5.1 5.1-7.7 5.1v38.4h69.1v64c0 5.1 5.1 5.1 10.2 5.1l30.7-5.1c5.1 0 5.1-2.6 5.1-5.1v-56.3h64l-2.5-38.4z"})]))}),VG=YG,WG=hg({name:"Expand",__name:"expand",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}),jG=WG,JG=hg({name:"Failed",__name:"failed",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m557.248 608 135.744-135.744-45.248-45.248-135.68 135.744-135.808-135.68-45.248 45.184L466.752 608l-135.68 135.68 45.184 45.312L512 653.248l135.744 135.744 45.248-45.248L557.312 608zM704 192h160v736H160V192h160v64h384zm-320 0V96h256v96z"})]))}),zG=JG,XG=hg({name:"Female",__name:"female",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 640a256 256 0 1 0 0-512 256 256 0 0 0 0 512m0 64a320 320 0 1 1 0-640 320 320 0 0 1 0 640"}),ff("path",{fill:"currentColor",d:"M512 640q32 0 32 32v256q0 32-32 32t-32-32V672q0-32 32-32"}),ff("path",{fill:"currentColor",d:"M352 800h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32"})]))}),$G=XG,ZG=hg({name:"Files",__name:"files",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 384v448h768V384zm-32-64h832a32 32 0 0 1 32 32v512a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V352a32 32 0 0 1 32-32m64-128h704v64H160zm96-128h512v64H256z"})]))}),eK=ZG,tK=hg({name:"Film",__name:"film",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),ff("path",{fill:"currentColor",d:"M320 288V128h64v352h256V128h64v160h160v64H704v128h160v64H704v128h160v64H704v160h-64V544H384v352h-64V736H128v-64h192V544H128v-64h192V352H128v-64z"})]))}),iK=tK,nK=hg({name:"Filter",__name:"filter",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 1 0-49.536-40.576l-288 352A32 32 0 0 0 576 512v300.224l-128 64V512a32 32 0 0 0-7.232-20.288L195.52 192H704a32 32 0 1 0 0-64H128a32 32 0 0 0-24.768 52.288z"})]))}),sK=nK,rK=hg({name:"Finished",__name:"finished",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2l203.968 152.96zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"})]))}),aK=rK,oK=hg({name:"FirstAidKit",__name:"first-aid-kit",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M192 256a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64zm0-64h640a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H192A128 128 0 0 1 64 768V320a128 128 0 0 1 128-128"}),ff("path",{fill:"currentColor",d:"M544 512h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96v-96a32 32 0 0 1 64 0zM352 128v64h320v-64zm-32-64h384a32 32 0 0 1 32 32v128a32 32 0 0 1-32 32H320a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"})]))}),lK=oK,AK=hg({name:"Flag",__name:"flag",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M288 128h608L736 384l160 256H288v320h-96V64h96z"})]))}),cK=AK,uK=hg({name:"Fold",__name:"fold",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M896 192H128v128h768zm0 256H384v128h512zm0 256H128v128h768zM320 384 128 512l192 128z"})]))}),hK=uK,dK=hg({name:"FolderAdd",__name:"folder-add",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m384 416V416h64v128h128v64H544v128h-64V608H352v-64z"})]))}),gK=dK,pK=hg({name:"FolderChecked",__name:"folder-checked",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m414.08 502.144 180.992-180.992L736.32 494.4 510.08 720.64l-158.4-158.336 45.248-45.312z"})]))}),fK=pK,mK=hg({name:"FolderDelete",__name:"folder-delete",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m370.752 448-90.496-90.496 45.248-45.248L512 530.752l90.496-90.496 45.248 45.248L557.248 576l90.496 90.496-45.248 45.248L512 621.248l-90.496 90.496-45.248-45.248z"})]))}),CK=mK,IK=hg({name:"FolderOpened",__name:"folder-opened",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896"})]))}),vK=IK,BK=hg({name:"FolderRemove",__name:"folder-remove",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32m256 416h320v64H352z"})]))}),yK=BK,bK=hg({name:"Folder",__name:"folder",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32"})]))}),EK=bK,wK=hg({name:"Food",__name:"food",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 352.576V352a288 288 0 0 1 491.072-204.224 192 192 0 0 1 274.24 204.48 64 64 0 0 1 57.216 74.24C921.6 600.512 850.048 710.656 736 756.992V800a96 96 0 0 1-96 96H384a96 96 0 0 1-96-96v-43.008c-114.048-46.336-185.6-156.48-214.528-330.496A64 64 0 0 1 128 352.64zm64-.576h64a160 160 0 0 1 320 0h64a224 224 0 0 0-448 0m128 0h192a96 96 0 0 0-192 0m439.424 0h68.544A128.256 128.256 0 0 0 704 192c-15.36 0-29.952 2.688-43.52 7.616 11.328 18.176 20.672 37.76 27.84 58.304A64.128 64.128 0 0 1 759.424 352M672 768H352v32a32 32 0 0 0 32 32h256a32 32 0 0 0 32-32zm-342.528-64h365.056c101.504-32.64 165.76-124.928 192.896-288H136.576c27.136 163.072 91.392 255.36 192.896 288"})]))}),QK=wK,_K=hg({name:"Football",__name:"football",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 960a448 448 0 1 1 0-896 448 448 0 0 1 0 896m0-64a384 384 0 1 0 0-768 384 384 0 0 0 0 768"}),ff("path",{fill:"currentColor",d:"M186.816 268.288c16-16.384 31.616-31.744 46.976-46.08 17.472 30.656 39.808 58.112 65.984 81.28l-32.512 56.448a385.984 385.984 0 0 1-80.448-91.648zm653.696-5.312a385.92 385.92 0 0 1-83.776 96.96l-32.512-56.384a322.923 322.923 0 0 0 68.48-85.76c15.552 14.08 31.488 29.12 47.808 45.184zM465.984 445.248l11.136-63.104a323.584 323.584 0 0 0 69.76 0l11.136 63.104a387.968 387.968 0 0 1-92.032 0m-62.72-12.8A381.824 381.824 0 0 1 320 396.544l32-55.424a319.885 319.885 0 0 0 62.464 27.712l-11.2 63.488zm300.8-35.84a381.824 381.824 0 0 1-83.328 35.84l-11.2-63.552A319.885 319.885 0 0 0 672 341.184l32 55.424zm-520.768 364.8a385.92 385.92 0 0 1 83.968-97.28l32.512 56.32c-26.88 23.936-49.856 52.352-67.52 84.032-16-13.44-32.32-27.712-48.96-43.072zm657.536.128a1442.759 1442.759 0 0 1-49.024 43.072 321.408 321.408 0 0 0-67.584-84.16l32.512-56.32c33.216 27.456 61.696 60.352 84.096 97.408zM465.92 578.752a387.968 387.968 0 0 1 92.032 0l-11.136 63.104a323.584 323.584 0 0 0-69.76 0zm-62.72 12.8 11.2 63.552a319.885 319.885 0 0 0-62.464 27.712L320 627.392a381.824 381.824 0 0 1 83.264-35.84zm300.8 35.84-32 55.424a318.272 318.272 0 0 0-62.528-27.712l11.2-63.488c29.44 8.64 57.28 20.736 83.264 35.776z"})]))}),SK=_K,xK=hg({name:"ForkSpoon",__name:"fork-spoon",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 410.304V96a32 32 0 0 1 64 0v314.304a96 96 0 0 0 64-90.56V96a32 32 0 0 1 64 0v223.744a160 160 0 0 1-128 156.8V928a32 32 0 1 1-64 0V476.544a160 160 0 0 1-128-156.8V96a32 32 0 0 1 64 0v223.744a96 96 0 0 0 64 90.56zM672 572.48C581.184 552.128 512 446.848 512 320c0-141.44 85.952-256 192-256s192 114.56 192 256c0 126.848-69.184 232.128-160 252.48V928a32 32 0 1 1-64 0zM704 512c66.048 0 128-82.56 128-192s-61.952-192-128-192-128 82.56-128 192 61.952 192 128 192"})]))}),kK=xK,DK=hg({name:"Fries",__name:"fries",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M608 224v-64a32 32 0 0 0-64 0v336h26.88A64 64 0 0 0 608 484.096zm101.12 160A64 64 0 0 0 672 395.904V384h64V224a32 32 0 1 0-64 0v160zm74.88 0a92.928 92.928 0 0 1 91.328 110.08l-60.672 323.584A96 96 0 0 1 720.32 896H303.68a96 96 0 0 1-94.336-78.336L148.672 494.08A92.928 92.928 0 0 1 240 384h-16V224a96 96 0 0 1 188.608-25.28A95.744 95.744 0 0 1 480 197.44V160a96 96 0 0 1 188.608-25.28A96 96 0 0 1 800 224v160zM670.784 512a128 128 0 0 1-99.904 48H453.12a128 128 0 0 1-99.84-48H352v-1.536a128.128 128.128 0 0 1-9.984-14.976L314.88 448H240a28.928 28.928 0 0 0-28.48 34.304L241.088 640h541.824l29.568-157.696A28.928 28.928 0 0 0 784 448h-74.88l-27.136 47.488A132.405 132.405 0 0 1 672 510.464V512zM480 288a32 32 0 0 0-64 0v196.096A64 64 0 0 0 453.12 496H480zm-128 96V224a32 32 0 0 0-64 0v160zh-37.12A64 64 0 0 1 352 395.904zm-98.88 320 19.072 101.888A32 32 0 0 0 303.68 832h416.64a32 32 0 0 0 31.488-26.112L770.88 704z"})]))}),FK=DK,TK=hg({name:"FullScreen",__name:"full-screen",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}),MK=TK,RK=hg({name:"GobletFull",__name:"goblet-full",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 320h512c0-78.592-12.608-142.4-36.928-192h-434.24C269.504 192.384 256 256.256 256 320m503.936 64H264.064a256.128 256.128 0 0 0 495.872 0zM544 638.4V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96V638.4A320 320 0 0 1 192 320c0-85.632 21.312-170.944 64-256h512c42.688 64.32 64 149.632 64 256a320 320 0 0 1-288 318.4"})]))}),NK=RK,LK=hg({name:"GobletSquareFull",__name:"goblet-square-full",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 270.912c10.048 6.72 22.464 14.912 28.992 18.624a220.16 220.16 0 0 0 114.752 30.72c30.592 0 49.408-9.472 91.072-41.152l.64-.448c52.928-40.32 82.368-55.04 132.288-54.656 55.552.448 99.584 20.8 142.72 57.408l1.536 1.28V128H256v142.912zm.96 76.288C266.368 482.176 346.88 575.872 512 576c157.44.064 237.952-85.056 253.248-209.984a952.32 952.32 0 0 1-40.192-35.712c-32.704-27.776-63.36-41.92-101.888-42.24-31.552-.256-50.624 9.28-93.12 41.6l-.576.448c-52.096 39.616-81.024 54.208-129.792 54.208-54.784 0-100.48-13.376-142.784-37.056zM480 638.848C250.624 623.424 192 442.496 192 319.68V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32v224c0 122.816-58.624 303.68-288 318.912V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96z"})]))}),UK=LK,HK=hg({name:"GobletSquare",__name:"goblet-square",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M544 638.912V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96V638.848C250.624 623.424 192 442.496 192 319.68V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32v224c0 122.816-58.624 303.68-288 318.912M256 319.68c0 149.568 80 256.192 256 256.256C688.128 576 768 469.568 768 320V128H256z"})]))}),PK=HK,OK=hg({name:"Goblet",__name:"goblet",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M544 638.4V896h96a32 32 0 1 1 0 64H384a32 32 0 1 1 0-64h96V638.4A320 320 0 0 1 192 320c0-85.632 21.312-170.944 64-256h512c42.688 64.32 64 149.632 64 256a320 320 0 0 1-288 318.4M256 320a256 256 0 1 0 512 0c0-78.592-12.608-142.4-36.928-192h-434.24C269.504 192.384 256 256.256 256 320"})]))}),GK=OK,KK=hg({name:"GoldMedal",__name:"gold-medal",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m772.13 452.84 53.86-351.81c1.32-10.01-1.17-18.68-7.49-26.02S804.35 64 795.01 64H228.99v-.01h-.06c-9.33 0-17.15 3.67-23.49 11.01s-8.83 16.01-7.49 26.02l53.87 351.89C213.54 505.73 193.59 568.09 192 640c2 90.67 33.17 166.17 93.5 226.5S421.33 957.99 512 960c90.67-2 166.17-33.17 226.5-93.5 60.33-60.34 91.49-135.83 93.5-226.5-1.59-71.94-21.56-134.32-59.87-187.16zM640.01 128h117.02l-39.01 254.02c-20.75-10.64-40.74-19.73-59.94-27.28-5.92-3-11.95-5.8-18.08-8.41V128h.01zM576 128v198.76c-13.18-2.58-26.74-4.43-40.67-5.55-8.07-.8-15.85-1.2-23.33-1.2-10.54 0-21.09.66-31.64 1.96a359.844 359.844 0 0 0-32.36 4.79V128zm-192 0h.04v218.3c-6.22 2.66-12.34 5.5-18.36 8.56-19.13 7.54-39.02 16.6-59.66 27.16L267.01 128zm308.99 692.99c-48 48-108.33 73-180.99 75.01-72.66-2.01-132.99-27.01-180.99-75.01S258.01 712.66 256 640c2.01-72.66 27.01-132.99 75.01-180.99 19.67-19.67 41.41-35.47 65.22-47.41 38.33-15.04 71.15-23.92 98.44-26.65 5.07-.41 10.2-.7 15.39-.88.63-.01 1.28-.03 1.91-.03.66 0 1.35.03 2.02.04 5.11.17 10.15.46 15.13.86 27.4 2.71 60.37 11.65 98.91 26.79 23.71 11.93 45.36 27.69 64.96 47.29 48 48 73 108.33 75.01 180.99-2.01 72.65-27.01 132.98-75.01 180.98z"}),ff("path",{fill:"currentColor",d:"M544 480H416v64h64v192h-64v64h192v-64h-64z"})]))}),qK=KK,YK=hg({name:"GoodsFilled",__name:"goods-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M192 352h640l64 544H128zm128 224h64V448h-64zm320 0h64V448h-64zM384 288h-64a192 192 0 1 1 384 0h-64a128 128 0 1 0-256 0"})]))}),VK=YK,WK=hg({name:"Goods",__name:"goods",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M320 288v-22.336C320 154.688 405.504 64 512 64s192 90.688 192 201.664v22.4h131.072a32 32 0 0 1 31.808 28.8l57.6 576a32 32 0 0 1-31.808 35.2H131.328a32 32 0 0 1-31.808-35.2l57.6-576a32 32 0 0 1 31.808-28.8H320zm64 0h256v-22.336C640 189.248 582.272 128 512 128c-70.272 0-128 61.248-128 137.664v22.4zm-64 64H217.92l-51.2 512h690.56l-51.264-512H704v96a32 32 0 1 1-64 0v-96H384v96a32 32 0 0 1-64 0z"})]))}),jK=WK,JK=hg({name:"Grape",__name:"grape",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M544 195.2a160 160 0 0 1 96 60.8 160 160 0 1 1 146.24 254.976 160 160 0 0 1-128 224 160 160 0 1 1-292.48 0 160 160 0 0 1-128-224A160 160 0 1 1 384 256a160 160 0 0 1 96-60.8V128h-64a32 32 0 0 1 0-64h192a32 32 0 0 1 0 64h-64zM512 448a96 96 0 1 0 0-192 96 96 0 0 0 0 192m-256 0a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128 224a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128 224a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128-224a96 96 0 1 0 0-192 96 96 0 0 0 0 192m128-224a96 96 0 1 0 0-192 96 96 0 0 0 0 192"})]))}),zK=JK,XK=hg({name:"Grid",__name:"grid",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"})]))}),$K=XK,ZK=hg({name:"Guide",__name:"guide",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M640 608h-64V416h64zm0 160v160a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V768h64v128h128V768zM384 608V416h64v192zm256-352h-64V128H448v128h-64V96a32 32 0 0 1 32-32h192a32 32 0 0 1 32 32z"}),ff("path",{fill:"currentColor",d:"m220.8 256-71.232 80 71.168 80H768V256H220.8zm-14.4-64H800a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32H206.4a32 32 0 0 1-23.936-10.752l-99.584-112a32 32 0 0 1 0-42.496l99.584-112A32 32 0 0 1 206.4 192m678.784 496-71.104 80H266.816V608h547.2l71.168 80zm-56.768-144H234.88a32 32 0 0 0-32 32v224a32 32 0 0 0 32 32h593.6a32 32 0 0 0 23.936-10.752l99.584-112a32 32 0 0 0 0-42.496l-99.584-112A32 32 0 0 0 828.48 544z"})]))}),eq=ZK,tq=hg({name:"Handbag",__name:"handbag",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M887.01 264.99c-6-5.99-13.67-8.99-23.01-8.99H704c-1.34-54.68-20.01-100.01-56-136s-81.32-54.66-136-56c-54.68 1.34-100.01 20.01-136 56s-54.66 81.32-56 136H160c-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.67-8.99 23.01v640c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V288c0-9.35-2.99-17.02-8.99-23.01M421.5 165.5c24.32-24.34 54.49-36.84 90.5-37.5 35.99.68 66.16 13.18 90.5 37.5s36.84 54.49 37.5 90.5H384c.68-35.99 13.18-66.16 37.5-90.5M832 896H192V320h128v128h64V320h256v128h64V320h128z"})]))}),iq=tq,nq=hg({name:"Headset",__name:"headset",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M896 529.152V512a384 384 0 1 0-768 0v17.152A128 128 0 0 1 320 640v128a128 128 0 1 1-256 0V512a448 448 0 1 1 896 0v256a128 128 0 1 1-256 0V640a128 128 0 0 1 192-110.848M896 640a64 64 0 0 0-128 0v128a64 64 0 0 0 128 0zm-768 0v128a64 64 0 0 0 128 0V640a64 64 0 1 0-128 0"})]))}),sq=nq,rq=hg({name:"HelpFilled",__name:"help-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M926.784 480H701.312A192.512 192.512 0 0 0 544 322.688V97.216A416.064 416.064 0 0 1 926.784 480m0 64A416.064 416.064 0 0 1 544 926.784V701.312A192.512 192.512 0 0 0 701.312 544zM97.28 544h225.472A192.512 192.512 0 0 0 480 701.312v225.472A416.064 416.064 0 0 1 97.216 544zm0-64A416.064 416.064 0 0 1 480 97.216v225.472A192.512 192.512 0 0 0 322.688 480H97.216z"})]))}),aq=rq,oq=hg({name:"Help",__name:"help",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m759.936 805.248-90.944-91.008A254.912 254.912 0 0 1 512 768a254.912 254.912 0 0 1-156.992-53.76l-90.944 91.008A382.464 382.464 0 0 0 512 896c94.528 0 181.12-34.176 247.936-90.752m45.312-45.312A382.464 382.464 0 0 0 896 512c0-94.528-34.176-181.12-90.752-247.936l-91.008 90.944C747.904 398.4 768 452.864 768 512c0 59.136-20.096 113.6-53.76 156.992l91.008 90.944zm-45.312-541.184A382.464 382.464 0 0 0 512 128c-94.528 0-181.12 34.176-247.936 90.752l90.944 91.008A254.912 254.912 0 0 1 512 256c59.136 0 113.6 20.096 156.992 53.76l90.944-91.008zm-541.184 45.312A382.464 382.464 0 0 0 128 512c0 94.528 34.176 181.12 90.752 247.936l91.008-90.944A254.912 254.912 0 0 1 256 512c0-59.136 20.096-113.6 53.76-156.992zm417.28 394.496a194.56 194.56 0 0 0 22.528-22.528C686.912 602.56 704 559.232 704 512a191.232 191.232 0 0 0-67.968-146.56A191.296 191.296 0 0 0 512 320a191.232 191.232 0 0 0-146.56 67.968C337.088 421.44 320 464.768 320 512a191.232 191.232 0 0 0 67.968 146.56C421.44 686.912 464.768 704 512 704c47.296 0 90.56-17.088 124.032-45.44zM512 960a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}),lq=oq,Aq=hg({name:"Hide",__name:"hide",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),ff("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}),cq=Aq,uq=hg({name:"Histogram",__name:"histogram",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M416 896V128h192v768zm-288 0V448h192v448zm576 0V320h192v576z"})]))}),hq=uq,dq=hg({name:"HomeFilled",__name:"home-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 128 128 447.936V896h255.936V640H640v256h255.936V447.936z"})]))}),gq=dq,pq=hg({name:"HotWater",__name:"hot-water",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M273.067 477.867h477.866V409.6H273.067zm0 68.266v51.2A187.733 187.733 0 0 0 460.8 785.067h102.4a187.733 187.733 0 0 0 187.733-187.734v-51.2H273.067zm-34.134-204.8h546.134a34.133 34.133 0 0 1 34.133 34.134v221.866a256 256 0 0 1-256 256H460.8a256 256 0 0 1-256-256V375.467a34.133 34.133 0 0 1 34.133-34.134zM512 34.133a34.133 34.133 0 0 1 34.133 34.134v170.666a34.133 34.133 0 0 1-68.266 0V68.267A34.133 34.133 0 0 1 512 34.133zM375.467 102.4a34.133 34.133 0 0 1 34.133 34.133v102.4a34.133 34.133 0 0 1-68.267 0v-102.4a34.133 34.133 0 0 1 34.134-34.133m273.066 0a34.133 34.133 0 0 1 34.134 34.133v102.4a34.133 34.133 0 1 1-68.267 0v-102.4a34.133 34.133 0 0 1 34.133-34.133M170.667 921.668h682.666a34.133 34.133 0 1 1 0 68.267H170.667a34.133 34.133 0 1 1 0-68.267z"})]))}),fq=pq,mq=hg({name:"House",__name:"house",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M192 413.952V896h640V413.952L512 147.328zM139.52 374.4l352-293.312a32 32 0 0 1 40.96 0l352 293.312A32 32 0 0 1 896 398.976V928a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V398.976a32 32 0 0 1 11.52-24.576"})]))}),Cq=mq,Iq=hg({name:"IceCreamRound",__name:"ice-cream-round",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m308.352 489.344 226.304 226.304a32 32 0 0 0 45.248 0L783.552 512A192 192 0 1 0 512 240.448L308.352 444.16a32 32 0 0 0 0 45.248zm135.744 226.304L308.352 851.392a96 96 0 0 1-135.744-135.744l135.744-135.744-45.248-45.248a96 96 0 0 1 0-135.808L466.752 195.2A256 256 0 0 1 828.8 557.248L625.152 760.96a96 96 0 0 1-135.808 0l-45.248-45.248zM398.848 670.4 353.6 625.152 217.856 760.896a32 32 0 0 0 45.248 45.248zm248.96-384.64a32 32 0 0 1 0 45.248L466.624 512a32 32 0 1 1-45.184-45.248l180.992-181.056a32 32 0 0 1 45.248 0zm90.496 90.496a32 32 0 0 1 0 45.248L557.248 602.496A32 32 0 1 1 512 557.248l180.992-180.992a32 32 0 0 1 45.312 0z"})]))}),vq=Iq,Bq=hg({name:"IceCreamSquare",__name:"ice-cream-square",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M416 640h256a32 32 0 0 0 32-32V160a32 32 0 0 0-32-32H352a32 32 0 0 0-32 32v448a32 32 0 0 0 32 32zm192 64v160a96 96 0 0 1-192 0V704h-64a96 96 0 0 1-96-96V160a96 96 0 0 1 96-96h320a96 96 0 0 1 96 96v448a96 96 0 0 1-96 96zm-64 0h-64v160a32 32 0 1 0 64 0z"})]))}),yq=Bq,bq=hg({name:"IceCream",__name:"ice-cream",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128.64 448a208 208 0 0 1 193.536-191.552 224 224 0 0 1 445.248 15.488A208.128 208.128 0 0 1 894.784 448H896L548.8 983.68a32 32 0 0 1-53.248.704L128 448zm64.256 0h286.208a144 144 0 0 0-286.208 0zm351.36 0h286.272a144 144 0 0 0-286.272 0zm-294.848 64 271.808 396.608L778.24 512H249.408zM511.68 352.64a207.872 207.872 0 0 1 189.184-96.192 160 160 0 0 0-314.752 5.632c52.608 12.992 97.28 46.08 125.568 90.56"})]))}),Eq=bq,wq=hg({name:"IceDrink",__name:"ice-drink",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 448v128h239.68l16.064-128zm-64 0H256.256l16.064 128H448zm64-255.36V384h247.744A256.128 256.128 0 0 0 512 192.64m-64 8.064A256.448 256.448 0 0 0 264.256 384H448zm64-72.064A320.128 320.128 0 0 1 825.472 384H896a32 32 0 1 1 0 64h-64v1.92l-56.96 454.016A64 64 0 0 1 711.552 960H312.448a64 64 0 0 1-63.488-56.064L192 449.92V448h-64a32 32 0 0 1 0-64h70.528A320.384 320.384 0 0 1 448 135.04V96a96 96 0 0 1 96-96h128a32 32 0 1 1 0 64H544a32 32 0 0 0-32 32zM743.68 640H280.32l32.128 256h399.104z"})]))}),Qq=wq,_q=hg({name:"IceTea",__name:"ice-tea",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M197.696 259.648a320.128 320.128 0 0 1 628.608 0A96 96 0 0 1 896 352v64a96 96 0 0 1-71.616 92.864l-49.408 395.072A64 64 0 0 1 711.488 960H312.512a64 64 0 0 1-63.488-56.064l-49.408-395.072A96 96 0 0 1 128 416v-64a96 96 0 0 1 69.696-92.352M264.064 256h495.872a256.128 256.128 0 0 0-495.872 0m495.424 256H264.512l48 384h398.976zM224 448h576a32 32 0 0 0 32-32v-64a32 32 0 0 0-32-32H224a32 32 0 0 0-32 32v64a32 32 0 0 0 32 32m160 192h64v64h-64zm192 64h64v64h-64zm-128 64h64v64h-64zm64-192h64v64h-64z"})]))}),Sq=_q,xq=hg({name:"InfoFilled",__name:"info-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}),kq=xq,Dq=hg({name:"Iphone",__name:"iphone",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M224 768v96.064a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V768zm0-64h576V160a64 64 0 0 0-64-64H288a64 64 0 0 0-64 64zm32 288a96 96 0 0 1-96-96V128a96 96 0 0 1 96-96h512a96 96 0 0 1 96 96v768a96 96 0 0 1-96 96zm304-144a48 48 0 1 1-96 0 48 48 0 0 1 96 0"})]))}),Fq=Dq,Tq=hg({name:"Key",__name:"key",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}),Mq=Tq,Rq=hg({name:"KnifeFork",__name:"knife-fork",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 410.56V96a32 32 0 0 1 64 0v314.56A96 96 0 0 0 384 320V96a32 32 0 0 1 64 0v224a160 160 0 0 1-128 156.8V928a32 32 0 1 1-64 0V476.8A160 160 0 0 1 128 320V96a32 32 0 0 1 64 0v224a96 96 0 0 0 64 90.56m384-250.24V544h126.72c-3.328-78.72-12.928-147.968-28.608-207.744-14.336-54.528-46.848-113.344-98.112-175.872zM640 608v320a32 32 0 1 1-64 0V64h64c85.312 89.472 138.688 174.848 160 256 21.312 81.152 32 177.152 32 288z"})]))}),Nq=Rq,Lq=hg({name:"Lightning",__name:"lightning",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M288 671.36v64.128A239.808 239.808 0 0 1 63.744 496.192a240.32 240.32 0 0 1 199.488-236.8 256.128 256.128 0 0 1 487.872-30.976A256.064 256.064 0 0 1 736 734.016v-64.768a192 192 0 0 0 3.328-377.92l-35.2-6.592-12.8-33.408a192.064 192.064 0 0 0-365.952 23.232l-9.92 40.896-41.472 7.04a176.32 176.32 0 0 0-146.24 173.568c0 91.968 70.464 167.36 160.256 175.232z"}),ff("path",{fill:"currentColor",d:"M416 736a32 32 0 0 1-27.776-47.872l128-224a32 32 0 1 1 55.552 31.744L471.168 672H608a32 32 0 0 1 27.776 47.872l-128 224a32 32 0 1 1-55.68-31.744L552.96 736z"})]))}),Uq=Lq,Hq=hg({name:"Link",__name:"link",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M715.648 625.152 670.4 579.904l90.496-90.56c75.008-74.944 85.12-186.368 22.656-248.896-62.528-62.464-173.952-52.352-248.96 22.656L444.16 353.6l-45.248-45.248 90.496-90.496c100.032-99.968 251.968-110.08 339.456-22.656 87.488 87.488 77.312 239.424-22.656 339.456l-90.496 90.496zm-90.496 90.496-90.496 90.496C434.624 906.112 282.688 916.224 195.2 828.8c-87.488-87.488-77.312-239.424 22.656-339.456l90.496-90.496 45.248 45.248-90.496 90.56c-75.008 74.944-85.12 186.368-22.656 248.896 62.528 62.464 173.952 52.352 248.96-22.656l90.496-90.496zm0-362.048 45.248 45.248L398.848 670.4 353.6 625.152z"})]))}),Pq=Hq,Oq=hg({name:"List",__name:"list",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M704 192h160v736H160V192h160v64h384zM288 512h448v-64H288zm0 256h448v-64H288zm96-576V96h256v96z"})]))}),Gq=Oq,Kq=hg({name:"Loading",__name:"loading",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}),qq=Kq,Yq=hg({name:"LocationFilled",__name:"location-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 928c23.936 0 117.504-68.352 192.064-153.152C803.456 661.888 864 535.808 864 416c0-189.632-155.84-320-352-320S160 226.368 160 416c0 120.32 60.544 246.4 159.936 359.232C394.432 859.84 488 928 512 928m0-435.2a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 140.8a204.8 204.8 0 1 1 0-409.6 204.8 204.8 0 0 1 0 409.6"})]))}),Vq=Yq,Wq=hg({name:"LocationInformation",__name:"location-information",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M288 896h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"}),ff("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),ff("path",{fill:"currentColor",d:"M512 512a96 96 0 1 0 0-192 96 96 0 0 0 0 192m0 64a160 160 0 1 1 0-320 160 160 0 0 1 0 320"})]))}),jq=Wq,Jq=hg({name:"Location",__name:"location",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),ff("path",{fill:"currentColor",d:"M512 512a96 96 0 1 0 0-192 96 96 0 0 0 0 192m0 64a160 160 0 1 1 0-320 160 160 0 0 1 0 320"})]))}),zq=Jq,Xq=hg({name:"Lock",__name:"lock",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),ff("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}),$q=Xq,Zq=hg({name:"Lollipop",__name:"lollipop",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M513.28 448a64 64 0 1 1 76.544 49.728A96 96 0 0 0 768 448h64a160 160 0 0 1-320 0zm-126.976-29.696a256 256 0 1 0 43.52-180.48A256 256 0 0 1 832 448h-64a192 192 0 0 0-381.696-29.696m105.664 249.472L285.696 874.048a96 96 0 0 1-135.68-135.744l206.208-206.272a320 320 0 1 1 135.744 135.744zm-54.464-36.032a321.92 321.92 0 0 1-45.248-45.248L195.2 783.552a32 32 0 1 0 45.248 45.248l197.056-197.12z"})]))}),eY=Zq,tY=hg({name:"MagicStick",__name:"magic-stick",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64h64v192h-64zm0 576h64v192h-64zM160 480v-64h192v64zm576 0v-64h192v64zM249.856 199.04l45.248-45.184L430.848 289.6 385.6 334.848 249.856 199.104zM657.152 606.4l45.248-45.248 135.744 135.744-45.248 45.248zM114.048 923.2 68.8 877.952l316.8-316.8 45.248 45.248zM702.4 334.848 657.152 289.6l135.744-135.744 45.248 45.248z"})]))}),iY=tY,nY=hg({name:"Magnet",__name:"magnet",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M832 320V192H704v320a192 192 0 1 1-384 0V192H192v128h128v64H192v128a320 320 0 0 0 640 0V384H704v-64zM640 512V128h256v384a384 384 0 1 1-768 0V128h256v384a128 128 0 1 0 256 0"})]))}),sY=nY,rY=hg({name:"Male",__name:"male",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M399.5 849.5a225 225 0 1 0 0-450 225 225 0 0 0 0 450m0 56.25a281.25 281.25 0 1 1 0-562.5 281.25 281.25 0 0 1 0 562.5m253.125-787.5h225q28.125 0 28.125 28.125T877.625 174.5h-225q-28.125 0-28.125-28.125t28.125-28.125"}),ff("path",{fill:"currentColor",d:"M877.625 118.25q28.125 0 28.125 28.125v225q0 28.125-28.125 28.125T849.5 371.375v-225q0-28.125 28.125-28.125"}),ff("path",{fill:"currentColor",d:"M604.813 458.9 565.1 419.131l292.613-292.668 39.825 39.824z"})]))}),aY=rY,oY=hg({name:"Management",__name:"management",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M576 128v288l96-96 96 96V128h128v768H320V128zm-448 0h128v768H128z"})]))}),lY=oY,AY=hg({name:"MapLocation",__name:"map-location",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),ff("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256m345.6 192L960 960H672v-64H352v64H64l102.4-256zm-68.928 0H235.328l-76.8 192h706.944z"})]))}),cY=AY,uY=hg({name:"Medal",__name:"medal",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 896a256 256 0 1 0 0-512 256 256 0 0 0 0 512m0 64a320 320 0 1 1 0-640 320 320 0 0 1 0 640"}),ff("path",{fill:"currentColor",d:"M576 128H448v200a286.72 286.72 0 0 1 64-8c19.52 0 40.832 2.688 64 8zm64 0v219.648c24.448 9.088 50.56 20.416 78.4 33.92L757.44 128zm-256 0H266.624l39.04 253.568c27.84-13.504 53.888-24.832 78.336-33.92V128zM229.312 64h565.376a32 32 0 0 1 31.616 36.864L768 480c-113.792-64-199.104-96-256-96-56.896 0-142.208 32-256 96l-58.304-379.136A32 32 0 0 1 229.312 64"})]))}),hY=uY,dY=hg({name:"Memo",__name:"memo",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"}),ff("path",{fill:"currentColor",d:"M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z"}),ff("path",{fill:"currentColor",d:"M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"})]))}),gY=dY,pY=hg({name:"Menu",__name:"menu",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"})]))}),fY=pY,mY=hg({name:"MessageBox",__name:"message-box",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M288 384h448v64H288zm96-128h256v64H384zM131.456 512H384v128h256V512h252.544L721.856 192H302.144zM896 576H704v128H320V576H128v256h768zM275.776 128h472.448a32 32 0 0 1 28.608 17.664l179.84 359.552A32 32 0 0 1 960 519.552V864a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V519.552a32 32 0 0 1 3.392-14.336l179.776-359.552A32 32 0 0 1 275.776 128z"})]))}),CY=mY,IY=hg({name:"Message",__name:"message",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64"}),ff("path",{fill:"currentColor",d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224H205.056"})]))}),vY=IY,BY=hg({name:"Mic",__name:"mic",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M480 704h160a64 64 0 0 0 64-64v-32h-96a32 32 0 0 1 0-64h96v-96h-96a32 32 0 0 1 0-64h96v-96h-96a32 32 0 0 1 0-64h96v-32a64 64 0 0 0-64-64H384a64 64 0 0 0-64 64v32h96a32 32 0 0 1 0 64h-96v96h96a32 32 0 0 1 0 64h-96v96h96a32 32 0 0 1 0 64h-96v32a64 64 0 0 0 64 64zm64 64v128h192a32 32 0 1 1 0 64H288a32 32 0 1 1 0-64h192V768h-96a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64h256a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128z"})]))}),yY=BY,bY=hg({name:"Microphone",__name:"microphone",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 128a128 128 0 0 0-128 128v256a128 128 0 1 0 256 0V256a128 128 0 0 0-128-128m0-64a192 192 0 0 1 192 192v256a192 192 0 1 1-384 0V256A192 192 0 0 1 512 64m-32 832v-64a288 288 0 0 1-288-288v-32a32 32 0 0 1 64 0v32a224 224 0 0 0 224 224h64a224 224 0 0 0 224-224v-32a32 32 0 1 1 64 0v32a288 288 0 0 1-288 288v64h64a32 32 0 1 1 0 64H416a32 32 0 1 1 0-64z"})]))}),EY=bY,wY=hg({name:"MilkTea",__name:"milk-tea",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M416 128V96a96 96 0 0 1 96-96h128a32 32 0 1 1 0 64H512a32 32 0 0 0-32 32v32h320a96 96 0 0 1 11.712 191.296l-39.68 581.056A64 64 0 0 1 708.224 960H315.776a64 64 0 0 1-63.872-59.648l-39.616-581.056A96 96 0 0 1 224 128zM276.48 320l39.296 576h392.448l4.8-70.784a224.064 224.064 0 0 1 30.016-439.808L747.52 320zM224 256h576a32 32 0 1 0 0-64H224a32 32 0 0 0 0 64m493.44 503.872 21.12-309.12a160 160 0 0 0-21.12 309.12"})]))}),QY=wY,_Y=hg({name:"Minus",__name:"minus",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}),SY=_Y,xY=hg({name:"Money",__name:"money",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 640v192h640V384H768v-64h150.976c14.272 0 19.456 1.472 24.64 4.288a29.056 29.056 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64v493.952c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H233.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096c-2.688-5.184-4.224-10.368-4.224-24.576V640z"}),ff("path",{fill:"currentColor",d:"M768 192H128v448h640zm64-22.976v493.952c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H105.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096C65.536 682.432 64 677.248 64 663.04V169.024c0-14.272 1.472-19.456 4.288-24.64a29.056 29.056 0 0 1 12.096-12.16C85.568 129.536 90.752 128 104.96 128h685.952c14.272 0 19.456 1.472 24.64 4.288a29.056 29.056 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64z"}),ff("path",{fill:"currentColor",d:"M448 576a160 160 0 1 1 0-320 160 160 0 0 1 0 320m0-64a96 96 0 1 0 0-192 96 96 0 0 0 0 192"})]))}),kY=xY,DY=hg({name:"Monitor",__name:"monitor",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M544 768v128h192a32 32 0 1 1 0 64H288a32 32 0 1 1 0-64h192V768H192A128 128 0 0 1 64 640V256a128 128 0 0 1 128-128h640a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128zM192 192a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64z"})]))}),FY=DY,TY=hg({name:"MoonNight",__name:"moon-night",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M384 512a448 448 0 0 1 215.872-383.296A384 384 0 0 0 213.76 640h188.8A448.256 448.256 0 0 1 384 512M171.136 704a448 448 0 0 1 636.992-575.296A384 384 0 0 0 499.328 704h-328.32z"}),ff("path",{fill:"currentColor",d:"M32 640h960q32 0 32 32t-32 32H32q-32 0-32-32t32-32m128 128h384a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m160 127.68 224 .256a32 32 0 0 1 32 32V928a32 32 0 0 1-32 32l-224-.384a32 32 0 0 1-32-32v-.064a32 32 0 0 1 32-32z"})]))}),MY=TY,RY=hg({name:"Moon",__name:"moon",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M240.448 240.448a384 384 0 1 0 559.424 525.696 448 448 0 0 1-542.016-542.08 390.592 390.592 0 0 0-17.408 16.384zm181.056 362.048a384 384 0 0 0 525.632 16.384A448 448 0 1 1 405.056 76.8a384 384 0 0 0 16.448 525.696"})]))}),NY=RY,LY=hg({name:"MoreFilled",__name:"more-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}),UY=LY,HY=hg({name:"More",__name:"more",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}),PY=HY,OY=hg({name:"MostlyCloudy",__name:"mostly-cloudy",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M737.216 357.952 704 349.824l-11.776-32a192.064 192.064 0 0 0-367.424 23.04l-8.96 39.04-39.04 8.96A192.064 192.064 0 0 0 320 768h368a207.808 207.808 0 0 0 207.808-208 208.32 208.32 0 0 0-158.592-202.048m15.168-62.208A272.32 272.32 0 0 1 959.744 560a271.808 271.808 0 0 1-271.552 272H320a256 256 0 0 1-57.536-505.536 256.128 256.128 0 0 1 489.92-30.72"})]))}),GY=OY,KY=hg({name:"Mouse",__name:"mouse",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M438.144 256c-68.352 0-92.736 4.672-117.76 18.112-20.096 10.752-35.52 26.176-46.272 46.272C260.672 345.408 256 369.792 256 438.144v275.712c0 68.352 4.672 92.736 18.112 117.76 10.752 20.096 26.176 35.52 46.272 46.272C345.408 891.328 369.792 896 438.144 896h147.712c68.352 0 92.736-4.672 117.76-18.112 20.096-10.752 35.52-26.176 46.272-46.272C763.328 806.592 768 782.208 768 713.856V438.144c0-68.352-4.672-92.736-18.112-117.76a110.464 110.464 0 0 0-46.272-46.272C678.592 260.672 654.208 256 585.856 256zm0-64h147.712c85.568 0 116.608 8.96 147.904 25.6 31.36 16.768 55.872 41.344 72.576 72.64C823.104 321.536 832 352.576 832 438.08v275.84c0 85.504-8.96 116.544-25.6 147.84a174.464 174.464 0 0 1-72.64 72.576C702.464 951.104 671.424 960 585.92 960H438.08c-85.504 0-116.544-8.96-147.84-25.6a174.464 174.464 0 0 1-72.64-72.704c-16.768-31.296-25.664-62.336-25.664-147.84v-275.84c0-85.504 8.96-116.544 25.6-147.84a174.464 174.464 0 0 1 72.768-72.576c31.232-16.704 62.272-25.6 147.776-25.6z"}),ff("path",{fill:"currentColor",d:"M512 320q32 0 32 32v128q0 32-32 32t-32-32V352q0-32 32-32m32-96a32 32 0 0 1-64 0v-64a32 32 0 0 0-32-32h-96a32 32 0 0 1 0-64h96a96 96 0 0 1 96 96z"})]))}),qY=KY,YY=hg({name:"Mug",__name:"mug",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M736 800V160H160v640a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64m64-544h63.552a96 96 0 0 1 96 96v224a96 96 0 0 1-96 96H800v128a128 128 0 0 1-128 128H224A128 128 0 0 1 96 800V128a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zm0 64v288h63.552a32 32 0 0 0 32-32V352a32 32 0 0 0-32-32z"})]))}),VY=YY,WY=hg({name:"MuteNotification",__name:"mute-notification",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m241.216 832 63.616-64H768V448c0-42.368-10.24-82.304-28.48-117.504l46.912-47.232C815.36 331.392 832 387.84 832 448v320h96a32 32 0 1 1 0 64zm-90.24 0H96a32 32 0 1 1 0-64h96V448a320.128 320.128 0 0 1 256-313.6V128a64 64 0 1 1 128 0v6.4a319.552 319.552 0 0 1 171.648 97.088l-45.184 45.44A256 256 0 0 0 256 448v278.336L151.04 832zM448 896h128a64 64 0 0 1-128 0"}),ff("path",{fill:"currentColor",d:"M150.72 859.072a32 32 0 0 1-45.44-45.056l704-708.544a32 32 0 0 1 45.44 45.056l-704 708.544z"})]))}),jY=WY,JY=hg({name:"Mute",__name:"mute",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m412.16 592.128-45.44 45.44A191.232 191.232 0 0 1 320 512V256a192 192 0 1 1 384 0v44.352l-64 64V256a128 128 0 1 0-256 0v256c0 30.336 10.56 58.24 28.16 80.128m51.968 38.592A128 128 0 0 0 640 512v-57.152l64-64V512a192 192 0 0 1-287.68 166.528zM314.88 779.968l46.144-46.08A222.976 222.976 0 0 0 480 768h64a224 224 0 0 0 224-224v-32a32 32 0 1 1 64 0v32a288 288 0 0 1-288 288v64h64a32 32 0 1 1 0 64H416a32 32 0 1 1 0-64h64v-64c-61.44 0-118.4-19.2-165.12-52.032M266.752 737.6A286.976 286.976 0 0 1 192 544v-32a32 32 0 0 1 64 0v32c0 56.832 21.184 108.8 56.064 148.288z"}),ff("path",{fill:"currentColor",d:"M150.72 859.072a32 32 0 0 1-45.44-45.056l704-708.544a32 32 0 0 1 45.44 45.056l-704 708.544z"})]))}),zY=JY,XY=hg({name:"NoSmoking",__name:"no-smoking",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M440.256 576H256v128h56.256l-64 64H224a32 32 0 0 1-32-32V544a32 32 0 0 1 32-32h280.256zm143.488 128H704V583.744L775.744 512H928a32 32 0 0 1 32 32v192a32 32 0 0 1-32 32H519.744zM768 576v128h128V576zm-29.696-207.552 45.248 45.248-497.856 497.856-45.248-45.248zM256 64h64v320h-64zM128 192h64v192h-64zM64 512h64v256H64z"})]))}),$Y=XY,ZY=hg({name:"Notebook",__name:"notebook",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),ff("path",{fill:"currentColor",d:"M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32"})]))}),eV=ZY,tV=hg({name:"Notification",__name:"notification",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 128v64H256a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V512h64v256a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V256a128 128 0 0 1 128-128z"}),ff("path",{fill:"currentColor",d:"M768 384a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"})]))}),iV=tV,nV=hg({name:"Odometer",__name:"odometer",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ff("path",{fill:"currentColor",d:"M192 512a320 320 0 1 1 640 0 32 32 0 1 1-64 0 256 256 0 1 0-512 0 32 32 0 0 1-64 0"}),ff("path",{fill:"currentColor",d:"M570.432 627.84A96 96 0 1 1 509.568 608l60.992-187.776A32 32 0 1 1 631.424 440l-60.992 187.776zM502.08 734.464a32 32 0 1 0 19.84-60.928 32 32 0 0 0-19.84 60.928"})]))}),sV=nV,rV=hg({name:"OfficeBuilding",__name:"office-building",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M192 128v704h384V128zm-32-64h448a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),ff("path",{fill:"currentColor",d:"M256 256h256v64H256zm0 192h256v64H256zm0 192h256v64H256zm384-128h128v64H640zm0 128h128v64H640zM64 832h896v64H64z"}),ff("path",{fill:"currentColor",d:"M640 384v448h192V384zm-32-64h256a32 32 0 0 1 32 32v512a32 32 0 0 1-32 32H608a32 32 0 0 1-32-32V352a32 32 0 0 1 32-32"})]))}),aV=rV,oV=hg({name:"Open",__name:"open",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M329.956 257.138a254.862 254.862 0 0 0 0 509.724h364.088a254.862 254.862 0 0 0 0-509.724zm0-72.818h364.088a327.68 327.68 0 1 1 0 655.36H329.956a327.68 327.68 0 1 1 0-655.36z"}),ff("path",{fill:"currentColor",d:"M694.044 621.227a109.227 109.227 0 1 0 0-218.454 109.227 109.227 0 0 0 0 218.454m0 72.817a182.044 182.044 0 1 1 0-364.088 182.044 182.044 0 0 1 0 364.088"})]))}),lV=oV,AV=hg({name:"Operation",__name:"operation",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}),cV=AV,uV=hg({name:"Opportunity",__name:"opportunity",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M384 960v-64h192.064v64zm448-544a350.656 350.656 0 0 1-128.32 271.424C665.344 719.04 640 763.776 640 813.504V832H320v-14.336c0-48-19.392-95.36-57.216-124.992a351.552 351.552 0 0 1-128.448-344.256c25.344-136.448 133.888-248.128 269.76-276.48A352.384 352.384 0 0 1 832 416m-544 32c0-132.288 75.904-224 192-224v-64c-154.432 0-256 122.752-256 288z"})]))}),hV=uV,dV=hg({name:"Orange",__name:"orange",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M544 894.72a382.336 382.336 0 0 0 215.936-89.472L577.024 622.272c-10.24 6.016-21.248 10.688-33.024 13.696v258.688zm261.248-134.784A382.336 382.336 0 0 0 894.656 544H635.968c-3.008 11.776-7.68 22.848-13.696 33.024l182.976 182.912zM894.656 480a382.336 382.336 0 0 0-89.408-215.936L622.272 446.976c6.016 10.24 10.688 21.248 13.696 33.024h258.688zm-134.72-261.248A382.336 382.336 0 0 0 544 129.344v258.688c11.776 3.008 22.848 7.68 33.024 13.696zM480 129.344a382.336 382.336 0 0 0-215.936 89.408l182.912 182.976c10.24-6.016 21.248-10.688 33.024-13.696zm-261.248 134.72A382.336 382.336 0 0 0 129.344 480h258.688c3.008-11.776 7.68-22.848 13.696-33.024zM129.344 544a382.336 382.336 0 0 0 89.408 215.936l182.976-182.912A127.232 127.232 0 0 1 388.032 544zm134.72 261.248A382.336 382.336 0 0 0 480 894.656V635.968a127.232 127.232 0 0 1-33.024-13.696zM512 960a448 448 0 1 1 0-896 448 448 0 0 1 0 896m0-384a64 64 0 1 0 0-128 64 64 0 0 0 0 128"})]))}),gV=dV,pV=hg({name:"Paperclip",__name:"paperclip",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M602.496 240.448A192 192 0 1 1 874.048 512l-316.8 316.8A256 256 0 0 1 195.2 466.752L602.496 59.456l45.248 45.248L240.448 512A192 192 0 0 0 512 783.552l316.8-316.8a128 128 0 1 0-181.056-181.056L353.6 579.904a32 32 0 1 0 45.248 45.248l294.144-294.144 45.312 45.248L444.096 670.4a96 96 0 1 1-135.744-135.744l294.144-294.208z"})]))}),fV=pV,mV=hg({name:"PartlyCloudy",__name:"partly-cloudy",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M598.4 895.872H328.192a256 256 0 0 1-34.496-510.528A352 352 0 1 1 598.4 895.872m-271.36-64h272.256a288 288 0 1 0-248.512-417.664L335.04 445.44l-34.816 3.584a192 192 0 0 0 26.88 382.848z"}),ff("path",{fill:"currentColor",d:"M139.84 501.888a256 256 0 1 1 417.856-277.12c-17.728 2.176-38.208 8.448-61.504 18.816A192 192 0 1 0 189.12 460.48a6003.84 6003.84 0 0 0-49.28 41.408z"})]))}),CV=mV,IV=hg({name:"Pear",__name:"pear",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M542.336 258.816a443.255 443.255 0 0 0-9.024 25.088 32 32 0 1 1-60.8-20.032l1.088-3.328a162.688 162.688 0 0 0-122.048 131.392l-17.088 102.72-20.736 15.36C256.192 552.704 224 610.88 224 672c0 120.576 126.4 224 288 224s288-103.424 288-224c0-61.12-32.192-119.296-89.728-161.92l-20.736-15.424-17.088-102.72a162.688 162.688 0 0 0-130.112-133.12zm-40.128-66.56c7.936-15.552 16.576-30.08 25.92-43.776 23.296-33.92 49.408-59.776 78.528-77.12a32 32 0 1 1 32.704 55.04c-20.544 12.224-40.064 31.552-58.432 58.304a316.608 316.608 0 0 0-9.792 15.104 226.688 226.688 0 0 1 164.48 181.568l12.8 77.248C819.456 511.36 864 587.392 864 672c0 159.04-157.568 288-352 288S160 831.04 160 672c0-84.608 44.608-160.64 115.584-213.376l12.8-77.248a226.624 226.624 0 0 1 213.76-189.184z"})]))}),vV=IV,BV=hg({name:"PhoneFilled",__name:"phone-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M199.232 125.568 90.624 379.008a32 32 0 0 0 6.784 35.2l512.384 512.384a32 32 0 0 0 35.2 6.784l253.44-108.608a32 32 0 0 0 10.048-52.032L769.6 633.92a32 32 0 0 0-36.928-5.952l-130.176 65.088-271.488-271.552 65.024-130.176a32 32 0 0 0-5.952-36.928L251.2 115.52a32 32 0 0 0-51.968 10.048z"})]))}),yV=BV,bV=hg({name:"Phone",__name:"phone",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M79.36 432.256 591.744 944.64a32 32 0 0 0 35.2 6.784l253.44-108.544a32 32 0 0 0 9.984-52.032l-153.856-153.92a32 32 0 0 0-36.928-6.016l-69.888 34.944L358.08 394.24l35.008-69.888a32 32 0 0 0-5.952-36.928L233.152 133.568a32 32 0 0 0-52.032 10.048L72.512 397.056a32 32 0 0 0 6.784 35.2zm60.48-29.952 81.536-190.08L325.568 316.48l-24.64 49.216-20.608 41.216 32.576 32.64 271.552 271.552 32.64 32.64 41.216-20.672 49.28-24.576 104.192 104.128-190.08 81.472L139.84 402.304zM512 320v-64a256 256 0 0 1 256 256h-64a192 192 0 0 0-192-192m0-192V64a448 448 0 0 1 448 448h-64a384 384 0 0 0-384-384"})]))}),EV=hg({name:"PictureFilled",__name:"picture-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}),wV=hg({name:"PictureRounded",__name:"picture-rounded",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 128a384 384 0 1 0 0 768 384 384 0 0 0 0-768m0-64a448 448 0 1 1 0 896 448 448 0 0 1 0-896"}),ff("path",{fill:"currentColor",d:"M640 288q64 0 64 64t-64 64q-64 0-64-64t64-64M214.656 790.656l-45.312-45.312 185.664-185.6a96 96 0 0 1 123.712-10.24l138.24 98.688a32 32 0 0 0 39.872-2.176L906.688 422.4l42.624 47.744L699.52 693.696a96 96 0 0 1-119.808 6.592l-138.24-98.752a32 32 0 0 0-41.152 3.456l-185.664 185.6z"})]))}),QV=hg({name:"Picture",__name:"picture",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),ff("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64q-64 0-64-64t64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}),_V=hg({name:"PieChart",__name:"pie-chart",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M448 68.48v64.832A384.128 384.128 0 0 0 512 896a384.128 384.128 0 0 0 378.688-320h64.768A448.128 448.128 0 0 1 64 512 448.128 448.128 0 0 1 448 68.48z"}),ff("path",{fill:"currentColor",d:"M576 97.28V448h350.72A384.064 384.064 0 0 0 576 97.28zM512 64V33.152A448 448 0 0 1 990.848 512H512z"})]))}),SV=hg({name:"Place",__name:"place",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 512a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512"}),ff("path",{fill:"currentColor",d:"M512 512a32 32 0 0 1 32 32v256a32 32 0 1 1-64 0V544a32 32 0 0 1 32-32"}),ff("path",{fill:"currentColor",d:"M384 649.088v64.96C269.76 732.352 192 771.904 192 800c0 37.696 139.904 96 320 96s320-58.304 320-96c0-28.16-77.76-67.648-192-85.952v-64.96C789.12 671.04 896 730.368 896 800c0 88.32-171.904 160-384 160s-384-71.68-384-160c0-69.696 106.88-128.96 256-150.912"})]))}),xV=hg({name:"Platform",__name:"platform",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M448 832v-64h128v64h192v64H256v-64zM128 704V128h768v576z"})]))}),kV=hg({name:"Plus",__name:"plus",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}),DV=hg({name:"Pointer",__name:"pointer",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M511.552 128c-35.584 0-64.384 28.8-64.384 64.448v516.48L274.048 570.88a94.272 94.272 0 0 0-112.896-3.456 44.416 44.416 0 0 0-8.96 62.208L332.8 870.4A64 64 0 0 0 384 896h512V575.232a64 64 0 0 0-45.632-61.312l-205.952-61.76A96 96 0 0 1 576 360.192V192.448C576 156.8 547.2 128 511.552 128M359.04 556.8l24.128 19.2V192.448a128.448 128.448 0 1 1 256.832 0v167.744a32 32 0 0 0 22.784 30.656l206.016 61.76A128 128 0 0 1 960 575.232V896a64 64 0 0 1-64 64H384a128 128 0 0 1-102.4-51.2L101.056 668.032A108.416 108.416 0 0 1 128 512.512a158.272 158.272 0 0 1 185.984 8.32z"})]))}),FV=hg({name:"Position",__name:"position",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m249.6 417.088 319.744 43.072 39.168 310.272L845.12 178.88 249.6 417.088zm-129.024 47.168a32 32 0 0 1-7.68-61.44l777.792-311.04a32 32 0 0 1 41.6 41.6l-310.336 775.68a32 32 0 0 1-61.44-7.808L512 516.992l-391.424-52.736z"})]))}),TV=hg({name:"Postcard",__name:"postcard",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M160 224a32 32 0 0 0-32 32v512a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V256a32 32 0 0 0-32-32zm0-64h704a96 96 0 0 1 96 96v512a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V256a96 96 0 0 1 96-96"}),ff("path",{fill:"currentColor",d:"M704 320a64 64 0 1 1 0 128 64 64 0 0 1 0-128M288 448h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32m0 128h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}),MV=hg({name:"Pouring",__name:"pouring",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m739.328 291.328-35.2-6.592-12.8-33.408a192.064 192.064 0 0 0-365.952 23.232l-9.92 40.896-41.472 7.04a176.32 176.32 0 0 0-146.24 173.568c0 97.28 78.72 175.936 175.808 175.936h400a192 192 0 0 0 35.776-380.672zM959.552 480a256 256 0 0 1-256 256h-400A239.808 239.808 0 0 1 63.744 496.192a240.32 240.32 0 0 1 199.488-236.8 256.128 256.128 0 0 1 487.872-30.976A256.064 256.064 0 0 1 959.552 480M224 800a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32m192 0a32 32 0 0 1 32 32v96a32 32 0 1 1-64 0v-96a32 32 0 0 1 32-32"})]))}),RV=hg({name:"Present",__name:"present",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M480 896V640H192v-64h288V320H192v576zm64 0h288V320H544v256h288v64H544zM128 256h768v672a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32z"}),ff("path",{fill:"currentColor",d:"M96 256h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32"}),ff("path",{fill:"currentColor",d:"M416 256a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"}),ff("path",{fill:"currentColor",d:"M608 256a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}),NV=hg({name:"PriceTag",__name:"price-tag",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M224 318.336V896h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0z"}),ff("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}),LV=hg({name:"Printer",__name:"printer",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 768H105.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096C65.536 746.432 64 741.248 64 727.04V379.072c0-42.816 4.48-58.304 12.8-73.984 8.384-15.616 20.672-27.904 36.288-36.288 15.68-8.32 31.168-12.8 73.984-12.8H256V64h512v192h68.928c42.816 0 58.304 4.48 73.984 12.8 15.616 8.384 27.904 20.672 36.288 36.288 8.32 15.68 12.8 31.168 12.8 73.984v347.904c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H768v192H256zm64-192v320h384V576zm-64 128V512h512v192h128V379.072c0-29.376-1.408-36.48-5.248-43.776a23.296 23.296 0 0 0-10.048-10.048c-7.232-3.84-14.4-5.248-43.776-5.248H187.072c-29.376 0-36.48 1.408-43.776 5.248a23.296 23.296 0 0 0-10.048 10.048c-3.84 7.232-5.248 14.4-5.248 43.776V704zm64-448h384V128H320zm-64 128h64v64h-64zm128 0h64v64h-64z"})]))}),UV=hg({name:"Promotion",__name:"promotion",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}),HV=hg({name:"QuartzWatch",__name:"quartz-watch",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M422.02 602.01v-.03c-6.68-5.99-14.35-8.83-23.01-8.51-8.67.32-16.17 3.66-22.5 10.02-6.33 6.36-9.5 13.7-9.5 22.02s3 15.82 8.99 22.5c8.68 8.68 19.02 11.35 31.01 8s19.49-10.85 22.5-22.5c3.01-11.65.51-22.15-7.49-31.49zM384 512c0-9.35-3-17.02-8.99-23.01-6-5.99-13.66-8.99-23.01-8.99-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.66-8.99 23.01s3 17.02 8.99 23.01c6 5.99 13.66 8.99 23.01 8.99 9.35 0 17.02-3 23.01-8.99 5.99-6 8.99-13.67 8.99-23.01m6.53-82.49c11.65 3.01 22.15.51 31.49-7.49h.04c5.99-6.68 8.83-14.34 8.51-23.01-.32-8.67-3.66-16.16-10.02-22.5-6.36-6.33-13.7-9.5-22.02-9.5s-15.82 3-22.5 8.99c-8.68 8.69-11.35 19.02-8 31.01 3.35 11.99 10.85 19.49 22.5 22.5zm242.94 0c11.67-3.03 19.01-10.37 22.02-22.02 3.01-11.65.51-22.15-7.49-31.49h.01c-6.68-5.99-14.18-8.99-22.5-8.99s-15.66 3.16-22.02 9.5c-6.36 6.34-9.7 13.84-10.02 22.5-.32 8.66 2.52 16.33 8.51 23.01 9.32 8.02 19.82 10.52 31.49 7.49M512 640c-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.66-8.99 23.01s3 17.02 8.99 23.01c6 5.99 13.67 8.99 23.01 8.99 9.35 0 17.02-3 23.01-8.99 5.99-6 8.99-13.66 8.99-23.01s-3-17.02-8.99-23.01c-6-5.99-13.66-8.99-23.01-8.99m183.01-151.01c-6-5.99-13.66-8.99-23.01-8.99s-17.02 3-23.01 8.99c-5.99 6-8.99 13.66-8.99 23.01s3 17.02 8.99 23.01c6 5.99 13.66 8.99 23.01 8.99s17.02-3 23.01-8.99c5.99-6 8.99-13.67 8.99-23.01 0-9.35-3-17.02-8.99-23.01"}),ff("path",{fill:"currentColor",d:"M832 512c-2-90.67-33.17-166.17-93.5-226.5-20.43-20.42-42.6-37.49-66.5-51.23V64H352v170.26c-23.9 13.74-46.07 30.81-66.5 51.24-60.33 60.33-91.49 135.83-93.5 226.5 2 90.67 33.17 166.17 93.5 226.5 20.43 20.43 42.6 37.5 66.5 51.24V960h320V789.74c23.9-13.74 46.07-30.81 66.5-51.24 60.33-60.34 91.49-135.83 93.5-226.5M416 128h192v78.69c-29.85-9.03-61.85-13.93-96-14.69-34.15.75-66.15 5.65-96 14.68zm192 768H416v-78.68c29.85 9.03 61.85 13.93 96 14.68 34.15-.75 66.15-5.65 96-14.68zm-96-128c-72.66-2.01-132.99-27.01-180.99-75.01S258.01 584.66 256 512c2.01-72.66 27.01-132.99 75.01-180.99S439.34 258.01 512 256c72.66 2.01 132.99 27.01 180.99 75.01S765.99 439.34 768 512c-2.01 72.66-27.01 132.99-75.01 180.99S584.66 765.99 512 768"}),ff("path",{fill:"currentColor",d:"M512 320c-9.35 0-17.02 3-23.01 8.99-5.99 6-8.99 13.66-8.99 23.01 0 9.35 3 17.02 8.99 23.01 6 5.99 13.67 8.99 23.01 8.99 9.35 0 17.02-3 23.01-8.99 5.99-6 8.99-13.66 8.99-23.01 0-9.35-3-17.02-8.99-23.01-6-5.99-13.66-8.99-23.01-8.99m112.99 273.5c-8.66-.32-16.33 2.52-23.01 8.51-7.98 9.32-10.48 19.82-7.49 31.49s10.49 19.17 22.5 22.5 22.35.66 31.01-8v.04c5.99-6.68 8.99-14.18 8.99-22.5s-3.16-15.66-9.5-22.02-13.84-9.7-22.5-10.02"})]))}),PV=hg({name:"QuestionFilled",__name:"question-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}),OV=hg({name:"Rank",__name:"rank",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m186.496 544 41.408 41.344a32 32 0 1 1-45.248 45.312l-96-96a32 32 0 0 1 0-45.312l96-96a32 32 0 1 1 45.248 45.312L186.496 480h290.816V186.432l-41.472 41.472a32 32 0 1 1-45.248-45.184l96-96.128a32 32 0 0 1 45.312 0l96 96.064a32 32 0 0 1-45.248 45.184l-41.344-41.28V480H832l-41.344-41.344a32 32 0 0 1 45.248-45.312l96 96a32 32 0 0 1 0 45.312l-96 96a32 32 0 0 1-45.248-45.312L832 544H541.312v293.44l41.344-41.28a32 32 0 1 1 45.248 45.248l-96 96a32 32 0 0 1-45.312 0l-96-96a32 32 0 1 1 45.312-45.248l41.408 41.408V544H186.496z"})]))}),GV=hg({name:"ReadingLamp",__name:"reading-lamp",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M352 896h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m-44.672-768-99.52 448h608.384l-99.52-448zm-25.6-64h460.608a32 32 0 0 1 31.232 25.088l113.792 512A32 32 0 0 1 856.128 640H167.872a32 32 0 0 1-31.232-38.912l113.792-512A32 32 0 0 1 281.664 64z"}),ff("path",{fill:"currentColor",d:"M672 576q32 0 32 32v128q0 32-32 32t-32-32V608q0-32 32-32m-192-.064h64V960h-64z"})]))}),KV=hg({name:"Reading",__name:"reading",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m512 863.36 384-54.848v-638.72L525.568 222.72a96 96 0 0 1-27.136 0L128 169.792v638.72zM137.024 106.432l370.432 52.928a32 32 0 0 0 9.088 0l370.432-52.928A64 64 0 0 1 960 169.792v638.72a64 64 0 0 1-54.976 63.36l-388.48 55.488a32 32 0 0 1-9.088 0l-388.48-55.488A64 64 0 0 1 64 808.512v-638.72a64 64 0 0 1 73.024-63.36z"}),ff("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}),qV=hg({name:"RefreshLeft",__name:"refresh-left",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}),YV=hg({name:"RefreshRight",__name:"refresh-right",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}),VV=hg({name:"Refresh",__name:"refresh",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}),WV=hg({name:"Refrigerator",__name:"refrigerator",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 448h512V160a32 32 0 0 0-32-32H288a32 32 0 0 0-32 32zm0 64v352a32 32 0 0 0 32 32h448a32 32 0 0 0 32-32V512zm32-448h448a96 96 0 0 1 96 96v704a96 96 0 0 1-96 96H288a96 96 0 0 1-96-96V160a96 96 0 0 1 96-96m32 224h64v96h-64zm0 288h64v96h-64z"})]))}),jV=hg({name:"RemoveFilled",__name:"remove-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"})]))}),JV=hg({name:"Remove",__name:"remove",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),ff("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}),zV=hg({name:"Right",__name:"right",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M754.752 480H160a32 32 0 1 0 0 64h594.752L521.344 777.344a32 32 0 0 0 45.312 45.312l288-288a32 32 0 0 0 0-45.312l-288-288a32 32 0 1 0-45.312 45.312z"})]))}),XV=hg({name:"ScaleToOriginal",__name:"scale-to-original",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}),$V=hg({name:"School",__name:"school",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M224 128v704h576V128zm-32-64h640a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),ff("path",{fill:"currentColor",d:"M64 832h896v64H64zm256-640h128v96H320z"}),ff("path",{fill:"currentColor",d:"M384 832h256v-64a128 128 0 1 0-256 0zm128-256a192 192 0 0 1 192 192v128H320V768a192 192 0 0 1 192-192M320 384h128v96H320zm256-192h128v96H576zm0 192h128v96H576z"})]))}),ZV=hg({name:"Scissor",__name:"scissor",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m512.064 578.368-106.88 152.768a160 160 0 1 1-23.36-78.208L472.96 522.56 196.864 128.256a32 32 0 1 1 52.48-36.736l393.024 561.344a160 160 0 1 1-23.36 78.208l-106.88-152.704zm54.4-189.248 208.384-297.6a32 32 0 0 1 52.48 36.736l-221.76 316.672-39.04-55.808zm-376.32 425.856a96 96 0 1 0 110.144-157.248 96 96 0 0 0-110.08 157.248zm643.84 0a96 96 0 1 0-110.08-157.248 96 96 0 0 0 110.08 157.248"})]))}),eW=hg({name:"Search",__name:"search",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}),tW=hg({name:"Select",__name:"select",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M77.248 415.04a64 64 0 0 1 90.496 0l226.304 226.304L846.528 188.8a64 64 0 1 1 90.56 90.496l-543.04 543.04-316.8-316.8a64 64 0 0 1 0-90.496z"})]))}),iW=hg({name:"Sell",__name:"sell",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M704 288h131.072a32 32 0 0 1 31.808 28.8L886.4 512h-64.384l-16-160H704v96a32 32 0 1 1-64 0v-96H384v96a32 32 0 0 1-64 0v-96H217.92l-51.2 512H512v64H131.328a32 32 0 0 1-31.808-35.2l57.6-576a32 32 0 0 1 31.808-28.8H320v-22.336C320 154.688 405.504 64 512 64s192 90.688 192 201.664v22.4zm-64 0v-22.336C640 189.248 582.272 128 512 128c-70.272 0-128 61.248-128 137.664v22.4h256zm201.408 483.84L768 698.496V928a32 32 0 1 1-64 0V698.496l-73.344 73.344a32 32 0 1 1-45.248-45.248l128-128a32 32 0 0 1 45.248 0l128 128a32 32 0 1 1-45.248 45.248z"})]))}),nW=hg({name:"SemiSelect",__name:"semi-select",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 448h768q64 0 64 64t-64 64H128q-64 0-64-64t64-64"})]))}),sW=hg({name:"Service",__name:"service",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M864 409.6a192 192 0 0 1-37.888 349.44A256.064 256.064 0 0 1 576 960h-96a32 32 0 1 1 0-64h96a192.064 192.064 0 0 0 181.12-128H736a32 32 0 0 1-32-32V416a32 32 0 0 1 32-32h32c10.368 0 20.544.832 30.528 2.432a288 288 0 0 0-573.056 0A193.235 193.235 0 0 1 256 384h32a32 32 0 0 1 32 32v320a32 32 0 0 1-32 32h-32a192 192 0 0 1-96-358.4 352 352 0 0 1 704 0M256 448a128 128 0 1 0 0 256zm640 128a128 128 0 0 0-128-128v256a128 128 0 0 0 128-128"})]))}),rW=hg({name:"SetUp",__name:"set-up",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M224 160a64 64 0 0 0-64 64v576a64 64 0 0 0 64 64h576a64 64 0 0 0 64-64V224a64 64 0 0 0-64-64zm0-64h576a128 128 0 0 1 128 128v576a128 128 0 0 1-128 128H224A128 128 0 0 1 96 800V224A128 128 0 0 1 224 96"}),ff("path",{fill:"currentColor",d:"M384 416a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"}),ff("path",{fill:"currentColor",d:"M480 320h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32m160 416a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"}),ff("path",{fill:"currentColor",d:"M288 640h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}),aW=hg({name:"Setting",__name:"setting",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}),oW=hg({name:"Share",__name:"share",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m679.872 348.8-301.76 188.608a127.808 127.808 0 0 1 5.12 52.16l279.936 104.96a128 128 0 1 1-22.464 59.904l-279.872-104.96a128 128 0 1 1-16.64-166.272l301.696-188.608a128 128 0 1 1 33.92 54.272z"})]))}),lW=hg({name:"Ship",__name:"ship",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 386.88V448h405.568a32 32 0 0 1 30.72 40.768l-76.48 267.968A192 192 0 0 1 687.168 896H336.832a192 192 0 0 1-184.64-139.264L75.648 488.768A32 32 0 0 1 106.368 448H448V117.888a32 32 0 0 1 47.36-28.096l13.888 7.616L512 96v2.88l231.68 126.4a32 32 0 0 1-2.048 57.216zm0-70.272 144.768-65.792L512 171.84zM512 512H148.864l18.24 64H856.96l18.24-64zM185.408 640l28.352 99.2A128 128 0 0 0 336.832 832h350.336a128 128 0 0 0 123.072-92.8l28.352-99.2H185.408"})]))}),AW=hg({name:"Shop",__name:"shop",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M704 704h64v192H256V704h64v64h384zm188.544-152.192C894.528 559.616 896 567.616 896 576a96 96 0 1 1-192 0 96 96 0 1 1-192 0 96 96 0 1 1-192 0 96 96 0 1 1-192 0c0-8.384 1.408-16.384 3.392-24.192L192 128h640z"})]))}),cW=hg({name:"ShoppingBag",__name:"shopping-bag",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M704 320v96a32 32 0 0 1-32 32h-32V320H384v128h-32a32 32 0 0 1-32-32v-96H192v576h640V320zm-384-64a192 192 0 1 1 384 0h160a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32zm64 0h256a128 128 0 1 0-256 0"}),ff("path",{fill:"currentColor",d:"M192 704h640v64H192z"})]))}),uW=hg({name:"ShoppingCartFull",__name:"shopping-cart-full",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M432 928a48 48 0 1 1 0-96 48 48 0 0 1 0 96m320 0a48 48 0 1 1 0-96 48 48 0 0 1 0 96M96 128a32 32 0 0 1 0-64h160a32 32 0 0 1 31.36 25.728L320.64 256H928a32 32 0 0 1 31.296 38.72l-96 448A32 32 0 0 1 832 768H384a32 32 0 0 1-31.36-25.728L229.76 128zm314.24 576h395.904l82.304-384H333.44l76.8 384z"}),ff("path",{fill:"currentColor",d:"M699.648 256 608 145.984 516.352 256h183.296zm-140.8-151.04a64 64 0 0 1 98.304 0L836.352 320H379.648l179.2-215.04"})]))}),hW=hg({name:"ShoppingCart",__name:"shopping-cart",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M432 928a48 48 0 1 1 0-96 48 48 0 0 1 0 96m320 0a48 48 0 1 1 0-96 48 48 0 0 1 0 96M96 128a32 32 0 0 1 0-64h160a32 32 0 0 1 31.36 25.728L320.64 256H928a32 32 0 0 1 31.296 38.72l-96 448A32 32 0 0 1 832 768H384a32 32 0 0 1-31.36-25.728L229.76 128zm314.24 576h395.904l82.304-384H333.44l76.8 384z"})]))}),dW=hg({name:"ShoppingTrolley",__name:"shopping-trolley",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M368 833c-13.3 0-24.5 4.5-33.5 13.5S321 866.7 321 880s4.5 24.5 13.5 33.5 20.2 13.8 33.5 14.5c13.3-.7 24.5-5.5 33.5-14.5S415 893.3 415 880s-4.5-24.5-13.5-33.5S381.3 833 368 833m439-193c7.4 0 13.8-2.2 19.5-6.5S836 623.3 838 616l112-448c2-10-.2-19.2-6.5-27.5S929 128 919 128H96c-9.3 0-17 3-23 9s-9 13.7-9 23 3 17 9 23 13.7 9 23 9h96v576h672c9.3 0 17-3 23-9s9-13.7 9-23-3-17-9-23-13.7-9-23-9H256v-64zM256 192h622l-96 384H256zm432 641c-13.3 0-24.5 4.5-33.5 13.5S641 866.7 641 880s4.5 24.5 13.5 33.5 20.2 13.8 33.5 14.5c13.3-.7 24.5-5.5 33.5-14.5S735 893.3 735 880s-4.5-24.5-13.5-33.5S701.3 833 688 833"})]))}),gW=hg({name:"Smoking",__name:"smoking",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 576v128h640V576zm-32-64h704a32 32 0 0 1 32 32v192a32 32 0 0 1-32 32H224a32 32 0 0 1-32-32V544a32 32 0 0 1 32-32"}),ff("path",{fill:"currentColor",d:"M704 576h64v128h-64zM256 64h64v320h-64zM128 192h64v192h-64zM64 512h64v256H64z"})]))}),pW=hg({name:"Soccer",__name:"soccer",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M418.496 871.04 152.256 604.8c-16.512 94.016-2.368 178.624 42.944 224 44.928 44.928 129.344 58.752 223.296 42.24m72.32-18.176a573.056 573.056 0 0 0 224.832-137.216 573.12 573.12 0 0 0 137.216-224.832L533.888 171.84a578.56 578.56 0 0 0-227.52 138.496A567.68 567.68 0 0 0 170.432 532.48l320.384 320.384zM871.04 418.496c16.512-93.952 2.688-178.368-42.24-223.296-44.544-44.544-128.704-58.048-222.592-41.536zM149.952 874.048c-112.96-112.96-88.832-408.96 111.168-608.96C461.056 65.152 760.96 36.928 874.048 149.952c113.024 113.024 86.784 411.008-113.152 610.944-199.936 199.936-497.92 226.112-610.944 113.152m452.544-497.792 22.656-22.656a32 32 0 0 1 45.248 45.248l-22.656 22.656 45.248 45.248A32 32 0 1 1 647.744 512l-45.248-45.248L557.248 512l45.248 45.248a32 32 0 1 1-45.248 45.248L512 557.248l-45.248 45.248L512 647.744a32 32 0 1 1-45.248 45.248l-45.248-45.248-22.656 22.656a32 32 0 1 1-45.248-45.248l22.656-22.656-45.248-45.248A32 32 0 1 1 376.256 512l45.248 45.248L466.752 512l-45.248-45.248a32 32 0 1 1 45.248-45.248L512 466.752l45.248-45.248L512 376.256a32 32 0 0 1 45.248-45.248l45.248 45.248z"})]))}),fW=hg({name:"SoldOut",__name:"sold-out",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M704 288h131.072a32 32 0 0 1 31.808 28.8L886.4 512h-64.384l-16-160H704v96a32 32 0 1 1-64 0v-96H384v96a32 32 0 0 1-64 0v-96H217.92l-51.2 512H512v64H131.328a32 32 0 0 1-31.808-35.2l57.6-576a32 32 0 0 1 31.808-28.8H320v-22.336C320 154.688 405.504 64 512 64s192 90.688 192 201.664v22.4zm-64 0v-22.336C640 189.248 582.272 128 512 128c-70.272 0-128 61.248-128 137.664v22.4h256zm201.408 476.16a32 32 0 1 1 45.248 45.184l-128 128a32 32 0 0 1-45.248 0l-128-128a32 32 0 1 1 45.248-45.248L704 837.504V608a32 32 0 1 1 64 0v229.504l73.408-73.408z"})]))}),mW=hg({name:"SortDown",__name:"sort-down",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}),CW=hg({name:"SortUp",__name:"sort-up",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}),IW=hg({name:"Sort",__name:"sort",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M384 96a32 32 0 0 1 64 0v786.752a32 32 0 0 1-54.592 22.656L95.936 608a32 32 0 0 1 0-45.312h.128a32 32 0 0 1 45.184 0L384 805.632zm192 45.248a32 32 0 0 1 54.592-22.592L928.064 416a32 32 0 0 1 0 45.312h-.128a32 32 0 0 1-45.184 0L640 218.496V928a32 32 0 1 1-64 0V141.248z"})]))}),vW=hg({name:"Stamp",__name:"stamp",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M624 475.968V640h144a128 128 0 0 1 128 128H128a128 128 0 0 1 128-128h144V475.968a192 192 0 1 1 224 0M128 896v-64h768v64z"})]))}),BW=hg({name:"StarFilled",__name:"star-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M283.84 867.84 512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"})]))}),yW=hg({name:"Star",__name:"star",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}),bW=hg({name:"Stopwatch",__name:"stopwatch",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ff("path",{fill:"currentColor",d:"M672 234.88c-39.168 174.464-80 298.624-122.688 372.48-64 110.848-202.624 30.848-138.624-80C453.376 453.44 540.48 355.968 672 234.816z"})]))}),EW=hg({name:"SuccessFilled",__name:"success-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}),wW=hg({name:"Sugar",__name:"sugar",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m801.728 349.184 4.48 4.48a128 128 0 0 1 0 180.992L534.656 806.144a128 128 0 0 1-181.056 0l-4.48-4.48-19.392 109.696a64 64 0 0 1-108.288 34.176L78.464 802.56a64 64 0 0 1 34.176-108.288l109.76-19.328-4.544-4.544a128 128 0 0 1 0-181.056l271.488-271.488a128 128 0 0 1 181.056 0l4.48 4.48 19.392-109.504a64 64 0 0 1 108.352-34.048l142.592 143.04a64 64 0 0 1-34.24 108.16l-109.248 19.2zm-548.8 198.72h447.168v2.24l60.8-60.8a63.808 63.808 0 0 0 18.752-44.416h-426.88l-89.664 89.728a64.064 64.064 0 0 0-10.24 13.248zm0 64c2.752 4.736 6.144 9.152 10.176 13.248l135.744 135.744a64 64 0 0 0 90.496 0L638.4 611.904zm490.048-230.976L625.152 263.104a64 64 0 0 0-90.496 0L416.768 380.928zM123.712 757.312l142.976 142.976 24.32-137.6a25.6 25.6 0 0 0-29.696-29.632l-137.6 24.256zm633.6-633.344-24.32 137.472a25.6 25.6 0 0 0 29.632 29.632l137.28-24.064-142.656-143.04z"})]))}),QW=hg({name:"SuitcaseLine",__name:"suitcase-line",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M922.5 229.5c-24.32-24.34-54.49-36.84-90.5-37.5H704v-64c-.68-17.98-7.02-32.98-19.01-44.99S658.01 64.66 640 64H384c-17.98.68-32.98 7.02-44.99 19.01S320.66 110 320 128v64H192c-35.99.68-66.16 13.18-90.5 37.5C77.16 253.82 64.66 283.99 64 320v448c.68 35.99 13.18 66.16 37.5 90.5s54.49 36.84 90.5 37.5h640c35.99-.68 66.16-13.18 90.5-37.5s36.84-54.49 37.5-90.5V320c-.68-35.99-13.18-66.16-37.5-90.5M384 128h256v64H384zM256 832h-64c-17.98-.68-32.98-7.02-44.99-19.01S128.66 786.01 128 768V448h128zm448 0H320V448h384zm192-64c-.68 17.98-7.02 32.98-19.01 44.99S850.01 831.34 832 832h-64V448h128zm0-384H128v-64c.69-17.98 7.02-32.98 19.01-44.99S173.99 256.66 192 256h640c17.98.69 32.98 7.02 44.99 19.01S895.34 301.99 896 320z"})]))}),_W=hg({name:"Suitcase",__name:"suitcase",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 384h768v-64a64 64 0 0 0-64-64H192a64 64 0 0 0-64 64zm0 64v320a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V448zm64-256h640a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H192A128 128 0 0 1 64 768V320a128 128 0 0 1 128-128"}),ff("path",{fill:"currentColor",d:"M384 128v64h256v-64zm0-64h256a64 64 0 0 1 64 64v64a64 64 0 0 1-64 64H384a64 64 0 0 1-64-64v-64a64 64 0 0 1 64-64"})]))}),SW=hg({name:"Sunny",__name:"sunny",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 704a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512m0-704a32 32 0 0 1 32 32v64a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 768a32 32 0 0 1 32 32v64a32 32 0 1 1-64 0v-64a32 32 0 0 1 32-32M195.2 195.2a32 32 0 0 1 45.248 0l45.248 45.248a32 32 0 1 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm543.104 543.104a32 32 0 0 1 45.248 0l45.248 45.248a32 32 0 0 1-45.248 45.248l-45.248-45.248a32 32 0 0 1 0-45.248M64 512a32 32 0 0 1 32-32h64a32 32 0 0 1 0 64H96a32 32 0 0 1-32-32m768 0a32 32 0 0 1 32-32h64a32 32 0 1 1 0 64h-64a32 32 0 0 1-32-32M195.2 828.8a32 32 0 0 1 0-45.248l45.248-45.248a32 32 0 0 1 45.248 45.248L240.448 828.8a32 32 0 0 1-45.248 0zm543.104-543.104a32 32 0 0 1 0-45.248l45.248-45.248a32 32 0 0 1 45.248 45.248l-45.248 45.248a32 32 0 0 1-45.248 0"})]))}),xW=hg({name:"Sunrise",__name:"sunrise",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M32 768h960a32 32 0 1 1 0 64H32a32 32 0 1 1 0-64m129.408-96a352 352 0 0 1 701.184 0h-64.32a288 288 0 0 0-572.544 0h-64.32zM512 128a32 32 0 0 1 32 32v96a32 32 0 0 1-64 0v-96a32 32 0 0 1 32-32m407.296 168.704a32 32 0 0 1 0 45.248l-67.84 67.84a32 32 0 1 1-45.248-45.248l67.84-67.84a32 32 0 0 1 45.248 0zm-814.592 0a32 32 0 0 1 45.248 0l67.84 67.84a32 32 0 1 1-45.248 45.248l-67.84-67.84a32 32 0 0 1 0-45.248"})]))}),kW=hg({name:"Sunset",__name:"sunset",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M82.56 640a448 448 0 1 1 858.88 0h-67.2a384 384 0 1 0-724.288 0zM32 704h960q32 0 32 32t-32 32H32q-32 0-32-32t32-32m256 128h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}),DW=hg({name:"SwitchButton",__name:"switch-button",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M352 159.872V230.4a352 352 0 1 0 320 0v-70.528A416.128 416.128 0 0 1 512 960a416 416 0 0 1-160-800.128z"}),ff("path",{fill:"currentColor",d:"M512 64q32 0 32 32v320q0 32-32 32t-32-32V96q0-32 32-32"})]))}),FW=hg({name:"SwitchFilled",__name:"switch-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M247.47 358.4v.04c.07 19.17 7.72 37.53 21.27 51.09s31.92 21.2 51.09 21.27c39.86 0 72.41-32.6 72.41-72.4s-32.6-72.36-72.41-72.36-72.36 32.55-72.36 72.36z"}),ff("path",{fill:"currentColor",d:"M492.38 128H324.7c-52.16 0-102.19 20.73-139.08 57.61a196.655 196.655 0 0 0-57.61 139.08V698.7c-.01 25.84 5.08 51.42 14.96 75.29s24.36 45.56 42.63 63.83 39.95 32.76 63.82 42.65a196.67 196.67 0 0 0 75.28 14.98h167.68c3.03 0 5.46-2.43 5.46-5.42V133.42c.6-2.99-1.83-5.42-5.46-5.42zm-56.11 705.88H324.7c-17.76.13-35.36-3.33-51.75-10.18s-31.22-16.94-43.61-29.67c-25.3-25.35-39.81-59.1-39.81-95.32V324.69c-.13-17.75 3.33-35.35 10.17-51.74a131.695 131.695 0 0 1 29.64-43.62c25.39-25.3 59.14-39.81 95.36-39.81h111.57zm402.12-647.67a196.655 196.655 0 0 0-139.08-57.61H580.48c-3.03 0-4.82 2.43-4.82 4.82v757.16c-.6 2.99 1.79 5.42 5.42 5.42h118.23a196.69 196.69 0 0 0 139.08-57.61A196.655 196.655 0 0 0 896 699.31V325.29a196.69 196.69 0 0 0-57.61-139.08zm-111.3 441.92c-42.83 0-77.82-34.99-77.82-77.82s34.98-77.82 77.82-77.82c42.83 0 77.82 34.99 77.82 77.82s-34.99 77.82-77.82 77.82z"})]))}),TW=hg({name:"Switch",__name:"switch",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344zM64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32"})]))}),MW=hg({name:"TakeawayBox",__name:"takeaway-box",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M832 384H192v448h640zM96 320h832V128H96zm800 64v480a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V384H64a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32h896a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zM416 512h192a32 32 0 0 1 0 64H416a32 32 0 0 1 0-64"})]))}),RW=hg({name:"Ticket",__name:"ticket",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M640 832H64V640a128 128 0 1 0 0-256V192h576v160h64V192h256v192a128 128 0 1 0 0 256v192H704V672h-64zm0-416v192h64V416z"})]))}),NW=hg({name:"Tickets",__name:"tickets",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h192v64H320zm0 384h384v64H320z"})]))}),LW=hg({name:"Timer",__name:"timer",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 896a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),ff("path",{fill:"currentColor",d:"M512 320a32 32 0 0 1 32 32l-.512 224a32 32 0 1 1-64 0L480 352a32 32 0 0 1 32-32"}),ff("path",{fill:"currentColor",d:"M448 576a64 64 0 1 0 128 0 64 64 0 1 0-128 0m96-448v128h-64V128h-96a32 32 0 0 1 0-64h256a32 32 0 1 1 0 64z"})]))}),UW=hg({name:"ToiletPaper",__name:"toilet-paper",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M595.2 128H320a192 192 0 0 0-192 192v576h384V352c0-90.496 32.448-171.2 83.2-224M736 64c123.712 0 224 128.96 224 288S859.712 640 736 640H576v320H64V320A256 256 0 0 1 320 64zM576 352v224h160c84.352 0 160-97.28 160-224s-75.648-224-160-224-160 97.28-160 224"}),ff("path",{fill:"currentColor",d:"M736 448c-35.328 0-64-43.008-64-96s28.672-96 64-96 64 43.008 64 96-28.672 96-64 96"})]))}),HW=hg({name:"Tools",__name:"tools",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M764.416 254.72a351.68 351.68 0 0 1 86.336 149.184H960v192.064H850.752a351.68 351.68 0 0 1-86.336 149.312l54.72 94.72-166.272 96-54.592-94.72a352.64 352.64 0 0 1-172.48 0L371.136 936l-166.272-96 54.72-94.72a351.68 351.68 0 0 1-86.336-149.312H64v-192h109.248a351.68 351.68 0 0 1 86.336-149.312L204.8 160l166.208-96h.192l54.656 94.592a352.64 352.64 0 0 1 172.48 0L652.8 64h.128L819.2 160l-54.72 94.72zM704 499.968a192 192 0 1 0-384 0 192 192 0 0 0 384 0"})]))}),PW=hg({name:"TopLeft",__name:"top-left",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M256 256h416a32 32 0 1 0 0-64H224a32 32 0 0 0-32 32v448a32 32 0 0 0 64 0z"}),ff("path",{fill:"currentColor",d:"M246.656 201.344a32 32 0 0 0-45.312 45.312l544 544a32 32 0 0 0 45.312-45.312l-544-544z"})]))}),OW=hg({name:"TopRight",__name:"top-right",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M768 256H353.6a32 32 0 1 1 0-64H800a32 32 0 0 1 32 32v448a32 32 0 0 1-64 0z"}),ff("path",{fill:"currentColor",d:"M777.344 201.344a32 32 0 0 1 45.312 45.312l-544 544a32 32 0 0 1-45.312-45.312l544-544z"})]))}),GW=hg({name:"Top",__name:"top",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}),KW=hg({name:"TrendCharts",__name:"trend-charts",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128 896V128h768v768zm291.712-327.296 128 102.4 180.16-201.792-47.744-42.624-139.84 156.608-128-102.4-180.16 201.792 47.744 42.624 139.84-156.608zM816 352a48 48 0 1 0-96 0 48 48 0 0 0 96 0"})]))}),qW=hg({name:"TrophyBase",__name:"trophy-base",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M918.4 201.6c-6.4-6.4-12.8-9.6-22.4-9.6H768V96c0-9.6-3.2-16-9.6-22.4C752 67.2 745.6 64 736 64H288c-9.6 0-16 3.2-22.4 9.6C259.2 80 256 86.4 256 96v96H128c-9.6 0-16 3.2-22.4 9.6-6.4 6.4-9.6 16-9.6 22.4 3.2 108.8 25.6 185.6 64 224 34.4 34.4 77.56 55.65 127.65 61.99 10.91 20.44 24.78 39.25 41.95 56.41 40.86 40.86 91 65.47 150.4 71.9V768h-96c-9.6 0-16 3.2-22.4 9.6-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4c6.4 6.4 12.8 9.6 22.4 9.6h256c9.6 0 16-3.2 22.4-9.6 6.4-6.4 9.6-12.8 9.6-22.4s-3.2-16-9.6-22.4c-6.4-6.4-12.8-9.6-22.4-9.6h-96V637.26c59.4-7.71 109.54-30.01 150.4-70.86 17.2-17.2 31.51-36.06 42.81-56.55 48.93-6.51 90.02-27.7 126.79-61.85 38.4-38.4 60.8-112 64-224 0-6.4-3.2-16-9.6-22.4zM256 438.4c-19.2-6.4-35.2-19.2-51.2-35.2-22.4-22.4-35.2-70.4-41.6-147.2H256zm390.4 80C608 553.6 566.4 576 512 576s-99.2-19.2-134.4-57.6C342.4 480 320 438.4 320 384V128h384v256c0 54.4-19.2 99.2-57.6 134.4m172.8-115.2c-16 16-32 25.6-51.2 35.2V256h92.8c-6.4 76.8-19.2 124.8-41.6 147.2zM768 896H256c-9.6 0-16 3.2-22.4 9.6-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4c6.4 6.4 12.8 9.6 22.4 9.6h512c9.6 0 16-3.2 22.4-9.6 6.4-6.4 9.6-12.8 9.6-22.4s-3.2-16-9.6-22.4c-6.4-6.4-12.8-9.6-22.4-9.6"})]))}),YW=hg({name:"Trophy",__name:"trophy",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M480 896V702.08A256.256 256.256 0 0 1 264.064 512h-32.64a96 96 0 0 1-91.968-68.416L93.632 290.88a76.8 76.8 0 0 1 73.6-98.88H256V96a32 32 0 0 1 32-32h448a32 32 0 0 1 32 32v96h88.768a76.8 76.8 0 0 1 73.6 98.88L884.48 443.52A96 96 0 0 1 792.576 512h-32.64A256.256 256.256 0 0 1 544 702.08V896h128a32 32 0 1 1 0 64H352a32 32 0 1 1 0-64zm224-448V128H320v320a192 192 0 1 0 384 0m64 0h24.576a32 32 0 0 0 30.656-22.784l45.824-152.768A12.8 12.8 0 0 0 856.768 256H768zm-512 0V256h-88.768a12.8 12.8 0 0 0-12.288 16.448l45.824 152.768A32 32 0 0 0 231.424 448z"})]))}),VW=hg({name:"TurnOff",__name:"turn-off",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M329.956 257.138a254.862 254.862 0 0 0 0 509.724h364.088a254.862 254.862 0 0 0 0-509.724zm0-72.818h364.088a327.68 327.68 0 1 1 0 655.36H329.956a327.68 327.68 0 1 1 0-655.36z"}),ff("path",{fill:"currentColor",d:"M329.956 621.227a109.227 109.227 0 1 0 0-218.454 109.227 109.227 0 0 0 0 218.454m0 72.817a182.044 182.044 0 1 1 0-364.088 182.044 182.044 0 0 1 0 364.088"})]))}),WW=hg({name:"Umbrella",__name:"umbrella",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M320 768a32 32 0 1 1 64 0 64 64 0 0 0 128 0V512H64a448 448 0 1 1 896 0H576v256a128 128 0 1 1-256 0m570.688-320a384.128 384.128 0 0 0-757.376 0z"})]))}),jW=hg({name:"Unlock",__name:"unlock",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),ff("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z"})]))}),JW=hg({name:"UploadFilled",__name:"upload-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.808 239.808 0 0 1 512 192a239.872 239.872 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}),zW=hg({name:"Upload",__name:"upload",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248z"})]))}),XW=hg({name:"UserFilled",__name:"user-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M288 320a224 224 0 1 0 448 0 224 224 0 1 0-448 0m544 608H160a32 32 0 0 1-32-32v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 0 1-32 32z"})]))}),$W=hg({name:"User",__name:"user",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 512a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512m320 320v-96a96 96 0 0 0-96-96H288a96 96 0 0 0-96 96v96a32 32 0 1 1-64 0v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 1 1-64 0"})]))}),ZW=hg({name:"Van",__name:"van",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M128.896 736H96a32 32 0 0 1-32-32V224a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32v96h164.544a32 32 0 0 1 31.616 27.136l54.144 352A32 32 0 0 1 922.688 736h-91.52a144 144 0 1 1-286.272 0H415.104a144 144 0 1 1-286.272 0zm23.36-64a143.872 143.872 0 0 1 239.488 0H568.32c17.088-25.6 42.24-45.376 71.744-55.808V256H128v416zm655.488 0h77.632l-19.648-128H704v64.896A144 144 0 0 1 807.744 672m48.128-192-14.72-96H704v96h151.872M688 832a80 80 0 1 0 0-160 80 80 0 0 0 0 160m-416 0a80 80 0 1 0 0-160 80 80 0 0 0 0 160"})]))}),ej=hg({name:"VideoCameraFilled",__name:"video-camera-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m768 576 192-64v320l-192-64v96a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zM192 768v64h384v-64zm192-480a160 160 0 0 1 320 0 160 160 0 0 1-320 0m64 0a96 96 0 1 0 192.064-.064A96 96 0 0 0 448 288m-320 32a128 128 0 1 1 256.064.064A128 128 0 0 1 128 320m64 0a64 64 0 1 0 128 0 64 64 0 0 0-128 0"})]))}),tj=hg({name:"VideoCamera",__name:"video-camera",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M704 768V256H128v512zm64-416 192-96v512l-192-96v128a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V224a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zm0 71.552v176.896l128 64V359.552zM192 320h192v64H192z"})]))}),ij=hg({name:"VideoPause",__name:"video-pause",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}),nj=hg({name:"VideoPlay",__name:"video-play",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}),sj=hg({name:"View",__name:"view",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}),rj=hg({name:"WalletFilled",__name:"wallet-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M688 512a112 112 0 1 0 0 224h208v160H128V352h768v160zm32 160h-32a48 48 0 0 1 0-96h32a48 48 0 0 1 0 96m-80-544 128 160H384z"})]))}),aj=hg({name:"Wallet",__name:"wallet",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M640 288h-64V128H128v704h384v32a32 32 0 0 0 32 32H96a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32h512a32 32 0 0 1 32 32z"}),ff("path",{fill:"currentColor",d:"M128 320v512h768V320zm-32-64h832a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32"}),ff("path",{fill:"currentColor",d:"M704 640a64 64 0 1 1 0-128 64 64 0 0 1 0 128"})]))}),oj=hg({name:"WarnTriangleFilled",__name:"warn-triangle-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M928.99 755.83 574.6 203.25c-12.89-20.16-36.76-32.58-62.6-32.58s-49.71 12.43-62.6 32.58L95.01 755.83c-12.91 20.12-12.9 44.91.01 65.03 12.92 20.12 36.78 32.51 62.59 32.49h708.78c25.82.01 49.68-12.37 62.59-32.49 12.91-20.12 12.92-44.91.01-65.03M554.67 768h-85.33v-85.33h85.33zm0-426.67v298.66h-85.33V341.32z"})]))}),lj=hg({name:"WarningFilled",__name:"warning-filled",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}),Aj=hg({name:"Warning",__name:"warning",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"})]))}),cj=hg({name:"Watch",__name:"watch",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M512 768a256 256 0 1 0 0-512 256 256 0 0 0 0 512m0 64a320 320 0 1 1 0-640 320 320 0 0 1 0 640"}),ff("path",{fill:"currentColor",d:"M480 352a32 32 0 0 1 32 32v160a32 32 0 0 1-64 0V384a32 32 0 0 1 32-32"}),ff("path",{fill:"currentColor",d:"M480 512h128q32 0 32 32t-32 32H480q-32 0-32-32t32-32m128-256V128H416v128h-64V64h320v192zM416 768v128h192V768h64v192H352V768z"})]))}),uj=hg({name:"Watermelon",__name:"watermelon",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m683.072 600.32-43.648 162.816-61.824-16.512 53.248-198.528L576 493.248l-158.4 158.4-45.248-45.248 158.4-158.4-55.616-55.616-198.528 53.248-16.512-61.824 162.816-43.648L282.752 200A384 384 0 0 0 824 741.248zm231.552 141.056a448 448 0 1 1-632-632l632 632"})]))}),hj=hg({name:"WindPower",__name:"wind-power",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"M160 64q32 0 32 32v832q0 32-32 32t-32-32V96q0-32 32-32m416 354.624 128-11.584V168.96l-128-11.52v261.12zm-64 5.824V151.552L320 134.08V160h-64V64l616.704 56.064A96 96 0 0 1 960 215.68v144.64a96 96 0 0 1-87.296 95.616L256 512V224h64v217.92zm256-23.232 98.88-8.96A32 32 0 0 0 896 360.32V215.68a32 32 0 0 0-29.12-31.872l-98.88-8.96z"})]))}),dj=hg({name:"ZoomIn",__name:"zoom-in",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}),gj=hg({name:"ZoomOut",__name:"zoom-out",setup:e=>(e,t)=>(af(),cf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ff("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))});const pj=Object.freeze(Object.defineProperty({__proto__:null,AddLocation:fH,Aim:CH,AlarmClock:vH,Apple:yH,ArrowDown:QH,ArrowDownBold:EH,ArrowLeft:kH,ArrowLeftBold:SH,ArrowRight:MH,ArrowRightBold:FH,ArrowUp:UH,ArrowUpBold:NH,Avatar:PH,Back:GH,Baseball:qH,Basketball:VH,Bell:zH,BellFilled:jH,Bicycle:$H,Bottom:sP,BottomLeft:eP,BottomRight:iP,Bowl:aP,Box:lP,Briefcase:cP,Brush:gP,BrushFilled:hP,Burger:fP,Calendar:CP,Camera:yP,CameraFilled:vP,CaretBottom:EP,CaretLeft:QP,CaretRight:SP,CaretTop:kP,Cellphone:FP,ChatDotRound:MP,ChatDotSquare:NP,ChatLineRound:UP,ChatLineSquare:PP,ChatRound:GP,ChatSquare:qP,Check:VP,Checked:jP,Cherry:zP,Chicken:$P,ChromeFilled:eO,CircleCheck:sO,CircleCheckFilled:iO,CircleClose:lO,CircleCloseFilled:aO,CirclePlus:hO,CirclePlusFilled:cO,Clock:gO,Close:CO,CloseBold:fO,Cloudy:vO,Coffee:EO,CoffeeCup:yO,Coin:QO,ColdDrink:SO,Collection:FO,CollectionTag:kO,Comment:MO,Compass:NO,Connection:UO,Coordinate:PO,CopyDocument:GO,Cpu:qO,CreditCard:VO,Crop:jO,DArrowLeft:zO,DArrowRight:$O,DCaret:eG,DataAnalysis:iG,DataBoard:sG,DataLine:aG,Delete:hG,DeleteFilled:lG,DeleteLocation:cG,Dessert:gG,Discount:fG,Dish:vG,DishDot:CG,Document:FG,DocumentAdd:yG,DocumentChecked:EG,DocumentCopy:QG,DocumentDelete:SG,DocumentRemove:kG,Download:MG,Drizzling:NG,Edit:PG,EditPen:UG,Eleme:qG,ElemeFilled:GG,ElementPlus:VG,Expand:jG,Failed:zG,Female:$G,Files:eK,Film:iK,Filter:sK,Finished:aK,FirstAidKit:lK,Flag:cK,Fold:hK,Folder:EK,FolderAdd:gK,FolderChecked:fK,FolderDelete:CK,FolderOpened:vK,FolderRemove:yK,Food:QK,Football:SK,ForkSpoon:kK,Fries:FK,FullScreen:MK,Goblet:GK,GobletFull:NK,GobletSquare:PK,GobletSquareFull:UK,GoldMedal:qK,Goods:jK,GoodsFilled:VK,Grape:zK,Grid:$K,Guide:eq,Handbag:iq,Headset:sq,Help:lq,HelpFilled:aq,Hide:cq,Histogram:hq,HomeFilled:gq,HotWater:fq,House:Cq,IceCream:Eq,IceCreamRound:vq,IceCreamSquare:yq,IceDrink:Qq,IceTea:Sq,InfoFilled:kq,Iphone:Fq,Key:Mq,KnifeFork:Nq,Lightning:Uq,Link:Pq,List:Gq,Loading:qq,Location:zq,LocationFilled:Vq,LocationInformation:jq,Lock:$q,Lollipop:eY,MagicStick:iY,Magnet:sY,Male:aY,Management:lY,MapLocation:cY,Medal:hY,Memo:gY,Menu:fY,Message:vY,MessageBox:CY,Mic:yY,Microphone:EY,MilkTea:QY,Minus:SY,Money:kY,Monitor:FY,Moon:NY,MoonNight:MY,More:PY,MoreFilled:UY,MostlyCloudy:GY,Mouse:qY,Mug:VY,Mute:zY,MuteNotification:jY,NoSmoking:$Y,Notebook:eV,Notification:iV,Odometer:sV,OfficeBuilding:aV,Open:lV,Operation:cV,Opportunity:hV,Orange:gV,Paperclip:fV,PartlyCloudy:CV,Pear:vV,Phone:bV,PhoneFilled:yV,Picture:QV,PictureFilled:EV,PictureRounded:wV,PieChart:_V,Place:SV,Platform:xV,Plus:kV,Pointer:DV,Position:FV,Postcard:TV,Pouring:MV,Present:RV,PriceTag:NV,Printer:LV,Promotion:UV,QuartzWatch:HV,QuestionFilled:PV,Rank:OV,Reading:KV,ReadingLamp:GV,Refresh:VV,RefreshLeft:qV,RefreshRight:YV,Refrigerator:WV,Remove:JV,RemoveFilled:jV,Right:zV,ScaleToOriginal:XV,School:$V,Scissor:ZV,Search:eW,Select:tW,Sell:iW,SemiSelect:nW,Service:sW,SetUp:rW,Setting:aW,Share:oW,Ship:lW,Shop:AW,ShoppingBag:cW,ShoppingCart:hW,ShoppingCartFull:uW,ShoppingTrolley:dW,Smoking:gW,Soccer:pW,SoldOut:fW,Sort:IW,SortDown:mW,SortUp:CW,Stamp:vW,Star:yW,StarFilled:BW,Stopwatch:bW,SuccessFilled:EW,Sugar:wW,Suitcase:_W,SuitcaseLine:QW,Sunny:SW,Sunrise:xW,Sunset:kW,Switch:TW,SwitchButton:DW,SwitchFilled:FW,TakeawayBox:MW,Ticket:RW,Tickets:NW,Timer:LW,ToiletPaper:UW,Tools:HW,Top:GW,TopLeft:PW,TopRight:OW,TrendCharts:KW,Trophy:YW,TrophyBase:qW,TurnOff:VW,Umbrella:WW,Unlock:jW,Upload:zW,UploadFilled:JW,User:$W,UserFilled:XW,Van:ZW,VideoCamera:tj,VideoCameraFilled:ej,VideoPause:ij,VideoPlay:nj,View:sj,Wallet:aj,WalletFilled:rj,WarnTriangleFilled:oj,Warning:Aj,WarningFilled:lj,Watch:cj,Watermelon:uj,WindPower:hj,ZoomIn:dj,ZoomOut:gj},Symbol.toStringTag,{value:"Module"})),fj=[String,Object,Function],mj={Close:CO},Cj={Close:CO,SuccessFilled:EW,InfoFilled:kq,WarningFilled:lj,CircleCloseFilled:aO},Ij={success:EW,warning:lj,error:aO,info:kq},vj={validating:qq,success:sO,error:lO},Bj=BU({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:kU(Ij),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:["light","dark"],default:"light"}}),yj={close:e=>e instanceof MouseEvent},bj=hg({...hg({name:"ElAlert"}),props:Bj,emits:yj,setup(e,{emit:t}){const i=e,{Close:n}=Cj,s=jg(),r=KF("alert"),a=zh(!0),o=qf((()=>Ij[i.type])),l=qf((()=>[r.e("icon"),{[r.is("big")]:!!i.description||!!s.default}])),A=qf((()=>({"with-description":i.description||s.default}))),c=e=>{a.value=!1,t("close",e)};return(e,t)=>(af(),uf(am,{name:ed(r).b("fade"),persisted:""},{default:Nd((()=>[Ld(ff("div",{class:pu([ed(r).b(),ed(r).m(e.type),ed(r).is("center",e.center),ed(r).is(e.effect)]),role:"alert"},[e.showIcon&&ed(o)?(af(),uf(ed(gH),{key:0,class:pu(ed(l))},{default:Nd((()=>[(af(),uf(Ng(ed(o))))])),_:1},8,["class"])):Bf("v-if",!0),ff("div",{class:pu(ed(r).e("content"))},[e.title||e.$slots.title?(af(),cf("span",{key:0,class:pu([ed(r).e("title"),ed(A)])},[Gg(e.$slots,"title",{},(()=>[vf(yu(e.title),1)]))],2)):Bf("v-if",!0),e.$slots.default||e.description?(af(),cf("p",{key:1,class:pu(ed(r).e("description"))},[Gg(e.$slots,"default",{},(()=>[vf(yu(e.description),1)]))],2)):Bf("v-if",!0),e.closable?(af(),cf(Zp,{key:2},[e.closeText?(af(),cf("div",{key:0,class:pu([ed(r).e("close-btn"),ed(r).is("customed")]),onClick:c},yu(e.closeText),3)):(af(),uf(ed(gH),{key:1,class:pu(ed(r).e("close-btn")),onClick:c},{default:Nd((()=>[mf(ed(n))])),_:1},8,["class"]))],64)):Bf("v-if",!0)],2)],2),[[ym,a.value]])])),_:3},8,["name"]))}});const Ej=lH(KU(bj,[["__file","alert.vue"]])),wj=()=>bL&&/firefox/i.test(window.navigator.userAgent);let Qj;const _j=`\n  height:0 !important;\n  visibility:hidden !important;\n  ${wj()?"":"overflow:hidden !important;"}\n  position:absolute !important;\n  z-index:-1000 !important;\n  top:0 !important;\n  right:0 !important;\n`,Sj=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function xj(e,t=1,i){var n;Qj||(Qj=document.createElement("textarea"),document.body.appendChild(Qj));const{paddingSize:s,borderSize:r,boxSizing:a,contextStyle:o}=function(e){const t=window.getComputedStyle(e),i=t.getPropertyValue("box-sizing"),n=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),s=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:Sj.map((e=>`${e}:${t.getPropertyValue(e)}`)).join(";"),paddingSize:n,borderSize:s,boxSizing:i}}(e);Qj.setAttribute("style",`${o};${_j}`),Qj.value=e.value||e.placeholder||"";let l=Qj.scrollHeight;const A={};"border-box"===a?l+=r:"content-box"===a&&(l-=s),Qj.value="";const c=Qj.scrollHeight-s;if(AL(t)){let e=c*t;"border-box"===a&&(e=e+s+r),l=Math.max(e,l),A.minHeight=`${e}px`}if(AL(i)){let e=c*i;"border-box"===a&&(e=e+s+r),l=Math.min(e,l)}return A.height=`${l}px`,null==(n=Qj.parentNode)||n.removeChild(Qj),Qj=void 0,A}const kj=BU({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Dj=e=>nL(kj,e),Fj=BU({id:{type:String,default:void 0},size:bU,disabled:Boolean,modelValue:{type:[String,Number,Object],default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:[Boolean,Object],default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:fj},prefixIcon:{type:fj},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:[Object,Array,String],default:()=>({})},autofocus:Boolean,rows:{type:Number,default:2},...Dj(["ariaLabel"])}),Tj={[UU]:e=>Gc(e),input:e=>Gc(e),change:e=>Gc(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},Mj=["class","style"],Rj=/^on[A-Z]/,Nj=(e={})=>{const{excludeListeners:t=!1,excludeKeys:i}=e,n=qf((()=>((null==i?void 0:i.value)||[]).concat(Mj))),s=kf();return qf(s?()=>{var e;return YN(Object.entries(null==(e=s.proxy)?void 0:e.$attrs).filter((([e])=>!(n.value.includes(e)||t&&Rj.test(e)))))}:()=>({}))},Lj=Symbol("formContextKey"),Uj=Symbol("formItemContextKey"),Hj={prefix:Math.floor(1e4*Math.random()),current:0},Pj=Symbol("elIdInjection"),Oj=()=>kf()?pp(Pj,Hj):Hj,Gj=e=>{const t=Oj(),i=GF();return yL((()=>ed(e)||`${i.value}-id-${t.prefix}-${t.current++}`))},Kj=()=>({form:pp(Lj,void 0),formItem:pp(Uj,void 0)}),qj=(e,{formItemContext:t,disableIdGeneration:i,disableIdManagement:n})=>{i||(i=zh(!1)),n||(n=zh(!1));const s=zh();let r;const a=qf((()=>{var i;return!!(!e.label&&!e.ariaLabel&&t&&t.inputIds&&(null==(i=t.inputIds)?void 0:i.length)<=1)}));return Eg((()=>{r=Pp([ld(e,"id"),i],(([e,i])=>{const r=null!=e?e:i?void 0:Gj().value;r!==s.value&&((null==t?void 0:t.removeInputId)&&(s.value&&t.removeInputId(s.value),(null==n?void 0:n.value)||i||!r||t.addInputId(r)),s.value=r)}),{immediate:!0})})),Sg((()=>{r&&r(),(null==t?void 0:t.removeInputId)&&s.value&&t.removeInputId(s.value)})),{isLabeledByFormItem:a,inputId:s}},Yj=e=>{const t=kf();return qf((()=>{var i,n;return null==(n=null==(i=null==t?void 0:t.proxy)?void 0:i.$props)?void 0:n[e]}))},Vj=(e,t={})=>{const i=zh(void 0),n=t.prop?i:Yj("size"),s=t.global?i:wU(),r=t.form?{size:void 0}:pp(Lj,void 0),a=t.formItem?{size:void 0}:pp(Uj,void 0);return qf((()=>n.value||ed(e)||(null==a?void 0:a.size)||(null==r?void 0:r.size)||s.value||""))},Wj=e=>{const t=Yj("disabled"),i=pp(Lj,void 0);return qf((()=>t.value||ed(e)||(null==i?void 0:i.disabled)||!1))};function jj(e,{beforeFocus:t,afterFocus:i,beforeBlur:n,afterBlur:s}={}){const r=kf(),{emit:a}=r,o=Xh(),l=zh(!1),A=e=>{!!Oc(t)&&t(e)||l.value||(l.value=!0,a("focus",e),null==i||i())},c=e=>{var t;!!Oc(n)&&n(e)||e.relatedTarget&&(null==(t=o.value)?void 0:t.contains(e.relatedTarget))||(l.value=!1,a("blur",e),null==s||s())};return Pp(o,(e=>{e&&e.setAttribute("tabindex","-1")})),UL(o,"focus",A,!0),UL(o,"blur",c,!0),UL(o,"click",(()=>{var t,i;(null==(t=o.value)?void 0:t.contains(document.activeElement))&&o.value!==document.activeElement||null==(i=e.value)||i.focus()}),!0),{isFocused:l,wrapperRef:o,handleFocus:A,handleBlur:c}}function Jj({afterComposition:e,emit:t}){const i=zh(!1),n=e=>{var n;null==t||t("compositionupdate",e);const s=null==(n=e.target)?void 0:n.value,r=s[s.length-1]||"";i.value=!(e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e))(r)},s=n=>{null==t||t("compositionend",n),i.value&&(i.value=!1,Qd((()=>e(n))))};return{isComposing:i,handleComposition:e=>{"compositionend"===e.type?s(e):n(e)},handleCompositionStart:e=>{null==t||t("compositionstart",e),i.value=!0},handleCompositionUpdate:n,handleCompositionEnd:s}}const zj=hg({...hg({name:"ElInput",inheritAttrs:!1}),props:Fj,emits:Tj,setup(e,{expose:t,emit:i}){const n=e,s=Jg(),r=Nj(),a=jg(),o=qf((()=>["textarea"===n.type?p.b():g.b(),g.m(h.value),g.is("disabled",d.value),g.is("exceed",U.value),{[g.b("group")]:a.prepend||a.append,[g.m("prefix")]:a.prefix||n.prefixIcon,[g.m("suffix")]:a.suffix||n.suffixIcon||n.clearable||n.showPassword,[g.bm("suffix","password-clear")]:M.value&&R.value,[g.b("hidden")]:"hidden"===n.type},s.class])),l=qf((()=>[g.e("wrapper"),g.is("focus",E.value)])),{form:A,formItem:c}=Kj(),{inputId:u}=qj(n,{formItemContext:c}),h=Vj(),d=Wj(),g=KF("input"),p=KF("textarea"),f=Xh(),m=Xh(),C=zh(!1),I=zh(!1),v=zh(),B=Xh(n.inputStyle),y=qf((()=>f.value||m.value)),{wrapperRef:b,isFocused:E,handleFocus:w,handleBlur:Q}=jj(y,{beforeFocus:()=>d.value,afterBlur(){var e;n.validateEvent&&(null==(e=null==c?void 0:c.validate)||e.call(c,"blur").catch((e=>{})))}}),_=qf((()=>{var e;return null!=(e=null==A?void 0:A.statusIcon)&&e})),S=qf((()=>(null==c?void 0:c.validateState)||"")),x=qf((()=>S.value&&vj[S.value])),k=qf((()=>I.value?sj:cq)),D=qf((()=>[s.style])),F=qf((()=>[n.inputStyle,B.value,{resize:n.resize}])),T=qf((()=>jN(n.modelValue)?"":String(n.modelValue))),M=qf((()=>n.clearable&&!d.value&&!n.readonly&&!!T.value&&(E.value||C.value))),R=qf((()=>n.showPassword&&!d.value&&!!T.value&&(!!T.value||E.value))),N=qf((()=>n.showWordLimit&&!!n.maxlength&&("text"===n.type||"textarea"===n.type)&&!d.value&&!n.readonly&&!n.showPassword)),L=qf((()=>T.value.length)),U=qf((()=>!!N.value&&L.value>Number(n.maxlength))),H=qf((()=>!!a.suffix||!!n.suffixIcon||M.value||n.showPassword||N.value||!!S.value&&_.value)),[P,O]=function(e){let t;return[function(){if(null==e.value)return;const{selectionStart:i,selectionEnd:n,value:s}=e.value;if(null==i||null==n)return;const r=s.slice(0,Math.max(0,i)),a=s.slice(Math.max(0,n));t={selectionStart:i,selectionEnd:n,value:s,beforeTxt:r,afterTxt:a}},function(){if(null==e.value||null==t)return;const{value:i}=e.value,{beforeTxt:n,afterTxt:s,selectionStart:r}=t;if(null==n||null==s||null==r)return;let a=i.length;if(i.endsWith(s))a=i.length-s.length;else if(i.startsWith(n))a=n.length;else{const e=n[r-1],t=i.indexOf(e,r-1);-1!==t&&(a=t+1)}e.value.setSelectionRange(a,a)}]}(f);WL(m,(e=>{if(K(),!N.value||"both"!==n.resize)return;const t=e[0],{width:i}=t.contentRect;v.value={right:`calc(100% - ${i+15+6}px)`}}));const G=()=>{const{type:e,autosize:t}=n;if(bL&&"textarea"===e&&m.value)if(t){const e=qc(t)?t.minRows:void 0,i=qc(t)?t.maxRows:void 0,n=xj(m.value,e,i);B.value={overflowY:"hidden",...n},Qd((()=>{m.value.offsetHeight,B.value=n}))}else B.value={minHeight:xj(m.value).minHeight}},K=(e=>{let t=!1;return()=>{var i;if(t||!n.autosize)return;null===(null==(i=m.value)?void 0:i.offsetParent)||(e(),t=!0)}})(G),q=()=>{const e=y.value,t=n.formatter?n.formatter(T.value):T.value;e&&e.value!==t&&(e.value=t)},Y=async e=>{P();let{value:t}=e.target;n.formatter&&(t=n.parser?n.parser(t):t),W.value||(t!==T.value?(i(UU,t),i("input",t),await Qd(),q(),O()):q())},V=e=>{i("change",e.target.value)},{isComposing:W,handleCompositionStart:j,handleCompositionUpdate:J,handleCompositionEnd:z}=Jj({emit:i,afterComposition:Y}),X=()=>{P(),I.value=!I.value,setTimeout(O)},$=e=>{C.value=!1,i("mouseleave",e)},Z=e=>{C.value=!0,i("mouseenter",e)},ee=e=>{i("keydown",e)},te=()=>{i(UU,""),i("change",""),i("clear"),i("input","")};return Pp((()=>n.modelValue),(()=>{var e;Qd((()=>G())),n.validateEvent&&(null==(e=null==c?void 0:c.validate)||e.call(c,"change").catch((e=>{})))})),Pp(T,(()=>q())),Pp((()=>n.type),(async()=>{await Qd(),q(),G()})),Eg((()=>{!n.formatter&&n.parser,q(),Qd(G)})),t({input:f,textarea:m,ref:y,textareaStyle:F,autosize:ld(n,"autosize"),isComposing:W,focus:()=>{var e;return null==(e=y.value)?void 0:e.focus()},blur:()=>{var e;return null==(e=y.value)?void 0:e.blur()},select:()=>{var e;null==(e=y.value)||e.select()},clear:te,resizeTextarea:G}),(e,t)=>(af(),cf("div",{class:pu([ed(o),{[ed(g).bm("group","append")]:e.$slots.append,[ed(g).bm("group","prepend")]:e.$slots.prepend}]),style:cu(ed(D)),onMouseenter:Z,onMouseleave:$},[Bf(" input "),"textarea"!==e.type?(af(),cf(Zp,{key:0},[Bf(" prepend slot "),e.$slots.prepend?(af(),cf("div",{key:0,class:pu(ed(g).be("group","prepend"))},[Gg(e.$slots,"prepend")],2)):Bf("v-if",!0),ff("div",{ref_key:"wrapperRef",ref:b,class:pu(ed(l))},[Bf(" prefix slot "),e.$slots.prefix||e.prefixIcon?(af(),cf("span",{key:0,class:pu(ed(g).e("prefix"))},[ff("span",{class:pu(ed(g).e("prefix-inner"))},[Gg(e.$slots,"prefix"),e.prefixIcon?(af(),uf(ed(gH),{key:0,class:pu(ed(g).e("icon"))},{default:Nd((()=>[(af(),uf(Ng(e.prefixIcon)))])),_:1},8,["class"])):Bf("v-if",!0)],2)],2)):Bf("v-if",!0),ff("input",wf({id:ed(u),ref_key:"input",ref:f,class:ed(g).e("inner")},ed(r),{minlength:e.minlength,maxlength:e.maxlength,type:e.showPassword?I.value?"text":"password":e.type,disabled:ed(d),readonly:e.readonly,autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-label":e.ariaLabel,placeholder:e.placeholder,style:e.inputStyle,form:e.form,autofocus:e.autofocus,role:e.containerRole,onCompositionstart:ed(j),onCompositionupdate:ed(J),onCompositionend:ed(z),onInput:Y,onChange:V,onKeydown:ee}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","onCompositionstart","onCompositionupdate","onCompositionend"]),Bf(" suffix slot "),ed(H)?(af(),cf("span",{key:1,class:pu(ed(g).e("suffix"))},[ff("span",{class:pu(ed(g).e("suffix-inner"))},[ed(M)&&ed(R)&&ed(N)?Bf("v-if",!0):(af(),cf(Zp,{key:0},[Gg(e.$slots,"suffix"),e.suffixIcon?(af(),uf(ed(gH),{key:0,class:pu(ed(g).e("icon"))},{default:Nd((()=>[(af(),uf(Ng(e.suffixIcon)))])),_:1},8,["class"])):Bf("v-if",!0)],64)),ed(M)?(af(),uf(ed(gH),{key:1,class:pu([ed(g).e("icon"),ed(g).e("clear")]),onMousedown:AC(ed(xc),["prevent"]),onClick:te},{default:Nd((()=>[mf(ed(lO))])),_:1},8,["class","onMousedown"])):Bf("v-if",!0),ed(R)?(af(),uf(ed(gH),{key:2,class:pu([ed(g).e("icon"),ed(g).e("password")]),onClick:X},{default:Nd((()=>[(af(),uf(Ng(ed(k))))])),_:1},8,["class"])):Bf("v-if",!0),ed(N)?(af(),cf("span",{key:3,class:pu(ed(g).e("count"))},[ff("span",{class:pu(ed(g).e("count-inner"))},yu(ed(L))+" / "+yu(e.maxlength),3)],2)):Bf("v-if",!0),ed(S)&&ed(x)&&ed(_)?(af(),uf(ed(gH),{key:4,class:pu([ed(g).e("icon"),ed(g).e("validateIcon"),ed(g).is("loading","validating"===ed(S))])},{default:Nd((()=>[(af(),uf(Ng(ed(x))))])),_:1},8,["class"])):Bf("v-if",!0)],2)],2)):Bf("v-if",!0)],2),Bf(" append slot "),e.$slots.append?(af(),cf("div",{key:1,class:pu(ed(g).be("group","append"))},[Gg(e.$slots,"append")],2)):Bf("v-if",!0)],64)):(af(),cf(Zp,{key:1},[Bf(" textarea "),ff("textarea",wf({id:ed(u),ref_key:"textarea",ref:m,class:[ed(p).e("inner"),ed(g).is("focus",ed(E))]},ed(r),{minlength:e.minlength,maxlength:e.maxlength,tabindex:e.tabindex,disabled:ed(d),readonly:e.readonly,autocomplete:e.autocomplete,style:ed(F),"aria-label":e.ariaLabel,placeholder:e.placeholder,form:e.form,autofocus:e.autofocus,rows:e.rows,role:e.containerRole,onCompositionstart:ed(j),onCompositionupdate:ed(J),onCompositionend:ed(z),onInput:Y,onFocus:ed(w),onBlur:ed(Q),onChange:V,onKeydown:ee}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),ed(N)?(af(),cf("span",{key:0,style:cu(v.value),class:pu(ed(g).e("count"))},yu(ed(L))+" / "+yu(e.maxlength),7)):Bf("v-if",!0)],64))],38))}});const Xj=lH(KU(zj,[["__file","input.vue"]])),$j={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},Zj=Symbol("scrollbarContextKey"),eJ=BU({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),tJ=hg({__name:"thumb",props:eJ,setup(e){const t=e,i=pp(Zj),n=KF("scrollbar");i||lU("Thumb","can not inject scrollbar context");const s=zh(),r=zh(),a=zh({}),o=zh(!1);let l=!1,A=!1,c=bL?document.onselectstart:null;const u=qf((()=>$j[t.vertical?"vertical":"horizontal"])),h=qf((()=>(({move:e,size:t,bar:i})=>({[i.size]:t,transform:`translate${i.axis}(${e}%)`}))({size:t.size,move:t.move,bar:u.value}))),d=qf((()=>s.value[u.value.offset]**2/i.wrapElement[u.value.scrollSize]/t.ratio/r.value[u.value.offset])),g=e=>{var t;if(e.stopPropagation(),e.ctrlKey||[1,2].includes(e.button))return;null==(t=window.getSelection())||t.removeAllRanges(),f(e);const i=e.currentTarget;i&&(a.value[u.value.axis]=i[u.value.offset]-(e[u.value.client]-i.getBoundingClientRect()[u.value.direction]))},p=e=>{if(!r.value||!s.value||!i.wrapElement)return;const t=100*(Math.abs(e.target.getBoundingClientRect()[u.value.direction]-e[u.value.client])-r.value[u.value.offset]/2)*d.value/s.value[u.value.offset];i.wrapElement[u.value.scroll]=t*i.wrapElement[u.value.scrollSize]/100},f=e=>{e.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",m),document.addEventListener("mouseup",C),c=document.onselectstart,document.onselectstart=()=>!1},m=e=>{if(!s.value||!r.value)return;if(!1===l)return;const t=a.value[u.value.axis];if(!t)return;const n=100*(-1*(s.value.getBoundingClientRect()[u.value.direction]-e[u.value.client])-(r.value[u.value.offset]-t))*d.value/s.value[u.value.offset];i.wrapElement[u.value.scroll]=n*i.wrapElement[u.value.scrollSize]/100},C=()=>{l=!1,a.value[u.value.axis]=0,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",C),I(),A&&(o.value=!1)};_g((()=>{I(),document.removeEventListener("mouseup",C)}));const I=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return UL(ld(i,"scrollbarElement"),"mousemove",(()=>{A=!1,o.value=!!t.size})),UL(ld(i,"scrollbarElement"),"mouseleave",(()=>{A=!0,o.value=l})),(e,t)=>(af(),uf(am,{name:ed(n).b("fade"),persisted:""},{default:Nd((()=>[Ld(ff("div",{ref_key:"instance",ref:s,class:pu([ed(n).e("bar"),ed(n).is(ed(u).key)]),onMousedown:p},[ff("div",{ref_key:"thumb",ref:r,class:pu(ed(n).e("thumb")),style:cu(ed(h)),onMousedown:g},null,38)],34),[[ym,e.always||o.value]])])),_:1},8,["name"]))}});var iJ=KU(tJ,[["__file","thumb.vue"]]);const nJ=hg({__name:"bar",props:BU({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),setup(e,{expose:t}){const i=e,n=pp(Zj),s=zh(0),r=zh(0),a=zh(""),o=zh(""),l=zh(1),A=zh(1);return t({handleScroll:e=>{if(e){const t=e.offsetHeight-4,i=e.offsetWidth-4;r.value=100*e.scrollTop/t*l.value,s.value=100*e.scrollLeft/i*A.value}},update:()=>{const e=null==n?void 0:n.wrapElement;if(!e)return;const t=e.offsetHeight-4,s=e.offsetWidth-4,r=t**2/e.scrollHeight,c=s**2/e.scrollWidth,u=Math.max(r,i.minSize),h=Math.max(c,i.minSize);l.value=r/(t-r)/(u/(t-u)),A.value=c/(s-c)/(h/(s-h)),o.value=u+4<t?`${u}px`:"",a.value=h+4<s?`${h}px`:""}}),(e,t)=>(af(),cf(Zp,null,[mf(iJ,{move:s.value,ratio:A.value,size:a.value,always:e.always},null,8,["move","ratio","size","always"]),mf(iJ,{move:r.value,ratio:l.value,size:o.value,vertical:"",always:e.always},null,8,["move","ratio","size","always"])],64))}});var sJ=KU(nJ,[["__file","bar.vue"]]);const rJ=BU({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:[String,Object,Array],default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Dj(["ariaLabel","ariaOrientation"])}),aJ={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(AL)},oJ=hg({...hg({name:"ElScrollbar"}),props:rJ,emits:aJ,setup(e,{expose:t,emit:i}){const n=e,s=KF("scrollbar");let r,a,o=0,l=0;const A=zh(),c=zh(),u=zh(),h=zh(),d=qf((()=>{const e={};return n.height&&(e.height=$U(n.height)),n.maxHeight&&(e.maxHeight=$U(n.maxHeight)),[n.wrapStyle,e]})),g=qf((()=>[n.wrapClass,s.e("wrap"),{[s.em("wrap","hidden-default")]:!n.native}])),p=qf((()=>[s.e("view"),n.viewClass])),f=()=>{var e;c.value&&(null==(e=h.value)||e.handleScroll(c.value),o=c.value.scrollTop,l=c.value.scrollLeft,i("scroll",{scrollTop:c.value.scrollTop,scrollLeft:c.value.scrollLeft}))};const m=()=>{var e;null==(e=h.value)||e.update()};return Pp((()=>n.noresize),(e=>{e?(null==r||r(),null==a||a()):(({stop:r}=WL(u,m)),a=UL("resize",m))}),{immediate:!0}),Pp((()=>[n.maxHeight,n.height]),(()=>{n.native||Qd((()=>{var e;m(),c.value&&(null==(e=h.value)||e.handleScroll(c.value))}))})),gp(Zj,Lh({scrollbarElement:A,wrapElement:c})),mg((()=>{c.value&&(c.value.scrollTop=o,c.value.scrollLeft=l)})),Eg((()=>{n.native||Qd((()=>{m()}))})),Qg((()=>m())),t({wrapRef:c,update:m,scrollTo:function(e,t){qc(e)?c.value.scrollTo(e):AL(e)&&AL(t)&&c.value.scrollTo(e,t)},setScrollTop:e=>{AL(e)&&(c.value.scrollTop=e)},setScrollLeft:e=>{AL(e)&&(c.value.scrollLeft=e)},handleScroll:f}),(e,t)=>(af(),cf("div",{ref_key:"scrollbarRef",ref:A,class:pu(ed(s).b())},[ff("div",{ref_key:"wrapRef",ref:c,class:pu(ed(g)),style:cu(ed(d)),tabindex:e.tabindex,onScroll:f},[(af(),uf(Ng(e.tag),{id:e.id,ref_key:"resizeRef",ref:u,class:pu(ed(p)),style:cu(e.viewStyle),role:e.role,"aria-label":e.ariaLabel,"aria-orientation":e.ariaOrientation},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),e.native?Bf("v-if",!0):(af(),uf(sJ,{key:0,ref_key:"barRef",ref:h,always:e.always,"min-size":e.minSize},null,8,["always","min-size"]))],2))}});const lJ=lH(KU(oJ,[["__file","scrollbar.vue"]])),AJ=Symbol("popper"),cJ=Symbol("popperContent"),uJ=BU({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),hJ=hg({...hg({name:"ElPopper",inheritAttrs:!1}),props:uJ,setup(e,{expose:t}){const i=e,n={triggerRef:zh(),popperInstanceRef:zh(),contentRef:zh(),referenceRef:zh(),role:qf((()=>i.role))};return t(n),gp(AJ,n),(e,t)=>Gg(e.$slots,"default")}});var dJ=KU(hJ,[["__file","popper.vue"]]);const gJ=BU({arrowOffset:{type:Number,default:5}}),pJ=hg({...hg({name:"ElPopperArrow",inheritAttrs:!1}),props:gJ,setup(e,{expose:t}){const i=e,n=KF("popper"),{arrowOffset:s,arrowRef:r,arrowStyle:a}=pp(cJ,void 0);return Pp((()=>i.arrowOffset),(e=>{s.value=e})),_g((()=>{r.value=void 0})),t({arrowRef:r}),(e,t)=>(af(),cf("span",{ref_key:"arrowRef",ref:r,class:pu(ed(n).e("arrow")),style:cu(ed(a)),"data-popper-arrow":""},null,6))}});var fJ=KU(pJ,[["__file","arrow.vue"]]);const mJ=BU({virtualRef:{type:Object},virtualTriggering:Boolean,onMouseenter:{type:Function},onMouseleave:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onFocus:{type:Function},onBlur:{type:Function},onContextmenu:{type:Function},id:String,open:Boolean}),CJ=Symbol("elForwardRef"),IJ=e=>Array.from(e.querySelectorAll('a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])')).filter((e=>vJ(e)&&(e=>"fixed"!==getComputedStyle(e).position&&null!==e.offsetParent)(e))),vJ=e=>{if(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return!("hidden"===e.type||"file"===e.type);case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},BJ=function(e,t,...i){let n;n=t.includes("mouse")||t.includes("click")?"MouseEvents":t.includes("key")?"KeyboardEvent":"HTMLEvents";const s=document.createEvent(n);return s.initEvent(t,...i),e.dispatchEvent(s),e},yJ=e=>!e.getAttribute("aria-owns"),bJ=(e,t,i)=>{const{parentNode:n}=e;if(!n)return null;const s=n.querySelectorAll(i);return s[Array.prototype.indexOf.call(s,e)+t]||null},EJ=e=>{e&&(e.focus(),!yJ(e)&&e.click())},wJ=hg({name:"ElOnlyChild",setup(e,{slots:t,attrs:i}){var n;const s=pp(CJ),r=(a=null!=(n=null==s?void 0:s.setForwardRef)?n:xc,{mounted(e){a(e)},updated(e){a(e)},unmounted(){a(null)}});var a;return()=>{var e;const n=null==(e=t.default)?void 0:e.call(t,i);if(!n)return null;if(n.length>1)return null;const s=QJ(n);return s?Ld(If(s,i),[[r]]):null}}});function QJ(e){if(!e)return null;const t=e;for(const i of t){if(qc(i))switch(i.type){case tf:continue;case ef:case"svg":return _J(i);case Zp:return QJ(i.children);default:return i}return _J(i)}return null}function _J(e){const t=KF("only-child");return mf("span",{class:t.e("content")},[e])}const SJ=hg({...hg({name:"ElPopperTrigger",inheritAttrs:!1}),props:mJ,setup(e,{expose:t}){const i=e,{role:n,triggerRef:s}=pp(AJ,void 0);var r;r=s,gp(CJ,{setForwardRef:e=>{r.value=e}});const a=qf((()=>l.value?i.id:void 0)),o=qf((()=>{if(n&&"tooltip"===n.value)return i.open&&i.id?i.id:void 0})),l=qf((()=>{if(n&&"tooltip"!==n.value)return n.value})),A=qf((()=>l.value?`${i.open}`:void 0));let c;const u=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Eg((()=>{Pp((()=>i.virtualRef),(e=>{e&&(s.value=RL(e))}),{immediate:!0}),Pp(s,((e,t)=>{null==c||c(),c=void 0,uL(e)&&(u.forEach((n=>{var s;const r=i[n];r&&(e.addEventListener(n.slice(2).toLowerCase(),r),null==(s=null==t?void 0:t.removeEventListener)||s.call(t,n.slice(2).toLowerCase(),r))})),vJ(e)&&(c=Pp([a,o,l,A],(t=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(((i,n)=>{jN(t[n])?e.removeAttribute(i):e.setAttribute(i,t[n])}))}),{immediate:!0}))),uL(t)&&vJ(t)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((e=>t.removeAttribute(e)))}),{immediate:!0})})),_g((()=>{if(null==c||c(),c=void 0,s.value&&uL(s.value)){const e=s.value;u.forEach((t=>{const n=i[t];n&&e.removeEventListener(t.slice(2).toLowerCase(),n)})),s.value=void 0}})),t({triggerRef:s}),(e,t)=>e.virtualTriggering?Bf("v-if",!0):(af(),uf(ed(wJ),wf({key:0},e.$attrs,{"aria-controls":ed(a),"aria-describedby":ed(o),"aria-expanded":ed(A),"aria-haspopup":ed(l)}),{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var xJ=KU(SJ,[["__file","trigger.vue"]]);const kJ="focus-trap.focus-after-trapped",DJ="focus-trap.focus-after-released",FJ={cancelable:!0,bubbles:!1},TJ={cancelable:!0,bubbles:!1},MJ="focusAfterTrapped",RJ="focusAfterReleased",NJ=Symbol("elFocusTrap"),LJ=zh(),UJ=zh(0),HJ=zh(0);let PJ=0;const OJ=e=>{const t=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0||e===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)t.push(i.currentNode);return t},GJ=(e,t)=>{for(const i of e)if(!KJ(i,t))return i},KJ=(e,t)=>{if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1},qJ=(e,t)=>{if(e&&e.focus){const i=document.activeElement;e.focus({preventScroll:!0}),HJ.value=window.performance.now(),e!==i&&(e=>e instanceof HTMLInputElement&&"select"in e)(e)&&t&&e.select()}};function YJ(e,t){const i=[...e],n=e.indexOf(t);return-1!==n&&i.splice(n,1),i}const VJ=(()=>{let e=[];return{push:t=>{const i=e[0];i&&t!==i&&i.pause(),e=YJ(e,t),e.unshift(t)},remove:t=>{var i,n;e=YJ(e,t),null==(n=null==(i=e[0])?void 0:i.resume)||n.call(i)}}})(),WJ=()=>{LJ.value="pointer",UJ.value=window.performance.now()},jJ=()=>{LJ.value="keyboard",UJ.value=window.performance.now()},JJ=e=>new CustomEvent("focus-trap.focusout-prevented",{...TJ,detail:e}),zJ={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"};let XJ=[];const $J=e=>{e.code===zJ.esc&&XJ.forEach((t=>t(e)))},ZJ=hg({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[MJ,RJ,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const i=zh();let n,s;const{focusReason:r}=(Eg((()=>{0===PJ&&(document.addEventListener("mousedown",WJ),document.addEventListener("touchstart",WJ),document.addEventListener("keydown",jJ)),PJ++})),_g((()=>{PJ--,PJ<=0&&(document.removeEventListener("mousedown",WJ),document.removeEventListener("touchstart",WJ),document.removeEventListener("keydown",jJ))})),{focusReason:LJ,lastUserFocusTimestamp:UJ,lastAutomatedFocusTimestamp:HJ});var a;a=i=>{e.trapped&&!o.paused&&t("release-requested",i)},Eg((()=>{0===XJ.length&&document.addEventListener("keydown",$J),bL&&XJ.push(a)})),_g((()=>{XJ=XJ.filter((e=>e!==a)),0===XJ.length&&bL&&document.removeEventListener("keydown",$J)}));const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=i=>{if(!e.loop&&!e.trapped)return;if(o.paused)return;const{code:n,altKey:s,ctrlKey:a,metaKey:l,currentTarget:A,shiftKey:c}=i,{loop:u}=e,h=n===zJ.tab&&!s&&!a&&!l,d=document.activeElement;if(h&&d){const e=A,[n,s]=(e=>{const t=OJ(e);return[GJ(t,e),GJ(t.reverse(),e)]})(e);if(n&&s)if(c||d!==s){if(c&&[n,e].includes(d)){const e=JJ({focusReason:r.value});t("focusout-prevented",e),e.defaultPrevented||(i.preventDefault(),u&&qJ(s,!0))}}else{const e=JJ({focusReason:r.value});t("focusout-prevented",e),e.defaultPrevented||(i.preventDefault(),u&&qJ(n,!0))}else if(d===e){const e=JJ({focusReason:r.value});t("focusout-prevented",e),e.defaultPrevented||i.preventDefault()}}};gp(NJ,{focusTrapRef:i,onKeydown:l}),Pp((()=>e.focusTrapEl),(e=>{e&&(i.value=e)}),{immediate:!0}),Pp([i],(([e],[t])=>{e&&(e.addEventListener("keydown",l),e.addEventListener("focusin",u),e.addEventListener("focusout",h)),t&&(t.removeEventListener("keydown",l),t.removeEventListener("focusin",u),t.removeEventListener("focusout",h))}));const A=e=>{t(MJ,e)},c=e=>t(RJ,e),u=r=>{const a=ed(i);if(!a)return;const l=r.target,A=r.relatedTarget,c=l&&a.contains(l);if(!e.trapped){A&&a.contains(A)||(n=A)}c&&t("focusin",r),o.paused||e.trapped&&(c?s=l:qJ(s,!0))},h=n=>{const a=ed(i);if(!o.paused&&a)if(e.trapped){const i=n.relatedTarget;jN(i)||a.contains(i)||setTimeout((()=>{if(!o.paused&&e.trapped){const e=JJ({focusReason:r.value});t("focusout-prevented",e),e.defaultPrevented||qJ(s,!0)}}),0)}else{const e=n.target;e&&a.contains(e)||t("focusout",n)}};async function d(){await Qd();const t=ed(i);if(t){VJ.push(o);const i=t.contains(document.activeElement)?n:document.activeElement;n=i;if(!t.contains(i)){const n=new Event(kJ,FJ);t.addEventListener(kJ,A),t.dispatchEvent(n),n.defaultPrevented||Qd((()=>{let n=e.focusStartEl;Gc(n)||(qJ(n),document.activeElement!==n&&(n="first")),"first"===n&&((e,t=!1)=>{const i=document.activeElement;for(const n of e)if(qJ(n,t),document.activeElement!==i)return})(OJ(t),!0),document.activeElement!==i&&"container"!==n||qJ(t)}))}}}function g(){const e=ed(i);if(e){e.removeEventListener(kJ,A);const t=new CustomEvent(DJ,{...FJ,detail:{focusReason:r.value}});e.addEventListener(DJ,c),e.dispatchEvent(t),t.defaultPrevented||"keyboard"!=r.value&&UJ.value>HJ.value&&!e.contains(document.activeElement)||qJ(null!=n?n:document.body),e.removeEventListener(DJ,c),VJ.remove(o)}}return Eg((()=>{e.trapped&&d(),Pp((()=>e.trapped),(e=>{e?d():g()}))})),_g((()=>{e.trapped&&g(),i.value&&(i.value.removeEventListener("keydown",l),i.value.removeEventListener("focusin",u),i.value.removeEventListener("focusout",h),i.value=void 0)})),{onKeydown:l}}});var ez=KU(ZJ,[["render",function(e,t,i,n,s,r){return Gg(e.$slots,"default",{handleKeydown:e.onKeydown})}],["__file","focus-trap.vue"]]),tz="top",iz="bottom",nz="right",sz="left",rz="auto",az=[tz,iz,nz,sz],oz="start",lz="end",Az="viewport",cz="popper",uz=az.reduce((function(e,t){return e.concat([t+"-"+oz,t+"-"+lz])}),[]),hz=[].concat(az,[rz]).reduce((function(e,t){return e.concat([t,t+"-"+oz,t+"-"+lz])}),[]),dz=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function gz(e){return e?(e.nodeName||"").toLowerCase():null}function pz(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function fz(e){return e instanceof pz(e).Element||e instanceof Element}function mz(e){return e instanceof pz(e).HTMLElement||e instanceof HTMLElement}function Cz(e){return"undefined"!=typeof ShadowRoot&&(e instanceof pz(e).ShadowRoot||e instanceof ShadowRoot)}var Iz={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},s=t.elements[e];!mz(s)||!gz(s)||(Object.assign(s.style,i),Object.keys(n).forEach((function(e){var t=n[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],s=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});!mz(n)||!gz(n)||(Object.assign(n.style,r),Object.keys(s).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};function vz(e){return e.split("-")[0]}var Bz=Math.max,yz=Math.min,bz=Math.round;function Ez(e,t){void 0===t&&(t=!1);var i=e.getBoundingClientRect(),n=1,s=1;if(mz(e)&&t){var r=e.offsetHeight,a=e.offsetWidth;a>0&&(n=bz(i.width)/a||1),r>0&&(s=bz(i.height)/r||1)}return{width:i.width/n,height:i.height/s,top:i.top/s,right:i.right/n,bottom:i.bottom/s,left:i.left/n,x:i.left/n,y:i.top/s}}function wz(e){var t=Ez(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function Qz(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Cz(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function _z(e){return pz(e).getComputedStyle(e)}function Sz(e){return["table","td","th"].indexOf(gz(e))>=0}function xz(e){return((fz(e)?e.ownerDocument:e.document)||window.document).documentElement}function kz(e){return"html"===gz(e)?e:e.assignedSlot||e.parentNode||(Cz(e)?e.host:null)||xz(e)}function Dz(e){return mz(e)&&"fixed"!==_z(e).position?e.offsetParent:null}function Fz(e){for(var t=pz(e),i=Dz(e);i&&Sz(i)&&"static"===_z(i).position;)i=Dz(i);return i&&("html"===gz(i)||"body"===gz(i)&&"static"===_z(i).position)?t:i||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&mz(e)&&"fixed"===_z(e).position)return null;var i=kz(e);for(Cz(i)&&(i=i.host);mz(i)&&["html","body"].indexOf(gz(i))<0;){var n=_z(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}function Tz(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Mz(e,t,i){return Bz(e,yz(t,i))}function Rz(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Nz(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}var Lz={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,n=e.name,s=e.options,r=i.elements.arrow,a=i.modifiersData.popperOffsets,o=vz(i.placement),l=Tz(o),A=[sz,nz].indexOf(o)>=0?"height":"width";if(r&&a){var c=function(e,t){return Rz("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Nz(e,az))}(s.padding,i),u=wz(r),h="y"===l?tz:sz,d="y"===l?iz:nz,g=i.rects.reference[A]+i.rects.reference[l]-a[l]-i.rects.popper[A],p=a[l]-i.rects.reference[l],f=Fz(r),m=f?"y"===l?f.clientHeight||0:f.clientWidth||0:0,C=g/2-p/2,I=c[h],v=m-u[A]-c[d],B=m/2-u[A]/2+C,y=Mz(I,B,v),b=l;i.modifiersData[n]=((t={})[b]=y,t.centerOffset=y-B,t)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"==typeof n&&!(n=t.elements.popper.querySelector(n))||!Qz(t.elements.popper,n)||(t.elements.arrow=n))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Uz(e){return e.split("-")[1]}var Hz={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Pz(e){var t,i=e.popper,n=e.popperRect,s=e.placement,r=e.variation,a=e.offsets,o=e.position,l=e.gpuAcceleration,A=e.adaptive,c=e.roundOffsets,u=e.isFixed,h=a.x,d=void 0===h?0:h,g=a.y,p=void 0===g?0:g,f="function"==typeof c?c({x:d,y:p}):{x:d,y:p};d=f.x,p=f.y;var m=a.hasOwnProperty("x"),C=a.hasOwnProperty("y"),I=sz,v=tz,B=window;if(A){var y=Fz(i),b="clientHeight",E="clientWidth";if(y===pz(i)&&("static"!==_z(y=xz(i)).position&&"absolute"===o&&(b="scrollHeight",E="scrollWidth")),s===tz||(s===sz||s===nz)&&r===lz)v=iz,p-=(u&&y===B&&B.visualViewport?B.visualViewport.height:y[b])-n.height,p*=l?1:-1;if(s===sz||(s===tz||s===iz)&&r===lz)I=nz,d-=(u&&y===B&&B.visualViewport?B.visualViewport.width:y[E])-n.width,d*=l?1:-1}var w,Q=Object.assign({position:o},A&&Hz),_=!0===c?function(e){var t=e.x,i=e.y,n=window.devicePixelRatio||1;return{x:bz(t*n)/n||0,y:bz(i*n)/n||0}}({x:d,y:p}):{x:d,y:p};return d=_.x,p=_.y,l?Object.assign({},Q,((w={})[v]=C?"0":"",w[I]=m?"0":"",w.transform=(B.devicePixelRatio||1)<=1?"translate("+d+"px, "+p+"px)":"translate3d("+d+"px, "+p+"px, 0)",w)):Object.assign({},Q,((t={})[v]=C?p+"px":"",t[I]=m?d+"px":"",t.transform="",t))}var Oz={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,s=void 0===n||n,r=i.adaptive,a=void 0===r||r,o=i.roundOffsets,l=void 0===o||o,A={placement:vz(t.placement),variation:Uz(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Pz(Object.assign({},A,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Pz(Object.assign({},A,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Gz={passive:!0};var Kz={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,n=e.options,s=n.scroll,r=void 0===s||s,a=n.resize,o=void 0===a||a,l=pz(t.elements.popper),A=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&A.forEach((function(e){e.addEventListener("scroll",i.update,Gz)})),o&&l.addEventListener("resize",i.update,Gz),function(){r&&A.forEach((function(e){e.removeEventListener("scroll",i.update,Gz)})),o&&l.removeEventListener("resize",i.update,Gz)}},data:{}},qz={left:"right",right:"left",bottom:"top",top:"bottom"};function Yz(e){return e.replace(/left|right|bottom|top/g,(function(e){return qz[e]}))}var Vz={start:"end",end:"start"};function Wz(e){return e.replace(/start|end/g,(function(e){return Vz[e]}))}function jz(e){var t=pz(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Jz(e){return Ez(xz(e)).left+jz(e).scrollLeft}function zz(e){var t=_z(e),i=t.overflow,n=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Xz(e){return["html","body","#document"].indexOf(gz(e))>=0?e.ownerDocument.body:mz(e)&&zz(e)?e:Xz(kz(e))}function $z(e,t){var i;void 0===t&&(t=[]);var n=Xz(e),s=n===(null==(i=e.ownerDocument)?void 0:i.body),r=pz(n),a=s?[r].concat(r.visualViewport||[],zz(n)?n:[]):n,o=t.concat(a);return s?o:o.concat($z(kz(a)))}function Zz(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function eX(e,t){return t===Az?Zz(function(e){var t=pz(e),i=xz(e),n=t.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,o=0;return n&&(s=n.width,r=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,o=n.offsetTop)),{width:s,height:r,x:a+Jz(e),y:o}}(e)):fz(t)?function(e){var t=Ez(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Zz(function(e){var t,i=xz(e),n=jz(e),s=null==(t=e.ownerDocument)?void 0:t.body,r=Bz(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=Bz(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),o=-n.scrollLeft+Jz(e),l=-n.scrollTop;return"rtl"===_z(s||i).direction&&(o+=Bz(i.clientWidth,s?s.clientWidth:0)-r),{width:r,height:a,x:o,y:l}}(xz(e)))}function tX(e,t,i){var n="clippingParents"===t?function(e){var t=$z(kz(e)),i=["absolute","fixed"].indexOf(_z(e).position)>=0&&mz(e)?Fz(e):e;return fz(i)?t.filter((function(e){return fz(e)&&Qz(e,i)&&"body"!==gz(e)})):[]}(e):[].concat(t),s=[].concat(n,[i]),r=s[0],a=s.reduce((function(t,i){var n=eX(e,i);return t.top=Bz(n.top,t.top),t.right=yz(n.right,t.right),t.bottom=yz(n.bottom,t.bottom),t.left=Bz(n.left,t.left),t}),eX(e,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function iX(e){var t,i=e.reference,n=e.element,s=e.placement,r=s?vz(s):null,a=s?Uz(s):null,o=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(r){case tz:t={x:o,y:i.y-n.height};break;case iz:t={x:o,y:i.y+i.height};break;case nz:t={x:i.x+i.width,y:l};break;case sz:t={x:i.x-n.width,y:l};break;default:t={x:i.x,y:i.y}}var A=r?Tz(r):null;if(null!=A){var c="y"===A?"height":"width";switch(a){case oz:t[A]=t[A]-(i[c]/2-n[c]/2);break;case lz:t[A]=t[A]+(i[c]/2-n[c]/2)}}return t}function nX(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=void 0===n?e.placement:n,r=i.boundary,a=void 0===r?"clippingParents":r,o=i.rootBoundary,l=void 0===o?Az:o,A=i.elementContext,c=void 0===A?cz:A,u=i.altBoundary,h=void 0!==u&&u,d=i.padding,g=void 0===d?0:d,p=Rz("number"!=typeof g?g:Nz(g,az)),f=c===cz?"reference":cz,m=e.rects.popper,C=e.elements[h?f:c],I=tX(fz(C)?C:C.contextElement||xz(e.elements.popper),a,l),v=Ez(e.elements.reference),B=iX({reference:v,element:m,strategy:"absolute",placement:s}),y=Zz(Object.assign({},m,B)),b=c===cz?y:v,E={top:I.top-b.top+p.top,bottom:b.bottom-I.bottom+p.bottom,left:I.left-b.left+p.left,right:b.right-I.right+p.right},w=e.modifiersData.offset;if(c===cz&&w){var Q=w[s];Object.keys(E).forEach((function(e){var t=[nz,iz].indexOf(e)>=0?1:-1,i=[tz,iz].indexOf(e)>=0?"y":"x";E[e]+=Q[i]*t}))}return E}var sX={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var s=i.mainAxis,r=void 0===s||s,a=i.altAxis,o=void 0===a||a,l=i.fallbackPlacements,A=i.padding,c=i.boundary,u=i.rootBoundary,h=i.altBoundary,d=i.flipVariations,g=void 0===d||d,p=i.allowedAutoPlacements,f=t.options.placement,m=vz(f),C=l||(m===f||!g?[Yz(f)]:function(e){if(vz(e)===rz)return[];var t=Yz(e);return[Wz(e),t,Wz(t)]}(f)),I=[f].concat(C).reduce((function(e,i){return e.concat(vz(i)===rz?function(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=i.boundary,r=i.rootBoundary,a=i.padding,o=i.flipVariations,l=i.allowedAutoPlacements,A=void 0===l?hz:l,c=Uz(n),u=c?o?uz:uz.filter((function(e){return Uz(e)===c})):az,h=u.filter((function(e){return A.indexOf(e)>=0}));0===h.length&&(h=u);var d=h.reduce((function(t,i){return t[i]=nX(e,{placement:i,boundary:s,rootBoundary:r,padding:a})[vz(i)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:i,boundary:c,rootBoundary:u,padding:A,flipVariations:g,allowedAutoPlacements:p}):i)}),[]),v=t.rects.reference,B=t.rects.popper,y=new Map,b=!0,E=I[0],w=0;w<I.length;w++){var Q=I[w],_=vz(Q),S=Uz(Q)===oz,x=[tz,iz].indexOf(_)>=0,k=x?"width":"height",D=nX(t,{placement:Q,boundary:c,rootBoundary:u,altBoundary:h,padding:A}),F=x?S?nz:sz:S?iz:tz;v[k]>B[k]&&(F=Yz(F));var T=Yz(F),M=[];if(r&&M.push(D[_]<=0),o&&M.push(D[F]<=0,D[T]<=0),M.every((function(e){return e}))){E=Q,b=!1;break}y.set(Q,M)}if(b)for(var R=function(e){var t=I.find((function(t){var i=y.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},N=g?3:1;N>0;N--){if("break"===R(N))break}t.placement!==E&&(t.modifiersData[n]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function rX(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function aX(e){return[tz,nz,iz,sz].some((function(t){return e[t]>=0}))}var oX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,s=t.rects.popper,r=t.modifiersData.preventOverflow,a=nX(t,{elementContext:"reference"}),o=nX(t,{altBoundary:!0}),l=rX(a,n),A=rX(o,s,r),c=aX(l),u=aX(A);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:A,isReferenceHidden:c,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":u})}};var lX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.offset,r=void 0===s?[0,0]:s,a=hz.reduce((function(e,i){return e[i]=function(e,t,i){var n=vz(e),s=[sz,tz].indexOf(n)>=0?-1:1,r="function"==typeof i?i(Object.assign({},t,{placement:e})):i,a=r[0],o=r[1];return a=a||0,o=(o||0)*s,[sz,nz].indexOf(n)>=0?{x:o,y:a}:{x:a,y:o}}(i,t.rects,r),e}),{}),o=a[t.placement],l=o.x,A=o.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=A),t.modifiersData[n]=a}};var AX={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=iX({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var cX={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.mainAxis,r=void 0===s||s,a=i.altAxis,o=void 0!==a&&a,l=i.boundary,A=i.rootBoundary,c=i.altBoundary,u=i.padding,h=i.tether,d=void 0===h||h,g=i.tetherOffset,p=void 0===g?0:g,f=nX(t,{boundary:l,rootBoundary:A,padding:u,altBoundary:c}),m=vz(t.placement),C=Uz(t.placement),I=!C,v=Tz(m),B=function(e){return"x"===e?"y":"x"}(v),y=t.modifiersData.popperOffsets,b=t.rects.reference,E=t.rects.popper,w="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,Q="number"==typeof w?{mainAxis:w,altAxis:w}:Object.assign({mainAxis:0,altAxis:0},w),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(y){if(r){var x,k="y"===v?tz:sz,D="y"===v?iz:nz,F="y"===v?"height":"width",T=y[v],M=T+f[k],R=T-f[D],N=d?-E[F]/2:0,L=C===oz?b[F]:E[F],U=C===oz?-E[F]:-b[F],H=t.elements.arrow,P=d&&H?wz(H):{width:0,height:0},O=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=O[k],K=O[D],q=Mz(0,b[F],P[F]),Y=I?b[F]/2-N-q-G-Q.mainAxis:L-q-G-Q.mainAxis,V=I?-b[F]/2+N+q+K+Q.mainAxis:U+q+K+Q.mainAxis,W=t.elements.arrow&&Fz(t.elements.arrow),j=W?"y"===v?W.clientTop||0:W.clientLeft||0:0,J=null!=(x=null==_?void 0:_[v])?x:0,z=T+V-J,X=Mz(d?yz(M,T+Y-J-j):M,T,d?Bz(R,z):R);y[v]=X,S[v]=X-T}if(o){var $,Z="x"===v?tz:sz,ee="x"===v?iz:nz,te=y[B],ie="y"===B?"height":"width",ne=te+f[Z],se=te-f[ee],re=-1!==[tz,sz].indexOf(m),ae=null!=($=null==_?void 0:_[B])?$:0,oe=re?ne:te-b[ie]-E[ie]-ae+Q.altAxis,le=re?te+b[ie]+E[ie]-ae-Q.altAxis:se,Ae=d&&re?function(e,t,i){var n=Mz(e,t,i);return n>i?i:n}(oe,te,le):Mz(d?oe:ne,te,d?le:se);y[B]=Ae,S[B]=Ae-te}t.modifiersData[n]=S}},requiresIfExists:["offset"]};function uX(e,t,i){void 0===i&&(i=!1);var n=mz(t),s=mz(t)&&function(e){var t=e.getBoundingClientRect(),i=bz(t.width)/e.offsetWidth||1,n=bz(t.height)/e.offsetHeight||1;return 1!==i||1!==n}(t),r=xz(t),a=Ez(e,s),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==gz(t)||zz(r))&&(o=function(e){return e!==pz(e)&&mz(e)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(e):jz(e)}(t)),mz(t)?((l=Ez(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=Jz(r))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function hX(e){var t=new Map,i=new Set,n=[];function s(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var n=t.get(e);n&&s(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||s(e)})),n}function dX(e){var t;return function(){return t||(t=new Promise((function(i){Promise.resolve().then((function(){t=void 0,i(e())}))}))),t}}var gX={placement:"bottom",modifiers:[],strategy:"absolute"};function pX(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function fX(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,n=void 0===i?[]:i,s=t.defaultOptions,r=void 0===s?gX:s;return function(e,t,i){void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},gX,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],o=!1,l={state:s,setOptions:function(i){var o="function"==typeof i?i(s.options):i;A(),s.options=Object.assign({},r,s.options,o),s.scrollParents={reference:fz(e)?$z(e):e.contextElement?$z(e.contextElement):[],popper:$z(t)};var c=function(e){var t=hX(e);return dz.reduce((function(e,i){return e.concat(t.filter((function(e){return e.phase===i})))}),[])}(function(e){var t=e.reduce((function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers)));return s.orderedModifiers=c.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,i=e.options,n=void 0===i?{}:i,r=e.effect;if("function"==typeof r){var o=r({state:s,name:t,instance:l,options:n}),A=function(){};a.push(o||A)}})),l.update()},forceUpdate:function(){if(!o){var e=s.elements,t=e.reference,i=e.popper;if(pX(t,i)){s.rects={reference:uX(t,Fz(i),"fixed"===s.options.strategy),popper:wz(i)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var r=s.orderedModifiers[n],a=r.fn,A=r.options,c=void 0===A?{}:A,u=r.name;"function"==typeof a&&(s=a({state:s,options:c,name:u,instance:l})||s)}else s.reset=!1,n=-1}}},update:dX((function(){return new Promise((function(e){l.forceUpdate(),e(s)}))})),destroy:function(){A(),o=!0}};if(!pX(e,t))return l;function A(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(i).then((function(e){!o&&i.onFirstUpdate&&i.onFirstUpdate(e)})),l}}fX(),fX({defaultModifiers:[Kz,AX,Oz,Iz]});var mX=fX({defaultModifiers:[Kz,AX,Oz,Iz,lX,sX,cX,Lz,oX]});const CX=BU({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Array,default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:hz,default:"bottom"},popperOptions:{type:Object,default:()=>({})},strategy:{type:String,values:["fixed","absolute"],default:"absolute"}}),IX=BU({...CX,id:String,style:{type:[String,Array,Object]},className:{type:[String,Array,Object]},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:[String,Array,Object]},popperStyle:{type:[String,Array,Object]},referenceEl:{type:Object},triggerTargetEl:{type:Object},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Dj(["ariaLabel"])}),vX={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},BX=(e,t=[])=>{const{placement:i,strategy:n,popperOptions:s}=e,r={placement:i,strategy:n,...s,modifiers:[...yX(e),...t]};return function(e,t){t&&(e.modifiers=[...e.modifiers,...null!=t?t:[]])}(r,null==s?void 0:s.modifiers),r};function yX(e){const{offset:t,gpuAcceleration:i,fallbackPlacements:n}=e;return[{name:"offset",options:{offset:[0,null!=t?t:12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:n}},{name:"computeStyles",options:{gpuAcceleration:i}}]}const bX=(e,t,i={})=>{const n={name:"updateState",enabled:!0,phase:"write",fn:({state:e})=>{const t=function(e){const t=Object.keys(e.elements),i=YN(t.map((t=>[t,e.styles[t]||{}]))),n=YN(t.map((t=>[t,e.attributes[t]])));return{styles:i,attributes:n}}(e);Object.assign(a.value,t)},requires:["computeStyles"]},s=qf((()=>{const{onFirstUpdate:e,placement:t,strategy:s,modifiers:r}=ed(i);return{onFirstUpdate:e,placement:t||"bottom",strategy:s||"absolute",modifiers:[...r||[],n,{name:"applyStyles",enabled:!1}]}})),r=Xh(),a=zh({styles:{popper:{position:ed(s).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),o=()=>{r.value&&(r.value.destroy(),r.value=void 0)};return Pp(s,(e=>{const t=ed(r);t&&t.setOptions(e)}),{deep:!0}),Pp([e,t],(([e,t])=>{o(),e&&t&&(r.value=mX(e,t,ed(s)))})),_g((()=>{o()})),{state:qf((()=>{var e;return{...(null==(e=ed(r))?void 0:e.state)||{}}})),styles:qf((()=>ed(a).styles)),attributes:qf((()=>ed(a).attributes)),update:()=>{var e;return null==(e=ed(r))?void 0:e.update()},forceUpdate:()=>{var e;return null==(e=ed(r))?void 0:e.forceUpdate()},instanceRef:qf((()=>ed(r)))}};const EX=e=>{const{popperInstanceRef:t,contentRef:i,triggerRef:n,role:s}=pp(AJ,void 0),r=zh(),a=zh(),o=qf((()=>({name:"eventListeners",enabled:!!e.visible}))),l=qf((()=>{var e;const t=ed(r),i=null!=(e=ed(a))?e:0;return{name:"arrow",enabled:!JN(t),options:{element:t,padding:i}}})),A=qf((()=>({onFirstUpdate:()=>{g()},...BX(e,[ed(l),ed(o)])}))),c=qf((()=>(e=>{if(bL)return RL(e)})(e.referenceEl)||ed(n))),{attributes:u,state:h,styles:d,update:g,forceUpdate:p,instanceRef:f}=bX(c,i,A);return Pp(f,(e=>t.value=e)),Eg((()=>{Pp((()=>{var e;return null==(e=ed(c))?void 0:e.getBoundingClientRect()}),(()=>{g()}))})),{attributes:u,arrowRef:r,contentRef:i,instanceRef:f,state:h,styles:d,role:s,forceUpdate:p,update:g}},wX=hg({...hg({name:"ElPopperContent"}),props:IX,emits:vX,setup(e,{expose:t,emit:i}){const n=e,{focusStartRef:s,trapped:r,onFocusAfterReleased:a,onFocusAfterTrapped:o,onFocusInTrap:l,onFocusoutPrevented:A,onReleaseRequested:c}=((e,t)=>{const i=zh(!1),n=zh();return{focusStartRef:n,trapped:i,onFocusAfterReleased:e=>{var i;"pointer"!==(null==(i=e.detail)?void 0:i.focusReason)&&(n.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:t=>{e.visible&&!i.value&&(t.target&&(n.value=t.target),i.value=!0)},onFocusoutPrevented:t=>{e.trapping||("pointer"===t.detail.focusReason&&t.preventDefault(),i.value=!1)},onReleaseRequested:()=>{i.value=!1,t("close")}}})(n,i),{attributes:u,arrowRef:h,contentRef:d,styles:g,instanceRef:p,role:f,update:m}=EX(n),{ariaModal:C,arrowStyle:I,contentAttrs:v,contentClass:B,contentStyle:y,updateZIndex:b}=((e,{attributes:t,styles:i,role:n})=>{const{nextZIndex:s}=dU(),r=KF("popper"),a=qf((()=>ed(t).popper)),o=zh(AL(e.zIndex)?e.zIndex:s()),l=qf((()=>[r.b(),r.is("pure",e.pure),r.is(e.effect),e.popperClass])),A=qf((()=>[{zIndex:ed(o)},ed(i).popper,e.popperStyle||{}]));return{ariaModal:qf((()=>"dialog"===n.value?"false":void 0)),arrowStyle:qf((()=>ed(i).arrow||{})),contentAttrs:a,contentClass:l,contentStyle:A,contentZIndex:o,updateZIndex:()=>{o.value=AL(e.zIndex)?e.zIndex:s()}}})(n,{styles:g,attributes:u,role:f}),E=pp(Uj,void 0),w=zh();let Q;gp(cJ,{arrowStyle:I,arrowRef:h,arrowOffset:w}),E&&gp(Uj,{...E,addInputId:xc,removeInputId:xc});const _=(e=!0)=>{m(),e&&b()},S=()=>{_(!1),n.visible&&n.focusOnShow?r.value=!0:!1===n.visible&&(r.value=!1)};return Eg((()=>{Pp((()=>n.triggerTargetEl),((e,t)=>{null==Q||Q(),Q=void 0;const i=ed(e||d.value),s=ed(t||d.value);uL(i)&&(Q=Pp([f,()=>n.ariaLabel,C,()=>n.id],(e=>{["role","aria-label","aria-modal","id"].forEach(((t,n)=>{jN(e[n])?i.removeAttribute(t):i.setAttribute(t,e[n])}))}),{immediate:!0})),s!==i&&uL(s)&&["role","aria-label","aria-modal","id"].forEach((e=>{s.removeAttribute(e)}))}),{immediate:!0}),Pp((()=>n.visible),S,{immediate:!0})})),_g((()=>{null==Q||Q(),Q=void 0})),t({popperContentRef:d,popperInstanceRef:p,updatePopper:_,contentStyle:y}),(e,t)=>(af(),cf("div",wf({ref_key:"contentRef",ref:d},ed(v),{style:ed(y),class:ed(B),tabindex:"-1",onMouseenter:t=>e.$emit("mouseenter",t),onMouseleave:t=>e.$emit("mouseleave",t)}),[mf(ed(ez),{trapped:ed(r),"trap-on-focus-in":!0,"focus-trap-el":ed(d),"focus-start-el":ed(s),onFocusAfterTrapped:ed(o),onFocusAfterReleased:ed(a),onFocusin:ed(l),onFocusoutPrevented:ed(A),onReleaseRequested:ed(c)},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var QX=KU(wX,[["__file","content.vue"]]);const _X=lH(dJ),SX=Symbol("elTooltip");function xX(){let e;const t=()=>window.clearTimeout(e);return kL((()=>t())),{registerTimeout:(i,n)=>{t(),e=window.setTimeout(i,n)},cancelTimeout:t}}const kX=BU({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),DX=BU({...kX,...IX,appendTo:{type:[String,Object]},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:Boolean,default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Dj(["ariaLabel"])}),FX=BU({...mJ,disabled:Boolean,trigger:{type:[String,Array],default:"hover"},triggerKeys:{type:Array,default:()=>[zJ.enter,zJ.numpadEnter,zJ.space]}}),TX=vU({type:Boolean,default:null}),MX=vU({type:Function}),{useModelToggleProps:RX,useModelToggleEmits:NX,useModelToggle:LX}=(e=>{const t=`update:${e}`,i=`onUpdate:${e}`,n=[t];return{useModelToggle:({indicator:n,toggleReason:s,shouldHideWhenRouteChanges:r,shouldProceed:a,onShow:o,onHide:l})=>{const A=kf(),{emit:c}=A,u=A.props,h=qf((()=>Oc(u[i]))),d=qf((()=>null===u[e])),g=e=>{!0!==n.value&&(n.value=!0,s&&(s.value=e),Oc(o)&&o(e))},p=e=>{!1!==n.value&&(n.value=!1,s&&(s.value=e),Oc(l)&&l(e))},f=e=>{if(!0===u.disabled||Oc(a)&&!a())return;const i=h.value&&bL;i&&c(t,!0),!d.value&&i||g(e)},m=e=>{if(!0===u.disabled||!bL)return;const i=h.value&&bL;i&&c(t,!1),!d.value&&i||p(e)},C=e=>{lL(e)&&(u.disabled&&e?h.value&&c(t,!1):n.value!==e&&(e?g():p()))};return Pp((()=>u[e]),C),r&&void 0!==A.appContext.config.globalProperties.$route&&Pp((()=>({...A.proxy.$route})),(()=>{r.value&&n.value&&m()})),Eg((()=>{C(u[e])})),{hide:m,show:f,toggle:()=>{n.value?m():f()},hasUpdateHandler:h}},useModelToggleProps:{[e]:TX,[i]:MX},useModelToggleEmits:n}})("visible"),UX=BU({...uJ,...RX,...DX,...FX,...gJ,showArrow:{type:Boolean,default:!0}}),HX=[...NX,"before-show","before-hide","show","hide","open","close"],PX=(e,t,i)=>n=>{((e,t)=>Lc(e)?e.includes(t):e===t)(ed(e),t)&&i(n)},OX=(e,t,{checkForDefaultPrevented:i=!0}={})=>n=>{const s=null==e?void 0:e(n);if(!1===i||!s)return null==t?void 0:t(n)},GX=e=>t=>"mouse"===t.pointerType?e(t):void 0,KX=hg({...hg({name:"ElTooltipTrigger"}),props:FX,setup(e,{expose:t}){const i=e,n=KF("tooltip"),{controlled:s,id:r,open:a,onOpen:o,onClose:l,onToggle:A}=pp(SX,void 0),c=zh(null),u=()=>{if(ed(s)||i.disabled)return!0},h=ld(i,"trigger"),d=OX(u,PX(h,"hover",o)),g=OX(u,PX(h,"hover",l)),p=OX(u,PX(h,"click",(e=>{0===e.button&&A(e)}))),f=OX(u,PX(h,"focus",o)),m=OX(u,PX(h,"focus",l)),C=OX(u,PX(h,"contextmenu",(e=>{e.preventDefault(),A(e)}))),I=OX(u,(e=>{const{code:t}=e;i.triggerKeys.includes(t)&&(e.preventDefault(),A(e))}));return t({triggerRef:c}),(e,t)=>(af(),uf(ed(xJ),{id:ed(r),"virtual-ref":e.virtualRef,open:ed(a),"virtual-triggering":e.virtualTriggering,class:pu(ed(n).e("trigger")),onBlur:ed(m),onClick:ed(p),onContextmenu:ed(C),onFocus:ed(f),onMouseenter:ed(d),onMouseleave:ed(g),onKeydown:ed(I)},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var qX=KU(KX,[["__file","trigger.vue"]]);const YX=lH(KU(hg({__name:"teleport",props:BU({to:{type:[String,Object],required:!0},disabled:Boolean}),setup:e=>(e,t)=>e.disabled?Gg(e.$slots,"default",{key:0}):(af(),uf(jd,{key:1,to:e.to},[Gg(e.$slots,"default")],8,["to"]))}),[["__file","teleport.vue"]])),VX=()=>{const e=GF(),t=Oj(),i=qf((()=>`${e.value}-popper-container-${t.prefix}`)),n=qf((()=>`#${i.value}`));return{id:i,selector:n}},WX=()=>{const{id:e,selector:t}=VX();return bg((()=>{bL&&(document.body.querySelector(t.value)||(e=>{const t=document.createElement("div");t.id=e,document.body.appendChild(t)})(e.value))})),{id:e,selector:t}},jX=hg({...hg({name:"ElTooltipContent",inheritAttrs:!1}),props:DX,setup(e,{expose:t}){const i=e,{selector:n}=VX(),s=KF("tooltip"),r=zh();let a;const{controlled:o,id:l,open:A,trigger:c,onClose:u,onOpen:h,onShow:d,onHide:g,onBeforeShow:p,onBeforeHide:f}=pp(SX,void 0),m=qf((()=>i.transition||`${s.namespace.value}-fade-in-linear`)),C=qf((()=>i.persistent));_g((()=>{null==a||a()}));const I=qf((()=>!!ed(C)||ed(A))),v=qf((()=>!i.disabled&&ed(A))),B=qf((()=>i.appendTo||n.value)),y=qf((()=>{var e;return null!=(e=i.style)?e:{}})),b=zh(!0),E=()=>{g(),b.value=!0},w=()=>{if(ed(o))return!0},Q=OX(w,(()=>{i.enterable&&"hover"===ed(c)&&h()})),_=OX(w,(()=>{"hover"===ed(c)&&u()})),S=()=>{var e,t;null==(t=null==(e=r.value)?void 0:e.updatePopper)||t.call(e),null==p||p()},x=()=>{null==f||f()},k=()=>{d(),a=PL(qf((()=>{var e;return null==(e=r.value)?void 0:e.popperContentRef})),(()=>{if(ed(o))return;"hover"!==ed(c)&&u()}))},D=()=>{i.virtualTriggering||u()};return Pp((()=>ed(A)),(e=>{e?b.value=!1:null==a||a()}),{flush:"post"}),Pp((()=>i.content),(()=>{var e,t;null==(t=null==(e=r.value)?void 0:e.updatePopper)||t.call(e)})),t({contentRef:r}),(e,t)=>(af(),uf(ed(YX),{disabled:!e.teleported,to:ed(B)},{default:Nd((()=>[mf(am,{name:ed(m),onAfterLeave:E,onBeforeEnter:S,onAfterEnter:k,onBeforeLeave:x},{default:Nd((()=>[ed(I)?Ld((af(),uf(ed(QX),wf({key:0,id:ed(l),ref_key:"contentRef",ref:r},e.$attrs,{"aria-label":e.ariaLabel,"aria-hidden":b.value,"boundaries-padding":e.boundariesPadding,"fallback-placements":e.fallbackPlacements,"gpu-acceleration":e.gpuAcceleration,offset:e.offset,placement:e.placement,"popper-options":e.popperOptions,strategy:e.strategy,effect:e.effect,enterable:e.enterable,pure:e.pure,"popper-class":e.popperClass,"popper-style":[e.popperStyle,ed(y)],"reference-el":e.referenceEl,"trigger-target-el":e.triggerTargetEl,visible:ed(v),"z-index":e.zIndex,onMouseenter:ed(Q),onMouseleave:ed(_),onBlur:D,onClose:ed(u)}),{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[ym,ed(v)]]):Bf("v-if",!0)])),_:3},8,["name"])])),_:3},8,["disabled","to"]))}});var JX=KU(jX,[["__file","content.vue"]]);const zX=hg({...hg({name:"ElTooltip"}),props:UX,emits:HX,setup(e,{expose:t,emit:i}){const n=e;WX();const s=Gj(),r=zh(),a=zh(),o=()=>{var e;const t=ed(r);t&&(null==(e=t.popperInstanceRef)||e.update())},l=zh(!1),A=zh(),{show:c,hide:u,hasUpdateHandler:h}=LX({indicator:l,toggleReason:A}),{onOpen:d,onClose:g}=(({showAfter:e,hideAfter:t,autoClose:i,open:n,close:s})=>{const{registerTimeout:r}=xX(),{registerTimeout:a,cancelTimeout:o}=xX();return{onOpen:t=>{r((()=>{n(t);const e=ed(i);AL(e)&&e>0&&a((()=>{s(t)}),e)}),ed(e))},onClose:e=>{o(),r((()=>{s(e)}),ed(t))}}})({showAfter:ld(n,"showAfter"),hideAfter:ld(n,"hideAfter"),autoClose:ld(n,"autoClose"),open:c,close:u}),p=qf((()=>lL(n.visible)&&!h.value));gp(SX,{controlled:p,id:s,open:Hh(l),trigger:ld(n,"trigger"),onOpen:e=>{d(e)},onClose:e=>{g(e)},onToggle:e=>{ed(l)?g(e):d(e)},onShow:()=>{i("show",A.value)},onHide:()=>{i("hide",A.value)},onBeforeShow:()=>{i("before-show",A.value)},onBeforeHide:()=>{i("before-hide",A.value)},updatePopper:o}),Pp((()=>n.disabled),(e=>{e&&l.value&&(l.value=!1)}));return Cg((()=>l.value&&u())),t({popperRef:r,contentRef:a,isFocusInsideContent:e=>{var t,i;const n=null==(i=null==(t=a.value)?void 0:t.contentRef)?void 0:i.popperContentRef,s=(null==e?void 0:e.relatedTarget)||document.activeElement;return n&&n.contains(s)},updatePopper:o,onOpen:d,onClose:g,hide:u}),(e,t)=>(af(),uf(ed(_X),{ref_key:"popperRef",ref:r,role:e.role},{default:Nd((()=>[mf(qX,{disabled:e.disabled,trigger:e.trigger,"trigger-keys":e.triggerKeys,"virtual-ref":e.virtualRef,"virtual-triggering":e.virtualTriggering},{default:Nd((()=>[e.$slots.default?Gg(e.$slots,"default",{key:0}):Bf("v-if",!0)])),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),mf(JX,{ref_key:"contentRef",ref:a,"aria-label":e.ariaLabel,"boundaries-padding":e.boundariesPadding,content:e.content,disabled:e.disabled,effect:e.effect,enterable:e.enterable,"fallback-placements":e.fallbackPlacements,"hide-after":e.hideAfter,"gpu-acceleration":e.gpuAcceleration,offset:e.offset,persistent:e.persistent,"popper-class":e.popperClass,"popper-style":e.popperStyle,placement:e.placement,"popper-options":e.popperOptions,pure:e.pure,"raw-content":e.rawContent,"reference-el":e.referenceEl,"trigger-target-el":e.triggerTargetEl,"show-after":e.showAfter,strategy:e.strategy,teleported:e.teleported,transition:e.transition,"virtual-triggering":e.virtualTriggering,"z-index":e.zIndex,"append-to":e.appendTo},{default:Nd((()=>[Gg(e.$slots,"content",{},(()=>[e.rawContent?(af(),cf("span",{key:0,innerHTML:e.content},null,8,["innerHTML"])):(af(),cf("span",{key:1},yu(e.content),1))])),e.showArrow?(af(),uf(ed(fJ),{key:0,"arrow-offset":e.arrowOffset},null,8,["arrow-offset"])):Bf("v-if",!0)])),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])])),_:3},8,["role"]))}});const XX=lH(KU(zX,[["__file","tooltip.vue"]])),$X=BU({valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:String,values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:[Function,Array],default:xc},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:{type:Boolean,default:!1},hideLoading:{type:Boolean,default:!1},teleported:DX.teleported,highlightFirstItem:{type:Boolean,default:!1},fitInputWidth:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:String,...Dj(["ariaLabel"])}),ZX={[UU]:e=>Gc(e),[PU]:e=>Gc(e),[HU]:e=>Gc(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,select:e=>qc(e)},e$="ElAutocomplete",t$=hg({...hg({name:e$,inheritAttrs:!1}),props:$X,emits:ZX,setup(e,{expose:t,emit:i}){const n=e,s=Nj(),r=Jg(),a=Wj(),o=KF("autocomplete"),l=zh(),A=zh(),c=zh(),u=zh();let h=!1,d=!1;const g=zh([]),p=zh(-1),f=zh(""),m=zh(!1),C=zh(!1),I=zh(!1),v=Gj(),B=qf((()=>r.style)),y=qf((()=>(g.value.length>0||I.value)&&m.value)),b=qf((()=>!n.hideLoading&&I.value)),E=qf((()=>l.value?Array.from(l.value.$el.querySelectorAll("input")):[])),w=()=>{y.value&&(f.value=`${l.value.$el.offsetWidth}px`)},Q=()=>{p.value=-1},_=async e=>{if(C.value)return;const t=e=>{I.value=!1,C.value||(Lc(e)?(g.value=e,p.value=n.highlightFirstItem?0:-1):lU(e$,"autocomplete suggestions must be an array"))};if(I.value=!0,Lc(n.fetchSuggestions))t(n.fetchSuggestions);else{const i=await n.fetchSuggestions(e,t);Lc(i)&&t(i)}},S=RN(_,n.debounce),x=e=>{const t=!!e;if(i(PU,e),i(UU,e),C.value=!1,m.value||(m.value=t),!n.triggerOnFocus&&!e)return C.value=!0,void(g.value=[]);S(e)},k=e=>{var t;a.value||("INPUT"!==(null==(t=e.target)?void 0:t.tagName)||E.value.includes(document.activeElement))&&(m.value=!0)},D=e=>{i(HU,e)},F=e=>{d?d=!1:(m.value=!0,i("focus",e),n.triggerOnFocus&&!h&&S(String(n.modelValue)))},T=e=>{setTimeout((()=>{var t;(null==(t=c.value)?void 0:t.isFocusInsideContent())?d=!0:(m.value&&L(),i("blur",e))}))},M=()=>{m.value=!1,i(UU,""),i("clear")},R=async()=>{y.value&&p.value>=0&&p.value<g.value.length?U(g.value[p.value]):n.selectWhenUnmatched&&(i("select",{value:n.modelValue}),g.value=[],p.value=-1)},N=e=>{y.value&&(e.preventDefault(),e.stopPropagation(),L())},L=()=>{m.value=!1},U=async e=>{i(PU,e[n.valueKey]),i(UU,e[n.valueKey]),i("select",e),g.value=[],p.value=-1},H=e=>{if(!y.value||I.value)return;if(e<0)return void(p.value=-1);e>=g.value.length&&(e=g.value.length-1);const t=A.value.querySelector(`.${o.be("suggestion","wrap")}`),i=t.querySelectorAll(`.${o.be("suggestion","list")} li`)[e],n=t.scrollTop,{offsetTop:s,scrollHeight:r}=i;s+r>n+t.clientHeight&&(t.scrollTop+=r),s<n&&(t.scrollTop-=r),p.value=e,l.value.ref.setAttribute("aria-activedescendant",`${v.value}-item-${p.value}`)},P=PL(u,(()=>{y.value&&L()}));return _g((()=>{null==P||P()})),Eg((()=>{l.value.ref.setAttribute("role","textbox"),l.value.ref.setAttribute("aria-autocomplete","list"),l.value.ref.setAttribute("aria-controls","id"),l.value.ref.setAttribute("aria-activedescendant",`${v.value}-item-${p.value}`),h=l.value.ref.hasAttribute("readonly")})),t({highlightedIndex:p,activated:m,loading:I,inputRef:l,popperRef:c,suggestions:g,handleSelect:U,handleKeyEnter:R,focus:()=>{var e;null==(e=l.value)||e.focus()},blur:()=>{var e;null==(e=l.value)||e.blur()},close:L,highlight:H,getData:_}),(e,t)=>(af(),uf(ed(XX),{ref_key:"popperRef",ref:c,visible:ed(y),placement:e.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[ed(o).e("popper"),e.popperClass],teleported:e.teleported,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${ed(o).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:w,onHide:Q},{content:Nd((()=>[ff("div",{ref_key:"regionRef",ref:A,class:pu([ed(o).b("suggestion"),ed(o).is("loading",ed(b))]),style:cu({[e.fitInputWidth?"width":"minWidth"]:f.value,outline:"none"}),role:"region"},[mf(ed(lJ),{id:ed(v),tag:"ul","wrap-class":ed(o).be("suggestion","wrap"),"view-class":ed(o).be("suggestion","list"),role:"listbox"},{default:Nd((()=>[ed(b)?(af(),cf("li",{key:0},[Gg(e.$slots,"loading",{},(()=>[mf(ed(gH),{class:pu(ed(o).is("loading"))},{default:Nd((()=>[mf(ed(qq))])),_:1},8,["class"])]))])):(af(!0),cf(Zp,{key:1},Pg(g.value,((t,i)=>(af(),cf("li",{id:`${ed(v)}-item-${i}`,key:i,class:pu({highlighted:p.value===i}),role:"option","aria-selected":p.value===i,onClick:e=>U(t)},[Gg(e.$slots,"default",{item:t},(()=>[vf(yu(t[e.valueKey]),1)]))],10,["id","aria-selected","onClick"])))),128))])),_:3},8,["id","wrap-class","view-class"])],6)])),default:Nd((()=>[ff("div",{ref_key:"listboxRef",ref:u,class:pu([ed(o).b(),e.$attrs.class]),style:cu(ed(B)),role:"combobox","aria-haspopup":"listbox","aria-expanded":ed(y),"aria-owns":ed(v)},[mf(ed(Xj),wf({ref_key:"inputRef",ref:l},ed(s),{clearable:e.clearable,disabled:ed(a),name:e.name,"model-value":e.modelValue,"aria-label":e.ariaLabel,onInput:x,onChange:D,onFocus:F,onBlur:T,onClear:M,onKeydown:[uC(AC((e=>H(p.value-1)),["prevent"]),["up"]),uC(AC((e=>H(p.value+1)),["prevent"]),["down"]),uC(R,["enter"]),uC(L,["tab"]),uC(N,["esc"])],onMousedown:k}),Og({_:2},[e.$slots.prepend?{name:"prepend",fn:Nd((()=>[Gg(e.$slots,"prepend")]))}:void 0,e.$slots.append?{name:"append",fn:Nd((()=>[Gg(e.$slots,"append")]))}:void 0,e.$slots.prefix?{name:"prefix",fn:Nd((()=>[Gg(e.$slots,"prefix")]))}:void 0,e.$slots.suffix?{name:"suffix",fn:Nd((()=>[Gg(e.$slots,"suffix")]))}:void 0]),1040,["clearable","disabled","name","model-value","aria-label","onKeydown"])],14,["aria-expanded","aria-owns"])])),_:3},8,["visible","placement","popper-class","teleported","transition"]))}});const i$=lH(KU(t$,[["__file","autocomplete.vue"]])),n$=BU({size:{type:[Number,String],values:yU,default:"",validator:e=>AL(e)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:fj},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:String,default:"cover"}}),s$={error:e=>e instanceof Event},r$=hg({...hg({name:"ElAvatar"}),props:n$,emits:s$,setup(e,{emit:t}){const i=e,n=KF("avatar"),s=zh(!1),r=qf((()=>{const{size:e,icon:t,shape:s}=i,r=[n.b()];return Gc(e)&&r.push(n.m(e)),t&&r.push(n.m("icon")),s&&r.push(n.m(s)),r})),a=qf((()=>{const{size:e}=i;return AL(e)?n.cssVarBlock({size:$U(e)||""}):void 0})),o=qf((()=>({objectFit:i.fit})));function l(e){s.value=!0,t("error",e)}return Pp((()=>i.src),(()=>s.value=!1)),(e,t)=>(af(),cf("span",{class:pu(ed(r)),style:cu(ed(a))},[!e.src&&!e.srcSet||s.value?e.icon?(af(),uf(ed(gH),{key:1},{default:Nd((()=>[(af(),uf(Ng(e.icon)))])),_:1})):Gg(e.$slots,"default",{key:2}):(af(),cf("img",{key:0,src:e.src,alt:e.alt,srcset:e.srcSet,style:cu(ed(o)),onError:l},null,44,["src","alt","srcset"]))],6))}});const a$=lH(KU(r$,[["__file","avatar.vue"]])),o$={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},l$={click:e=>e instanceof MouseEvent},A$="ElBacktop",c$=hg({...hg({name:A$}),props:o$,emits:l$,setup(e,{emit:t}){const i=e,n=KF("backtop"),{handleClick:s,visible:r}=((e,t,i)=>{const n=Xh(),s=Xh(),r=zh(!1),a=()=>{n.value&&(r.value=n.value.scrollTop>=e.visibilityHeight)},o=FL(a,300,!0);return UL(s,"scroll",o),Eg((()=>{var t;s.value=document,n.value=document.documentElement,e.target&&(n.value=null!=(t=document.querySelector(e.target))?t:void 0,n.value||lU(i,`target does not exist: ${e.target}`),s.value=n.value),a()})),{visible:r,handleClick:e=>{var i;null==(i=n.value)||i.scrollTo({top:0,behavior:"smooth"}),t("click",e)}}})(i,t,A$),a=qf((()=>({right:`${i.right}px`,bottom:`${i.bottom}px`})));return(e,t)=>(af(),uf(am,{name:`${ed(n).namespace.value}-fade-in`},{default:Nd((()=>[ed(r)?(af(),cf("div",{key:0,style:cu(ed(a)),class:pu(ed(n).b()),onClick:AC(ed(s),["stop"])},[Gg(e.$slots,"default",{},(()=>[mf(ed(gH),{class:pu(ed(n).e("icon"))},{default:Nd((()=>[mf(ed(kP))])),_:1},8,["class"])]))],14,["onClick"])):Bf("v-if",!0)])),_:3},8,["name"]))}});const u$=lH(KU(c$,[["__file","backtop.vue"]])),h$=BU({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:[String,Object,Array]},offset:{type:Array,default:[0,0]},badgeClass:{type:String}}),d$=hg({...hg({name:"ElBadge"}),props:h$,setup(e,{expose:t}){const i=e,n=KF("badge"),s=qf((()=>i.isDot?"":AL(i.value)&&AL(i.max)&&i.max<i.value?`${i.max}+`:`${i.value}`)),r=qf((()=>{var e,t,n,s,r;return[{backgroundColor:i.color,marginRight:$U(-(null!=(t=null==(e=i.offset)?void 0:e[0])?t:0)),marginTop:$U(null!=(s=null==(n=i.offset)?void 0:n[1])?s:0)},null!=(r=i.badgeStyle)?r:{}]}));return t({content:s}),(e,t)=>(af(),cf("div",{class:pu(ed(n).b())},[Gg(e.$slots,"default"),mf(am,{name:`${ed(n).namespace.value}-zoom-in-center`,persisted:""},{default:Nd((()=>[Ld(ff("sup",{class:pu([ed(n).e("content"),ed(n).em("content",e.type),ed(n).is("fixed",!!e.$slots.default),ed(n).is("dot",e.isDot),ed(n).is("hide-zero",!e.showZero&&0===i.value),e.badgeClass]),style:cu(ed(r)),textContent:yu(ed(s))},null,14,["textContent"]),[[ym,!e.hidden&&(ed(s)||e.isDot)]])])),_:1},8,["name"])],2))}});const g$=lH(KU(d$,[["__file","badge.vue"]])),p$=Symbol("breadcrumbKey"),f$=BU({separator:{type:String,default:"/"},separatorIcon:{type:fj}}),m$=hg({...hg({name:"ElBreadcrumb"}),props:f$,setup(e){const t=e,{t:i}=CU(),n=KF("breadcrumb"),s=zh();return gp(p$,t),Eg((()=>{const e=s.value.querySelectorAll(`.${n.e("item")}`);e.length&&e[e.length-1].setAttribute("aria-current","page")})),(e,t)=>(af(),cf("div",{ref_key:"breadcrumb",ref:s,class:pu(ed(n).b()),"aria-label":ed(i)("el.breadcrumb.label"),role:"navigation"},[Gg(e.$slots,"default")],10,["aria-label"]))}});var C$=KU(m$,[["__file","breadcrumb.vue"]]);const I$=BU({to:{type:[String,Object],default:""},replace:Boolean}),v$=hg({...hg({name:"ElBreadcrumbItem"}),props:I$,setup(e){const t=e,i=kf(),n=pp(p$,void 0),s=KF("breadcrumb"),r=i.appContext.config.globalProperties.$router,a=zh(),o=()=>{t.to&&r&&(t.replace?r.replace(t.to):r.push(t.to))};return(e,t)=>{var i,r;return af(),cf("span",{class:pu(ed(s).e("item"))},[ff("span",{ref_key:"link",ref:a,class:pu([ed(s).e("inner"),ed(s).is("link",!!e.to)]),role:"link",onClick:o},[Gg(e.$slots,"default")],2),(null==(i=ed(n))?void 0:i.separatorIcon)?(af(),uf(ed(gH),{key:0,class:pu(ed(s).e("separator"))},{default:Nd((()=>[(af(),uf(Ng(ed(n).separatorIcon)))])),_:1},8,["class"])):(af(),cf("span",{key:1,class:pu(ed(s).e("separator")),role:"presentation"},yu(null==(r=ed(n))?void 0:r.separator),3))],2)}}});var B$=KU(v$,[["__file","breadcrumb-item.vue"]]);const y$=lH(C$,{BreadcrumbItem:B$}),b$=cH(B$),E$=Symbol("buttonGroupContextKey"),w$=({from:e,replacement:t,scope:i,version:n,ref:s,type:r="API"},a)=>{Pp((()=>ed(a)),(e=>{}),{immediate:!0})},Q$=["default","primary","success","warning","info","danger","text",""],_$=BU({size:bU,disabled:Boolean,type:{type:String,values:Q$,default:""},icon:{type:fj},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:fj,default:()=>qq},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:[String,Object],default:"button"}}),S$={click:e=>e instanceof MouseEvent};function x$(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var i=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),i&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function k$(e){return Math.min(1,Math.max(0,e))}function D$(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F$(e){return e<=1?"".concat(100*Number(e),"%"):e}function T$(e){return 1===e.length?"0"+e:String(e)}function M$(e,t,i){e=x$(e,255),t=x$(t,255),i=x$(i,255);var n=Math.max(e,t,i),s=Math.min(e,t,i),r=0,a=0,o=(n+s)/2;if(n===s)a=0,r=0;else{var l=n-s;switch(a=o>.5?l/(2-n-s):l/(n+s),n){case e:r=(t-i)/l+(t<i?6:0);break;case t:r=(i-e)/l+2;break;case i:r=(e-t)/l+4}r/=6}return{h:r,s:a,l:o}}function R$(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*i*(t-e):i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function N$(e,t,i){e=x$(e,255),t=x$(t,255),i=x$(i,255);var n=Math.max(e,t,i),s=Math.min(e,t,i),r=0,a=n,o=n-s,l=0===n?0:o/n;if(n===s)r=0;else{switch(n){case e:r=(t-i)/o+(t<i?6:0);break;case t:r=(i-e)/o+2;break;case i:r=(e-t)/o+4}r/=6}return{h:r,s:l,v:a}}function L$(e,t,i,n){var s=[T$(Math.round(e).toString(16)),T$(Math.round(t).toString(16)),T$(Math.round(i).toString(16))];return n&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function U$(e){return H$(e)/255}function H$(e){return parseInt(e,16)}var P$={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function O$(e){var t={r:0,g:0,b:0},i=1,n=null,s=null,r=null,a=!1,o=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(P$[e])e=P$[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var i=Y$.rgb.exec(e);if(i)return{r:i[1],g:i[2],b:i[3]};if(i=Y$.rgba.exec(e),i)return{r:i[1],g:i[2],b:i[3],a:i[4]};if(i=Y$.hsl.exec(e),i)return{h:i[1],s:i[2],l:i[3]};if(i=Y$.hsla.exec(e),i)return{h:i[1],s:i[2],l:i[3],a:i[4]};if(i=Y$.hsv.exec(e),i)return{h:i[1],s:i[2],v:i[3]};if(i=Y$.hsva.exec(e),i)return{h:i[1],s:i[2],v:i[3],a:i[4]};if(i=Y$.hex8.exec(e),i)return{r:H$(i[1]),g:H$(i[2]),b:H$(i[3]),a:U$(i[4]),format:t?"name":"hex8"};if(i=Y$.hex6.exec(e),i)return{r:H$(i[1]),g:H$(i[2]),b:H$(i[3]),format:t?"name":"hex"};if(i=Y$.hex4.exec(e),i)return{r:H$(i[1]+i[1]),g:H$(i[2]+i[2]),b:H$(i[3]+i[3]),a:U$(i[4]+i[4]),format:t?"name":"hex8"};if(i=Y$.hex3.exec(e),i)return{r:H$(i[1]+i[1]),g:H$(i[2]+i[2]),b:H$(i[3]+i[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(V$(e.r)&&V$(e.g)&&V$(e.b)?(t=function(e,t,i){return{r:255*x$(e,255),g:255*x$(t,255),b:255*x$(i,255)}}(e.r,e.g,e.b),a=!0,o="%"===String(e.r).substr(-1)?"prgb":"rgb"):V$(e.h)&&V$(e.s)&&V$(e.v)?(n=F$(e.s),s=F$(e.v),t=function(e,t,i){e=6*x$(e,360),t=x$(t,100),i=x$(i,100);var n=Math.floor(e),s=e-n,r=i*(1-t),a=i*(1-s*t),o=i*(1-(1-s)*t),l=n%6;return{r:255*[i,a,r,r,o,i][l],g:255*[o,i,i,a,r,r][l],b:255*[r,r,o,i,i,a][l]}}(e.h,n,s),a=!0,o="hsv"):V$(e.h)&&V$(e.s)&&V$(e.l)&&(n=F$(e.s),r=F$(e.l),t=function(e,t,i){var n,s,r;if(e=x$(e,360),t=x$(t,100),i=x$(i,100),0===t)s=i,r=i,n=i;else{var a=i<.5?i*(1+t):i+t-i*t,o=2*i-a;n=R$(o,a,e+1/3),s=R$(o,a,e),r=R$(o,a,e-1/3)}return{r:255*n,g:255*s,b:255*r}}(e.h,n,r),a=!0,o="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(i=e.a)),i=D$(i),{ok:a,format:e.format||o,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:i}}var G$="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),K$="[\\s|\\(]+(".concat(G$,")[,|\\s]+(").concat(G$,")[,|\\s]+(").concat(G$,")\\s*\\)?"),q$="[\\s|\\(]+(".concat(G$,")[,|\\s]+(").concat(G$,")[,|\\s]+(").concat(G$,")[,|\\s]+(").concat(G$,")\\s*\\)?"),Y$={CSS_UNIT:new RegExp(G$),rgb:new RegExp("rgb"+K$),rgba:new RegExp("rgba"+q$),hsl:new RegExp("hsl"+K$),hsla:new RegExp("hsla"+q$),hsv:new RegExp("hsv"+K$),hsva:new RegExp("hsva"+q$),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function V$(e){return Boolean(Y$.CSS_UNIT.exec(String(e)))}var W$=
/** @class */function(){function e(t,i){var n;if(void 0===t&&(t=""),void 0===i&&(i={}),t instanceof e)return t;"number"==typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var s=O$(t);this.originalInput=t,this.r=s.r,this.g=s.g,this.b=s.b,this.a=s.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(n=i.format)&&void 0!==n?n:s.format,this.gradientType=i.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=s.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,i=e.g/255,n=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=D$(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=N$(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=N$(this.r,this.g,this.b),t=Math.round(360*e.h),i=Math.round(100*e.s),n=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(i,"%, ").concat(n,"%)"):"hsva(".concat(t,", ").concat(i,"%, ").concat(n,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=M$(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=M$(this.r,this.g,this.b),t=Math.round(360*e.h),i=Math.round(100*e.s),n=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(i,"%, ").concat(n,"%)"):"hsla(".concat(t,", ").concat(i,"%, ").concat(n,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),L$(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,i,n,s){var r,a=[T$(Math.round(e).toString(16)),T$(Math.round(t).toString(16)),T$(Math.round(i).toString(16)),T$((r=n,Math.round(255*parseFloat(r)).toString(16)))];return s&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),i=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(i,")"):"rgba(".concat(e,", ").concat(t,", ").concat(i,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*x$(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*x$(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+L$(this.r,this.g,this.b,!1),t=0,i=Object.entries(P$);t<i.length;t++){var n=i[t],s=n[0];if(e===n[1])return s}return!1},e.prototype.toString=function(e){var t=Boolean(e);e=null!=e?e:this.format;var i=!1,n=this.a<1&&this.a>=0;return t||!n||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(i=this.toRgbString()),"prgb"===e&&(i=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(i=this.toHexString()),"hex3"===e&&(i=this.toHexString(!0)),"hex4"===e&&(i=this.toHex8String(!0)),"hex8"===e&&(i=this.toHex8String()),"name"===e&&(i=this.toName()),"hsl"===e&&(i=this.toHslString()),"hsv"===e&&(i=this.toHsvString()),i||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var i=this.toHsl();return i.l+=t/100,i.l=k$(i.l),new e(i)},e.prototype.brighten=function(t){void 0===t&&(t=10);var i=this.toRgb();return i.r=Math.max(0,Math.min(255,i.r-Math.round(-t/100*255))),i.g=Math.max(0,Math.min(255,i.g-Math.round(-t/100*255))),i.b=Math.max(0,Math.min(255,i.b-Math.round(-t/100*255))),new e(i)},e.prototype.darken=function(t){void 0===t&&(t=10);var i=this.toHsl();return i.l-=t/100,i.l=k$(i.l),new e(i)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var i=this.toHsl();return i.s-=t/100,i.s=k$(i.s),new e(i)},e.prototype.saturate=function(t){void 0===t&&(t=10);var i=this.toHsl();return i.s+=t/100,i.s=k$(i.s),new e(i)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var i=this.toHsl(),n=(i.h+t)%360;return i.h=n<0?360+n:n,new e(i)},e.prototype.mix=function(t,i){void 0===i&&(i=50);var n=this.toRgb(),s=new e(t).toRgb(),r=i/100;return new e({r:(s.r-n.r)*r+n.r,g:(s.g-n.g)*r+n.g,b:(s.b-n.b)*r+n.b,a:(s.a-n.a)*r+n.a})},e.prototype.analogous=function(t,i){void 0===t&&(t=6),void 0===i&&(i=30);var n=this.toHsl(),s=360/i,r=[this];for(n.h=(n.h-(s*t>>1)+720)%360;--t;)n.h=(n.h+s)%360,r.push(new e(n));return r},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var i=this.toHsv(),n=i.h,s=i.s,r=i.v,a=[],o=1/t;t--;)a.push(new e({h:n,s:s,v:r})),r=(r+o)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),i=t.h;return[this,new e({h:(i+72)%360,s:t.s,l:t.l}),new e({h:(i+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var i=this.toRgb(),n=new e(t).toRgb(),s=i.a+n.a*(1-i.a);return new e({r:(i.r*i.a+n.r*n.a*(1-i.a))/s,g:(i.g*i.a+n.g*n.a*(1-i.a))/s,b:(i.b*i.a+n.b*n.a*(1-i.a))/s,a:s})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var i=this.toHsl(),n=i.h,s=[this],r=360/t,a=1;a<t;a++)s.push(new e({h:(n+a*r)%360,s:i.s,l:i.l}));return s},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function j$(e,t=20){return e.mix("#141414",t).toString()}const J$=hg({...hg({name:"ElButton"}),props:_$,emits:S$,setup(e,{expose:t,emit:i}){const n=e,s=function(e){const t=Wj(),i=KF("button");return qf((()=>{let n={},s=e.color;if(s){const r=s.match(/var\((.*?)\)/);r&&(s=window.getComputedStyle(window.document.documentElement).getPropertyValue(r[1]));const a=new W$(s),o=e.dark?a.tint(20).toString():j$(a,20);if(e.plain)n=i.cssVarBlock({"bg-color":e.dark?j$(a,90):a.tint(90).toString(),"text-color":s,"border-color":e.dark?j$(a,50):a.tint(50).toString(),"hover-text-color":`var(${i.cssVarName("color-white")})`,"hover-bg-color":s,"hover-border-color":s,"active-bg-color":o,"active-text-color":`var(${i.cssVarName("color-white")})`,"active-border-color":o}),t.value&&(n[i.cssVarBlockName("disabled-bg-color")]=e.dark?j$(a,90):a.tint(90).toString(),n[i.cssVarBlockName("disabled-text-color")]=e.dark?j$(a,50):a.tint(50).toString(),n[i.cssVarBlockName("disabled-border-color")]=e.dark?j$(a,80):a.tint(80).toString());else{const r=e.dark?j$(a,30):a.tint(30).toString(),l=a.isDark()?`var(${i.cssVarName("color-white")})`:`var(${i.cssVarName("color-black")})`;if(n=i.cssVarBlock({"bg-color":s,"text-color":l,"border-color":s,"hover-bg-color":r,"hover-text-color":l,"hover-border-color":r,"active-bg-color":o,"active-border-color":o}),t.value){const t=e.dark?j$(a,50):a.tint(50).toString();n[i.cssVarBlockName("disabled-bg-color")]=t,n[i.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${i.cssVarName("color-white")})`,n[i.cssVarBlockName("disabled-border-color")]=t}}}return n}))}(n),r=KF("button"),{_ref:a,_size:o,_type:l,_disabled:A,_props:c,shouldAddSpace:u,handleClick:h}=((e,t)=>{w$({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},qf((()=>"text"===e.type)));const i=pp(E$,void 0),n=MU("button"),{form:s}=Kj(),r=Vj(qf((()=>null==i?void 0:i.size))),a=Wj(),o=zh(),l=jg(),A=qf((()=>e.type||(null==i?void 0:i.type)||"")),c=qf((()=>{var t,i,s;return null!=(s=null!=(i=e.autoInsertSpace)?i:null==(t=n.value)?void 0:t.autoInsertSpace)&&s})),u=qf((()=>"button"===e.tag?{ariaDisabled:a.value||e.loading,disabled:a.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{})),h=qf((()=>{var e;const t=null==(e=l.default)?void 0:e.call(l);if(c.value&&1===(null==t?void 0:t.length)){const e=t[0];if((null==e?void 0:e.type)===ef){const t=e.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(t.trim())}}return!1}));return{_disabled:a,_size:r,_type:A,_ref:o,_props:u,shouldAddSpace:h,handleClick:i=>{a.value||e.loading?i.stopPropagation():("reset"===e.nativeType&&(null==s||s.resetFields()),t("click",i))}}})(n,i),d=qf((()=>[r.b(),r.m(l.value),r.m(o.value),r.is("disabled",A.value),r.is("loading",n.loading),r.is("plain",n.plain),r.is("round",n.round),r.is("circle",n.circle),r.is("text",n.text),r.is("link",n.link),r.is("has-bg",n.bg)]));return t({ref:a,size:o,type:l,disabled:A,shouldAddSpace:u}),(e,t)=>(af(),uf(Ng(e.tag),wf({ref_key:"_ref",ref:a},ed(c),{class:ed(d),style:ed(s),onClick:ed(h)}),{default:Nd((()=>[e.loading?(af(),cf(Zp,{key:0},[e.$slots.loading?Gg(e.$slots,"loading",{key:0}):(af(),uf(ed(gH),{key:1,class:pu(ed(r).is("loading"))},{default:Nd((()=>[(af(),uf(Ng(e.loadingIcon)))])),_:1},8,["class"]))],64)):e.icon||e.$slots.icon?(af(),uf(ed(gH),{key:1},{default:Nd((()=>[e.icon?(af(),uf(Ng(e.icon),{key:0})):Gg(e.$slots,"icon",{key:1})])),_:3})):Bf("v-if",!0),e.$slots.default?(af(),cf("span",{key:2,class:pu({[ed(r).em("text","expand")]:ed(u)})},[Gg(e.$slots,"default")],2)):Bf("v-if",!0)])),_:3},16,["class","style","onClick"]))}});var z$=KU(J$,[["__file","button.vue"]]);const X$={size:_$.size,type:_$.type},$$=hg({...hg({name:"ElButtonGroup"}),props:X$,setup(e){const t=e;gp(E$,Lh({size:ld(t,"size"),type:ld(t,"type")}));const i=KF("button");return(e,t)=>(af(),cf("div",{class:pu(ed(i).b("group"))},[Gg(e.$slots,"default")],2))}});var Z$=KU($$,[["__file","button-group.vue"]]);const eZ=lH(z$,{ButtonGroup:Z$}),tZ=cH(Z$);var iZ={exports:{}};iZ.exports=function(){var e=1e3,t=6e4,i=36e5,n="millisecond",s="second",r="minute",a="hour",o="day",l="week",A="month",c="quarter",u="year",h="date",d="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}},m=function(e,t,i){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(i)+e},C={s:m,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),n=Math.floor(i/60),s=i%60;return(t<=0?"+":"-")+m(n,2,"0")+":"+m(s,2,"0")},m:function e(t,i){if(t.date()<i.date())return-e(i,t);var n=12*(i.year()-t.year())+(i.month()-t.month()),s=t.clone().add(n,A),r=i-s<0,a=t.clone().add(n+(r?-1:1),A);return+(-(n+(i-s)/(r?s-a:a-s))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:A,y:u,w:l,d:o,D:h,h:a,m:r,s:s,ms:n,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},I="en",v={};v[I]=f;var B="$isDayjsObject",y=function(e){return e instanceof Q||!(!e||!e[B])},b=function e(t,i,n){var s;if(!t)return I;if("string"==typeof t){var r=t.toLowerCase();v[r]&&(s=r),i&&(v[r]=i,s=r);var a=t.split("-");if(!s&&a.length>1)return e(a[0])}else{var o=t.name;v[o]=t,s=o}return!n&&s&&(I=s),s||!n&&I},E=function(e,t){if(y(e))return e.clone();var i="object"==typeof t?t:{};return i.date=e,i.args=arguments,new Q(i)},w=C;w.l=b,w.i=y,w.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var Q=function(){function f(e){this.$L=b(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[B]=!0}var m=f.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,i=e.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(g);if(n){var s=n[2]-1||0,r=(n[7]||"0").substring(0,3);return i?new Date(Date.UTC(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)):new Date(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return w},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(e,t){var i=E(e);return this.startOf(t)<=i&&i<=this.endOf(t)},m.isAfter=function(e,t){return E(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<E(e)},m.$g=function(e,t,i){return w.u(e)?this[t]:this.set(i,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,t){var i=this,n=!!w.u(t)||t,c=w.p(e),d=function(e,t){var s=w.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i);return n?s:s.endOf(o)},g=function(e,t){return w.w(i.toDate()[e].apply(i.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),i)},p=this.$W,f=this.$M,m=this.$D,C="set"+(this.$u?"UTC":"");switch(c){case u:return n?d(1,0):d(31,11);case A:return n?d(1,f):d(0,f+1);case l:var I=this.$locale().weekStart||0,v=(p<I?p+7:p)-I;return d(n?m-v:m+(6-v),f);case o:case h:return g(C+"Hours",0);case a:return g(C+"Minutes",1);case r:return g(C+"Seconds",2);case s:return g(C+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(e,t){var i,l=w.p(e),c="set"+(this.$u?"UTC":""),d=(i={},i[o]=c+"Date",i[h]=c+"Date",i[A]=c+"Month",i[u]=c+"FullYear",i[a]=c+"Hours",i[r]=c+"Minutes",i[s]=c+"Seconds",i[n]=c+"Milliseconds",i)[l],g=l===o?this.$D+(t-this.$W):t;if(l===A||l===u){var p=this.clone().set(h,1);p.$d[d](g),p.init(),this.$d=p.set(h,Math.min(this.$D,p.daysInMonth())).$d}else d&&this.$d[d](g);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[w.p(e)]()},m.add=function(n,c){var h,d=this;n=Number(n);var g=w.p(c),p=function(e){var t=E(d);return w.w(t.date(t.date()+Math.round(e*n)),d)};if(g===A)return this.set(A,this.$M+n);if(g===u)return this.set(u,this.$y+n);if(g===o)return p(1);if(g===l)return p(7);var f=(h={},h[r]=t,h[a]=i,h[s]=e,h)[g]||1,m=this.$d.getTime()+n*f;return w.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return i.invalidDate||d;var n=e||"YYYY-MM-DDTHH:mm:ssZ",s=w.z(this),r=this.$H,a=this.$m,o=this.$M,l=i.weekdays,A=i.months,c=i.meridiem,u=function(e,i,s,r){return e&&(e[i]||e(t,n))||s[i].slice(0,r)},h=function(e){return w.s(r%12||12,e,"0")},g=c||function(e,t,i){var n=e<12?"AM":"PM";return i?n.toLowerCase():n};return n.replace(p,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return w.s(t.$y,4,"0");case"M":return o+1;case"MM":return w.s(o+1,2,"0");case"MMM":return u(i.monthsShort,o,A,3);case"MMMM":return u(A,o);case"D":return t.$D;case"DD":return w.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return u(i.weekdaysMin,t.$W,l,2);case"ddd":return u(i.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(r);case"HH":return w.s(r,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return g(r,a,!0);case"A":return g(r,a,!1);case"m":return String(a);case"mm":return w.s(a,2,"0");case"s":return String(t.$s);case"ss":return w.s(t.$s,2,"0");case"SSS":return w.s(t.$ms,3,"0");case"Z":return s}return null}(e)||s.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(n,h,d){var g,p=this,f=w.p(h),m=E(n),C=(m.utcOffset()-this.utcOffset())*t,I=this-m,v=function(){return w.m(p,m)};switch(f){case u:g=v()/12;break;case A:g=v();break;case c:g=v()/3;break;case l:g=(I-C)/6048e5;break;case o:g=(I-C)/864e5;break;case a:g=I/i;break;case r:g=I/t;break;case s:g=I/e;break;default:g=I}return d?g:w.a(g)},m.daysInMonth=function(){return this.endOf(A).$D},m.$locale=function(){return v[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var i=this.clone(),n=b(e,t,!0);return n&&(i.$L=n),i},m.clone=function(){return w.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},f}(),_=Q.prototype;return E.prototype=_,[["$ms",n],["$s",s],["$m",r],["$H",a],["$W",o],["$M",A],["$y",u],["$D",h]].forEach((function(e){_[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),E.extend=function(e,t){return e.$i||(e(t,Q,E),e.$i=!0),E},E.locale=b,E.isDayjs=y,E.unix=function(e){return E(1e3*e)},E.en=v[I],E.Ls=v,E.p={},E}();const nZ=RC(iZ.exports),sZ=(e,t)=>[e>0?e-1:void 0,e,e<t?e+1:void 0],rZ=e=>Array.from(Array.from({length:e}).keys()),aZ=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),oZ=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),lZ=function(e,t){const i=Pc(e),n=Pc(t);return i&&n?e.getTime()===t.getTime():!i&&!n&&e===t},AZ=function(e,t){const i=Lc(e),n=Lc(t);return i&&n?e.length===t.length&&e.every(((e,i)=>lZ(e,t[i]))):!i&&!n&&lZ(e,t)},cZ=function(e,t,i){const n=cL(t)||"x"===t?nZ(e).locale(i):nZ(e,t).locale(i);return n.isValid()?n:void 0},uZ=function(e,t,i){return cL(t)?e:"x"===t?+e:nZ(e).locale(i).format(t)},hZ=(e,t)=>{var i;const n=[],s=null==t?void 0:t();for(let r=0;r<e;r++)n.push(null!=(i=null==s?void 0:s.includes(r))&&i);return n},dZ=e=>Lc(e)?e.map((e=>e.toDate())):e.toDate(),gZ=BU({selectedDay:{type:Object},range:{type:Array},date:{type:Object,required:!0},hideHeader:{type:Boolean}}),pZ={pick:e=>qc(e)};var fZ={exports:{}};fZ.exports=function(e,t,i){var n=t.prototype,s=function(e){return e&&(e.indexOf?e:e.s)},r=function(e,t,i,n,r){var a=e.name?e:e.$locale(),o=s(a[t]),l=s(a[i]),A=o||l.map((function(e){return e.slice(0,n)}));if(!r)return A;var c=a.weekStart;return A.map((function(e,t){return A[(t+(c||0))%7]}))},a=function(){return i.Ls[i.locale()]},o=function(e,t){return e.formats[t]||e.formats[t.toUpperCase()].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,i){return t||i.slice(1)}))},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):r(e,"months")},monthsShort:function(t){return t?t.format("MMM"):r(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):r(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):r(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):r(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return o(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};n.localeData=function(){return l.bind(this)()},i.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return o(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return r(a(),"months")},i.monthsShort=function(){return r(a(),"monthsShort","months",3)},i.weekdays=function(e){return r(a(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return r(a(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return r(a(),"weekdaysMin","weekdays",2,e)}};const mZ=RC(fZ.exports),CZ=["sun","mon","tue","wed","thu","fri","sat"],IZ=(e,t)=>{nZ.extend(mZ);const i=nZ.localeData().firstDayOfWeek(),{t:n,lang:s}=CU(),r=nZ().locale(s.value),a=qf((()=>!!e.range&&!!e.range.length)),o=qf((()=>{let t=[];if(a.value){const[i,n]=e.range,s=rZ(n.date()-i.date()+1).map((e=>({text:i.date()+e,type:"current"})));let r=s.length%7;r=0===r?0:7-r;const a=rZ(r).map(((e,t)=>({text:t+1,type:"next"})));t=s.concat(a)}else{const n=e.date.startOf("month").day(),s=((e,t)=>{const i=e.subtract(1,"month").endOf("month").date();return rZ(t).map(((e,n)=>i-(t-n-1)))})(e.date,(n-i+7)%7).map((e=>({text:e,type:"prev"}))),r=(e=>{const t=e.daysInMonth();return rZ(t).map(((e,t)=>t+1))})(e.date).map((e=>({text:e,type:"current"})));t=[...s,...r];const a=7-(t.length%7||7),o=rZ(a).map(((e,t)=>({text:t+1,type:"next"})));t=t.concat(o)}return(e=>rZ(e.length/7).map((t=>{const i=7*t;return e.slice(i,i+7)})))(t)})),l=qf((()=>{const e=i;return 0===e?CZ.map((e=>n(`el.datepicker.weeks.${e}`))):CZ.slice(e).concat(CZ.slice(0,e)).map((e=>n(`el.datepicker.weeks.${e}`)))})),A=(t,i)=>{switch(i){case"prev":return e.date.startOf("month").subtract(1,"month").date(t);case"next":return e.date.startOf("month").add(1,"month").date(t);case"current":return e.date.date(t)}};return{now:r,isInRange:a,rows:o,weekDays:l,getFormattedDate:A,handlePickDay:({text:e,type:i})=>{const n=A(e,i);t("pick",n)},getSlotData:({text:t,type:i})=>{const n=A(t,i);return{isSelected:n.isSame(e.selectedDay),type:`${i}-month`,day:n.format("YYYY-MM-DD"),date:n.toDate()}}}},vZ=hg({...hg({name:"DateTable"}),props:gZ,emits:pZ,setup(e,{expose:t,emit:i}){const n=e,{isInRange:s,now:r,rows:a,weekDays:o,getFormattedDate:l,handlePickDay:A,getSlotData:c}=IZ(n,i),u=KF("calendar-table"),h=KF("calendar-day"),d=({text:e,type:t})=>{const i=[t];if("current"===t){const s=l(e,t);s.isSame(n.selectedDay,"day")&&i.push(h.is("selected")),s.isSame(r,"day")&&i.push(h.is("today"))}return i};return t({getFormattedDate:l}),(e,t)=>(af(),cf("table",{class:pu([ed(u).b(),ed(u).is("range",ed(s))]),cellspacing:"0",cellpadding:"0"},[e.hideHeader?Bf("v-if",!0):(af(),cf("thead",{key:0},[ff("tr",null,[(af(!0),cf(Zp,null,Pg(ed(o),(e=>(af(),cf("th",{key:e,scope:"col"},yu(e),1)))),128))])])),ff("tbody",null,[(af(!0),cf(Zp,null,Pg(ed(a),((t,i)=>(af(),cf("tr",{key:i,class:pu({[ed(u).e("row")]:!0,[ed(u).em("row","hide-border")]:0===i&&e.hideHeader})},[(af(!0),cf(Zp,null,Pg(t,((t,i)=>(af(),cf("td",{key:i,class:pu(d(t)),onClick:e=>ed(A)(t)},[ff("div",{class:pu(ed(h).b())},[Gg(e.$slots,"date-cell",{data:ed(c)(t)},(()=>[ff("span",null,yu(t.text),1)]))],2)],10,["onClick"])))),128))],2)))),128))])],2))}});var BZ=KU(vZ,[["__file","date-table.vue"]]);const yZ=BU({modelValue:{type:Date},range:{type:Array,validator:e=>Lc(e)&&2===e.length&&e.every((e=>Pc(e)))}}),bZ={[UU]:e=>Pc(e),[PU]:e=>Pc(e)},EZ=hg({...hg({name:"ElCalendar"}),props:yZ,emits:bZ,setup(e,{expose:t,emit:i}){const n=e,s=KF("calendar"),{calculateValidatedDateRange:r,date:a,pickDay:o,realSelectedDay:l,selectDate:A,validatedRange:c}=((e,t)=>{const{lang:i}=CU(),n=zh(),s=nZ().locale(i.value),r=qf({get:()=>e.modelValue?o.value:n.value,set(e){if(!e)return;n.value=e;const i=e.toDate();t(PU,i),t(UU,i)}}),a=qf((()=>{if(!e.range||!Lc(e.range)||2!==e.range.length||e.range.some((e=>!Pc(e))))return[];const t=e.range.map((e=>nZ(e).locale(i.value))),[n,s]=t;return n.isAfter(s)?[]:n.isSame(s,"month")?h(n,s):n.add(1,"month").month()!==s.month()?[]:h(n,s)})),o=qf((()=>e.modelValue?nZ(e.modelValue).locale(i.value):r.value||(a.value.length?a.value[0][0]:s))),l=qf((()=>o.value.subtract(1,"month").date(1))),A=qf((()=>o.value.add(1,"month").date(1))),c=qf((()=>o.value.subtract(1,"year").date(1))),u=qf((()=>o.value.add(1,"year").date(1))),h=(e,t)=>{const i=e.startOf("week"),n=t.endOf("week"),s=i.get("month"),r=n.get("month");return s===r?[[i,n]]:(s+1)%12===r?((e,t)=>{const i=e.endOf("month"),n=t.startOf("month"),s=i.isSame(n,"week");return[[e,i],[(s?n.add(1,"week"):n).startOf("week"),t]]})(i,n):s+2===r||(s+1)%11===r?((e,t)=>{const i=e.endOf("month"),n=e.add(1,"month").startOf("month"),s=i.isSame(n,"week")?n.add(1,"week"):n,r=s.endOf("month"),a=t.startOf("month"),o=r.isSame(a,"week")?a.add(1,"week"):a;return[[e,i],[s.startOf("week"),r],[o.startOf("week"),t]]})(i,n):[]},d=e=>{r.value=e};return{calculateValidatedDateRange:h,date:o,realSelectedDay:r,pickDay:d,selectDate:e=>{const t={"prev-month":l.value,"next-month":A.value,"prev-year":c.value,"next-year":u.value,today:s}[e];t.isSame(o.value,"day")||d(t)},validatedRange:a}})(n,i),{t:u}=CU(),h=qf((()=>{const e=`el.datepicker.month${a.value.format("M")}`;return`${a.value.year()} ${u("el.datepicker.year")} ${u(e)}`}));return t({selectedDay:l,pickDay:o,selectDate:A,calculateValidatedDateRange:r}),(e,t)=>(af(),cf("div",{class:pu(ed(s).b())},[ff("div",{class:pu(ed(s).e("header"))},[Gg(e.$slots,"header",{date:ed(h)},(()=>[ff("div",{class:pu(ed(s).e("title"))},yu(ed(h)),3),0===ed(c).length?(af(),cf("div",{key:0,class:pu(ed(s).e("button-group"))},[mf(ed(tZ),null,{default:Nd((()=>[mf(ed(eZ),{size:"small",onClick:e=>ed(A)("prev-month")},{default:Nd((()=>[vf(yu(ed(u)("el.datepicker.prevMonth")),1)])),_:1},8,["onClick"]),mf(ed(eZ),{size:"small",onClick:e=>ed(A)("today")},{default:Nd((()=>[vf(yu(ed(u)("el.datepicker.today")),1)])),_:1},8,["onClick"]),mf(ed(eZ),{size:"small",onClick:e=>ed(A)("next-month")},{default:Nd((()=>[vf(yu(ed(u)("el.datepicker.nextMonth")),1)])),_:1},8,["onClick"])])),_:1})],2)):Bf("v-if",!0)]))],2),0===ed(c).length?(af(),cf("div",{key:0,class:pu(ed(s).e("body"))},[mf(BZ,{date:ed(a),"selected-day":ed(l),onPick:ed(o)},Og({_:2},[e.$slots["date-cell"]?{name:"date-cell",fn:Nd((t=>[Gg(e.$slots,"date-cell",fu(Cf(t)))]))}:void 0]),1032,["date","selected-day","onPick"])],2)):(af(),cf("div",{key:1,class:pu(ed(s).e("body"))},[(af(!0),cf(Zp,null,Pg(ed(c),((t,i)=>(af(),uf(BZ,{key:i,date:t[0],"selected-day":ed(l),range:t,"hide-header":0!==i,onPick:ed(o)},Og({_:2},[e.$slots["date-cell"]?{name:"date-cell",fn:Nd((t=>[Gg(e.$slots,"date-cell",fu(Cf(t)))]))}:void 0]),1032,["date","selected-day","range","hide-header","onPick"])))),128))],2))],2))}});const wZ=lH(KU(EZ,[["__file","calendar.vue"]])),QZ=BU({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:[String,Object,Array],default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}});const _Z=lH(KU(hg({...hg({name:"ElCard"}),props:QZ,setup(e){const t=KF("card");return(e,i)=>(af(),cf("div",{class:pu([ed(t).b(),ed(t).is(`${e.shadow}-shadow`)])},[e.$slots.header||e.header?(af(),cf("div",{key:0,class:pu(ed(t).e("header"))},[Gg(e.$slots,"header",{},(()=>[vf(yu(e.header),1)]))],2)):Bf("v-if",!0),ff("div",{class:pu([ed(t).e("body"),e.bodyClass]),style:cu(e.bodyStyle)},[Gg(e.$slots,"default")],6),e.$slots.footer||e.footer?(af(),cf("div",{key:1,class:pu(ed(t).e("footer"))},[Gg(e.$slots,"footer",{},(()=>[vf(yu(e.footer),1)]))],2)):Bf("v-if",!0)],2))}}),[["__file","card.vue"]])),SZ=BU({initialIndex:{type:Number,default:0},height:{type:String,default:""},trigger:{type:String,values:["hover","click"],default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:{type:String,values:["","none","outside"],default:""},arrow:{type:String,values:["always","hover","never"],default:"hover"},type:{type:String,values:["","card"],default:""},cardScale:{type:Number,default:.83},loop:{type:Boolean,default:!0},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},pauseOnHover:{type:Boolean,default:!0},motionBlur:Boolean}),xZ={change:(e,t)=>[e,t].every(AL)},kZ=Symbol("carouselContextKey"),DZ="ElCarouselItem";var FZ=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(FZ||{});function TZ(e){return hf(e)&&e.type===Zp}function MZ(e){return hf(e)&&!TZ(e)&&!function(e){return hf(e)&&e.type===tf}(e)}const RZ=e=>{const t=Lc(e)?e:[e],i=[];return t.forEach((e=>{var t;Lc(e)?i.push(...RZ(e)):hf(e)&&(null==(t=e.component)?void 0:t.subTree)?i.push(e,...RZ(e.component.subTree)):hf(e)&&Lc(e.children)?i.push(...RZ(e.children)):i.push(e)})),i},NZ=(e,t)=>{const i={},n=Xh([]);return{children:n,addChild:s=>{i[s.uid]=s,n.value=((e,t,i)=>RZ(e.subTree).filter((e=>{var i;return hf(e)&&(null==(i=e.type)?void 0:i.name)===t&&!!e.component})).map((e=>e.component.uid)).map((e=>i[e])).filter((e=>!!e)))(e,t,i)},removeChild:e=>{delete i[e],n.value=n.value.filter((t=>t.uid!==e))}}},LZ=(e,t,i)=>{const{children:n,addChild:s,removeChild:r}=NZ(kf(),DZ),a=jg(),o=zh(-1),l=zh(null),A=zh(!1),c=zh(),u=zh(0),h=zh(!0),d=zh(!0),g=zh(!1),p=qf((()=>"never"!==e.arrow&&!ed(C))),f=qf((()=>n.value.some((e=>e.props.label.toString().length>0)))),m=qf((()=>"card"===e.type)),C=qf((()=>"vertical"===e.direction)),I=qf((()=>"auto"!==e.height?{height:e.height}:{height:`${u.value}px`,overflow:"hidden"})),v=sL((e=>{w(e)}),300,{trailing:!0}),B=sL((t=>{!function(t){"hover"===e.trigger&&t!==o.value&&(o.value=t,d.value||(g.value=!0))}(t)}),300);function y(){l.value&&(clearInterval(l.value),l.value=null)}function b(){e.interval<=0||!e.autoplay||l.value||(l.value=setInterval((()=>E()),e.interval))}const E=()=>{d.value||(g.value=!0),d.value=!1,o.value<n.value.length-1?o.value=o.value+1:e.loop?o.value=0:g.value=!1};function w(t){if(d.value||(g.value=!0),d.value=!1,Gc(t)){const e=n.value.filter((e=>e.props.name===t));e.length>0&&(t=n.value.indexOf(e[0]))}if(t=Number(t),Number.isNaN(t)||t!==Math.floor(t))return;const i=n.value.length,s=o.value;o.value=t<0?e.loop?i-1:0:t>=i?e.loop?0:i-1:t,s===o.value&&Q(s),_()}function Q(e){n.value.forEach(((t,i)=>{t.translateItem(i,o.value,e)}))}function _(){y(),e.pauseOnHover||b()}Pp((()=>o.value),((e,i)=>{Q(i),h.value&&(e%=2,i%=2),i>-1&&t("change",e,i)})),Pp((()=>e.autoplay),(e=>{e?b():y()})),Pp((()=>e.loop),(()=>{w(o.value)})),Pp((()=>e.interval),(()=>{_()}));const S=Xh();return Eg((()=>{Pp((()=>n.value),(()=>{n.value.length>0&&w(e.initialIndex)}),{immediate:!0}),S.value=WL(c.value,(()=>{Q()})),b()})),_g((()=>{y(),c.value&&S.value&&S.value.stop()})),gp(kZ,{root:c,isCardType:m,isVertical:C,items:n,loop:e.loop,cardScale:e.cardScale,addItem:s,removeItem:r,setActiveItem:w,setContainerHeight:function(t){"auto"===e.height&&(u.value=t)}}),{root:c,activeIndex:o,arrowDisplay:p,hasLabel:f,hover:A,isCardType:m,isTransitioning:g,items:n,isVertical:C,containerStyle:I,isItemsTwoLength:h,handleButtonEnter:function(e){ed(C)||n.value.forEach(((t,i)=>{e===function(e,t){var i,s,r,a;const o=ed(n),l=o.length;if(0===l||!e.states.inStage)return!1;const A=t+1,c=t-1,u=l-1,h=o[u].states.active,d=o[0].states.active,g=null==(s=null==(i=o[A])?void 0:i.states)?void 0:s.active,p=null==(a=null==(r=o[c])?void 0:r.states)?void 0:a.active;return t===u&&d||g?"left":!!(0===t&&h||p)&&"right"}(t,i)&&(t.states.hover=!0)}))},handleTransitionEnd:function(){g.value=!1},handleButtonLeave:function(){ed(C)||n.value.forEach((e=>{e.states.hover=!1}))},handleIndicatorClick:function(e){e!==o.value&&(d.value||(g.value=!0)),o.value=e},handleMouseEnter:function(){A.value=!0,e.pauseOnHover&&y()},handleMouseLeave:function(){A.value=!1,b()},setActiveItem:w,prev:function(){w(o.value-1)},next:function(){w(o.value+1)},PlaceholderItem:function(){var t;const i=null==(t=a.default)?void 0:t.call(a);if(!i)return null;const n=RZ(i).filter((e=>hf(e)&&e.type.name===DZ));return 2===(null==n?void 0:n.length)&&e.loop&&!m.value?(h.value=!0,n):(h.value=!1,null)},isTwoLengthShow:e=>!h.value||(o.value<=1?e<=1:e>1),throttledArrowClick:v,throttledIndicatorHover:B}},UZ=hg({...hg({name:"ElCarousel"}),props:SZ,emits:xZ,setup(e,{expose:t,emit:i}){const n=e,{root:s,activeIndex:r,arrowDisplay:a,hasLabel:o,hover:l,isCardType:A,items:c,isVertical:u,containerStyle:h,handleButtonEnter:d,handleButtonLeave:g,isTransitioning:p,handleIndicatorClick:f,handleMouseEnter:m,handleMouseLeave:C,handleTransitionEnd:I,setActiveItem:v,prev:B,next:y,PlaceholderItem:b,isTwoLengthShow:E,throttledArrowClick:w,throttledIndicatorHover:Q}=LZ(n,i),_=KF("carousel"),{t:S}=CU(),x=qf((()=>{const e=[_.b(),_.m(n.direction)];return ed(A)&&e.push(_.m("card")),e})),k=qf((()=>{const e=[_.e("container")];return n.motionBlur&&ed(p)&&c.value.length>1&&e.push(ed(u)?`${_.namespace.value}-transitioning-vertical`:`${_.namespace.value}-transitioning`),e})),D=qf((()=>{const e=[_.e("indicators"),_.em("indicators",n.direction)];return ed(o)&&e.push(_.em("indicators","labels")),"outside"===n.indicatorPosition&&e.push(_.em("indicators","outside")),ed(u)&&e.push(_.em("indicators","right")),e}));return t({activeIndex:r,setActiveItem:v,prev:B,next:y}),(e,t)=>(af(),cf("div",{ref_key:"root",ref:s,class:pu(ed(x)),onMouseenter:AC(ed(m),["stop"]),onMouseleave:AC(ed(C),["stop"])},[ed(a)?(af(),uf(am,{key:0,name:"carousel-arrow-left",persisted:""},{default:Nd((()=>[Ld(ff("button",{type:"button",class:pu([ed(_).e("arrow"),ed(_).em("arrow","left")]),"aria-label":ed(S)("el.carousel.leftArrow"),onMouseenter:e=>ed(d)("left"),onMouseleave:ed(g),onClick:AC((e=>ed(w)(ed(r)-1)),["stop"])},[mf(ed(gH),null,{default:Nd((()=>[mf(ed(kH))])),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[ym,("always"===e.arrow||ed(l))&&(n.loop||ed(r)>0)]])])),_:1})):Bf("v-if",!0),ed(a)?(af(),uf(am,{key:1,name:"carousel-arrow-right",persisted:""},{default:Nd((()=>[Ld(ff("button",{type:"button",class:pu([ed(_).e("arrow"),ed(_).em("arrow","right")]),"aria-label":ed(S)("el.carousel.rightArrow"),onMouseenter:e=>ed(d)("right"),onMouseleave:ed(g),onClick:AC((e=>ed(w)(ed(r)+1)),["stop"])},[mf(ed(gH),null,{default:Nd((()=>[mf(ed(MH))])),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[ym,("always"===e.arrow||ed(l))&&(n.loop||ed(r)<ed(c).length-1)]])])),_:1})):Bf("v-if",!0),ff("div",{class:pu(ed(k)),style:cu(ed(h)),onTransitionend:ed(I)},[mf(ed(b)),Gg(e.$slots,"default")],46,["onTransitionend"]),"none"!==e.indicatorPosition?(af(),cf("ul",{key:2,class:pu(ed(D))},[(af(!0),cf(Zp,null,Pg(ed(c),((t,i)=>Ld((af(),cf("li",{key:i,class:pu([ed(_).e("indicator"),ed(_).em("indicator",e.direction),ed(_).is("active",i===ed(r))]),onMouseenter:e=>ed(Q)(i),onClick:AC((e=>ed(f)(i)),["stop"])},[ff("button",{class:pu(ed(_).e("button")),"aria-label":ed(S)("el.carousel.indicator",{index:i+1})},[ed(o)?(af(),cf("span",{key:0},yu(t.props.label),1)):Bf("v-if",!0)],10,["aria-label"])],42,["onMouseenter","onClick"])),[[ym,ed(E)(i)]]))),128))],2)):Bf("v-if",!0),n.motionBlur?(af(),cf("svg",{key:3,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},[ff("defs",null,[ff("filter",{id:"elCarouselHorizontal"},[ff("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),ff("filter",{id:"elCarouselVertical"},[ff("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])])])):Bf("v-if",!0)],42,["onMouseenter","onMouseleave"]))}});var HZ=KU(UZ,[["__file","carousel.vue"]]);const PZ=BU({name:{type:String,default:""},label:{type:[String,Number],default:""}}),OZ=e=>{const t=pp(kZ),i=kf(),n=zh(),s=zh(!1),r=zh(0),a=zh(1),o=zh(!1),l=zh(!1),A=zh(!1),c=zh(!1),{isCardType:u,isVertical:h,cardScale:d}=t;const g=(e,i,s)=>{var g;const p=ed(u),f=null!=(g=t.items.value.length)?g:Number.NaN,m=e===i;p||oL(s)||(c.value=m||e===s),!m&&f>2&&t.loop&&(e=function(e,t,i){const n=i-1,s=i/2;return 0===t&&e===n?-1:t===n&&0===e?i:e<t-1&&t-e>=s?i+1:e>t+1&&e-t>=s?-2:e}(e,i,f));const C=ed(h);o.value=m,p?(A.value=Math.round(Math.abs(e-i))<=1,r.value=function(e,i){var n,s;const r=ed(h)?(null==(n=t.root.value)?void 0:n.offsetHeight)||0:(null==(s=t.root.value)?void 0:s.offsetWidth)||0;return A.value?r*((2-d)*(e-i)+1)/4:e<i?-(1+d)*r/4:(3+d)*r/4}(e,i),a.value=ed(o)?1:d):r.value=function(e,i,n){const s=t.root.value;return s?((n?s.offsetHeight:s.offsetWidth)||0)*(e-i):0}(e,i,C),l.value=!0,m&&n.value&&t.setContainerHeight(n.value.offsetHeight)};return Eg((()=>{t.addItem({props:e,states:Lh({hover:s,translate:r,scale:a,active:o,ready:l,inStage:A,animating:c}),uid:i.uid,translateItem:g})})),Sg((()=>{t.removeItem(i.uid)})),{carouselItemRef:n,active:o,animating:c,hover:s,inStage:A,isVertical:h,translate:r,isCardType:u,scale:a,ready:l,handleItemClick:function(){if(t&&ed(u)){const e=t.items.value.findIndex((({uid:e})=>e===i.uid));t.setActiveItem(e)}}}},GZ=hg({...hg({name:DZ}),props:PZ,setup(e){const t=e,i=KF("carousel"),{carouselItemRef:n,active:s,animating:r,hover:a,inStage:o,isVertical:l,translate:A,isCardType:c,scale:u,ready:h,handleItemClick:d}=OZ(t),g=qf((()=>[i.e("item"),i.is("active",s.value),i.is("in-stage",o.value),i.is("hover",a.value),i.is("animating",r.value),{[i.em("item","card")]:c.value,[i.em("item","card-vertical")]:c.value&&l.value}])),p=qf((()=>({transform:[`${"translate"+(ed(l)?"Y":"X")}(${ed(A)}px)`,`scale(${ed(u)})`].join(" ")})));return(e,t)=>Ld((af(),cf("div",{ref_key:"carouselItemRef",ref:n,class:pu(ed(g)),style:cu(ed(p)),onClick:ed(d)},[ed(c)?Ld((af(),cf("div",{key:0,class:pu(ed(i).e("mask"))},null,2)),[[ym,!ed(s)]]):Bf("v-if",!0),Gg(e.$slots,"default")],14,["onClick"])),[[ym,ed(h)]])}});var KZ=KU(GZ,[["__file","carousel-item.vue"]]);const qZ=lH(HZ,{CarouselItem:KZ}),YZ=cH(KZ),VZ={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:bU,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...Dj(["ariaControls"])},WZ={[UU]:e=>Gc(e)||AL(e)||lL(e),change:e=>Gc(e)||AL(e)||lL(e)},jZ=Symbol("checkboxGroupContextKey"),JZ=(e,{model:t,isLimitExceeded:i,hasOwnLabel:n,isDisabled:s,isLabeledByFormItem:r})=>{const a=pp(jZ,void 0),{formItem:o}=Kj(),{emit:l}=kf();function A(t){var i,n,s,r;return[!0,e.trueValue,e.trueLabel].includes(t)?null==(n=null!=(i=e.trueValue)?i:e.trueLabel)||n:null!=(r=null!=(s=e.falseValue)?s:e.falseLabel)&&r}const c=qf((()=>(null==a?void 0:a.validateEvent)||e.validateEvent));return Pp((()=>e.modelValue),(()=>{c.value&&(null==o||o.validate("change").catch((e=>{})))})),{handleChange:function(e){if(i.value)return;const t=e.target;l("change",A(t.checked),e)},onClickRoot:async function(a){if(!i.value&&!n.value&&!s.value&&r.value){a.composedPath().some((e=>"LABEL"===e.tagName))||(t.value=A([!1,e.falseValue,e.falseLabel].includes(t.value)),await Qd(),function(e,t){l("change",A(e),t)}(t.value,a))}}}},zZ=(e,t)=>{const{formItem:i}=Kj(),{model:n,isGroup:s,isLimitExceeded:r}=(e=>{const t=zh(!1),{emit:i}=kf(),n=pp(jZ,void 0),s=qf((()=>!1===oL(n))),r=zh(!1),a=qf({get(){var i,r;return s.value?null==(i=null==n?void 0:n.modelValue)?void 0:i.value:null!=(r=e.modelValue)?r:t.value},set(e){var o,l;s.value&&Lc(e)?(r.value=void 0!==(null==(o=null==n?void 0:n.max)?void 0:o.value)&&e.length>(null==n?void 0:n.max.value)&&e.length>a.value.length,!1===r.value&&(null==(l=null==n?void 0:n.changeEvent)||l.call(n,e))):(i(UU,e),t.value=e)}});return{model:a,isGroup:s,isLimitExceeded:r}})(e),{isFocused:a,isChecked:o,checkboxButtonSize:l,checkboxSize:A,hasOwnLabel:c,actualValue:u}=((e,t,{model:i})=>{const n=pp(jZ,void 0),s=zh(!1),r=qf((()=>hL(e.value)?e.label:e.value)),a=qf((()=>{const t=i.value;return lL(t)?t:Lc(t)?qc(r.value)?t.map(Yh).some((e=>WN(e,r.value))):t.map(Yh).includes(r.value):null!=t?t===e.trueValue||t===e.trueLabel:!!t}));return{checkboxButtonSize:Vj(qf((()=>{var e;return null==(e=null==n?void 0:n.size)?void 0:e.value})),{prop:!0}),isChecked:a,isFocused:s,checkboxSize:Vj(qf((()=>{var e;return null==(e=null==n?void 0:n.size)?void 0:e.value}))),hasOwnLabel:qf((()=>!!t.default||!hL(r.value))),actualValue:r}})(e,t,{model:n}),{isDisabled:h}=(({model:e,isChecked:t})=>{const i=pp(jZ,void 0),n=qf((()=>{var n,s;const r=null==(n=null==i?void 0:i.max)?void 0:n.value,a=null==(s=null==i?void 0:i.min)?void 0:s.value;return!oL(r)&&e.value.length>=r&&!t.value||!oL(a)&&e.value.length<=a&&t.value}));return{isDisabled:Wj(qf((()=>(null==i?void 0:i.disabled.value)||n.value))),isLimitDisabled:n}})({model:n,isChecked:o}),{inputId:d,isLabeledByFormItem:g}=qj(e,{formItemContext:i,disableIdGeneration:c,disableIdManagement:s}),{handleChange:p,onClickRoot:f}=JZ(e,{model:n,isLimitExceeded:r,hasOwnLabel:c,isDisabled:h,isLabeledByFormItem:g});var m,C;return e.checked&&(Lc(n.value)&&!n.value.includes(u.value)?n.value.push(u.value):n.value=null==(C=null!=(m=e.trueValue)?m:e.trueLabel)||C),w$({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},qf((()=>s.value&&hL(e.value)))),w$({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},qf((()=>!!e.trueLabel))),w$({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},qf((()=>!!e.falseLabel))),{inputId:d,isLabeledByFormItem:g,isChecked:o,isDisabled:h,isFocused:a,checkboxButtonSize:l,checkboxSize:A,hasOwnLabel:c,model:n,actualValue:u,handleChange:p,onClickRoot:f}},XZ=hg({...hg({name:"ElCheckbox"}),props:VZ,emits:WZ,setup(e){const t=e,i=jg(),{inputId:n,isLabeledByFormItem:s,isChecked:r,isDisabled:a,isFocused:o,checkboxSize:l,hasOwnLabel:A,model:c,actualValue:u,handleChange:h,onClickRoot:d}=zZ(t,i),g=KF("checkbox"),p=qf((()=>[g.b(),g.m(l.value),g.is("disabled",a.value),g.is("bordered",t.border),g.is("checked",r.value)])),f=qf((()=>[g.e("input"),g.is("disabled",a.value),g.is("checked",r.value),g.is("indeterminate",t.indeterminate),g.is("focus",o.value)]));return(e,t)=>(af(),uf(Ng(!ed(A)&&ed(s)?"span":"label"),{class:pu(ed(p)),"aria-controls":e.indeterminate?e.ariaControls:null,onClick:ed(d)},{default:Nd((()=>{var t,i,s,r;return[ff("span",{class:pu(ed(f))},[e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?Ld((af(),cf("input",{key:0,id:ed(n),"onUpdate:modelValue":e=>Jh(c)?c.value=e:null,class:pu(ed(g).e("original")),type:"checkbox",indeterminate:e.indeterminate,name:e.name,tabindex:e.tabindex,disabled:ed(a),"true-value":null==(i=null!=(t=e.trueValue)?t:e.trueLabel)||i,"false-value":null!=(r=null!=(s=e.falseValue)?s:e.falseLabel)&&r,onChange:ed(h),onFocus:e=>o.value=!0,onBlur:e=>o.value=!1,onClick:AC((()=>{}),["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[iC,ed(c)]]):Ld((af(),cf("input",{key:1,id:ed(n),"onUpdate:modelValue":e=>Jh(c)?c.value=e:null,class:pu(ed(g).e("original")),type:"checkbox",indeterminate:e.indeterminate,disabled:ed(a),value:ed(u),name:e.name,tabindex:e.tabindex,onChange:ed(h),onFocus:e=>o.value=!0,onBlur:e=>o.value=!1,onClick:AC((()=>{}),["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[iC,ed(c)]]),ff("span",{class:pu(ed(g).e("inner"))},null,2)],2),ed(A)?(af(),cf("span",{key:0,class:pu(ed(g).e("label"))},[Gg(e.$slots,"default"),e.$slots.default?Bf("v-if",!0):(af(),cf(Zp,{key:0},[vf(yu(e.label),1)],64))],2)):Bf("v-if",!0)]})),_:3},8,["class","aria-controls","onClick"]))}});var $Z=KU(XZ,[["__file","checkbox.vue"]]);const ZZ=hg({...hg({name:"ElCheckboxButton"}),props:VZ,emits:WZ,setup(e){const t=e,i=jg(),{isFocused:n,isChecked:s,isDisabled:r,checkboxButtonSize:a,model:o,actualValue:l,handleChange:A}=zZ(t,i),c=pp(jZ,void 0),u=KF("checkbox"),h=qf((()=>{var e,t,i,n;const s=null!=(t=null==(e=null==c?void 0:c.fill)?void 0:e.value)?t:"";return{backgroundColor:s,borderColor:s,color:null!=(n=null==(i=null==c?void 0:c.textColor)?void 0:i.value)?n:"",boxShadow:s?`-1px 0 0 0 ${s}`:void 0}})),d=qf((()=>[u.b("button"),u.bm("button",a.value),u.is("disabled",r.value),u.is("checked",s.value),u.is("focus",n.value)]));return(e,t)=>{var i,a,c,g;return af(),cf("label",{class:pu(ed(d))},[e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?Ld((af(),cf("input",{key:0,"onUpdate:modelValue":e=>Jh(o)?o.value=e:null,class:pu(ed(u).be("button","original")),type:"checkbox",name:e.name,tabindex:e.tabindex,disabled:ed(r),"true-value":null==(a=null!=(i=e.trueValue)?i:e.trueLabel)||a,"false-value":null!=(g=null!=(c=e.falseValue)?c:e.falseLabel)&&g,onChange:ed(A),onFocus:e=>n.value=!0,onBlur:e=>n.value=!1,onClick:AC((()=>{}),["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[iC,ed(o)]]):Ld((af(),cf("input",{key:1,"onUpdate:modelValue":e=>Jh(o)?o.value=e:null,class:pu(ed(u).be("button","original")),type:"checkbox",name:e.name,tabindex:e.tabindex,disabled:ed(r),value:ed(l),onChange:ed(A),onFocus:e=>n.value=!0,onBlur:e=>n.value=!1,onClick:AC((()=>{}),["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[iC,ed(o)]]),e.$slots.default||e.label?(af(),cf("span",{key:2,class:pu(ed(u).be("button","inner")),style:cu(ed(s)?ed(h):void 0)},[Gg(e.$slots,"default",{},(()=>[vf(yu(e.label),1)]))],6)):Bf("v-if",!0)],2)}}});var e0=KU(ZZ,[["__file","checkbox-button.vue"]]);const t0=BU({modelValue:{type:Array,default:()=>[]},disabled:Boolean,min:Number,max:Number,size:bU,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...Dj(["ariaLabel"])}),i0={[UU]:e=>Lc(e),change:e=>Lc(e)},n0=hg({...hg({name:"ElCheckboxGroup"}),props:t0,emits:i0,setup(e,{emit:t}){const i=e,n=KF("checkbox"),{formItem:s}=Kj(),{inputId:r,isLabeledByFormItem:a}=qj(i,{formItemContext:s}),o=async e=>{t(UU,e),await Qd(),t("change",e)},l=qf({get:()=>i.modelValue,set(e){o(e)}});return gp(jZ,{...nL(rd(i),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:l,changeEvent:o}),Pp((()=>i.modelValue),(()=>{i.validateEvent&&(null==s||s.validate("change").catch((e=>{})))})),(e,t)=>{var i;return af(),uf(Ng(e.tag),{id:ed(r),class:pu(ed(n).b("group")),role:"group","aria-label":ed(a)?void 0:e.ariaLabel||"checkbox-group","aria-labelledby":ed(a)?null==(i=ed(s))?void 0:i.labelId:void 0},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var s0=KU(n0,[["__file","checkbox-group.vue"]]);const r0=lH($Z,{CheckboxButton:e0,CheckboxGroup:s0}),a0=cH(e0),o0=cH(s0),l0=BU({modelValue:{type:[String,Number,Boolean],default:void 0},size:bU,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),A0=BU({...l0,border:Boolean}),c0={[UU]:e=>Gc(e)||AL(e)||lL(e),[HU]:e=>Gc(e)||AL(e)||lL(e)},u0=Symbol("radioGroupKey"),h0=(e,t)=>{const i=zh(),n=pp(u0,void 0),s=qf((()=>!!n)),r=qf((()=>hL(e.value)?e.label:e.value)),a=qf({get:()=>s.value?n.modelValue:e.modelValue,set(a){s.value?n.changeEvent(a):t&&t(UU,a),i.value.checked=e.modelValue===r.value}}),o=Vj(qf((()=>null==n?void 0:n.size))),l=Wj(qf((()=>null==n?void 0:n.disabled))),A=zh(!1),c=qf((()=>l.value||s.value&&a.value!==r.value?-1:0));return w$({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},qf((()=>s.value&&hL(e.value)))),{radioRef:i,isGroup:s,radioGroup:n,focus:A,size:o,disabled:l,tabIndex:c,modelValue:a,actualValue:r}},d0=hg({...hg({name:"ElRadio"}),props:A0,emits:c0,setup(e,{emit:t}){const i=e,n=KF("radio"),{radioRef:s,radioGroup:r,focus:a,size:o,disabled:l,modelValue:A,actualValue:c}=h0(i,t);function u(){Qd((()=>t("change",A.value)))}return(e,t)=>{var i;return af(),cf("label",{class:pu([ed(n).b(),ed(n).is("disabled",ed(l)),ed(n).is("focus",ed(a)),ed(n).is("bordered",e.border),ed(n).is("checked",ed(A)===ed(c)),ed(n).m(ed(o))])},[ff("span",{class:pu([ed(n).e("input"),ed(n).is("disabled",ed(l)),ed(n).is("checked",ed(A)===ed(c))])},[Ld(ff("input",{ref_key:"radioRef",ref:s,"onUpdate:modelValue":e=>Jh(A)?A.value=e:null,class:pu(ed(n).e("original")),value:ed(c),name:e.name||(null==(i=ed(r))?void 0:i.name),disabled:ed(l),checked:ed(A)===ed(c),type:"radio",onFocus:e=>a.value=!0,onBlur:e=>a.value=!1,onChange:u,onClick:AC((()=>{}),["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[sC,ed(A)]]),ff("span",{class:pu(ed(n).e("inner"))},null,2)],2),ff("span",{class:pu(ed(n).e("label")),onKeydown:AC((()=>{}),["stop"])},[Gg(e.$slots,"default",{},(()=>[vf(yu(e.label),1)]))],42,["onKeydown"])],2)}}});var g0=KU(d0,[["__file","radio.vue"]]);const p0=BU({...l0}),f0=hg({...hg({name:"ElRadioButton"}),props:p0,setup(e){const t=e,i=KF("radio"),{radioRef:n,focus:s,size:r,disabled:a,modelValue:o,radioGroup:l,actualValue:A}=h0(t),c=qf((()=>({backgroundColor:(null==l?void 0:l.fill)||"",borderColor:(null==l?void 0:l.fill)||"",boxShadow:(null==l?void 0:l.fill)?`-1px 0 0 0 ${l.fill}`:"",color:(null==l?void 0:l.textColor)||""})));return(e,t)=>{var u;return af(),cf("label",{class:pu([ed(i).b("button"),ed(i).is("active",ed(o)===ed(A)),ed(i).is("disabled",ed(a)),ed(i).is("focus",ed(s)),ed(i).bm("button",ed(r))])},[Ld(ff("input",{ref_key:"radioRef",ref:n,"onUpdate:modelValue":e=>Jh(o)?o.value=e:null,class:pu(ed(i).be("button","original-radio")),value:ed(A),type:"radio",name:e.name||(null==(u=ed(l))?void 0:u.name),disabled:ed(a),onFocus:e=>s.value=!0,onBlur:e=>s.value=!1,onClick:AC((()=>{}),["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[sC,ed(o)]]),ff("span",{class:pu(ed(i).be("button","inner")),style:cu(ed(o)===ed(A)?ed(c):{}),onKeydown:AC((()=>{}),["stop"])},[Gg(e.$slots,"default",{},(()=>[vf(yu(e.label),1)]))],46,["onKeydown"])],2)}}});var m0=KU(f0,[["__file","radio-button.vue"]]);const C0=BU({id:{type:String,default:void 0},size:bU,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...Dj(["ariaLabel"])}),I0=c0,v0=hg({...hg({name:"ElRadioGroup"}),props:C0,emits:I0,setup(e,{emit:t}){const i=e,n=KF("radio"),s=Gj(),r=zh(),{formItem:a}=Kj(),{inputId:o,isLabeledByFormItem:l}=qj(i,{formItemContext:a});Eg((()=>{const e=r.value.querySelectorAll("[type=radio]"),t=e[0];!Array.from(e).some((e=>e.checked))&&t&&(t.tabIndex=0)}));const A=qf((()=>i.name||s.value));return gp(u0,Lh({...rd(i),changeEvent:e=>{t(UU,e),Qd((()=>t("change",e)))},name:A})),Pp((()=>i.modelValue),(()=>{i.validateEvent&&(null==a||a.validate("change").catch((e=>{})))})),(e,t)=>(af(),cf("div",{id:ed(o),ref_key:"radioGroupRef",ref:r,class:pu(ed(n).b("group")),role:"radiogroup","aria-label":ed(l)?void 0:e.ariaLabel||"radio-group","aria-labelledby":ed(l)?ed(a).labelId:void 0},[Gg(e.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var B0=KU(v0,[["__file","radio-group.vue"]]);const y0=lH(g0,{RadioButton:m0,RadioGroup:B0}),b0=cH(B0),E0=cH(m0);var w0=hg({name:"NodeContent",setup:()=>({ns:KF("cascader-node")}),render(){const{ns:e}=this,{node:t,panel:i}=this.$parent,{data:n,label:s}=t,{renderLabelFn:r}=i;return Yf("span",{class:e.e("label")},r?r({node:t,data:n}):s)}});const Q0=Symbol(),_0=hg({name:"ElCascaderNode",components:{ElCheckbox:r0,ElRadio:y0,NodeContent:w0,ElIcon:gH,Check:VP,Loading:qq,ArrowRight:MH},props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(e,{emit:t}){const i=pp(Q0),n=KF("cascader-node"),s=qf((()=>i.isHoverMenu)),r=qf((()=>i.config.multiple)),a=qf((()=>i.config.checkStrictly)),o=qf((()=>{var e;return null==(e=i.checkedNodes[0])?void 0:e.uid})),l=qf((()=>e.node.isDisabled)),A=qf((()=>e.node.isLeaf)),c=qf((()=>a.value&&!A.value||!l.value)),u=qf((()=>d(i.expandingNode))),h=qf((()=>a.value&&i.checkedNodes.some(d))),d=t=>{var i;const{level:n,uid:s}=e.node;return(null==(i=null==t?void 0:t.pathNodes[n-1])?void 0:i.uid)===s},g=()=>{u.value||i.expandNode(e.node)},p=t=>{const{node:n}=e;t!==n.checked&&i.handleCheckChange(n,t)},f=()=>{i.lazyLoad(e.node,(()=>{A.value||g()}))},m=()=>{const{node:t}=e;c.value&&!t.loading&&(t.loaded?g():f())},C=t=>{e.node.loaded?(p(t),!a.value&&g()):f()};return{panel:i,isHoverMenu:s,multiple:r,checkStrictly:a,checkedNodeId:o,isDisabled:l,isLeaf:A,expandable:c,inExpandingPath:u,inCheckedPath:h,ns:n,handleHoverExpand:e=>{s.value&&(m(),!A.value&&t("expand",e))},handleExpand:m,handleClick:()=>{s.value&&!A.value||(!A.value||l.value||a.value||r.value?m():C(!0))},handleCheck:C,handleSelectCheck:t=>{a.value?(p(t),e.node.loaded&&g()):C(t)}}}});const S0=hg({name:"ElCascaderMenu",components:{Loading:qq,ElIcon:gH,ElScrollbar:lJ,ElCascaderNode:KU(_0,[["render",function(e,t,i,n,s,r){const a=Mg("el-checkbox"),o=Mg("el-radio"),l=Mg("check"),A=Mg("el-icon"),c=Mg("node-content"),u=Mg("loading"),h=Mg("arrow-right");return af(),cf("li",{id:`${e.menuId}-${e.node.uid}`,role:"menuitem","aria-haspopup":!e.isLeaf,"aria-owns":e.isLeaf?null:e.menuId,"aria-expanded":e.inExpandingPath,tabindex:e.expandable?-1:void 0,class:pu([e.ns.b(),e.ns.is("selectable",e.checkStrictly),e.ns.is("active",e.node.checked),e.ns.is("disabled",!e.expandable),e.inExpandingPath&&"in-active-path",e.inCheckedPath&&"in-checked-path"]),onMouseenter:e.handleHoverExpand,onFocus:e.handleHoverExpand,onClick:e.handleClick},[Bf(" prefix "),e.multiple?(af(),uf(a,{key:0,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:e.isDisabled,onClick:AC((()=>{}),["stop"]),"onUpdate:modelValue":e.handleSelectCheck},null,8,["model-value","indeterminate","disabled","onClick","onUpdate:modelValue"])):e.checkStrictly?(af(),uf(o,{key:1,"model-value":e.checkedNodeId,label:e.node.uid,disabled:e.isDisabled,"onUpdate:modelValue":e.handleSelectCheck,onClick:AC((()=>{}),["stop"])},{default:Nd((()=>[Bf("\n        Add an empty element to avoid render label,\n        do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485\n      "),ff("span")])),_:1},8,["model-value","label","disabled","onUpdate:modelValue","onClick"])):e.isLeaf&&e.node.checked?(af(),uf(A,{key:2,class:pu(e.ns.e("prefix"))},{default:Nd((()=>[mf(l)])),_:1},8,["class"])):Bf("v-if",!0),Bf(" content "),mf(c),Bf(" postfix "),e.isLeaf?Bf("v-if",!0):(af(),cf(Zp,{key:3},[e.node.loading?(af(),uf(A,{key:0,class:pu([e.ns.is("loading"),e.ns.e("postfix")])},{default:Nd((()=>[mf(u)])),_:1},8,["class"])):(af(),uf(A,{key:1,class:pu(["arrow-right",e.ns.e("postfix")])},{default:Nd((()=>[mf(h)])),_:1},8,["class"]))],64))],42,["id","aria-haspopup","aria-owns","aria-expanded","tabindex","onMouseenter","onFocus","onClick"])}],["__file","node.vue"]])},props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(e){const t=kf(),i=KF("cascader-menu"),{t:n}=CU(),s=Gj();let r=null,a=null;const o=pp(Q0),l=zh(null),A=qf((()=>!e.nodes.length)),c=qf((()=>!o.initialLoaded)),u=qf((()=>`${s.value}-${e.index}`)),h=()=>{a&&(clearTimeout(a),a=null)},d=()=>{l.value&&(l.value.innerHTML="",h())};return{ns:i,panel:o,hoverZone:l,isEmpty:A,isLoading:c,menuId:u,t:n,handleExpand:e=>{r=e.target},handleMouseMove:e=>{if(o.isHoverMenu&&r&&l.value)if(r.contains(e.target)){h();const i=t.vnode.el,{left:n}=i.getBoundingClientRect(),{offsetWidth:s,offsetHeight:a}=i,o=e.clientX-n,A=r.offsetTop,c=A+r.offsetHeight;l.value.innerHTML=`\n          <path style="pointer-events: auto;" fill="transparent" d="M${o} ${A} L${s} 0 V${A} Z" />\n          <path style="pointer-events: auto;" fill="transparent" d="M${o} ${c} L${s} ${a} V${c} Z" />\n        `}else a||(a=window.setTimeout(d,o.config.hoverThreshold))},clearHoverZone:d}}});var x0=KU(S0,[["render",function(e,t,i,n,s,r){const a=Mg("el-cascader-node"),o=Mg("loading"),l=Mg("el-icon"),A=Mg("el-scrollbar");return af(),uf(A,{key:e.menuId,tag:"ul",role:"menu",class:pu(e.ns.b()),"wrap-class":e.ns.e("wrap"),"view-class":[e.ns.e("list"),e.ns.is("empty",e.isEmpty)],onMousemove:e.handleMouseMove,onMouseleave:e.clearHoverZone},{default:Nd((()=>{var t;return[(af(!0),cf(Zp,null,Pg(e.nodes,(t=>(af(),uf(a,{key:t.uid,node:t,"menu-id":e.menuId,onExpand:e.handleExpand},null,8,["node","menu-id","onExpand"])))),128)),e.isLoading?(af(),cf("div",{key:0,class:pu(e.ns.e("empty-text"))},[mf(l,{size:"14",class:pu(e.ns.is("loading"))},{default:Nd((()=>[mf(o)])),_:1},8,["class"]),vf(" "+yu(e.t("el.cascader.loading")),1)],2)):e.isEmpty?(af(),cf("div",{key:1,class:pu(e.ns.e("empty-text"))},[Gg(e.$slots,"empty",{},(()=>[vf(yu(e.t("el.cascader.noData")),1)]))],2)):(null==(t=e.panel)?void 0:t.isHoverMenu)?(af(),cf("svg",{key:2,ref:"hoverZone",class:pu(e.ns.e("hover-zone"))},null,2)):Bf("v-if",!0)]})),_:3},8,["class","wrap-class","view-class","onMousemove","onMouseleave"])}],["__file","menu.vue"]]);const k0=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),D0=e=>iu(e);let F0=0;let T0=class e{constructor(t,i,n,s=!1){this.data=t,this.config=i,this.parent=n,this.root=s,this.uid=F0++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:r,label:a,children:o}=i,l=t[o],A=(e=>{const t=[e];let{parent:i}=e;for(;i;)t.unshift(i),i=i.parent;return t})(this);this.level=s?0:n?n.level+1:1,this.value=t[r],this.label=t[a],this.pathNodes=A,this.pathValues=A.map((e=>e.value)),this.pathLabels=A.map((e=>e.label)),this.childrenData=l,this.children=(l||[]).map((t=>new e(t,i,this))),this.loaded=!i.lazy||this.isLeaf||!cL(l)}get isDisabled(){const{data:e,parent:t,config:i}=this,{disabled:n,checkStrictly:s}=i;return(Oc(n)?n(e,this):!!e[n])||!s&&(null==t?void 0:t.isDisabled)}get isLeaf(){const{data:e,config:t,childrenData:i,loaded:n}=this,{lazy:s,leaf:r}=t,a=Oc(r)?r(e,this):e[r];return oL(a)?!(s&&!n)&&!(Lc(i)&&i.length):!!a}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(t){const{childrenData:i,children:n}=this,s=new e(t,this.config,this);return Lc(i)?i.push(t):this.childrenData=[t],n.push(s),s}calcText(e,t){const i=e?this.pathLabels.join(t):this.label;return this.text=i,i}broadcast(e,...t){const i=`onParent${D0(e)}`;this.children.forEach((n=>{n&&(n.broadcast(e,...t),n[i]&&n[i](...t))}))}emit(e,...t){const{parent:i}=this,n=`onChild${D0(e)}`;i&&(i[n]&&i[n](...t),i.emit(e,...t))}onParentCheck(e){this.isDisabled||this.setCheckState(e)}onChildCheck(){const{children:e}=this,t=e.filter((e=>!e.isDisabled)),i=!!t.length&&t.every((e=>e.checked));this.setCheckState(i)}setCheckState(e){const t=this.children.length,i=this.children.reduce(((e,t)=>e+(t.checked?1:t.indeterminate?.5:0)),0);this.checked=this.loaded&&this.children.filter((e=>!e.isDisabled)).every((e=>e.loaded&&e.checked))&&e,this.indeterminate=this.loaded&&i!==t&&i>0}doCheck(e){if(this.checked===e)return;const{checkStrictly:t,multiple:i}=this.config;t||!i?this.checked=e:(this.broadcast("check",e),this.setCheckState(e),this.emit("check"))}};const M0=(e,t)=>e.reduce(((e,i)=>(i.isLeaf?e.push(i):(!t&&e.push(i),e=e.concat(M0(i.children,t))),e)),[]);class R0{constructor(e,t){this.config=t;const i=(e||[]).map((e=>new T0(e,this.config)));this.nodes=i,this.allNodes=M0(i,!1),this.leafNodes=M0(i,!0)}getNodes(){return this.nodes}getFlattedNodes(e){return e?this.leafNodes:this.allNodes}appendNode(e,t){const i=t?t.appendChild(e):new T0(e,this.config);t||this.nodes.push(i),this.allNodes.push(i),i.isLeaf&&this.leafNodes.push(i)}appendNodes(e,t){e.forEach((e=>this.appendNode(e,t)))}getNodeByValue(e,t=!1){if(!e&&0!==e)return null;return this.getFlattedNodes(t).find((t=>WN(t.value,e)||WN(t.pathValues,e)))||null}getSameNode(e){if(!e)return null;return this.getFlattedNodes(!1).find((({value:t,level:i})=>WN(e.value,t)&&e.level===i))||null}}const N0=BU({modelValue:{type:[Number,String,Array]},options:{type:Array,default:()=>[]},props:{type:Object,default:()=>({})}}),L0={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:xc,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},U0=e=>{if(!e)return 0;const t=e.id.split("-");return Number(t[t.length-2])},H0=e=>[...new Set(e)],P0=e=>e||0===e?Lc(e)?e:[e]:[],O0=hg({name:"ElCascaderPanel",components:{ElCascaderMenu:x0},props:{...N0,border:{type:Boolean,default:!0},renderLabel:Function},emits:[UU,HU,"close","expand-change"],setup(e,{emit:t,slots:i}){let n=!1;const s=KF("cascader"),r=(e=>qf((()=>({...L0,...e.props}))))(e);let a=null;const o=zh(!0),l=zh([]),A=zh(null),c=zh([]),u=zh(null),h=zh([]),d=qf((()=>"hover"===r.value.expandTrigger)),g=qf((()=>e.renderLabel||i.default)),p=(e,t)=>{const i=r.value;(e=e||new T0({},i,void 0,!0)).loading=!0;i.lazyLoad(e,(i=>{const n=e,s=n.root?null:n;i&&(null==a||a.appendNodes(i,s)),n.loading=!1,n.loaded=!0,n.childrenData=n.childrenData||[],t&&t(i)}))},f=(e,i)=>{var n;const{level:s}=e,r=c.value.slice(0,s);let a;e.isLeaf?a=e.pathNodes[s-2]:(a=e,r.push(e.children)),(null==(n=u.value)?void 0:n.uid)!==(null==a?void 0:a.uid)&&(u.value=e,c.value=r,!i&&t("expand-change",(null==e?void 0:e.pathValues)||[]))},m=(e,i,s=!0)=>{const{checkStrictly:a,multiple:o}=r.value,l=h.value[0];n=!0,!o&&(null==l||l.doCheck(!1)),e.doCheck(i),B(),s&&!o&&!a&&t("close"),!s&&!o&&!a&&C(e)},C=e=>{e&&(e=e.parent,C(e),e&&f(e))},I=e=>null==a?void 0:a.getFlattedNodes(e),v=e=>{var t;return null==(t=I(e))?void 0:t.filter((e=>!1!==e.checked))},B=()=>{var e;const{checkStrictly:t,multiple:i}=r.value,n=((e,t)=>{const i=t.slice(0),n=i.map((e=>e.uid)),s=e.reduce(((e,t)=>{const s=n.indexOf(t.uid);return s>-1&&(e.push(t),i.splice(s,1),n.splice(s,1)),e}),[]);return s.push(...i),s})(h.value,v(!t)),s=n.map((e=>e.valueByOption));h.value=n,A.value=i?s:null!=(e=s[0])?e:null},y=(t=!1,i=!1)=>{const{modelValue:s}=e,{lazy:l,multiple:c,checkStrictly:u}=r.value,h=!u;var d;if(o.value&&!n&&(i||!WN(s,A.value)))if(l&&!t){const e=H0(null!=(d=P0(s))&&d.length?iR(d,qN):[]).map((e=>null==a?void 0:a.getNodeByValue(e))).filter((e=>!!e&&!e.loaded&&!e.loading));e.length?e.forEach((e=>{p(e,(()=>y(!1,i)))})):y(!0,i)}else{const e=c?P0(s):[s],t=H0(e.map((e=>null==a?void 0:a.getNodeByValue(e,h))));b(t,i),A.value=aN(s)}},b=(e,t=!0)=>{const{checkStrictly:i}=r.value,n=h.value,s=e.filter((e=>!!e&&(i||e.isLeaf))),o=null==a?void 0:a.getSameNode(u.value),l=t&&o||s[0];l?l.pathNodes.forEach((e=>f(e,!0))):u.value=null,n.forEach((e=>e.doCheck(!1))),Lh(s).forEach((e=>e.doCheck(!0))),h.value=s,Qd(E)},E=()=>{bL&&l.value.forEach((e=>{const t=null==e?void 0:e.$el;if(t){nH(t.querySelector(`.${s.namespace.value}-scrollbar__wrap`),t.querySelector(`.${s.b("node")}.${s.is("active")}`)||t.querySelector(`.${s.b("node")}.in-active-path`))}}))};return gp(Q0,Lh({config:r,expandingNode:u,checkedNodes:h,isHoverMenu:d,initialLoaded:o,renderLabelFn:g,lazyLoad:p,expandNode:f,handleCheckChange:m})),Pp([r,()=>e.options],(()=>{const{options:t}=e,i=r.value;n=!1,a=new R0(t,i),c.value=[a.getNodes()],i.lazy&&cL(e.options)?(o.value=!1,p(void 0,(e=>{e&&(a=new R0(e,i),c.value=[a.getNodes()]),o.value=!0,y(!1,!0)}))):y(!1,!0)}),{deep:!0,immediate:!0}),Pp((()=>e.modelValue),(()=>{n=!1,y()}),{deep:!0}),Pp((()=>A.value),(i=>{WN(i,e.modelValue)||(t(UU,i),t(HU,i))})),wg((()=>l.value=[])),Eg((()=>!cL(e.modelValue)&&y())),{ns:s,menuList:l,menus:c,checkedNodes:h,handleKeyDown:e=>{const t=e.target,{code:i}=e;switch(i){case zJ.up:case zJ.down:{e.preventDefault();const n=i===zJ.up?-1:1;EJ(bJ(t,n,`.${s.b("node")}[tabindex="-1"]`));break}case zJ.left:{e.preventDefault();const i=l.value[U0(t)-1],n=null==i?void 0:i.$el.querySelector(`.${s.b("node")}[aria-expanded="true"]`);EJ(n);break}case zJ.right:{e.preventDefault();const i=l.value[U0(t)+1],n=null==i?void 0:i.$el.querySelector(`.${s.b("node")}[tabindex="-1"]`);EJ(n);break}case zJ.enter:case zJ.numpadEnter:(e=>{if(!e)return;const t=e.querySelector("input");t?t.click():yJ(e)&&e.click()})(t)}},handleCheckChange:m,getFlattedNodes:I,getCheckedNodes:v,clearCheckedNodes:()=>{h.value.forEach((e=>e.doCheck(!1))),B(),c.value=c.value.slice(0,1),u.value=null,t("expand-change",[])},calculateCheckedValue:B,scrollToExpandingNode:E}}});var G0=KU(O0,[["render",function(e,t,i,n,s,r){const a=Mg("el-cascader-menu");return af(),cf("div",{class:pu([e.ns.b("panel"),e.ns.is("bordered",e.border)]),onKeydown:e.handleKeyDown},[(af(!0),cf(Zp,null,Pg(e.menus,((t,i)=>(af(),uf(a,{key:i,ref_for:!0,ref:t=>e.menuList[i]=t,index:i,nodes:[...t]},{empty:Nd((()=>[Gg(e.$slots,"empty")])),_:2},1032,["index","nodes"])))),128))],42,["onKeydown"])}],["__file","index.vue"]]);const K0=lH(G0),q0=BU({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:yU},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),Y0={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},V0=hg({...hg({name:"ElTag"}),props:q0,emits:Y0,setup(e,{emit:t}){const i=e,n=Vj(),s=KF("tag"),r=qf((()=>{const{type:e,hit:t,effect:r,closable:a,round:o}=i;return[s.b(),s.is("closable",a),s.m(e||"primary"),s.m(n.value),s.m(r),s.is("hit",t),s.is("round",o)]})),a=e=>{t("close",e)},o=e=>{t("click",e)},l=e=>{var t,i,n;(null==(n=null==(i=null==(t=null==e?void 0:e.component)?void 0:t.subTree)?void 0:i.component)?void 0:n.bum)&&(e.component.subTree.component.bum=null)};return(e,t)=>e.disableTransitions?(af(),cf("span",{key:0,class:pu(ed(r)),style:cu({backgroundColor:e.color}),onClick:o},[ff("span",{class:pu(ed(s).e("content"))},[Gg(e.$slots,"default")],2),e.closable?(af(),uf(ed(gH),{key:0,class:pu(ed(s).e("close")),onClick:AC(a,["stop"])},{default:Nd((()=>[mf(ed(CO))])),_:1},8,["class","onClick"])):Bf("v-if",!0)],6)):(af(),uf(am,{key:1,name:`${ed(s).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:Nd((()=>[ff("span",{class:pu(ed(r)),style:cu({backgroundColor:e.color}),onClick:o},[ff("span",{class:pu(ed(s).e("content"))},[Gg(e.$slots,"default")],2),e.closable?(af(),uf(ed(gH),{key:0,class:pu(ed(s).e("close")),onClick:AC(a,["stop"])},{default:Nd((()=>[mf(ed(CO))])),_:1},8,["class","onClick"])):Bf("v-if",!0)],6)])),_:3},8,["name"]))}});const W0=lH(KU(V0,[["__file","tag.vue"]])),j0=BU({...N0,size:bU,placeholder:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:{type:Function,default:(e,t)=>e.text.includes(t)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,maxCollapseTags:{type:Number,default:1},collapseTagsTooltip:{type:Boolean,default:!1},debounce:{type:Number,default:300},beforeFilter:{type:Function,default:()=>!0},placement:{type:String,values:hz,default:"bottom-start"},fallbackPlacements:{type:Array,default:["bottom-start","bottom","top-start","top","right","left"]},popperClass:{type:String,default:""},teleported:DX.teleported,tagType:{...q0.type,default:"info"},tagEffect:{...q0.effect,default:"light"},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...SU}),J0={[UU]:e=>!0,[HU]:e=>!0,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,visibleChange:e=>lL(e),expandChange:e=>!!e,removeTag:e=>!!e},z0=new Map;if(bL){let e;document.addEventListener("mousedown",(t=>e=t)),document.addEventListener("mouseup",(t=>{if(e){for(const i of z0.values())for(const{documentHandler:n}of i)n(t,e);e=void 0}}))}function X0(e,t){let i=[];return Lc(t.arg)?i=t.arg:uL(t.arg)&&i.push(t.arg),function(n,s){const r=t.instance.popperRef,a=n.target,o=null==s?void 0:s.target,l=!t||!t.instance,A=!a||!o,c=e.contains(a)||e.contains(o),u=e===a,h=i.length&&i.some((e=>null==e?void 0:e.contains(a)))||i.length&&i.includes(o),d=r&&(r.contains(a)||r.contains(o));l||A||c||u||h||d||t.value(n,s)}}const $0={beforeMount(e,t){z0.has(e)||z0.set(e,[]),z0.get(e).push({documentHandler:X0(e,t),bindingFn:t.value})},updated(e,t){z0.has(e)||z0.set(e,[]);const i=z0.get(e),n=i.findIndex((e=>e.bindingFn===t.oldValue)),s={documentHandler:X0(e,t),bindingFn:t.value};n>=0?i.splice(n,1,s):i.push(s)},unmounted(e){z0.delete(e)}},Z0=hg({...hg({name:"ElCascader"}),props:j0,emits:J0,setup(e,{expose:t,emit:i}){const n=e,s={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:e})=>{const{modifiersData:t,placement:i}=e;["right","left","bottom","top"].includes(i)||(t.arrow.x=35)},requires:["arrow"]}]},r=Jg();let a=0,o=0;const l=KF("cascader"),A=KF("input"),{t:c}=CU(),{form:u,formItem:h}=Kj(),{valueOnClear:d}=xU(n),{isComposing:g,handleComposition:p}=Jj({afterComposition(e){var t;const i=null==(t=e.target)?void 0:t.value;ue(i)}}),f=zh(null),m=zh(null),C=zh(null),I=zh(null),v=zh(null),B=zh(!1),y=zh(!1),b=zh(!1),E=zh(!1),w=zh(""),Q=zh(""),_=zh([]),S=zh([]),x=zh([]),k=qf((()=>r.style)),D=qf((()=>n.disabled||(null==u?void 0:u.disabled))),F=qf((()=>n.placeholder||c("el.cascader.placeholder"))),T=qf((()=>Q.value||_.value.length>0||g.value?"":F.value)),M=Vj(),R=qf((()=>"small"===M.value?"small":"default")),N=qf((()=>!!n.props.multiple)),L=qf((()=>!n.filterable||N.value)),U=qf((()=>N.value?Q.value:w.value)),H=qf((()=>{var e;return(null==(e=I.value)?void 0:e.checkedNodes)||[]})),P=qf((()=>!(!n.clearable||D.value||b.value||!y.value)&&!!H.value.length)),O=qf((()=>{const{showAllLevels:e,separator:t}=n,i=H.value;return i.length?N.value?"":i[0].calcText(e,t):""})),G=qf((()=>(null==h?void 0:h.validateState)||"")),K=qf({get:()=>aN(n.modelValue),set(e){const t=null!=e?e:d.value;i(UU,t),i(HU,t),n.validateEvent&&(null==h||h.validate("change").catch((e=>{})))}}),q=qf((()=>[l.b(),l.m(M.value),l.is("disabled",D.value),r.class])),Y=qf((()=>[A.e("icon"),"icon-arrow-down",l.is("reverse",B.value)])),V=qf((()=>l.is("focus",B.value||E.value))),W=qf((()=>{var e,t;return null==(t=null==(e=f.value)?void 0:e.popperRef)?void 0:t.contentRef})),j=e=>{var t,s,r;D.value||(e=null!=e?e:!B.value)!==B.value&&(B.value=e,null==(s=null==(t=m.value)?void 0:t.input)||s.setAttribute("aria-expanded",`${e}`),e?(J(),Qd(null==(r=I.value)?void 0:r.scrollToExpandingNode)):n.filterable&&re(),i("visibleChange",e))},J=()=>{Qd((()=>{var e;null==(e=f.value)||e.updatePopper()}))},z=()=>{b.value=!1},X=e=>{const{showAllLevels:t,separator:i}=n;return{node:e,key:e.uid,text:e.calcText(t,i),hitState:!1,closable:!D.value&&!e.isDisabled,isCollapseTag:!1}},$=e=>{var t;const n=e.node;n.doCheck(!1),null==(t=I.value)||t.calculateCheckedValue(),i("removeTag",n.valueByOption)},Z=()=>{var e,t;const{filterMethod:i,showAllLevels:s,separator:r}=n,a=null==(t=null==(e=I.value)?void 0:e.getFlattedNodes(!n.props.checkStrictly))?void 0:t.filter((e=>!e.isDisabled&&(e.calcText(s,r),i(e,U.value))));N.value&&(_.value.forEach((e=>{e.hitState=!1})),S.value.forEach((e=>{e.hitState=!1}))),b.value=!0,x.value=a,J()},ee=()=>{var e;let t;t=b.value&&v.value?v.value.$el.querySelector(`.${l.e("suggestion-item")}`):null==(e=I.value)?void 0:e.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`),t&&(t.focus(),!b.value&&t.click())},te=()=>{var e,t;const i=null==(e=m.value)?void 0:e.input,n=C.value,s=null==(t=v.value)?void 0:t.$el;if(bL&&i){if(s){s.querySelector(`.${l.e("suggestion-list")}`).style.minWidth=`${i.offsetWidth}px`}if(n){const{offsetHeight:e}=n,t=_.value.length>0?Math.max(e,a)-2+"px":`${a}px`;i.style.height=t,J()}}},ie=e=>{J(),i("expandChange",e)},ne=e=>{if(!g.value)switch(e.code){case zJ.enter:case zJ.numpadEnter:j();break;case zJ.down:j(!0),Qd(ee),e.preventDefault();break;case zJ.esc:!0===B.value&&(e.preventDefault(),e.stopPropagation(),j(!1));break;case zJ.tab:j(!1)}},se=()=>{var e;null==(e=I.value)||e.clearCheckedNodes(),!B.value&&n.filterable&&re(),j(!1),i("clear")},re=()=>{const{value:e}=O;w.value=e,Q.value=e},ae=e=>{const t=e.target,{code:i}=e;switch(i){case zJ.up:case zJ.down:{const e=i===zJ.up?-1:1;EJ(bJ(t,e,`.${l.e("suggestion-item")}[tabindex="-1"]`));break}case zJ.enter:case zJ.numpadEnter:t.click()}},oe=()=>{const e=_.value,t=e[e.length-1];o=Q.value?0:o+1,!t||!o||n.collapseTags&&e.length>1||(t.hitState?$(t):t.hitState=!0)},le=e=>{const t=e.target,n=l.e("search-input");t.className===n&&(E.value=!0),i("focus",e)},Ae=e=>{E.value=!1,i("blur",e)},ce=RN((()=>{const{value:e}=U;if(!e)return;const t=n.beforeFilter(e);Yc(t)?t.then(Z).catch((()=>{})):!1!==t?Z():z()}),n.debounce),ue=(e,t)=>{!B.value&&j(!0),(null==t?void 0:t.isComposing)||(e?ce():z())},he=e=>Number.parseFloat(function(e,t,{window:i=NL,initialValue:n=""}={}){const s=zh(n),r=qf((()=>{var e;return RL(t)||(null==(e=null==i?void 0:i.document)?void 0:e.documentElement)}));return Pp([r,()=>_L(e)],(([e,t])=>{var r;if(e&&i){const a=null==(r=i.getComputedStyle(e).getPropertyValue(t))?void 0:r.trim();s.value=a||n}}),{immediate:!0}),Pp(s,(t=>{var i;(null==(i=r.value)?void 0:i.style)&&r.value.style.setProperty(_L(e),t)})),s}(A.cssVarName("input-height"),e).value)-2;return Pp(b,J),Pp([H,D,()=>n.collapseTags],(()=>{if(!N.value)return;const e=H.value,t=[],i=[];if(e.forEach((e=>i.push(X(e)))),S.value=i,e.length){e.slice(0,n.maxCollapseTags).forEach((e=>t.push(X(e))));const i=e.slice(n.maxCollapseTags),s=i.length;s&&(n.collapseTags?t.push({key:-1,text:`+ ${s}`,closable:!1,isCollapseTag:!0}):i.forEach((e=>t.push(X(e)))))}_.value=t})),Pp(_,(()=>{Qd((()=>te()))})),Pp(M,(async()=>{await Qd();const e=m.value.input;a=he(e)||a,te()})),Pp(O,re,{immediate:!0}),Eg((()=>{const e=m.value.input,t=he(e);a=e.offsetHeight||t,WL(e,te)})),t({getCheckedNodes:e=>{var t;return null==(t=I.value)?void 0:t.getCheckedNodes(e)},cascaderPanelRef:I,togglePopperVisible:j,contentRef:W,presentText:O}),(e,t)=>(af(),uf(ed(XX),{ref_key:"tooltipRef",ref:f,visible:B.value,teleported:e.teleported,"popper-class":[ed(l).e("dropdown"),e.popperClass],"popper-options":s,"fallback-placements":e.fallbackPlacements,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:e.placement,transition:`${ed(l).namespace.value}-zoom-in-top`,effect:"light",pure:"",persistent:e.persistent,onHide:z},{default:Nd((()=>[Ld((af(),cf("div",{class:pu(ed(q)),style:cu(ed(k)),onClick:()=>j(!ed(L)||void 0),onKeydown:ne,onMouseenter:e=>y.value=!0,onMouseleave:e=>y.value=!1},[mf(ed(Xj),{ref_key:"input",ref:m,modelValue:w.value,"onUpdate:modelValue":e=>w.value=e,placeholder:ed(T),readonly:ed(L),disabled:ed(D),"validate-event":!1,size:ed(M),class:pu(ed(V)),tabindex:ed(N)&&e.filterable&&!ed(D)?-1:void 0,onCompositionstart:ed(p),onCompositionupdate:ed(p),onCompositionend:ed(p),onFocus:le,onBlur:Ae,onInput:ue},{suffix:Nd((()=>[ed(P)?(af(),uf(ed(gH),{key:"clear",class:pu([ed(A).e("icon"),"icon-circle-close"]),onClick:AC(se,["stop"])},{default:Nd((()=>[mf(ed(lO))])),_:1},8,["class","onClick"])):(af(),uf(ed(gH),{key:"arrow-down",class:pu(ed(Y)),onClick:AC((e=>j()),["stop"])},{default:Nd((()=>[mf(ed(QH))])),_:1},8,["class","onClick"]))])),_:1},8,["modelValue","onUpdate:modelValue","placeholder","readonly","disabled","size","class","tabindex","onCompositionstart","onCompositionupdate","onCompositionend"]),ed(N)?(af(),cf("div",{key:0,ref_key:"tagWrapper",ref:C,class:pu([ed(l).e("tags"),ed(l).is("validate",Boolean(ed(G)))])},[(af(!0),cf(Zp,null,Pg(_.value,(t=>(af(),uf(ed(W0),{key:t.key,type:e.tagType,size:ed(R),effect:e.tagEffect,hit:t.hitState,closable:t.closable,"disable-transitions":"",onClose:e=>$(t)},{default:Nd((()=>[!1===t.isCollapseTag?(af(),cf("span",{key:0},yu(t.text),1)):(af(),uf(ed(XX),{key:1,disabled:B.value||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom",effect:"light"},{default:Nd((()=>[ff("span",null,yu(t.text),1)])),content:Nd((()=>[ff("div",{class:pu(ed(l).e("collapse-tags"))},[(af(!0),cf(Zp,null,Pg(S.value.slice(e.maxCollapseTags),((t,i)=>(af(),cf("div",{key:i,class:pu(ed(l).e("collapse-tag"))},[(af(),uf(ed(W0),{key:t.key,class:"in-tooltip",type:e.tagType,size:ed(R),effect:e.tagEffect,hit:t.hitState,closable:t.closable,"disable-transitions":"",onClose:e=>$(t)},{default:Nd((()=>[ff("span",null,yu(t.text),1)])),_:2},1032,["type","size","effect","hit","closable","onClose"]))],2)))),128))],2)])),_:2},1032,["disabled"]))])),_:2},1032,["type","size","effect","hit","closable","onClose"])))),128)),e.filterable&&!ed(D)?Ld((af(),cf("input",{key:0,"onUpdate:modelValue":e=>Q.value=e,type:"text",class:pu(ed(l).e("search-input")),placeholder:ed(O)?"":ed(F),onInput:e=>ue(Q.value,e),onClick:AC((e=>j(!0)),["stop"]),onKeydown:uC(oe,["delete"]),onCompositionstart:ed(p),onCompositionupdate:ed(p),onCompositionend:ed(p),onFocus:le,onBlur:Ae},null,42,["onUpdate:modelValue","placeholder","onInput","onClick","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend"])),[[tC,Q.value]]):Bf("v-if",!0)],2)):Bf("v-if",!0)],46,["onClick","onMouseenter","onMouseleave"])),[[ed($0),()=>j(!1),ed(W)]])])),content:Nd((()=>[Ld(mf(ed(K0),{ref_key:"cascaderPanelRef",ref:I,modelValue:ed(K),"onUpdate:modelValue":e=>Jh(K)?K.value=e:null,options:e.options,props:n.props,border:!1,"render-label":e.$slots.default,onExpandChange:ie,onClose:t=>e.$nextTick((()=>j(!1)))},{empty:Nd((()=>[Gg(e.$slots,"empty")])),_:3},8,["modelValue","onUpdate:modelValue","options","props","render-label","onClose"]),[[ym,!b.value]]),e.filterable?Ld((af(),uf(ed(lJ),{key:0,ref_key:"suggestionPanel",ref:v,tag:"ul",class:pu(ed(l).e("suggestion-panel")),"view-class":ed(l).e("suggestion-list"),onKeydown:ae},{default:Nd((()=>[x.value.length?(af(!0),cf(Zp,{key:0},Pg(x.value,(e=>(af(),cf("li",{key:e.uid,class:pu([ed(l).e("suggestion-item"),ed(l).is("checked",e.checked)]),tabindex:-1,onClick:t=>(e=>{var t,i;const{checked:n}=e;N.value?null==(t=I.value)||t.handleCheckChange(e,!n,!1):(!n&&(null==(i=I.value)||i.handleCheckChange(e,!0,!1)),j(!1))})(e)},[ff("span",null,yu(e.text),1),e.checked?(af(),uf(ed(gH),{key:0},{default:Nd((()=>[mf(ed(VP))])),_:1})):Bf("v-if",!0)],10,["onClick"])))),128)):Gg(e.$slots,"empty",{key:1},(()=>[ff("li",{class:pu(ed(l).e("empty-text"))},yu(ed(c)("el.cascader.noMatch")),3)]))])),_:3},8,["class","view-class"])),[[ym,b.value]]):Bf("v-if",!0)])),_:3},8,["visible","teleported","popper-class","fallback-placements","placement","transition","persistent"]))}});const e1=lH(KU(Z0,[["__file","cascader.vue"]])),t1=BU({checked:Boolean,disabled:Boolean,type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"}}),i1={"update:checked":e=>lL(e),[HU]:e=>lL(e)},n1=hg({...hg({name:"ElCheckTag"}),props:t1,emits:i1,setup(e,{emit:t}){const i=e,n=KF("check-tag"),s=qf((()=>i.disabled)),r=qf((()=>[n.b(),n.is("checked",i.checked),n.is("disabled",s.value),n.m(i.type||"primary")])),a=()=>{if(s.value)return;const e=!i.checked;t(HU,e),t("update:checked",e)};return(e,t)=>(af(),cf("span",{class:pu(ed(r)),onClick:a},[Gg(e.$slots,"default")],2))}});const s1=lH(KU(n1,[["__file","check-tag.vue"]])),r1=BU({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:[Number,Object],default:()=>({})},sm:{type:[Number,Object],default:()=>({})},md:{type:[Number,Object],default:()=>({})},lg:{type:[Number,Object],default:()=>({})},xl:{type:[Number,Object],default:()=>({})}}),a1=Symbol("rowContextKey"),o1=hg({...hg({name:"ElCol"}),props:r1,setup(e){const t=e,{gutter:i}=pp(a1,{gutter:qf((()=>0))}),n=KF("col"),s=qf((()=>{const e={};return i.value&&(e.paddingLeft=e.paddingRight=i.value/2+"px"),e})),r=qf((()=>{const e=[];["span","offset","pull","push"].forEach((i=>{const s=t[i];AL(s)&&("span"===i?e.push(n.b(`${t[i]}`)):s>0&&e.push(n.b(`${i}-${t[i]}`)))}));return["xs","sm","md","lg","xl"].forEach((i=>{AL(t[i])?e.push(n.b(`${i}-${t[i]}`)):qc(t[i])&&Object.entries(t[i]).forEach((([t,s])=>{e.push("span"!==t?n.b(`${i}-${t}-${s}`):n.b(`${i}-${s}`))}))})),i.value&&e.push(n.is("guttered")),[n.b(),e]}));return(e,t)=>(af(),uf(Ng(e.tag),{class:pu(ed(r)),style:cu(ed(s))},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["class","style"]))}});const l1=lH(KU(o1,[["__file","col.vue"]])),A1=e=>AL(e)||Gc(e)||Lc(e),c1=BU({accordion:Boolean,modelValue:{type:[Array,String,Number],default:()=>[]}}),u1={[UU]:A1,[HU]:A1},h1=Symbol("collapseContextKey"),d1=hg({...hg({name:"ElCollapse"}),props:c1,emits:u1,setup(e,{expose:t,emit:i}){const n=e,{activeNames:s,setActiveNames:r}=((e,t)=>{const i=zh(hR(e.modelValue)),n=n=>{i.value=n;const s=e.accordion?i.value[0]:i.value;t(UU,s),t(HU,s)};return Pp((()=>e.modelValue),(()=>i.value=hR(e.modelValue)),{deep:!0}),gp(h1,{activeNames:i,handleItemClick:t=>{if(e.accordion)n([i.value[0]===t?"":t]);else{const e=[...i.value],s=e.indexOf(t);s>-1?e.splice(s,1):e.push(t),n(e)}}}),{activeNames:i,setActiveNames:n}})(n,i),{rootKls:a}=(()=>{const e=KF("collapse");return{rootKls:qf((()=>e.b()))}})();return t({activeNames:s,setActiveNames:r}),(e,t)=>(af(),cf("div",{class:pu(ed(a))},[Gg(e.$slots,"default")],2))}});var g1=KU(d1,[["__file","collapse.vue"]]);const p1=lH(KU(hg({...hg({name:"ElCollapseTransition"}),setup(e){const t=KF("collapse-transition"),i=e=>{e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom},n={beforeEnter(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height&&(e.dataset.elExistsHeight=e.style.height),e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0},enter(e){requestAnimationFrame((()=>{e.dataset.oldOverflow=e.style.overflow,e.dataset.elExistsHeight?e.style.maxHeight=e.dataset.elExistsHeight:0!==e.scrollHeight?e.style.maxHeight=`${e.scrollHeight}px`:e.style.maxHeight=0,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom,e.style.overflow="hidden"}))},afterEnter(e){e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow},enterCancelled(e){i(e)},beforeLeave(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},leave(e){0!==e.scrollHeight&&(e.style.maxHeight=0,e.style.paddingTop=0,e.style.paddingBottom=0)},afterLeave(e){i(e)},leaveCancelled(e){i(e)}};return(e,i)=>(af(),uf(am,wf({name:ed(t).b()},function(e){const t={};for(const i in e)t[nu(i)]=e[i];return t}(n)),{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},16,["name"]))}}),[["__file","collapse-transition.vue"]])),f1=BU({title:{type:String,default:""},name:{type:[String,Number],default:void 0},icon:{type:fj,default:MH},disabled:Boolean}),m1=hg({...hg({name:"ElCollapseItem"}),props:f1,setup(e,{expose:t}){const i=e,{focusing:n,id:s,isActive:r,handleFocus:a,handleHeaderClick:o,handleEnterClick:l}=(e=>{const t=pp(h1),{namespace:i}=KF("collapse"),n=zh(!1),s=zh(!1),r=Oj(),a=qf((()=>r.current++)),o=qf((()=>{var t;return null!=(t=e.name)?t:`${i.value}-id-${r.prefix}-${ed(a)}`})),l=qf((()=>null==t?void 0:t.activeNames.value.includes(ed(o))));return{focusing:n,id:a,isActive:l,handleFocus:()=>{setTimeout((()=>{s.value?s.value=!1:n.value=!0}),50)},handleHeaderClick:()=>{e.disabled||(null==t||t.handleItemClick(ed(o)),n.value=!1,s.value=!0)},handleEnterClick:()=>{null==t||t.handleItemClick(ed(o))}}})(i),{arrowKls:A,headKls:c,rootKls:u,itemWrapperKls:h,itemContentKls:d,scopedContentId:g,scopedHeadId:p}=((e,{focusing:t,isActive:i,id:n})=>{const s=KF("collapse"),r=qf((()=>[s.b("item"),s.is("active",ed(i)),s.is("disabled",e.disabled)])),a=qf((()=>[s.be("item","header"),s.is("active",ed(i)),{focusing:ed(t)&&!e.disabled}]));return{arrowKls:qf((()=>[s.be("item","arrow"),s.is("active",ed(i))])),headKls:a,rootKls:r,itemWrapperKls:qf((()=>s.be("item","wrap"))),itemContentKls:qf((()=>s.be("item","content"))),scopedContentId:qf((()=>s.b(`content-${ed(n)}`))),scopedHeadId:qf((()=>s.b(`head-${ed(n)}`)))}})(i,{focusing:n,isActive:r,id:s});return t({isActive:r}),(e,t)=>(af(),cf("div",{class:pu(ed(u))},[ff("button",{id:ed(p),class:pu(ed(c)),"aria-expanded":ed(r),"aria-controls":ed(g),"aria-describedby":ed(g),tabindex:e.disabled?-1:0,type:"button",onClick:ed(o),onKeydown:uC(AC(ed(l),["stop","prevent"]),["space","enter"]),onFocus:ed(a),onBlur:e=>n.value=!1},[Gg(e.$slots,"title",{},(()=>[vf(yu(e.title),1)])),Gg(e.$slots,"icon",{isActive:ed(r)},(()=>[mf(ed(gH),{class:pu(ed(A))},{default:Nd((()=>[(af(),uf(Ng(e.icon)))])),_:1},8,["class"])]))],42,["id","aria-expanded","aria-controls","aria-describedby","tabindex","onClick","onKeydown","onFocus","onBlur"]),mf(ed(p1),null,{default:Nd((()=>[Ld(ff("div",{id:ed(g),role:"region",class:pu(ed(h)),"aria-hidden":!ed(r),"aria-labelledby":ed(p)},[ff("div",{class:pu(ed(d))},[Gg(e.$slots,"default")],2)],10,["id","aria-hidden","aria-labelledby"]),[[ym,ed(r)]])])),_:3})],2))}});var C1=KU(m1,[["__file","collapse-item.vue"]]);const I1=lH(g1,{CollapseItem:C1}),v1=cH(C1),B1=BU({color:{type:Object,required:!0},vertical:{type:Boolean,default:!1}});let y1=!1;function b1(e,t){if(!bL)return;const i=function(e){var i;null==(i=t.drag)||i.call(t,e)},n=function(e){var s;document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",n),document.onselectstart=null,document.ondragstart=null,y1=!1,null==(s=t.end)||s.call(t,e)},s=function(e){var s;y1||(e.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",i),document.addEventListener("mouseup",n),document.addEventListener("touchmove",i),document.addEventListener("touchend",n),y1=!0,null==(s=t.start)||s.call(t,e))};e.addEventListener("mousedown",s),e.addEventListener("touchstart",s,{passive:!1})}const E1=e=>{let t=0,i=e;for(;i;)t+=i.offsetTop,i=i.offsetParent;return t},w1=(e,t)=>Math.abs(E1(e)-E1(t)),Q1=e=>{let t,i;return"touchend"===e.type?(i=e.changedTouches[0].clientY,t=e.changedTouches[0].clientX):e.type.startsWith("touch")?(i=e.touches[0].clientY,t=e.touches[0].clientX):(i=e.clientY,t=e.clientX),{clientX:t,clientY:i}},_1=(e,{bar:t,thumb:i,handleDrag:n})=>{const s=kf(),r=KF("color-alpha-slider"),a=zh(0),o=zh(0),l=zh();function A(){a.value=function(){if(!i.value)return 0;if(e.vertical)return 0;const t=s.vnode.el,n=e.color.get("alpha");return t?Math.round(n*(t.offsetWidth-i.value.offsetWidth/2)/100):0}(),o.value=function(){if(!i.value)return 0;const t=s.vnode.el;if(!e.vertical)return 0;const n=e.color.get("alpha");return t?Math.round(n*(t.offsetHeight-i.value.offsetHeight/2)/100):0}(),l.value=function(){if(e.color&&e.color.value){const{r:t,g:i,b:n}=e.color.toRgb();return`linear-gradient(to right, rgba(${t}, ${i}, ${n}, 0) 0%, rgba(${t}, ${i}, ${n}, 1) 100%)`}return""}()}Eg((()=>{if(!t.value||!i.value)return;const e={drag:e=>{n(e)},end:e=>{n(e)}};b1(t.value,e),b1(i.value,e),A()})),Pp((()=>e.color.get("alpha")),(()=>A())),Pp((()=>e.color.value),(()=>A()));const c=qf((()=>[r.b(),r.is("vertical",e.vertical)])),u=qf((()=>r.e("bar"))),h=qf((()=>r.e("thumb")));return{rootKls:c,barKls:u,barStyle:qf((()=>({background:l.value}))),thumbKls:h,thumbStyle:qf((()=>({left:$U(a.value),top:$U(o.value)}))),update:A}},S1=hg({...hg({name:"ElColorAlphaSlider"}),props:B1,setup(e,{expose:t}){const i=e,{alpha:n,alphaLabel:s,bar:r,thumb:a,handleDrag:o,handleClick:l,handleKeydown:A}=(e=>{const t=kf(),{t:i}=CU(),n=Xh(),s=Xh(),r=qf((()=>e.color.get("alpha"))),a=qf((()=>i("el.colorpicker.alphaLabel")));function o(i){if(!s.value||!n.value)return;const r=t.vnode.el.getBoundingClientRect(),{clientX:a,clientY:o}=Q1(i);if(e.vertical){let t=o-r.top;t=Math.max(n.value.offsetHeight/2,t),t=Math.min(t,r.height-n.value.offsetHeight/2),e.color.set("alpha",Math.round((t-n.value.offsetHeight/2)/(r.height-n.value.offsetHeight)*100))}else{let t=a-r.left;t=Math.max(n.value.offsetWidth/2,t),t=Math.min(t,r.width-n.value.offsetWidth/2),e.color.set("alpha",Math.round((t-n.value.offsetWidth/2)/(r.width-n.value.offsetWidth)*100))}}function l(t){let i=r.value+t;i=i<0?0:i>100?100:i,e.color.set("alpha",i)}return{thumb:n,bar:s,alpha:r,alphaLabel:a,handleDrag:o,handleClick:function(e){var t;e.target!==n.value&&o(e),null==(t=n.value)||t.focus()},handleKeydown:function(e){const{code:t,shiftKey:i}=e,n=i?10:1;switch(t){case zJ.left:case zJ.down:e.preventDefault(),e.stopPropagation(),l(-n);break;case zJ.right:case zJ.up:e.preventDefault(),e.stopPropagation(),l(n)}}}})(i),{rootKls:c,barKls:u,barStyle:h,thumbKls:d,thumbStyle:g,update:p}=_1(i,{bar:r,thumb:a,handleDrag:o});return t({update:p,bar:r,thumb:a}),(e,t)=>(af(),cf("div",{class:pu(ed(c))},[ff("div",{ref_key:"bar",ref:r,class:pu(ed(u)),style:cu(ed(h)),onClick:ed(l)},null,14,["onClick"]),ff("div",{ref_key:"thumb",ref:a,class:pu(ed(d)),style:cu(ed(g)),"aria-label":ed(s),"aria-valuenow":ed(n),"aria-orientation":e.vertical?"vertical":"horizontal","aria-valuemin":"0","aria-valuemax":"100",role:"slider",tabindex:"0",onKeydown:ed(A)},null,46,["aria-label","aria-valuenow","aria-orientation","onKeydown"])],2))}});var x1=KU(S1,[["__file","alpha-slider.vue"]]);const k1=hg({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=KF("color-hue-slider"),i=kf(),n=zh(),s=zh(),r=zh(0),a=zh(0),o=qf((()=>e.color.get("hue")));function l(t){if(!s.value||!n.value)return;const r=i.vnode.el.getBoundingClientRect(),{clientX:a,clientY:o}=Q1(t);let l;if(e.vertical){let e=o-r.top;e=Math.min(e,r.height-n.value.offsetHeight/2),e=Math.max(n.value.offsetHeight/2,e),l=Math.round((e-n.value.offsetHeight/2)/(r.height-n.value.offsetHeight)*360)}else{let e=a-r.left;e=Math.min(e,r.width-n.value.offsetWidth/2),e=Math.max(n.value.offsetWidth/2,e),l=Math.round((e-n.value.offsetWidth/2)/(r.width-n.value.offsetWidth)*360)}e.color.set("hue",l)}function A(){r.value=function(){if(!n.value)return 0;const t=i.vnode.el;if(e.vertical)return 0;const s=e.color.get("hue");return t?Math.round(s*(t.offsetWidth-n.value.offsetWidth/2)/360):0}(),a.value=function(){if(!n.value)return 0;const t=i.vnode.el;if(!e.vertical)return 0;const s=e.color.get("hue");return t?Math.round(s*(t.offsetHeight-n.value.offsetHeight/2)/360):0}()}return Pp((()=>o.value),(()=>{A()})),Eg((()=>{if(!s.value||!n.value)return;const e={drag:e=>{l(e)},end:e=>{l(e)}};b1(s.value,e),b1(n.value,e),A()})),{bar:s,thumb:n,thumbLeft:r,thumbTop:a,hueValue:o,handleClick:function(e){e.target!==n.value&&l(e)},update:A,ns:t}}});var D1=KU(k1,[["render",function(e,t,i,n,s,r){return af(),cf("div",{class:pu([e.ns.b(),e.ns.is("vertical",e.vertical)])},[ff("div",{ref:"bar",class:pu(e.ns.e("bar")),onClick:e.handleClick},null,10,["onClick"]),ff("div",{ref:"thumb",class:pu(e.ns.e("thumb")),style:cu({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}],["__file","hue-slider.vue"]]);const F1=BU({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:bU,popperClass:{type:String,default:""},tabindex:{type:[String,Number],default:0},teleported:DX.teleported,predefine:{type:Array},validateEvent:{type:Boolean,default:!0},...Dj(["ariaLabel"])}),T1={[UU]:e=>Gc(e)||jN(e),[HU]:e=>Gc(e)||jN(e),activeChange:e=>Gc(e)||jN(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},M1=Symbol("colorPickerContextKey"),R1=function(e,t,i){return[e,t*i/((e=(2-t)*i)<1?e:2-e)||0,e/2]},N1=function(e,t){var i;Gc(i=e)&&i.includes(".")&&1===Number.parseFloat(i)&&(e="100%");const n=function(e){return Gc(e)&&e.includes("%")}(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),n&&(e=Number.parseInt(""+e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},L1={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},U1=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),i=e%16;return`${L1[t]||t}${L1[i]||i}`},H1=function({r:e,g:t,b:i}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+i)?"":`#${U1(e)}${U1(t)}${U1(i)}`},P1={A:10,B:11,C:12,D:13,E:14,F:15},O1=function(e){return 2===e.length?16*(P1[e[0].toUpperCase()]||+e[0])+(P1[e[1].toUpperCase()]||+e[1]):P1[e[1].toUpperCase()]||+e[1]},G1=(e,t,i)=>{e=N1(e,255),t=N1(t,255),i=N1(i,255);const n=Math.max(e,t,i),s=Math.min(e,t,i);let r;const a=n,o=n-s,l=0===n?0:o/n;if(n===s)r=0;else{switch(n){case e:r=(t-i)/o+(t<i?6:0);break;case t:r=(i-e)/o+2;break;case i:r=(e-t)/o+4}r/=6}return{h:360*r,s:100*l,v:100*a}},K1=function(e,t,i){e=6*N1(e,360),t=N1(t,100),i=N1(i,100);const n=Math.floor(e),s=e-n,r=i*(1-t),a=i*(1-s*t),o=i*(1-(1-s)*t),l=n%6,A=[i,a,r,r,o,i][l],c=[o,i,i,a,r,r][l],u=[r,r,o,i,i,a][l];return{r:Math.round(255*A),g:Math.round(255*c),b:Math.round(255*u)}};let q1=class{constructor(e={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const t in e)Nc(e,t)&&(this[t]=e[t]);e.value?this.fromString(e.value):this.doOnChange()}set(e,t){if(1!==arguments.length||"object"!=typeof e)this[`_${e}`]=t,this.doOnChange();else for(const i in e)Nc(e,i)&&this.set(i,e[i])}get(e){return"alpha"===e?Math.floor(this[`_${e}`]):this[`_${e}`]}toRgb(){return K1(this._hue,this._saturation,this._value)}fromString(e){if(!e)return this._hue=0,this._saturation=100,this._value=100,void this.doOnChange();const t=(e,t,i)=>{this._hue=Math.max(0,Math.min(360,e)),this._saturation=Math.max(0,Math.min(100,t)),this._value=Math.max(0,Math.min(100,i)),this.doOnChange()};if(e.includes("hsl")){const i=e.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter((e=>""!==e)).map(((e,t)=>t>2?Number.parseFloat(e):Number.parseInt(e,10)));if(4===i.length?this._alpha=100*Number.parseFloat(i[3]):3===i.length&&(this._alpha=100),i.length>=3){const{h:e,s:n,v:s}=function(e,t,i){i/=100;let n=t/=100;const s=Math.max(i,.01);return t*=(i*=2)<=1?i:2-i,n*=s<=1?s:2-s,{h:e,s:100*(0===i?2*n/(s+n):2*t/(i+t)),v:(i+t)/2*100}}(i[0],i[1],i[2]);t(e,n,s)}}else if(e.includes("hsv")){const i=e.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter((e=>""!==e)).map(((e,t)=>t>2?Number.parseFloat(e):Number.parseInt(e,10)));4===i.length?this._alpha=100*Number.parseFloat(i[3]):3===i.length&&(this._alpha=100),i.length>=3&&t(i[0],i[1],i[2])}else if(e.includes("rgb")){const i=e.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter((e=>""!==e)).map(((e,t)=>t>2?Number.parseFloat(e):Number.parseInt(e,10)));if(4===i.length?this._alpha=100*Number.parseFloat(i[3]):3===i.length&&(this._alpha=100),i.length>=3){const{h:e,s:n,v:s}=G1(i[0],i[1],i[2]);t(e,n,s)}}else if(e.includes("#")){const i=e.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(i))return;let n,s,r;3===i.length?(n=O1(i[0]+i[0]),s=O1(i[1]+i[1]),r=O1(i[2]+i[2])):6!==i.length&&8!==i.length||(n=O1(i.slice(0,2)),s=O1(i.slice(2,4)),r=O1(i.slice(4,6))),8===i.length?this._alpha=O1(i.slice(6))/255*100:3!==i.length&&6!==i.length||(this._alpha=100);const{h:a,s:o,v:l}=G1(n,s,r);t(a,o,l)}}compare(e){return Math.abs(e._hue-this._hue)<2&&Math.abs(e._saturation-this._saturation)<1&&Math.abs(e._value-this._value)<1&&Math.abs(e._alpha-this._alpha)<1}doOnChange(){const{_hue:e,_saturation:t,_value:i,_alpha:n,format:s}=this;if(this.enableAlpha)switch(s){case"hsl":{const n=R1(e,t/100,i/100);this.value=`hsla(${e}, ${Math.round(100*n[1])}%, ${Math.round(100*n[2])}%, ${this.get("alpha")/100})`;break}case"hsv":this.value=`hsva(${e}, ${Math.round(t)}%, ${Math.round(i)}%, ${this.get("alpha")/100})`;break;case"hex":this.value=`${H1(K1(e,t,i))}${U1(255*n/100)}`;break;default:{const{r:n,g:s,b:r}=K1(e,t,i);this.value=`rgba(${n}, ${s}, ${r}, ${this.get("alpha")/100})`}}else switch(s){case"hsl":{const n=R1(e,t/100,i/100);this.value=`hsl(${e}, ${Math.round(100*n[1])}%, ${Math.round(100*n[2])}%)`;break}case"hsv":this.value=`hsv(${e}, ${Math.round(t)}%, ${Math.round(i)}%)`;break;case"rgb":{const{r:n,g:s,b:r}=K1(e,t,i);this.value=`rgb(${n}, ${s}, ${r})`;break}default:this.value=H1(K1(e,t,i))}}};const Y1=hg({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0},enableAlpha:{type:Boolean,required:!0}},setup(e){const t=KF("color-predefine"),{currentColor:i}=pp(M1),n=zh(s(e.colors,e.color));function s(t,i){return t.map((t=>{const n=new q1;return n.enableAlpha=e.enableAlpha,n.format="rgba",n.fromString(t),n.selected=n.value===i.value,n}))}return Pp((()=>i.value),(e=>{const t=new q1;t.fromString(e),n.value.forEach((e=>{e.selected=t.compare(e)}))})),Hp((()=>{n.value=s(e.colors,e.color)})),{rgbaColors:n,handleSelect:function(t){e.color.fromString(e.colors[t])},ns:t}}});var V1=KU(Y1,[["render",function(e,t,i,n,s,r){return af(),cf("div",{class:pu(e.ns.b())},[ff("div",{class:pu(e.ns.e("colors"))},[(af(!0),cf(Zp,null,Pg(e.rgbaColors,((t,i)=>(af(),cf("div",{key:e.colors[i],class:pu([e.ns.e("color-selector"),e.ns.is("alpha",t._alpha<100),{selected:t.selected}]),onClick:t=>e.handleSelect(i)},[ff("div",{style:cu({backgroundColor:t.value})},null,4)],10,["onClick"])))),128))],2)],2)}],["__file","predefine.vue"]]);const W1=hg({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=KF("color-svpanel"),i=kf(),n=zh(0),s=zh(0),r=zh("hsl(0, 100%, 50%)"),a=qf((()=>({hue:e.color.get("hue"),value:e.color.get("value")})));function o(){const t=e.color.get("saturation"),a=e.color.get("value"),o=i.vnode.el,{clientWidth:l,clientHeight:A}=o;s.value=t*l/100,n.value=(100-a)*A/100,r.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function l(t){const r=i.vnode.el.getBoundingClientRect(),{clientX:a,clientY:o}=Q1(t);let l=a-r.left,A=o-r.top;l=Math.max(0,l),l=Math.min(l,r.width),A=Math.max(0,A),A=Math.min(A,r.height),s.value=l,n.value=A,e.color.set({saturation:l/r.width*100,value:100-A/r.height*100})}return Pp((()=>a.value),(()=>{o()})),Eg((()=>{b1(i.vnode.el,{drag:e=>{l(e)},end:e=>{l(e)}}),o()})),{cursorTop:n,cursorLeft:s,background:r,colorValue:a,handleDrag:l,update:o,ns:t}}});var j1=KU(W1,[["render",function(e,t,i,n,s,r){return af(),cf("div",{class:pu(e.ns.b()),style:cu({backgroundColor:e.background})},[ff("div",{class:pu(e.ns.e("white"))},null,2),ff("div",{class:pu(e.ns.e("black"))},null,2),ff("div",{class:pu(e.ns.e("cursor")),style:cu({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},[ff("div")],6)],6)}],["__file","sv-panel.vue"]]);const J1=hg({...hg({name:"ElColorPicker"}),props:F1,emits:T1,setup(e,{expose:t,emit:i}){const n=e,{t:s}=CU(),r=KF("color"),{formItem:a}=Kj(),o=Vj(),l=Wj(),{inputId:A,isLabeledByFormItem:c}=qj(n,{formItemContext:a}),u=zh(),h=zh(),d=zh(),g=zh(),p=zh(),f=zh(),{isFocused:m,handleFocus:C,handleBlur:I}=jj(p,{beforeFocus:()=>l.value,beforeBlur(e){var t;return null==(t=g.value)?void 0:t.isFocusInsideContent(e)},afterBlur(){k(!1),M()}});let v=!0;const B=Lh(new q1({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),y=zh(!1),b=zh(!1),E=zh(""),w=qf((()=>n.modelValue||b.value?function(e,t){if(!(e instanceof q1))throw new TypeError("color should be instance of _color Class");const{r:i,g:n,b:s}=e.toRgb();return t?`rgba(${i}, ${n}, ${s}, ${e.get("alpha")/100})`:`rgb(${i}, ${n}, ${s})`}(B,n.showAlpha):"transparent")),Q=qf((()=>n.modelValue||b.value?B.value:"")),_=qf((()=>c.value?void 0:n.ariaLabel||s("el.colorpicker.defaultLabel"))),S=qf((()=>c.value?null==a?void 0:a.labelId:void 0)),x=qf((()=>[r.b("picker"),r.is("disabled",l.value),r.bm("picker",o.value),r.is("focused",m.value)]));function k(e){y.value=e}const D=RN(k,100,{leading:!0});function F(){l.value||k(!0)}function T(){D(!1),M()}function M(){Qd((()=>{n.modelValue?B.fromString(n.modelValue):(B.value="",Qd((()=>{b.value=!1})))}))}function R(){l.value||D(!y.value)}function N(){B.fromString(E.value)}function L(){const e=B.value;i(UU,e),i("change",e),n.validateEvent&&(null==a||a.validate("change").catch((e=>{}))),D(!1),Qd((()=>{const e=new q1({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});B.compare(e)||M()}))}function U(){D(!1),i(UU,null),i("change",null),null!==n.modelValue&&n.validateEvent&&(null==a||a.validate("change").catch((e=>{}))),M()}function H(){y.value&&(T(),m.value&&G())}function P(e){e.preventDefault(),e.stopPropagation(),k(!1),M()}function O(e){switch(e.code){case zJ.enter:case zJ.numpadEnter:case zJ.space:e.preventDefault(),e.stopPropagation(),F(),f.value.focus();break;case zJ.esc:P(e)}}function G(){p.value.focus()}return Eg((()=>{n.modelValue&&(E.value=Q.value)})),Pp((()=>n.modelValue),(e=>{e?e&&e!==B.value&&(v=!1,B.fromString(e)):b.value=!1})),Pp((()=>[n.colorFormat,n.showAlpha]),(()=>{B.enableAlpha=n.showAlpha,B.format=n.colorFormat||B.format,B.doOnChange(),i(UU,B.value)})),Pp((()=>Q.value),(e=>{E.value=e,v&&i("activeChange",e),v=!0})),Pp((()=>B.value),(()=>{n.modelValue||b.value||(b.value=!0)})),Pp((()=>y.value),(()=>{Qd((()=>{var e,t,i;null==(e=u.value)||e.update(),null==(t=h.value)||t.update(),null==(i=d.value)||i.update()}))})),gp(M1,{currentColor:Q}),t({color:B,show:F,hide:T,focus:G,blur:function(){p.value.blur()}}),(e,t)=>(af(),uf(ed(XX),{ref_key:"popper",ref:g,visible:y.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[ed(r).be("picker","panel"),ed(r).b("dropdown"),e.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:e.teleported,transition:`${ed(r).namespace.value}-zoom-in-top`,persistent:"",onHide:e=>k(!1)},{content:Nd((()=>[Ld((af(),cf("div",{onKeydown:uC(P,["esc"])},[ff("div",{class:pu(ed(r).be("dropdown","main-wrapper"))},[mf(D1,{ref_key:"hue",ref:u,class:"hue-slider",color:ed(B),vertical:""},null,8,["color"]),mf(j1,{ref_key:"sv",ref:h,color:ed(B)},null,8,["color"])],2),e.showAlpha?(af(),uf(x1,{key:0,ref_key:"alpha",ref:d,color:ed(B)},null,8,["color"])):Bf("v-if",!0),e.predefine?(af(),uf(V1,{key:1,ref:"predefine","enable-alpha":e.showAlpha,color:ed(B),colors:e.predefine},null,8,["enable-alpha","color","colors"])):Bf("v-if",!0),ff("div",{class:pu(ed(r).be("dropdown","btns"))},[ff("span",{class:pu(ed(r).be("dropdown","value"))},[mf(ed(Xj),{ref_key:"inputRef",ref:f,modelValue:E.value,"onUpdate:modelValue":e=>E.value=e,"validate-event":!1,size:"small",onKeyup:uC(N,["enter"]),onBlur:N},null,8,["modelValue","onUpdate:modelValue","onKeyup"])],2),mf(ed(eZ),{class:pu(ed(r).be("dropdown","link-btn")),text:"",size:"small",onClick:U},{default:Nd((()=>[vf(yu(ed(s)("el.colorpicker.clear")),1)])),_:1},8,["class"]),mf(ed(eZ),{plain:"",size:"small",class:pu(ed(r).be("dropdown","btn")),onClick:L},{default:Nd((()=>[vf(yu(ed(s)("el.colorpicker.confirm")),1)])),_:1},8,["class"])],2)],40,["onKeydown"])),[[ed($0),H]])])),default:Nd((()=>[ff("div",wf({id:ed(A),ref_key:"triggerRef",ref:p},e.$attrs,{class:ed(x),role:"button","aria-label":ed(_),"aria-labelledby":ed(S),"aria-description":ed(s)("el.colorpicker.description",{color:e.modelValue||""}),"aria-disabled":ed(l),tabindex:ed(l)?-1:e.tabindex,onKeydown:O,onFocus:ed(C),onBlur:ed(I)}),[ed(l)?(af(),cf("div",{key:0,class:pu(ed(r).be("picker","mask"))},null,2)):Bf("v-if",!0),ff("div",{class:pu(ed(r).be("picker","trigger")),onClick:R},[ff("span",{class:pu([ed(r).be("picker","color"),ed(r).is("alpha",e.showAlpha)])},[ff("span",{class:pu(ed(r).be("picker","color-inner")),style:cu({backgroundColor:ed(w)})},[Ld(mf(ed(gH),{class:pu([ed(r).be("picker","icon"),ed(r).is("icon-arrow-down")])},{default:Nd((()=>[mf(ed(QH))])),_:1},8,["class"]),[[ym,e.modelValue||b.value]]),Ld(mf(ed(gH),{class:pu([ed(r).be("picker","empty"),ed(r).is("icon-close")])},{default:Nd((()=>[mf(ed(CO))])),_:1},8,["class"]),[[ym,!e.modelValue&&!b.value]])],6)],2)],2)],16,["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex","onFocus","onBlur"])])),_:1},8,["visible","popper-class","teleported","transition","onHide"]))}});const z1=lH(KU(J1,[["__file","color-picker.vue"]])),X1=BU({a11y:{type:Boolean,default:!0},locale:{type:Object},size:bU,button:{type:Object},experimentalFeatures:{type:Object},keyboardNavigation:{type:Boolean,default:!0},message:{type:Object},zIndex:Number,namespace:{type:String,default:"el"},...SU}),$1={},Z1=hg({name:"ElConfigProvider",props:X1,setup(e,{slots:t}){Pp((()=>e.message),(e=>{Object.assign($1,null!=e?e:{})}),{immediate:!0,deep:!0});const i=NU(e);return()=>Gg(t,"default",{config:null==i?void 0:i.value})}}),e2=lH(Z1),t2=hg({...hg({name:"ElContainer"}),props:{direction:{type:String}},setup(e){const t=e,i=jg(),n=KF("container"),s=qf((()=>{if("vertical"===t.direction)return!0;if("horizontal"===t.direction)return!1;if(i&&i.default){return i.default().some((e=>{const t=e.type.name;return"ElHeader"===t||"ElFooter"===t}))}return!1}));return(e,t)=>(af(),cf("section",{class:pu([ed(n).b(),ed(n).is("vertical",ed(s))])},[Gg(e.$slots,"default")],2))}});var i2=KU(t2,[["__file","container.vue"]]);const n2=hg({...hg({name:"ElAside"}),props:{width:{type:String,default:null}},setup(e){const t=e,i=KF("aside"),n=qf((()=>t.width?i.cssVarBlock({width:t.width}):{}));return(e,t)=>(af(),cf("aside",{class:pu(ed(i).b()),style:cu(ed(n))},[Gg(e.$slots,"default")],6))}});var s2=KU(n2,[["__file","aside.vue"]]);const r2=hg({...hg({name:"ElFooter"}),props:{height:{type:String,default:null}},setup(e){const t=e,i=KF("footer"),n=qf((()=>t.height?i.cssVarBlock({height:t.height}):{}));return(e,t)=>(af(),cf("footer",{class:pu(ed(i).b()),style:cu(ed(n))},[Gg(e.$slots,"default")],6))}});var a2=KU(r2,[["__file","footer.vue"]]);const o2=hg({...hg({name:"ElHeader"}),props:{height:{type:String,default:null}},setup(e){const t=e,i=KF("header"),n=qf((()=>t.height?i.cssVarBlock({height:t.height}):{}));return(e,t)=>(af(),cf("header",{class:pu(ed(i).b()),style:cu(ed(n))},[Gg(e.$slots,"default")],6))}});var l2=KU(o2,[["__file","header.vue"]]);var A2=KU(hg({...hg({name:"ElMain"}),setup(e){const t=KF("main");return(e,i)=>(af(),cf("main",{class:pu(ed(t).b())},[Gg(e.$slots,"default")],2))}}),[["__file","main.vue"]]);const c2=lH(i2,{Aside:s2,Footer:a2,Header:l2,Main:A2}),u2=cH(s2),h2=cH(a2),d2=cH(l2),g2=cH(A2);var p2={exports:{}};p2.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,n=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},o=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},A=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],c=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var i,n=a.meridiem;if(n){for(var s=1;s<=24;s+=1)if(e.indexOf(n(s,0,t))>-1){i=s>12;break}}else i=e===(t?"pm":"PM");return i},h={A:[r,function(e){this.afternoon=u(e,!1)}],a:[r,function(e){this.afternoon=u(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[s,l("seconds")],ss:[s,l("seconds")],m:[s,l("minutes")],mm:[s,l("minutes")],H:[s,l("hours")],h:[s,l("hours")],HH:[s,l("hours")],hh:[s,l("hours")],D:[s,l("day")],DD:[n,l("day")],Do:[r,function(e){var t=a.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],w:[s,l("week")],ww:[n,l("week")],M:[s,l("month")],MM:[n,l("month")],MMM:[r,function(e){var t=c("months"),i=(c("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[r,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(e){this.year=o(e)}],YYYY:[/\d{4}/,l("year")],Z:A,ZZ:A};function d(i){var n,s;n=i,s=a&&a.formats;for(var r=(i=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,i,n){var r=n&&n.toUpperCase();return i||s[n]||e[n]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,i){return t||i.slice(1)}))}))).match(t),o=r.length,l=0;l<o;l+=1){var A=r[l],c=h[A],u=c&&c[0],d=c&&c[1];r[l]=d?{regex:u,parser:d}:A.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,n=0;i<o;i+=1){var s=r[i];if("string"==typeof s)n+=s.length;else{var a=s.regex,l=s.parser,A=e.slice(n),c=a.exec(A)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(o=e.parseTwoDigitYear);var n=t.prototype,s=n.parse;n.parse=function(e){var t=e.date,n=e.utc,r=e.args;this.$u=n;var o=r[1];if("string"==typeof o){var l=!0===r[2],A=!0===r[3],c=l||A,u=r[2];A&&(u=r[2]),a=this.$locale(),!l&&u&&(a=i.Ls[u]),this.$d=function(e,t,i,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var s=d(t)(e),r=s.year,a=s.month,o=s.day,l=s.hours,A=s.minutes,c=s.seconds,u=s.milliseconds,h=s.zone,g=s.week,p=new Date,f=o||(r||a?1:p.getDate()),m=r||p.getFullYear(),C=0;r&&!a||(C=a>0?a-1:p.getMonth());var I,v=l||0,B=A||0,y=c||0,b=u||0;return h?new Date(Date.UTC(m,C,f,v,B,y,b+60*h.offset*1e3)):i?new Date(Date.UTC(m,C,f,v,B,y,b)):(I=new Date(m,C,f,v,B,y,b),g&&(I=n(I).week(g).toDate()),I)}catch(E){
return new Date("")}}(t,o,n,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),c&&t!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var h=o.length,g=1;g<=h;g+=1){r[1]=o[g-1];var p=i.apply(this,r);if(p.isValid()){this.$d=p.$d,this.$L=p.$L,this.init();break}g===h&&(this.$d=new Date(""))}else s.call(this,e)}}}();const f2=RC(p2.exports);var m2={exports:{}};m2.exports=function(e,t){var i=t.prototype,n=i.format;i.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),r=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return i.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return i.ordinal(t.week(),"W");case"w":case"ww":return s.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return s.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return s.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return n.bind(this)(r)}};const C2=RC(m2.exports);var I2,v2,B2={exports:{}};B2.exports=(I2="week",v2="year",function(e,t,i){var n=t.prototype;n.week=function(e){if(void 0===e&&(e=null),null!==e)return this.add(7*(e-this.week()),"day");var t=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var n=i(this).startOf(v2).add(1,v2).date(t),s=i(this).endOf(I2);if(n.isBefore(s))return 1}var r=i(this).startOf(v2).date(t).startOf(I2).subtract(1,"millisecond"),a=this.diff(r,I2,!0);return a<0?i(this).startOf("week").week():Math.ceil(a)},n.weeks=function(e){return void 0===e&&(e=null),this.week(e)}});const y2=RC(B2.exports);var b2={exports:{}};b2.exports=function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),i=this.year();return 1===t&&11===e?i+1:0===e&&t>=52?i-1:i}};const E2=RC(b2.exports);var w2={exports:{}};w2.exports=function(e,t,i){t.prototype.dayOfYear=function(e){var t=Math.round((i(this).startOf("day")-i(this).startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"day")}};const Q2=RC(w2.exports);var _2={exports:{}};_2.exports=function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}};const S2=RC(_2.exports);var x2={exports:{}};const k2=RC(x2.exports=function(e,t){t.prototype.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)}}),D2=["hours","minutes","seconds"],F2="HH:mm:ss",T2="YYYY-MM-DD",M2={date:T2,dates:T2,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${T2} ${F2}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:T2,datetimerange:`${T2} ${F2}`},R2=BU({disabledHours:{type:Function},disabledMinutes:{type:Function},disabledSeconds:{type:Function}}),N2=BU({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),L2=BU({id:{type:[Array,String]},name:{type:[Array,String]},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:[String,Object],default:lO},editable:{type:Boolean,default:!0},prefixIcon:{type:[String,Object],default:""},size:bU,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},modelValue:{type:[Date,Array,String,Number],default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:[Date,Array]},defaultTime:{type:[Date,Array]},isRange:Boolean,...R2,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:String,values:hz,default:"bottom"},fallbackPlacements:{type:Array,default:["bottom","top","right","left"]},...SU,...Dj(["ariaLabel"]),showNow:{type:Boolean,default:!0}}),U2=BU({id:{type:Array},name:{type:Array},modelValue:{type:[Array,String]},startPlaceholder:String,endPlaceholder:String}),H2=hg({...hg({name:"PickerRangeTrigger",inheritAttrs:!1}),props:U2,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(e,{expose:t,emit:i}){const n=Nj(),s=KF("date"),r=KF("range"),a=zh(),o=zh(),{wrapperRef:l,isFocused:A}=jj(a),c=e=>{i("click",e)},u=e=>{i("mouseenter",e)},h=e=>{i("mouseleave",e)},d=e=>{i("mouseenter",e)},g=e=>{i("startInput",e)},p=e=>{i("endInput",e)},f=e=>{i("startChange",e)},m=e=>{i("endChange",e)};return t({focus:()=>{var e;null==(e=a.value)||e.focus()},blur:()=>{var e,t;null==(e=a.value)||e.blur(),null==(t=o.value)||t.blur()}}),(e,t)=>(af(),cf("div",{ref_key:"wrapperRef",ref:l,class:pu([ed(s).is("active",ed(A)),e.$attrs.class]),style:cu(e.$attrs.style),onClick:c,onMouseenter:u,onMouseleave:h,onTouchstartPassive:d},[Gg(e.$slots,"prefix"),ff("input",wf(ed(n),{id:e.id&&e.id[0],ref_key:"inputRef",ref:a,name:e.name&&e.name[0],placeholder:e.startPlaceholder,value:e.modelValue&&e.modelValue[0],class:ed(r).b("input"),onInput:g,onChange:f}),null,16,["id","name","placeholder","value"]),Gg(e.$slots,"range-separator"),ff("input",wf(ed(n),{id:e.id&&e.id[1],ref_key:"endInputRef",ref:o,name:e.name&&e.name[1],placeholder:e.endPlaceholder,value:e.modelValue&&e.modelValue[1],class:ed(r).b("input"),onInput:p,onChange:m}),null,16,["id","name","placeholder","value"]),Gg(e.$slots,"suffix")],38))}});var P2=KU(H2,[["__file","picker-range-trigger.vue"]]);const O2=hg({...hg({name:"Picker"}),props:L2,emits:["update:modelValue","change","focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:t,emit:i}){const n=e,s=Jg(),{lang:r}=CU(),a=KF("date"),o=KF("input"),l=KF("range"),{form:A,formItem:c}=Kj(),u=pp("ElPopperOptions",{}),{valueOnClear:h}=xU(n,null),d=zh(),g=zh(),p=zh(!1),f=zh(!1),m=zh(null);let C=!1;const{isFocused:I,handleFocus:v,handleBlur:B}=jj(g,{beforeFocus:()=>n.readonly||F.value,afterFocus(){p.value=!0},beforeBlur(e){var t;return!C&&(null==(t=d.value)?void 0:t.isFocusInsideContent(e))},afterBlur(){Z(),p.value=!1,C=!1,n.validateEvent&&(null==c||c.validate("blur").catch((e=>{})))}}),y=qf((()=>[a.b("editor"),a.bm("editor",n.type),o.e("wrapper"),a.is("disabled",F.value),a.is("active",p.value),l.b("editor"),J?l.bm("editor",J.value):"",s.class])),b=qf((()=>[o.e("icon"),l.e("close-icon"),O.value?"":l.e("close-icon--hidden")]));Pp(p,(e=>{e?Qd((()=>{e&&(m.value=n.modelValue)})):($.value=null,Qd((()=>{E(n.modelValue)})))}));const E=(e,t)=>{!t&&AZ(e,m.value)||(i("change",e),n.validateEvent&&(null==c||c.validate("change").catch((e=>{}))))},w=e=>{if(!AZ(n.modelValue,e)){let t;Lc(e)?t=e.map((e=>uZ(e,n.valueFormat,r.value))):e&&(t=uZ(e,n.valueFormat,r.value)),i("update:modelValue",e?t:e,r.value)}},Q=qf((()=>g.value?Array.from(g.value.$el.querySelectorAll("input")):[])),_=(e,t,i)=>{const n=Q.value;n.length&&(i&&"min"!==i?"max"===i&&(n[1].setSelectionRange(e,t),n[1].focus()):(n[0].setSelectionRange(e,t),n[0].focus()))},S=(e="",t=!1)=>{let i;p.value=t,i=Lc(e)?e.map((e=>e.toDate())):e?e.toDate():e,$.value=null,w(i)},x=()=>{f.value=!0},k=()=>{i("visible-change",!0)},D=()=>{f.value=!1,p.value=!1,i("visible-change",!1)},F=qf((()=>n.disabled||(null==A?void 0:A.disabled))),T=qf((()=>{let e;if(K.value?Ae.value.getDefaultValue&&(e=Ae.value.getDefaultValue()):e=Lc(n.modelValue)?n.modelValue.map((e=>cZ(e,n.valueFormat,r.value))):cZ(n.modelValue,n.valueFormat,r.value),Ae.value.getRangeAvailableTime){const t=Ae.value.getRangeAvailableTime(e);WN(t,e)||(e=t,K.value||w(dZ(e)))}return Lc(e)&&e.some((e=>!e))&&(e=[]),e})),M=qf((()=>{if(!Ae.value.panelReady)return"";const e=te(T.value);return Lc($.value)?[$.value[0]||e&&e[0]||"",$.value[1]||e&&e[1]||""]:null!==$.value?$.value:!N.value&&K.value||!p.value&&K.value?"":e?L.value||U.value||H.value?e.join(", "):e:""})),R=qf((()=>n.type.includes("time"))),N=qf((()=>n.type.startsWith("time"))),L=qf((()=>"dates"===n.type)),U=qf((()=>"months"===n.type)),H=qf((()=>"years"===n.type)),P=qf((()=>n.prefixIcon||(R.value?gO:CP))),O=zh(!1),G=e=>{n.readonly||F.value||(O.value&&(e.stopPropagation(),Ae.value.handleClear?Ae.value.handleClear():w(h.value),E(h.value,!0),O.value=!1,D()),i("clear"))},K=qf((()=>{const{modelValue:e}=n;return!e||Lc(e)&&!e.filter(Boolean).length})),q=async e=>{var t;n.readonly||F.value||("INPUT"!==(null==(t=e.target)?void 0:t.tagName)||I.value)&&(p.value=!0)},Y=()=>{n.readonly||F.value||!K.value&&n.clearable&&(O.value=!0)},V=()=>{O.value=!1},W=e=>{var t;n.readonly||F.value||("INPUT"!==(null==(t=e.touches[0].target)?void 0:t.tagName)||I.value)&&(p.value=!0)},j=qf((()=>n.type.includes("range"))),J=Vj(),z=qf((()=>{var e,t;return null==(t=null==(e=ed(d))?void 0:e.popperRef)?void 0:t.contentRef})),X=PL(g,(e=>{const t=ed(z),i=RL(g);t&&(e.target===t||e.composedPath().includes(t))||e.target===i||i&&e.composedPath().includes(i)||(p.value=!1)}));_g((()=>{null==X||X()}));const $=zh(null),Z=()=>{if($.value){const e=ee(M.value);e&&ie(e)&&(w(dZ(e)),$.value=null)}""===$.value&&(w(h.value),E(h.value),$.value=null)},ee=e=>e?Ae.value.parseUserInput(e):null,te=e=>e?Ae.value.formatToString(e):null,ie=e=>Ae.value.isValidValue(e),ne=async e=>{if(n.readonly||F.value)return;const{code:t}=e;if((e=>{i("keydown",e)})(e),t!==zJ.esc)if(t===zJ.down&&(Ae.value.handleFocusPicker&&(e.preventDefault(),e.stopPropagation()),!1===p.value&&(p.value=!0,await Qd()),Ae.value.handleFocusPicker))Ae.value.handleFocusPicker();else{if(t!==zJ.tab)return t===zJ.enter||t===zJ.numpadEnter?((null===$.value||""===$.value||ie(ee(M.value)))&&(Z(),p.value=!1),void e.stopPropagation()):void($.value?e.stopPropagation():Ae.value.handleKeydownInput&&Ae.value.handleKeydownInput(e));C=!0}else!0===p.value&&(p.value=!1,e.preventDefault(),e.stopPropagation())},se=e=>{$.value=e,p.value||(p.value=!0)},re=e=>{const t=e.target;$.value?$.value=[t.value,$.value[1]]:$.value=[t.value,null]},ae=e=>{const t=e.target;$.value?$.value=[$.value[0],t.value]:$.value=[null,t.value]},oe=()=>{var e;const t=$.value,i=ee(t&&t[0]),n=ed(T);if(i&&i.isValid()){$.value=[te(i),(null==(e=M.value)?void 0:e[1])||null];const t=[i,n&&(n[1]||null)];ie(t)&&(w(dZ(t)),$.value=null)}},le=()=>{var e;const t=ed($),i=ee(t&&t[1]),n=ed(T);if(i&&i.isValid()){$.value=[(null==(e=ed(M))?void 0:e[0])||null,te(i)];const t=[n&&n[0],i];ie(t)&&(w(dZ(t)),$.value=null)}},Ae=zh({}),ce=e=>{Ae.value[e[0]]=e[1],Ae.value.panelReady=!0},ue=e=>{i("calendar-change",e)},he=(e,t,n)=>{i("panel-change",e,t,n)};return gp("EP_PICKER_BASE",{props:n}),t({focus:()=>{var e;null==(e=g.value)||e.focus()},blur:()=>{var e;null==(e=g.value)||e.blur()},handleOpen:()=>{p.value=!0},handleClose:()=>{p.value=!1},onPick:S}),(e,t)=>(af(),uf(ed(XX),wf({ref_key:"refPopper",ref:d,visible:p.value,effect:"light",pure:"",trigger:"click"},e.$attrs,{role:"dialog",teleported:"",transition:`${ed(a).namespace.value}-zoom-in-top`,"popper-class":[`${ed(a).namespace.value}-picker__popper`,e.popperClass],"popper-options":ed(u),"fallback-placements":e.fallbackPlacements,"gpu-acceleration":!1,placement:e.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:x,onShow:k,onHide:D}),{default:Nd((()=>[ed(j)?(af(),uf(P2,{key:1,id:e.id,ref_key:"inputRef",ref:g,"model-value":ed(M),name:e.name,disabled:ed(F),readonly:!e.editable||e.readonly,"start-placeholder":e.startPlaceholder,"end-placeholder":e.endPlaceholder,class:pu(ed(y)),style:cu(e.$attrs.style),"aria-label":e.ariaLabel,tabindex:e.tabindex,autocomplete:"off",role:"combobox",onClick:q,onFocus:ed(v),onBlur:ed(B),onStartInput:re,onStartChange:oe,onEndInput:ae,onEndChange:le,onMousedown:q,onMouseenter:Y,onMouseleave:V,onTouchstartPassive:W,onKeydown:ne},{prefix:Nd((()=>[ed(P)?(af(),uf(ed(gH),{key:0,class:pu([ed(o).e("icon"),ed(l).e("icon")])},{default:Nd((()=>[(af(),uf(Ng(ed(P))))])),_:1},8,["class"])):Bf("v-if",!0)])),"range-separator":Nd((()=>[Gg(e.$slots,"range-separator",{},(()=>[ff("span",{class:pu(ed(l).b("separator"))},yu(e.rangeSeparator),3)]))])),suffix:Nd((()=>[e.clearIcon?(af(),uf(ed(gH),{key:0,class:pu(ed(b)),onMousedown:AC(ed(xc),["prevent"]),onClick:G},{default:Nd((()=>[(af(),uf(Ng(e.clearIcon)))])),_:1},8,["class","onMousedown"])):Bf("v-if",!0)])),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(af(),uf(ed(Xj),{key:0,id:e.id,ref_key:"inputRef",ref:g,"container-role":"combobox","model-value":ed(M),name:e.name,size:ed(J),disabled:ed(F),placeholder:e.placeholder,class:pu([ed(a).b("editor"),ed(a).bm("editor",e.type),e.$attrs.class]),style:cu(e.$attrs.style),readonly:!e.editable||e.readonly||ed(L)||ed(U)||ed(H)||"week"===e.type,"aria-label":e.ariaLabel,tabindex:e.tabindex,"validate-event":!1,onInput:se,onFocus:ed(v),onBlur:ed(B),onKeydown:ne,onChange:Z,onMousedown:q,onMouseenter:Y,onMouseleave:V,onTouchstartPassive:W,onClick:AC((()=>{}),["stop"])},{prefix:Nd((()=>[ed(P)?(af(),uf(ed(gH),{key:0,class:pu(ed(o).e("icon")),onMousedown:AC(q,["prevent"]),onTouchstartPassive:W},{default:Nd((()=>[(af(),uf(Ng(ed(P))))])),_:1},8,["class","onMousedown"])):Bf("v-if",!0)])),suffix:Nd((()=>[O.value&&e.clearIcon?(af(),uf(ed(gH),{key:0,class:pu(`${ed(o).e("icon")} clear-icon`),onMousedown:AC(ed(xc),["prevent"]),onClick:G},{default:Nd((()=>[(af(),uf(Ng(e.clearIcon)))])),_:1},8,["class","onMousedown"])):Bf("v-if",!0)])),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur","onClick"]))])),content:Nd((()=>[Gg(e.$slots,"default",{visible:p.value,actualVisible:f.value,parsedValue:ed(T),format:e.format,dateFormat:e.dateFormat,timeFormat:e.timeFormat,unlinkPanels:e.unlinkPanels,type:e.type,defaultValue:e.defaultValue,showNow:e.showNow,onPick:S,onSelectRange:_,onSetPickerOption:ce,onCalendarChange:ue,onPanelChange:he,onMousedown:AC((()=>{}),["stop"])})])),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var G2=KU(O2,[["__file","picker.vue"]]);const K2=BU({...N2,datetimeRole:String,parsedValue:{type:Object}}),q2=({getAvailableHours:e,getAvailableMinutes:t,getAvailableSeconds:i})=>{const n={};return{timePickerOptions:n,getAvailableTime:(n,s,r,a)=>{const o={hour:e,minute:t,second:i};let l=n;return["hour","minute","second"].forEach((e=>{if(o[e]){let t;const i=o[e];switch(e){case"minute":t=i(l.hour(),s,a);break;case"second":t=i(l.hour(),l.minute(),s,a);break;default:t=i(s,a)}if((null==t?void 0:t.length)&&!t.includes(l[e]())){const i=r?0:t.length-1;l=l[e](t[i])}}})),l},onSetOption:([e,t])=>{n[e]=t}}},Y2=e=>e.map(((e,t)=>e||t)).filter((e=>!0!==e)),V2=(e,t,i)=>({getHoursList:(t,i)=>hZ(24,e&&(()=>null==e?void 0:e(t,i))),getMinutesList:(e,i,n)=>hZ(60,t&&(()=>null==t?void 0:t(e,i,n))),getSecondsList:(e,t,n,s)=>hZ(60,i&&(()=>null==i?void 0:i(e,t,n,s)))}),W2=(e,t,i)=>{const{getHoursList:n,getMinutesList:s,getSecondsList:r}=V2(e,t,i);return{getAvailableHours:(e,t)=>Y2(n(e,t)),getAvailableMinutes:(e,t,i)=>Y2(s(e,t,i)),getAvailableSeconds:(e,t,i,n)=>Y2(r(e,t,i,n))}},j2=e=>{const t=zh(e.parsedValue);return Pp((()=>e.visible),(i=>{i||(t.value=e.parsedValue)})),t},J2=BU({role:{type:String,required:!0},spinnerDate:{type:Object,required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:String,default:""},...R2}),z2=100,X2=600,$2={beforeMount(e,t){const i=t.value,{interval:n=z2,delay:s=X2}=Oc(i)?{}:i;let r,a;const o=()=>Oc(i)?i():i.handler(),l=()=>{a&&(clearTimeout(a),a=void 0),r&&(clearInterval(r),r=void 0)};e.addEventListener("mousedown",(e=>{0===e.button&&(l(),o(),document.addEventListener("mouseup",(()=>l()),{once:!0}),a=setTimeout((()=>{r=setInterval((()=>{o()}),n)}),s))}))}},Z2=hg({__name:"basic-time-spinner",props:J2,emits:["change","select-range","set-option"],setup(e,{emit:t}){const i=e,n=pp("EP_PICKER_BASE"),{isRange:s}=n.props,r=KF("time"),{getHoursList:a,getMinutesList:o,getSecondsList:l}=V2(i.disabledHours,i.disabledMinutes,i.disabledSeconds);let A=!1;const c=zh(),u={hours:zh(),minutes:zh(),seconds:zh()},h=qf((()=>i.showSeconds?D2:D2.slice(0,2))),d=qf((()=>{const{spinnerDate:e}=i;return{hours:e.hour(),minutes:e.minute(),seconds:e.second()}})),g=qf((()=>{const{hours:e,minutes:t}=ed(d),{role:n,spinnerDate:r}=i,A=s?void 0:r;return{hours:a(n,A),minutes:o(e,n,A),seconds:l(e,t,n,A)}})),p=qf((()=>{const{hours:e,minutes:t,seconds:i}=ed(d);return{hours:sZ(e,23),minutes:sZ(t,59),seconds:sZ(i,59)}})),f=RN((e=>{A=!1,I(e)}),200),m=e=>{if(!!!i.amPmMode)return"";let t=e<12?" am":" pm";return"A"===i.amPmMode&&(t=t.toUpperCase()),t},C=e=>{let i;switch(e){case"hours":i=[0,2];break;case"minutes":i=[3,5];break;case"seconds":i=[6,8]}const[n,s]=i;t("select-range",n,s),c.value=e},I=e=>{y(e,ed(d)[e])},v=()=>{I("hours"),I("minutes"),I("seconds")},B=e=>e.querySelector(`.${r.namespace.value}-scrollbar__wrap`),y=(e,t)=>{if(i.arrowControl)return;const n=ed(u[e]);n&&n.$el&&(B(n.$el).scrollTop=Math.max(0,t*b(e)))},b=e=>{const t=ed(u[e]),i=null==t?void 0:t.$el.querySelector("li");return i&&Number.parseFloat(zU(i,"height"))||0},E=()=>{Q(1)},w=()=>{Q(-1)},Q=e=>{c.value||C("hours");const t=c.value,i=ed(d)[t],n="hours"===c.value?24:60,s=_(t,i,e,n);S(t,s),y(t,s),Qd((()=>C(t)))},_=(e,t,i,n)=>{let s=(t+i+n)%n;const r=ed(g)[e];for(;r[s]&&s!==t;)s=(s+i+n)%n;return s},S=(e,n)=>{if(ed(g)[e][n])return;const{hours:s,minutes:r,seconds:a}=ed(d);let o;switch(e){case"hours":o=i.spinnerDate.hour(n).minute(r).second(a);break;case"minutes":o=i.spinnerDate.hour(s).minute(n).second(a);break;case"seconds":o=i.spinnerDate.hour(s).minute(r).second(n)}t("change",o)},x=e=>ed(u[e]).$el.offsetHeight,k=()=>{const e=e=>{const t=ed(u[e]);t&&t.$el&&(B(t.$el).onscroll=()=>{(e=>{const t=ed(u[e]);if(!t)return;A=!0,f(e);const i=Math.min(Math.round((B(t.$el).scrollTop-(.5*x(e)-10)/b(e)+3)/b(e)),"hours"===e?23:59);S(e,i)})(e)})};e("hours"),e("minutes"),e("seconds")};Eg((()=>{Qd((()=>{!i.arrowControl&&k(),v(),"start"===i.role&&C("hours")}))}));return t("set-option",[`${i.role}_scrollDown`,Q]),t("set-option",[`${i.role}_emitSelectRange`,C]),Pp((()=>i.spinnerDate),(()=>{A||v()})),(e,t)=>(af(),cf("div",{class:pu([ed(r).b("spinner"),{"has-seconds":e.showSeconds}])},[e.arrowControl?Bf("v-if",!0):(af(!0),cf(Zp,{key:0},Pg(ed(h),(t=>(af(),uf(ed(lJ),{key:t,ref_for:!0,ref:e=>((e,t)=>{u[t].value=null!=e?e:void 0})(e,t),class:pu(ed(r).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":ed(r).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:e=>C(t),onMousemove:e=>I(t)},{default:Nd((()=>[(af(!0),cf(Zp,null,Pg(ed(g)[t],((i,n)=>(af(),cf("li",{key:n,class:pu([ed(r).be("spinner","item"),ed(r).is("active",n===ed(d)[t]),ed(r).is("disabled",i)]),onClick:e=>((e,{value:t,disabled:i})=>{i||(S(e,t),C(e),y(e,t))})(t,{value:n,disabled:i})},["hours"===t?(af(),cf(Zp,{key:0},[vf(yu(("0"+(e.amPmMode?n%12||12:n)).slice(-2))+yu(m(n)),1)],64)):(af(),cf(Zp,{key:1},[vf(yu(("0"+n).slice(-2)),1)],64))],10,["onClick"])))),128))])),_:2},1032,["class","view-class","onMouseenter","onMousemove"])))),128)),e.arrowControl?(af(!0),cf(Zp,{key:1},Pg(ed(h),(t=>(af(),cf("div",{key:t,class:pu([ed(r).be("spinner","wrapper"),ed(r).is("arrow")]),onMouseenter:e=>C(t)},[Ld((af(),uf(ed(gH),{class:pu(["arrow-up",ed(r).be("spinner","arrow")])},{default:Nd((()=>[mf(ed(UH))])),_:1},8,["class"])),[[ed($2),w]]),Ld((af(),uf(ed(gH),{class:pu(["arrow-down",ed(r).be("spinner","arrow")])},{default:Nd((()=>[mf(ed(QH))])),_:1},8,["class"])),[[ed($2),E]]),ff("ul",{class:pu(ed(r).be("spinner","list"))},[(af(!0),cf(Zp,null,Pg(ed(p)[t],((i,n)=>(af(),cf("li",{key:n,class:pu([ed(r).be("spinner","item"),ed(r).is("active",i===ed(d)[t]),ed(r).is("disabled",ed(g)[t][i])])},[ed(AL)(i)?(af(),cf(Zp,{key:0},["hours"===t?(af(),cf(Zp,{key:0},[vf(yu(("0"+(e.amPmMode?i%12||12:i)).slice(-2))+yu(m(i)),1)],64)):(af(),cf(Zp,{key:1},[vf(yu(("0"+i).slice(-2)),1)],64))],64)):Bf("v-if",!0)],2)))),128))],2)],42,["onMouseenter"])))),128)):Bf("v-if",!0)],2))}});var e4=KU(Z2,[["__file","basic-time-spinner.vue"]]);const t4=hg({__name:"panel-time-pick",props:K2,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const i=e,n=pp("EP_PICKER_BASE"),{arrowControl:s,disabledHours:r,disabledMinutes:a,disabledSeconds:o,defaultValue:l}=n.props,{getAvailableHours:A,getAvailableMinutes:c,getAvailableSeconds:u}=W2(r,a,o),h=KF("time"),{t:d,lang:g}=CU(),p=zh([0,2]),f=j2(i),m=qf((()=>oL(i.actualVisible)?`${h.namespace.value}-zoom-in-top`:"")),C=qf((()=>i.format.includes("ss"))),I=qf((()=>i.format.includes("A")?"A":i.format.includes("a")?"a":"")),v=()=>{t("pick",f.value,!1)},B=e=>{if(!i.visible)return;const n=Q(e).millisecond(0);t("pick",n,!0)},y=(e,i)=>{t("select-range",e,i),p.value=[e,i]},{timePickerOptions:b,onSetOption:E,getAvailableTime:w}=q2({getAvailableHours:A,getAvailableMinutes:c,getAvailableSeconds:u}),Q=e=>w(e,i.datetimeRole||"",!0);return t("set-picker-option",["isValidValue",e=>{const t=nZ(e).locale(g.value),i=Q(t);return t.isSame(i)}]),t("set-picker-option",["formatToString",e=>e?e.format(i.format):null]),t("set-picker-option",["parseUserInput",e=>e?nZ(e,i.format).locale(g.value):null]),t("set-picker-option",["handleKeydownInput",e=>{const t=e.code,{left:i,right:n,up:s,down:r}=zJ;if([i,n].includes(t)){return(e=>{const t=[0,3].concat(C.value?[6]:[]),i=["hours","minutes"].concat(C.value?["seconds"]:[]),n=(t.indexOf(p.value[0])+e+t.length)%t.length;b.start_emitSelectRange(i[n])})(t===i?-1:1),void e.preventDefault()}if([s,r].includes(t)){const i=t===s?-1:1;return b.start_scrollDown(i),void e.preventDefault()}}]),t("set-picker-option",["getRangeAvailableTime",Q]),t("set-picker-option",["getDefaultValue",()=>nZ(l).locale(g.value)]),(e,n)=>(af(),uf(am,{name:ed(m)},{default:Nd((()=>[e.actualVisible||e.visible?(af(),cf("div",{key:0,class:pu(ed(h).b("panel"))},[ff("div",{class:pu([ed(h).be("panel","content"),{"has-seconds":ed(C)}])},[mf(e4,{ref:"spinner",role:e.datetimeRole||"start","arrow-control":ed(s),"show-seconds":ed(C),"am-pm-mode":ed(I),"spinner-date":e.parsedValue,"disabled-hours":ed(r),"disabled-minutes":ed(a),"disabled-seconds":ed(o),onChange:B,onSetOption:ed(E),onSelectRange:y},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),ff("div",{class:pu(ed(h).be("panel","footer"))},[ff("button",{type:"button",class:pu([ed(h).be("panel","btn"),"cancel"]),onClick:v},yu(ed(d)("el.datepicker.cancel")),3),ff("button",{type:"button",class:pu([ed(h).be("panel","btn"),"confirm"]),onClick:e=>((e=!1,n=!1)=>{n||t("pick",i.parsedValue,e)})()},yu(ed(d)("el.datepicker.confirm")),11,["onClick"])],2)],2)):Bf("v-if",!0)])),_:1},8,["name"]))}});var i4=KU(t4,[["__file","panel-time-pick.vue"]]);const n4=hg({__name:"panel-time-range",props:BU({...N2,parsedValue:{type:Array}}),emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const i=e,n=(e,t)=>{const i=[];for(let n=e;n<=t;n++)i.push(n);return i},{t:s,lang:r}=CU(),a=KF("time"),o=KF("picker"),l=pp("EP_PICKER_BASE"),{arrowControl:A,disabledHours:c,disabledMinutes:u,disabledSeconds:h,defaultValue:d}=l.props,g=qf((()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",A),I.value?"has-seconds":""])),p=qf((()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",A),I.value?"has-seconds":""])),f=qf((()=>i.parsedValue[0])),m=qf((()=>i.parsedValue[1])),C=j2(i),I=qf((()=>i.format.includes("ss"))),v=qf((()=>i.format.includes("A")?"A":i.format.includes("a")?"a":"")),B=e=>{b(e.millisecond(0),m.value)},y=e=>{b(f.value,e.millisecond(0))},b=(e,n)=>{i.visible&&t("pick",[e,n],!0)},E=qf((()=>f.value>m.value)),w=zh([0,2]),Q=(e,i)=>{t("select-range",e,i,"min"),w.value=[e,i]},_=qf((()=>I.value?11:8)),S=(e,i)=>{t("select-range",e,i,"max");const n=ed(_);w.value=[e+n,i+n]},x=(e,t)=>{const i=c?c(e):[],s="start"===e,r=(t||(s?m.value:f.value)).hour(),a=s?n(r+1,23):n(0,r-1);return aL(i,a)},k=(e,t,i)=>{const s=u?u(e,t):[],r="start"===t,a=i||(r?m.value:f.value);if(e!==a.hour())return s;const o=a.minute(),l=r?n(o+1,59):n(0,o-1);return aL(s,l)},D=(e,t,i,s)=>{const r=h?h(e,t,i):[],a="start"===i,o=s||(a?m.value:f.value),l=o.hour(),A=o.minute();if(e!==l||t!==A)return r;const c=o.second(),u=a?n(c+1,59):n(0,c-1);return aL(r,u)},F=([e,t])=>[L(e,"start",!0,t),L(t,"end",!1,e)],{getAvailableHours:T,getAvailableMinutes:M,getAvailableSeconds:R}=W2(x,k,D),{timePickerOptions:N,getAvailableTime:L,onSetOption:U}=q2({getAvailableHours:T,getAvailableMinutes:M,getAvailableSeconds:R});return t("set-picker-option",["formatToString",e=>e?Lc(e)?e.map((e=>e.format(i.format))):e.format(i.format):null]),t("set-picker-option",["parseUserInput",e=>e?Lc(e)?e.map((e=>nZ(e,i.format).locale(r.value))):nZ(e,i.format).locale(r.value):null]),t("set-picker-option",["isValidValue",e=>{const t=e.map((e=>nZ(e).locale(r.value))),i=F(t);return t[0].isSame(i[0])&&t[1].isSame(i[1])}]),t("set-picker-option",["handleKeydownInput",e=>{const t=e.code,{left:i,right:n,up:s,down:r}=zJ;if([i,n].includes(t)){return(e=>{const t=I.value?[0,3,6,11,14,17]:[0,3,8,11],i=["hours","minutes"].concat(I.value?["seconds"]:[]),n=(t.indexOf(w.value[0])+e+t.length)%t.length,s=t.length/2;n<s?N.start_emitSelectRange(i[n]):N.end_emitSelectRange(i[n-s])})(t===i?-1:1),void e.preventDefault()}if([s,r].includes(t)){const i=t===s?-1:1,n=w.value[0]<_.value?"start":"end";return N[`${n}_scrollDown`](i),void e.preventDefault()}}]),t("set-picker-option",["getDefaultValue",()=>{if(Lc(d))return d.map((e=>nZ(e).locale(r.value)));const e=nZ(d).locale(r.value);return[e,e.add(60,"m")]}]),t("set-picker-option",["getRangeAvailableTime",F]),(e,i)=>e.actualVisible?(af(),cf("div",{key:0,class:pu([ed(a).b("range-picker"),ed(o).b("panel")])},[ff("div",{class:pu(ed(a).be("range-picker","content"))},[ff("div",{class:pu(ed(a).be("range-picker","cell"))},[ff("div",{class:pu(ed(a).be("range-picker","header"))},yu(ed(s)("el.datepicker.startTime")),3),ff("div",{class:pu(ed(g))},[mf(e4,{ref:"minSpinner",role:"start","show-seconds":ed(I),"am-pm-mode":ed(v),"arrow-control":ed(A),"spinner-date":ed(f),"disabled-hours":x,"disabled-minutes":k,"disabled-seconds":D,onChange:B,onSetOption:ed(U),onSelectRange:Q},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),ff("div",{class:pu(ed(a).be("range-picker","cell"))},[ff("div",{class:pu(ed(a).be("range-picker","header"))},yu(ed(s)("el.datepicker.endTime")),3),ff("div",{class:pu(ed(p))},[mf(e4,{ref:"maxSpinner",role:"end","show-seconds":ed(I),"am-pm-mode":ed(v),"arrow-control":ed(A),"spinner-date":ed(m),"disabled-hours":x,"disabled-minutes":k,"disabled-seconds":D,onChange:y,onSetOption:ed(U),onSelectRange:S},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),ff("div",{class:pu(ed(a).be("panel","footer"))},[ff("button",{type:"button",class:pu([ed(a).be("panel","btn"),"cancel"]),onClick:e=>{t("pick",C.value,!1)}},yu(ed(s)("el.datepicker.cancel")),11,["onClick"]),ff("button",{type:"button",class:pu([ed(a).be("panel","btn"),"confirm"]),disabled:ed(E),onClick:e=>((e=!1)=>{t("pick",[f.value,m.value],e)})()},yu(ed(s)("el.datepicker.confirm")),11,["disabled","onClick"])],2)],2)):Bf("v-if",!0)}});var s4=KU(n4,[["__file","panel-time-range.vue"]]);nZ.extend(f2);var r4=hg({name:"ElTimePicker",install:null,props:{...L2,isRange:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,t){const i=zh(),[n,s]=e.isRange?["timerange",s4]:["time",i4],r=e=>t.emit("update:modelValue",e);return gp("ElPopperOptions",e.popperOptions),t.expose({focus:()=>{var e;null==(e=i.value)||e.focus()},blur:()=>{var e;null==(e=i.value)||e.blur()},handleOpen:()=>{var e;null==(e=i.value)||e.handleOpen()},handleClose:()=>{var e;null==(e=i.value)||e.handleClose()}}),()=>{var t;const a=null!=(t=e.format)?t:F2;return mf(G2,wf(e,{ref:i,type:n,format:a,"onUpdate:modelValue":r}),{default:e=>mf(s,e,null)})}}});const a4=lH(r4),o4=Symbol(),l4=BU({...L2,type:{type:String,default:"date"}}),A4=["date","dates","year","years","month","months","week","range"],c4=BU({disabledDate:{type:Function},date:{type:Object,required:!0},minDate:{type:Object},maxDate:{type:Object},parsedValue:{type:[Object,Array]},rangeState:{type:Object,default:()=>({endDate:null,selecting:!1})}}),u4=BU({type:{type:String,required:!0,values:["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"]},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0}}),h4=BU({unlinkPanels:Boolean,parsedValue:{type:Array}}),d4=e=>({type:String,values:A4,default:e}),g4=BU({...u4,parsedValue:{type:[Object,Array]},visible:{type:Boolean},format:{type:String,default:""}}),p4=e=>{if(!Lc(e))return!1;const[t,i]=e;return nZ.isDayjs(t)&&nZ.isDayjs(i)&&t.isSameOrBefore(i)},f4=(e,{lang:t,unit:i,unlinkPanels:n})=>{let s;if(Lc(e)){let[s,r]=e.map((e=>nZ(e).locale(t)));return n||(r=s.add(1,i)),[s,r]}return s=e?nZ(e):nZ(),s=s.locale(t),[s,s.add(1,i)]},m4=(e,t,i)=>{const n=nZ().locale(i).startOf("month").month(t).year(e),s=n.daysInMonth();return rZ(s).map((e=>n.add(e,"day").toDate()))},C4=(e,t,i,n)=>{const s=nZ().year(e).month(t).startOf("month"),r=m4(e,t,i).find((e=>!(null==n?void 0:n(e))));return r?nZ(r).locale(i):s.locale(i)},I4=(e,t,i)=>{const n=e.year();if(!(null==i?void 0:i(e.toDate())))return e.locale(t);const s=e.month();if(!m4(n,s,t).every(i))return C4(n,s,t,i);for(let r=0;r<12;r++)if(!m4(n,r,t).every(i))return C4(n,r,t,i);return e},v4=BU({...c4,cellClassName:{type:Function},showWeekNumber:Boolean,selectionMode:d4("date")}),B4=(e="")=>["normal","today"].includes(e),y4=(e,t)=>{const{lang:i}=CU(),n=zh(),s=zh(),r=zh(),a=zh(),o=zh([[],[],[],[],[],[]]);let l=!1;const A=e.date.$locale().weekStart||7,c=e.date.locale("en").localeData().weekdaysShort().map((e=>e.toLowerCase())),u=qf((()=>A>3?7-A:-A)),h=qf((()=>{const t=e.date.startOf("month");return t.subtract(t.day()||7,"day")})),d=qf((()=>c.concat(c).slice(A,A+7))),g=qf((()=>nR(ed(I)).some((e=>e.isCurrent)))),p=qf((()=>{const t=e.date.startOf("month");return{startOfMonthDay:t.day()||7,dateCountOfMonth:t.daysInMonth(),dateCountOfLastMonth:t.subtract(1,"month").daysInMonth()}})),f=qf((()=>"dates"===e.selectionMode?P0(e.parsedValue):[])),m=(t,{columnIndex:i,rowIndex:n},s)=>{const{disabledDate:r,cellClassName:a}=e,o=ed(f),l=((e,{count:t,rowIndex:i,columnIndex:n})=>{const{startOfMonthDay:s,dateCountOfMonth:r,dateCountOfLastMonth:a}=ed(p),o=ed(u);if(!(i>=0&&i<=1))return t<=r?e.text=t:(e.text=t-r,e.type="next-month"),!0;{const r=s+o<0?7+s+o:s+o;if(n+7*i>=r)return e.text=t,!0;e.text=a-(r-n%7)+1+7*i,e.type="prev-month"}return!1})(t,{count:s,rowIndex:n,columnIndex:i}),A=t.dayjs.toDate();return t.selected=o.find((e=>e.isSame(t.dayjs,"day"))),t.isSelected=!!t.selected,t.isCurrent=B(t),t.disabled=null==r?void 0:r(A),t.customClass=null==a?void 0:a(A),l},C=t=>{if("week"===e.selectionMode){const[i,n]=e.showWeekNumber?[1,7]:[0,6],s=w(t[i+1]);t[i].inRange=s,t[i].start=s,t[n].inRange=s,t[n].end=s}},I=qf((()=>{const{minDate:t,maxDate:n,rangeState:s,showWeekNumber:r}=e,a=ed(u),l=ed(o),A="day";let c=1;if(r)for(let e=0;e<6;e++)l[e][0]||(l[e][0]={type:"week",text:ed(h).add(7*e+1,A).week()});return((e,t,{columnIndexOffset:i,startDate:n,nextEndDate:s,now:r,unit:a,relativeDateGetter:o,setCellMetadata:l,setRowMetadata:A})=>{for(let c=0;c<e.row;c++){const u=t[c];for(let t=0;t<e.column;t++){let A=u[t+i];A||(A={row:c,column:t,type:"normal",inRange:!1,start:!1,end:!1});const h=o(c*e.column+t);A.dayjs=h,A.date=h.toDate(),A.timestamp=h.valueOf(),A.type="normal",A.inRange=!!(n&&h.isSameOrAfter(n,a)&&s&&h.isSameOrBefore(s,a))||!!(n&&h.isSameOrBefore(n,a)&&s&&h.isSameOrAfter(s,a)),(null==n?void 0:n.isSameOrAfter(s))?(A.start=!!s&&h.isSame(s,a),A.end=n&&h.isSame(n,a)):(A.start=!!n&&h.isSame(n,a),A.end=!!s&&h.isSame(s,a)),h.isSame(r,a)&&(A.type="today"),null==l||l(A,{rowIndex:c,columnIndex:t}),u[t+i]=A}null==A||A(u)}})({row:6,column:7},l,{startDate:t,columnIndexOffset:r?1:0,nextEndDate:s.endDate||n||s.selecting&&t||null,now:nZ().locale(ed(i)).startOf(A),unit:A,relativeDateGetter:e=>ed(h).add(e-a,A),setCellMetadata:(...e)=>{m(...e,c)&&(c+=1)},setRowMetadata:C}),l}));Pp((()=>e.date),(async()=>{var e;(null==(e=ed(n))?void 0:e.contains(document.activeElement))&&(await Qd(),await v())}));const v=async()=>{var e;return null==(e=ed(s))?void 0:e.focus()},B=t=>"date"===e.selectionMode&&B4(t.type)&&y(t,e.parsedValue),y=(t,n)=>!!n&&nZ(n).locale(ed(i)).isSame(e.date.date(Number(t.text)),"day"),b=(t,i)=>{const n=7*t+(i-(e.showWeekNumber?1:0))-ed(u);return ed(h).add(n,"day")},E=(i,n=!1)=>{const s=i.target.closest("td");if(!s)return;const r=s.parentNode.rowIndex-1,a=s.cellIndex,o=ed(I)[r][a];if(o.disabled||"week"===o.type)return;const l=b(r,a);switch(e.selectionMode){case"range":(i=>{e.rangeState.selecting&&e.minDate?(i>=e.minDate?t("pick",{minDate:e.minDate,maxDate:i}):t("pick",{minDate:i,maxDate:e.minDate}),t("select",!1)):(t("pick",{minDate:i,maxDate:null}),t("select",!0))})(l);break;case"date":t("pick",l,n);break;case"week":(e=>{const i=e.week(),n=`${e.year()}w${i}`;t("pick",{year:e.year(),week:i,value:n,date:e.startOf("week")})})(l);break;case"dates":((i,n)=>{const s=n?P0(e.parsedValue).filter((e=>(null==e?void 0:e.valueOf())!==i.valueOf())):P0(e.parsedValue).concat([i]);t("pick",s)})(l,!!o.selected)}},w=t=>{if("week"!==e.selectionMode)return!1;let i=e.date.startOf("day");if("prev-month"===t.type&&(i=i.subtract(1,"month")),"next-month"===t.type&&(i=i.add(1,"month")),i=i.date(Number.parseInt(t.text,10)),e.parsedValue&&!Lc(e.parsedValue)){const t=(e.parsedValue.day()-A+7)%7-1;return e.parsedValue.subtract(t,"day").isSame(i,"day")}return!1};return{WEEKS:d,rows:I,tbodyRef:n,currentCellRef:s,focus:v,isCurrent:B,isWeekActive:w,isSelectedCell:e=>!ed(g)&&1===(null==e?void 0:e.text)&&"normal"===e.type||e.isCurrent,handlePickDate:E,handleMouseUp:e=>{e.target.closest("td")&&(l=!1)},handleMouseDown:e=>{e.target.closest("td")&&(l=!0)},handleMouseMove:i=>{var n;if(!e.rangeState.selecting)return;let s=i.target;if("SPAN"===s.tagName&&(s=null==(n=s.parentNode)?void 0:n.parentNode),"DIV"===s.tagName&&(s=s.parentNode),"TD"!==s.tagName)return;const o=s.parentNode.rowIndex-1,l=s.cellIndex;ed(I)[o][l].disabled||o===ed(r)&&l===ed(a)||(r.value=o,a.value=l,t("changerange",{selecting:!0,endDate:b(o,l)}))},handleFocus:t=>{l||ed(g)||"date"!==e.selectionMode||E(t,!0)}}};var b4=hg({name:"ElDatePickerCell",props:BU({cell:{type:Object}}),setup(e){const t=KF("date-table-cell"),{slots:i}=pp(o4);return()=>{const{cell:n}=e;return Gg(i,"default",{...n},(()=>{var e;return[mf("div",{class:t.b()},[mf("span",{class:t.e("text")},[null!=(e=null==n?void 0:n.renderText)?e:null==n?void 0:n.text])])]}))}}});const E4=hg({__name:"basic-date-table",props:v4,emits:["changerange","pick","select"],setup(e,{expose:t,emit:i}){const n=e,{WEEKS:s,rows:r,tbodyRef:a,currentCellRef:o,focus:l,isCurrent:A,isWeekActive:c,isSelectedCell:u,handlePickDate:h,handleMouseUp:d,handleMouseDown:g,handleMouseMove:p,handleFocus:f}=y4(n,i),{tableLabel:m,tableKls:C,weekLabel:I,getCellClasses:v,getRowKls:B,t:y}=((e,{isCurrent:t,isWeekActive:i})=>{const n=KF("date-table"),{t:s}=CU();return{tableKls:qf((()=>[n.b(),{"is-week-mode":"week"===e.selectionMode}])),tableLabel:qf((()=>s("el.datepicker.dateTablePrompt"))),weekLabel:qf((()=>s("el.datepicker.week"))),getCellClasses:i=>{const n=[];return B4(i.type)&&!i.disabled?(n.push("available"),"today"===i.type&&n.push("today")):n.push(i.type),t(i)&&n.push("current"),i.inRange&&(B4(i.type)||"week"===e.selectionMode)&&(n.push("in-range"),i.start&&n.push("start-date"),i.end&&n.push("end-date")),i.disabled&&n.push("disabled"),i.selected&&n.push("selected"),i.customClass&&n.push(i.customClass),n.join(" ")},getRowKls:e=>[n.e("row"),{current:i(e)}],t:s}})(n,{isCurrent:A,isWeekActive:c});return t({focus:l}),(e,t)=>(af(),cf("table",{"aria-label":ed(m),class:pu(ed(C)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:ed(h),onMousemove:ed(p),onMousedown:AC(ed(g),["prevent"]),onMouseup:ed(d)},[ff("tbody",{ref_key:"tbodyRef",ref:a},[ff("tr",null,[e.showWeekNumber?(af(),cf("th",{key:0,scope:"col"},yu(ed(I)),1)):Bf("v-if",!0),(af(!0),cf(Zp,null,Pg(ed(s),((e,t)=>(af(),cf("th",{key:t,"aria-label":ed(y)("el.datepicker.weeksFull."+e),scope:"col"},yu(ed(y)("el.datepicker.weeks."+e)),9,["aria-label"])))),128))]),(af(!0),cf(Zp,null,Pg(ed(r),((e,t)=>(af(),cf("tr",{key:t,class:pu(ed(B)(e[1]))},[(af(!0),cf(Zp,null,Pg(e,((e,i)=>(af(),cf("td",{key:`${t}.${i}`,ref_for:!0,ref:t=>ed(u)(e)&&(o.value=t),class:pu(ed(v)(e)),"aria-current":e.isCurrent?"date":void 0,"aria-selected":e.isCurrent,tabindex:ed(u)(e)?0:-1,onFocus:ed(f)},[mf(ed(b4),{cell:e},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"])))),128))],2)))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var w4=KU(E4,[["__file","basic-date-table.vue"]]);const Q4=hg({__name:"basic-month-table",props:BU({...c4,selectionMode:d4("month")}),emits:["changerange","pick","select"],setup(e,{expose:t,emit:i}){const n=e,s=KF("month-table"),{t:r,lang:a}=CU(),o=zh(),l=zh(),A=zh(n.date.locale("en").localeData().monthsShort().map((e=>e.toLowerCase()))),c=zh([[],[],[]]),u=zh(),h=zh(),d=qf((()=>{var e,t;const i=c.value,s=nZ().locale(a.value).startOf("month");for(let r=0;r<3;r++){const a=i[r];for(let i=0;i<4;i++){const o=a[i]||(a[i]={row:r,column:i,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});o.type="normal";const l=4*r+i,A=n.date.startOf("year").month(l),c=n.rangeState.endDate||n.maxDate||n.rangeState.selecting&&n.minDate||null;o.inRange=!!(n.minDate&&A.isSameOrAfter(n.minDate,"month")&&c&&A.isSameOrBefore(c,"month"))||!!(n.minDate&&A.isSameOrBefore(n.minDate,"month")&&c&&A.isSameOrAfter(c,"month")),(null==(e=n.minDate)?void 0:e.isSameOrAfter(c))?(o.start=!(!c||!A.isSame(c,"month")),o.end=n.minDate&&A.isSame(n.minDate,"month")):(o.start=!(!n.minDate||!A.isSame(n.minDate,"month")),o.end=!(!c||!A.isSame(c,"month")));s.isSame(A)&&(o.type="today"),o.text=l,o.disabled=(null==(t=n.disabledDate)?void 0:t.call(n,A.toDate()))||!1}}return i})),g=e=>{const t={},i=n.date.year(),s=new Date,r=e.text;return t.disabled=!!n.disabledDate&&m4(i,r,a.value).every(n.disabledDate),t.current=P0(n.parsedValue).findIndex((e=>nZ.isDayjs(e)&&e.year()===i&&e.month()===r))>=0,t.today=s.getFullYear()===i&&s.getMonth()===r,e.inRange&&(t["in-range"]=!0,e.start&&(t["start-date"]=!0),e.end&&(t["end-date"]=!0)),t},p=e=>{const t=n.date.year(),i=e.text;return P0(n.date).findIndex((e=>e.year()===t&&e.month()===i))>=0},f=e=>{var t;if(!n.rangeState.selecting)return;let s=e.target;if("SPAN"===s.tagName&&(s=null==(t=s.parentNode)?void 0:t.parentNode),"DIV"===s.tagName&&(s=s.parentNode),"TD"!==s.tagName)return;const r=s.parentNode.rowIndex,a=s.cellIndex;d.value[r][a].disabled||r===u.value&&a===h.value||(u.value=r,h.value=a,i("changerange",{selecting:!0,endDate:n.date.startOf("year").month(4*r+a)}))},m=e=>{var t;const s=null==(t=e.target)?void 0:t.closest("td");if("TD"!==(null==s?void 0:s.tagName))return;if(WU(s,"disabled"))return;const r=s.cellIndex,o=4*s.parentNode.rowIndex+r,l=n.date.startOf("year").month(o);if("months"===n.selectionMode){if("keydown"===e.type)return void i("pick",P0(n.parsedValue),!1);const t=C4(n.date.year(),o,a.value,n.disabledDate),r=WU(s,"current")?P0(n.parsedValue).filter((e=>(null==e?void 0:e.month())!==t.month())):P0(n.parsedValue).concat([nZ(t)]);i("pick",r)}else"range"===n.selectionMode?n.rangeState.selecting?(n.minDate&&l>=n.minDate?i("pick",{minDate:n.minDate,maxDate:l}):i("pick",{minDate:l,maxDate:n.minDate}),i("select",!1)):(i("pick",{minDate:l,maxDate:null}),i("select",!0)):i("pick",o)};return Pp((()=>n.date),(async()=>{var e,t;(null==(e=o.value)?void 0:e.contains(document.activeElement))&&(await Qd(),null==(t=l.value)||t.focus())})),t({focus:()=>{var e;null==(e=l.value)||e.focus()}}),(e,t)=>(af(),cf("table",{role:"grid","aria-label":ed(r)("el.datepicker.monthTablePrompt"),class:pu(ed(s).b()),onClick:m,onMousemove:f},[ff("tbody",{ref_key:"tbodyRef",ref:o},[(af(!0),cf(Zp,null,Pg(ed(d),((e,t)=>(af(),cf("tr",{key:t},[(af(!0),cf(Zp,null,Pg(e,((e,t)=>(af(),cf("td",{key:t,ref_for:!0,ref:t=>p(e)&&(l.value=t),class:pu(g(e)),"aria-selected":`${p(e)}`,"aria-label":ed(r)("el.datepicker.month"+(+e.text+1)),tabindex:p(e)?0:-1,onKeydown:[uC(AC(m,["prevent","stop"]),["space"]),uC(AC(m,["prevent","stop"]),["enter"])]},[mf(ed(b4),{cell:{...e,renderText:ed(r)("el.datepicker.months."+A.value[e.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"])))),128))])))),128))],512)],42,["aria-label"]))}});var _4=KU(Q4,[["__file","basic-month-table.vue"]]);const S4=hg({__name:"basic-year-table",props:BU({...c4,selectionMode:d4("year")}),emits:["changerange","pick","select"],setup(e,{expose:t,emit:i}){const n=e,s=KF("year-table"),{t:r,lang:a}=CU(),o=zh(),l=zh(),A=qf((()=>10*Math.floor(n.date.year()/10))),c=zh([[],[],[]]),u=zh(),h=zh(),d=qf((()=>{var e;const t=c.value,i=nZ().locale(a.value).startOf("year");for(let s=0;s<3;s++){const r=t[s];for(let t=0;t<4&&!(4*s+t>=10);t++){let a=r[t];a||(a={row:s,column:t,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),a.type="normal";const o=4*s+t+A.value,l=nZ().year(o),c=n.rangeState.endDate||n.maxDate||n.rangeState.selecting&&n.minDate||null;a.inRange=!!(n.minDate&&l.isSameOrAfter(n.minDate,"year")&&c&&l.isSameOrBefore(c,"year"))||!!(n.minDate&&l.isSameOrBefore(n.minDate,"year")&&c&&l.isSameOrAfter(c,"year")),(null==(e=n.minDate)?void 0:e.isSameOrAfter(c))?(a.start=!(!c||!l.isSame(c,"year")),a.end=!(!n.minDate||!l.isSame(n.minDate,"year"))):(a.start=!(!n.minDate||!l.isSame(n.minDate,"year")),a.end=!(!c||!l.isSame(c,"year")));i.isSame(l)&&(a.type="today"),a.text=o;const u=l.toDate();a.disabled=n.disabledDate&&n.disabledDate(u)||!1,r[t]=a}}return t})),g=e=>{const t={},i=nZ().locale(a.value),s=e.text;return t.disabled=!!n.disabledDate&&((e,t)=>{const i=nZ(String(e)).locale(t).startOf("year"),n=i.endOf("year").dayOfYear();return rZ(n).map((e=>i.add(e,"day").toDate()))})(s,a.value).every(n.disabledDate),t.today=i.year()===s,t.current=P0(n.parsedValue).findIndex((e=>e.year()===s))>=0,e.inRange&&(t["in-range"]=!0,e.start&&(t["start-date"]=!0),e.end&&(t["end-date"]=!0)),t},p=e=>{const t=e.text;return P0(n.date).findIndex((e=>e.year()===t))>=0},f=e=>{var t;const s=null==(t=e.target)?void 0:t.closest("td");if(!s||!s.textContent||WU(s,"disabled"))return;const r=s.cellIndex,o=4*s.parentNode.rowIndex+r+A.value,l=nZ().year(o);if("range"===n.selectionMode)n.rangeState.selecting?(n.minDate&&l>=n.minDate?i("pick",{minDate:n.minDate,maxDate:l}):i("pick",{minDate:l,maxDate:n.minDate}),i("select",!1)):(i("pick",{minDate:l,maxDate:null}),i("select",!0));else if("years"===n.selectionMode){if("keydown"===e.type)return void i("pick",P0(n.parsedValue),!1);const t=I4(l.startOf("year"),a.value,n.disabledDate),r=WU(s,"current")?P0(n.parsedValue).filter((e=>(null==e?void 0:e.year())!==o)):P0(n.parsedValue).concat([t]);i("pick",r)}else i("pick",o)},m=e=>{var t;if(!n.rangeState.selecting)return;const s=null==(t=e.target)?void 0:t.closest("td");if(!s)return;const r=s.parentNode.rowIndex,a=s.cellIndex;d.value[r][a].disabled||r===u.value&&a===h.value||(u.value=r,h.value=a,i("changerange",{selecting:!0,endDate:nZ().year(A.value).add(4*r+a,"year")}))};return Pp((()=>n.date),(async()=>{var e,t;(null==(e=o.value)?void 0:e.contains(document.activeElement))&&(await Qd(),null==(t=l.value)||t.focus())})),t({focus:()=>{var e;null==(e=l.value)||e.focus()}}),(e,t)=>(af(),cf("table",{role:"grid","aria-label":ed(r)("el.datepicker.yearTablePrompt"),class:pu(ed(s).b()),onClick:f,onMousemove:m},[ff("tbody",{ref_key:"tbodyRef",ref:o},[(af(!0),cf(Zp,null,Pg(ed(d),((e,t)=>(af(),cf("tr",{key:t},[(af(!0),cf(Zp,null,Pg(e,((e,i)=>(af(),cf("td",{key:`${t}_${i}`,ref_for:!0,ref:t=>p(e)&&(l.value=t),class:pu(["available",g(e)]),"aria-selected":p(e),"aria-label":String(e.text),tabindex:p(e)?0:-1,onKeydown:[uC(AC(f,["prevent","stop"]),["space"]),uC(AC(f,["prevent","stop"]),["enter"])]},[mf(ed(b4),{cell:e},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"])))),128))])))),128))],512)],42,["aria-label"]))}});var x4=KU(S4,[["__file","basic-year-table.vue"]]);const k4=hg({__name:"panel-date-pick",props:g4,emits:["pick","set-picker-option","panel-change"],setup(e,{emit:t}){const i=e,n=KF("picker-panel"),s=KF("date-picker"),r=Jg(),a=jg(),{t:o,lang:l}=CU(),A=pp("EP_PICKER_BASE"),c=pp(SX),{shortcuts:u,disabledDate:h,cellClassName:d,defaultTime:g}=A.props,p=ld(A.props,"defaultValue"),f=zh(),m=zh(nZ().locale(l.value)),C=zh(!1);let I=!1;const v=qf((()=>nZ(g).locale(l.value))),B=qf((()=>m.value.month())),y=qf((()=>m.value.year())),b=zh([]),E=zh(null),w=zh(null),Q=e=>!(b.value.length>0)||(b.value,i.format,!0),_=e=>!g||J.value||C.value||I?O.value?e.millisecond(0):e.startOf("day"):v.value.year(e.year()).month(e.month()).date(e.date()),S=(e,...i)=>{if(e)if(Lc(e)){const n=e.map(_);t("pick",n,...i)}else t("pick",_(e),...i);else t("pick",e,...i);E.value=null,w.value=null,C.value=!1,I=!1},x=async(e,t)=>{if("date"===M.value){let n=i.parsedValue?i.parsedValue.year(e.year()).month(e.month()).date(e.date()):e;Q()||(n=b.value[0][0].year(e.year()).month(e.month()).date(e.date())),m.value=n,S(n,O.value||t),"datetime"===i.type&&(await Qd(),re())}else"week"===M.value?S(e.date):"dates"===M.value&&S(e,!0)},k=e=>{const t=e?"add":"subtract";m.value=m.value[t](1,"month"),le("month")},D=e=>{const t=m.value,i=e?"add":"subtract";m.value="year"===F.value?t[i](10,"year"):t[i](1,"year"),le("year")},F=zh("date"),T=qf((()=>{const e=o("el.datepicker.year");if("year"===F.value){const t=10*Math.floor(y.value/10);return e?`${t} ${e} - ${t+9} ${e}`:`${t} - ${t+9}`}return`${y.value} ${e}`})),M=qf((()=>{const{type:e}=i;return["week","month","months","year","years","dates"].includes(e)?e:"date"})),R=qf((()=>"dates"===M.value||"months"===M.value||"years"===M.value)),N=qf((()=>"date"===M.value?F.value:M.value)),L=qf((()=>!!u.length)),U=async(e,t)=>{"month"===M.value?(m.value=C4(m.value.year(),e,l.value,h),S(m.value,!1)):"months"===M.value?S(e,null==t||t):(m.value=C4(m.value.year(),e,l.value,h),F.value="date",["month","year","date","week"].includes(M.value)&&(S(m.value,!0),await Qd(),re())),le("month")},H=async(e,t)=>{if("year"===M.value){const t=m.value.startOf("year").year(e);m.value=I4(t,l.value,h),S(m.value,!1)}else if("years"===M.value)S(e,null==t||t);else{const t=m.value.year(e);m.value=I4(t,l.value,h),F.value="month",["month","year","date","week"].includes(M.value)&&(S(m.value,!0),await Qd(),re())}le("year")},P=async e=>{F.value=e,await Qd(),re()},O=qf((()=>"datetime"===i.type||"datetimerange"===i.type)),G=qf((()=>{const e=O.value||"dates"===M.value,t="years"===M.value,i="months"===M.value,n="date"===F.value,s="year"===F.value,r="month"===F.value;return e&&n||t&&s||i&&r})),K=qf((()=>!!h&&(!i.parsedValue||(Lc(i.parsedValue)?h(i.parsedValue[0].toDate()):h(i.parsedValue.toDate()))))),q=()=>{if(R.value)S(i.parsedValue);else{let e=i.parsedValue;if(!e){const t=nZ(g).locale(l.value),i=se();e=t.year(i.year()).month(i.month()).date(i.date())}m.value=e,S(e)}},Y=qf((()=>!!h&&h(nZ().locale(l.value).toDate()))),V=()=>{const e=nZ().locale(l.value).toDate();C.value=!0,h&&h(e)||!Q()||(m.value=nZ().locale(l.value),S(m.value))},W=qf((()=>i.timeFormat||oZ(i.format))),j=qf((()=>i.dateFormat||aZ(i.format))),J=qf((()=>w.value?w.value:i.parsedValue||p.value?(i.parsedValue||m.value).format(W.value):void 0)),z=qf((()=>E.value?E.value:i.parsedValue||p.value?(i.parsedValue||m.value).format(j.value):void 0)),X=zh(!1),$=()=>{X.value=!0},Z=()=>{X.value=!1},ee=e=>({hour:e.hour(),minute:e.minute(),second:e.second(),year:e.year(),month:e.month(),date:e.date()}),te=(e,t,n)=>{const{hour:s,minute:r,second:a}=ee(e),o=i.parsedValue?i.parsedValue.hour(s).minute(r).second(a):e;m.value=o,S(m.value,!0),n||(X.value=t)},ie=e=>{const t=nZ(e,W.value).locale(l.value);if(t.isValid()&&Q()){const{year:e,month:i,date:n}=ee(m.value);m.value=t.year(e).month(i).date(n),w.value=null,X.value=!1,S(m.value,!0)}},ne=e=>{const t=nZ(e,j.value).locale(l.value);if(t.isValid()){if(h&&h(t.toDate()))return;const{hour:e,minute:i,second:n}=ee(m.value);m.value=t.hour(e).minute(i).second(n),E.value=null,S(m.value,!0)}},se=()=>{const e=nZ(p.value).locale(l.value);if(!p.value){const e=v.value;return nZ().hour(e.hour()).minute(e.minute()).second(e.second()).locale(l.value)}return e},re=async()=>{var e;["week","month","year","date"].includes(M.value)&&(null==(e=f.value)||e.focus(),"week"===M.value&&oe(zJ.down))},ae=e=>{const{code:t}=e;[zJ.up,zJ.down,zJ.left,zJ.right,zJ.home,zJ.end,zJ.pageUp,zJ.pageDown].includes(t)&&(oe(t),e.stopPropagation(),e.preventDefault()),[zJ.enter,zJ.space,zJ.numpadEnter].includes(t)&&null===E.value&&null===w.value&&(e.preventDefault(),S(m.value,!1))},oe=e=>{var i;const{up:n,down:s,left:r,right:a,home:o,end:A,pageUp:c,pageDown:u}=zJ,d={year:{[n]:-4,[s]:4,[r]:-1,[a]:1,offset:(e,t)=>e.setFullYear(e.getFullYear()+t)},month:{[n]:-4,[s]:4,[r]:-1,[a]:1,offset:(e,t)=>e.setMonth(e.getMonth()+t)},week:{[n]:-1,[s]:1,[r]:-1,[a]:1,offset:(e,t)=>e.setDate(e.getDate()+7*t)},date:{[n]:-7,[s]:7,[r]:-1,[a]:1,[o]:e=>-e.getDay(),[A]:e=>6-e.getDay(),[c]:e=>-new Date(e.getFullYear(),e.getMonth(),0).getDate(),[u]:e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),offset:(e,t)=>e.setDate(e.getDate()+t)}},g=m.value.toDate();for(;Math.abs(m.value.diff(g,"year",!0))<1;){const n=d[N.value];if(!n)return;if(n.offset(g,Oc(n[e])?n[e](g):null!=(i=n[e])?i:0),h&&h(g))break;const s=nZ(g).locale(l.value);m.value=s,t("pick",s,!0);break}},le=e=>{t("panel-change",m.value.toDate(),e,F.value)};return Pp((()=>M.value),(e=>{["month","year"].includes(e)?F.value=e:F.value="years"!==e?"months"!==e?"date":"month":"year"}),{immediate:!0}),Pp((()=>F.value),(()=>{null==c||c.updatePopper()})),Pp((()=>p.value),(e=>{e&&(m.value=se())}),{immediate:!0}),Pp((()=>i.parsedValue),(e=>{if(e){if(R.value)return;if(Lc(e))return;m.value=e}else m.value=se()}),{immediate:!0}),t("set-picker-option",["isValidValue",e=>nZ.isDayjs(e)&&e.isValid()&&(!h||!h(e.toDate()))]),t("set-picker-option",["formatToString",e=>Lc(e)?e.map((e=>e.format(i.format))):e.format(i.format)]),t("set-picker-option",["parseUserInput",e=>nZ(e,i.format).locale(l.value)]),t("set-picker-option",["handleFocusPicker",re]),(e,i)=>(af(),cf("div",{class:pu([ed(n).b(),ed(s).b(),{"has-sidebar":e.$slots.sidebar||ed(L),"has-time":ed(O)}])},[ff("div",{class:pu(ed(n).e("body-wrapper"))},[Gg(e.$slots,"sidebar",{class:pu(ed(n).e("sidebar"))}),ed(L)?(af(),cf("div",{key:0,class:pu(ed(n).e("sidebar"))},[(af(!0),cf(Zp,null,Pg(ed(u),((e,i)=>(af(),cf("button",{key:i,type:"button",class:pu(ed(n).e("shortcut")),onClick:i=>(e=>{const i=Oc(e.value)?e.value():e.value;if(i)return I=!0,void S(nZ(i).locale(l.value));e.onClick&&e.onClick({attrs:r,slots:a,emit:t})})(e)},yu(e.text),11,["onClick"])))),128))],2)):Bf("v-if",!0),ff("div",{class:pu(ed(n).e("body"))},[ed(O)?(af(),cf("div",{key:0,class:pu(ed(s).e("time-header"))},[ff("span",{class:pu(ed(s).e("editor-wrap"))},[mf(ed(Xj),{placeholder:ed(o)("el.datepicker.selectDate"),"model-value":ed(z),size:"small","validate-event":!1,onInput:e=>E.value=e,onChange:ne},null,8,["placeholder","model-value","onInput"])],2),Ld((af(),cf("span",{class:pu(ed(s).e("editor-wrap"))},[mf(ed(Xj),{placeholder:ed(o)("el.datepicker.selectTime"),"model-value":ed(J),size:"small","validate-event":!1,onFocus:$,onInput:e=>w.value=e,onChange:ie},null,8,["placeholder","model-value","onInput"]),mf(ed(i4),{visible:X.value,format:ed(W),"parsed-value":m.value,onPick:te},null,8,["visible","format","parsed-value"])],2)),[[ed($0),Z]])],2)):Bf("v-if",!0),Ld(ff("div",{class:pu([ed(s).e("header"),("year"===F.value||"month"===F.value)&&ed(s).e("header--bordered")])},[ff("span",{class:pu(ed(s).e("prev-btn"))},[ff("button",{type:"button","aria-label":ed(o)("el.datepicker.prevYear"),class:pu(["d-arrow-left",ed(n).e("icon-btn")]),onClick:e=>D(!1)},[Gg(e.$slots,"prev-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(zO))])),_:1})]))],10,["aria-label","onClick"]),Ld(ff("button",{type:"button","aria-label":ed(o)("el.datepicker.prevMonth"),class:pu([ed(n).e("icon-btn"),"arrow-left"]),onClick:e=>k(!1)},[Gg(e.$slots,"prev-month",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(kH))])),_:1})]))],10,["aria-label","onClick"]),[[ym,"date"===F.value]])],2),ff("span",{role:"button",class:pu(ed(s).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:uC((e=>P("year")),["enter"]),onClick:e=>P("year")},yu(ed(T)),43,["onKeydown","onClick"]),Ld(ff("span",{role:"button","aria-live":"polite",tabindex:"0",class:pu([ed(s).e("header-label"),{active:"month"===F.value}]),onKeydown:uC((e=>P("month")),["enter"]),onClick:e=>P("month")},yu(ed(o)(`el.datepicker.month${ed(B)+1}`)),43,["onKeydown","onClick"]),[[ym,"date"===F.value]]),ff("span",{class:pu(ed(s).e("next-btn"))},[Ld(ff("button",{type:"button","aria-label":ed(o)("el.datepicker.nextMonth"),class:pu([ed(n).e("icon-btn"),"arrow-right"]),onClick:e=>k(!0)},[Gg(e.$slots,"next-month",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(MH))])),_:1})]))],10,["aria-label","onClick"]),[[ym,"date"===F.value]]),ff("button",{type:"button","aria-label":ed(o)("el.datepicker.nextYear"),class:pu([ed(n).e("icon-btn"),"d-arrow-right"]),onClick:e=>D(!0)},[Gg(e.$slots,"next-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed($O))])),_:1})]))],10,["aria-label","onClick"])],2)],2),[[ym,"time"!==F.value]]),ff("div",{class:pu(ed(n).e("content")),onKeydown:ae},["date"===F.value?(af(),uf(w4,{key:0,ref_key:"currentViewRef",ref:f,"selection-mode":ed(M),date:m.value,"parsed-value":e.parsedValue,"disabled-date":ed(h),"cell-class-name":ed(d),onPick:x},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):Bf("v-if",!0),"year"===F.value?(af(),uf(x4,{key:1,ref_key:"currentViewRef",ref:f,"selection-mode":ed(M),date:m.value,"disabled-date":ed(h),"parsed-value":e.parsedValue,onPick:H},null,8,["selection-mode","date","disabled-date","parsed-value"])):Bf("v-if",!0),"month"===F.value?(af(),uf(_4,{key:2,ref_key:"currentViewRef",ref:f,"selection-mode":ed(M),date:m.value,"parsed-value":e.parsedValue,"disabled-date":ed(h),onPick:U},null,8,["selection-mode","date","parsed-value","disabled-date"])):Bf("v-if",!0)],34)],2)],2),Ld(ff("div",{class:pu(ed(n).e("footer"))},[Ld(mf(ed(eZ),{text:"",size:"small",class:pu(ed(n).e("link-btn")),disabled:ed(Y),onClick:V},{default:Nd((()=>[vf(yu(ed(o)("el.datepicker.now")),1)])),_:1},8,["class","disabled"]),[[ym,!ed(R)&&e.showNow]]),mf(ed(eZ),{plain:"",size:"small",class:pu(ed(n).e("link-btn")),disabled:ed(K),onClick:q},{default:Nd((()=>[vf(yu(ed(o)("el.datepicker.confirm")),1)])),_:1},8,["class","disabled"])],2),[[ym,ed(G)]])],2))}});var D4=KU(k4,[["__file","panel-date-pick.vue"]]);const F4=BU({...u4,...h4,visible:Boolean}),T4=e=>{const{emit:t}=kf(),i=Jg(),n=jg();return s=>{const r=Oc(s.value)?s.value():s.value;r?t("pick",[nZ(r[0]).locale(e.value),nZ(r[1]).locale(e.value)]):s.onClick&&s.onClick({attrs:i,slots:n,emit:t})}},M4=(e,{defaultValue:t,leftDate:i,rightDate:n,unit:s,onParsedValueChanged:r})=>{const{emit:a}=kf(),{pickerNs:o}=pp(o4),l=KF("date-range-picker"),{t:A,lang:c}=CU(),u=T4(c),h=zh(),d=zh(),g=zh({endDate:null,selecting:!1}),p=e=>{if(Lc(e)&&2===e.length){const[t,n]=e;h.value=t,i.value=t,d.value=n,r(ed(h),ed(d))}else f()},f=()=>{const[r,a]=f4(ed(t),{lang:ed(c),unit:s,unlinkPanels:e.unlinkPanels});h.value=void 0,d.value=void 0,i.value=r,n.value=a};return Pp(t,(e=>{e&&f()}),{immediate:!0}),Pp((()=>e.parsedValue),p,{immediate:!0}),{minDate:h,maxDate:d,rangeState:g,lang:c,ppNs:o,drpNs:l,handleChangeRange:e=>{g.value=e},handleRangeConfirm:(e=!1)=>{const t=ed(h),i=ed(d);p4([t,i])&&a("pick",[t,i],e)},handleShortcutClick:u,onSelect:e=>{g.value.selecting=e,e||(g.value.endDate=null)},onReset:p,t:A}},R4="month",N4=hg({__name:"panel-date-range",props:F4,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(e,{emit:t}){const i=e,n=pp("EP_PICKER_BASE"),{disabledDate:s,cellClassName:r,defaultTime:a,clearable:o}=n.props,l=ld(n.props,"format"),A=ld(n.props,"shortcuts"),c=ld(n.props,"defaultValue"),{lang:u}=CU(),h=zh(nZ().locale(u.value)),d=zh(nZ().locale(u.value).add(1,R4)),{minDate:g,maxDate:p,rangeState:f,ppNs:m,drpNs:C,handleChangeRange:I,handleRangeConfirm:v,handleShortcutClick:B,onSelect:y,onReset:b,t:E}=M4(i,{defaultValue:c,leftDate:h,rightDate:d,unit:R4,onParsedValueChanged:function(e,t){if(i.unlinkPanels&&t){const i=(null==e?void 0:e.year())||0,n=(null==e?void 0:e.month())||0,s=t.year(),r=t.month();d.value=i===s&&n===r?t.add(1,R4):t}else d.value=h.value.add(1,R4),t&&(d.value=d.value.hour(t.hour()).minute(t.minute()).second(t.second()))}});Pp((()=>i.visible),(e=>{!e&&f.value.selecting&&(b(i.parsedValue),y(!1))}));const w=zh({min:null,max:null}),Q=zh({min:null,max:null}),_=qf((()=>`${h.value.year()} ${E("el.datepicker.year")} ${E(`el.datepicker.month${h.value.month()+1}`)}`)),S=qf((()=>`${d.value.year()} ${E("el.datepicker.year")} ${E(`el.datepicker.month${d.value.month()+1}`)}`)),x=qf((()=>h.value.year())),k=qf((()=>h.value.month())),D=qf((()=>d.value.year())),F=qf((()=>d.value.month())),T=qf((()=>!!A.value.length)),M=qf((()=>null!==w.value.min?w.value.min:g.value?g.value.format(H.value):"")),R=qf((()=>null!==w.value.max?w.value.max:p.value||g.value?(p.value||g.value).format(H.value):"")),N=qf((()=>null!==Q.value.min?Q.value.min:g.value?g.value.format(U.value):"")),L=qf((()=>null!==Q.value.max?Q.value.max:p.value||g.value?(p.value||g.value).format(U.value):"")),U=qf((()=>i.timeFormat||oZ(l.value))),H=qf((()=>i.dateFormat||aZ(l.value))),P=()=>{h.value=h.value.subtract(1,"year"),i.unlinkPanels||(d.value=h.value.add(1,"month")),j("year")},O=()=>{h.value=h.value.subtract(1,"month"),i.unlinkPanels||(d.value=h.value.add(1,"month")),j("month")},G=()=>{i.unlinkPanels?d.value=d.value.add(1,"year"):(h.value=h.value.add(1,"year"),d.value=h.value.add(1,"month")),j("year")},K=()=>{i.unlinkPanels?d.value=d.value.add(1,"month"):(h.value=h.value.add(1,"month"),d.value=h.value.add(1,"month")),j("month")},q=()=>{h.value=h.value.add(1,"year"),j("year")},Y=()=>{h.value=h.value.add(1,"month"),j("month")},V=()=>{d.value=d.value.subtract(1,"year"),j("year")},W=()=>{d.value=d.value.subtract(1,"month"),j("month")},j=e=>{t("panel-change",[h.value.toDate(),d.value.toDate()],e)},J=qf((()=>{const e=(k.value+1)%12,t=k.value+1>=12?1:0;return i.unlinkPanels&&new Date(x.value+t,e)<new Date(D.value,F.value)})),z=qf((()=>i.unlinkPanels&&12*D.value+F.value-(12*x.value+k.value+1)>=12)),X=qf((()=>!(g.value&&p.value&&!f.value.selecting&&p4([g.value,p.value])))),$=qf((()=>"datetime"===i.type||"datetimerange"===i.type)),Z=(e,t)=>{if(e){if(a){return nZ(a[t]||a).locale(u.value).year(e.year()).month(e.month()).date(e.date())}return e}},ee=(e,i=!0)=>{const n=e.minDate,s=e.maxDate,r=Z(n,0),a=Z(s,1);p.value===a&&g.value===r||(t("calendar-change",[n.toDate(),s&&s.toDate()]),p.value=a,g.value=r,i&&!$.value&&v())},te=zh(!1),ie=zh(!1),ne=()=>{te.value=!1},se=()=>{ie.value=!1},re=(e,t)=>{w.value[t]=e;const n=nZ(e,H.value).locale(u.value);if(n.isValid()){if(s&&s(n.toDate()))return;"min"===t?(h.value=n,g.value=(g.value||h.value).year(n.year()).month(n.month()).date(n.date()),i.unlinkPanels||p.value&&!p.value.isBefore(g.value)||(d.value=n.add(1,"month"),p.value=g.value.add(1,"month"))):(d.value=n,p.value=(p.value||d.value).year(n.year()).month(n.month()).date(n.date()),i.unlinkPanels||g.value&&!g.value.isAfter(p.value)||(h.value=n.subtract(1,"month"),g.value=p.value.subtract(1,"month")))}},ae=(e,t)=>{w.value[t]=null},oe=(e,t)=>{Q.value[t]=e;const i=nZ(e,U.value).locale(u.value);i.isValid()&&("min"===t?(te.value=!0,g.value=(g.value||h.value).hour(i.hour()).minute(i.minute()).second(i.second())):(ie.value=!0,p.value=(p.value||d.value).hour(i.hour()).minute(i.minute()).second(i.second()),d.value=p.value))},le=(e,t)=>{Q.value[t]=null,"min"===t?(h.value=g.value,te.value=!1,p.value&&!p.value.isBefore(g.value)||(p.value=g.value)):(d.value=p.value,ie.value=!1,p.value&&p.value.isBefore(g.value)&&(g.value=p.value))},Ae=(e,t,i)=>{Q.value.min||(e&&(h.value=e,g.value=(g.value||h.value).hour(e.hour()).minute(e.minute()).second(e.second())),i||(te.value=t),p.value&&!p.value.isBefore(g.value)||(p.value=g.value,d.value=e))},ce=(e,t,i)=>{Q.value.max||(e&&(d.value=e,p.value=(p.value||d.value).hour(e.hour()).minute(e.minute()).second(e.second())),i||(ie.value=t),p.value&&p.value.isBefore(g.value)&&(g.value=p.value))},ue=()=>{h.value=f4(ed(c),{lang:ed(u),unit:"month",unlinkPanels:i.unlinkPanels})[0],d.value=h.value.add(1,"month"),p.value=void 0,g.value=void 0,t("pick",null)};return t("set-picker-option",["isValidValue",e=>p4(e)&&(!s||!s(e[0].toDate())&&!s(e[1].toDate()))]),t("set-picker-option",["parseUserInput",e=>Lc(e)?e.map((e=>nZ(e,l.value).locale(u.value))):nZ(e,l.value).locale(u.value)]),t("set-picker-option",["formatToString",e=>Lc(e)?e.map((e=>e.format(l.value))):e.format(l.value)]),t("set-picker-option",["handleClear",ue]),(e,t)=>(af(),cf("div",{class:pu([ed(m).b(),ed(C).b(),{"has-sidebar":e.$slots.sidebar||ed(T),"has-time":ed($)}])},[ff("div",{class:pu(ed(m).e("body-wrapper"))},[Gg(e.$slots,"sidebar",{class:pu(ed(m).e("sidebar"))}),ed(T)?(af(),cf("div",{key:0,class:pu(ed(m).e("sidebar"))},[(af(!0),cf(Zp,null,Pg(ed(A),((e,t)=>(af(),cf("button",{key:t,type:"button",class:pu(ed(m).e("shortcut")),onClick:t=>ed(B)(e)},yu(e.text),11,["onClick"])))),128))],2)):Bf("v-if",!0),ff("div",{class:pu(ed(m).e("body"))},[ed($)?(af(),cf("div",{key:0,class:pu(ed(C).e("time-header"))},[ff("span",{class:pu(ed(C).e("editors-wrap"))},[ff("span",{class:pu(ed(C).e("time-picker-wrap"))},[mf(ed(Xj),{size:"small",disabled:ed(f).selecting,placeholder:ed(E)("el.datepicker.startDate"),class:pu(ed(C).e("editor")),"model-value":ed(M),"validate-event":!1,onInput:e=>re(e,"min"),onChange:e=>ae(0,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),Ld((af(),cf("span",{class:pu(ed(C).e("time-picker-wrap"))},[mf(ed(Xj),{size:"small",class:pu(ed(C).e("editor")),disabled:ed(f).selecting,placeholder:ed(E)("el.datepicker.startTime"),"model-value":ed(N),"validate-event":!1,onFocus:e=>te.value=!0,onInput:e=>oe(e,"min"),onChange:e=>le(0,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),mf(ed(i4),{visible:te.value,format:ed(U),"datetime-role":"start","parsed-value":h.value,onPick:Ae},null,8,["visible","format","parsed-value"])],2)),[[ed($0),ne]])],2),ff("span",null,[mf(ed(gH),null,{default:Nd((()=>[mf(ed(MH))])),_:1})]),ff("span",{class:pu([ed(C).e("editors-wrap"),"is-right"])},[ff("span",{class:pu(ed(C).e("time-picker-wrap"))},[mf(ed(Xj),{size:"small",class:pu(ed(C).e("editor")),disabled:ed(f).selecting,placeholder:ed(E)("el.datepicker.endDate"),"model-value":ed(R),readonly:!ed(g),"validate-event":!1,onInput:e=>re(e,"max"),onChange:e=>ae(0,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),Ld((af(),cf("span",{class:pu(ed(C).e("time-picker-wrap"))},[mf(ed(Xj),{size:"small",class:pu(ed(C).e("editor")),disabled:ed(f).selecting,placeholder:ed(E)("el.datepicker.endTime"),"model-value":ed(L),readonly:!ed(g),"validate-event":!1,onFocus:e=>ed(g)&&(ie.value=!0),onInput:e=>oe(e,"max"),onChange:e=>le(0,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),mf(ed(i4),{"datetime-role":"end",visible:ie.value,format:ed(U),"parsed-value":d.value,onPick:ce},null,8,["visible","format","parsed-value"])],2)),[[ed($0),se]])],2)],2)):Bf("v-if",!0),ff("div",{class:pu([[ed(m).e("content"),ed(C).e("content")],"is-left"])},[ff("div",{class:pu(ed(C).e("header"))},[ff("button",{type:"button",class:pu([ed(m).e("icon-btn"),"d-arrow-left"]),"aria-label":ed(E)("el.datepicker.prevYear"),onClick:P},[Gg(e.$slots,"prev-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(zO))])),_:1})]))],10,["aria-label"]),ff("button",{type:"button",class:pu([ed(m).e("icon-btn"),"arrow-left"]),"aria-label":ed(E)("el.datepicker.prevMonth"),onClick:O},[Gg(e.$slots,"prev-month",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(kH))])),_:1})]))],10,["aria-label"]),e.unlinkPanels?(af(),cf("button",{key:0,type:"button",disabled:!ed(z),class:pu([[ed(m).e("icon-btn"),{"is-disabled":!ed(z)}],"d-arrow-right"]),"aria-label":ed(E)("el.datepicker.nextYear"),onClick:q},[Gg(e.$slots,"next-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed($O))])),_:1})]))],10,["disabled","aria-label"])):Bf("v-if",!0),e.unlinkPanels?(af(),cf("button",{key:1,type:"button",disabled:!ed(J),class:pu([[ed(m).e("icon-btn"),{"is-disabled":!ed(J)}],"arrow-right"]),"aria-label":ed(E)("el.datepicker.nextMonth"),onClick:Y},[Gg(e.$slots,"next-month",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(MH))])),_:1})]))],10,["disabled","aria-label"])):Bf("v-if",!0),ff("div",null,yu(ed(_)),1)],2),mf(w4,{"selection-mode":"range",date:h.value,"min-date":ed(g),"max-date":ed(p),"range-state":ed(f),"disabled-date":ed(s),"cell-class-name":ed(r),onChangerange:ed(I),onPick:ee,onSelect:ed(y)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),ff("div",{class:pu([[ed(m).e("content"),ed(C).e("content")],"is-right"])},[ff("div",{class:pu(ed(C).e("header"))},[e.unlinkPanels?(af(),cf("button",{key:0,type:"button",disabled:!ed(z),class:pu([[ed(m).e("icon-btn"),{"is-disabled":!ed(z)}],"d-arrow-left"]),"aria-label":ed(E)("el.datepicker.prevYear"),onClick:V},[Gg(e.$slots,"prev-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(zO))])),_:1})]))],10,["disabled","aria-label"])):Bf("v-if",!0),e.unlinkPanels?(af(),cf("button",{key:1,type:"button",disabled:!ed(J),class:pu([[ed(m).e("icon-btn"),{"is-disabled":!ed(J)}],"arrow-left"]),"aria-label":ed(E)("el.datepicker.prevMonth"),onClick:W},[Gg(e.$slots,"prev-month",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(kH))])),_:1})]))],10,["disabled","aria-label"])):Bf("v-if",!0),ff("button",{type:"button","aria-label":ed(E)("el.datepicker.nextYear"),class:pu([ed(m).e("icon-btn"),"d-arrow-right"]),onClick:G},[Gg(e.$slots,"next-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed($O))])),_:1})]))],10,["aria-label"]),ff("button",{type:"button",class:pu([ed(m).e("icon-btn"),"arrow-right"]),"aria-label":ed(E)("el.datepicker.nextMonth"),onClick:K},[Gg(e.$slots,"next-month",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(MH))])),_:1})]))],10,["aria-label"]),ff("div",null,yu(ed(S)),1)],2),mf(w4,{"selection-mode":"range",date:d.value,"min-date":ed(g),"max-date":ed(p),"range-state":ed(f),"disabled-date":ed(s),"cell-class-name":ed(r),onChangerange:ed(I),onPick:ee,onSelect:ed(y)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),ed($)?(af(),cf("div",{key:0,class:pu(ed(m).e("footer"))},[ed(o)?(af(),uf(ed(eZ),{key:0,text:"",size:"small",class:pu(ed(m).e("link-btn")),onClick:ue},{default:Nd((()=>[vf(yu(ed(E)("el.datepicker.clear")),1)])),_:1},8,["class"])):Bf("v-if",!0),mf(ed(eZ),{plain:"",size:"small",class:pu(ed(m).e("link-btn")),disabled:ed(X),onClick:e=>ed(v)(!1)},{default:Nd((()=>[vf(yu(ed(E)("el.datepicker.confirm")),1)])),_:1},8,["class","disabled","onClick"])],2)):Bf("v-if",!0)],2))}});var L4=KU(N4,[["__file","panel-date-range.vue"]]);const U4=BU({...h4}),H4="year",P4=hg({...hg({name:"DatePickerMonthRange"}),props:U4,emits:["pick","set-picker-option","calendar-change"],setup(e,{emit:t}){const i=e,{lang:n}=CU(),s=pp("EP_PICKER_BASE"),{shortcuts:r,disabledDate:a}=s.props,o=ld(s.props,"format"),l=ld(s.props,"defaultValue"),A=zh(nZ().locale(n.value)),c=zh(nZ().locale(n.value).add(1,H4)),{minDate:u,maxDate:h,rangeState:d,ppNs:g,drpNs:p,handleChangeRange:f,handleRangeConfirm:m,handleShortcutClick:C,onSelect:I}=M4(i,{defaultValue:l,leftDate:A,rightDate:c,unit:H4,onParsedValueChanged:function(e,t){if(i.unlinkPanels&&t){const i=(null==e?void 0:e.year())||0,n=t.year();c.value=i===n?t.add(1,H4):t}else c.value=A.value.add(1,H4)}}),v=qf((()=>!!r.length)),{leftPrevYear:B,rightNextYear:y,leftNextYear:b,rightPrevYear:E,leftLabel:w,rightLabel:Q,leftYear:_,rightYear:S}=(({unlinkPanels:e,leftDate:t,rightDate:i})=>{const{t:n}=CU();return{leftPrevYear:()=>{t.value=t.value.subtract(1,"year"),e.value||(i.value=i.value.subtract(1,"year"))},rightNextYear:()=>{e.value||(t.value=t.value.add(1,"year")),i.value=i.value.add(1,"year")},leftNextYear:()=>{t.value=t.value.add(1,"year")},rightPrevYear:()=>{i.value=i.value.subtract(1,"year")},leftLabel:qf((()=>`${t.value.year()} ${n("el.datepicker.year")}`)),rightLabel:qf((()=>`${i.value.year()} ${n("el.datepicker.year")}`)),leftYear:qf((()=>t.value.year())),rightYear:qf((()=>i.value.year()===t.value.year()?t.value.year()+1:i.value.year()))}})({unlinkPanels:ld(i,"unlinkPanels"),leftDate:A,rightDate:c}),x=qf((()=>i.unlinkPanels&&S.value>_.value+1)),k=(e,i=!0)=>{const n=e.minDate,s=e.maxDate;h.value===s&&u.value===n||(t("calendar-change",[n.toDate(),s&&s.toDate()]),h.value=s,u.value=n,i&&m())};return t("set-picker-option",["isValidValue",p4]),t("set-picker-option",["formatToString",e=>Lc(e)?e.map((e=>e.format(o.value))):e.format(o.value)]),t("set-picker-option",["parseUserInput",e=>Lc(e)?e.map((e=>nZ(e,o.value).locale(n.value))):nZ(e,o.value).locale(n.value)]),t("set-picker-option",["handleClear",()=>{A.value=f4(ed(l),{lang:ed(n),unit:"year",unlinkPanels:i.unlinkPanels})[0],c.value=A.value.add(1,"year"),t("pick",null)}]),(e,t)=>(af(),cf("div",{class:pu([ed(g).b(),ed(p).b(),{"has-sidebar":Boolean(e.$slots.sidebar)||ed(v)}])},[ff("div",{class:pu(ed(g).e("body-wrapper"))},[Gg(e.$slots,"sidebar",{class:pu(ed(g).e("sidebar"))}),ed(v)?(af(),cf("div",{key:0,class:pu(ed(g).e("sidebar"))},[(af(!0),cf(Zp,null,Pg(ed(r),((e,t)=>(af(),cf("button",{key:t,type:"button",class:pu(ed(g).e("shortcut")),onClick:t=>ed(C)(e)},yu(e.text),11,["onClick"])))),128))],2)):Bf("v-if",!0),ff("div",{class:pu(ed(g).e("body"))},[ff("div",{class:pu([[ed(g).e("content"),ed(p).e("content")],"is-left"])},[ff("div",{class:pu(ed(p).e("header"))},[ff("button",{type:"button",class:pu([ed(g).e("icon-btn"),"d-arrow-left"]),onClick:ed(B)},[Gg(e.$slots,"prev-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(zO))])),_:1})]))],10,["onClick"]),e.unlinkPanels?(af(),cf("button",{key:0,type:"button",disabled:!ed(x),class:pu([[ed(g).e("icon-btn"),{[ed(g).is("disabled")]:!ed(x)}],"d-arrow-right"]),onClick:ed(b)},[Gg(e.$slots,"next-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed($O))])),_:1})]))],10,["disabled","onClick"])):Bf("v-if",!0),ff("div",null,yu(ed(w)),1)],2),mf(_4,{"selection-mode":"range",date:A.value,"min-date":ed(u),"max-date":ed(h),"range-state":ed(d),"disabled-date":ed(a),onChangerange:ed(f),onPick:k,onSelect:ed(I)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),ff("div",{class:pu([[ed(g).e("content"),ed(p).e("content")],"is-right"])},[ff("div",{class:pu(ed(p).e("header"))},[e.unlinkPanels?(af(),cf("button",{key:0,type:"button",disabled:!ed(x),class:pu([[ed(g).e("icon-btn"),{"is-disabled":!ed(x)}],"d-arrow-left"]),onClick:ed(E)},[Gg(e.$slots,"prev-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(zO))])),_:1})]))],10,["disabled","onClick"])):Bf("v-if",!0),ff("button",{type:"button",class:pu([ed(g).e("icon-btn"),"d-arrow-right"]),onClick:ed(y)},[Gg(e.$slots,"next-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed($O))])),_:1})]))],10,["onClick"]),ff("div",null,yu(ed(Q)),1)],2),mf(_4,{"selection-mode":"range",date:c.value,"min-date":ed(u),"max-date":ed(h),"range-state":ed(d),"disabled-date":ed(a),onChangerange:ed(f),onPick:k,onSelect:ed(I)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var O4=KU(P4,[["__file","panel-month-range.vue"]]);const G4=BU({...h4}),K4="year",q4=hg({...hg({name:"DatePickerYearRange"}),props:G4,emits:["pick","set-picker-option","calendar-change"],setup(e,{emit:t}){const i=e,{lang:n}=CU(),s=zh(nZ().locale(n.value)),r=zh(s.value.add(10,"year")),{pickerNs:a}=pp(o4),o=KF("date-range-picker"),l=qf((()=>!!k.length)),A=qf((()=>[a.b(),o.b(),{"has-sidebar":Boolean(jg().sidebar)||l.value}])),c=qf((()=>({content:[a.e("content"),o.e("content"),"is-left"],arrowLeftBtn:[a.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),{[a.is("disabled")]:!B.value},"d-arrow-right"]}))),u=qf((()=>({content:[a.e("content"),o.e("content"),"is-right"],arrowLeftBtn:[a.e("icon-btn"),{"is-disabled":!B.value},"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),"d-arrow-right"]}))),h=T4(n),{leftPrevYear:d,rightNextYear:g,leftNextYear:p,rightPrevYear:f,leftLabel:m,rightLabel:C,leftYear:I,rightYear:v}=(({unlinkPanels:e,leftDate:t,rightDate:i})=>({leftPrevYear:()=>{t.value=t.value.subtract(10,"year"),e.value||(i.value=i.value.subtract(10,"year"))},rightNextYear:()=>{e.value||(t.value=t.value.add(10,"year")),i.value=i.value.add(10,"year")},leftNextYear:()=>{t.value=t.value.add(10,"year")},rightPrevYear:()=>{i.value=i.value.subtract(10,"year")},leftLabel:qf((()=>{const e=10*Math.floor(t.value.year()/10);return`${e}-${e+9}`})),rightLabel:qf((()=>{const e=10*Math.floor(i.value.year()/10);return`${e}-${e+9}`})),leftYear:qf((()=>10*Math.floor(t.value.year()/10)+9)),rightYear:qf((()=>10*Math.floor(i.value.year()/10)))}))({unlinkPanels:ld(i,"unlinkPanels"),leftDate:s,rightDate:r}),B=qf((()=>i.unlinkPanels&&v.value>I.value+1)),y=zh(),b=zh(),E=zh({endDate:null,selecting:!1}),w=e=>{E.value=e},Q=(e,i=!0)=>{const n=e.minDate,s=e.maxDate;b.value===s&&y.value===n||(t("calendar-change",[n.toDate(),s&&s.toDate()]),b.value=s,y.value=n,i&&_())},_=(e=!1)=>{p4([y.value,b.value])&&t("pick",[y.value,b.value],e)},S=e=>{E.value.selecting=e,e||(E.value.endDate=null)},x=pp("EP_PICKER_BASE"),{shortcuts:k,disabledDate:D}=x.props,F=ld(x.props,"format"),T=ld(x.props,"defaultValue"),M=()=>{let e;if(Lc(T.value)){const e=nZ(T.value[0]);let t=nZ(T.value[1]);return i.unlinkPanels||(t=e.add(10,K4)),[e,t]}return e=T.value?nZ(T.value):nZ(),e=e.locale(n.value),[e,e.add(10,K4)]};Pp((()=>T.value),(e=>{if(e){const e=M();s.value=e[0],r.value=e[1]}}),{immediate:!0}),Pp((()=>i.parsedValue),(e=>{if(e&&2===e.length)if(y.value=e[0],b.value=e[1],s.value=y.value,i.unlinkPanels&&b.value){const e=y.value.year(),t=b.value.year();r.value=e===t?b.value.add(10,"year"):b.value}else r.value=s.value.add(10,"year");else{const e=M();y.value=void 0,b.value=void 0,s.value=e[0],r.value=e[1]}}),{immediate:!0});return t("set-picker-option",["isValidValue",e=>p4(e)&&(!D||!D(e[0].toDate())&&!D(e[1].toDate()))]),t("set-picker-option",["parseUserInput",e=>Lc(e)?e.map((e=>nZ(e,F.value).locale(n.value))):nZ(e,F.value).locale(n.value)]),t("set-picker-option",["formatToString",e=>Lc(e)?e.map((e=>e.format(F.value))):e.format(F.value)]),t("set-picker-option",["handleClear",()=>{const e=M();s.value=e[0],r.value=e[1],b.value=void 0,y.value=void 0,t("pick",null)}]),(e,t)=>(af(),cf("div",{class:pu(ed(A))},[ff("div",{class:pu(ed(a).e("body-wrapper"))},[Gg(e.$slots,"sidebar",{class:pu(ed(a).e("sidebar"))}),ed(l)?(af(),cf("div",{key:0,class:pu(ed(a).e("sidebar"))},[(af(!0),cf(Zp,null,Pg(ed(k),((e,t)=>(af(),cf("button",{key:t,type:"button",class:pu(ed(a).e("shortcut")),onClick:t=>ed(h)(e)},yu(e.text),11,["onClick"])))),128))],2)):Bf("v-if",!0),ff("div",{class:pu(ed(a).e("body"))},[ff("div",{class:pu(ed(c).content)},[ff("div",{class:pu(ed(o).e("header"))},[ff("button",{type:"button",class:pu(ed(c).arrowLeftBtn),onClick:ed(d)},[Gg(e.$slots,"prev-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(zO))])),_:1})]))],10,["onClick"]),e.unlinkPanels?(af(),cf("button",{key:0,type:"button",disabled:!ed(B),class:pu(ed(c).arrowRightBtn),onClick:ed(p)},[Gg(e.$slots,"next-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed($O))])),_:1})]))],10,["disabled","onClick"])):Bf("v-if",!0),ff("div",null,yu(ed(m)),1)],2),mf(x4,{"selection-mode":"range",date:s.value,"min-date":y.value,"max-date":b.value,"range-state":E.value,"disabled-date":ed(D),onChangerange:w,onPick:Q,onSelect:S},null,8,["date","min-date","max-date","range-state","disabled-date"])],2),ff("div",{class:pu(ed(u).content)},[ff("div",{class:pu(ed(o).e("header"))},[e.unlinkPanels?(af(),cf("button",{key:0,type:"button",disabled:!ed(B),class:pu(ed(u).arrowLeftBtn),onClick:ed(f)},[Gg(e.$slots,"prev-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(zO))])),_:1})]))],10,["disabled","onClick"])):Bf("v-if",!0),ff("button",{type:"button",class:pu(ed(u).arrowRightBtn),onClick:ed(g)},[Gg(e.$slots,"next-year",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed($O))])),_:1})]))],10,["onClick"]),ff("div",null,yu(ed(C)),1)],2),mf(x4,{"selection-mode":"range",date:r.value,"min-date":y.value,"max-date":b.value,"range-state":E.value,"disabled-date":ed(D),onChangerange:w,onPick:Q,onSelect:S},null,8,["date","min-date","max-date","range-state","disabled-date"])],2)],2)],2)],2))}});var Y4=KU(q4,[["__file","panel-year-range.vue"]]);nZ.extend(mZ),nZ.extend(C2),nZ.extend(f2),nZ.extend(y2),nZ.extend(E2),nZ.extend(Q2),nZ.extend(S2),nZ.extend(k2);var V4=hg({name:"ElDatePicker",install:null,props:l4,emits:["update:modelValue"],setup(e,{expose:t,emit:i,slots:n}){const s=KF("picker-panel");gp("ElPopperOptions",Lh(ld(e,"popperOptions"))),gp(o4,{slots:n,pickerNs:s});const r=zh();t({focus:()=>{var e;null==(e=r.value)||e.focus()},blur:()=>{var e;null==(e=r.value)||e.blur()},handleOpen:()=>{var e;null==(e=r.value)||e.handleOpen()},handleClose:()=>{var e;null==(e=r.value)||e.handleClose()}});const a=e=>{i("update:modelValue",e)};return()=>{var t;const i=null!=(t=e.format)?t:M2[e.type]||T2,s=function(e){switch(e){case"daterange":case"datetimerange":return L4;case"monthrange":return O4;case"yearrange":return Y4;default:return D4}}(e.type);return mf(G2,wf(e,{format:i,type:e.type,ref:r,"onUpdate:modelValue":a}),{default:e=>mf(s,e,{"prev-month":n["prev-month"],"next-month":n["next-month"],"prev-year":n["prev-year"],"next-year":n["next-year"]}),"range-separator":n["range-separator"]})}}});const W4=lH(V4),j4=Symbol("elDescriptions");var J4=hg({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup:()=>({descriptions:pp(j4,{})}),render(){var e;const t=(e=>{if(!hf(e))return{};const t=e.props||{},i=(hf(e.type)?e.type.props:void 0)||{},n={};return Object.keys(i).forEach((e=>{Nc(i[e],"default")&&(n[e]=i[e].default)})),Object.keys(t).forEach((e=>{n[Zc(e)]=t[e]})),n})(this.cell),i=((null==(e=this.cell)?void 0:e.dirs)||[]).map((e=>{const{dir:t,arg:i,modifiers:n,value:s}=e;return[t,s,i,n]})),{border:n,direction:s}=this.descriptions,r="vertical"===s,a=()=>{var e,i,n;return(null==(n=null==(i=null==(e=this.cell)?void 0:e.children)?void 0:i.label)?void 0:n.call(i))||t.label},o=()=>{var e,t,i;return null==(i=null==(t=null==(e=this.cell)?void 0:e.children)?void 0:t.default)?void 0:i.call(t)},l=t.span,A=t.rowspan,c=t.align?`is-${t.align}`:"",u=t.labelAlign?`is-${t.labelAlign}`:c,h=t.className,d=t.labelClassName,g={width:$U("label"===this.type&&(t.labelWidth||this.descriptions.labelWidth)||t.width),minWidth:$U(t.minWidth)},p=KF("descriptions");switch(this.type){case"label":return Ld(Yf(this.tag,{style:g,class:[p.e("cell"),p.e("label"),p.is("bordered-label",n),p.is("vertical-label",r),u,d],colSpan:r?l:1,rowspan:r?1:A},a()),i);case"content":return Ld(Yf(this.tag,{style:g,class:[p.e("cell"),p.e("content"),p.is("bordered-content",n),p.is("vertical-content",r),c,h],colSpan:r?l:2*l-1,rowspan:r?2*A-1:A},o()),i);default:{const e=a();return Ld(Yf("td",{style:g,class:[p.e("cell"),c],colSpan:l,rowspan:A},[jN(e)?void 0:Yf("span",{class:[p.e("label"),d]},e),Yf("span",{class:[p.e("content"),h]},o())]),i)}}}});const z4=BU({row:{type:Array,default:()=>[]}});var X4=KU(hg({...hg({name:"ElDescriptionsRow"}),props:z4,setup(e){const t=pp(j4,{});return(e,i)=>"vertical"===ed(t).direction?(af(),cf(Zp,{key:0},[ff("tr",null,[(af(!0),cf(Zp,null,Pg(e.row,((e,t)=>(af(),uf(ed(J4),{key:`tr1-${t}`,cell:e,tag:"th",type:"label"},null,8,["cell"])))),128))]),ff("tr",null,[(af(!0),cf(Zp,null,Pg(e.row,((e,t)=>(af(),uf(ed(J4),{key:`tr2-${t}`,cell:e,tag:"td",type:"content"},null,8,["cell"])))),128))])],64)):(af(),cf("tr",{key:1},[(af(!0),cf(Zp,null,Pg(e.row,((e,i)=>(af(),cf(Zp,{key:`tr3-${i}`},[ed(t).border?(af(),cf(Zp,{key:0},[mf(ed(J4),{cell:e,tag:"td",type:"label"},null,8,["cell"]),mf(ed(J4),{cell:e,tag:"td",type:"content"},null,8,["cell"])],64)):(af(),uf(ed(J4),{key:1,cell:e,tag:"td",type:"both"},null,8,["cell"]))],64)))),128))]))}}),[["__file","descriptions-row.vue"]]);const $4=BU({border:Boolean,column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:bU,title:{type:String,default:""},extra:{type:String,default:""},labelWidth:{type:[String,Number],default:""}}),Z4=hg({...hg({name:"ElDescriptions"}),props:$4,setup(e){const t=e,i=KF("descriptions"),n=Vj(),s=jg();gp(j4,t);const r=qf((()=>[i.b(),i.m(n.value)])),a=(e,t,i,n=!1)=>(e.props||(e.props={}),t>i&&(e.props.span=i),n&&(e.props.span=t),e),o=()=>{if(!s.default)return[];const e=RZ(s.default()).filter((e=>{var t;return"ElDescriptionsItem"===(null==(t=null==e?void 0:e.type)?void 0:t.name)})),i=[];let n=[],r=t.column,o=0;const l=[];return e.forEach(((s,A)=>{var c,u,h;const d=(null==(c=s.props)?void 0:c.span)||1,g=(null==(u=s.props)?void 0:u.rowspan)||1,p=i.length;if(l[p]||(l[p]=0),g>1)for(let e=1;e<g;e++)l[h=p+e]||(l[h]=0),l[p+e]++,o++;if(l[p]>0&&(r-=l[p],l[p]=0),A<e.length-1&&(o+=d>r?r:d),A===e.length-1){const e=t.column-o%t.column;return n.push(a(s,e,r,!0)),void i.push(n)}d<r?(r-=d,n.push(s)):(n.push(a(s,d,r)),i.push(n),r=t.column,n=[])})),i};return(e,t)=>(af(),cf("div",{class:pu(ed(r))},[e.title||e.extra||e.$slots.title||e.$slots.extra?(af(),cf("div",{key:0,class:pu(ed(i).e("header"))},[ff("div",{class:pu(ed(i).e("title"))},[Gg(e.$slots,"title",{},(()=>[vf(yu(e.title),1)]))],2),ff("div",{class:pu(ed(i).e("extra"))},[Gg(e.$slots,"extra",{},(()=>[vf(yu(e.extra),1)]))],2)],2)):Bf("v-if",!0),ff("div",{class:pu(ed(i).e("body"))},[ff("table",{class:pu([ed(i).e("table"),ed(i).is("bordered",e.border)])},[ff("tbody",null,[(af(!0),cf(Zp,null,Pg(o(),((e,t)=>(af(),uf(X4,{key:t,row:e},null,8,["row"])))),128))])],2)],2)],2))}});var e3=KU(Z4,[["__file","description.vue"]]);const t3=hg({name:"ElDescriptionsItem",props:BU({label:{type:String,default:""},span:{type:Number,default:1},rowspan:{type:Number,default:1},width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},labelWidth:{type:[String,Number],default:""},align:{type:String,default:"left"},labelAlign:{type:String,default:""},className:{type:String,default:""},labelClassName:{type:String,default:""}})}),i3=lH(e3,{DescriptionsItem:t3}),n3=cH(t3),s3=e=>{if(!e)return{onClick:xc,onMousedown:xc,onMouseup:xc};let t=!1,i=!1;return{onClick:n=>{t&&i&&e(n),t=i=!1},onMousedown:e=>{t=e.target===e.currentTarget},onMouseup:e=>{i=e.target===e.currentTarget}}},r3=BU({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:[String,Array,Object]},zIndex:{type:[String,Number]}});var a3=hg({name:"ElOverlay",props:r3,emits:{click:e=>e instanceof MouseEvent},setup(e,{slots:t,emit:i}){const n=KF("overlay"),{onClick:s,onMousedown:r,onMouseup:a}=s3(e.customMaskEvent?void 0:e=>{i("click",e)});return()=>e.mask?mf("div",{class:[n.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:s,onMousedown:r,onMouseup:a},[Gg(t,"default")],FZ.STYLE|FZ.CLASS|FZ.PROPS,["onClick","onMouseup","onMousedown"]):Yf("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[Gg(t,"default")])}});const o3=a3,l3=Symbol("dialogInjectionKey"),A3=BU({center:Boolean,alignCenter:Boolean,closeIcon:{type:fj},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),c3=(e,t,i,n)=>{let s={offsetX:0,offsetY:0};const r=t=>{const i=t.clientX,r=t.clientY,{offsetX:a,offsetY:o}=s,l=e.value.getBoundingClientRect(),A=l.left,c=l.top,u=l.width,h=l.height,d=document.documentElement.clientWidth,g=document.documentElement.clientHeight,p=-A+a,f=-c+o,m=d-A-u+a,C=g-c-h+o,I=t=>{let l=a+t.clientX-i,A=o+t.clientY-r;(null==n?void 0:n.value)||(l=Math.min(Math.max(l,p),m),A=Math.min(Math.max(A,f),C)),s={offsetX:l,offsetY:A},e.value&&(e.value.style.transform=`translate(${$U(l)}, ${$U(A)})`)},v=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",v)},a=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",r)};return Eg((()=>{Hp((()=>{i.value?t.value&&e.value&&t.value.addEventListener("mousedown",r):a()}))})),_g((()=>{a()})),{resetPosition:()=>{s={offsetX:0,offsetY:0},e.value&&(e.value.style.transform="none")}}},u3=(...e)=>t=>{e.forEach((e=>{Oc(e)?e(t):e.value=t}))},h3=hg({...hg({name:"ElDialogContent"}),props:A3,emits:{close:()=>!0},setup(e,{expose:t}){const i=e,{t:n}=CU(),{Close:s}=mj,{dialogRef:r,headerRef:a,bodyId:o,ns:l,style:A}=pp(l3),{focusTrapRef:c}=pp(NJ),u=qf((()=>[l.b(),l.is("fullscreen",i.fullscreen),l.is("draggable",i.draggable),l.is("align-center",i.alignCenter),{[l.m("center")]:i.center}])),h=u3(c,r),d=qf((()=>i.draggable)),g=qf((()=>i.overflow)),{resetPosition:p}=c3(r,a,d,g);return t({resetPosition:p}),(e,t)=>(af(),cf("div",{ref:ed(h),class:pu(ed(u)),style:cu(ed(A)),tabindex:"-1"},[ff("header",{ref_key:"headerRef",ref:a,class:pu([ed(l).e("header"),{"show-close":e.showClose}])},[Gg(e.$slots,"header",{},(()=>[ff("span",{role:"heading","aria-level":e.ariaLevel,class:pu(ed(l).e("title"))},yu(e.title),11,["aria-level"])])),e.showClose?(af(),cf("button",{key:0,"aria-label":ed(n)("el.dialog.close"),class:pu(ed(l).e("headerbtn")),type:"button",onClick:t=>e.$emit("close")},[mf(ed(gH),{class:pu(ed(l).e("close"))},{default:Nd((()=>[(af(),uf(Ng(e.closeIcon||ed(s))))])),_:1},8,["class"])],10,["aria-label","onClick"])):Bf("v-if",!0)],2),ff("div",{id:ed(o),class:pu(ed(l).e("body"))},[Gg(e.$slots,"default")],10,["id"]),e.$slots.footer?(af(),cf("footer",{key:0,class:pu(ed(l).e("footer"))},[Gg(e.$slots,"footer")],2)):Bf("v-if",!0)],6))}});var d3=KU(h3,[["__file","dialog-content.vue"]]);const g3=BU({...A3,appendToBody:Boolean,appendTo:{type:[String,Object],default:"body"},beforeClose:{type:Function},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),p3={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[UU]:e=>lL(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},f3=(e,t={})=>{Jh(e)||lU("[useLockscreen]","You need to pass a ref param to this function");const i=t.ns||KF("popup"),n=qf((()=>i.bm("parent","hidden")));if(!bL||WU(document.body,n.value))return;let s=0,r=!1,a="0";const o=()=>{setTimeout((()=>{"undefined"!=typeof document&&(JU(null==document?void 0:document.body,n.value),r&&document&&(document.body.style.width=a))}),200)};Pp(e,(e=>{if(!e)return void o();r=!WU(document.body,n.value),r&&(a=document.body.style.width),s=iH(i.namespace.value);const t=document.documentElement.clientHeight<document.body.scrollHeight,l=zU(document.body,"overflowY");s>0&&(t||"scroll"===l)&&r&&(document.body.style.width=`calc(100% - ${s}px)`),jU(document.body,n.value)})),ku((()=>o()))},m3=(e,t)=>{var i;const n=kf().emit,{nextZIndex:s}=dU();let r="";const a=Gj(),o=Gj(),l=zh(!1),A=zh(!1),c=zh(!1),u=zh(null!=(i=e.zIndex)?i:s());let h,d;const g=MU("namespace",HF),p=qf((()=>{const t={},i=`--${g.value}-dialog`;return e.fullscreen||(e.top&&(t[`${i}-margin-top`]=e.top),e.width&&(t[`${i}-width`]=$U(e.width))),t})),f=qf((()=>e.alignCenter?{display:"flex"}:{}));function m(){null==d||d(),null==h||h(),e.openDelay&&e.openDelay>0?({stop:h}=ML((()=>v()),e.openDelay)):v()}function C(){null==h||h(),null==d||d(),e.closeDelay&&e.closeDelay>0?({stop:d}=ML((()=>B()),e.closeDelay)):B()}function I(){e.beforeClose?e.beforeClose((function(e){e||(A.value=!0,l.value=!1)})):C()}function v(){bL&&(l.value=!0)}function B(){l.value=!1}return e.lockScroll&&f3(l),Pp((()=>e.modelValue),(i=>{i?(A.value=!1,m(),c.value=!0,u.value=JN(e.zIndex)?s():u.value++,Qd((()=>{n("open"),t.value&&(t.value.scrollTop=0)}))):l.value&&C()})),Pp((()=>e.fullscreen),(e=>{t.value&&(e?(r=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=r)})),Eg((()=>{e.modelValue&&(l.value=!0,c.value=!0,m())})),{afterEnter:function(){n("opened")},afterLeave:function(){n("closed"),n(UU,!1),e.destroyOnClose&&(c.value=!1)},beforeLeave:function(){n("close")},handleClose:I,onModalClick:function(){e.closeOnClickModal&&I()},close:C,doClose:B,onOpenAutoFocus:function(){n("openAutoFocus")},onCloseAutoFocus:function(){n("closeAutoFocus")},onCloseRequested:function(){e.closeOnPressEscape&&I()},onFocusoutPrevented:function(e){var t;"pointer"===(null==(t=e.detail)?void 0:t.focusReason)&&e.preventDefault()},titleId:a,bodyId:o,closed:A,style:p,overlayDialogStyle:f,rendered:c,visible:l,zIndex:u}},C3=hg({...hg({name:"ElDialog",inheritAttrs:!1}),props:g3,emits:p3,setup(e,{expose:t}){const i=e,n=jg();w$({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},qf((()=>!!n.title)));const s=KF("dialog"),r=zh(),a=zh(),o=zh(),{visible:l,titleId:A,bodyId:c,style:u,overlayDialogStyle:h,rendered:d,zIndex:g,afterEnter:p,afterLeave:f,beforeLeave:m,handleClose:C,onModalClick:I,onOpenAutoFocus:v,onCloseAutoFocus:B,onCloseRequested:y,onFocusoutPrevented:b}=m3(i,r);gp(l3,{dialogRef:r,headerRef:a,bodyId:c,ns:s,rendered:d,style:u});const E=s3(I),w=qf((()=>i.draggable&&!i.fullscreen));return t({visible:l,dialogContentRef:o,resetPosition:()=>{var e;null==(e=o.value)||e.resetPosition()}}),(e,t)=>(af(),uf(ed(YX),{to:e.appendTo,disabled:"body"===e.appendTo&&!e.appendToBody},{default:Nd((()=>[mf(am,{name:"dialog-fade",onAfterEnter:ed(p),onAfterLeave:ed(f),onBeforeLeave:ed(m),persisted:""},{default:Nd((()=>[Ld(mf(ed(o3),{"custom-mask-event":"",mask:e.modal,"overlay-class":e.modalClass,"z-index":ed(g)},{default:Nd((()=>[ff("div",{role:"dialog","aria-modal":"true","aria-label":e.title||void 0,"aria-labelledby":e.title?void 0:ed(A),"aria-describedby":ed(c),class:pu(`${ed(s).namespace.value}-overlay-dialog`),style:cu(ed(h)),onClick:ed(E).onClick,onMousedown:ed(E).onMousedown,onMouseup:ed(E).onMouseup},[mf(ed(ez),{loop:"",trapped:ed(l),"focus-start-el":"container",onFocusAfterTrapped:ed(v),onFocusAfterReleased:ed(B),onFocusoutPrevented:ed(b),onReleaseRequested:ed(y)},{default:Nd((()=>[ed(d)?(af(),uf(d3,wf({key:0,ref_key:"dialogContentRef",ref:o},e.$attrs,{center:e.center,"align-center":e.alignCenter,"close-icon":e.closeIcon,draggable:ed(w),overflow:e.overflow,fullscreen:e.fullscreen,"show-close":e.showClose,title:e.title,"aria-level":e.headerAriaLevel,onClose:ed(C)}),Og({header:Nd((()=>[e.$slots.title?Gg(e.$slots,"title",{key:1}):Gg(e.$slots,"header",{key:0,close:ed(C),titleId:ed(A),titleClass:ed(s).e("title")})])),default:Nd((()=>[Gg(e.$slots,"default")])),_:2},[e.$slots.footer?{name:"footer",fn:Nd((()=>[Gg(e.$slots,"footer")]))}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):Bf("v-if",!0)])),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])])),_:3},8,["mask","overlay-class","z-index"]),[[ym,ed(l)]])])),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])])),_:3},8,["to","disabled"]))}});const I3=lH(KU(C3,[["__file","dialog.vue"]])),v3=BU({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:String,default:"solid"}}),B3=hg({...hg({name:"ElDivider"}),props:v3,setup(e){const t=e,i=KF("divider"),n=qf((()=>i.cssVar({"border-style":t.borderStyle})));return(e,t)=>(af(),cf("div",{class:pu([ed(i).b(),ed(i).m(e.direction)]),style:cu(ed(n)),role:"separator"},[e.$slots.default&&"vertical"!==e.direction?(af(),cf("div",{key:0,class:pu([ed(i).e("text"),ed(i).is(e.contentPosition)])},[Gg(e.$slots,"default")],2)):Bf("v-if",!0)],6))}});const y3=lH(KU(B3,[["__file","divider.vue"]])),b3=BU({...g3,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),E3=p3,w3=hg({...hg({name:"ElDrawer",inheritAttrs:!1}),props:b3,emits:E3,setup(e,{expose:t}){const i=e,n=jg();w$({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},qf((()=>!!n.title)));const s=zh(),r=zh(),a=KF("drawer"),{t:o}=CU(),{afterEnter:l,afterLeave:A,beforeLeave:c,visible:u,rendered:h,titleId:d,bodyId:g,zIndex:p,onModalClick:f,onOpenAutoFocus:m,onCloseAutoFocus:C,onFocusoutPrevented:I,onCloseRequested:v,handleClose:B}=m3(i,s),y=qf((()=>"rtl"===i.direction||"ltr"===i.direction)),b=qf((()=>$U(i.size)));return t({handleClose:B,afterEnter:l,afterLeave:A}),(e,t)=>(af(),uf(ed(YX),{to:e.appendTo,disabled:"body"===e.appendTo&&!e.appendToBody},{default:Nd((()=>[mf(am,{name:ed(a).b("fade"),onAfterEnter:ed(l),onAfterLeave:ed(A),onBeforeLeave:ed(c),persisted:""},{default:Nd((()=>[Ld(mf(ed(o3),{mask:e.modal,"overlay-class":e.modalClass,"z-index":ed(p),onClick:ed(f)},{default:Nd((()=>[mf(ed(ez),{loop:"",trapped:ed(u),"focus-trap-el":s.value,"focus-start-el":r.value,onFocusAfterTrapped:ed(m),onFocusAfterReleased:ed(C),onFocusoutPrevented:ed(I),onReleaseRequested:ed(v)},{default:Nd((()=>[ff("div",wf({ref_key:"drawerRef",ref:s,"aria-modal":"true","aria-label":e.title||void 0,"aria-labelledby":e.title?void 0:ed(d),"aria-describedby":ed(g)},e.$attrs,{class:[ed(a).b(),e.direction,ed(u)&&"open"],style:ed(y)?"width: "+ed(b):"height: "+ed(b),role:"dialog",onClick:AC((()=>{}),["stop"])}),[ff("span",{ref_key:"focusStartRef",ref:r,class:pu(ed(a).e("sr-focus")),tabindex:"-1"},null,2),e.withHeader?(af(),cf("header",{key:0,class:pu(ed(a).e("header"))},[e.$slots.title?Gg(e.$slots,"title",{key:1},(()=>[Bf(" DEPRECATED SLOT ")])):Gg(e.$slots,"header",{key:0,close:ed(B),titleId:ed(d),titleClass:ed(a).e("title")},(()=>[e.$slots.title?Bf("v-if",!0):(af(),cf("span",{key:0,id:ed(d),role:"heading","aria-level":e.headerAriaLevel,class:pu(ed(a).e("title"))},yu(e.title),11,["id","aria-level"]))])),e.showClose?(af(),cf("button",{key:2,"aria-label":ed(o)("el.drawer.close"),class:pu(ed(a).e("close-btn")),type:"button",onClick:ed(B)},[mf(ed(gH),{class:pu(ed(a).e("close"))},{default:Nd((()=>[mf(ed(CO))])),_:1},8,["class"])],10,["aria-label","onClick"])):Bf("v-if",!0)],2)):Bf("v-if",!0),ed(h)?(af(),cf("div",{key:1,id:ed(g),class:pu(ed(a).e("body"))},[Gg(e.$slots,"default")],10,["id"])):Bf("v-if",!0),e.$slots.footer?(af(),cf("div",{key:2,class:pu(ed(a).e("footer"))},[Gg(e.$slots,"footer")],2)):Bf("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])])),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])])),_:3},8,["mask","overlay-class","z-index","onClick"]),[[ym,ed(u)]])])),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])])),_:3},8,["to","disabled"]))}});const Q3=lH(KU(w3,[["__file","drawer.vue"]]));var _3=KU(hg({inheritAttrs:!1}),[["render",function(e,t,i,n,s,r){return Gg(e.$slots,"default")}],["__file","collection.vue"]]);var S3=KU(hg({name:"ElCollectionItem",inheritAttrs:!1}),[["render",function(e,t,i,n,s,r){return Gg(e.$slots,"default")}],["__file","collection-item.vue"]]);const x3="data-el-collection-item",k3=e=>{const t=`El${e}Collection`,i=`${t}Item`,n=Symbol(t),s=Symbol(i),r={..._3,name:t,setup(){const e=zh(null),t=new Map;gp(n,{itemMap:t,getItems:()=>{const i=ed(e);if(!i)return[];const n=Array.from(i.querySelectorAll(`[${x3}]`));return[...t.values()].sort(((e,t)=>n.indexOf(e.ref)-n.indexOf(t.ref)))},collectionRef:e})}},a={...S3,name:i,setup(e,{attrs:t}){const i=zh(null),r=pp(n,void 0);gp(s,{collectionItemRef:i}),Eg((()=>{const e=ed(i);e&&r.itemMap.set(e,{ref:e,...t})})),_g((()=>{const e=ed(i);r.itemMap.delete(e)}))}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:s,ElCollection:r,ElCollectionItem:a}},D3=BU({style:{type:[String,Array,Object]},currentTabId:{type:String},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:String},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:F3,ElCollectionItem:T3,COLLECTION_INJECTION_KEY:M3,COLLECTION_ITEM_INJECTION_KEY:R3}=k3("RovingFocusGroup"),N3=Symbol("elRovingFocusGroup"),L3=Symbol("elRovingFocusGroupItem"),U3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},H3=e=>{const{activeElement:t}=document;for(const i of e){if(i===t)return;if(i.focus(),t!==document.activeElement)return}},P3="currentTabIdChange",O3="rovingFocusGroup.entryFocus",G3={bubbles:!1,cancelable:!0},K3=hg({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:D3,emits:[P3,"entryFocus"],setup(e,{emit:t}){var i;const n=zh(null!=(i=e.currentTabId||e.defaultCurrentTabId)?i:null),s=zh(!1),r=zh(!1),a=zh(null),{getItems:o}=pp(M3,void 0),l=qf((()=>[{outline:"none"},e.style])),A=OX((t=>{var i;null==(i=e.onMousedown)||i.call(e,t)}),(()=>{r.value=!0})),c=OX((t=>{var i;null==(i=e.onFocus)||i.call(e,t)}),(e=>{const t=!ed(r),{target:i,currentTarget:a}=e;if(i===a&&t&&!ed(s)){const e=new Event(O3,G3);if(null==a||a.dispatchEvent(e),!e.defaultPrevented){const e=o().filter((e=>e.focusable)),t=[e.find((e=>e.active)),e.find((e=>e.id===ed(n))),...e].filter(Boolean).map((e=>e.ref));H3(t)}}r.value=!1})),u=OX((t=>{var i;null==(i=e.onBlur)||i.call(e,t)}),(()=>{s.value=!1}));gp(N3,{currentTabbedId:Hh(n),loop:ld(e,"loop"),tabIndex:qf((()=>ed(s)?-1:0)),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:l,orientation:ld(e,"orientation"),dir:ld(e,"dir"),onItemFocus:e=>{t(P3,e)},onItemShiftTab:()=>{s.value=!0},onBlur:u,onFocus:c,onMousedown:A}),Pp((()=>e.currentTabId),(e=>{n.value=null!=e?e:null})),UL(a,O3,((...e)=>{t("entryFocus",...e)}))}});var q3=KU(hg({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:F3,ElRovingFocusGroupImpl:KU(K3,[["render",function(e,t,i,n,s,r){return Gg(e.$slots,"default")}],["__file","roving-focus-group-impl.vue"]])}}),[["render",function(e,t,i,n,s,r){const a=Mg("el-roving-focus-group-impl"),o=Mg("el-focus-group-collection");return af(),uf(o,null,{default:Nd((()=>[mf(a,fu(Cf(e.$attrs)),{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},16)])),_:3})}],["__file","roving-focus-group.vue"]]);const Y3=BU({trigger:FX.trigger,effect:{...DX.effect,default:"light"},type:{type:String},placement:{type:String,default:"bottom"},popperOptions:{type:Object,default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:[Number,String],default:0},maxHeight:{type:[Number,String],default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:Object},teleported:DX.teleported}),V3=BU({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:fj}}),W3=BU({onKeydown:{type:Function}}),j3=[zJ.down,zJ.pageDown,zJ.home],J3=[zJ.up,zJ.pageUp,zJ.end],z3=[...j3,...J3],{ElCollection:X3,ElCollectionItem:$3,COLLECTION_INJECTION_KEY:Z3,COLLECTION_ITEM_INJECTION_KEY:e6}=k3("Dropdown"),t6=Symbol("elDropdown"),{ButtonGroup:i6}=eZ,n6=hg({name:"ElDropdown",components:{ElButton:eZ,ElButtonGroup:i6,ElScrollbar:lJ,ElDropdownCollection:X3,ElTooltip:XX,ElRovingFocusGroup:q3,ElOnlyChild:wJ,ElIcon:gH,ArrowDown:QH},props:Y3,emits:["visible-change","click","command"],setup(e,{emit:t}){const i=kf(),n=KF("dropdown"),{t:s}=CU(),r=zh(),a=zh(),o=zh(null),l=zh(null),A=zh(null),c=zh(null),u=zh(!1),h=[zJ.enter,zJ.numpadEnter,zJ.space,zJ.down],d=qf((()=>({maxHeight:$U(e.maxHeight)}))),g=qf((()=>[n.m(I.value)])),p=qf((()=>hR(e.trigger))),f=Gj().value,m=qf((()=>e.id||f));function C(){var e;null==(e=o.value)||e.onClose()}Pp([r,p],(([e,t],[i])=>{var n,s,r;(null==(n=null==i?void 0:i.$el)?void 0:n.removeEventListener)&&i.$el.removeEventListener("pointerenter",v),(null==(s=null==e?void 0:e.$el)?void 0:s.removeEventListener)&&e.$el.removeEventListener("pointerenter",v),(null==(r=null==e?void 0:e.$el)?void 0:r.addEventListener)&&t.includes("hover")&&e.$el.addEventListener("pointerenter",v)}),{immediate:!0}),_g((()=>{var e,t;(null==(t=null==(e=r.value)?void 0:e.$el)?void 0:t.removeEventListener)&&r.value.$el.removeEventListener("pointerenter",v)}));const I=Vj();function v(){var e,t;null==(t=null==(e=r.value)?void 0:e.$el)||t.focus()}gp(t6,{contentRef:l,role:qf((()=>e.role)),triggerId:m,isUsingKeyboard:u,onItemEnter:function(){},onItemLeave:function(){const e=ed(l);p.value.includes("hover")&&(null==e||e.focus()),c.value=null}}),gp("elDropdown",{instance:i,dropdownSize:I,handleClick:function(){C()},commandHandler:function(...e){t("command",...e)},trigger:ld(e,"trigger"),hideOnClick:ld(e,"hideOnClick")});return{t:s,ns:n,scrollbar:A,wrapStyle:d,dropdownTriggerKls:g,dropdownSize:I,triggerId:m,triggerKeys:h,currentTabId:c,handleCurrentTabIdChange:function(e){c.value=e},handlerMainButtonClick:e=>{t("click",e)},handleEntryFocus:function(e){u.value||(e.preventDefault(),e.stopImmediatePropagation())},handleClose:C,handleOpen:function(){var e;null==(e=o.value)||e.onOpen()},handleBeforeShowTooltip:function(){t("visible-change",!0)},handleShowTooltip:function(e){"keydown"===(null==e?void 0:e.type)&&l.value.focus()},handleBeforeHideTooltip:function(){t("visible-change",!1)},onFocusAfterTrapped:e=>{var t,i;e.preventDefault(),null==(i=null==(t=l.value)?void 0:t.focus)||i.call(t,{preventScroll:!0})},popperRef:o,contentRef:l,triggeringElementRef:r,referenceElementRef:a}}});var s6=KU(n6,[["render",function(e,t,i,n,s,r){var a;const o=Mg("el-dropdown-collection"),l=Mg("el-roving-focus-group"),A=Mg("el-scrollbar"),c=Mg("el-only-child"),u=Mg("el-tooltip"),h=Mg("el-button"),d=Mg("arrow-down"),g=Mg("el-icon"),p=Mg("el-button-group");return af(),cf("div",{class:pu([e.ns.b(),e.ns.is("disabled",e.disabled)])},[mf(u,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,"hide-after":"hover"===e.trigger?e.hideTimeout:0,"manual-mode":!0,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"reference-element":null==(a=e.referenceElementRef)?void 0:a.$el,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-after":"hover"===e.trigger?e.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":e.triggeringElementRef,"virtual-triggering":e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"",persistent:"",onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},Og({content:Nd((()=>[mf(A,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:Nd((()=>[mf(l,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:Nd((()=>[mf(o,null,{default:Nd((()=>[Gg(e.$slots,"dropdown")])),_:3})])),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])])),_:3},8,["wrap-style","view-class"])])),_:2},[e.splitButton?void 0:{name:"default",fn:Nd((()=>[mf(c,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["id","tabindex"])]))}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(af(),uf(p,{key:0},{default:Nd((()=>[mf(h,wf({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},16,["size","type","disabled","tabindex","onClick"]),mf(h,wf({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:Nd((()=>[mf(g,{class:pu(e.ns.e("icon"))},{default:Nd((()=>[mf(d)])),_:1},8,["class"])])),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])])),_:3})):Bf("v-if",!0)],2)}],["__file","dropdown.vue"]]);const r6=hg({components:{ElRovingFocusCollectionItem:T3},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(e,{emit:t}){const{currentTabbedId:i,loop:n,onItemFocus:s,onItemShiftTab:r}=pp(N3,void 0),{getItems:a}=pp(M3,void 0),o=Gj(),l=zh(null),A=OX((e=>{t("mousedown",e)}),(t=>{e.focusable?s(ed(o)):t.preventDefault()})),c=OX((e=>{t("focus",e)}),(()=>{s(ed(o))})),u=OX((e=>{t("keydown",e)}),(e=>{const{code:t,shiftKey:i,target:s,currentTarget:o}=e;if(t===zJ.tab&&i)return void r();if(s!==o)return;const l=(e=>{const t=e.code;return U3[t]})(e);if(l){e.preventDefault();let t=a().filter((e=>e.focusable)).map((e=>e.ref));switch(l){case"last":t.reverse();break;case"prev":case"next":{"prev"===l&&t.reverse();const e=t.indexOf(o);t=n.value?(c=e+1,(A=t).map(((e,t)=>A[(t+c)%A.length]))):t.slice(e+1);break}}Qd((()=>{H3(t)}))}var A,c})),h=qf((()=>i.value===ed(o)));return gp(L3,{rovingFocusGroupItemRef:l,tabIndex:qf((()=>ed(h)?0:-1)),handleMousedown:A,handleFocus:c,handleKeydown:u}),{id:o,handleKeydown:u,handleFocus:c,handleMousedown:A}}});var a6=KU(r6,[["render",function(e,t,i,n,s,r){const a=Mg("el-roving-focus-collection-item");return af(),uf(a,{id:e.id,focusable:e.focusable,active:e.active},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["id","focusable","active"])}],["__file","roving-focus-item.vue"]]);const o6=hg({name:"DropdownItemImpl",components:{ElIcon:gH},props:V3,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:t}){const i=KF("dropdown"),{role:n}=pp(t6,void 0),{collectionItemRef:s}=pp(e6,void 0),{collectionItemRef:r}=pp(R3,void 0),{rovingFocusGroupItemRef:a,tabIndex:o,handleFocus:l,handleKeydown:A,handleMousedown:c}=pp(L3,void 0),u=u3(s,r,a),h=qf((()=>"menu"===n.value?"menuitem":"navigation"===n.value?"link":"button")),d=OX((e=>{if([zJ.enter,zJ.numpadEnter,zJ.space].includes(e.code))return e.preventDefault(),e.stopImmediatePropagation(),t("clickimpl",e),!0}),A);return{ns:i,itemRef:u,dataset:{[x3]:""},role:h,tabIndex:o,handleFocus:l,handleKeydown:d,handleMousedown:c}}});var l6=KU(o6,[["render",function(e,t,i,n,s,r){const a=Mg("el-icon");return af(),cf(Zp,null,[e.divided?(af(),cf("li",{key:0,role:"separator",class:pu(e.ns.bem("menu","item","divided"))},null,2)):Bf("v-if",!0),ff("li",wf({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:t=>e.$emit("clickimpl",t),onFocus:e.handleFocus,onKeydown:AC(e.handleKeydown,["self"]),onMousedown:e.handleMousedown,onPointermove:t=>e.$emit("pointermove",t),onPointerleave:t=>e.$emit("pointerleave",t)}),[e.icon?(af(),uf(a,{key:0},{default:Nd((()=>[(af(),uf(Ng(e.icon)))])),_:1})):Bf("v-if",!0),Gg(e.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}],["__file","dropdown-item-impl.vue"]]);const A6=()=>{const e=pp("elDropdown",{}),t=qf((()=>null==e?void 0:e.dropdownSize));return{elDropdown:e,_elDropdownSize:t}},c6=hg({name:"ElDropdownItem",components:{ElDropdownCollectionItem:$3,ElRovingFocusItem:a6,ElDropdownItemImpl:l6},inheritAttrs:!1,props:V3,emits:["pointermove","pointerleave","click"],setup(e,{emit:t,attrs:i}){const{elDropdown:n}=A6(),s=kf(),r=zh(null),a=qf((()=>{var e,t;return null!=(t=null==(e=ed(r))?void 0:e.textContent)?t:""})),{onItemEnter:o,onItemLeave:l}=pp(t6,void 0),A=OX((e=>(t("pointermove",e),e.defaultPrevented)),GX((t=>{if(e.disabled)return void l(t);const i=t.currentTarget;i===document.activeElement||i.contains(document.activeElement)||(o(t),t.defaultPrevented||null==i||i.focus())}))),c=OX((e=>(t("pointerleave",e),e.defaultPrevented)),GX(l)),u=OX((i=>{if(!e.disabled)return t("click",i),"keydown"!==i.type&&i.defaultPrevented}),(t=>{var i,r,a;e.disabled?t.stopImmediatePropagation():((null==(i=null==n?void 0:n.hideOnClick)?void 0:i.value)&&(null==(r=n.handleClick)||r.call(n)),null==(a=n.commandHandler)||a.call(n,e.command,s,t))}));return{handleClick:u,handlePointerMove:A,handlePointerLeave:c,textContent:a,propsAndAttrs:qf((()=>({...e,...i})))}}});var u6=KU(c6,[["render",function(e,t,i,n,s,r){var a;const o=Mg("el-dropdown-item-impl"),l=Mg("el-roving-focus-item"),A=Mg("el-dropdown-collection-item");return af(),uf(A,{disabled:e.disabled,"text-value":null!=(a=e.textValue)?a:e.textContent},{default:Nd((()=>[mf(l,{focusable:!e.disabled},{default:Nd((()=>[mf(o,wf(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},16,["onPointerleave","onPointermove","onClickimpl"])])),_:3},8,["focusable"])])),_:3},8,["disabled","text-value"])}],["__file","dropdown-item.vue"]]);const h6=hg({name:"ElDropdownMenu",props:W3,setup(e){const t=KF("dropdown"),{_elDropdownSize:i}=A6(),n=i.value,{focusTrapRef:s,onKeydown:r}=pp(NJ,void 0),{contentRef:a,role:o,triggerId:l}=pp(t6,void 0),{collectionRef:A,getItems:c}=pp(Z3,void 0),{rovingFocusGroupRef:u,rovingFocusGroupRootStyle:h,tabIndex:d,onBlur:g,onFocus:p,onMousedown:f}=pp(N3,void 0),{collectionRef:m}=pp(M3,void 0),C=qf((()=>[t.b("menu"),t.bm("menu",null==n?void 0:n.value)])),I=u3(a,A,s,u,m),v=OX((t=>{var i;null==(i=e.onKeydown)||i.call(e,t)}),(e=>{const{currentTarget:t,code:i,target:n}=e;if(t.contains(n),zJ.tab===i&&e.stopImmediatePropagation(),e.preventDefault(),n!==ed(a)||!z3.includes(i))return;const s=c().filter((e=>!e.disabled)).map((e=>e.ref));J3.includes(i)&&s.reverse(),H3(s)}));return{size:n,rovingFocusGroupRootStyle:h,tabIndex:d,dropdownKls:C,role:o,triggerId:l,dropdownListWrapperRef:I,handleKeydown:e=>{v(e),r(e)},onBlur:g,onFocus:p,onMousedown:f}}});var d6=KU(h6,[["render",function(e,t,i,n,s,r){return af(),cf("ul",{ref:e.dropdownListWrapperRef,class:pu(e.dropdownKls),style:cu(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onBlur:e.onBlur,onFocus:e.onFocus,onKeydown:AC(e.handleKeydown,["self"]),onMousedown:AC(e.onMousedown,["self"])},[Gg(e.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}],["__file","dropdown-menu.vue"]]);const g6=lH(s6,{DropdownItem:u6,DropdownMenu:d6}),p6=cH(u6),f6=cH(d6);var m6=KU(hg({...hg({name:"ImgEmpty"}),setup(e){const t=KF("empty"),i=Gj();return(e,n)=>(af(),cf("svg",{viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[ff("defs",null,[ff("linearGradient",{id:`linearGradient-1-${ed(i)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[ff("stop",{"stop-color":`var(${ed(t).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),ff("stop",{"stop-color":`var(${ed(t).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),ff("linearGradient",{id:`linearGradient-2-${ed(i)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[ff("stop",{"stop-color":`var(${ed(t).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),ff("stop",{"stop-color":`var(${ed(t).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),ff("rect",{id:`path-3-${ed(i)}`,x:"0",y:"0",width:"17",height:"36"},null,8,["id"])]),ff("g",{id:"Illustrations",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[ff("g",{id:"B-type",transform:"translate(-1268.000000, -535.000000)"},[ff("g",{id:"Group-2",transform:"translate(1268.000000, 535.000000)"},[ff("path",{id:"Oval-Copy-2",d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${ed(t).cssVarBlockName("fill-color-3")})`},null,8,["fill"]),ff("polygon",{id:"Rectangle-Copy-14",fill:`var(${ed(t).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,["fill"]),ff("g",{id:"Group-Copy",transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},[ff("polygon",{id:"Rectangle-Copy-10",fill:`var(${ed(t).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,["fill"]),ff("polygon",{id:"Rectangle-Copy-11",fill:`var(${ed(t).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,["fill"]),ff("rect",{id:"Rectangle-Copy-12",fill:`url(#linearGradient-1-${ed(i)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,["fill"]),ff("polygon",{id:"Rectangle-Copy-13",fill:`var(${ed(t).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,["fill"])]),ff("rect",{id:"Rectangle-Copy-15",fill:`url(#linearGradient-2-${ed(i)})`,x:"13",y:"45",width:"40",height:"36"},null,8,["fill"]),ff("g",{id:"Rectangle-Copy-17",transform:"translate(53.000000, 45.000000)"},[ff("use",{id:"Mask",fill:`var(${ed(t).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${ed(i)}`},null,8,["fill","xlink:href"]),ff("polygon",{id:"Rectangle-Copy",fill:`var(${ed(t).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${ed(i)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,["fill","mask"])]),ff("polygon",{id:"Rectangle-Copy-18",fill:`var(${ed(t).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,["fill"])])])])]))}}),[["__file","img-empty.vue"]]);const C6=BU({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),I6=hg({...hg({name:"ElEmpty"}),props:C6,setup(e){const t=e,{t:i}=CU(),n=KF("empty"),s=qf((()=>t.description||i("el.table.emptyText"))),r=qf((()=>({width:$U(t.imageSize)})));return(e,t)=>(af(),cf("div",{class:pu(ed(n).b())},[ff("div",{class:pu(ed(n).e("image")),style:cu(ed(r))},[e.image?(af(),cf("img",{key:0,src:e.image,ondragstart:"return false"},null,8,["src"])):Gg(e.$slots,"image",{key:1},(()=>[mf(m6)]))],6),ff("div",{class:pu(ed(n).e("description"))},[e.$slots.description?Gg(e.$slots,"description",{key:0}):(af(),cf("p",{key:1},yu(ed(s)),1))],2),e.$slots.default?(af(),cf("div",{key:0,class:pu(ed(n).e("bottom"))},[Gg(e.$slots,"default")],2)):Bf("v-if",!0)],2))}});const v6=lH(KU(I6,[["__file","empty.vue"]])),B6=BU({size:{type:String,values:yU},disabled:Boolean}),y6=BU({...B6,model:Object,rules:{type:Object},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),b6={validate:(e,t,i)=>(Lc(e)||Gc(e))&&lL(t)&&Gc(i)};function E6(){const e=zh([]),t=qf((()=>{if(!e.value.length)return"0";const t=Math.max(...e.value);return t?`${t}px`:""}));function i(i){const n=e.value.indexOf(i);return-1===n&&t.value,n}return{autoLabelWidth:t,registerLabelWidth:function(t,n){if(t&&n){const s=i(n);e.value.splice(s,1,t)}else t&&e.value.push(t)},deregisterLabelWidth:function(t){const n=i(t);n>-1&&e.value.splice(n,1)}}}const w6=(e,t)=>{const i=hR(t);return i.length>0?e.filter((e=>e.prop&&i.includes(e.prop))):e},Q6=hg({...hg({name:"ElForm"}),props:y6,emits:b6,setup(e,{expose:t,emit:i}){const n=e,s=[],r=Vj(),a=KF("form"),o=qf((()=>{const{labelPosition:e,inline:t}=n;return[a.b(),a.m(r.value||"default"),{[a.m(`label-${e}`)]:e,[a.m("inline")]:t}]})),l=(e=[])=>{n.model&&w6(s,e).forEach((e=>e.resetField()))},A=(e=[])=>{w6(s,e).forEach((e=>e.clearValidate()))},c=qf((()=>!!n.model)),u=async e=>d(void 0,e),h=async(e=[])=>{if(!c.value)return!1;const t=(e=>{if(0===s.length)return[];const t=w6(s,e);return t.length?t:[]})(e);if(0===t.length)return!0;let i={};for(const s of t)try{await s.validate("")}catch(n){i={...i,...n}}return 0===Object.keys(i).length||Promise.reject(i)},d=async(e=[],t)=>{const i=!Oc(t);try{const i=await h(e);return!0===i&&await(null==t?void 0:t(i)),i}catch(I2){if(I2 instanceof Error)throw I2;const s=I2;return n.scrollToError&&g(Object.keys(s)[0]),await(null==t?void 0:t(!1,s)),i&&Promise.reject(s)}},g=e=>{var t;const i=w6(s,e)[0];i&&(null==(t=i.$el)||t.scrollIntoView(n.scrollIntoViewOptions))};return Pp((()=>n.rules),(()=>{n.validateOnRuleChange&&u().catch((e=>{}))}),{deep:!0}),gp(Lj,Lh({...rd(n),emit:i,resetFields:l,clearValidate:A,validateField:d,getField:e=>s.find((t=>t.prop===e)),addField:e=>{s.push(e)},removeField:e=>{e.prop&&s.splice(s.indexOf(e),1)},...E6()})),t({validate:u,validateField:d,resetFields:l,clearValidate:A,scrollToField:g,fields:s}),(e,t)=>(af(),cf("form",{class:pu(ed(o))},[Gg(e.$slots,"default")],2))}});var _6=KU(Q6,[["__file","form.vue"]]);function S6(){return S6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},S6.apply(this,arguments)}function x6(e){return(x6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k6(e,t){return(k6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function D6(e,t,i){return D6=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(I2){return!1}}()?Reflect.construct.bind():function(e,t,i){var n=[null];n.push.apply(n,t);var s=new(Function.bind.apply(e,n));return i&&k6(s,i.prototype),s},D6.apply(null,arguments)}function F6(e){var t="function"==typeof Map?new Map:void 0;return F6=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return D6(e,arguments,x6(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),k6(n,e)},F6(e)}var T6=/%[sdj%]/g,M6=function(){};function R6(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var i=e.field;t[i]=t[i]||[],t[i].push(e)})),t}function N6(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var s=0,r=i.length;return"function"==typeof e?e.apply(null,i):"string"==typeof e?e.replace(T6,(function(e){if("%%"===e)return"%";if(s>=r)return e;switch(e){case"%s":return String(i[s++]);case"%d":return Number(i[s++]);case"%j":try{return JSON.stringify(i[s++])}catch(t){return"[Circular]"}break;default:return e}})):e}function L6(e,t){return null==e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e))}function U6(e,t,i){var n=0,s=e.length;!function r(a){if(a&&a.length)i(a);else{var o=n;n+=1,o<s?t(e[o],r):i([])}}([])}var H6=function(e){var t,i;function n(t,i){var n;return(n=e.call(this,"Async Validation Error")||this).errors=t,n.fields=i,n}return i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,k6(t,i),n}(F6(Error));function P6(e,t,i,n,s){if(t.first){var r=new Promise((function(t,r){var a=function(e){var t=[];return Object.keys(e).forEach((function(i){t.push.apply(t,e[i]||[])})),t}(e);U6(a,i,(function(e){return n(e),e.length?r(new H6(e,R6(e))):t(s)}))}));return r.catch((function(e){return e})),r}var a=!0===t.firstFields?Object.keys(e):t.firstFields||[],o=Object.keys(e),l=o.length,A=0,c=[],u=new Promise((function(t,r){var u=function(e){if(c.push.apply(c,e),++A===l)return n(c),c.length?r(new H6(c,R6(c))):t(s)};o.length||(n(c),t(s)),o.forEach((function(t){var n=e[t];-1!==a.indexOf(t)?U6(n,i,u):function(e,t,i){var n=[],s=0,r=e.length;function a(e){n.push.apply(n,e||[]),++s===r&&i(n)}e.forEach((function(e){t(e,a)}))}(n,i,u)}))}));return u.catch((function(e){return e})),u}function O6(e,t){return function(i){var n,s;return n=e.fullFields?function(e,t){for(var i=e,n=0;n<t.length;n++){if(null==i)return i;i=i[t[n]]}return i}(t,e.fullFields):t[i.field||e.fullField],(s=i)&&void 0!==s.message?(i.field=i.field||e.fullField,i.fieldValue=n,i):{message:"function"==typeof i?i():i,fieldValue:n,field:i.field||e.fullField}}}function G6(e,t){if(t)for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];"object"==typeof n&&"object"==typeof e[i]?e[i]=S6({},e[i],n):e[i]=n}return e}var K6,q6=function(e,t,i,n,s,r){!e.required||i.hasOwnProperty(e.field)&&!L6(t,r||e.type)||n.push(N6(s.messages.required,e.fullField))},Y6=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,V6=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,W6={integer:function(e){return W6.number(e)&&parseInt(e,10)===e},float:function(e){return W6.number(e)&&!W6.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(I2){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"==typeof e&&!W6.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match(Y6)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(function(){if(K6)return K6;var e="[a-fA-F\\d:]",t=function(t){return t&&t.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},i="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",s=("\n(?:\n(?:"+n+":){7}(?:"+n+"|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8\n(?:"+n+":){6}(?:"+i+"|:"+n+"|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4\n(?:"+n+":){5}(?::"+i+"|(?::"+n+"){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4\n(?:"+n+":){4}(?:(?::"+n+"){0,1}:"+i+"|(?::"+n+"){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4\n(?:"+n+":){3}(?:(?::"+n+"){0,2}:"+i+"|(?::"+n+"){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4\n(?:"+n+":){2}(?:(?::"+n+"){0,3}:"+i+"|(?::"+n+"){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4\n(?:"+n+":){1}(?:(?::"+n+"){0,4}:"+i+"|(?::"+n+"){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::"+n+"){0,5}:"+i+"|(?::"+n+"){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),r=new RegExp("(?:^"+i+"$)|(?:^"+s+"$)"),a=new RegExp("^"+i+"$"),o=new RegExp("^"+s+"$"),l=function(e){return e&&e.exact?r:new RegExp("(?:"+t(e)+i+t(e)+")|(?:"+t(e)+s+t(e)+")","g")};l.v4=function(e){return e&&e.exact?a:new RegExp(""+t(e)+i+t(e),"g")},l.v6=function(e){return e&&e.exact?o:new RegExp(""+t(e)+s+t(e),"g")};var A=l.v4().source,c=l.v6().source;return K6=new RegExp("(?:^(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|"+A+"|"+c+'|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)',"i")}())},hex:function(e){return"string"==typeof e&&!!e.match(V6)}},j6="enum",J6={required:q6,whitespace:function(e,t,i,n,s){(/^\s+$/.test(t)||""===t)&&n.push(N6(s.messages.whitespace,e.fullField))},type:function(e,t,i,n,s){if(e.required&&void 0===t)q6(e,t,i,n,s);else{var r=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(r)>-1?W6[r](t)||n.push(N6(s.messages.types[r],e.fullField,e.type)):r&&typeof t!==e.type&&n.push(N6(s.messages.types[r],e.fullField,e.type))}},range:function(e,t,i,n,s){var r="number"==typeof e.len,a="number"==typeof e.min,o="number"==typeof e.max,l=t,A=null,c="number"==typeof t,u="string"==typeof t,h=Array.isArray(t);if(c?A="number":u?A="string":h&&(A="array"),!A)return!1;h&&(l=t.length),u&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),r?l!==e.len&&n.push(N6(s.messages[A].len,e.fullField,e.len)):a&&!o&&l<e.min?n.push(N6(s.messages[A].min,e.fullField,e.min)):o&&!a&&l>e.max?n.push(N6(s.messages[A].max,e.fullField,e.max)):a&&o&&(l<e.min||l>e.max)&&n.push(N6(s.messages[A].range,e.fullField,e.min,e.max))},enum:function(e,t,i,n,s){e[j6]=Array.isArray(e[j6])?e[j6]:[],-1===e[j6].indexOf(t)&&n.push(N6(s.messages[j6],e.fullField,e[j6].join(", ")))},pattern:function(e,t,i,n,s){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||n.push(N6(s.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"==typeof e.pattern){new RegExp(e.pattern).test(t)||n.push(N6(s.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},z6=function(e,t,i,n,s){var r=e.type,a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t,r)&&!e.required)return i();J6.required(e,t,n,a,s,r),L6(t,r)||J6.type(e,t,n,a,s)}i(a)},X6={string:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t,"string")&&!e.required)return i();J6.required(e,t,n,r,s,"string"),L6(t,"string")||(J6.type(e,t,n,r,s),J6.range(e,t,n,r,s),J6.pattern(e,t,n,r,s),!0===e.whitespace&&J6.whitespace(e,t,n,r,s))}i(r)},method:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t)&&!e.required)return i();J6.required(e,t,n,r,s),void 0!==t&&J6.type(e,t,n,r,s)}i(r)},number:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(""===t&&(t=void 0),L6(t)&&!e.required)return i();J6.required(e,t,n,r,s),void 0!==t&&(J6.type(e,t,n,r,s),J6.range(e,t,n,r,s))}i(r)},boolean:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t)&&!e.required)return i();J6.required(e,t,n,r,s),void 0!==t&&J6.type(e,t,n,r,s)}i(r)},regexp:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t)&&!e.required)return i();J6.required(e,t,n,r,s),L6(t)||J6.type(e,t,n,r,s)}i(r)},integer:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t)&&!e.required)return i();J6.required(e,t,n,r,s),void 0!==t&&(J6.type(e,t,n,r,s),J6.range(e,t,n,r,s))}i(r)},float:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t)&&!e.required)return i();J6.required(e,t,n,r,s),void 0!==t&&(J6.type(e,t,n,r,s),J6.range(e,t,n,r,s))}i(r)},array:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(null==t&&!e.required)return i();J6.required(e,t,n,r,s,"array"),null!=t&&(J6.type(e,t,n,r,s),J6.range(e,t,n,r,s))}i(r)},object:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t)&&!e.required)return i();J6.required(e,t,n,r,s),void 0!==t&&J6.type(e,t,n,r,s)}i(r)},enum:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t)&&!e.required)return i();J6.required(e,t,n,r,s),void 0!==t&&J6.enum(e,t,n,r,s)}i(r)},pattern:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t,"string")&&!e.required)return i();J6.required(e,t,n,r,s),L6(t,"string")||J6.pattern(e,t,n,r,s)}i(r)},date:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t,"date")&&!e.required)return i();var a;if(J6.required(e,t,n,r,s),!L6(t,"date"))a=t instanceof Date?t:new Date(t),J6.type(e,a,n,r,s),a&&J6.range(e,a.getTime(),n,r,s)}i(r)},url:z6,hex:z6,email:z6,required:function(e,t,i,n,s){var r=[],a=Array.isArray(t)?"array":typeof t;J6.required(e,t,n,r,s,a),i(r)},any:function(e,t,i,n,s){var r=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(L6(t)&&!e.required)return i();J6.required(e,t,n,r,s)}i(r)}};function $6(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Z6=$6(),e8=function(){function e(e){this.rules=null,this._messages=Z6,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((function(i){var n=e[i];t.rules[i]=Array.isArray(n)?n:[n]}))},t.messages=function(e){return e&&(this._messages=G6($6(),e)),this._messages},t.validate=function(t,i,n){var s=this;void 0===i&&(i={}),void 0===n&&(n=function(){});var r=t,a=i,o=n;if("function"==typeof a&&(o=a,a={}),!this.rules||0===Object.keys(this.rules).length)return o&&o(null,r),Promise.resolve(r);if(a.messages){var l=this.messages();l===Z6&&(l=$6()),G6(l,a.messages),a.messages=l}else a.messages=this.messages();var A={};(a.keys||Object.keys(this.rules)).forEach((function(e){var i=s.rules[e],n=r[e];i.forEach((function(i){var a=i;"function"==typeof a.transform&&(r===t&&(r=S6({},r)),n=r[e]=a.transform(n)),(a="function"==typeof a?{validator:a}:S6({},a)).validator=s.getValidationMethod(a),a.validator&&(a.field=e,a.fullField=a.fullField||e,a.type=s.getType(a),A[e]=A[e]||[],A[e].push({rule:a,value:n,source:r,field:e}))}))}));var c={};return P6(A,a,(function(t,i){var n,s=t.rule,o=!("object"!==s.type&&"array"!==s.type||"object"!=typeof s.fields&&"object"!=typeof s.defaultField);function l(e,t){return S6({},t,{fullField:s.fullField+"."+e,fullFields:s.fullFields?[].concat(s.fullFields,[e]):[e]})}function A(n){void 0===n&&(n=[]);var A=Array.isArray(n)?n:[n];!a.suppressWarning&&A.length&&e.warning("async-validator:",A),A.length&&void 0!==s.message&&(A=[].concat(s.message));var u=A.map(O6(s,r));if(a.first&&u.length)return c[s.field]=1,i(u);if(o){if(s.required&&!t.value)return void 0!==s.message?u=[].concat(s.message).map(O6(s,r)):a.error&&(u=[a.error(s,N6(a.messages.required,s.field))]),i(u);var h={};s.defaultField&&Object.keys(t.value).map((function(e){h[e]=s.defaultField})),h=S6({},h,t.rule.fields);var d={};Object.keys(h).forEach((function(e){var t=h[e],i=Array.isArray(t)?t:[t];d[e]=i.map(l.bind(null,e))}));var g=new e(d);g.messages(a.messages),t.rule.options&&(t.rule.options.messages=a.messages,t.rule.options.error=a.error),g.validate(t.value,t.rule.options||a,(function(e){var t=[];u&&u.length&&t.push.apply(t,u),e&&e.length&&t.push.apply(t,e),i(t.length?t:null)}))}else i(u)}if(o=o&&(s.required||!s.required&&t.value),s.field=t.field,s.asyncValidator)n=s.asyncValidator(s,t.value,A,t.source,a);else if(s.validator){try{n=s.validator(s,t.value,A,t.source,a)}catch(u){null==console.error||console.error(u),a.suppressValidatorError||setTimeout((function(){throw u}),0),A(u.message)}!0===n?A():!1===n?A("function"==typeof s.message?s.message(s.fullField||s.field):s.message||(s.fullField||s.field)+" fails"):n instanceof Array?A(n):n instanceof Error&&A(n.message)}n&&n.then&&n.then((function(){return A()}),(function(e){return A(e)}))}),(function(e){!function(e){var t=[],i={};function n(e){var i;Array.isArray(e)?t=(i=t).concat.apply(i,e):t.push(e)}for(var s=0;s<e.length;s++)n(e[s]);t.length?(i=R6(t),o(t,i)):o(null,r)}(e)}),r)},t.getType=function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!X6.hasOwnProperty(e.type))throw new Error(N6("Unknown rule type %s",e.type));return e.type||"string"},t.getValidationMethod=function(e){if("function"==typeof e.validator)return e.validator;var t=Object.keys(e),i=t.indexOf("message");return-1!==i&&t.splice(i,1),1===t.length&&"required"===t[0]?X6.required:X6[this.getType(e)]||void 0},e}();e8.register=function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");X6[e]=t},e8.warning=M6,e8.messages=Z6,e8.validators=X6;const t8=BU({label:String,labelWidth:{type:[String,Number],default:""},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:[String,Array]},required:{type:Boolean,default:void 0},rules:{type:[Object,Array]},error:String,validateStatus:{type:String,values:["","error","validating","success"]},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:yU}}),i8="ElLabelWrap";var n8=hg({name:i8,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const i=pp(Lj,void 0),n=pp(Uj);n||lU(i8,"usage: <el-form-item><label-wrap /></el-form-item>");const s=KF("form"),r=zh(),a=zh(0),o=(n="update")=>{Qd((()=>{t.default&&e.isAutoWidth&&("update"===n?a.value=(()=>{var e;if(null==(e=r.value)?void 0:e.firstElementChild){const e=window.getComputedStyle(r.value.firstElementChild).width;return Math.ceil(Number.parseFloat(e))}return 0})():"remove"===n&&(null==i||i.deregisterLabelWidth(a.value)))}))},l=()=>o("update");return Eg((()=>{l()})),_g((()=>{o("remove")})),Qg((()=>l())),Pp(a,((t,n)=>{e.updateAll&&(null==i||i.registerLabelWidth(t,n))})),WL(qf((()=>{var e,t;return null!=(t=null==(e=r.value)?void 0:e.firstElementChild)?t:null})),l),()=>{var o,l;if(!t)return null;const{isAutoWidth:A}=e;if(A){const e=null==i?void 0:i.autoLabelWidth,l={};if((null==n?void 0:n.hasLabel)&&e&&"auto"!==e){const t=Math.max(0,Number.parseInt(e,10)-a.value),s=n.labelPosition||i.labelPosition;t&&(l["left"===s?"marginRight":"marginLeft"]=`${t}px`)}return mf("div",{ref:r,class:[s.be("item","label-wrap")],style:l},[null==(o=t.default)?void 0:o.call(t)])}return mf(Zp,{ref:r},[null==(l=t.default)?void 0:l.call(t)])}}});const s8=hg({...hg({name:"ElFormItem"}),props:t8,setup(e,{expose:t}){const i=e,n=jg(),s=pp(Lj,void 0),r=pp(Uj,void 0),a=Vj(void 0,{formItem:!1}),o=KF("form-item"),l=Gj().value,A=zh([]),c=zh(""),u=function(e,t=200,i={}){const n=zh(e.value),s=DL((()=>{n.value=e.value}),t,i);return Pp(e,(()=>s())),n}(c,100),h=zh(""),d=zh();let g,p=!1;const f=qf((()=>i.labelPosition||(null==s?void 0:s.labelPosition))),m=qf((()=>{if("top"===f.value)return{};const e=$U(i.labelWidth||(null==s?void 0:s.labelWidth)||"");return e?{width:e}:{}})),C=qf((()=>{if("top"===f.value||(null==s?void 0:s.inline))return{};if(!i.label&&!i.labelWidth&&Q)return{};const e=$U(i.labelWidth||(null==s?void 0:s.labelWidth)||"");return i.label||n.label?{}:{marginLeft:e}})),I=qf((()=>[o.b(),o.m(a.value),o.is("error","error"===c.value),o.is("validating","validating"===c.value),o.is("success","success"===c.value),o.is("required",k.value||i.required),o.is("no-asterisk",null==s?void 0:s.hideRequiredAsterisk),"right"===(null==s?void 0:s.requireAsteriskPosition)?"asterisk-right":"asterisk-left",{[o.m("feedback")]:null==s?void 0:s.statusIcon,[o.m(`label-${f.value}`)]:f.value}])),v=qf((()=>lL(i.inlineMessage)?i.inlineMessage:(null==s?void 0:s.inlineMessage)||!1)),B=qf((()=>[o.e("error"),{[o.em("error","inline")]:v.value}])),y=qf((()=>i.prop?Gc(i.prop)?i.prop:i.prop.join("."):"")),b=qf((()=>!(!i.label&&!n.label))),E=qf((()=>i.for||(1===A.value.length?A.value[0]:void 0))),w=qf((()=>!E.value&&b.value)),Q=!!r,_=qf((()=>{const e=null==s?void 0:s.model;if(e&&i.prop)return FU(e,i.prop).value})),S=qf((()=>{const{required:e}=i,t=[];i.rules&&t.push(...hR(i.rules));const n=null==s?void 0:s.rules;if(n&&i.prop){const e=FU(n,i.prop).value;e&&t.push(...hR(e))}if(void 0!==e){const i=t.map(((e,t)=>[e,t])).filter((([e])=>Object.keys(e).includes("required")));if(i.length>0)for(const[n,s]of i)n.required!==e&&(t[s]={...n,required:e});else t.push({required:e})}return t})),x=qf((()=>S.value.length>0)),k=qf((()=>S.value.some((e=>e.required)))),D=qf((()=>{var e;return"error"===u.value&&i.showMessage&&(null==(e=null==s?void 0:s.showMessage)||e)})),F=qf((()=>`${i.label||""}${(null==s?void 0:s.labelSuffix)||""}`)),T=e=>{c.value=e},M=async e=>{const t=y.value;return new e8({[t]:e}).validate({[t]:_.value},{firstFields:!0}).then((()=>(T("success"),null==s||s.emit("validate",i.prop,!0,""),!0))).catch((e=>((e=>{var t,n;const{errors:r,fields:a}=e;r&&a||console.error(e),T("error"),h.value=r?null!=(n=null==(t=null==r?void 0:r[0])?void 0:t.message)?n:`${i.prop} is required`:"",null==s||s.emit("validate",i.prop,!1,h.value)})(e),Promise.reject(e))))},R=async(e,t)=>{if(p||!i.prop)return!1;const n=Oc(t);if(!x.value)return null==t||t(!1),!1;const s=(e=>S.value.filter((t=>!t.trigger||!e||(Lc(t.trigger)?t.trigger.includes(e):t.trigger===e))).map((({trigger:e,...t})=>t)))(e);return 0===s.length?(null==t||t(!0),!0):(T("validating"),M(s).then((()=>(null==t||t(!0),!0))).catch((e=>{const{fields:i}=e;return null==t||t(!1,i),!n&&Promise.reject(i)})))},N=()=>{T(""),h.value="",p=!1},L=async()=>{const e=null==s?void 0:s.model;if(!e||!i.prop)return;const t=FU(e,i.prop);p=!0,t.value=rN(g),await Qd(),N(),p=!1};Pp((()=>i.error),(e=>{h.value=e||"",T(e?"error":"")}),{immediate:!0}),Pp((()=>i.validateStatus),(e=>T(e||"")));const U=Lh({...rd(i),$el:d,size:a,validateState:c,labelId:l,inputIds:A,isGroup:w,hasLabel:b,fieldValue:_,addInputId:e=>{A.value.includes(e)||A.value.push(e)},removeInputId:e=>{A.value=A.value.filter((t=>t!==e))},resetField:L,clearValidate:N,validate:R});return gp(Uj,U),Eg((()=>{i.prop&&(null==s||s.addField(U),g=rN(_.value))})),_g((()=>{null==s||s.removeField(U)})),t({size:a,validateMessage:h,validateState:c,validate:R,clearValidate:N,resetField:L}),(e,t)=>{var i;return af(),cf("div",{ref_key:"formItemRef",ref:d,class:pu(ed(I)),role:ed(w)?"group":void 0,"aria-labelledby":ed(w)?ed(l):void 0},[mf(ed(n8),{"is-auto-width":"auto"===ed(m).width,"update-all":"auto"===(null==(i=ed(s))?void 0:i.labelWidth)},{default:Nd((()=>[ed(b)?(af(),uf(Ng(ed(E)?"label":"div"),{key:0,id:ed(l),for:ed(E),class:pu(ed(o).e("label")),style:cu(ed(m))},{default:Nd((()=>[Gg(e.$slots,"label",{label:ed(F)},(()=>[vf(yu(ed(F)),1)]))])),_:3},8,["id","for","class","style"])):Bf("v-if",!0)])),_:3},8,["is-auto-width","update-all"]),ff("div",{class:pu(ed(o).e("content")),style:cu(ed(C))},[Gg(e.$slots,"default"),mf(Wm,{name:`${ed(o).namespace.value}-zoom-in-top`},{default:Nd((()=>[ed(D)?Gg(e.$slots,"error",{key:0,error:h.value},(()=>[ff("div",{class:pu(ed(B))},yu(h.value),3)])):Bf("v-if",!0)])),_:3},8,["name"])],6)],10,["role","aria-labelledby"])}}});var r8=KU(s8,[["__file","form-item.vue"]]);const a8=lH(_6,{FormItem:r8}),o8=cH(r8),l8=BU({urlList:{type:Array,default:()=>[]},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:String}}),A8={close:()=>!0,switch:e=>AL(e),rotate:e=>AL(e)},c8=hg({...hg({name:"ElImageViewer"}),props:l8,emits:A8,setup(e,{expose:t,emit:i}){var n;const s=e,r={CONTAIN:{name:"contain",icon:Vh(MK)},ORIGINAL:{name:"original",icon:Vh(XV)}},{t:a}=CU(),o=KF("image-viewer"),{nextZIndex:l}=dU(),A=zh(),c=zh([]),u=Su(),h=zh(!0),d=zh(s.initialIndex),g=Xh(r.CONTAIN),p=zh({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),f=zh(null!=(n=s.zIndex)?n:l()),m=qf((()=>{const{urlList:e}=s;return e.length<=1})),C=qf((()=>0===d.value)),I=qf((()=>d.value===s.urlList.length-1)),v=qf((()=>s.urlList[d.value])),B=qf((()=>[o.e("btn"),o.e("prev"),o.is("disabled",!s.infinite&&C.value)])),y=qf((()=>[o.e("btn"),o.e("next"),o.is("disabled",!s.infinite&&I.value)])),b=qf((()=>{const{scale:e,deg:t,offsetX:i,offsetY:n,enableTransition:s}=p.value;let a=i/e,o=n/e;const l=t*Math.PI/180,A=Math.cos(l),c=Math.sin(l);a=a*A+o*c,o=o*A-i/e*c;const u={transform:`scale(${e}) rotate(${t}deg) translate(${a}px, ${o}px)`,transition:s?"transform .3s":""};return g.value.name===r.CONTAIN.name&&(u.maxWidth=u.maxHeight="100%"),u}));function E(){u.stop(),i("close")}function w(){h.value=!1}function Q(e){h.value=!1,e.target.alt=a("el.image.error")}function _(e){if(h.value||0!==e.button||!A.value)return;p.value.enableTransition=!1;const{offsetX:t,offsetY:i}=p.value,n=e.pageX,s=e.pageY,r=sL((e=>{p.value={...p.value,offsetX:t+e.pageX-n,offsetY:i+e.pageY-s}})),a=UL(document,"mousemove",r);UL(document,"mouseup",(()=>{a()})),e.preventDefault()}function S(){p.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function x(){if(h.value)return;const e=kU(r),t=Object.values(r),i=g.value.name,n=(t.findIndex((e=>e.name===i))+1)%e.length;g.value=r[e[n]],S()}function k(e){const t=s.urlList.length;d.value=(e+t)%t}function D(){C.value&&!s.infinite||k(d.value-1)}function F(){I.value&&!s.infinite||k(d.value+1)}function T(e,t={}){if(h.value)return;const{minScale:n,maxScale:r}=s,{zoomRate:a,rotateDeg:o,enableTransition:l}={zoomRate:s.zoomRate,rotateDeg:90,enableTransition:!0,...t};switch(e){case"zoomOut":p.value.scale>n&&(p.value.scale=Number.parseFloat((p.value.scale/a).toFixed(3)));break;case"zoomIn":p.value.scale<r&&(p.value.scale=Number.parseFloat((p.value.scale*a).toFixed(3)));break;case"clockwise":p.value.deg+=o,i("rotate",p.value.deg);break;case"anticlockwise":p.value.deg-=o,i("rotate",p.value.deg)}p.value.enableTransition=l}function M(e){var t;"pointer"===(null==(t=e.detail)?void 0:t.focusReason)&&e.preventDefault()}function R(){s.closeOnPressEscape&&E()}return Pp(v,(()=>{Qd((()=>{const e=c.value[0];(null==e?void 0:e.complete)||(h.value=!0)}))})),Pp(d,(e=>{S(),i("switch",e)})),Eg((()=>{!function(){const e=sL((e=>{switch(e.code){case zJ.esc:s.closeOnPressEscape&&E();break;case zJ.space:x();break;case zJ.left:D();break;case zJ.up:T("zoomIn");break;case zJ.right:F();break;case zJ.down:T("zoomOut")}})),t=sL((e=>{T((e.deltaY||e.deltaX)<0?"zoomIn":"zoomOut",{zoomRate:s.zoomRate,enableTransition:!1})}));u.run((()=>{UL(document,"keydown",e),UL(document,"wheel",t)}))}()})),t({setActiveItem:k}),(e,t)=>(af(),uf(ed(YX),{to:"body",disabled:!e.teleported},{default:Nd((()=>[mf(am,{name:"viewer-fade",appear:""},{default:Nd((()=>[ff("div",{ref_key:"wrapper",ref:A,tabindex:-1,class:pu(ed(o).e("wrapper")),style:cu({zIndex:f.value})},[mf(ed(ez),{loop:"",trapped:"","focus-trap-el":A.value,"focus-start-el":"container",onFocusoutPrevented:M,onReleaseRequested:R},{default:Nd((()=>[ff("div",{class:pu(ed(o).e("mask")),onClick:AC((t=>e.hideOnClickModal&&E()),["self"])},null,10,["onClick"]),Bf(" CLOSE "),ff("span",{class:pu([ed(o).e("btn"),ed(o).e("close")]),onClick:E},[mf(ed(gH),null,{default:Nd((()=>[mf(ed(CO))])),_:1})],2),Bf(" ARROW "),ed(m)?Bf("v-if",!0):(af(),cf(Zp,{key:0},[ff("span",{class:pu(ed(B)),onClick:D},[mf(ed(gH),null,{default:Nd((()=>[mf(ed(kH))])),_:1})],2),ff("span",{class:pu(ed(y)),onClick:F},[mf(ed(gH),null,{default:Nd((()=>[mf(ed(MH))])),_:1})],2)],64)),Bf(" ACTIONS "),ff("div",{class:pu([ed(o).e("btn"),ed(o).e("actions")])},[ff("div",{class:pu(ed(o).e("actions__inner"))},[mf(ed(gH),{onClick:e=>T("zoomOut")},{default:Nd((()=>[mf(ed(gj))])),_:1},8,["onClick"]),mf(ed(gH),{onClick:e=>T("zoomIn")},{default:Nd((()=>[mf(ed(dj))])),_:1},8,["onClick"]),ff("i",{class:pu(ed(o).e("actions__divider"))},null,2),mf(ed(gH),{onClick:x},{default:Nd((()=>[(af(),uf(Ng(ed(g).icon)))])),_:1}),ff("i",{class:pu(ed(o).e("actions__divider"))},null,2),mf(ed(gH),{onClick:e=>T("anticlockwise")},{default:Nd((()=>[mf(ed(qV))])),_:1},8,["onClick"]),mf(ed(gH),{onClick:e=>T("clockwise")},{default:Nd((()=>[mf(ed(YV))])),_:1},8,["onClick"])],2)],2),Bf(" CANVAS "),ff("div",{class:pu(ed(o).e("canvas"))},[(af(!0),cf(Zp,null,Pg(e.urlList,((t,i)=>Ld((af(),cf("img",{ref_for:!0,ref:e=>c.value[i]=e,key:t,src:t,style:cu(ed(b)),class:pu(ed(o).e("img")),crossorigin:e.crossorigin,onLoad:w,onError:Q,onMousedown:_},null,46,["src","crossorigin"])),[[ym,i===d.value]]))),128))],2),Gg(e.$slots,"default")])),_:3},8,["focus-trap-el"])],6)])),_:3})])),_:3},8,["disabled"]))}});const u8=lH(KU(c8,[["__file","image-viewer.vue"]])),h8=BU({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:[String,Object]},previewSrcList:{type:Array,default:()=>[]},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:String}}),d8={load:e=>e instanceof Event,error:e=>e instanceof Event,switch:e=>AL(e),close:()=>!0,show:()=>!0},g8=hg({...hg({name:"ElImage",inheritAttrs:!1}),props:h8,emits:d8,setup(e,{emit:t}){const i=e;let n="";const{t:s}=CU(),r=KF("image"),a=Jg(),o=qf((()=>YN(Object.entries(a).filter((([e])=>/^(data-|on[A-Z])/i.test(e)||["id","style"].includes(e)))))),l=Nj({excludeListeners:!0,excludeKeys:qf((()=>Object.keys(o.value)))}),A=zh(),c=zh(!1),u=zh(!0),h=zh(!1),d=zh(),g=zh(),p=bL&&"loading"in HTMLImageElement.prototype;let f,m;const C=qf((()=>[r.e("inner"),v.value&&r.e("preview"),u.value&&r.is("loading")])),I=qf((()=>{const{fit:e}=i;return bL&&e?{objectFit:e}:{}})),v=qf((()=>{const{previewSrcList:e}=i;return Lc(e)&&e.length>0})),B=qf((()=>{const{previewSrcList:e,initialIndex:t}=i;let n=t;return t>e.length-1&&(n=0),n})),y=qf((()=>"eager"!==i.loading&&(!p&&"lazy"===i.loading||i.lazy))),b=()=>{bL&&(u.value=!0,c.value=!1,A.value=i.src)};function E(e){u.value=!1,c.value=!1,t("load",e)}function w(e){u.value=!1,c.value=!0,t("error",e)}function Q(){((e,t)=>{if(!bL||!e||!t)return!1;const i=e.getBoundingClientRect();let n;return n=t instanceof Element?t.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},i.top<n.bottom&&i.bottom>n.top&&i.right>n.left&&i.left<n.right})(d.value,g.value)&&(b(),x())}const _=FL(Q,200,!0);async function S(){var e;if(!bL)return;await Qd();const{scrollContainer:t}=i;uL(t)?g.value=t:Gc(t)&&""!==t?g.value=null!=(e=document.querySelector(t))?e:void 0:d.value&&(g.value=eH(d.value)),g.value&&(f=UL(g,"scroll",_),setTimeout((()=>Q()),100))}function x(){bL&&g.value&&_&&(null==f||f(),g.value=void 0)}function k(e){if(e.ctrlKey)return e.deltaY<0||e.deltaY>0?(e.preventDefault(),!1):void 0}function D(){v.value&&(m=UL("wheel",k,{passive:!1}),n=document.body.style.overflow,document.body.style.overflow="hidden",h.value=!0,t("show"))}function F(){null==m||m(),document.body.style.overflow=n,h.value=!1,t("close")}function T(e){t("switch",e)}return Pp((()=>i.src),(()=>{y.value?(u.value=!0,c.value=!1,x(),S()):b()})),Eg((()=>{y.value?S():b()})),(e,t)=>(af(),cf("div",wf({ref_key:"container",ref:d},ed(o),{class:[ed(r).b(),e.$attrs.class]}),[c.value?Gg(e.$slots,"error",{key:0},(()=>[ff("div",{class:pu(ed(r).e("error"))},yu(ed(s)("el.image.error")),3)])):(af(),cf(Zp,{key:1},[void 0!==A.value?(af(),cf("img",wf({key:0},ed(l),{src:A.value,loading:e.loading,style:ed(I),class:ed(C),crossorigin:e.crossorigin,onClick:D,onLoad:E,onError:w}),null,16,["src","loading","crossorigin"])):Bf("v-if",!0),u.value?(af(),cf("div",{key:1,class:pu(ed(r).e("wrapper"))},[Gg(e.$slots,"placeholder",{},(()=>[ff("div",{class:pu(ed(r).e("placeholder"))},null,2)]))],2)):Bf("v-if",!0)],64)),ed(v)?(af(),cf(Zp,{key:2},[h.value?(af(),uf(ed(u8),{key:0,"z-index":e.zIndex,"initial-index":ed(B),infinite:e.infinite,"zoom-rate":e.zoomRate,"min-scale":e.minScale,"max-scale":e.maxScale,"url-list":e.previewSrcList,crossorigin:e.crossorigin,"hide-on-click-modal":e.hideOnClickModal,teleported:e.previewTeleported,"close-on-press-escape":e.closeOnPressEscape,onClose:F,onSwitch:T},{default:Nd((()=>[e.$slots.viewer?(af(),cf("div",{key:0},[Gg(e.$slots,"viewer")])):Bf("v-if",!0)])),_:3},8,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","url-list","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):Bf("v-if",!0)],64)):Bf("v-if",!0)],16))}});const p8=lH(KU(g8,[["__file","image.vue"]])),f8=BU({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:bU,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>null===e||AL(e)||["min","max"].includes(e),default:null},name:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0},...Dj(["ariaLabel"])}),m8={[HU]:(e,t)=>t!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[PU]:e=>AL(e)||jN(e),[UU]:e=>AL(e)||jN(e)},C8=hg({...hg({name:"ElInputNumber"}),props:f8,emits:m8,setup(e,{expose:t,emit:i}){const n=e,{t:s}=CU(),r=KF("input-number"),a=zh(),o=Lh({currentValue:n.modelValue,userInput:null}),{formItem:l}=Kj(),A=qf((()=>AL(n.modelValue)&&n.modelValue<=n.min)),c=qf((()=>AL(n.modelValue)&&n.modelValue>=n.max)),u=qf((()=>{const e=m(n.step);return oL(n.precision)?Math.max(m(n.modelValue),e):(n.precision,n.precision)})),h=qf((()=>n.controls&&"right"===n.controlsPosition)),d=Vj(),g=Wj(),p=qf((()=>{if(null!==o.userInput)return o.userInput;let e=o.currentValue;if(jN(e))return"";if(AL(e)){if(Number.isNaN(e))return"";oL(n.precision)||(e=e.toFixed(n.precision))}return e})),f=(e,t)=>{if(oL(t)&&(t=u.value),0===t)return Math.round(e);let i=String(e);const n=i.indexOf(".");if(-1===n)return e;if(!i.replace(".","").split("")[n+t])return e;const s=i.length;return"5"===i.charAt(s-1)&&(i=`${i.slice(0,Math.max(0,s-1))}6`),Number.parseFloat(Number(i).toFixed(t))},m=e=>{if(jN(e))return 0;const t=e.toString(),i=t.indexOf(".");let n=0;return-1!==i&&(n=t.length-i-1),n},C=(e,t=1)=>AL(e)?f(e+n.step*t):o.currentValue,I=()=>{if(n.readonly||g.value||c.value)return;const e=Number(p.value)||0,t=C(e);y(t),i(PU,o.currentValue),_()},v=()=>{if(n.readonly||g.value||A.value)return;const e=Number(p.value)||0,t=C(e,-1);y(t),i(PU,o.currentValue),_()},B=(e,t)=>{const{max:s,min:r,step:a,precision:o,stepStrictly:l,valueOnClear:A}=n;s<r&&lU("InputNumber","min should not be greater than max.");let c=Number(e);if(jN(e)||Number.isNaN(c))return null;if(""===e){if(null===A)return null;c=Gc(A)?{min:r,max:s}[A]:A}return l&&(c=f(Math.round(c/a)*a,o),c!==e&&t&&i(UU,c)),oL(o)||(c=f(c,o)),(c>s||c<r)&&(c=c>s?s:r,t&&i(UU,c)),c},y=(e,t=!0)=>{var s;const r=o.currentValue,a=B(e);t?r===a&&e||(o.userInput=null,i(UU,a),r!==a&&i(HU,a,r),n.validateEvent&&(null==(s=null==l?void 0:l.validate)||s.call(l,"change").catch((e=>{}))),o.currentValue=a):i(UU,a)},b=e=>{o.userInput=e;const t=""===e?null:Number(e);i(PU,t),y(t,!1)},E=e=>{const t=""!==e?Number(e):"";(AL(t)&&!Number.isNaN(t)||""===e)&&y(t),_(),o.userInput=null},w=e=>{i("focus",e)},Q=e=>{var t,s;o.userInput=null,wj()&&null===o.currentValue&&(null==(t=a.value)?void 0:t.input)&&(a.value.input.value=""),i("blur",e),n.validateEvent&&(null==(s=null==l?void 0:l.validate)||s.call(l,"blur").catch((e=>{})))},_=()=>{o.currentValue!==n.modelValue&&(o.currentValue=n.modelValue)},S=e=>{document.activeElement===e.target&&e.preventDefault()};return Pp((()=>n.modelValue),((e,t)=>{const i=B(e,!0);null===o.userInput&&i!==t&&(o.currentValue=i)}),{immediate:!0}),Eg((()=>{var e;const{min:t,max:s,modelValue:r}=n,l=null==(e=a.value)?void 0:e.input;if(l.setAttribute("role","spinbutton"),Number.isFinite(s)?l.setAttribute("aria-valuemax",String(s)):l.removeAttribute("aria-valuemax"),Number.isFinite(t)?l.setAttribute("aria-valuemin",String(t)):l.removeAttribute("aria-valuemin"),l.setAttribute("aria-valuenow",o.currentValue||0===o.currentValue?String(o.currentValue):""),l.setAttribute("aria-disabled",String(g.value)),!AL(r)&&null!=r){let e=Number(r);Number.isNaN(e)&&(e=null),i(UU,e)}l.addEventListener("wheel",S,{passive:!1})})),Qg((()=>{var e,t;const i=null==(e=a.value)?void 0:e.input;null==i||i.setAttribute("aria-valuenow",`${null!=(t=o.currentValue)?t:""}`)})),t({focus:()=>{var e,t;null==(t=null==(e=a.value)?void 0:e.focus)||t.call(e)},blur:()=>{var e,t;null==(t=null==(e=a.value)?void 0:e.blur)||t.call(e)}}),(e,t)=>(af(),cf("div",{class:pu([ed(r).b(),ed(r).m(ed(d)),ed(r).is("disabled",ed(g)),ed(r).is("without-controls",!e.controls),ed(r).is("controls-right",ed(h))]),onDragstart:AC((()=>{}),["prevent"])},[e.controls?Ld((af(),cf("span",{key:0,role:"button","aria-label":ed(s)("el.inputNumber.decrease"),class:pu([ed(r).e("decrease"),ed(r).is("disabled",ed(A))]),onKeydown:uC(v,["enter"])},[Gg(e.$slots,"decrease-icon",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[ed(h)?(af(),uf(ed(QH),{key:0})):(af(),uf(ed(SY),{key:1}))])),_:1})]))],42,["aria-label","onKeydown"])),[[ed($2),v]]):Bf("v-if",!0),e.controls?Ld((af(),cf("span",{key:1,role:"button","aria-label":ed(s)("el.inputNumber.increase"),class:pu([ed(r).e("increase"),ed(r).is("disabled",ed(c))]),onKeydown:uC(I,["enter"])},[Gg(e.$slots,"increase-icon",{},(()=>[mf(ed(gH),null,{default:Nd((()=>[ed(h)?(af(),uf(ed(UH),{key:0})):(af(),uf(ed(kV),{key:1}))])),_:1})]))],42,["aria-label","onKeydown"])),[[ed($2),I]]):Bf("v-if",!0),mf(ed(Xj),{id:e.id,ref_key:"input",ref:a,type:"number",step:e.step,"model-value":ed(p),placeholder:e.placeholder,readonly:e.readonly,disabled:ed(g),size:ed(d),max:e.max,min:e.min,name:e.name,"aria-label":e.ariaLabel,"validate-event":!1,onKeydown:[uC(AC(I,["prevent"]),["up"]),uC(AC(v,["prevent"]),["down"])],onBlur:Q,onFocus:w,onInput:b,onChange:E},Og({_:2},[e.$slots.prefix?{name:"prefix",fn:Nd((()=>[Gg(e.$slots,"prefix")]))}:void 0,e.$slots.suffix?{name:"suffix",fn:Nd((()=>[Gg(e.$slots,"suffix")]))}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});const I8=lH(KU(C8,[["__file","input-number.vue"]])),v8=BU({modelValue:{type:Array},max:Number,tagType:{...q0.type,default:"info"},tagEffect:q0.effect,trigger:{type:String,default:zJ.enter},draggable:{type:Boolean,default:!1},size:bU,clearable:Boolean,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},readonly:Boolean,autofocus:Boolean,id:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},placeholder:String,autocomplete:{type:String,default:"off"},ariaLabel:String}),B8={[UU]:e=>Lc(e)||oL(e),[HU]:e=>Lc(e)||oL(e),[PU]:e=>Gc(e),"add-tag":e=>Gc(e),"remove-tag":e=>Gc(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0};const y8=hg({...hg({name:"ElInputTag",inheritAttrs:!1}),props:v8,emits:B8,setup(e,{expose:t,emit:i}){const n=e,s=Nj(),r=jg(),{form:a,formItem:o}=Kj(),{inputId:l}=qj(n,{formItemContext:o}),A=qf((()=>{var e;return null!=(e=null==a?void 0:a.statusIcon)&&e})),c=qf((()=>(null==o?void 0:o.validateState)||"")),u=qf((()=>c.value&&vj[c.value])),{inputRef:h,wrapperRef:d,isFocused:g,inputValue:p,size:f,tagSize:m,placeholder:C,closable:I,disabled:v,handleDragged:B,handleInput:y,handleKeydown:b,handleRemoveTag:E,handleClear:w,handleCompositionStart:Q,handleCompositionUpdate:_,handleCompositionEnd:S,focus:x,blur:k}=function({props:e,emit:t,formItem:i}){const n=Wj(),s=Vj(),r=Xh(),a=zh(),o=qf((()=>["small"].includes(s.value)?"small":"default")),l=qf((()=>{var t;return(null==(t=e.modelValue)?void 0:t.length)?void 0:e.placeholder})),A=qf((()=>!(e.readonly||n.value))),c=qf((()=>{var t,i;return!oL(e.max)&&(null!=(i=null==(t=e.modelValue)?void 0:t.length)?i:0)>=e.max})),u=e=>{c.value?a.value=void 0:f.value||t(PU,e.target.value)},h=()=>{var i,n;const s=null==(i=a.value)?void 0:i.trim();if(!s||c.value)return;const r=[...null!=(n=e.modelValue)?n:[],s];t(UU,r),t(HU,r),t("add-tag",s),a.value=void 0},d=i=>{var n;const s=(null!=(n=e.modelValue)?n:[]).slice(),[r]=s.splice(i,1);t(UU,s),t(HU,s),t("remove-tag",r)},{wrapperRef:g,isFocused:p}=jj(r,{beforeFocus:()=>n.value,afterBlur(){var t;h(),e.validateEvent&&(null==(t=null==i?void 0:i.validate)||t.call(i,"blur").catch((e=>{})))}}),{isComposing:f,handleCompositionStart:m,handleCompositionUpdate:C,handleCompositionEnd:I}=Jj({afterComposition:u});return Pp((()=>e.modelValue),(()=>{var t;e.validateEvent&&(null==(t=null==i?void 0:i.validate)||t.call(i,HU).catch((e=>{})))})),{inputRef:r,wrapperRef:g,isFocused:p,isComposing:f,inputValue:a,size:s,tagSize:o,placeholder:l,closable:A,disabled:n,inputLimit:c,handleDragged:(i,n,s)=>{var r;const a=(null!=(r=e.modelValue)?r:[]).slice(),[o]=a.splice(i,1),l=n>i&&"before"===s?-1:n<i&&"after"===s?1:0;a.splice(n+l,0,o),t(UU,a),t(HU,a)},handleInput:u,handleKeydown:t=>{var i;switch(t.code){case e.trigger:t.preventDefault(),t.stopPropagation(),h();break;case zJ.numpadEnter:e.trigger===zJ.enter&&(t.preventDefault(),t.stopPropagation(),h());break;case zJ.backspace:!a.value&&(null==(i=e.modelValue)?void 0:i.length)&&(t.preventDefault(),t.stopPropagation(),d(e.modelValue.length-1))}},handleAddTag:h,handleRemoveTag:d,handleClear:()=>{a.value=void 0,t(UU,void 0),t(HU,void 0),t("clear")},handleCompositionStart:m,handleCompositionUpdate:C,handleCompositionEnd:I,focus:()=>{var e;null==(e=r.value)||e.focus()},blur:()=>{var e;null==(e=r.value)||e.blur()}}}({props:n,emit:i,formItem:o}),{hovering:D,handleMouseEnter:F,handleMouseLeave:T}=function(){const e=zh(!1);return{hovering:e,handleMouseEnter:()=>{e.value=!0},handleMouseLeave:()=>{e.value=!1}}}(),{calculatorRef:M,inputStyle:R}=function(){const e=Xh(),t=zh(0),i=qf((()=>({minWidth:`${Math.max(t.value,11)}px`})));return WL(e,(()=>{var i,n;t.value=null!=(n=null==(i=e.value)?void 0:i.getBoundingClientRect().width)?n:0})),{calculatorRef:e,calculatorWidth:t,inputStyle:i}}(),{dropIndicatorRef:N,showDropIndicator:L,handleDragStart:U,handleDragOver:H,handleDragEnd:P}=function({wrapperRef:e,handleDragged:t,afterDragged:i}){const n=KF("input-tag"),s=Xh(),r=zh(!1);let a,o,l,A;function c(e){return`.${n.e("inner")} .${n.namespace.value}-tag:nth-child(${e+1})`}return{dropIndicatorRef:s,showDropIndicator:r,handleDragStart:function(t,i){a=i,o=e.value.querySelector(c(i)),o&&(o.style.opacity="0.5"),t.dataTransfer.effectAllowed="move"},handleDragOver:function(t,i){if(l=i,t.preventDefault(),t.dataTransfer.dropEffect="move",oL(a)||a===i)return void(r.value=!1);const o=e.value.querySelector(c(i)).getBoundingClientRect(),u=!(a+1===i),h=!(a-1===i),d=t.clientX-o.left,g=u?h?.5:1:-1,p=h?u?.5:0:1;A=d<=o.width*g?"before":d>o.width*p?"after":void 0;const f=e.value.querySelector(`.${n.e("inner")}`),m=f.getBoundingClientRect(),C=Number.parseFloat(zU(f,"gap"))/2,I=o.top-m.top;let v=-9999;if("before"===A)v=Math.max(o.left-m.left-C,Math.floor(-C/2));else if("after"===A){const e=o.right-m.left;v=e+(m.width===e?Math.floor(C/2):C)}XU(s.value,{top:`${I}px`,left:`${v}px`}),r.value=!!A},handleDragEnd:function(e){e.preventDefault(),o&&(o.style.opacity=""),!A||oL(a)||oL(l)||a===l||t(a,l,A),r.value=!1,a=void 0,o=null,l=void 0,A=void 0,null==i||i()}}}({wrapperRef:d,handleDragged:B,afterDragged:x}),{ns:O,nsInput:G,containerKls:K,containerStyle:q,innerKls:Y,showClear:V,showSuffix:W}=function({props:e,isFocused:t,hovering:i,disabled:n,inputValue:s,size:r,validateState:a,validateIcon:o,needStatusIcon:l}){const A=Jg(),c=jg(),u=KF("input-tag"),h=KF("input"),d=qf((()=>[u.b(),u.is("focused",t.value),u.is("hovering",i.value),u.is("disabled",n.value),u.m(r.value),u.e("wrapper"),A.class])),g=qf((()=>[A.style])),p=qf((()=>{var t,i;return[u.e("inner"),u.is("draggable",e.draggable),u.is("left-space",!(null==(t=e.modelValue)?void 0:t.length)&&!c.prefix),u.is("right-space",!(null==(i=e.modelValue)?void 0:i.length)&&!m.value)]})),f=qf((()=>{var r;return e.clearable&&!n.value&&!e.readonly&&((null==(r=e.modelValue)?void 0:r.length)||s.value)&&(t.value||i.value)})),m=qf((()=>c.suffix||f.value||a.value&&o.value&&l.value));return{ns:u,nsInput:h,containerKls:d,containerStyle:g,innerKls:p,showClear:f,showSuffix:m}}({props:n,hovering:D,isFocused:g,inputValue:p,disabled:v,size:f,validateState:c,validateIcon:u,needStatusIcon:A});return t({focus:x,blur:k}),(e,t)=>(af(),cf("div",{ref_key:"wrapperRef",ref:d,class:pu(ed(K)),style:cu(ed(q)),onMouseenter:ed(F),onMouseleave:ed(T)},[ed(r).prefix?(af(),cf("div",{key:0,class:pu(ed(O).e("prefix"))},[Gg(e.$slots,"prefix")],2)):Bf("v-if",!0),ff("div",{class:pu(ed(Y))},[(af(!0),cf(Zp,null,Pg(e.modelValue,((t,i)=>(af(),uf(ed(W0),{key:i,size:ed(m),closable:ed(I),type:e.tagType,effect:e.tagEffect,draggable:ed(I)&&e.draggable,"disable-transitions":"",onClose:e=>ed(E)(i),onDragstart:e=>ed(U)(e,i),onDragover:e=>ed(H)(e,i),onDragend:ed(P),onDrop:AC((()=>{}),["stop"])},{default:Nd((()=>[Gg(e.$slots,"tag",{value:t,index:i},(()=>[vf(yu(t),1)]))])),_:2},1032,["size","closable","type","effect","draggable","onClose","onDragstart","onDragover","onDragend","onDrop"])))),128)),ff("div",{class:pu(ed(O).e("input-wrapper"))},[Ld(ff("input",wf({id:ed(l),ref_key:"inputRef",ref:h,"onUpdate:modelValue":e=>Jh(p)?p.value=e:null},ed(s),{type:"text",minlength:e.minlength,maxlength:e.maxlength,disabled:ed(v),readonly:e.readonly,autocomplete:e.autocomplete,tabindex:e.tabindex,placeholder:ed(C),autofocus:e.autofocus,ariaLabel:e.ariaLabel,class:ed(O).e("input"),style:ed(R),onCompositionstart:ed(Q),onCompositionupdate:ed(_),onCompositionend:ed(S),onInput:ed(y),onKeydown:ed(b)}),null,16,["id","onUpdate:modelValue","minlength","maxlength","disabled","readonly","autocomplete","tabindex","placeholder","autofocus","ariaLabel","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onKeydown"]),[[tC,ed(p)]]),ff("span",{ref_key:"calculatorRef",ref:M,"aria-hidden":"true",class:pu(ed(O).e("input-calculator")),textContent:yu(ed(p))},null,10,["textContent"])],2),Ld(ff("div",{ref_key:"dropIndicatorRef",ref:N,class:pu(ed(O).e("drop-indicator"))},null,2),[[ym,ed(L)]])],2),ed(W)?(af(),cf("div",{key:1,class:pu(ed(O).e("suffix"))},[Gg(e.$slots,"suffix"),ed(V)?(af(),uf(ed(gH),{key:0,class:pu([ed(O).e("icon"),ed(O).e("clear")]),onMousedown:AC(ed(xc),["prevent"]),onClick:ed(w)},{default:Nd((()=>[mf(ed(lO))])),_:1},8,["class","onMousedown","onClick"])):Bf("v-if",!0),ed(c)&&ed(u)&&ed(A)?(af(),uf(ed(gH),{key:1,class:pu([ed(G).e("icon"),ed(G).e("validateIcon"),ed(G).is("loading","validating"===ed(c))])},{default:Nd((()=>[(af(),uf(Ng(ed(u))))])),_:1},8,["class"])):Bf("v-if",!0)],2)):Bf("v-if",!0)],46,["onMouseenter","onMouseleave"]))}});const b8=lH(KU(y8,[["__file","input-tag.vue"]])),E8=BU({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:fj}}),w8={click:e=>e instanceof MouseEvent},Q8=hg({...hg({name:"ElLink"}),props:E8,emits:w8,setup(e,{emit:t}){const i=e,n=KF("link"),s=qf((()=>[n.b(),n.m(i.type),n.is("disabled",i.disabled),n.is("underline",i.underline&&!i.disabled)]));function r(e){i.disabled||t("click",e)}return(e,t)=>(af(),cf("a",{class:pu(ed(s)),href:e.disabled||!e.href?void 0:e.href,target:e.disabled||!e.href?void 0:e.target,onClick:r},[e.icon?(af(),uf(ed(gH),{key:0},{default:Nd((()=>[(af(),uf(Ng(e.icon)))])),_:1})):Bf("v-if",!0),e.$slots.default?(af(),cf("span",{key:1,class:pu(ed(n).e("inner"))},[Gg(e.$slots,"default")],2)):Bf("v-if",!0),e.$slots.icon?Gg(e.$slots,"icon",{key:2}):Bf("v-if",!0)],10,["href","target"]))}});const _8=lH(KU(Q8,[["__file","link.vue"]]));let S8=class{constructor(e,t){this.parent=e,this.domNode=t,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){const e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,(t=>{t.addEventListener("keydown",(t=>{let i=!1;switch(t.code){case zJ.down:this.gotoSubIndex(this.subIndex+1),i=!0;break;case zJ.up:this.gotoSubIndex(this.subIndex-1),i=!0;break;case zJ.tab:BJ(e,"mouseleave");break;case zJ.enter:case zJ.numpadEnter:case zJ.space:i=!0,t.currentTarget.click()}return i&&(t.preventDefault(),t.stopPropagation()),!1}))}))}},x8=class{constructor(e,t){this.domNode=e,this.submenu=null,this.submenu=null,this.init(t)}init(e){this.domNode.setAttribute("tabindex","0");const t=this.domNode.querySelector(`.${e}-menu`);t&&(this.submenu=new S8(this,t)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",(e=>{let t=!1;switch(e.code){case zJ.down:BJ(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),t=!0;break;case zJ.up:BJ(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),t=!0;break;case zJ.tab:BJ(e.currentTarget,"mouseleave");break;case zJ.enter:case zJ.numpadEnter:case zJ.space:t=!0,e.currentTarget.click()}t&&e.preventDefault()}))}},k8=class{constructor(e,t){this.domNode=e,this.init(t)}init(e){const t=this.domNode.childNodes;Array.from(t).forEach((t=>{1===t.nodeType&&new x8(t,e)}))}};var D8=KU(hg({name:"ElMenuCollapseTransition",setup(){const e=KF("menu");return{listeners:{onBeforeEnter:e=>e.style.opacity="0.2",onEnter(t,i){jU(t,`${e.namespace.value}-opacity-transition`),t.style.opacity="1",i()},onAfterEnter(t){JU(t,`${e.namespace.value}-opacity-transition`),t.style.opacity=""},onBeforeLeave(t){t.dataset||(t.dataset={}),WU(t,e.m("collapse"))?(JU(t,e.m("collapse")),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth.toString(),jU(t,e.m("collapse"))):(jU(t,e.m("collapse")),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth.toString(),JU(t,e.m("collapse"))),t.style.width=`${t.scrollWidth}px`,t.style.overflow="hidden"},onLeave(e){jU(e,"horizontal-collapse-transition"),e.style.width=`${e.dataset.scrollWidth}px`}}}}}),[["render",function(e,t,i,n,s,r){return af(),uf(am,wf({mode:"out-in"},e.listeners),{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},16)}],["__file","menu-collapse-transition.vue"]]);function F8(e,t){const i=qf((()=>{let i=e.parent;const n=[t.value];for(;"ElMenu"!==i.type.name;)i.props.index&&n.unshift(i.props.index),i=i.parent;return n}));return{parentMenu:qf((()=>{let t=e.parent;for(;t&&!["ElMenu","ElSubMenu"].includes(t.type.name);)t=t.parent;return t})),indexPath:i}}function T8(e){return qf((()=>{const t=e.backgroundColor;return t?new W$(t).shade(20).toString():""}))}const M8=(e,t)=>{const i=KF("menu");return qf((()=>i.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":T8(e).value||"","active-color":e.activeTextColor||"",level:`${t}`})))},R8=BU({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:fj},expandOpenIcon:{type:fj},collapseCloseIcon:{type:fj},collapseOpenIcon:{type:fj}}),N8="ElSubMenu";var L8=hg({name:N8,props:R8,setup(e,{slots:t,expose:i}){const n=kf(),{indexPath:s,parentMenu:r}=F8(n,qf((()=>e.index))),a=KF("menu"),o=KF("sub-menu"),l=pp("rootMenu");l||lU(N8,"can not inject root menu");const A=pp(`subMenu:${r.value.uid}`);A||lU(N8,"can not inject sub menu");const c=zh({}),u=zh({});let h;const d=zh(!1),g=zh(),p=zh(null),f=qf((()=>"horizontal"===E.value&&C.value?"bottom-start":"right-start")),m=qf((()=>"horizontal"===E.value&&C.value||"vertical"===E.value&&!l.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?y.value?e.expandOpenIcon:e.expandCloseIcon:QH:e.collapseCloseIcon&&e.collapseOpenIcon?y.value?e.collapseOpenIcon:e.collapseCloseIcon:MH)),C=qf((()=>0===A.level)),I=qf((()=>{const t=e.teleported;return void 0===t?C.value:t})),v=qf((()=>l.props.collapse?`${a.namespace.value}-zoom-in-left`:`${a.namespace.value}-zoom-in-top`)),B=qf((()=>"horizontal"===E.value&&C.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"])),y=qf((()=>l.openedMenus.includes(e.index))),b=qf((()=>{let e=!1;return Object.values(c.value).forEach((t=>{t.active&&(e=!0)})),Object.values(u.value).forEach((t=>{t.active&&(e=!0)})),e})),E=qf((()=>l.props.mode)),w=Lh({index:e.index,indexPath:s,active:b}),Q=M8(l.props,A.level+1),_=qf((()=>{var t;return null!=(t=e.popperOffset)?t:l.props.popperOffset})),S=qf((()=>{var t;return null!=(t=e.popperClass)?t:l.props.popperClass})),x=qf((()=>{var t;return null!=(t=e.showTimeout)?t:l.props.showTimeout})),k=qf((()=>{var t;return null!=(t=e.hideTimeout)?t:l.props.hideTimeout})),D=e=>{var t,i,n;e||null==(n=null==(i=null==(t=p.value)?void 0:t.popperRef)?void 0:i.popperInstanceRef)||n.destroy()},F=()=>{"hover"===l.props.menuTrigger&&"horizontal"===l.props.mode||l.props.collapse&&"vertical"===l.props.mode||e.disabled||l.handleSubMenuClick({index:e.index,indexPath:s.value,active:b.value})},T=(t,i=x.value)=>{var n;"focus"!==t.type&&("click"===l.props.menuTrigger&&"horizontal"===l.props.mode||!l.props.collapse&&"vertical"===l.props.mode||e.disabled?A.mouseInChild.value=!0:(A.mouseInChild.value=!0,null==h||h(),({stop:h}=ML((()=>{l.openMenu(e.index,s.value)}),i)),I.value&&(null==(n=r.value.vnode.el)||n.dispatchEvent(new MouseEvent("mouseenter")))))},M=(t=!1)=>{var i;"click"===l.props.menuTrigger&&"horizontal"===l.props.mode||!l.props.collapse&&"vertical"===l.props.mode?A.mouseInChild.value=!1:(null==h||h(),A.mouseInChild.value=!1,({stop:h}=ML((()=>!d.value&&l.closeMenu(e.index,s.value)),k.value)),I.value&&t&&(null==(i=A.handleMouseleave)||i.call(A,!0)))};Pp((()=>l.props.collapse),(e=>D(Boolean(e))));{const e=e=>{u.value[e.index]=e},t=e=>{delete u.value[e.index]};gp(`subMenu:${n.uid}`,{addSubMenu:e,removeSubMenu:t,handleMouseleave:M,mouseInChild:d,level:A.level+1})}return i({opened:y}),Eg((()=>{l.addSubMenu(w),A.addSubMenu(w)})),_g((()=>{A.removeSubMenu(w),l.removeSubMenu(w)})),()=>{var i;const s=[null==(i=t.title)?void 0:i.call(t),Yf(gH,{class:o.e("icon-arrow"),style:{transform:y.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&l.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>Gc(m.value)?Yf(n.appContext.components[m.value]):Yf(m.value)})],r=l.isMenuPopup?Yf(XX,{ref:p,visible:y.value,effect:"light",pure:!0,offset:_.value,showArrow:!1,persistent:!0,popperClass:S.value,placement:f.value,teleported:I.value,fallbackPlacements:B.value,transition:v.value,gpuAcceleration:!1},{content:()=>{var e;return Yf("div",{class:[a.m(E.value),a.m("popup-container"),S.value],onMouseenter:e=>T(e,100),onMouseleave:()=>M(!0),onFocus:e=>T(e,100)},[Yf("ul",{class:[a.b(),a.m("popup"),a.m(`popup-${f.value}`)],style:Q.value},[null==(e=t.default)?void 0:e.call(t)])])},default:()=>Yf("div",{class:o.e("title"),onClick:F},s)}):Yf(Zp,{},[Yf("div",{class:o.e("title"),ref:g,onClick:F},s),Yf(p1,{},{default:()=>{var e;return Ld(Yf("ul",{role:"menu",class:[a.b(),a.m("inline")],style:Q.value},[null==(e=t.default)?void 0:e.call(t)]),[[ym,y.value]])}})]);return Yf("li",{class:[o.b(),o.is("active",b.value),o.is("opened",y.value),o.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:y.value,onMouseenter:T,onMouseleave:()=>M(),onFocus:T},[r])}}});const U8=BU({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:Array,default:()=>[]},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:fj,default:()=>PY},popperEffect:{type:String,default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300}}),H8=e=>Lc(e)&&e.every((e=>Gc(e))),P8={close:(e,t)=>Gc(e)&&H8(t),open:(e,t)=>Gc(e)&&H8(t),select:(e,t,i,n)=>Gc(e)&&H8(t)&&qc(i)&&(void 0===n||n instanceof Promise)};var O8=hg({name:"ElMenu",props:U8,emits:P8,setup(e,{emit:t,slots:i,expose:n}){const s=kf(),r=s.appContext.config.globalProperties.$router,a=zh(),o=KF("menu"),l=KF("sub-menu"),A=zh(-1),c=zh(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),u=zh(e.defaultActive),h=zh({}),d=zh({}),g=qf((()=>"horizontal"===e.mode||"vertical"===e.mode&&e.collapse)),p=(i,n)=>{c.value.includes(i)||(e.uniqueOpened&&(c.value=c.value.filter((e=>n.includes(e)))),c.value.push(i),t("open",i,n))},f=e=>{const t=c.value.indexOf(e);-1!==t&&c.value.splice(t,1)},m=(e,i)=>{f(e),t("close",e,i)},C=({index:e,indexPath:t})=>{c.value.includes(e)?m(e,t):p(e,t)},I=i=>{("horizontal"===e.mode||e.collapse)&&(c.value=[]);const{index:n,indexPath:s}=i;if(!jN(n)&&!jN(s))if(e.router&&r){const e=i.route||n,a=r.push(e).then((e=>(e||(u.value=n),e)));t("select",n,s,{index:n,indexPath:s,route:e},a)}else u.value=n,t("select",n,s,{index:n,indexPath:s})},v=()=>{var e,t;if(!a.value)return-1;const i=Array.from(null!=(t=null==(e=a.value)?void 0:e.childNodes)?t:[]).filter((e=>"#comment"!==e.nodeName&&("#text"!==e.nodeName||e.nodeValue))),n=getComputedStyle(a.value),s=Number.parseInt(n.paddingLeft,10),r=Number.parseInt(n.paddingRight,10),o=a.value.clientWidth-s-r;let l=0,A=0;return i.forEach(((e,t)=>{l+=(e=>{const t=getComputedStyle(e),i=Number.parseInt(t.marginLeft,10),n=Number.parseInt(t.marginRight,10);return e.offsetWidth+i+n||0})(e),l<=o-64&&(A=t+1)})),A===i.length?-1:A};let B=!0;const y=()=>{if(A.value===v())return;const e=()=>{A.value=-1,Qd((()=>{A.value=v()}))};B?e():((e,t=33.34)=>{let i;return()=>{i&&clearTimeout(i),i=setTimeout((()=>{e()}),t)}})(e)(),B=!1};let b;Pp((()=>e.defaultActive),(t=>{h.value[t]||(u.value=""),(t=>{const i=h.value,n=i[t]||u.value&&i[u.value]||i[e.defaultActive];u.value=n?n.index:t})(t)})),Pp((()=>e.collapse),(e=>{e&&(c.value=[])})),Pp(h.value,(()=>{const t=u.value&&h.value[u.value];if(!t||"horizontal"===e.mode||e.collapse)return;t.indexPath.forEach((e=>{const t=d.value[e];t&&p(e,t.indexPath)}))})),Hp((()=>{"horizontal"===e.mode&&e.ellipsis?b=WL(a,y).stop:null==b||b()}));const E=zh(!1);{const t=e=>{d.value[e.index]=e},i=e=>{delete d.value[e.index]},n=e=>{h.value[e.index]=e},r=e=>{delete h.value[e.index]};gp("rootMenu",Lh({props:e,openedMenus:c,items:h,subMenus:d,activeIndex:u,isMenuPopup:g,addMenuItem:n,removeMenuItem:r,addSubMenu:t,removeSubMenu:i,openMenu:p,closeMenu:m,handleMenuItemClick:I,handleSubMenuClick:C})),gp(`subMenu:${s.uid}`,{addSubMenu:t,removeSubMenu:i,mouseInChild:E,level:0})}Eg((()=>{"horizontal"===e.mode&&new k8(s.vnode.el,o.namespace.value)}));n({open:e=>{const{indexPath:t}=d.value[e];t.forEach((e=>p(e,t)))},close:f,handleResize:y});const w=M8(e,0);return()=>{var n,s;let r=null!=(s=null==(n=i.default)?void 0:n.call(i))?s:[];const u=[];if("horizontal"===e.mode&&a.value){const t=RZ(r),i=-1===A.value?t:t.slice(0,A.value),n=-1===A.value?[]:t.slice(A.value);(null==n?void 0:n.length)&&e.ellipsis&&(r=i,u.push(Yf(L8,{index:"sub-menu-more",class:l.e("hide-arrow"),popperOffset:e.popperOffset},{title:()=>Yf(gH,{class:l.e("icon-more")},{default:()=>Yf(e.ellipsisIcon)}),default:()=>n})))}const h=e.closeOnClickOutside?[[$0,()=>{c.value.length&&(E.value||(c.value.forEach((e=>{return t("close",e,(i=e,d.value[i].indexPath));var i})),c.value=[]))}]]:[],g=Ld(Yf("ul",{key:String(e.collapse),role:"menubar",ref:a,style:w.value,class:{[o.b()]:!0,[o.m(e.mode)]:!0,[o.m("collapse")]:e.collapse}},[...r,...u]),h);return e.collapseTransition&&"vertical"===e.mode?Yf(D8,(()=>g)):g}}});const G8=BU({index:{type:[String,null],default:null},route:{type:[String,Object]},disabled:Boolean}),K8="ElMenuItem",q8=hg({name:K8,components:{ElTooltip:XX},props:G8,emits:{click:e=>Gc(e.index)&&Lc(e.indexPath)},setup(e,{emit:t}){const i=kf(),n=pp("rootMenu"),s=KF("menu"),r=KF("menu-item");n||lU(K8,"can not inject root menu");const{parentMenu:a,indexPath:o}=F8(i,ld(e,"index")),l=pp(`subMenu:${a.value.uid}`);l||lU(K8,"can not inject sub menu");const A=qf((()=>e.index===n.activeIndex)),c=Lh({index:e.index,indexPath:o,active:A});return Eg((()=>{l.addSubMenu(c),n.addMenuItem(c)})),_g((()=>{l.removeSubMenu(c),n.removeMenuItem(c)})),{parentMenu:a,rootMenu:n,active:A,nsMenu:s,nsMenuItem:r,handleClick:()=>{e.disabled||(n.handleMenuItemClick({index:e.index,indexPath:o.value,route:e.route}),t("click",c))}}}});var Y8=KU(q8,[["render",function(e,t,i,n,s,r){const a=Mg("el-tooltip");return af(),cf("li",{class:pu([e.nsMenuItem.b(),e.nsMenuItem.is("active",e.active),e.nsMenuItem.is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:e.handleClick},["ElMenu"===e.parentMenu.type.name&&e.rootMenu.props.collapse&&e.$slots.title?(af(),uf(a,{key:0,effect:e.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:Nd((()=>[Gg(e.$slots,"title")])),default:Nd((()=>[ff("div",{class:pu(e.nsMenu.be("tooltip","trigger"))},[Gg(e.$slots,"default")],2)])),_:3},8,["effect"])):(af(),cf(Zp,{key:1},[Gg(e.$slots,"default"),Gg(e.$slots,"title")],64))],10,["onClick"])}],["__file","menu-item.vue"]]);var V8=KU(hg({name:"ElMenuItemGroup",props:{title:String},setup:()=>({ns:KF("menu-item-group")})}),[["render",function(e,t,i,n,s,r){return af(),cf("li",{class:pu(e.ns.b())},[ff("div",{class:pu(e.ns.e("title"))},[e.$slots.title?Gg(e.$slots,"title",{key:1}):(af(),cf(Zp,{key:0},[vf(yu(e.title),1)],64))],2),ff("ul",null,[Gg(e.$slots,"default")])],2)}],["__file","menu-item-group.vue"]]);const W8=lH(O8,{MenuItem:Y8,MenuItemGroup:V8,SubMenu:L8}),j8=cH(Y8),J8=cH(V8),z8=cH(L8),X8=BU({icon:{type:fj,default:()=>GH},title:String,content:{type:String,default:""}}),$8=hg({...hg({name:"ElPageHeader"}),props:X8,emits:{back:()=>!0},setup(e,{emit:t}){const i=jg(),{t:n}=CU(),s=KF("page-header"),r=qf((()=>[s.b(),{[s.m("has-breadcrumb")]:!!i.breadcrumb,[s.m("has-extra")]:!!i.extra,[s.is("contentful")]:!!i.default}]));function a(){t("back")}return(e,t)=>(af(),cf("div",{class:pu(ed(r))},[e.$slots.breadcrumb?(af(),cf("div",{key:0,class:pu(ed(s).e("breadcrumb"))},[Gg(e.$slots,"breadcrumb")],2)):Bf("v-if",!0),ff("div",{class:pu(ed(s).e("header"))},[ff("div",{class:pu(ed(s).e("left"))},[ff("div",{class:pu(ed(s).e("back")),role:"button",tabindex:"0",onClick:a},[e.icon||e.$slots.icon?(af(),cf("div",{key:0,"aria-label":e.title||ed(n)("el.pageHeader.title"),class:pu(ed(s).e("icon"))},[Gg(e.$slots,"icon",{},(()=>[e.icon?(af(),uf(ed(gH),{key:0},{default:Nd((()=>[(af(),uf(Ng(e.icon)))])),_:1})):Bf("v-if",!0)]))],10,["aria-label"])):Bf("v-if",!0),ff("div",{class:pu(ed(s).e("title"))},[Gg(e.$slots,"title",{},(()=>[vf(yu(e.title||ed(n)("el.pageHeader.title")),1)]))],2)],2),mf(ed(y3),{direction:"vertical"}),ff("div",{class:pu(ed(s).e("content"))},[Gg(e.$slots,"content",{},(()=>[vf(yu(e.content),1)]))],2)],2),e.$slots.extra?(af(),cf("div",{key:0,class:pu(ed(s).e("extra"))},[Gg(e.$slots,"extra")],2)):Bf("v-if",!0)],2),e.$slots.default?(af(),cf("div",{key:1,class:pu(ed(s).e("main"))},[Gg(e.$slots,"default")],2)):Bf("v-if",!0)],2))}});const Z8=lH(KU($8,[["__file","page-header.vue"]])),e9=Symbol("elPaginationKey"),t9=BU({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:fj}}),i9={click:e=>e instanceof MouseEvent},n9=hg({...hg({name:"ElPaginationPrev"}),props:t9,emits:i9,setup(e){const t=e,{t:i}=CU(),n=qf((()=>t.disabled||t.currentPage<=1));return(e,t)=>(af(),cf("button",{type:"button",class:"btn-prev",disabled:ed(n),"aria-label":e.prevText||ed(i)("el.pagination.prev"),"aria-disabled":ed(n),onClick:t=>e.$emit("click",t)},[e.prevText?(af(),cf("span",{key:0},yu(e.prevText),1)):(af(),uf(ed(gH),{key:1},{default:Nd((()=>[(af(),uf(Ng(e.prevIcon)))])),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var s9=KU(n9,[["__file","prev.vue"]]);const r9=BU({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:fj}}),a9=hg({...hg({name:"ElPaginationNext"}),props:r9,emits:["click"],setup(e){const t=e,{t:i}=CU(),n=qf((()=>t.disabled||t.currentPage===t.pageCount||0===t.pageCount));return(e,t)=>(af(),cf("button",{type:"button",class:"btn-next",disabled:ed(n),"aria-label":e.nextText||ed(i)("el.pagination.next"),"aria-disabled":ed(n),onClick:t=>e.$emit("click",t)},[e.nextText?(af(),cf("span",{key:0},yu(e.nextText),1)):(af(),uf(ed(gH),{key:1},{default:Nd((()=>[(af(),uf(Ng(e.nextIcon)))])),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var o9=KU(a9,[["__file","next.vue"]]);const l9=Symbol("ElSelectGroup"),A9=Symbol("ElSelect");const c9=hg({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=KF("select"),i=Gj(),n=qf((()=>[t.be("dropdown","item"),t.is("disabled",ed(o)),t.is("selected",ed(a)),t.is("hovering",ed(h))])),s=Lh({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:r,itemSelected:a,isDisabled:o,select:l,hoverItem:A,updateOption:c}=function(e,t){const i=pp(A9),n=pp(l9,{disabled:!1}),s=qf((()=>c(hR(i.props.modelValue),e.value))),r=qf((()=>{var e;if(i.props.multiple){const t=hR(null!=(e=i.props.modelValue)?e:[]);return!s.value&&t.length>=i.props.multipleLimit&&i.props.multipleLimit>0}return!1})),a=qf((()=>e.label||(qc(e.value)?"":e.value))),o=qf((()=>e.value||e.label||"")),l=qf((()=>e.disabled||t.groupDisabled||r.value)),A=kf(),c=(t=[],n)=>{if(qc(e.value)){const e=i.props.valueKey;return t&&t.some((t=>Yh($M(t,e))===$M(n,e)))}return t&&t.includes(n)};return Pp((()=>a.value),(()=>{e.created||i.props.remote||i.setSelected()})),Pp((()=>e.value),((t,n)=>{const{remote:s,valueKey:r}=i.props;if(t!==n&&(i.onOptionDestroy(n,A.proxy),i.onOptionCreate(A.proxy)),!e.created&&!s){if(r&&qc(t)&&qc(n)&&t[r]===n[r])return;i.setSelected()}})),Pp((()=>n.disabled),(()=>{t.groupDisabled=n.disabled}),{immediate:!0}),{select:i,currentLabel:a,currentValue:o,itemSelected:s,isDisabled:l,hoverItem:()=>{e.disabled||n.disabled||(i.states.hoveringIndex=i.optionsArray.indexOf(A.proxy))},updateOption:i=>{const n=new RegExp(k0(i),"i");t.visible=n.test(a.value)||e.created}}}(e,s),{visible:u,hover:h}=rd(s),d=kf().proxy;return l.onOptionCreate(d),_g((()=>{const e=d.value,{selected:t}=l.states,i=t.some((e=>e.value===d.value));Qd((()=>{l.states.cachedOptions.get(e)!==d||i||l.states.cachedOptions.delete(e)})),l.onOptionDestroy(e,d)})),{ns:t,id:i,containerKls:n,currentLabel:r,itemSelected:a,isDisabled:o,select:l,hoverItem:A,updateOption:c,visible:u,hover:h,selectOptionClick:function(){o.value||l.handleOptionSelect(d)},states:s}}});var u9=KU(c9,[["render",function(e,t,i,n,s,r){return Ld((af(),cf("li",{id:e.id,class:pu(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:AC(e.selectOptionClick,["stop"])},[Gg(e.$slots,"default",{},(()=>[ff("span",null,yu(e.currentLabel),1)]))],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[ym,e.visible]])}],["__file","option.vue"]]);const h9=hg({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=pp(A9),t=KF("select"),i=qf((()=>e.props.popperClass)),n=qf((()=>e.props.multiple)),s=qf((()=>e.props.fitInputWidth)),r=zh("");function a(){var t;r.value=`${null==(t=e.selectRef)?void 0:t.offsetWidth}px`}return Eg((()=>{a(),WL(e.selectRef,a)})),{ns:t,minWidth:r,popperClass:i,isMultiple:n,isFitInputWidth:s}}});var d9=KU(h9,[["render",function(e,t,i,n,s,r){return af(),cf("div",{class:pu([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:cu({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(af(),cf("div",{key:0,class:pu(e.ns.be("dropdown","header"))},[Gg(e.$slots,"header")],2)):Bf("v-if",!0),Gg(e.$slots,"default"),e.$slots.footer?(af(),cf("div",{key:1,class:pu(e.ns.be("dropdown","footer"))},[Gg(e.$slots,"footer")],2)):Bf("v-if",!0)],6)}],["__file","select-dropdown.vue"]]);const g9=(e,t)=>{const{t:i}=CU(),n=Gj(),s=KF("select"),r=KF("input"),a=Lh({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),o=zh(null),l=zh(null),A=zh(null),c=zh(null),u=zh(null),h=zh(null),d=zh(null),g=zh(null),p=zh(null),f=zh(null),m=zh(null),C=zh(null),{isComposing:I,handleCompositionStart:v,handleCompositionUpdate:B,handleCompositionEnd:y}=Jj({afterComposition:e=>Ae(e)}),{wrapperRef:b,isFocused:E,handleBlur:w}=jj(u,{beforeFocus:()=>T.value,afterFocus(){e.automaticDropdown&&!Q.value&&(Q.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(e){var t,i;return(null==(t=A.value)?void 0:t.isFocusInsideContent(e))||(null==(i=c.value)?void 0:i.isFocusInsideContent(e))},afterBlur(){Q.value=!1,a.menuVisibleOnFocus=!1}}),Q=zh(!1),_=zh(),{form:S,formItem:x}=Kj(),{inputId:k}=qj(e,{formItemContext:x}),{valueOnClear:D,isEmptyValue:F}=xU(e),T=qf((()=>e.disabled||(null==S?void 0:S.disabled))),M=qf((()=>Lc(e.modelValue)?e.modelValue.length>0:!F(e.modelValue))),R=qf((()=>{var e;return null!=(e=null==S?void 0:S.statusIcon)&&e})),N=qf((()=>e.clearable&&!T.value&&a.inputHovering&&M.value)),L=qf((()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon)),U=qf((()=>s.is("reverse",L.value&&Q.value))),H=qf((()=>(null==x?void 0:x.validateState)||"")),P=qf((()=>vj[H.value])),O=qf((()=>e.remote?300:0)),G=qf((()=>e.loading?e.loadingText||i("el.select.loading"):!(e.remote&&!a.inputValue&&0===a.options.size)&&(e.filterable&&a.inputValue&&a.options.size>0&&0===K.value?e.noMatchText||i("el.select.noMatch"):0===a.options.size?e.noDataText||i("el.select.noData"):null))),K=qf((()=>q.value.filter((e=>e.visible)).length)),q=qf((()=>{const e=Array.from(a.options.values()),t=[];return a.optionValues.forEach((i=>{const n=e.findIndex((e=>e.value===i));n>-1&&t.push(e[n])})),t.length>=e.length?t:e})),Y=qf((()=>Array.from(a.cachedOptions.values()))),V=qf((()=>{const t=q.value.filter((e=>!e.created)).some((e=>e.currentLabel===a.inputValue));return e.filterable&&e.allowCreate&&""!==a.inputValue&&!t})),W=()=>{e.filterable&&Oc(e.filterMethod)||e.filterable&&e.remote&&Oc(e.remoteMethod)||q.value.forEach((e=>{var t;null==(t=e.updateOption)||t.call(e,a.inputValue)}))},j=Vj(),J=qf((()=>["small"].includes(j.value)?"small":"default")),z=qf({get:()=>Q.value&&!1!==G.value,set(e){Q.value=e}}),X=qf((()=>{if(e.multiple&&!oL(e.modelValue))return 0===hR(e.modelValue).length&&!a.inputValue;const t=Lc(e.modelValue)?e.modelValue[0]:e.modelValue;return!e.filterable&&!oL(t)||!a.inputValue})),$=qf((()=>{var t;const n=null!=(t=e.placeholder)?t:i("el.select.placeholder");return e.multiple||!M.value?n:a.selectedLabel})),Z=qf((()=>QL?null:"mouseenter"));Pp((()=>e.modelValue),((t,i)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(a.inputValue="",ee("")),ie(),!WN(t,i)&&e.validateEvent&&(null==x||x.validate("change").catch((e=>{})))}),{flush:"post",deep:!0}),Pp((()=>Q.value),(e=>{e?ee(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),t("visible-change",e)})),Pp((()=>a.options.entries()),(()=>{var t;if(!bL)return;const i=(null==(t=o.value)?void 0:t.querySelectorAll("input"))||[];(e.filterable||e.defaultFirstOption||oL(e.modelValue))&&Array.from(i).includes(document.activeElement)||ie(),e.defaultFirstOption&&(e.filterable||e.remote)&&K.value&&te()}),{flush:"post"}),Pp((()=>a.hoveringIndex),(e=>{AL(e)&&e>-1?_.value=q.value[e]||{}:_.value={},q.value.forEach((e=>{e.hover=_.value===e}))})),Hp((()=>{a.isBeforeHide||W()}));const ee=t=>{a.previousQuery===t||I.value||(a.previousQuery=t,e.filterable&&Oc(e.filterMethod)?e.filterMethod(t):e.filterable&&e.remote&&Oc(e.remoteMethod)&&e.remoteMethod(t),e.defaultFirstOption&&(e.filterable||e.remote)&&K.value?Qd(te):Qd(se))},te=()=>{const e=q.value.filter((e=>e.visible&&!e.disabled&&!e.states.groupDisabled)),t=e.find((e=>e.created)),i=e[0],n=q.value.map((e=>e.value));a.hoveringIndex=ge(n,t||i)},ie=()=>{if(!e.multiple){const t=Lc(e.modelValue)?e.modelValue[0]:e.modelValue,i=ne(t);return a.selectedLabel=i.currentLabel,void(a.selected=[i])}a.selectedLabel="";const t=[];oL(e.modelValue)||hR(e.modelValue).forEach((e=>{t.push(ne(e))})),a.selected=t},ne=t=>{let i;const n=jc(t);for(let s=a.cachedOptions.size-1;s>=0;s--){const r=Y.value[s];if(n?$M(r.value,e.valueKey)===$M(t,e.valueKey):r.value===t){i={value:t,currentLabel:r.currentLabel,get isDisabled(){return r.isDisabled}};break}}if(i)return i;return{value:t,currentLabel:n?t.label:null!=t?t:""}},se=()=>{a.hoveringIndex=q.value.findIndex((e=>a.selected.some((t=>Ie(t)===Ie(e)))))},re=()=>{a.calculatorWidth=h.value.getBoundingClientRect().width},ae=()=>{var e,t;null==(t=null==(e=A.value)?void 0:e.updatePopper)||t.call(e)},oe=()=>{var e,t;null==(t=null==(e=c.value)?void 0:e.updatePopper)||t.call(e)},le=()=>{a.inputValue.length>0&&!Q.value&&(Q.value=!0),ee(a.inputValue)},Ae=t=>{if(a.inputValue=t.target.value,!e.remote)return le();ce()},ce=RN((()=>{le()}),O.value),ue=i=>{WN(e.modelValue,i)||t(HU,i)},he=i=>{i.stopPropagation();const n=e.multiple?[]:D.value;if(e.multiple)for(const e of a.selected)e.isDisabled&&n.push(e.value);t(UU,n),ue(n),a.hoveringIndex=-1,Q.value=!1,t("clear"),me()},de=i=>{var n;if(e.multiple){const s=hR(null!=(n=e.modelValue)?n:[]).slice(),r=ge(s,i);r>-1?s.splice(r,1):(e.multipleLimit<=0||s.length<e.multipleLimit)&&s.push(i.value),t(UU,s),ue(s),i.created&&ee(""),e.filterable&&!e.reserveKeyword&&(a.inputValue="")}else t(UU,i.value),ue(i.value),Q.value=!1;me(),Q.value||Qd((()=>{pe(i)}))},ge=(t=[],i)=>oL(i)?-1:qc(i.value)?t.findIndex((t=>WN($M(t,e.valueKey),Ie(i)))):t.indexOf(i.value),pe=e=>{var t,i,n,r,a;const o=Lc(e)?e[0]:e;let l=null;if(null==o?void 0:o.value){const e=q.value.filter((e=>e.value===o.value));e.length>0&&(l=e[0].$el)}if(A.value&&l){const e=null==(r=null==(n=null==(i=null==(t=A.value)?void 0:t.popperRef)?void 0:i.contentRef)?void 0:n.querySelector)?void 0:r.call(n,`.${s.be("dropdown","wrap")}`);e&&nH(e,l)}null==(a=C.value)||a.handleScroll()},fe=qf((()=>{var e,t;return null==(t=null==(e=A.value)?void 0:e.popperRef)?void 0:t.contentRef})),me=()=>{var e;null==(e=u.value)||e.focus()},Ce=()=>{T.value||(QL&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:Q.value=!Q.value)},Ie=t=>qc(t.value)?$M(t.value,e.valueKey):t.value,ve=qf((()=>q.value.filter((e=>e.visible)).every((e=>e.disabled)))),Be=qf((()=>e.multiple?e.collapseTags?a.selected.slice(0,e.maxCollapseTags):a.selected:[])),ye=qf((()=>e.multiple&&e.collapseTags?a.selected.slice(e.maxCollapseTags):[])),be=e=>{if(Q.value){if(0!==a.options.size&&0!==K.value&&!I.value&&!ve.value){"next"===e?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):"prev"===e&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const t=q.value[a.hoveringIndex];!0!==t.disabled&&!0!==t.states.groupDisabled&&t.visible||be(e),Qd((()=>pe(_.value)))}}else Q.value=!0},Ee=qf((()=>{const t=(()=>{if(!l.value)return 0;const e=window.getComputedStyle(l.value);return Number.parseFloat(e.gap||"6px")})();return{maxWidth:`${m.value&&1===e.maxCollapseTags?a.selectionWidth-a.collapseItemWidth-t:a.selectionWidth}px`}})),we=qf((()=>({maxWidth:`${a.selectionWidth}px`}))),Qe=qf((()=>({width:`${Math.max(a.calculatorWidth,11)}px`})));return WL(l,(()=>{a.selectionWidth=l.value.getBoundingClientRect().width})),WL(h,re),WL(p,ae),WL(b,ae),WL(f,oe),WL(m,(()=>{a.collapseItemWidth=m.value.getBoundingClientRect().width})),Eg((()=>{ie()})),{inputId:k,contentId:n,nsSelect:s,nsInput:r,states:a,isFocused:E,expanded:Q,optionsArray:q,hoverOption:_,selectSize:j,filteredOptionsCount:K,resetCalculatorWidth:re,updateTooltip:ae,updateTagTooltip:oe,debouncedOnInputChange:ce,onInput:Ae,deletePrevTag:i=>{if(e.multiple&&i.code!==zJ.delete&&i.target.value.length<=0){const i=hR(e.modelValue).slice(),n=(e=>ON(e,(e=>{const t=a.cachedOptions.get(e);return t&&!t.disabled&&!t.states.groupDisabled})))(i);if(n<0)return;const s=i[n];i.splice(n,1),t(UU,i),ue(i),t("remove-tag",s)}},deleteTag:(i,n)=>{const s=a.selected.indexOf(n);if(s>-1&&!T.value){const i=hR(e.modelValue).slice();i.splice(s,1),t(UU,i),ue(i),t("remove-tag",n.value)}i.stopPropagation(),me()},deleteSelected:he,handleOptionSelect:de,scrollToOption:pe,hasModelValue:M,shouldShowPlaceholder:X,currentPlaceholder:$,mouseEnterEventName:Z,needStatusIcon:R,showClose:N,iconComponent:L,iconReverse:U,validateState:H,validateIcon:P,showNewOption:V,updateOptions:W,collapseTagSize:J,setSelected:ie,selectDisabled:T,emptyText:G,handleCompositionStart:v,handleCompositionUpdate:B,handleCompositionEnd:y,onOptionCreate:e=>{a.options.set(e.value,e),a.cachedOptions.set(e.value,e)},onOptionDestroy:(e,t)=>{a.options.get(e)===t&&a.options.delete(e)},handleMenuEnter:()=>{a.isBeforeHide=!1,Qd((()=>pe(a.selected)))},focus:me,blur:()=>{var e;if(Q.value)return Q.value=!1,void Qd((()=>{var e;return null==(e=u.value)?void 0:e.blur()}));null==(e=u.value)||e.blur()},handleClearClick:e=>{he(e)},handleClickOutside:e=>{if(Q.value=!1,E.value){const t=new FocusEvent("focus",e);Qd((()=>w(t)))}},handleEsc:()=>{a.inputValue.length>0?a.inputValue="":Q.value=!1},toggleMenu:Ce,selectOption:()=>{if(Q.value){const e=q.value[a.hoveringIndex];!e||e.disabled||e.states.groupDisabled||de(e)}else Ce()},getValueKey:Ie,navigateOptions:be,dropdownMenuVisible:z,showTagList:Be,collapseTagList:ye,tagStyle:Ee,collapseTagStyle:we,inputStyle:Qe,popperRef:fe,inputRef:u,tooltipRef:A,tagTooltipRef:c,calculatorRef:h,prefixRef:d,suffixRef:g,selectRef:o,wrapperRef:b,selectionRef:l,scrollbarRef:C,menuRef:p,tagMenuRef:f,collapseItemRef:m}};var p9=hg({name:"ElOptions",setup(e,{slots:t}){const i=pp(A9);let n=[];return()=>{var e,s;const r=null==(e=t.default)?void 0:e.call(t),a=[];return r.length&&function e(t){Lc(t)&&t.forEach((t=>{var i,n,s,r;const o=null==(i=(null==t?void 0:t.type)||{})?void 0:i.name;"ElOptionGroup"===o?e(Gc(t.children)||Lc(t.children)||!Oc(null==(n=t.children)?void 0:n.default)?t.children:null==(s=t.children)?void 0:s.default()):"ElOption"===o?a.push(null==(r=t.props)?void 0:r.value):Lc(t.children)&&e(t.children)}))}(null==(s=r[0])?void 0:s.children),WN(a,n)||(n=a,i&&(i.states.optionValues=a)),r}}});const f9=BU({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:bU,effect:{type:String,default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:DX.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:fj,default:lO},fitInputWidth:Boolean,suffixIcon:{type:fj,default:QH},tagType:{...q0.type,default:"info"},tagEffect:{...q0.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:hz,default:"bottom-start"},fallbackPlacements:{type:Array,default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:String,...SU,...Dj(["ariaLabel"])}),m9="ElSelect",C9=hg({name:m9,componentName:m9,components:{ElSelectMenu:d9,ElOption:u9,ElOptions:p9,ElTag:W0,ElScrollbar:lJ,ElTooltip:XX,ElIcon:gH},directives:{ClickOutside:$0},props:f9,emits:[UU,HU,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const i=qf((()=>{const{modelValue:t,multiple:i}=e,n=i?[]:void 0;return Lc(t)?i?t:n:i?n:t})),n=Lh({...rd(e),modelValue:i}),s=g9(n,t);gp(A9,Lh({props:n,states:s.states,optionsArray:s.optionsArray,handleOptionSelect:s.handleOptionSelect,onOptionCreate:s.onOptionCreate,onOptionDestroy:s.onOptionDestroy,selectRef:s.selectRef,setSelected:s.setSelected}));const r=qf((()=>e.multiple?s.states.selected.map((e=>e.currentLabel)):s.states.selectedLabel));return{...s,modelValue:i,selectedLabel:r}}});var I9=KU(C9,[["render",function(e,t,i,n,s,r){const a=Mg("el-tag"),o=Mg("el-tooltip"),l=Mg("el-icon"),A=Mg("el-option"),c=Mg("el-options"),u=Mg("el-scrollbar"),h=Mg("el-select-menu"),d=Lg("click-outside");return Ld((af(),cf("div",{ref:"selectRef",class:pu([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[nu(e.mouseEnterEventName)]:t=>e.states.inputHovering=!0,onMouseleave:t=>e.states.inputHovering=!1},[mf(o,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:t=>e.states.isBeforeHide=!1},{default:Nd((()=>{var t;return[ff("div",{ref:"wrapperRef",class:pu([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:AC(e.toggleMenu,["prevent"])},[e.$slots.prefix?(af(),cf("div",{key:0,ref:"prefixRef",class:pu(e.nsSelect.e("prefix"))},[Gg(e.$slots,"prefix")],2)):Bf("v-if",!0),ff("div",{ref:"selectionRef",class:pu([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?Gg(e.$slots,"tag",{key:0},(()=>[(af(!0),cf(Zp,null,Pg(e.showTagList,(t=>(af(),cf("div",{key:e.getValueKey(t),class:pu(e.nsSelect.e("selected-item"))},[mf(a,{closable:!e.selectDisabled&&!t.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:cu(e.tagStyle),onClose:i=>e.deleteTag(i,t)},{default:Nd((()=>[ff("span",{class:pu(e.nsSelect.e("tags-text"))},[Gg(e.$slots,"label",{label:t.currentLabel,value:t.value},(()=>[vf(yu(t.currentLabel),1)]))],2)])),_:2},1032,["closable","size","type","effect","style","onClose"])],2)))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(af(),uf(o,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:Nd((()=>[ff("div",{ref:"collapseItemRef",class:pu(e.nsSelect.e("selected-item"))},[mf(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:cu(e.collapseTagStyle)},{default:Nd((()=>[ff("span",{class:pu(e.nsSelect.e("tags-text"))}," + "+yu(e.states.selected.length-e.maxCollapseTags),3)])),_:1},8,["size","type","effect","style"])],2)])),content:Nd((()=>[ff("div",{ref:"tagMenuRef",class:pu(e.nsSelect.e("selection"))},[(af(!0),cf(Zp,null,Pg(e.collapseTagList,(t=>(af(),cf("div",{key:e.getValueKey(t),class:pu(e.nsSelect.e("selected-item"))},[mf(a,{class:"in-tooltip",closable:!e.selectDisabled&&!t.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:i=>e.deleteTag(i,t)},{default:Nd((()=>[ff("span",{class:pu(e.nsSelect.e("tags-text"))},[Gg(e.$slots,"label",{label:t.currentLabel,value:t.value},(()=>[vf(yu(t.currentLabel),1)]))],2)])),_:2},1032,["closable","size","type","effect","onClose"])],2)))),128))],2)])),_:3},8,["disabled","effect","teleported"])):Bf("v-if",!0)])):Bf("v-if",!0),ff("div",{class:pu([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[Ld(ff("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t=>e.states.inputValue=t,type:"text",name:e.name,class:pu([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:cu(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":(null==(t=e.hoverOption)?void 0:t.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[uC(AC((t=>e.navigateOptions("next")),["stop","prevent"]),["down"]),uC(AC((t=>e.navigateOptions("prev")),["stop","prevent"]),["up"]),uC(AC(e.handleEsc,["stop","prevent"]),["esc"]),uC(AC(e.selectOption,["stop","prevent"]),["enter"]),uC(AC(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:AC(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[tC,e.states.inputValue]]),e.filterable?(af(),cf("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:pu(e.nsSelect.e("input-calculator")),textContent:yu(e.states.inputValue)},null,10,["textContent"])):Bf("v-if",!0)],2),e.shouldShowPlaceholder?(af(),cf("div",{key:1,class:pu([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?Gg(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},(()=>[ff("span",null,yu(e.currentPlaceholder),1)])):(af(),cf("span",{key:1},yu(e.currentPlaceholder),1))],2)):Bf("v-if",!0)],2),ff("div",{ref:"suffixRef",class:pu(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(af(),uf(l,{key:0,class:pu([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:Nd((()=>[(af(),uf(Ng(e.iconComponent)))])),_:1},8,["class"])):Bf("v-if",!0),e.showClose&&e.clearIcon?(af(),uf(l,{key:1,class:pu([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:Nd((()=>[(af(),uf(Ng(e.clearIcon)))])),_:1},8,["class","onClick"])):Bf("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(af(),uf(l,{key:2,class:pu([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:Nd((()=>[(af(),uf(Ng(e.validateIcon)))])),_:1},8,["class"])):Bf("v-if",!0)],2)],10,["onClick"])]})),content:Nd((()=>[mf(h,{ref:"menuRef"},{default:Nd((()=>[e.$slots.header?(af(),cf("div",{key:0,class:pu(e.nsSelect.be("dropdown","header")),onClick:AC((()=>{}),["stop"])},[Gg(e.$slots,"header")],10,["onClick"])):Bf("v-if",!0),Ld(mf(u,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:pu([e.nsSelect.is("empty",0===e.filteredOptionsCount)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:Nd((()=>[e.showNewOption?(af(),uf(A,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):Bf("v-if",!0),mf(c,null,{default:Nd((()=>[Gg(e.$slots,"default")])),_:3})])),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[ym,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(af(),cf("div",{key:1,class:pu(e.nsSelect.be("dropdown","loading"))},[Gg(e.$slots,"loading")],2)):e.loading||0===e.filteredOptionsCount?(af(),cf("div",{key:2,class:pu(e.nsSelect.be("dropdown","empty"))},[Gg(e.$slots,"empty",{},(()=>[ff("span",null,yu(e.emptyText),1)]))],2)):Bf("v-if",!0),e.$slots.footer?(af(),cf("div",{key:3,class:pu(e.nsSelect.be("dropdown","footer")),onClick:AC((()=>{}),["stop"])},[Gg(e.$slots,"footer")],10,["onClick"])):Bf("v-if",!0)])),_:3},512)])),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[d,e.handleClickOutside,e.popperRef]])}],["__file","select.vue"]]);const v9=hg({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=KF("select"),i=zh(null),n=kf(),s=zh([]);gp(l9,Lh({...rd(e)}));const r=qf((()=>s.value.some((e=>!0===e.visible)))),a=e=>{const t=hR(e),i=[];return t.forEach((e=>{var t,n;(e=>{var t,i;return"ElOption"===(null==(t=e.type)?void 0:t.name)&&!!(null==(i=e.component)?void 0:i.proxy)})(e)?i.push(e.component.proxy):(null==(t=e.children)?void 0:t.length)?i.push(...a(e.children)):(null==(n=e.component)?void 0:n.subTree)&&i.push(...a(e.component.subTree))})),i},o=()=>{s.value=a(n.subTree)};return Eg((()=>{o()})),eU(i,o,{attributes:!0,subtree:!0,childList:!0}),{groupRef:i,visible:r,ns:t}}});var B9=KU(v9,[["render",function(e,t,i,n,s,r){return Ld((af(),cf("ul",{ref:"groupRef",class:pu(e.ns.be("group","wrap"))},[ff("li",{class:pu(e.ns.be("group","title"))},yu(e.label),3),ff("li",null,[ff("ul",{class:pu(e.ns.b("group"))},[Gg(e.$slots,"default")],2)])],2)),[[ym,e.visible]])}],["__file","option-group.vue"]]);const y9=lH(I9,{Option:u9,OptionGroup:B9}),b9=cH(u9),E9=cH(B9),w9=()=>pp(e9,{}),Q9=BU({pageSize:{type:Number,required:!0},pageSizes:{type:Array,default:()=>[10,20,30,40,50,100]},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:yU},appendSizeTo:String}),_9=hg({...hg({name:"ElPaginationSizes"}),props:Q9,emits:["page-size-change"],setup(e,{emit:t}){const i=e,{t:n}=CU(),s=KF("pagination"),r=w9(),a=zh(i.pageSize);Pp((()=>i.pageSizes),((e,n)=>{if(!WN(e,n)&&Lc(e)){const n=e.includes(i.pageSize)?i.pageSize:i.pageSizes[0];t("page-size-change",n)}})),Pp((()=>i.pageSize),(e=>{a.value=e}));const o=qf((()=>i.pageSizes));function l(e){var t;e!==a.value&&(a.value=e,null==(t=r.handleSizeChange)||t.call(r,Number(e)))}return(e,t)=>(af(),cf("span",{class:pu(ed(s).e("sizes"))},[mf(ed(y9),{"model-value":a.value,disabled:e.disabled,"popper-class":e.popperClass,size:e.size,teleported:e.teleported,"validate-event":!1,"append-to":e.appendSizeTo,onChange:l},{default:Nd((()=>[(af(!0),cf(Zp,null,Pg(ed(o),(e=>(af(),uf(ed(b9),{key:e,value:e,label:e+ed(n)("el.pagination.pagesize")},null,8,["value","label"])))),128))])),_:1},8,["model-value","disabled","popper-class","size","teleported","append-to"])],2))}});var S9=KU(_9,[["__file","sizes.vue"]]);const x9=BU({size:{type:String,values:yU}}),k9=hg({...hg({name:"ElPaginationJumper"}),props:x9,setup(e){const{t:t}=CU(),i=KF("pagination"),{pageCount:n,disabled:s,currentPage:r,changeEvent:a}=w9(),o=zh(),l=qf((()=>{var e;return null!=(e=o.value)?e:null==r?void 0:r.value}));function A(e){o.value=e?+e:""}function c(e){e=Math.trunc(+e),null==a||a(e),o.value=void 0}return(e,r)=>(af(),cf("span",{class:pu(ed(i).e("jump")),disabled:ed(s)},[ff("span",{class:pu([ed(i).e("goto")])},yu(ed(t)("el.pagination.goto")),3),mf(ed(Xj),{size:e.size,class:pu([ed(i).e("editor"),ed(i).is("in-pagination")]),min:1,max:ed(n),disabled:ed(s),"model-value":ed(l),"validate-event":!1,"aria-label":ed(t)("el.pagination.page"),type:"number","onUpdate:modelValue":A,onChange:c},null,8,["size","class","max","disabled","model-value","aria-label"]),ff("span",{class:pu([ed(i).e("classifier")])},yu(ed(t)("el.pagination.pageClassifier")),3)],10,["disabled"]))}});var D9=KU(k9,[["__file","jumper.vue"]]);const F9=BU({total:{type:Number,default:1e3}}),T9=hg({...hg({name:"ElPaginationTotal"}),props:F9,setup(e){const{t:t}=CU(),i=KF("pagination"),{disabled:n}=w9();return(e,s)=>(af(),cf("span",{class:pu(ed(i).e("total")),disabled:ed(n)},yu(ed(t)("el.pagination.total",{total:e.total})),11,["disabled"]))}});var M9=KU(T9,[["__file","total.vue"]]);const R9=BU({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),N9=hg({...hg({name:"ElPaginationPager"}),props:R9,emits:["change"],setup(e,{emit:t}){const i=e,n=KF("pager"),s=KF("icon"),{t:r}=CU(),a=zh(!1),o=zh(!1),l=zh(!1),A=zh(!1),c=zh(!1),u=zh(!1),h=qf((()=>{const e=i.pagerCount,t=(e-1)/2,n=Number(i.currentPage),s=Number(i.pageCount);let r=!1,a=!1;s>e&&(n>e-t&&(r=!0),n<s-t&&(a=!0));const o=[];if(r&&!a){for(let t=s-(e-2);t<s;t++)o.push(t)}else if(!r&&a)for(let i=2;i<e;i++)o.push(i);else if(r&&a){const t=Math.floor(e/2)-1;for(let e=n-t;e<=n+t;e++)o.push(e)}else for(let i=2;i<s;i++)o.push(i);return o})),d=qf((()=>["more","btn-quickprev",s.b(),n.is("disabled",i.disabled)])),g=qf((()=>["more","btn-quicknext",s.b(),n.is("disabled",i.disabled)])),p=qf((()=>i.disabled?-1:0));function f(e=!1){i.disabled||(e?l.value=!0:A.value=!0)}function m(e=!1){e?c.value=!0:u.value=!0}function C(e){const n=e.target;if("li"===n.tagName.toLowerCase()&&Array.from(n.classList).includes("number")){const e=Number(n.textContent);e!==i.currentPage&&t("change",e)}else"li"===n.tagName.toLowerCase()&&Array.from(n.classList).includes("more")&&I(e)}function I(e){const n=e.target;if("ul"===n.tagName.toLowerCase()||i.disabled)return;let s=Number(n.textContent);const r=i.pageCount,a=i.currentPage,o=i.pagerCount-2;n.className.includes("more")&&(n.className.includes("quickprev")?s=a-o:n.className.includes("quicknext")&&(s=a+o)),Number.isNaN(+s)||(s<1&&(s=1),s>r&&(s=r)),s!==a&&t("change",s)}return Hp((()=>{const e=(i.pagerCount-1)/2;a.value=!1,o.value=!1,i.pageCount>i.pagerCount&&(i.currentPage>i.pagerCount-e&&(a.value=!0),i.currentPage<i.pageCount-e&&(o.value=!0))})),(e,t)=>(af(),cf("ul",{class:pu(ed(n).b()),onClick:I,onKeyup:uC(C,["enter"])},[e.pageCount>0?(af(),cf("li",{key:0,class:pu([[ed(n).is("active",1===e.currentPage),ed(n).is("disabled",e.disabled)],"number"]),"aria-current":1===e.currentPage,"aria-label":ed(r)("el.pagination.currentPage",{pager:1}),tabindex:ed(p)}," 1 ",10,["aria-current","aria-label","tabindex"])):Bf("v-if",!0),a.value?(af(),cf("li",{key:1,class:pu(ed(d)),tabindex:ed(p),"aria-label":ed(r)("el.pagination.prevPages",{pager:e.pagerCount-2}),onMouseenter:e=>f(!0),onMouseleave:e=>l.value=!1,onFocus:e=>m(!0),onBlur:e=>c.value=!1},[!l.value&&!c.value||e.disabled?(af(),uf(ed(UY),{key:1})):(af(),uf(ed(zO),{key:0}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):Bf("v-if",!0),(af(!0),cf(Zp,null,Pg(ed(h),(t=>(af(),cf("li",{key:t,class:pu([[ed(n).is("active",e.currentPage===t),ed(n).is("disabled",e.disabled)],"number"]),"aria-current":e.currentPage===t,"aria-label":ed(r)("el.pagination.currentPage",{pager:t}),tabindex:ed(p)},yu(t),11,["aria-current","aria-label","tabindex"])))),128)),o.value?(af(),cf("li",{key:2,class:pu(ed(g)),tabindex:ed(p),"aria-label":ed(r)("el.pagination.nextPages",{pager:e.pagerCount-2}),onMouseenter:e=>f(),onMouseleave:e=>A.value=!1,onFocus:e=>m(),onBlur:e=>u.value=!1},[!A.value&&!u.value||e.disabled?(af(),uf(ed(UY),{key:1})):(af(),uf(ed($O),{key:0}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):Bf("v-if",!0),e.pageCount>1?(af(),cf("li",{key:3,class:pu([[ed(n).is("active",e.currentPage===e.pageCount),ed(n).is("disabled",e.disabled)],"number"]),"aria-current":e.currentPage===e.pageCount,"aria-label":ed(r)("el.pagination.currentPage",{pager:e.pageCount}),tabindex:ed(p)},yu(e.pageCount),11,["aria-current","aria-label","tabindex"])):Bf("v-if",!0)],42,["onKeyup"]))}});var L9=KU(N9,[["__file","pager.vue"]]);const U9=e=>"number"!=typeof e,H9=BU({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:e=>AL(e)&&Math.trunc(e)===e&&e>4&&e<22&&e%2==1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:Array,default:()=>[10,20,30,40,50,100]},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:fj,default:()=>kH},nextText:{type:String,default:""},nextIcon:{type:fj,default:()=>MH},teleported:{type:Boolean,default:!0},small:Boolean,size:bU,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),P9="ElPagination";var O9=hg({name:P9,props:H9,emits:{"update:current-page":e=>AL(e),"update:page-size":e=>AL(e),"size-change":e=>AL(e),change:(e,t)=>AL(e)&&AL(t),"current-change":e=>AL(e),"prev-click":e=>AL(e),"next-click":e=>AL(e)},setup(e,{emit:t,slots:i}){const{t:n}=CU(),s=KF("pagination"),r=kf().vnode.props||{},a=wU(),o=qf((()=>{var t;return e.small?"small":null!=(t=e.size)?t:a.value}));w$({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},qf((()=>!!e.small)));const l="onUpdate:currentPage"in r||"onUpdate:current-page"in r||"onCurrentChange"in r,A="onUpdate:pageSize"in r||"onUpdate:page-size"in r||"onSizeChange"in r,c=qf((()=>{if(U9(e.total)&&U9(e.pageCount))return!1;if(!U9(e.currentPage)&&!l)return!1;if(e.layout.includes("sizes"))if(U9(e.pageCount)){if(!U9(e.total)&&!U9(e.pageSize)&&!A)return!1}else if(!A)return!1;return!0})),u=zh(U9(e.defaultPageSize)?10:e.defaultPageSize),h=zh(U9(e.defaultCurrentPage)?1:e.defaultCurrentPage),d=qf({get:()=>U9(e.pageSize)?u.value:e.pageSize,set(i){U9(e.pageSize)&&(u.value=i),A&&(t("update:page-size",i),t("size-change",i))}}),g=qf((()=>{let t=0;return U9(e.pageCount)?U9(e.total)||(t=Math.max(1,Math.ceil(e.total/d.value))):t=e.pageCount,t})),p=qf({get:()=>U9(e.currentPage)?h.value:e.currentPage,set(i){let n=i;i<1?n=1:i>g.value&&(n=g.value),U9(e.currentPage)&&(h.value=n),l&&(t("update:current-page",n),t("current-change",n))}});function f(e){p.value=e}function m(){e.disabled||(p.value-=1,t("prev-click",p.value))}function C(){e.disabled||(p.value+=1,t("next-click",p.value))}function I(e,t){e&&(e.props||(e.props={}),e.props.class=[e.props.class,t].join(" "))}return Pp(g,(e=>{p.value>e&&(p.value=e)})),Pp([p,d],(e=>{t("change",...e)}),{flush:"post"}),gp(e9,{pageCount:g,disabled:qf((()=>e.disabled)),currentPage:p,changeEvent:f,handleSizeChange:function(e){d.value=e;const t=g.value;p.value>t&&(p.value=t)}}),()=>{var t,r;if(!c.value)return n("el.pagination.deprecationWarning"),null;if(!e.layout)return null;if(e.hideOnSinglePage&&g.value<=1)return null;const a=[],l=[],A=Yf("div",{class:s.e("rightwrapper")},l),u={prev:Yf(s9,{disabled:e.disabled,currentPage:p.value,prevText:e.prevText,prevIcon:e.prevIcon,onClick:m}),jumper:Yf(D9,{size:o.value}),pager:Yf(L9,{currentPage:p.value,pageCount:g.value,pagerCount:e.pagerCount,onChange:f,disabled:e.disabled}),next:Yf(o9,{disabled:e.disabled,currentPage:p.value,pageCount:g.value,nextText:e.nextText,nextIcon:e.nextIcon,onClick:C}),sizes:Yf(S9,{pageSize:d.value,pageSizes:e.pageSizes,popperClass:e.popperClass,disabled:e.disabled,teleported:e.teleported,size:o.value,appendSizeTo:e.appendSizeTo}),slot:null!=(r=null==(t=null==i?void 0:i.default)?void 0:t.call(i))?r:null,total:Yf(M9,{total:U9(e.total)?0:e.total})},h=e.layout.split(",").map((e=>e.trim()));let v=!1;return h.forEach((e=>{"->"!==e?v?l.push(u[e]):a.push(u[e]):v=!0})),I(a[0],s.is("first")),I(a[a.length-1],s.is("last")),v&&l.length>0&&(I(l[0],s.is("first")),I(l[l.length-1],s.is("last")),a.push(A)),Yf("div",{class:[s.b(),s.is("background",e.background),s.m(o.value)]},a)}}});const G9=lH(O9),K9=BU({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:Q$,default:"primary"},cancelButtonType:{type:String,values:Q$,default:"text"},icon:{type:fj,default:()=>PV},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:DX.teleported,persistent:DX.persistent,width:{type:[String,Number],default:150}}),q9={confirm:e=>e instanceof MouseEvent,cancel:e=>e instanceof MouseEvent},Y9=hg({...hg({name:"ElPopconfirm"}),props:K9,emits:q9,setup(e,{emit:t}){const i=e,{t:n}=CU(),s=KF("popconfirm"),r=zh(),a=()=>{var e,t;null==(t=null==(e=r.value)?void 0:e.onClose)||t.call(e)},o=qf((()=>({width:$U(i.width)}))),l=e=>{t("confirm",e),a()},A=e=>{t("cancel",e),a()},c=qf((()=>i.confirmButtonText||n("el.popconfirm.confirmButtonText"))),u=qf((()=>i.cancelButtonText||n("el.popconfirm.cancelButtonText")));return(e,t)=>(af(),uf(ed(XX),wf({ref_key:"tooltipRef",ref:r,trigger:"click",effect:"light"},e.$attrs,{"popper-class":`${ed(s).namespace.value}-popover`,"popper-style":ed(o),teleported:e.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":e.hideAfter,persistent:e.persistent}),{content:Nd((()=>[ff("div",{class:pu(ed(s).b())},[ff("div",{class:pu(ed(s).e("main"))},[!e.hideIcon&&e.icon?(af(),uf(ed(gH),{key:0,class:pu(ed(s).e("icon")),style:cu({color:e.iconColor})},{default:Nd((()=>[(af(),uf(Ng(e.icon)))])),_:1},8,["class","style"])):Bf("v-if",!0),vf(" "+yu(e.title),1)],2),ff("div",{class:pu(ed(s).e("action"))},[Gg(e.$slots,"actions",{confirm:l,cancel:A},(()=>[mf(ed(eZ),{size:"small",type:"text"===e.cancelButtonType?"":e.cancelButtonType,text:"text"===e.cancelButtonType,onClick:A},{default:Nd((()=>[vf(yu(ed(u)),1)])),_:1},8,["type","text"]),mf(ed(eZ),{size:"small",type:"text"===e.confirmButtonType?"":e.confirmButtonType,text:"text"===e.confirmButtonType,onClick:l},{default:Nd((()=>[vf(yu(ed(c)),1)])),_:1},8,["type","text"])]))],2)],2)])),default:Nd((()=>[e.$slots.reference?Gg(e.$slots,"reference",{key:0}):Bf("v-if",!0)])),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});const V9=lH(KU(Y9,[["__file","popconfirm.vue"]])),W9=BU({trigger:FX.trigger,placement:Y3.placement,disabled:FX.disabled,visible:DX.visible,transition:DX.transition,popperOptions:Y3.popperOptions,tabindex:Y3.tabindex,content:DX.content,popperStyle:DX.popperStyle,popperClass:DX.popperClass,enterable:{...DX.enterable,default:!0},effect:{...DX.effect,default:"light"},teleported:DX.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),j9={"update:visible":e=>lL(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},J9=hg({...hg({name:"ElPopover"}),props:W9,emits:j9,setup(e,{expose:t,emit:i}){const n=e,s=qf((()=>n["onUpdate:visible"])),r=KF("popover"),a=zh(),o=qf((()=>{var e;return null==(e=ed(a))?void 0:e.popperRef})),l=qf((()=>[{width:$U(n.width)},n.popperStyle])),A=qf((()=>[r.b(),n.popperClass,{[r.m("plain")]:!!n.content}])),c=qf((()=>n.transition===`${r.namespace.value}-fade-in-linear`)),u=()=>{i("before-enter")},h=()=>{i("before-leave")},d=()=>{i("after-enter")},g=()=>{i("update:visible",!1),i("after-leave")};return t({popperRef:o,hide:()=>{var e;null==(e=a.value)||e.hide()}}),(e,t)=>(af(),uf(ed(XX),wf({ref_key:"tooltipRef",ref:a},e.$attrs,{trigger:e.trigger,placement:e.placement,disabled:e.disabled,visible:e.visible,transition:e.transition,"popper-options":e.popperOptions,tabindex:e.tabindex,content:e.content,offset:e.offset,"show-after":e.showAfter,"hide-after":e.hideAfter,"auto-close":e.autoClose,"show-arrow":e.showArrow,"aria-label":e.title,effect:e.effect,enterable:e.enterable,"popper-class":ed(A),"popper-style":ed(l),teleported:e.teleported,persistent:e.persistent,"gpu-acceleration":ed(c),"onUpdate:visible":ed(s),onBeforeShow:u,onBeforeHide:h,onShow:d,onHide:g}),{content:Nd((()=>[e.title?(af(),cf("div",{key:0,class:pu(ed(r).e("title")),role:"title"},yu(e.title),3)):Bf("v-if",!0),Gg(e.$slots,"default",{},(()=>[vf(yu(e.content),1)]))])),default:Nd((()=>[e.$slots.reference?Gg(e.$slots,"reference",{key:0}):Bf("v-if",!0)])),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var z9=KU(J9,[["__file","popover.vue"]]);const X9=(e,t)=>{const i=t.arg||t.value,n=null==i?void 0:i.popperRef;n&&(n.triggerRef=e)};const $9=(e5="popover",(Z9={mounted(e,t){X9(e,t)},updated(e,t){X9(e,t)}}).install=e=>{e.directive(e5,Z9)},Z9);var Z9,e5;const t5=lH(z9,{directive:$9}),i5=BU({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:e=>e>=0&&e<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:String,default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:[String,Array,Function],default:""},striped:Boolean,stripedFlow:Boolean,format:{type:Function,default:e=>`${e}%`}}),n5=hg({...hg({name:"ElProgress"}),props:i5,setup(e){const t=e,i={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},n=KF("progress"),s=qf((()=>{const e={width:`${t.percentage}%`,animationDuration:`${t.duration}s`},i=m(t.percentage);return i.includes("gradient")?e.background=i:e.backgroundColor=i,e})),r=qf((()=>(t.strokeWidth/t.width*100).toFixed(1))),a=qf((()=>["circle","dashboard"].includes(t.type)?Number.parseInt(""+(50-Number.parseFloat(r.value)/2),10):0)),o=qf((()=>{const e=a.value,i="dashboard"===t.type;return`\n          M 50 50\n          m 0 ${i?"":"-"}${e}\n          a ${e} ${e} 0 1 1 0 ${i?"-":""}${2*e}\n          a ${e} ${e} 0 1 1 0 ${i?"":"-"}${2*e}\n          `})),l=qf((()=>2*Math.PI*a.value)),A=qf((()=>"dashboard"===t.type?.75:1)),c=qf((()=>`${-1*l.value*(1-A.value)/2}px`)),u=qf((()=>({strokeDasharray:`${l.value*A.value}px, ${l.value}px`,strokeDashoffset:c.value}))),h=qf((()=>({strokeDasharray:`${l.value*A.value*(t.percentage/100)}px, ${l.value}px`,strokeDashoffset:c.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"}))),d=qf((()=>{let e;return e=t.color?m(t.percentage):i[t.status]||i.default,e})),g=qf((()=>"warning"===t.status?lj:"line"===t.type?"success"===t.status?sO:lO:"success"===t.status?VP:CO)),p=qf((()=>"line"===t.type?12+.4*t.strokeWidth:.111111*t.width+2)),f=qf((()=>t.format(t.percentage)));const m=e=>{var i;const{color:n}=t;if(Oc(n))return n(e);if(Gc(n))return n;{const t=function(e){const t=100/e.length;return e.map(((e,i)=>Gc(e)?{color:e,percentage:(i+1)*t}:e)).sort(((e,t)=>e.percentage-t.percentage))}(n);for(const i of t)if(i.percentage>e)return i.color;return null==(i=t[t.length-1])?void 0:i.color}};return(e,t)=>(af(),cf("div",{class:pu([ed(n).b(),ed(n).m(e.type),ed(n).is(e.status),{[ed(n).m("without-text")]:!e.showText,[ed(n).m("text-inside")]:e.textInside}]),role:"progressbar","aria-valuenow":e.percentage,"aria-valuemin":"0","aria-valuemax":"100"},["line"===e.type?(af(),cf("div",{key:0,class:pu(ed(n).b("bar"))},[ff("div",{class:pu(ed(n).be("bar","outer")),style:cu({height:`${e.strokeWidth}px`})},[ff("div",{class:pu([ed(n).be("bar","inner"),{[ed(n).bem("bar","inner","indeterminate")]:e.indeterminate},{[ed(n).bem("bar","inner","striped")]:e.striped},{[ed(n).bem("bar","inner","striped-flow")]:e.stripedFlow}]),style:cu(ed(s))},[(e.showText||e.$slots.default)&&e.textInside?(af(),cf("div",{key:0,class:pu(ed(n).be("bar","innerText"))},[Gg(e.$slots,"default",{percentage:e.percentage},(()=>[ff("span",null,yu(ed(f)),1)]))],2)):Bf("v-if",!0)],6)],6)],2)):(af(),cf("div",{key:1,class:pu(ed(n).b("circle")),style:cu({height:`${e.width}px`,width:`${e.width}px`})},[(af(),cf("svg",{viewBox:"0 0 100 100"},[ff("path",{class:pu(ed(n).be("circle","track")),d:ed(o),stroke:`var(${ed(n).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":e.strokeLinecap,"stroke-width":ed(r),fill:"none",style:cu(ed(u))},null,14,["d","stroke","stroke-linecap","stroke-width"]),ff("path",{class:pu(ed(n).be("circle","path")),d:ed(o),stroke:ed(d),fill:"none",opacity:e.percentage?1:0,"stroke-linecap":e.strokeLinecap,"stroke-width":ed(r),style:cu(ed(h))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),!e.showText&&!e.$slots.default||e.textInside?Bf("v-if",!0):(af(),cf("div",{key:2,class:pu(ed(n).e("text")),style:cu({fontSize:`${ed(p)}px`})},[Gg(e.$slots,"default",{percentage:e.percentage},(()=>[e.status?(af(),uf(ed(gH),{key:1},{default:Nd((()=>[(af(),uf(Ng(ed(g))))])),_:1})):(af(),cf("span",{key:0},yu(ed(f)),1))]))],6))],10,["aria-valuenow"]))}});const s5=lH(KU(n5,[["__file","progress.vue"]])),r5=BU({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:[Array,Object],default:()=>["","",""]},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:[Array,Object],default:()=>[BW,BW,BW]},voidIcon:{type:fj,default:()=>yW},disabledVoidIcon:{type:fj,default:()=>BW},disabled:Boolean,allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:Array,default:()=>["Extremely bad","Disappointed","Fair","Satisfied","Surprise"]},scoreTemplate:{type:String,default:"{value}"},size:bU,clearable:Boolean,...Dj(["ariaLabel"])}),a5={[HU]:e=>AL(e),[UU]:e=>AL(e)},o5=hg({...hg({name:"ElRate"}),props:r5,emits:a5,setup(e,{expose:t,emit:i}){const n=e;function s(e,t){const i=e=>qc(e),n=Object.keys(t).map((e=>+e)).filter((n=>{const s=t[n];return!!i(s)&&s.excluded?e<n:e<=n})).sort(((e,t)=>e-t)),s=t[n[0]];return i(s)&&s.value||s}const r=pp(Lj,void 0),a=pp(Uj,void 0),o=Vj(),l=KF("rate"),{inputId:A,isLabeledByFormItem:c}=qj(n,{formItemContext:a}),u=zh(n.modelValue),h=zh(-1),d=zh(!0),g=qf((()=>[l.b(),l.m(o.value)])),p=qf((()=>n.disabled||(null==r?void 0:r.disabled))),f=qf((()=>l.cssVarBlock({"void-color":n.voidColor,"disabled-void-color":n.disabledVoidColor,"fill-color":v.value}))),m=qf((()=>{let e="";return n.showScore?e=n.scoreTemplate.replace(/\{\s*value\s*\}/,p.value?`${n.modelValue}`:`${u.value}`):n.showText&&(e=n.texts[Math.ceil(u.value)-1]),e})),C=qf((()=>100*n.modelValue-100*Math.floor(n.modelValue))),I=qf((()=>Lc(n.colors)?{[n.lowThreshold]:n.colors[0],[n.highThreshold]:{value:n.colors[1],excluded:!0},[n.max]:n.colors[2]}:n.colors)),v=qf((()=>{const e=s(u.value,I.value);return qc(e)?"":e})),B=qf((()=>{let e="";return p.value?e=`${C.value}%`:n.allowHalf&&(e="50%"),{color:v.value,width:e}})),y=qf((()=>{let e=Lc(n.icons)?[...n.icons]:{...n.icons};return e=Vh(e),Lc(e)?{[n.lowThreshold]:e[0],[n.highThreshold]:{value:e[1],excluded:!0},[n.max]:e[2]}:e})),b=qf((()=>s(n.modelValue,y.value))),E=qf((()=>p.value?Gc(n.disabledVoidIcon)?n.disabledVoidIcon:Vh(n.disabledVoidIcon):Gc(n.voidIcon)?n.voidIcon:Vh(n.voidIcon))),w=qf((()=>s(u.value,y.value)));function Q(e){const t=p.value&&C.value>0&&e-1<n.modelValue&&e>n.modelValue,i=n.allowHalf&&d.value&&e-.5<=u.value&&e>u.value;return t||i}function _(e){n.clearable&&e===n.modelValue&&(e=0),i(UU,e),n.modelValue!==e&&i("change",e)}function S(e){if(p.value)return;let t=u.value;const s=e.code;return s===zJ.up||s===zJ.right?(n.allowHalf?t+=.5:t+=1,e.stopPropagation(),e.preventDefault()):s!==zJ.left&&s!==zJ.down||(n.allowHalf?t-=.5:t-=1,e.stopPropagation(),e.preventDefault()),t=t<0?0:t,t=t>n.max?n.max:t,i(UU,t),i("change",t),t}function x(e,t){if(!p.value){if(n.allowHalf&&t){let i=t.target;WU(i,l.e("item"))&&(i=i.querySelector(`.${l.e("icon")}`)),(0===i.clientWidth||WU(i,l.e("decimal")))&&(i=i.parentNode),d.value=2*t.offsetX<=i.clientWidth,u.value=d.value?e-.5:e}else u.value=e;h.value=e}}function k(){p.value||(n.allowHalf&&(d.value=n.modelValue!==Math.floor(n.modelValue)),u.value=n.modelValue,h.value=-1)}return Pp((()=>n.modelValue),(e=>{u.value=e,d.value=n.modelValue!==Math.floor(n.modelValue)})),n.modelValue||i(UU,0),t({setCurrentValue:x,resetCurrentValue:k}),(e,t)=>{var i;return af(),cf("div",{id:ed(A),class:pu([ed(g),ed(l).is("disabled",ed(p))]),role:"slider","aria-label":ed(c)?void 0:e.ariaLabel||"rating","aria-labelledby":ed(c)?null==(i=ed(a))?void 0:i.labelId:void 0,"aria-valuenow":u.value,"aria-valuetext":ed(m)||void 0,"aria-valuemin":"0","aria-valuemax":e.max,tabindex:"0",style:cu(ed(f)),onKeydown:S},[(af(!0),cf(Zp,null,Pg(e.max,((e,t)=>(af(),cf("span",{key:t,class:pu(ed(l).e("item")),onMousemove:t=>x(e,t),onMouseleave:k,onClick:t=>{return i=e,void(p.value||(n.allowHalf&&d.value?_(u.value):_(i)));var i}},[mf(ed(gH),{class:pu([ed(l).e("icon"),{hover:h.value===e},ed(l).is("active",e<=u.value)])},{default:Nd((()=>[Q(e)?Bf("v-if",!0):(af(),cf(Zp,{key:0},[Ld((af(),uf(Ng(ed(w)),null,null,512)),[[ym,e<=u.value]]),Ld((af(),uf(Ng(ed(E)),null,null,512)),[[ym,!(e<=u.value)]])],64)),Q(e)?(af(),cf(Zp,{key:1},[(af(),uf(Ng(ed(E)),{class:pu([ed(l).em("decimal","box")])},null,8,["class"])),mf(ed(gH),{style:cu(ed(B)),class:pu([ed(l).e("icon"),ed(l).e("decimal")])},{default:Nd((()=>[(af(),uf(Ng(ed(b))))])),_:1},8,["style","class"])],64)):Bf("v-if",!0)])),_:2},1032,["class"])],42,["onMousemove","onClick"])))),128)),e.showText||e.showScore?(af(),cf("span",{key:0,class:pu(ed(l).e("text")),style:cu({color:e.textColor})},yu(ed(m)),7)):Bf("v-if",!0)],46,["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"])}}});const l5=lH(KU(o5,[["__file","rate.vue"]])),A5={success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},c5={[A5.success]:iO,[A5.warning]:lj,[A5.error]:aO,[A5.info]:kq},u5=BU({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["success","warning","info","error"],default:"info"}}),h5=hg({...hg({name:"ElResult"}),props:u5,setup(e){const t=e,i=KF("result"),n=qf((()=>{const e=t.icon,i=e&&A5[e]?A5[e]:"icon-info";return{class:i,component:c5[i]||c5["icon-info"]}}));return(e,t)=>(af(),cf("div",{class:pu(ed(i).b())},[ff("div",{class:pu(ed(i).e("icon"))},[Gg(e.$slots,"icon",{},(()=>[ed(n).component?(af(),uf(Ng(ed(n).component),{key:0,class:pu(ed(n).class)},null,8,["class"])):Bf("v-if",!0)]))],2),e.title||e.$slots.title?(af(),cf("div",{key:0,class:pu(ed(i).e("title"))},[Gg(e.$slots,"title",{},(()=>[ff("p",null,yu(e.title),1)]))],2)):Bf("v-if",!0),e.subTitle||e.$slots["sub-title"]?(af(),cf("div",{key:1,class:pu(ed(i).e("subtitle"))},[Gg(e.$slots,"sub-title",{},(()=>[ff("p",null,yu(e.subTitle),1)]))],2)):Bf("v-if",!0),e.$slots.extra?(af(),cf("div",{key:2,class:pu(ed(i).e("extra"))},[Gg(e.$slots,"extra")],2)):Bf("v-if",!0)],2))}});const d5=lH(KU(h5,[["__file","result.vue"]])),g5=BU({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),p5=hg({...hg({name:"ElRow"}),props:g5,setup(e){const t=e,i=KF("row"),n=qf((()=>t.gutter));gp(a1,{gutter:n});const s=qf((()=>{const e={};return t.gutter?(e.marginRight=e.marginLeft=`-${t.gutter/2}px`,e):e})),r=qf((()=>[i.b(),i.is(`justify-${t.justify}`,"start"!==t.justify),i.is(`align-${t.align}`,!!t.align)]));return(e,t)=>(af(),uf(Ng(e.tag),{class:pu(ed(r)),style:cu(ed(s))},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["class","style"]))}});const f5=lH(KU(p5,[["__file","row.vue"]]));var m5=KU(hg({props:{item:{type:Object,required:!0},style:{type:Object},height:Number},setup:()=>({ns:KF("select")})}),[["render",function(e,t,i,n,s,r){return af(),cf("div",{class:pu(e.ns.be("group","title")),style:cu({...e.style,lineHeight:`${e.height}px`})},yu(e.item.label),7)}],["__file","group-item.vue"]]);const C5={label:"label",value:"value",disabled:"disabled",options:"options"};function I5(e){const t=qf((()=>({...C5,...e.props})));return{aliasProps:t,getLabel:e=>$M(e,t.value.label),getValue:e=>$M(e,t.value.value),getDisabled:e=>$M(e,t.value.disabled),getOptions:e=>$M(e,t.value.options)}}const v5=BU({allowCreate:Boolean,autocomplete:{type:String,default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:fj,default:lO},effect:{type:String,default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:Function,height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:[Array,String,Number,Boolean,Object]},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:Function,reserveKeyword:{type:Boolean,default:!0},options:{type:Array,required:!0},placeholder:{type:String},teleported:DX.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},remote:Boolean,size:bU,props:{type:Object,default:()=>C5},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},showArrow:{type:Boolean,default:!0},placement:{type:String,values:hz,default:"bottom-start"},fallbackPlacements:{type:Array,default:["bottom-start","top-start","right","left"]},tagType:{...q0.type,default:"info"},tagEffect:{...q0.effect,default:"light"},tabindex:{type:[String,Number],default:0},appendTo:String,...SU,...Dj(["ariaLabel"])}),B5=BU({data:Array,disabled:Boolean,hovering:Boolean,item:{type:Object,required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),y5={[UU]:e=>!0,[HU]:e=>!0,"remove-tag":e=>!0,"visible-change":e=>!0,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0},b5={hover:e=>AL(e),select:(e,t)=>!0},E5=Symbol("ElSelectV2Injection"),w5=hg({props:B5,emits:b5,setup(e,{emit:t}){const i=pp(E5),n=KF("select"),{hoverItem:s,selectOptionClick:r}=function(e,{emit:t}){return{hoverItem:()=>{e.disabled||t("hover",e.index)},selectOptionClick:()=>{e.disabled||t("select",e.item,e.index)}}}(e,{emit:t}),{getLabel:a}=I5(i.props);return{ns:n,hoverItem:s,selectOptionClick:r,getLabel:a}}});var Q5=KU(w5,[["render",function(e,t,i,n,s,r){return af(),cf("li",{"aria-selected":e.selected,style:cu(e.style),class:pu([e.ns.be("dropdown","item"),e.ns.is("selected",e.selected),e.ns.is("disabled",e.disabled),e.ns.is("created",e.created),e.ns.is("hovering",e.hovering)]),onMousemove:e.hoverItem,onClick:AC(e.selectOptionClick,["stop"])},[Gg(e.$slots,"default",{item:e.item,index:e.index,disabled:e.disabled},(()=>[ff("span",null,yu(e.getLabel(e.item)),1)]))],46,["aria-selected","onMousemove","onClick"])}],["__file","option-item.vue"]]),_5=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function S5(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(n=e[i],s=t[i],!(n===s||_5(n)&&_5(s)))return!1;var n,s;return!0}const x5=()=>{const e=kf().proxy.$props;return qf((()=>{const t=(e,t,i)=>({});return e.perfMode?YM(t):function(e,t){void 0===t&&(t=S5);var i=null;function n(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];if(i&&i.lastThis===this&&t(n,i.lastArgs))return i.lastResult;var r=e.apply(this,n);return i={lastResult:r,lastArgs:n,lastThis:this},r}return n.clear=function(){i=null},n}(t)}))},k5="itemRendered",D5="scroll",F5="forward",T5="backward",M5="auto",R5="smart",N5="start",L5="center",U5="end",H5="horizontal",P5="vertical",O5="rtl",G5="negative",K5="positive-ascending",q5="positive-descending",Y5={[H5]:"left",[P5]:"top"},V5={[H5]:"deltaX",[P5]:"deltaY"},W5=vU({type:[Number,Function],required:!0}),j5=vU({type:Number}),J5=vU({type:Number,default:2}),z5=vU({type:String,values:["ltr","rtl"],default:"ltr"}),X5=vU({type:Number,default:0}),$5=vU({type:Number,required:!0}),Z5=vU({type:String,values:["horizontal","vertical"],default:P5}),e7=BU({className:{type:String,default:""},containerElement:{type:[String,Object],default:"div"},data:{type:Array,default:()=>[]},direction:z5,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:[Object,String,Array]},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),t7=BU({cache:J5,estimatedItemSize:j5,layout:Z5,initScrollOffset:X5,total:$5,itemSize:W5,...e7}),i7={type:Number,default:6},n7={type:Number,default:0},s7={type:Number,default:2},r7=BU({columnCache:J5,columnWidth:W5,estimatedColumnWidth:j5,estimatedRowHeight:j5,initScrollLeft:X5,initScrollTop:X5,itemKey:{type:Function,default:({columnIndex:e,rowIndex:t})=>`${t}:${e}`},rowCache:J5,rowHeight:W5,totalColumn:$5,totalRow:$5,hScrollbarSize:i7,vScrollbarSize:i7,scrollbarStartGap:n7,scrollbarEndGap:s7,role:String,...e7}),a7=BU({alwaysOn:Boolean,class:String,layout:Z5,total:$5,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:i7,startGap:n7,endGap:s7,visible:Boolean}),o7=(e,t)=>e<t?F5:T5,l7=e=>"ltr"===e||e===O5||e===H5,A7=e=>e===O5;let c7=null;function u7(e=!1){if(null===c7||e){const e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";const i=document.createElement("div"),n=i.style;return n.width="100px",n.height="100px",e.appendChild(i),document.body.appendChild(e),e.scrollLeft>0?c7=q5:(e.scrollLeft=1,c7=0===e.scrollLeft?G5:K5),document.body.removeChild(e),c7}return c7}const h7=hg({name:"ElVirtualScrollBar",props:a7,emits:["scroll","start-move","stop-move"],setup(e,{emit:t}){const i=qf((()=>e.startGap+e.endGap)),n=KF("virtual-scrollbar"),s=KF("scrollbar"),r=zh(),a=zh();let o=null,l=null;const A=Lh({isDragging:!1,traveled:0}),c=qf((()=>$j[e.layout])),u=qf((()=>e.clientSize-ed(i))),h=qf((()=>({position:"absolute",width:`${H5===e.layout?u.value:e.scrollbarSize}px`,height:`${H5===e.layout?e.scrollbarSize:u.value}px`,[Y5[e.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"}))),d=qf((()=>{const t=e.ratio,i=e.clientSize;if(t>=100)return Number.POSITIVE_INFINITY;if(t>=50)return t*i/100;const n=i/3;return Math.floor(Math.min(Math.max(t*i,20),n))})),g=qf((()=>{if(!Number.isFinite(d.value))return{display:"none"};const t=`${d.value}px`,i=function({move:e,size:t,bar:i},n){const s={},r=`translate${i.axis}(${e}px)`;return s[i.size]=t,s.transform=r,s.msTransform=r,s.webkitTransform=r,"horizontal"===n?s.height="100%":s.width="100%",s}({bar:c.value,size:t,move:A.traveled},e.layout);return i})),p=qf((()=>Math.floor(e.clientSize-d.value-ed(i)))),f=()=>{window.removeEventListener("mousemove",I),window.removeEventListener("mouseup",C),document.onselectstart=l,l=null;const e=ed(a);e&&(e.removeEventListener("touchmove",I),e.removeEventListener("touchend",C))},m=e=>{e.stopImmediatePropagation(),e.ctrlKey||[1,2].includes(e.button)||(A.isDragging=!0,A[c.value.axis]=e.currentTarget[c.value.offset]-(e[c.value.client]-e.currentTarget.getBoundingClientRect()[c.value.direction]),t("start-move"),(()=>{window.addEventListener("mousemove",I),window.addEventListener("mouseup",C);const e=ed(a);e&&(l=document.onselectstart,document.onselectstart=()=>!1,e.addEventListener("touchmove",I,{passive:!0}),e.addEventListener("touchend",C))})())},C=()=>{A.isDragging=!1,A[c.value.axis]=0,t("stop-move"),f()},I=i=>{const{isDragging:n}=A;if(!n)return;if(!a.value||!r.value)return;const s=A[c.value.axis];if(!s)return;YU(o);const l=-1*(r.value.getBoundingClientRect()[c.value.direction]-i[c.value.client])-(a.value[c.value.offset]-s);o=qU((()=>{A.traveled=Math.max(e.startGap,Math.min(l,p.value)),t("scroll",l,p.value)}))},v=e=>{const i=Math.abs(e.target.getBoundingClientRect()[c.value.direction]-e[c.value.client])-a.value[c.value.offset]/2;A.traveled=Math.max(0,Math.min(i,p.value)),t("scroll",i,p.value)};return Pp((()=>e.scrollFrom),(e=>{A.isDragging||(A.traveled=Math.ceil(e*p.value))})),_g((()=>{f()})),()=>Yf("div",{role:"presentation",ref:r,class:[n.b(),e.class,(e.alwaysOn||A.isDragging)&&"always-on"],style:h.value,onMousedown:AC(v,["stop","prevent"]),onTouchstartPrevent:m},Yf("div",{ref:a,class:s.e("thumb"),style:g.value,onMousedown:m},[]))}}),d7=({name:e,getOffset:t,getItemSize:i,getItemOffset:n,getEstimatedTotalSize:s,getStartIndexForOffset:r,getStopIndexForStartIndex:a,initCache:o,clearCache:l,validateProps:A})=>hg({name:null!=e?e:"ElVirtualList",props:t7,emits:[k5,D5],setup(e,{emit:c,expose:u}){A(e);const h=kf(),d=KF("vl"),g=zh(o(e,h)),p=x5(),f=zh(),m=zh(),C=zh(),I=zh({isScrolling:!1,scrollDir:"forward",scrollOffset:AL(e.initScrollOffset)?e.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:e.scrollbarAlwaysOn}),v=qf((()=>{const{total:t,cache:i}=e,{isScrolling:n,scrollDir:s,scrollOffset:o}=ed(I);if(0===t)return[0,0,0,0];const l=r(e,o,ed(g)),A=a(e,l,o,ed(g)),c=n&&s!==T5?1:Math.max(1,i),u=n&&s!==F5?1:Math.max(1,i);return[Math.max(0,l-c),Math.max(0,Math.min(t-1,A+u)),l,A]})),B=qf((()=>s(e,ed(g)))),y=qf((()=>l7(e.layout))),b=qf((()=>[{position:"relative",["overflow-"+(y.value?"x":"y")]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:e.direction,height:AL(e.height)?`${e.height}px`:e.height,width:AL(e.width)?`${e.width}px`:e.width},e.style])),E=qf((()=>{const e=ed(B),t=ed(y);return{height:t?"100%":`${e}px`,pointerEvents:ed(I).isScrolling?"none":void 0,width:t?`${e}px`:"100%"}})),w=qf((()=>y.value?e.width:e.height)),{onWheel:Q}=(({atEndEdge:e,atStartEdge:t,layout:i},n)=>{let s,r=0;const a=i=>i<0&&t.value||i>0&&e.value;return{hasReachedEdge:a,onWheel:e=>{YU(s);const t=e[V5[i.value]];a(r)&&a(r+t)||(r+=t,wj()||e.preventDefault(),s=qU((()=>{n(r),r=0})))}}})({atStartEdge:qf((()=>I.value.scrollOffset<=0)),atEndEdge:qf((()=>I.value.scrollOffset>=B.value)),layout:qf((()=>e.layout))},(e=>{var t,i;null==(i=(t=C.value).onMouseUp)||i.call(t),S(Math.min(I.value.scrollOffset+e,B.value-w.value))}));UL(f,"wheel",Q,{passive:!1});const _=()=>{const{total:t}=e;if(t>0){const[e,t,i,n]=ed(v);c(k5,e,t,i,n)}const{scrollDir:i,scrollOffset:n,updateRequested:s}=ed(I);c(D5,i,n,s)},S=e=>{(e=Math.max(e,0))!==ed(I).scrollOffset&&(I.value={...ed(I),scrollOffset:e,scrollDir:o7(ed(I).scrollOffset,e),updateRequested:!0},Qd(k))},x=(i,n=M5)=>{const{scrollOffset:s}=ed(I);i=Math.max(0,Math.min(i,e.total-1)),S(t(e,i,n,s,ed(g)))},k=()=>{I.value.isScrolling=!1,Qd((()=>{p.value(-1,null,null)}))},D=()=>{const e=f.value;e&&(e.scrollTop=0)};Eg((()=>{if(!bL)return;const{initScrollOffset:t}=e,i=ed(f);AL(t)&&i&&(ed(y)?i.scrollLeft=t:i.scrollTop=t),_()})),Qg((()=>{const{direction:t,layout:i}=e,{scrollOffset:n,updateRequested:s}=ed(I),r=ed(f);if(s&&r)if(i===H5)if(t===O5)switch(u7()){case G5:r.scrollLeft=-n;break;case K5:r.scrollLeft=n;break;default:{const{clientWidth:e,scrollWidth:t}=r;r.scrollLeft=t-e-n;break}}else r.scrollLeft=n;else r.scrollTop=n})),mg((()=>{ed(f).scrollTop=ed(I).scrollOffset}));const F={ns:d,clientSize:w,estimatedTotalSize:B,windowStyle:b,windowRef:f,innerRef:m,innerStyle:E,itemsToRender:v,scrollbarRef:C,states:I,getItemStyle:t=>{const{direction:s,itemSize:r,layout:a}=e,o=p.value(l&&r,l&&a,l&&s);let A;if(Nc(o,String(t)))A=o[t];else{const r=n(e,t,ed(g)),a=i(e,t,ed(g)),l=ed(y),c=s===O5,u=l?r:0;o[t]=A={position:"absolute",left:c?void 0:`${u}px`,right:c?`${u}px`:void 0,top:l?0:`${r}px`,height:l?"100%":`${a}px`,width:l?`${a}px`:"100%"}}return A},onScroll:t=>{ed(y)?(t=>{const{clientWidth:i,scrollLeft:n,scrollWidth:s}=t.currentTarget,r=ed(I);if(r.scrollOffset===n)return;const{direction:a}=e;let o=n;if(a===O5)switch(u7()){case G5:o=-n;break;case q5:o=s-i-n}o=Math.max(0,Math.min(o,s-i)),I.value={...r,isScrolling:!0,scrollDir:o7(r.scrollOffset,o),scrollOffset:o,updateRequested:!1},Qd(k)})(t):(e=>{const{clientHeight:t,scrollHeight:i,scrollTop:n}=e.currentTarget,s=ed(I);if(s.scrollOffset===n)return;const r=Math.max(0,Math.min(n,i-t));I.value={...s,isScrolling:!0,scrollDir:o7(s.scrollOffset,r),scrollOffset:r,updateRequested:!1},Qd(k)})(t),_()},onScrollbarScroll:(e,t)=>{const i=(B.value-w.value)/t*e;S(Math.min(B.value-w.value,i))},onWheel:Q,scrollTo:S,scrollToItem:x,resetScrollTop:D};return u({windowRef:f,innerRef:m,getItemStyleCache:p,scrollTo:S,scrollToItem:x,resetScrollTop:D,states:I}),F},render(e){var t;const{$slots:i,className:n,clientSize:s,containerElement:r,data:a,getItemStyle:o,innerElement:l,itemsToRender:A,innerStyle:c,layout:u,total:h,onScroll:d,onScrollbarScroll:g,states:p,useIsScrolling:f,windowStyle:m,ns:C}=e,[I,v]=A,B=Ng(r),y=Ng(l),b=[];if(h>0)for(let _=I;_<=v;_++)b.push(Yf(Zp,{key:_},null==(t=i.default)?void 0:t.call(i,{data:a,index:_,isScrolling:f?p.isScrolling:void 0,style:o(_)})));const E=[Yf(y,{style:c,ref:"innerRef"},Gc(y)?b:{default:()=>b})],w=Yf(h7,{ref:"scrollbarRef",clientSize:s,layout:u,onScroll:g,ratio:100*s/this.estimatedTotalSize,scrollFrom:p.scrollOffset/(this.estimatedTotalSize-s),total:h}),Q=Yf(B,{class:[C.e("window"),n],style:m,onScroll:d,ref:"windowRef",key:0},Gc(B)?[E]:{default:()=>[E]});return Yf("div",{key:0,class:[C.e("wrapper"),p.scrollbarAlwaysOn?"always-on":""]},[Q,w])}}),g7=d7({name:"ElFixedSizeList",getItemOffset:({itemSize:e},t)=>t*e,getItemSize:({itemSize:e})=>e,getEstimatedTotalSize:({total:e,itemSize:t})=>t*e,getOffset:({height:e,total:t,itemSize:i,layout:n,width:s},r,a,o)=>{const l=l7(n)?s:e,A=Math.max(0,t*i-l),c=Math.min(A,r*i),u=Math.max(0,(r+1)*i-l);switch(a===R5&&(a=o>=u-l&&o<=c+l?M5:L5),a){case N5:return c;case U5:return u;case L5:{const e=Math.round(u+(c-u)/2);return e<Math.ceil(l/2)?0:e>A+Math.floor(l/2)?A:e}default:return o>=u&&o<=c?o:o<u?u:c}},getStartIndexForOffset:({total:e,itemSize:t},i)=>Math.max(0,Math.min(e-1,Math.floor(i/t))),getStopIndexForStartIndex:({height:e,total:t,itemSize:i,layout:n,width:s},r,a)=>{const o=r*i,l=l7(n)?s:e,A=Math.ceil((l+a-o)/i);return Math.max(0,Math.min(t-1,r+A-1))},initCache(){},clearCache:!0,validateProps(){}}),p7=(e,t,i)=>{const{itemSize:n}=e,{items:s,lastVisitedIndex:r}=i;if(t>r){let e=0;if(r>=0){const t=s[r];e=t.offset+t.size}for(let i=r+1;i<=t;i++){const t=n(i);s[i]={offset:e,size:t},e+=t}i.lastVisitedIndex=t}return s[t]},f7=(e,t,i,n,s)=>{for(;i<=n;){const r=i+Math.floor((n-i)/2),a=p7(e,r,t).offset;if(a===s)return r;a<s?i=r+1:a>s&&(n=r-1)}return Math.max(0,i-1)},m7=(e,t,i,n)=>{const{total:s}=e;let r=1;for(;i<s&&p7(e,i,t).offset<n;)i+=r,r*=2;return f7(e,t,Math.floor(i/2),Math.min(i,s-1),n)},C7=({total:e},{items:t,estimatedItemSize:i,lastVisitedIndex:n})=>{let s=0;if(n>=e&&(n=e-1),n>=0){const e=t[n];s=e.offset+e.size}return s+(e-n-1)*i},I7=d7({name:"ElDynamicSizeList",getItemOffset:(e,t,i)=>p7(e,t,i).offset,getItemSize:(e,t,{items:i})=>i[t].size,getEstimatedTotalSize:C7,getOffset:(e,t,i,n,s)=>{const{height:r,layout:a,width:o}=e,l=l7(a)?o:r,A=p7(e,t,s),c=C7(e,s),u=Math.max(0,Math.min(c-l,A.offset)),h=Math.max(0,A.offset-l+A.size);switch(i===R5&&(i=n>=h-l&&n<=u+l?M5:L5),i){case N5:return u;case U5:return h;case L5:return Math.round(h+(u-h)/2);default:return n>=h&&n<=u?n:n<h?h:u}},getStartIndexForOffset:(e,t,i)=>((e,t,i)=>{const{items:n,lastVisitedIndex:s}=t;return(s>0?n[s].offset:0)>=i?f7(e,t,0,s,i):m7(e,t,Math.max(0,s),i)})(e,i,t),getStopIndexForStartIndex:(e,t,i,n)=>{const{height:s,total:r,layout:a,width:o}=e,l=l7(a)?o:s,A=p7(e,t,n),c=i+l;let u=A.offset+A.size,h=t;for(;h<r-1&&u<c;)h++,u+=p7(e,h,n).size;return h},initCache({estimatedItemSize:e=50},t){const i={items:{},estimatedItemSize:e,lastVisitedIndex:-1,clearCacheAfterIndex:(e,n=!0)=>{var s,r;i.lastVisitedIndex=Math.min(i.lastVisitedIndex,e-1),null==(s=t.exposed)||s.getItemStyleCache(-1),n&&(null==(r=t.proxy)||r.$forceUpdate())}};return i},clearCache:!1,validateProps:({itemSize:e})=>{}});var v7=hg({name:"ElSelectDropdown",props:{loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number},setup(e,{slots:t,expose:i}){const n=pp(E5),s=KF("select"),{getLabel:r,getValue:a,getDisabled:o}=I5(n.props),l=zh([]),A=zh(),c=qf((()=>e.data.length));Pp((()=>c.value),(()=>{var e,t;null==(t=(e=n.tooltipRef.value).updatePopper)||t.call(e)}));const u=qf((()=>oL(n.props.estimatedOptionHeight))),h=qf((()=>u.value?{itemSize:n.props.itemHeight}:{estimatedSize:n.props.estimatedOptionHeight,itemSize:e=>l.value[e]})),d=(e,t)=>n.props.multiple?((e=[],t)=>{const{props:{valueKey:i}}=n;return qc(t)?e&&e.some((e=>Yh($M(e,i))===$M(t,i))):e.includes(t)})(e,a(t)):((e,t)=>{if(qc(t)){const{valueKey:i}=n.props;return $M(e,i)===$M(t,i)}return e===t})(e,a(t)),g=(e,t)=>{const{disabled:i,multiple:s,multipleLimit:r}=n.props;return i||!t&&!!s&&r>0&&e.length>=r},p=t=>e.hoveringIndex===t;i({listRef:A,isSized:u,isItemDisabled:g,isItemHovering:p,isItemSelected:d,scrollToItem:e=>{const t=A.value;t&&t.scrollToItem(e)},resetScrollTop:()=>{const e=A.value;e&&e.resetScrollTop()}});const f=e=>{const{index:i,data:s,style:a}=e,l=ed(u),{itemSize:A,estimatedSize:c}=ed(h),{modelValue:f}=n.props,{onSelect:m,onHover:C}=n,I=s[i];if("Group"===I.type)return mf(m5,{item:I,style:a,height:l?A:c},null);const v=d(f,I),B=g(f,v),y=p(i);return mf(Q5,wf(e,{selected:v,disabled:o(I)||B,created:!!I.created,hovering:y,item:I,onSelect:m,onHover:C}),{default:e=>{var i;return(null==(i=t.default)?void 0:i.call(t,e))||mf("span",null,[r(I)])}})},{onKeyboardNavigate:m,onKeyboardSelect:C}=n,I=e=>{const{code:t}=e,{tab:i,esc:n,down:s,up:r,enter:a,numpadEnter:o}=zJ;switch(t!==i&&(e.preventDefault(),e.stopPropagation()),t){case i:case n:break;case s:m("forward");break;case r:m("backward");break;case a:case o:C()}};return()=>{var i,r,a,o;const{data:l,width:c}=e,{height:d,multiple:g,scrollbarAlwaysOn:p}=n.props,m=ed(u)?g7:I7;return mf("div",{class:[s.b("dropdown"),s.is("multiple",g)],style:{width:`${c}px`}},[null==(i=t.header)?void 0:i.call(t),(null==(r=t.loading)?void 0:r.call(t))||(null==(a=t.empty)?void 0:a.call(t))||mf(m,wf({ref:A},ed(h),{className:s.be("dropdown","list"),scrollbarAlwaysOn:p,data:l,height:d,width:c,total:l.length,onKeydown:I}),{default:e=>mf(f,e,null)}),null==(o=t.footer)?void 0:o.call(t)])}}});function B7(e,t){const{aliasProps:i,getLabel:n,getValue:s}=I5(e),r=zh(0),a=zh(),o=qf((()=>e.allowCreate&&e.filterable));return{createNewOption:function(s){if(o.value)if(s&&s.length>0){if(function(i){const s=e=>n(e)===i;return e.options&&e.options.some(s)||t.createdOptions.some(s)}(s))return;const a={[i.value.value]:s,[i.value.label]:s,created:!0,[i.value.disabled]:!1};t.createdOptions.length>=r.value?t.createdOptions[r.value]=a:t.createdOptions.push(a)}else if(e.multiple)t.createdOptions.length=r.value;else{const e=a.value;t.createdOptions.length=0,e&&e.created&&t.createdOptions.push(e)}},removeNewOption:function(i){if(!o.value||!i||!i.created||i.created&&e.reserveKeyword&&t.inputValue===n(i))return;const a=t.createdOptions.findIndex((e=>s(e)===s(i)));~a&&(t.createdOptions.splice(a,1),r.value--)},selectNewOption:function(t){o.value&&(e.multiple&&t.created?r.value++:a.value=t)},clearAllNewOption:function(){o.value&&(t.createdOptions.length=0,r.value=0)}}}const y7=(e,t)=>{const{t:i}=CU(),n=KF("select"),s=KF("input"),{form:r,formItem:a}=Kj(),{inputId:o}=qj(e,{formItemContext:a}),{aliasProps:l,getLabel:A,getValue:c,getDisabled:u,getOptions:h}=I5(e),{valueOnClear:d,isEmptyValue:g}=xU(e),p=Lh({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),f=zh(-1),m=zh(),C=zh(),I=zh(),v=zh(),B=zh(),y=zh(),b=zh(),E=zh(),w=zh(),Q=zh(),_=zh(),{isComposing:S,handleCompositionStart:x,handleCompositionEnd:k,handleCompositionUpdate:D}=Jj({afterComposition:e=>Me(e)}),{wrapperRef:F,isFocused:T,handleBlur:M}=jj(B,{beforeFocus:()=>U.value,afterFocus(){e.automaticDropdown&&!L.value&&(L.value=!0,p.menuVisibleOnFocus=!0)},beforeBlur(e){var t,i;return(null==(t=I.value)?void 0:t.isFocusInsideContent(e))||(null==(i=v.value)?void 0:i.isFocusInsideContent(e))},afterBlur(){L.value=!1,p.menuVisibleOnFocus=!1}}),R=zh([]),N=zh([]),L=zh(!1),U=qf((()=>e.disabled||(null==r?void 0:r.disabled))),H=qf((()=>{var e;return null!=(e=null==r?void 0:r.statusIcon)&&e})),P=qf((()=>{const t=N.value.length*e.itemHeight;return t>e.height?e.height:t})),O=qf((()=>e.multiple?Lc(e.modelValue)&&e.modelValue.length>0:!g(e.modelValue))),G=qf((()=>e.clearable&&!U.value&&p.inputHovering&&O.value)),K=qf((()=>e.remote&&e.filterable?"":QH)),q=qf((()=>K.value&&n.is("reverse",L.value))),Y=qf((()=>(null==a?void 0:a.validateState)||"")),V=qf((()=>{if(Y.value)return vj[Y.value]})),W=qf((()=>e.remote?300:0)),j=qf((()=>e.loading?e.loadingText||i("el.select.loading"):!(e.remote&&!p.inputValue&&0===R.value.length)&&(e.filterable&&p.inputValue&&R.value.length>0&&0===N.value.length?e.noMatchText||i("el.select.noMatch"):0===R.value.length?e.noDataText||i("el.select.noData"):null))),J=t=>{const i=i=>{if(e.filterable&&Oc(e.filterMethod))return!0;if(e.filterable&&e.remote&&Oc(e.remoteMethod))return!0;const n=new RegExp(k0(t),"i");return!t||n.test(A(i)||"")};return e.loading?[]:[...p.createdOptions,...e.options].reduce(((t,n)=>{const s=h(n);if(Lc(s)){const e=s.filter(i);e.length>0&&t.push({label:A(n),type:"Group"},...e)}else(e.remote||i(n))&&t.push(n);return t}),[])},z=()=>{R.value=J(""),N.value=J(p.inputValue)},X=qf((()=>{const e=new Map;return R.value.forEach(((t,i)=>{e.set(Ee(c(t)),{option:t,index:i})})),e})),$=qf((()=>{const e=new Map;return N.value.forEach(((t,i)=>{e.set(Ee(c(t)),{option:t,index:i})})),e})),Z=qf((()=>N.value.every((e=>u(e))))),ee=Vj(),te=qf((()=>"small"===ee.value?"small":"default")),ie=()=>{var e;f.value=(null==(e=m.value)?void 0:e.offsetWidth)||200},ne=qf((()=>{const t=(()=>{if(!C.value)return 0;const e=window.getComputedStyle(C.value);return Number.parseFloat(e.gap||"6px")})();return{maxWidth:`${_.value&&1===e.maxCollapseTags?p.selectionWidth-p.collapseItemWidth-t:p.selectionWidth}px`}})),se=qf((()=>({maxWidth:`${p.selectionWidth}px`}))),re=qf((()=>({width:`${Math.max(p.calculatorWidth,11)}px`}))),ae=qf((()=>Lc(e.modelValue)?0===e.modelValue.length&&!p.inputValue:!e.filterable||!p.inputValue)),oe=qf((()=>{var t;const n=null!=(t=e.placeholder)?t:i("el.select.placeholder");return e.multiple||!O.value?n:p.selectedLabel})),le=qf((()=>{var e,t;return null==(t=null==(e=I.value)?void 0:e.popperRef)?void 0:t.contentRef})),Ae=qf((()=>{if(e.multiple){const t=e.modelValue.length;if(e.modelValue.length>0&&$.value.has(e.modelValue[t-1])){const{index:i}=$.value.get(e.modelValue[t-1]);return i}}else if(e.modelValue&&$.value.has(e.modelValue)){const{index:t}=$.value.get(e.modelValue);return t}return-1})),ce=qf({get:()=>L.value&&!1!==j.value,set(e){L.value=e}}),ue=qf((()=>e.multiple?e.collapseTags?p.cachedOptions.slice(0,e.maxCollapseTags):p.cachedOptions:[])),he=qf((()=>e.multiple&&e.collapseTags?p.cachedOptions.slice(e.maxCollapseTags):[])),{createNewOption:de,removeNewOption:ge,selectNewOption:pe,clearAllNewOption:fe}=B7(e,p),me=()=>{U.value||(p.menuVisibleOnFocus?p.menuVisibleOnFocus=!1:L.value=!L.value)},Ce=()=>{p.inputValue.length>0&&!L.value&&(L.value=!0),de(p.inputValue),ve(p.inputValue)},Ie=RN(Ce,W.value),ve=t=>{p.previousQuery===t||S.value||(p.previousQuery=t,e.filterable&&Oc(e.filterMethod)?e.filterMethod(t):e.filterable&&e.remote&&Oc(e.remoteMethod)&&e.remoteMethod(t),e.defaultFirstOption&&(e.filterable||e.remote)&&N.value.length?Qd(Be):Qd(Te))},Be=()=>{const e=N.value.filter((e=>!e.disabled&&"Group"!==e.type)),t=e.find((e=>e.created)),i=e[0];p.hoveringIndex=be(N.value,t||i)},ye=i=>{t(UU,i),(i=>{WN(e.modelValue,i)||t(HU,i)})(i),p.previousValue=e.multiple?String(i):i},be=(t=[],i)=>{if(!qc(i))return t.indexOf(i);const n=e.valueKey;let s=-1;return t.some(((e,t)=>$M(e,n)===$M(i,n)&&(s=t,!0))),s},Ee=t=>qc(t)?$M(t,e.valueKey):t,we=()=>{ie()},Qe=()=>{p.selectionWidth=C.value.getBoundingClientRect().width},_e=()=>{p.calculatorWidth=y.value.getBoundingClientRect().width},Se=()=>{var e,t;null==(t=null==(e=I.value)?void 0:e.updatePopper)||t.call(e)},xe=()=>{var e,t;null==(t=null==(e=v.value)?void 0:e.updatePopper)||t.call(e)},ke=t=>{if(e.multiple){let i=e.modelValue.slice();const n=be(i,c(t));n>-1?(i=[...i.slice(0,n),...i.slice(n+1)],p.cachedOptions.splice(n,1),ge(t)):(e.multipleLimit<=0||i.length<e.multipleLimit)&&(i=[...i,c(t)],p.cachedOptions.push(t),pe(t)),ye(i),t.created&&ve(""),e.filterable&&!e.reserveKeyword&&(p.inputValue="")}else p.selectedLabel=A(t),ye(c(t)),L.value=!1,pe(t),t.created||fe();De()},De=()=>{var e;null==(e=B.value)||e.focus()},Fe=(e,t=void 0)=>{const i=N.value;if(!["forward","backward"].includes(e)||U.value||i.length<=0||Z.value||S.value)return;if(!L.value)return me();void 0===t&&(t=p.hoveringIndex);let n=-1;"forward"===e?(n=t+1,n>=i.length&&(n=0)):"backward"===e&&(n=t-1,(n<0||n>=i.length)&&(n=i.length-1));const s=i[n];if(u(s)||"Group"===s.type)return Fe(e,n);p.hoveringIndex=n,Re(n)},Te=()=>{e.multiple?p.hoveringIndex=N.value.findIndex((t=>e.modelValue.some((e=>Ee(e)===Ee(t))))):p.hoveringIndex=N.value.findIndex((t=>Ee(t)===Ee(e.modelValue)))},Me=t=>{if(p.inputValue=t.target.value,!e.remote)return Ce();Ie()},Re=e=>{w.value.scrollToItem(e)},Ne=(e,t)=>{const i=Ee(e);if(X.value.has(i)){const{option:e}=X.value.get(i);return e}if(t&&t.length){const e=t.find((e=>Ee(c(e))===i));if(e)return e}return{[l.value.value]:e,[l.value.label]:e}},Le=(t=!1)=>{if(e.multiple)if(e.modelValue.length>0){const t=p.cachedOptions.slice();p.cachedOptions.length=0,p.previousValue=e.modelValue.toString();for(const i of e.modelValue){const e=Ne(i,t);p.cachedOptions.push(e)}}else p.cachedOptions=[],p.previousValue=void 0;else if(O.value){p.previousValue=e.modelValue;const i=N.value,n=i.findIndex((t=>Ee(c(t))===Ee(e.modelValue)));~n?p.selectedLabel=A(i[n]):p.selectedLabel&&!t||(p.selectedLabel=Ee(e.modelValue))}else p.selectedLabel="",p.previousValue=void 0;fe(),ie()};return Pp(L,(e=>{e?ve(""):(p.inputValue="",p.previousQuery=null,p.isBeforeHide=!0,de("")),t("visible-change",e)})),Pp((()=>e.modelValue),((t,i)=>{var n;(!t||Lc(t)&&0===t.length||e.multiple&&!WN(t.toString(),p.previousValue)||!e.multiple&&Ee(t)!==Ee(p.previousValue))&&Le(!0),!WN(t,i)&&e.validateEvent&&(null==(n=null==a?void 0:a.validate)||n.call(a,"change").catch((e=>{})))}),{deep:!0}),Pp((()=>e.options),(()=>{const e=B.value;(!e||e&&document.activeElement!==e)&&Le()}),{deep:!0,flush:"post"}),Pp((()=>N.value),(()=>w.value&&Qd(w.value.resetScrollTop))),Hp((()=>{p.isBeforeHide||z()})),Hp((()=>{const{valueKey:t,options:i}=e,n=new Map;for(const e of i){const i=c(e);let s=i;if(qc(s)&&(s=$M(i,t)),n.get(s))break;n.set(s,!0)}})),Eg((()=>{Le()})),WL(m,we),WL(C,Qe),WL(y,_e),WL(w,Se),WL(F,Se),WL(Q,xe),WL(_,(()=>{p.collapseItemWidth=_.value.getBoundingClientRect().width})),{inputId:o,collapseTagSize:te,currentPlaceholder:oe,expanded:L,emptyText:j,popupHeight:P,debounce:W,allOptions:R,filteredOptions:N,iconComponent:K,iconReverse:q,tagStyle:ne,collapseTagStyle:se,inputStyle:re,popperSize:f,dropdownMenuVisible:ce,hasModelValue:O,shouldShowPlaceholder:ae,selectDisabled:U,selectSize:ee,needStatusIcon:H,showClearBtn:G,states:p,isFocused:T,nsSelect:n,nsInput:s,calculatorRef:y,inputRef:B,menuRef:w,tagMenuRef:Q,tooltipRef:I,tagTooltipRef:v,selectRef:m,wrapperRef:F,selectionRef:C,prefixRef:b,suffixRef:E,collapseItemRef:_,popperRef:le,validateState:Y,validateIcon:V,showTagList:ue,collapseTagList:he,debouncedOnInputChange:Ie,deleteTag:(i,n)=>{let s=e.modelValue.slice();const r=be(s,c(n));r>-1&&!U.value&&(s=[...e.modelValue.slice(0,r),...e.modelValue.slice(r+1)],p.cachedOptions.splice(r,1),ye(s),t("remove-tag",c(n)),ge(n)),i.stopPropagation(),De()},getLabel:A,getValue:c,getDisabled:u,getValueKey:Ee,handleClear:()=>{let i;i=Lc(e.modelValue)?[]:d.value,e.multiple?p.cachedOptions=[]:p.selectedLabel="",L.value=!1,ye(i),t("clear"),fe(),De()},handleClickOutside:e=>{if(L.value=!1,T.value){const t=new FocusEvent("focus",e);M(t)}},handleDel:i=>{if(e.multiple&&(i.code!==zJ.delete&&0===p.inputValue.length)){i.preventDefault();const n=e.modelValue.slice(),s=ON(n,(e=>!p.cachedOptions.some((t=>c(t)===e&&u(t)))));if(s<0)return;const r=n[s];n.splice(s,1);const a=p.cachedOptions[s];p.cachedOptions.splice(s,1),ge(a),ye(n),t("remove-tag",r)}},handleEsc:()=>{p.inputValue.length>0?p.inputValue="":L.value=!1},focus:De,blur:()=>{var e;if(L.value)return L.value=!1,void Qd((()=>{var e;return null==(e=B.value)?void 0:e.blur()}));null==(e=B.value)||e.blur()},handleMenuEnter:()=>(p.isBeforeHide=!1,Qd((()=>{~Ae.value&&Re(p.hoveringIndex)}))),handleResize:we,resetSelectionWidth:Qe,resetCalculatorWidth:_e,updateTooltip:Se,updateTagTooltip:xe,updateOptions:z,toggleMenu:me,scrollTo:Re,onInput:Me,onKeyboardNavigate:Fe,onKeyboardSelect:()=>{if(!L.value)return me();~p.hoveringIndex&&N.value[p.hoveringIndex]&&ke(N.value[p.hoveringIndex])},onSelect:ke,onHover:e=>{p.hoveringIndex=null!=e?e:-1},handleCompositionStart:x,handleCompositionEnd:k,handleCompositionUpdate:D}},b7=hg({name:"ElSelectV2",components:{ElSelectMenu:v7,ElTag:W0,ElTooltip:XX,ElIcon:gH},directives:{ClickOutside:$0},props:v5,emits:y5,setup(e,{emit:t}){const i=qf((()=>{const{modelValue:t,multiple:i}=e,n=i?[]:void 0;return Lc(t)?i?t:n:i?n:t})),n=y7(Lh({...rd(e),modelValue:i}),t);gp(E5,{props:Lh({...rd(e),height:n.popupHeight,modelValue:i}),expanded:n.expanded,tooltipRef:n.tooltipRef,onSelect:n.onSelect,onHover:n.onHover,onKeyboardNavigate:n.onKeyboardNavigate,onKeyboardSelect:n.onKeyboardSelect});const s=qf((()=>e.multiple?n.states.cachedOptions.map((e=>e.label)):n.states.selectedLabel));return{...n,modelValue:i,selectedLabel:s}}});const E7=lH(KU(b7,[["render",function(e,t,i,n,s,r){const a=Mg("el-tag"),o=Mg("el-tooltip"),l=Mg("el-icon"),A=Mg("el-select-menu"),c=Lg("click-outside");return Ld((af(),cf("div",{ref:"selectRef",class:pu([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t=>e.states.inputHovering=!0,onMouseleave:t=>e.states.inputHovering=!1},[mf(o,{ref:"tooltipRef",visible:e.dropdownMenuVisible,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,placement:e.placement,pure:"",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,trigger:"click",persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:t=>e.states.isBeforeHide=!1},{default:Nd((()=>[ff("div",{ref:"wrapperRef",class:pu([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:AC(e.toggleMenu,["prevent"])},[e.$slots.prefix?(af(),cf("div",{key:0,ref:"prefixRef",class:pu(e.nsSelect.e("prefix"))},[Gg(e.$slots,"prefix")],2)):Bf("v-if",!0),ff("div",{ref:"selectionRef",class:pu([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.modelValue.length)])},[e.multiple?Gg(e.$slots,"tag",{key:0},(()=>[(af(!0),cf(Zp,null,Pg(e.showTagList,(t=>(af(),cf("div",{key:e.getValueKey(e.getValue(t)),class:pu(e.nsSelect.e("selected-item"))},[mf(a,{closable:!e.selectDisabled&&!e.getDisabled(t),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:cu(e.tagStyle),onClose:i=>e.deleteTag(i,t)},{default:Nd((()=>[ff("span",{class:pu(e.nsSelect.e("tags-text"))},[Gg(e.$slots,"label",{label:e.getLabel(t),value:e.getValue(t)},(()=>[vf(yu(e.getLabel(t)),1)]))],2)])),_:2},1032,["closable","size","type","effect","style","onClose"])],2)))),128)),e.collapseTags&&e.modelValue.length>e.maxCollapseTags?(af(),uf(o,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:Nd((()=>[ff("div",{ref:"collapseItemRef",class:pu(e.nsSelect.e("selected-item"))},[mf(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,style:cu(e.collapseTagStyle),"disable-transitions":""},{default:Nd((()=>[ff("span",{class:pu(e.nsSelect.e("tags-text"))}," + "+yu(e.modelValue.length-e.maxCollapseTags),3)])),_:1},8,["size","type","effect","style"])],2)])),content:Nd((()=>[ff("div",{ref:"tagMenuRef",class:pu(e.nsSelect.e("selection"))},[(af(!0),cf(Zp,null,Pg(e.collapseTagList,(t=>(af(),cf("div",{key:e.getValueKey(e.getValue(t)),class:pu(e.nsSelect.e("selected-item"))},[mf(a,{class:"in-tooltip",closable:!e.selectDisabled&&!e.getDisabled(t),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:i=>e.deleteTag(i,t)},{default:Nd((()=>[ff("span",{class:pu(e.nsSelect.e("tags-text"))},[Gg(e.$slots,"label",{label:e.getLabel(t),value:e.getValue(t)},(()=>[vf(yu(e.getLabel(t)),1)]))],2)])),_:2},1032,["closable","size","type","effect","onClose"])],2)))),128))],2)])),_:3},8,["disabled","effect","teleported"])):Bf("v-if",!0)])):Bf("v-if",!0),ff("div",{class:pu([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[Ld(ff("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t=>e.states.inputValue=t,style:cu(e.inputStyle),autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-autocomplete":"list","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":e.expanded,"aria-label":e.ariaLabel,class:pu([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,role:"combobox",readonly:!e.filterable,spellcheck:"false",type:"text",name:e.name,onInput:e.onInput,onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onKeydown:[uC(AC((t=>e.onKeyboardNavigate("backward")),["stop","prevent"]),["up"]),uC(AC((t=>e.onKeyboardNavigate("forward")),["stop","prevent"]),["down"]),uC(AC(e.onKeyboardSelect,["stop","prevent"]),["enter"]),uC(AC(e.handleEsc,["stop","prevent"]),["esc"]),uC(AC(e.handleDel,["stop"]),["delete"])],onClick:AC(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","autocomplete","tabindex","aria-expanded","aria-label","disabled","readonly","name","onInput","onCompositionstart","onCompositionupdate","onCompositionend","onKeydown","onClick"]),[[tC,e.states.inputValue]]),e.filterable?(af(),cf("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:pu(e.nsSelect.e("input-calculator")),textContent:yu(e.states.inputValue)},null,10,["textContent"])):Bf("v-if",!0)],2),e.shouldShowPlaceholder?(af(),cf("div",{key:1,class:pu([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?Gg(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},(()=>[ff("span",null,yu(e.currentPlaceholder),1)])):(af(),cf("span",{key:1},yu(e.currentPlaceholder),1))],2)):Bf("v-if",!0)],2),ff("div",{ref:"suffixRef",class:pu(e.nsSelect.e("suffix"))},[e.iconComponent?Ld((af(),uf(l,{key:0,class:pu([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.iconReverse])},{default:Nd((()=>[(af(),uf(Ng(e.iconComponent)))])),_:1},8,["class"])),[[ym,!e.showClearBtn]]):Bf("v-if",!0),e.showClearBtn&&e.clearIcon?(af(),uf(l,{key:1,class:pu([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.nsSelect.e("clear")]),onClick:AC(e.handleClear,["prevent","stop"])},{default:Nd((()=>[(af(),uf(Ng(e.clearIcon)))])),_:1},8,["class","onClick"])):Bf("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(af(),uf(l,{key:2,class:pu([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:Nd((()=>[(af(),uf(Ng(e.validateIcon)))])),_:1},8,["class"])):Bf("v-if",!0)],2)],10,["onClick"])])),content:Nd((()=>[mf(A,{ref:"menuRef",data:e.filteredOptions,width:e.popperSize,"hovering-index":e.states.hoveringIndex,"scrollbar-always-on":e.scrollbarAlwaysOn},Og({default:Nd((t=>[Gg(e.$slots,"default",fu(Cf(t)))])),_:2},[e.$slots.header?{name:"header",fn:Nd((()=>[ff("div",{class:pu(e.nsSelect.be("dropdown","header"))},[Gg(e.$slots,"header")],2)]))}:void 0,e.$slots.loading&&e.loading?{name:"loading",fn:Nd((()=>[ff("div",{class:pu(e.nsSelect.be("dropdown","loading"))},[Gg(e.$slots,"loading")],2)]))}:e.loading||0===e.filteredOptions.length?{name:"empty",fn:Nd((()=>[ff("div",{class:pu(e.nsSelect.be("dropdown","empty"))},[Gg(e.$slots,"empty",{},(()=>[ff("span",null,yu(e.emptyText),1)]))],2)]))}:void 0,e.$slots.footer?{name:"footer",fn:Nd((()=>[ff("div",{class:pu(e.nsSelect.be("dropdown","footer"))},[Gg(e.$slots,"footer")],2)]))}:void 0]),1032,["data","width","hovering-index","scrollbar-always-on"])])),_:3},8,["visible","teleported","popper-class","popper-options","fallback-placements","effect","placement","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],42,["onMouseenter","onMouseleave"])),[[c,e.handleClickOutside,e.popperRef]])}],["__file","select.vue"]])),w7=BU({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:[Number,Object]}}),Q7=BU({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}});var _7=KU(hg({...hg({name:"ElSkeletonItem"}),props:Q7,setup(e){const t=KF("skeleton");return(e,i)=>(af(),cf("div",{class:pu([ed(t).e("item"),ed(t).e(e.variant)])},["image"===e.variant?(af(),uf(ed(EV),{key:0})):Bf("v-if",!0)],2))}}),[["__file","skeleton-item.vue"]]);const S7=hg({...hg({name:"ElSkeleton"}),props:w7,setup(e,{expose:t}){const i=e,n=KF("skeleton"),s=((e,t=0)=>{if(0===t)return e;const i=zh(qc(t)&&Boolean(t.initVal));let n=null;const s=t=>{oL(t)?i.value=e.value:(n&&clearTimeout(n),n=setTimeout((()=>{i.value=e.value}),t))},r=e=>{"leading"===e?AL(t)?s(t):s(t.leading):qc(t)?s(t.trailing):i.value=!1};return Eg((()=>r("leading"))),Pp((()=>e.value),(e=>{r(e?"leading":"trailing")})),i})(ld(i,"loading"),i.throttle);return t({uiLoading:s}),(e,t)=>ed(s)?(af(),cf("div",wf({key:0,class:[ed(n).b(),ed(n).is("animated",e.animated)]},e.$attrs),[(af(!0),cf(Zp,null,Pg(e.count,(t=>(af(),cf(Zp,{key:t},[ed(s)?Gg(e.$slots,"template",{key:t},(()=>[mf(_7,{class:pu(ed(n).is("first")),variant:"p"},null,8,["class"]),(af(!0),cf(Zp,null,Pg(e.rows,(t=>(af(),uf(_7,{key:t,class:pu([ed(n).e("paragraph"),ed(n).is("last",t===e.rows&&e.rows>1)]),variant:"p"},null,8,["class"])))),128))])):Bf("v-if",!0)],64)))),128))],16)):Gg(e.$slots,"default",fu(wf({key:1},e.$attrs)))}});const x7=lH(KU(S7,[["__file","skeleton.vue"]]),{SkeletonItem:_7}),k7=cH(_7),D7=Symbol("sliderContextKey"),F7=BU({modelValue:{type:[Number,Array],default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:bU,inputSize:bU,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:Function,default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:Function,default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:hz,default:"top"},marks:{type:Object},validateEvent:{type:Boolean,default:!0},...Dj(["ariaLabel"])}),T7=e=>AL(e)||Lc(e)&&e.every(AL),M7={[UU]:T7,[PU]:T7,[HU]:T7},R7=BU({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:hz,default:"top"}}),N7={[UU]:e=>AL(e)},L7=(e,t,i)=>{const{disabled:n,min:s,max:r,step:a,showTooltip:o,precision:l,sliderSize:A,formatTooltip:c,emitChange:u,resetSize:h,updateDragging:d}=pp(D7),{tooltip:g,tooltipVisible:p,formatValue:f,displayTooltip:m,hideTooltip:C}=((e,t,i)=>{const n=zh(),s=zh(!1),r=qf((()=>t.value instanceof Function)),a=qf((()=>r.value&&t.value(e.modelValue)||e.modelValue)),o=RN((()=>{i.value&&(s.value=!0)}),50),l=RN((()=>{i.value&&(s.value=!1)}),50);return{tooltip:n,tooltipVisible:s,formatValue:a,displayTooltip:o,hideTooltip:l}})(e,c,o),I=zh(),v=qf((()=>(e.modelValue-s.value)/(r.value-s.value)*100+"%")),B=qf((()=>e.vertical?{bottom:v.value}:{left:v.value})),y=e=>{n.value||(e.preventDefault(),w(e),window.addEventListener("mousemove",Q),window.addEventListener("touchmove",Q),window.addEventListener("mouseup",_),window.addEventListener("touchend",_),window.addEventListener("contextmenu",_),I.value.focus())},b=e=>{n.value||(t.newPosition=Number.parseFloat(v.value)+e/(r.value-s.value)*100,S(t.newPosition),u())},E=e=>{let t,i;return e.type.startsWith("touch")?(i=e.touches[0].clientY,t=e.touches[0].clientX):(i=e.clientY,t=e.clientX),{clientX:t,clientY:i}},w=i=>{t.dragging=!0,t.isClick=!0;const{clientX:n,clientY:s}=E(i);e.vertical?t.startY=s:t.startX=n,t.startPosition=Number.parseFloat(v.value),t.newPosition=t.startPosition},Q=i=>{if(t.dragging){let n;t.isClick=!1,m(),h();const{clientX:s,clientY:r}=E(i);e.vertical?(t.currentY=r,n=(t.startY-t.currentY)/A.value*100):(t.currentX=s,n=(t.currentX-t.startX)/A.value*100),t.newPosition=t.startPosition+n,S(t.newPosition)}},_=()=>{t.dragging&&(setTimeout((()=>{t.dragging=!1,t.hovering||C(),t.isClick||S(t.newPosition),u()}),0),window.removeEventListener("mousemove",Q),window.removeEventListener("touchmove",Q),window.removeEventListener("mouseup",_),window.removeEventListener("touchend",_),window.removeEventListener("contextmenu",_))},S=async n=>{if(null===n||Number.isNaN(+n))return;n<0?n=0:n>100&&(n=100);const o=100/((r.value-s.value)/a.value);let A=Math.round(n/o)*o*(r.value-s.value)*.01+s.value;A=Number.parseFloat(A.toFixed(l.value)),A!==e.modelValue&&i(UU,A),t.dragging||e.modelValue===t.oldValue||(t.oldValue=e.modelValue),await Qd(),t.dragging&&m(),g.value.updatePopper()};return Pp((()=>t.dragging),(e=>{d(e)})),UL(I,"touchstart",y,{passive:!1}),{disabled:n,button:I,tooltip:g,tooltipVisible:p,showTooltip:o,wrapperStyle:B,formatValue:f,handleMouseEnter:()=>{t.hovering=!0,m()},handleMouseLeave:()=>{t.hovering=!1,t.dragging||C()},onButtonDown:y,onKeyDown:e=>{let t=!0;switch(e.code){case zJ.left:case zJ.down:b(-a.value);break;case zJ.right:case zJ.up:b(a.value);break;case zJ.home:n.value||(S(0),u());break;case zJ.end:n.value||(S(100),u());break;case zJ.pageDown:b(4*-a.value);break;case zJ.pageUp:b(4*a.value);break;default:t=!1}t&&e.preventDefault()},setPosition:S}},U7=hg({...hg({name:"ElSliderButton"}),props:R7,emits:N7,setup(e,{expose:t,emit:i}){const n=e,s=KF("slider"),r=Lh({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:n.modelValue}),{disabled:a,button:o,tooltip:l,showTooltip:A,tooltipVisible:c,wrapperStyle:u,formatValue:h,handleMouseEnter:d,handleMouseLeave:g,onButtonDown:p,onKeyDown:f,setPosition:m}=L7(n,r,i),{hovering:C,dragging:I}=rd(r);return t({onButtonDown:p,onKeyDown:f,setPosition:m,hovering:C,dragging:I}),(e,t)=>(af(),cf("div",{ref_key:"button",ref:o,class:pu([ed(s).e("button-wrapper"),{hover:ed(C),dragging:ed(I)}]),style:cu(ed(u)),tabindex:ed(a)?-1:0,onMouseenter:ed(d),onMouseleave:ed(g),onMousedown:ed(p),onFocus:ed(d),onBlur:ed(g),onKeydown:ed(f)},[mf(ed(XX),{ref_key:"tooltip",ref:l,visible:ed(c),placement:e.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":e.tooltipClass,disabled:!ed(A),persistent:ed(A)},{content:Nd((()=>[ff("span",null,yu(ed(h)),1)])),default:Nd((()=>[ff("div",{class:pu([ed(s).e("button"),{hover:ed(C),dragging:ed(I)}])},null,2)])),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var H7=KU(U7,[["__file","button.vue"]]);var P7=hg({name:"ElSliderMarker",props:BU({mark:{type:[String,Object],default:void 0}}),setup(e){const t=KF("slider"),i=qf((()=>Gc(e.mark)?e.mark:e.mark.label)),n=qf((()=>Gc(e.mark)?void 0:e.mark.style));return()=>Yf("div",{class:t.e("marks-text"),style:n.value},i.value)}});const O7=(e,t,i)=>{const{form:n,formItem:s}=Kj(),r=Xh(),a=zh(),o=zh(),l={firstButton:a,secondButton:o},A=qf((()=>e.disabled||(null==n?void 0:n.disabled)||!1)),c=qf((()=>Math.min(t.firstValue,t.secondValue))),u=qf((()=>Math.max(t.firstValue,t.secondValue))),h=qf((()=>e.range?100*(u.value-c.value)/(e.max-e.min)+"%":100*(t.firstValue-e.min)/(e.max-e.min)+"%")),d=qf((()=>e.range?100*(c.value-e.min)/(e.max-e.min)+"%":"0%")),g=qf((()=>e.vertical?{height:e.height}:{})),p=qf((()=>e.vertical?{height:h.value,bottom:d.value}:{width:h.value,left:d.value})),f=()=>{r.value&&(t.sliderSize=r.value["client"+(e.vertical?"Height":"Width")])},m=i=>{const n=(i=>{const n=e.min+i*(e.max-e.min)/100;if(!e.range)return a;let s;return s=Math.abs(c.value-n)<Math.abs(u.value-n)?t.firstValue<t.secondValue?"firstButton":"secondButton":t.firstValue>t.secondValue?"firstButton":"secondButton",l[s]})(i);return n.value.setPosition(i),n},C=e=>{i(UU,e),i(PU,e)},I=async()=>{await Qd(),i(HU,e.range?[c.value,u.value]:e.modelValue)},v=i=>{var n,s,a,o,l,c;if(A.value||t.dragging)return;f();let u=0;if(e.vertical){const e=null!=(a=null==(s=null==(n=i.touches)?void 0:n.item(0))?void 0:s.clientY)?a:i.clientY;u=(r.value.getBoundingClientRect().bottom-e)/t.sliderSize*100}else{u=((null!=(c=null==(l=null==(o=i.touches)?void 0:o.item(0))?void 0:l.clientX)?c:i.clientX)-r.value.getBoundingClientRect().left)/t.sliderSize*100}return u<0||u>100?void 0:m(u)};return{elFormItem:s,slider:r,firstButton:a,secondButton:o,sliderDisabled:A,minValue:c,maxValue:u,runwayStyle:g,barStyle:p,resetSize:f,setPosition:m,emitChange:I,onSliderWrapperPrevent:e=>{var t,i;((null==(t=l.firstButton.value)?void 0:t.dragging)||(null==(i=l.secondButton.value)?void 0:i.dragging))&&e.preventDefault()},onSliderClick:e=>{v(e)&&I()},onSliderDown:async e=>{const t=v(e);t&&(await Qd(),t.value.onButtonDown(e))},onSliderMarkerDown:e=>{A.value||t.dragging||m(e)},setFirstValue:i=>{t.firstValue=null!=i?i:e.min,C(e.range?[c.value,u.value]:null!=i?i:e.min)},setSecondValue:i=>{t.secondValue=i,e.range&&C([c.value,u.value])}}},G7=hg({...hg({name:"ElSlider"}),props:F7,emits:M7,setup(e,{expose:t,emit:i}){const n=e,s=KF("slider"),{t:r}=CU(),a=Lh({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:o,slider:l,firstButton:A,secondButton:c,sliderDisabled:u,minValue:h,maxValue:d,runwayStyle:g,barStyle:p,resetSize:f,emitChange:m,onSliderWrapperPrevent:C,onSliderClick:I,onSliderDown:v,onSliderMarkerDown:B,setFirstValue:y,setSecondValue:b}=O7(n,a,i),{stops:E,getStopStyle:w}=((e,t,i,n)=>({stops:qf((()=>{if(!e.showStops||e.min>e.max)return[];if(0===e.step)return[];const s=(e.max-e.min)/e.step,r=100*e.step/(e.max-e.min),a=Array.from({length:s-1}).map(((e,t)=>(t+1)*r));return e.range?a.filter((t=>t<100*(i.value-e.min)/(e.max-e.min)||t>100*(n.value-e.min)/(e.max-e.min))):a.filter((i=>i>100*(t.firstValue-e.min)/(e.max-e.min)))})),getStopStyle:t=>e.vertical?{bottom:`${t}%`}:{left:`${t}%`}}))(n,a,h,d),{inputId:Q,isLabeledByFormItem:_}=qj(n,{formItemContext:o}),S=Vj(),x=qf((()=>n.inputSize||S.value)),k=qf((()=>n.ariaLabel||r("el.slider.defaultLabel",{min:n.min,max:n.max}))),D=qf((()=>n.range?n.rangeStartLabel||r("el.slider.defaultRangeStartLabel"):k.value)),F=qf((()=>n.formatValueText?n.formatValueText(H.value):`${H.value}`)),T=qf((()=>n.rangeEndLabel||r("el.slider.defaultRangeEndLabel"))),M=qf((()=>n.formatValueText?n.formatValueText(P.value):`${P.value}`)),R=qf((()=>[s.b(),s.m(S.value),s.is("vertical",n.vertical),{[s.m("with-input")]:n.showInput}])),N=(e=>qf((()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort(((e,t)=>e-t)).filter((t=>t<=e.max&&t>=e.min)).map((t=>({point:t,position:100*(t-e.min)/(e.max-e.min),mark:e.marks[t]}))):[])))(n);((e,t,i,n,s,r)=>{const a=e=>{s(UU,e),s(PU,e)},o=()=>e.range?![i.value,n.value].every(((e,i)=>e===t.oldValue[i])):e.modelValue!==t.oldValue,l=()=>{var i,n;e.min>e.max&&lU("Slider","min should not be greater than max.");const s=e.modelValue;e.range&&Lc(s)?s[1]<e.min?a([e.min,e.min]):s[0]>e.max?a([e.max,e.max]):s[0]<e.min?a([e.min,s[1]]):s[1]>e.max?a([s[0],e.max]):(t.firstValue=s[0],t.secondValue=s[1],o()&&(e.validateEvent&&(null==(i=null==r?void 0:r.validate)||i.call(r,"change").catch((e=>{}))),t.oldValue=s.slice())):e.range||!AL(s)||Number.isNaN(s)||(s<e.min?a(e.min):s>e.max?a(e.max):(t.firstValue=s,o()&&(e.validateEvent&&(null==(n=null==r?void 0:r.validate)||n.call(r,"change").catch((e=>{}))),t.oldValue=s)))};l(),Pp((()=>t.dragging),(e=>{e||l()})),Pp((()=>e.modelValue),((e,i)=>{t.dragging||Lc(e)&&Lc(i)&&e.every(((e,t)=>e===i[t]))&&t.firstValue===e[0]&&t.secondValue===e[1]||l()}),{deep:!0}),Pp((()=>[e.min,e.max]),(()=>{l()}))})(n,a,h,d,i,o);const L=qf((()=>{const e=[n.min,n.max,n.step].map((e=>{const t=`${e}`.split(".")[1];return t?t.length:0}));return Math.max.apply(null,e)})),{sliderWrapper:U}=((e,t,i)=>{const n=zh();return Eg((async()=>{e.range?(Lc(e.modelValue)?(t.firstValue=Math.max(e.min,e.modelValue[0]),t.secondValue=Math.min(e.max,e.modelValue[1])):(t.firstValue=e.min,t.secondValue=e.max),t.oldValue=[t.firstValue,t.secondValue]):(!AL(e.modelValue)||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),UL(window,"resize",i),await Qd(),i()})),{sliderWrapper:n}})(n,a,f),{firstValue:H,secondValue:P,sliderSize:O}=rd(a);return UL(U,"touchstart",C,{passive:!1}),UL(U,"touchmove",C,{passive:!1}),gp(D7,{...rd(n),sliderSize:O,disabled:u,precision:L,emitChange:m,resetSize:f,updateDragging:e=>{a.dragging=e}}),t({onSliderClick:I}),(e,t)=>{var i,n;return af(),cf("div",{id:e.range?ed(Q):void 0,ref_key:"sliderWrapper",ref:U,class:pu(ed(R)),role:e.range?"group":void 0,"aria-label":e.range&&!ed(_)?ed(k):void 0,"aria-labelledby":e.range&&ed(_)?null==(i=ed(o))?void 0:i.labelId:void 0},[ff("div",{ref_key:"slider",ref:l,class:pu([ed(s).e("runway"),{"show-input":e.showInput&&!e.range},ed(s).is("disabled",ed(u))]),style:cu(ed(g)),onMousedown:ed(v),onTouchstartPassive:ed(v)},[ff("div",{class:pu(ed(s).e("bar")),style:cu(ed(p))},null,6),mf(H7,{id:e.range?void 0:ed(Q),ref_key:"firstButton",ref:A,"model-value":ed(H),vertical:e.vertical,"tooltip-class":e.tooltipClass,placement:e.placement,role:"slider","aria-label":e.range||!ed(_)?ed(D):void 0,"aria-labelledby":!e.range&&ed(_)?null==(n=ed(o))?void 0:n.labelId:void 0,"aria-valuemin":e.min,"aria-valuemax":e.range?ed(P):e.max,"aria-valuenow":ed(H),"aria-valuetext":ed(F),"aria-orientation":e.vertical?"vertical":"horizontal","aria-disabled":ed(u),"onUpdate:modelValue":ed(y)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),e.range?(af(),uf(H7,{key:0,ref_key:"secondButton",ref:c,"model-value":ed(P),vertical:e.vertical,"tooltip-class":e.tooltipClass,placement:e.placement,role:"slider","aria-label":ed(T),"aria-valuemin":ed(H),"aria-valuemax":e.max,"aria-valuenow":ed(P),"aria-valuetext":ed(M),"aria-orientation":e.vertical?"vertical":"horizontal","aria-disabled":ed(u),"onUpdate:modelValue":ed(b)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):Bf("v-if",!0),e.showStops?(af(),cf("div",{key:1},[(af(!0),cf(Zp,null,Pg(ed(E),((e,t)=>(af(),cf("div",{key:t,class:pu(ed(s).e("stop")),style:cu(ed(w)(e))},null,6)))),128))])):Bf("v-if",!0),ed(N).length>0?(af(),cf(Zp,{key:2},[ff("div",null,[(af(!0),cf(Zp,null,Pg(ed(N),((e,t)=>(af(),cf("div",{key:t,style:cu(ed(w)(e.position)),class:pu([ed(s).e("stop"),ed(s).e("marks-stop")])},null,6)))),128))]),ff("div",{class:pu(ed(s).e("marks"))},[(af(!0),cf(Zp,null,Pg(ed(N),((e,t)=>(af(),uf(ed(P7),{key:t,mark:e.mark,style:cu(ed(w)(e.position)),onMousedown:AC((t=>ed(B)(e.position)),["stop"])},null,8,["mark","style","onMousedown"])))),128))],2)],64)):Bf("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),e.showInput&&!e.range?(af(),uf(ed(I8),{key:0,ref:"input","model-value":ed(H),class:pu(ed(s).e("input")),step:e.step,disabled:ed(u),controls:e.showInputControls,min:e.min,max:e.max,precision:ed(L),debounce:e.debounce,size:ed(x),"onUpdate:modelValue":ed(y),onChange:ed(m)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):Bf("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});const K7=lH(KU(G7,[["__file","slider.vue"]])),q7=hg({name:"ElSpaceItem",props:BU({prefixCls:{type:String}}),setup(e,{slots:t}){const i=KF("space"),n=qf((()=>`${e.prefixCls||i.b()}__item`));return()=>Yf("div",{class:n.value},Gg(t,"default"))}}),Y7={small:8,default:12,large:16};const V7=hg({name:"ElSpace",props:BU({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:[String,Object,Array],default:""},style:{type:[String,Array,Object],default:""},alignment:{type:String,default:"center"},prefixCls:{type:String},spacer:{type:[Object,String,Number,Array],default:null,validator:e=>hf(e)||AL(e)||Gc(e)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:yU,validator:e=>AL(e)||Lc(e)&&2===e.length&&e.every(AL)}}),setup(e,{slots:t}){const{classes:i,containerStyle:n,itemStyle:s}=function(e){const t=KF("space"),i=qf((()=>[t.b(),t.m(e.direction),e.class])),n=zh(0),s=zh(0),r=qf((()=>[e.wrap||e.fill?{flexWrap:"wrap"}:{},{alignItems:e.alignment},{rowGap:`${s.value}px`,columnGap:`${n.value}px`},e.style])),a=qf((()=>e.fill?{flexGrow:1,minWidth:`${e.fillRatio}%`}:{}));return Hp((()=>{const{size:t="small",wrap:i,direction:r,fill:a}=e;if(Lc(t)){const[e=0,i=0]=t;n.value=e,s.value=i}else{let e;e=AL(t)?t:Y7[t||"small"]||Y7.small,(i||a)&&"horizontal"===r?n.value=s.value=e:"horizontal"===r?(n.value=e,s.value=0):(s.value=e,n.value=0)}})),{classes:i,containerStyle:r,itemStyle:a}}(e);function r(t,i="",n=[]){const{prefixCls:a}=e;return t.forEach(((e,t)=>{TZ(e)?Lc(e.children)&&e.children.forEach(((e,t)=>{TZ(e)&&Lc(e.children)?r(e.children,`${i+t}-`,n):n.push(mf(q7,{style:s.value,prefixCls:a,key:`nested-${i+t}`},{default:()=>[e]},FZ.PROPS|FZ.STYLE,["style","prefixCls"]))})):MZ(e)&&n.push(mf(q7,{style:s.value,prefixCls:a,key:`LoopKey${i+t}`},{default:()=>[e]},FZ.PROPS|FZ.STYLE,["style","prefixCls"]))})),n}return()=>{var a;const{spacer:o,direction:l}=e,A=Gg(t,"default",{key:0},(()=>[]));if(0===(null!=(a=A.children)?a:[]).length)return null;if(Lc(A.children)){let e=r(A.children);if(o){const t=e.length-1;e=e.reduce(((e,i,n)=>{const r=[...e,i];return n!==t&&r.push(mf("span",{style:[s.value,"vertical"===l?"width: 100%":null],key:n},[hf(o)?o:vf(o,FZ.TEXT)],FZ.STYLE)),r}),[])}return mf("div",{class:i.value,style:n.value},e,FZ.STYLE|FZ.CLASS)}return A.children}}}),W7=lH(V7),j7=BU({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:[Number,Object],default:0},prefix:String,suffix:String,title:String,valueStyle:{type:[String,Object,Array]}}),J7=hg({...hg({name:"ElStatistic"}),props:j7,setup(e,{expose:t}){const i=e,n=KF("statistic"),s=qf((()=>{const{value:e,formatter:t,precision:n,decimalSeparator:s,groupSeparator:r}=i;if(Oc(t))return t(e);if(!AL(e)||Number.isNaN(e))return e;let[a,o=""]=String(e).split(".");return o=o.padEnd(n,"0").slice(0,n>0?n:0),a=a.replace(/\B(?=(\d{3})+(?!\d))/g,r),[a,o].join(o?s:"")}));return t({displayValue:s}),(e,t)=>(af(),cf("div",{class:pu(ed(n).b())},[e.$slots.title||e.title?(af(),cf("div",{key:0,class:pu(ed(n).e("head"))},[Gg(e.$slots,"title",{},(()=>[vf(yu(e.title),1)]))],2)):Bf("v-if",!0),ff("div",{class:pu(ed(n).e("content"))},[e.$slots.prefix||e.prefix?(af(),cf("div",{key:0,class:pu(ed(n).e("prefix"))},[Gg(e.$slots,"prefix",{},(()=>[ff("span",null,yu(e.prefix),1)]))],2)):Bf("v-if",!0),ff("span",{class:pu(ed(n).e("number")),style:cu(e.valueStyle)},yu(ed(s)),7),e.$slots.suffix||e.suffix?(af(),cf("div",{key:1,class:pu(ed(n).e("suffix"))},[Gg(e.$slots,"suffix",{},(()=>[ff("span",null,yu(e.suffix),1)]))],2)):Bf("v-if",!0)],2)],2))}});const z7=lH(KU(J7,[["__file","statistic.vue"]])),X7=BU({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:[Number,Object],default:0},valueStyle:{type:[String,Object,Array]}}),$7={finish:()=>!0,[HU]:e=>AL(e)},Z7=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],eee=e=>AL(e)?new Date(e).getTime():e.valueOf(),tee=(e,t)=>{let i=e;const n=Z7.reduce(((e,[t,n])=>{const s=new RegExp(`${t}+(?![^\\[\\]]*\\])`,"g");if(s.test(e)){const t=Math.floor(i/n);return i-=t*n,e.replace(s,(e=>String(t).padStart(e.length,"0")))}return e}),t);return n.replace(/\[([^\]]*)]/g,"$1")},iee=hg({...hg({name:"ElCountdown"}),props:X7,emits:$7,setup(e,{expose:t,emit:i}){const n=e;let s;const r=zh(0),a=qf((()=>tee(r.value,n.format))),o=e=>tee(e,n.format),l=()=>{s&&(YU(s),s=void 0)};return Eg((()=>{r.value=eee(n.value)-Date.now(),Pp((()=>[n.value,n.format]),(()=>{l(),(()=>{const e=eee(n.value),t=()=>{let n=e-Date.now();i("change",n),n<=0?(n=0,l(),i("finish")):s=qU(t),r.value=n};s=qU(t)})()}),{immediate:!0})})),_g((()=>{l()})),t({displayValue:a}),(e,t)=>(af(),uf(ed(z7),{value:r.value,title:e.title,prefix:e.prefix,suffix:e.suffix,"value-style":e.valueStyle,formatter:o},Og({_:2},[Pg(e.$slots,((t,i)=>({name:i,fn:Nd((()=>[Gg(e.$slots,i)]))})))]),1032,["value","title","prefix","suffix","value-style"]))}});const nee=lH(KU(iee,[["__file","countdown.vue"]])),see=BU({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),ree={[HU]:(e,t)=>[e,t].every(AL)},aee=hg({...hg({name:"ElSteps"}),props:see,emits:ree,setup(e,{emit:t}){const i=e,n=KF("steps"),{children:s,addChild:r,removeChild:a}=NZ(kf(),"ElStep");return Pp(s,(()=>{s.value.forEach(((e,t)=>{e.setIndex(t)}))})),gp("ElSteps",{props:i,steps:s,addStep:r,removeStep:a}),Pp((()=>i.active),((e,i)=>{t(HU,e,i)})),(e,t)=>(af(),cf("div",{class:pu([ed(n).b(),ed(n).m(e.simple?"simple":e.direction)])},[Gg(e.$slots,"default")],2))}});var oee=KU(aee,[["__file","steps.vue"]]);const lee=BU({title:{type:String,default:""},icon:{type:fj},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),Aee=hg({...hg({name:"ElStep"}),props:lee,setup(e){const t=e,i=KF("step"),n=zh(-1),s=zh({}),r=zh(""),a=pp("ElSteps"),o=kf();Eg((()=>{Pp([()=>a.props.active,()=>a.props.processStatus,()=>a.props.finishStatus],(([e])=>{C(e)}),{immediate:!0})})),_g((()=>{a.removeStep(I.uid)}));const l=qf((()=>t.status||r.value)),A=qf((()=>{const e=a.steps.value[n.value-1];return e?e.currentStatus:"wait"})),c=qf((()=>a.props.alignCenter)),u=qf((()=>"vertical"===a.props.direction)),h=qf((()=>a.props.simple)),d=qf((()=>a.steps.value.length)),g=qf((()=>{var e;return(null==(e=a.steps.value[d.value-1])?void 0:e.uid)===(null==o?void 0:o.uid)})),p=qf((()=>h.value?"":a.props.space)),f=qf((()=>[i.b(),i.is(h.value?"simple":a.props.direction),i.is("flex",g.value&&!p.value&&!c.value),i.is("center",c.value&&!u.value&&!h.value)])),m=qf((()=>{const e={flexBasis:AL(p.value)?`${p.value}px`:p.value?p.value:100/(d.value-(c.value?0:1))+"%"};return u.value||g.value&&(e.maxWidth=100/d.value+"%"),e})),C=e=>{e>n.value?r.value=a.props.finishStatus:e===n.value&&"error"!==A.value?r.value=a.props.processStatus:r.value="wait";const t=a.steps.value[n.value-1];t&&t.calcProgress(r.value)},I=Lh({uid:o.uid,currentStatus:l,setIndex:e=>{n.value=e},calcProgress:e=>{const t="wait"===e,i={transitionDelay:`${t?"-":""}${150*n.value}ms`},r=e===a.props.processStatus||t?0:100;i.borderWidth=r&&!h.value?"1px":0,i["vertical"===a.props.direction?"height":"width"]=`${r}%`,s.value=i}});return a.addStep(I),(e,t)=>(af(),cf("div",{style:cu(ed(m)),class:pu(ed(f))},[Bf(" icon & line "),ff("div",{class:pu([ed(i).e("head"),ed(i).is(ed(l))])},[ed(h)?Bf("v-if",!0):(af(),cf("div",{key:0,class:pu(ed(i).e("line"))},[ff("i",{class:pu(ed(i).e("line-inner")),style:cu(s.value)},null,6)],2)),ff("div",{class:pu([ed(i).e("icon"),ed(i).is(e.icon||e.$slots.icon?"icon":"text")])},[Gg(e.$slots,"icon",{},(()=>[e.icon?(af(),uf(ed(gH),{key:0,class:pu(ed(i).e("icon-inner"))},{default:Nd((()=>[(af(),uf(Ng(e.icon)))])),_:1},8,["class"])):"success"===ed(l)?(af(),uf(ed(gH),{key:1,class:pu([ed(i).e("icon-inner"),ed(i).is("status")])},{default:Nd((()=>[mf(ed(VP))])),_:1},8,["class"])):"error"===ed(l)?(af(),uf(ed(gH),{key:2,class:pu([ed(i).e("icon-inner"),ed(i).is("status")])},{default:Nd((()=>[mf(ed(CO))])),_:1},8,["class"])):ed(h)?Bf("v-if",!0):(af(),cf("div",{key:3,class:pu(ed(i).e("icon-inner"))},yu(n.value+1),3))]))],2)],2),Bf(" title & description "),ff("div",{class:pu(ed(i).e("main"))},[ff("div",{class:pu([ed(i).e("title"),ed(i).is(ed(l))])},[Gg(e.$slots,"title",{},(()=>[vf(yu(e.title),1)]))],2),ed(h)?(af(),cf("div",{key:0,class:pu(ed(i).e("arrow"))},null,2)):(af(),cf("div",{key:1,class:pu([ed(i).e("description"),ed(i).is(ed(l))])},[Gg(e.$slots,"description",{},(()=>[vf(yu(e.description),1)]))],2))],2)],6))}});var cee=KU(Aee,[["__file","item.vue"]]);const uee=lH(oee,{Step:cee}),hee=cH(cee),dee=e=>["",...yU].includes(e),gee=BU({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:dee},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:fj},activeActionIcon:{type:fj},activeIcon:{type:fj},inactiveIcon:{type:fj},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:Function},id:String,tabindex:{type:[String,Number]},...Dj(["ariaLabel"])}),pee={[UU]:e=>lL(e)||Gc(e)||AL(e),[HU]:e=>lL(e)||Gc(e)||AL(e),[PU]:e=>lL(e)||Gc(e)||AL(e)},fee="ElSwitch",mee=hg({...hg({name:fee}),props:gee,emits:pee,setup(e,{expose:t,emit:i}){const n=e,{formItem:s}=Kj(),r=Vj(),a=KF("switch"),{inputId:o}=qj(n,{formItemContext:s}),l=Wj(qf((()=>n.loading))),A=zh(!1!==n.modelValue),c=zh(),u=zh(),h=qf((()=>[a.b(),a.m(r.value),a.is("disabled",l.value),a.is("checked",m.value)])),d=qf((()=>[a.e("label"),a.em("label","left"),a.is("active",!m.value)])),g=qf((()=>[a.e("label"),a.em("label","right"),a.is("active",m.value)])),p=qf((()=>({width:$U(n.width)})));Pp((()=>n.modelValue),(()=>{A.value=!0}));const f=qf((()=>!!A.value&&n.modelValue)),m=qf((()=>f.value===n.activeValue));[n.activeValue,n.inactiveValue].includes(f.value)||(i(UU,n.inactiveValue),i(HU,n.inactiveValue),i(PU,n.inactiveValue)),Pp(m,(e=>{var t;c.value.checked=e,n.validateEvent&&(null==(t=null==s?void 0:s.validate)||t.call(s,"change").catch((e=>{})))}));const C=()=>{const e=m.value?n.inactiveValue:n.activeValue;i(UU,e),i(HU,e),i(PU,e),Qd((()=>{c.value.checked=m.value}))},I=()=>{if(l.value)return;const{beforeChange:e}=n;if(!e)return void C();const t=e();[Yc(t),lL(t)].includes(!0)||lU(fee,"beforeChange must return type `Promise<boolean>` or `boolean`"),Yc(t)?t.then((e=>{e&&C()})).catch((e=>{})):t&&C()};return Eg((()=>{c.value.checked=m.value})),t({focus:()=>{var e,t;null==(t=null==(e=c.value)?void 0:e.focus)||t.call(e)},checked:m}),(e,t)=>(af(),cf("div",{class:pu(ed(h)),onClick:AC(I,["prevent"])},[ff("input",{id:ed(o),ref_key:"input",ref:c,class:pu(ed(a).e("input")),type:"checkbox",role:"switch","aria-checked":ed(m),"aria-disabled":ed(l),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:ed(l),tabindex:e.tabindex,onChange:C,onKeydown:uC(I,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),e.inlinePrompt||!e.inactiveIcon&&!e.inactiveText?Bf("v-if",!0):(af(),cf("span",{key:0,class:pu(ed(d))},[e.inactiveIcon?(af(),uf(ed(gH),{key:0},{default:Nd((()=>[(af(),uf(Ng(e.inactiveIcon)))])),_:1})):Bf("v-if",!0),!e.inactiveIcon&&e.inactiveText?(af(),cf("span",{key:1,"aria-hidden":ed(m)},yu(e.inactiveText),9,["aria-hidden"])):Bf("v-if",!0)],2)),ff("span",{ref_key:"core",ref:u,class:pu(ed(a).e("core")),style:cu(ed(p))},[e.inlinePrompt?(af(),cf("div",{key:0,class:pu(ed(a).e("inner"))},[e.activeIcon||e.inactiveIcon?(af(),uf(ed(gH),{key:0,class:pu(ed(a).is("icon"))},{default:Nd((()=>[(af(),uf(Ng(ed(m)?e.activeIcon:e.inactiveIcon)))])),_:1},8,["class"])):e.activeText||e.inactiveText?(af(),cf("span",{key:1,class:pu(ed(a).is("text")),"aria-hidden":!ed(m)},yu(ed(m)?e.activeText:e.inactiveText),11,["aria-hidden"])):Bf("v-if",!0)],2)):Bf("v-if",!0),ff("div",{class:pu(ed(a).e("action"))},[e.loading?(af(),uf(ed(gH),{key:0,class:pu(ed(a).is("loading"))},{default:Nd((()=>[mf(ed(qq))])),_:1},8,["class"])):ed(m)?Gg(e.$slots,"active-action",{key:1},(()=>[e.activeActionIcon?(af(),uf(ed(gH),{key:0},{default:Nd((()=>[(af(),uf(Ng(e.activeActionIcon)))])),_:1})):Bf("v-if",!0)])):ed(m)?Bf("v-if",!0):Gg(e.$slots,"inactive-action",{key:2},(()=>[e.inactiveActionIcon?(af(),uf(ed(gH),{key:0},{default:Nd((()=>[(af(),uf(Ng(e.inactiveActionIcon)))])),_:1})):Bf("v-if",!0)]))],2)],6),e.inlinePrompt||!e.activeIcon&&!e.activeText?Bf("v-if",!0):(af(),cf("span",{key:1,class:pu(ed(g))},[e.activeIcon?(af(),uf(ed(gH),{key:0},{default:Nd((()=>[(af(),uf(Ng(e.activeIcon)))])),_:1})):Bf("v-if",!0),!e.activeIcon&&e.activeText?(af(),cf("span",{key:1,"aria-hidden":!ed(m)},yu(e.activeText),9,["aria-hidden"])):Bf("v-if",!0)],2))],10,["onClick"]))}});const Cee=lH(KU(mee,[["__file","switch.vue"]])),Iee=function(e){var t;return null==(t=e.target)?void 0:t.closest("td")},vee=function(e,t,i,n,s){if(!t&&!n&&(!s||Lc(s)&&!s.length))return e;i=Gc(i)?"descending"===i?-1:1:i&&i<0?-1:1;const r=n?null:function(i,n){return s?(Lc(s)||(s=[s]),s.map((t=>Gc(t)?$M(i,t):t(i,n,e)))):("$key"!==t&&qc(i)&&"$value"in i&&(i=i.$value),[qc(i)?$M(i,t):i])};return e.map(((e,t)=>({value:e,index:t,key:r?r(e,t):null}))).sort(((e,t)=>{let s=function(e,t){if(n)return n(e.value,t.value);for(let i=0,n=e.key.length;i<n;i++){if(e.key[i]<t.key[i])return-1;if(e.key[i]>t.key[i])return 1}return 0}(e,t);return s||(s=e.index-t.index),s*+i})).map((e=>e.value))},Bee=function(e,t){let i=null;return e.columns.forEach((e=>{e.id===t&&(i=e)})),i},yee=function(e,t,i){const n=(t.className||"").match(new RegExp(`${i}-table_[^\\s]+`,"gm"));return n?Bee(e,n[0]):null},bee=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(Gc(t)){if(!t.includes("."))return`${e[t]}`;const i=t.split(".");let n=e;for(const e of i)n=n[e];return`${n}`}if(Oc(t))return t.call(null,e)},Eee=function(e,t){const i={};return(e||[]).forEach(((e,n)=>{i[bee(e,t)]={row:e,index:n}})),i};function wee(e){return""===e||void 0!==e&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function Qee(e){return""===e||void 0!==e&&(e=wee(e),Number.isNaN(e)&&(e=80)),e}function _ee(e,t,i,n,s,r){let a=null!=r?r:0,o=!1;const l=e.indexOf(t),A=-1!==l,c=null==s?void 0:s.call(null,t,r),u=i=>{"add"===i?e.push(t):e.splice(l,1),o=!0},h=e=>{let t=0;const i=(null==n?void 0:n.children)&&e[n.children];return i&&Lc(i)&&(t+=i.length,i.forEach((e=>{t+=h(e)}))),t};return s&&!c||(lL(i)?i&&!A?u("add"):!i&&A&&u("remove"):u(A?"remove":"add")),!(null==n?void 0:n.checkStrictly)&&(null==n?void 0:n.children)&&Lc(t[n.children])&&t[n.children].forEach((t=>{_ee(e,t,null!=i?i:!A,n,s,a+1),a+=h(t)+1})),o}function See(e,t,i="children",n="hasChildren"){const s=e=>!(Lc(e)&&e.length);function r(e,a,o){t(e,a,o),a.forEach((e=>{if(e[n])return void t(e,null,o+1);const a=e[i];s(a)||r(e,a,o+1)}))}e.forEach((e=>{if(e[n])return void t(e,null,0);const a=e[i];s(a)||r(e,a,0)}))}const xee=(e,t)=>({content:t,...e,popperOptions:{strategy:"fixed",...e.popperOptions}});let kee=null;function Dee(e){return e.children?KN(e.children,Dee):[e]}function Fee(e,t){return e+t.colSpan}const Tee=(e,t,i,n)=>{let s=0,r=e;const a=i.states.columns.value;if(n){const t=Dee(n[e]);s=a.slice(0,a.indexOf(t[0])).reduce(Fee,0),r=s+t.reduce(Fee,0)-1}else s=e;let o;switch(t){case"left":r<i.states.fixedLeafColumnsLength.value&&(o="left");break;case"right":s>=a.length-i.states.rightFixedLeafColumnsLength.value&&(o="right");break;default:r<i.states.fixedLeafColumnsLength.value?o="left":s>=a.length-i.states.rightFixedLeafColumnsLength.value&&(o="right")}return o?{direction:o,start:s,after:r}:{}},Mee=(e,t,i,n,s,r=0)=>{const a=[],{direction:o,start:l,after:A}=Tee(t,i,n,s);if(o){const t="left"===o;a.push(`${e}-fixed-column--${o}`),t&&A+r===n.states.fixedLeafColumnsLength.value-1?a.push("is-last-column"):t||l-r!=n.states.columns.value.length-n.states.rightFixedLeafColumnsLength.value||a.push("is-first-column")}return a};function Ree(e,t){return e+(null===t.realWidth||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Nee=(e,t,i,n)=>{const{direction:s,start:r=0,after:a=0}=Tee(e,t,i,n);if(!s)return;const o={},l="left"===s,A=i.states.columns.value;return l?o.left=A.slice(0,r).reduce(Ree,0):o.right=A.slice(a+1).reverse().reduce(Ree,0),o},Lee=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};const Uee=e=>{const t=[];return e.forEach((e=>{e.children&&e.children.length>0?t.push.apply(t,Uee(e.children)):t.push(e)})),t};function Hee(){var e;const t=kf(),{size:i}=rd(null==(e=t.proxy)?void 0:e.$props),n=zh(null),s=zh([]),r=zh([]),a=zh(!1),o=zh([]),l=zh([]),A=zh([]),c=zh([]),u=zh([]),h=zh([]),d=zh([]),g=zh([]),p=zh(0),f=zh(0),m=zh(0),C=zh(!1),I=zh([]),v=zh(!1),B=zh(!1),y=zh(null),b=zh({}),E=zh(null),w=zh(null),Q=zh(null),_=zh(null),S=zh(null);Pp(s,(()=>{var e;if(t.state){F(!1);"auto"===t.props.tableLayout&&(null==(e=t.refs.tableHeaderRef)||e.updateFixedColumnStyle())}}),{deep:!0});const x=e=>{var t;null==(t=e.children)||t.forEach((t=>{t.fixed=e.fixed,x(t)}))};let k;const D=()=>{if(o.value.forEach((e=>{x(e)})),c.value=o.value.filter((e=>!0===e.fixed||"left"===e.fixed)),u.value=o.value.filter((e=>"right"===e.fixed)),oL(k)&&o.value[0]&&"selection"===o.value[0].type&&(k=Boolean(o.value[0].fixed)),c.value.length>0&&o.value[0]&&"selection"===o.value[0].type)if(o.value[0].fixed){c.value.some((e=>"selection"!==e.type))?k=void 0:(o.value[0].fixed=k,k||c.value.shift())}else o.value[0].fixed=!0,c.value.unshift(o.value[0]);const e=o.value.filter((e=>!e.fixed));l.value=[].concat(c.value).concat(e).concat(u.value);const t=Uee(e),i=Uee(c.value),n=Uee(u.value);p.value=t.length,f.value=i.length,m.value=n.length,A.value=[].concat(i).concat(t).concat(n),a.value=c.value.length>0||u.value.length>0},F=(e,i=!1)=>{e&&D(),i?t.state.doLayout():t.state.debouncedUpdateLayout()},T=e=>{var i;if(!t||!t.store)return 0;const{treeData:n}=t.store.states;let s=0;const r=null==(i=n.value[e])?void 0:i.children;return r&&(s+=r.length,r.forEach((e=>{s+=T(e)}))),s},M=(e,t,i)=>{w.value&&w.value!==e&&(w.value.order=null),w.value=e,Q.value=t,_.value=i},R=()=>{let e=ed(r);Object.keys(b.value).forEach((t=>{const i=b.value[t];if(!i||0===i.length)return;const n=Bee({columns:A.value},t);n&&n.filterMethod&&(e=e.filter((e=>i.some((t=>n.filterMethod.call(null,t,e,n))))))})),E.value=e},N=()=>{s.value=((e,t)=>{const i=t.sortingColumn;return!i||Gc(i.sortable)?e:vee(e,t.sortProp,t.sortOrder,i.sortMethod,i.sortBy)})(E.value,{sortingColumn:w.value,sortProp:Q.value,sortOrder:_.value})},{setExpandRowKeys:L,toggleRowExpansion:U,updateExpandRows:H,states:P,isRowExpanded:O}=function(e){const t=kf(),i=zh(!1),n=zh([]);return{updateExpandRows:()=>{const t=e.data.value||[],s=e.rowKey.value;if(i.value)n.value=t.slice();else if(s){const e=Eee(n.value,s);n.value=t.reduce(((t,i)=>{const n=bee(i,s);return e[n]&&t.push(i),t}),[])}else n.value=[]},toggleRowExpansion:(e,i)=>{_ee(n.value,e,i)&&t.emit("expand-change",e,n.value.slice())},setExpandRowKeys:i=>{t.store.assertRowKey();const s=e.data.value||[],r=e.rowKey.value,a=Eee(s,r);n.value=i.reduce(((e,t)=>{const i=a[t];return i&&e.push(i.row),e}),[])},isRowExpanded:t=>{const i=e.rowKey.value;return i?!!Eee(n.value,i)[bee(t,i)]:n.value.includes(t)},states:{expandRows:n,defaultExpandAll:i}}}({data:s,rowKey:n}),{updateTreeExpandKeys:G,toggleTreeExpansion:K,updateTreeData:q,updateKeyChildren:Y,loadOrToggle:V,states:W}=function(e){const t=zh([]),i=zh({}),n=zh(16),s=zh(!1),r=zh({}),a=zh("hasChildren"),o=zh("children"),l=zh(!1),A=kf(),c=qf((()=>{if(!e.rowKey.value)return{};const t=e.data.value||[];return h(t)})),u=qf((()=>{const t=e.rowKey.value,i=Object.keys(r.value),n={};return i.length?(i.forEach((e=>{if(r.value[e].length){const i={children:[]};r.value[e].forEach((e=>{const s=bee(e,t);i.children.push(s),e[a.value]&&!n[s]&&(n[s]={children:[]})})),n[e]=i}})),n):n})),h=t=>{const i=e.rowKey.value,n={};return See(t,((e,t,r)=>{const a=bee(e,i);Lc(t)?n[a]={children:t.map((e=>bee(e,i))),level:r}:s.value&&(n[a]={children:[],lazy:!0,level:r})}),o.value,a.value),n},d=(e=!1,n=(e=>null==(e=A.store)?void 0:e.states.defaultExpandAll.value)())=>{var r;const a=c.value,o=u.value,l=Object.keys(a),h={};if(l.length){const r=ed(i),A=[],c=(i,s)=>{if(e)return t.value?n||t.value.includes(s):!(!n&&!(null==i?void 0:i.expanded));{const e=n||t.value&&t.value.includes(s);return!(!(null==i?void 0:i.expanded)&&!e)}};l.forEach((e=>{const t=r[e],i={...a[e]};if(i.expanded=c(t,e),i.lazy){const{loaded:n=!1,loading:s=!1}=t||{};i.loaded=!!n,i.loading=!!s,A.push(e)}h[e]=i}));const u=Object.keys(o);s.value&&u.length&&A.length&&u.forEach((e=>{const t=r[e],i=o[e].children;if(A.includes(e)){if(0!==h[e].children.length)throw new Error("[ElTable]children must be an empty array.");h[e].children=i}else{const{loaded:n=!1,loading:s=!1}=t||{};h[e]={lazy:!0,loaded:!!n,loading:!!s,expanded:c(t,e),children:i,level:""}}}))}i.value=h,null==(r=A.store)||r.updateTableScrollY()};Pp((()=>t.value),(()=>{d(!0)})),Pp((()=>c.value),(()=>{d()})),Pp((()=>u.value),(()=>{d()}));const g=(t,n)=>{A.store.assertRowKey();const s=e.rowKey.value,r=bee(t,s),a=r&&i.value[r];if(r&&a&&"expanded"in a){const e=a.expanded;n=oL(n)?!a.expanded:n,i.value[r].expanded=n,e!==n&&A.emit("expand-change",t,n),A.store.updateTableScrollY()}},p=(e,t,n)=>{const{load:s}=A.props;s&&!i.value[t].loaded&&(i.value[t].loading=!0,s(e,n,(n=>{if(!Lc(n))throw new TypeError("[ElTable] data must be an array");i.value[t].loading=!1,i.value[t].loaded=!0,i.value[t].expanded=!0,n.length&&(r.value[t]=n),A.emit("expand-change",e,!0)})))};return{loadData:p,loadOrToggle:t=>{A.store.assertRowKey();const n=e.rowKey.value,r=bee(t,n),a=i.value[r];s.value&&a&&"loaded"in a&&!a.loaded?p(t,r,a):g(t,void 0)},toggleTreeExpansion:g,updateTreeExpandKeys:e=>{t.value=e,d()},updateTreeData:d,updateKeyChildren:(e,t)=>{const{lazy:i,rowKey:n}=A.props;if(i){if(!n)throw new Error("[Table] rowKey is required in updateKeyChild");r.value[e]&&(r.value[e]=t)}},normalize:h,states:{expandRowKeys:t,treeData:i,indent:n,lazy:s,lazyTreeNodeMap:r,lazyColumnIdentifier:a,childrenColumnName:o,checkStrictly:l}}}({data:s,rowKey:n}),{updateCurrentRowData:j,updateCurrentRow:J,setCurrentRowKey:z,states:X}=function(e){const t=kf(),i=zh(null),n=zh(null),s=()=>{i.value=null},r=i=>{const{data:s,rowKey:r}=e;let a=null;r.value&&(a=(ed(s)||[]).find((e=>bee(e,r.value)===i))),n.value=a,t.emit("current-change",n.value,null)};return{setCurrentRowKey:e=>{t.store.assertRowKey(),i.value=e,r(e)},restoreCurrentRowKey:s,setCurrentRowByKey:r,updateCurrentRow:e=>{const i=n.value;if(e&&e!==i)return n.value=e,void t.emit("current-change",n.value,i);!e&&i&&(n.value=null,t.emit("current-change",null,i))},updateCurrentRowData:()=>{const a=e.rowKey.value,o=e.data.value||[],l=n.value;if(!o.includes(l)&&l){if(a){const e=bee(l,a);r(e)}else n.value=null;null===n.value&&t.emit("current-change",null,l)}else i.value&&(r(i.value),s())},states:{_currentRowKey:i,currentRow:n}}}({data:s,rowKey:n});return{assertRowKey:()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},updateColumns:D,scheduleLayout:F,isSelected:e=>I.value.some((t=>WN(t,e))),clearSelection:()=>{C.value=!1;const e=I.value;I.value=[],e.length&&t.emit("selection-change",[])},cleanSelection:()=>{let e;if(n.value){e=[];const t=Eee(I.value,n.value),i=Eee(s.value,n.value);for(const n in t)Nc(t,n)&&!i[n]&&e.push(t[n].row)}else e=I.value.filter((e=>!s.value.includes(e)));if(e.length){const i=I.value.filter((t=>!e.includes(t)));I.value=i,t.emit("selection-change",i.slice())}},getSelectionRows:()=>(I.value||[]).slice(),toggleRowSelection:(e,i,n=!0,s=!1)=>{var r,a,o,l;const A={children:null==(a=null==(r=null==t?void 0:t.store)?void 0:r.states)?void 0:a.childrenColumnName.value,checkStrictly:null==(l=null==(o=null==t?void 0:t.store)?void 0:o.states)?void 0:l.checkStrictly.value};if(_ee(I.value,e,i,A,s?void 0:y.value)){const i=(I.value||[]).slice();n&&t.emit("select",i,e),t.emit("selection-change",i)}},_toggleAllSelection:()=>{var e,i;const n=B.value?!C.value:!(C.value||I.value.length);C.value=n;let r=!1,a=0;const o=null==(i=null==(e=null==t?void 0:t.store)?void 0:e.states)?void 0:i.rowKey.value,{childrenColumnName:l}=t.store.states,A={children:l.value,checkStrictly:!1};s.value.forEach(((e,t)=>{const i=t+a;_ee(I.value,e,n,A,y.value,i)&&(r=!0),a+=T(bee(e,o))})),r&&t.emit("selection-change",I.value?I.value.slice():[]),t.emit("select-all",(I.value||[]).slice())},toggleAllSelection:null,updateSelectionByRowKey:()=>{const e=Eee(I.value,n.value);s.value.forEach((t=>{const i=bee(t,n.value),s=e[i];s&&(I.value[s.index]=t)}))},updateAllSelected:()=>{var e;if(0===(null==(e=s.value)?void 0:e.length))return void(C.value=!1);const{childrenColumnName:i}=t.store.states,r=n.value?Eee(I.value,n.value):void 0;let a=0,o=0;const l=e=>r?!!r[bee(e,n.value)]:I.value.includes(e),A=e=>{var t;for(const n of e){const e=y.value&&y.value.call(null,n,a);if(l(n))o++;else if(!y.value||e)return!1;if(a++,(null==(t=n[i.value])?void 0:t.length)&&!A(n[i.value]))return!1}return!0},c=A(s.value||[]);C.value=0!==o&&c},updateFilters:(e,t)=>{Lc(e)||(e=[e]);const i={};return e.forEach((e=>{b.value[e.id]=t,i[e.columnKey||e.id]=t})),i},updateCurrentRow:J,updateSort:M,execFilter:R,execSort:N,execQuery:(e=void 0)=>{e&&e.filter||R(),N()},clearFilter:e=>{const{tableHeaderRef:i}=t.refs;if(!i)return;const n=Object.assign({},i.filterPanels),s=Object.keys(n);if(s.length)if(Gc(e)&&(e=[e]),Lc(e)){const i=e.map((e=>function(e,t){let i=null;for(let n=0;n<e.columns.length;n++){const s=e.columns[n];if(s.columnKey===t){i=s;break}}return i||lU("ElTable",`No column matching with column-key: ${t}`),i}({columns:A.value},e)));s.forEach((e=>{const t=i.find((t=>t.id===e));t&&(t.filteredValue=[])})),t.store.commit("filterChange",{column:i,values:[],silent:!0,multi:!0})}else s.forEach((e=>{const t=A.value.find((t=>t.id===e));t&&(t.filteredValue=[])})),b.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},clearSort:()=>{w.value&&(M(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},toggleRowExpansion:U,setExpandRowKeysAdapter:e=>{L(e),G(e)},setCurrentRowKey:z,toggleRowExpansionAdapter:(e,t)=>{A.value.some((({type:e})=>"expand"===e))?U(e,t):K(e,t)},isRowExpanded:O,updateExpandRows:H,updateCurrentRowData:j,loadOrToggle:V,updateTreeData:q,updateKeyChildren:Y,states:{tableSize:i,rowKey:n,data:s,_data:r,isComplex:a,_columns:o,originColumns:l,columns:A,fixedColumns:c,rightFixedColumns:u,leafColumns:h,fixedLeafColumns:d,rightFixedLeafColumns:g,updateOrderFns:[],leafColumnsLength:p,fixedLeafColumnsLength:f,rightFixedLeafColumnsLength:m,isAllSelected:C,selection:I,reserveSelection:v,selectOnIndeterminate:B,selectable:y,filters:b,filteredData:E,sortingColumn:w,sortProp:Q,sortOrder:_,hoverRow:S,...P,...W,...X}}}function Pee(e,t){return e.map((e=>{var i;return e.id===t.id?t:((null==(i=e.children)?void 0:i.length)&&(e.children=Pee(e.children,t)),e)}))}function Oee(e){e.forEach((e=>{var t,i;e.no=null==(t=e.getColumnIndex)?void 0:t.call(e),(null==(i=e.children)?void 0:i.length)&&Oee(e.children)})),e.sort(((e,t)=>e.no-t.no))}const Gee={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function Kee(e,t){if(!e)throw new Error("Table is required.");const i=function(){const e=kf(),t=Hee();return{ns:KF("table"),...t,mutations:{setData(t,i){const n=ed(t._data)!==i;t.data.value=i,t._data.value=i,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),ed(t.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):n?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(t,i,n,s){const r=ed(t._columns);let a=[];n?(n&&!n.children&&(n.children=[]),n.children.push(i),a=Pee(r,n)):(r.push(i),a=r),Oee(a),t._columns.value=a,t.updateOrderFns.push(s),"selection"===i.type&&(t.selectable.value=i.selectable,t.reserveSelection.value=i.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(t,i){var n;(null==(n=i.getColumnIndex)?void 0:n.call(i))!==i.no&&(Oee(t._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(t,i,n,s){const r=ed(t._columns)||[];if(n)n.children.splice(n.children.findIndex((e=>e.id===i.id)),1),Qd((()=>{var e;0===(null==(e=n.children)?void 0:e.length)&&delete n.children})),t._columns.value=Pee(r,n);else{const e=r.indexOf(i);e>-1&&(r.splice(e,1),t._columns.value=r)}const a=t.updateOrderFns.indexOf(s);a>-1&&t.updateOrderFns.splice(a,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(t,i){const{prop:n,order:s,init:r}=i;if(n){const i=ed(t.columns).find((e=>e.property===n));i&&(i.order=s,e.store.updateSort(i,n,s),e.store.commit("changeSortCondition",{init:r}))}},changeSortCondition(t,i){const{sortingColumn:n,sortProp:s,sortOrder:r}=t,a=ed(n),o=ed(s),l=ed(r);null===l&&(t.sortingColumn.value=null,t.sortProp.value=null),e.store.execQuery({filter:!0}),i&&(i.silent||i.init)||e.emit("sort-change",{column:a,prop:o,order:l}),e.store.updateTableScrollY()},filterChange(t,i){const{column:n,values:s,silent:r}=i,a=e.store.updateFilters(n,s);e.store.execQuery(),r||e.emit("filter-change",a),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(t,i){e.store.toggleRowSelection(i),e.store.updateAllSelected()},setHoverRow(e,t){e.hoverRow.value=t},setCurrentRow(t,i){e.store.updateCurrentRow(i)}},commit:function(t,...i){const n=e.store.mutations;if(!n[t])throw new Error(`Action not found: ${t}`);n[t].apply(e,[e.store.states].concat(i))},updateTableScrollY:function(){Qd((()=>e.layout.updateScrollY.apply(e.layout)))}}}();return i.toggleAllSelection=RN(i._toggleAllSelection,10),Object.keys(Gee).forEach((e=>{qee(Yee(t,e),e,i)})),function(e,t){Object.keys(Gee).forEach((i=>{Pp((()=>Yee(t,i)),(t=>{qee(t,i,e)}))}))}(i,t),i}function qee(e,t,i){let n=e,s=Gee[t];"object"==typeof Gee[t]&&(s=s.key,n=n||Gee[t].default),i.states[s].value=n}function Yee(e,t){if(t.includes(".")){const i=t.split(".");let n=e;return i.forEach((e=>{n=n[e]})),n}return e[t]}class Vee{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=zh(null),this.scrollX=zh(!1),this.scrollY=zh(!1),this.bodyWidth=zh(null),this.fixedWidth=zh(null),this.rightFixedWidth=zh(null),this.gutterWidth=0;for(const t in e)Nc(e,t)&&(Jh(this[t])?this[t].value=e[t]:this[t]=e[t]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(null===this.height.value)return!1;const e=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(null==e?void 0:e.wrapRef)){let t=!0;const i=this.scrollY.value;return t=e.wrapRef.scrollHeight>e.wrapRef.clientHeight,this.scrollY.value=t,i!==t}return!1}setHeight(e,t="height"){if(!bL)return;const i=this.table.vnode.el;var n;if(e=AL(n=e)?n:Gc(n)?/^\d+(?:px)?$/.test(n)?Number.parseInt(n,10):n:null,this.height.value=Number(e),!i&&(e||0===e))return Qd((()=>this.setHeight(e,t)));AL(e)?(i.style[t]=`${e}px`,this.updateElsHeight()):Gc(e)&&(i.style[t]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach((t=>{t.isColumnGroup?e.push.apply(e,t.columns):e.push(t)})),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let t=e;for(;"DIV"!==t.tagName;){if("none"===getComputedStyle(t).display)return!0;t=t.parentElement}return!1}updateColumnsWidth(){if(!bL)return;const e=this.fit,t=this.table.vnode.el.clientWidth;let i=0;const n=this.getFlattenColumns(),s=n.filter((e=>!AL(e.width)));if(n.forEach((e=>{AL(e.width)&&e.realWidth&&(e.realWidth=null)})),s.length>0&&e){if(n.forEach((e=>{i+=Number(e.width||e.minWidth||80)})),i<=t){this.scrollX.value=!1;const e=t-i;if(1===s.length)s[0].realWidth=Number(s[0].minWidth||80)+e;else{const t=e/s.reduce(((e,t)=>e+Number(t.minWidth||80)),0);let i=0;s.forEach(((e,n)=>{if(0===n)return;const s=Math.floor(Number(e.minWidth||80)*t);i+=s,e.realWidth=Number(e.minWidth||80)+s})),s[0].realWidth=Number(s[0].minWidth||80)+e-i}}else this.scrollX.value=!0,s.forEach((e=>{e.realWidth=Number(e.minWidth)}));this.bodyWidth.value=Math.max(i,t),this.table.state.resizeState.value.width=this.bodyWidth.value}else n.forEach((e=>{e.width||e.minWidth?e.realWidth=Number(e.width||e.minWidth):e.realWidth=80,i+=e.realWidth})),this.scrollX.value=i>t,this.bodyWidth.value=i;const r=this.store.states.fixedColumns.value;if(r.length>0){let e=0;r.forEach((t=>{e+=Number(t.realWidth||t.width)})),this.fixedWidth.value=e}const a=this.store.states.rightFixedColumns.value;if(a.length>0){let e=0;a.forEach((t=>{e+=Number(t.realWidth||t.width)})),this.rightFixedWidth.value=e}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const t=this.observers.indexOf(e);-1!==t&&this.observers.splice(t,1)}notifyObservers(e){this.observers.forEach((t=>{var i,n;switch(e){case"columns":null==(i=t.state)||i.onColumnsChange(this);break;case"scrollable":null==(n=t.state)||n.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}}))}}const{CheckboxGroup:Wee}=r0,jee=hg({name:"ElTableFilterPanel",components:{ElCheckbox:r0,ElCheckboxGroup:Wee,ElScrollbar:lJ,ElTooltip:XX,ElIcon:gH,ArrowDown:QH,ArrowUp:UH},directives:{ClickOutside:$0},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:{type:String}},setup(e){const t=kf(),{t:i}=CU(),n=KF("table-filter"),s=null==t?void 0:t.parent;s.filterPanels.value[e.column.id]||(s.filterPanels.value[e.column.id]=t);const r=zh(!1),a=zh(null),o=qf((()=>e.column&&e.column.filters)),l=qf((()=>e.column.filterClassName?`${n.b()} ${e.column.filterClassName}`:n.b())),A=qf({get:()=>{var t;return((null==(t=e.column)?void 0:t.filteredValue)||[])[0]},set:e=>{c.value&&(null!=e?c.value.splice(0,1,e):c.value.splice(0,1))}}),c=qf({get:()=>e.column&&e.column.filteredValue||[],set(t){e.column&&e.upDataColumn("filteredValue",t)}}),u=qf((()=>!e.column||e.column.filterMultiple)),h=()=>{r.value=!1},d=t=>{e.store.commit("filterChange",{column:e.column,values:t}),e.store.updateAllSelected()};Pp(r,(t=>{e.column&&e.upDataColumn("filterOpened",t)}),{immediate:!0});const g=qf((()=>{var e,t;return null==(t=null==(e=a.value)?void 0:e.popperRef)?void 0:t.contentRef}));return{tooltipVisible:r,multiple:u,filterClassName:l,filteredValue:c,filterValue:A,filters:o,handleConfirm:()=>{d(c.value),h()},handleReset:()=>{c.value=[],d(c.value),h()},handleSelect:e=>{A.value=e,d(null!=e?c.value:[]),h()},isActive:e=>e.value===A.value,t:i,ns:n,showFilterPanel:e=>{e.stopPropagation(),r.value=!r.value},hideFilterPanel:()=>{r.value=!1},popperPaneRef:g,tooltip:a}}});var Jee=KU(jee,[["render",function(e,t,i,n,s,r){const a=Mg("el-checkbox"),o=Mg("el-checkbox-group"),l=Mg("el-scrollbar"),A=Mg("arrow-up"),c=Mg("arrow-down"),u=Mg("el-icon"),h=Mg("el-tooltip"),d=Lg("click-outside");return af(),uf(h,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.filterClassName,persistent:"","append-to":e.appendTo},{content:Nd((()=>[e.multiple?(af(),cf("div",{key:0},[ff("div",{class:pu(e.ns.e("content"))},[mf(l,{"wrap-class":e.ns.e("wrap")},{default:Nd((()=>[mf(o,{modelValue:e.filteredValue,"onUpdate:modelValue":t=>e.filteredValue=t,class:pu(e.ns.e("checkbox-group"))},{default:Nd((()=>[(af(!0),cf(Zp,null,Pg(e.filters,(e=>(af(),uf(a,{key:e.value,value:e.value},{default:Nd((()=>[vf(yu(e.text),1)])),_:2},1032,["value"])))),128))])),_:1},8,["modelValue","onUpdate:modelValue","class"])])),_:1},8,["wrap-class"])],2),ff("div",{class:pu(e.ns.e("bottom"))},[ff("button",{class:pu({[e.ns.is("disabled")]:0===e.filteredValue.length}),disabled:0===e.filteredValue.length,type:"button",onClick:e.handleConfirm},yu(e.t("el.table.confirmFilter")),11,["disabled","onClick"]),ff("button",{type:"button",onClick:e.handleReset},yu(e.t("el.table.resetFilter")),9,["onClick"])],2)])):(af(),cf("ul",{key:1,class:pu(e.ns.e("list"))},[ff("li",{class:pu([e.ns.e("list-item"),{[e.ns.is("active")]:void 0===e.filterValue||null===e.filterValue}]),onClick:t=>e.handleSelect(null)},yu(e.t("el.table.clearFilter")),11,["onClick"]),(af(!0),cf(Zp,null,Pg(e.filters,(t=>(af(),cf("li",{key:t.value,class:pu([e.ns.e("list-item"),e.ns.is("active",e.isActive(t))]),label:t.value,onClick:i=>e.handleSelect(t.value)},yu(t.text),11,["label","onClick"])))),128))],2))])),default:Nd((()=>[Ld((af(),cf("span",{class:pu([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:e.showFilterPanel},[mf(u,null,{default:Nd((()=>[Gg(e.$slots,"filter-icon",{},(()=>[e.column.filterOpened?(af(),uf(A,{key:0})):(af(),uf(c,{key:1}))]))])),_:3})],10,["onClick"])),[[d,e.hideFilterPanel,e.popperPaneRef]])])),_:3},8,["visible","placement","popper-class","append-to"])}],["__file","filter-panel.vue"]]);function zee(e){const t=kf();bg((()=>{i.value.addObserver(t)})),Eg((()=>{n(i.value),s(i.value)})),Qg((()=>{n(i.value),s(i.value)})),Sg((()=>{i.value.removeObserver(t)}));const i=qf((()=>{const t=e.layout;if(!t)throw new Error("Can not find table layout.");return t})),n=t=>{var i;const n=(null==(i=e.vnode.el)?void 0:i.querySelectorAll("colgroup > col"))||[];if(!n.length)return;const s=t.getFlattenColumns(),r={};s.forEach((e=>{r[e.id]=e}));for(let e=0,a=n.length;e<a;e++){const t=n[e],i=t.getAttribute("name"),s=r[i];s&&t.setAttribute("width",s.realWidth||s.width)}},s=t=>{var i,n;const s=(null==(i=e.vnode.el)?void 0:i.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let e=0,a=s.length;e<a;e++){s[e].setAttribute("width",t.scrollY.value?t.gutterWidth:"0")}const r=(null==(n=e.vnode.el)?void 0:n.querySelectorAll("th.gutter"))||[];for(let e=0,a=r.length;e<a;e++){const i=r[e];i.style.width=t.scrollY.value?`${t.gutterWidth}px`:"0",i.style.display=t.scrollY.value?"":"none"}};return{tableLayout:i.value,onColumnsChange:n,onScrollableChange:s}}const Xee=Symbol("ElTable");const $ee=e=>{const t=[];return e.forEach((e=>{e.children?(t.push(e),t.push.apply(t,$ee(e.children))):t.push(e)})),t},Zee=e=>{let t=1;const i=(e,n)=>{if(n&&(e.level=n.level+1,t<e.level&&(t=e.level)),e.children){let t=0;e.children.forEach((n=>{i(n,e),t+=n.colSpan})),e.colSpan=t}else e.colSpan=1};e.forEach((e=>{e.level=1,i(e,void 0)}));const n=[];for(let s=0;s<t;s++)n.push([]);return $ee(e).forEach((e=>{e.children?(e.rowSpan=1,e.children.forEach((e=>e.isSubColumn=!0))):e.rowSpan=t-e.level+1,n[e.level-1].push(e)})),n};var ete=hg({name:"ElTableHeader",components:{ElCheckbox:r0},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String}},setup(e,{emit:t}){const i=kf(),n=pp(Xee),s=KF("table"),r=zh({}),{onColumnsChange:a,onScrollableChange:o}=zee(n),l="auto"===(null==n?void 0:n.props.tableLayout),A=Lh(new Map),c=zh(),u=()=>{setTimeout((()=>{A.size>0&&(A.forEach(((e,t)=>{const i=c.value.querySelector(`.${t.replace(/\s/g,".")}`);if(i){const t=i.getBoundingClientRect().width;e.width=t}})),A.clear())}))};Pp(A,u),Eg((async()=>{await Qd(),await Qd();const{prop:t,order:i}=e.defaultSort;null==n||n.store.commit("sort",{prop:t,order:i,init:!0}),u()}));const{handleHeaderClick:h,handleHeaderContextMenu:d,handleMouseDown:g,handleMouseMove:p,handleMouseOut:f,handleSortClick:m,handleFilterClick:C}=function(e,t){const i=kf(),n=pp(Xee),s=e=>{e.stopPropagation()},r=zh(null),a=zh(!1),o=zh({}),l=(t,i,s)=>{var r;t.stopPropagation();const a=i.order===s?null:s||(({order:e,sortOrders:t})=>{if(""===e)return t[0];const i=t.indexOf(e||null);return t[i>t.length-2?0:i+1]})(i),o=null==(r=t.target)?void 0:r.closest("th");if(o&&WU(o,"noclick"))return void JU(o,"noclick");if(!i.sortable)return;const l=t.currentTarget;if(["ascending","descending"].some((e=>WU(l,e)&&!i.sortOrders.includes(e))))return;const A=e.store.states;let c,u=A.sortProp.value;const h=A.sortingColumn.value;(h!==i||h===i&&null===h.order)&&(h&&(h.order=null),A.sortingColumn.value=i,u=i.property),c=i.order=a||null,A.sortProp.value=u,A.sortOrder.value=c,null==n||n.store.commit("changeSortCondition")};return{handleHeaderClick:(e,t)=>{!t.filters&&t.sortable?l(e,t,!1):t.filterable&&!t.sortable&&s(e),null==n||n.emit("header-click",t,e)},handleHeaderContextMenu:(e,t)=>{null==n||n.emit("header-contextmenu",t,e)},handleMouseDown:(s,l)=>{if(bL&&!(l.children&&l.children.length>0)&&r.value&&e.border){a.value=!0;const A=n;t("set-drag-visible",!0);const c=(null==A?void 0:A.vnode.el).getBoundingClientRect().left,u=i.vnode.el.querySelector(`th.${l.id}`),h=u.getBoundingClientRect(),d=h.left-c+30;jU(u,"noclick"),o.value={startMouseLeft:s.clientX,startLeft:h.right-c,startColumnLeft:h.left-c,tableLeft:c};const g=null==A?void 0:A.refs.resizeProxy;g.style.left=`${o.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const p=e=>{const t=e.clientX-o.value.startMouseLeft,i=o.value.startLeft+t;g.style.left=`${Math.max(d,i)}px`},f=()=>{if(a.value){const{startColumnLeft:i,startLeft:n}=o.value,c=Number.parseInt(g.style.left,10)-i;l.width=l.realWidth=c,null==A||A.emit("header-dragend",l.width,n-i,l,s),requestAnimationFrame((()=>{e.store.scheduleLayout(!1,!0)})),document.body.style.cursor="",a.value=!1,r.value=null,o.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",f),document.onselectstart=null,document.ondragstart=null,setTimeout((()=>{JU(u,"noclick")}),0)};document.addEventListener("mousemove",p),document.addEventListener("mouseup",f)}},handleMouseMove:(t,i)=>{var n;if(i.children&&i.children.length>0)return;const s=t.target;if(!uL(s))return;const o=null==s?void 0:s.closest("th");if(i&&i.resizable&&o&&!a.value&&e.border){const e=o.getBoundingClientRect(),s=document.body.style,l=(null==(n=o.parentNode)?void 0:n.lastElementChild)===o;e.width>12&&e.right-t.pageX<8&&!l?(s.cursor="col-resize",WU(o,"is-sortable")&&(o.style.cursor="col-resize"),r.value=i):a.value||(s.cursor="",WU(o,"is-sortable")&&(o.style.cursor="pointer"),r.value=null)}},handleMouseOut:()=>{bL&&(document.body.style.cursor="")},handleSortClick:l,handleFilterClick:s}}(e,t),{getHeaderRowStyle:I,getHeaderRowClass:v,getHeaderCellStyle:B,getHeaderCellClass:y}=function(e){const t=pp(Xee),i=KF("table");return{getHeaderRowStyle:e=>{const i=null==t?void 0:t.props.headerRowStyle;return Oc(i)?i.call(null,{rowIndex:e}):i},getHeaderRowClass:e=>{const i=[],n=null==t?void 0:t.props.headerRowClassName;return Gc(n)?i.push(n):Oc(n)&&i.push(n.call(null,{rowIndex:e})),i.join(" ")},getHeaderCellStyle:(i,n,s,r)=>{var a;let o=null!=(a=null==t?void 0:t.props.headerCellStyle)?a:{};Oc(o)&&(o=o.call(null,{rowIndex:i,columnIndex:n,row:s,column:r}));const l=Nee(n,r.fixed,e.store,s);return Lee(l,"left"),Lee(l,"right"),Object.assign({},o,l)},getHeaderCellClass:(n,s,r,a)=>{const o=Mee(i.b(),s,a.fixed,e.store,r),l=[a.id,a.order,a.headerAlign,a.className,a.labelClassName,...o];a.children||l.push("is-leaf"),a.sortable&&l.push("is-sortable");const A=null==t?void 0:t.props.headerCellClassName;return Gc(A)?l.push(A):Oc(A)&&l.push(A.call(null,{rowIndex:n,columnIndex:s,row:r,column:a})),l.push(i.e("cell")),l.filter((e=>Boolean(e))).join(" ")}}}(e),{isGroup:b,toggleAllSelection:E,columnRows:w}=function(e){const t=pp(Xee),i=qf((()=>Zee(e.store.states.originColumns.value)));return{isGroup:qf((()=>{const e=i.value.length>1;return e&&t&&(t.state.isGroup.value=!0),e})),toggleAllSelection:e=>{e.stopPropagation(),null==t||t.store.commit("toggleAllSelection")},columnRows:i}}(e);return i.state={onColumnsChange:a,onScrollableChange:o},i.filterPanels=r,{ns:s,filterPanels:r,onColumnsChange:a,onScrollableChange:o,columnRows:w,getHeaderRowClass:v,getHeaderRowStyle:I,getHeaderCellClass:y,getHeaderCellStyle:B,handleHeaderClick:h,handleHeaderContextMenu:d,handleMouseDown:g,handleMouseMove:p,handleMouseOut:f,handleSortClick:m,handleFilterClick:C,isGroup:b,toggleAllSelection:E,saveIndexSelection:A,isTableLayoutAuto:l,theadRef:c,updateFixedColumnStyle:u}},render(){const{ns:e,isGroup:t,columnRows:i,getHeaderCellStyle:n,getHeaderCellClass:s,getHeaderRowClass:r,getHeaderRowStyle:a,handleHeaderClick:o,handleHeaderContextMenu:l,handleMouseDown:A,handleMouseMove:c,handleSortClick:u,handleMouseOut:h,store:d,$parent:g,saveIndexSelection:p,isTableLayoutAuto:f}=this;let m=1;return Yf("thead",{ref:"theadRef",class:{[e.is("group")]:t}},i.map(((e,t)=>Yf("tr",{class:r(t),key:t,style:a(t)},e.map(((i,r)=>{i.rowSpan>m&&(m=i.rowSpan);const a=s(t,r,e,i);return f&&i.fixed&&p.set(a,i),Yf("th",{class:a,colspan:i.colSpan,key:`${i.id}-thead`,rowspan:i.rowSpan,style:n(t,r,e,i),onClick:e=>{e.currentTarget.classList.contains("noclick")||o(e,i)},onContextmenu:e=>l(e,i),onMousedown:e=>A(e,i),onMousemove:e=>c(e,i),onMouseout:h},[Yf("div",{class:["cell",i.filteredValue&&i.filteredValue.length>0?"highlight":""]},[i.renderHeader?i.renderHeader({column:i,$index:r,store:d,_self:g}):i.label,i.sortable&&Yf("span",{onClick:e=>u(e,i),class:"caret-wrapper"},[Yf("i",{onClick:e=>u(e,i,"ascending"),class:"sort-caret ascending"}),Yf("i",{onClick:e=>u(e,i,"descending"),class:"sort-caret descending"})]),i.filterable&&Yf(Jee,{store:d,placement:i.filterPlacement||"bottom-start",appendTo:g.appendFilterPanelTo,column:i,upDataColumn:(e,t)=>{i[e]=t}},{"filter-icon":()=>i.renderFilterIcon?i.renderFilterIcon({filterOpened:i.filterOpened}):null})])])}))))))}});function tte(e,t,i=.03){return e-t>i}function ite(e){const t=pp(Xee),i=zh(""),n=zh(Yf("div")),s=(i,n,s)=>{var r;const a=t,o=Iee(i);let l;const A=null==(r=null==a?void 0:a.vnode.el)?void 0:r.dataset.prefix;o&&(l=yee({columns:e.store.states.columns.value},o,A),l&&(null==a||a.emit(`cell-${s}`,n,l,o,i))),null==a||a.emit(`row-${s}`,n,l,i)},r=RN((t=>{e.store.commit("setHoverRow",t)}),30),a=RN((()=>{e.store.commit("setHoverRow",null)}),30),o=(e,t,i)=>{let n=t.target.parentNode;for(;e>1&&(n=null==n?void 0:n.nextSibling,n&&"TR"===n.nodeName);)i(n,"hover-row hover-fixed-row"),e--};return{handleDoubleClick:(e,t)=>{s(e,t,"dblclick")},handleClick:(t,i)=>{e.store.commit("setCurrentRow",i),s(t,i,"click")},handleContextMenu:(e,t)=>{s(e,t,"contextmenu")},handleMouseEnter:r,handleMouseLeave:a,handleCellMouseEnter:(i,n,s)=>{var r;const a=t,l=Iee(i),A=null==(r=null==a?void 0:a.vnode.el)?void 0:r.dataset.prefix;if(l){const t=yee({columns:e.store.states.columns.value},l,A);l.rowSpan>1&&o(l.rowSpan,i,jU);const s=a.hoverState={cell:l,column:t,row:n};null==a||a.emit("cell-mouse-enter",s.row,s.column,s.cell,i)}if(!s)return;const c=i.target.querySelector(".cell");if(!WU(c,`${A}-tooltip`)||!c.childNodes.length)return;const u=document.createRange();u.setStart(c,0),u.setEnd(c,c.childNodes.length);const{width:h,height:d}=u.getBoundingClientRect(),{width:g,height:p}=c.getBoundingClientRect(),{top:f,left:m,right:C,bottom:I}=(e=>{const t=window.getComputedStyle(e,null);return{left:Number.parseInt(t.paddingLeft,10)||0,right:Number.parseInt(t.paddingRight,10)||0,top:Number.parseInt(t.paddingTop,10)||0,bottom:Number.parseInt(t.paddingBottom,10)||0}})(c),v=f+I;(tte(h+(m+C),g)||tte(d+v,p)||tte(c.scrollWidth,g))&&function(e,t,i,n){if((null==kee?void 0:kee.trigger)===i)return void XN(kee.vm.component.props,xee(e,t));null==kee||kee();const s=null==n?void 0:n.refs.tableWrapper,r=null==s?void 0:s.dataset.prefix,a=mf(XX,{virtualTriggering:!0,virtualRef:i,appendTo:s,placement:"top",transition:"none",offset:0,hideAfter:0,...xee(e,t)});a.appContext={...n.appContext,...n};const o=document.createElement("div");pC(a,o),a.component.exposed.onOpen();const l=null==s?void 0:s.querySelector(`.${r}-scrollbar__wrap`);kee=()=>{pC(null,o),null==l||l.removeEventListener("scroll",kee),kee=null},kee.trigger=i,kee.vm=a,null==l||l.addEventListener("scroll",kee)}(s,l.innerText||l.textContent,l,a)},handleCellMouseLeave:e=>{const i=Iee(e);if(!i)return;i.rowSpan>1&&o(i.rowSpan,e,JU);const n=null==t?void 0:t.hoverState;null==t||t.emit("cell-mouse-leave",null==n?void 0:n.row,null==n?void 0:n.column,null==n?void 0:n.cell,e)},tooltipContent:i,tooltipTrigger:n}}var nte=KU(hg({...hg({name:"TableTdWrapper"}),props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup:e=>(t,i)=>(af(),cf("td",{colspan:e.colspan,rowspan:e.rowspan},[Gg(t.$slots,"default")],8,["colspan","rowspan"]))}),[["__file","td-wrapper.vue"]]);function ste(e){const t=pp(Xee),i=KF("table"),{handleDoubleClick:n,handleClick:s,handleContextMenu:r,handleMouseEnter:a,handleMouseLeave:o,handleCellMouseEnter:l,handleCellMouseLeave:A,tooltipContent:c,tooltipTrigger:u}=ite(e),{getRowStyle:h,getRowClass:d,getCellStyle:g,getCellClass:p,getSpan:f,getColspanRealWidth:m}=function(e){const t=pp(Xee),i=KF("table");return{getRowStyle:(e,i)=>{const n=null==t?void 0:t.props.rowStyle;return Oc(n)?n.call(null,{row:e,rowIndex:i}):n||null},getRowClass:(n,s)=>{const r=[i.e("row")];(null==t?void 0:t.props.highlightCurrentRow)&&n===e.store.states.currentRow.value&&r.push("current-row"),e.stripe&&s%2==1&&r.push(i.em("row","striped"));const a=null==t?void 0:t.props.rowClassName;return Gc(a)?r.push(a):Oc(a)&&r.push(a.call(null,{row:n,rowIndex:s})),r},getCellStyle:(i,n,s,r)=>{const a=null==t?void 0:t.props.cellStyle;let o=null!=a?a:{};Oc(a)&&(o=a.call(null,{rowIndex:i,columnIndex:n,row:s,column:r}));const l=Nee(n,null==e?void 0:e.fixed,e.store);return Lee(l,"left"),Lee(l,"right"),Object.assign({},o,l)},getCellClass:(n,s,r,a,o)=>{const l=Mee(i.b(),s,null==e?void 0:e.fixed,e.store,void 0,o),A=[a.id,a.align,a.className,...l],c=null==t?void 0:t.props.cellClassName;return Gc(c)?A.push(c):Oc(c)&&A.push(c.call(null,{rowIndex:n,columnIndex:s,row:r,column:a})),A.push(i.e("cell")),A.filter((e=>Boolean(e))).join(" ")},getSpan:(e,i,n,s)=>{let r=1,a=1;const o=null==t?void 0:t.props.spanMethod;if(Oc(o)){const t=o({row:e,column:i,rowIndex:n,columnIndex:s});Lc(t)?(r=t[0],a=t[1]):"object"==typeof t&&(r=t.rowspan,a=t.colspan)}return{rowspan:r,colspan:a}},getColspanRealWidth:(e,t,i)=>{if(t<1)return e[i].realWidth;const n=e.map((({realWidth:e,width:t})=>e||t)).slice(i,i+t);return Number(n.reduce(((e,t)=>Number(e)+Number(t)),-1))}}}(e),C=qf((()=>e.store.states.columns.value.findIndex((({type:e})=>"default"===e)))),I=(e,i)=>{const n=t.props.rowKey;return n?bee(e,n):i},v=(c,u,v,y=!1)=>{const{tooltipEffect:b,tooltipOptions:E,store:w}=e,{indent:Q,columns:_}=w.states,S=d(c,u);let x=!0;v&&(S.push(i.em("row",`level-${v.level}`)),x=v.display);return Yf("tr",{style:[x?null:{display:"none"},h(c,u)],class:S,key:I(c,u),onDblclick:e=>n(e,c),onClick:e=>s(e,c),onContextmenu:e=>r(e,c),onMouseenter:()=>a(u),onMouseleave:o},_.value.map(((i,n)=>{const{rowspan:s,colspan:r}=f(c,i,u,n);if(!s||!r)return null;const a=Object.assign({},i);a.realWidth=m(_.value,r,n);const o={store:e.store,_self:e.context||t,column:a,row:c,$index:u,cellIndex:n,expanded:y};n===C.value&&v&&(o.treeNode={indent:v.level*Q.value,level:v.level},lL(v.expanded)&&(o.treeNode.expanded=v.expanded,"loading"in v&&(o.treeNode.loading=v.loading),"noLazyChildren"in v&&(o.treeNode.noLazyChildren=v.noLazyChildren)));const h=`${I(c,u)},${n}`,d=a.columnKey||a.rawColumnKey||"",w=i.showOverflowTooltip&&XN({effect:b},E,i.showOverflowTooltip);return Yf(nte,{style:g(u,n,c,i),class:p(u,n,c,i,r-1),key:`${d}${h}`,rowspan:s,colspan:r,onMouseenter:e=>l(e,c,w),onMouseleave:A},{default:()=>B(n,i,o)})})))},B=(e,t,i)=>t.renderCell(i);return{wrappedRowRender:(n,s)=>{const r=e.store,{isRowExpanded:a,assertRowKey:o}=r,{treeData:l,lazyTreeNodeMap:A,childrenColumnName:c,rowKey:u}=r.states,h=r.states.columns.value;if(h.some((({type:e})=>"expand"===e))){const e=a(n),o=v(n,s,void 0,e),l=t.renderExpanded;return e?l?[[o,Yf("tr",{key:`expanded-row__${o.key}`},[Yf("td",{colspan:h.length,class:`${i.e("cell")} ${i.e("expanded-cell")}`},[l({row:n,$index:s,store:r,expanded:e})])])]]:(console.error("[Element Error]renderExpanded is required."),o):[[o]]}if(Object.keys(l.value).length){o();const e=bee(n,u.value);let t=l.value[e],i=null;t&&(i={expanded:t.expanded,level:t.level,display:!0},lL(t.lazy)&&(lL(t.loaded)&&t.loaded&&(i.noLazyChildren=!(t.children&&t.children.length)),i.loading=t.loading));const r=[v(n,s,i)];if(t){let i=0;const a=(e,n)=>{e&&e.length&&n&&e.forEach((e=>{const o={display:n.display&&n.expanded,level:n.level+1,expanded:!1,noLazyChildren:!1,loading:!1},h=bee(e,u.value);if(null==h)throw new Error("For nested data item, row-key is required.");if(t={...l.value[h]},t&&(o.expanded=t.expanded,t.level=t.level||o.level,t.display=!(!t.expanded||!o.display),lL(t.lazy)&&(lL(t.loaded)&&t.loaded&&(o.noLazyChildren=!(t.children&&t.children.length)),o.loading=t.loading)),i++,r.push(v(e,s+i,o)),t){const i=A.value[h]||e[c.value];a(i,t)}}))};t.display=!0;const o=A.value[e]||n[c.value];a(o,t)}return r}return v(n,s,void 0)},tooltipContent:c,tooltipTrigger:u}}var rte=hg({name:"ElTableBody",props:{store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean},setup(e){const t=kf(),i=pp(Xee),n=KF("table"),{wrappedRowRender:s,tooltipContent:r,tooltipTrigger:a}=ste(e),{onColumnsChange:o,onScrollableChange:l}=zee(i),A=[];return Pp(e.store.states.hoverRow,((i,s)=>{var r;const a=null==t?void 0:t.vnode.el,o=Array.from((null==a?void 0:a.children)||[]).filter((e=>null==e?void 0:e.classList.contains(`${n.e("row")}`)));let l=i;const c=null==(r=o[l])?void 0:r.childNodes;if(null==c?void 0:c.length){let e=0;Array.from(c).reduce(((t,i,n)=>{var s,r;return(null==(s=c[n])?void 0:s.colSpan)>1&&(e=null==(r=c[n])?void 0:r.colSpan),"TD"!==i.nodeName&&0===e&&t.push(n),e>0&&e--,t}),[]).forEach((e=>{var t;for(l=i;l>0;){const i=null==(t=o[l-1])?void 0:t.childNodes;if(i[e]&&"TD"===i[e].nodeName&&i[e].rowSpan>1){jU(i[e],"hover-cell"),A.push(i[e]);break}l--}}))}else A.forEach((e=>JU(e,"hover-cell"))),A.length=0;e.store.states.isComplex.value&&bL&&qU((()=>{const e=o[s],t=o[i];e&&!e.classList.contains("hover-fixed-row")&&JU(e,"hover-row"),t&&jU(t,"hover-row")}))})),Sg((()=>{var e;null==(e=kee)||e()})),{ns:n,onColumnsChange:o,onScrollableChange:l,wrappedRowRender:s,tooltipContent:r,tooltipTrigger:a}},render(){const{wrappedRowRender:e,store:t}=this;return Yf("tbody",{tabIndex:-1},[(t.states.data.value||[]).reduce(((t,i)=>t.concat(e(i,t.length))),[])])}});function ate(e){const{columns:t}=function(){const e=pp(Xee),t=null==e?void 0:e.store;return{leftFixedLeafCount:qf((()=>t.states.fixedLeafColumnsLength.value)),rightFixedLeafCount:qf((()=>t.states.rightFixedColumns.value.length)),columnsCount:qf((()=>t.states.columns.value.length)),leftFixedCount:qf((()=>t.states.fixedColumns.value.length)),rightFixedCount:qf((()=>t.states.rightFixedColumns.value.length)),columns:t.states.columns}}(),i=KF("table");return{getCellClasses:(t,n)=>{const s=t[n],r=[i.e("cell"),s.id,s.align,s.labelClassName,...Mee(i.b(),n,s.fixed,e.store)];return s.className&&r.push(s.className),s.children||r.push(i.is("leaf")),r},getCellStyles:(t,i)=>{const n=Nee(i,t.fixed,e.store);return Lee(n,"left"),Lee(n,"right"),n},columns:t}}var ote=hg({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:i,columns:n}=ate(e);return{ns:KF("table"),getCellClasses:t,getCellStyles:i,columns:n}},render(){const{columns:e,getCellStyles:t,getCellClasses:i,summaryMethod:n,sumText:s}=this,r=this.store.states.data.value;let a=[];return n?a=n({columns:e,data:r}):e.forEach(((e,t)=>{if(0===t)return void(a[t]=s);const i=r.map((t=>Number(t[e.property]))),n=[];let o=!0;i.forEach((e=>{if(!Number.isNaN(+e)){o=!1;const t=`${e}`.split(".")[1];n.push(t?t.length:0)}}));const l=Math.max.apply(null,n);a[t]=o?"":i.reduce(((e,t)=>{const i=Number(t);return Number.isNaN(+i)?e:Number.parseFloat((e+t).toFixed(Math.min(l,20)))}),0)})),Yf(Yf("tfoot",[Yf("tr",{},[...e.map(((n,s)=>Yf("td",{key:s,colspan:n.colSpan,rowspan:n.rowSpan,class:i(e,s),style:t(n,s)},[Yf("div",{class:["cell",n.labelClassName]},[a[s]])])))])]))}});function lte(e,t,i,n){const s=zh(!1),r=zh(null),a=zh(!1),o=zh({width:null,height:null,headerHeight:null}),l=zh(!1),A=zh(),c=zh(0),u=zh(0),h=zh(0),d=zh(0),g=zh(0);Hp((()=>{t.setHeight(e.height)})),Hp((()=>{t.setMaxHeight(e.maxHeight)})),Pp((()=>[e.currentRowKey,i.states.rowKey]),(([e,t])=>{ed(t)&&ed(e)&&i.setCurrentRowKey(`${e}`)}),{immediate:!0}),Pp((()=>e.data),(e=>{n.store.commit("setData",e)}),{immediate:!0,deep:!0}),Hp((()=>{e.expandRowKeys&&i.setExpandRowKeysAdapter(e.expandRowKeys)}));const p=qf((()=>e.height||e.maxHeight||i.states.fixedColumns.value.length>0||i.states.rightFixedColumns.value.length>0)),f=qf((()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""}))),m=()=>{p.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(I)};Eg((async()=>{await Qd(),i.updateColumns(),v(),requestAnimationFrame(m);const t=n.vnode.el,s=n.refs.headerWrapper;e.flexible&&t&&t.parentElement&&(t.parentElement.style.minWidth="0"),o.value={width:A.value=t.offsetWidth,height:t.offsetHeight,headerHeight:e.showHeader&&s?s.offsetHeight:null},i.states.columns.value.forEach((e=>{e.filteredValue&&e.filteredValue.length&&n.store.commit("filterChange",{column:e,values:e.filteredValue,silent:!0})})),n.$ready=!0}));const C=e=>{const{tableWrapper:i}=n.refs;((e,i)=>{if(!e)return;const n=Array.from(e.classList).filter((e=>!e.startsWith("is-scrolling-")));n.push(t.scrollX.value?i:"is-scrolling-none"),e.className=n.join(" ")})(i,e)},I=function(){if(!n.refs.scrollBarRef)return;if(!t.scrollX.value){const e="is-scrolling-none";return void((e=>{const{tableWrapper:t}=n.refs;return!(!t||!t.classList.contains(e))})(e)||C(e))}const e=n.refs.scrollBarRef.wrapRef;if(!e)return;const{scrollLeft:i,offsetWidth:s,scrollWidth:r}=e,{headerWrapper:a,footerWrapper:o}=n.refs;a&&(a.scrollLeft=i),o&&(o.scrollLeft=i);C(i>=r-s-1?"is-scrolling-right":0===i?"is-scrolling-left":"is-scrolling-middle")},v=()=>{n.refs.scrollBarRef&&(n.refs.scrollBarRef.wrapRef&&UL(n.refs.scrollBarRef.wrapRef,"scroll",I,{passive:!0}),e.fit?WL(n.vnode.el,B):UL(window,"resize",B),WL(n.refs.bodyWrapper,(()=>{var e,t;B(),null==(t=null==(e=n.refs)?void 0:e.scrollBarRef)||t.update()})))},B=()=>{var t,i,s,r;const a=n.vnode.el;if(!n.$ready||!a)return;let l=!1;const{width:f,height:C,headerHeight:I}=o.value,v=A.value=a.offsetWidth;f!==v&&(l=!0);const B=a.offsetHeight;(e.height||p.value)&&C!==B&&(l=!0);const y="fixed"===e.tableLayout?n.refs.headerWrapper:null==(t=n.refs.tableHeaderRef)?void 0:t.$el;e.showHeader&&(null==y?void 0:y.offsetHeight)!==I&&(l=!0),c.value=(null==(i=n.refs.tableWrapper)?void 0:i.scrollHeight)||0,h.value=(null==y?void 0:y.scrollHeight)||0,d.value=(null==(s=n.refs.footerWrapper)?void 0:s.offsetHeight)||0,g.value=(null==(r=n.refs.appendWrapper)?void 0:r.offsetHeight)||0,u.value=c.value-h.value-d.value-g.value,l&&(o.value={width:v,height:B,headerHeight:e.showHeader&&(null==y?void 0:y.offsetHeight)||0},m())},y=Vj(),b=qf((()=>{const{bodyWidth:e,scrollY:i,gutterWidth:n}=t;return e.value?e.value-(i.value?n:0)+"px":""})),E=qf((()=>e.maxHeight?"fixed":e.tableLayout)),w=qf((()=>{if(e.data&&e.data.length)return null;let t="100%";e.height&&u.value&&(t=`${u.value}px`);const i=A.value;return{width:i?`${i}px`:"",height:t}})),Q=qf((()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${h.value+d.value}px)`}:{maxHeight:e.maxHeight-h.value-d.value+"px"}:{}));return{isHidden:s,renderExpanded:r,setDragVisible:e=>{a.value=e},isGroup:l,handleMouseLeave:()=>{n.store.commit("setHoverRow",null),n.hoverState&&(n.hoverState=null)},handleHeaderFooterMousewheel:(e,t)=>{const{pixelX:i,pixelY:s}=t;Math.abs(i)>=Math.abs(s)&&(n.refs.bodyWrapper.scrollLeft+=t.pixelX/5)},tableSize:y,emptyBlockStyle:w,handleFixedMousewheel:(e,t)=>{const i=n.refs.bodyWrapper;if(Math.abs(t.spinY)>0){const n=i.scrollTop;t.pixelY<0&&0!==n&&e.preventDefault(),t.pixelY>0&&i.scrollHeight-i.clientHeight>n&&e.preventDefault(),i.scrollTop+=Math.ceil(t.pixelY/5)}else i.scrollLeft+=Math.ceil(t.pixelX/5)},resizeProxyVisible:a,bodyWidth:b,resizeState:o,doLayout:m,tableBodyStyles:f,tableLayout:E,scrollbarViewStyle:{display:"inline-block",verticalAlign:"middle"},scrollbarStyle:Q}}function Ate(e){const t=zh();Eg((()=>{(()=>{const i=e.vnode.el.querySelector(".hidden-columns"),n=e.store.states.updateOrderFns;t.value=new MutationObserver((()=>{n.forEach((e=>e()))})),t.value.observe(i,{childList:!0,subtree:!0})})()})),Sg((()=>{var e;null==(e=t.value)||e.disconnect()}))}var cte={data:{type:Array,default:()=>[]},size:bU,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0}};function ute(e){const t="auto"===e.tableLayout;let i=e.columns||[];t&&i.every((e=>void 0===e.width))&&(i=[]);return Yf("colgroup",{},i.map((i=>Yf("col",(i=>{const n={key:`${e.tableLayout}_${i.id}`,style:{},name:void 0};return t?n.style={width:`${i.width}px`}:n.name=i.id,n})(i)))))}ute.props=["columns","tableLayout"];var hte,dte,gte,pte,fte,mte,Cte,Ite,vte,Bte,yte,bte,Ete,wte,Qte,_te=!1;function Ste(){if(!_te){_te=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),i=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(bte=/\b(iPhone|iP[ao]d)/.exec(e),Ete=/\b(iP[ao]d)/.exec(e),Bte=/Android/i.exec(e),wte=/FBAN\/\w+;/i.exec(e),Qte=/Mobile/i.exec(e),yte=!!/Win64/.exec(e),t){(hte=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN)&&document&&document.documentMode&&(hte=document.documentMode);var n=/(?:Trident\/(\d+.\d+))/.exec(e);mte=n?parseFloat(n[1])+4:hte,dte=t[2]?parseFloat(t[2]):NaN,gte=t[3]?parseFloat(t[3]):NaN,(pte=t[4]?parseFloat(t[4]):NaN)?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),fte=t&&t[1]?parseFloat(t[1]):NaN):fte=NaN}else hte=dte=gte=fte=pte=NaN;if(i){if(i[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Cte=!s||parseFloat(s[1].replace("_","."))}else Cte=!1;Ite=!!i[2],vte=!!i[3]}else Cte=Ite=vte=!1}}var xte,kte={ie:function(){return Ste()||hte},ieCompatibilityMode:function(){return Ste()||mte>hte},ie64:function(){return kte.ie()&&yte},firefox:function(){return Ste()||dte},opera:function(){return Ste()||gte},webkit:function(){return Ste()||pte},safari:function(){return kte.webkit()},chrome:function(){return Ste()||fte},windows:function(){return Ste()||Ite},osx:function(){return Ste()||Cte},linux:function(){return Ste()||vte},iphone:function(){return Ste()||bte},mobile:function(){return Ste()||bte||Ete||Bte||Qte},nativeApp:function(){return Ste()||wte},android:function(){return Ste()||Bte},ipad:function(){return Ste()||Ete}},Dte=kte,Fte=!!(typeof window<"u"&&window.document&&window.document.createElement),Tte={canUseDOM:Fte,canUseWorkers:typeof Worker<"u",canUseEventListeners:Fte&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:Fte&&!!window.screen,isInWorker:!Fte};Tte.canUseDOM&&(xte=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var Mte=function(e,t){if(!Tte.canUseDOM||t&&!("addEventListener"in document))return!1;var i="on"+e,n=i in document;if(!n){var s=document.createElement("div");s.setAttribute(i,"return;"),n="function"==typeof s[i]}return!n&&xte&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n};function Rte(e){var t=0,i=0,n=0,s=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),n=10*t,s=10*i,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||s)&&e.deltaMode&&(1==e.deltaMode?(n*=40,s*=40):(n*=800,s*=800)),n&&!t&&(t=n<1?-1:1),s&&!i&&(i=s<1?-1:1),{spinX:t,spinY:i,pixelX:n,pixelY:s}}Rte.getEventType=function(){return Dte.firefox()?"DOMMouseScroll":Mte("wheel")?"wheel":"mousewheel"};var Nte=Rte;
/**
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/let Lte=1;const Ute=hg({name:"ElTable",directives:{Mousewheel:{beforeMount(e,t){!function(e,t){if(e&&e.addEventListener){const i=function(e){const i=Nte(e);t&&Reflect.apply(t,this,[e,i])};e.addEventListener("wheel",i,{passive:!0})}}(e,t.value)}}},components:{TableHeader:ete,TableBody:rte,TableFooter:ote,ElScrollbar:lJ,hColgroup:ute},props:cte,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(e){const{t:t}=CU(),i=KF("table"),n=kf();gp(Xee,n);const s=Kee(n,e);n.store=s;const r=new Vee({store:n.store,table:n,fit:e.fit,showHeader:e.showHeader});n.layout=r;const a=qf((()=>0===(s.states.data.value||[]).length)),{setCurrentRow:o,getSelectionRows:l,toggleRowSelection:A,clearSelection:c,clearFilter:u,toggleAllSelection:h,toggleRowExpansion:d,clearSort:g,sort:p,updateKeyChildren:f}=function(e){return{setCurrentRow:t=>{e.commit("setCurrentRow",t)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(t,i,n=!0)=>{e.toggleRowSelection(t,i,!1,n),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:t=>{e.clearFilter(t)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(t,i)=>{e.toggleRowExpansionAdapter(t,i)},clearSort:()=>{e.clearSort()},sort:(t,i)=>{e.commit("sort",{prop:t,order:i})},updateKeyChildren:(t,i)=>{e.updateKeyChildren(t,i)}}}(s),{isHidden:m,renderExpanded:C,setDragVisible:I,isGroup:v,handleMouseLeave:B,handleHeaderFooterMousewheel:y,tableSize:b,emptyBlockStyle:E,handleFixedMousewheel:w,resizeProxyVisible:Q,bodyWidth:_,resizeState:S,doLayout:x,tableBodyStyles:k,tableLayout:D,scrollbarViewStyle:F,scrollbarStyle:T}=lte(e,r,s,n),{scrollBarRef:M,scrollTo:R,setScrollLeft:N,setScrollTop:L}=(()=>{const e=zh(),t=(t,i)=>{const n=e.value;n&&AL(i)&&["Top","Left"].includes(t)&&n[`setScroll${t}`](i)};return{scrollBarRef:e,scrollTo:(t,i)=>{const n=e.value;n&&n.scrollTo(t,i)},setScrollTop:e=>t("Top",e),setScrollLeft:e=>t("Left",e)}})(),U=RN(x,50),H=`${i.namespace.value}-table_${Lte++}`;n.tableId=H,n.state={isGroup:v,resizeState:S,doLayout:x,debouncedUpdateLayout:U};const P=qf((()=>{var i;return null!=(i=e.sumText)?i:t("el.table.sumText")})),O=qf((()=>{var i;return null!=(i=e.emptyText)?i:t("el.table.emptyText")})),G=qf((()=>Zee(s.states.originColumns.value)[0]));return Ate(n),_g((()=>{U.cancel()})),{ns:i,layout:r,store:s,columns:G,handleHeaderFooterMousewheel:y,handleMouseLeave:B,tableId:H,tableSize:b,isHidden:m,isEmpty:a,renderExpanded:C,resizeProxyVisible:Q,resizeState:S,isGroup:v,bodyWidth:_,tableBodyStyles:k,emptyBlockStyle:E,debouncedUpdateLayout:U,handleFixedMousewheel:w,setCurrentRow:o,getSelectionRows:l,toggleRowSelection:A,clearSelection:c,clearFilter:u,toggleAllSelection:h,toggleRowExpansion:d,clearSort:g,doLayout:x,sort:p,updateKeyChildren:f,t:t,setDragVisible:I,context:n,computedSumText:P,computedEmptyText:O,tableLayout:D,scrollbarViewStyle:F,scrollbarStyle:T,scrollBarRef:M,scrollTo:R,setScrollLeft:N,setScrollTop:L}}});var Hte=KU(Ute,[["render",function(e,t,i,n,s,r){const a=Mg("hColgroup"),o=Mg("table-header"),l=Mg("table-body"),A=Mg("table-footer"),c=Mg("el-scrollbar"),u=Lg("mousewheel");return af(),cf("div",{ref:"tableWrapper",class:pu([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:0!==(e.store.states.data.value||[]).length&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:cu(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:e.handleMouseLeave},[ff("div",{class:pu(e.ns.e("inner-wrapper"))},[ff("div",{ref:"hiddenColumns",class:"hidden-columns"},[Gg(e.$slots,"default")],512),e.showHeader&&"fixed"===e.tableLayout?Ld((af(),cf("div",{key:0,ref:"headerWrapper",class:pu(e.ns.e("header-wrapper"))},[ff("table",{ref:"tableHeader",class:pu(e.ns.e("header")),style:cu(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[mf(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),mf(o,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,"append-filter-panel-to":e.appendFilterPanelTo,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","onSetDragVisible"])],6)],2)),[[u,e.handleHeaderFooterMousewheel]]):Bf("v-if",!0),ff("div",{ref:"bodyWrapper",class:pu(e.ns.e("body-wrapper"))},[mf(c,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn,tabindex:e.scrollbarTabindex,onScroll:t=>e.$emit("scroll",t)},{default:Nd((()=>[ff("table",{ref:"tableBody",class:pu(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:cu({width:e.bodyWidth,tableLayout:e.tableLayout})},[mf(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&"auto"===e.tableLayout?(af(),uf(o,{key:0,ref:"tableHeaderRef",class:pu(e.ns.e("body-header")),border:e.border,"default-sort":e.defaultSort,store:e.store,"append-filter-panel-to":e.appendFilterPanelTo,onSetDragVisible:e.setDragVisible},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):Bf("v-if",!0),mf(l,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&"auto"===e.tableLayout?(af(),uf(A,{key:1,class:pu(e.ns.e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):Bf("v-if",!0)],6),e.isEmpty?(af(),cf("div",{key:0,ref:"emptyBlock",style:cu(e.emptyBlockStyle),class:pu(e.ns.e("empty-block"))},[ff("span",{class:pu(e.ns.e("empty-text"))},[Gg(e.$slots,"empty",{},(()=>[vf(yu(e.computedEmptyText),1)]))],2)],6)):Bf("v-if",!0),e.$slots.append?(af(),cf("div",{key:1,ref:"appendWrapper",class:pu(e.ns.e("append-wrapper"))},[Gg(e.$slots,"append")],2)):Bf("v-if",!0)])),_:3},8,["view-style","wrap-style","always","tabindex","onScroll"])],2),e.showSummary&&"fixed"===e.tableLayout?Ld((af(),cf("div",{key:1,ref:"footerWrapper",class:pu(e.ns.e("footer-wrapper"))},[ff("table",{class:pu(e.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:cu(e.tableBodyStyles)},[mf(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),mf(A,{border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[ym,!e.isEmpty],[u,e.handleHeaderFooterMousewheel]]):Bf("v-if",!0),e.border||e.isGroup?(af(),cf("div",{key:2,class:pu(e.ns.e("border-left-patch"))},null,2)):Bf("v-if",!0)],2),Ld(ff("div",{ref:"resizeProxy",class:pu(e.ns.e("column-resize-proxy"))},null,2),[[ym,e.resizeProxyVisible]])],46,["data-prefix","onMouseleave"])}],["__file","table.vue"]]);const Pte={selection:"table-column--selection",expand:"table__expand-column"},Ote={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},Gte={selection:{renderHeader:({store:e,column:t})=>Yf(r0,{disabled:e.states.data.value&&0===e.states.data.value.length,size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value,ariaLabel:t.label}),renderCell:({row:e,column:t,store:i,$index:n})=>Yf(r0,{disabled:!!t.selectable&&!t.selectable.call(null,e,n),size:i.states.tableSize.value,onChange:()=>{i.commit("rowSelectedChanged",e)},onClick:e=>e.stopPropagation(),modelValue:i.isSelected(e),ariaLabel:t.label}),sortable:!1,resizable:!1},index:{renderHeader:({column:e})=>e.label||"#",renderCell({column:e,$index:t}){let i=t+1;const n=e.index;return AL(n)?i=t+n:Oc(n)&&(i=n(t)),Yf("div",{},[i])},sortable:!1},expand:{renderHeader:({column:e})=>e.label||"",renderCell({row:e,store:t,expanded:i}){const{ns:n}=t,s=[n.e("expand-icon")];i&&s.push(n.em("expand-icon","expanded"));return Yf("div",{class:s,onClick:function(i){i.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[Yf(gH,null,{default:()=>[Yf(MH)]})]})},sortable:!1,resizable:!1}};function Kte({row:e,column:t,$index:i}){var n;const s=t.property,r=s&&FU(e,s).value;return t&&t.formatter?t.formatter(e,t,r,i):(null==(n=null==r?void 0:r.toString)?void 0:n.call(r))||""}function qte(e,t){return e.reduce(((e,t)=>(e[t]=t,e)),t)}function Yte(e,t,i){const n=kf(),s=zh(""),r=zh(!1),a=zh(),o=zh(),l=KF("table");Hp((()=>{a.value=e.align?`is-${e.align}`:null,a.value})),Hp((()=>{o.value=e.headerAlign?`is-${e.headerAlign}`:a.value,o.value}));const A=qf((()=>{let e=n.vnode.vParent||n.parent;for(;e&&!e.tableId&&!e.columnId;)e=e.vnode.vParent||e.parent;return e})),c=qf((()=>{const{store:e}=n.parent;if(!e)return!1;const{treeData:t}=e.states,i=t.value;return i&&Object.keys(i).length>0})),u=zh(wee(e.width)),h=zh(Qee(e.minWidth));return{columnId:s,realAlign:a,isSubColumn:r,realHeaderAlign:o,columnOrTableParent:A,setColumnWidth:e=>(u.value&&(e.width=u.value),h.value&&(e.minWidth=h.value),!u.value&&h.value&&(e.width=void 0),e.minWidth||(e.minWidth=80),e.realWidth=Number(void 0===e.width?e.minWidth:e.width),e),setColumnForcedProps:e=>{const t=e.type,i=Gte[t]||{};Object.keys(i).forEach((t=>{const n=i[t];"className"!==t&&void 0!==n&&(e[t]=n)}));const n=(e=>Pte[e]||"")(t);if(n){const t=`${ed(l.namespace)}-${n}`;e.className=e.className?`${e.className} ${t}`:t}return e},setColumnRenders:s=>{e.renderHeader||"selection"!==s.type&&(s.renderHeader=e=>(n.columnConfig.value.label,Gg(t,"header",e,(()=>[s.label])))),t["filter-icon"]&&(s.renderFilterIcon=e=>Gg(t,"filter-icon",e));let r=s.renderCell;return"expand"===s.type?(s.renderCell=e=>Yf("div",{class:"cell"},[r(e)]),i.value.renderExpanded=e=>t.default?t.default(e):t.default):(r=r||Kte,s.renderCell=e=>{let a=null;if(t.default){const i=t.default(e);a=i.some((e=>e.type!==tf))?i:r(e)}else a=r(e);const{columns:o}=i.value.store.states,A=o.value.findIndex((e=>"default"===e.type)),u=function({row:e,treeNode:t,store:i},n=!1){const{ns:s}=i;if(!t)return n?[Yf("span",{class:s.e("placeholder")})]:null;const r=[],a=function(n){n.stopPropagation(),t.loading||i.loadOrToggle(e)};if(t.indent&&r.push(Yf("span",{class:s.e("indent"),style:{"padding-left":`${t.indent}px`}})),lL(t.expanded)&&!t.noLazyChildren){const e=[s.e("expand-icon"),t.expanded?s.em("expand-icon","expanded"):""];let i=MH;t.loading&&(i=qq),r.push(Yf("div",{class:e,onClick:a},{default:()=>[Yf(gH,{class:{[s.is("loading")]:t.loading}},{default:()=>[Yf(i)]})]}))}else r.push(Yf("span",{class:s.e("placeholder")}));return r}(e,c.value&&e.cellIndex===A),h={class:"cell",style:{}};return s.showOverflowTooltip&&(h.class=`${h.class} ${ed(l.namespace)}-tooltip`,h.style={width:(e.column.realWidth||Number(e.column.width))-1+"px"}),(e=>{function t(e){var t;"ElTableColumn"===(null==(t=null==e?void 0:e.type)?void 0:t.name)&&(e.vParent=n)}Lc(e)?e.forEach((e=>t(e))):t(e)})(a),Yf("div",h,[u,a])}),s},getPropsData:(...t)=>t.reduce(((t,i)=>(Lc(i)&&i.forEach((i=>{t[i]=e[i]})),t)),{}),getColumnElIndex:(e,t)=>Array.prototype.indexOf.call(e,t),updateColumnOrder:()=>{i.value.store.commit("updateColumnOrder",n.columnConfig.value)}}}var Vte={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every((e=>["ascending","descending",null].includes(e)))}};let Wte=1;var jte=hg({name:"ElTableColumn",components:{ElCheckbox:r0},props:Vte,setup(e,{slots:t}){const i=kf(),n=zh({}),s=qf((()=>{let e=i.parent;for(;e&&!e.tableId;)e=e.parent;return e})),{registerNormalWatchers:r,registerComplexWatchers:a}=function(e,t){const i=kf();return{registerComplexWatchers:()=>{const n={realWidth:"width",realMinWidth:"minWidth"},s=qte(["fixed"],n);Object.keys(s).forEach((s=>{const r=n[s];Nc(t,r)&&Pp((()=>t[r]),(t=>{let n=t;"width"===r&&"realWidth"===s&&(n=wee(t)),"minWidth"===r&&"realMinWidth"===s&&(n=Qee(t)),i.columnConfig.value[r]=n,i.columnConfig.value[s]=n;const a="fixed"===r;e.value.store.scheduleLayout(a)}))}))},registerNormalWatchers:()=>{const e={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},n=qte(["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip"],e);Object.keys(n).forEach((n=>{const s=e[n];Nc(t,s)&&Pp((()=>t[s]),(e=>{i.columnConfig.value[n]=e}))}))}}}(s,e),{columnId:o,isSubColumn:l,realHeaderAlign:A,columnOrTableParent:c,setColumnWidth:u,setColumnForcedProps:h,setColumnRenders:d,getPropsData:g,getColumnElIndex:p,realAlign:f,updateColumnOrder:m}=Yte(e,t,s),C=c.value;o.value=`${C.tableId||C.columnId}_column_${Wte++}`,bg((()=>{l.value=s.value!==C;const t=e.type||"default",c=""===e.sortable||e.sortable,p=oL(e.showOverflowTooltip)?C.props.showOverflowTooltip:e.showOverflowTooltip,m={...Ote[t],id:o.value,type:t,property:e.prop||e.property,align:f,headerAlign:A,showOverflowTooltip:p,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:c,index:e.index,rawColumnKey:i.vnode.key};let I=g(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);I=function(e,t){const i={};let n;for(n in e)i[n]=e[n];for(n in t)if(Nc(t,n)){const e=t[n];void 0!==e&&(i[n]=e)}return i}(m,I);const v=function(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...i)=>e(t(...i))))}(d,u,h);I=v(I),n.value=I,r(),a()})),Eg((()=>{var e;const t=c.value,r=l.value?t.vnode.el.children:null==(e=t.refs.hiddenColumns)?void 0:e.children,a=()=>p(r||[],i.vnode.el);n.value.getColumnIndex=a;a()>-1&&s.value.store.commit("insertColumn",n.value,l.value?t.columnConfig.value:null,m)})),_g((()=>{const e=n.value.getColumnIndex;(e?e():-1)>-1&&s.value.store.commit("removeColumn",n.value,l.value?C.columnConfig.value:null,m)})),i.columnId=o.value,i.columnConfig=n},render(){var e,t,i;try{const n=null==(t=(e=this.$slots).default)?void 0:t.call(e,{row:{},column:{},$index:-1}),s=[];if(Lc(n))for(const e of n)"ElTableColumn"===(null==(i=e.type)?void 0:i.name)||2&e.shapeFlag?s.push(e):e.type===Zp&&Lc(e.children)&&e.children.forEach((e=>{1024===(null==e?void 0:e.patchFlag)||Gc(null==e?void 0:e.children)||s.push(e)}));return Yf("div",s)}catch(I2){return Yf("div",[])}}});const Jte=lH(Hte,{TableColumn:jte}),zte=cH(jte);var Xte=(e=>(e.ASC="asc",e.DESC="desc",e))(Xte||{}),$te=(e=>(e.CENTER="center",e.RIGHT="right",e))($te||{}),Zte=(e=>(e.LEFT="left",e.RIGHT="right",e))(Zte||{});const eie={asc:"desc",desc:"asc"
/* ASC */},tie=Symbol("placeholder");const iie=(e,{mainTableRef:t,leftTableRef:i,rightTableRef:n,tableInstance:s,ns:r,isScrolling:a})=>{const o=kf(),{emit:l}=o,A=Xh(!1),c=zh(e.defaultExpandedRowKeys||[]),u=zh(-1),h=Xh(null),d=zh({}),g=zh({}),p=Xh({}),f=Xh({}),m=Xh({}),C=qf((()=>AL(e.estimatedRowHeight)));const I=RN((()=>{var e,s,r,a;A.value=!0,d.value={...ed(d),...ed(g)},v(ed(h),!1),g.value={},h.value=null,null==(e=t.value)||e.forceUpdate(),null==(s=i.value)||s.forceUpdate(),null==(r=n.value)||r.forceUpdate(),null==(a=o.proxy)||a.$forceUpdate(),A.value=!1}),0);function v(e,s=!1){ed(C)&&[t,i,n].forEach((t=>{const i=ed(t);i&&i.resetAfterRowIndex(e,s)}))}return{expandedRowKeys:c,lastRenderedRowIndex:u,isDynamic:C,isResetting:A,rowHeights:d,resetAfterIndex:v,onRowExpanded:function({expanded:t,rowData:i,rowIndex:n,rowKey:s}){var r,a;const o=[...ed(c)],A=o.indexOf(s);t?-1===A&&o.push(s):A>-1&&o.splice(A,1),c.value=o,l("update:expandedRowKeys",o),null==(r=e.onRowExpand)||r.call(e,{expanded:t,rowData:i,rowIndex:n,rowKey:s}),null==(a=e.onExpandedRowsChange)||a.call(e,o)},onRowHovered:function({hovered:e,rowKey:t}){if(a.value)return;s.vnode.el.querySelectorAll(`[rowkey="${String(t)}"]`).forEach((t=>{e?t.classList.add(r.is("hovered")):t.classList.remove(r.is("hovered"))}))},onRowsRendered:function(t){var i;null==(i=e.onRowsRendered)||i.call(e,t),t.rowCacheEnd>ed(u)&&(u.value=t.rowCacheEnd)},onRowHeightChange:function({rowKey:e,height:t,rowIndex:i},n){n?n===Zte.RIGHT?m.value[e]=t:p.value[e]=t:f.value[e]=t;const s=Math.max(...[p,m,f].map((t=>t.value[e]||0)));ed(d)[e]!==s&&(!function(e,t,i){const n=ed(h);(null===n||n>i)&&(h.value=i),g.value[e]=t}(e,s,i),I())}}},nie=(e,t)=>e+t,sie=e=>Lc(e)?e.reduce(nie,0):e,rie=(e,t,i={})=>Oc(e)?e(t):null!=e?e:i,aie=e=>(["width","maxWidth","minWidth","height"].forEach((t=>{e[t]=$U(e[t])})),e),oie=e=>hf(e)?t=>Yf(e,t):e;function lie(e){const t=zh(),i=zh(),n=zh(),{columns:s,columnsStyles:r,columnsTotalWidth:a,fixedColumnsOnLeft:o,fixedColumnsOnRight:l,hasFixedColumns:A,mainColumns:c,onColumnSorted:u}=function(e,t,i){const n=qf((()=>ed(t).map(((e,t)=>{var i,n;return{...e,key:null!=(n=null!=(i=e.key)?i:e.dataKey)?n:t}})))),s=qf((()=>ed(n).filter((e=>!e.hidden)))),r=qf((()=>ed(s).filter((e=>"left"===e.fixed||!0===e.fixed)))),a=qf((()=>ed(s).filter((e=>"right"===e.fixed)))),o=qf((()=>ed(s).filter((e=>!e.fixed)))),l=qf((()=>{const e=[];return ed(r).forEach((t=>{e.push({...t,placeholderSign:tie})})),ed(o).forEach((t=>{e.push(t)})),ed(a).forEach((t=>{e.push({...t,placeholderSign:tie})})),e})),A=qf((()=>ed(r).length||ed(a).length)),c=qf((()=>ed(n).reduce(((t,n)=>(t[n.key]=((e,t,i)=>{var n;const s={flexGrow:0,flexShrink:0,...i?{}:{flexGrow:e.flexGrow||0,flexShrink:e.flexShrink||1}};i||(s.flexShrink=1);const r={...null!=(n=e.style)?n:{},...s,flexBasis:"auto",width:e.width};return t||(e.maxWidth&&(r.maxWidth=e.maxWidth),e.minWidth&&(r.minWidth=e.minWidth)),r})(n,ed(i),e.fixed),t)),{}))),u=qf((()=>ed(s).reduce(((e,t)=>e+t.width),0))),h=e=>ed(n).find((t=>t.key===e));return{columns:n,columnsStyles:c,columnsTotalWidth:u,fixedColumnsOnLeft:r,fixedColumnsOnRight:a,hasFixedColumns:A,mainColumns:l,normalColumns:o,visibleColumns:s,getColumn:h,getColumnStyle:e=>ed(c)[e],updateColumnWidth:(e,t)=>{e.width=t},onColumnSorted:function(t){var i;const{key:n}=t.currentTarget.dataset;if(!n)return;const{sortState:s,sortBy:r}=e;let a=Xte.ASC;a=qc(s)?eie[s[n]]:eie[r.order],null==(i=e.onColumnSort)||i.call(e,{column:h(n),key:n,order:a})}}}(e,ld(e,"columns"),ld(e,"fixed")),{scrollTo:h,scrollToLeft:d,scrollToTop:g,scrollToRow:p,onScroll:f,onVerticalScroll:m,scrollPos:C}=((e,{mainTableRef:t,leftTableRef:i,rightTableRef:n,onMaybeEndReached:s})=>{const r=zh({scrollLeft:0,scrollTop:0});function a(e){var s,r,a;const{scrollTop:o}=e;null==(s=t.value)||s.scrollTo(e),null==(r=i.value)||r.scrollToTop(o),null==(a=n.value)||a.scrollToTop(o)}function o(e){r.value=e,a(e)}function l(e){r.value.scrollTop=e,a(ed(r))}return Pp((()=>ed(r).scrollTop),((e,t)=>{e>t&&s()})),{scrollPos:r,scrollTo:o,scrollToLeft:function(e){var i,n;r.value.scrollLeft=e,null==(n=null==(i=t.value)?void 0:i.scrollTo)||n.call(i,ed(r))},scrollToTop:l,scrollToRow:function(e,i="auto"){var n;null==(n=t.value)||n.scrollToRow(e,i)},onScroll:function(t){var i;o(t),null==(i=e.onScroll)||i.call(e,t)},onVerticalScroll:function({scrollTop:e}){const{scrollTop:t}=ed(r);e!==t&&l(e)}}})(e,{mainTableRef:t,leftTableRef:i,rightTableRef:n,onMaybeEndReached:function(){const{onEndReached:t}=e;if(!t)return;const{scrollTop:i}=ed(C),n=ed(P),s=ed(O),r=n-(i+s)+e.hScrollbarSize;ed(b)>=0&&n===i+ed(N)-ed(Y)&&t(r)}}),I=KF("table-v2"),v=kf(),B=Xh(!1),{expandedRowKeys:y,lastRenderedRowIndex:b,isDynamic:E,isResetting:w,rowHeights:Q,resetAfterIndex:_,onRowExpanded:S,onRowHeightChange:x,onRowHovered:k,onRowsRendered:D}=iie(e,{mainTableRef:t,leftTableRef:i,rightTableRef:n,tableInstance:v,ns:I,isScrolling:B}),{data:F,depthMap:T}=((e,{expandedRowKeys:t,lastRenderedRowIndex:i,resetAfterIndex:n})=>{const s=zh({}),r=qf((()=>{const i={},{data:n,rowKey:r}=e,a=ed(t);if(!a||!a.length)return n;const o=[],l=new Set;a.forEach((e=>l.add(e)));let A=n.slice();for(A.forEach((e=>i[e[r]]=0));A.length>0;){const e=A.shift();o.push(e),l.has(e[r])&&Lc(e.children)&&e.children.length>0&&(A=[...e.children,...A],e.children.forEach((t=>i[t[r]]=i[e[r]]+1)))}return s.value=i,o})),a=qf((()=>{const{data:t,expandColumnKey:i}=e;return i?ed(r):t}));return Pp(a,((e,t)=>{e!==t&&(i.value=-1,n(0,!0))})),{data:a,depthMap:s}})(e,{expandedRowKeys:y,lastRenderedRowIndex:b,resetAfterIndex:_}),{bodyWidth:M,fixedTableHeight:R,mainTableHeight:N,leftTableWidth:L,rightTableWidth:U,headerWidth:H,rowsHeight:P,windowHeight:O,footerHeight:G,emptyStyle:K,rootStyle:q,headerHeight:Y}=((e,{columnsTotalWidth:t,data:i,fixedColumnsOnLeft:n,fixedColumnsOnRight:s})=>{const r=qf((()=>{const{fixed:i,width:n,vScrollbarSize:s}=e,r=n-s;return i?Math.max(Math.round(ed(t)),r):r})),a=qf((()=>ed(r)+e.vScrollbarSize)),o=qf((()=>{const{height:t=0,maxHeight:i=0,footerHeight:n,hScrollbarSize:s}=e;if(i>0){const e=ed(g),t=ed(l),r=ed(d)+e+t+s;return Math.min(r,i-n)}return t-n})),l=qf((()=>{const{rowHeight:t,estimatedRowHeight:n}=e,s=ed(i);return AL(n)?s.length*n:s.length*t})),A=qf((()=>{const{maxHeight:t}=e,i=ed(o);if(AL(t)&&t>0)return i;const n=ed(l)+ed(d)+ed(g);return Math.min(i,n)})),c=e=>e.width,u=qf((()=>sie(ed(n).map(c)))),h=qf((()=>sie(ed(s).map(c)))),d=qf((()=>sie(e.headerHeight))),g=qf((()=>{var t;return((null==(t=e.fixedData)?void 0:t.length)||0)*e.rowHeight})),p=qf((()=>ed(o)-ed(d)-ed(g))),f=qf((()=>{const{style:t={},height:i,width:n}=e;return aie({...t,height:i,width:n})})),m=qf((()=>aie({height:e.footerHeight}))),C=qf((()=>({top:$U(ed(d)),bottom:$U(e.footerHeight),width:$U(e.width)})));return{bodyWidth:r,fixedTableHeight:A,mainTableHeight:o,leftTableWidth:u,rightTableWidth:h,headerWidth:a,rowsHeight:l,windowHeight:p,footerHeight:m,emptyStyle:C,rootStyle:f,headerHeight:d}})(e,{columnsTotalWidth:a,data:F,fixedColumnsOnLeft:o,fixedColumnsOnRight:l}),V=zh(),W=qf((()=>{const t=0===ed(F).length;return Lc(e.fixedData)?0===e.fixedData.length&&t:t}));return Pp((()=>e.expandedRowKeys),(e=>y.value=e),{deep:!0}),{columns:s,containerRef:V,mainTableRef:t,leftTableRef:i,rightTableRef:n,isDynamic:E,isResetting:w,isScrolling:B,hasFixedColumns:A,columnsStyles:r,columnsTotalWidth:a,data:F,expandedRowKeys:y,depthMap:T,fixedColumnsOnLeft:o,fixedColumnsOnRight:l,mainColumns:c,bodyWidth:M,emptyStyle:K,rootStyle:q,headerWidth:H,footerHeight:G,mainTableHeight:N,fixedTableHeight:R,leftTableWidth:L,rightTableWidth:U,showEmpty:W,getRowHeight:function(t){const{estimatedRowHeight:i,rowHeight:n,rowKey:s}=e;return i?ed(Q)[ed(F)[t][s]]||i:n},onColumnSorted:u,onRowHovered:k,onRowExpanded:S,onRowsRendered:D,onRowHeightChange:x,scrollTo:h,scrollToLeft:d,scrollToTop:g,scrollToRow:p,onScroll:f,onVerticalScroll:m}}const Aie=Symbol("tableV2"),cie=String,uie={type:Array,required:!0},hie={type:Array},die={...hie,required:!0},gie={type:Array,default:()=>[]},pie={type:Number,required:!0},fie={type:[String,Number,Symbol],default:"id"},mie={type:Object},Cie=BU({class:String,columns:uie,columnsStyles:{type:Object,required:!0},depth:Number,expandColumnKey:String,estimatedRowHeight:{...r7.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:Function},onRowHover:{type:Function},onRowHeightChange:{type:Function},rowData:{type:Object,required:!0},rowEventHandlers:{type:Object},rowIndex:{type:Number,required:!0},rowKey:fie,style:{type:Object}}),Iie={type:Number,required:!0},vie=BU({class:String,columns:uie,fixedHeaderData:{type:Array},headerData:{type:Array,required:!0},headerHeight:{type:[Number,Array],default:50},rowWidth:Iie,rowHeight:{type:Number,default:50},height:Iie,width:Iie}),Bie=BU({columns:uie,data:die,fixedData:hie,estimatedRowHeight:Cie.estimatedRowHeight,width:pie,height:pie,headerWidth:pie,headerHeight:vie.headerHeight,bodyWidth:pie,rowHeight:pie,cache:t7.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:r7.scrollbarAlwaysOn,scrollbarStartGap:r7.scrollbarStartGap,scrollbarEndGap:r7.scrollbarEndGap,class:cie,style:mie,containerStyle:mie,getRowHeight:{type:Function,required:!0},rowKey:Cie.rowKey,onRowsRendered:{type:Function},onScroll:{type:Function}}),yie=BU({cache:Bie.cache,estimatedRowHeight:Cie.estimatedRowHeight,rowKey:fie,headerClass:{type:[String,Function]},headerProps:{type:[Object,Function]},headerCellProps:{type:[Object,Function]},headerHeight:vie.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:[String,Function]},rowProps:{type:[Object,Function]},rowHeight:{type:Number,default:50},cellProps:{type:[Object,Function]},columns:uie,data:die,dataGetter:{type:Function},fixedData:hie,expandColumnKey:Cie.expandColumnKey,expandedRowKeys:gie,defaultExpandedRowKeys:gie,class:cie,fixed:Boolean,style:{type:Object},width:pie,height:pie,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:r7.hScrollbarSize,vScrollbarSize:r7.vScrollbarSize,scrollbarAlwaysOn:a7.alwaysOn,sortBy:{type:Object,default:()=>({})},sortState:{type:Object,default:void 0},onColumnSort:{type:Function},onExpandedRowsChange:{type:Function},onEndReached:{type:Function},onRowExpand:Cie.onRowExpand,onScroll:Bie.onScroll,onRowsRendered:Bie.onRowsRendered,rowEventHandlers:Cie.rowEventHandlers}),bie=hg({name:"ElTableV2Header",props:vie,setup(e,{slots:t,expose:i}){const n=KF("table-v2"),s=pp("tableV2GridScrollLeft"),r=zh(),a=qf((()=>aie({width:e.width,height:e.height}))),o=qf((()=>aie({width:e.rowWidth,height:e.height}))),l=qf((()=>hR(ed(e.headerHeight)))),A=e=>{const t=ed(r);Qd((()=>{(null==t?void 0:t.scroll)&&t.scroll({left:e})}))},c=()=>{const i=n.e("fixed-header-row"),{columns:s,fixedHeaderData:r,rowHeight:a}=e;return null==r?void 0:r.map(((e,n)=>{var r;const o=aie({height:a,width:"100%"});return null==(r=t.fixed)?void 0:r.call(t,{class:i,columns:s,rowData:e,rowIndex:-(n+1),style:o})}))},u=()=>{const i=n.e("dynamic-header-row"),{columns:s}=e;return ed(l).map(((e,n)=>{var r;const a=aie({width:"100%",height:e});return null==(r=t.dynamic)?void 0:r.call(t,{class:i,columns:s,headerIndex:n,style:a})}))};return Qg((()=>{(null==s?void 0:s.value)&&A(s.value)})),i({scrollToLeft:A}),()=>{if(!(e.height<=0))return mf("div",{ref:r,class:e.class,style:ed(a),role:"rowgroup"},[mf("div",{style:ed(o),class:n.e("header")},[u(),c()])])}}});var Eie=bie;const wie=({name:e,clearCache:t,getColumnPosition:i,getColumnStartIndexForOffset:n,getColumnStopIndexForStartIndex:s,getEstimatedTotalHeight:r,getEstimatedTotalWidth:a,getColumnOffset:o,getRowOffset:l,getRowPosition:A,getRowStartIndexForOffset:c,getRowStopIndexForStartIndex:u,initCache:h,injectToInstance:d,validateProps:g})=>hg({name:null!=e?e:"ElVirtualList",props:r7,emits:[k5,D5],setup(e,{emit:p,expose:f,slots:m}){const C=KF("vl");g(e);const I=kf(),v=zh(h(e,I));null==d||d(I,v);const B=zh(),y=zh(),b=zh(),E=zh(null),w=zh({isScrolling:!1,scrollLeft:AL(e.initScrollLeft)?e.initScrollLeft:0,scrollTop:AL(e.initScrollTop)?e.initScrollTop:0,updateRequested:!1,xAxisScrollDir:F5,yAxisScrollDir:F5}),Q=x5(),_=qf((()=>Number.parseInt(`${e.height}`,10))),S=qf((()=>Number.parseInt(`${e.width}`,10))),x=qf((()=>{const{totalColumn:t,totalRow:i,columnCache:r}=e,{isScrolling:a,xAxisScrollDir:o,scrollLeft:l}=ed(w);if(0===t||0===i)return[0,0,0,0];const A=n(e,l,ed(v)),c=s(e,A,l,ed(v)),u=a&&o!==T5?1:Math.max(1,r),h=a&&o!==F5?1:Math.max(1,r);return[Math.max(0,A-u),Math.max(0,Math.min(t-1,c+h)),A,c]})),k=qf((()=>{const{totalColumn:t,totalRow:i,rowCache:n}=e,{isScrolling:s,yAxisScrollDir:r,scrollTop:a}=ed(w);if(0===t||0===i)return[0,0,0,0];const o=c(e,a,ed(v)),l=u(e,o,a,ed(v)),A=s&&r!==T5?1:Math.max(1,n),h=s&&r!==F5?1:Math.max(1,n);return[Math.max(0,o-A),Math.max(0,Math.min(i-1,l+h)),o,l]})),D=qf((()=>r(e,ed(v)))),F=qf((()=>a(e,ed(v)))),T=qf((()=>{var t;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:e.direction,height:AL(e.height)?`${e.height}px`:e.height,width:AL(e.width)?`${e.width}px`:e.width},null!=(t=e.style)?t:{}]})),M=qf((()=>{const e=`${ed(F)}px`;return{height:`${ed(D)}px`,pointerEvents:ed(w).isScrolling?"none":void 0,width:e}})),R=()=>{const{totalColumn:t,totalRow:i}=e;if(t>0&&i>0){const[e,t,i,n]=ed(x),[s,r,a,o]=ed(k);p(k5,{columnCacheStart:e,columnCacheEnd:t,rowCacheStart:s,rowCacheEnd:r,columnVisibleStart:i,columnVisibleEnd:n,rowVisibleStart:a,rowVisibleEnd:o})}const{scrollLeft:n,scrollTop:s,updateRequested:r,xAxisScrollDir:a,yAxisScrollDir:o}=ed(w);p(D5,{xAxisScrollDir:a,scrollLeft:n,yAxisScrollDir:o,scrollTop:s,updateRequested:r})},N=t=>{const{clientHeight:i,clientWidth:n,scrollHeight:s,scrollLeft:r,scrollTop:a,scrollWidth:o}=t.currentTarget,l=ed(w);if(l.scrollTop===a&&l.scrollLeft===r)return;let A=r;if(A7(e.direction))switch(u7()){case G5:A=-r;break;case q5:A=o-n-r}w.value={...l,isScrolling:!0,scrollLeft:A,scrollTop:Math.max(0,Math.min(a,s-i)),updateRequested:!0,xAxisScrollDir:o7(l.scrollLeft,A),yAxisScrollDir:o7(l.scrollTop,a)},Qd((()=>G())),K(),R()},L=(e,t)=>{const i=ed(_),n=(D.value-i)/t*e;P({scrollTop:Math.min(D.value-i,n)})},U=(e,t)=>{const i=ed(S),n=(F.value-i)/t*e;P({scrollLeft:Math.min(F.value-i,n)})},{onWheel:H}=(({atXEndEdge:e,atXStartEdge:t,atYEndEdge:i,atYStartEdge:n},s)=>{let r=null,a=0,o=0;const l=(s,r)=>{const a=s<=0&&t.value||s>=0&&e.value,o=r<=0&&n.value||r>=0&&i.value;return a&&o};return{hasReachedEdge:l,onWheel:e=>{YU(r);let t=e.deltaX,i=e.deltaY;Math.abs(t)>Math.abs(i)?i=0:t=0,e.shiftKey&&0!==i&&(t=i,i=0),l(a,o)&&l(a+t,o+i)||(a+=t,o+=i,e.preventDefault(),r=qU((()=>{s(a,o),a=0,o=0})))}}})({atXStartEdge:qf((()=>w.value.scrollLeft<=0)),atXEndEdge:qf((()=>w.value.scrollLeft>=F.value-ed(S))),atYStartEdge:qf((()=>w.value.scrollTop<=0)),atYEndEdge:qf((()=>w.value.scrollTop>=D.value-ed(_)))},((e,t)=>{var i,n,s,r;null==(n=null==(i=y.value)?void 0:i.onMouseUp)||n.call(i),null==(r=null==(s=b.value)?void 0:s.onMouseUp)||r.call(s);const a=ed(S),o=ed(_);P({scrollLeft:Math.min(w.value.scrollLeft+e,F.value-a),scrollTop:Math.min(w.value.scrollTop+t,D.value-o)})}));UL(B,"wheel",H,{passive:!1});const P=({scrollLeft:e=w.value.scrollLeft,scrollTop:t=w.value.scrollTop})=>{e=Math.max(e,0),t=Math.max(t,0);const i=ed(w);t===i.scrollTop&&e===i.scrollLeft||(w.value={...i,xAxisScrollDir:o7(i.scrollLeft,e),yAxisScrollDir:o7(i.scrollTop,t),scrollLeft:e,scrollTop:t,updateRequested:!0},Qd((()=>G())),K(),R())},O=(n,s)=>{const{columnWidth:r,direction:a,rowHeight:o}=e,l=Q.value(t&&r,t&&o,t&&a),c=`${n},${s}`;if(Nc(l,c))return l[c];{const[,t]=i(e,s,ed(v)),r=ed(v),o=A7(a),[u,h]=A(e,n,r),[d]=i(e,s,r);return l[c]={position:"absolute",left:o?void 0:`${t}px`,right:o?`${t}px`:void 0,top:`${h}px`,height:`${u}px`,width:`${d}px`},l[c]}},G=()=>{w.value.isScrolling=!1,Qd((()=>{Q.value(-1,null,null)}))};Eg((()=>{if(!bL)return;const{initScrollLeft:t,initScrollTop:i}=e,n=ed(B);n&&(AL(t)&&(n.scrollLeft=t),AL(i)&&(n.scrollTop=i)),R()}));const K=()=>{const{direction:t}=e,{scrollLeft:i,scrollTop:n,updateRequested:s}=ed(w),r=ed(B);if(s&&r){if(t===O5)switch(u7()){case G5:r.scrollLeft=-i;break;case K5:r.scrollLeft=i;break;default:{const{clientWidth:e,scrollWidth:t}=r;r.scrollLeft=t-e-i;break}}else r.scrollLeft=Math.max(0,i);r.scrollTop=Math.max(0,n)}},{resetAfterColumnIndex:q,resetAfterRowIndex:Y,resetAfter:V}=I.proxy;f({windowRef:B,innerRef:E,getItemStyleCache:Q,scrollTo:P,scrollToItem:(t=0,i=0,n=M5)=>{const s=ed(w);i=Math.max(0,Math.min(i,e.totalColumn-1)),t=Math.max(0,Math.min(t,e.totalRow-1));const A=iH(C.namespace.value),c=ed(v),u=r(e,c),h=a(e,c);P({scrollLeft:o(e,i,n,s.scrollLeft,c,h>e.width?A:0),scrollTop:l(e,t,n,s.scrollTop,c,u>e.height?A:0)})},states:w,resetAfterColumnIndex:q,resetAfterRowIndex:Y,resetAfter:V});const W=()=>{const t=Ng(e.innerElement),i=(()=>{var t;const[i,n]=ed(x),[s,r]=ed(k),{data:a,totalColumn:o,totalRow:l,useIsScrolling:A,itemKey:c}=e,u=[];if(l>0&&o>0)for(let e=s;e<=r;e++)for(let s=i;s<=n;s++){const i=c({columnIndex:s,data:a,rowIndex:e});u.push(Yf(Zp,{key:i},null==(t=m.default)?void 0:t.call(m,{columnIndex:s,data:a,isScrolling:A?ed(w).isScrolling:void 0,style:O(e,s),rowIndex:e})))}return u})();return[Yf(t,{style:ed(M),ref:E},Gc(t)?i:{default:()=>i})]};return()=>{const t=Ng(e.containerElement),{horizontalScrollbar:i,verticalScrollbar:n}=(()=>{const{scrollbarAlwaysOn:t,scrollbarStartGap:i,scrollbarEndGap:n,totalColumn:s,totalRow:r}=e,a=ed(S),o=ed(_),l=ed(F),A=ed(D),{scrollLeft:c,scrollTop:u}=ed(w);return{horizontalScrollbar:Yf(h7,{ref:y,alwaysOn:t,startGap:i,endGap:n,class:C.e("horizontal"),clientSize:a,layout:"horizontal",onScroll:U,ratio:100*a/l,scrollFrom:c/(l-a),total:r,visible:!0}),verticalScrollbar:Yf(h7,{ref:b,alwaysOn:t,startGap:i,endGap:n,class:C.e("vertical"),clientSize:o,layout:"vertical",onScroll:L,ratio:100*o/A,scrollFrom:u/(A-o),total:s,visible:!0})}})(),s=W();return Yf("div",{key:0,class:C.e("wrapper"),role:e.role},[Yf(t,{class:e.className,style:ed(T),onScroll:N,ref:B},Gc(t)?s:{default:()=>s}),i,n])}}}),{max:Qie,min:_ie,floor:Sie}=Math,xie={column:"columnWidth",row:"rowHeight"},kie={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},Die=(e,t,i,n)=>{const[s,r,a]=[i[n],e[xie[n]],i[kie[n]]];if(t>a){let e=0;if(a>=0){const t=s[a];e=t.offset+t.size}for(let i=a+1;i<=t;i++){const t=r(i);s[i]={offset:e,size:t},e+=t}i[kie[n]]=t}return s[t]},Fie=(e,t,i,n,s,r)=>{for(;i<=n;){const a=i+Sie((n-i)/2),o=Die(e,a,t,r).offset;if(o===s)return a;o<s?i=a+1:n=a-1}return Qie(0,i-1)},Tie=(e,t,i,n)=>{const[s,r]=[t[n],t[kie[n]]];return(r>0?s[r].offset:0)>=i?Fie(e,t,0,r,i,n):((e,t,i,n,s)=>{const r="column"===s?e.totalColumn:e.totalRow;let a=1;for(;i<r&&Die(e,i,t,s).offset<n;)i+=a,a*=2;return Fie(e,t,Sie(i/2),_ie(i,r-1),n,s)})(e,t,Qie(0,r),i,n)},Mie=({totalRow:e},{estimatedRowHeight:t,lastVisitedRowIndex:i,row:n})=>{let s=0;if(i>=e&&(i=e-1),i>=0){const e=n[i];s=e.offset+e.size}return s+(e-i-1)*t},Rie=({totalColumn:e},{column:t,estimatedColumnWidth:i,lastVisitedColumnIndex:n})=>{let s=0;if(n>e&&(n=e-1),n>=0){const e=t[n];s=e.offset+e.size}return s+(e-n-1)*i},Nie={column:Rie,row:Mie},Lie=(e,t,i,n,s,r,a)=>{const[o,l]=["row"===r?e.height:e.width,Nie[r]],A=Die(e,t,s,r),c=l(e,s),u=Qie(0,_ie(c-o,A.offset)),h=Qie(0,A.offset-o+a+A.size);switch(i===R5&&(i=n>=h-o&&n<=u+o?M5:L5),i){case N5:return u;case U5:return h;case L5:return Math.round(h+(u-h)/2);default:return n>=h&&n<=u?n:h>u||n<h?h:u}},Uie=wie({name:"ElDynamicSizeGrid",getColumnPosition:(e,t,i)=>{const n=Die(e,t,i,"column");return[n.size,n.offset]},getRowPosition:(e,t,i)=>{const n=Die(e,t,i,"row");return[n.size,n.offset]},getColumnOffset:(e,t,i,n,s,r)=>Lie(e,t,i,n,s,"column",r),getRowOffset:(e,t,i,n,s,r)=>Lie(e,t,i,n,s,"row",r),getColumnStartIndexForOffset:(e,t,i)=>Tie(e,i,t,"column"),getColumnStopIndexForStartIndex:(e,t,i,n)=>{const s=Die(e,t,n,"column"),r=i+e.width;let a=s.offset+s.size,o=t;for(;o<e.totalColumn-1&&a<r;)o++,a+=Die(e,t,n,"column").size;return o},getEstimatedTotalHeight:Mie,getEstimatedTotalWidth:Rie,getRowStartIndexForOffset:(e,t,i)=>Tie(e,i,t,"row"),getRowStopIndexForStartIndex:(e,t,i,n)=>{const{totalRow:s,height:r}=e,a=Die(e,t,n,"row"),o=i+r;let l=a.size+a.offset,A=t;for(;A<s-1&&l<o;)A++,l+=Die(e,A,n,"row").size;return A},injectToInstance:(e,t)=>{const i=({columnIndex:i,rowIndex:n},s)=>{var r,a;s=!!oL(s)||s,AL(i)&&(t.value.lastVisitedColumnIndex=Math.min(t.value.lastVisitedColumnIndex,i-1)),AL(n)&&(t.value.lastVisitedRowIndex=Math.min(t.value.lastVisitedRowIndex,n-1)),null==(r=e.exposed)||r.getItemStyleCache.value(-1,null,null),s&&(null==(a=e.proxy)||a.$forceUpdate())};Object.assign(e.proxy,{resetAfterColumnIndex:(e,t)=>{i({columnIndex:e},t)},resetAfterRowIndex:(e,t)=>{i({rowIndex:e},t)},resetAfter:i})},initCache:({estimatedColumnWidth:e=50,estimatedRowHeight:t=50})=>({column:{},estimatedColumnWidth:e,estimatedRowHeight:t,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:e,rowHeight:t})=>{}}),Hie=wie({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:e},t)=>[e,t*e],getRowPosition:({rowHeight:e},t)=>[e,t*e],getEstimatedTotalHeight:({totalRow:e,rowHeight:t})=>t*e,getEstimatedTotalWidth:({totalColumn:e,columnWidth:t})=>t*e,getColumnOffset:({totalColumn:e,columnWidth:t,width:i},n,s,r,a,o)=>{i=Number(i);const l=Math.max(0,e*t-i),A=Math.min(l,n*t),c=Math.max(0,n*t-i+o+t);switch("smart"===s&&(s=r>=c-i&&r<=A+i?M5:L5),s){case N5:return A;case U5:return c;case L5:{const e=Math.round(c+(A-c)/2);return e<Math.ceil(i/2)?0:e>l+Math.floor(i/2)?l:e}default:return r>=c&&r<=A?r:c>A||r<c?c:A}},getRowOffset:({rowHeight:e,height:t,totalRow:i},n,s,r,a,o)=>{t=Number(t);const l=Math.max(0,i*e-t),A=Math.min(l,n*e),c=Math.max(0,n*e-t+o+e);switch(s===R5&&(s=r>=c-t&&r<=A+t?M5:L5),s){case N5:return A;case U5:return c;case L5:{const e=Math.round(c+(A-c)/2);return e<Math.ceil(t/2)?0:e>l+Math.floor(t/2)?l:e}default:return r>=c&&r<=A?r:c>A||r<c?c:A}},getColumnStartIndexForOffset:({columnWidth:e,totalColumn:t},i)=>Math.max(0,Math.min(t-1,Math.floor(i/e))),getColumnStopIndexForStartIndex:({columnWidth:e,totalColumn:t,width:i},n,s)=>{const r=n*e,a=Math.ceil((i+s-r)/e);return Math.max(0,Math.min(t-1,n+a-1))},getRowStartIndexForOffset:({rowHeight:e,totalRow:t},i)=>Math.max(0,Math.min(t-1,Math.floor(i/e))),getRowStopIndexForStartIndex:({rowHeight:e,totalRow:t,height:i},n,s)=>{const r=n*e,a=Math.ceil((i+s-r)/e);return Math.max(0,Math.min(t-1,n+a-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:e,rowHeight:t})=>{}}),Pie=hg({name:"ElTableV2Grid",props:Bie,setup(e,{slots:t,expose:i}){const{ns:n}=pp(Aie),{bodyRef:s,fixedRowHeight:r,gridHeight:a,hasHeader:o,headerRef:l,headerHeight:A,totalHeight:c,forceUpdate:u,itemKey:h,onItemRendered:d,resetAfterRowIndex:g,scrollTo:p,scrollToTop:f,scrollToRow:m,scrollLeft:C}=(e=>{const t=zh(),i=zh(),n=zh(0),s=qf((()=>{const{data:t,rowHeight:i,estimatedRowHeight:n}=e;if(!n)return t.length*i})),r=qf((()=>{const{fixedData:t,rowHeight:i}=e;return((null==t?void 0:t.length)||0)*i})),a=qf((()=>sie(e.headerHeight))),o=qf((()=>{const{height:t}=e;return Math.max(0,t-ed(a)-ed(r))})),l=qf((()=>ed(a)+ed(r)>0));return{bodyRef:i,forceUpdate:function(){var e,n;null==(e=ed(i))||e.$forceUpdate(),null==(n=ed(t))||n.$forceUpdate()},fixedRowHeight:r,gridHeight:o,hasHeader:l,headerHeight:a,headerRef:t,totalHeight:s,itemKey:({data:t,rowIndex:i})=>t[i][e.rowKey],onItemRendered:function({rowCacheStart:t,rowCacheEnd:i,rowVisibleStart:n,rowVisibleEnd:s}){var r;null==(r=e.onRowsRendered)||r.call(e,{rowCacheStart:t,rowCacheEnd:i,rowVisibleStart:n,rowVisibleEnd:s})},resetAfterRowIndex:function(e,t){var n;null==(n=i.value)||n.resetAfterRowIndex(e,t)},scrollTo:function(e,s){const r=ed(t),a=ed(i);qc(e)?(null==r||r.scrollToLeft(e.scrollLeft),n.value=e.scrollLeft,null==a||a.scrollTo(e)):(null==r||r.scrollToLeft(e),n.value=e,null==a||a.scrollTo({scrollLeft:e,scrollTop:s}))},scrollToTop:function(e){var t;null==(t=ed(i))||t.scrollTo({scrollTop:e})},scrollToRow:function(e,t){var n;null==(n=ed(i))||n.scrollToItem(e,1,t)},scrollLeft:n}})(e);gp("tableV2GridScrollLeft",C),i({forceUpdate:u,totalHeight:c,scrollTo:p,scrollToTop:f,scrollToRow:m,resetAfterRowIndex:g});const I=()=>e.bodyWidth;return()=>{const{cache:i,columns:c,data:u,fixedData:g,useIsScrolling:p,scrollbarAlwaysOn:f,scrollbarEndGap:m,scrollbarStartGap:C,style:v,rowHeight:B,bodyWidth:y,estimatedRowHeight:b,headerWidth:E,height:w,width:Q,getRowHeight:_,onScroll:S}=e,x=AL(b),k=x?Uie:Hie,D=ed(A);return mf("div",{role:"table",class:[n.e("table"),e.class],style:v},[mf(k,{ref:s,data:u,useIsScrolling:p,itemKey:h,columnCache:0,columnWidth:x?I:y,totalColumn:1,totalRow:u.length,rowCache:i,rowHeight:x?_:B,width:Q,height:ed(a),class:n.e("body"),role:"rowgroup",scrollbarStartGap:C,scrollbarEndGap:m,scrollbarAlwaysOn:f,onScroll:S,onItemRendered:d,perfMode:!1},{default:e=>{var i;const n=u[e.rowIndex];return null==(i=t.row)?void 0:i.call(t,{...e,columns:c,rowData:n})}}),ed(o)&&mf(Eie,{ref:l,class:n.e("header-wrapper"),columns:c,headerData:u,headerHeight:e.headerHeight,fixedHeaderData:g,rowWidth:E,rowHeight:B,width:Q,height:Math.min(D+ed(r),w)},{dynamic:t.header,fixed:t.row})])}}});var Oie=Pie;var Gie=(e,{slots:t})=>{const{mainTableRef:i,...n}=e;return mf(Oie,wf({ref:i},n),"function"==typeof(s=t)||"[object Object]"===Object.prototype.toString.call(s)&&!hf(s)?t:{default:()=>[t]});var s};var Kie=(e,{slots:t})=>{if(!e.columns.length)return;const{leftTableRef:i,...n}=e;return mf(Oie,wf({ref:i},n),"function"==typeof(s=t)||"[object Object]"===Object.prototype.toString.call(s)&&!hf(s)?t:{default:()=>[t]});var s};var qie=(e,{slots:t})=>{if(!e.columns.length)return;const{rightTableRef:i,...n}=e;return mf(Oie,wf({ref:i},n),"function"==typeof(s=t)||"[object Object]"===Object.prototype.toString.call(s)&&!hf(s)?t:{default:()=>[t]});var s};const Yie=e=>{const{isScrolling:t}=pp(Aie),i=zh(!1),n=zh(),s=qf((()=>AL(e.estimatedRowHeight)&&e.rowIndex>=0)),r=qf((()=>{const{rowData:t,rowIndex:i,rowKey:n,onRowHover:s}=e,r=e.rowEventHandlers||{},a={};return Object.entries(r).forEach((([e,s])=>{Oc(s)&&(a[e]=e=>{s({event:e,rowData:t,rowIndex:i,rowKey:n})})})),s&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach((({name:e,hovered:r})=>{const o=a[e];a[e]=e=>{s({event:e,hovered:r,rowData:t,rowIndex:i,rowKey:n}),null==o||o(e)}})),a}));return Eg((()=>{ed(s)&&((t=!1)=>{const s=ed(n);if(!s)return;const{columns:r,onRowHeightChange:a,rowKey:o,rowIndex:l,style:A}=e,{height:c}=s.getBoundingClientRect();i.value=!0,Qd((()=>{if(t||c!==Number.parseInt(A.height)){const e=r[0],t=(null==e?void 0:e.placeholderSign)===tie;null==a||a({rowKey:o,height:c,rowIndex:l},e&&!t&&e.fixed)}}))})(!0)})),{isScrolling:t,measurable:s,measured:i,rowRef:n,eventHandlers:r,onExpand:t=>{const{onRowExpand:i,rowData:n,rowIndex:s,rowKey:r}=e;null==i||i({expanded:t,rowData:n,rowIndex:s,rowKey:r})}}},Vie=hg({name:"ElTableV2TableRow",props:Cie,setup(e,{expose:t,slots:i,attrs:n}){const{eventHandlers:s,isScrolling:r,measurable:a,measured:o,rowRef:l,onExpand:A}=Yie(e);return t({onExpand:A}),()=>{const{columns:t,columnsStyles:c,expandColumnKey:u,depth:h,rowData:d,rowIndex:g,style:p}=e;let f=t.map(((e,n)=>{const s=Lc(d.children)&&d.children.length>0&&e.key===u;return i.cell({column:e,columns:t,columnIndex:n,depth:h,style:c[e.key],rowData:d,rowIndex:g,isScrolling:ed(r),expandIconProps:s?{rowData:d,rowIndex:g,onExpand:A}:void 0})}));if(i.row&&(f=i.row({cells:f.map((e=>Lc(e)&&1===e.length?e[0]:e)),style:p,columns:t,depth:h,rowData:d,rowIndex:g,isScrolling:ed(r)})),ed(a)){const{height:t,...i}=p||{},r=ed(o);return mf("div",wf({ref:l,class:e.class,style:r?p:i,role:"row"},n,ed(s)),[f])}return mf("div",wf(n,{ref:l,class:e.class,style:p,role:"row"},ed(s)),[f])}}});var Wie=Vie;var jie=(e,{slots:t})=>{const{columns:i,columnsStyles:n,depthMap:s,expandColumnKey:r,expandedRowKeys:a,estimatedRowHeight:o,hasFixedColumns:l,rowData:A,rowIndex:c,style:u,isScrolling:h,rowProps:d,rowClass:g,rowKey:p,rowEventHandlers:f,ns:m,onRowHovered:C,onRowExpanded:I}=e,v=rie(g,{columns:i,rowData:A,rowIndex:c},""),B=rie(d,{columns:i,rowData:A,rowIndex:c}),y=A[p],b=s[y]||0,E=Boolean(r),w=c<0,Q=[m.e("row"),v,{[m.e(`row-depth-${b}`)]:E&&c>=0,[m.is("expanded")]:E&&a.includes(y),[m.is("fixed")]:!b&&w,[m.is("customized")]:Boolean(t.row)}],_=l?C:void 0,S={...B,columns:i,columnsStyles:n,class:Q,depth:b,expandColumnKey:r,estimatedRowHeight:w?void 0:o,isScrolling:h,rowIndex:c,rowData:A,rowKey:y,rowEventHandlers:f,style:u};return mf(Wie,wf(S,{onRowExpand:I,onMouseenter:e=>{null==_||_({hovered:!0,rowKey:y,event:e,rowData:A,rowIndex:c})},onMouseleave:e=>{null==_||_({hovered:!1,rowKey:y,event:e,rowData:A,rowIndex:c})},rowkey:y}),"function"==typeof(x=t)||"[object Object]"===Object.prototype.toString.call(x)&&!hf(x)?t:{default:()=>[t]});var x};const Jie=(e,{slots:t})=>{var i;const{cellData:n,style:s}=e,r=(null==(i=null==n?void 0:n.toString)?void 0:i.call(n))||"",a=Gg(t,"default",e,(()=>[r]));return mf("div",{class:e.class,title:r,style:s},[a])};Jie.displayName="ElTableV2Cell",Jie.inheritAttrs=!1;var zie=Jie;var Xie=e=>{const{expanded:t,expandable:i,onExpand:n,style:s,size:r}=e,a={onClick:i?()=>n(!t):void 0,class:e.class};return mf(gH,wf(a,{size:r,style:s}),{default:()=>[mf(MH,null,null)]})};const $ie=({columns:e,column:t,columnIndex:i,depth:n,expandIconProps:s,isScrolling:r,rowData:a,rowIndex:o,style:l,expandedRowKeys:A,ns:c,cellProps:u,expandColumnKey:h,indentSize:d,iconSize:g,rowKey:p},{slots:f})=>{const m=aie(l);if(t.placeholderSign===tie)return mf("div",{class:c.em("row-cell","placeholder"),style:m},null);const{cellRenderer:C,dataKey:I,dataGetter:v}=t,B=Oc(v)?v({columns:e,column:t,columnIndex:i,rowData:a,rowIndex:o}):$M(a,null!=I?I:""),y=rie(u,{cellData:B,columns:e,column:t,columnIndex:i,rowIndex:o,rowData:a}),b={class:c.e("cell-text"),columns:e,column:t,columnIndex:i,cellData:B,isScrolling:r,rowData:a,rowIndex:o},E=oie(C),w=E?E(b):Gg(f,"default",b,(()=>[mf(zie,b,null)])),Q=[c.e("row-cell"),t.class,t.align===$te.CENTER&&c.is("align-center"),t.align===$te.RIGHT&&c.is("align-right")],_=o>=0&&h&&t.key===h,S=o>=0&&A.includes(a[p]);let x;const k=`margin-inline-start: ${n*d}px;`;return _&&(x=qc(s)?mf(Xie,wf(s,{class:[c.e("expand-icon"),c.is("expanded",S)],size:g,expanded:S,style:k,expandable:!0}),null):mf("div",{style:[k,`width: ${g}px; height: ${g}px;`].join(" ")},null)),mf("div",wf({class:Q,style:m},y,{role:"cell"}),[x,w])};$ie.inheritAttrs=!1;var Zie=$ie;const ene=hg({name:"ElTableV2HeaderRow",props:BU({class:String,columns:uie,columnsStyles:{type:Object,required:!0},headerIndex:Number,style:{type:Object}}),setup:(e,{slots:t})=>()=>{const{columns:i,columnsStyles:n,headerIndex:s,style:r}=e;let a=i.map(((e,r)=>t.cell({columns:i,column:e,columnIndex:r,headerIndex:s,style:n[e.key]})));return t.header&&(a=t.header({cells:a.map((e=>Lc(e)&&1===e.length?e[0]:e)),columns:i,headerIndex:s})),mf("div",{class:e.class,style:r,role:"row"},[a])}});var tne=ene;var ine=({columns:e,columnsStyles:t,headerIndex:i,style:n,headerClass:s,headerProps:r,ns:a},{slots:o})=>{const l={columns:e,headerIndex:i},A=[a.e("header-row"),rie(s,l,""),{[a.is("customized")]:Boolean(o.header)}],c={...rie(r,l),columnsStyles:t,class:A,columns:e,headerIndex:i,style:n};return mf(tne,c,"function"==typeof(u=o)||"[object Object]"===Object.prototype.toString.call(u)&&!hf(u)?o:{default:()=>[o]});var u};const nne=(e,{slots:t})=>Gg(t,"default",e,(()=>{var t,i;return[mf("div",{class:e.class,title:null==(t=e.column)?void 0:t.title},[null==(i=e.column)?void 0:i.title])]}));nne.displayName="ElTableV2HeaderCell",nne.inheritAttrs=!1;var sne=nne;var rne=e=>{const{sortOrder:t}=e;return mf(gH,{size:14,class:e.class},{default:()=>[t===Xte.ASC?mf(CW,null,null):mf(mW,null,null)]})};var ane=(e,{slots:t})=>{const{column:i,ns:n,style:s,onColumnSorted:r}=e,a=aie(s);if(i.placeholderSign===tie)return mf("div",{class:n.em("header-row-cell","placeholder"),style:a},null);const{headerCellRenderer:o,headerClass:l,sortable:A}=i,c={...e,class:n.e("header-cell-text")},u=oie(o),h=u?u(c):Gg(t,"default",c,(()=>[mf(sne,c,null)])),{sortBy:d,sortState:g,headerCellProps:p}=e;let f,m;if(g){const e=g[i.key];f=Boolean(eie[e]),m=f?e:Xte.ASC}else f=i.key===d.key,m=f?d.order:Xte.ASC;const C=[n.e("header-cell"),rie(l,e,""),i.align===$te.CENTER&&n.is("align-center"),i.align===$te.RIGHT&&n.is("align-right"),A&&n.is("sortable")],I={...rie(p,e),onClick:i.sortable?r:void 0,class:C,style:a,"data-key":i.key};return mf("div",wf(I,{role:"columnheader"}),[h,A&&mf(rne,{class:[n.e("sort-icon"),f&&n.is("sorting")],sortOrder:m},null)])};const one=(e,{slots:t})=>{var i;return mf("div",{class:e.class,style:e.style},[null==(i=t.default)?void 0:i.call(t)])};one.displayName="ElTableV2Footer";var lne=one;const Ane=(e,{slots:t})=>{const i=Gg(t,"default",{},(()=>[mf(v6,null,null)]));return mf("div",{class:e.class,style:e.style},[i])};Ane.displayName="ElTableV2Empty";var cne=Ane;const une=(e,{slots:t})=>{var i;return mf("div",{class:e.class,style:e.style},[null==(i=t.default)?void 0:i.call(t)])};une.displayName="ElTableV2Overlay";var hne=une;function dne(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!hf(e)}const gne=hg({name:"ElTableV2",props:yie,setup(e,{slots:t,expose:i}){const n=KF("table-v2"),{columnsStyles:s,fixedColumnsOnLeft:r,fixedColumnsOnRight:a,mainColumns:o,mainTableHeight:l,fixedTableHeight:A,leftTableWidth:c,rightTableWidth:u,data:h,depthMap:d,expandedRowKeys:g,hasFixedColumns:p,mainTableRef:f,leftTableRef:m,rightTableRef:C,isDynamic:I,isResetting:v,isScrolling:B,bodyWidth:y,emptyStyle:b,rootStyle:E,headerWidth:w,footerHeight:Q,showEmpty:_,scrollTo:S,scrollToLeft:x,scrollToTop:k,scrollToRow:D,getRowHeight:F,onColumnSorted:T,onRowHeightChange:M,onRowHovered:R,onRowExpanded:N,onRowsRendered:L,onScroll:U,onVerticalScroll:H}=lie(e);return i({scrollTo:S,scrollToLeft:x,scrollToTop:k,scrollToRow:D}),gp(Aie,{ns:n,isResetting:v,isScrolling:B}),()=>{const{cache:i,cellProps:v,estimatedRowHeight:B,expandColumnKey:S,fixedData:x,headerHeight:k,headerClass:D,headerProps:P,headerCellProps:O,sortBy:G,sortState:K,rowHeight:q,rowClass:Y,rowEventHandlers:V,rowKey:W,rowProps:j,scrollbarAlwaysOn:J,indentSize:z,iconSize:X,useIsScrolling:$,vScrollbarSize:Z,width:ee}=e,te=ed(h),ie={cache:i,class:n.e("main"),columns:ed(o),data:te,fixedData:x,estimatedRowHeight:B,bodyWidth:ed(y)+Z,headerHeight:k,headerWidth:ed(w),height:ed(l),mainTableRef:f,rowKey:W,rowHeight:q,scrollbarAlwaysOn:J,scrollbarStartGap:2,scrollbarEndGap:Z,useIsScrolling:$,width:ee,getRowHeight:F,onRowsRendered:L,onScroll:U},ne=ed(c),se=ed(A),re={cache:i,class:n.e("left"),columns:ed(r),data:te,estimatedRowHeight:B,leftTableRef:m,rowHeight:q,bodyWidth:ne,headerWidth:ne,headerHeight:k,height:se,rowKey:W,scrollbarAlwaysOn:J,scrollbarStartGap:2,scrollbarEndGap:Z,useIsScrolling:$,width:ne,getRowHeight:F,onScroll:H},ae=ed(u)+Z,oe={cache:i,class:n.e("right"),columns:ed(a),data:te,estimatedRowHeight:B,rightTableRef:C,rowHeight:q,bodyWidth:ae,headerWidth:ae,headerHeight:k,height:se,rowKey:W,scrollbarAlwaysOn:J,scrollbarStartGap:2,scrollbarEndGap:Z,width:ae,style:`--${ed(n.namespace)}-table-scrollbar-size: ${Z}px`,useIsScrolling:$,getRowHeight:F,onScroll:H},le=ed(s),Ae={ns:n,depthMap:ed(d),columnsStyles:le,expandColumnKey:S,expandedRowKeys:ed(g),estimatedRowHeight:B,hasFixedColumns:ed(p),rowProps:j,rowClass:Y,rowKey:W,rowEventHandlers:V,onRowHovered:R,onRowExpanded:N,onRowHeightChange:M},ce={cellProps:v,expandColumnKey:S,indentSize:z,iconSize:X,rowKey:W,expandedRowKeys:ed(g),ns:n},ue={ns:n,headerClass:D,headerProps:P,columnsStyles:le},he={ns:n,sortBy:G,sortState:K,headerCellProps:O,onColumnSorted:T},de={row:e=>mf(jie,wf(e,Ae),{row:t.row,cell:e=>{let i;return t.cell?mf(Zie,wf(e,ce,{style:le[e.column.key]}),dne(i=t.cell(e))?i:{default:()=>[i]}):mf(Zie,wf(e,ce,{style:le[e.column.key]}),null)}}),header:e=>mf(ine,wf(e,ue),{header:t.header,cell:e=>{let i;return t["header-cell"]?mf(ane,wf(e,he,{style:le[e.column.key]}),dne(i=t["header-cell"](e))?i:{default:()=>[i]}):mf(ane,wf(e,he,{style:le[e.column.key]}),null)}})},ge=[e.class,n.b(),n.e("root"),{[n.is("dynamic")]:ed(I)}],pe={class:n.e("footer"),style:ed(Q)};return mf("div",{class:ge,style:ed(E)},[mf(Gie,ie,dne(de)?de:{default:()=>[de]}),mf(Kie,re,dne(de)?de:{default:()=>[de]}),mf(qie,oe,dne(de)?de:{default:()=>[de]}),t.footer&&mf(lne,pe,{default:t.footer}),ed(_)&&mf(cne,{class:n.e("empty"),style:ed(b)},{default:t.empty}),t.overlay&&mf(hne,{class:n.e("overlay")},{default:t.overlay})])}}});var pne=gne;const fne=BU({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:Function}}),mne=hg({name:"ElAutoResizer",props:fne,setup(e,{slots:t}){const i=KF("auto-resizer"),{height:n,width:s,sizer:r}=(e=>{const t=zh(),i=zh(0),n=zh(0);let s;return Eg((()=>{s=WL(t,(([e])=>{const{width:t,height:s}=e.contentRect,{paddingLeft:r,paddingRight:a,paddingTop:o,paddingBottom:l}=getComputedStyle(e.target),A=Number.parseInt(r)||0,c=Number.parseInt(a)||0,u=Number.parseInt(o)||0,h=Number.parseInt(l)||0;i.value=t-A-c,n.value=s-u-h})).stop})),_g((()=>{null==s||s()})),Pp([i,n],(([t,i])=>{var n;null==(n=e.onResize)||n.call(e,{width:t,height:i})})),{sizer:t,width:i,height:n}})(e),a={width:"100%",height:"100%"};return()=>{var e;return mf("div",{ref:r,class:i.b(),style:a},[null==(e=t.default)?void 0:e.call(t,{height:n.value,width:s.value})])}}});var Cne=mne;const Ine=lH(pne),vne=lH(Cne),Bne=Symbol("tabsRootContextKey"),yne=BU({tabs:{type:Array,default:()=>[]}}),bne="ElTabBar",Ene=hg({...hg({name:bne}),props:yne,setup(e,{expose:t}){const i=e,n=kf(),s=pp(Bne);s||lU(bne,"<el-tabs><el-tab-bar /></el-tabs>");const r=KF("tabs"),a=zh(),o=zh(),l=()=>o.value=(()=>{let e=0,t=0;const r=["top","bottom"].includes(s.props.tabPosition)?"width":"height",a="width"===r?"x":"y",o="x"===a?"left":"top";return i.tabs.every((i=>{var s,a;const l=null==(a=null==(s=n.parent)?void 0:s.refs)?void 0:a[`tab-${i.uid}`];if(!l)return!1;if(!i.active)return!0;e=l[`offset${D0(o)}`],t=l[`client${D0(r)}`];const A=window.getComputedStyle(l);return"width"===r&&(t-=Number.parseFloat(A.paddingLeft)+Number.parseFloat(A.paddingRight),e+=Number.parseFloat(A.paddingLeft)),!1})),{[r]:`${t}px`,transform:`translate${D0(a)}(${e}px)`}})(),A=[];Pp((()=>i.tabs),(async()=>{await Qd(),l(),(()=>{var e;A.forEach((e=>e.stop())),A.length=0;const t=null==(e=n.parent)?void 0:e.refs;if(t)for(const i in t)if(i.startsWith("tab-")){const e=t[i];e&&A.push(WL(e,l))}})()}),{immediate:!0});const c=WL(a,(()=>l()));return _g((()=>{A.forEach((e=>e.stop())),A.length=0,c.stop()})),t({ref:a,update:l}),(e,t)=>(af(),cf("div",{ref_key:"barRef",ref:a,class:pu([ed(r).e("active-bar"),ed(r).is(ed(s).props.tabPosition)]),style:cu(o.value)},null,6))}});var wne=KU(Ene,[["__file","tab-bar.vue"]]);const Qne=BU({panes:{type:Array,default:()=>[]},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),_ne="ElTabNav",Sne=hg({name:_ne,props:Qne,emits:{tabClick:(e,t,i)=>i instanceof Event,tabRemove:(e,t)=>t instanceof Event},setup(e,{expose:t,emit:i}){const n=pp(Bne);n||lU(_ne,"<el-tabs><tab-nav /></el-tabs>");const s=KF("tabs"),r=function({document:e=LL}={}){if(!e)return zh("visible");const t=zh(e.visibilityState);return UL(e,"visibilitychange",(()=>{t.value=e.visibilityState})),t}(),a=function({window:e=NL}={}){if(!e)return zh(!1);const t=zh(e.document.hasFocus());return UL(e,"blur",(()=>{t.value=!1})),UL(e,"focus",(()=>{t.value=!0})),t}(),o=zh(),l=zh(),A=zh(),c=zh(),u=zh(!1),h=zh(0),d=zh(!1),g=zh(!0),p=qf((()=>["top","bottom"].includes(n.props.tabPosition)?"width":"height")),f=qf((()=>({transform:`translate${"width"===p.value?"X":"Y"}(-${h.value}px)`}))),m=()=>{if(!o.value)return;const e=o.value[`offset${D0(p.value)}`],t=h.value;if(!t)return;const i=t>e?t-e:0;h.value=i},C=()=>{if(!o.value||!l.value)return;const e=l.value[`offset${D0(p.value)}`],t=o.value[`offset${D0(p.value)}`],i=h.value;if(e-i<=t)return;const n=e-i>2*t?i+t:e-t;h.value=n},I=async()=>{const e=l.value;if(!(u.value&&A.value&&o.value&&e))return;await Qd();const t=A.value.querySelector(".is-active");if(!t)return;const i=o.value,s=["top","bottom"].includes(n.props.tabPosition),r=t.getBoundingClientRect(),a=i.getBoundingClientRect(),c=s?e.offsetWidth-a.width:e.offsetHeight-a.height,d=h.value;let g=d;s?(r.left<a.left&&(g=d-(a.left-r.left)),r.right>a.right&&(g=d+r.right-a.right)):(r.top<a.top&&(g=d-(a.top-r.top)),r.bottom>a.bottom&&(g=d+(r.bottom-a.bottom))),g=Math.max(g,0),h.value=Math.min(g,c)},v=()=>{var t;if(!l.value||!o.value)return;e.stretch&&(null==(t=c.value)||t.update());const i=l.value[`offset${D0(p.value)}`],n=o.value[`offset${D0(p.value)}`],s=h.value;n<i?(u.value=u.value||{},u.value.prev=s,u.value.next=s+n<i,i-s<n&&(h.value=i-n)):(u.value=!1,s>0&&(h.value=0))},B=e=>{let t=0;switch(e.code){case zJ.left:case zJ.up:t=-1;break;case zJ.right:case zJ.down:t=1;break;default:return}const i=Array.from(e.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let n=i.indexOf(e.target)+t;n<0?n=i.length-1:n>=i.length&&(n=0),i[n].focus({preventScroll:!0}),i[n].click(),y()},y=()=>{g.value&&(d.value=!0)},b=()=>d.value=!1;return Pp(r,(e=>{"hidden"===e?g.value=!1:"visible"===e&&setTimeout((()=>g.value=!0),50)})),Pp(a,(e=>{e?setTimeout((()=>g.value=!0),50):g.value=!1})),WL(A,v),Eg((()=>setTimeout((()=>I()),0))),Qg((()=>v())),t({scrollToActiveTab:I,removeFocus:b}),()=>{const t=u.value?[mf("span",{class:[s.e("nav-prev"),s.is("disabled",!u.value.prev)],onClick:m},[mf(gH,null,{default:()=>[mf(kH,null,null)]})]),mf("span",{class:[s.e("nav-next"),s.is("disabled",!u.value.next)],onClick:C},[mf(gH,null,{default:()=>[mf(MH,null,null)]})])]:null,r=e.panes.map(((t,r)=>{var a,o,l,A;const c=t.uid,u=t.props.disabled,h=null!=(o=null!=(a=t.props.name)?a:t.index)?o:`${r}`,g=!u&&(t.isClosable||e.editable);t.index=`${r}`;const p=g?mf(gH,{class:"is-icon-close",onClick:e=>i("tabRemove",t,e)},{default:()=>[mf(CO,null,null)]}):null,f=(null==(A=(l=t.slots).label)?void 0:A.call(l))||t.props.label,m=!u&&t.active?0:-1;return mf("div",{ref:`tab-${c}`,class:[s.e("item"),s.is(n.props.tabPosition),s.is("active",t.active),s.is("disabled",u),s.is("closable",g),s.is("focus",d.value)],id:`tab-${h}`,key:`tab-${c}`,"aria-controls":`pane-${h}`,role:"tab","aria-selected":t.active,tabindex:m,onFocus:()=>y(),onBlur:()=>b(),onClick:e=>{b(),i("tabClick",t,h,e)},onKeydown:e=>{!g||e.code!==zJ.delete&&e.code!==zJ.backspace||i("tabRemove",t,e)}},[f,p])}));return mf("div",{ref:A,class:[s.e("nav-wrap"),s.is("scrollable",!!u.value),s.is(n.props.tabPosition)]},[t,mf("div",{class:s.e("nav-scroll"),ref:o},[mf("div",{class:[s.e("nav"),s.is(n.props.tabPosition),s.is("stretch",e.stretch&&["top","bottom"].includes(n.props.tabPosition))],ref:l,style:f.value,role:"tablist",onKeydown:B},[e.type?null:mf(wne,{ref:c,tabs:[...e.panes]},null),r])])])}}}),xne=BU({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:Function,default:()=>!0},stretch:Boolean}),kne=e=>Gc(e)||AL(e),Dne={[UU]:e=>kne(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>kne(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>kne(e),tabAdd:()=>!0},Fne=hg({name:"ElTabs",props:xne,emits:Dne,setup(e,{emit:t,slots:i,expose:n}){var s;const r=KF("tabs"),a=qf((()=>["left","right"].includes(e.tabPosition))),{children:o,addChild:l,removeChild:A}=NZ(kf(),"ElTabPane"),c=zh(),u=zh(null!=(s=e.modelValue)?s:"0"),h=async(i,n=!1)=>{var s,r,a;if(u.value!==i&&!oL(i))try{!1!==await(null==(s=e.beforeLeave)?void 0:s.call(e,i,u.value))&&(u.value=i,n&&(t(UU,i),t("tabChange",i)),null==(a=null==(r=c.value)?void 0:r.removeFocus)||a.call(r))}catch(I2){}},d=(e,i,n)=>{e.props.disabled||(h(i,!0),t("tabClick",e,n))},g=(e,i)=>{e.props.disabled||oL(e.props.name)||(i.stopPropagation(),t("edit",e.props.name,"remove"),t("tabRemove",e.props.name))},p=()=>{t("edit",void 0,"add"),t("tabAdd")};Pp((()=>e.modelValue),(e=>h(e))),Pp(u,(async()=>{var e;await Qd(),null==(e=c.value)||e.scrollToActiveTab()})),gp(Bne,{props:e,currentName:u,registerPane:e=>{o.value.push(e)},sortPane:l,unregisterPane:A}),n({currentName:u});const f=({render:e})=>e();return()=>{const t=i["add-icon"],n=e.editable||e.addable?mf("div",{class:[r.e("new-tab"),a.value&&r.e("new-tab-vertical")],tabindex:"0",onClick:p,onKeydown:e=>{[zJ.enter,zJ.numpadEnter].includes(e.code)&&p()}},[t?Gg(i,"add-icon"):mf(gH,{class:r.is("icon-plus")},{default:()=>[mf(kV,null,null)]})]):null,s=mf("div",{class:[r.e("header"),a.value&&r.e("header-vertical"),r.is(e.tabPosition)]},[mf(f,{render:()=>{const t=o.value.some((e=>e.slots.label));return mf(Sne,{ref:c,currentName:u.value,editable:e.editable,type:e.type,panes:o.value,stretch:e.stretch,onTabClick:d,onTabRemove:g},{$stable:!t})}},null),n]),l=mf("div",{class:r.e("content")},[Gg(i,"default")]);return mf("div",{class:[r.b(),r.m(e.tabPosition),{[r.m("card")]:"card"===e.type,[r.m("border-card")]:"border-card"===e.type}]},[l,s])}}});var Tne=Fne;const Mne=BU({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),Rne="ElTabPane",Nne=hg({...hg({name:Rne}),props:Mne,setup(e){const t=e,i=kf(),n=jg(),s=pp(Bne);s||lU(Rne,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const r=KF("tab-pane"),a=zh(),o=qf((()=>t.closable||s.props.closable)),l=yL((()=>{var e;return s.currentName.value===(null!=(e=t.name)?e:a.value)})),A=zh(l.value),c=qf((()=>{var e;return null!=(e=t.name)?e:a.value})),u=yL((()=>!t.lazy||A.value||l.value));Pp(l,(e=>{e&&(A.value=!0)}));const h=Lh({uid:i.uid,slots:n,props:t,paneName:c,active:l,index:a,isClosable:o});return s.registerPane(h),Eg((()=>{s.sortPane(h)})),Sg((()=>{s.unregisterPane(h.uid)})),(e,t)=>ed(u)?Ld((af(),cf("div",{key:0,id:`pane-${ed(c)}`,class:pu(ed(r).b()),role:"tabpanel","aria-hidden":!ed(l),"aria-labelledby":`tab-${ed(c)}`},[Gg(e.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[ym,ed(l)]]):Bf("v-if",!0)}});var Lne=KU(Nne,[["__file","tab-pane.vue"]]);const Une=lH(Tne,{TabPane:Lne}),Hne=cH(Lne),Pne=BU({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:yU,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),One=hg({...hg({name:"ElText"}),props:Pne,setup(e){const t=e,i=Vj(),n=KF("text"),s=qf((()=>[n.b(),n.m(t.type),n.m(i.value),n.is("truncated",t.truncated),n.is("line-clamp",!oL(t.lineClamp))]));return(e,t)=>(af(),uf(Ng(e.tag),{class:pu(ed(s)),style:cu({"-webkit-line-clamp":e.lineClamp})},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["class","style"]))}});const Gne=lH(KU(One,[["__file","text.vue"]])),Kne=BU({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:String,default:"light"},clearable:{type:Boolean,default:!0},size:bU,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:[String,Object],default:()=>gO},clearIcon:{type:[String,Object],default:()=>lO},...SU}),qne=e=>{const t=(e||"").split(":");if(t.length>=2){let i=Number.parseInt(t[0],10);const n=Number.parseInt(t[1],10),s=e.toUpperCase();return s.includes("AM")&&12===i?i=0:s.includes("PM")&&12!==i&&(i+=12),{hours:i,minutes:n}}return null},Yne=(e,t)=>{const i=qne(e);if(!i)return-1;const n=qne(t);if(!n)return-1;const s=i.minutes+60*i.hours,r=n.minutes+60*n.hours;return s===r?0:s>r?1:-1},Vne=e=>`${e}`.padStart(2,"0"),Wne=e=>`${Vne(e.hours)}:${Vne(e.minutes)}`,jne=(e,t)=>{const i=qne(e);if(!i)return"";const n=qne(t);if(!n)return"";const s={hours:i.hours,minutes:i.minutes};return s.minutes+=n.minutes,s.hours+=n.hours,s.hours+=Math.floor(s.minutes/60),s.minutes=s.minutes%60,Wne(s)},Jne=hg({...hg({name:"ElTimeSelect"}),props:Kne,emits:["change","blur","focus","clear","update:modelValue"],setup(e,{expose:t}){const i=e;nZ.extend(f2);const{Option:n}=y9,s=KF("input"),r=zh(),a=Wj(),{lang:o}=CU(),l=qf((()=>i.modelValue)),A=qf((()=>{const e=qne(i.start);return e?Wne(e):null})),c=qf((()=>{const e=qne(i.end);return e?Wne(e):null})),u=qf((()=>{const e=qne(i.step);return e?Wne(e):null})),h=qf((()=>{const e=qne(i.minTime||"");return e?Wne(e):null})),d=qf((()=>{const e=qne(i.maxTime||"");return e?Wne(e):null})),g=qf((()=>{const e=[];if(i.start&&i.end&&i.step){let t,n=A.value;for(;n&&c.value&&Yne(n,c.value)<=0;)t=nZ(n,"HH:mm").locale(o.value).format(i.format),e.push({value:t,disabled:Yne(n,h.value||"-1:-1")<=0||Yne(n,d.value||"100:100")>=0}),n=jne(n,u.value)}return e}));return t({blur:()=>{var e,t;null==(t=null==(e=r.value)?void 0:e.blur)||t.call(e)},focus:()=>{var e,t;null==(t=null==(e=r.value)?void 0:e.focus)||t.call(e)}}),(e,t)=>(af(),uf(ed(y9),{ref_key:"select",ref:r,"model-value":ed(l),disabled:ed(a),clearable:e.clearable,"clear-icon":e.clearIcon,size:e.size,effect:e.effect,placeholder:e.placeholder,"default-first-option":"",filterable:e.editable,"empty-values":e.emptyValues,"value-on-clear":e.valueOnClear,"onUpdate:modelValue":t=>e.$emit("update:modelValue",t),onChange:t=>e.$emit("change",t),onBlur:t=>e.$emit("blur",t),onFocus:t=>e.$emit("focus",t),onClear:()=>e.$emit("clear")},{prefix:Nd((()=>[e.prefixIcon?(af(),uf(ed(gH),{key:0,class:pu(ed(s).e("prefix-icon"))},{default:Nd((()=>[(af(),uf(Ng(e.prefixIcon)))])),_:1},8,["class"])):Bf("v-if",!0)])),default:Nd((()=>[(af(!0),cf(Zp,null,Pg(ed(g),(e=>(af(),uf(ed(n),{key:e.value,label:e.value,value:e.value,disabled:e.disabled},null,8,["label","value","disabled"])))),128))])),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","onUpdate:modelValue","onChange","onBlur","onFocus","onClear"]))}});const zne=lH(KU(Jne,[["__file","time-select.vue"]])),Xne=hg({name:"ElTimeline",setup(e,{slots:t}){const i=KF("timeline");return gp("timeline",t),()=>Yf("ul",{class:[i.b()]},[Gg(t,"default")])}}),$ne=BU({timestamp:{type:String,default:""},hideTimestamp:Boolean,center:Boolean,placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:fj},hollow:Boolean}),Zne=hg({...hg({name:"ElTimelineItem"}),props:$ne,setup(e){const t=e,i=KF("timeline-item"),n=qf((()=>[i.e("node"),i.em("node",t.size||""),i.em("node",t.type||""),i.is("hollow",t.hollow)]));return(e,t)=>(af(),cf("li",{class:pu([ed(i).b(),{[ed(i).e("center")]:e.center}])},[ff("div",{class:pu(ed(i).e("tail"))},null,2),e.$slots.dot?Bf("v-if",!0):(af(),cf("div",{key:0,class:pu(ed(n)),style:cu({backgroundColor:e.color})},[e.icon?(af(),uf(ed(gH),{key:0,class:pu(ed(i).e("icon"))},{default:Nd((()=>[(af(),uf(Ng(e.icon)))])),_:1},8,["class"])):Bf("v-if",!0)],6)),e.$slots.dot?(af(),cf("div",{key:1,class:pu(ed(i).e("dot"))},[Gg(e.$slots,"dot")],2)):Bf("v-if",!0),ff("div",{class:pu(ed(i).e("wrapper"))},[e.hideTimestamp||"top"!==e.placement?Bf("v-if",!0):(af(),cf("div",{key:0,class:pu([ed(i).e("timestamp"),ed(i).is("top")])},yu(e.timestamp),3)),ff("div",{class:pu(ed(i).e("content"))},[Gg(e.$slots,"default")],2),e.hideTimestamp||"bottom"!==e.placement?Bf("v-if",!0):(af(),cf("div",{key:1,class:pu([ed(i).e("timestamp"),ed(i).is("bottom")])},yu(e.timestamp),3))],2)],2))}});var ese=KU(Zne,[["__file","timeline-item.vue"]]);const tse=lH(Xne,{TimelineItem:ese}),ise=cH(ese),nse=BU({nowrap:Boolean});var sse=(e=>(e.top="top",e.bottom="bottom",e.left="left",e.right="right",e))(sse||{});const rse=Object.values(sse),ase=BU({width:{type:Number,default:10},height:{type:Number,default:10},style:{type:Object,default:null}}),ose=BU({side:{type:String,values:rse,required:!0}}),lse=BU({arrowPadding:{type:Number,default:5},effect:{type:String,default:"light"},contentClass:String,placement:{type:String,values:["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],default:"bottom"},reference:{type:Object,default:null},offset:{type:Number,default:8},strategy:{type:String,values:["absolute","fixed"],default:"absolute"},showArrow:Boolean,...Dj(["ariaLabel"])}),Ase=BU({delayDuration:{type:Number,default:300},defaultOpen:Boolean,open:{type:Boolean,default:void 0},onOpenChange:{type:Function},"onUpdate:open":{type:Function}}),cse={type:Function},use=BU({onBlur:cse,onClick:cse,onFocus:cse,onMouseDown:cse,onMouseEnter:cse,onMouseLeave:cse}),hse=BU({...Ase,...ase,...use,...lse,alwaysOn:Boolean,fullTransition:Boolean,transitionProps:{type:Object,default:null},teleported:Boolean,to:{type:String,default:"body"}}),dse=Symbol("tooltipV2"),gse=Symbol("tooltipV2Content"),pse="tooltip_v2.open",fse=hg({...hg({name:"ElTooltipV2Root"}),props:Ase,setup(e,{expose:t}){const i=e,n=zh(i.defaultOpen),s=zh(null),r=qf({get:()=>hL(i.open)?n.value:i.open,set:e=>{var t;n.value=e,null==(t=i["onUpdate:open"])||t.call(i,e)}}),a=qf((()=>AL(i.delayDuration)&&i.delayDuration>0)),{start:o,stop:l}=ML((()=>{r.value=!0}),qf((()=>i.delayDuration)),{immediate:!1}),A=KF("tooltip-v2"),c=Gj(),u=()=>{l(),r.value=!0},h=u,d=()=>{l(),r.value=!1};return Pp(r,(e=>{var t;e&&(document.dispatchEvent(new CustomEvent(pse)),h()),null==(t=i.onOpenChange)||t.call(i,e)})),Eg((()=>{document.addEventListener(pse,d)})),_g((()=>{l(),document.removeEventListener(pse,d)})),gp(dse,{contentId:c,triggerRef:s,ns:A,onClose:d,onDelayOpen:()=>{ed(a)?o():u()},onOpen:h}),t({onOpen:h,onClose:d}),(e,t)=>Gg(e.$slots,"default",{open:ed(r)})}});var mse=KU(fse,[["__file","root.vue"]]);const Cse=hg({...hg({name:"ElTooltipV2Arrow"}),props:{...ase,...ose},setup(e){const t=e,{ns:i}=pp(dse),{arrowRef:n}=pp(gse),s=qf((()=>{const{style:e,width:n,height:s}=t,r=i.namespace.value;return{[`--${r}-tooltip-v2-arrow-width`]:`${n}px`,[`--${r}-tooltip-v2-arrow-height`]:`${s}px`,[`--${r}-tooltip-v2-arrow-border-width`]:n/2+"px",[`--${r}-tooltip-v2-arrow-cover-width`]:n/2-1,...e||{}}}));return(e,t)=>(af(),cf("span",{ref_key:"arrowRef",ref:n,style:cu(ed(s)),class:pu(ed(i).e("arrow"))},null,6))}});var Ise=KU(Cse,[["__file","arrow.vue"]]);const vse=Math.min,Bse=Math.max,yse=Math.round,bse=Math.floor,Ese=e=>({x:e,y:e}),wse={left:"right",right:"left",bottom:"top",top:"bottom"},Qse={start:"end",end:"start"};function _se(e,t,i){return Bse(e,vse(t,i))}function Sse(e,t){return"function"==typeof e?e(t):e}function xse(e){return e.split("-")[0]}function kse(e){return e.split("-")[1]}function Dse(e){return"x"===e?"y":"x"}function Fse(e){return"y"===e?"height":"width"}function Tse(e){return["top","bottom"].includes(xse(e))?"y":"x"}function Mse(e){return Dse(Tse(e))}function Rse(e){return e.replace(/start|end/g,(e=>Qse[e]))}function Nse(e){return e.replace(/left|right|bottom|top/g,(e=>wse[e]))}function Lse(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Use(e){const{x:t,y:i,width:n,height:s}=e;return{width:n,height:s,top:i,left:t,right:t+n,bottom:i+s,x:t,y:i}}function Hse(e,t,i){let{reference:n,floating:s}=e;const r=Tse(t),a=Mse(t),o=Fse(a),l=xse(t),A="y"===r,c=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,h=n[o]/2-s[o]/2;let d;switch(l){case"top":d={x:c,y:n.y-s.height};break;case"bottom":d={x:c,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:u};break;case"left":d={x:n.x-s.width,y:u};break;default:d={x:n.x,y:n.y}}switch(kse(t)){case"start":d[a]-=h*(i&&A?-1:1);break;case"end":d[a]+=h*(i&&A?-1:1)}return d}async function Pse(e,t){var i;void 0===t&&(t={});const{x:n,y:s,platform:r,rects:a,elements:o,strategy:l}=e,{boundary:A="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=Sse(t,e),g=Lse(d),p=o[h?"floating"===u?"reference":"floating":u],f=Use(await r.getClippingRect({element:null==(i=await(null==r.isElement?void 0:r.isElement(p)))||i?p:p.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(o.floating)),boundary:A,rootBoundary:c,strategy:l})),m="floating"===u?{x:n,y:s,width:a.floating.width,height:a.floating.height}:a.reference,C=await(null==r.getOffsetParent?void 0:r.getOffsetParent(o.floating)),I=await(null==r.isElement?void 0:r.isElement(C))&&await(null==r.getScale?void 0:r.getScale(C))||{x:1,y:1},v=Use(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:m,offsetParent:C,strategy:l}):m);return{top:(f.top-v.top+g.top)/I.y,bottom:(v.bottom-f.bottom+g.bottom)/I.y,left:(f.left-v.left+g.left)/I.x,right:(v.right-f.right+g.right)/I.x}}function Ose(){return"undefined"!=typeof window}function Gse(e){return Yse(e)?(e.nodeName||"").toLowerCase():"#document"}function Kse(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function qse(e){var t;return null==(t=(Yse(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Yse(e){return!!Ose()&&(e instanceof Node||e instanceof Kse(e).Node)}function Vse(e){return!!Ose()&&(e instanceof Element||e instanceof Kse(e).Element)}function Wse(e){return!!Ose()&&(e instanceof HTMLElement||e instanceof Kse(e).HTMLElement)}function jse(e){return!(!Ose()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Kse(e).ShadowRoot)}function Jse(e){const{overflow:t,overflowX:i,overflowY:n,display:s}=tre(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(s)}function zse(e){return["table","td","th"].includes(Gse(e))}function Xse(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(I2){return!1}}))}function $se(e){const t=Zse(),i=Vse(e)?tre(e):e;return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((e=>(i.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(i.contain||"").includes(e)))}function Zse(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ere(e){return["html","body","#document"].includes(Gse(e))}function tre(e){return Kse(e).getComputedStyle(e)}function ire(e){return Vse(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nre(e){if("html"===Gse(e))return e;const t=
// Step into the shadow DOM of the parent of a slotted node.
e.assignedSlot||// DOM Element detected.
e.parentNode||// ShadowRoot detected.
jse(e)&&e.host||// Fallback.
qse(e);return jse(t)?t.host:t}function sre(e){const t=nre(e);return ere(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wse(t)&&Jse(t)?t:sre(t)}function rre(e,t,i){var n;void 0===t&&(t=[]),void 0===i&&(i=!0);const s=sre(e),r=s===(null==(n=e.ownerDocument)?void 0:n.body),a=Kse(s);if(r){const e=are(a);return t.concat(a,a.visualViewport||[],Jse(s)?s:[],e&&i?rre(e):[])}return t.concat(s,rre(s,[],i))}function are(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ore(e){const t=tre(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Wse(e),r=s?e.offsetWidth:i,a=s?e.offsetHeight:n,o=yse(i)!==r||yse(n)!==a;return o&&(i=r,n=a),{width:i,height:n,$:o}}function lre(e){return Vse(e)?e:e.contextElement}function Are(e){const t=lre(e);if(!Wse(t))return Ese(1);const i=t.getBoundingClientRect(),{width:n,height:s,$:r}=ore(t);let a=(r?yse(i.width):i.width)/n,o=(r?yse(i.height):i.height)/s;return a&&Number.isFinite(a)||(a=1),o&&Number.isFinite(o)||(o=1),{x:a,y:o}}const cre=Ese(0);function ure(e){const t=Kse(e);return Zse()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:cre}function hre(e,t,i,n){void 0===t&&(t=!1),void 0===i&&(i=!1);const s=e.getBoundingClientRect(),r=lre(e);let a=Ese(1);t&&(n?Vse(n)&&(a=Are(n)):a=Are(e));const o=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Kse(e))&&t}(r,i,n)?ure(r):Ese(0);let l=(s.left+o.x)/a.x,A=(s.top+o.y)/a.y,c=s.width/a.x,u=s.height/a.y;if(r){const e=Kse(r),t=n&&Vse(n)?Kse(n):n;let i=e,s=are(i);for(;s&&n&&t!==i;){const e=Are(s),t=s.getBoundingClientRect(),n=tre(s),r=t.left+(s.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(s.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,A*=e.y,c*=e.x,u*=e.y,l+=r,A+=a,i=Kse(s),s=are(i)}}return Use({width:c,height:u,x:l,y:A})}function dre(e,t){const i=ire(e).scrollLeft;return t?t.left+i:hre(qse(e)).left+i}function gre(e,t,i){void 0===i&&(i=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(i?0:
// RTL <body> scrollbar.
dre(e,n)),y:n.top+t.scrollTop}}function pre(e,t,i){let n;if("viewport"===t)n=function(e,t){const i=Kse(e),n=qse(e),s=i.visualViewport;let r=n.clientWidth,a=n.clientHeight,o=0,l=0;if(s){r=s.width,a=s.height;const e=Zse();(!e||e&&"fixed"===t)&&(o=s.offsetLeft,l=s.offsetTop)}return{width:r,height:a,x:o,y:l}}(e,i);else if("document"===t)n=function(e){const t=qse(e),i=ire(e),n=e.ownerDocument.body,s=Bse(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=Bse(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-i.scrollLeft+dre(e);const o=-i.scrollTop;return"rtl"===tre(n).direction&&(a+=Bse(t.clientWidth,n.clientWidth)-s),{width:s,height:r,x:a,y:o}}(qse(e));else if(Vse(t))n=function(e,t){const i=hre(e,!0,"fixed"===t),n=i.top+e.clientTop,s=i.left+e.clientLeft,r=Wse(e)?Are(e):Ese(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:s*r.x,y:n*r.y}}(t,i);else{const i=ure(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Use(n)}function fre(e,t){const i=nre(e);return!(i===t||!Vse(i)||ere(i))&&("fixed"===tre(i).position||fre(i,t))}function mre(e,t,i){const n=Wse(t),s=qse(t),r="fixed"===i,a=hre(e,!0,r,t);let o={scrollLeft:0,scrollTop:0};const l=Ese(0);if(n||!n&&!r)if(("body"!==Gse(t)||Jse(s))&&(o=ire(t)),n){const e=hre(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else s&&(l.x=dre(s));const A=!s||n||r?Ese(0):gre(s,o);return{x:a.left+o.scrollLeft-l.x-A.x,y:a.top+o.scrollTop-l.y-A.y,width:a.width,height:a.height}}function Cre(e){return"static"===tre(e).position}function Ire(e,t){if(!Wse(e)||"fixed"===tre(e).position)return null;if(t)return t(e);let i=e.offsetParent;return qse(e)===i&&(i=i.ownerDocument.body),i}function vre(e,t){const i=Kse(e);if(Xse(e))return i;if(!Wse(e)){let t=nre(e);for(;t&&!ere(t);){if(Vse(t)&&!Cre(t))return t;t=nre(t)}return i}let n=Ire(e,t);for(;n&&zse(n)&&Cre(n);)n=Ire(n,t);return n&&ere(n)&&Cre(n)&&!$se(n)?i:n||function(e){let t=nre(e);for(;Wse(t)&&!ere(t);){if($se(t))return t;if(Xse(t))return null;t=nre(t)}return null}(e)||i}const Bre={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:n,strategy:s}=e;const r="fixed"===s,a=qse(n),o=!!t&&Xse(t.floating);if(n===a||o&&r)return i;let l={scrollLeft:0,scrollTop:0},A=Ese(1);const c=Ese(0),u=Wse(n);if((u||!u&&!r)&&(("body"!==Gse(n)||Jse(a))&&(l=ire(n)),Wse(n))){const e=hre(n);A=Are(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}const h=!a||u||r?Ese(0):gre(a,l,!0);return{width:i.width*A.x,height:i.height*A.y,x:i.x*A.x-l.scrollLeft*A.x+c.x+h.x,y:i.y*A.y-l.scrollTop*A.y+c.y+h.y}},getDocumentElement:qse,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:n,strategy:s}=e;const r=[..."clippingAncestors"===i?Xse(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let n=rre(e,[],!1).filter((e=>Vse(e)&&"body"!==Gse(e))),s=null;const r="fixed"===tre(e).position;let a=r?nre(e):e;for(;Vse(a)&&!ere(a);){const t=tre(a),i=$se(a);i||"fixed"!==t.position||(s=null),(r?!i&&!s:!i&&"static"===t.position&&s&&["absolute","fixed"].includes(s.position)||Jse(a)&&!i&&fre(e,a))?n=n.filter((e=>e!==a)):s=t,a=nre(a)}return t.set(e,n),n}(t,this._c):[].concat(i),n],a=r[0],o=r.reduce(((e,i)=>{const n=pre(t,i,s);return e.top=Bse(n.top,e.top),e.right=vse(n.right,e.right),e.bottom=vse(n.bottom,e.bottom),e.left=Bse(n.left,e.left),e}),pre(t,a,s));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}},getOffsetParent:vre,getElementRects:async function(e){const t=this.getOffsetParent||vre,i=this.getDimensions,n=await i(e.floating);return{reference:mre(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=ore(e);return{width:t,height:i}},getScale:Are,isElement:Vse,isRTL:function(e){return"rtl"===tre(e).direction}};function yre(e,t,i,n){void 0===n&&(n={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:o="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,A=lre(e),c=s||r?[...A?rre(A):[],...rre(t)]:[];c.forEach((e=>{s&&e.addEventListener("scroll",i,{passive:!0}),r&&e.addEventListener("resize",i)}));const u=A&&o?function(e,t){let i,n=null;const s=qse(e);function r(){var e;clearTimeout(i),null==(e=n)||e.disconnect(),n=null}return function a(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),r();const{left:A,top:c,width:u,height:h}=e.getBoundingClientRect();if(o||t(),!u||!h)return;const d={rootMargin:-bse(c)+"px "+-bse(s.clientWidth-(A+u))+"px "+-bse(s.clientHeight-(c+h))+"px "+-bse(A)+"px",threshold:Bse(0,vse(1,l))||1};let g=!0;function p(e){const t=e[0].intersectionRatio;if(t!==l){if(!g)return a();t?a(!1,t):i=setTimeout((()=>{a(!1,1e-7)}),1e3)}g=!1}try{n=new IntersectionObserver(p,{...d,
// Handle <iframe>s
root:s.ownerDocument})}catch(I2){n=new IntersectionObserver(p,d)}n.observe(e)}(!0),r}(A,i):null;let h,d=-1,g=null;a&&(g=new ResizeObserver((e=>{let[n]=e;n&&n.target===A&&g&&(g.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame((()=>{var e;null==(e=g)||e.observe(t)}))),i()})),A&&!l&&g.observe(A),g.observe(t));let p=l?hre(e):null;return l&&function t(){const n=hre(e);!p||n.x===p.x&&n.y===p.y&&n.width===p.width&&n.height===p.height||i();p=n,h=requestAnimationFrame(t)}(),i(),()=>{var e;c.forEach((e=>{s&&e.removeEventListener("scroll",i),r&&e.removeEventListener("resize",i)})),null==u||u(),null==(e=g)||e.disconnect(),g=null,l&&cancelAnimationFrame(h)}}const bre=Pse,Ere=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,n;const{x:s,y:r,placement:a,middlewareData:o}=t,l=await async function(e,t){const{placement:i,platform:n,elements:s}=e,r=await(null==n.isRTL?void 0:n.isRTL(s.floating)),a=xse(i),o=kse(i),l="y"===Tse(i),A=["left","top"].includes(a)?-1:1,c=r&&l?-1:1,u=Sse(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:g}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&"number"==typeof g&&(d="end"===o?-1*g:g),l?{x:d*c,y:h*A}:{x:h*A,y:d*c}}(t,e);return a===(null==(i=o.offset)?void 0:i.placement)&&null!=(n=o.arrow)&&n.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:a}}}}},wre=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:s}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:o={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...l}=Sse(e,t),A={x:i,y:n},c=await Pse(t,l),u=Tse(xse(s)),h=Dse(u);let d=A[h],g=A[u];if(r){const e="y"===h?"bottom":"right";d=_se(d+c["y"===h?"top":"left"],d,d-c[e])}if(a){const e="y"===u?"bottom":"right";g=_se(g+c["y"===u?"top":"left"],g,g-c[e])}const p=o.fn({...t,[h]:d,[u]:g});return{...p,data:{x:p.x-i,y:p.y-n,enabled:{[h]:r,[u]:a}}}}}},Qre=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,n;const{placement:s,middlewareData:r,rects:a,initialPlacement:o,platform:l,elements:A}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...f}=Sse(e,t);if(null!=(i=r.arrow)&&i.alignmentOffset)return{};const m=xse(s),C=Tse(o),I=xse(o)===o,v=await(null==l.isRTL?void 0:l.isRTL(A.floating)),B=h||(I||!p?[Nse(o)]:function(e){const t=Nse(e);return[Rse(e),t,Rse(t)]}(o)),y="none"!==g;!h&&y&&B.push(...function(e,t,i,n){const s=kse(e);let r=function(e,t,i){const n=["left","right"],s=["right","left"],r=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return i?t?s:n:t?n:s;case"left":case"right":return t?r:a;default:return[]}}(xse(e),"start"===i,n);return s&&(r=r.map((e=>e+"-"+s)),t&&(r=r.concat(r.map(Rse)))),r}(o,p,g,v));const b=[o,...B],E=await Pse(t,f),w=[];let Q=(null==(n=r.flip)?void 0:n.overflows)||[];if(c&&w.push(E[m]),u){const e=function(e,t,i){void 0===i&&(i=!1);const n=kse(e),s=Mse(e),r=Fse(s);let a="x"===s?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=Nse(a)),[a,Nse(a)]}(s,a,v);w.push(E[e[0]],E[e[1]])}if(Q=[...Q,{placement:s,overflows:w}],!w.every((e=>e<=0))){var _,S;const e=((null==(_=r.flip)?void 0:_.index)||0)+1,t=b[e];if(t)return{data:{index:e,overflows:Q},reset:{placement:t}};let i=null==(S=Q.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!i)switch(d){case"bestFit":{var x;const e=null==(x=Q.filter((e=>{if(y){const t=Tse(e.placement);return t===C||// Create a bias to the `y` side axis due to horizontal
// reading directions favoring greater width.
"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:x[0];e&&(i=e);break}case"initialPlacement":i=o}if(s!==i)return{reset:{placement:i}}}return{}}}},_re=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:n,placement:s,rects:r,platform:a,elements:o,middlewareData:l}=t,{element:A,padding:c=0}=Sse(e,t)||{};if(null==A)return{};const u=Lse(c),h={x:i,y:n},d=Mse(s),g=Fse(d),p=await a.getDimensions(A),f="y"===d,m=f?"top":"left",C=f?"bottom":"right",I=f?"clientHeight":"clientWidth",v=r.reference[g]+r.reference[d]-h[d]-r.floating[g],B=h[d]-r.reference[d],y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(A));let b=y?y[I]:0;b&&await(null==a.isElement?void 0:a.isElement(y))||(b=o.floating[I]||r.floating[g]);const E=v/2-B/2,w=b/2-p[g]/2-1,Q=vse(u[m],w),_=vse(u[C],w),S=Q,x=b-p[g]-_,k=b/2-p[g]/2+E,D=_se(S,k,x),F=!l.arrow&&null!=kse(s)&&k!==D&&r.reference[g]/2-(k<S?Q:_)-p[g]/2<0,T=F?k<S?k-S:k-x:0;return{[d]:h[d]+T,data:{[d]:D,centerOffset:k-D-T,...F&&{alignmentOffset:T}},reset:F}}}),Sre=(e,t,i)=>{const n=new Map,s={platform:Bre,...i},r={...s.platform,_c:n};return(async(e,t,i)=>{const{placement:n="bottom",strategy:s="absolute",middleware:r=[],platform:a}=i,o=r.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let A=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:u}=Hse(A,n,l),h=n,d={},g=0;for(let p=0;p<o.length;p++){const{name:i,fn:r}=o[p],{x:f,y:m,data:C,reset:I}=await r({x:c,y:u,initialPlacement:n,placement:h,strategy:s,middlewareData:d,rects:A,platform:a,elements:{reference:e,floating:t}});c=null!=f?f:c,u=null!=m?m:u,d={...d,[i]:{...d[i],...C}},I&&g<=50&&(g++,"object"==typeof I&&(I.placement&&(h=I.placement),I.rects&&(A=!0===I.rects?await a.getElementRects({reference:e,floating:t,strategy:s}):I.rects),({x:c,y:u}=Hse(A,h,l))),p=-1)}return{x:c,y:u,placement:h,strategy:s,middlewareData:d}})(e,t,{...s,platform:r})},xre=BU({style:{type:[String,Object,Array],default:()=>({})}}),kre=hg({...hg({name:"ElVisuallyHidden"}),props:xre,setup(e){const t=e,i=qf((()=>[t.style,{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}]));return(e,t)=>(af(),cf("span",wf(e.$attrs,{style:ed(i)}),[Gg(e.$slots,"default")],16))}});var Dre=KU(kre,[["__file","visual-hidden.vue"]]);BU({});const Fre=({middleware:e,placement:t,strategy:i})=>{const n=zh(),s=zh(),r=zh(),a=zh(),o=zh({}),l={x:r,y:a,placement:t,strategy:i,middlewareData:o},A=async()=>{if(!bL)return;const r=(e=>{if(!bL)return;if(!e)return e;const t=RL(e);return t||(Jh(e)?t:e)})(n),a=RL(s);if(!r||!a)return;const o=await Sre(r,a,{placement:ed(t),strategy:ed(i),middleware:ed(e)});kU(l).forEach((e=>{l[e].value=o[e]}))};return Eg((()=>{Hp((()=>{A()}))})),{...l,update:A,referenceRef:n,contentRef:s}},Tre=hg({...hg({name:"ElTooltipV2Content"}),props:{...lse,...nse},setup(e){const t=e,{triggerRef:i,contentId:n}=pp(dse),s=zh(t.placement),r=zh(t.strategy),a=zh(null),{referenceRef:o,contentRef:l,middlewareData:A,x:c,y:u,update:h}=Fre({placement:s,strategy:r,middleware:qf((()=>{const e=[Ere(t.offset)];return t.showArrow&&e.push((({arrowRef:e,padding:t})=>({name:"arrow",options:{element:e,padding:t},fn(i){const n=ed(e);return n?_re({element:n,padding:t}).fn(i):{}}}))({arrowRef:a})),e}))}),d=dU().nextZIndex(),g=KF("tooltip-v2"),p=qf((()=>s.value.split("-")[0])),f=qf((()=>({position:ed(r),top:`${ed(u)||0}px`,left:`${ed(c)||0}px`,zIndex:d}))),m=qf((()=>{if(!t.showArrow)return{};const{arrow:e}=ed(A);return{[`--${g.namespace.value}-tooltip-v2-arrow-x`]:`${null==e?void 0:e.x}px`||"",[`--${g.namespace.value}-tooltip-v2-arrow-y`]:`${null==e?void 0:e.y}px`||""}})),C=qf((()=>[g.e("content"),g.is("dark","dark"===t.effect),g.is(ed(r)),t.contentClass]));return Pp(a,(()=>h())),Pp((()=>t.placement),(e=>s.value=e)),Eg((()=>{Pp((()=>t.reference||i.value),(e=>{o.value=e||void 0}),{immediate:!0})})),gp(gse,{arrowRef:a}),(e,t)=>(af(),cf("div",{ref_key:"contentRef",ref:l,style:cu(ed(f)),"data-tooltip-v2-root":""},[e.nowrap?Bf("v-if",!0):(af(),cf("div",{key:0,"data-side":ed(p),class:pu(ed(C))},[Gg(e.$slots,"default",{contentStyle:ed(f),contentClass:ed(C)}),mf(ed(Dre),{id:ed(n),role:"tooltip"},{default:Nd((()=>[e.ariaLabel?(af(),cf(Zp,{key:0},[vf(yu(e.ariaLabel),1)],64)):Gg(e.$slots,"default",{key:1})])),_:3},8,["id"]),Gg(e.$slots,"arrow",{style:cu(ed(m)),side:ed(p)})],10,["data-side"]))],4))}});var Mre=KU(Tre,[["__file","content.vue"]]);var Rre=hg({props:BU({setRef:{type:Function,required:!0},onlyChild:Boolean}),setup(e,{slots:t}){const i=zh(),n=u3(i,(t=>{t?e.setRef(t.nextElementSibling):e.setRef(null)}));return()=>{var i;const[s]=(null==(i=t.default)?void 0:i.call(t))||[],r=e.onlyChild?(e=>{if(!Lc(e)||e.length>1)throw new Error("expect to receive a single Vue element child");return e[0]})(s.children):s.children;return mf(Zp,{ref:n},[r])}}});const Nre=hg({...hg({name:"ElTooltipV2Trigger"}),props:{...nse,...use},setup(e){const t=e,{onClose:i,onOpen:n,onDelayOpen:s,triggerRef:r,contentId:a}=pp(dse);let o=!1;const l=e=>{r.value=e},A=()=>{o=!1},c=OX(t.onMouseEnter,s),u=OX(t.onMouseLeave,i),h=OX(t.onMouseDown,(()=>{i(),o=!0,document.addEventListener("mouseup",A,{once:!0})})),d=OX(t.onFocus,(()=>{o||n()})),g=OX(t.onBlur,i),p=OX(t.onClick,(e=>{0===e.detail&&i()})),f={blur:g,click:p,focus:d,mousedown:h,mouseenter:c,mouseleave:u},m=(e,t,i)=>{e&&Object.entries(t).forEach((([t,n])=>{e[i](t,n)}))};return Pp(r,((e,t)=>{m(e,f,"addEventListener"),m(t,f,"removeEventListener"),e&&e.setAttribute("aria-describedby",a.value)})),_g((()=>{m(r.value,f,"removeEventListener"),document.removeEventListener("mouseup",A)})),(e,t)=>e.nowrap?(af(),uf(ed(Rre),{key:0,"set-ref":l,"only-child":""},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3})):(af(),cf("button",wf({key:1,ref_key:"triggerRef",ref:r},e.$attrs),[Gg(e.$slots,"default")],16))}});var Lre=KU(Nre,[["__file","trigger.vue"]]);const Ure=lH(KU(hg({...hg({name:"ElTooltipV2"}),props:hse,setup(e){const t=rd(e),i=Lh(nL(t,Object.keys(ase))),n=Lh(nL(t,Object.keys(lse))),s=Lh(nL(t,Object.keys(Ase))),r=Lh(nL(t,Object.keys(use)));return(e,t)=>(af(),uf(mse,fu(Cf(s)),{default:Nd((({open:t})=>[mf(Lre,wf(r,{nowrap:""}),{default:Nd((()=>[Gg(e.$slots,"trigger")])),_:3},16),mf(ed(YX),{to:e.to,disabled:!e.teleported},{default:Nd((()=>[e.fullTransition?(af(),uf(am,fu(wf({key:0},e.transitionProps)),{default:Nd((()=>[e.alwaysOn||t?(af(),uf(Mre,fu(wf({key:0},n)),{arrow:Nd((({style:t,side:n})=>[e.showArrow?(af(),uf(Ise,wf({key:0},i,{style:t,side:n}),null,16,["style","side"])):Bf("v-if",!0)])),default:Nd((()=>[Gg(e.$slots,"default")])),_:3},16)):Bf("v-if",!0)])),_:2},1040)):(af(),cf(Zp,{key:1},[e.alwaysOn||t?(af(),uf(Mre,fu(wf({key:0},n)),{arrow:Nd((({style:t,side:n})=>[e.showArrow?(af(),uf(Ise,wf({key:0},i,{style:t,side:n}),null,16,["style","side"])):Bf("v-if",!0)])),default:Nd((()=>[Gg(e.$slots,"default")])),_:3},16)):Bf("v-if",!0)],64))])),_:2},1032,["to","disabled"])])),_:3},16))}}),[["__file","tooltip.vue"]])),Hre="left-check-change",Pre="right-check-change",Ore=BU({data:{type:Array,default:()=>[]},titles:{type:Array,default:()=>[]},buttonTexts:{type:Array,default:()=>[]},filterPlaceholder:String,filterMethod:{type:Function},leftDefaultChecked:{type:Array,default:()=>[]},rightDefaultChecked:{type:Array,default:()=>[]},renderContent:{type:Function},modelValue:{type:Array,default:()=>[]},format:{type:Object,default:()=>({})},filterable:Boolean,props:{type:Object,default:()=>({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),Gre=(e,t)=>[e,t].every(Lc)||Lc(e)&&jN(t),Kre={[HU]:(e,t,i)=>[e,i].every(Lc)&&["left","right"].includes(t),[UU]:e=>Lc(e),[Hre]:Gre,[Pre]:Gre},qre="checked-change",Yre=BU({data:Ore.data,optionRender:{type:Function},placeholder:String,title:String,filterable:Boolean,format:Ore.format,filterMethod:Ore.filterMethod,defaultChecked:Ore.leftDefaultChecked,props:Ore.props}),Vre={[qre]:Gre},Wre=e=>{const t={label:"label",key:"key",disabled:"disabled"};return qf((()=>({...t,...e.props})))},jre=hg({...hg({name:"ElTransferPanel"}),props:Yre,emits:Vre,setup(e,{expose:t,emit:i}){const n=e,s=jg(),r=({option:e})=>e,{t:a}=CU(),o=KF("transfer"),l=Lh({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),A=Wre(n),{filteredData:c,checkedSummary:u,isIndeterminate:h,handleAllCheckedChange:d}=((e,t,i)=>{const n=Wre(e),s=qf((()=>e.data.filter((i=>Oc(e.filterMethod)?e.filterMethod(t.query,i):String(i[n.value.label]||i[n.value.key]).toLowerCase().includes(t.query.toLowerCase()))))),r=qf((()=>s.value.filter((e=>!e[n.value.disabled])))),a=qf((()=>{const i=t.checked.length,n=e.data.length,{noChecked:s,hasChecked:r}=e.format;return s&&r?i>0?r.replace(/\${checked}/g,i.toString()).replace(/\${total}/g,n.toString()):s.replace(/\${total}/g,n.toString()):`${i}/${n}`})),o=qf((()=>{const e=t.checked.length;return e>0&&e<r.value.length})),l=()=>{const e=r.value.map((e=>e[n.value.key]));t.allChecked=e.length>0&&e.every((e=>t.checked.includes(e)))};return Pp((()=>t.checked),((e,n)=>{if(l(),t.checkChangeByUser){const t=e.concat(n).filter((t=>!e.includes(t)||!n.includes(t)));i(qre,e,t)}else i(qre,e),t.checkChangeByUser=!0})),Pp(r,(()=>{l()})),Pp((()=>e.data),(()=>{const e=[],i=s.value.map((e=>e[n.value.key]));t.checked.forEach((t=>{i.includes(t)&&e.push(t)})),t.checkChangeByUser=!1,t.checked=e})),Pp((()=>e.defaultChecked),((e,i)=>{if(i&&e.length===i.length&&e.every((e=>i.includes(e))))return;const s=[],a=r.value.map((e=>e[n.value.key]));e.forEach((e=>{a.includes(e)&&s.push(e)})),t.checkChangeByUser=!1,t.checked=s}),{immediate:!0}),{filteredData:s,checkableData:r,checkedSummary:a,isIndeterminate:o,updateAllChecked:l,handleAllCheckedChange:e=>{t.checked=e?r.value.map((e=>e[n.value.key])):[]}}})(n,l,i),g=qf((()=>!cL(l.query)&&cL(c.value))),p=qf((()=>!cL(s.default()[0].children))),{checked:f,allChecked:m,query:C}=rd(l);return t({query:C}),(e,t)=>(af(),cf("div",{class:pu(ed(o).b("panel"))},[ff("p",{class:pu(ed(o).be("panel","header"))},[mf(ed(r0),{modelValue:ed(m),"onUpdate:modelValue":e=>Jh(m)?m.value=e:null,indeterminate:ed(h),"validate-event":!1,onChange:ed(d)},{default:Nd((()=>[vf(yu(e.title)+" ",1),ff("span",null,yu(ed(u)),1)])),_:1},8,["modelValue","onUpdate:modelValue","indeterminate","onChange"])],2),ff("div",{class:pu([ed(o).be("panel","body"),ed(o).is("with-footer",ed(p))])},[e.filterable?(af(),uf(ed(Xj),{key:0,modelValue:ed(C),"onUpdate:modelValue":e=>Jh(C)?C.value=e:null,class:pu(ed(o).be("panel","filter")),size:"default",placeholder:e.placeholder,"prefix-icon":ed(eW),clearable:"","validate-event":!1},null,8,["modelValue","onUpdate:modelValue","class","placeholder","prefix-icon"])):Bf("v-if",!0),Ld(mf(ed(o0),{modelValue:ed(f),"onUpdate:modelValue":e=>Jh(f)?f.value=e:null,"validate-event":!1,class:pu([ed(o).is("filterable",e.filterable),ed(o).be("panel","list")])},{default:Nd((()=>[(af(!0),cf(Zp,null,Pg(ed(c),(t=>(af(),uf(ed(r0),{key:t[ed(A).key],class:pu(ed(o).be("panel","item")),value:t[ed(A).key],disabled:t[ed(A).disabled],"validate-event":!1},{default:Nd((()=>{var i;return[mf(r,{option:null==(i=e.optionRender)?void 0:i.call(e,t)},null,8,["option"])]})),_:2},1032,["class","value","disabled"])))),128))])),_:1},8,["modelValue","onUpdate:modelValue","class"]),[[ym,!ed(g)&&!ed(cL)(e.data)]]),Ld(ff("div",{class:pu(ed(o).be("panel","empty"))},[Gg(e.$slots,"empty",{},(()=>[vf(yu(ed(g)?ed(a)("el.transfer.noMatch"):ed(a)("el.transfer.noData")),1)]))],2),[[ym,ed(g)||ed(cL)(e.data)]])],2),ed(p)?(af(),cf("p",{key:0,class:pu(ed(o).be("panel","footer"))},[Gg(e.$slots,"default")],2)):Bf("v-if",!0)],2))}});var Jre=KU(jre,[["__file","transfer-panel.vue"]]);const zre=hg({...hg({name:"ElTransfer"}),props:Ore,emits:Kre,setup(e,{expose:t,emit:i}){const n=e,s=jg(),{t:r}=CU(),a=KF("transfer"),{formItem:o}=Kj(),l=Lh({leftChecked:[],rightChecked:[]}),A=Wre(n),{sourceData:c,targetData:u}=(e=>{const t=Wre(e),i=qf((()=>e.data.reduce(((e,i)=>(e[i[t.value.key]]=i)&&e),{})));return{sourceData:qf((()=>e.data.filter((i=>!e.modelValue.includes(i[t.value.key]))))),targetData:qf((()=>"original"===e.targetOrder?e.data.filter((i=>e.modelValue.includes(i[t.value.key]))):e.modelValue.reduce(((e,t)=>{const n=i.value[t];return n&&e.push(n),e}),[])))}})(n),{onSourceCheckedChange:h,onTargetCheckedChange:d}=((e,t)=>({onSourceCheckedChange:(i,n)=>{e.leftChecked=i,n&&t(Hre,i,n)},onTargetCheckedChange:(i,n)=>{e.rightChecked=i,n&&t(Pre,i,n)}}))(l,i),{addToLeft:g,addToRight:p}=((e,t,i)=>{const n=Wre(e),s=(e,t,n)=>{i(UU,e),i(HU,e,t,n)};return{addToLeft:()=>{const i=e.modelValue.slice();t.rightChecked.forEach((e=>{const t=i.indexOf(e);t>-1&&i.splice(t,1)})),s(i,"left",t.rightChecked)},addToRight:()=>{let i=e.modelValue.slice();const r=e.data.filter((i=>{const s=i[n.value.key];return t.leftChecked.includes(s)&&!e.modelValue.includes(s)})).map((e=>e[n.value.key]));i="unshift"===e.targetOrder?r.concat(i):i.concat(r),"original"===e.targetOrder&&(i=e.data.filter((e=>i.includes(e[n.value.key]))).map((e=>e[n.value.key]))),s(i,"right",t.leftChecked)}}})(n,l,i),f=zh(),m=zh(),C=qf((()=>2===n.buttonTexts.length)),I=qf((()=>n.titles[0]||r("el.transfer.titles.0"))),v=qf((()=>n.titles[1]||r("el.transfer.titles.1"))),B=qf((()=>n.filterPlaceholder||r("el.transfer.filterPlaceholder")));Pp((()=>n.modelValue),(()=>{var e;n.validateEvent&&(null==(e=null==o?void 0:o.validate)||e.call(o,"change").catch((e=>{})))}));const y=qf((()=>e=>{var t;if(n.renderContent)return n.renderContent(Yf,e);const i=((null==(t=s.default)?void 0:t.call(s,{option:e}))||[]).filter((e=>e.type!==tf));return i.length?i:Yf("span",e[A.value.label]||e[A.value.key])}));return t({clearQuery:e=>{switch(e){case"left":f.value.query="";break;case"right":m.value.query=""}},leftPanel:f,rightPanel:m}),(e,t)=>(af(),cf("div",{class:pu(ed(a).b())},[mf(Jre,{ref_key:"leftPanel",ref:f,data:ed(c),"option-render":ed(y),placeholder:ed(B),title:ed(I),filterable:e.filterable,format:e.format,"filter-method":e.filterMethod,"default-checked":e.leftDefaultChecked,props:n.props,onCheckedChange:ed(h)},{empty:Nd((()=>[Gg(e.$slots,"left-empty")])),default:Nd((()=>[Gg(e.$slots,"left-footer")])),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),ff("div",{class:pu(ed(a).e("buttons"))},[mf(ed(eZ),{type:"primary",class:pu([ed(a).e("button"),ed(a).is("with-texts",ed(C))]),disabled:ed(cL)(l.rightChecked),onClick:ed(g)},{default:Nd((()=>[mf(ed(gH),null,{default:Nd((()=>[mf(ed(kH))])),_:1}),ed(oL)(e.buttonTexts[0])?Bf("v-if",!0):(af(),cf("span",{key:0},yu(e.buttonTexts[0]),1))])),_:1},8,["class","disabled","onClick"]),mf(ed(eZ),{type:"primary",class:pu([ed(a).e("button"),ed(a).is("with-texts",ed(C))]),disabled:ed(cL)(l.leftChecked),onClick:ed(p)},{default:Nd((()=>[ed(oL)(e.buttonTexts[1])?Bf("v-if",!0):(af(),cf("span",{key:0},yu(e.buttonTexts[1]),1)),mf(ed(gH),null,{default:Nd((()=>[mf(ed(MH))])),_:1})])),_:1},8,["class","disabled","onClick"])],2),mf(Jre,{ref_key:"rightPanel",ref:m,data:ed(u),"option-render":ed(y),placeholder:ed(B),filterable:e.filterable,format:e.format,"filter-method":e.filterMethod,title:ed(v),"default-checked":e.rightDefaultChecked,props:n.props,onCheckedChange:ed(d)},{empty:Nd((()=>[Gg(e.$slots,"right-empty")])),default:Nd((()=>[Gg(e.$slots,"right-footer")])),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});const Xre=lH(KU(zre,[["__file","transfer.vue"]])),$re="$treeNodeId",Zre=function(e,t){t&&!t[$re]&&Object.defineProperty(t,$re,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},eae=function(e,t){return e?t[e]:t[$re]},tae=(e,t,i)=>{const n=e.value.currentNode;i();const s=e.value.currentNode;n!==s&&t("current-change",s?s.data:null,s)},iae=e=>{let t=!0,i=!0,n=!0;for(let s=0,r=e.length;s<r;s++){const r=e[s];(!0!==r.checked||r.indeterminate)&&(t=!1,r.disabled||(n=!1)),(!1!==r.checked||r.indeterminate)&&(i=!1)}return{all:t,none:i,allWithoutDisable:n,half:!t&&!i}},nae=function(e){if(0===e.childNodes.length||e.loading)return;const{all:t,none:i,half:n}=iae(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):n?(e.checked=!1,e.indeterminate=!0):i&&(e.checked=!1,e.indeterminate=!1);const s=e.parent;s&&0!==s.level&&(e.store.checkStrictly||nae(s))},sae=function(e,t){const i=e.store.props,n=e.data||{},s=i[t];if(Oc(s))return s(n,e);if(Gc(s))return n[s];if(oL(s)){const e=n[t];return void 0===e?"":e}};let rae=0,aae=class e{constructor(e){this.id=rae++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const t in e)Nc(e,t)&&(this[t]=e[t]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const e=this.store;if(!e)throw new Error("[Node]store is required!");e.registerNode(this);const t=e.props;if(t&&void 0!==t.isLeaf){const e=sae(this,"isLeaf");lL(e)&&(this.isLeafByUser=e)}if(!0!==e.lazy&&this.data?(this.setData(this.data),e.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&e.lazy&&e.defaultExpandAll&&!this.isLeafByUser&&this.expand(),Lc(this.data)||Zre(this,this.data),!this.data)return;const i=e.defaultExpandedKeys,n=e.key;n&&i&&i.includes(this.key)&&this.expand(null,e.autoExpandParent),n&&void 0!==e.currentNodeKey&&this.key===e.currentNodeKey&&(e.currentNode=this,e.currentNode.isCurrent=!0),e.lazy&&e._initDefaultCheckedNode(this),this.updateLeafState(),!this.parent||1!==this.level&&!0!==this.parent.expanded||(this.canFocus=!0)}setData(e){let t;Lc(e)||Zre(this,e),this.data=e,this.childNodes=[],t=0===this.level&&Lc(this.data)?this.data:sae(this,"children")||[];for(let i=0,n=t.length;i<n;i++)this.insertChild({data:t[i]})}get label(){return sae(this,"label")}get key(){const e=this.store.key;return this.data?this.data[e]:null}get disabled(){return sae(this,"disabled")}get nextSibling(){const e=this.parent;if(e){const t=e.childNodes.indexOf(this);if(t>-1)return e.childNodes[t+1]}return null}get previousSibling(){const e=this.parent;if(e){const t=e.childNodes.indexOf(this);if(t>-1)return t>0?e.childNodes[t-1]:null}return null}contains(e,t=!0){return(this.childNodes||[]).some((i=>i===e||t&&i.contains(e)))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(t,i,n){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof e)){if(!n){const e=this.getChildren(!0);e.includes(t.data)||(oL(i)||i<0?e.push(t.data):e.splice(i,0,t.data))}Object.assign(t,{parent:this,store:this.store}),(t=Lh(new e(t)))instanceof e&&t.initialize()}t.level=this.level+1,oL(i)||i<0?this.childNodes.push(t):this.childNodes.splice(i,0,t),this.updateLeafState()}insertBefore(e,t){let i;t&&(i=this.childNodes.indexOf(t)),this.insertChild(e,i)}insertAfter(e,t){let i;t&&(i=this.childNodes.indexOf(t),-1!==i&&(i+=1)),this.insertChild(e,i)}removeChild(e){const t=this.getChildren()||[],i=t.indexOf(e.data);i>-1&&t.splice(i,1);const n=this.childNodes.indexOf(e);n>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(n,1)),this.updateLeafState()}removeChildByData(e){let t=null;for(let i=0;i<this.childNodes.length;i++)if(this.childNodes[i].data===e){t=this.childNodes[i];break}t&&this.removeChild(t)}expand(e,t){const i=()=>{if(t){let e=this.parent;for(;e.level>0;)e.expanded=!0,e=e.parent}this.expanded=!0,e&&e(),this.childNodes.forEach((e=>{e.canFocus=!0}))};this.shouldLoadData()?this.loadData((e=>{Lc(e)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||nae(this),i())})):i()}doCreateChildren(e,t={}){e.forEach((e=>{this.insertChild(Object.assign({data:e},t),void 0,!0)}))}collapse(){this.expanded=!1,this.childNodes.forEach((e=>{e.canFocus=!1}))}shouldLoadData(){return!0===this.store.lazy&&this.store.load&&!this.loaded}updateLeafState(){if(!0===this.store.lazy&&!0!==this.loaded&&void 0!==this.isLeafByUser)return void(this.isLeaf=this.isLeafByUser);const e=this.childNodes;!this.store.lazy||!0===this.store.lazy&&!0===this.loaded?this.isLeaf=!e||0===e.length:this.isLeaf=!1}setChecked(e,t,i,n){if(this.indeterminate="half"===e,this.checked=!0===e,this.store.checkStrictly)return;if(!this.shouldLoadData()||this.store.checkDescendants){const{all:i,allWithoutDisable:s}=iae(this.childNodes);this.isLeaf||i||!s||(this.checked=!1,e=!1);const r=()=>{if(t){const i=this.childNodes;for(let a=0,o=i.length;a<o;a++){const s=i[a];n=n||!1!==e;const r=s.disabled?s.checked:n;s.setChecked(r,t,!0,n)}const{half:s,all:r}=iae(i);r||(this.checked=r,this.indeterminate=s)}};if(this.shouldLoadData())return void this.loadData((()=>{r(),nae(this)}),{checked:!1!==e});r()}const s=this.parent;s&&0!==s.level&&(i||nae(s))}getChildren(e=!1){if(0===this.level)return this.data;const t=this.data;if(!t)return null;const i=this.store.props;let n="children";return i&&(n=i.children||"children"),void 0===t[n]&&(t[n]=null),e&&!t[n]&&(t[n]=[]),t[n]}updateChildren(){const e=this.getChildren()||[],t=this.childNodes.map((e=>e.data)),i={},n=[];e.forEach(((e,s)=>{const r=e[$re];!!r&&t.findIndex((e=>e[$re]===r))>=0?i[r]={index:s,data:e}:n.push({index:s,data:e})})),this.store.lazy||t.forEach((e=>{i[e[$re]]||this.removeChildByData(e)})),n.forEach((({index:e,data:t})=>{this.insertChild({data:t},e)})),this.updateLeafState()}loadData(e,t={}){if(!0!==this.store.lazy||!this.store.load||this.loaded||this.loading&&!Object.keys(t).length)e&&e.call(this);else{this.loading=!0;const i=i=>{this.childNodes=[],this.doCreateChildren(i,t),this.loaded=!0,this.loading=!1,this.updateLeafState(),e&&e.call(this,i)},n=()=>{this.loading=!1};this.store.load(this,i,n)}}eachNode(e){const t=[this];for(;t.length;){const i=t.shift();t.unshift(...i.childNodes),e(i)}}reInitChecked(){this.store.checkStrictly||nae(this)}};class oae{constructor(e){this.currentNode=null,this.currentNodeKey=null;for(const t in e)Nc(e,t)&&(this[t]=e[t]);this.nodesMap={}}initialize(){if(this.root=new aae({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){(0,this.load)(this.root,(e=>{this.root.doCreateChildren(e),this._initDefaultCheckedNodes()}))}else this._initDefaultCheckedNodes()}filter(e){const t=this.filterNodeMethod,i=this.lazy,n=function(s){const r=s.root?s.root.childNodes:s.childNodes;if(r.forEach((i=>{i.visible=t.call(i,e,i.data,i),n(i)})),!s.visible&&r.length){let e=!0;e=!r.some((e=>e.visible)),s.root?s.root.visible=!1===e:s.visible=!1===e}e&&s.visible&&!s.isLeaf&&(i&&!s.loaded||s.expand())};n(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(e){if(e instanceof aae)return e;const t=qc(e)?eae(this.key,e):e;return this.nodesMap[t]||null}insertBefore(e,t){const i=this.getNode(t);i.parent.insertBefore({data:e},i)}insertAfter(e,t){const i=this.getNode(t);i.parent.insertAfter({data:e},i)}remove(e){const t=this.getNode(e);t&&t.parent&&(t===this.currentNode&&(this.currentNode=null),t.parent.removeChild(t))}append(e,t){const i=hL(t)?this.root:this.getNode(t);i&&i.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],t=this.nodesMap;e.forEach((e=>{const i=t[e];i&&i.setChecked(!0,!this.checkStrictly)}))}_initDefaultCheckedNode(e){(this.defaultCheckedKeys||[]).includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const t=this.key;if(e&&e.data)if(t){void 0!==e.key&&(this.nodesMap[e.key]=e)}else this.nodesMap[e.id]=e}deregisterNode(e){this.key&&e&&e.data&&(e.childNodes.forEach((e=>{this.deregisterNode(e)})),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,t=!1){const i=[],n=function(s){(s.root?s.root.childNodes:s.childNodes).forEach((s=>{(s.checked||t&&s.indeterminate)&&(!e||e&&s.isLeaf)&&i.push(s.data),n(s)}))};return n(this),i}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map((e=>(e||{})[this.key]))}getHalfCheckedNodes(){const e=[],t=function(i){(i.root?i.root.childNodes:i.childNodes).forEach((i=>{i.indeterminate&&e.push(i.data),t(i)}))};return t(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map((e=>(e||{})[this.key]))}_getAllNodes(){const e=[],t=this.nodesMap;for(const i in t)Nc(t,i)&&e.push(t[i]);return e}updateChildren(e,t){const i=this.nodesMap[e];if(!i)return;const n=i.childNodes;for(let s=n.length-1;s>=0;s--){const e=n[s];this.remove(e.data)}for(let s=0,r=t.length;s<r;s++){const e=t[s];this.append(e,i.data)}}_setCheckedKeys(e,t=!1,i){const n=this._getAllNodes().sort(((e,t)=>e.level-t.level)),s=Object.create(null),r=Object.keys(i);n.forEach((e=>e.setChecked(!1,!1)));const a=t=>{t.childNodes.forEach((t=>{var i;s[t.data[e]]=!0,(null==(i=t.childNodes)?void 0:i.length)&&a(t)}))};for(let o=0,l=n.length;o<l;o++){const i=n[o],l=i.data[e].toString();if(r.includes(l)){if(i.childNodes.length&&a(i),i.isLeaf||this.checkStrictly)i.setChecked(!0,!1);else if(i.setChecked(!0,!0),t){i.setChecked(!1,!1);const e=function(t){t.childNodes.forEach((t=>{t.isLeaf||t.setChecked(!1,!1),e(t)}))};e(i)}}else i.checked&&!s[l]&&i.setChecked(!1,!1)}}setCheckedNodes(e,t=!1){const i=this.key,n={};e.forEach((e=>{n[(e||{})[i]]=!0})),this._setCheckedKeys(i,t,n)}setCheckedKeys(e,t=!1){this.defaultCheckedKeys=e;const i=this.key,n={};e.forEach((e=>{n[e]=!0})),this._setCheckedKeys(i,t,n)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach((e=>{const t=this.getNode(e);t&&t.expand(null,this.autoExpandParent)}))}setChecked(e,t,i){const n=this.getNode(e);n&&n.setChecked(!!t,i)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const t=this.currentNode;t&&(t.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,t=!0){const i=e[this.key],n=this.nodesMap[i];this.setCurrentNode(n),t&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(e,t=!0){if(this.currentNodeKey=e,null==e)return this.currentNode&&(this.currentNode.isCurrent=!1),void(this.currentNode=null);const i=this.getNode(e);i&&(this.setCurrentNode(i),t&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const lae=hg({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=KF("tree"),i=pp("NodeInstance"),n=pp("RootTree");return()=>{const s=e.node,{data:r,store:a}=s;return e.renderContent?e.renderContent(Yf,{_self:i,node:s,data:r,store:a}):Gg(n.ctx.slots,"default",{node:s,data:r},(()=>[Yf("span",{class:t.be("node","label")},[s.label])]))}}});var Aae=KU(lae,[["__file","tree-node-content.vue"]]);function cae(e){const t=pp("TreeNodeMap",null),i={treeNodeExpand:t=>{e.node!==t&&e.node.collapse()},children:[]};return t&&t.children.push(i),gp("TreeNodeMap",i),{broadcastExpanded:t=>{if(e.accordion)for(const e of i.children)e.treeNodeExpand(t)}}}const uae=Symbol("dragEvents");const hae=hg({name:"ElTreeNode",components:{ElCollapseTransition:p1,ElCheckbox:r0,NodeContent:Aae,ElIcon:gH,Loading:qq},props:{node:{type:aae,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const i=KF("tree"),{broadcastExpanded:n}=cae(e),s=pp("RootTree"),r=zh(!1),a=zh(!1),o=zh(null),l=zh(null),A=zh(null),c=pp(uae),u=kf();gp("NodeInstance",u),e.node.expanded&&(r.value=!0,a.value=!0);const h=s.props.props.children||"children";Pp((()=>{const t=e.node.data[h];return t&&[...t]}),(()=>{e.node.updateChildren()})),Pp((()=>e.node.indeterminate),(t=>{g(e.node.checked,t)})),Pp((()=>e.node.checked),(t=>{g(t,e.node.indeterminate)})),Pp((()=>e.node.childNodes.length),(()=>e.node.reInitChecked())),Pp((()=>e.node.expanded),(e=>{Qd((()=>r.value=e)),e&&(a.value=!0)}));const d=e=>eae(s.props.nodeKey,e.data),g=(t,i)=>{o.value===t&&l.value===i||s.ctx.emit("check-change",e.node.data,t,i),o.value=t,l.value=i},p=()=>{e.node.isLeaf||(r.value?(s.ctx.emit("node-collapse",e.node.data,e.node,u),e.node.collapse()):e.node.expand((()=>{t.emit("node-expand",e.node.data,e.node,u)})))},f=(t,i)=>{e.node.setChecked(i.target.checked,!s.props.checkStrictly),Qd((()=>{const t=s.store.value;s.ctx.emit("check",e.node.data,{checkedNodes:t.getCheckedNodes(),checkedKeys:t.getCheckedKeys(),halfCheckedNodes:t.getHalfCheckedNodes(),halfCheckedKeys:t.getHalfCheckedKeys()})}))};return{ns:i,node$:A,tree:s,expanded:r,childNodeRendered:a,oldChecked:o,oldIndeterminate:l,getNodeKey:d,getNodeClass:t=>{const i=e.props.class;if(!i)return{};let n;if(Oc(i)){const{data:e}=t;n=i(e,t)}else n=i;return Gc(n)?{[n]:!0}:n},handleSelectChange:g,handleClick:t=>{tae(s.store,s.ctx.emit,(()=>{var t;if(null==(t=null==s?void 0:s.props)?void 0:t.nodeKey){const t=d(e.node);s.store.value.setCurrentNodeKey(t)}else s.store.value.setCurrentNode(e.node)})),s.currentNode.value=e.node,s.props.expandOnClickNode&&p(),s.props.checkOnClickNode&&!e.node.disabled&&f(null,{target:{checked:!e.node.checked}}),s.ctx.emit("node-click",e.node.data,e.node,u,t)},handleContextMenu:t=>{s.instance.vnode.props.onNodeContextmenu&&(t.stopPropagation(),t.preventDefault()),s.ctx.emit("node-contextmenu",t,e.node.data,e.node,u)},handleExpandIconClick:p,handleCheckChange:f,handleChildNodeExpand:(e,t,i)=>{n(t),s.ctx.emit("node-expand",e,t,i)},handleDragStart:t=>{s.props.draggable&&c.treeNodeDragStart({event:t,treeNode:e})},handleDragOver:t=>{t.preventDefault(),s.props.draggable&&c.treeNodeDragOver({event:t,treeNode:{$el:A.value,node:e.node}})},handleDrop:e=>{e.preventDefault()},handleDragEnd:e=>{s.props.draggable&&c.treeNodeDragEnd(e)},CaretRight:SP}}});const dae=hg({name:"ElTree",components:{ElTreeNode:KU(hae,[["render",function(e,t,i,n,s,r){const a=Mg("el-icon"),o=Mg("el-checkbox"),l=Mg("loading"),A=Mg("node-content"),c=Mg("el-tree-node"),u=Mg("el-collapse-transition");return Ld((af(),cf("div",{ref:"node$",class:pu([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:AC(e.handleClick,["stop"]),onContextmenu:e.handleContextMenu,onDragstart:AC(e.handleDragStart,["stop"]),onDragover:AC(e.handleDragOver,["stop"]),onDragend:AC(e.handleDragEnd,["stop"]),onDrop:AC(e.handleDrop,["stop"])},[ff("div",{class:pu(e.ns.be("node","content")),style:cu({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(af(),uf(a,{key:0,class:pu([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:AC(e.handleExpandIconClick,["stop"])},{default:Nd((()=>[(af(),uf(Ng(e.tree.props.icon||e.CaretRight)))])),_:1},8,["class","onClick"])):Bf("v-if",!0),e.showCheckbox?(af(),uf(o,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:AC((()=>{}),["stop"]),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):Bf("v-if",!0),e.node.loading?(af(),uf(a,{key:2,class:pu([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:Nd((()=>[mf(l)])),_:1},8,["class"])):Bf("v-if",!0),mf(A,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),mf(u,null,{default:Nd((()=>[!e.renderAfterExpand||e.childNodeRendered?Ld((af(),cf("div",{key:0,class:pu(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(af(!0),cf(Zp,null,Pg(e.node.childNodes,(t=>(af(),uf(c,{key:e.getNodeKey(t),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:t,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"])))),128))],10,["aria-expanded"])),[[ym,e.expanded]]):Bf("v-if",!0)])),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[ym,e.node.visible]])}],["__file","tree-node.vue"]])},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:fj}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:i}=CU(),n=KF("tree"),s=pp(A9,null),r=zh(new oae({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));r.value.initialize();const a=zh(r.value.root),o=zh(null),l=zh(null),A=zh(null),{broadcastExpanded:c}=cae(e),{dragState:u}=function({props:e,ctx:t,el$:i,dropIndicator$:n,store:s}){const r=KF("tree"),a=zh({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return gp(uae,{treeNodeDragStart:({event:i,treeNode:n})=>{if(Oc(e.allowDrag)&&!e.allowDrag(n.node))return i.preventDefault(),!1;i.dataTransfer.effectAllowed="move";try{i.dataTransfer.setData("text/plain","")}catch(I2){}a.value.draggingNode=n,t.emit("node-drag-start",n.node,i)},treeNodeDragOver:({event:s,treeNode:o})=>{const l=o,A=a.value.dropNode;A&&A.node.id!==l.node.id&&JU(A.$el,r.is("drop-inner"));const c=a.value.draggingNode;if(!c||!l)return;let u=!0,h=!0,d=!0,g=!0;Oc(e.allowDrop)&&(u=e.allowDrop(c.node,l.node,"prev"),g=h=e.allowDrop(c.node,l.node,"inner"),d=e.allowDrop(c.node,l.node,"next")),s.dataTransfer.dropEffect=h||u||d?"move":"none",(u||h||d)&&(null==A?void 0:A.node.id)!==l.node.id&&(A&&t.emit("node-drag-leave",c.node,A.node,s),t.emit("node-drag-enter",c.node,l.node,s)),a.value.dropNode=u||h||d?l:null,l.node.nextSibling===c.node&&(d=!1),l.node.previousSibling===c.node&&(u=!1),l.node.contains(c.node,!1)&&(h=!1),(c.node===l.node||c.node.contains(l.node))&&(u=!1,h=!1,d=!1);const p=l.$el.querySelector(`.${r.be("node","content")}`).getBoundingClientRect(),f=i.value.getBoundingClientRect();let m;const C=u?h?.25:d?.45:1:-1,I=d?h?.75:u?.55:0:1;let v=-9999;const B=s.clientY-p.top;m=B<p.height*C?"before":B>p.height*I?"after":h?"inner":"none";const y=l.$el.querySelector(`.${r.be("node","expand-icon")}`).getBoundingClientRect(),b=n.value;"before"===m?v=y.top-f.top:"after"===m&&(v=y.bottom-f.top),b.style.top=`${v}px`,b.style.left=y.right-f.left+"px","inner"===m?jU(l.$el,r.is("drop-inner")):JU(l.$el,r.is("drop-inner")),a.value.showDropIndicator="before"===m||"after"===m,a.value.allowDrop=a.value.showDropIndicator||g,a.value.dropType=m,t.emit("node-drag-over",c.node,l.node,s)},treeNodeDragEnd:e=>{const{draggingNode:i,dropType:n,dropNode:o}=a.value;if(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),i&&o){const a={data:i.node.data};"none"!==n&&i.node.remove(),"before"===n?o.node.parent.insertBefore(a,o.node):"after"===n?o.node.parent.insertAfter(a,o.node):"inner"===n&&o.node.insertChild(a),"none"!==n&&(s.value.registerNode(a),s.value.key&&i.node.eachNode((e=>{var t;null==(t=s.value.nodesMap[e.data[s.value.key]])||t.setChecked(e.checked,!s.value.checkStrictly)}))),JU(o.$el,r.is("drop-inner")),t.emit("node-drag-end",i.node,o.node,n,e),"none"!==n&&t.emit("node-drop",i.node,o.node,n,e)}i&&!o&&t.emit("node-drag-end",i.node,null,n,e),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0}}),{dragState:a}}({props:e,ctx:t,el$:l,dropIndicator$:A,store:r});!function({el$:e},t){const i=KF("tree"),n=Xh([]),s=Xh([]);Eg((()=>{r()})),Qg((()=>{n.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),s.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))})),Pp(s,(e=>{e.forEach((e=>{e.setAttribute("tabindex","-1")}))})),UL(e,"keydown",(s=>{const r=s.target;if(!r.className.includes(i.b("node")))return;const a=s.code;n.value=Array.from(e.value.querySelectorAll(`.${i.is("focusable")}[role=treeitem]`));const o=n.value.indexOf(r);let l;if([zJ.up,zJ.down].includes(a)){if(s.preventDefault(),a===zJ.up){l=-1===o?0:0!==o?o-1:n.value.length-1;const e=l;for(;!t.value.getNode(n.value[l].dataset.key).canFocus;){if(l--,l===e){l=-1;break}l<0&&(l=n.value.length-1)}}else{l=-1===o?0:o<n.value.length-1?o+1:0;const e=l;for(;!t.value.getNode(n.value[l].dataset.key).canFocus;){if(l++,l===e){l=-1;break}l>=n.value.length&&(l=0)}}-1!==l&&n.value[l].focus()}[zJ.left,zJ.right].includes(a)&&(s.preventDefault(),r.click());const A=r.querySelector('[type="checkbox"]');[zJ.enter,zJ.numpadEnter,zJ.space].includes(a)&&A&&(s.preventDefault(),A.click())}));const r=()=>{var t;n.value=Array.from(e.value.querySelectorAll(`.${i.is("focusable")}[role=treeitem]`)),s.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const r=e.value.querySelectorAll(`.${i.is("checked")}[role=treeitem]`);r.length?r[0].setAttribute("tabindex","0"):null==(t=n.value[0])||t.setAttribute("tabindex","0")}}({el$:l},r);const h=qf((()=>{const{childNodes:e}=a.value,t=!!s&&0!==s.hasFilteredOptions;return(!e||0===e.length||e.every((({visible:e})=>!e)))&&!t}));Pp((()=>e.currentNodeKey),(e=>{r.value.setCurrentNodeKey(e)})),Pp((()=>e.defaultCheckedKeys),(e=>{r.value.setDefaultCheckedKey(e)})),Pp((()=>e.defaultExpandedKeys),(e=>{r.value.setDefaultExpandedKeys(e)})),Pp((()=>e.data),(e=>{r.value.setData(e)}),{deep:!0}),Pp((()=>e.checkStrictly),(e=>{r.value.checkStrictly=e}));const d=()=>{const e=r.value.getCurrentNode();return e?e.data:null};return gp("RootTree",{ctx:t,props:e,store:r,root:a,currentNode:o,instance:kf()}),gp(Uj,void 0),{ns:n,store:r,root:a,currentNode:o,dragState:u,el$:l,dropIndicator$:A,isEmpty:h,filter:t=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");r.value.filter(t)},getNodeKey:t=>eae(e.nodeKey,t.data),getNodePath:t=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const i=r.value.getNode(t);if(!i)return[];const n=[i.data];let s=i.parent;for(;s&&s!==a.value;)n.push(s.data),s=s.parent;return n.reverse()},getCheckedNodes:(e,t)=>r.value.getCheckedNodes(e,t),getCheckedKeys:e=>r.value.getCheckedKeys(e),getCurrentNode:d,getCurrentKey:()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const t=d();return t?t[e.nodeKey]:null},setCheckedNodes:(t,i)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");r.value.setCheckedNodes(t,i)},setCheckedKeys:(t,i)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");r.value.setCheckedKeys(t,i)},setChecked:(e,t,i)=>{r.value.setChecked(e,t,i)},getHalfCheckedNodes:()=>r.value.getHalfCheckedNodes(),getHalfCheckedKeys:()=>r.value.getHalfCheckedKeys(),setCurrentNode:(i,n=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");tae(r,t.emit,(()=>{c(i),r.value.setUserCurrentNode(i,n)}))},setCurrentKey:(i,n=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");tae(r,t.emit,(()=>{c(),r.value.setCurrentNodeKey(i,n)}))},t:i,getNode:e=>r.value.getNode(e),remove:e=>{r.value.remove(e)},append:(e,t)=>{r.value.append(e,t)},insertBefore:(e,t)=>{r.value.insertBefore(e,t)},insertAfter:(e,t)=>{r.value.insertAfter(e,t)},handleNodeExpand:(e,i,n)=>{c(i),t.emit("node-expand",e,i,n)},updateKeyChildren:(t,i)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");r.value.updateChildren(t,i)}}}});var gae=KU(dae,[["render",function(e,t,i,n,s,r){const a=Mg("el-tree-node");return af(),cf("div",{ref:"el$",class:pu([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner","inner"===e.dragState.dropType),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(af(!0),cf(Zp,null,Pg(e.root.childNodes,(t=>(af(),uf(a,{key:e.getNodeKey(t),node:t,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"])))),128)),e.isEmpty?(af(),cf("div",{key:0,class:pu(e.ns.e("empty-block"))},[Gg(e.$slots,"empty",{},(()=>{var t;return[ff("span",{class:pu(e.ns.e("empty-text"))},yu(null!=(t=e.emptyText)?t:e.t("el.tree.emptyText")),3)]}))],2)):Bf("v-if",!0),Ld(ff("div",{ref:"dropIndicator$",class:pu(e.ns.e("drop-indicator"))},null,2),[[ym,e.dragState.showDropIndicator]])],2)}],["__file","tree.vue"]]);const pae=lH(gae),fae=hg({extends:b9,setup(e,t){const i=b9.setup(e,t);delete i.selectOptionClick;const n=kf().proxy;return Qd((()=>{i.select.states.cachedOptions.get(n.value)||i.select.onOptionCreate(n)})),Pp((()=>t.attrs.visible),(e=>{i.states.visible=e}),{immediate:!0}),i},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function mae(e){return e||0===e}function Cae(e){return Lc(e)&&e.length}function Iae(e){return Lc(e)?e:mae(e)?[e]:[]}function vae(e,t,i,n,s){for(let r=0;r<e.length;r++){const a=e[r];if(t(a,r,e,s))return n?n(a,r,e,s):a;{const e=i(a);if(Cae(e)){const s=vae(e,t,i,n,a);if(s)return s}}}}function Bae(e,t,i,n){for(let s=0;s<e.length;s++){const r=e[s];t(r,s,e,n);const a=i(r);Cae(a)&&Bae(a,t,i,r)}}var yae=hg({props:{data:{type:Array,default:()=>[]}},setup(e){const t=pp(A9);return Pp((()=>e.data),(()=>{var i;e.data.forEach((e=>{t.states.cachedOptions.has(e.value)||t.states.cachedOptions.set(e.value,e)}));const n=(null==(i=t.selectRef)?void 0:i.querySelectorAll("input"))||[];bL&&!Array.from(n).includes(document.activeElement)&&t.setSelected()}),{flush:"post",immediate:!0}),()=>{}}});const bae=hg({name:"ElTreeSelect",inheritAttrs:!1,props:{...y9.props,...pae.props,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:i,expose:n}=t,s=zh(),r=zh(),a=qf((()=>e.nodeKey||e.valueKey||"value")),o=((e,{attrs:t,emit:i},{select:n,tree:s,key:r})=>{const a=KF("tree-select");return Pp((()=>e.data),(()=>{e.filterable&&Qd((()=>{var e,t;null==(t=s.value)||t.filter(null==(e=n.value)?void 0:e.states.inputValue)}))}),{flush:"post"}),{...nL(rd(e),Object.keys(y9.props)),...t,"onUpdate:modelValue":e=>i(UU,e),valueKey:r,popperClass:qf((()=>{const t=[a.e("popper")];return e.popperClass&&t.push(e.popperClass),t.join(" ")})),filterMethod:(t="")=>{var i;e.filterMethod?e.filterMethod(t):e.remoteMethod?e.remoteMethod(t):null==(i=s.value)||i.filter(t)}}})(e,t,{select:s,tree:r,key:a}),{cacheOptions:l,...A}=((e,{attrs:t,slots:i,emit:n},{select:s,tree:r,key:a})=>{Pp((()=>e.modelValue),(()=>{e.showCheckbox&&Qd((()=>{const t=r.value;t&&!WN(t.getCheckedKeys(),Iae(e.modelValue))&&t.setCheckedKeys(Iae(e.modelValue))}))}),{immediate:!0,deep:!0});const o=qf((()=>({value:a.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props}))),l=(e,t)=>{var i;const n=o.value[e];return Oc(n)?n(t,null==(i=r.value)?void 0:i.getNode(l("value",t))):t[n]},A=Iae(e.modelValue).map((t=>vae(e.data||[],(e=>l("value",e)===t),(e=>l("children",e)),((e,t,i,n)=>n&&l("value",n))))).filter((e=>mae(e))),c=qf((()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const t=[];return Bae(e.data.concat(e.cacheData),(e=>{const i=l("value",e);t.push({value:i,currentLabel:l("label",e),isDisabled:l("disabled",e)})}),(e=>l("children",e))),t})),u=()=>{var e;return null==(e=r.value)?void 0:e.getCheckedKeys().filter((e=>{var t;const i=null==(t=r.value)?void 0:t.getNode(e);return!jN(i)&&cL(i.childNodes)}))};return{...nL(rd(e),Object.keys(pae.props)),...t,nodeKey:a,expandOnClickNode:qf((()=>!e.checkStrictly&&e.expandOnClickNode)),defaultExpandedKeys:qf((()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(A):A)),renderContent:(t,{node:n,data:s,store:r})=>t(fae,{value:l("value",s),label:l("label",s),disabled:l("disabled",s),visible:n.visible},e.renderContent?()=>e.renderContent(t,{node:n,data:s,store:r}):i.default?()=>i.default({node:n,data:s,store:r}):void 0),filterNodeMethod:(t,i,n)=>e.filterNodeMethod?e.filterNodeMethod(t,i,n):!t||new RegExp(k0(t),"i").test(l("label",i)||""),onNodeClick:(i,n,r)=>{var a,o,A,c;if(null==(a=t.onNodeClick)||a.call(t,i,n,r),!e.showCheckbox||!e.checkOnClickNode){if(e.showCheckbox||!e.checkStrictly&&!n.isLeaf)e.expandOnClickNode&&r.proxy.handleExpandIconClick();else if(!l("disabled",i)){const e=null==(o=s.value)?void 0:o.states.options.get(l("value",i));null==(A=s.value)||A.handleOptionSelect(e)}null==(c=s.value)||c.focus()}},onCheck:(i,a)=>{var o;if(!e.showCheckbox)return;const A=l("value",i),c={};Bae([r.value.store.root],(e=>c[e.key]=e),(e=>e.childNodes));const h=a.checkedKeys,d=e.multiple?Iae(e.modelValue).filter((e=>!(e in c)&&!h.includes(e))):[],g=d.concat(h);if(e.checkStrictly)n(UU,e.multiple?g:g.includes(A)?A:void 0);else if(e.multiple){const e=u();n(UU,d.concat(e))}else{const t=vae([i],(e=>!Cae(l("children",e))&&!l("disabled",e)),(e=>l("children",e))),s=t?l("value",t):void 0,r=mae(e.modelValue)&&!!vae([i],(t=>l("value",t)===e.modelValue),(e=>l("children",e)));n(UU,s===e.modelValue||r?void 0:s)}Qd((()=>{var n;const s=Iae(e.modelValue);r.value.setCheckedKeys(s),null==(n=t.onCheck)||n.call(t,i,{checkedKeys:r.value.getCheckedKeys(),checkedNodes:r.value.getCheckedNodes(),halfCheckedKeys:r.value.getHalfCheckedKeys(),halfCheckedNodes:r.value.getHalfCheckedNodes()})})),null==(o=s.value)||o.focus()},onNodeExpand:(i,s,a)=>{var o;null==(o=t.onNodeExpand)||o.call(t,i,s,a),Qd((()=>{if(!e.checkStrictly&&e.lazy&&e.multiple&&s.checked){const t={},i=r.value.getCheckedKeys();Bae([r.value.store.root],(e=>t[e.key]=e),(e=>e.childNodes));const s=Iae(e.modelValue).filter((e=>!(e in t)&&!i.includes(e))),a=u();n(UU,s.concat(a))}}))},cacheOptions:c}})(e,t,{select:s,tree:r,key:a}),c=Lh({});return n(c),Eg((()=>{Object.assign(c,{...nL(r.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...nL(s.value,["focus","blur","selectedLabel"])})})),()=>Yf(y9,Lh({...o,ref:e=>s.value=e}),{...i,default:()=>[Yf(yae,{data:l.value}),Yf(pae,Lh({...A,ref:e=>r.value=e}))]})}});const Eae=lH(KU(bae,[["__file","tree-select.vue"]])),wae=Symbol(),Qae={key:-1,level:-1,data:{}};var _ae=(e=>(e.KEY="id",e.LABEL="label",e.CHILDREN="children",e.DISABLED="disabled",e.CLASS="",e))(_ae||{}),Sae=(e=>(e.ADD="add",e.DELETE="delete",e))(Sae||{});const xae={type:Number,default:26},kae=BU({data:{type:Array,default:()=>[]},emptyText:{type:String},height:{type:Number,default:200},props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled",value:"id",class:""
/* CLASS */})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:Array,default:()=>[]},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:Array,default:()=>[]},indent:{type:Number,default:16},itemSize:xae,icon:{type:fj},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:[String,Number]},accordion:{type:Boolean,default:!1},filterMethod:{type:Function},perfMode:{type:Boolean,default:!0}}),Dae=BU({node:{type:Object,default:()=>Qae},expanded:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},current:{type:Boolean,default:!1},hiddenExpandIcon:{type:Boolean,default:!1},itemSize:xae}),Fae=BU({node:{type:Object,required:!0}}),Tae="node-click",Mae="node-drop",Rae="node-expand",Nae="node-collapse",Lae="current-change",Uae="check",Hae="check-change",Pae="node-contextmenu",Oae={[Tae]:(e,t,i)=>e&&t&&i,[Mae]:(e,t,i)=>e&&t&&i,[Rae]:(e,t)=>e&&t,[Nae]:(e,t)=>e&&t,[Lae]:(e,t)=>e&&t,[Uae]:(e,t)=>e&&t,[Hae]:(e,t)=>e&&lL(t),[Pae]:(e,t,i)=>e&&t&&i},Gae={click:(e,t)=>!(!e||!t),drop:(e,t)=>!(!e||!t),toggle:e=>!!e,check:(e,t)=>e&&lL(t)};function Kae(e,t){const i=zh(new Set(e.defaultExpandedKeys)),n=zh(),s=Xh(),r=zh();Pp((()=>e.currentNodeKey),(e=>{n.value=e}),{immediate:!0}),Pp((()=>e.data),(e=>{F(e)}),{immediate:!0});const{isIndeterminate:a,isChecked:o,toggleCheckbox:l,getCheckedKeys:A,getCheckedNodes:c,getHalfCheckedKeys:u,getHalfCheckedNodes:h,setChecked:d,setCheckedKeys:g}=function(e,t){const i=zh(new Set),n=zh(new Set),{emit:s}=kf();Pp([()=>t.value,()=>e.defaultCheckedKeys],(()=>Qd((()=>{u(e.defaultCheckedKeys)}))),{immediate:!0});const r=()=>{if(!t.value||!e.showCheckbox||e.checkStrictly)return;const{levelTreeNodeMap:s,maxLevel:r}=t.value,a=i.value,o=new Set;for(let e=r-1;e>=1;--e){const t=s.get(e);t&&t.forEach((e=>{const t=e.children;if(t){let i=!0,n=!1;for(const e of t){const t=e.key;if(a.has(t))n=!0;else{if(o.has(t)){i=!1,n=!0;break}i=!1}}i?a.add(e.key):n?(o.add(e.key),a.delete(e.key)):(a.delete(e.key),o.delete(e.key))}}))}n.value=o},a=e=>i.value.has(e.key),o=(t,n,s=!0)=>{const a=i.value,o=(t,i)=>{a[i?Sae.ADD:Sae.DELETE](t.key);const n=t.children;!e.checkStrictly&&n&&n.forEach((e=>{e.disabled||o(e,i)}))};o(t,n),r(),s&&l(t,n)},l=(e,t)=>{const{checkedNodes:i,checkedKeys:n}=A(),{halfCheckedNodes:r,halfCheckedKeys:a}=c();s(Uae,e.data,{checkedKeys:n,checkedNodes:i,halfCheckedKeys:a,halfCheckedNodes:r}),s(Hae,e.data,t)};function A(n=!1){const s=[],r=[];if((null==t?void 0:t.value)&&e.showCheckbox){const{treeNodeMap:e}=t.value;i.value.forEach((t=>{const i=e.get(t);i&&(!n||n&&i.isLeaf)&&(r.push(t),s.push(i.data))}))}return{checkedKeys:r,checkedNodes:s}}function c(){const i=[],s=[];if((null==t?void 0:t.value)&&e.showCheckbox){const{treeNodeMap:e}=t.value;n.value.forEach((t=>{const n=e.get(t);n&&(s.push(t),i.push(n.data))}))}return{halfCheckedNodes:i,halfCheckedKeys:s}}function u(i){if(null==t?void 0:t.value){const{treeNodeMap:n}=t.value;if(e.showCheckbox&&n&&i)for(const e of i){const t=n.get(e);t&&!a(t)&&o(t,!0,!1)}}}return{updateCheckedKeys:r,toggleCheckbox:o,isChecked:a,isIndeterminate:e=>n.value.has(e.key),getCheckedKeys:function(e=!1){return A(e).checkedKeys},getCheckedNodes:function(e=!1){return A(e).checkedNodes},getHalfCheckedKeys:function(){return c().halfCheckedKeys},getHalfCheckedNodes:function(){return c().halfCheckedNodes},setChecked:function(i,n){if((null==t?void 0:t.value)&&e.showCheckbox){const e=t.value.treeNodeMap.get(i);e&&o(e,n,!1)}},setCheckedKeys:function(e){i.value.clear(),n.value.clear(),Qd((()=>{u(e)}))}}}(e,s),{doFilter:p,hiddenNodeKeySet:f,isForceHiddenExpandIcon:m}=function(e,t){const i=zh(new Set([])),n=zh(new Set([])),s=qf((()=>Oc(e.filterMethod)));return{hiddenExpandIconKeySet:n,hiddenNodeKeySet:i,doFilter:function(r){var a;if(!s.value)return;const o=new Set,l=n.value,A=i.value,c=[],u=(null==(a=t.value)?void 0:a.treeNodes)||[],h=e.filterMethod;return A.clear(),function e(t){t.forEach((t=>{c.push(t),(null==h?void 0:h(r,t.data))?c.forEach((e=>{o.add(e.key)})):t.isLeaf&&A.add(t.key);const i=t.children;if(i&&e(i),!t.isLeaf)if(o.has(t.key)){if(i){let e=!0;for(const t of i)if(!A.has(t.key)){e=!1;break}e?l.add(t.key):l.delete(t.key)}}else A.add(t.key);c.pop()}))}(u),o},isForceHiddenExpandIcon:function(e){return n.value.has(e.key)}}}(e,s),C=qf((()=>{var t;return(null==(t=e.props)?void 0:t.value)||_ae.KEY})),I=qf((()=>{var t;return(null==(t=e.props)?void 0:t.children)||_ae.CHILDREN})),v=qf((()=>{var t;return(null==(t=e.props)?void 0:t.disabled)||_ae.DISABLED})),B=qf((()=>{var t;return(null==(t=e.props)?void 0:t.label)||_ae.LABEL})),y=qf((()=>{var e;const t=i.value,n=f.value,r=[],a=(null==(e=s.value)?void 0:e.treeNodes)||[],o=[];for(let i=a.length-1;i>=0;--i)o.push(a[i]);for(;o.length;){const e=o.pop();if(!n.has(e.key)&&(r.push(e),e.children&&t.has(e.key)))for(let t=e.children.length-1;t>=0;--t)o.push(e.children[t])}return r})),b=qf((()=>y.value.length>0));function E(e){return e[I.value]}function w(e){return e?e[C.value]:""}function Q(e){return e[v.value]}function _(e){return e[B.value]}function S(e){i.value.has(e.key)?k(e):x(e)}function x(n){const r=i.value;if(s.value&&e.accordion){const{treeNodeMap:e}=s.value;r.forEach((t=>{const i=e.get(t);n&&n.level===(null==i?void 0:i.level)&&r.delete(t)}))}r.add(n.key),t(Rae,n.data,n)}function k(e){i.value.delete(e.key),t(Nae,e.data,e)}function D(e){const t=n.value;return void 0!==t&&t===e.key}function F(e){Qd((()=>s.value=function(e){const t=new Map,i=new Map;let n=1;const s=function e(s,r=1,a){var o;const l=[];for(const n of s){const s=w(n),A={level:r,key:s,data:n};A.label=_(n),A.parent=a;const c=E(n);A.disabled=Q(n),A.isLeaf=!c||0===c.length,c&&c.length&&(A.children=e(c,r+1,A)),l.push(A),t.set(s,A),i.has(r)||i.set(r,[]),null==(o=i.get(r))||o.push(A)}return r>n&&(n=r),l}(e);return{treeNodeMap:t,levelTreeNodeMap:i,maxLevel:n,treeNodes:s}}(e)))}function T(e){var t;const i=qc(e)?w(e):e;return null==(t=s.value)?void 0:t.treeNodeMap.get(i)}return{tree:s,flattenTree:y,isNotEmpty:b,listRef:r,getKey:w,getChildren:E,toggleExpand:S,toggleCheckbox:l,isExpanded:function(e){return i.value.has(e.key)},isChecked:o,isIndeterminate:a,isDisabled:function(e){return!!e.disabled},isCurrent:D,isForceHiddenExpandIcon:m,handleNodeClick:function(i,s){t(Tae,i.data,i,s),function(e){D(e)||(n.value=e.key,t(Lae,e.data,e))}(i),e.expandOnClickNode&&S(i),e.showCheckbox&&e.checkOnClickNode&&!i.disabled&&l(i,!o(i),!0)},handleNodeDrop:function(e,i){t(Mae,e.data,e,i)},handleNodeCheck:function(e,t){l(e,t)},getCurrentNode:function(){var e,t;if(n.value)return null==(t=null==(e=s.value)?void 0:e.treeNodeMap.get(n.value))?void 0:t.data},getCurrentKey:function(){return n.value},setCurrentKey:function(e){n.value=e},getCheckedKeys:A,getCheckedNodes:c,getHalfCheckedKeys:u,getHalfCheckedNodes:h,setChecked:d,setCheckedKeys:g,filter:function(e){const t=p(e);t&&(i.value=t)},setData:F,getNode:T,expandNode:x,collapseNode:k,setExpandedKeys:function(e){const t=new Set,n=s.value.treeNodeMap;e.forEach((e=>{let i=n.get(e);for(;i&&!t.has(i.key);)t.add(i.key),i=i.parent})),i.value=t},scrollToNode:function(e,t="auto"){const i=T(e);i&&r.value&&r.value.scrollToItem(y.value.indexOf(i),t)},scrollTo:function(e){var t;null==(t=r.value)||t.scrollTo(e)}}}var qae=hg({name:"ElTreeNodeContent",props:Fae,setup(e){const t=pp(wae),i=KF("tree");return()=>{const n=e.node,{data:s}=n;return(null==t?void 0:t.ctx.slots.default)?t.ctx.slots.default({node:n,data:s}):Yf("span",{class:i.be("node","label")},[null==n?void 0:n.label])}}});const Yae=hg({...hg({name:"ElTreeNode"}),props:Dae,emits:Gae,setup(e,{emit:t}){const i=e,n=pp(wae),s=KF("tree"),r=qf((()=>{var e;return null!=(e=null==n?void 0:n.props.indent)?e:16})),a=qf((()=>{var e;return null!=(e=null==n?void 0:n.props.icon)?e:SP})),o=e=>{const t=null==n?void 0:n.props.props.class;if(!t)return{};let i;if(Oc(t)){const{data:n}=e;i=t(n,e)}else i=t;return Gc(i)?{[i]:!0}:i},l=e=>{t("click",i.node,e)},A=e=>{t("drop",i.node,e)},c=()=>{t("toggle",i.node)},u=e=>{t("check",i.node,e)},h=e=>{var t,s,r,a;(null==(r=null==(s=null==(t=null==n?void 0:n.instance)?void 0:t.vnode)?void 0:s.props)?void 0:r.onNodeContextmenu)&&(e.stopPropagation(),e.preventDefault()),null==n||n.ctx.emit(Pae,e,null==(a=i.node)?void 0:a.data,i.node)};return(e,t)=>{var i,n,d;return af(),cf("div",{ref:"node$",class:pu([ed(s).b("node"),ed(s).is("expanded",e.expanded),ed(s).is("current",e.current),ed(s).is("focusable",!e.disabled),ed(s).is("checked",!e.disabled&&e.checked),o(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.disabled,"aria-checked":e.checked,"data-key":null==(i=e.node)?void 0:i.key,onClick:AC(l,["stop"]),onContextmenu:h,onDragover:AC((()=>{}),["prevent"]),onDragenter:AC((()=>{}),["prevent"]),onDrop:AC(A,["stop"])},[ff("div",{class:pu(ed(s).be("node","content")),style:cu({paddingLeft:(e.node.level-1)*ed(r)+"px",height:e.itemSize+"px"})},[ed(a)?(af(),uf(ed(gH),{key:0,class:pu([ed(s).is("leaf",!!(null==(n=e.node)?void 0:n.isLeaf)),ed(s).is("hidden",e.hiddenExpandIcon),{expanded:!(null==(d=e.node)?void 0:d.isLeaf)&&e.expanded},ed(s).be("node","expand-icon")]),onClick:AC(c,["stop"])},{default:Nd((()=>[(af(),uf(Ng(ed(a))))])),_:1},8,["class","onClick"])):Bf("v-if",!0),e.showCheckbox?(af(),uf(ed(r0),{key:1,"model-value":e.checked,indeterminate:e.indeterminate,disabled:e.disabled,onChange:u,onClick:AC((()=>{}),["stop"])},null,8,["model-value","indeterminate","disabled","onClick"])):Bf("v-if",!0),mf(ed(qae),{node:e.node},null,8,["node"])],6)],42,["aria-expanded","aria-disabled","aria-checked","data-key","onClick","onDragover","onDragenter","onDrop"])}}});var Vae=KU(Yae,[["__file","tree-node.vue"]]);const Wae=hg({...hg({name:"ElTreeV2"}),props:kae,emits:Oae,setup(e,{expose:t,emit:i}){const n=e,s=jg(),r=qf((()=>n.itemSize));gp(wae,{ctx:{emit:i,slots:s},props:n,instance:kf()}),gp(Uj,void 0);const{t:a}=CU(),o=KF("tree"),{flattenTree:l,isNotEmpty:A,listRef:c,toggleExpand:u,isExpanded:h,isIndeterminate:d,isChecked:g,isDisabled:p,isCurrent:f,isForceHiddenExpandIcon:m,handleNodeClick:C,handleNodeDrop:I,handleNodeCheck:v,toggleCheckbox:B,getCurrentNode:y,getCurrentKey:b,setCurrentKey:E,getCheckedKeys:w,getCheckedNodes:Q,getHalfCheckedKeys:_,getHalfCheckedNodes:S,setChecked:x,setCheckedKeys:k,filter:D,setData:F,getNode:T,expandNode:M,collapseNode:R,setExpandedKeys:N,scrollToNode:L,scrollTo:U}=Kae(n,i);return t({toggleCheckbox:B,getCurrentNode:y,getCurrentKey:b,setCurrentKey:E,getCheckedKeys:w,getCheckedNodes:Q,getHalfCheckedKeys:_,getHalfCheckedNodes:S,setChecked:x,setCheckedKeys:k,filter:D,setData:F,getNode:T,expandNode:M,collapseNode:R,setExpandedKeys:N,scrollToNode:L,scrollTo:U}),(e,t)=>(af(),cf("div",{class:pu([ed(o).b(),{[ed(o).m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[ed(A)?(af(),uf(ed(g7),{key:0,ref_key:"listRef",ref:c,"class-name":ed(o).b("virtual-list"),data:ed(l),total:ed(l).length,height:e.height,"item-size":ed(r),"perf-mode":e.perfMode},{default:Nd((({data:t,index:i,style:n})=>[(af(),uf(Vae,{key:t[i].key,style:cu(n),node:t[i],expanded:ed(h)(t[i]),"show-checkbox":e.showCheckbox,checked:ed(g)(t[i]),indeterminate:ed(d)(t[i]),"item-size":ed(r),disabled:ed(p)(t[i]),current:ed(f)(t[i]),"hidden-expand-icon":ed(m)(t[i]),onClick:ed(C),onToggle:ed(u),onCheck:ed(v),onDrop:ed(I)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck","onDrop"]))])),_:1},8,["class-name","data","total","height","item-size","perf-mode"])):(af(),cf("div",{key:1,class:pu(ed(o).e("empty-block"))},[Gg(e.$slots,"empty",{},(()=>{var t;return[ff("span",{class:pu(ed(o).e("empty-text"))},yu(null!=(t=e.emptyText)?t:ed(a)("el.tree.emptyText")),3)]}))],2))],2))}});const jae=lH(KU(Wae,[["__file","tree.vue"]])),Jae=Symbol("uploadContextKey");class zae extends Error{constructor(e,t,i,n){super(e),this.name="UploadAjaxError",this.status=t,this.method=i,this.url=n}}function Xae(e,t,i){let n;return n=i.response?`${i.response.error||i.response}`:i.responseText?`${i.responseText}`:`fail to ${t.method} ${e} ${i.status}`,new zae(n,i.status,t.method,e)}const $ae=["text","picture","picture-card"];let Zae=1;const eoe=()=>Date.now()+Zae++,toe=BU({action:{type:String,default:"#"},headers:{type:Object},method:{type:String,default:"post"},data:{type:[Object,Function,Promise],default:()=>({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:Array,default:()=>[]},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:$ae,default:"text"},httpRequest:{type:Function,default:e=>{"undefined"==typeof XMLHttpRequest&&lU("ElUpload","XMLHttpRequest is undefined");const t=new XMLHttpRequest,i=e.action;t.upload&&t.upload.addEventListener("progress",(t=>{const i=t;i.percent=t.total>0?t.loaded/t.total*100:0,e.onProgress(i)}));const n=new FormData;if(e.data)for(const[r,a]of Object.entries(e.data))Lc(a)&&a.length?n.append(r,...a):n.append(r,a);n.append(e.filename,e.file,e.file.name),t.addEventListener("error",(()=>{e.onError(Xae(i,e,t))})),t.addEventListener("load",(()=>{if(t.status<200||t.status>=300)return e.onError(Xae(i,e,t));e.onSuccess(function(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(I2){return t}}(t))})),t.open(e.method,i,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const s=e.headers||{};if(s instanceof Headers)s.forEach(((e,i)=>t.setRequestHeader(i,e)));else for(const[r,a]of Object.entries(s))jN(a)||t.setRequestHeader(r,String(a));return t.send(n),t}},disabled:Boolean,limit:Number}),ioe=BU({...toe,beforeUpload:{type:Function,default:xc},beforeRemove:{type:Function},onRemove:{type:Function,default:xc},onChange:{type:Function,default:xc},onPreview:{type:Function,default:xc},onSuccess:{type:Function,default:xc},onProgress:{type:Function,default:xc},onError:{type:Function,default:xc},onExceed:{type:Function,default:xc},crossorigin:{type:String}}),noe=BU({files:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},handlePreview:{type:Function,default:xc},listType:{type:String,values:$ae,default:"text"},crossorigin:{type:String}}),soe=hg({...hg({name:"ElUploadList"}),props:noe,emits:{remove:e=>!!e},setup(e,{emit:t}){const i=e,{t:n}=CU(),s=KF("upload"),r=KF("icon"),a=KF("list"),o=Wj(),l=zh(!1),A=qf((()=>[s.b("list"),s.bm("list",i.listType),s.is("disabled",i.disabled)])),c=e=>{t("remove",e)};return(e,t)=>(af(),uf(Wm,{tag:"ul",class:pu(ed(A)),name:ed(a).b()},{default:Nd((()=>[(af(!0),cf(Zp,null,Pg(e.files,((t,i)=>(af(),cf("li",{key:t.uid||t.name,class:pu([ed(s).be("list","item"),ed(s).is(t.status),{focusing:l.value}]),tabindex:"0",onKeydown:uC((e=>!ed(o)&&c(t)),["delete"]),onFocus:e=>l.value=!0,onBlur:e=>l.value=!1,onClick:e=>l.value=!1},[Gg(e.$slots,"default",{file:t,index:i},(()=>["picture"===e.listType||"uploading"!==t.status&&"picture-card"===e.listType?(af(),cf("img",{key:0,class:pu(ed(s).be("list","item-thumbnail")),src:t.url,crossorigin:e.crossorigin,alt:""},null,10,["src","crossorigin"])):Bf("v-if",!0),"uploading"===t.status||"picture-card"!==e.listType?(af(),cf("div",{key:1,class:pu(ed(s).be("list","item-info"))},[ff("a",{class:pu(ed(s).be("list","item-name")),onClick:AC((i=>e.handlePreview(t)),["prevent"])},[mf(ed(gH),{class:pu(ed(r).m("document"))},{default:Nd((()=>[mf(ed(FG))])),_:1},8,["class"]),ff("span",{class:pu(ed(s).be("list","item-file-name")),title:t.name},yu(t.name),11,["title"])],10,["onClick"]),"uploading"===t.status?(af(),uf(ed(s5),{key:0,type:"picture-card"===e.listType?"circle":"line","stroke-width":"picture-card"===e.listType?6:2,percentage:Number(t.percentage),style:cu("picture-card"===e.listType?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):Bf("v-if",!0)],2)):Bf("v-if",!0),ff("label",{class:pu(ed(s).be("list","item-status-label"))},["text"===e.listType?(af(),uf(ed(gH),{key:0,class:pu([ed(r).m("upload-success"),ed(r).m("circle-check")])},{default:Nd((()=>[mf(ed(sO))])),_:1},8,["class"])):["picture-card","picture"].includes(e.listType)?(af(),uf(ed(gH),{key:1,class:pu([ed(r).m("upload-success"),ed(r).m("check")])},{default:Nd((()=>[mf(ed(VP))])),_:1},8,["class"])):Bf("v-if",!0)],2),ed(o)?Bf("v-if",!0):(af(),uf(ed(gH),{key:2,class:pu(ed(r).m("close")),onClick:e=>c(t)},{default:Nd((()=>[mf(ed(CO))])),_:2},1032,["class","onClick"])),Bf(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),Bf(" This is a bug which needs to be fixed "),Bf(" TODO: Fix the incorrect navigation interaction "),ed(o)?Bf("v-if",!0):(af(),cf("i",{key:3,class:pu(ed(r).m("close-tip"))},yu(ed(n)("el.upload.deleteTip")),3)),"picture-card"===e.listType?(af(),cf("span",{key:4,class:pu(ed(s).be("list","item-actions"))},[ff("span",{class:pu(ed(s).be("list","item-preview")),onClick:i=>e.handlePreview(t)},[mf(ed(gH),{class:pu(ed(r).m("zoom-in"))},{default:Nd((()=>[mf(ed(dj))])),_:1},8,["class"])],10,["onClick"]),ed(o)?Bf("v-if",!0):(af(),cf("span",{key:0,class:pu(ed(s).be("list","item-delete")),onClick:e=>c(t)},[mf(ed(gH),{class:pu(ed(r).m("delete"))},{default:Nd((()=>[mf(ed(hG))])),_:1},8,["class"])],10,["onClick"]))],2)):Bf("v-if",!0)]))],42,["onKeydown","onFocus","onBlur","onClick"])))),128)),Gg(e.$slots,"append")])),_:3},8,["class","name"]))}});var roe=KU(soe,[["__file","upload-list.vue"]]);const aoe=BU({disabled:{type:Boolean,default:!1}}),ooe={file:e=>Lc(e)},loe="ElUploadDrag",Aoe=hg({...hg({name:loe}),props:aoe,emits:ooe,setup(e,{emit:t}){pp(Jae)||lU(loe,"usage: <el-upload><el-upload-dragger /></el-upload>");const i=KF("upload"),n=zh(!1),s=Wj(),r=e=>{if(s.value)return;n.value=!1,e.stopPropagation();const i=Array.from(e.dataTransfer.files);t("file",i)},a=()=>{s.value||(n.value=!0)};return(e,t)=>(af(),cf("div",{class:pu([ed(i).b("dragger"),ed(i).is("dragover",n.value)]),onDrop:AC(r,["prevent"]),onDragover:AC(a,["prevent"]),onDragleave:AC((e=>n.value=!1),["prevent"])},[Gg(e.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var coe=KU(Aoe,[["__file","upload-dragger.vue"]]);const uoe=BU({...toe,beforeUpload:{type:Function,default:xc},onRemove:{type:Function,default:xc},onStart:{type:Function,default:xc},onSuccess:{type:Function,default:xc},onProgress:{type:Function,default:xc},onError:{type:Function,default:xc},onExceed:{type:Function,default:xc}}),hoe=hg({...hg({name:"ElUploadContent",inheritAttrs:!1}),props:uoe,setup(e,{expose:t}){const i=e,n=KF("upload"),s=Wj(),r=Xh({}),a=Xh(),o=e=>{if(0===e.length)return;const{autoUpload:t,limit:n,fileList:s,multiple:r,onStart:a,onExceed:o}=i;if(n&&s.length+e.length>n)o(e,s);else{r||(e=e.slice(0,1));for(const i of e){const e=i;e.uid=eoe(),a(e),t&&l(e)}}},l=async e=>{if(a.value.value="",!i.beforeUpload)return A(e);let t,n={};try{const s=i.data,r=i.beforeUpload(e);n=jc(i.data)?aN(i.data):i.data,t=await r,jc(i.data)&&WN(s,n)&&(n=aN(i.data))}catch(I2){t=!1}if(!1===t)return void i.onRemove(e);let s=e;t instanceof Blob&&(s=t instanceof File?t:new File([t],e.name,{type:e.type})),A(Object.assign(s,{uid:e.uid}),n)},A=async(e,t)=>{const{headers:n,data:s,method:a,withCredentials:o,name:l,action:A,onProgress:c,onSuccess:u,onError:h,httpRequest:d}=i;try{t=await(async(e,t)=>Oc(e)?e(t):e)(null!=t?t:s,e)}catch(I2){return void i.onRemove(e)}const{uid:g}=e,p={headers:n||{},withCredentials:o,file:e,data:t,method:a,filename:l,action:A,onProgress:t=>{c(t,e)},onSuccess:t=>{u(t,e),delete r.value[g]},onError:t=>{h(t,e),delete r.value[g]}},f=d(p);r.value[g]=f,f instanceof Promise&&f.then(p.onSuccess,p.onError)},c=e=>{const t=e.target.files;t&&o(Array.from(t))},u=()=>{s.value||(a.value.value="",a.value.click())},h=()=>{u()};return t({abort:e=>{const t=DU(r.value).filter(e?([t])=>String(e.uid)===t:()=>!0);t.forEach((([e,t])=>{t instanceof XMLHttpRequest&&t.abort(),delete r.value[e]}))},upload:l}),(e,t)=>(af(),cf("div",{class:pu([ed(n).b(),ed(n).m(e.listType),ed(n).is("drag",e.drag),ed(n).is("disabled",ed(s))]),tabindex:ed(s)?"-1":"0",onClick:u,onKeydown:uC(AC(h,["self"]),["enter","space"])},[e.drag?(af(),uf(coe,{key:0,disabled:ed(s),onFile:o},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["disabled"])):Gg(e.$slots,"default",{key:1}),ff("input",{ref_key:"inputRef",ref:a,class:pu(ed(n).e("input")),name:e.name,disabled:ed(s),multiple:e.multiple,accept:e.accept,type:"file",onChange:c,onClick:AC((()=>{}),["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}});var doe=KU(hoe,[["__file","upload-content.vue"]]);const goe="ElUpload",poe=e=>{var t;(null==(t=e.url)?void 0:t.startsWith("blob:"))&&URL.revokeObjectURL(e.url)},foe=hg({...hg({name:"ElUpload"}),props:ioe,setup(e,{expose:t}){const i=e,n=Wj(),s=Xh(),{abort:r,submit:a,clearFiles:o,uploadFiles:l,handleStart:A,handleError:c,handleRemove:u,handleSuccess:h,handleProgress:d,revokeFileObjectURL:g}=((e,t)=>{const i=aU(e,"fileList",void 0,{passive:!0}),n=e=>i.value.find((t=>t.uid===e.uid));function s(e){var i;null==(i=t.value)||i.abort(e)}function r(e){i.value=i.value.filter((t=>t!==e))}return Pp((()=>e.listType),(t=>{"picture-card"!==t&&"picture"!==t||(i.value=i.value.map((t=>{const{raw:n,url:s}=t;if(!s&&n)try{t.url=URL.createObjectURL(n)}catch(r){e.onError(r,t,i.value)}return t})))})),Pp(i,(e=>{for(const t of e)t.uid||(t.uid=eoe()),t.status||(t.status="success")}),{immediate:!0,deep:!0}),{uploadFiles:i,abort:s,clearFiles:function(e=["ready","uploading","success","fail"]){i.value=i.value.filter((t=>!e.includes(t.status)))},handleError:(t,s)=>{const a=n(s);a&&(console.error(t),a.status="fail",r(a),e.onError(t,a,i.value),e.onChange(a,i.value))},handleProgress:(t,s)=>{const r=n(s);r&&(e.onProgress(t,r,i.value),r.status="uploading",r.percentage=Math.round(t.percent))},handleStart:t=>{jN(t.uid)&&(t.uid=eoe());const n={name:t.name,percentage:0,status:"ready",size:t.size,raw:t,uid:t.uid};if("picture-card"===e.listType||"picture"===e.listType)try{n.url=URL.createObjectURL(t)}catch(s){s.message,e.onError(s,n,i.value)}i.value=[...i.value,n],e.onChange(n,i.value)},handleSuccess:(t,s)=>{const r=n(s);r&&(r.status="success",r.response=t,e.onSuccess(t,r,i.value),e.onChange(r,i.value))},handleRemove:async t=>{const a=t instanceof File?n(t):t;a||lU(goe,"file to be removed not found");const o=t=>{s(t),r(t),e.onRemove(t,i.value),poe(t)};e.beforeRemove?!1!==await e.beforeRemove(a,i.value)&&o(a):o(a)},submit:function(){i.value.filter((({status:e})=>"ready"===e)).forEach((({raw:e})=>{var i;return e&&(null==(i=t.value)?void 0:i.upload(e))}))},revokeFileObjectURL:poe}})(i,s),p=qf((()=>"picture-card"===i.listType)),f=qf((()=>({...i,fileList:l.value,onStart:A,onProgress:d,onSuccess:h,onError:c,onRemove:u})));return _g((()=>{l.value.forEach(g)})),gp(Jae,{accept:ld(i,"accept")}),t({abort:r,submit:a,clearFiles:o,handleStart:A,handleRemove:u}),(e,t)=>(af(),cf("div",null,[ed(p)&&e.showFileList?(af(),uf(roe,{key:0,disabled:ed(n),"list-type":e.listType,files:ed(l),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:ed(u)},Og({append:Nd((()=>[mf(doe,wf({ref_key:"uploadRef",ref:s},ed(f)),{default:Nd((()=>[e.$slots.trigger?Gg(e.$slots,"trigger",{key:0}):Bf("v-if",!0),!e.$slots.trigger&&e.$slots.default?Gg(e.$slots,"default",{key:1}):Bf("v-if",!0)])),_:3},16)])),_:2},[e.$slots.file?{name:"default",fn:Nd((({file:t,index:i})=>[Gg(e.$slots,"file",{file:t,index:i})]))}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):Bf("v-if",!0),!ed(p)||ed(p)&&!e.showFileList?(af(),uf(doe,wf({key:1,ref_key:"uploadRef",ref:s},ed(f)),{default:Nd((()=>[e.$slots.trigger?Gg(e.$slots,"trigger",{key:0}):Bf("v-if",!0),!e.$slots.trigger&&e.$slots.default?Gg(e.$slots,"default",{key:1}):Bf("v-if",!0)])),_:3},16)):Bf("v-if",!0),e.$slots.trigger?Gg(e.$slots,"default",{key:2}):Bf("v-if",!0),Gg(e.$slots,"tip"),!ed(p)&&e.showFileList?(af(),uf(roe,{key:3,disabled:ed(n),"list-type":e.listType,files:ed(l),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:ed(u)},Og({_:2},[e.$slots.file?{name:"default",fn:Nd((({file:t,index:i})=>[Gg(e.$slots,"file",{file:t,index:i})]))}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):Bf("v-if",!0)]))}});const moe=lH(KU(foe,[["__file","upload.vue"]])),Coe=BU({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:[String,Array],default:"Element Plus"},font:{type:Object},gap:{type:Array,default:()=>[100,100]},offset:{type:Array}});function Ioe(e,t,i=1){const n=document.createElement("canvas"),s=n.getContext("2d"),r=e*i,a=t*i;return n.setAttribute("width",`${r}px`),n.setAttribute("height",`${a}px`),s.save(),[s,n,r,a]}function voe(){return function(e,t,i,n,s,r,a,o){const[l,A,c,u]=Ioe(n,s,i);if(e instanceof HTMLImageElement)l.drawImage(e,0,0,c,u);else{const{color:t,fontSize:n,fontStyle:a,fontWeight:o,fontFamily:A,textAlign:u,textBaseline:h}=r,d=Number(n)*i;l.font=`${a} normal ${o} ${d}px/${s}px ${A}`,l.fillStyle=t,l.textAlign=u,l.textBaseline=h;const g=Lc(e)?e:[e];null==g||g.forEach(((e,t)=>{l.fillText(null!=e?e:"",c/2,t*(d+3*i))}))}const h=Math.PI/180*Number(t),d=Math.max(n,s),[g,p,f]=Ioe(d,d,i);g.translate(f/2,f/2),g.rotate(h),c>0&&u>0&&g.drawImage(A,-c/2,-u/2);let m=0,C=0,I=0,v=0;const B=c/2,y=u/2;[[0-B,0-y],[0+B,0-y],[0+B,0+y],[0-B,0+y]].forEach((([e,t])=>{const[i,n]=function(e,t){return[e*Math.cos(h)-t*Math.sin(h),e*Math.sin(h)+t*Math.cos(h)]}(e,t);m=Math.min(m,i),C=Math.max(C,i),I=Math.min(I,n),v=Math.max(v,n)}));const b=m+f/2,E=I+f/2,w=C-m,Q=v-I,_=a*i,S=o*i,x=2*(w+_),k=Q+S,[D,F]=Ioe(x,k);function T(e=0,t=0){D.drawImage(p,b,E,w,Q,e,t,w,Q)}return T(),T(w+_,-Q/2-S/2),T(w+_,+Q/2+S/2),[F.toDataURL(),x/i,k/i]}}const Boe=hg({...hg({name:"ElWatermark"}),props:Coe,setup(e){const t=e,i={position:"relative"},n=qf((()=>{var e,i;return null!=(i=null==(e=t.font)?void 0:e.color)?i:"rgba(0,0,0,.15)"})),s=qf((()=>{var e,i;return null!=(i=null==(e=t.font)?void 0:e.fontSize)?i:16})),r=qf((()=>{var e,i;return null!=(i=null==(e=t.font)?void 0:e.fontWeight)?i:"normal"})),a=qf((()=>{var e,i;return null!=(i=null==(e=t.font)?void 0:e.fontStyle)?i:"normal"})),o=qf((()=>{var e,i;return null!=(i=null==(e=t.font)?void 0:e.fontFamily)?i:"sans-serif"})),l=qf((()=>{var e,i;return null!=(i=null==(e=t.font)?void 0:e.textAlign)?i:"center"})),A=qf((()=>{var e,i;return null!=(i=null==(e=t.font)?void 0:e.textBaseline)?i:"hanging"})),c=qf((()=>t.gap[0])),u=qf((()=>t.gap[1])),h=qf((()=>c.value/2)),d=qf((()=>u.value/2)),g=qf((()=>{var e,i;return null!=(i=null==(e=t.offset)?void 0:e[0])?i:h.value})),p=qf((()=>{var e,i;return null!=(i=null==(e=t.offset)?void 0:e[1])?i:d.value})),f=()=>{const e={zIndex:t.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let i=g.value-h.value,n=p.value-d.value;return i>0&&(e.left=`${i}px`,e.width=`calc(100% - ${i}px)`,i=0),n>0&&(e.top=`${n}px`,e.height=`calc(100% - ${n}px)`,n=0),e.backgroundPosition=`${i}px ${n}px`,e},m=Xh(null),C=Xh(),I=zh(!1),v=()=>{C.value&&(C.value.remove(),C.value=void 0)},B=(e,t)=>{var i;m.value&&C.value&&(I.value=!0,C.value.setAttribute("style",function(e){return Object.keys(e).map((t=>`${function(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}(t)}: ${e[t]};`)).join(" ")}({...f(),backgroundImage:`url('${e}')`,backgroundSize:`${Math.floor(t)}px`})),null==(i=m.value)||i.append(C.value),setTimeout((()=>{I.value=!1})))},y=voe(),b=()=>{const e=document.createElement("canvas").getContext("2d"),i=t.image,h=t.content,d=t.rotate;if(e){C.value||(C.value=document.createElement("div"));const g=window.devicePixelRatio||1,[p,f]=(e=>{let i=120,n=64;const r=t.image,a=t.content,l=t.width,A=t.height;if(!r&&e.measureText){e.font=`${Number(s.value)}px ${o.value}`;const t=Lc(a)?a:[a],r=t.map((t=>{const i=e.measureText(t);return[i.width,void 0!==i.fontBoundingBoxAscent?i.fontBoundingBoxAscent+i.fontBoundingBoxDescent:i.actualBoundingBoxAscent+i.actualBoundingBoxDescent]}));i=Math.ceil(Math.max(...r.map((e=>e[0])))),n=Math.ceil(Math.max(...r.map((e=>e[1]))))*t.length+3*(t.length-1)}return[null!=l?l:i,null!=A?A:n]})(e),m=e=>{const[t,i]=y(e||"",d,g,p,f,{color:n.value,fontSize:s.value,fontStyle:a.value,fontWeight:r.value,fontFamily:o.value,textAlign:l.value,textBaseline:A.value},c.value,u.value);B(t,i)};if(i){const e=new Image;e.onload=()=>{m(e)},e.onerror=()=>{m(h)},e.crossOrigin="anonymous",e.referrerPolicy="no-referrer",e.src=i}else m(h)}};Eg((()=>{b()})),Pp((()=>t),(()=>{b()}),{deep:!0,flush:"post"}),_g((()=>{v()}));return eU(m,(e=>{I.value||e.forEach((e=>{((e,t)=>{let i=!1;return e.removedNodes.length&&t&&(i=Array.from(e.removedNodes).includes(t)),"attributes"===e.type&&e.target===t&&(i=!0),i})(e,C.value)&&(v(),b())}))}),{attributes:!0,subtree:!0,childList:!0}),(e,t)=>(af(),cf("div",{ref_key:"containerRef",ref:m,style:cu([i])},[Gg(e.$slots,"default")],4))}});const yoe=lH(KU(Boe,[["__file","watermark.vue"]])),boe=BU({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:Object},targetAreaClickable:{type:Boolean,default:!0}}),Eoe=(e,t,i,n,s)=>{const r=zh(null),a=()=>{let t;return t=Gc(e.value)?document.querySelector(e.value):Oc(e.value)?e.value():e.value,t},o=()=>{const e=a();if(!e||!t.value)return void(r.value=null);(function(e){const t=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,{top:n,right:s,bottom:r,left:a}=e.getBoundingClientRect();return n>=0&&a>=0&&s<=t&&r<=i})(e)||e.scrollIntoView(s.value);const{left:i,top:n,width:o,height:l}=e.getBoundingClientRect();r.value={left:i,top:n,width:o,height:l,radius:0}};Eg((()=>{Pp([t,e],(()=>{o()}),{immediate:!0}),window.addEventListener("resize",o)})),_g((()=>{window.removeEventListener("resize",o)}));const l=e=>{var t;return null!=(t=Lc(i.value.offset)?i.value.offset[e]:i.value.offset)?t:6},A=qf((()=>{var e;if(!r.value)return r.value;const t=l(0),n=l(1),s=(null==(e=i.value)?void 0:e.radius)||2;return{left:r.value.left-t,top:r.value.top-n,width:r.value.width+2*t,height:r.value.height+2*n,radius:s}})),c=qf((()=>{const e=a();return n.value&&e&&window.DOMRect?{getBoundingClientRect(){var e,t,i,n;return window.DOMRect.fromRect({width:(null==(e=A.value)?void 0:e.width)||0,height:(null==(t=A.value)?void 0:t.height)||0,x:(null==(i=A.value)?void 0:i.left)||0,y:(null==(n=A.value)?void 0:n.top)||0})}}:e||void 0}));return{mergedPosInfo:A,triggerTarget:c}},woe=Symbol("ElTour");const Qoe=()=>({name:"overflow",async fn(e){const t=await bre(e);let i=0;t.left>0&&(i=t.left),t.right>0&&(i=t.right);return{data:{maxWidth:e.rects.floating.width-i}}}}),_oe=hg({...hg({name:"ElTourMask",inheritAttrs:!1}),props:boe,setup(e){const t=e,{ns:i}=pp(woe),n=qf((()=>{var e,i;return null!=(i=null==(e=t.pos)?void 0:e.radius)?i:2})),s=qf((()=>{const e=n.value,t=`a${e},${e} 0 0 1`;return{topRight:`${t} ${e},${e}`,bottomRight:`${t} ${-e},${e}`,bottomLeft:`${t} ${-e},${-e}`,topLeft:`${t} ${e},${-e}`}})),r=qf((()=>{const e=window.innerWidth,i=window.innerHeight,r=s.value,a=`M${e},0 L0,0 L0,${i} L${e},${i} L${e},0 Z`,o=n.value;return t.pos?`${a} M${t.pos.left+o},${t.pos.top} h${t.pos.width-2*o} ${r.topRight} v${t.pos.height-2*o} ${r.bottomRight} h${-t.pos.width+2*o} ${r.bottomLeft} v${-t.pos.height+2*o} ${r.topLeft} z`:a})),a=qf((()=>({fill:t.fill,pointerEvents:"auto",cursor:"auto"})));return f3(ld(t,"visible"),{ns:i}),(e,t)=>e.visible?(af(),cf("div",wf({key:0,class:ed(i).e("mask"),style:{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:e.zIndex,pointerEvents:e.pos&&e.targetAreaClickable?"none":"auto"}},e.$attrs),[(af(),cf("svg",{style:{width:"100%",height:"100%"}},[ff("path",{class:pu(ed(i).e("hollow")),style:cu(ed(a)),d:ed(r)},null,14,["d"])]))],16)):Bf("v-if",!0)}});var Soe=KU(_oe,[["__file","mask.vue"]]);const xoe=BU({placement:{type:String,values:["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],default:"bottom"},reference:{type:Object,default:null},strategy:{type:String,values:["absolute","fixed"],default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),koe=hg({...hg({name:"ElTourContent"}),props:xoe,emits:{close:()=>!0},setup(e,{emit:t}){const i=e,n=zh(i.placement),s=zh(i.strategy),r=zh(null),a=zh(null);Pp((()=>i.placement),(()=>{n.value=i.placement}));const{contentStyle:o,arrowStyle:l}=((e,t,i,n,s,r,a,o)=>{const l=zh(),A=zh(),c=zh({}),u={x:l,y:A,placement:n,strategy:s,middlewareData:c},h=qf((()=>{const e=[Ere(ed(r)),Qre(),wre(),Qoe()];return ed(o)&&ed(i)&&e.push(_re({element:ed(i)})),e})),d=async()=>{if(!bL)return;const i=ed(e),r=ed(t);if(!i||!r)return;const a=await Sre(i,r,{placement:ed(n),strategy:ed(s),middleware:ed(h)});kU(u).forEach((e=>{u[e].value=a[e]}))},g=qf((()=>{if(!ed(e))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:ed(a)};const{overflow:t}=ed(c);return{position:ed(s),zIndex:ed(a),top:null!=ed(A)?`${ed(A)}px`:"",left:null!=ed(l)?`${ed(l)}px`:"",maxWidth:(null==t?void 0:t.maxWidth)?`${null==t?void 0:t.maxWidth}px`:""}})),p=qf((()=>{if(!ed(o))return{};const{arrow:e}=ed(c);return{left:null!=(null==e?void 0:e.x)?`${null==e?void 0:e.x}px`:"",top:null!=(null==e?void 0:e.y)?`${null==e?void 0:e.y}px`:""}}));let f;return Eg((()=>{const i=ed(e),n=ed(t);i&&n&&(f=yre(i,n,d)),Hp((()=>{d()}))})),_g((()=>{f&&f()})),{update:d,contentStyle:g,arrowStyle:p}})(ld(i,"reference"),r,a,n,s,ld(i,"offset"),ld(i,"zIndex"),ld(i,"showArrow")),A=qf((()=>n.value.split("-")[0])),{ns:c}=pp(woe),u=()=>{t("close")},h=e=>{"pointer"===e.detail.focusReason&&e.preventDefault()};return(e,t)=>(af(),cf("div",{ref_key:"contentRef",ref:r,style:cu(ed(o)),class:pu(ed(c).e("content")),"data-side":ed(A),tabindex:"-1"},[mf(ed(ez),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":r.value||void 0,onReleaseRequested:u,onFocusoutPrevented:h},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["focus-trap-el"]),e.showArrow?(af(),cf("span",{key:0,ref_key:"arrowRef",ref:a,style:cu(ed(l)),class:pu(ed(c).e("arrow"))},null,6)):Bf("v-if",!0)],14,["data-side"]))}});var Doe=KU(koe,[["__file","content.vue"]]),Foe=hg({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(e,{slots:t,emit:i}){let n=0;return()=>{var s,r;const a=null==(s=t.default)?void 0:s.call(t),o=[];let l=0;var A;return a.length&&(A=RZ(null==(r=a[0])?void 0:r.children),Lc(A)&&A.forEach((e=>{var t;"ElTourStep"===(null==(t=(null==e?void 0:e.type)||{})?void 0:t.name)&&(o.push(e),l+=1)}))),n!==l&&(n=l,i("update-total",l)),o.length?o[e.current]:null}}});const Toe=BU({modelValue:Boolean,current:{type:Number,default:0},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:fj},placement:xoe.placement,contentStyle:{type:[Object]},mask:{type:[Boolean,Object],default:!0},gap:{type:Object,default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:[Boolean,Object],default:()=>({block:"center"})},type:{type:String},appendTo:{type:[String,Object],default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),Moe={[UU]:e=>lL(e),"update:current":e=>AL(e),close:e=>AL(e),finish:()=>!0,change:e=>AL(e)},Roe=hg({...hg({name:"ElTour"}),props:Toe,emits:Moe,setup(e,{emit:t}){const i=e,n=KF("tour"),s=zh(0),r=zh(),a=aU(i,"current",t,{passive:!0}),o=qf((()=>{var e;return null==(e=r.value)?void 0:e.target})),l=qf((()=>[n.b(),"primary"===f.value?n.m("primary"):""])),A=qf((()=>{var e;return(null==(e=r.value)?void 0:e.placement)||i.placement})),c=qf((()=>{var e,t;return null!=(t=null==(e=r.value)?void 0:e.contentStyle)?t:i.contentStyle})),u=qf((()=>{var e,t;return null!=(t=null==(e=r.value)?void 0:e.mask)?t:i.mask})),h=qf((()=>!!u.value&&i.modelValue)),d=qf((()=>lL(u.value)?void 0:u.value)),g=qf((()=>{var e,t;return!!o.value&&(null!=(t=null==(e=r.value)?void 0:e.showArrow)?t:i.showArrow)})),p=qf((()=>{var e,t;return null!=(t=null==(e=r.value)?void 0:e.scrollIntoViewOptions)?t:i.scrollIntoViewOptions})),f=qf((()=>{var e,t;return null!=(t=null==(e=r.value)?void 0:e.type)?t:i.type})),{nextZIndex:m}=dU(),C=m(),I=qf((()=>{var e;return null!=(e=i.zIndex)?e:C})),{mergedPosInfo:v,triggerTarget:B}=Eoe(o,ld(i,"modelValue"),ld(i,"gap"),u,p);Pp((()=>i.modelValue),(e=>{e||(a.value=0)}));const y=()=>{i.closeOnPressEscape&&(t("update:modelValue",!1),t("close",a.value))},b=e=>{s.value=e},E=jg();return gp(woe,{currentStep:r,current:a,total:s,showClose:ld(i,"showClose"),closeIcon:ld(i,"closeIcon"),mergedType:f,ns:n,slots:E,updateModelValue(e){t("update:modelValue",e)},onClose(){t("close",a.value)},onFinish(){t("finish")},onChange(){t("change",a.value)}}),(e,t)=>(af(),cf(Zp,null,[mf(ed(YX),{to:e.appendTo},{default:Nd((()=>{var t,i;return[ff("div",wf({class:ed(l)},e.$attrs),[mf(Soe,{visible:ed(h),fill:null==(t=ed(d))?void 0:t.color,style:cu(null==(i=ed(d))?void 0:i.style),pos:ed(v),"z-index":ed(I),"target-area-clickable":e.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),e.modelValue?(af(),uf(Doe,{key:ed(a),reference:ed(B),placement:ed(A),"show-arrow":ed(g),"z-index":ed(I),style:cu(ed(c)),onClose:y},{default:Nd((()=>[mf(ed(Foe),{current:ed(a),onUpdateTotal:b},{default:Nd((()=>[Gg(e.$slots,"default")])),_:3},8,["current"])])),_:3},8,["reference","placement","show-arrow","z-index","style"])):Bf("v-if",!0)],16)]})),_:3},8,["to"]),Bf(" just for IDE "),Bf("v-if",!0)],64))}});var Noe=KU(Roe,[["__file","tour.vue"]]);const Loe=BU({target:{type:[String,Object,Function]},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:fj},showArrow:{type:Boolean,default:void 0},placement:xoe.placement,mask:{type:[Boolean,Object],default:void 0},contentStyle:{type:[Object]},prevButtonProps:{type:Object},nextButtonProps:{type:Object},scrollIntoViewOptions:{type:[Boolean,Object],default:void 0},type:{type:String}}),Uoe=hg({...hg({name:"ElTourStep"}),props:Loe,emits:{close:()=>!0},setup(e,{emit:t}){const i=e,{Close:n}=mj,{t:s}=CU(),{currentStep:r,current:a,total:o,showClose:l,closeIcon:A,mergedType:c,ns:u,slots:h,updateModelValue:d,onClose:g,onFinish:p,onChange:f}=pp(woe);Pp(i,(e=>{r.value=e}),{immediate:!0});const m=qf((()=>{var e;return null!=(e=i.showClose)?e:l.value})),C=qf((()=>{var e,t;return null!=(t=null!=(e=i.closeIcon)?e:A.value)?t:n})),I=e=>{if(e)return eL(e,["children","onClick"])},v=()=>{var e,t;a.value-=1,(null==(e=i.prevButtonProps)?void 0:e.onClick)&&(null==(t=i.prevButtonProps)||t.onClick()),f()},B=()=>{var e;a.value>=o.value-1?y():a.value+=1,(null==(e=i.nextButtonProps)?void 0:e.onClick)&&i.nextButtonProps.onClick(),f()},y=()=>{b(),p()},b=()=>{d(!1),g(),t("close")};return(e,t)=>(af(),cf(Zp,null,[ed(m)?(af(),cf("button",{key:0,"aria-label":"Close",class:pu(ed(u).e("closebtn")),type:"button",onClick:b},[mf(ed(gH),{class:pu(ed(u).e("close"))},{default:Nd((()=>[(af(),uf(Ng(ed(C))))])),_:1},8,["class"])],2)):Bf("v-if",!0),ff("header",{class:pu([ed(u).e("header"),{"show-close":ed(l)}])},[Gg(e.$slots,"header",{},(()=>[ff("span",{role:"heading",class:pu(ed(u).e("title"))},yu(e.title),3)]))],2),ff("div",{class:pu(ed(u).e("body"))},[Gg(e.$slots,"default",{},(()=>[ff("span",null,yu(e.description),1)]))],2),ff("footer",{class:pu(ed(u).e("footer"))},[ff("div",{class:pu(ed(u).b("indicators"))},[ed(h).indicators?(af(),uf(Ng(ed(h).indicators),{key:0,current:ed(a),total:ed(o)},null,8,["current","total"])):(af(!0),cf(Zp,{key:1},Pg(ed(o),((e,t)=>(af(),cf("span",{key:e,class:pu([ed(u).b("indicator"),t===ed(a)?"is-active":""])},null,2)))),128))],2),ff("div",{class:pu(ed(u).b("buttons"))},[ed(a)>0?(af(),uf(ed(eZ),wf({key:0,size:"small",type:ed(c)},I(e.prevButtonProps),{onClick:v}),{default:Nd((()=>{var t,i;return[vf(yu(null!=(i=null==(t=e.prevButtonProps)?void 0:t.children)?i:ed(s)("el.tour.previous")),1)]})),_:1},16,["type"])):Bf("v-if",!0),ed(a)<=ed(o)-1?(af(),uf(ed(eZ),wf({key:1,size:"small",type:"primary"===ed(c)?"default":"primary"},I(e.nextButtonProps),{onClick:B}),{default:Nd((()=>{var t,i;return[vf(yu(null!=(i=null==(t=e.nextButtonProps)?void 0:t.children)?i:ed(a)===ed(o)-1?ed(s)("el.tour.finish"):ed(s)("el.tour.next")),1)]})),_:1},16,["type"])):Bf("v-if",!0)],2)],2)],64))}});var Hoe=KU(Uoe,[["__file","step.vue"]]);const Poe=lH(Noe,{TourStep:Hoe}),Ooe=cH(Hoe),Goe=BU({container:{type:[String,Object]},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:String,default:"default"},direction:{type:String,default:"vertical"}}),Koe={change:e=>Gc(e),click:(e,t)=>e instanceof MouseEvent&&(Gc(t)||oL(t))},qoe=Symbol("anchor"),Yoe=e=>{if(!bL||""===e)return null;if(Gc(e))try{return document.querySelector(e)}catch(I2){return null}return e};const Voe=hg({...hg({name:"ElAnchor"}),props:Goe,emits:Koe,setup(e,{expose:t,emit:i}){const n=e,s=zh(""),r=zh(null),a=zh(null),o=zh(),l={};let A=!1,c=0;const u=KF("anchor"),h=qf((()=>[u.b(),"underline"===n.type?u.m("underline"):"",u.m(n.direction)])),d=e=>{s.value!==e&&(s.value=e,i("change",e))};let g=null;const p=e=>{if(!o.value)return;const t=Yoe(e);if(!t)return;g&&g(),A=!0;const i=sH(t,o.value),s=w1(t,i),r=i.scrollHeight-i.clientHeight,a=Math.min(s-n.offset,r);g=function(e,t,i,n,s){const r=Date.now();let a;const o=()=>{const l=Date.now()-r,A=function(e,t,i,n){const s=i-t;return(e/=n/2)<1?s/2*e*e*e+t:s/2*((e-=2)*e*e+2)+t}(l>n?n:l,t,i,n);dL(e)?e.scrollTo(window.pageXOffset,A):e.scrollTop=A,l<n?a=qU(o):Oc(s)&&s()};return o(),()=>{a&&YU(a)}}(o.value,c,a,n.duration,(()=>{setTimeout((()=>{A=!1}),20)}))},f=e=>{e&&(d(e),p(e))},m=function(e){let t=0;const i=(...i)=>{t&&YU(t),t=qU((()=>{e(...i),t=0}))};return i.cancel=()=>{YU(t),t=0},i}((()=>{o.value&&(c=rH(o.value));const e=C();A||oL(e)||d(e)})),C=()=>{if(!o.value)return;const e=rH(o.value),t=[];for(const i of Object.keys(l)){const e=Yoe(i);if(!e)continue;const s=sH(e,o.value),r=w1(e,s);t.push({top:r-n.offset-n.bound,href:i})}t.sort(((e,t)=>e.top-t.top));for(let i=0;i<t.length;i++){const n=t[i],s=t[i+1];if(0===i&&0===e)return"";if(n.top<=e&&(!s||s.top>e))return n.href}},I=()=>{const e=Yoe(n.container);!e||dL(e)?o.value=window:o.value=e};UL(o,"scroll",m);const v=qf((()=>{if(!r.value||!a.value||!s.value)return{};const e=l[s.value];if(!e)return{};const t=r.value.getBoundingClientRect(),i=a.value.getBoundingClientRect(),o=e.getBoundingClientRect();if("horizontal"===n.direction){return{left:`${o.left-t.left}px`,width:`${o.width}px`,opacity:1}}return{top:`${o.top-t.top+(o.height-i.height)/2}px`,opacity:1}}));return Eg((()=>{I();const e=decodeURIComponent(window.location.hash);Yoe(e)?f(e):m()})),Pp((()=>n.container),(()=>{I()})),gp(qoe,{ns:u,direction:n.direction,currentAnchor:s,addLink:e=>{l[e.href]=e.el},removeLink:e=>{delete l[e]},handleClick:(e,t)=>{i("click",e,t),f(t)}}),t({scrollTo:f}),(e,t)=>(af(),cf("div",{ref_key:"anchorRef",ref:r,class:pu(ed(h))},[e.marker?(af(),cf("div",{key:0,ref_key:"markerRef",ref:a,class:pu(ed(u).e("marker")),style:cu(ed(v))},null,6)):Bf("v-if",!0),ff("div",{class:pu(ed(u).e("list"))},[Gg(e.$slots,"default")],2)],2))}});var Woe=KU(Voe,[["__file","anchor.vue"]]);const joe=BU({title:String,href:String}),Joe=hg({...hg({name:"ElAnchorLink"}),props:joe,setup(e){const t=e,i=zh(null),{ns:n,direction:s,currentAnchor:r,addLink:a,removeLink:o,handleClick:l}=pp(qoe),A=qf((()=>[n.e("link"),n.is("active",r.value===t.href)])),c=e=>{l(e,t.href)};return Pp((()=>t.href),((e,t)=>{Qd((()=>{t&&o(t),e&&a({href:e,el:i.value})}))})),Eg((()=>{const{href:e}=t;e&&a({href:e,el:i.value})})),_g((()=>{const{href:e}=t;e&&o(e)})),(e,t)=>(af(),cf("div",{class:pu(ed(n).e("item"))},[ff("a",{ref_key:"linkRef",ref:i,class:pu(ed(A)),href:e.href,onClick:c},[Gg(e.$slots,"default",{},(()=>[vf(yu(e.title),1)]))],10,["href"]),e.$slots["sub-link"]&&"vertical"===ed(s)?(af(),cf("div",{key:0,class:pu(ed(n).e("list"))},[Gg(e.$slots,"sub-link")],2)):Bf("v-if",!0)],2))}});var zoe=KU(Joe,[["__file","anchor-link.vue"]]);const Xoe=lH(Woe,{AnchorLink:zoe}),$oe=cH(zoe),Zoe=BU({direction:{type:String,default:"horizontal"},options:{type:Array,default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},block:Boolean,size:bU,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...Dj(["ariaLabel"])}),ele={[UU]:e=>Gc(e)||AL(e)||lL(e),[HU]:e=>Gc(e)||AL(e)||lL(e)},tle=hg({...hg({name:"ElSegmented"}),props:Zoe,emits:ele,setup(e,{emit:t}){const i=e,n=KF("segmented"),s=Gj(),r=Vj(),a=Wj(),{formItem:o}=Kj(),{inputId:l,isLabeledByFormItem:A}=qj(i,{formItemContext:o}),c=zh(null),u=function(e={}){var t;const{window:i=NL}=e,n=null!=(t=e.document)?t:null==i?void 0:i.document,s=xL((()=>null),(()=>null==n?void 0:n.activeElement));return i&&(UL(i,"blur",(e=>{null===e.relatedTarget&&s.trigger()}),!0),UL(i,"focus",s.trigger,!0)),s}(),h=Lh({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),d=e=>qc(e)?e.value:e,g=e=>qc(e)?e.label:e,p=e=>!!(a.value||qc(e)&&e.disabled),f=e=>i.modelValue===d(e),m=e=>[n.e("item"),n.is("selected",f(e)),n.is("disabled",p(e))],C=()=>{if(!c.value)return;const e=c.value.querySelector(".is-selected"),t=c.value.querySelector(".is-selected input");if(!e||!t)return h.width=0,h.height=0,h.translateX=0,h.translateY=0,void(h.focusVisible=!1);const n=e.getBoundingClientRect();h.isInit=!0,"vertical"===i.direction?(h.height=n.height,h.translateY=e.offsetTop):(h.width=n.width,h.translateX=e.offsetLeft);try{h.focusVisible=t.matches(":focus-visible")}catch(I2){}},I=qf((()=>[n.b(),n.m(r.value),n.is("block",i.block)])),v=qf((()=>({width:"vertical"===i.direction?"100%":`${h.width}px`,height:"vertical"===i.direction?`${h.height}px`:"100%",transform:"vertical"===i.direction?`translateY(${h.translateY}px)`:`translateX(${h.translateX}px)`,display:h.isInit?"block":"none"}))),B=qf((()=>{return[n.e("item-selected"),n.is("disabled",p((e=i.modelValue,i.options.find((t=>d(t)===e))))),n.is("focus-visible",h.focusVisible)];var e})),y=qf((()=>i.name||s.value));return WL(c,C),Pp(u,C),Pp((()=>i.modelValue),(()=>{var e;C(),i.validateEvent&&(null==(e=null==o?void 0:o.validate)||e.call(o,"change").catch((e=>{})))}),{flush:"post"}),(e,s)=>e.options.length?(af(),cf("div",{key:0,id:ed(l),ref_key:"segmentedRef",ref:c,class:pu(ed(I)),role:"radiogroup","aria-label":ed(A)?void 0:e.ariaLabel||"segmented","aria-labelledby":ed(A)?ed(o).labelId:void 0},[ff("div",{class:pu([ed(n).e("group"),ed(n).m(i.direction)])},[ff("div",{style:cu(ed(v)),class:pu(ed(B))},null,6),(af(!0),cf(Zp,null,Pg(e.options,((i,s)=>(af(),cf("label",{key:s,class:pu(m(i))},[ff("input",{class:pu(ed(n).e("item-input")),type:"radio",name:ed(y),disabled:p(i),checked:f(i),onChange:e=>(e=>{const i=d(e);t(UU,i),t(HU,i)})(i)},null,42,["name","disabled","checked","onChange"]),ff("div",{class:pu(ed(n).e("item-label"))},[Gg(e.$slots,"default",{item:i},(()=>[vf(yu(g(i)),1)]))],2)],2)))),128))],2)],10,["id","aria-label","aria-labelledby"])):Bf("v-if",!0)}});const ile=lH(KU(tle,[["__file","segmented.vue"]])),nle=(e,t)=>{const i=e.toLowerCase();return(t.label||t.value).toLowerCase().includes(i)},sle=BU({...Fj,options:{type:Array,default:()=>[]},prefix:{type:[String,Array],default:"@",validator:e=>Gc(e)?1===e.length:e.every((e=>Gc(e)&&1===e.length))},split:{type:String,default:" ",validator:e=>1===e.length},filterOption:{type:[Boolean,Function],default:()=>nle,validator:e=>!1===e||Oc(e)},placement:{type:String,default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:Function},modelValue:String,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})}}),rle={[UU]:e=>Gc(e),search:(e,t)=>Gc(e)&&Gc(t),select:(e,t)=>Gc(e.value)&&Gc(t),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},ale=BU({options:{type:Array,default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),ole={select:e=>Gc(e.value)},lle=hg({...hg({name:"ElMentionDropdown"}),props:ale,emits:ole,setup(e,{expose:t,emit:i}){const n=e,s=KF("mention"),{t:r}=CU(),a=zh(-1),o=zh(),l=zh(),A=zh(),c=(e,t)=>[s.be("dropdown","item"),s.is("hovering",a.value===t),s.is("disabled",e.disabled||n.disabled)],u=qf((()=>n.disabled||n.options.every((e=>e.disabled)))),h=qf((()=>n.options[a.value])),d=e=>{const{options:t}=n;if(0===t.length||u.value)return;"next"===e?(a.value++,a.value===t.length&&(a.value=0)):"prev"===e&&(a.value--,a.value<0&&(a.value=t.length-1));const i=t[a.value];i.disabled?d(e):Qd((()=>g(i)))},g=e=>{var t,i,r,a;const{options:c}=n,u=c.findIndex((t=>t.value===e.value)),h=null==(t=l.value)?void 0:t[u];if(h){const e=null==(r=null==(i=A.value)?void 0:i.querySelector)?void 0:r.call(i,`.${s.be("dropdown","wrap")}`);e&&nH(e,h)}null==(a=o.value)||a.handleScroll()};return Pp((()=>n.options),(()=>{u.value||0===n.options.length?a.value=-1:a.value=0}),{immediate:!0}),t({hoveringIndex:a,navigateOptions:d,selectHoverOption:()=>{h.value&&i("select",h.value)},hoverOption:h}),(e,t)=>(af(),cf("div",{ref_key:"dropdownRef",ref:A,class:pu(ed(s).b("dropdown"))},[e.$slots.header?(af(),cf("div",{key:0,class:pu(ed(s).be("dropdown","header"))},[Gg(e.$slots,"header")],2)):Bf("v-if",!0),Ld(mf(ed(lJ),{id:e.contentId,ref_key:"scrollbarRef",ref:o,tag:"ul","wrap-class":ed(s).be("dropdown","wrap"),"view-class":ed(s).be("dropdown","list"),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:Nd((()=>[(af(!0),cf(Zp,null,Pg(e.options,((t,s)=>(af(),cf("li",{id:`${e.contentId}-${s}`,ref_for:!0,ref_key:"optionRefs",ref:l,key:s,class:pu(c(t,s)),role:"option","aria-disabled":t.disabled||e.disabled||void 0,"aria-selected":a.value===s,onMousemove:e=>(e=>{a.value=e})(s),onClick:AC((e=>(e=>{e.disabled||n.disabled||i("select",e)})(t)),["stop"])},[Gg(e.$slots,"label",{item:t,index:s},(()=>{var e;return[ff("span",null,yu(null!=(e=t.label)?e:t.value),1)]}))],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])))),128))])),_:3},8,["id","wrap-class","view-class","aria-label"]),[[ym,e.options.length>0&&!e.loading]]),e.loading?(af(),cf("div",{key:1,class:pu(ed(s).be("dropdown","loading"))},[Gg(e.$slots,"loading",{},(()=>[vf(yu(ed(r)("el.mention.loading")),1)]))],2)):Bf("v-if",!0),e.$slots.footer?(af(),cf("div",{key:2,class:pu(ed(s).be("dropdown","footer"))},[Gg(e.$slots,"footer")],2)):Bf("v-if",!0)],2))}});var Ale=KU(lle,[["__file","mention-dropdown.vue"]]);const cle=hg({...hg({name:"ElMention",inheritAttrs:!1}),props:sle,emits:rle,setup(e,{expose:t,emit:i}){const n=e,s=qf((()=>nL(n,Object.keys(Fj)))),r=KF("mention"),a=Wj(),o=Gj(),l=zh(),A=zh(),c=zh(),u=zh(!1),h=zh(),d=zh(),g=qf((()=>n.showArrow?n.placement:`${n.placement}-start`)),p=qf((()=>n.showArrow?["bottom","top"]:["bottom-start","top-start"])),f=qf((()=>{const{filterOption:e,options:t}=n;return d.value&&e?t.filter((t=>e(d.value.pattern,t))):t})),m=qf((()=>u.value&&(!!f.value.length||n.loading))),C=qf((()=>{var e;return`${o.value}-${null==(e=c.value)?void 0:e.hoveringIndex}`})),I=e=>{i("update:modelValue",e),w()},v=e=>{var t,s,r,a;if("code"in e&&!(null==(t=l.value)?void 0:t.isComposing))switch(e.code){case zJ.left:case zJ.right:w();break;case zJ.up:case zJ.down:if(!u.value)return;e.preventDefault(),null==(s=c.value)||s.navigateOptions(e.code===zJ.up?"prev":"next");break;case zJ.enter:case zJ.numpadEnter:if(!u.value)return;e.preventDefault(),(null==(r=c.value)?void 0:r.hoverOption)?null==(a=c.value)||a.selectHoverOption():u.value=!1;break;case zJ.esc:if(!u.value)return;e.preventDefault(),u.value=!1;break;case zJ.backspace:if(n.whole&&d.value){const{splitIndex:t,selectionEnd:s,pattern:r,prefixIndex:a,prefix:o}=d.value,l=E();if(!l)return;const A=l.value,c=n.options.find((e=>e.value===r));if((Oc(n.checkIsWhole)?n.checkIsWhole(r,o):c)&&-1!==t&&t+1===s){e.preventDefault();const n=A.slice(0,a)+A.slice(t+1);i(UU,n);const s=a;Qd((()=>{l.selectionStart=s,l.selectionEnd=s,_()}))}}}},{wrapperRef:B}=jj(l,{beforeFocus:()=>a.value,afterFocus(){w()},beforeBlur(e){var t;return null==(t=A.value)?void 0:t.isFocusInsideContent(e)},afterBlur(){u.value=!1}}),y=()=>{w()},b=e=>{if(!d.value)return;const t=E();if(!t)return;const s=t.value,{split:r}=n,a=s.slice(d.value.end),o=a.startsWith(r),l=`${e.value}${o?"":r}`,A=s.slice(0,d.value.start)+l+a;i(UU,A),i("select",e,d.value.prefix);const c=d.value.start+l.length+(o?1:0);Qd((()=>{t.selectionStart=c,t.selectionEnd=c,t.focus(),_()}))},E=()=>{var e,t;return"textarea"===n.type?null==(e=l.value)?void 0:e.textarea:null==(t=l.value)?void 0:t.input},w=()=>{setTimeout((()=>{Q(),_(),Qd((()=>{var e;return null==(e=A.value)?void 0:e.updatePopper()}))}),0)},Q=()=>{const e=E();if(!e)return;const t=((e,t={debug:!1,useSelectionEnd:!1})=>{const i=null!==e.selectionStart?e.selectionStart:0,n=null!==e.selectionEnd?e.selectionEnd:0,s=t.useSelectionEnd?n:i;if(t.debug){const e=document.querySelector("#input-textarea-caret-position-mirror-div");(null==e?void 0:e.parentNode)&&e.parentNode.removeChild(e)}const r=document.createElement("div");r.id="input-textarea-caret-position-mirror-div",document.body.appendChild(r);const a=r.style,o=window.getComputedStyle(e),l="INPUT"===e.nodeName;a.whiteSpace=l?"nowrap":"pre-wrap",l||(a.wordWrap="break-word"),a.position="absolute",t.debug||(a.visibility="hidden"),["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"].forEach((e=>{if(l&&"lineHeight"===e)if("border-box"===o.boxSizing){const e=Number.parseInt(o.height),t=Number.parseInt(o.paddingTop)+Number.parseInt(o.paddingBottom)+Number.parseInt(o.borderTopWidth)+Number.parseInt(o.borderBottomWidth),i=t+Number.parseInt(o.lineHeight);a.lineHeight=e>i?e-t+"px":e===i?o.lineHeight:"0"}else a.lineHeight=o.height;else a[e]=o[e]})),wj()?e.scrollHeight>Number.parseInt(o.height)&&(a.overflowY="scroll"):a.overflow="hidden",r.textContent=e.value.slice(0,Math.max(0,s)),l&&r.textContent&&(r.textContent=r.textContent.replace(/\s/g," "));const A=document.createElement("span");A.textContent=e.value.slice(Math.max(0,s))||".",A.style.position="relative",A.style.left=-e.scrollLeft+"px",A.style.top=-e.scrollTop+"px",r.appendChild(A);const c={top:A.offsetTop+Number.parseInt(o.borderTopWidth),left:A.offsetLeft+Number.parseInt(o.borderLeftWidth),height:1.5*Number.parseInt(o.fontSize)};return t.debug?A.style.backgroundColor="#aaa":document.body.removeChild(r),c.left>=e.clientWidth&&(c.left=e.clientWidth),c})(e),i=e.getBoundingClientRect(),n=l.value.$el.getBoundingClientRect();h.value={position:"absolute",width:0,height:`${t.height}px`,left:t.left+i.left-n.left+"px",top:t.top+i.top-n.top+"px"}},_=()=>{const e=E();if(document.activeElement!==e)return void(u.value=!1);const{prefix:t,split:s}=n;if(d.value=((e,t,i)=>{const{selectionEnd:n}=e;if(null===n)return;const s=e.value,r=hR(t);let a,o=-1;for(let l=n-1;l>=0;--l){const e=s[l];if(e!==i&&"\n"!==e&&"\r"!==e){if(r.includes(e)){const t=-1===o?n:o;a={pattern:s.slice(l+1,t),start:l+1,end:t,prefix:e,prefixIndex:l,splitIndex:o,selectionEnd:n};break}}else o=l}return a})(e,t,s),d.value&&-1===d.value.splitIndex)return u.value=!0,void i("search",d.value.pattern,d.value.prefix);u.value=!1};return t({input:l,tooltip:A,dropdownVisible:m}),(e,t)=>(af(),cf("div",{ref_key:"wrapperRef",ref:B,class:pu(ed(r).b())},[mf(ed(Xj),wf(wf(ed(s),e.$attrs),{ref_key:"elInputRef",ref:l,"model-value":e.modelValue,disabled:ed(a),role:ed(m)?"combobox":void 0,"aria-activedescendant":ed(m)?ed(C)||"":void 0,"aria-controls":ed(m)?ed(o):void 0,"aria-expanded":ed(m)||void 0,"aria-label":e.ariaLabel,"aria-autocomplete":ed(m)?"none":void 0,"aria-haspopup":ed(m)?"listbox":void 0,onInput:I,onKeydown:v,onMousedown:y}),Og({_:2},[Pg(e.$slots,((t,i)=>({name:i,fn:Nd((t=>[Gg(e.$slots,i,fu(Cf(t)))]))})))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),mf(ed(XX),{ref_key:"tooltipRef",ref:A,visible:ed(m),"popper-class":[ed(r).e("popper"),e.popperClass],"popper-options":e.popperOptions,placement:ed(g),"fallback-placements":ed(p),effect:"light",pure:"",offset:e.offset,"show-arrow":e.showArrow},{default:Nd((()=>[ff("div",{style:cu(h.value)},null,4)])),content:Nd((()=>{var t;return[mf(Ale,{ref_key:"dropdownRef",ref:c,options:ed(f),disabled:ed(a),loading:e.loading,"content-id":ed(o),"aria-label":e.ariaLabel,onSelect:b,onClick:AC(null==(t=l.value)?void 0:t.focus,["stop"])},Og({_:2},[Pg(e.$slots,((t,i)=>({name:i,fn:Nd((t=>[Gg(e.$slots,i,fu(Cf(t)))]))})))]),1032,["options","disabled","loading","content-id","aria-label","onClick"])]})),_:3},8,["visible","popper-class","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}});const ule=lH(KU(cle,[["__file","mention.vue"]]));var hle=[uH,Ej,i$,vne,a$,u$,g$,y$,b$,eZ,tZ,wZ,_Z,qZ,YZ,e1,K0,s1,r0,a0,o0,l1,I1,v1,p1,z1,e2,c2,u2,h2,d2,g2,W4,i3,n3,I3,y3,Q3,g6,p6,f6,v6,a8,o8,gH,p8,u8,Xj,I8,b8,_8,W8,j8,J8,z8,Z8,G9,V9,t5,_X,s5,y0,E0,b0,l5,d5,f5,lJ,y9,b9,E9,E7,x7,k7,K7,W7,z7,nee,uee,hee,Cee,Jte,zte,Ine,Une,Hne,W0,Gne,a4,zne,tse,ise,XX,Ure,Xre,pae,Eae,jae,moe,yoe,Poe,Ooe,Xoe,$oe,ile,ule];const dle="ElInfiniteScroll",gle={delay:{type:Number,default:200},distance:{type:Number,default:0},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},ple=(e,t)=>Object.entries(gle).reduce(((i,[n,s])=>{var r,a;const{type:o,default:l}=s,A=e.getAttribute(`infinite-scroll-${n}`);let c=null!=(a=null!=(r=t[A])?r:A)?a:l;return c="false"!==c&&c,c=o(c),i[n]=Number.isNaN(c)?l:c,i}),{}),fle=e=>{const{observer:t}=e[dle];t&&(t.disconnect(),delete e[dle].observer)},mle=(e,t)=>{const{container:i,containerEl:n,instance:s,observer:r,lastScrollTop:a}=e[dle],{disabled:o,distance:l}=ple(e,s),{clientHeight:A,scrollHeight:c,scrollTop:u}=n,h=u-a;if(e[dle].lastScrollTop=u,r||o||h<0)return;let d=!1;if(i===e)d=c-(A+u)<=l;else{const{clientTop:t,scrollHeight:i}=e;d=u+A>=w1(e,n)+t+i-l}d&&t.call(s)};function Cle(e,t){const{containerEl:i,instance:n}=e[dle],{disabled:s}=ple(e,n);s||0===i.clientHeight||(i.scrollHeight<=i.clientHeight?t.call(n):fle(e))}const Ile={async mounted(e,t){const{instance:i,value:n}=t;Oc(n)||lU(dle,"'v-infinite-scroll' binding value must be a function"),await Qd();const{delay:s,immediate:r}=ple(e,i),a=eH(e,!0),o=a===window?document.documentElement:a,l=sL(mle.bind(null,e,n),s);if(a){if(e[dle]={instance:i,container:a,containerEl:o,delay:s,cb:n,onScroll:l,lastScrollTop:o.scrollTop},r){const t=new MutationObserver(sL(Cle.bind(null,e,n),50));e[dle].observer=t,t.observe(e,{childList:!0,subtree:!0}),Cle(e,n)}a.addEventListener("scroll",l)}},unmounted(e){if(!e[dle])return;const{container:t,onScroll:i}=e[dle];null==t||t.removeEventListener("scroll",i),fle(e)},async updated(e){if(e[dle]){const{containerEl:t,cb:i,observer:n}=e[dle];t.clientHeight&&n&&Cle(e,i)}else await Qd()},install:e=>{e.directive("InfiniteScroll",Ile)}},vle=Ile;function Ble(e){let t;const i=zh(!1),n=Lh({...e,originalPosition:"",originalOverflow:"",visible:!1});function s(){var e,t;null==(t=null==(e=o.$el)?void 0:e.parentNode)||t.removeChild(o.$el)}function r(){if(!i.value)return;const e=n.parent;i.value=!1,e.vLoadingAddClassList=void 0,function(){const e=n.parent,t=o.ns;if(!e.vLoadingAddClassList){let i=e.getAttribute("loading-number");i=Number.parseInt(i)-1,i?e.setAttribute("loading-number",i.toString()):(JU(e,t.bm("parent","relative")),e.removeAttribute("loading-number")),JU(e,t.bm("parent","hidden"))}s(),a.unmount()}()}const a=fC(hg({name:"ElLoading",setup(e,{expose:t}){const{ns:i,zIndex:s}=RU("loading");return t({ns:i,zIndex:s}),()=>{const e=n.spinner||n.svg,t=Yf("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...e?{innerHTML:e}:{}},[Yf("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),s=n.text?Yf("p",{class:i.b("text")},[n.text]):void 0;return Yf(am,{name:i.b("fade"),onAfterLeave:r},{default:Nd((()=>[Ld(mf("div",{style:{backgroundColor:n.background||""},class:[i.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[Yf("div",{class:i.b("spinner")},[t,s])]),[[ym,n.visible]])]))})}}})),o=a.mount(document.createElement("div"));return{...rd(n),setText:function(e){n.text=e},removeElLoadingChild:s,close:function(){var s;e.beforeClose&&!e.beforeClose()||(i.value=!0,clearTimeout(t),t=setTimeout(r,400),n.visible=!1,null==(s=e.closed)||s.call(e))},handleAfterLeave:r,vm:o,get $el(){return o.$el}}}let yle;const ble=function(e={}){if(!bL)return;const t=Ele(e);if(t.fullscreen&&yle)return yle;const i=Ble({...t,closed:()=>{var e;null==(e=t.closed)||e.call(t),t.fullscreen&&(yle=void 0)}});wle(t,t.parent,i),Qle(t,t.parent,i),t.parent.vLoadingAddClassList=()=>Qle(t,t.parent,i);let n=t.parent.getAttribute("loading-number");return n=n?`${Number.parseInt(n)+1}`:"1",t.parent.setAttribute("loading-number",n),t.parent.appendChild(i.$el),Qd((()=>i.visible.value=t.visible)),t.fullscreen&&(yle=i),i},Ele=e=>{var t,i,n,s;let r;return r=Gc(e.target)?null!=(t=document.querySelector(e.target))?t:document.body:e.target||document.body,{parent:r===document.body||e.body?document.body:r,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:r===document.body&&(null==(i=e.fullscreen)||i),lock:null!=(n=e.lock)&&n,customClass:e.customClass||"",visible:null==(s=e.visible)||s,beforeClose:e.beforeClose,closed:e.closed,target:r}},wle=async(e,t,i)=>{const{nextZIndex:n}=i.vm.zIndex||i.vm._.exposed.zIndex,s={};if(e.fullscreen)i.originalPosition.value=zU(document.body,"position"),i.originalOverflow.value=zU(document.body,"overflow"),s.zIndex=n();else if(e.parent===document.body){i.originalPosition.value=zU(document.body,"position"),await Qd();for(const t of["top","left"]){const i="top"===t?"scrollTop":"scrollLeft";s[t]=e.target.getBoundingClientRect()[t]+document.body[i]+document.documentElement[i]-Number.parseInt(zU(document.body,`margin-${t}`),10)+"px"}for(const t of["height","width"])s[t]=`${e.target.getBoundingClientRect()[t]}px`}else i.originalPosition.value=zU(t,"position");for(const[r,a]of Object.entries(s))i.$el.style[r]=a},Qle=(e,t,i)=>{const n=i.vm.ns||i.vm._.exposed.ns;["absolute","fixed","sticky"].includes(i.originalPosition.value)?JU(t,n.bm("parent","relative")):jU(t,n.bm("parent","relative")),e.fullscreen&&e.lock?jU(t,n.bm("parent","hidden")):JU(t,n.bm("parent","hidden"))},_le=Symbol("ElLoading"),Sle=(e,t)=>{var i,n,s,r;const a=t.instance,o=e=>qc(t.value)?t.value[e]:void 0,l=t=>(e=>{const t=Gc(e)&&(null==a?void 0:a[e])||e;return t?zh(t):t})(o(t)||e.getAttribute(`element-loading-${tu(t)}`)),A=null!=(i=o("fullscreen"))?i:t.modifiers.fullscreen,c={text:l("text"),svg:l("svg"),svgViewBox:l("svgViewBox"),spinner:l("spinner"),background:l("background"),customClass:l("customClass"),fullscreen:A,target:null!=(n=o("target"))?n:A?void 0:e,body:null!=(s=o("body"))?s:t.modifiers.body,lock:null!=(r=o("lock"))?r:t.modifiers.lock};e[_le]={options:c,instance:ble(c)}},xle={mounted(e,t){t.value&&Sle(e,t)},updated(e,t){const i=e[_le];t.oldValue!==t.value&&(t.value&&!t.oldValue?Sle(e,t):t.value&&t.oldValue?qc(t.value)&&((e,t)=>{for(const i of Object.keys(t))Jh(t[i])&&(t[i].value=e[i])})(t.value,i.options):null==i||i.instance.close())},unmounted(e){var t;null==(t=e[_le])||t.instance.close(),e[_le]=null}},kle={install(e){e.directive("loading",xle),e.config.globalProperties.$loading=ble},directive:xle,service:ble},Dle=["success","info","warning","error"],Fle={customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:bL?document.body:void 0},Tle=BU({customClass:{type:String,default:Fle.customClass},center:{type:Boolean,default:Fle.center},dangerouslyUseHTMLString:{type:Boolean,default:Fle.dangerouslyUseHTMLString},duration:{type:Number,default:Fle.duration},icon:{type:fj,default:Fle.icon},id:{type:String,default:Fle.id},message:{type:[String,Object,Function],default:Fle.message},onClose:{type:Function,default:Fle.onClose},showClose:{type:Boolean,default:Fle.showClose},type:{type:String,values:Dle,default:Fle.type},plain:{type:Boolean,default:Fle.plain},offset:{type:Number,default:Fle.offset},zIndex:{type:Number,default:Fle.zIndex},grouping:{type:Boolean,default:Fle.grouping},repeatNum:{type:Number,default:Fle.repeatNum}}),Mle=Uh([]),Rle=e=>{const{prev:t}=(e=>{const t=Mle.findIndex((t=>t.id===e)),i=Mle[t];let n;return t>0&&(n=Mle[t-1]),{current:i,prev:n}})(e);return t?t.vm.exposed.bottom.value:0},Nle=hg({...hg({name:"ElMessage"}),props:Tle,emits:{destroy:()=>!0},setup(e,{expose:t}){const i=e,{Close:n}=Cj,{ns:s,zIndex:r}=RU("message"),{currentZIndex:a,nextZIndex:o}=r,l=zh(),A=zh(!1),c=zh(0);let u;const h=qf((()=>i.type?"error"===i.type?"danger":i.type:"info")),d=qf((()=>{const e=i.type;return{[s.bm("icon",e)]:e&&Ij[e]}})),g=qf((()=>i.icon||Ij[i.type]||"")),p=qf((()=>Rle(i.id))),f=qf((()=>((e,t)=>Mle.findIndex((t=>t.id===e))>0?16:t)(i.id,i.offset)+p.value)),m=qf((()=>c.value+f.value)),C=qf((()=>({top:`${f.value}px`,zIndex:a.value})));function I(){0!==i.duration&&({stop:u}=ML((()=>{B()}),i.duration))}function v(){null==u||u()}function B(){A.value=!1}return Eg((()=>{I(),o(),A.value=!0})),Pp((()=>i.repeatNum),(()=>{v(),I()})),UL(document,"keydown",(function({code:e}){e===zJ.esc&&B()})),WL(l,(()=>{c.value=l.value.getBoundingClientRect().height})),t({visible:A,bottom:m,close:B}),(e,t)=>(af(),uf(am,{name:ed(s).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:t=>e.$emit("destroy"),persisted:""},{default:Nd((()=>[Ld(ff("div",{id:e.id,ref_key:"messageRef",ref:l,class:pu([ed(s).b(),{[ed(s).m(e.type)]:e.type},ed(s).is("center",e.center),ed(s).is("closable",e.showClose),ed(s).is("plain",e.plain),e.customClass]),style:cu(ed(C)),role:"alert",onMouseenter:v,onMouseleave:I},[e.repeatNum>1?(af(),uf(ed(g$),{key:0,value:e.repeatNum,type:ed(h),class:pu(ed(s).e("badge"))},null,8,["value","type","class"])):Bf("v-if",!0),ed(g)?(af(),uf(ed(gH),{key:1,class:pu([ed(s).e("icon"),ed(d)])},{default:Nd((()=>[(af(),uf(Ng(ed(g))))])),_:1},8,["class"])):Bf("v-if",!0),Gg(e.$slots,"default",{},(()=>[e.dangerouslyUseHTMLString?(af(),cf(Zp,{key:1},[Bf(" Caution here, message could've been compromised, never use user's input as message "),ff("p",{class:pu(ed(s).e("content")),innerHTML:e.message},null,10,["innerHTML"])],2112)):(af(),cf("p",{key:0,class:pu(ed(s).e("content"))},yu(e.message),3))])),e.showClose?(af(),uf(ed(gH),{key:2,class:pu(ed(s).e("closeBtn")),onClick:AC(B,["stop"])},{default:Nd((()=>[mf(ed(n))])),_:1},8,["class","onClick"])):Bf("v-if",!0)],46,["id"]),[[ym,A.value]])])),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var Lle=KU(Nle,[["__file","message.vue"]]);let Ule=1;const Hle=e=>{const t=!e||Gc(e)||hf(e)||Oc(e)?{message:e}:e,i={...Fle,...t};if(i.appendTo){if(Gc(i.appendTo)){let e=document.querySelector(i.appendTo);uL(e)||(e=document.body),i.appendTo=e}}else i.appendTo=document.body;return lL($1.grouping)&&!i.grouping&&(i.grouping=$1.grouping),AL($1.duration)&&3e3===i.duration&&(i.duration=$1.duration),AL($1.offset)&&16===i.offset&&(i.offset=$1.offset),lL($1.showClose)&&!i.showClose&&(i.showClose=$1.showClose),i},Ple=({appendTo:e,...t},i)=>{const n="message_"+Ule++,s=t.onClose,r=document.createElement("div"),a={...t,id:n,onClose:()=>{null==s||s(),(e=>{const t=Mle.indexOf(e);if(-1===t)return;Mle.splice(t,1);const{handler:i}=e;i.close()})(c)},onDestroy:()=>{pC(null,r)}},o=mf(Lle,a,Oc(a.message)||hf(a.message)?{default:Oc(a.message)?a.message:()=>a.message}:null);o.appContext=i||Ole._context,pC(o,r),e.appendChild(r.firstElementChild);const l=o.component,A={close:()=>{l.exposed.visible.value=!1}},c={id:n,vnode:o,vm:l,handler:A,props:o.component.props};return c},Ole=(e={},t)=>{if(!bL)return{close:()=>{}};const i=Hle(e);if(i.grouping&&Mle.length){const e=Mle.find((({vnode:e})=>{var t;return(null==(t=e.props)?void 0:t.message)===i.message}));if(e)return e.props.repeatNum+=1,e.props.type=i.type,e.handler}if(AL($1.max)&&Mle.length>=$1.max)return{close:()=>{}};const n=Ple(i,t);return Mle.push(n),n.handler};Dle.forEach((e=>{Ole[e]=(t={},i)=>{const n=Hle(t);return Ole({...n,type:e},i)}})),Ole.closeAll=function(e){for(const t of Mle)e&&e!==t.props.type||t.handler.close()},Ole._context=null;const Gle=AH(Ole,"$message"),Kle="_trap-focus-children",qle=[],Yle=e=>{if(0===qle.length)return;const t=qle[qle.length-1][Kle];if(t.length>0&&e.code===zJ.tab){if(1===t.length)return e.preventDefault(),void(document.activeElement!==t[0]&&t[0].focus());const i=e.shiftKey,n=e.target===t[0],s=e.target===t[t.length-1];n&&i&&(e.preventDefault(),t[t.length-1].focus()),s&&!i&&(e.preventDefault(),t[0].focus())}},Vle=hg({name:"ElMessageBox",directives:{TrapFocus:{beforeMount(e){e[Kle]=IJ(e),qle.push(e),qle.length<=1&&document.addEventListener("keydown",Yle)},updated(e){Qd((()=>{e[Kle]=IJ(e)}))},unmounted(){qle.shift(),0===qle.length&&document.removeEventListener("keydown",Yle)}}},components:{ElButton:eZ,ElFocusTrap:ez,ElInput:Xj,ElOverlay:o3,ElIcon:gH,...Cj},inheritAttrs:!1,props:{buttonSize:{type:String,validator:dee},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:i,zIndex:n,ns:s,size:r}=RU("message-box",qf((()=>e.buttonSize))),{t:a}=i,{nextZIndex:o}=n,l=zh(!1),A=Lh({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:Vh(qq),cancelButtonLoadingIcon:Vh(qq),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:o()}),c=qf((()=>{const e=A.type;return{[s.bm("icon",e)]:e&&Ij[e]}})),u=Gj(),h=Gj(),d=qf((()=>A.icon||Ij[A.type]||"")),g=qf((()=>!!A.message)),p=zh(),f=zh(),m=zh(),C=zh(),I=zh(),v=qf((()=>A.confirmButtonClass));Pp((()=>A.inputValue),(async t=>{await Qd(),"prompt"===e.boxType&&null!==t&&_()}),{immediate:!0}),Pp((()=>l.value),(t=>{var i,n;t&&("prompt"!==e.boxType&&(A.autofocus?m.value=null!=(n=null==(i=I.value)?void 0:i.$el)?n:p.value:m.value=p.value),A.zIndex=o()),"prompt"===e.boxType&&(t?Qd().then((()=>{var e;C.value&&C.value.$el&&(A.autofocus?m.value=null!=(e=S())?e:p.value:m.value=p.value)})):(A.editorErrorMessage="",A.validateError=!1))}));const B=qf((()=>e.draggable)),y=qf((()=>e.overflow));function b(){l.value&&(l.value=!1,Qd((()=>{A.action&&t("action",A.action)})))}c3(p,f,B,y),Eg((async()=>{await Qd(),e.closeOnHashChange&&window.addEventListener("hashchange",b)})),_g((()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",b)}));const E=()=>{e.closeOnClickModal&&Q(A.distinguishCancelAndClose?"close":"cancel")},w=s3(E),Q=t=>{var i;("prompt"!==e.boxType||"confirm"!==t||_())&&(A.action=t,A.beforeClose?null==(i=A.beforeClose)||i.call(A,t,A,b):b())},_=()=>{if("prompt"===e.boxType){const e=A.inputPattern;if(e&&!e.test(A.inputValue||""))return A.editorErrorMessage=A.inputErrorMessage||a("el.messagebox.error"),A.validateError=!0,!1;const t=A.inputValidator;if(Oc(t)){const e=t(A.inputValue);if(!1===e)return A.editorErrorMessage=A.inputErrorMessage||a("el.messagebox.error"),A.validateError=!0,!1;if(Gc(e))return A.editorErrorMessage=e,A.validateError=!0,!1}}return A.editorErrorMessage="",A.validateError=!1,!0},S=()=>{const e=C.value.$refs;return e.input||e.textarea},x=()=>{Q("close")};return e.lockScroll&&f3(l),{...rd(A),ns:s,overlayEvent:w,visible:l,hasMessage:g,typeClass:c,contentId:u,inputId:h,btnSize:r,iconComponent:d,confirmButtonClasses:v,rootRef:p,focusStartRef:m,headerRef:f,inputRef:C,confirmRef:I,doClose:b,handleClose:x,onCloseRequested:()=>{e.closeOnPressEscape&&x()},handleWrapperClick:E,handleInputEnter:e=>{if("textarea"!==A.inputType)return e.preventDefault(),Q("confirm")},handleAction:Q,t:a}}});var Wle=KU(Vle,[["render",function(e,t,i,n,s,r){const a=Mg("el-icon"),o=Mg("close"),l=Mg("el-input"),A=Mg("el-button"),c=Mg("el-focus-trap"),u=Mg("el-overlay");return af(),uf(am,{name:"fade-in-linear",onAfterLeave:t=>e.$emit("vanish"),persisted:""},{default:Nd((()=>[Ld(mf(u,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:Nd((()=>[ff("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:pu(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[mf(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:Nd((()=>[ff("div",{ref:"rootRef",class:pu([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:cu(e.customStyle),tabindex:"-1",onClick:AC((()=>{}),["stop"])},[null!==e.title&&void 0!==e.title?(af(),cf("div",{key:0,ref:"headerRef",class:pu([e.ns.e("header"),{"show-close":e.showClose}])},[ff("div",{class:pu(e.ns.e("title"))},[e.iconComponent&&e.center?(af(),uf(a,{key:0,class:pu([e.ns.e("status"),e.typeClass])},{default:Nd((()=>[(af(),uf(Ng(e.iconComponent)))])),_:1},8,["class"])):Bf("v-if",!0),ff("span",null,yu(e.title),1)],2),e.showClose?(af(),cf("button",{key:0,type:"button",class:pu(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:uC(AC((t=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),["prevent"]),["enter"])},[mf(a,{class:pu(e.ns.e("close"))},{default:Nd((()=>[mf(o)])),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):Bf("v-if",!0)],2)):Bf("v-if",!0),ff("div",{id:e.contentId,class:pu(e.ns.e("content"))},[ff("div",{class:pu(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(af(),uf(a,{key:0,class:pu([e.ns.e("status"),e.typeClass])},{default:Nd((()=>[(af(),uf(Ng(e.iconComponent)))])),_:1},8,["class"])):Bf("v-if",!0),e.hasMessage?(af(),cf("div",{key:1,class:pu(e.ns.e("message"))},[Gg(e.$slots,"default",{},(()=>[e.dangerouslyUseHTMLString?(af(),uf(Ng(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(af(),uf(Ng(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:Nd((()=>[vf(yu(e.dangerouslyUseHTMLString?"":e.message),1)])),_:1},8,["for"]))]))],2)):Bf("v-if",!0)],2),Ld(ff("div",{class:pu(e.ns.e("input"))},[mf(l,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t=>e.inputValue=t,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:pu({invalid:e.validateError}),onKeydown:uC(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),ff("div",{class:pu(e.ns.e("errormsg")),style:cu({visibility:e.editorErrorMessage?"visible":"hidden"})},yu(e.editorErrorMessage),7)],2),[[ym,e.showInput]])],10,["id"]),ff("div",{class:pu(e.ns.e("btns"))},[e.showCancelButton?(af(),uf(A,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:pu([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t=>e.handleAction("cancel"),onKeydown:uC(AC((t=>e.handleAction("cancel")),["prevent"]),["enter"])},{default:Nd((()=>[vf(yu(e.cancelButtonText||e.t("el.messagebox.cancel")),1)])),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):Bf("v-if",!0),Ld(mf(A,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:pu([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t=>e.handleAction("confirm"),onKeydown:uC(AC((t=>e.handleAction("confirm")),["prevent"]),["enter"])},{default:Nd((()=>[vf(yu(e.confirmButtonText||e.t("el.messagebox.confirm")),1)])),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[ym,e.showConfirmButton]])],2)],14,["onClick"])])),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])])),_:3},8,["z-index","overlay-class","mask"]),[[ym,e.visible]])])),_:3},8,["onAfterLeave"])}],["__file","index.vue"]]);const jle=new Map,Jle=(e,t,i=null)=>{const n=mf(Wle,e,Oc(e.message)||hf(e.message)?{default:Oc(e.message)?e.message:()=>e.message}:null);return n.appContext=i,pC(n,t),(e=>{let t=document.body;return e.appendTo&&(Gc(e.appendTo)&&(t=document.querySelector(e.appendTo)),uL(e.appendTo)&&(t=e.appendTo),uL(t)||(t=document.body)),t})(e).appendChild(t.firstElementChild),n.component},zle=(e,t)=>{const i=document.createElement("div");e.onVanish=()=>{pC(null,i),jle.delete(s)},e.onAction=t=>{const i=jle.get(s);let r;r=e.showInput?{value:s.inputValue,action:t}:t,e.callback?e.callback(r,n.proxy):"cancel"===t||"close"===t?e.distinguishCancelAndClose&&"cancel"!==t?i.reject("close"):i.reject("cancel"):i.resolve(r)};const n=Jle(e,i,t),s=n.proxy;for(const r in e)Nc(e,r)&&!Nc(s.$props,r)&&(s[r]=e[r]);return s.visible=!0,s};function Xle(e,t=null){if(!bL)return Promise.reject();let i;return Gc(e)||hf(e)?e={message:e}:i=e.callback,new Promise(((n,s)=>{const r=zle(e,null!=t?t:Xle._context);jle.set(r,{options:e,callback:i,resolve:n,reject:s})}))}const $le={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};["alert","confirm","prompt"].forEach((e=>{Xle[e]=function(e){return(t,i,n,s)=>{let r="";return qc(i)?(n=i,r=""):r=oL(i)?"":i,Xle(Object.assign({title:r,message:t,type:"",...$le[e]},n,{boxType:e}),s)}}(e)})),Xle.close=()=>{jle.forEach(((e,t)=>{t.doClose()})),jle.clear()},Xle._context=null;const Zle=Xle;Zle.install=e=>{Zle._context=e._context,e.config.globalProperties.$msgbox=Zle,e.config.globalProperties.$messageBox=Zle,e.config.globalProperties.$alert=Zle.alert,e.config.globalProperties.$confirm=Zle.confirm,e.config.globalProperties.$prompt=Zle.prompt};const eAe=Zle,tAe=["success","info","warning","error"],iAe=BU({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:fj},id:{type:String,default:""},message:{type:[String,Object,Function],default:""},offset:{type:Number,default:0},onClick:{type:Function,default:()=>{}},onClose:{type:Function,required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...tAe,""],default:""},zIndex:Number}),nAe=hg({...hg({name:"ElNotification"}),props:iAe,emits:{destroy:()=>!0},setup(e,{expose:t}){const i=e,{ns:n,zIndex:s}=RU("notification"),{nextZIndex:r,currentZIndex:a}=s,{Close:o}=mj,l=zh(!1);let A;const c=qf((()=>{const e=i.type;return e&&Ij[i.type]?n.m(e):""})),u=qf((()=>i.type&&Ij[i.type]||i.icon)),h=qf((()=>i.position.endsWith("right")?"right":"left")),d=qf((()=>i.position.startsWith("top")?"top":"bottom")),g=qf((()=>{var e;return{[d.value]:`${i.offset}px`,zIndex:null!=(e=i.zIndex)?e:a.value}}));function p(){i.duration>0&&({stop:A}=ML((()=>{l.value&&m()}),i.duration))}function f(){null==A||A()}function m(){l.value=!1}return Eg((()=>{p(),r(),l.value=!0})),UL(document,"keydown",(function({code:e}){e===zJ.delete||e===zJ.backspace?f():e===zJ.esc?l.value&&m():p()})),t({visible:l,close:m}),(e,t)=>(af(),uf(am,{name:ed(n).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:t=>e.$emit("destroy"),persisted:""},{default:Nd((()=>[Ld(ff("div",{id:e.id,class:pu([ed(n).b(),e.customClass,ed(h)]),style:cu(ed(g)),role:"alert",onMouseenter:f,onMouseleave:p,onClick:e.onClick},[ed(u)?(af(),uf(ed(gH),{key:0,class:pu([ed(n).e("icon"),ed(c)])},{default:Nd((()=>[(af(),uf(Ng(ed(u))))])),_:1},8,["class"])):Bf("v-if",!0),ff("div",{class:pu(ed(n).e("group"))},[ff("h2",{class:pu(ed(n).e("title")),textContent:yu(e.title)},null,10,["textContent"]),Ld(ff("div",{class:pu(ed(n).e("content")),style:cu(e.title?void 0:{margin:0})},[Gg(e.$slots,"default",{},(()=>[e.dangerouslyUseHTMLString?(af(),cf(Zp,{key:1},[Bf(" Caution here, message could've been compromised, never use user's input as message "),ff("p",{innerHTML:e.message},null,8,["innerHTML"])],2112)):(af(),cf("p",{key:0},yu(e.message),1))]))],6),[[ym,e.message]]),e.showClose?(af(),uf(ed(gH),{key:0,class:pu(ed(n).e("closeBtn")),onClick:AC(m,["stop"])},{default:Nd((()=>[mf(ed(o))])),_:1},8,["class","onClick"])):Bf("v-if",!0)],2)],46,["id","onClick"]),[[ym,l.value]])])),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var sAe=KU(nAe,[["__file","notification.vue"]]);const rAe={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let aAe=1;const oAe=function(e={},t){if(!bL)return{close:()=>{}};(Gc(e)||hf(e))&&(e={message:e});const i=e.position||"top-right";let n=e.offset||0;rAe[i].forEach((({vm:e})=>{var t;n+=((null==(t=e.el)?void 0:t.offsetHeight)||0)+16})),n+=16;const s="notification_"+aAe++,r=e.onClose,a={...e,offset:n,id:s,onClose:()=>{!function(e,t,i){const n=rAe[t],s=n.findIndex((({vm:t})=>{var i;return(null==(i=t.component)?void 0:i.props.id)===e}));if(-1===s)return;const{vm:r}=n[s];if(!r)return;null==i||i(r);const a=r.el.offsetHeight,o=t.split("-")[0];n.splice(s,1);const l=n.length;if(l<1)return;for(let A=s;A<l;A++){const{el:e,component:t}=n[A].vm,i=Number.parseInt(e.style[o],10)-a-16;t.props.offset=i}}(s,i,r)}};let o=document.body;uL(e.appendTo)?o=e.appendTo:Gc(e.appendTo)&&(o=document.querySelector(e.appendTo)),uL(o)||(o=document.body);const l=document.createElement("div"),A=mf(sAe,a,Oc(a.message)?a.message:()=>a.message);return A.appContext=oL(t)?oAe._context:t,A.props.onDestroy=()=>{pC(null,l)},pC(A,l),rAe[i].push({vm:A}),o.appendChild(l.firstElementChild),{close:()=>{A.component.exposed.visible.value=!1}}};tAe.forEach((e=>{oAe[e]=(t={},i)=>((Gc(t)||hf(t))&&(t={message:t}),oAe({...t,type:e},i))})),oAe.closeAll=function(){for(const e of Object.values(rAe))e.forEach((({vm:e})=>{e.component.exposed.visible.value=!1}))},oAe._context=null;const lAe=AH(oAe,"$notify");var AAe=((e=[])=>({version:"2.9.0",install:(t,i)=>{t[LF]||(t[LF]=!0,e.forEach((e=>t.use(e))),i&&NU(i,t,!0))}}))([...hle,...[vle,kle,Gle,eAe,lAe,$9]]);const cAe=TC("painter",(()=>{const e=JC(),t=cF(),i=rI();let n=uAe(),s=null,r={},a={
// 画笔size 和 保存最大size
width:0,height:0,maxWidth:1228,maxHeight:1228};const o=Lh({color:"#000",painterW:2,
// 5 8 15
lineType:null,
// 1.曲线, 2.直线
lines:(null==s?void 0:s.getObjects())||[],openPainterTool:!1,showPainterTool:!0,linesTotal:0,lineOpacity:1}),l=Lh({isShow:!1,colorValueIdx:0}),A=Lh({isShow:!1,selectPenTypeValue:1,lineType:1}),c=qf((()=>{var e;return(null==(e=null==s?void 0:s.getObjects())?void 0:e.length)||0}));let u=!1;Pp((()=>o.openPainterTool),(t=>{let i=parseInt(e.get("totalPageNo"));o.showPainterTool=t,!0===t?(o.lineType||(o.lineType=1),PC("#main_painter_id").css({"z-index":i+200,"pointer-events":""}),h(),n.memoState.isShowDialog=!1):(r={},PC("#main_painter_id").css({"z-index":i+1,"pointer-events":"none"}))})),Pp((()=>o.color),(e=>{s.freeDrawingBrush.color=e,1!=o.lineType||8!==o.painterW&&15!==o.painterW||g([])})),Pp((()=>o.painterW),(e=>{let t=1;8!==e&&15!==e||(t=.5),t!==o.lineOpacity&&(o.lineOpacity=t,1===o.lineType&&g([])),s.freeDrawingBrush.width=e})),Pp((()=>o.lineType),(e=>{s.off("mouse:down"),s.off("mouse:up"),s.off("mouse:move"),1===e?g([]):(p([5,5]),s.isDrawingMode=!1)}));const h=()=>{let e=t.getCurrentPagenos();r={},e.map((e=>{var i;let n=t.getStorageDataByPageno(e);(null==(i=null==n?void 0:n.pen)?void 0:i.penData)&&C(n.pen.penData).then((t=>{r[e]=t}))}))},d=()=>{s=new NF.fabric.Canvas("painter-canvas",{allowTouchScrolling:!0,stopContextMenu:!0,selection:!1,
//关闭辅助框
selectable:!1,
//元素不能被选中
hoverCursor:"default",enableRetinaScaling:!1}),s.selection=!1},g=({strokeDashArray:e})=>{s.isDrawingMode=!0;let t=new NF.fabric.PencilBrush(s);t.width=o.painterW,t.color=((e,t=1)=>(3===(e=e.replace("#","")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),`rgba(${parseInt(e.slice(0,2),16)}, ${parseInt(e.slice(2,4),16)}, ${parseInt(e.slice(4,6),16)}, ${t})`))(o.color,o.lineOpacity),t.strokeDashArray=e,t.straightLineKey="altKey",t.selectable=!1,s.freeDrawingBrush=t,s.on("path:created",(function(e){e.path;e.path.selectable=!1,s.renderAll()})),s.on("mouse:down",(function(){l.isShow=!1,A.isShow=!1,o.showPainterTool=!1})),s.on("mouse:move",(function(){PC(".canvas-container canvas").css({cursor:"default"})})),s.on("mouse:up",(function(){o.showPainterTool=!0,o.linesTotal=s.getObjects().length}))},p=({strokeDashArray:e})=>{let t,i,n;f((r=>{if(s.getActiveObject())return;l.isShow=!1,A.isShow=!1,o.showPainterTool=!1,u=!0;const a=s.getPointer(r.e);t=a.x,i=a.y,n=new NF.fabric.Line([t,i,t,i],{stroke:o.color,strokeWidth:o.painterW,strokeDashArray:e,selectable:!1,uniqueValue:Date.now()+Math.random(),opacity:o.lineOpacity}),s.add(n)}),(e=>{if(u){const t=s.getPointer(e.e);n.set({y2:t.y,x2:t.x}),s.renderAll()}}),(()=>{o.showPainterTool=!0,u=!1,o.linesTotal=s.getObjects().length}))},f=(e,t,i)=>{s.on("mouse:down",e),s.on("mouse:move",t),s.on("mouse:up",i)},m=()=>{let t=e.get("first_width"),i=e.get("first_height"),n=0,s=0,r=a.maxWidth,o=a.maxHeight;r/o<=t/i?(n=r,s=r*(i/t)):(n=o*(t/i),s=o),a.width=Math.floor(n),a.height=Math.floor(s)},C=e=>new Promise(((t,i)=>{let n=new Image;n.src=e,n.onload=function(){t(n)},n.onerror=function(){i("Failed to load image")}})),I=(e,i)=>{let n=t.getStorageDataByPageno(e);n.pen={pageNum:e,updateDate:+new Date,penData:i},t.setStorageDataByPageno(e,n),C(i).then((t=>{r[e]=t})),B()},v=(e,t,i)=>{let n=document.createElement("img");n.src=e,n.onload=function(e,s){const r=n.naturalWidth,a=n.naturalHeight;let o=document.createElement("canvas");o.width=n.width/2,o.height=n.height;const l=o.getContext("2d");let A=document.createElement("canvas");A.width=n.width/2,A.height=n.height;const c=A.getContext("2d");l.drawImage(n,0,0,r/2,a,0,0,r/2,a);let u=o.toDataURL();c.drawImage(n,r/2,0,r/2,a,0,0,r/2,a);let h=A.toDataURL();i?(I(t[0],u),I(t[1],h)):(I(t[1],u),I(t[0],h))}},B=()=>{let i=t.getCurrentPagenos(),n=parseInt(e.get("totalPageNo"));for(let e=0;e<i.length;e++){let t=y(i[e]),s=PC("#pen_img_p"+i[e])[0];t.penData?(s.onload=function(){PC(this).addClass("acti-page-pen-img-show"),PC(this).css({"z-index":n+70})},s.src=t.penData):PC(s).removeClass("acti-page-pen-img-show")}},y=e=>{if(!e)return{};return t.getStorageDataByPageno(e).pen||{}},b=(i=0,n=0)=>{let r=t.getBookSize(),o=i>0?i:r.width||1,l=n>0?n:r.height||1,A=t.getCurrentPagenos().length,c=e.get("spread_mode");s.setHeight(l),1===A&&"double"===c&&(o/=2),s.setWidth(o),s.setZoom(o/(a.width*A))},E=()=>{s.clear()};return{painterInfo:o,colorVisible:l,penTypeVisible:A,lineTotalNum:c,initPainter:()=>{PC("#book_main").append("<div id='main_painter_id' class='painter-layer'><canvas id='painter-canvas'></canvas></div>"),m(),d()},colorList:["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff","#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f","#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc","#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd","#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0","#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79","#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47","#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"],resetPagePainterLayer:()=>{let i=e.get("spread_mode");E();let n=document.querySelector(".canvas-container");n.style.position="absolute",n.style.left=0,n.style.right=null;let s=t.getCurrentPagenos();for(let e=0;e<s.length;e++){let i=s[e];t.isPositionByPageno(i)}if(1===s.length){let e=s[0],r=t.isPositionByPageno(e);"double"===i&&("R"===r?(n.style.left=null,n.style.right=0):(n.style.left=0,n.style.right=null))}b(),B()},clearPainterLayer:E,revokeAction:()=>{let e=s.getObjects();if(e.length){let t=e.pop();s.remove(t)}o.linesTotal=s.getObjects().length},saveCanvasToImg:async(i,n=null)=>{o.openPainterTool=i;let l=n||t.getCurrentPagenos(),A="double"===e.get("spread_mode")?2:1;if(o.linesTotal<1)return;b(a.width*A,a.height),l.map((e=>{let i=r[e];const n=new NF.fabric.Image(i,{left:1===l.length||"L"===t.isPositionByPageno(e)?0:s.width/2,
// 图片距离右边的距离
top:0,
// 图片距离顶部的距离
scaleX:1,
// 图片的水平缩放
scaleY:1});s.add(n)}));let c=s.toDataURL({format:"png"});if(2===l.length){let e="L"===t.isPositionByPageno(l[0]);v(c,l,e)}else I(l[0],c);b(),E(),o.linesTotal=0},resetPainterCanvasScale:b,delCanvasByPage:()=>{eAe.confirm(i.painter_clear_painter_text,{confirmButtonText:i.memo_button_yes_text,cancelButtonText:i.memo_button_no_text,closeOnClickModal:!1}).then((()=>{E(),r={},o.linesTotal=0,t.getCurrentPagenos().map((e=>{let i=t.getStorageDataByPageno(e);i.pen&&(i.pen.penData=""),t.setStorageDataByPageno(e,i)})),B()}))},bindDragEvent:()=>{PC(".painter_dialog").draggable({containment:"parent",
// 限制在容器内拖拽
cursor:"move",
// 鼠标样式
start:function(e,t){},drag:function(e,t){},stop:function(e,t){}})},loadOldPageUrl:h,set:(e,t)=>{o[e]=t}}})),uAe=TC("memo",(()=>{const e=rI(),t=JC(),i=bme(),n=cF(),s=cAe();let r=Lh({newZindex:1,tmpStatus:!1,showEditContentTextarea:!1,
//false:关闭；1:编辑内容；2：编辑URL
sdEditMemoObj:"",sdIsShowMemoList:!1,sdIsShowSelectMemoBox:!1,memoOpen:!0,isShowDialog:!1,selectedColorIdx:-1,memoText:"",linkType:"1",linkDetail:"",linkPage:"",foldStatus:!0,pagelinkList:t.get("customizeJsons"),linkDetailImg:"",isShowSetLinkBox:!1,showViewList:[],memoSizeObj:{width:260,height:300},currentMemoId:"",memoDataList:[],memoColorList:{yellow:{colorName:"yellow",bgColor:"#fc9600",name:e.memo_select_template_option_yellow_text},red:{colorName:"red",bgColor:"#e92a58",name:e.memo_select_template_option_red_text},blue:{colorName:"blue",bgColor:"#0093fd",name:e.memo_select_template_option_blue_text}},memoSaveCount:0});Pp((()=>r.isShowDialog),(e=>{e?s.painterInfo.openPainterTool=!1:PC("#book_main").off("click.createMemo")})),Pp((()=>r.selectedColorIdx),(e=>{-1===e?PC("#main_divLink_id").css({pointerEvents:"auto"}):PC("#main_divLink_id").css({pointerEvents:"none"}),-1!==r.selectedColorIdx?(n.turnDisable=!0,a()):n.turnDisable=!1}));const a=()=>{PC("#book_main").one("click.createMemo",(t=>{var i,n;let s=PC(t.target).get(0).getAttribute("pageno"),a=null==(i=PC(t.target).closest(".link_layer").get(0))?void 0:i.getAttribute("pageno"),l=null==(n=PC(t.target).closest(".page-wrapper").get(0))?void 0:n.getAttribute("page"),A=s||a||l;if(!A)return;r.isShowDialog=!1;let u=o(A);if(10===u||20===u){let t=10===u?e.memo_add_overstep_maxNum_10_text:e.memo_add_overstep_maxNum_20_text;return void eAe.alert(t,{confirmButtonText:e.memo_button_yes_text})}let h=PC(t.target).offset(),d=t.pageX-h.left-1,g=t.pageY-h.top-1,p=1-45/PC(".page-wrapper").width(),f=1-45/PC(".page-wrapper").height(),m={id:C(),x:Math.min(p,d/PC(".page-wrapper").width()),y:Math.min(f,g/PC(".page-wrapper").height()),layer:r.newZindex,
// z-index
width:300,height:320,color:r.memoColorList[r.selectedColorIdx].colorName,text:r.memoText,linkType:r.linkType,linkDetail:r.linkDetail,foldStatus:1};c(A,m)}))},o=e=>{let t=n.getCurrentPagenos(),i=0,s={};return t.map((e=>{let t=l(e);i+=t.length,s[e]=t.length})),s[e]>=10?10:i>=20?20:void 0},l=e=>(n.getStorageDataByPageno(e).memo||{}).memoData||[],A=async()=>{let e=[],n=parseInt(t.totalPageNo);for(let t=1;t<=n;t++){let i=l(t);i.map((e=>{e.pageNum=t})),e.push(...i)}e.length<1&&i.commonState.pcSelButtonID&&(i.commonState.pcSelButtonID="acti-sidebar-toc-button"),r.memoDataList=e},c=(e,t)=>{let s=n.getStorageDataByPageno(e),a=s.memo||{},o=a.memoData||[];o.push(t),a.pageNum=e,a.updateDate=+new Date,a.memoData=o,s.memo=a,n.setStorageDataByPageno(e,s).then((()=>{g(t.id),r.selectedColorIdx=-1,i.showThumbnail(null),A()}))},u=AF(200,((e,t)=>{"desktop"===mF.type||t?d(e,t):(h(),e&&d(e,t))})),h=()=>{r.showViewList.map((e=>{e.foldStatus&&d(e.id,e.foldStatus)}))},d=(e,i,s=null)=>{if(s&&s.stopPropagation(),!r.memoOpen)return;let a=t.get("spread_mode"),o=r.showViewList.find((t=>t.id===e)),l=PC(".page-wrapper").width();if(o.foldStatus=!i,i){let{left:e,top:t}=p(o,o.pageno,a,l);o.left=e,o.top=t}else o.w=o.width,o.h=o.height,"desktop"===mF.type?o=f(o):(o.height=Math.max(226,Math.min(PC("body").height(),o.height)),o.width=Math.max(300,Math.min(PC("body").width(),o.width)),o.left=(PC("body").width()-o.width)/2/PC("body").width(),o.top=Math.max(0,(PC("body").height()-o.height)/2/PC("body").height()));let A=n.getStorageDataByPageno(o.pageno);A.memo.memoData.find((e=>e.id===o.id)).foldStatus=o.foldStatus,n.setStorageDataByPageno(o.pageno,A),"desktop"===mF.type&&PC("#"+e+".memo-content-box").resizable("option","disabled",!o.foldStatus)},g=e=>{r.showViewList.length=0;let i=n.getCurrentPagenos(),s=PC(".page-wrapper").width(),a=t.get("spread_mode"),o=[];i.map((e=>{var t;let i=n.getStorageDataByPageno(e,!0),r=(null==(t=null==i?void 0:i.memo)?void 0:t.memoData)||[];r.map((t=>{t.pageno=e,"desktop"!==mF.type&&(t.foldStatus=!1);let{left:i,top:n}=p(t,e,a,s);t.left=i,t.top=n,f(t)})),o.push(...r)})),r.showViewList=o,setTimeout((()=>{v(),m(),e&&u(e,!1)}),100)},p=(e,t,i,s)=>{let r="double"===i?2:1,a=n.isPositionByPageno(t),o=e.x,l=e.y;return"double"===i&&(o="L"===a?e.x/r:(s*e.x+s)/(2*s)),{left:o,top:l}},f=e=>{let t=e.foldStatus?e.height:45,i=n.getCurrentPagenos(),s=n.isPositionByPageno(e.pageno),r=PC("#book_main").width(),a=PC("#book_main").height(),o=PC(".page-wrapper").width(),l=45;if(e.foldStatus&&(l=e.width),o<l)e.left=0;else{if(o-e.x*o<l){if(!1===s){let t=r-l;e.left=t/r}if(1===i.length&&"L"===s){let t=r-o-l;e.left=t/r}if("R"===s){let t=r-l;e.left=t/r}}}if(a<t)e.top=0;else{a-e.y*a<t&&(e.top=(a-t)/a)}return e},m=()=>{let e=[];r.showViewList.map((t=>{e.push(t.layer)})),r.newZindex=Math.max(0,...e)+1},C=()=>+new Date+"_"+Math.ceil(1e8*Math.random()),I=(e,t,i,s)=>{let a=r.showViewList.find((t=>t.id===e)),o=n.getStorageDataByPageno(t),l=n.isPositionByPageno(t),A=PC(".page-wrapper").width(),u=PC(".page-wrapper").height(),h=i/PC("#book_main").width(),d=s/u,g=i/A,p=s/u;if("R"===l&&(g=(i-A)/A),a.pageno===t){let i=o.memo.memoData.find((t=>t.id===e));i.x=g,i.y=p,i.layer=a.layer,n.setStorageDataByPageno(t,o)}else{let i=n.getStorageDataByPageno(a.pageno),s=i.memo.memoData.findIndex((t=>t.id===e)),r=i.memo.memoData[s];i.memo.memoData.splice(s,1),n.setStorageDataByPageno(a.pageno,i),r.x=g,r.y=p,r.layer=a.layer,c(t,r)}a.left=h,a.top=d,a.x=g,a.y=p,a.pageno=t},v=()=>{let e,i,s=n.getCurrentPagenos(),a=s.length,o={},l=t.get("spread_mode");PC(".memo-content-box").draggable({containment:"#book_main",
// 限制在容器内拖拽
cursor:"move",
// 鼠标样式
handle:".handle2",start:function(t,A){if(PC(`#${t.target.id}.memo-content-box`).removeClass("memo-close-transition"),PC(`#${t.target.id}.memo-content-box`).removeClass("memo-open-transition"),n.turnDisable=!0,B(t.target.id),r.memoOpen=!0,i=PC("#book_main").width(),e=0,1===a&&"double"===l){let t=n.isPositionByPageno(s[0]);o[t]=s[0],"R"===t?e=PC("#book_main").width()/2:i=PC("#book_main").width()/2-PC(this).width()}else{let e=n.isPositionByPageno(s[0]),t=n.isPositionByPageno(s[1]);o[e]=s[0],o[t]=s[1]}},drag:function(t,n){r.memoOpen=!1,1===a&&"double"===l&&(n.position.left>i&&(n.position.left=i),n.position.left<e&&(n.position.left=e))},stop:function(e,t){let i;n.turnDisable=!1,i=t.position.left<PC("#book_main").width()/2?o.L:o.R,"single"===l&&(i=s[0]),I(e.target.id,i,t.position.left,t.position.top),setTimeout((()=>{r.memoOpen=!0}),500)}})},B=e=>{let t=r.showViewList.find((t=>t.id===e));t.layer=r.newZindex+=2;let i=n.getStorageDataByPageno(t.pageno);i.memo.memoData.find((t=>t.id===e)).layer=t.layer,n.setStorageDataByPageno(t.pageno,i)};return{memoState:r,renderPageMemoList:g,isShowEditBox:u,delMemo:t=>{eAe.confirm(e.memo_cleanLinkMemo_text,{closeOnClickModal:!1,confirmButtonText:e.memo_button_yes_text,cancelButtonText:e.memo_button_no_text}).then((()=>{let e=n.getStorageDataByPageno(t.pageno),i=e.memo.memoData.findIndex((e=>e.id===t.id));e.memo.memoData.splice(i,1),n.setStorageDataByPageno(t.pageno,e),r.showViewList=r.showViewList.filter((e=>t.id!==e.id)),A()})).catch((()=>{}))},createId:C,setMemoPosition:I,jumpUrl:e=>{1==e.linkType?n.gotoPageByTarget("toPageno",e.linkDetail,"turn_tag",e.pageno):(e.linkDetail.startsWith("http://")||e.linkDetail.startsWith("https://")||(e.linkDetail="http://"+e.linkDetail),window.open(e.linkDetail,"_blank"))},resetWH:(e,t,i)=>{let s=r.showViewList.find((t=>t.id===e)),a=n.getStorageDataByPageno(s.pageno),o=a.memo.memoData.find((t=>t.id===e));o.width=t,o.height=i,n.setStorageDataByPageno(s.pageno,a),s.width=t,s.height=i},showMemoListBySd:()=>{r.sdIsShowMemoList=!0,r.sdIsShowSelectMemoBox=!1},updateMemoDataList:A,hideAllMemo:h,saveMemoContentBySd:()=>{eAe.confirm(`<p class="confirm-msg">${e.mobile_memo_text_save_dialog_text}</p>`,{confirmButtonText:e.memo_button_yes_text,cancelButtonText:e.memo_button_no_text,dangerouslyUseHTMLString:!0,center:!0,buttonSize:"large"}).then((()=>{r.memoSaveCount++})).catch((()=>{}))},setMemoZindex:B,resetAllMemoPosition:()=>{r.showViewList.map((e=>{f(e)}))}}}));
/*!
 * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var hAe=function(e,t){return(hAe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function dAe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}hAe(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var gAe=function(){return gAe=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},gAe.apply(this,arguments)};function pAe(e,t,i,n){return new(i||(i=Promise))((function(t,s){function r(e){try{o(n.next(e))}catch(I2){s(I2)}}function a(e){try{o(n.throw(e))}catch(I2){s(I2)}}function o(e){var n;e.done?t(e.value):(n=e.value,n instanceof i?n:new i((function(e){e(n)}))).then(r,a)}o((n=n.apply(e,[])).next())}))}function fAe(e,t){var i,n,s,r,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(s=a.trys,(s=s.length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){a.label=r[1];break}if(6===r[0]&&a.label<s[1]){a.label=s[1],s=r;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(r);break}s[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(I2){r=[6,I2],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,o])}}}function mAe(e,t,i){if(2===arguments.length)for(var n,s=0,r=t.length;s<r;s++)!n&&s in t||(n||(n=Array.prototype.slice.call(t,0,s)),n[s]=t[s]);return e.concat(n||t)}for(var CAe=
/** @class */function(){function e(e,t,i,n){this.left=e,this.top=t,this.width=i,this.height=n}return e.prototype.add=function(t,i,n,s){return new e(this.left+t,this.top+i,this.width+n,this.height+s)},e.fromClientRect=function(t,i){return new e(i.left+t.windowBounds.left,i.top+t.windowBounds.top,i.width,i.height)},e.fromDOMRectList=function(t,i){var n=Array.from(i).find((function(e){return 0!==e.width}));return n?new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),IAe=function(e,t){return CAe.fromClientRect(e,t.getBoundingClientRect())},vAe=function(e){for(var t=[],i=0,n=e.length;i<n;){var s=e.charCodeAt(i++);if(s>=55296&&s<=56319&&i<n){var r=e.charCodeAt(i++);56320==(64512&r)?t.push(((1023&s)<<10)+(1023&r)+65536):(t.push(s),i--)}else t.push(s)}return t},BAe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var i=e.length;if(!i)return"";for(var n=[],s=-1,r="";++s<i;){var a=e[s];a<=65535?n.push(a):(a-=65536,n.push(55296+(a>>10),a%1024+56320)),(s+1===i||n.length>16384)&&(r+=String.fromCharCode.apply(String,n),n.length=0)}return r},yAe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bAe="undefined"==typeof Uint8Array?[]:new Uint8Array(256),EAe=0;EAe<64;EAe++)bAe[yAe.charCodeAt(EAe)]=EAe;for(var wAe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",QAe="undefined"==typeof Uint8Array?[]:new Uint8Array(256),_Ae=0;_Ae<64;_Ae++)QAe[wAe.charCodeAt(_Ae)]=_Ae;for(var SAe=function(e,t,i){return e.slice?e.slice(t,i):new Uint16Array(Array.prototype.slice.call(e,t,i))},xAe=
/** @class */function(){function e(e,t,i,n,s,r){this.initialValue=e,this.errorValue=t,this.highStart=i,this.highValueIndex=n,this.index=s,this.data=r}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),kAe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",DAe="undefined"==typeof Uint8Array?[]:new Uint8Array(256),FAe=0;FAe<64;FAe++)DAe[kAe.charCodeAt(FAe)]=FAe;var TAe,MAe,RAe,NAe,LAe,UAe,HAe,PAe,OAe=10,GAe=13,KAe=15,qAe=17,YAe=18,VAe=19,WAe=20,jAe=21,JAe=22,zAe=24,XAe=25,$Ae=26,ZAe=27,ece=28,tce=30,ice=32,nce=33,sce=34,rce=35,ace=37,oce=38,lce=39,Ace=40,cce=42,uce=[9001,65288],hce="×",dce="÷",gce=(NAe=function(e){var t,i,n,s,r,a=.75*e.length,o=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var A="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(a):new Array(a),c=Array.isArray(A)?A:new Uint8Array(A);for(t=0;t<o;t+=4)i=QAe[e.charCodeAt(t)],n=QAe[e.charCodeAt(t+1)],s=QAe[e.charCodeAt(t+2)],r=QAe[e.charCodeAt(t+3)],c[l++]=i<<2|n>>4,c[l++]=(15&n)<<4|s>>2,c[l++]=(3&s)<<6|63&r;return A}(" "),LAe=Array.isArray(NAe)?function(e){for(var t=e.length,i=[],n=0;n<t;n+=4)i.push(e[n+3]<<24|e[n+2]<<16|e[n+1]<<8|e[n]);return i}(NAe):new Uint32Array(NAe),UAe=Array.isArray(NAe)?function(e){for(var t=e.length,i=[],n=0;n<t;n+=2)i.push(e[n+1]<<8|e[n]);return i}(NAe):new Uint16Array(NAe),HAe=SAe(UAe,12,LAe[4]/2),PAe=2===LAe[5]?SAe(UAe,(24+LAe[4])/2):(TAe=LAe,MAe=Math.ceil((24+LAe[4])/4),TAe.slice?TAe.slice(MAe,RAe):new Uint32Array(Array.prototype.slice.call(TAe,MAe,RAe))),new xAe(LAe[0],LAe[1],LAe[2],LAe[3],HAe,PAe)),pce=[tce,36],fce=[1,2,3,5],mce=[OAe,8],Cce=[ZAe,$Ae],Ice=fce.concat(mce),vce=[oce,lce,Ace,sce,rce],Bce=[KAe,GAe],yce=function(e,t,i,n){var s=n[i];if(Array.isArray(e)?-1!==e.indexOf(s):e===s)for(var r=i;r<=n.length;){if((l=n[++r])===t)return!0;if(l!==OAe)break}if(s===OAe)for(r=i;r>0;){var a=n[--r];if(Array.isArray(e)?-1!==e.indexOf(a):e===a)for(var o=i;o<=n.length;){var l;if((l=n[++o])===t)return!0;if(l!==OAe)break}if(a!==OAe)break}return!1},bce=function(e,t){for(var i=e;i>=0;){var n=t[i];if(n!==OAe)return n;i--}return 0},Ece=function(e,t,i,n,s){if(0===i[n])return hce;var r=n-1;if(Array.isArray(s)&&!0===s[r])return hce;var a=r-1,o=r+1,l=t[r],A=a>=0?t[a]:0,c=t[o];if(2===l&&3===c)return hce;if(-1!==fce.indexOf(l))return"!";if(-1!==fce.indexOf(c))return hce;if(-1!==mce.indexOf(c))return hce;if(8===bce(r,t))return dce;if(11===gce.get(e[r]))return hce;if((l===ice||l===nce)&&11===gce.get(e[o]))return hce;if(7===l||7===c)return hce;if(9===l)return hce;if(-1===[OAe,GAe,KAe].indexOf(l)&&9===c)return hce;if(-1!==[qAe,YAe,VAe,zAe,ece].indexOf(c))return hce;if(bce(r,t)===JAe)return hce;if(yce(23,JAe,r,t))return hce;if(yce([qAe,YAe],jAe,r,t))return hce;if(yce(12,12,r,t))return hce;if(l===OAe)return dce;if(23===l||23===c)return hce;if(16===c||16===l)return dce;if(-1!==[GAe,KAe,jAe].indexOf(c)||14===l)return hce;if(36===A&&-1!==Bce.indexOf(l))return hce;if(l===ece&&36===c)return hce;if(c===WAe)return hce;if(-1!==pce.indexOf(c)&&l===XAe||-1!==pce.indexOf(l)&&c===XAe)return hce;if(l===ZAe&&-1!==[ace,ice,nce].indexOf(c)||-1!==[ace,ice,nce].indexOf(l)&&c===$Ae)return hce;if(-1!==pce.indexOf(l)&&-1!==Cce.indexOf(c)||-1!==Cce.indexOf(l)&&-1!==pce.indexOf(c))return hce;if(
// (PR | PO) × ( OP | HY )? NU
-1!==[ZAe,$Ae].indexOf(l)&&(c===XAe||-1!==[JAe,KAe].indexOf(c)&&t[o+1]===XAe)||// ( OP | HY ) × NU
-1!==[JAe,KAe].indexOf(l)&&c===XAe||// NU ×	(NU | SY | IS)
l===XAe&&-1!==[XAe,ece,zAe].indexOf(c))return hce;if(-1!==[XAe,ece,zAe,qAe,YAe].indexOf(c))for(var u=r;u>=0;){if((h=t[u])===XAe)return hce;if(-1===[ece,zAe].indexOf(h))break;u--}if(-1!==[ZAe,$Ae].indexOf(c))for(u=-1!==[qAe,YAe].indexOf(l)?a:r;u>=0;){var h;if((h=t[u])===XAe)return hce;if(-1===[ece,zAe].indexOf(h))break;u--}if(oce===l&&-1!==[oce,lce,sce,rce].indexOf(c)||-1!==[lce,sce].indexOf(l)&&-1!==[lce,Ace].indexOf(c)||-1!==[Ace,rce].indexOf(l)&&c===Ace)return hce;if(-1!==vce.indexOf(l)&&-1!==[WAe,$Ae].indexOf(c)||-1!==vce.indexOf(c)&&l===ZAe)return hce;if(-1!==pce.indexOf(l)&&-1!==pce.indexOf(c))return hce;if(l===zAe&&-1!==pce.indexOf(c))return hce;if(-1!==pce.concat(XAe).indexOf(l)&&c===JAe&&-1===uce.indexOf(e[o])||-1!==pce.concat(XAe).indexOf(c)&&l===YAe)return hce;if(41===l&&41===c){for(var d=i[r],g=1;d>0&&41===t[--d];)g++;if(g%2!=0)return hce}return l===ice&&c===nce?hce:dce},wce=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var i=function(e,t){void 0===t&&(t="strict");var i=[],n=[],s=[];return e.forEach((function(e,r){var a=gce.get(e);if(a>50?(s.push(!0),a-=50):s.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return n.push(r),i.push(16);if(4===a||11===a){if(0===r)return n.push(r),i.push(tce);var o=i[r-1];return-1===Ice.indexOf(o)?(n.push(n[r-1]),i.push(o)):(n.push(r),i.push(tce))}return n.push(r),31===a?i.push("strict"===t?jAe:ace):a===cce||29===a?i.push(tce):43===a?e>=131072&&e<=196605||e>=196608&&e<=262141?i.push(ace):i.push(tce):void i.push(a)})),[n,i,s]}(e,t.lineBreak),n=i[0],s=i[1],r=i[2];return"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(s=s.map((function(e){return-1!==[XAe,tce,cce].indexOf(e)?ace:e}))),[n,s,"keep-all"===t.wordBreak?r.map((function(t,i){return t&&e[i]>=19968&&e[i]<=40959})):void 0]},Qce=
/** @class */function(){function e(e,t,i,n){this.codePoints=e,this.required="!"===t,this.start=i,this.end=n}return e.prototype.slice=function(){return BAe.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),_ce=45,Sce=43,xce=-1,kce=function(e){return e>=48&&e<=57},Dce=function(e){return kce(e)||e>=65&&e<=70||e>=97&&e<=102},Fce=function(e){return 10===e||9===e||32===e},Tce=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},Mce=function(e){return Tce(e)||kce(e)||e===_ce},Rce=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},Nce=function(e,t){return 92===e&&10!==t},Lce=function(e,t,i){return e===_ce?Tce(t)||Nce(t,i):!!Tce(e)||!(92!==e||!Nce(e,t))},Uce=function(e,t,i){return e===Sce||e===_ce?!!kce(t)||46===t&&kce(i):kce(46===e?t:e)},Hce=function(e){var t=0,i=1;e[t]!==Sce&&e[t]!==_ce||(e[t]===_ce&&(i=-1),t++);for(var n=[];kce(e[t]);)n.push(e[t++]);var s=n.length?parseInt(BAe.apply(void 0,n),10):0;46===e[t]&&t++;for(var r=[];kce(e[t]);)r.push(e[t++]);var a=r.length,o=a?parseInt(BAe.apply(void 0,r),10):0;69!==e[t]&&101!==e[t]||t++;var l=1;e[t]!==Sce&&e[t]!==_ce||(e[t]===_ce&&(l=-1),t++);for(var A=[];kce(e[t]);)A.push(e[t++]);var c=A.length?parseInt(BAe.apply(void 0,A),10):0;return i*(s+o*Math.pow(10,-a))*Math.pow(10,l*c)},Pce={type:2
/* LEFT_PARENTHESIS_TOKEN */},Oce={type:3
/* RIGHT_PARENTHESIS_TOKEN */},Gce={type:4
/* COMMA_TOKEN */},Kce={type:13
/* SUFFIX_MATCH_TOKEN */},qce={type:8
/* PREFIX_MATCH_TOKEN */},Yce={type:21
/* COLUMN_TOKEN */},Vce={type:9
/* DASH_MATCH_TOKEN */},Wce={type:10
/* INCLUDE_MATCH_TOKEN */},jce={type:11
/* LEFT_CURLY_BRACKET_TOKEN */},Jce={type:12
/* RIGHT_CURLY_BRACKET_TOKEN */},zce={type:14
/* SUBSTRING_MATCH_TOKEN */},Xce={type:23
/* BAD_URL_TOKEN */},$ce={type:1
/* BAD_STRING_TOKEN */},Zce={type:25
/* CDO_TOKEN */},eue={type:24
/* CDC_TOKEN */},tue={type:26
/* COLON_TOKEN */},iue={type:27
/* SEMICOLON_TOKEN */},nue={type:28
/* LEFT_SQUARE_BRACKET_TOKEN */},sue={type:29
/* RIGHT_SQUARE_BRACKET_TOKEN */},rue={type:31
/* WHITESPACE_TOKEN */},aue={type:32
/* EOF_TOKEN */},oue=
/** @class */function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(vAe(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==aue;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),i=this.peekCodePoint(1),n=this.peekCodePoint(2);if(Mce(t)||Nce(i,n)){var s=Lce(t,i,n)?2:1;return{type:5,value:this.consumeName(),flags:s}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Kce;break;case 39:return this.consumeStringToken(39);case 40:return Pce;case 41:return Oce;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),zce;break;case Sce:if(Uce(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return Gce;case _ce:var r=e,a=this.peekCodePoint(0),o=this.peekCodePoint(1);if(Uce(r,a,o))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(Lce(r,a,o))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(a===_ce&&62===o)return this.consumeCodePoint(),this.consumeCodePoint(),eue;break;case 46:if(Uce(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(42===l&&47===(l=this.consumeCodePoint()))return this.consumeToken();if(l===xce)return this.consumeToken()}break;case 58:return tue;case 59:return iue;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===_ce&&this.peekCodePoint(2)===_ce)return this.consumeCodePoint(),this.consumeCodePoint(),Zce;break;case 64:var A=this.peekCodePoint(0),c=this.peekCodePoint(1),u=this.peekCodePoint(2);if(Lce(A,c,u))return{type:7,value:this.consumeName()};break;case 91:return nue;case 92:if(Nce(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return sue;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),qce;break;case 123:return jce;case 125:return Jce;case 117:case 85:var h=this.peekCodePoint(0),d=this.peekCodePoint(1);return h!==Sce||!Dce(d)&&63!==d||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Vce;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),Yce;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Wce;break;case xce:return aue}return Fce(e)?(this.consumeWhiteSpace(),rue):kce(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):Tce(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:BAe(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();Dce(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var i=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),i=!0;if(i)return{type:30,start:parseInt(BAe.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),end:parseInt(BAe.apply(void 0,e.map((function(e){return 63===e?70:e}))),16)};var n=parseInt(BAe.apply(void 0,e),16);if(this.peekCodePoint(0)===_ce&&Dce(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var s=[];Dce(t)&&s.length<6;)s.push(t),t=this.consumeCodePoint();return{type:30,start:n,end:parseInt(BAe.apply(void 0,s),16)}}return{type:30,start:n,end:n}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===xce)return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var i=this.consumeStringToken(this.consumeCodePoint());return 0===i.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===xce||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:i.value}):(this.consumeBadUrlRemnants(),Xce)}for(;;){var n=this.consumeCodePoint();if(n===xce||41===n)return{type:22,value:BAe.apply(void 0,e)};if(Fce(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===xce||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:BAe.apply(void 0,e)}):(this.consumeBadUrlRemnants(),Xce);if(34===n||39===n||40===n||Rce(n))return this.consumeBadUrlRemnants(),Xce;if(92===n){if(!Nce(n,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),Xce;e.push(this.consumeEscapedCodePoint())}else e.push(n)}},e.prototype.consumeWhiteSpace=function(){for(;Fce(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||e===xce)return;Nce(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var i=Math.min(5e4,e);t+=BAe.apply(void 0,this._value.splice(0,i)),e-=i}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",i=0;;){var n=this._value[i];if(n===xce||void 0===n||n===e)return{type:0,value:t+=this.consumeStringSlice(i)};if(10===n)return this._value.splice(0,i),$ce;if(92===n){var s=this._value[i+1];s!==xce&&void 0!==s&&(10===s?(t+=this.consumeStringSlice(i),i=-1,this._value.shift()):Nce(n,s)&&(t+=this.consumeStringSlice(i),t+=BAe(this.consumeEscapedCodePoint()),i=-1))}i++}},e.prototype.consumeNumber=function(){var e=[],t=4,i=this.peekCodePoint(0);for(i!==Sce&&i!==_ce||e.push(this.consumeCodePoint());kce(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(46===i&&kce(n))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;kce(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0),n=this.peekCodePoint(1);var s=this.peekCodePoint(2);if((69===i||101===i)&&((n===Sce||n===_ce)&&kce(s)||kce(n)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;kce(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Hce(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],i=e[1],n=this.peekCodePoint(0),s=this.peekCodePoint(1),r=this.peekCodePoint(2);return Lce(n,s,r)?{type:15,number:t,flags:i,unit:this.consumeName()}:37===n?(this.consumeCodePoint(),{type:16,number:t,flags:i}):{type:17,number:t,flags:i}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Dce(e)){for(var t=BAe(e);Dce(this.peekCodePoint(0))&&t.length<6;)t+=BAe(this.consumeCodePoint());Fce(this.peekCodePoint(0))&&this.consumeCodePoint();var i=parseInt(t,16);return 0===i||function(e){return e>=55296&&e<=57343}(i)||i>1114111?65533:i}return e===xce?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(Mce(t))e+=BAe(t);else{if(!Nce(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=BAe(this.consumeEscapedCodePoint())}}},e}(),lue=
/** @class */function(){function e(e){this._tokens=e}return e.create=function(t){var i=new oue;return i.write(t),new e(i.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},i=this.consumeToken();;){if(32===i.type||mue(i,e))return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue()),i=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18
/* FUNCTION */};;){var i=this.consumeToken();if(32===i.type||3===i.type)return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?aue:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),Aue=function(e){return 15===e.type},cue=function(e){return 17===e.type},uue=function(e){return 20===e.type},hue=function(e){return 0===e.type},due=function(e,t){return uue(e)&&e.value===t},gue=function(e){return 31!==e.type},pue=function(e){return 31!==e.type&&4!==e.type},fue=function(e){var t=[],i=[];return e.forEach((function(e){if(4===e.type){if(0===i.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(i),void(i=[])}31!==e.type&&i.push(e)})),i.length&&t.push(i),t},mue=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},Cue=function(e){return 17===e.type||15===e.type},Iue=function(e){return 16===e.type||Cue(e)},vue=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},Bue={type:17,number:0,flags:4},yue={type:16,number:50,flags:4},bue={type:16,number:100,flags:4},Eue=function(e,t,i){var n=e[0],s=e[1];return[wue(n,t),wue(void 0!==s?s:n,i)]},wue=function(e,t){if(16===e.type)return e.number/100*t;if(Aue(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},Que="grad",_ue="turn",Sue=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case Que:return Math.PI/200*t.number;case"rad":return t.number;case _ue:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},xue=function(e){return 15===e.type&&("deg"===e.unit||e.unit===Que||"rad"===e.unit||e.unit===_ue)},kue=function(e){switch(e.filter(uue).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Bue,Bue];case"to top":case"bottom":return Due(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Bue,bue];case"to right":case"left":return Due(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[bue,bue];case"to bottom":case"top":return Due(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[bue,Bue];case"to left":case"right":return Due(270)}return 0},Due=function(e){return Math.PI*e/180},Fue=function(e,t){if(18===t.type){var i=Pue[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return i(e,t.values)}if(5===t.type){if(3===t.value.length){var n=t.value.substring(0,1),s=t.value.substring(1,2),r=t.value.substring(2,3);return Rue(parseInt(n+n,16),parseInt(s+s,16),parseInt(r+r,16),1)}if(4===t.value.length){n=t.value.substring(0,1),s=t.value.substring(1,2),r=t.value.substring(2,3);var a=t.value.substring(3,4);return Rue(parseInt(n+n,16),parseInt(s+s,16),parseInt(r+r,16),parseInt(a+a,16)/255)}if(6===t.value.length){n=t.value.substring(0,2),s=t.value.substring(2,4),r=t.value.substring(4,6);return Rue(parseInt(n,16),parseInt(s,16),parseInt(r,16),1)}if(8===t.value.length){n=t.value.substring(0,2),s=t.value.substring(2,4),r=t.value.substring(4,6),a=t.value.substring(6,8);return Rue(parseInt(n,16),parseInt(s,16),parseInt(r,16),parseInt(a,16)/255)}}if(20===t.type){var o=Gue[t.value.toUpperCase()];if(void 0!==o)return o}return Gue.TRANSPARENT},Tue=function(e){return!(255&e)},Mue=function(e){var t=255&e,i=255&e>>8,n=255&e>>16,s=255&e>>24;return t<255?"rgba("+s+","+n+","+i+","+t/255+")":"rgb("+s+","+n+","+i+")"},Rue=function(e,t,i,n){return(e<<24|t<<16|i<<8|Math.round(255*n))>>>0},Nue=function(e,t){if(17===e.type)return e.number;if(16===e.type){var i=3===t?1:255;return 3===t?e.number/100*i:Math.round(e.number/100*i)}return 0},Lue=function(e,t){var i=t.filter(pue);if(3===i.length){var n=i.map(Nue),s=n[0],r=n[1],a=n[2];return Rue(s,r,a,1)}if(4===i.length){var o=i.map(Nue),l=(s=o[0],r=o[1],a=o[2],o[3]);return Rue(s,r,a,l)}return 0};function Uue(e,t,i){return i<0&&(i+=1),i>=1&&(i-=1),i<1/6?(t-e)*i*6+e:i<.5?t:i<2/3?6*(t-e)*(2/3-i)+e:e}var Hue=function(e,t){var i=t.filter(pue),n=i[0],s=i[1],r=i[2],a=i[3],o=(17===n.type?Due(n.number):Sue(e,n))/(2*Math.PI),l=Iue(s)?s.number/100:0,A=Iue(r)?r.number/100:0,c=void 0!==a&&Iue(a)?wue(a,1):1;if(0===l)return Rue(255*A,255*A,255*A,1);var u=A<=.5?A*(l+1):A+l-A*l,h=2*A-u,d=Uue(h,u,o+1/3),g=Uue(h,u,o),p=Uue(h,u,o-1/3);return Rue(255*d,255*g,255*p,c)},Pue={hsl:Hue,hsla:Hue,rgb:Lue,rgba:Lue},Oue=function(e,t){return Fue(e,lue.create(t).parseComponentValue())},Gue={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Kue={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(uue(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},que={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Yue=function(e,t){var i=Fue(e,t[0]),n=t[1];return n&&Iue(n)?{color:i,stop:n}:{color:i,stop:null}},Vue=function(e,t){var i=e[0],n=e[e.length-1];null===i.stop&&(i.stop=Bue),null===n.stop&&(n.stop=bue);for(var s=[],r=0,a=0;a<e.length;a++){var o=e[a].stop;if(null!==o){var l=wue(o,t);l>r?s.push(l):s.push(r),r=l}else s.push(null)}var A=null;for(a=0;a<s.length;a++){var c=s[a];if(null===c)null===A&&(A=a);else if(null!==A){for(var u=a-A,h=(c-s[A-1])/(u+1),d=1;d<=u;d++)s[A+d-1]=h*d;A=null}}return e.map((function(e,i){return{color:e.color,stop:Math.max(Math.min(1,s[i]/t),0)}}))},Wue=function(e,t,i){var n="number"==typeof e?e:function(e,t,i){var n=t/2,s=i/2,r=wue(e[0],t)-n,a=s-wue(e[1],i);return(Math.atan2(a,r)+2*Math.PI)%(2*Math.PI)}(e,t,i),s=Math.abs(t*Math.sin(n))+Math.abs(i*Math.cos(n)),r=t/2,a=i/2,o=s/2,l=Math.sin(n-Math.PI/2)*o,A=Math.cos(n-Math.PI/2)*o;return[s,r-A,r+A,a-l,a+l]},jue=function(e,t){return Math.sqrt(e*e+t*t)},Jue=function(e,t,i,n,s){return[[0,0],[0,t],[e,0],[e,t]].reduce((function(e,t){var r=t[0],a=t[1],o=jue(i-r,n-a);return(s?o<e.optimumDistance:o>e.optimumDistance)?{optimumCorner:t,optimumDistance:o}:e}),{optimumDistance:s?1/0:-1/0,optimumCorner:null}).optimumCorner},zue=function(e,t){var i=Due(180),n=[];return fue(t).forEach((function(t,s){if(0===s){var r=t[0];if(20===r.type&&-1!==["top","left","right","bottom"].indexOf(r.value))return void(i=kue(t));if(xue(r))return void(i=(Sue(e,r)+Due(270))%Due(360))}var a=Yue(e,t);n.push(a)})),{angle:i,stops:n,type:1
/* LINEAR_GRADIENT */}},Xue="closest-side",$ue="farthest-side",Zue="closest-corner",ehe="farthest-corner",the="circle",ihe="ellipse",nhe="cover",she="contain",rhe=function(e,t){var i=0,n=3,s=[],r=[];return fue(t).forEach((function(t,a){var o=!0;if(0===a?o=t.reduce((function(e,t){if(uue(t))switch(t.value){case"center":return r.push(yue),!1;case"top":case"left":return r.push(Bue),!1;case"right":case"bottom":return r.push(bue),!1}else if(Iue(t)||Cue(t))return r.push(t),!1;return e}),o):1===a&&(o=t.reduce((function(e,t){if(uue(t))switch(t.value){case the:return i=0,!1;case ihe:return i=1,!1;case she:case Xue:return n=0,!1;case $ue:return n=1,!1;case Zue:return n=2,!1;case nhe:case ehe:return n=3,!1}else if(Cue(t)||Iue(t))return Array.isArray(n)||(n=[]),n.push(t),!1;return e}),o)),o){var l=Yue(e,t);s.push(l)}})),{size:n,shape:i,stops:s,position:r,type:2
/* RADIAL_GRADIENT */}},ahe=function(e,t){if(22===t.type){var i={url:t.value,type:0
/* URL */};return e.cache.addImage(t.value),i}if(18===t.type){var n=Ahe[t.name];if(void 0===n)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return n(e,t.values)}throw new Error("Unsupported image type "+t.type)};var ohe,lhe,Ahe={"linear-gradient":function(e,t){var i=Due(180),n=[];return fue(t).forEach((function(t,s){if(0===s){var r=t[0];if(20===r.type&&"to"===r.value)return void(i=kue(t));if(xue(r))return void(i=Sue(e,r))}var a=Yue(e,t);n.push(a)})),{angle:i,stops:n,type:1
/* LINEAR_GRADIENT */}},"-moz-linear-gradient":zue,"-ms-linear-gradient":zue,"-o-linear-gradient":zue,"-webkit-linear-gradient":zue,"radial-gradient":function(e,t){var i=0,n=3,s=[],r=[];return fue(t).forEach((function(t,a){var o=!0;if(0===a){var l=!1;o=t.reduce((function(e,t){if(l)if(uue(t))switch(t.value){case"center":return r.push(yue),e;case"top":case"left":return r.push(Bue),e;case"right":case"bottom":return r.push(bue),e}else(Iue(t)||Cue(t))&&r.push(t);else if(uue(t))switch(t.value){case the:return i=0,!1;case ihe:return i=1,!1;case"at":return l=!0,!1;case Xue:return n=0,!1;case nhe:case $ue:return n=1,!1;case she:case Zue:return n=2,!1;case ehe:return n=3,!1}else if(Cue(t)||Iue(t))return Array.isArray(n)||(n=[]),n.push(t),!1;return e}),o)}if(o){var A=Yue(e,t);s.push(A)}})),{size:n,shape:i,stops:s,position:r,type:2
/* RADIAL_GRADIENT */}},"-moz-radial-gradient":rhe,"-ms-radial-gradient":rhe,"-o-radial-gradient":rhe,"-webkit-radial-gradient":rhe,"-webkit-gradient":function(e,t){var i=Due(180),n=[],s=1;return fue(t).forEach((function(t,i){var r=t[0];if(0===i){if(uue(r)&&"linear"===r.value)return void(s=1);if(uue(r)&&"radial"===r.value)return void(s=2)}if(18===r.type)if("from"===r.name){var a=Fue(e,r.values[0]);n.push({stop:Bue,color:a})}else if("to"===r.name){a=Fue(e,r.values[0]);n.push({stop:bue,color:a})}else if("color-stop"===r.name){var o=r.values.filter(pue);if(2===o.length){a=Fue(e,o[1]);var l=o[0];cue(l)&&n.push({stop:{type:16,number:100*l.number,flags:l.flags},color:a})}}})),1===s?{angle:(i+Due(180))%Due(360),stops:n,type:s}:{size:3,shape:0,stops:n,position:[],type:s}}},che={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var i=t[0];return 20===i.type&&"none"===i.value?[]:t.filter((function(e){return pue(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!Ahe[e.name])}(e)})).map((function(t){return ahe(e,t)}))}},uhe={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(uue(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},hhe={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return fue(t).map((function(e){return e.filter(Iue)})).map(vue)}},dhe={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return fue(t).map((function(e){return e.filter(uue).map((function(e){return e.value})).join(" ")})).map(ghe)}},ghe=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};(lhe=ohe||(ohe={})).AUTO="auto",lhe.CONTAIN="contain",lhe.COVER="cover";var phe,fhe,mhe={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return fue(t).map((function(e){return e.filter(Che)}))}},Che=function(e){return uue(e)||Iue(e)},Ihe=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},vhe=Ihe("top"),Bhe=Ihe("right"),yhe=Ihe("bottom"),bhe=Ihe("left"),Ehe=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return vue(t.filter(Iue))}}},whe=Ehe("top-left"),Qhe=Ehe("top-right"),_he=Ehe("bottom-right"),She=Ehe("bottom-left"),xhe=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},khe=xhe("top"),Dhe=xhe("right"),Fhe=xhe("bottom"),The=xhe("left"),Mhe=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Aue(t)?t.number:0}}},Rhe=Mhe("top"),Nhe=Mhe("right"),Lhe=Mhe("bottom"),Uhe=Mhe("left"),Hhe={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Phe={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},Ohe={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(uue).reduce((function(e,t){return e|Ghe(t.value)}),0
/* NONE */)}},Ghe=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Khe={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},qhe={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};(fhe=phe||(phe={})).NORMAL="normal",fhe.STRICT="strict";var Yhe,Vhe,Whe={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?phe.STRICT:phe.NORMAL}},jhe={name:"line-height",initialValue:"normal",prefix:!1,type:4
/* TOKEN_VALUE */},Jhe=function(e,t){return uue(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:Iue(e)?wue(e,t):t},zhe={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:ahe(e,t)}},Xhe={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},$he={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Zhe=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4
/* TOKEN_VALUE */}},ede=Zhe("top"),tde=Zhe("right"),ide=Zhe("bottom"),nde=Zhe("left"),sde={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(uue).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},rde={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},ade=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},ode=ade("top"),lde=ade("right"),Ade=ade("bottom"),cde=ade("left"),ude={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},hde={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},dde={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&due(t[0],"none")?[]:fue(t).map((function(t){for(var i={color:Gue.TRANSPARENT,offsetX:Bue,offsetY:Bue,blur:Bue},n=0,s=0;s<t.length;s++){var r=t[s];Cue(r)?(0===n?i.offsetX=r:1===n?i.offsetY=r:i.blur=r,n++):i.color=Fue(e,r)}return i}))}},gde={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},pde={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var i=fde[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return i(t.values)}return null}},fde={matrix:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number}));return 6===t.length?t:null},matrix3d:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number})),i=t[0],n=t[1];t[2],t[3];var s=t[4],r=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var a=t[12],o=t[13];return t[14],t[15],16===t.length?[i,n,s,r,a,o]:null}},mde={type:16,number:50,flags:4},Cde=[mde,mde],Ide={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var i=t.filter(Iue);return 2!==i.length?Cde:[i[0],i[1]]}},vde={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}};(Vhe=Yhe||(Yhe={})).NORMAL="normal",Vhe.BREAK_ALL="break-all",Vhe.KEEP_ALL="keep-all";for(var Bde={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return Yhe.BREAK_ALL;case"keep-all":return Yhe.KEEP_ALL;default:return Yhe.NORMAL}}},yde={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(cue(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},bde=function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")},Ede={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return cue(t)?t.number:1}},wde={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Qde={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(uue).map((function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(e){return 0!==e}))}},_de={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var i=[],n=[];return t.forEach((function(e){switch(e.type){case 20:case 0:i.push(e.value);break;case 17:i.push(e.number.toString());break;case 4:n.push(i.join(" ")),i.length=0}})),i.length&&n.push(i.join(" ")),n.map((function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"}))}},Sde={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},xde={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return cue(t)?t.number:uue(t)&&"bold"===t.value?700:400}},kde={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(uue).map((function(e){return e.value}))}},Dde={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},Fde=function(e,t){return!!(e&t)},Tde={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var i=t[0];return 20===i.type&&"none"===i.value?[]:t}},Mde={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var i=t[0];if(20===i.type&&"none"===i.value)return null;for(var n=[],s=t.filter(gue),r=0;r<s.length;r++){var a=s[r],o=s[r+1];if(20===a.type){var l=o&&cue(o)?o.number:1;n.push({counter:a.value,increment:l})}}return n}},Rde={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var i=[],n=t.filter(gue),s=0;s<n.length;s++){var r=n[s],a=n[s+1];if(uue(r)&&"none"!==r.value){var o=a&&cue(a)?a.number:0;i.push({counter:r.value,reset:o})}}return i}},Nde={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(Aue).map((function(t){return bde(e,t)}))}},Lde={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var i=t[0];if(20===i.type&&"none"===i.value)return null;var n=[],s=t.filter(hue);if(s.length%2!=0)return null;for(var r=0;r<s.length;r+=2){var a=s[r].value,o=s[r+1].value;n.push({open:a,close:o})}return n}},Ude=function(e,t,i){if(!e)return"";var n=e[Math.min(t,e.length-1)];return n?i?n.open:n.close:""},Hde={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&due(t[0],"none")?[]:fue(t).map((function(t){for(var i={color:255,offsetX:Bue,offsetY:Bue,blur:Bue,spread:Bue,inset:!1},n=0,s=0;s<t.length;s++){var r=t[s];due(r,"inset")?i.inset=!0:Cue(r)?(0===n?i.offsetX=r:1===n?i.offsetY=r:2===n?i.blur=r:i.spread=r,n++):i.color=Fue(e,r)}return i}))}},Pde={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var i=[];return t.filter(uue).forEach((function(e){switch(e.value){case"stroke":i.push(1
/* STROKE */);break;case"fill":i.push(0
/* FILL */);break;case"markers":i.push(2
/* MARKERS */)}})),[0,1,2
/* MARKERS */].forEach((function(e){-1===i.indexOf(e)&&i.push(e)})),i}},Ode={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Gde={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Aue(t)?t.number:0}},Kde=
/** @class */function(){function e(e,t){var i,n;this.animationDuration=Vde(e,Nde,t.animationDuration),this.backgroundClip=Vde(e,Kue,t.backgroundClip),this.backgroundColor=Vde(e,que,t.backgroundColor),this.backgroundImage=Vde(e,che,t.backgroundImage),this.backgroundOrigin=Vde(e,uhe,t.backgroundOrigin),this.backgroundPosition=Vde(e,hhe,t.backgroundPosition),this.backgroundRepeat=Vde(e,dhe,t.backgroundRepeat),this.backgroundSize=Vde(e,mhe,t.backgroundSize),this.borderTopColor=Vde(e,vhe,t.borderTopColor),this.borderRightColor=Vde(e,Bhe,t.borderRightColor),this.borderBottomColor=Vde(e,yhe,t.borderBottomColor),this.borderLeftColor=Vde(e,bhe,t.borderLeftColor),this.borderTopLeftRadius=Vde(e,whe,t.borderTopLeftRadius),this.borderTopRightRadius=Vde(e,Qhe,t.borderTopRightRadius),this.borderBottomRightRadius=Vde(e,_he,t.borderBottomRightRadius),this.borderBottomLeftRadius=Vde(e,She,t.borderBottomLeftRadius),this.borderTopStyle=Vde(e,khe,t.borderTopStyle),this.borderRightStyle=Vde(e,Dhe,t.borderRightStyle),this.borderBottomStyle=Vde(e,Fhe,t.borderBottomStyle),this.borderLeftStyle=Vde(e,The,t.borderLeftStyle),this.borderTopWidth=Vde(e,Rhe,t.borderTopWidth),this.borderRightWidth=Vde(e,Nhe,t.borderRightWidth),this.borderBottomWidth=Vde(e,Lhe,t.borderBottomWidth),this.borderLeftWidth=Vde(e,Uhe,t.borderLeftWidth),this.boxShadow=Vde(e,Hde,t.boxShadow),this.color=Vde(e,Hhe,t.color),this.direction=Vde(e,Phe,t.direction),this.display=Vde(e,Ohe,t.display),this.float=Vde(e,Khe,t.cssFloat),this.fontFamily=Vde(e,_de,t.fontFamily),this.fontSize=Vde(e,Sde,t.fontSize),this.fontStyle=Vde(e,Dde,t.fontStyle),this.fontVariant=Vde(e,kde,t.fontVariant),this.fontWeight=Vde(e,xde,t.fontWeight),this.letterSpacing=Vde(e,qhe,t.letterSpacing),this.lineBreak=Vde(e,Whe,t.lineBreak),this.lineHeight=Vde(e,jhe,t.lineHeight),this.listStyleImage=Vde(e,zhe,t.listStyleImage),this.listStylePosition=Vde(e,Xhe,t.listStylePosition),this.listStyleType=Vde(e,$he,t.listStyleType),this.marginTop=Vde(e,ede,t.marginTop),this.marginRight=Vde(e,tde,t.marginRight),this.marginBottom=Vde(e,ide,t.marginBottom),this.marginLeft=Vde(e,nde,t.marginLeft),this.opacity=Vde(e,Ede,t.opacity);var s=Vde(e,sde,t.overflow);this.overflowX=s[0],this.overflowY=s[s.length>1?1:0],this.overflowWrap=Vde(e,rde,t.overflowWrap),this.paddingTop=Vde(e,ode,t.paddingTop),this.paddingRight=Vde(e,lde,t.paddingRight),this.paddingBottom=Vde(e,Ade,t.paddingBottom),this.paddingLeft=Vde(e,cde,t.paddingLeft),this.paintOrder=Vde(e,Pde,t.paintOrder),this.position=Vde(e,hde,t.position),this.textAlign=Vde(e,ude,t.textAlign),this.textDecorationColor=Vde(e,wde,null!==(i=t.textDecorationColor)&&void 0!==i?i:t.color),this.textDecorationLine=Vde(e,Qde,null!==(n=t.textDecorationLine)&&void 0!==n?n:t.textDecoration),this.textShadow=Vde(e,dde,t.textShadow),this.textTransform=Vde(e,gde,t.textTransform),this.transform=Vde(e,pde,t.transform),this.transformOrigin=Vde(e,Ide,t.transformOrigin),this.visibility=Vde(e,vde,t.visibility),this.webkitTextStrokeColor=Vde(e,Ode,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=Vde(e,Gde,t.webkitTextStrokeWidth),this.wordBreak=Vde(e,Bde,t.wordBreak),this.zIndex=Vde(e,yde,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return Tue(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return Fde(this.display,4
/* INLINE */)||Fde(this.display,33554432
/* INLINE_BLOCK */)||Fde(this.display,268435456
/* INLINE_FLEX */)||Fde(this.display,536870912
/* INLINE_GRID */)||Fde(this.display,67108864
/* INLINE_LIST_ITEM */)||Fde(this.display,134217728
/* INLINE_TABLE */)},e}(),qde=
/** @class */
function(){return function(e,t){this.content=Vde(e,Tde,t.content),this.quotes=Vde(e,Lde,t.quotes)}}(),Yde=
/** @class */
function(){return function(e,t){this.counterIncrement=Vde(e,Mde,t.counterIncrement),this.counterReset=Vde(e,Rde,t.counterReset)}}(),Vde=function(e,t,i){var n=new oue,s=null!=i?i.toString():t.initialValue;n.write(s);var r=new lue(n.read());switch(t.type){case 2:var a=r.parseComponentValue();return t.parse(e,uue(a)?a.value:t.initialValue);case 0:return t.parse(e,r.parseComponentValue());case 1:return t.parse(e,r.parseComponentValues());case 4:return r.parseComponentValue();case 3:switch(t.format){case"angle":return Sue(e,r.parseComponentValue());case"color":return Fue(e,r.parseComponentValue());case"image":return ahe(e,r.parseComponentValue());case"length":var o=r.parseComponentValue();return Cue(o)?o:Bue;case"length-percentage":var l=r.parseComponentValue();return Iue(l)?l:Bue;case"time":return bde(e,r.parseComponentValue())}}},Wde=function(e,t){var i=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===i||t===i},jde=
/** @class */
function(){return function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Wde(t,3
/* PARSE */),this.styles=new Kde(e,window.getComputedStyle(t,null)),Zge(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=IAe(this.context,t),Wde(t,4
/* RENDER */)&&(this.flags|=16)}}(),Jde="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zde="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Xde=0;Xde<64;Xde++)zde[Jde.charCodeAt(Xde)]=Xde;for(var $de=function(e,t,i){return e.slice?e.slice(t,i):new Uint16Array(Array.prototype.slice.call(e,t,i))},Zde=
/** @class */function(){function e(e,t,i,n,s,r){this.initialValue=e,this.errorValue=t,this.highStart=i,this.highValueIndex=n,this.index=s,this.data=r}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),ege="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tge="undefined"==typeof Uint8Array?[]:new Uint8Array(256),ige=0;ige<64;ige++)tge[ege.charCodeAt(ige)]=ige;var nge,sge,rge=8,age=9,oge=11,lge=12,Age=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var i=e.length;if(!i)return"";for(var n=[],s=-1,r="";++s<i;){var a=e[s];a<=65535?n.push(a):(a-=65536,n.push(55296+(a>>10),a%1024+56320)),(s+1===i||n.length>16384)&&(r+=String.fromCharCode.apply(String,n),n.length=0)}return r},cge=function(e){var t=function(e){var t,i,n,s,r,a=.75*e.length,o=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var A="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(a):new Array(a),c=Array.isArray(A)?A:new Uint8Array(A);for(t=0;t<o;t+=4)i=zde[e.charCodeAt(t)],n=zde[e.charCodeAt(t+1)],s=zde[e.charCodeAt(t+2)],r=zde[e.charCodeAt(t+3)],c[l++]=i<<2|n>>4,c[l++]=(15&n)<<4|s>>2,c[l++]=(3&s)<<6|63&r;return A}(e),i=Array.isArray(t)?function(e){for(var t=e.length,i=[],n=0;n<t;n+=4)i.push(e[n+3]<<24|e[n+2]<<16|e[n+1]<<8|e[n]);return i}(t):new Uint32Array(t),n=Array.isArray(t)?function(e){for(var t=e.length,i=[],n=0;n<t;n+=2)i.push(e[n+1]<<8|e[n]);return i}(t):new Uint16Array(t),s=$de(n,12,i[4]/2),r=2===i[5]?$de(n,(24+i[4])/2):function(e,t,i){return e.slice?e.slice(t,i):new Uint32Array(Array.prototype.slice.call(e,t,i))}(i,Math.ceil((24+i[4])/4));return new Zde(i[0],i[1],i[2],i[3],s,r)}(" "),uge="×",hge=function(e){return cge.get(e)},dge=function(e,t,i){var n=i-2,s=t[n],r=t[i-1],a=t[i];if(2===r&&3===a)return uge;if(2===r||3===r||4===r)return"÷";if(2===a||3===a||4===a)return"÷";if(r===rge&&-1!==[rge,age,oge,lge].indexOf(a))return uge;if(!(r!==oge&&r!==age||a!==age&&10!==a))return uge;if((r===lge||10===r)&&10===a)return uge;if(13===a||5===a)return uge;if(7===a)return uge;if(1===r)return uge;if(13===r&&14===a){for(;5===s;)s=t[--n];if(14===s)return uge}if(15===r&&15===a){for(var o=0;15===s;)o++,s=t[--n];if(o%2==0)return uge}return"÷"},gge=function(e){var t=function(e){for(var t=[],i=0,n=e.length;i<n;){var s=e.charCodeAt(i++);if(s>=55296&&s<=56319&&i<n){var r=e.charCodeAt(i++);56320==(64512&r)?t.push(((1023&s)<<10)+(1023&r)+65536):(t.push(s),i--)}else t.push(s)}return t}(e),i=t.length,n=0,s=0,r=t.map(hge);return{next:function(){if(n>=i)return{done:!0,value:null};for(var e=uge;n<i&&(e=dge(0,r,++n))===uge;);if(e!==uge||n===i){var a=Age.apply(null,t.slice(s,n));return s=n,{value:a,done:!1}}return{done:!0,value:null}}}},pge=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},fge=function(e,t,i,n,s){var r="http://www.w3.org/2000/svg",a=document.createElementNS(r,"svg"),o=document.createElementNS(r,"foreignObject");return a.setAttributeNS(null,"width",e.toString()),a.setAttributeNS(null,"height",t.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",i.toString()),o.setAttributeNS(null,"y",n.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),a.appendChild(o),o.appendChild(s),a},mge=function(e){return new Promise((function(t,i){var n=new Image;n.onload=function(){return t(n)},n.onerror=i,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},Cge={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var i=e.createElement("boundtest");i.style.height="123px",i.style.display="block",e.body.appendChild(i),t.selectNode(i);var n=t.getBoundingClientRect(),s=Math.round(n.height);if(e.body.removeChild(i),123===s)return!0}}return!1}(document);return Object.defineProperty(Cge,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Cge.SUPPORT_RANGE_BOUNDS&&function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var i=e.createRange();t.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"";var n=t.firstChild,s=vAe(n.data).map((function(e){return BAe(e)})),r=0,a={},o=s.every((function(e,t){i.setStart(n,r),i.setEnd(n,r+e.length);var s=i.getBoundingClientRect();r+=e.length;var o=s.x>a.x||s.y>a.y;return a=s,0===t||o}));return e.body.removeChild(t),o}(document);return Object.defineProperty(Cge,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,i=e.createElement("canvas"),n=i.getContext("2d");if(!n)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(t,0,0),i.toDataURL()}catch(I2){return!1}return!0}(document);return Object.defineProperty(Cge,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),i=100;t.width=i,t.height=i;var n=t.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,i,i);var s=new Image,r=t.toDataURL();s.src=r;var a=fge(i,i,0,0,s);return n.fillStyle="red",n.fillRect(0,0,i,i),mge(a).then((function(t){n.drawImage(t,0,0);var s=n.getImageData(0,0,i,i).data;n.fillStyle="red",n.fillRect(0,0,i,i);var a=e.createElement("div");return a.style.backgroundImage="url("+r+")",a.style.height=i+"px",pge(s)?mge(fge(i,i,0,0,a)):Promise.reject(!1)})).then((function(e){return n.drawImage(e,0,0),pge(n.getImageData(0,0,i,i).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(Cge,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(Cge,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Cge,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Cge,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Cge,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},Ige=
/** @class */
function(){return function(e,t){this.text=e,this.bounds=t}}(),vge=function(e,t){var i=t.ownerDocument;if(i){var n=i.createElement("html2canvaswrapper");n.appendChild(t.cloneNode(!0));var s=t.parentNode;if(s){s.replaceChild(n,t);var r=IAe(e,n);return n.firstChild&&s.replaceChild(n.firstChild,n),r}}return CAe.EMPTY},Bge=function(e,t,i){var n=e.ownerDocument;if(!n)throw new Error("Node has no owner document");var s=n.createRange();return s.setStart(e,t),s.setEnd(e,t+i),s},yge=function(e){if(Cge.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return function(e){for(var t,i=gge(e),n=[];!(t=i.next()).done;)t.value&&n.push(t.value.slice());return n}(e)},bge=function(e,t){return 0!==t.letterSpacing?yge(e):function(e,t){if(Cge.SUPPORT_NATIVE_TEXT_SEGMENTATION){var i=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(i.segment(e)).map((function(e){return e.segment}))}return wge(e,t)}(e,t)},Ege=[32,160,4961,65792,65793,4153,4241],wge=function(e,t){for(var i,n=function(e,t){var i=vAe(e),n=wce(i,t),s=n[0],r=n[1],a=n[2],o=i.length,l=0,A=0;return{next:function(){if(A>=o)return{done:!0,value:null};for(var e=hce;A<o&&(e=Ece(i,r,s,++A,a))===hce;);if(e!==hce||A===o){var t=new Qce(i,e,l,A);return l=A,{value:t,done:!1}}return{done:!0,value:null}}}}(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),s=[],r=function(){if(i.value){var e=i.value.slice(),t=vAe(e),n="";t.forEach((function(e){-1===Ege.indexOf(e)?n+=BAe(e):(n.length&&s.push(n),s.push(BAe(e)),n="")})),n.length&&s.push(n)}};!(i=n.next()).done;)r();return s},Qge=
/** @class */
function(){return function(e,t,i){this.text=_ge(t.data,i.textTransform),this.textBounds=function(e,t,i,n){var s=bge(t,i),r=[],a=0;return s.forEach((function(t){if(i.textDecorationLine.length||t.trim().length>0)if(Cge.SUPPORT_RANGE_BOUNDS){var s=Bge(n,a,t.length).getClientRects();if(s.length>1){var o=yge(t),l=0;o.forEach((function(t){r.push(new Ige(t,CAe.fromDOMRectList(e,Bge(n,l+a,t.length).getClientRects()))),l+=t.length}))}else r.push(new Ige(t,CAe.fromDOMRectList(e,s)))}else{var A=n.splitText(t.length);r.push(new Ige(t,vge(e,n))),n=A}else Cge.SUPPORT_RANGE_BOUNDS||(n=n.splitText(t.length));a+=t.length})),r}(e,this.text,i,t)}}(),_ge=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Sge,xge);case 2:return e.toUpperCase();default:return e}},Sge=/(^|\s|:|-|\(|\))([a-z])/g,xge=function(e,t,i){return e.length>0?t+i.toUpperCase():e},kge=
/** @class */function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.src=i.currentSrc||i.src,n.intrinsicWidth=i.naturalWidth,n.intrinsicHeight=i.naturalHeight,n.context.cache.addImage(n.src),n}return dAe(t,e),t}(jde),Dge=
/** @class */function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.canvas=i,n.intrinsicWidth=i.width,n.intrinsicHeight=i.height,n}return dAe(t,e),t}(jde),Fge=
/** @class */function(e){function t(t,i){var n=e.call(this,t,i)||this,s=new XMLSerializer,r=IAe(t,i);return i.setAttribute("width",r.width+"px"),i.setAttribute("height",r.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(s.serializeToString(i)),n.intrinsicWidth=i.width.baseVal.value,n.intrinsicHeight=i.height.baseVal.value,n.context.cache.addImage(n.svg),n}return dAe(t,e),t}(jde),Tge=
/** @class */function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.value=i.value,n}return dAe(t,e),t}(jde),Mge=
/** @class */function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.start=i.start,n.reversed="boolean"==typeof i.reversed&&!0===i.reversed,n}return dAe(t,e),t}(jde),Rge=[{type:15,flags:0,unit:"px",number:3}],Nge=[{type:16,flags:0,number:50}],Lge="checkbox",Uge="radio",Hge="password",Pge=707406591,Oge=
/** @class */function(e){function t(t,i){var n,s,r,a=e.call(this,t,i)||this;switch(a.type=i.type.toLowerCase(),a.checked=i.checked,a.value=0===(s=(n=i).type===Hge?new Array(n.value.length+1).join("•"):n.value).length?n.placeholder||"":s,a.type!==Lge&&a.type!==Uge||(a.styles.backgroundColor=3739148031,a.styles.borderTopColor=a.styles.borderRightColor=a.styles.borderBottomColor=a.styles.borderLeftColor=2779096575,a.styles.borderTopWidth=a.styles.borderRightWidth=a.styles.borderBottomWidth=a.styles.borderLeftWidth=1,a.styles.borderTopStyle=a.styles.borderRightStyle=a.styles.borderBottomStyle=a.styles.borderLeftStyle=1,a.styles.backgroundClip=[0
/* BORDER_BOX */],a.styles.backgroundOrigin=[0
/* BORDER_BOX */],a.bounds=(r=a.bounds).width>r.height?new CAe(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width<r.height?new CAe(r.left,r.top+(r.height-r.width)/2,r.width,r.width):r),a.type){case Lge:a.styles.borderTopRightRadius=a.styles.borderTopLeftRadius=a.styles.borderBottomRightRadius=a.styles.borderBottomLeftRadius=Rge;break;case Uge:a.styles.borderTopRightRadius=a.styles.borderTopLeftRadius=a.styles.borderBottomRightRadius=a.styles.borderBottomLeftRadius=Nge}return a}return dAe(t,e),t}(jde),Gge=
/** @class */function(e){function t(t,i){var n=e.call(this,t,i)||this,s=i.options[i.selectedIndex||0];return n.value=s&&s.text||"",n}return dAe(t,e),t}(jde),Kge=
/** @class */function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.value=i.value,n}return dAe(t,e),t}(jde),qge=
/** @class */function(e){function t(t,i){var n=e.call(this,t,i)||this;n.src=i.src,n.width=parseInt(i.width,10)||0,n.height=parseInt(i.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(i.contentWindow&&i.contentWindow.document&&i.contentWindow.document.documentElement){n.tree=jge(t,i.contentWindow.document.documentElement);var s=i.contentWindow.document.documentElement?Oue(t,getComputedStyle(i.contentWindow.document.documentElement).backgroundColor):Gue.TRANSPARENT,r=i.contentWindow.document.body?Oue(t,getComputedStyle(i.contentWindow.document.body).backgroundColor):Gue.TRANSPARENT;n.backgroundColor=Tue(s)?Tue(r)?n.styles.backgroundColor:r:s}}catch(I2){}return n}return dAe(t,e),t}(jde),Yge=["OL","UL","MENU"],Vge=function(e,t,i,n){for(var s=t.firstChild,r=void 0;s;s=r)if(r=s.nextSibling,Xge(s)&&s.data.trim().length>0)i.textNodes.push(new Qge(e,s,i.styles));else if($ge(s))if(dpe(s)&&s.assignedNodes)s.assignedNodes().forEach((function(t){return Vge(e,t,i,n)}));else{var a=Wge(e,s);a.styles.isVisible()&&(Jge(s,a,n)?a.flags|=4:zge(a.styles)&&(a.flags|=2),-1!==Yge.indexOf(s.tagName)&&(a.flags|=8),i.elements.push(a),s.slot,s.shadowRoot?Vge(e,s.shadowRoot,a,n):upe(s)||spe(s)||hpe(s)||Vge(e,s,a,n))}},Wge=function(e,t){return lpe(t)?new kge(e,t):ape(t)?new Dge(e,t):spe(t)?new Fge(e,t):tpe(t)?new Tge(e,t):ipe(t)?new Mge(e,t):npe(t)?new Oge(e,t):hpe(t)?new Gge(e,t):upe(t)?new Kge(e,t):Ape(t)?new qge(e,t):new jde(e,t)},jge=function(e,t){var i=Wge(e,t);return i.flags|=4,Vge(e,t,i,i),i},Jge=function(e,t,i){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||rpe(e)&&i.styles.isTransparent()},zge=function(e){return e.isPositioned()||e.isFloating()},Xge=function(e){return e.nodeType===Node.TEXT_NODE},$ge=function(e){return e.nodeType===Node.ELEMENT_NODE},Zge=function(e){return $ge(e)&&void 0!==e.style&&!epe(e)},epe=function(e){return"object"==typeof e.className},tpe=function(e){return"LI"===e.tagName},ipe=function(e){return"OL"===e.tagName},npe=function(e){return"INPUT"===e.tagName},spe=function(e){return"svg"===e.tagName},rpe=function(e){return"BODY"===e.tagName},ape=function(e){return"CANVAS"===e.tagName},ope=function(e){return"VIDEO"===e.tagName},lpe=function(e){return"IMG"===e.tagName},Ape=function(e){return"IFRAME"===e.tagName},cpe=function(e){return"STYLE"===e.tagName},upe=function(e){return"TEXTAREA"===e.tagName},hpe=function(e){return"SELECT"===e.tagName},dpe=function(e){return"SLOT"===e.tagName},gpe=function(e){return e.tagName.indexOf("-")>0},ppe=
/** @class */function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,i=e.counterIncrement,n=e.counterReset,s=!0;null!==i&&i.forEach((function(e){var i=t.counters[e.counter];i&&0!==e.increment&&(s=!1,i.length||i.push(1),i[Math.max(0,i.length-1)]+=e.increment)}));var r=[];return s&&n.forEach((function(e){var i=t.counters[e.counter];r.push(e.counter),i||(i=t.counters[e.counter]=[]),i.push(e.reset)})),r},e}(),fpe={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},mpe={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Cpe={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Ipe={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},vpe=function(e,t,i,n,s,r){return e<t||e>i?xpe(e,s,r.length>0):n.integers.reduce((function(t,i,s){for(;e>=i;)e-=i,t+=n.values[s];return t}),"")+r},Bpe=function(e,t,i,n){var s="";do{i||e--,s=n(e)+s,e/=t}while(e*t>=t);return s},ype=function(e,t,i,n,s){var r=i-t+1;return(e<0?"-":"")+(Bpe(Math.abs(e),r,n,(function(e){return BAe(Math.floor(e%r)+t)}))+s)},bpe=function(e,t,i){void 0===i&&(i=". ");var n=t.length;return Bpe(Math.abs(e),n,!1,(function(e){return t[Math.floor(e%n)]}))+i},Epe=function(e,t,i,n,s,r){if(e<-9999||e>9999)return xpe(e,4,s.length>0);var a=Math.abs(e),o=s;if(0===a)return t[0]+o;for(var l=0;a>0&&l<=4;l++){var A=a%10;0===A&&Fde(r,1)&&""!==o?o=t[A]+o:A>1||1===A&&0===l||1===A&&1===l&&Fde(r,2)||1===A&&1===l&&Fde(r,4)&&e>100||1===A&&l>1&&Fde(r,8)?o=t[A]+(l>0?i[l-1]:"")+o:1===A&&l>0&&(o=i[l-1]+o),a=Math.floor(a/10)}return(e<0?n:"")+o},wpe="十百千萬",Qpe="拾佰仟萬",_pe="マイナス",Spe="마이너스",xpe=function(e,t,i){var n=i?". ":"",s=i?"、":"",r=i?", ":"",a=i?" ":"";switch(t){case 0:return"•"+a;case 1:return"◦"+a;case 2:return"◾"+a;case 5:var o=ype(e,48,57,!0,n);return o.length<4?"0"+o:o;case 4:return bpe(e,"〇一二三四五六七八九",s);case 6:return vpe(e,1,3999,fpe,3,n).toLowerCase();case 7:return vpe(e,1,3999,fpe,3,n);case 8:return ype(e,945,969,!1,n);case 9:return ype(e,97,122,!1,n);case 10:return ype(e,65,90,!1,n);case 11:return ype(e,1632,1641,!0,n);case 12:case 49:return vpe(e,1,9999,mpe,3,n);case 35:return vpe(e,1,9999,mpe,3,n).toLowerCase();case 13:return ype(e,2534,2543,!0,n);case 14:case 30:return ype(e,6112,6121,!0,n);case 15:return bpe(e,"子丑寅卯辰巳午未申酉戌亥",s);case 16:return bpe(e,"甲乙丙丁戊己庚辛壬癸",s);case 17:case 48:return Epe(e,"零一二三四五六七八九",wpe,"負",s,14);case 47:return Epe(e,"零壹貳參肆伍陸柒捌玖",Qpe,"負",s,15);case 42:return Epe(e,"零一二三四五六七八九",wpe,"负",s,14);case 41:return Epe(e,"零壹贰叁肆伍陆柒捌玖",Qpe,"负",s,15);case 26:return Epe(e,"〇一二三四五六七八九","十百千万",_pe,s,0);case 25:return Epe(e,"零壱弐参四伍六七八九","拾百千万",_pe,s,7);case 31:return Epe(e,"영일이삼사오육칠팔구","십백천만",Spe,r,7);case 33:return Epe(e,"零一二三四五六七八九","十百千萬",Spe,r,0);case 32:return Epe(e,"零壹貳參四五六七八九","拾百千",Spe,r,7);case 18:return ype(e,2406,2415,!0,n);case 20:return vpe(e,1,19999,Ipe,3,n);case 21:return ype(e,2790,2799,!0,n);case 22:return ype(e,2662,2671,!0,n);case 22:return vpe(e,1,10999,Cpe,3,n);case 23:return bpe(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return bpe(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return ype(e,3302,3311,!0,n);case 28:return bpe(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",s);case 29:return bpe(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",s);case 34:return ype(e,3792,3801,!0,n);case 37:return ype(e,6160,6169,!0,n);case 38:return ype(e,4160,4169,!0,n);case 39:return ype(e,2918,2927,!0,n);case 40:return ype(e,1776,1785,!0,n);case 43:return ype(e,3046,3055,!0,n);case 44:return ype(e,3174,3183,!0,n);case 45:return ype(e,3664,3673,!0,n);case 46:return ype(e,3872,3881,!0,n);default:return ype(e,48,57,!0,n)}},kpe="data-html2canvas-ignore",Dpe=
/** @class */function(){function e(e,t,i){if(this.context=e,this.options=i,this.scrolledElements=[],this.referenceElement=t,this.counters=new ppe,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var i=this,n=Mpe(e,t);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var s=e.defaultView.pageXOffset,r=e.defaultView.pageYOffset,a=n.contentWindow,o=a.document,l=Lpe(n).then((function(){return pAe(i,0,void 0,(function(){var e,i;return fAe(this,(function(s){switch(s.label){case 0:return this.scrolledElements.forEach(Gpe),a&&(a.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||a.scrollY===t.top&&a.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-t.left,a.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(i=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:o.fonts&&o.fonts.ready?[4,o.fonts.ready]:[3,2];case 1:s.sent(),s.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Npe(o)]:[3,4];case 3:s.sent(),s.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(o,i)})).then((function(){return n}))]:[2,n]}}))}))}));return o.open(),o.write(Ppe(document.doctype)+"<html></html>"),Ope(this.referenceElement.ownerDocument,s,r),o.replaceChild(o.adoptNode(this.documentElement),o.documentElement),o.close(),l},e.prototype.createElementClone=function(e){if(Wde(e,2
/* CLONE */),ape(e))return this.createCanvasClone(e);if(ope(e))return this.createVideoClone(e);if(cpe(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return lpe(t)&&(lpe(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),gpe(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return Hpe(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var i=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),n=e.cloneNode(!1);return n.textContent=i,n}}catch(I2){if(this.context.logger.error("Unable to access cssRules property",I2),"SecurityError"!==I2.name)throw I2}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var i=e.ownerDocument.createElement("img");try{return i.src=e.toDataURL(),i}catch(I2){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var n=e.cloneNode(!1);try{n.width=e.width,n.height=e.height;var s=e.getContext("2d"),r=n.getContext("2d");if(r)if(!this.options.allowTaint&&s)r.putImageData(s.getImageData(0,0,e.width,e.height),0,0);else{var a=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(a){var o=a.getContextAttributes();!1===(null==o?void 0:o.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}r.drawImage(e,0,0)}return n}catch(I2){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return n},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var i=t.getContext("2d");try{return i&&(i.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||i.getImageData(0,0,t.width,t.height)),t}catch(I2){this.context.logger.info("Unable to clone video as it is tainted",e)}var n=e.ownerDocument.createElement("canvas");return n.width=e.offsetWidth,n.height=e.offsetHeight,n},e.prototype.appendChildNode=function(e,t,i){$ge(t)&&("SCRIPT"===t.tagName||t.hasAttribute(kpe)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&$ge(t)&&cpe(t)||e.appendChild(this.cloneNode(t,i))},e.prototype.cloneChildNodes=function(e,t,i){for(var n=this,s=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;s;s=s.nextSibling)if($ge(s)&&dpe(s)&&"function"==typeof s.assignedNodes){var r=s.assignedNodes();r.length&&r.forEach((function(e){return n.appendChildNode(t,e,i)}))}else this.appendChildNode(t,s,i)},e.prototype.cloneNode=function(e,t){if(Xge(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var i=e.ownerDocument.defaultView;if(i&&$ge(e)&&(Zge(e)||epe(e))){var n=this.createElementClone(e);n.style.transitionProperty="none";var s=i.getComputedStyle(e),r=i.getComputedStyle(e,":before"),a=i.getComputedStyle(e,":after");this.referenceElement===e&&Zge(n)&&(this.clonedReferenceElement=n),rpe(n)&&Vpe(n);var o=this.counters.parse(new Yde(this.context,s)),l=this.resolvePseudoContent(e,n,r,nge.BEFORE);gpe(e)&&(t=!0),ope(e)||this.cloneChildNodes(e,n,t),l&&n.insertBefore(l,n.firstChild);var A=this.resolvePseudoContent(e,n,a,nge.AFTER);return A&&n.appendChild(A),this.counters.pop(o),(s&&(this.options.copyStyles||epe(e))&&!Ape(e)||t)&&Hpe(s,n),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([n,e.scrollLeft,e.scrollTop]),(upe(e)||hpe(e))&&(upe(n)||hpe(n))&&(n.value=e.value),n}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,i,n){var s=this;if(i){var r=i.content,a=t.ownerDocument;if(a&&r&&"none"!==r&&"-moz-alt-content"!==r&&"none"!==i.display){this.counters.parse(new Yde(this.context,i));var o=new qde(this.context,i),l=a.createElement("html2canvaspseudoelement");Hpe(i,l),o.content.forEach((function(t){if(0===t.type)l.appendChild(a.createTextNode(t.value));else if(22===t.type){var i=a.createElement("img");i.src=t.value,i.style.opacity="1",l.appendChild(i)}else if(18===t.type){if("attr"===t.name){var n=t.values.filter(uue);n.length&&l.appendChild(a.createTextNode(e.getAttribute(n[0].value)||""))}else if("counter"===t.name){var r=t.values.filter(pue),A=r[0],c=r[1];if(A&&uue(A)){var u=s.counters.getCounterValue(A.value),h=c&&uue(c)?$he.parse(s.context,c.value):3;l.appendChild(a.createTextNode(xpe(u,h,!1)))}}else if("counters"===t.name){var d=t.values.filter(pue),g=(A=d[0],d[1]);c=d[2];if(A&&uue(A)){var p=s.counters.getCounterValues(A.value),f=c&&uue(c)?$he.parse(s.context,c.value):3,m=g&&0===g.type?g.value:"",C=p.map((function(e){return xpe(e,f,!1)})).join(m);l.appendChild(a.createTextNode(C))}}}else if(20===t.type)switch(t.value){case"open-quote":l.appendChild(a.createTextNode(Ude(o.quotes,s.quoteDepth++,!0)));break;case"close-quote":l.appendChild(a.createTextNode(Ude(o.quotes,--s.quoteDepth,!1)));break;default:l.appendChild(a.createTextNode(t.value))}})),l.className=Kpe+" "+qpe;var A=n===nge.BEFORE?" "+Kpe:" "+qpe;return epe(t)?t.className.baseValue+=A:t.className+=A,l}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();(sge=nge||(nge={}))[sge.BEFORE=0]="BEFORE",sge[sge.AFTER=1]="AFTER";var Fpe,Tpe,Mpe=function(e,t){var i=e.createElement("iframe");return i.className="html2canvas-container",i.style.visibility="hidden",i.style.position="fixed",i.style.left="-10000px",i.style.top="0px",i.style.border="0",i.width=t.width.toString(),i.height=t.height.toString(),i.scrolling="no",i.setAttribute(kpe,"true"),e.body.appendChild(i),i},Rpe=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},Npe=function(e){return Promise.all([].slice.call(e.images,0).map(Rpe))},Lpe=function(e){return new Promise((function(t,i){var n=e.contentWindow;if(!n)return i("No window assigned for iframe");var s=n.document;n.onload=e.onload=function(){n.onload=e.onload=null;var i=setInterval((function(){s.body.childNodes.length>0&&"complete"===s.readyState&&(clearInterval(i),t(e))}),50)}}))},Upe=["all","d","content"],Hpe=function(e,t){for(var i=e.length-1;i>=0;i--){var n=e.item(i);-1===Upe.indexOf(n)&&t.style.setProperty(n,e.getPropertyValue(n))}return t},Ppe=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},Ope=function(e,t,i){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||i!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,i)},Gpe=function(e){var t=e[0],i=e[1],n=e[2];t.scrollLeft=i,t.scrollTop=n},Kpe="___html2canvas___pseudoelement_before",qpe="___html2canvas___pseudoelement_after",Ype='{\n    content: "" !important;\n    display: none !important;\n}',Vpe=function(e){Wpe(e,"."+Kpe+":before"+Ype+"\n         ."+qpe+":after"+Ype)},Wpe=function(e,t){var i=e.ownerDocument;if(i){var n=i.createElement("style");n.textContent=t,e.appendChild(n)}},jpe=
/** @class */function(){function e(){}return e.getOrigin=function(t){var i=e._link;return i?(i.href=t,i.href=i.href,i.protocol+i.hostname+i.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),Jpe=
/** @class */function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:ife(e)||Zpe(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return pAe(this,0,void 0,(function(){var t,i,n,s,r=this;return fAe(this,(function(a){switch(a.label){case 0:return t=jpe.isSameOrigin(e),i=!efe(e)&&!0===this._options.useCORS&&Cge.SUPPORT_CORS_IMAGES&&!t,n=!efe(e)&&!t&&!ife(e)&&"string"==typeof this._options.proxy&&Cge.SUPPORT_CORS_XHR&&!i,t||!1!==this._options.allowTaint||efe(e)||ife(e)||n||i?(s=e,n?[4,this.proxy(s)]:[3,2]):[2
/*return*/];case 1:s=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var n=new Image;n.onload=function(){return e(n)},n.onerror=t,(tfe(s)||i)&&(n.crossOrigin="anonymous"),n.src=s,!0===n.complete&&setTimeout((function(){return e(n)}),500),r._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+r._options.imageTimeout+"ms) loading image")}),r._options.imageTimeout)}))];case 3:return[2,a.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,i=this._options.proxy;if(!i)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise((function(s,r){var a=Cge.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(200===o.status)if("text"===a)s(o.response);else{var e=new FileReader;e.addEventListener("load",(function(){return s(e.result)}),!1),e.addEventListener("error",(function(e){return r(e)}),!1),e.readAsDataURL(o.response)}else r("Failed to proxy resource "+n+" with status code "+o.status)},o.onerror=r;var l=i.indexOf("?")>-1?"&":"?";if(o.open("GET",""+i+l+"url="+encodeURIComponent(e)+"&responseType="+a),"text"!==a&&o instanceof XMLHttpRequest&&(o.responseType=a),t._options.imageTimeout){var A=t._options.imageTimeout;o.timeout=A,o.ontimeout=function(){return r("Timed out ("+A+"ms) proxying "+n)}}o.send()}))},e}(),zpe=/^data:image\/svg\+xml/i,Xpe=/^data:image\/.*;base64,/i,$pe=/^data:image\/.*/i,Zpe=function(e){return Cge.SUPPORT_SVG_DRAWING||!nfe(e)},efe=function(e){return $pe.test(e)},tfe=function(e){return Xpe.test(e)},ife=function(e){return"blob"===e.substr(0,4)},nfe=function(e){return"svg"===e.substr(-3).toLowerCase()||zpe.test(e)},sfe=
/** @class */function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,i){return new e(this.x+t,this.y+i)},e}(),rfe=function(e,t,i){return new sfe(e.x+(t.x-e.x)*i,e.y+(t.y-e.y)*i)},afe=
/** @class */function(){function e(e,t,i,n){this.type=1,this.start=e,this.startControl=t,this.endControl=i,this.end=n}return e.prototype.subdivide=function(t,i){var n=rfe(this.start,this.startControl,t),s=rfe(this.startControl,this.endControl,t),r=rfe(this.endControl,this.end,t),a=rfe(n,s,t),o=rfe(s,r,t),l=rfe(a,o,t);return i?new e(this.start,n,a,l):new e(l,o,r,this.end)},e.prototype.add=function(t,i){return new e(this.start.add(t,i),this.startControl.add(t,i),this.endControl.add(t,i),this.end.add(t,i))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),ofe=function(e){return 1===e.type},lfe=
/** @class */
function(){return function(e){var t=e.styles,i=e.bounds,n=Eue(t.borderTopLeftRadius,i.width,i.height),s=n[0],r=n[1],a=Eue(t.borderTopRightRadius,i.width,i.height),o=a[0],l=a[1],A=Eue(t.borderBottomRightRadius,i.width,i.height),c=A[0],u=A[1],h=Eue(t.borderBottomLeftRadius,i.width,i.height),d=h[0],g=h[1],p=[];p.push((s+o)/i.width),p.push((d+c)/i.width),p.push((r+g)/i.height),p.push((l+u)/i.height);var f=Math.max.apply(Math,p);f>1&&(s/=f,r/=f,o/=f,l/=f,c/=f,u/=f,d/=f,g/=f);var m=i.width-o,C=i.height-u,I=i.width-c,v=i.height-g,B=t.borderTopWidth,y=t.borderRightWidth,b=t.borderBottomWidth,E=t.borderLeftWidth,w=wue(t.paddingTop,e.bounds.width),Q=wue(t.paddingRight,e.bounds.width),_=wue(t.paddingBottom,e.bounds.width),S=wue(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||r>0?Afe(i.left+E/3,i.top+B/3,s-E/3,r-B/3,Fpe.TOP_LEFT):new sfe(i.left+E/3,i.top+B/3),this.topRightBorderDoubleOuterBox=s>0||r>0?Afe(i.left+m,i.top+B/3,o-y/3,l-B/3,Fpe.TOP_RIGHT):new sfe(i.left+i.width-y/3,i.top+B/3),this.bottomRightBorderDoubleOuterBox=c>0||u>0?Afe(i.left+I,i.top+C,c-y/3,u-b/3,Fpe.BOTTOM_RIGHT):new sfe(i.left+i.width-y/3,i.top+i.height-b/3),this.bottomLeftBorderDoubleOuterBox=d>0||g>0?Afe(i.left+E/3,i.top+v,d-E/3,g-b/3,Fpe.BOTTOM_LEFT):new sfe(i.left+E/3,i.top+i.height-b/3),this.topLeftBorderDoubleInnerBox=s>0||r>0?Afe(i.left+2*E/3,i.top+2*B/3,s-2*E/3,r-2*B/3,Fpe.TOP_LEFT):new sfe(i.left+2*E/3,i.top+2*B/3),this.topRightBorderDoubleInnerBox=s>0||r>0?Afe(i.left+m,i.top+2*B/3,o-2*y/3,l-2*B/3,Fpe.TOP_RIGHT):new sfe(i.left+i.width-2*y/3,i.top+2*B/3),this.bottomRightBorderDoubleInnerBox=c>0||u>0?Afe(i.left+I,i.top+C,c-2*y/3,u-2*b/3,Fpe.BOTTOM_RIGHT):new sfe(i.left+i.width-2*y/3,i.top+i.height-2*b/3),this.bottomLeftBorderDoubleInnerBox=d>0||g>0?Afe(i.left+2*E/3,i.top+v,d-2*E/3,g-2*b/3,Fpe.BOTTOM_LEFT):new sfe(i.left+2*E/3,i.top+i.height-2*b/3),this.topLeftBorderStroke=s>0||r>0?Afe(i.left+E/2,i.top+B/2,s-E/2,r-B/2,Fpe.TOP_LEFT):new sfe(i.left+E/2,i.top+B/2),this.topRightBorderStroke=s>0||r>0?Afe(i.left+m,i.top+B/2,o-y/2,l-B/2,Fpe.TOP_RIGHT):new sfe(i.left+i.width-y/2,i.top+B/2),this.bottomRightBorderStroke=c>0||u>0?Afe(i.left+I,i.top+C,c-y/2,u-b/2,Fpe.BOTTOM_RIGHT):new sfe(i.left+i.width-y/2,i.top+i.height-b/2),this.bottomLeftBorderStroke=d>0||g>0?Afe(i.left+E/2,i.top+v,d-E/2,g-b/2,Fpe.BOTTOM_LEFT):new sfe(i.left+E/2,i.top+i.height-b/2),this.topLeftBorderBox=s>0||r>0?Afe(i.left,i.top,s,r,Fpe.TOP_LEFT):new sfe(i.left,i.top),this.topRightBorderBox=o>0||l>0?Afe(i.left+m,i.top,o,l,Fpe.TOP_RIGHT):new sfe(i.left+i.width,i.top),this.bottomRightBorderBox=c>0||u>0?Afe(i.left+I,i.top+C,c,u,Fpe.BOTTOM_RIGHT):new sfe(i.left+i.width,i.top+i.height),this.bottomLeftBorderBox=d>0||g>0?Afe(i.left,i.top+v,d,g,Fpe.BOTTOM_LEFT):new sfe(i.left,i.top+i.height),this.topLeftPaddingBox=s>0||r>0?Afe(i.left+E,i.top+B,Math.max(0,s-E),Math.max(0,r-B),Fpe.TOP_LEFT):new sfe(i.left+E,i.top+B),this.topRightPaddingBox=o>0||l>0?Afe(i.left+Math.min(m,i.width-y),i.top+B,m>i.width+y?0:Math.max(0,o-y),Math.max(0,l-B),Fpe.TOP_RIGHT):new sfe(i.left+i.width-y,i.top+B),this.bottomRightPaddingBox=c>0||u>0?Afe(i.left+Math.min(I,i.width-E),i.top+Math.min(C,i.height-b),Math.max(0,c-y),Math.max(0,u-b),Fpe.BOTTOM_RIGHT):new sfe(i.left+i.width-y,i.top+i.height-b),this.bottomLeftPaddingBox=d>0||g>0?Afe(i.left+E,i.top+Math.min(v,i.height-b),Math.max(0,d-E),Math.max(0,g-b),Fpe.BOTTOM_LEFT):new sfe(i.left+E,i.top+i.height-b),this.topLeftContentBox=s>0||r>0?Afe(i.left+E+S,i.top+B+w,Math.max(0,s-(E+S)),Math.max(0,r-(B+w)),Fpe.TOP_LEFT):new sfe(i.left+E+S,i.top+B+w),this.topRightContentBox=o>0||l>0?Afe(i.left+Math.min(m,i.width+E+S),i.top+B+w,m>i.width+E+S?0:o-E+S,l-(B+w),Fpe.TOP_RIGHT):new sfe(i.left+i.width-(y+Q),i.top+B+w),this.bottomRightContentBox=c>0||u>0?Afe(i.left+Math.min(I,i.width-(E+S)),i.top+Math.min(C,i.height+B+w),Math.max(0,c-(y+Q)),u-(b+_),Fpe.BOTTOM_RIGHT):new sfe(i.left+i.width-(y+Q),i.top+i.height-(b+_)),this.bottomLeftContentBox=d>0||g>0?Afe(i.left+E+S,i.top+v,Math.max(0,d-(E+S)),g-(b+_),Fpe.BOTTOM_LEFT):new sfe(i.left+E+S,i.top+i.height-(b+_))}}();(Tpe=Fpe||(Fpe={}))[Tpe.TOP_LEFT=0]="TOP_LEFT",Tpe[Tpe.TOP_RIGHT=1]="TOP_RIGHT",Tpe[Tpe.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",Tpe[Tpe.BOTTOM_LEFT=3]="BOTTOM_LEFT";var Afe=function(e,t,i,n,s){var r=(Math.sqrt(2)-1)/3*4,a=i*r,o=n*r,l=e+i,A=t+n;switch(s){case Fpe.TOP_LEFT:return new afe(new sfe(e,A),new sfe(e,A-o),new sfe(l-a,t),new sfe(l,t));case Fpe.TOP_RIGHT:return new afe(new sfe(e,t),new sfe(e+a,t),new sfe(l,A-o),new sfe(l,A));case Fpe.BOTTOM_RIGHT:return new afe(new sfe(l,t),new sfe(l,t+o),new sfe(e+a,A),new sfe(e,A));case Fpe.BOTTOM_LEFT:default:return new afe(new sfe(l,A),new sfe(l-a,A),new sfe(e,t+o),new sfe(e,t))}},cfe=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},ufe=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},hfe=
/** @class */
function(){return function(e,t,i){this.offsetX=e,this.offsetY=t,this.matrix=i,this.type=0,this.target=6}}(),dfe=
/** @class */
function(){return function(e,t){this.path=e,this.target=t,this.type=1}}(),gfe=
/** @class */
function(){return function(e){this.opacity=e,this.type=2,this.target=6}}(),pfe=function(e){return 1===e.type},ffe=function(e,t){return e.length===t.length&&e.some((function(e,i){return e===t[i]}))},mfe=
/** @class */
function(){return function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}}(),Cfe=
/** @class */function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new lfe(this.container),this.container.styles.opacity<1&&this.effects.push(new gfe(this.container.styles.opacity)),null!==this.container.styles.transform){var i=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new hfe(i,n,s))}if(0!==this.container.styles.overflowX){var r=cfe(this.curves),a=ufe(this.curves);ffe(r,a)?this.effects.push(new dfe(r,6
/* CONTENT */)):(this.effects.push(new dfe(r,2
/* BACKGROUND_BORDERS */)),this.effects.push(new dfe(a,4
/* CONTENT */)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3
/* FIXED */].indexOf(this.container.styles.position),i=this.parent,n=this.effects.slice(0);i;){var s=i.effects.filter((function(e){return!pfe(e)}));if(t||0!==i.container.styles.position||!i.parent){if(n.unshift.apply(n,s),t=-1===[2,3
/* FIXED */].indexOf(i.container.styles.position),0!==i.container.styles.overflowX){var r=cfe(i.curves),a=ufe(i.curves);ffe(r,a)||n.unshift(new dfe(a,6
/* CONTENT */))}}else n.unshift.apply(n,s);i=i.parent}return n.filter((function(t){return Fde(t.target,e)}))},e}(),Ife=function(e,t,i,n){e.container.elements.forEach((function(s){var r=Fde(s.flags,4
/* CREATES_REAL_STACKING_CONTEXT */),a=Fde(s.flags,2
/* CREATES_STACKING_CONTEXT */),o=new Cfe(s,e);Fde(s.styles.display,2048
/* LIST_ITEM */)&&n.push(o);var l=Fde(s.flags,8
/* IS_LIST_OWNER */)?[]:n;if(r||a){var A=r||s.styles.isPositioned()?i:t,c=new mfe(o);if(s.styles.isPositioned()||s.styles.opacity<1||s.styles.isTransformed()){var u=s.styles.zIndex.order;if(u<0){var h=0;A.negativeZIndex.some((function(e,t){return u>e.element.container.styles.zIndex.order?(h=t,!1):h>0})),A.negativeZIndex.splice(h,0,c)}else if(u>0){var d=0;A.positiveZIndex.some((function(e,t){return u>=e.element.container.styles.zIndex.order?(d=t+1,!1):d>0})),A.positiveZIndex.splice(d,0,c)}else A.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else s.styles.isFloating()?A.nonPositionedFloats.push(c):A.nonPositionedInlineLevel.push(c);Ife(o,c,r?c:i,l)}else s.styles.isInlineLevel()?t.inlineLevel.push(o):t.nonInlineLevel.push(o),Ife(o,t,i,l);Fde(s.flags,8
/* IS_LIST_OWNER */)&&vfe(s,l)}))},vfe=function(e,t){for(var i=e instanceof Mge?e.start:1,n=e instanceof Mge&&e.reversed,s=0;s<t.length;s++){var r=t[s];r.container instanceof Tge&&"number"==typeof r.container.value&&0!==r.container.value&&(i=r.container.value),r.listValue=xpe(i,r.container.styles.listStyleType,!0),i+=n?-1:1}},Bfe=function(e,t){switch(t){case 0:return bfe(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return bfe(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return bfe(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return bfe(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},yfe=function(e,t){var i=[];return ofe(e)?i.push(e.subdivide(.5,!1)):i.push(e),ofe(t)?i.push(t.subdivide(.5,!0)):i.push(t),i},bfe=function(e,t,i,n){var s=[];return ofe(e)?s.push(e.subdivide(.5,!1)):s.push(e),ofe(i)?s.push(i.subdivide(.5,!0)):s.push(i),ofe(n)?s.push(n.subdivide(.5,!0).reverse()):s.push(n),ofe(t)?s.push(t.subdivide(.5,!1).reverse()):s.push(t),s},Efe=function(e){var t=e.bounds,i=e.styles;return t.add(i.borderLeftWidth,i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth),-(i.borderTopWidth+i.borderBottomWidth))},wfe=function(e){var t=e.styles,i=e.bounds,n=wue(t.paddingLeft,i.width),s=wue(t.paddingRight,i.width),r=wue(t.paddingTop,i.width),a=wue(t.paddingBottom,i.width);return i.add(n+t.borderLeftWidth,r+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+n+s),-(t.borderTopWidth+t.borderBottomWidth+r+a))},Qfe=function(e,t,i){var n,s,r=(n=kfe(e.styles.backgroundOrigin,t),s=e,0===n?s.bounds:2===n?wfe(s):Efe(s)),a=function(e,t){return 0===e?t.bounds:2===e?wfe(t):Efe(t)}(kfe(e.styles.backgroundClip,t),e),o=xfe(kfe(e.styles.backgroundSize,t),i,r),l=o[0],A=o[1],c=Eue(kfe(e.styles.backgroundPosition,t),r.width-l,r.height-A);return[Dfe(kfe(e.styles.backgroundRepeat,t),c,o,r,a),Math.round(r.left+c[0]),Math.round(r.top+c[1]),l,A]},_fe=function(e){return uue(e)&&e.value===ohe.AUTO},Sfe=function(e){return"number"==typeof e},xfe=function(e,t,i){var n=t[0],s=t[1],r=t[2],a=e[0],o=e[1];if(!a)return[0,0];if(Iue(a)&&o&&Iue(o))return[wue(a,i.width),wue(o,i.height)];var l=Sfe(r);if(uue(a)&&(a.value===ohe.CONTAIN||a.value===ohe.COVER))return Sfe(r)?i.width/i.height<r!=(a.value===ohe.COVER)?[i.width,i.width/r]:[i.height*r,i.height]:[i.width,i.height];var A=Sfe(n),c=Sfe(s),u=A||c;if(_fe(a)&&(!o||_fe(o)))return A&&c?[n,s]:l||u?u&&l?[A?n:s*r,c?s:n/r]:[A?n:i.width,c?s:i.height]:[i.width,i.height];if(l){var h=0,d=0;return Iue(a)?h=wue(a,i.width):Iue(o)&&(d=wue(o,i.height)),_fe(a)?h=d*r:o&&!_fe(o)||(d=h/r),[h,d]}var g=null,p=null;if(Iue(a)?g=wue(a,i.width):o&&Iue(o)&&(p=wue(o,i.height)),null===g||o&&!_fe(o)||(p=A&&c?g/n*s:i.height),null!==p&&_fe(a)&&(g=A&&c?p/s*n:i.width),null!==g&&null!==p)return[g,p];throw new Error("Unable to calculate background-size for element")},kfe=function(e,t){var i=e[t];return void 0===i?e[0]:i},Dfe=function(e,t,i,n,s){var r=t[0],a=t[1],o=i[0],l=i[1];switch(e){case 2:return[new sfe(Math.round(n.left),Math.round(n.top+a)),new sfe(Math.round(n.left+n.width),Math.round(n.top+a)),new sfe(Math.round(n.left+n.width),Math.round(l+n.top+a)),new sfe(Math.round(n.left),Math.round(l+n.top+a))];case 3:return[new sfe(Math.round(n.left+r),Math.round(n.top)),new sfe(Math.round(n.left+r+o),Math.round(n.top)),new sfe(Math.round(n.left+r+o),Math.round(n.height+n.top)),new sfe(Math.round(n.left+r),Math.round(n.height+n.top))];case 1:return[new sfe(Math.round(n.left+r),Math.round(n.top+a)),new sfe(Math.round(n.left+r+o),Math.round(n.top+a)),new sfe(Math.round(n.left+r+o),Math.round(n.top+a+l)),new sfe(Math.round(n.left+r),Math.round(n.top+a+l))];default:return[new sfe(Math.round(s.left),Math.round(s.top)),new sfe(Math.round(s.left+s.width),Math.round(s.top)),new sfe(Math.round(s.left+s.width),Math.round(s.height+s.top)),new sfe(Math.round(s.left),Math.round(s.height+s.top))]}},Ffe="Hidden Text",Tfe=
/** @class */function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var i=this._document.createElement("div"),n=this._document.createElement("img"),s=this._document.createElement("span"),r=this._document.body;i.style.visibility="hidden",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.style.whiteSpace="nowrap",r.appendChild(i),n.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",s.style.fontFamily=e,s.style.fontSize=t,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(Ffe)),i.appendChild(s),i.appendChild(n);var a=n.offsetTop-s.offsetTop+2;i.removeChild(s),i.appendChild(this._document.createTextNode(Ffe)),i.style.lineHeight="normal",n.style.verticalAlign="super";var o=n.offsetTop-i.offsetTop+2;return r.removeChild(i),{baseline:a,middle:o}},e.prototype.getMetrics=function(e,t){var i=e+" "+t;return void 0===this._data[i]&&(this._data[i]=this.parseMetrics(e,t)),this._data[i]},e}(),Mfe=
/** @class */
function(){return function(e,t){this.context=e,this.options=t}}(),Rfe=
/** @class */function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._activeEffects=[],n.canvas=i.canvas?i.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),i.canvas||(n.canvas.width=Math.floor(i.width*i.scale),n.canvas.height=Math.floor(i.height*i.scale),n.canvas.style.width=i.width+"px",n.canvas.style.height=i.height+"px"),n.fontMetrics=new Tfe(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-i.x,-i.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+i.width+"x"+i.height+") with scale "+i.scale),n}return dAe(t,e),t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach((function(e){return t.applyEffect(e)}))},t.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 2===e.type}(e)&&(this.ctx.globalAlpha=e.opacity),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),pfe(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return pAe(this,0,void 0,(function(){return fAe(this,(function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2
/*return*/]}}))}))},t.prototype.renderNode=function(e){return pAe(this,0,void 0,(function(){return fAe(this,(function(t){switch(t.label){case 0:return Fde(e.container.flags,16
/* DEBUG_RENDER */),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2
/*return*/]}}))}))},t.prototype.renderTextWithLetterSpacing=function(e,t,i){var n=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+i):yge(e.text).reduce((function(t,s){return n.ctx.fillText(s,t,e.bounds.top+i),t+n.ctx.measureText(s).width}),e.bounds.left)},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter((function(e){return"normal"===e||"small-caps"===e})).join(""),i=Pfe(e.fontFamily).join(", "),n=Aue(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,n,i].join(" "),i,n]},t.prototype.renderTextNode=function(e,t){return pAe(this,0,void 0,(function(){var i,n,s,r,a,o,l,A,c=this;return fAe(this,(function(u){return i=this.createFontStyle(t),n=i[0],s=i[1],r=i[2],this.ctx.font=n,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",a=this.fontMetrics.getMetrics(s,r),o=a.baseline,l=a.middle,A=t.paintOrder,e.textBounds.forEach((function(e){A.forEach((function(i){switch(i){case 0:c.ctx.fillStyle=Mue(t.color),c.renderTextWithLetterSpacing(e,t.letterSpacing,o);var n=t.textShadow;n.length&&e.text.trim().length&&(n.slice(0).reverse().forEach((function(i){c.ctx.shadowColor=Mue(i.color),c.ctx.shadowOffsetX=i.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=i.offsetY.number*c.options.scale,c.ctx.shadowBlur=i.blur.number,c.renderTextWithLetterSpacing(e,t.letterSpacing,o)})),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),t.textDecorationLine.length&&(c.ctx.fillStyle=Mue(t.textDecorationColor||t.color),t.textDecorationLine.forEach((function(t){switch(t){case 1:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+o),e.bounds.width,1);break;case 2:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:c.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+l),e.bounds.width,1)}})));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(c.ctx.strokeStyle=Mue(t.webkitTextStrokeColor),c.ctx.lineWidth=t.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+o)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter"}}))})),[2
/*return*/]}))}))},t.prototype.renderReplacedElement=function(e,t,i){if(i&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var n=wfe(e),s=ufe(t);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(i,0,0,e.intrinsicWidth,e.intrinsicHeight,n.left,n.top,n.width,n.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return pAe(this,0,void 0,(function(){var i,n,s,r,a,o,l,A,c,u,h,d,g,p,f,m,C,I;return fAe(this,(function(v){switch(v.label){case 0:this.applyEffects(e.getEffects(4
/* CONTENT */)),i=e.container,n=e.curves,s=i.styles,r=0,a=i.textNodes,v.label=1;case 1:return r<a.length?(o=a[r],[4,this.renderTextNode(o,s)]):[3,4];case 2:v.sent(),v.label=3;case 3:return r++,[3,1];case 4:if(!(i instanceof kge))return[3,8];v.label=5;case 5:return v.trys.push([5,7,,8]),[4,this.context.cache.match(i.src)];case 6:return f=v.sent(),this.renderReplacedElement(i,n,f),[3,8];case 7:return v.sent(),this.context.logger.error("Error loading image "+i.src),[3,8];case 8:if(i instanceof Dge&&this.renderReplacedElement(i,n,i.canvas),!(i instanceof Fge))return[3,12];v.label=9;case 9:return v.trys.push([9,11,,12]),[4,this.context.cache.match(i.svg)];case 10:return f=v.sent(),this.renderReplacedElement(i,n,f),[3,12];case 11:return v.sent(),this.context.logger.error("Error loading svg "+i.svg.substring(0,255)),[3,12];case 12:return i instanceof qge&&i.tree?[4,new t(this.context,{scale:this.options.scale,backgroundColor:i.backgroundColor,x:0,y:0,width:i.width,height:i.height}).render(i.tree)]:[3,14];case 13:l=v.sent(),i.width&&i.height&&this.ctx.drawImage(l,0,0,i.width,i.height,i.bounds.left,i.bounds.top,i.bounds.width,i.bounds.height),v.label=14;case 14:if(i instanceof Oge&&(A=Math.min(i.bounds.width,i.bounds.height),i.type===Lge?i.checked&&(this.ctx.save(),this.path([new sfe(i.bounds.left+.39363*A,i.bounds.top+.79*A),new sfe(i.bounds.left+.16*A,i.bounds.top+.5549*A),new sfe(i.bounds.left+.27347*A,i.bounds.top+.44071*A),new sfe(i.bounds.left+.39694*A,i.bounds.top+.5649*A),new sfe(i.bounds.left+.72983*A,i.bounds.top+.23*A),new sfe(i.bounds.left+.84*A,i.bounds.top+.34085*A),new sfe(i.bounds.left+.39363*A,i.bounds.top+.79*A)]),this.ctx.fillStyle=Mue(Pge),this.ctx.fill(),this.ctx.restore()):i.type===Uge&&i.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(i.bounds.left+A/2,i.bounds.top+A/2,A/4,0,2*Math.PI,!0),this.ctx.fillStyle=Mue(Pge),this.ctx.fill(),this.ctx.restore())),Nfe(i)&&i.value.length){switch(c=this.createFontStyle(s),C=c[0],u=c[1],h=this.fontMetrics.getMetrics(C,u).baseline,this.ctx.font=C,this.ctx.fillStyle=Mue(s.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Ufe(i.styles.textAlign),I=wfe(i),d=0,i.styles.textAlign){case 1:d+=I.width/2;break;case 2:d+=I.width}g=I.add(d,0,0,-I.height/2+1),this.ctx.save(),this.path([new sfe(I.left,I.top),new sfe(I.left+I.width,I.top),new sfe(I.left+I.width,I.top+I.height),new sfe(I.left,I.top+I.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ige(i.value,g),s.letterSpacing,h),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Fde(i.styles.display,2048
/* LIST_ITEM */))return[3,20];if(null===i.styles.listStyleImage)return[3,19];if(0!==(p=i.styles.listStyleImage).type)return[3,18];f=void 0,m=p.url,v.label=15;case 15:return v.trys.push([15,17,,18]),[4,this.context.cache.match(m)];case 16:return f=v.sent(),this.ctx.drawImage(f,i.bounds.left-(f.width+10),i.bounds.top),[3,18];case 17:return v.sent(),this.context.logger.error("Error loading list-style-image "+m),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==i.styles.listStyleType&&(C=this.createFontStyle(s)[0],this.ctx.font=C,this.ctx.fillStyle=Mue(s.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",I=new CAe(i.bounds.left,i.bounds.top+wue(i.styles.paddingTop,i.bounds.width),i.bounds.width,Jhe(s.lineHeight,s.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ige(e.listValue,I),s.letterSpacing,Jhe(s.lineHeight,s.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),v.label=20;case 20:return[2
/*return*/]}}))}))},t.prototype.renderStackContent=function(e){return pAe(this,0,void 0,(function(){var t,i,n,s,r,a,o,l,A,c,u,h,d,g,p;return fAe(this,(function(f){switch(f.label){case 0:return Fde(e.element.container.flags,16
/* DEBUG_RENDER */),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:f.sent(),t=0,i=e.negativeZIndex,f.label=2;case 2:return t<i.length?(p=i[t],[4,this.renderStack(p)]):[3,5];case 3:f.sent(),f.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:f.sent(),n=0,s=e.nonInlineLevel,f.label=7;case 7:return n<s.length?(p=s[n],[4,this.renderNode(p)]):[3,10];case 8:f.sent(),f.label=9;case 9:return n++,[3,7];case 10:r=0,a=e.nonPositionedFloats,f.label=11;case 11:return r<a.length?(p=a[r],[4,this.renderStack(p)]):[3,14];case 12:f.sent(),f.label=13;case 13:return r++,[3,11];case 14:o=0,l=e.nonPositionedInlineLevel,f.label=15;case 15:return o<l.length?(p=l[o],[4,this.renderStack(p)]):[3,18];case 16:f.sent(),f.label=17;case 17:return o++,[3,15];case 18:A=0,c=e.inlineLevel,f.label=19;case 19:return A<c.length?(p=c[A],[4,this.renderNode(p)]):[3,22];case 20:f.sent(),f.label=21;case 21:return A++,[3,19];case 22:u=0,h=e.zeroOrAutoZIndexOrTransformedOrOpacity,f.label=23;case 23:return u<h.length?(p=h[u],[4,this.renderStack(p)]):[3,26];case 24:f.sent(),f.label=25;case 25:return u++,[3,23];case 26:d=0,g=e.positiveZIndex,f.label=27;case 27:return d<g.length?(p=g[d],[4,this.renderStack(p)]):[3,30];case 28:f.sent(),f.label=29;case 29:return d++,[3,27];case 30:return[2
/*return*/]}}))}))},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach((function(e,i){var n=ofe(e)?e.start:e;0===i?t.ctx.moveTo(n.x,n.y):t.ctx.lineTo(n.x,n.y),ofe(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)}))},t.prototype.renderRepeat=function(e,t,i,n){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(i,n),this.ctx.fill(),this.ctx.translate(-i,-n)},t.prototype.resizeImage=function(e,t,i){var n;if(e.width===t&&e.height===i)return e;var s=(null!==(n=this.canvas.ownerDocument)&&void 0!==n?n:document).createElement("canvas");return s.width=Math.max(1,t),s.height=Math.max(1,i),s.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,i),s},t.prototype.renderBackgroundImage=function(e){return pAe(this,0,void 0,(function(){var t,i,n,s,r,a;return fAe(this,(function(o){switch(o.label){case 0:t=e.styles.backgroundImage.length-1,i=function(i){var s,r,a,o,l,A,c,u,h,d,g,p,f,m,C,I,v,B,y,b,E,w,Q,_,S,x,k,D,F,T,M;return fAe(this,(function(R){switch(R.label){case 0:if(0!==i.type)return[3,5];s=void 0,r=i.url,R.label=1;case 1:return R.trys.push([1,3,,4]),[4,n.context.cache.match(r)];case 2:return s=R.sent(),[3,4];case 3:return R.sent(),n.context.logger.error("Error loading background-image "+r),[3,4];case 4:return s&&(a=Qfe(e,t,[s.width,s.height,s.width/s.height]),I=a[0],w=a[1],Q=a[2],y=a[3],b=a[4],m=n.ctx.createPattern(n.resizeImage(s,y,b),"repeat"),n.renderRepeat(I,m,w,Q)),[3,6];case 5:1===i.type?(o=Qfe(e,t,[null,null,null]),I=o[0],w=o[1],Q=o[2],y=o[3],b=o[4],l=Wue(i.angle,y,b),A=l[0],c=l[1],u=l[2],h=l[3],d=l[4],(g=document.createElement("canvas")).width=y,g.height=b,p=g.getContext("2d"),f=p.createLinearGradient(c,h,u,d),Vue(i.stops,A).forEach((function(e){return f.addColorStop(e.stop,Mue(e.color))})),p.fillStyle=f,p.fillRect(0,0,y,b),y>0&&b>0&&(m=n.ctx.createPattern(g,"repeat"),n.renderRepeat(I,m,w,Q))):function(e){return 2===e.type}(i)&&(C=Qfe(e,t,[null,null,null]),I=C[0],v=C[1],B=C[2],y=C[3],b=C[4],E=0===i.position.length?[yue]:i.position,w=wue(E[0],y),Q=wue(E[E.length-1],b),_=function(e,t,i,n,s){var r=0,a=0;switch(e.size){case 0:0===e.shape?r=a=Math.min(Math.abs(t),Math.abs(t-n),Math.abs(i),Math.abs(i-s)):1===e.shape&&(r=Math.min(Math.abs(t),Math.abs(t-n)),a=Math.min(Math.abs(i),Math.abs(i-s)));break;case 2:if(0===e.shape)r=a=Math.min(jue(t,i),jue(t,i-s),jue(t-n,i),jue(t-n,i-s));else if(1===e.shape){var o=Math.min(Math.abs(i),Math.abs(i-s))/Math.min(Math.abs(t),Math.abs(t-n)),l=Jue(n,s,t,i,!0),A=l[0],c=l[1];a=o*(r=jue(A-t,(c-i)/o))}break;case 1:0===e.shape?r=a=Math.max(Math.abs(t),Math.abs(t-n),Math.abs(i),Math.abs(i-s)):1===e.shape&&(r=Math.max(Math.abs(t),Math.abs(t-n)),a=Math.max(Math.abs(i),Math.abs(i-s)));break;case 3:if(0===e.shape)r=a=Math.max(jue(t,i),jue(t,i-s),jue(t-n,i),jue(t-n,i-s));else if(1===e.shape){o=Math.max(Math.abs(i),Math.abs(i-s))/Math.max(Math.abs(t),Math.abs(t-n));var u=Jue(n,s,t,i,!1);A=u[0],c=u[1],a=o*(r=jue(A-t,(c-i)/o))}}return Array.isArray(e.size)&&(r=wue(e.size[0],n),a=2===e.size.length?wue(e.size[1],s):r),[r,a]}(i,w,Q,y,b),S=_[0],x=_[1],S>0&&x>0&&(k=n.ctx.createRadialGradient(v+w,B+Q,0,v+w,B+Q,S),Vue(i.stops,2*S).forEach((function(e){return k.addColorStop(e.stop,Mue(e.color))})),n.path(I),n.ctx.fillStyle=k,S!==x?(D=e.bounds.left+.5*e.bounds.width,F=e.bounds.top+.5*e.bounds.height,M=1/(T=x/S),n.ctx.save(),n.ctx.translate(D,F),n.ctx.transform(1,0,0,T,0,0),n.ctx.translate(-D,-F),n.ctx.fillRect(v,M*(B-F)+F,y,b*M),n.ctx.restore()):n.ctx.fill())),R.label=6;case 6:return t--,[2
/*return*/]}}))},n=this,s=0,r=e.styles.backgroundImage.slice(0).reverse(),o.label=1;case 1:return s<r.length?(a=r[s],[5,i(a)]):[3,4];case 2:o.sent(),o.label=3;case 3:return s++,[3,1];case 4:return[2
/*return*/]}}))}))},t.prototype.renderSolidBorder=function(e,t,i){return pAe(this,0,void 0,(function(){return fAe(this,(function(n){return this.path(Bfe(i,t)),this.ctx.fillStyle=Mue(e),this.ctx.fill(),[2
/*return*/]}))}))},t.prototype.renderDoubleBorder=function(e,t,i,n){return pAe(this,0,void 0,(function(){var s,r;return fAe(this,(function(a){switch(a.label){case 0:return t<3?[4,this.renderSolidBorder(e,i,n)]:[3,2];case 1:return a.sent(),[2
/*return*/];case 2:return s=function(e,t){switch(t){case 0:return bfe(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return bfe(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return bfe(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return bfe(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}}(n,i),this.path(s),this.ctx.fillStyle=Mue(e),this.ctx.fill(),r=function(e,t){switch(t){case 0:return bfe(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return bfe(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return bfe(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return bfe(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}}(n,i),this.path(r),this.ctx.fill(),[2
/*return*/]}}))}))},t.prototype.renderNodeBackgroundAndBorders=function(e){return pAe(this,0,void 0,(function(){var t,i,n,s,r,a,o,l,A=this;return fAe(this,(function(c){switch(c.label){case 0:return this.applyEffects(e.getEffects(2
/* BACKGROUND_BORDERS */)),t=e.container.styles,i=!Tue(t.backgroundColor)||t.backgroundImage.length,n=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],s=Lfe(kfe(t.backgroundClip,0),e.curves),i||t.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),Tue(t.backgroundColor)||(this.ctx.fillStyle=Mue(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:c.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach((function(t){A.ctx.save();var i,n,s,r,a,o=cfe(e.curves),l=t.inset?0:1e4,c=(i=o,n=-l+(t.inset?1:-1)*t.spread.number,s=(t.inset?1:-1)*t.spread.number,r=t.spread.number*(t.inset?-2:2),a=t.spread.number*(t.inset?-2:2),i.map((function(e,t){switch(t){case 0:return e.add(n,s);case 1:return e.add(n+r,s);case 2:return e.add(n+r,s+a);case 3:return e.add(n,s+a)}return e})));t.inset?(A.path(o),A.ctx.clip(),A.mask(c)):(A.mask(o),A.ctx.clip(),A.path(c)),A.ctx.shadowOffsetX=t.offsetX.number+l,A.ctx.shadowOffsetY=t.offsetY.number,A.ctx.shadowColor=Mue(t.color),A.ctx.shadowBlur=t.blur.number,A.ctx.fillStyle=t.inset?Mue(t.color):"rgba(0,0,0,1)",A.ctx.fill(),A.ctx.restore()})),c.label=2;case 2:r=0,a=0,o=n,c.label=3;case 3:return a<o.length?0!==(l=o[a]).style&&!Tue(l.color)&&l.width>0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,r,e.curves,2
/* DASHED */)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,r,e.curves,3
/* DOTTED */)];case 6:return c.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,r,e.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,r,e.curves)];case 10:c.sent(),c.label=11;case 11:r++,c.label=12;case 12:return a++,[3,3];case 13:return[2
/*return*/]}}))}))},t.prototype.renderDashedDottedBorder=function(e,t,i,n,s){return pAe(this,0,void 0,(function(){var r,a,o,l,A,c,u,h,d,g,p,f,m,C,I,v;return fAe(this,(function(B){return this.ctx.save(),r=function(e,t){switch(t){case 0:return yfe(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return yfe(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return yfe(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return yfe(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(n,i),a=Bfe(n,i),2===s&&(this.path(a),this.ctx.clip()),ofe(a[0])?(o=a[0].start.x,l=a[0].start.y):(o=a[0].x,l=a[0].y),ofe(a[1])?(A=a[1].end.x,c=a[1].end.y):(A=a[1].x,c=a[1].y),u=0===i||2===i?Math.abs(o-A):Math.abs(l-c),this.ctx.beginPath(),3===s?this.formatPath(r):this.formatPath(a.slice(0,2)),h=t<3?3*t:2*t,d=t<3?2*t:t,3===s&&(h=t,d=t),g=!0,u<=2*h?g=!1:u<=2*h+d?(h*=p=u/(2*h+d),d*=p):(f=Math.floor((u+d)/(h+d)),m=(u-f*h)/(f-1),d=(C=(u-(f+1)*h)/f)<=0||Math.abs(d-m)<Math.abs(d-C)?m:C),g&&(3===s?this.ctx.setLineDash([0,h+d]):this.ctx.setLineDash([h,d])),3===s?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=Mue(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===s&&(ofe(a[0])&&(I=a[3],v=a[0],this.ctx.beginPath(),this.formatPath([new sfe(I.end.x,I.end.y),new sfe(v.start.x,v.start.y)]),this.ctx.stroke()),ofe(a[1])&&(I=a[1],v=a[2],this.ctx.beginPath(),this.formatPath([new sfe(I.end.x,I.end.y),new sfe(v.start.x,v.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2
/*return*/]}))}))},t.prototype.render=function(e){return pAe(this,0,void 0,(function(){var t;return fAe(this,(function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Mue(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=new Cfe(e,null),s=new mfe(n),Ife(n,s,s,r=[]),vfe(n.container,r),t=s,[4,this.renderStack(t)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}var n,s,r}))}))},t}(Mfe),Nfe=function(e){return e instanceof Kge||(e instanceof Gge||e instanceof Oge&&e.type!==Uge&&e.type!==Lge)},Lfe=function(e,t){switch(e){case 0:return cfe(t);case 2:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);default:return ufe(t)}},Ufe=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},Hfe=["-apple-system","system-ui"],Pfe=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter((function(e){return-1===Hfe.indexOf(e)})):e},Ofe=
/** @class */function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.canvas=i.canvas?i.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=i,n.canvas.width=Math.floor(i.width*i.scale),n.canvas.height=Math.floor(i.height*i.scale),n.canvas.style.width=i.width+"px",n.canvas.style.height=i.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-i.x,-i.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+i.width+"x"+i.height+" at "+i.x+","+i.y+") with scale "+i.scale),n}return dAe(t,e),t.prototype.render=function(e){return pAe(this,0,void 0,(function(){var t,i;return fAe(this,(function(n){switch(n.label){case 0:return t=fge(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Gfe(t)];case 1:return i=n.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Mue(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(i,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},t}(Mfe),Gfe=function(e){return new Promise((function(t,i){var n=new Image;n.onload=function(){t(n)},n.onerror=i,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},Kfe=
/** @class */function(){function e(e){var t=e.id,i=e.enabled;this.id=t,this.enabled=i,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,mAe([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,mAe([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,mAe([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,mAe([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),qfe=
/** @class */function(){function e(t,i){var n;this.windowBounds=i,this.instanceName="#"+e.instanceCount++,this.logger=new Kfe({id:this.instanceName,enabled:t.logging}),this.cache=null!==(n=t.cache)&&void 0!==n?n:new Jpe(this,t)}return e.instanceCount=1,e}();"undefined"!=typeof window&&jpe.setContext(window);var Yfe=function(e,t){return pAe(void 0,0,void 0,(function(){var i,n,s,r,a,o,l,A,c,u,h,d,g,p,f,m,C,I,v,B,y,b,E,w,Q,_,S,x,k,D,F,T,M,R,N,L,U,H;return fAe(this,(function(P){switch(P.label){case 0:if(!e||"object"!=typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(!(i=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(n=i.defaultView))throw new Error("Document is not attached to a Window");return s={allowTaint:null!==(b=t.allowTaint)&&void 0!==b&&b,imageTimeout:null!==(E=t.imageTimeout)&&void 0!==E?E:15e3,proxy:t.proxy,useCORS:null!==(w=t.useCORS)&&void 0!==w&&w},r=gAe({logging:null===(Q=t.logging)||void 0===Q||Q,cache:t.cache},s),a={windowWidth:null!==(_=t.windowWidth)&&void 0!==_?_:n.innerWidth,windowHeight:null!==(S=t.windowHeight)&&void 0!==S?S:n.innerHeight,scrollX:null!==(x=t.scrollX)&&void 0!==x?x:n.pageXOffset,scrollY:null!==(k=t.scrollY)&&void 0!==k?k:n.pageYOffset},o=new CAe(a.scrollX,a.scrollY,a.windowWidth,a.windowHeight),l=new qfe(r,o),A=null!==(D=t.foreignObjectRendering)&&void 0!==D&&D,c={allowTaint:null!==(F=t.allowTaint)&&void 0!==F&&F,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:A,copyStyles:A},l.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),u=new Dpe(l,e,c),(h=u.clonedReferenceElement)?[4,u.toIFrame(i,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return d=P.sent(),g=rpe(h)||"HTML"===h.tagName?function(e){var t=e.body,i=e.documentElement;if(!t||!i)throw new Error("Unable to get document size");var n=Math.max(Math.max(t.scrollWidth,i.scrollWidth),Math.max(t.offsetWidth,i.offsetWidth),Math.max(t.clientWidth,i.clientWidth)),s=Math.max(Math.max(t.scrollHeight,i.scrollHeight),Math.max(t.offsetHeight,i.offsetHeight),Math.max(t.clientHeight,i.clientHeight));return new CAe(0,0,n,s)}(h.ownerDocument):IAe(l,h),p=g.width,f=g.height,m=g.left,C=g.top,I=Vfe(l,h,t.backgroundColor),v={canvas:t.canvas,backgroundColor:I,scale:null!==(M=null!==(T=t.scale)&&void 0!==T?T:n.devicePixelRatio)&&void 0!==M?M:1,x:(null!==(R=t.x)&&void 0!==R?R:0)+m,y:(null!==(N=t.y)&&void 0!==N?N:0)+C,width:null!==(L=t.width)&&void 0!==L?L:Math.ceil(p),height:null!==(U=t.height)&&void 0!==U?U:Math.ceil(f)},A?(l.logger.debug("Document cloned, using foreign object rendering"),[4,new Ofe(l,v).render(h)]):[3,3];case 2:return B=P.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+m+","+C+" with size "+p+"x"+f+" using computed rendering"),l.logger.debug("Starting DOM parsing"),y=jge(l,h),I===y.styles.backgroundColor&&(y.styles.backgroundColor=Gue.TRANSPARENT),l.logger.debug("Starting renderer for element at "+v.x+","+v.y+" with size "+v.width+"x"+v.height),[4,new Rfe(l,v).render(y)];case 4:B=P.sent(),P.label=5;case 5:return(null===(H=t.removeContainer)||void 0===H||H)&&(Dpe.destroy(d)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,B]}}))}))},Vfe=function(e,t,i){var n=t.ownerDocument,s=n.documentElement?Oue(e,getComputedStyle(n.documentElement).backgroundColor):Gue.TRANSPARENT,r=n.body?Oue(e,getComputedStyle(n.body).backgroundColor):Gue.TRANSPARENT,a="string"==typeof i?Oue(e,i):null===i?Gue.TRANSPARENT:4294967295;return t===n.documentElement?Tue(s)?Tue(r)?a:r:s:a};const Wfe=TC("screenshot",(()=>{let e=zh(!1);const t=cF();let i=JC(),n=bme();const s=Lh({});Pp(e,(e=>{e?(t.turnDisable=!0,PC("#index_main").addClass("index_main_screenshoting"),PC("#bottom_sidebar_main table").addClass("bottom_sidebar_main_disable")):(t.turnDisable=!1,PC("#index_main").removeClass("index_main_screenshoting"),PC("#bottom_sidebar_main table").removeClass("bottom_sidebar_main_disable"),n.commonState.shareDialogVisible&&PC(".share-modal-class").css({zIndex:2e3}),n.commonState.printDialogVisible&&PC(".print-modal-class").css({zIndex:2e3}))}));const r=e=>{s.left=e.left,s.top=e.top,s.width=e.width,s.height=e.height},a=()=>{if(PC("#screen-view")[0]){const e=PC("#screen-view")[0].getBoundingClientRect();e&&r(e)}};return{screenshotStatus:e,saveScreen:()=>{const t=document.querySelector("body");PC("#screenshot-main").css({zIndex:-1}),setTimeout((()=>{var i,n;(i=t,n={x:s.left+1,y:s.top+1,width:s.width-2,height:s.height-2,backgroundColor:"#ffffff",
// 设置为白色背景
useCORS:!0},void 0===n&&(n={}),Yfe(i,n)).then((function(t){const i=document.createElement("a");i.href=t.toDataURL(),i.download="actibookone_capture.png",i.click(),e.value=!1}))}),100)},setRectSize:r,setScreenshotWH:()=>{let e=PC(".pack_book_div ").width(),t=PC(".pack_book_div ").height(),s=PC("#book_main").width(),r=PC("#book_main").height(),o=Math.min(e,s),l=Math.min(t,r);parseInt(i.totalPageNo),PC("#screenshot-main").css({width:o,height:l,zIndex:n.toolBaseIndex.screenshotBox}),PC("#screen-view").css({width:"80%",height:"80%"}),a()},setLeftDistanceWithRect:a}})),jfe="function"==typeof Buffer,Jfe="function"==typeof TextDecoder?new TextDecoder:void 0,zfe="function"==typeof TextEncoder?new TextEncoder:void 0,Xfe=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),$fe=(()=>{let e={};return Xfe.forEach(((t,i)=>e[t]=i)),e})(),Zfe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,eme=String.fromCharCode.bind(String),tme="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),ime=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),nme=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),sme=e=>{let t,i,n,s,r="";const a=e.length%3;for(let o=0;o<e.length;){if((i=e.charCodeAt(o++))>255||(n=e.charCodeAt(o++))>255||(s=e.charCodeAt(o++))>255)throw new TypeError("invalid character found");t=i<<16|n<<8|s,r+=Xfe[t>>18&63]+Xfe[t>>12&63]+Xfe[t>>6&63]+Xfe[63&t]}return a?r.slice(0,a-3)+"===".substring(a):r},rme="function"==typeof btoa?e=>btoa(e):jfe?e=>Buffer.from(e,"binary").toString("base64"):sme,ame=jfe?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let i=0,n=e.length;i<n;i+=4096)t.push(eme.apply(null,e.subarray(i,i+4096)));return rme(t.join(""))},ome=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?eme(192|t>>>6)+eme(128|63&t):eme(224|t>>>12&15)+eme(128|t>>>6&63)+eme(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return eme(240|t>>>18&7)+eme(128|t>>>12&63)+eme(128|t>>>6&63)+eme(128|63&t)},lme=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ame=e=>e.replace(lme,ome),cme=jfe?e=>Buffer.from(e,"utf8").toString("base64"):zfe?e=>ame(zfe.encode(e)):e=>rme(Ame(e)),ume=(e,t=!1)=>t?ime(cme(e)):cme(e),hme=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,dme=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return eme(55296+(t>>>10))+eme(56320+(1023&t));case 3:return eme((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return eme((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},gme=e=>e.replace(hme,dme),pme=e=>{if(e=e.replace(/\s+/g,""),!Zfe.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,i,n,s="";for(let r=0;r<e.length;)t=$fe[e.charAt(r++)]<<18|$fe[e.charAt(r++)]<<12|(i=$fe[e.charAt(r++)])<<6|(n=$fe[e.charAt(r++)]),s+=64===i?eme(t>>16&255):64===n?eme(t>>16&255,t>>8&255):eme(t>>16&255,t>>8&255,255&t);return s},fme="function"==typeof atob?e=>atob(nme(e)):jfe?e=>Buffer.from(e,"base64").toString("binary"):pme,mme=jfe?e=>tme(Buffer.from(e,"base64")):e=>tme(fme(e).split("").map((e=>e.charCodeAt(0)))),Cme=jfe?e=>Buffer.from(e,"base64").toString("utf8"):Jfe?e=>Jfe.decode(mme(e)):e=>gme(fme(e)),Ime=e=>nme(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),vme=e=>Cme(Ime(e)),Bme=ume,yme=vme,bme=TC("common",(()=>{const e=cAe(),t=uAe(),i=RF(),n=cF(),s=JC(),r=PDe(),a=Wfe(),o=parseInt(s.get("totalPageNo")),l=Lh({sdMenuType:null,sdIsShowMenu:!1,pcSelButtonID:"acti-sidebar-toc-button",pcIsUnfold:!0,shareDialogVisible:!1,printDialogVisible:!1,shareEmbedFlgVisible:!1}),A=Lh({memo:o+200,sdMemoEditBox:o+300,screenshotBox:o+400,
// 截图框
painterTool:o+1e3,
//画笔工具
searchBox:o+5e3});Pp((()=>l.pcSelButtonID),(e=>{"acti-sidebar-toc-button"===e&&setTimeout((()=>{n.binkSelectedAndPosition()}),500)})),Pp((()=>l.shareDialogVisible),(e=>{e&&a.screenshotStatus&&setTimeout((()=>{PC(".share-modal-class").css({zIndex:-1})}))})),Pp((()=>l.printDialogVisible),(e=>{e&&a.screenshotStatus&&setTimeout((()=>{PC(".print-modal-class").css({zIndex:-1})}))}));const c=n=>{switch((e.painterInfo.openPainterTool||"painter"===l.sdMenuType)&&e.painterInfo.linesTotal>0&&e.saveCanvasToImg(!1),"search-pc"!==n&&(l.sdMenuType=null),e.painterInfo.openPainterTool=!1,t.memoState.isShowDialog=!1,i.show_dialog=!1,l.shareDialogVisible=!1,l.printDialogVisible=!1,n){case"painter-pc":e.painterInfo.openPainterTool=!0;break;case"memo-pc":t.memoState.isShowDialog=!0;break;case"search-pc":i.show_dialog=!0;break;case"show-share":l.shareDialogVisible=!0;break;case"show-print":l.printDialogVisible=!0}},u=e=>{if(window.navigator.userAgent.toLowerCase().indexOf("firefox")>0)"in"===e?PC("#fullScreen_extend_out").show():(PC("#fullScreen_extend_out").hide(),window.parent.triggerFullScreenFun&&window.parent.triggerFullScreenFun());else if("in"===e){var t=document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen(),PC("body").addClass("fullScreen_extend"),PC("#fullScreen_extend_out").show()}else document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),PC("body").removeClass("fullScreen_extend"),PC("#fullScreen_extend_out").hide()},h=()=>{var e=s.get("callAppUrl");if(e){let t=1==PC('input[name="searchRadio"]:checked').val();e=(e=d(e+="&isAndSearch="+t))+"&siteNum="+s.get("siteNum")+"&siteTitle="+s.get("siteTitle");let i="https://"+window.top.location.hostname+"/content/call_app?callAppUrl="+encodeURIComponent(Bme(encodeURI(e)));window.top.open(i)}},d=e=>{let t=PC.trim(PC("#sidebar_search_input").val())||"",i=e.indexOf("&keyword="),n=e.indexOf("&isAndSearch=");return e.slice(0,i+9)+t+e.slice(n)},g=qf((()=>e=>{let t=e.chapterTarget,i=e.target;return t||"0"!==e.target?!0===e.isShowPage||Number(t)<=0?i="":t&&!1===e.isShowPage&&(i=t):i="",i}));return{openApp:h,toolBaseIndex:A,commonState:l,targetNum:g,showThumbnail:(i="")=>{"painter"===l.sdMenuType&&e.saveCanvasToImg(!1),"memo"===i&&(t.memoState.sdIsShowMemoList&&(l.sdMenuType=null,t.memoState.sdIsShowMemoList=!1),t.memoState.selectedColorIdx=-1,t.memoState.sdIsShowSelectMemoBox=!0),"close"===i&&(l.sdIsShowMenu=!l.sdIsShowMenu,l.sdMenuType=null,t.memoState.sdIsShowMemoList=!1),l.sdMenuType===i?l.sdMenuType=null:l.sdMenuType=i,"painter"===l.sdMenuType&&(e.painterInfo.openPainterTool=!0),"thumbnail"===l.sdMenuType&&setTimeout((()=>{n.binkSelectedAndPosition()}),100)},showOnlyTools:c,bindLinkClickEvent:()=>{PC(document).on("click","#book_main div.link-layer div.linkBlock",(function(e){e.preventDefault();var t=PC(e.target).data("info"),i=PC(e.target).attr("pageno"),a=t.type,o=t.target;let l=e.target.getAttribute("pageno");if(a==OC.Link_Type_Audio){PC("#pageLink_audio_id").parent().show();var A=s.get("url_Prefix"),c=s.get("url_Suffix");PC("video").trigger("pause");var u={};u.src=A+"attachments/"+t.target+c,u.autoplay="autoplay",PC("#pageLink_audio_id").attr(u).attr("pageno",i),PC("#pageLink_audio_id").trigger("play"),PC("#pageLink_audio_id").on("ended",(function(){PC("#pageLink_audio_id").parent().hide()}))}else if(a==OC.Link_Type_File){A=s.get("url_Prefix"),c=s.get("url_Suffix");window.open(A+"attachments/"+o+c)}else if(a==OC.Link_Type_Goto){o=GC(o,1,1/0);var h=s.get("totalPageNo");o&&o>h&&(o=1),o&&setTimeout((()=>{n.gotoPageByTarget("toPageno",o,"turn_link",l)}),0)}else if(a==OC.Link_Type_URL){var d=PC("<a></a>");d.attr("href",o),0==o.indexOf("../")||o.match(/^(http|https):\/\//i)||"http:"!=d[0].protocol&&"https:"!=d[0].protocol||(o="http://"+o),window.open(o)}r.sendLogByActionTpye(OC.kinesis_log_actionType_link_click,t)}))},changeHistoryPram:(e,t)=>{try{if(1==s.get("embed_flg"))return;let i=window.top,n=i.location.href,r=e+"=([^&]*)",a=e+"="+t,o="";if(n.match(r)){let t=new RegExp("("+e+"=)([^&]*)","gi");o=n.replace(t,a)}else o=n.match("[?]")?n+"&"+a:n+"?"+a;i.history.replaceState(null,null,o)}catch(i){return}},fullScreenFun_extend:u,bindFunToWindow:()=>{window.showShareContent=()=>{c("show-share")},window.showPrintDialogContent=()=>{c("show-print")},window.triggerFullScreenFun=e=>{u(e)},PC(document).on("mouseenter","div.sidebar-button",(function(){"desktop"===device.type&&PC(".tooltips_left",this).show()})),PC(document).on("mouseleave","div.sidebar-button",(function(){PC(".tooltips_left",this).hide()})),window.openApp=h},updateLocalProgress:e=>{let t=s.get("readProgressKey");localStorage.getItem(t)!=e&&localStorage.setItem(t,e)},setButtonShowOrHideByPorts:()=>{var e=s.get("embed_flg"),t=s.get("contentInfoDispFlg"),i=s.get("hasText");let n=!!(navigator.userAgent.match(/(iPad)/)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1);if(device.mobile())0==t?PC("body").addClass("acti_noContentInfo"):1==t&&PC("body").addClass("acti_contentInfo");else if("1"==e){PC("body").addClass("embed_flg"),PC("#right_sidebar_main").show(),PC("#sidebar_full_srceen").show();var r=s.get("appButtonDispFlg");(device.tablet()||n)&&"0"!=r&&PC(".appdownload").show(),1==s.get("shareableFlg")&&PC(".sidebar_share").css("visibility","visible"),PC("#sidebar_pen").parent().hide(),PC("#sidebar_memo").parent().hide(),PC("#sidebar_cut").parent().remove()}else 0==t?(PC("body").addClass("acti_noContentInfo"),PC("#right_sidebar_main").show(),device.tablet()):1==t&&PC("body").addClass("acti_contentInfo");PC("#bottom_sidebar_main .sidebar_print").hide(),PC("#right_sidebar_main .printer_button").hide();var a=s.get("chapterJsons");if(a&&a.length>0?PC(".acti-not-hamburger").removeClass("acti-not-hamburger"):PC("#acti-mobile-hamburger-button").parent().hide(),PC(".acti-not-hamburger").removeClass("acti-not-hamburger"),"1"==i?PC(".search_main").css("visibility","visible"):PC("#acti-mobile-search-button").parent().hide(),device.mobile()||device.tablet()||n)try{for(var o=window,l=0;l<5&&(o=o.parent,!PC("body",o.document).hasClass("topPage"));l++);1==o.history.length?PC(".acti-goBack-button").css("visibility","hidden"):(App.CommonUtilController.setTapEvent(".acti-goBack-button"),PC(".acti-goBack-button").on("tapOne",(function(){var e=window;try{for(var t=!1,i=0;i<5;i++)if(e=e.parent,PC("body",e.document).hasClass("topPage")){e.history.go(-1),t=!0;break}if(t)return}catch(I2){}window.history.go(-1)})))}catch(I2){}"1"==s.get("cutFlg")?PC("#sidebar_cut").parent().show():PC("#sidebar_cut").parent().remove()}}}));class Eme extends Error{}class wme extends Eme{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Qme extends Eme{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class _me extends Eme{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Sme extends Eme{}class xme extends Eme{constructor(e){super(`Invalid unit ${e}`)}}class kme extends Eme{}class Dme extends Eme{constructor(){super("Zone is an abstract class")}}const Fme="numeric",Tme="short",Mme="long",Rme={year:Fme,month:Fme,day:Fme},Nme={year:Fme,month:Tme,day:Fme},Lme={year:Fme,month:Tme,day:Fme,weekday:Tme},Ume={year:Fme,month:Mme,day:Fme},Hme={year:Fme,month:Mme,day:Fme,weekday:Mme},Pme={hour:Fme,minute:Fme},Ome={hour:Fme,minute:Fme,second:Fme},Gme={hour:Fme,minute:Fme,second:Fme,timeZoneName:Tme},Kme={hour:Fme,minute:Fme,second:Fme,timeZoneName:Mme},qme={hour:Fme,minute:Fme,hourCycle:"h23"},Yme={hour:Fme,minute:Fme,second:Fme,hourCycle:"h23"},Vme={hour:Fme,minute:Fme,second:Fme,hourCycle:"h23",timeZoneName:Tme},Wme={hour:Fme,minute:Fme,second:Fme,hourCycle:"h23",timeZoneName:Mme},jme={year:Fme,month:Fme,day:Fme,hour:Fme,minute:Fme},Jme={year:Fme,month:Fme,day:Fme,hour:Fme,minute:Fme,second:Fme},zme={year:Fme,month:Tme,day:Fme,hour:Fme,minute:Fme},Xme={year:Fme,month:Tme,day:Fme,hour:Fme,minute:Fme,second:Fme},$me={year:Fme,month:Tme,day:Fme,weekday:Tme,hour:Fme,minute:Fme},Zme={year:Fme,month:Mme,day:Fme,hour:Fme,minute:Fme,timeZoneName:Tme},eCe={year:Fme,month:Mme,day:Fme,hour:Fme,minute:Fme,second:Fme,timeZoneName:Tme},tCe={year:Fme,month:Mme,day:Fme,weekday:Mme,hour:Fme,minute:Fme,timeZoneName:Mme},iCe={year:Fme,month:Mme,day:Fme,weekday:Mme,hour:Fme,minute:Fme,second:Fme,timeZoneName:Mme};class nCe{
/**
   * The type of zone
   * @abstract
   * @type {string}
   */
get type(){throw new Dme}
/**
   * The name of this zone.
   * @abstract
   * @type {string}
   */get name(){throw new Dme}
/**
   * The IANA name of this zone.
   * Defaults to `name` if not overwritten by a subclass.
   * @abstract
   * @type {string}
   */get ianaName(){return this.name}
/**
   * Returns whether the offset is known to be fixed for the whole year.
   * @abstract
   * @type {boolean}
   */get isUniversal(){throw new Dme}
/**
   * Returns the offset's common name (such as EST) at the specified timestamp
   * @abstract
   * @param {number} ts - Epoch milliseconds for which to get the name
   * @param {Object} opts - Options to affect the format
   * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.
   * @param {string} opts.locale - What locale to return the offset name in.
   * @return {string}
   */offsetName(e,t){throw new Dme}
/**
   * Returns the offset's value as a string
   * @abstract
   * @param {number} ts - Epoch milliseconds for which to get the offset
   * @param {string} format - What style of offset to return.
   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
   * @return {string}
   */formatOffset(e,t){throw new Dme}
/**
   * Return the offset in minutes for this zone at the specified timestamp.
   * @abstract
   * @param {number} ts - Epoch milliseconds for which to compute the offset
   * @return {number}
   */offset(e){throw new Dme}
/**
   * Return whether this Zone is equal to another zone
   * @abstract
   * @param {Zone} otherZone - the zone to compare
   * @return {boolean}
   */equals(e){throw new Dme}
/**
   * Return whether this Zone is valid.
   * @abstract
   * @type {boolean}
   */get isValid(){throw new Dme}}let sCe=null;class rCe extends nCe{
/**
   * Get a singleton instance of the local zone
   * @return {SystemZone}
   */
static get instance(){return null===sCe&&(sCe=new rCe),sCe}
/** @override **/get type(){return"system"}
/** @override **/get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}
/** @override **/get isUniversal(){return!1}
/** @override **/offsetName(e,{format:t,locale:i}){return bIe(e,t,i)}
/** @override **/formatOffset(e,t){return _Ie(this.offset(e),t)}
/** @override **/offset(e){return-new Date(e).getTimezoneOffset()}
/** @override **/equals(e){return"system"===e.type}
/** @override **/get isValid(){return!0}}let aCe={};const oCe={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let lCe={};class ACe extends nCe{
/**
   * @param {string} name - Zone name
   * @return {IANAZone}
   */
static create(e){return lCe[e]||(lCe[e]=new ACe(e)),lCe[e]}
/**
   * Reset local caches. Should only be necessary in testing scenarios.
   * @return {void}
   */static resetCache(){lCe={},aCe={}}
/**
   * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.
   * @param {string} s - The string to check validity on
   * @example IANAZone.isValidSpecifier("America/New_York") //=> true
   * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false
   * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.
   * @return {boolean}
   */static isValidSpecifier(e){return this.isValidZone(e)}
/**
   * Returns whether the provided string identifies a real zone
   * @param {string} zone - The string to check
   * @example IANAZone.isValidZone("America/New_York") //=> true
   * @example IANAZone.isValidZone("Fantasia/Castle") //=> false
   * @example IANAZone.isValidZone("Sport~~blorp") //=> false
   * @return {boolean}
   */static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(I2){return!1}}constructor(e){super(),this.zoneName=e,this.valid=ACe.isValidZone(e)}
/**
   * The type of zone. `iana` for all instances of `IANAZone`.
   * @override
   * @type {string}
   */get type(){return"iana"}
/**
   * The name of this zone (i.e. the IANA zone name).
   * @override
   * @type {string}
   */get name(){return this.zoneName}
/**
   * Returns whether the offset is known to be fixed for the whole year:
   * Always returns false for all IANA zones.
   * @override
   * @type {boolean}
   */get isUniversal(){return!1}
/**
   * Returns the offset's common name (such as EST) at the specified timestamp
   * @override
   * @param {number} ts - Epoch milliseconds for which to get the name
   * @param {Object} opts - Options to affect the format
   * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.
   * @param {string} opts.locale - What locale to return the offset name in.
   * @return {string}
   */offsetName(e,{format:t,locale:i}){return bIe(e,t,i,this.name)}
/**
   * Returns the offset's value as a string
   * @override
   * @param {number} ts - Epoch milliseconds for which to get the offset
   * @param {string} format - What style of offset to return.
   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
   * @return {string}
   */formatOffset(e,t){return _Ie(this.offset(e),t)}
/**
   * Return the offset in minutes for this zone at the specified timestamp.
   * @override
   * @param {number} ts - Epoch milliseconds for which to compute the offset
   * @return {number}
   */offset(e){const t=new Date(e);if(isNaN(t))return NaN;const i=(n=this.name,aCe[n]||(aCe[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),aCe[n]);var n;let[s,r,a,o,l,A,c]=i.formatToParts?function(e,t){const i=e.formatToParts(t),n=[];for(let s=0;s<i.length;s++){const{type:e,value:t}=i[s],r=oCe[e];"era"===e?n[r]=t:iIe(r)||(n[r]=parseInt(t,10))}return n}(i,t):function(e,t){const i=e.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,s,r,a,o,l,A,c]=n;return[a,s,r,o,l,A,c]}(i,t);"BC"===o&&(s=1-Math.abs(s));let u=+t;const h=u%1e3;return u-=h>=0?h:1e3+h,(IIe({year:s,month:r,day:a,hour:24===l?0:l,minute:A,second:c,millisecond:0})-u)/6e4}
/**
   * Return whether this Zone is equal to another zone
   * @override
   * @param {Zone} otherZone - the zone to compare
   * @return {boolean}
   */equals(e){return"iana"===e.type&&e.name===this.name}
/**
   * Return whether this Zone is valid.
   * @override
   * @type {boolean}
   */get isValid(){return this.valid}}let cCe={};let uCe={};function hCe(e,t={}){const i=JSON.stringify([e,t]);let n=uCe[i];return n||(n=new Intl.DateTimeFormat(e,t),uCe[i]=n),n}let dCe={};let gCe={};let pCe=null;let fCe={};function mCe(e,t,i,n){const s=e.listingMode();return"error"===s?null:"en"===s?i(t):n(t)}class CCe{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:s,...r}=i;if(!t||Object.keys(r).length>0){const t={useGrouping:!1,...i};i.padTo>0&&(t.minimumIntegerDigits=i.padTo),this.inf=function(e,t={}){const i=JSON.stringify([e,t]);let n=dCe[i];return n||(n=new Intl.NumberFormat(e,t),dCe[i]=n),n}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return uIe(this.floor?Math.floor(e):pIe(e,3),this.padTo)}}class ICe{constructor(e,t,i){let n;if(this.opts=i,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,i=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&ACe.create(i).valid?(n=i,this.dt=e):(n="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,n=e.zone.name):(n="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||n,this.dtf=hCe(t,s)}format(){return this.originalZone?this.formatToParts().map((({value:e})=>e)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map((e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e})):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class vCe{constructor(e,t,i){this.opts={style:"long",...i},!t&&rIe()&&(this.rtf=function(e,t={}){const{base:i,...n}=t,s=JSON.stringify([e,n]);let r=gCe[s];return r||(r=new Intl.RelativeTimeFormat(e,t),gCe[s]=r),r}(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,i="always",n=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===i&&r){const i="days"===e;switch(t){case 1:return i?"tomorrow":`next ${s[e][0]}`;case-1:return i?"yesterday":`last ${s[e][0]}`;case 0:return i?"today":`this ${s[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),l=1===o,A=s[e],c=n?l?A[1]:A[2]||A[1]:l?s[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const BCe={firstDay:1,minimalDays:4,weekend:[6,7]};let yCe=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,i,n,s,r=!1){const a=t||PCe.defaultLocale,o=a||(r?"en-US":pCe||(pCe=(new Intl.DateTimeFormat).resolvedOptions().locale,pCe)),l=i||PCe.defaultNumberingSystem,A=n||PCe.defaultOutputCalendar,c=AIe(s)||PCe.defaultWeekSettings;return new e(o,l,A,c,a)}static resetCache(){pCe=null,uCe={},dCe={},gCe={}}static fromObject({locale:t,numberingSystem:i,outputCalendar:n,weekSettings:s}={}){return e.create(t,i,n,s)}constructor(e,t,i,n,s){const[r,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const i=e.indexOf("-u-");if(-1===i)return[e];{let t,n;try{t=hCe(e).resolvedOptions(),n=e}catch(I2){const r=e.substring(0,i);t=hCe(r).resolvedOptions(),n=r}const{numberingSystem:s,calendar:r}=t;return[n,s,r]}}(e);this.locale=r,this.numberingSystem=t||a||null,this.outputCalendar=i||o||null,this.weekSettings=n,this.intl=function(e,t,i){return i||t?(e.includes("-u-")||(e+="-u"),i&&(e+=`-ca-${i}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,AIe(t.weekSettings)||this.weekSettings,t.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return mCe(this,e,FIe,(()=>{const i=t?{month:e,day:"numeric"}:{month:e},n=t?"format":"standalone";return this.monthsCache[n][e]||(this.monthsCache[n][e]=function(e){const t=[];for(let i=1;i<=12;i++){const n=RBe.utc(2009,i,1);t.push(e(n))}return t}((e=>this.extract(e,i,"month")))),this.monthsCache[n][e]}))}weekdays(e,t=!1){return mCe(this,e,NIe,(()=>{const i=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=t?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=function(e){const t=[];for(let i=1;i<=7;i++){const n=RBe.utc(2016,11,13+i);t.push(e(n))}return t}((e=>this.extract(e,i,"weekday")))),this.weekdaysCache[n][e]}))}meridiems(){return mCe(this,void 0,(()=>LIe),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[RBe.utc(2016,11,13,9),RBe.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e){return mCe(this,e,OIe,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[RBe.utc(-40,1,1),RBe.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,i){const n=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===i));return n?n.value:null}numberFormatter(e={}){return new CCe(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new ICe(e,this.intl,t)}relFormatter(e={}){return new vCe(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const i=JSON.stringify([e,t]);let n=cCe[i];return n||(n=new Intl.ListFormat(e,t),cCe[i]=n),n}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:aIe()?function(e){let t=fCe[e];if(!t){const i=new Intl.Locale(e);t="getWeekInfo"in i?i.getWeekInfo():i.weekInfo,fCe[e]=t}return t}(this.locale):BCe}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},bCe=null;class ECe extends nCe{
/**
   * Get a singleton instance of UTC
   * @return {FixedOffsetZone}
   */
static get utcInstance(){return null===bCe&&(bCe=new ECe(0)),bCe}
/**
   * Get an instance with a specified offset
   * @param {number} offset - The offset in minutes
   * @return {FixedOffsetZone}
   */static instance(e){return 0===e?ECe.utcInstance:new ECe(e)}
/**
   * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6"
   * @param {string} s - The offset string to parse
   * @example FixedOffsetZone.parseSpecifier("UTC+6")
   * @example FixedOffsetZone.parseSpecifier("UTC+06")
   * @example FixedOffsetZone.parseSpecifier("UTC-6:00")
   * @return {FixedOffsetZone}
   */static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ECe(EIe(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}
/**
   * The type of zone. `fixed` for all instances of `FixedOffsetZone`.
   * @override
   * @type {string}
   */get type(){return"fixed"}
/**
   * The name of this zone.
   * All fixed zones' names always start with "UTC" (plus optional offset)
   * @override
   * @type {string}
   */get name(){return 0===this.fixed?"UTC":`UTC${_Ie(this.fixed,"narrow")}`}
/**
   * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`
   *
   * @override
   * @type {string}
   */get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${_Ie(-this.fixed,"narrow")}`}
/**
   * Returns the offset's common name at the specified timestamp.
   *
   * For fixed offset zones this equals to the zone name.
   * @override
   */offsetName(){return this.name}
/**
   * Returns the offset's value as a string
   * @override
   * @param {number} ts - Epoch milliseconds for which to get the offset
   * @param {string} format - What style of offset to return.
   *                          Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
   * @return {string}
   */formatOffset(e,t){return _Ie(this.fixed,t)}
/**
   * Returns whether the offset is known to be fixed for the whole year:
   * Always returns true for all fixed offset zones.
   * @override
   * @type {boolean}
   */get isUniversal(){return!0}
/**
   * Return the offset in minutes for this zone at the specified timestamp.
   *
   * For fixed offset zones, this is constant and does not depend on a timestamp.
   * @override
   * @return {number}
   */offset(){return this.fixed}
/**
   * Return whether this Zone is equal to another zone (i.e. also fixed and same offset)
   * @override
   * @param {Zone} otherZone - the zone to compare
   * @return {boolean}
   */equals(e){return"fixed"===e.type&&e.fixed===this.fixed}
/**
   * Return whether this Zone is valid:
   * All fixed offset zones are valid.
   * @override
   * @type {boolean}
   */get isValid(){return!0}}class wCe extends nCe{constructor(e){super(),this.zoneName=e}
/** @override **/get type(){return"invalid"}
/** @override **/get name(){return this.zoneName}
/** @override **/get isUniversal(){return!1}
/** @override **/offsetName(){return null}
/** @override **/formatOffset(){return""}
/** @override **/offset(){return NaN}
/** @override **/equals(){return!1}
/** @override **/get isValid(){return!1}}function QCe(e,t){if(iIe(e)||null===e)return t;if(e instanceof nCe)return e;if("string"==typeof e){const i=e.toLowerCase();return"default"===i?t:"local"===i||"system"===i?rCe.instance:"utc"===i||"gmt"===i?ECe.utcInstance:ECe.parseSpecifier(i)||ACe.create(e)}return nIe(e)?ECe.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new wCe(e)}const _Ce={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[０-９]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},SCe={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},xCe=_Ce.hanidec.replace(/[\[|\]]/g,"").split("");let kCe={};function DCe({numberingSystem:e},t=""){const i=e||"latn";return kCe[i]||(kCe[i]={}),kCe[i][t]||(kCe[i][t]=new RegExp(`${_Ce[i]}${t}`)),kCe[i][t]}let FCe,TCe=()=>Date.now(),MCe="system",RCe=null,NCe=null,LCe=null,UCe=60,HCe=null;class PCe{
/**
   * Get the callback for returning the current timestamp.
   * @type {function}
   */
static get now(){return TCe}
/**
   * Set the callback for returning the current timestamp.
   * The function should return a number, which will be interpreted as an Epoch millisecond count
   * @type {function}
   * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future
   * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
   */static set now(e){TCe=e}
/**
   * Set the default time zone to create DateTimes in. Does not affect existing instances.
   * Use the value "system" to reset this value to the system's time zone.
   * @type {string}
   */static set defaultZone(e){MCe=e}
/**
   * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
   * The default value is the system's time zone (the one set on the machine that runs this code).
   * @type {Zone}
   */static get defaultZone(){return QCe(MCe,rCe.instance)}
/**
   * Get the default locale to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */static get defaultLocale(){return RCe}
/**
   * Set the default locale to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */static set defaultLocale(e){RCe=e}
/**
   * Get the default numbering system to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */static get defaultNumberingSystem(){return NCe}
/**
   * Set the default numbering system to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */static set defaultNumberingSystem(e){NCe=e}
/**
   * Get the default output calendar to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */static get defaultOutputCalendar(){return LCe}
/**
   * Set the default output calendar to create DateTimes with. Does not affect existing instances.
   * @type {string}
   */static set defaultOutputCalendar(e){LCe=e}
/**
   * @typedef {Object} WeekSettings
   * @property {number} firstDay
   * @property {number} minimalDays
   * @property {number[]} weekend
   */
/**
   * @return {WeekSettings|null}
   */static get defaultWeekSettings(){return HCe}
/**
   * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and
   * how many days are required in the first week of a year.
   * Does not affect existing instances.
   *
   * @param {WeekSettings|null} weekSettings
   */static set defaultWeekSettings(e){HCe=AIe(e)}
/**
   * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
   * @type {number}
   */static get twoDigitCutoffYear(){return UCe}
/**
   * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
   * @type {number}
   * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century
   * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century
   * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950
   * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50
   * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
   */static set twoDigitCutoffYear(e){UCe=e%100}
/**
   * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
   * @type {boolean}
   */static get throwOnInvalid(){return FCe}
/**
   * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
   * @type {boolean}
   */static set throwOnInvalid(e){FCe=e}
/**
   * Reset Luxon's global caches. Should only be necessary in testing scenarios.
   * @return {void}
   */static resetCaches(){yCe.resetCache(),ACe.resetCache(),RBe.resetCache(),kCe={}}}class OCe{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const GCe=[0,31,59,90,120,151,181,212,243,273,304,334],KCe=[0,31,60,91,121,152,182,213,244,274,305,335];function qCe(e,t){return new OCe("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function YCe(e,t,i){const n=new Date(Date.UTC(e,t-1,i));e<100&&e>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const s=n.getUTCDay();return 0===s?7:s}function VCe(e,t,i){return i+(fIe(e)?KCe:GCe)[t-1]}function WCe(e,t){const i=fIe(e)?KCe:GCe,n=i.findIndex((e=>e<t));return{month:n+1,day:t-i[n]}}function jCe(e,t){return(e-t+7)%7+1}function JCe(e,t=4,i=1){const{year:n,month:s,day:r}=e,a=VCe(n,s,r),o=jCe(YCe(n,s,r),i);let l,A=Math.floor((a-o+14-t)/7);return A<1?(l=n-1,A=BIe(l,t,i)):A>BIe(n,t,i)?(l=n+1,A=1):l=n,{weekYear:l,weekNumber:A,weekday:o,...SIe(e)}}function zCe(e,t=4,i=1){const{weekYear:n,weekNumber:s,weekday:r}=e,a=jCe(YCe(n,1,t),i),o=mIe(n);let l,A=7*s+r-a-7+t;A<1?(l=n-1,A+=mIe(l)):A>o?(l=n+1,A-=mIe(n)):l=n;const{month:c,day:u}=WCe(l,A);return{year:l,month:c,day:u,...SIe(e)}}function XCe(e){const{year:t,month:i,day:n}=e;return{year:t,ordinal:VCe(t,i,n),...SIe(e)}}function $Ce(e){const{year:t,ordinal:i}=e,{month:n,day:s}=WCe(t,i);return{year:t,month:n,day:s,...SIe(e)}}function ZCe(e,t){if(!iIe(e.localWeekday)||!iIe(e.localWeekNumber)||!iIe(e.localWeekYear)){if(!iIe(e.weekday)||!iIe(e.weekNumber)||!iIe(e.weekYear))throw new Sme("Cannot mix locale-based week fields with ISO-based week fields");return iIe(e.localWeekday)||(e.weekday=e.localWeekday),iIe(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),iIe(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function eIe(e){const t=sIe(e.year),i=cIe(e.month,1,12),n=cIe(e.day,1,CIe(e.year,e.month));return t?i?!n&&qCe("day",e.day):qCe("month",e.month):qCe("year",e.year)}function tIe(e){const{hour:t,minute:i,second:n,millisecond:s}=e,r=cIe(t,0,23)||24===t&&0===i&&0===n&&0===s,a=cIe(i,0,59),o=cIe(n,0,59),l=cIe(s,0,999);return r?a?o?!l&&qCe("millisecond",s):qCe("second",n):qCe("minute",i):qCe("hour",t)}function iIe(e){return void 0===e}function nIe(e){return"number"==typeof e}function sIe(e){return"number"==typeof e&&e%1==0}function rIe(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(I2){return!1}}function aIe(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(I2){return!1}}function oIe(e,t,i){if(0!==e.length)return e.reduce(((e,n)=>{const s=[t(n),n];return e&&i(e[0],s[0])===e[0]?e:s}),null)[1]}function lIe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function AIe(e){if(null==e)return null;if("object"!=typeof e)throw new kme("Week settings must be an object");if(!cIe(e.firstDay,1,7)||!cIe(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((e=>!cIe(e,1,7))))throw new kme("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function cIe(e,t,i){return sIe(e)&&e>=t&&e<=i}function uIe(e,t=2){let i;return i=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),i}function hIe(e){return iIe(e)||null===e||""===e?void 0:parseInt(e,10)}function dIe(e){return iIe(e)||null===e||""===e?void 0:parseFloat(e)}function gIe(e){if(!iIe(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function pIe(e,t,i=!1){const n=10**t;return(i?Math.trunc:Math.round)(e*n)/n}function fIe(e){return e%4==0&&(e%100!=0||e%400==0)}function mIe(e){return fIe(e)?366:365}function CIe(e,t){const i=(n=t-1)-(s=12)*Math.floor(n/s)+1;var n,s;return 2===i?fIe(e+(t-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function IIe(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function vIe(e,t,i){return-jCe(YCe(e,1,t),i)+t-1}function BIe(e,t=4,i=1){const n=vIe(e,t,i),s=vIe(e+1,t,i);return(mIe(e)-n+s)/7}function yIe(e){return e>99?e:e>PCe.twoDigitCutoffYear?1900+e:2e3+e}function bIe(e,t,i,n=null){const s=new Date(e),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(r.timeZone=n);const a={timeZoneName:t,...r},o=new Intl.DateTimeFormat(i,a).formatToParts(s).find((e=>"timezonename"===e.type.toLowerCase()));return o?o.value:null}function EIe(e,t){let i=parseInt(e,10);Number.isNaN(i)&&(i=0);const n=parseInt(t,10)||0;return 60*i+(i<0||Object.is(i,-0)?-n:n)}function wIe(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new kme(`Invalid unit value ${e}`);return t}function QIe(e,t){const i={};for(const n in e)if(lIe(e,n)){const s=e[n];if(null==s)continue;i[t(n)]=wIe(s)}return i}function _Ie(e,t){const i=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${uIe(i,2)}:${uIe(n,2)}`;case"narrow":return`${s}${i}${n>0?`:${n}`:""}`;case"techie":return`${s}${uIe(i,2)}${uIe(n,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function SIe(e){return function(e,t){return t.reduce(((t,i)=>(t[i]=e[i],t)),{})}(e,["hour","minute","second","millisecond"])}const xIe=["January","February","March","April","May","June","July","August","September","October","November","December"],kIe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],DIe=["J","F","M","A","M","J","J","A","S","O","N","D"];function FIe(e){switch(e){case"narrow":return[...DIe];case"short":return[...kIe];case"long":return[...xIe];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const TIe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],MIe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],RIe=["M","T","W","T","F","S","S"];function NIe(e){switch(e){case"narrow":return[...RIe];case"short":return[...MIe];case"long":return[...TIe];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const LIe=["AM","PM"],UIe=["Before Christ","Anno Domini"],HIe=["BC","AD"],PIe=["B","A"];function OIe(e){switch(e){case"narrow":return[...PIe];case"short":return[...HIe];case"long":return[...UIe];default:return null}}function GIe(e,t){let i="";for(const n of e)n.literal?i+=n.val:i+=t(n.val);return i}const KIe={D:Rme,DD:Nme,DDD:Ume,DDDD:Hme,t:Pme,tt:Ome,ttt:Gme,tttt:Kme,T:qme,TT:Yme,TTT:Vme,TTTT:Wme,f:jme,ff:zme,fff:Zme,ffff:tCe,F:Jme,FF:Xme,FFF:eCe,FFFF:iCe};class qIe{static create(e,t={}){return new qIe(e,t)}static parseFormat(e){let t=null,i="",n=!1;const s=[];for(let r=0;r<e.length;r++){const a=e.charAt(r);"'"===a?(i.length>0&&s.push({literal:n||/^\s+$/.test(i),val:i}),t=null,i="",n=!n):n||a===t?i+=a:(i.length>0&&s.push({literal:/^\s+$/.test(i),val:i}),i=a,t=a)}return i.length>0&&s.push({literal:n||/^\s+$/.test(i),val:i}),s}static macroTokenToFormatOpts(e){return KIe[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return uIe(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(t,i)=>this.loc.extract(e,t,i),r=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=()=>i?function(e){return LIe[e.hour<12?0:1]}(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),o=(t,n)=>i?function(e,t){return FIe(t)[e.month-1]}(e,t):s(n?{month:t}:{month:t,day:"numeric"},"month"),l=(t,n)=>i?function(e,t){return NIe(t)[e.weekday-1]}(e,t):s(n?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),A=t=>{const i=qIe.macroTokenToFormatOpts(t);return i?this.formatWithSystemDefault(e,i):t},c=t=>i?function(e,t){return OIe(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return GIe(qIe.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return n?s({day:"numeric"},"day"):this.num(e.day);case"dd":return n?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return n?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return n?s({month:"numeric"},"month"):this.num(e.month);case"MM":return n?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return n?s({year:"numeric"},"year"):this.num(e.year);case"yy":return n?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return A(t)}}))}formatDurationFromString(e,t){const i=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=qIe.parseFormat(t),s=n.reduce(((e,{literal:t,val:i})=>t?e:e.concat(i)),[]),r=e.shiftTo(...s.map(i).filter((e=>e)));return GIe(n,(e=>t=>{const n=i(t);return n?this.num(e.get(n),t.length):t})(r))}}const YIe=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function VIe(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function WIe(...e){return t=>e.reduce((([e,i,n],s)=>{const[r,a,o]=s(t,n);return[{...e,...r},a||i,o]}),[{},null,1]).slice(0,2)}function jIe(e,...t){if(null==e)return[null,null];for(const[i,n]of t){const t=i.exec(e);if(t)return n(t)}return[null,null]}function JIe(...e){return(t,i)=>{const n={};let s;for(s=0;s<e.length;s++)n[e[s]]=hIe(t[i+s]);return[n,null,i+s]}}const zIe=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,XIe=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,$Ie=RegExp(`${XIe.source}${`(?:${zIe.source}?(?:\\[(${YIe.source})\\])?)?`}`),ZIe=RegExp(`(?:T${$Ie.source})?`),eve=JIe("weekYear","weekNumber","weekDay"),tve=JIe("year","ordinal"),ive=RegExp(`${XIe.source} ?(?:${zIe.source}|(${YIe.source}))?`),nve=RegExp(`(?: ${ive.source})?`);function sve(e,t,i){const n=e[t];return iIe(n)?i:hIe(n)}function rve(e,t){return[{hours:sve(e,t,0),minutes:sve(e,t+1,0),seconds:sve(e,t+2,0),milliseconds:gIe(e[t+3])},null,t+4]}function ave(e,t){const i=!e[t]&&!e[t+1],n=EIe(e[t+1],e[t+2]);return[{},i?null:ECe.instance(n),t+3]}function ove(e,t){return[{},e[t]?ACe.create(e[t]):null,t+1]}const lve=RegExp(`^T?${XIe.source}$`),Ave=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function cve(e){const[t,i,n,s,r,a,o,l,A]=e,c="-"===t[0],u=l&&"-"===l[0],h=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:h(dIe(i)),months:h(dIe(n)),weeks:h(dIe(s)),days:h(dIe(r)),hours:h(dIe(a)),minutes:h(dIe(o)),seconds:h(dIe(l),"-0"===l),milliseconds:h(gIe(A),u)}]}const uve={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function hve(e,t,i,n,s,r,a){const o={year:2===t.length?yIe(hIe(t)):hIe(t),month:kIe.indexOf(i)+1,day:hIe(n),hour:hIe(s),minute:hIe(r)};return a&&(o.second=hIe(a)),e&&(o.weekday=e.length>3?TIe.indexOf(e)+1:MIe.indexOf(e)+1),o}const dve=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function gve(e){const[,t,i,n,s,r,a,o,l,A,c,u]=e,h=hve(t,s,n,i,r,a,o);let d;return d=l?uve[l]:A?0:EIe(c,u),[h,new ECe(d)]}const pve=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,fve=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,mve=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Cve(e){const[,t,i,n,s,r,a,o]=e;return[hve(t,s,n,i,r,a,o),ECe.utcInstance]}function Ive(e){const[,t,i,n,s,r,a,o]=e;return[hve(t,o,i,n,s,r,a),ECe.utcInstance]}const vve=VIe(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ZIe),Bve=VIe(/(\d{4})-?W(\d\d)(?:-?(\d))?/,ZIe),yve=VIe(/(\d{4})-?(\d{3})/,ZIe),bve=VIe($Ie),Eve=WIe((function(e,t){return[{year:sve(e,t),month:sve(e,t+1,1),day:sve(e,t+2,1)},null,t+3]}),rve,ave,ove),wve=WIe(eve,rve,ave,ove),Qve=WIe(tve,rve,ave,ove),_ve=WIe(rve,ave,ove);const Sve=WIe(rve);const xve=VIe(/(\d{4})-(\d\d)-(\d\d)/,nve),kve=VIe(ive),Dve=WIe(rve,ave,ove);const Fve="Invalid Duration",Tve={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Mve={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...Tve},Rve=365.2425,Nve=30.436875,Lve={years:{quarters:4,months:12,weeks:52.1775,days:Rve,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:Nve,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...Tve},Uve=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Hve=Uve.slice(0).reverse();function Pve(e,t,i=!1){const n={values:i?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Kve(n)}function Ove(e,t){let i=t.milliseconds??0;for(const n of Hve.slice(1))t[n]&&(i+=t[n]*e[n].milliseconds);return i}function Gve(e,t){const i=Ove(e,t)<0?-1:1;Uve.reduceRight(((n,s)=>{if(iIe(t[s]))return n;if(n){const r=t[n]*i,a=e[s][n],o=Math.floor(r/a);t[s]+=o*i,t[n]-=o*a*i}return s}),null),Uve.reduce(((i,n)=>{if(iIe(t[n]))return i;if(i){const s=t[i]%1;t[i]-=s,t[n]+=s*e[i][n]}return n}),null)}class Kve{
/**
   * @private
   */
constructor(e){const t="longterm"===e.conversionAccuracy||!1;let i=t?Lve:Mve;e.matrix&&(i=e.matrix),this.values=e.values,this.loc=e.loc||yCe.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=i,this.isLuxonDuration=!0}
/**
   * Create Duration from a number of milliseconds.
   * @param {number} count of milliseconds
   * @param {Object} opts - options for parsing
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @return {Duration}
   */static fromMillis(e,t){return Kve.fromObject({milliseconds:e},t)}
/**
   * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.
   * If this object is empty then a zero milliseconds duration is returned.
   * @param {Object} obj - the object to create the DateTime from
   * @param {number} obj.years
   * @param {number} obj.quarters
   * @param {number} obj.months
   * @param {number} obj.weeks
   * @param {number} obj.days
   * @param {number} obj.hours
   * @param {number} obj.minutes
   * @param {number} obj.seconds
   * @param {number} obj.milliseconds
   * @param {Object} [opts=[]] - options for creating this Duration
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
   * @param {string} [opts.matrix=Object] - the custom conversion system to use
   * @return {Duration}
   */static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new kme("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Kve({values:QIe(e,Kve.normalizeUnit),loc:yCe.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}
/**
   * Create a Duration from DurationLike.
   *
   * @param {Object | number | Duration} durationLike
   * One of:
   * - object with keys like 'years' and 'hours'.
   * - number representing milliseconds
   * - Duration instance
   * @return {Duration}
   */static fromDurationLike(e){if(nIe(e))return Kve.fromMillis(e);if(Kve.isDuration(e))return e;if("object"==typeof e)return Kve.fromObject(e);throw new kme(`Unknown duration argument ${e} of type ${typeof e}`)}
/**
   * Create a Duration from an ISO 8601 duration string.
   * @param {string} text - text to parse
   * @param {Object} opts - options for parsing
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
   * @param {string} [opts.matrix=Object] - the preset conversion system to use
   * @see https://en.wikipedia.org/wiki/ISO_8601#Durations
   * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }
   * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }
   * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }
   * @return {Duration}
   */static fromISO(e,t){const[i]=jIe(e,[Ave,cve]);return i?Kve.fromObject(i,t):Kve.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}
/**
   * Create a Duration from an ISO 8601 time string.
   * @param {string} text - text to parse
   * @param {Object} opts - options for parsing
   * @param {string} [opts.locale='en-US'] - the locale to use
   * @param {string} opts.numberingSystem - the numbering system to use
   * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
   * @param {string} [opts.matrix=Object] - the conversion system to use
   * @see https://en.wikipedia.org/wiki/ISO_8601#Times
   * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }
   * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
   * @return {Duration}
   */static fromISOTime(e,t){const[i]=jIe(e,[lve,Sve]);return i?Kve.fromObject(i,t):Kve.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}
/**
   * Create an invalid Duration.
   * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent
   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
   * @return {Duration}
   */static invalid(e,t=null){if(!e)throw new kme("need to specify a reason the Duration is invalid");const i=e instanceof OCe?e:new OCe(e,t);if(PCe.throwOnInvalid)throw new _me(i);return new Kve({invalid:i})}
/**
   * @private
   */static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new xme(e);return t}
/**
   * Check if an object is a Duration. Works across context boundaries
   * @param {object} o
   * @return {boolean}
   */static isDuration(e){return e&&e.isLuxonDuration||!1}
/**
   * Get  the locale of a Duration, such 'en-GB'
   * @type {string}
   */get locale(){return this.isValid?this.loc.locale:null}
/**
   * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration
   *
   * @type {string}
   */get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}
/**
   * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:
   * * `S` for milliseconds
   * * `s` for seconds
   * * `m` for minutes
   * * `h` for hours
   * * `d` for days
   * * `w` for weeks
   * * `M` for months
   * * `y` for years
   * Notes:
   * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits
   * * Tokens can be escaped by wrapping with single quotes.
   * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.
   * @param {string} fmt - the format string
   * @param {Object} opts - options
   * @param {boolean} [opts.floor=true] - floor numerical values
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2"
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002"
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000"
   * @return {string}
   */toFormat(e,t={}){const i={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?qIe.create(this.loc,i).formatDurationFromString(this,e):Fve}
/**
   * Returns a string representation of a Duration with all units included.
   * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options
   * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.
   * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.
   * @example
   * ```js
   * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })
   * dur.toHuman() //=> '1 day, 5 hours, 6 minutes'
   * dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes'
   * dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min'
   * ```
   */toHuman(e={}){if(!this.isValid)return Fve;const t=Uve.map((t=>{const i=this.values[t];return iIe(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(i)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}
/**
   * Returns a JavaScript object with this Duration's values.
   * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }
   * @return {Object}
   */toObject(){return this.isValid?{...this.values}:{}}
/**
   * Returns an ISO 8601-compliant string representation of this Duration.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Durations
   * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'
   * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'
   * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'
   * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'
   * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'
   * @return {string}
   */toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=pIe(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}
/**
   * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.
   * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Times
   * @param {Object} opts - options
   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
   * @param {boolean} [opts.includePrefix=false] - include the `T` prefix
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'
   * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'
   * @return {string}
   */toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return RBe.fromMillis(t,{zone:"UTC"}).toISOTime(e)}
/**
   * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.
   * @return {string}
   */toJSON(){return this.toISO()}
/**
   * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.
   * @return {string}
   */toString(){return this.toISO()}
/**
   * Returns a string representation of this Duration appropriate for the REPL.
   * @return {string}
   */[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}
/**
   * Returns an milliseconds value of this Duration.
   * @return {number}
   */toMillis(){return this.isValid?Ove(this.matrix,this.values):NaN}
/**
   * Returns an milliseconds value of this Duration. Alias of {@link toMillis}
   * @return {number}
   */valueOf(){return this.toMillis()}
/**
   * Make this Duration longer by the specified amount. Return a newly-constructed Duration.
   * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   * @return {Duration}
   */plus(e){if(!this.isValid)return this;const t=Kve.fromDurationLike(e),i={};for(const n of Uve)(lIe(t.values,n)||lIe(this.values,n))&&(i[n]=t.get(n)+this.get(n));return Pve(this,{values:i},!0)}
/**
   * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.
   * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   * @return {Duration}
   */minus(e){if(!this.isValid)return this;const t=Kve.fromDurationLike(e);return this.plus(t.negate())}
/**
   * Scale this Duration by the specified amount. Return a newly-constructed Duration.
   * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.
   * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }
   * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 }
   * @return {Duration}
   */mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=wIe(e(this.values[i],i));return Pve(this,{values:t},!0)}
/**
   * Get the value of unit.
   * @param {string} unit - a unit such as 'minute' or 'day'
   * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2
   * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0
   * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3
   * @return {number}
   */get(e){return this[Kve.normalizeUnit(e)]}
/**
   * "Set" the values of specified units. Return a newly-constructed Duration.
   * @param {Object} values - a mapping of units to numbers
   * @example dur.set({ years: 2017 })
   * @example dur.set({ hours: 8, minutes: 30 })
   * @return {Duration}
   */set(e){if(!this.isValid)return this;return Pve(this,{values:{...this.values,...QIe(e,Kve.normalizeUnit)}})}
/**
   * "Set" the locale and/or numberingSystem.  Returns a newly-constructed Duration.
   * @example dur.reconfigure({ locale: 'en-GB' })
   * @return {Duration}
   */reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i,matrix:n}={}){return Pve(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:n,conversionAccuracy:i})}
/**
   * Return the length of the duration in the specified unit.
   * @param {string} unit - a unit such as 'minutes' or 'days'
   * @example Duration.fromObject({years: 1}).as('days') //=> 365
   * @example Duration.fromObject({years: 1}).as('months') //=> 12
   * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5
   * @return {number}
   */as(e){return this.isValid?this.shiftTo(e).get(e):NaN}
/**
   * Reduce this Duration to its canonical representation in its current units.
   * Assuming the overall value of the Duration is positive, this means:
   * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)
   * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise
   *   the overall value would be negative, see third example)
   * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)
   *
   * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.
   * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }
   * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }
   * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }
   * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }
   * @return {Duration}
   */normalize(){if(!this.isValid)return this;const e=this.toObject();return Gve(this.matrix,e),Pve(this,{values:e},!0)}
/**
   * Rescale units to its largest representation
   * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }
   * @return {Duration}
   */rescale(){if(!this.isValid)return this;return Pve(this,{values:function(e){const t={};for(const[i,n]of Object.entries(e))0!==n&&(t[i]=n);return t}(this.normalize().shiftToAll().toObject())},!0)}
/**
   * Convert this Duration into its representation in a different set of units.
   * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }
   * @return {Duration}
   */shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>Kve.normalizeUnit(e)));const t={},i={},n=this.toObject();let s;for(const r of Uve)if(e.indexOf(r)>=0){s=r;let e=0;for(const t in i)e+=this.matrix[t][r]*i[t],i[t]=0;nIe(n[r])&&(e+=n[r]);const a=Math.trunc(e);t[r]=a,i[r]=(1e3*e-1e3*a)/1e3}else nIe(n[r])&&(i[r]=n[r]);for(const r in i)0!==i[r]&&(t[s]+=r===s?i[r]:i[r]/this.matrix[s][r]);return Gve(this.matrix,t),Pve(this,{values:t},!0)}
/**
   * Shift this Duration to all available units.
   * Same as shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds")
   * @return {Duration}
   */shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}
/**
   * Return the negative of this Duration.
   * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }
   * @return {Duration}
   */negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return Pve(this,{values:e},!0)}
/**
   * Get the years.
   * @type {number}
   */get years(){return this.isValid?this.values.years||0:NaN}
/**
   * Get the quarters.
   * @type {number}
   */get quarters(){return this.isValid?this.values.quarters||0:NaN}
/**
   * Get the months.
   * @type {number}
   */get months(){return this.isValid?this.values.months||0:NaN}
/**
   * Get the weeks
   * @type {number}
   */get weeks(){return this.isValid?this.values.weeks||0:NaN}
/**
   * Get the days.
   * @type {number}
   */get days(){return this.isValid?this.values.days||0:NaN}
/**
   * Get the hours.
   * @type {number}
   */get hours(){return this.isValid?this.values.hours||0:NaN}
/**
   * Get the minutes.
   * @type {number}
   */get minutes(){return this.isValid?this.values.minutes||0:NaN}
/**
   * Get the seconds.
   * @return {number}
   */get seconds(){return this.isValid?this.values.seconds||0:NaN}
/**
   * Get the milliseconds.
   * @return {number}
   */get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}
/**
   * Returns whether the Duration is invalid. Invalid durations are returned by diff operations
   * on invalid DateTimes or Intervals.
   * @return {boolean}
   */get isValid(){return null===this.invalid}
/**
   * Returns an error code if this Duration became invalid, or null if the Duration is valid
   * @return {string}
   */get invalidReason(){return this.invalid?this.invalid.reason:null}
/**
   * Returns an explanation of why this Duration became invalid, or null if the Duration is valid
   * @type {string}
   */get invalidExplanation(){return this.invalid?this.invalid.explanation:null}
/**
   * Equality check
   * Two Durations are equal iff they have the same units and the same values for each unit.
   * @param {Duration} other
   * @return {boolean}
   */equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const n of Uve)if(t=this.values[n],i=e.values[n],!(void 0===t||0===t?void 0===i||0===i:t===i))return!1;var t,i;return!0}}const qve="Invalid Interval";class Yve{
/**
   * @private
   */
constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}
/**
   * Create an invalid Interval.
   * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent
   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
   * @return {Interval}
   */static invalid(e,t=null){if(!e)throw new kme("need to specify a reason the Interval is invalid");const i=e instanceof OCe?e:new OCe(e,t);if(PCe.throwOnInvalid)throw new Qme(i);return new Yve({invalid:i})}
/**
   * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.
   * @param {DateTime|Date|Object} start
   * @param {DateTime|Date|Object} end
   * @return {Interval}
   */static fromDateTimes(e,t){const i=NBe(e),n=NBe(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?Yve.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:Yve.invalid("missing or invalid end"):Yve.invalid("missing or invalid start")}(i,n);return null==s?new Yve({start:i,end:n}):s}
/**
   * Create an Interval from a start DateTime and a Duration to extend to.
   * @param {DateTime|Date|Object} start
   * @param {Duration|Object|number} duration - the length of the Interval.
   * @return {Interval}
   */static after(e,t){const i=Kve.fromDurationLike(t),n=NBe(e);return Yve.fromDateTimes(n,n.plus(i))}
/**
   * Create an Interval from an end DateTime and a Duration to extend backwards to.
   * @param {DateTime|Date|Object} end
   * @param {Duration|Object|number} duration - the length of the Interval.
   * @return {Interval}
   */static before(e,t){const i=Kve.fromDurationLike(t),n=NBe(e);return Yve.fromDateTimes(n.minus(i),n)}
/**
   * Create an Interval from an ISO 8601 string.
   * Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.
   * @param {string} text - the ISO string to parse
   * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @return {Interval}
   */static fromISO(e,t){const[i,n]=(e||"").split("/",2);if(i&&n){let e,r,a,o;try{e=RBe.fromISO(i,t),r=e.isValid}catch(s){r=!1}try{a=RBe.fromISO(n,t),o=a.isValid}catch(s){o=!1}if(r&&o)return Yve.fromDateTimes(e,a);if(r){const i=Kve.fromISO(n,t);if(i.isValid)return Yve.after(e,i)}else if(o){const e=Kve.fromISO(i,t);if(e.isValid)return Yve.before(a,e)}}return Yve.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}
/**
   * Check if an object is an Interval. Works across context boundaries
   * @param {object} o
   * @return {boolean}
   */static isInterval(e){return e&&e.isLuxonInterval||!1}
/**
   * Returns the start of the Interval
   * @type {DateTime}
   */get start(){return this.isValid?this.s:null}
/**
   * Returns the end of the Interval
   * @type {DateTime}
   */get end(){return this.isValid?this.e:null}
/**
   * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.
   * @type {boolean}
   */get isValid(){return null===this.invalidReason}
/**
   * Returns an error code if this Interval is invalid, or null if the Interval is valid
   * @type {string}
   */get invalidReason(){return this.invalid?this.invalid.reason:null}
/**
   * Returns an explanation of why this Interval became invalid, or null if the Interval is valid
   * @type {string}
   */get invalidExplanation(){return this.invalid?this.invalid.explanation:null}
/**
   * Returns the length of the Interval in the specified unit.
   * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.
   * @return {number}
   */length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}
/**
   * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.
   * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'
   * asks 'what dates are included in this interval?', not 'how many days long is this interval?'
   * @param {string} [unit='milliseconds'] - the unit of time to count.
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime
   * @return {number}
   */count(e="milliseconds",t){if(!this.isValid)return NaN;const i=this.start.startOf(e,t);let n;return n=(null==t?void 0:t.useLocaleWeeks)?this.end.reconfigure({locale:i.locale}):this.end,n=n.startOf(e,t),Math.floor(n.diff(i,e).get(e))+(n.valueOf()!==this.end.valueOf())}
/**
   * Returns whether this Interval's start and end are both in the same unit of time
   * @param {string} unit - the unit of time to check sameness on
   * @return {boolean}
   */hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}
/**
   * Return whether this Interval has the same start and end DateTimes.
   * @return {boolean}
   */isEmpty(){return this.s.valueOf()===this.e.valueOf()}
/**
   * Return whether this Interval's start is after the specified DateTime.
   * @param {DateTime} dateTime
   * @return {boolean}
   */isAfter(e){return!!this.isValid&&this.s>e}
/**
   * Return whether this Interval's end is before the specified DateTime.
   * @param {DateTime} dateTime
   * @return {boolean}
   */isBefore(e){return!!this.isValid&&this.e<=e}
/**
   * Return whether this Interval contains the specified DateTime.
   * @param {DateTime} dateTime
   * @return {boolean}
   */contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}
/**
   * "Sets" the start and/or end dates. Returns a newly-constructed Interval.
   * @param {Object} values - the values to set
   * @param {DateTime} values.start - the starting DateTime
   * @param {DateTime} values.end - the ending DateTime
   * @return {Interval}
   */set({start:e,end:t}={}){return this.isValid?Yve.fromDateTimes(e||this.s,t||this.e):this}
/**
   * Split this Interval at each of the specified DateTimes
   * @param {...DateTime} dateTimes - the unit of time to count.
   * @return {Array}
   */splitAt(...e){if(!this.isValid)return[];const t=e.map(NBe).filter((e=>this.contains(e))).sort(((e,t)=>e.toMillis()-t.toMillis())),i=[];let{s:n}=this,s=0;for(;n<this.e;){const e=t[s]||this.e,r=+e>+this.e?this.e:e;i.push(Yve.fromDateTimes(n,r)),n=r,s+=1}return i}
/**
   * Split this Interval into smaller Intervals, each of the specified length.
   * Left over time is grouped into a smaller interval
   * @param {Duration|Object|number} duration - The length of each resulting interval.
   * @return {Array}
   */splitBy(e){const t=Kve.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let i,{s:n}=this,s=1;const r=[];for(;n<this.e;){const e=this.start.plus(t.mapUnits((e=>e*s)));i=+e>+this.e?this.e:e,r.push(Yve.fromDateTimes(n,i)),n=i,s+=1}return r}
/**
   * Split this Interval into the specified number of smaller intervals.
   * @param {number} numberOfParts - The number of Intervals to divide the Interval into.
   * @return {Array}
   */divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}
/**
   * Return whether this Interval overlaps with the specified Interval
   * @param {Interval} other
   * @return {boolean}
   */overlaps(e){return this.e>e.s&&this.s<e.e}
/**
   * Return whether this Interval's end is adjacent to the specified Interval's start.
   * @param {Interval} other
   * @return {boolean}
   */abutsStart(e){return!!this.isValid&&+this.e==+e.s}
/**
   * Return whether this Interval's start is adjacent to the specified Interval's end.
   * @param {Interval} other
   * @return {boolean}
   */abutsEnd(e){return!!this.isValid&&+e.e==+this.s}
/**
   * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.
   * @param {Interval} other
   * @return {boolean}
   */engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)}
/**
   * Return whether this Interval has the same start and end as the specified Interval.
   * @param {Interval} other
   * @return {boolean}
   */equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}
/**
   * Return an Interval representing the intersection of this Interval and the specified Interval.
   * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.
   * Returns null if the intersection is empty, meaning, the intervals don't intersect.
   * @param {Interval} other
   * @return {Interval}
   */intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e<e.e?this.e:e.e;return t>=i?null:Yve.fromDateTimes(t,i)}
/**
   * Return an Interval representing the union of this Interval and the specified Interval.
   * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.
   * @param {Interval} other
   * @return {Interval}
   */union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return Yve.fromDateTimes(t,i)}
/**
   * Merge an array of Intervals into a equivalent minimal set of Intervals.
   * Combines overlapping and adjacent Intervals.
   * @param {Array} intervals
   * @return {Array}
   */static merge(e){const[t,i]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],i)=>t?t.overlaps(i)||t.abutsStart(i)?[e,t.union(i)]:[e.concat([t]),i]:[e,i]),[[],null]);return i&&t.push(i),t}
/**
   * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.
   * @param {Array} intervals
   * @return {Array}
   */static xor(e){let t=null,i=0;const n=[],s=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),r=Array.prototype.concat(...s).sort(((e,t)=>e.time-t.time));for(const a of r)i+="s"===a.type?1:-1,1===i?t=a.time:(t&&+t!=+a.time&&n.push(Yve.fromDateTimes(t,a.time)),t=null);return Yve.merge(n)}
/**
   * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.
   * @param {...Interval} intervals
   * @return {Array}
   */difference(...e){return Yve.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}
/**
   * Returns a string representation of this Interval appropriate for debugging.
   * @return {string}
   */toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:qve}
/**
   * Returns a string representation of this Interval appropriate for the REPL.
   * @return {string}
   */[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}
/**
   * Returns a localized string representing this Interval. Accepts the same options as the
   * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as
   * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method
   * is browser-specific, but in general it will return an appropriate representation of the
   * Interval in the assigned locale. Defaults to the system's locale if no locale has been
   * specified.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or
   * Intl.DateTimeFormat constructor options.
   * @param {Object} opts - Options to override the configuration of the start DateTime.
   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022
   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022
   * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022
   * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM
   * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p
   * @return {string}
   */toLocaleString(e=Rme,t={}){return this.isValid?qIe.create(this.s.loc.clone(t),e).formatInterval(this):qve}
/**
   * Returns an ISO 8601-compliant string representation of this Interval.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @param {Object} opts - The same options as {@link DateTime#toISO}
   * @return {string}
   */toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:qve}
/**
   * Returns an ISO 8601-compliant string representation of date of this Interval.
   * The time components are ignored.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @return {string}
   */toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:qve}
/**
   * Returns an ISO 8601-compliant string representation of time of this Interval.
   * The date components are ignored.
   * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
   * @param {Object} opts - The same options as {@link DateTime#toISO}
   * @return {string}
   */toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:qve}
/**
   * Returns a string representation of this Interval formatted according to the specified format
   * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible
   * formatting tool.
   * @param {string} dateFormat - The format string. This string formats the start and end time.
   * See {@link DateTime#toFormat} for details.
   * @param {Object} opts - Options.
   * @param {string} [opts.separator =  ' – '] - A separator to place between the start and end
   * representations.
   * @return {string}
   */toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:qve}
/**
   * Return a Duration representing the time spanned by this interval.
   * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.
   * @param {Object} opts - options that affect the creation of the Duration
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }
   * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }
   * @return {Duration}
   */toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Kve.invalid(this.invalidReason)}
/**
   * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes
   * @param {function} mapFn
   * @return {Interval}
   * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())
   * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))
   */mapEndpoints(e){return Yve.fromDateTimes(e(this.s),e(this.e))}}class Vve{
/**
   * Return whether the specified zone contains a DST.
   * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.
   * @return {boolean}
   */
static hasDST(e=PCe.defaultZone){const t=RBe.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}
/**
   * Return whether the specified zone is a valid IANA specifier.
   * @param {string} zone - Zone to check
   * @return {boolean}
   */static isValidIANAZone(e){return ACe.isValidZone(e)}
/**
   * Converts the input into a {@link Zone} instance.
   *
   * * If `input` is already a Zone instance, it is returned unchanged.
   * * If `input` is a string containing a valid time zone name, a Zone instance
   *   with that name is returned.
   * * If `input` is a string that doesn't refer to a known time zone, a Zone
   *   instance with {@link Zone#isValid} == false is returned.
   * * If `input is a number, a Zone instance with the specified fixed offset
   *   in minutes is returned.
   * * If `input` is `null` or `undefined`, the default zone is returned.
   * @param {string|Zone|number} [input] - the value to be converted
   * @return {Zone}
   */static normalizeZone(e){return QCe(e,PCe.defaultZone)}
/**
   * Get the weekday on which the week starts according to the given locale.
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @returns {number} the start of the week, 1 for Monday through 7 for Sunday
   */static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||yCe.create(e)).getStartOfWeek()}
/**
   * Get the minimum number of days necessary in a week before it is considered part of the next year according
   * to the given locale.
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @returns {number}
   */static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||yCe.create(e)).getMinDaysInFirstWeek()}
/**
   * Get the weekdays, which are considered the weekend according to the given locale
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday
   */static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||yCe.create(e)).getWeekendDays().slice()}
/**
   * Return an array of standalone month names.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @param {string} [opts.outputCalendar='gregory'] - the calendar
   * @example Info.months()[0] //=> 'January'
   * @example Info.months('short')[0] //=> 'Jan'
   * @example Info.months('numeric')[0] //=> '1'
   * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'
   * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'
   * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'
   * @return {Array}
   */static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null,outputCalendar:s="gregory"}={}){return(n||yCe.create(t,i,s)).months(e)}
/**
   * Return an array of format month names.
   * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that
   * changes the string.
   * See {@link Info#months}
   * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @param {string} [opts.outputCalendar='gregory'] - the calendar
   * @return {Array}
   */static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null,outputCalendar:s="gregory"}={}){return(n||yCe.create(t,i,s)).months(e,!0)}
/**
   * Return an array of standalone week names.
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long".
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @example Info.weekdays()[0] //=> 'Monday'
   * @example Info.weekdays('short')[0] //=> 'Mon'
   * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'
   * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'
   * @return {Array}
   */static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null}={}){return(n||yCe.create(t,i,null)).weekdays(e)}
/**
   * Return an array of format week names.
   * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that
   * changes the string.
   * See {@link Info#weekdays}
   * @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long".
   * @param {Object} opts - options
   * @param {string} [opts.locale=null] - the locale code
   * @param {string} [opts.numberingSystem=null] - the numbering system
   * @param {string} [opts.locObj=null] - an existing locale object to use
   * @return {Array}
   */static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null}={}){return(n||yCe.create(t,i,null)).weekdays(e,!0)}
/**
   * Return an array of meridiems.
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @example Info.meridiems() //=> [ 'AM', 'PM' ]
   * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]
   * @return {Array}
   */static meridiems({locale:e=null}={}){return yCe.create(e).meridiems()}
/**
   * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.
   * @param {string} [length='short'] - the length of the era representation, such as "short" or "long".
   * @param {Object} opts - options
   * @param {string} [opts.locale] - the locale code
   * @example Info.eras() //=> [ 'BC', 'AD' ]
   * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]
   * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]
   * @return {Array}
   */static eras(e="short",{locale:t=null}={}){return yCe.create(t,null,"gregory").eras(e)}
/**
   * Return the set of available features in this environment.
   * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.
   * Keys:
   * * `relative`: whether this environment supports relative time formatting
   * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale
   * @example Info.features() //=> { relative: false, localeWeek: true }
   * @return {Object}
   */static features(){return{relative:rIe(),localeWeek:aIe()}}}function Wve(e,t){const i=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=i(t)-i(e);return Math.floor(Kve.fromMillis(n).as("days"))}function jve(e,t,i,n){let[s,r,a,o]=function(e,t,i){const n=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const i=Wve(e,t);return(i-i%7)/7}],["days",Wve]],s={},r=e;let a,o;for(const[l,A]of n)i.indexOf(l)>=0&&(a=l,s[l]=A(e,t),o=r.plus(s),o>t?(s[l]--,(e=r.plus(s))>t&&(o=e,s[l]--,e=r.plus(s))):e=o);return[e,s,o,a]}(e,t,i);const l=t-s,A=i.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===A.length&&(a<t&&(a=s.plus({[o]:1})),a!==s&&(r[o]=(r[o]||0)+l/(a-s)));const c=Kve.fromObject(r,n);return A.length>0?Kve.fromMillis(l,n).shiftTo(...A).plus(c):c}function Jve(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);if(-1!==e[i].search(_Ce.hanidec))t+=xCe.indexOf(e[i]);else for(const e in SCe){const[i,s]=SCe[e];n>=i&&n<=s&&(t+=n-i)}}return parseInt(t,10)}return t}(e))}}const zve=`[ ${String.fromCharCode(160)}]`,Xve=new RegExp(zve,"g");function $ve(e){return e.replace(/\./g,"\\.?").replace(Xve,zve)}function Zve(e){return e.replace(/\./g,"").replace(Xve," ").toLowerCase()}function eBe(e,t){return null===e?null:{regex:RegExp(e.map($ve).join("|")),deser:([i])=>e.findIndex((e=>Zve(i)===Zve(e)))+t}}function tBe(e,t){return{regex:e,deser:([,e,t])=>EIe(e,t),groups:t}}function iBe(e){return{regex:e,deser:([e])=>e}}const nBe={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let sBe=null;function rBe(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const i=lBe(qIe.macroTokenToFormatOpts(e.val),t);return null==i||i.includes(void 0)?e:i}(e,t))))}class aBe{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=rBe(qIe.parseFormat(t),e),this.units=this.tokens.map((t=>function(e,t){const i=DCe(t),n=DCe(t,"{2}"),s=DCe(t,"{3}"),r=DCe(t,"{4}"),a=DCe(t,"{6}"),o=DCe(t,"{1,2}"),l=DCe(t,"{1,3}"),A=DCe(t,"{1,6}"),c=DCe(t,"{1,9}"),u=DCe(t,"{2,4}"),h=DCe(t,"{4,6}"),d=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},g=(g=>{if(e.literal)return d(g);switch(g.val){case"G":return eBe(t.eras("short"),0);case"GG":return eBe(t.eras("long"),0);case"y":return Jve(A);case"yy":case"kk":return Jve(u,yIe);case"yyyy":case"kkkk":return Jve(r);case"yyyyy":return Jve(h);case"yyyyyy":return Jve(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Jve(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Jve(n);case"MMM":return eBe(t.months("short",!0),1);case"MMMM":return eBe(t.months("long",!0),1);case"LLL":return eBe(t.months("short",!1),1);case"LLLL":return eBe(t.months("long",!1),1);case"o":case"S":return Jve(l);case"ooo":case"SSS":return Jve(s);case"u":return iBe(c);case"uu":return iBe(o);case"uuu":case"E":case"c":return Jve(i);case"a":return eBe(t.meridiems(),0);case"EEE":return eBe(t.weekdays("short",!1),1);case"EEEE":return eBe(t.weekdays("long",!1),1);case"ccc":return eBe(t.weekdays("short",!0),1);case"cccc":return eBe(t.weekdays("long",!0),1);case"Z":case"ZZ":return tBe(new RegExp(`([+-]${o.source})(?::(${n.source}))?`),2);case"ZZZ":return tBe(new RegExp(`([+-]${o.source})(${n.source})?`),2);case"z":return iBe(/[a-z_+-/]{1,256}?/i);case" ":return iBe(/[^\S\n\r]/);default:return d(g)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return g.token=e,g}(t,e))),this.disqualifyingUnit=this.units.find((e=>e.invalidReason)),!this.disqualifyingUnit){const[e,t]=[`^${(i=this.units).map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"")}$`,i];this.regex=RegExp(e,"i"),this.handlers=t}var i}explainFromTokens(e){if(this.isValid){const[t,i]=function(e,t,i){const n=e.match(t);if(n){const e={};let t=1;for(const s in i)if(lIe(i,s)){const r=i[s],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(e[r.token.val[0]]=r.deser(n.slice(t,t+a))),t+=a}return[n,e]}return[n,{}]}(e,this.regex,this.handlers),[n,s,r]=i?function(e){let t,i=null;return iIe(e.z)||(i=ACe.create(e.z)),iIe(e.Z)||(i||(i=new ECe(e.Z)),t=e.Z),iIe(e.q)||(e.M=3*(e.q-1)+1),iIe(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),iIe(e.u)||(e.S=gIe(e.u)),[Object.keys(e).reduce(((t,i)=>{const n=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(i);return n&&(t[n]=e[i]),t}),{}),i,t]}(i):[null,null,void 0];if(lIe(i,"a")&&lIe(i,"H"))throw new Sme("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:i,result:n,zone:s,specificOffset:r}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function oBe(e,t,i){return new aBe(e,i).explainFromTokens(t)}function lBe(e,t){if(!e)return null;const i=qIe.create(t,e).dtFormatter((sBe||(sBe=RBe.fromMillis(1555555555555)),sBe)),n=i.formatToParts(),s=i.resolvedOptions();return n.map((t=>function(e,t,i){const{type:n,value:s}=e;if("literal"===n){const e=/^\s+$/.test(s);return{literal:!e,val:e?" ":s}}const r=t[n];let a=n;"hour"===n&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":i.hour12?"hour12":"hour24");let o=nBe[a];if("object"==typeof o&&(o=o[r]),o)return{literal:!1,val:o}}(t,e,s)))}const ABe="Invalid DateTime",cBe=864e13;function uBe(e){return new OCe("unsupported zone",`the zone "${e.name}" is not supported`)}function hBe(e){return null===e.weekData&&(e.weekData=JCe(e.c)),e.weekData}function dBe(e){return null===e.localWeekData&&(e.localWeekData=JCe(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function gBe(e,t){const i={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new RBe({...i,...t,old:i})}function pBe(e,t,i){let n=e-60*t*1e3;const s=i.offset(n);if(t===s)return[n,t];n-=60*(s-t)*1e3;const r=i.offset(n);return s===r?[n,s]:[e-60*Math.min(s,r)*1e3,Math.max(s,r)]}function fBe(e,t){const i=new Date(e+=60*t*1e3);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function mBe(e,t,i){return pBe(IIe(e),t,i)}function CBe(e,t){const i=e.o,n=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r={...e.c,year:n,month:s,day:Math.min(e.c.day,CIe(n,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=Kve.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=IIe(r);let[l,A]=pBe(o,i,e.zone);return 0!==a&&(l+=a,A=e.zone.offset(l)),{ts:l,o:A}}function IBe(e,t,i,n,s,r){const{setZone:a,zone:o}=i;if(e&&0!==Object.keys(e).length||t){const n=t||o,s=RBe.fromObject(e,{...i,zone:n,specificOffset:r});return a?s:s.setZone(o)}return RBe.invalid(new OCe("unparsable",`the input "${s}" can't be parsed as ${n}`))}function vBe(e,t,i=!0){return e.isValid?qIe.create(yCe.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(e,t):null}function BBe(e,t){const i=e.c.year>9999||e.c.year<0;let n="";return i&&e.c.year>=0&&(n+="+"),n+=uIe(e.c.year,i?6:4),t?(n+="-",n+=uIe(e.c.month),n+="-",n+=uIe(e.c.day)):(n+=uIe(e.c.month),n+=uIe(e.c.day)),n}function yBe(e,t,i,n,s,r){let a=uIe(e.c.hour);return t?(a+=":",a+=uIe(e.c.minute),0===e.c.millisecond&&0===e.c.second&&i||(a+=":")):a+=uIe(e.c.minute),0===e.c.millisecond&&0===e.c.second&&i||(a+=uIe(e.c.second),0===e.c.millisecond&&n||(a+=".",a+=uIe(e.c.millisecond,3))),s&&(e.isOffsetFixed&&0===e.offset&&!r?a+="Z":e.o<0?(a+="-",a+=uIe(Math.trunc(-e.o/60)),a+=":",a+=uIe(Math.trunc(-e.o%60))):(a+="+",a+=uIe(Math.trunc(e.o/60)),a+=":",a+=uIe(Math.trunc(e.o%60)))),r&&(a+="["+e.zone.ianaName+"]"),a}const bBe={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},EBe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},wBe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},QBe=["year","month","day","hour","minute","second","millisecond"],_Be=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],SBe=["year","ordinal","hour","minute","second","millisecond"];function xBe(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new xme(e);return t}(e)}}function kBe(e,t){const i=QCe(t.zone,PCe.defaultZone);if(!i.isValid)return RBe.invalid(uBe(i));const n=yCe.fromObject(t);let s,r;if(iIe(e.year))s=PCe.now();else{for(const i of QBe)iIe(e[i])&&(e[i]=bBe[i]);const t=eIe(e)||tIe(e);if(t)return RBe.invalid(t);const n=function(e){return MBe[e]||(void 0===TBe&&(TBe=PCe.now()),MBe[e]=e.offset(TBe)),MBe[e]}(i);[s,r]=mBe(e,n,i)}return new RBe({ts:s,zone:i,loc:n,o:r})}function DBe(e,t,i){const n=!!iIe(i.round)||i.round,s=(e,s)=>{e=pIe(e,n||i.calendary?0:2,!0);return t.loc.clone(i).relFormatter(i).format(e,s)},r=n=>i.calendary?t.hasSame(e,n)?0:t.startOf(n).diff(e.startOf(n),n).get(n):t.diff(e,n).get(n);if(i.unit)return s(r(i.unit),i.unit);for(const a of i.units){const e=r(a);if(Math.abs(e)>=1)return s(e,a)}return s(e>t?-0:0,i.units[i.units.length-1])}function FBe(e){let t,i={};return e.length>0&&"object"==typeof e[e.length-1]?(i=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[i,t]}let TBe,MBe={},RBe=class e{
/**
   * @access private
   */
constructor(e){const t=e.zone||PCe.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new OCe("invalid input"):null)||(t.isValid?null:uBe(t));this.ts=iIe(e.ts)?PCe.now():e.ts;let n=null,s=null;if(!i){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[n,s]=[e.old.c,e.old.o];else{const r=nIe(e.o)&&!e.old?e.o:t.offset(this.ts);n=fBe(this.ts,r),i=Number.isNaN(n.year)?new OCe("invalid input"):null,n=i?null:n,s=i?null:r}}this._zone=t,this.loc=e.loc||yCe.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=n,this.o=s,this.isLuxonDateTime=!0}
// CONSTRUCT
/**
   * Create a DateTime for the current instant, in the system's time zone.
   *
   * Use Settings to override these default values if needed.
   * @example DateTime.now().toISO() //~> now in the ISO format
   * @return {DateTime}
   */
static now(){return new e({})}
/**
   * Create a local DateTime
   * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used
   * @param {number} [month=1] - The month, 1-indexed
   * @param {number} [day=1] - The day of the month, 1-indexed
   * @param {number} [hour=0] - The hour of the day, in 24-hour time
   * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
   * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
   * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
   * @example DateTime.local()                                  //~> now
   * @example DateTime.local({ zone: "America/New_York" })      //~> now, in US east coast time
   * @example DateTime.local(2017)                              //~> 2017-01-01T00:00:00
   * @example DateTime.local(2017, 3)                           //~> 2017-03-01T00:00:00
   * @example DateTime.local(2017, 3, 12, { locale: "fr" })     //~> 2017-03-12T00:00:00, with a French locale
   * @example DateTime.local(2017, 3, 12, 5)                    //~> 2017-03-12T05:00:00
   * @example DateTime.local(2017, 3, 12, 5, { zone: "utc" })   //~> 2017-03-12T05:00:00, in UTC
   * @example DateTime.local(2017, 3, 12, 5, 45)                //~> 2017-03-12T05:45:00
   * @example DateTime.local(2017, 3, 12, 5, 45, 10)            //~> 2017-03-12T05:45:10
   * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765)       //~> 2017-03-12T05:45:10.765
   * @return {DateTime}
   */static local(){const[e,t]=FBe(arguments),[i,n,s,r,a,o,l]=t;return kBe({year:i,month:n,day:s,hour:r,minute:a,second:o,millisecond:l},e)}
/**
   * Create a DateTime in UTC
   * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used
   * @param {number} [month=1] - The month, 1-indexed
   * @param {number} [day=1] - The day of the month
   * @param {number} [hour=0] - The hour of the day, in 24-hour time
   * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
   * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
   * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
   * @param {Object} options - configuration options for the DateTime
   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
   * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance
   * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance
   * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance
   * @example DateTime.utc()                                              //~> now
   * @example DateTime.utc(2017)                                          //~> 2017-01-01T00:00:00Z
   * @example DateTime.utc(2017, 3)                                       //~> 2017-03-01T00:00:00Z
   * @example DateTime.utc(2017, 3, 12)                                   //~> 2017-03-12T00:00:00Z
   * @example DateTime.utc(2017, 3, 12, 5)                                //~> 2017-03-12T05:00:00Z
   * @example DateTime.utc(2017, 3, 12, 5, 45)                            //~> 2017-03-12T05:45:00Z
   * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" })          //~> 2017-03-12T05:45:00Z with a French locale
   * @example DateTime.utc(2017, 3, 12, 5, 45, 10)                        //~> 2017-03-12T05:45:10Z
   * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale
   * @return {DateTime}
   */static utc(){const[e,t]=FBe(arguments),[i,n,s,r,a,o,l]=t;return e.zone=ECe.utcInstance,kBe({year:i,month:n,day:s,hour:r,minute:a,second:o,millisecond:l},e)}
/**
   * Create a DateTime from a JavaScript Date object. Uses the default zone.
   * @param {Date} date - a JavaScript Date object
   * @param {Object} options - configuration options for the DateTime
   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
   * @return {DateTime}
   */static fromJSDate(t,i={}){const n=(s=t,"[object Date]"===Object.prototype.toString.call(s)?t.valueOf():NaN);var s;if(Number.isNaN(n))return e.invalid("invalid input");const r=QCe(i.zone,PCe.defaultZone);return r.isValid?new e({ts:n,zone:r,loc:yCe.fromObject(i)}):e.invalid(uBe(r))}
/**
   * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
   * @param {number} milliseconds - a number of milliseconds since 1970 UTC
   * @param {Object} options - configuration options for the DateTime
   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
   * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
   * @return {DateTime}
   */static fromMillis(t,i={}){if(nIe(t))return t<-cBe||t>cBe?e.invalid("Timestamp out of range"):new e({ts:t,zone:QCe(i.zone,PCe.defaultZone),loc:yCe.fromObject(i)});throw new kme(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}
/**
   * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
   * @param {number} seconds - a number of seconds since 1970 UTC
   * @param {Object} options - configuration options for the DateTime
   * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
   * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
   * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
   * @return {DateTime}
   */static fromSeconds(t,i={}){if(nIe(t))return new e({ts:1e3*t,zone:QCe(i.zone,PCe.defaultZone),loc:yCe.fromObject(i)});throw new kme("fromSeconds requires a numerical input")}
/**
   * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.
   * @param {Object} obj - the object to create the DateTime from
   * @param {number} obj.year - a year, such as 1987
   * @param {number} obj.month - a month, 1-12
   * @param {number} obj.day - a day of the month, 1-31, depending on the month
   * @param {number} obj.ordinal - day of the year, 1-365 or 366
   * @param {number} obj.weekYear - an ISO week year
   * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year
   * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday
   * @param {number} obj.localWeekYear - a week year, according to the locale
   * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale
   * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale
   * @param {number} obj.hour - hour of the day, 0-23
   * @param {number} obj.minute - minute of the hour, 0-59
   * @param {number} obj.second - second of the minute, 0-59
   * @param {number} obj.millisecond - millisecond of the second, 0-999
   * @param {Object} opts - options for creating this DateTime
   * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()
   * @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'
   * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })
   * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })
   * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'
   * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: "en-US" }).toISODate() //=> '2021-12-26'
   * @return {DateTime}
   */static fromObject(t,i={}){t=t||{};const n=QCe(i.zone,PCe.defaultZone);if(!n.isValid)return e.invalid(uBe(n));const s=yCe.fromObject(i),r=QIe(t,xBe),{minDaysInFirstWeek:a,startOfWeek:o}=ZCe(r,s),l=PCe.now(),A=iIe(i.specificOffset)?n.offset(l):i.specificOffset,c=!iIe(r.ordinal),u=!iIe(r.year),h=!iIe(r.month)||!iIe(r.day),d=u||h,g=r.weekYear||r.weekNumber;if((d||c)&&g)throw new Sme("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&c)throw new Sme("Can't mix ordinal dates with month/day");const p=g||r.weekday&&!d;let f,m,C=fBe(l,A);p?(f=_Be,m=EBe,C=JCe(C,a,o)):c?(f=SBe,m=wBe,C=XCe(C)):(f=QBe,m=bBe);let I=!1;for(const e of f){iIe(r[e])?r[e]=I?m[e]:C[e]:I=!0}const v=p?function(e,t=4,i=1){const n=sIe(e.weekYear),s=cIe(e.weekNumber,1,BIe(e.weekYear,t,i)),r=cIe(e.weekday,1,7);return n?s?!r&&qCe("weekday",e.weekday):qCe("week",e.weekNumber):qCe("weekYear",e.weekYear)}(r,a,o):c?function(e){const t=sIe(e.year),i=cIe(e.ordinal,1,mIe(e.year));return t?!i&&qCe("ordinal",e.ordinal):qCe("year",e.year)}(r):eIe(r),B=v||tIe(r);if(B)return e.invalid(B);const y=p?zCe(r,a,o):c?$Ce(r):r,[b,E]=mBe(y,A,n),w=new e({ts:b,zone:n,o:E,loc:s});return r.weekday&&d&&t.weekday!==w.weekday?e.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${w.toISO()}`):w.isValid?w:e.invalid(w.invalid)}
/**
   * Create a DateTime from an ISO 8601 string
   * @param {string} text - the ISO string
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone
   * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
   * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance
   * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance
   * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromISO('2016-05-25T09:08:34.123')
   * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')
   * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})
   * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})
   * @example DateTime.fromISO('2016-W05-4')
   * @return {DateTime}
   */static fromISO(e,t={}){const[i,n]=jIe(e,[vve,Eve],[Bve,wve],[yve,Qve],[bve,_ve]);return IBe(i,n,t,"ISO 8601",e)}
/**
   * Create a DateTime from an RFC 2822 string
   * @param {string} text - the RFC 2822 string
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
   * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')
   * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')
   * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')
   * @return {DateTime}
   */static fromRFC2822(e,t={}){const[i,n]=jIe(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[dve,gve]);return IBe(i,n,t,"RFC 2822",e)}
/**
   * Create a DateTime from an HTTP header date
   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
   * @param {string} text - the HTTP header date
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
   * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.
   * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')
   * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')
   * @example DateTime.fromHTTP('Sun Nov  6 08:49:37 1994')
   * @return {DateTime}
   */static fromHTTP(e,t={}){const[i,n]=jIe(e,[pve,Cve],[fve,Cve],[mve,Ive]);return IBe(i,n,t,"HTTP",t)}
/**
   * Create a DateTime from an input string and format string.
   * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).
   * @param {string} text - the string to parse
   * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
   * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
   * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @return {DateTime}
   */static fromFormat(t,i,n={}){if(iIe(t)||iIe(i))throw new kme("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:r=null}=n,a=yCe.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0}),[o,l,A,c]=function(e,t,i){const{result:n,zone:s,specificOffset:r,invalidReason:a}=oBe(e,t,i);return[n,s,r,a]}(a,t,i);return c?e.invalid(c):IBe(o,l,n,`format ${i}`,t,A)}
/**
   * @deprecated use fromFormat instead
   */static fromString(t,i,n={}){return e.fromFormat(t,i,n)}
/**
   * Create a DateTime from a SQL date, time, or datetime
   * Defaults to en-US if no locale has been specified, regardless of the system's locale
   * @param {string} text - the string to parse
   * @param {Object} opts - options to affect the creation
   * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
   * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
   * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
   * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
   * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
   * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
   * @example DateTime.fromSQL('2017-05-15')
   * @example DateTime.fromSQL('2017-05-15 09:12:34')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })
   * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })
   * @example DateTime.fromSQL('09:12:34.342')
   * @return {DateTime}
   */static fromSQL(e,t={}){const[i,n]=jIe(e,[xve,Eve],[kve,Dve]);return IBe(i,n,t,"SQL",e)}
/**
   * Create an invalid DateTime.
   * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.
   * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
   * @return {DateTime}
   */static invalid(t,i=null){if(!t)throw new kme("need to specify a reason the DateTime is invalid");const n=t instanceof OCe?t:new OCe(t,i);if(PCe.throwOnInvalid)throw new wme(n);return new e({invalid:n})}
/**
   * Check if an object is an instance of DateTime. Works across context boundaries
   * @param {object} o
   * @return {boolean}
   */static isDateTime(e){return e&&e.isLuxonDateTime||!1}
/**
   * Produce the format string for a set of options
   * @param formatOpts
   * @param localeOpts
   * @returns {string}
   */static parseFormatForOpts(e,t={}){const i=lBe(e,yCe.fromObject(t));return i?i.map((e=>e?e.val:null)).join(""):null}
/**
   * Produce the the fully expanded format token for the locale
   * Does NOT quote characters, so quoted tokens will not round trip correctly
   * @param fmt
   * @param localeOpts
   * @returns {string}
   */static expandFormat(e,t={}){return rBe(qIe.parseFormat(e),yCe.fromObject(t)).map((e=>e.val)).join("")}static resetCache(){TBe=void 0,MBe={}}
// INFO
/**
   * Get the value of unit.
   * @param {string} unit - a unit such as 'minute' or 'day'
   * @example DateTime.local(2017, 7, 4).get('month'); //=> 7
   * @example DateTime.local(2017, 7, 4).get('day'); //=> 4
   * @return {number}
   */
get(e){return this[e]}
/**
   * Returns whether the DateTime is valid. Invalid DateTimes occur when:
   * * The DateTime was created from invalid calendar information, such as the 13th month or February 30
   * * The DateTime was created by an operation on another invalid date
   * @type {boolean}
   */get isValid(){return null===this.invalid}
/**
   * Returns an error code if this DateTime is invalid, or null if the DateTime is valid
   * @type {string}
   */get invalidReason(){return this.invalid?this.invalid.reason:null}
/**
   * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid
   * @type {string}
   */get invalidExplanation(){return this.invalid?this.invalid.explanation:null}
/**
   * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime
   *
   * @type {string}
   */get locale(){return this.isValid?this.loc.locale:null}
/**
   * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime
   *
   * @type {string}
   */get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}
/**
   * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime
   *
   * @type {string}
   */get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}
/**
   * Get the time zone associated with this DateTime.
   * @type {Zone}
   */get zone(){return this._zone}
/**
   * Get the name of the time zone.
   * @type {string}
   */get zoneName(){return this.isValid?this.zone.name:null}
/**
   * Get the year
   * @example DateTime.local(2017, 5, 25).year //=> 2017
   * @type {number}
   */get year(){return this.isValid?this.c.year:NaN}
/**
   * Get the quarter
   * @example DateTime.local(2017, 5, 25).quarter //=> 2
   * @type {number}
   */get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}
/**
   * Get the month (1-12).
   * @example DateTime.local(2017, 5, 25).month //=> 5
   * @type {number}
   */get month(){return this.isValid?this.c.month:NaN}
/**
   * Get the day of the month (1-30ish).
   * @example DateTime.local(2017, 5, 25).day //=> 25
   * @type {number}
   */get day(){return this.isValid?this.c.day:NaN}
/**
   * Get the hour of the day (0-23).
   * @example DateTime.local(2017, 5, 25, 9).hour //=> 9
   * @type {number}
   */get hour(){return this.isValid?this.c.hour:NaN}
/**
   * Get the minute of the hour (0-59).
   * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30
   * @type {number}
   */get minute(){return this.isValid?this.c.minute:NaN}
/**
   * Get the second of the minute (0-59).
   * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52
   * @type {number}
   */get second(){return this.isValid?this.c.second:NaN}
/**
   * Get the millisecond of the second (0-999).
   * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654
   * @type {number}
   */get millisecond(){return this.isValid?this.c.millisecond:NaN}
/**
   * Get the week year
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2014, 12, 31).weekYear //=> 2015
   * @type {number}
   */get weekYear(){return this.isValid?hBe(this).weekYear:NaN}
/**
   * Get the week number of the week year (1-52ish).
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2017, 5, 25).weekNumber //=> 21
   * @type {number}
   */get weekNumber(){return this.isValid?hBe(this).weekNumber:NaN}
/**
   * Get the day of the week.
   * 1 is Monday and 7 is Sunday
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2014, 11, 31).weekday //=> 4
   * @type {number}
   */get weekday(){return this.isValid?hBe(this).weekday:NaN}
/**
   * Returns true if this date is on a weekend according to the locale, false otherwise
   * @returns {boolean}
   */get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}
/**
   * Get the day of the week according to the locale.
   * 1 is the first day of the week and 7 is the last day of the week.
   * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,
   * @returns {number}
   */get localWeekday(){return this.isValid?dBe(this).weekday:NaN}
/**
   * Get the week number of the week year according to the locale. Different locales assign week numbers differently,
   * because the week can start on different days of the week (see localWeekday) and because a different number of days
   * is required for a week to count as the first week of a year.
   * @returns {number}
   */get localWeekNumber(){return this.isValid?dBe(this).weekNumber:NaN}
/**
   * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)
   * differently, see localWeekNumber.
   * @returns {number}
   */get localWeekYear(){return this.isValid?dBe(this).weekYear:NaN}
/**
   * Get the ordinal (meaning the day of the year)
   * @example DateTime.local(2017, 5, 25).ordinal //=> 145
   * @type {number|DateTime}
   */get ordinal(){return this.isValid?XCe(this.c).ordinal:NaN}
/**
   * Get the human readable short month name, such as 'Oct'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).monthShort //=> Oct
   * @type {string}
   */get monthShort(){return this.isValid?Vve.months("short",{locObj:this.loc})[this.month-1]:null}
/**
   * Get the human readable long month name, such as 'October'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).monthLong //=> October
   * @type {string}
   */get monthLong(){return this.isValid?Vve.months("long",{locObj:this.loc})[this.month-1]:null}
/**
   * Get the human readable short weekday, such as 'Mon'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon
   * @type {string}
   */get weekdayShort(){return this.isValid?Vve.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}
/**
   * Get the human readable long weekday, such as 'Monday'.
   * Defaults to the system's locale if no locale has been specified
   * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday
   * @type {string}
   */get weekdayLong(){return this.isValid?Vve.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}
/**
   * Get the UTC offset of this DateTime in minutes
   * @example DateTime.now().offset //=> -240
   * @example DateTime.utc().offset //=> 0
   * @type {number}
   */get offset(){return this.isValid?+this.o:NaN}
/**
   * Get the short human name for the zone's current offset, for example "EST" or "EDT".
   * Defaults to the system's locale if no locale has been specified
   * @type {string}
   */get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}
/**
   * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time".
   * Defaults to the system's locale if no locale has been specified
   * @type {string}
   */get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}
/**
   * Get whether this zone's offset ever changes, as in a DST.
   * @type {boolean}
   */get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}
/**
   * Get whether the DateTime is in a DST.
   * @type {boolean}
   */get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}
/**
   * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC
   * in this DateTime's zone. During DST changes local time can be ambiguous, for example
   * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.
   * This method will return both possible DateTimes if this DateTime's local time is ambiguous.
   * @returns {DateTime[]}
   */getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,i=IIe(this.c),n=this.zone.offset(i-e),s=this.zone.offset(i+e),r=this.zone.offset(i-n*t),a=this.zone.offset(i-s*t);if(r===a)return[this];const o=i-r*t,l=i-a*t,A=fBe(o,r),c=fBe(l,a);return A.hour===c.hour&&A.minute===c.minute&&A.second===c.second&&A.millisecond===c.millisecond?[gBe(this,{ts:o}),gBe(this,{ts:l})]:[this]}
/**
   * Returns true if this DateTime is in a leap year, false otherwise
   * @example DateTime.local(2016).isInLeapYear //=> true
   * @example DateTime.local(2013).isInLeapYear //=> false
   * @type {boolean}
   */get isInLeapYear(){return fIe(this.year)}
/**
   * Returns the number of days in this DateTime's month
   * @example DateTime.local(2016, 2).daysInMonth //=> 29
   * @example DateTime.local(2016, 3).daysInMonth //=> 31
   * @type {number}
   */get daysInMonth(){return CIe(this.year,this.month)}
/**
   * Returns the number of days in this DateTime's year
   * @example DateTime.local(2016).daysInYear //=> 366
   * @example DateTime.local(2013).daysInYear //=> 365
   * @type {number}
   */get daysInYear(){return this.isValid?mIe(this.year):NaN}
/**
   * Returns the number of weeks in this DateTime's year
   * @see https://en.wikipedia.org/wiki/ISO_week_date
   * @example DateTime.local(2004).weeksInWeekYear //=> 53
   * @example DateTime.local(2013).weeksInWeekYear //=> 52
   * @type {number}
   */get weeksInWeekYear(){return this.isValid?BIe(this.weekYear):NaN}
/**
   * Returns the number of weeks in this DateTime's local week year
   * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52
   * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53
   * @type {number}
   */get weeksInLocalWeekYear(){return this.isValid?BIe(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}
/**
   * Returns the resolved Intl options for this DateTime.
   * This is useful in understanding the behavior of formatting methods
   * @param {Object} opts - the same options as toLocaleString
   * @return {Object}
   */resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:n}=qIe.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:n}}
// TRANSFORM
/**
   * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime.
   *
   * Equivalent to {@link DateTime#setZone}('utc')
   * @param {number} [offset=0] - optionally, an offset from UTC in minutes
   * @param {Object} [opts={}] - options to pass to `setZone()`
   * @return {DateTime}
   */
toUTC(e=0,t={}){return this.setZone(ECe.instance(e),t)}
/**
   * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.
   *
   * Equivalent to `setZone('local')`
   * @return {DateTime}
   */toLocal(){return this.setZone(PCe.defaultZone)}
/**
   * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.
   *
   * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.
   * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.
   * @param {Object} opts - options
   * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.
   * @return {DateTime}
   */setZone(t,{keepLocalTime:i=!1,keepCalendarTime:n=!1}={}){if((t=QCe(t,PCe.defaultZone)).equals(this.zone))return this;if(t.isValid){let e=this.ts;if(i||n){const i=t.offset(this.ts),n=this.toObject();[e]=mBe(n,i,t)}return gBe(this,{ts:e,zone:t})}return e.invalid(uBe(t))}
/**
   * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.
   * @param {Object} properties - the properties to set
   * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })
   * @return {DateTime}
   */reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){return gBe(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i})})}
/**
   * "Set" the locale. Returns a newly-constructed DateTime.
   * Just a convenient alias for reconfigure({ locale })
   * @example DateTime.local(2017, 5, 25).setLocale('en-GB')
   * @return {DateTime}
   */setLocale(e){return this.reconfigure({locale:e})}
/**
   * "Set" the values of specified units. Returns a newly-constructed DateTime.
   * You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.
   *
   * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.
   * They cannot be mixed with ISO-week units like `weekday`.
   * @param {Object} values - a mapping of units to numbers
   * @example dt.set({ year: 2017 })
   * @example dt.set({ hour: 8, minute: 30 })
   * @example dt.set({ weekday: 5 })
   * @example dt.set({ year: 2005, ordinal: 234 })
   * @return {DateTime}
   */set(e){if(!this.isValid)return this;const t=QIe(e,xBe),{minDaysInFirstWeek:i,startOfWeek:n}=ZCe(t,this.loc),s=!iIe(t.weekYear)||!iIe(t.weekNumber)||!iIe(t.weekday),r=!iIe(t.ordinal),a=!iIe(t.year),o=!iIe(t.month)||!iIe(t.day),l=a||o,A=t.weekYear||t.weekNumber;if((l||r)&&A)throw new Sme("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&r)throw new Sme("Can't mix ordinal dates with month/day");let c;s?c=zCe({...JCe(this.c,i,n),...t},i,n):iIe(t.ordinal)?(c={...this.toObject(),...t},iIe(t.day)&&(c.day=Math.min(CIe(c.year,c.month),c.day))):c=$Ce({...XCe(this.c),...t});const[u,h]=mBe(c,this.o,this.zone);return gBe(this,{ts:u,o:h})}
/**
   * Add a period of time to this DateTime and return the resulting DateTime
   *
   * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.
   * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   * @example DateTime.now().plus(123) //~> in 123 milliseconds
   * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes
   * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow
   * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday
   * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min
   * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min
   * @return {DateTime}
   */plus(e){if(!this.isValid)return this;return gBe(this,CBe(this,Kve.fromDurationLike(e)))}
/**
   * Subtract a period of time to this DateTime and return the resulting DateTime
   * See {@link DateTime#plus}
   * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
   @return {DateTime}
   */minus(e){if(!this.isValid)return this;return gBe(this,CBe(this,Kve.fromDurationLike(e).negate()))}
/**
   * "Set" this DateTime to the beginning of a unit of time.
   * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week
   * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'
   * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'
   * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays
   * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'
   * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'
   * @return {DateTime}
   */startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const i={},n=Kve.normalizeUnit(e);switch(n){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0}if("weeks"===n)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(i.weekNumber=this.weekNumber-1),i.weekday=e}else i.weekday=1;if("quarters"===n){const e=Math.ceil(this.month/3);i.month=3*(e-1)+1}return this.set(i)}
/**
   * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time
   * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week
   * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'
   * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'
   * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays
   * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'
   * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'
   * @return {DateTime}
   */endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}
// OUTPUT
/**
   * Returns a string representation of this DateTime formatted according to the specified format string.
   * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
   * Defaults to en-US if no locale has been specified, regardless of the system's locale.
   * @param {string} fmt - the format string
   * @param {Object} opts - opts to override the configuration options on this DateTime
   * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'
   * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'
   * @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22'
   * @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes'
   * @return {string}
   */
toFormat(e,t={}){return this.isValid?qIe.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ABe}
/**
   * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.
   * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation
   * of the DateTime in the assigned locale.
   * Defaults to the system's locale if no locale has been specified
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
   * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options
   * @param {Object} opts - opts to override the configuration options on this DateTime
   * @example DateTime.now().toLocaleString(); //=> 4/20/2017
   * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'
   * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'
   * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'
   * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'
   * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'
   * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'
   * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'
   * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'
   * @return {string}
   */toLocaleString(e=Rme,t={}){return this.isValid?qIe.create(this.loc.clone(t),e).formatDateTime(this):ABe}
/**
   * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.
   * Defaults to the system's locale if no locale has been specified
   * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts
   * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.
   * @example DateTime.now().toLocaleParts(); //=> [
   *                                   //=>   { type: 'day', value: '25' },
   *                                   //=>   { type: 'literal', value: '/' },
   *                                   //=>   { type: 'month', value: '05' },
   *                                   //=>   { type: 'literal', value: '/' },
   *                                   //=>   { type: 'year', value: '1982' }
   *                                   //=> ]
   */toLocaleParts(e={}){return this.isValid?qIe.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}
/**
   * Returns an ISO 8601-compliant string representation of this DateTime
   * @param {Object} opts - options
   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.extendedZone=false] - add the time zone format extension
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'
   * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'
   * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'
   * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'
   * @return {string}
   */toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:s=!1}={}){if(!this.isValid)return null;const r="extended"===e;let a=BBe(this,r);return a+="T",a+=yBe(this,r,t,i,n,s),a}
/**
   * Returns an ISO 8601-compliant string representation of this DateTime's date component
   * @param {Object} opts - options
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'
   * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'
   * @return {string}
   */toISODate({format:e="extended"}={}){return this.isValid?BBe(this,"extended"===e):null}
/**
   * Returns an ISO 8601-compliant string representation of this DateTime's week date
   * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'
   * @return {string}
   */toISOWeekDate(){return vBe(this,"kkkk-'W'WW-c")}
/**
   * Returns an ISO 8601-compliant string representation of this DateTime's time component
   * @param {Object} opts - options
   * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
   * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.extendedZone=true] - add the time zone format extension
   * @param {boolean} [opts.includePrefix=false] - include the `T` prefix
   * @param {string} [opts.format='extended'] - choose between the basic and extended format
   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'
   * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'
   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'
   * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'
   * @return {string}
   */toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:s=!1,format:r="extended"}={}){if(!this.isValid)return null;return(n?"T":"")+yBe(this,"extended"===r,t,e,i,s)}
/**
   * Returns an RFC 2822-compatible string representation of this DateTime
   * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'
   * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'
   * @return {string}
   */toRFC2822(){return vBe(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}
/**
   * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.
   * Specifically, the string conforms to RFC 1123.
   * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
   * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'
   * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'
   * @return {string}
   */toHTTP(){return vBe(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}
/**
   * Returns a string representation of this DateTime appropriate for use in SQL Date
   * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'
   * @return {string}
   */toSQLDate(){return this.isValid?BBe(this,!0):null}
/**
   * Returns a string representation of this DateTime appropriate for use in SQL Time
   * @param {Object} opts - options
   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
   * @example DateTime.utc().toSQL() //=> '05:15:16.345'
   * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'
   * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'
   * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'
   * @return {string}
   */toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(t||e)&&(i&&(n+=" "),t?n+="z":e&&(n+="ZZ")),vBe(this,n,!0)}
/**
   * Returns a string representation of this DateTime appropriate for use in SQL DateTime
   * @param {Object} opts - options
   * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
   * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
   * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
   * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'
   * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'
   * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'
   * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'
   * @return {string}
   */toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}
/**
   * Returns a string representation of this DateTime appropriate for debugging
   * @return {string}
   */toString(){return this.isValid?this.toISO():ABe}
/**
   * Returns a string representation of this DateTime appropriate for the REPL.
   * @return {string}
   */[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}
/**
   * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}
   * @return {number}
   */valueOf(){return this.toMillis()}
/**
   * Returns the epoch milliseconds of this DateTime.
   * @return {number}
   */toMillis(){return this.isValid?this.ts:NaN}
/**
   * Returns the epoch seconds of this DateTime.
   * @return {number}
   */toSeconds(){return this.isValid?this.ts/1e3:NaN}
/**
   * Returns the epoch seconds (as a whole number) of this DateTime.
   * @return {number}
   */toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}
/**
   * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.
   * @return {string}
   */toJSON(){return this.toISO()}
/**
   * Returns a BSON serializable equivalent to this DateTime.
   * @return {Date}
   */toBSON(){return this.toJSDate()}
/**
   * Returns a JavaScript object with this DateTime's year, month, day, and so on.
   * @param opts - options for generating the object
   * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output
   * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }
   * @return {Object}
   */toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}
/**
   * Returns a JavaScript Date equivalent to this DateTime.
   * @return {Date}
   */toJSDate(){return new Date(this.isValid?this.ts:NaN)}
// COMPARE
/**
   * Return the difference between two DateTimes as a Duration.
   * @param {DateTime} otherDateTime - the DateTime to compare this one to
   * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.
   * @param {Object} opts - options that affect the creation of the Duration
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @example
   * var i1 = DateTime.fromISO('1982-05-25T09:45'),
   *     i2 = DateTime.fromISO('1983-10-14T10:30');
   * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }
   * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }
   * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }
   * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }
   * @return {Duration}
   */
diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return Kve.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},s=(o=t,Array.isArray(o)?o:[o]).map(Kve.normalizeUnit),r=e.valueOf()>this.valueOf(),a=jve(r?this:e,r?e:this,s,n);var o;return r?a.negate():a}
/**
   * Return the difference between this DateTime and right now.
   * See {@link DateTime#diff}
   * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration
   * @param {Object} opts - options that affect the creation of the Duration
   * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
   * @return {Duration}
   */diffNow(t="milliseconds",i={}){return this.diff(e.now(),t,i)}
/**
   * Return an Interval spanning between this DateTime and another DateTime
   * @param {DateTime} otherDateTime - the other end point of the Interval
   * @return {Interval}
   */until(e){return this.isValid?Yve.fromDateTimes(this,e):this}
/**
   * Return whether this DateTime is in the same unit of time as another DateTime.
   * Higher-order units must also be identical for this function to return `true`.
   * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.
   * @param {DateTime} otherDateTime - the other DateTime
   * @param {string} unit - the unit of time to check sameness on
   * @param {Object} opts - options
   * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used
   * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day
   * @return {boolean}
   */hasSame(e,t,i){if(!this.isValid)return!1;const n=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,i)<=n&&n<=s.endOf(t,i)}
/**
   * Equality check
   * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.
   * To compare just the millisecond values, use `+dt1 === +dt2`.
   * @param {DateTime} other - the other DateTime
   * @return {boolean}
   */equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}
/**
   * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your
   * platform supports Intl.RelativeTimeFormat. Rounds down by default.
   * @param {Object} options - options that affect the output
   * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
   * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow"
   * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds"
   * @param {boolean} [options.round=true] - whether to round the numbers in the output.
   * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.
   * @param {string} options.locale - override the locale of this DateTime
   * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
   * @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day"
   * @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día"
   * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures"
   * @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago"
   * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago"
   * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago"
   */toRelative(t={}){if(!this.isValid)return null;const i=t.base||e.fromObject({},{zone:this.zone}),n=t.padding?this<i?-t.padding:t.padding:0;let s=["years","months","days","hours","minutes","seconds"],r=t.unit;return Array.isArray(t.unit)&&(s=t.unit,r=void 0),DBe(i,this.plus(n),{...t,numeric:"always",units:s,unit:r})}
/**
   * Returns a string representation of this date relative to today, such as "yesterday" or "next month".
   * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.
   * @param {Object} options - options that affect the output
   * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
   * @param {string} options.locale - override the locale of this DateTime
   * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days"
   * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
   * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow"
   * @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana"
   * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain"
   * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago"
   */toRelativeCalendar(t={}){return this.isValid?DBe(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}
/**
   * Return the min of several date times
   * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum
   * @return {DateTime} the min DateTime, or undefined if called with no argument
   */static min(...t){if(!t.every(e.isDateTime))throw new kme("min requires all arguments be DateTimes");return oIe(t,(e=>e.valueOf()),Math.min)}
/**
   * Return the max of several date times
   * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum
   * @return {DateTime} the max DateTime, or undefined if called with no argument
   */static max(...t){if(!t.every(e.isDateTime))throw new kme("max requires all arguments be DateTimes");return oIe(t,(e=>e.valueOf()),Math.max)}
// MISC
/**
   * Explain how a string would be parsed by fromFormat()
   * @param {string} text - the string to parse
   * @param {string} fmt - the format the string is expected to be in (see description)
   * @param {Object} options - options taken by fromFormat()
   * @return {Object}
   */
static fromFormatExplain(e,t,i={}){const{locale:n=null,numberingSystem:s=null}=i;return oBe(yCe.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0}),e,t)}
/**
   * @deprecated use fromFormatExplain instead
   */static fromStringExplain(t,i,n={}){return e.fromFormatExplain(t,i,n)}
/**
   * Build a parser for `fmt` using the given locale. This parser can be passed
   * to {@link DateTime.fromFormatParser} to a parse a date in this format. This
   * can be used to optimize cases where many dates need to be parsed in a
   * specific format.
   *
   * @param {String} fmt - the format the string is expected to be in (see
   * description)
   * @param {Object} options - options used to set locale and numberingSystem
   * for parser
   * @returns {TokenParser} - opaque object to be used
   */static buildFormatParser(e,t={}){const{locale:i=null,numberingSystem:n=null}=t,s=yCe.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0});return new aBe(s,e)}
/**
   * Create a DateTime from an input string and format parser.
   *
   * The format parser must have been created with the same locale as this call.
   *
   * @param {String} text - the string to parse
   * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}
   * @param {Object} opts - options taken by fromFormat()
   * @returns {DateTime}
   */static fromFormatParser(t,i,n={}){if(iIe(t)||iIe(i))throw new kme("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:r=null}=n,a=yCe.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});if(!a.equals(i.locale))throw new kme(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${i.locale}`);const{result:o,zone:l,specificOffset:A,invalidReason:c}=i.explainFromTokens(t);return c?e.invalid(c):IBe(o,l,n,`format ${i.format}`,t,A)}
// FORMAT PRESETS
/**
   * {@link DateTime#toLocaleString} format like 10/14/1983
   * @type {Object}
   */
static get DATE_SHORT(){return Rme}
/**
   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'
   * @type {Object}
   */static get DATE_MED(){return Nme}
/**
   * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'
   * @type {Object}
   */static get DATE_MED_WITH_WEEKDAY(){return Lme}
/**
   * {@link DateTime#toLocaleString} format like 'October 14, 1983'
   * @type {Object}
   */static get DATE_FULL(){return Ume}
/**
   * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'
   * @type {Object}
   */static get DATE_HUGE(){return Hme}
/**
   * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */static get TIME_SIMPLE(){return Pme}
/**
   * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */static get TIME_WITH_SECONDS(){return Ome}
/**
   * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
   * @type {Object}
   */static get TIME_WITH_SHORT_OFFSET(){return Gme}
/**
   * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
   * @type {Object}
   */static get TIME_WITH_LONG_OFFSET(){return Kme}
/**
   * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.
   * @type {Object}
   */static get TIME_24_SIMPLE(){return qme}
/**
   * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.
   * @type {Object}
   */static get TIME_24_WITH_SECONDS(){return Yme}
/**
   * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.
   * @type {Object}
   */static get TIME_24_WITH_SHORT_OFFSET(){return Vme}
/**
   * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
   * @type {Object}
   */static get TIME_24_WITH_LONG_OFFSET(){return Wme}
/**
   * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */static get DATETIME_SHORT(){return jme}
/**
   * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */static get DATETIME_SHORT_WITH_SECONDS(){return Jme}
/**
   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */static get DATETIME_MED(){return zme}
/**
   * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */static get DATETIME_MED_WITH_SECONDS(){return Xme}
/**
   * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
   * @type {Object}
   */static get DATETIME_MED_WITH_WEEKDAY(){return $me}
/**
   * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
   * @type {Object}
   */static get DATETIME_FULL(){return Zme}
/**
   * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
   * @type {Object}
   */static get DATETIME_FULL_WITH_SECONDS(){return eCe}
/**
   * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
   * @type {Object}
   */static get DATETIME_HUGE(){return tCe}
/**
   * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
   * @type {Object}
   */static get DATETIME_HUGE_WITH_SECONDS(){return iCe}};function NBe(e){if(RBe.isDateTime(e))return e;if(e&&e.valueOf&&nIe(e.valueOf()))return RBe.fromJSDate(e);if(e&&"object"==typeof e)return RBe.fromObject(e);throw new kme(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const LBe=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,i){t.updateHttpClientConfig(e,i)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}},UBe=e=>({httpHandler:e.httpHandler()});var HBe,PBe,OBe,GBe,KBe,qBe,YBe,VBe,WBe,jBe;(PBe=HBe||(HBe={})).HEADER="header",PBe.QUERY="query",(GBe=OBe||(OBe={})).HEADER="header",GBe.QUERY="query",(qBe=KBe||(KBe={})).HTTP="http",qBe.HTTPS="https",(VBe=YBe||(YBe={})).MD5="md5",VBe.CRC32="crc32",VBe.CRC32C="crc32c",VBe.SHA1="sha1",VBe.SHA256="sha256",(jBe=WBe||(WBe={}))[jBe.HEADER=0]="HEADER",jBe[jBe.TRAILER=1]="TRAILER";const JBe="__smithy_context";var zBe,XBe,$Be,ZBe;(XBe=zBe||(zBe={})).PROFILE="profile",XBe.SSO_SESSION="sso-session",XBe.SERVICES="services",(ZBe=$Be||($Be={})).HTTP_0_9="http/0.9",ZBe.HTTP_1_0="http/1.0",ZBe.TDS_8_0="tds/8.0";class eye{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new eye({...e,headers:{...e.headers}});var i;return t.query&&(t.query=(i=t.query,Object.keys(i).reduce(((e,t)=>{const n=i[t];return{...e,[t]:Array.isArray(n)?[...n]:n}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return eye.clone(this)}}class tye{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const iye={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},nye=e=>({applyToStack:t=>{t.add((e=>t=>async i=>{if(!eye.isInstance(i.request))return t(i);const{request:n}=i,{handlerProtocol:s=""}=e.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let e=n.hostname;null!=n.port&&(e+=`:${n.port}`),n.headers.host=e}return t(i)})(e),iye)}}),sye={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},rye=e=>({applyToStack:e=>{e.add(((e,t)=>async i=>{var n,s;try{const s=await e(i),{clientName:r,commandName:a,logger:o,dynamoDbDocumentClientOptions:l={}}=t,{overrideInputFilterSensitiveLog:A,overrideOutputFilterSensitiveLog:c}=l,u=A??t.inputFilterSensitiveLog,h=c??t.outputFilterSensitiveLog,{$metadata:d,...g}=s.output;return null==(n=null==o?void 0:o.info)||n.call(o,{clientName:r,commandName:a,input:u(i.input),output:h(g),metadata:d}),s}catch(r){const{clientName:e,commandName:n,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:l}=o,A=l??t.inputFilterSensitiveLog;throw null==(s=null==a?void 0:a.error)||s.call(a,{clientName:e,commandName:n,input:A(i.input),error:r,metadata:r.$metadata}),r}}),sye)}});var aye={};const oye="X-Amzn-Trace-Id",lye={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Aye=e=>({applyToStack:t=>{t.add((e=>t=>async i=>{const{request:n}=i;if(!eye.isInstance(n)||"node"!==e.runtime||n.headers.hasOwnProperty(oye))return t(i);const s=aye._X_AMZN_TRACE_ID,r=e=>"string"==typeof e&&e.length>0;return r(aye.AWS_LAMBDA_FUNCTION_NAME)&&r(s)&&(n.headers[oye]=s),t({...i,request:n})})(e),lye)}}),cye=e=>e[JBe]||(e[JBe]={}),uye=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const hye=(e,t)=>(i,n)=>async s=>{var r;const a=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,s.input)),o=function(e){const t=new Map;for(const i of e)t.set(i.schemeId,i);return t}(e.httpAuthSchemes),l=cye(n),A=[];for(const i of a){const s=o.get(i.schemeId);if(!s){A.push(`HttpAuthScheme \`${i.schemeId}\` was not enabled for this service.`);continue}const a=s.identityProvider(await t.identityProviderConfigProvider(e));if(!a){A.push(`HttpAuthScheme \`${i.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:c={},signingProperties:u={}}=(null==(r=i.propertiesExtractor)?void 0:r.call(i,e,n))||{};i.identityProperties=Object.assign(i.identityProperties||{},c),i.signingProperties=Object.assign(i.signingProperties||{},u),l.selectedHttpAuthScheme={httpAuthOption:i,identity:await a(i.identityProperties),signer:s.signer};break}if(!l.selectedHttpAuthScheme)throw new Error(A.join("\n"));return i(s)},dye={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},gye=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:i})=>({applyToStack:n=>{n.addRelativeTo(hye(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:i}),dye)}}),pye={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},fye={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function mye(e,t,i){return{applyToStack:n=>{n.add(((e,t)=>(i,n)=>async s=>{var r,a,o,l;const{response:A}=await i(s);try{return{response:A,output:await t(A,e)}}catch(c){if(Object.defineProperty(c,"$response",{value:A}),!("$metadata"in c)){const e="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{c.message+="\n  "+e}catch(I2){n.logger&&"NoOpLogger"!==(null==(a=null==(r=n.logger)?void 0:r.constructor)?void 0:a.name)&&(null==(l=null==(o=n.logger)?void 0:o.warn)||l.call(o,e))}void 0!==c.$responseBodyText&&c.$response&&(c.$response.body=c.$responseBodyText)}throw c}})(e,i),pye),n.add(((e,t)=>(i,n)=>async s=>{var r;const a=(null==(r=n.endpointV2)?void 0:r.url)&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint;if(!a)throw new Error("No valid endpoint provider available.");const o=await t(s.input,{...e,endpoint:a});return i({...s,request:o})})(e,t),fye)}}}const Cye=e=>e=>{throw e},Iye=(e,t)=>{},vye={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Bye=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async i=>{if(!eye.isInstance(i.request))return e(i);const n=cye(t).selectedHttpAuthScheme;if(!n)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:s={}},identity:r,signer:a}=n,o=await e({...i,request:await a.sign(i.request,r,s)}).catch((a.errorHandler||Cye)(s));return(a.successHandler||Iye)(o.response,s),o}),vye)}}),yye=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},bye={},Eye=new Array(64);for(let _=0,dx="A".charCodeAt(0),Set="Z".charCodeAt(0);_+dx<=Set;_++){const e=String.fromCharCode(_+dx);bye[e]=_,Eye[_]=e}for(let _=0,dx="a".charCodeAt(0),Set="z".charCodeAt(0);_+dx<=Set;_++){const e=String.fromCharCode(_+dx),t=_+26;bye[e]=t,Eye[t]=e}for(let _=0;_<10;_++){bye[_.toString(10)]=_+52;const e=_.toString(10),t=_+52;bye[e]=t,Eye[t]=e}bye["+"]=62,Eye[62]="+",bye["/"]=63,Eye[63]="/";const wye=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const i=new ArrayBuffer(t),n=new DataView(i);for(let s=0;s<e.length;s+=4){let t=0,i=0;for(let n=s,o=s+3;n<=o;n++)if("="!==e[n]){if(!(e[n]in bye))throw new TypeError(`Invalid character ${e[n]} in base64 string.`);t|=bye[e[n]]<<6*(o-n),i+=6}else t>>=6;const r=s/4*3;t>>=i%8;const a=Math.floor(i/8);for(let e=0;e<a;e++){const i=8*(a-e-1);n.setUint8(r+e,(t&255<<i)>>i)}}return new Uint8Array(i)},Qye=e=>(new TextEncoder).encode(e),_ye=e=>"string"==typeof e?Qye(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Sye=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function xye(e){let t;t="string"==typeof e?Qye(e):e;const i="object"==typeof t&&"number"==typeof t.length,n="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!i&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let s="";for(let r=0;r<t.length;r+=3){let e=0,i=0;for(let s=r,a=Math.min(r+3,t.length);s<a;s++)e|=t[s]<<8*(a-s-1),i+=8;const n=Math.ceil(i/6);e<<=6*n-i;for(let t=1;t<=n;t++){const i=6*(n-t);s+=Eye[(e&63<<i)>>i]}s+="==".slice(0,4-n)}return s}class kye extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?kye.mutate(wye(e)):kye.mutate(Qye(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,kye.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?xye(e):Sye(e)}(this,e)}}const Dye=e=>encodeURIComponent(e).replace(/[!'()*]/g,Fye),Fye=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function Tye(e,t){return new Request(e,t)}function Mye(e=0){return new Promise(((t,i)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",i(t)}),e)}))}const Rye={supported:void 0};class Nye{static create(e){return"function"==typeof(null==e?void 0:e.handle)?e:new Nye(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===Rye.supported&&(Rye.supported=Boolean("undefined"!=typeof Request&&"keepalive"in Tye("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){var i;this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,s=!0===this.config.keepAlive,r=this.config.credentials;if(null==t?void 0:t.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let a=e.path;const o=function(e){const t=[];for(let i of Object.keys(e).sort()){const n=e[i];if(i=Dye(i),Array.isArray(n))for(let e=0,s=n.length;e<s;e++)t.push(`${i}=${Dye(n[e])}`);else{let e=i;(n||"string"==typeof n)&&(e+=`=${Dye(n)}`),t.push(e)}}return t.join("&")}(e.query||{});o&&(a+=`?${o}`),e.fragment&&(a+=`#${e.fragment}`);let l="";if(null!=e.username||null!=e.password){l=`${e.username??""}:${e.password??""}@`}const{port:A,method:c}=e,u=`${e.protocol}//${l}${e.hostname}${A?`:${A}`:""}${a}`,h="GET"===c||"HEAD"===c?void 0:e.body,d={body:h,headers:new Headers(e.headers),method:c,credentials:r};(null==(i=this.config)?void 0:i.cache)&&(d.cache=this.config.cache),h&&(d.duplex="half"),"undefined"!=typeof AbortController&&(d.signal=t),Rye.supported&&(d.keepalive=s),"function"==typeof this.config.requestInit&&Object.assign(d,this.config.requestInit(e));let g=()=>{};const p=Tye(u,d),f=[fetch(p).then((e=>{const t=e.headers,i={};for(const n of t.entries())i[n[0]]=n[1];return null!=e.body?{response:new tye({headers:i,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new tye({headers:i,reason:e.statusText,statusCode:e.status,body:t})})))})),Mye(n)];return t&&f.push(new Promise(((e,i)=>{const n=()=>{const e=new Error("Request aborted");e.name="AbortError",i(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",n,{once:!0}),g=()=>e.removeEventListener("abort",n)}else t.onabort=n}))),Promise.race(f).finally(g)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((i=>(i[e]=t,i)))}httpHandlerConfigs(){return this.config??{}}}const Lye=async e=>{var t;return"function"==typeof Blob&&e instanceof Blob||"Blob"===(null==(t=e.constructor)?void 0:t.name)?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise(((t,i)=>{const n=new FileReader;n.onloadend=()=>{if(2!==n.readyState)return i(new Error("Reader aborted too early"));const e=n.result??"",s=e.indexOf(","),r=s>-1?s+1:e.length;t(e.substring(r))},n.onabort=()=>i(new Error("Read aborted")),n.onerror=()=>i(n.error),n.readAsDataURL(e)}))}(e),i=wye(t);return new Uint8Array(i)}(e):async function(e){const t=[],i=e.getReader();let n=!1,s=0;for(;!n;){const{done:e,value:r}=await i.read();r&&(t.push(r),s+=r.length),n=e}const r=new Uint8Array(s);let a=0;for(const o of t)r.set(o,a),a+=o.length;return r}(e)};const Uye={},Hye={};for(let _=0;_<256;_++){let e=_.toString(16).toLowerCase();1===e.length&&(e=`0${e}`),Uye[_]=e,Hye[e]=_}function Pye(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2){const n=e.slice(i,i+2).toLowerCase();if(!(n in Hye))throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`);t[i/2]=Hye[n]}return t}function Oye(e){let t="";for(let i=0;i<e.byteLength;i++)t+=Uye[e[i]];return t}class Gye{constructor(e){this.authSchemes=new Map;for(const[t,i]of Object.entries(e))void 0!==i&&this.authSchemes.set(t,i)}getIdentityProvider(e){return this.authSchemes.get(e)}}const Kye=(qye=3e5,e=>Yye(e)&&e.expiration.getTime()-Date.now()<qye);var qye;const Yye=e=>void 0!==e.expiration;function Vye(e){const t=yye(e.userAgentAppId??undefined);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{var i,n;const s=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(s)){const t="NoOpLogger"!==(null==(n=null==(i=e.logger)?void 0:i.constructor)?void 0:n.name)&&e.logger?e.logger:console;"string"!=typeof s?null==t||t.warn("userAgentAppId must be a string or undefined."):s.length>50&&(null==t||t.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."))}return s}}}class Wye{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const i=this.hash(e);if(!1===i)return t();if(!this.data.has(i)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:i,done:n}=e.next();if(this.data.delete(i),n||++t>10)break}}this.data.set(i,t())}return this.data.get(i)}size(){return this.data.size}hash(e){let t="";const{parameters:i}=this;if(0===i.length)return!1;for(const n of i){const i=String(e[n]??"");if(i.includes("|;"))return!1;t+=i+"|;"}return t}}const jye=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),Jye=e=>jye.test(e)||e.startsWith("[")&&e.endsWith("]"),zye=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Xye=(e,t=!1)=>{if(!t)return zye.test(e);const i=e.split(".");for(const n of i)if(!Xye(n))return!1;return!0},$ye={},Zye="endpoints";function ebe(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${ebe(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(ebe).join(", ")})`:JSON.stringify(e,null,2)}class tbe extends Error{constructor(e){super(e),this.name="EndpointError"}}const ibe=(e,t)=>(e=>{const t=e.split("."),i=[];for(const n of t){const t=n.indexOf("[");if(-1!==t){if(n.indexOf("]")!==n.length-1)throw new tbe(`Path: '${e}' does not end with ']'`);const s=n.slice(t+1,-1);if(Number.isNaN(parseInt(s)))throw new tbe(`Invalid array index: '${s}' in path: '${e}'`);0!==t&&i.push(n.slice(0,t)),i.push(s)}else i.push(n)}return i})(t).reduce(((i,n)=>{if("object"!=typeof i)throw new tbe(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(i)?i[parseInt(n)]:i[n]}),e),nbe={[KBe.HTTP]:80,[KBe.HTTPS]:443},sbe={booleanEquals:(e,t)=>e===t,getAttr:ibe,isSet:e=>null!=e,isValidHostLabel:Xye,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:i,protocol:n="",path:s="",query:r={}}=e,a=new URL(`${n}//${t}${i?`:${i}`:""}${s}`);return a.search=Object.entries(r).map((([e,t])=>`${e}=${t}`)).join("&"),a}return new URL(e)}catch(t){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const i=t.href,{host:n,hostname:s,pathname:r,protocol:a,search:o}=t;if(o)return null;const l=a.slice(0,-1);if(!Object.values(KBe).includes(l))return null;const A=Jye(s);return{scheme:l,authority:`${n}${i.includes(`${n}:${nbe[l]}`)||"string"==typeof e&&e.includes(`${n}:${nbe[l]}`)?`:${nbe[l]}`:""}`,path:r,normalizedPath:r.endsWith("/")?r:`${r}/`,isIp:A}},stringEquals:(e,t)=>e===t,substring:(e,t,i,n)=>t>=i||e.length<i?null:n?e.substring(e.length-i,e.length-t):e.substring(t,i),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},rbe=(e,t)=>{const i=[],n={...t.endpointParams,...t.referenceRecord};let s=0;for(;s<e.length;){const t=e.indexOf("{",s);if(-1===t){i.push(e.slice(s));break}i.push(e.slice(s,t));const r=e.indexOf("}",t);if(-1===r){i.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[r+1]&&(i.push(e.slice(t+1,r)),s=r+2);const a=e.substring(t+1,r);if(a.includes("#")){const[e,t]=a.split("#");i.push(ibe(n[e],t))}else i.push(n[a]);s=r+1}return i.join("")},abe=(e,t,i)=>{if("string"==typeof e)return rbe(e,i);if(e.fn)return obe(e,i);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,i);throw new tbe(`'${t}': ${String(e)} is not a string, function or reference.`)},obe=({fn:e,argv:t},i)=>{const n=t.map((e=>["boolean","number"].includes(typeof e)?e:abe(e,"arg",i))),s=e.split(".");return s[0]in $ye&&null!=s[1]?$ye[s[0]][s[1]](...n):sbe[e](...n)},lbe=({assign:e,...t},i)=>{var n,s;if(e&&e in i.referenceRecord)throw new tbe(`'${e}' is already defined in Reference Record.`);const r=obe(t,i);return null==(s=null==(n=i.logger)?void 0:n.debug)||s.call(n,`${Zye} evaluateCondition: ${ebe(t)} = ${ebe(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Abe=(e=[],t)=>{var i,n;const s={};for(const r of e){const{result:e,toAssign:a}=lbe(r,{...t,referenceRecord:{...t.referenceRecord,...s}});if(!e)return{result:e};a&&(s[a.name]=a.value,null==(n=null==(i=t.logger)?void 0:i.debug)||n.call(i,`${Zye} assign: ${a.name} := ${ebe(a.value)}`))}return{result:!0,referenceRecord:s}},cbe=(e,t)=>Object.entries(e).reduce(((e,[i,n])=>({...e,[i]:n.map((e=>{const n=abe(e,"Header value entry",t);if("string"!=typeof n)throw new tbe(`Header '${i}' value '${n}' is not a string`);return n}))})),{}),ube=(e,t)=>{if(Array.isArray(e))return e.map((e=>ube(e,t)));switch(typeof e){case"string":return rbe(e,t);case"object":if(null===e)throw new tbe(`Unexpected endpoint property: ${e}`);return hbe(e,t);case"boolean":return e;default:throw new tbe("Unexpected endpoint property type: "+typeof e)}},hbe=(e,t)=>Object.entries(e).reduce(((e,[i,n])=>({...e,[i]:ube(n,t)})),{}),dbe=(e,t)=>{const i=abe(e,"Endpoint URL",t);if("string"==typeof i)try{return new URL(i)}catch(n){throw console.error(`Failed to construct URL with ${i}`,n),n}throw new tbe("Endpoint URL must be a string, got "+typeof i)},gbe=(e,t)=>{var i,n;const{conditions:s,endpoint:r}=e,{result:a,referenceRecord:o}=Abe(s,t);if(!a)return;const l={...t,referenceRecord:{...t.referenceRecord,...o}},{url:A,properties:c,headers:u}=r;return null==(n=null==(i=t.logger)?void 0:i.debug)||n.call(i,`${Zye} Resolving endpoint from template: ${ebe(r)}`),{...null!=u&&{headers:cbe(u,l)},...null!=c&&{properties:hbe(c,l)},url:dbe(A,l)}},pbe=(e,t)=>{const{conditions:i,error:n}=e,{result:s,referenceRecord:r}=Abe(i,t);if(s)throw new tbe(abe(n,"Error",{...t,referenceRecord:{...t.referenceRecord,...r}}))},fbe=(e,t)=>{const{conditions:i,rules:n}=e,{result:s,referenceRecord:r}=Abe(i,t);if(s)return mbe(n,{...t,referenceRecord:{...t.referenceRecord,...r}})},mbe=(e,t)=>{for(const i of e)if("endpoint"===i.type){const e=gbe(i,t);if(e)return e}else if("error"===i.type)pbe(i,t);else{if("tree"!==i.type)throw new tbe(`Unknown endpoint rule: ${i}`);{const e=fbe(i,t);if(e)return e}}throw new tbe("Rules evaluation failed")},Cbe=(e,t)=>{var i,n,s,r;const{endpointParams:a,logger:o}=t,{parameters:l,rules:A}=e;null==(n=null==(i=t.logger)?void 0:i.debug)||n.call(i,`${Zye} Initial EndpointParams: ${ebe(a)}`);const c=Object.entries(l).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(c.length>0)for(const[d,g]of c)a[d]=a[d]??g;const u=Object.entries(l).filter((([,e])=>e.required)).map((([e])=>e));for(const d of u)if(null==a[d])throw new tbe(`Missing required parameter: '${d}'`);const h=mbe(A,{endpointParams:a,logger:o,referenceRecord:{}});return null==(r=null==(s=t.logger)?void 0:s.debug)||r.call(s,`${Zye} Resolved endpoint: ${ebe(h)}`),h},Ibe=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Ibe(t))return!1;return!0}return!!Xye(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Jye(e)))};let vbe={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"};const Bbe={isVirtualHostableS3Bucket:Ibe,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[i,n,s,r,a,...o]=t;if("arn"!==i||""===n||""===s||""===o.join(":"))return null;return{partition:n,service:s,region:r,accountId:a,resourceId:o.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=vbe;for(const n of t){const{regions:t,outputs:i}=n;for(const[n,s]of Object.entries(t))if(n===e)return{...i,...s}}for(const n of t){const{regionRegex:t,outputs:i}=n;if(new RegExp(t).test(e))return{...i}}const i=t.find((e=>"aws"===e.id));if(!i)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...i.outputs}}};function ybe(e,t,i){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=i}$ye.aws=Bbe;const bbe=e=>{var t,i;return tye.isInstance(e)?(null==(t=e.headers)?void 0:t.date)??(null==(i=e.headers)?void 0:i.Date):void 0},Ebe=e=>new Date(Date.now()+e),wbe=(e,t)=>{const i=Date.parse(e);return((e,t)=>Math.abs(Ebe(t).getTime()-e)>=3e5)(i,t)?i-Date.now():t},Qbe=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class _be{async sign(e,t,i){var n;if(!eye.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const s=await(async e=>{var t,i,n;const s=Qbe("context",e.context),r=Qbe("config",e.config),a=null==(n=null==(i=null==(t=s.endpointV2)?void 0:t.properties)?void 0:i.authSchemes)?void 0:n[0],o=Qbe("signer",r.signer);return{config:r,signer:await o(a),signingRegion:null==e?void 0:e.signingRegion,signingRegionSet:null==e?void 0:e.signingRegionSet,signingName:null==e?void 0:e.signingName}})(i),{config:r,signer:a}=s;let{signingRegion:o,signingName:l}=s;const A=i.context;if(null==(n=null==A?void 0:A.authSchemes)?void 0:n.length){const[e,t]=A.authSchemes;"sigv4a"===(null==e?void 0:e.name)&&"sigv4"===(null==t?void 0:t.name)&&(o=(null==t?void 0:t.signingRegion)??o,l=(null==t?void 0:t.signingName)??l)}return await a.sign(e,{signingDate:Ebe(r.systemClockOffset),signingRegion:o,signingService:l})}errorHandler(e){return t=>{const i=t.ServerTime??bbe(t.$response);if(i){const n=Qbe("config",e.config),s=n.systemClockOffset;n.systemClockOffset=wbe(i,n.systemClockOffset);n.systemClockOffset!==s&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const i=bbe(e);if(i){const e=Qbe("config",t.config);e.systemClockOffset=wbe(i,e.systemClockOffset)}}}const Sbe=(e,t,i)=>{let n,s,r,a=!1;return async t=>(r&&!(null==t?void 0:t.forceRefresh)||(n=await(async()=>{s||(s=e());try{n=await s,r=!0,a=!1}finally{s=void 0}return n})()),n)},xbe="X-Amz-Date",kbe="X-Amz-Signature",Dbe="X-Amz-Security-Token",Fbe="authorization",Tbe=xbe.toLowerCase(),Mbe=[Fbe,Tbe,"date"],Rbe=kbe.toLowerCase(),Nbe="x-amz-content-sha256",Lbe=Dbe.toLowerCase(),Ube={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Hbe=/^proxy-/,Pbe=/^sec-/,Obe="AWS4-HMAC-SHA256",Gbe="AWS4-HMAC-SHA256-PAYLOAD",Kbe="aws4_request",qbe={},Ybe=[],Vbe=(e,t,i)=>`${e}/${t}/${i}/${Kbe}`,Wbe=(e,t,i)=>{const n=new e(t);return n.update(_ye(i)),n.digest()},jbe=({headers:e},t,i)=>{const n={};for(const s of Object.keys(e).sort()){if(null==e[s])continue;const r=s.toLowerCase();(r in Ube||(null==t?void 0:t.has(r))||Hbe.test(r)||Pbe.test(r))&&(!i||i&&!i.has(r))||(n[r]=e[s].trim().replace(/\s+/g," "))}return n},Jbe=async({headers:e,body:t},i)=>{for(const s of Object.keys(e))if(s.toLowerCase()===Nbe)return e[s];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(n=t,"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(n))){const e=new i;return e.update(_ye(t)),Oye(await e.digest())}var n;return"UNSIGNED-PAYLOAD"};class zbe{format(e){const t=[];for(const s of Object.keys(e)){const i=Qye(s);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[s]))}const i=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let n=0;for(const s of t)i.set(s,n),n+=s.byteLength;return i}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const i=new DataView(new ArrayBuffer(5));return i.setUint8(0,4),i.setInt32(1,e.value,!1),new Uint8Array(i.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);const r=new Uint8Array(s.buffer);return r.set(e.value,3),r;case"string":const a=Qye(e.value),o=new DataView(new ArrayBuffer(3+a.byteLength));o.setUint8(0,7),o.setUint16(1,a.byteLength,!1);const l=new Uint8Array(o.buffer);return l.set(a,3),l;case"timestamp":const A=new Uint8Array(9);return A[0]=8,A.set(eEe.fromNumber(e.value.valueOf()).bytes,1),A;case"uuid":if(!Zbe.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const c=new Uint8Array(17);return c[0]=9,c.set(Pye(e.value.replace(/\-/g,"")),1),c}}}var Xbe,$be;($be=Xbe||(Xbe={}))[$be.boolTrue=0]="boolTrue",$be[$be.boolFalse=1]="boolFalse",$be[$be.byte=2]="byte",$be[$be.short=3]="short",$be[$be.integer=4]="integer",$be[$be.long=5]="long",$be[$be.byteArray=6]="byteArray",$be[$be.string=7]="string",$be[$be.timestamp=8]="timestamp",$be[$be.uuid=9]="uuid";const Zbe=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let eEe=class e{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const i=new Uint8Array(8);for(let e=7,n=Math.abs(Math.round(t));e>-1&&n>0;e--,n/=256)i[e]=n;return t<0&&tEe(i),new e(i)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&tEe(e),parseInt(Oye(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function tEe(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const iEe=e=>{e=eye.clone(e);for(const t of Object.keys(e.headers))Mbe.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},nEe=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class sEe{constructor({applyChecksum:e,credentials:t,region:i,service:n,sha256:s,uriEscapePath:r=!0}){this.headerFormatter=new zbe,this.service=n,this.sha256=s,this.uriEscapePath=r,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=uye(i),this.credentialProvider=uye(t)}async presign(e,t={}){const{signingDate:i=new Date,expiresIn:n=3600,unsignableHeaders:s,unhoistableHeaders:r,signableHeaders:a,hoistableHeaders:o,signingRegion:l,signingService:A}=t,c=await this.credentialProvider();this.validateResolvedCredentials(c);const u=l??await this.regionProvider(),{longDate:h,shortDate:d}=rEe(i);if(n>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const g=Vbe(d,u,A??this.service),p=((e,t={})=>{var i,n;const{headers:s,query:r={}}=eye.clone(e);for(const a of Object.keys(s)){const e=a.toLowerCase();("x-amz-"===e.slice(0,6)&&!(null==(i=t.unhoistableHeaders)?void 0:i.has(e))||(null==(n=t.hoistableHeaders)?void 0:n.has(e)))&&(r[a]=s[a],delete s[a])}return{...e,headers:s,query:r}})(iEe(e),{unhoistableHeaders:r,hoistableHeaders:o});c.sessionToken&&(p.query[Dbe]=c.sessionToken),p.query["X-Amz-Algorithm"]=Obe,p.query["X-Amz-Credential"]=`${c.accessKeyId}/${g}`,p.query[xbe]=h,p.query["X-Amz-Expires"]=n.toString(10);const f=jbe(p,s,a);return p.query["X-Amz-SignedHeaders"]=aEe(f),p.query[kbe]=await this.getSignature(h,g,this.getSigningKey(c,u,d,A),this.createCanonicalRequest(p,f,await Jbe(e,this.sha256))),p}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:i=new Date,priorSignature:n,signingRegion:s,signingService:r}){const a=s??await this.regionProvider(),{shortDate:o,longDate:l}=rEe(i),A=Vbe(o,a,r??this.service),c=await Jbe({headers:{},body:t},this.sha256),u=new this.sha256;u.update(e);const h=Oye(await u.digest()),d=[Gbe,l,A,n,h,c].join("\n");return this.signString(d,{signingDate:i,signingRegion:a,signingService:r})}async signMessage(e,{signingDate:t=new Date,signingRegion:i,signingService:n}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:i,signingService:n,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:i,signingService:n}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const r=i??await this.regionProvider(),{shortDate:a}=rEe(t),o=new this.sha256(await this.getSigningKey(s,r,a,n));return o.update(_ye(e)),Oye(await o.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:i,unsignableHeaders:n,signingRegion:s,signingService:r}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const o=s??await this.regionProvider(),l=iEe(e),{longDate:A,shortDate:c}=rEe(t),u=Vbe(c,o,r??this.service);l.headers[Tbe]=A,a.sessionToken&&(l.headers[Lbe]=a.sessionToken);const h=await Jbe(l,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const i of Object.keys(t))if(e===i.toLowerCase())return!0;return!1})(Nbe,l.headers)&&this.applyChecksum&&(l.headers[Nbe]=h);const d=jbe(l,n,i),g=await this.getSignature(A,u,this.getSigningKey(a,o,c,r),this.createCanonicalRequest(l,d,h));return l.headers[Fbe]=`${Obe} Credential=${a.accessKeyId}/${u}, SignedHeaders=${aEe(d)}, Signature=${g}`,l}createCanonicalRequest(e,t,i){const n=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],i={};for(const n of Object.keys(e)){if(n.toLowerCase()===Rbe)continue;const s=Dye(n);t.push(s);const r=e[n];"string"==typeof r?i[s]=`${s}=${Dye(r)}`:Array.isArray(r)&&(i[s]=r.slice(0).reduce(((e,t)=>e.concat([`${s}=${Dye(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>i[e])).filter((e=>e)).join("&")})(e)}\n${n.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${n.join(";")}\n${i}`}async createStringToSign(e,t,i){const n=new this.sha256;n.update(_ye(i));const s=await n.digest();return`${Obe}\n${e}\n${t}\n${Oye(s)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==(null==n?void 0:n.length)&&"."!==n&&(".."===n?t.pop():t.push(n));const i=`${(null==e?void 0:e.startsWith("/"))?"/":""}${t.join("/")}${t.length>0&&(null==e?void 0:e.endsWith("/"))?"/":""}`;return Dye(i).replace(/%2F/g,"/")}return e}async getSignature(e,t,i,n){const s=await this.createStringToSign(e,t,n),r=new this.sha256(await i);return r.update(_ye(s)),Oye(await r.digest())}getSigningKey(e,t,i,n){return(async(e,t,i,n,s)=>{const r=`${i}:${n}:${s}:${Oye(await Wbe(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(r in qbe)return qbe[r];for(Ybe.push(r);Ybe.length>50;)delete qbe[Ybe.shift()];let a=`AWS4${t.secretAccessKey}`;for(const o of[i,n,s,Kbe])a=await Wbe(e,a,o);return qbe[r]=a})(this.sha256,e,i,t,n||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const rEe=e=>{const t=(i=e,nEe(i).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var i;return{longDate:t,shortDate:t.slice(0,8)}},aEe=e=>Object.keys(e).sort().join(";"),oEe=e=>{let t,i=!1;e.credentials&&(i=!0,t=((e,t,i)=>{if(void 0===e)return;const n="function"!=typeof e?async()=>Promise.resolve(e):e;let s,r,a,o=!1;const l=async e=>{r||(r=n(e));try{s=await r,a=!0,o=!1}finally{r=void 0}return s};return void 0===t?async e=>(a&&!(null==e?void 0:e.forceRefresh)||(s=await l(e)),s):async e=>(a&&!(null==e?void 0:e.forceRefresh)||(s=await l(e)),o?s:i(s)?t(s)?(await l(e),s):s:(o=!0,s))})(e.credentials,Kye,Yye)),t||(t=e.credentialDefaultProvider?yye(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const n=async()=>t({callerClientConfig:e}),{signingEscapePath:s=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:a}=e;let o;return o=e.signer?yye(e.signer):e.regionInfoProvider?()=>yye(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([t,i])=>{const{signingRegion:r,signingService:o}=t;e.signingRegion=e.signingRegion||r||i,e.signingName=e.signingName||o||e.serviceId;const l={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:s};return new(e.signerConstructor||sEe)(l)})):async t=>{const i=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await yye(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||i,e.signingName=e.signingName||r||e.serviceId;const o={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:s};return new(e.signerConstructor||sEe)(o)},{...e,systemClockOffset:r,signingEscapePath:s,credentials:i?async()=>n().then((e=>{return i="CREDENTIALS_CODE",n="e",(t=e).$source||(t.$source={}),t.$source[i]=n,t;var t,i,n})):n,signer:o}},lEe=(e,t)=>{const i=[];if(e&&i.push(e),t)for(const n of t)i.push(n);return i},AEe=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,cEe=()=>{let e=[],t=[],i=!1;const n=new Set,s=i=>{var n;return e.forEach((e=>{i.add(e.middleware,{...e})})),t.forEach((e=>{i.addRelativeTo(e.middleware,{...e})})),null==(n=i.identifyOnResolve)||n.call(i,o.identifyOnResolve()),i},r=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...r(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...r(e))})),t},a=(i=!1)=>{const n=[],s=[],a={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const i of lEe(t.name,t.aliases))a[i]=t;n.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const i of lEe(t.name,t.aliases))a[i]=t;s.push(t)})),s.forEach((e=>{if(e.toMiddleware){const t=a[e.toMiddleware];if(void 0===t){if(i)return;throw new Error(`${e.toMiddleware} is not found when adding ${AEe(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const o=(l=n,l.sort(((e,t)=>uEe[t.step]-uEe[e.step]||hEe[t.priority||"normal"]-hEe[e.priority||"normal"]))).map(r).reduce(((e,t)=>(e.push(...t),e)),[]);var l;return o},o={add:(t,i={})=>{const{name:s,override:r,aliases:a}=i,o={step:"initialize",priority:"normal",middleware:t,...i},l=lEe(s,a);if(l.length>0){if(l.some((e=>n.has(e)))){if(!r)throw new Error(`Duplicate middleware name '${AEe(s,a)}'`);for(const t of l){const i=e.findIndex((e=>{var i;return e.name===t||(null==(i=e.aliases)?void 0:i.some((e=>e===t)))}));if(-1===i)continue;const n=e[i];if(n.step!==o.step||o.priority!==n.priority)throw new Error(`"${AEe(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${AEe(s,a)}" middleware with ${o.priority} priority in ${o.step} step.`);e.splice(i,1)}}for(const e of l)n.add(e)}e.push(o)},addRelativeTo:(e,i)=>{const{name:s,override:r,aliases:a}=i,o={middleware:e,...i},l=lEe(s,a);if(l.length>0){if(l.some((e=>n.has(e)))){if(!r)throw new Error(`Duplicate middleware name '${AEe(s,a)}'`);for(const e of l){const i=t.findIndex((t=>{var i;return t.name===e||(null==(i=t.aliases)?void 0:i.some((t=>t===e)))}));if(-1===i)continue;const n=t[i];if(n.toMiddleware!==o.toMiddleware||n.relation!==o.relation)throw new Error(`"${AEe(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${AEe(s,a)}" middleware ${o.relation} "${o.toMiddleware}" middleware.`);t.splice(i,1)}}for(const e of l)n.add(e)}t.push(o)},clone:()=>s(cEe()),use:e=>{e.applyToStack(o)},remove:i=>"string"==typeof i?(i=>{let s=!1;const r=e=>{const t=lEe(e.name,e.aliases);if(t.includes(i)){s=!0;for(const e of t)n.delete(e);return!1}return!0};return e=e.filter(r),t=t.filter(r),s})(i):(i=>{let s=!1;const r=e=>{if(e.middleware===i){s=!0;for(const t of lEe(e.name,e.aliases))n.delete(t);return!1}return!0};return e=e.filter(r),t=t.filter(r),s})(i),removeByTag:i=>{let s=!1;const r=e=>{const{tags:t,name:r,aliases:a}=e;if(t&&t.includes(i)){const e=lEe(r,a);for(const t of e)n.delete(t);return s=!0,!1}return!0};return e=e.filter(r),t=t.filter(r),s},concat:e=>{var t;const n=s(cEe());return n.use(e),n.identifyOnResolve(i||n.identifyOnResolve()||((null==(t=e.identifyOnResolve)?void 0:t.call(e))??!1)),n},applyToStack:s,identify:()=>a(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return AEe(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(i=e),i),resolve:(e,t)=>{for(const i of a().map((e=>e.middleware)).reverse())e=i(e,t);return i&&o.identify(),e}};return o},uEe={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},hEe={high:3,normal:2,low:1};class dEe{constructor(e){this.config=e,this.middlewareStack=cEe()}send(e,t,i){const n="function"!=typeof t?t:void 0,s="function"==typeof t?t:i;let r;if(void 0===n&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?r=t.get(e.constructor):(r=e.resolveMiddleware(this.middlewareStack,this.config,n),t.set(e.constructor,r))}else delete this.handlers,r=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!s)return r(e).then((e=>e.output));r(e).then((e=>s(null,e.output)),(e=>s(e))).catch((()=>{}))}destroy(){var e,t,i;null==(i=null==(t=null==(e=this.config)?void 0:e.requestHandler)?void 0:t.destroy)||i.call(t),delete this.handlers}}class gEe{constructor(){this.middlewareStack=cEe()}static classBuilder(){return new pEe}resolveMiddlewareWithContext(e,t,i,{middlewareFn:n,clientName:s,commandName:r,inputFilterSensitiveLog:a,outputFilterSensitiveLog:o,smithyContext:l,additionalContext:A,CommandCtor:c}){for(const p of n.bind(this)(c,e,t,i))this.middlewareStack.use(p);const u=e.concat(this.middlewareStack),{logger:h}=t,d={logger:h,clientName:s,commandName:r,inputFilterSensitiveLog:a,outputFilterSensitiveLog:o,[JBe]:{commandInstance:this,...l},...A},{requestHandler:g}=t;return u.resolve((e=>g.handle(e.request,i||{})),d)}}class pEe{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,i={}){return this._smithyContext={service:e,operation:t,...i},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends gEe{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(i,n,s){return this.resolveMiddlewareWithContext(i,n,s,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}class fEe extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return fEe.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===fEe?fEe.isInstance(e):!!fEe.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const mEe=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,i])=>{null!=e[t]&&""!==e[t]||(e[t]=i)}));const i=e.message||e.Message||"UnknownError";return e.message=i,delete e.Message,e},CEe=e=>({output:t,parsedBody:i,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:i,errorCode:n})=>{const s=IEe(e),r=s.httpStatusCode?s.httpStatusCode+"":void 0,a=new i({name:(null==t?void 0:t.code)||(null==t?void 0:t.Code)||n||r||"UnknownError",$fault:"client",$metadata:s});throw mEe(a,t)})({output:t,parsedBody:i,exceptionCtor:e,errorCode:n})},IEe=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),vEe=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},BEe=e=>{const t=[];for(const i in YBe){const n=YBe[i];void 0!==e[n]&&t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},yEe=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},bEe=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},EEe=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},wEe=e=>({...BEe(e),...bEe(e)}),QEe=e=>({...yEe(e),...EEe(e)});class _Ee{trace(){}debug(){}info(){}warn(){}error(){}}const SEe=(e,t)=>{const i={};for(const n in t)xEe(i,e,t,n);return i},xEe=(e,t,i,n)=>{if(null!==t){let s=i[n];"function"==typeof s&&(s=[,s]);const[r=kEe,a=DEe,o=n]=s;return void(("function"==typeof r&&r(t[o])||"function"!=typeof r&&r)&&(e[n]=a(t[o])))}let[s,r]=i[n];if("function"==typeof r){let t;const i=void 0===s&&null!=(t=r()),a="function"==typeof s&&!!s(void 0)||"function"!=typeof s&&!!s;i?e[n]=t:a&&(e[n]=r())}else{const t=void 0===s&&null!=r,i="function"==typeof s&&!!s(r)||"function"!=typeof s&&!!s;(t||i)&&(e[n]=r)}},kEe=e=>null!=e,DEe=e=>e,FEe=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(FEe);if("object"==typeof e){const t={};for(const i of Object.keys(e))null!=e[i]&&(t[i]=FEe(e[i]));return t}return e},TEe=(e,t)=>(async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return kye.mutate(e);if(!e)return kye.mutate(new Uint8Array);const i=t.streamCollector(e);return kye.mutate(await i)})(e,t).then((e=>t.utf8Encoder(e))),MEe=(e,t)=>TEe(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(I2){throw"SyntaxError"===(null==I2?void 0:I2.name)&&Object.defineProperty(I2,"$responseBodyText",{value:e}),I2}return{}})),REe=async(e,t)=>{const i=await MEe(e,t);return i.message=i.message??i.Message,i},NEe=(e,t)=>{const i=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},n=(s=e.headers,r="x-amzn-errortype",Object.keys(s).find((e=>e.toLowerCase()===r.toLowerCase())));var s,r;return void 0!==n?i(e.headers[n]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):void 0},LEe=/\d{12}\.ddb/;const UEe="user-agent",HEe="x-amz-user-agent",PEe=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,OEe=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const GEe=e=>(t,i)=>async n=>{var s,r,a,o;const{request:l}=n;if(!eye.isInstance(l))return t(n);const{headers:A}=l,c=(null==(s=null==i?void 0:i.userAgent)?void 0:s.map(KEe))||[],u=(await e.defaultUserAgentProvider()).map(KEe);await async function(e,t,i){var n,s,r,a,o,l,A;const c=i.request;if("rpc-v2-cbor"===(null==(n=null==c?void 0:c.headers)?void 0:n["smithy-protocol"])&&ybe(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const i=await t.retryStrategy();"function"==typeof i.acquireInitialRetryToken?(null==(r=null==(s=i.constructor)?void 0:s.name)?void 0:r.includes("Adaptive"))?ybe(e,"RETRY_MODE_ADAPTIVE","F"):ybe(e,"RETRY_MODE_STANDARD","E"):ybe(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const i=e.endpointV2;switch(String(null==(a=null==i?void 0:i.url)?void 0:a.hostname).match(LEe)&&ybe(e,"ACCOUNT_ID_ENDPOINT","O"),await(null==(o=t.accountIdEndpointMode)?void 0:o.call(t))){case"disabled":ybe(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":ybe(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":ybe(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const u=null==(A=null==(l=e.__smithy_context)?void 0:l.selectedHttpAuthScheme)?void 0:A.identity;if(null==u?void 0:u.$source){const t=u;t.accountId&&ybe(e,"RESOLVED_ACCOUNT_ID","T");for(const[i,n]of Object.entries(t.$source??{}))ybe(e,i,n)}}(i,e,n);const h=i;u.push(`m/${function(e){let t="";for(const i in e){const n=e[i];if(!(t.length+n.length+1<=1024))break;t.length?t+=","+n:t+=n}return t}(Object.assign({},null==(r=i.__smithy_context)?void 0:r.features,null==(a=h.__aws_sdk_context)?void 0:a.features))}`);const d=(null==(o=null==e?void 0:e.customUserAgent)?void 0:o.map(KEe))||[],g=await e.userAgentAppId();g&&u.push(KEe([`app/${g}`]));const p=[].concat([...u,...c,...d]).join(" "),f=[...u.filter((e=>e.startsWith("aws-sdk-"))),...d].join(" ");return"browser"!==e.runtime?(f&&(A[HEe]=A[HEe]?`${A[UEe]} ${f}`:f),A[UEe]=p):A[HEe]=p,t({...n,request:l})},KEe=e=>{var t;const i=e[0].split("/").map((e=>e.replace(PEe,"-"))).join("/"),n=null==(t=e[1])?void 0:t.replace(OEe,"-"),s=i.indexOf("/"),r=i.substring(0,s);let a=i.substring(s+1);return"api"===r&&(a=a.toLowerCase()),[r,a,n].filter((e=>e&&e.length>0)).reduce(((e,t,i)=>{switch(i){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},qEe={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},YEe=e=>({applyToStack:t=>{t.add(GEe(e),qEe)}});var VEe,WEe;(WEe=VEe||(VEe={})).ENV="env",WEe.CONFIG="shared config entry";const jEe=!1,JEe=!1,zEe=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),XEe=e=>zEe(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,$Ee=e=>{const{region:t,useFipsEndpoint:i}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return XEe(t);const e=await t();return XEe(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!zEe(e)||("function"!=typeof i?Promise.resolve(!!i):i())}}},ZEe="content-length";const ewe={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},twe=e=>({applyToStack:t=>{var i;t.add((i=e.bodyLengthChecker,e=>async t=>{const n=t.request;if(eye.isInstance(n)){const{body:e,headers:t}=n;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(ZEe))try{const t=i(e);n.headers={...n.headers,[ZEe]:String(t)}}catch(s){}}return e({...t,request:n})}),ewe)}}),iwe=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,nwe=/(\d+\.){3}\d+/,swe=/\.\./,rwe=e=>iwe.test(e)&&!nwe.test(e)&&!swe.test(e),awe=e=>{const[t,i,n,,,s]=e.split(":"),r="arn"===t&&e.split(":").length>=6,a=Boolean(r&&i&&n&&s);if(r&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},owe=(e,t,i)=>{const n=async()=>{const n=i[e]??i[t];return"function"==typeof n?n():n};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof i.credentials?await i.credentials():i.credentials;return(null==e?void 0:e.credentialScope)??(null==e?void 0:e.CredentialScope)}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof i.credentials?await i.credentials():i.credentials;return(null==e?void 0:e.accountId)??(null==e?void 0:e.AccountId)}:"endpoint"===e||"endpoint"===t?async()=>{const e=await n();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:i,port:n,path:s}=e;return`${t}//${i}${n?":"+n:""}${s}`}}return e}:n},lwe=async e=>{};const Awe=e=>{if("string"==typeof e)return Awe(new URL(e));const{hostname:t,pathname:i,port:n,protocol:s,search:r}=e;let a;return r&&(a=function(e){const t={};if(e=e.replace(/^\?/,""))for(const i of e.split("&")){let[e,n=null]=i.split("=");e=decodeURIComponent(e),n&&(n=decodeURIComponent(n)),e in t?Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]:t[e]=n}return t}(r)),{hostname:t,port:n?parseInt(n):void 0,protocol:s,path:i,query:a}},cwe=e=>"object"==typeof e?"url"in e?Awe(e.url):e:Awe(e),uwe=async(e,t,i)=>{var n;const s={},r=(null==(n=null==t?void 0:t.getEndpointParameterInstructions)?void 0:n.call(t))||{};for(const[a,o]of Object.entries(r))switch(o.type){case"staticContextParams":s[a]=o.value;break;case"contextParams":s[a]=e[o.name];break;case"clientContextParams":case"builtInParams":s[a]=await owe(o.name,a,i)();break;case"operationContextParams":s[a]=o.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(r).length&&Object.assign(s,i),"s3"===String(i.serviceId).toLowerCase()&&await(async e=>{const t=(null==e?void 0:e.Bucket)||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),awe(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!rwe(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(s),s},hwe=({config:e,instructions:t})=>(i,n)=>async s=>{var r,a,o;e.endpoint&&function(e,t,i){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=i}(n,"ENDPOINT_OVERRIDE","N");const l=await(async(e,t,i,n)=>{if(!i.endpoint){let e;e=i.serviceConfiguredEndpoint?await i.serviceConfiguredEndpoint():await lwe(i.serviceId),e&&(i.endpoint=()=>Promise.resolve(cwe(e)))}const s=await uwe(e,t,i);if("function"!=typeof i.endpointProvider)throw new Error("config.endpointProvider is not set.");return i.endpointProvider(s,n)})(s.input,{getEndpointParameterInstructions:()=>t},{...e},n);n.endpointV2=l,n.authSchemes=null==(r=l.properties)?void 0:r.authSchemes;const A=null==(a=n.authSchemes)?void 0:a[0];if(A){n.signing_region=A.signingRegion,n.signing_service=A.signingName;const e=cye(n),t=null==(o=null==e?void 0:e.selectedHttpAuthScheme)?void 0:o.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:A.signingRegion,signingRegion:A.signingRegion,signing_service:A.signingName,signingName:A.signingName,signingRegionSet:A.signingRegionSet},A.properties))}return i({...s})},dwe={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:fye.name},gwe=(e,t)=>({applyToStack:i=>{i.addRelativeTo(hwe({config:e,instructions:t}),dwe)}}),pwe=e=>{const t=e.tls??!0,{endpoint:i}=e,n=null!=i?async()=>cwe(await uye(i)()):void 0,s=!!i,r={...e,endpoint:n,tls:t,isCustomEndpoint:s,useDualstackEndpoint:uye(e.useDualstackEndpoint??!1),useFipsEndpoint:uye(e.useFipsEndpoint??!1)};let a;return r.serviceConfiguredEndpoint=async()=>(e.serviceId&&!a&&(a=lwe(e.serviceId)),a),r};var fwe,mwe;(mwe=fwe||(fwe={})).STANDARD="standard",mwe.ADAPTIVE="adaptive";const Cwe=fwe.STANDARD,Iwe=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],vwe=["TimeoutError","RequestTimeout","RequestTimeoutException"],Bwe=[500,502,503,504],ywe=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],bwe=e=>{var t,i;return 429===(null==(t=e.$metadata)?void 0:t.httpStatusCode)||Iwe.includes(e.name)||1==(null==(i=e.$retryable)?void 0:i.throttling)},Ewe=(e,t=0)=>{var i;return(e=>{var t;return null==(t=e.$metadata)?void 0:t.clockSkewCorrected})(e)||vwe.includes(e.name)||ywe.includes((null==e?void 0:e.code)||"")||Bwe.includes((null==(i=e.$metadata)?void 0:i.httpStatusCode)||0)||void 0!==e.cause&&t<=10&&Ewe(e.cause,t+1)};class wwe{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(null==e?void 0:e.beta)??.7,this.minCapacity=(null==e?void 0:e.minCapacity)??1,this.minFillRate=(null==e?void 0:e.minFillRate)??.5,this.scaleConstant=(null==e?void 0:e.scaleConstant)??.4,this.smooth=(null==e?void 0:e.smooth)??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>wwe.setTimeoutFn(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),bwe(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const i=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(i)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}wwe.setTimeoutFn=setTimeout;const Qwe=({retryDelay:e,retryCount:t,retryCost:i})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>i});class _we{constructor(e){this.maxAttempts=e,this.mode=fwe.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Qwe({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const i=await this.getMaxAttempts();if(this.shouldRetry(e,t,i)){const i=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===i?500:100);const n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,r=this.getCapacityCost(i);return this.capacity-=r,Qwe({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:r})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return 3}}shouldRetry(e,t,i){return e.getRetryCount()+1<i&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Swe{constructor(e,t){this.maxAttemptsProvider=e,this.mode=fwe.ADAPTIVE;const{rateLimiter:i}=t??{};this.rateLimiter=i??new wwe,this.standardRetryStrategy=new _we(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let xwe;const kwe=new Uint8Array(16);function Dwe(){if(!xwe&&(xwe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xwe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xwe(kwe)}const Fwe=[];for(let _=0;_<256;++_)Fwe.push((_+256).toString(16).slice(1));const Twe={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Mwe(e,t,i){if(Twe.randomUUID&&!t&&!e)return Twe.randomUUID();const n=(e=e||{}).random||(e.rng||Dwe)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(e,t=0){return Fwe[e[t+0]]+Fwe[e[t+1]]+Fwe[e[t+2]]+Fwe[e[t+3]]+"-"+Fwe[e[t+4]]+Fwe[e[t+5]]+"-"+Fwe[e[t+6]]+Fwe[e[t+7]]+"-"+Fwe[e[t+8]]+Fwe[e[t+9]]+"-"+Fwe[e[t+10]]+Fwe[e[t+11]]+Fwe[e[t+12]]+Fwe[e[t+13]]+Fwe[e[t+14]]+Fwe[e[t+15]]}(n)}const Rwe=e=>{const{retryStrategy:t}=e,i=uye(e.maxAttempts??3);return{...e,maxAttempts:i,retryStrategy:async()=>{if(t)return t;return await uye(e.retryMode)()===fwe.ADAPTIVE?new Swe(i):new _we(i)}}},Nwe=e=>(null==e?void 0:e.body)instanceof ReadableStream,Lwe=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Uwe=e=>{const t={error:e,errorType:Hwe(e)},i=Gwe(e.$response);return i&&(t.retryAfterHint=i),t},Hwe=e=>bwe(e)?"THROTTLING":Ewe(e)?"TRANSIENT":(e=>{var t;if(void 0!==(null==(t=e.$metadata)?void 0:t.httpStatusCode)){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Ewe(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Pwe={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Owe=e=>({applyToStack:t=>{t.add((e=>(t,i)=>async n=>{var s;let r=await e.retryStrategy();const a=await e.maxAttempts();if(!Lwe(r))return(null==r?void 0:r.mode)&&(i.userAgent=[...i.userAgent||[],["cfg/retry-mode",r.mode]]),r.retry(t,n);{let e=await r.acquireInitialRetryToken(i.partition_id),A=new Error,c=0,u=0;const{request:h}=n,d=eye.isInstance(h);for(d&&(h.headers["amz-sdk-invocation-id"]=Mwe());;)try{d&&(h.headers["amz-sdk-request"]=`attempt=${c+1}; max=${a}`);const{response:i,output:s}=await t(n);return r.recordSuccess(e),s.$metadata.attempts=c+1,s.$metadata.totalRetryDelay=u,{response:i,output:s}}catch(I2){const n=Uwe(I2);if(A=(o=I2)instanceof Error?o:o instanceof Object?Object.assign(new Error,o):"string"==typeof o?new Error(o):new Error(`AWS SDK error wrapper for ${o}`),d&&Nwe(h))throw null==(s=i.logger instanceof _Ee?console:i.logger)||s.warn("An error was encountered in a non-retryable streaming request."),A;try{e=await r.refreshRetryTokenForRetry(e,n)}catch(l){throw A.$metadata||(A.$metadata={}),A.$metadata.attempts=c+1,A.$metadata.totalRetryDelay=u,A}c=e.getRetryCount();const a=e.getRetryDelay();u+=a,await new Promise((e=>setTimeout(e,a)))}}var o})(e),Pwe)}}),Gwe=e=>{if(!tye.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const i=e.headers[t],n=Number(i);if(!Number.isNaN(n))return new Date(1e3*n);return new Date(i)},Kwe=async(e,t,i)=>({operation:cye(t).operation,region:await uye(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const qwe=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"kinesis",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Ywe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Vwe="3.749.0";var Wwe="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function jwe(e){return e instanceof Uint8Array?e:"string"==typeof e?Wwe(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Jwe(e){return"string"==typeof e?0===e.length:0===e.byteLength}var zwe={name:"SHA-256"},Xwe={name:"HMAC",hash:zwe},$we=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Zwe={};function eQe(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Zwe}var tQe=
/** @class */function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Jwe(e)){var t=jwe(e),i=new Uint8Array(this.toHash.byteLength+t.byteLength);i.set(this.toHash,0),i.set(t,this.toHash.byteLength),this.toHash=i}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return eQe().crypto.subtle.sign(Xwe,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Jwe(this.toHash)?Promise.resolve($we):Promise.resolve().then((function(){return eQe().crypto.subtle.digest(zwe,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,i){eQe().crypto.subtle.importKey("raw",jwe(e.secret),Xwe,!1,["sign"]).then(t,i)})),this.key.catch((function(){})))},e}();function iQe(e,t,i,n){return new(i||(i=Promise))((function(s,r){function a(e){try{l(n.next(e))}catch(I2){r(I2)}}function o(e){try{l(n.throw(e))}catch(I2){r(I2)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((n=n.apply(e,t||[])).next())}))}function nQe(e,t){var i,n,s,r={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(l){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(r=0)),r;)try{if(i=1,n&&(s=2&o[0]?n.return:o[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;switch(n=0,s&&(o=[2&o[0],s.value]),o[0]){case 0:case 1:s=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!(s=r.trys,(s=s.length>0&&s[s.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(6===o[0]&&r.label<s[1]){r.label=s[1],s=o;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(o);break}s[2]&&r.ops.pop(),r.trys.pop();continue}o=t.call(e,r)}catch(I2){o=[6,I2],n=0}finally{i=s=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}"function"==typeof SuppressedError&&SuppressedError;var sQe=64,rQe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),aQe=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],oQe=Math.pow(2,53)-1,lQe=
/** @class */function(){function e(){this.state=Int32Array.from(aQe),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,i=e.byteLength;if(this.bytesHashed+=i,8*this.bytesHashed>oQe)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;i>0;)this.buffer[this.bufferLength++]=e[t++],i--,this.bufferLength===sQe&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),i=this.bufferLength;if(t.setUint8(this.bufferLength++,128),i%sQe>=56){for(var n=this.bufferLength;n<sQe;n++)t.setUint8(n,0);this.hashBuffer(),this.bufferLength=0}for(n=this.bufferLength;n<56;n++)t.setUint8(n,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var s=new Uint8Array(32);for(n=0;n<8;n++)s[4*n]=this.state[n]>>>24&255,s[4*n+1]=this.state[n]>>>16&255,s[4*n+2]=this.state[n]>>>8&255,s[4*n+3]=this.state[n]>>>0&255;return s},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,i=t[0],n=t[1],s=t[2],r=t[3],a=t[4],o=t[5],l=t[6],A=t[7],c=0;c<sQe;c++){if(c<16)this.temp[c]=(255&e[4*c])<<24|(255&e[4*c+1])<<16|(255&e[4*c+2])<<8|255&e[4*c+3];else{var u=this.temp[c-2],h=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,d=((u=this.temp[c-15])>>>7|u<<25)^(u>>>18|u<<14)^u>>>3;this.temp[c]=(h+this.temp[c-7]|0)+(d+this.temp[c-16]|0)}var g=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&o^~a&l)|0)+(A+(rQe[c]+this.temp[c]|0)|0)|0,p=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&n^i&s^n&s)|0;A=l,l=o,o=a,a=r+g|0,r=s,s=n,n=i,i=g+p|0}t[0]+=i,t[1]+=n,t[2]+=s,t[3]+=r,t[4]+=a,t[5]+=o,t[6]+=l,t[7]+=A},e}(),AQe=
/** @class */function(){function e(e){this.secret=e,this.hash=new lQe,this.reset()}return e.prototype.update=function(e){if(!Jwe(e)&&!this.error)try{this.hash.update(jwe(e))}catch(I2){this.error=I2}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return iQe(this,void 0,void 0,(function(){return nQe(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new lQe,this.secret){this.outer=new lQe;var e=function(e){var t=jwe(e);if(t.byteLength>sQe){var i=new lQe;i.update(t),t=i.digest()}var n=new Uint8Array(sQe);return n.set(t),n}(this.secret),t=new Uint8Array(sQe);t.set(e);for(var i=0;i<sQe;i++)e[i]^=54,t[i]^=92;this.hash.update(e),this.outer.update(t);for(i=0;i<e.byteLength;i++)e[i]=0}},e}();var cQe=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function uQe(e){return!(!function(e){if("object"==typeof e&&"object"==typeof e.crypto){return"function"==typeof e.crypto.getRandomValues}return!1}(e)||"object"!=typeof e.crypto.subtle)&&function(e){return e&&cQe.every((function(t){return"function"==typeof e[t]}))}(e.crypto.subtle)}var hQe=
/** @class */function(){function e(e){uQe(eQe())?this.hash=new tQe(e):this.hash=new AQe(e)}return e.prototype.update=function(e,t){this.hash.update(jwe(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();const dQe={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},gQe={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},pQe={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},fQe={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},mQe={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};let CQe=class e{
/**
   * Get first matched item for a string
   * @param {RegExp} regexp
   * @param {String} ua
   * @return {Array|{index: number, input: string}|*|boolean|string}
   */
static getFirstMatch(e,t){const i=t.match(e);return i&&i.length>0&&i[1]||""}
/**
   * Get second matched item for a string
   * @param regexp
   * @param {String} ua
   * @return {Array|{index: number, input: string}|*|boolean|string}
   */static getSecondMatch(e,t){const i=t.match(e);return i&&i.length>1&&i[2]||""}
/**
   * Match a regexp and return a constant or undefined
   * @param {RegExp} regexp
   * @param {String} ua
   * @param {*} _const Any const that will be returned if regexp matches the string
   * @return {*}
   */static matchAndReturnConst(e,t,i){if(e.test(t))return i}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}
/**
   * Get macOS version name
   *    10.5 - Leopard
   *    10.6 - Snow Leopard
   *    10.7 - Lion
   *    10.8 - Mountain Lion
   *    10.9 - Mavericks
   *    10.10 - Yosemite
   *    10.11 - El Capitan
   *    10.12 - Sierra
   *    10.13 - High Sierra
   *    10.14 - Mojave
   *    10.15 - Catalina
   *
   * @example
   *   getMacOSVersionName("10.14") // 'Mojave'
   *
   * @param  {string} version
   * @return {string} versionName
   */static getMacOSVersionName(e){const t=e.split(".").splice(0,2).map((e=>parseInt(e,10)||0));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}
/**
   * Get Android version name
   *    1.5 - Cupcake
   *    1.6 - Donut
   *    2.0 - Eclair
   *    2.1 - Eclair
   *    2.2 - Froyo
   *    2.x - Gingerbread
   *    3.x - Honeycomb
   *    4.0 - Ice Cream Sandwich
   *    4.1 - Jelly Bean
   *    4.4 - KitKat
   *    5.x - Lollipop
   *    6.x - Marshmallow
   *    7.x - Nougat
   *    8.x - Oreo
   *    9.x - Pie
   *
   * @example
   *   getAndroidVersionName("7.0") // 'Nougat'
   *
   * @param  {string} version
   * @return {string} versionName
   */static getAndroidVersionName(e){const t=e.split(".").splice(0,2).map((e=>parseInt(e,10)||0));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0}
/**
   * Get version precisions count
   *
   * @example
   *   getVersionPrecision("1.10.3") // 3
   *
   * @param  {string} version
   * @return {number}
   */static getVersionPrecision(e){return e.split(".").length}
/**
   * Calculate browser version weight
   *
   * @example
   *   compareVersions('1.10.2.1',  '1.8.2.1.90')    // 1
   *   compareVersions('1.010.2.1', '1.09.2.1.90');  // 1
   *   compareVersions('1.10.2.1',  '1.10.2.1');     // 0
   *   compareVersions('1.10.2.1',  '1.0800.2');     // -1
   *   compareVersions('1.10.2.1',  '1.10',  true);  // 0
   *
   * @param {String} versionA versions versions to compare
   * @param {String} versionB versions versions to compare
   * @param {boolean} [isLoose] enable loose comparison
   * @return {Number} comparison result: -1 when versionA is lower,
   * 1 when versionA is bigger, 0 when both equal
   */
/* eslint consistent-return: 1 */static compareVersions(t,i,n=!1){const s=e.getVersionPrecision(t),r=e.getVersionPrecision(i);let a=Math.max(s,r),o=0;const l=e.map([t,i],(t=>{const i=a-e.getVersionPrecision(t),n=t+new Array(i+1).join(".0");return e.map(n.split("."),(e=>new Array(20-e.length).join("0")+e)).reverse()}));for(n&&(o=a-Math.min(s,r)),a-=1;a>=o;){if(l[0][a]>l[1][a])return 1;if(l[0][a]===l[1][a]){if(a===o)return 0;a-=1}else if(l[0][a]<l[1][a])return-1}}
/**
   * Array::map polyfill
   *
   * @param  {Array} arr
   * @param  {Function} iterator
   * @return {Array}
   */static map(e,t){const i=[];let n;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)i.push(t(e[n]));return i}
/**
   * Array::find polyfill
   *
   * @param  {Array} arr
   * @param  {Function} predicate
   * @return {Array}
   */static find(e,t){let i,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,n=e.length;i<n;i+=1){const n=e[i];if(t(n,i))return n}}
/**
   * Object::assign polyfill
   *
   * @param  {Object} obj
   * @param  {Object} ...objs
   * @return {Object}
   */static assign(e,...t){const i=e;let n,s;if(Object.assign)return Object.assign(e,...t);for(n=0,s=t.length;n<s;n+=1){const e=t[n];if("object"==typeof e&&null!==e){Object.keys(e).forEach((t=>{i[t]=e[t]}))}}return e}
/**
   * Get short version/alias for a browser name
   *
   * @example
   *   getBrowserAlias('Microsoft Edge') // edge
   *
   * @param  {string} browserName
   * @return {string}
   */static getBrowserAlias(e){return dQe[e]}
/**
   * Get short version/alias for a browser name
   *
   * @example
   *   getBrowserAlias('edge') // Microsoft Edge
   *
   * @param  {string} browserAlias
   * @return {string}
   */static getBrowserTypeByAlias(e){return gQe[e]||""}};const IQe=/version\/(\d+(\.?_?\d+)+)/i,vQe=[
/* Googlebot */
{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},i=CQe.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},
/* Opera < 13.0 */
{test:[/opera/i],describe(e){const t={name:"Opera"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},
/* Opera > 13.0 */
{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},i=CQe.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},i=CQe.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},i=CQe.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},i=CQe.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},i=CQe.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},i=CQe.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},i=CQe.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=CQe.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},i=CQe.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},i=CQe.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},i=CQe.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},i=CQe.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},i=CQe.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},i=CQe.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},i=CQe.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},i=CQe.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},i=CQe.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},i=CQe.getFirstMatch(IQe,e)||CQe.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},i=CQe.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},i=CQe.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},i=CQe.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},i=CQe.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},i=CQe.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},i=CQe.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},i=CQe.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},i=CQe.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},i=CQe.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},
/* Android Browser */
{test(e){const t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe(e){const t={name:"Android Browser"},i=CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},
/* PlayStation 4 */
{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},i=CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},
/* Safari */
{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},i=CQe.getFirstMatch(IQe,e);return i&&(t.version=i),t}},
/* Something else */
{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:CQe.getFirstMatch(t,e),version:CQe.getSecondMatch(t,e)}}}],BQe=[
/* Roku */
{test:[/Roku\/DVP/],describe(e){const t=CQe.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:fQe.Roku,version:t}}},
/* Windows Phone */
{test:[/windows phone/i],describe(e){const t=CQe.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:fQe.WindowsPhone,version:t}}},
/* Windows */
{test:[/windows /i],describe(e){const t=CQe.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),i=CQe.getWindowsVersionName(t);return{name:fQe.Windows,version:t,versionName:i}}},
/* Firefox on iPad */
{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:fQe.iOS},i=CQe.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},
/* macOS */
{test:[/macintosh/i],describe(e){const t=CQe.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=CQe.getMacOSVersionName(t),n={name:fQe.MacOS,version:t};return i&&(n.versionName=i),n}},
/* iOS */
{test:[/(ipod|iphone|ipad)/i],describe(e){const t=CQe.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:fQe.iOS,version:t}}},
/* Android */
{test(e){const t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe(e){const t=CQe.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=CQe.getAndroidVersionName(t),n={name:fQe.Android,version:t};return i&&(n.versionName=i),n}},
/* WebOS */
{test:[/(web|hpw)[o0]s/i],describe(e){const t=CQe.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:fQe.WebOS};return t&&t.length&&(i.version=t),i}},
/* BlackBerry */
{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=CQe.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||CQe.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||CQe.getFirstMatch(/\bbb(\d+)/i,e);return{name:fQe.BlackBerry,version:t}}},
/* Bada */
{test:[/bada/i],describe(e){const t=CQe.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:fQe.Bada,version:t}}},
/* Tizen */
{test:[/tizen/i],describe(e){const t=CQe.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:fQe.Tizen,version:t}}},
/* Linux */
{test:[/linux/i],describe:()=>({name:fQe.Linux})},
/* Chrome OS */
{test:[/CrOS/],describe:()=>({name:fQe.ChromeOS})},
/* Playstation 4 */
{test:[/PlayStation 4/],describe(e){const t=CQe.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:fQe.PlayStation4,version:t}}}],yQe=[
/* Googlebot */
{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},
/* Huawei */
{test:[/huawei/i],describe(e){const t=CQe.getFirstMatch(/(can-l01)/i,e)&&"Nova",i={type:pQe.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},
/* Nexus Tablet */
{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:pQe.tablet,vendor:"Nexus"})},
/* iPad */
{test:[/ipad/i],describe:()=>({type:pQe.tablet,vendor:"Apple",model:"iPad"})},
/* Firefox on iPad */
{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:pQe.tablet,vendor:"Apple",model:"iPad"})},
/* Amazon Kindle Fire */
{test:[/kftt build/i],describe:()=>({type:pQe.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},
/* Another Amazon Tablet with Silk */
{test:[/silk/i],describe:()=>({type:pQe.tablet,vendor:"Amazon"})},
/* Tablet */
{test:[/tablet(?! pc)/i],describe:()=>({type:pQe.tablet})},
/* iPod/iPhone */
{test(e){const t=e.test(/ipod|iphone/i),i=e.test(/like (ipod|iphone)/i);return t&&!i},describe(e){const t=CQe.getFirstMatch(/(ipod|iphone)/i,e);return{type:pQe.mobile,vendor:"Apple",model:t}}},
/* Nexus Mobile */
{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:pQe.mobile,vendor:"Nexus"})},
/* Mobile */
{test:[/[^-]mobi/i],describe:()=>({type:pQe.mobile})},
/* BlackBerry */
{test:e=>"blackberry"===e.getBrowserName(!0),describe:()=>({type:pQe.mobile,vendor:"BlackBerry"})},
/* Bada */
{test:e=>"bada"===e.getBrowserName(!0),describe:()=>({type:pQe.mobile})},
/* Windows Phone */
{test:e=>"windows phone"===e.getBrowserName(),describe:()=>({type:pQe.mobile,vendor:"Microsoft"})},
/* Android Tablet */
{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:()=>({type:pQe.tablet})},
/* Android Mobile */
{test:e=>"android"===e.getOSName(!0),describe:()=>({type:pQe.mobile})},
/* desktop */
{test:e=>"macos"===e.getOSName(!0),describe:()=>({type:pQe.desktop,vendor:"Apple"})},
/* Windows */
{test:e=>"windows"===e.getOSName(!0),describe:()=>({type:pQe.desktop})},
/* Linux */
{test:e=>"linux"===e.getOSName(!0),describe:()=>({type:pQe.desktop})},
/* PlayStation 4 */
{test:e=>"playstation 4"===e.getOSName(!0),describe:()=>({type:pQe.tv})},
/* Roku */
{test:e=>"roku"===e.getOSName(!0),describe:()=>({type:pQe.tv})}],bQe=[
/* EdgeHTML */
{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:mQe.Blink};const t=CQe.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:mQe.EdgeHTML,version:t}}},
/* Trident */
{test:[/trident/i],describe(e){const t={name:mQe.Trident},i=CQe.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},
/* Presto */
{test:e=>e.test(/presto/i),describe(e){const t={name:mQe.Presto},i=CQe.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},
/* Gecko */
{test(e){const t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe(e){const t={name:mQe.Gecko},i=CQe.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},
/* Blink */
{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:mQe.Blink})},
/* WebKit */
{test:[/(apple)?webkit/i],describe(e){const t={name:mQe.WebKit},i=CQe.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];let EQe=class{
/**
   * Create instance of Parser
   *
   * @param {String} UA User-Agent string
   * @param {Boolean} [skipParsing=false] parser can skip parsing in purpose of performance
   * improvements if you need to make a more particular parsing
   * like {@link Parser#parseBrowser} or {@link Parser#parsePlatform}
   *
   * @throw {Error} in case of empty UA String
   *
   * @constructor
   */
constructor(e,t=!1){if(null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}
/**
   * Get UserAgent string of current Parser instance
   * @return {String} User-Agent String of the current <Parser> object
   *
   * @public
   */getUA(){return this._ua}
/**
   * Test a UA string for a regexp
   * @param {RegExp} regex
   * @return {Boolean}
   */test(e){return e.test(this._ua)}
/**
   * Get parsed browser object
   * @return {Object}
   */parseBrowser(){this.parsedResult.browser={};const e=CQe.find(vQe,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}
/**
   * Get parsed browser object
   * @return {Object}
   *
   * @public
   */getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}
/**
   * Get browser's name
   * @return {String} Browser's name or an empty string
   *
   * @public
   */getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}
/**
   * Get browser's version
   * @return {String} version of browser
   *
   * @public
   */getBrowserVersion(){return this.getBrowser().version}
/**
   * Get OS
   * @return {Object}
   *
   * @example
   * this.getOS();
   * {
   *   name: 'macOS',
   *   version: '10.11.12'
   * }
   */getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}
/**
   * Parse OS and save it to this.parsedResult.os
   * @return {*|{}}
   */parseOS(){this.parsedResult.os={};const e=CQe.find(BQe,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}
/**
   * Get OS name
   * @param {Boolean} [toLowerCase] return lower-cased value
   * @return {String} name of the OS — macOS, Windows, Linux, etc.
   */getOSName(e){const{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}
/**
   * Get OS version
   * @return {String} full version with dots ('10.11.12', '5.6', etc)
   */getOSVersion(){return this.getOS().version}
/**
   * Get parsed platform
   * @return {{}}
   */getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}
/**
   * Get platform name
   * @param {Boolean} [toLowerCase=false]
   * @return {*}
   */getPlatformType(e=!1){const{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}
/**
   * Get parsed platform
   * @return {{}}
   */parsePlatform(){this.parsedResult.platform={};const e=CQe.find(yQe,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}
/**
   * Get parsed engine
   * @return {{}}
   */getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}
/**
   * Get engines's name
   * @return {String} Engines's name or an empty string
   *
   * @public
   */getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}
/**
   * Get parsed platform
   * @return {{}}
   */parseEngine(){this.parsedResult.engine={};const e=CQe.find(bQe,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}
/**
   * Parse full information about the browser
   * @returns {Parser}
   */parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}
/**
   * Get parsed result
   * @return {ParsedResult}
   */getResult(){return CQe.assign({},this.parsedResult)}
/**
   * Check if parsed browser matches certain conditions
   *
   * @param {Object} checkTree It's one or two layered object,
   * which can include a platform or an OS on the first layer
   * and should have browsers specs on the bottom-laying layer
   *
   * @returns {Boolean|undefined} Whether the browser satisfies the set conditions or not.
   * Returns `undefined` when the browser is no described in the checkTree object.
   *
   * @example
   * const browser = Bowser.getParser(window.navigator.userAgent);
   * if (browser.satisfies({chrome: '>118.01.1322' }))
   * // or with os
   * if (browser.satisfies({windows: { chrome: '>118.01.1322' } }))
   * // or with platforms
   * if (browser.satisfies({desktop: { chrome: '>118.01.1322' } }))
   */satisfies(e){const t={};let i=0;const n={};let s=0;if(Object.keys(e).forEach((r=>{const a=e[r];"string"==typeof a?(n[r]=a,s+=1):"object"==typeof a&&(t[r]=a,i+=1)})),i>0){const e=Object.keys(t),i=CQe.find(e,(e=>this.isOS(e)));if(i){const e=this.satisfies(t[i]);if(void 0!==e)return e}const n=CQe.find(e,(e=>this.isPlatform(e)));if(n){const e=this.satisfies(t[n]);if(void 0!==e)return e}}if(s>0){const e=Object.keys(n),t=CQe.find(e,(e=>this.isBrowser(e,!0)));if(void 0!==t)return this.compareVersion(n[t])}}
/**
   * Check if the browser name equals the passed string
   * @param browserName The string to compare with the browser name
   * @param [includingAlias=false] The flag showing whether alias will be included into comparison
   * @returns {boolean}
   */isBrowser(e,t=!1){const i=this.getBrowserName().toLowerCase();let n=e.toLowerCase();const s=CQe.getBrowserTypeByAlias(n);return t&&s&&(n=s.toLowerCase()),n===i}compareVersion(e){let t=[0],i=e,n=!1;const s=this.getBrowserVersion();if("string"==typeof s)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(n=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(n=!0,i=e.substr(1)),t.indexOf(CQe.compareVersions(s,i,n))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}
/**
   * Is anything? Check if the browser is called "anything",
   * the OS called "anything" or the platform called "anything"
   * @param {String} anything
   * @param [includingAlias=false] The flag showing whether alias will be included into comparison
   * @returns {Boolean}
   */is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}
/**
   * Check if any of the given values satisfies this.is(anything)
   * @param {String[]} anythings
   * @returns {Boolean}
   */some(e=[]){return e.some((e=>this.is(e)))}};
/*!
 * Bowser - a browser detector
 * https://github.com/lancedikson/bowser
 * MIT License | (c) Dustin Diaz 2012-2015
 * MIT License | (c) Denis Demchenko 2015-2019
 */class wQe{
/**
   * Creates a {@link Parser} instance
   *
   * @param {String} UA UserAgent string
   * @param {Boolean} [skipParsing=false] Will make the Parser postpone parsing until you ask it
   * explicitly. Same as `skipParsing` for {@link Parser}.
   * @returns {Parser}
   * @throws {Error} when UA is not a String
   *
   * @example
   * const parser = Bowser.getParser(window.navigator.userAgent);
   * const result = parser.getResult();
   */
static getParser(e,t=!1){if("string"!=typeof e)throw new Error("UserAgent should be a string");return new EQe(e,t)}
/**
   * Creates a {@link Parser} instance and runs {@link Parser.getResult} immediately
   *
   * @param UA
   * @return {ParsedResult}
   *
   * @example
   * const result = Bowser.parse(window.navigator.userAgent);
   */static parse(e){return new EQe(e).getResult()}static get BROWSER_MAP(){return gQe}static get ENGINE_MAP(){return mQe}static get OS_MAP(){return fQe}static get PLATFORMS_MAP(){return pQe}}const QQe=({serviceId:e,clientVersion:t})=>async i=>{var n,s,r,a,o,l;const A="undefined"!=typeof window&&(null==(n=null==window?void 0:window.navigator)?void 0:n.userAgent)?wQe.parse(window.navigator.userAgent):void 0,c=[["aws-sdk-js",t],["ua","2.1"],[`os/${(null==(s=null==A?void 0:A.os)?void 0:s.name)||"other"}`,null==(r=null==A?void 0:A.os)?void 0:r.version],["lang/js"],["md/browser",`${(null==(a=null==A?void 0:A.browser)?void 0:a.name)??"unknown"}_${(null==(o=null==A?void 0:A.browser)?void 0:o.version)??"unknown"}`]];e&&c.push([`api/${e}`,t]);const u=await(null==(l=null==i?void 0:i.userAgentAppId)?void 0:l.call(i));return u&&c.push([`app/${u}`]),c};var _Qe,SQe=
/** @class */function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,i;try{for(var n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),s=n.next();!s.done;s=n.next()){var r=s.value;this.checksum=this.checksum>>>8^xQe[255&(this.checksum^r)]}}catch(a){t={error:a}}finally{try{s&&!s.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),xQe=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),i=0;i<e.length;)t[i]=e[i],i+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class kQe{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let i=7,n=Math.abs(Math.round(e));i>-1&&n>0;i--,n/=256)t[i]=n;return e<0&&DQe(t),new kQe(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&DQe(e),parseInt(Oye(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function DQe(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class FQe{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const s of Object.keys(e)){const i=this.fromUtf8(s);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[s]))}const i=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let n=0;for(const s of t)i.set(s,n),n+=s.byteLength;return i}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const i=new DataView(new ArrayBuffer(5));return i.setUint8(0,4),i.setInt32(1,e.value,!1),new Uint8Array(i.buffer);case"long":const n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);const r=new Uint8Array(s.buffer);return r.set(e.value,3),r;case"string":const a=this.fromUtf8(e.value),o=new DataView(new ArrayBuffer(3+a.byteLength));o.setUint8(0,7),o.setUint16(1,a.byteLength,!1);const l=new Uint8Array(o.buffer);return l.set(a,3),l;case"timestamp":const A=new Uint8Array(9);return A[0]=8,A.set(kQe.fromNumber(e.value.valueOf()).bytes,1),A;case"uuid":if(!GQe.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const c=new Uint8Array(17);return c[0]=9,c.set(Pye(e.value.replace(/\-/g,"")),1),c}}parse(e){const t={};let i=0;for(;i<e.byteLength;){const n=e.getUint8(i++),s=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+i,n));switch(i+=n,e.getUint8(i++)){case 0:t[s]={type:TQe,value:!0};break;case 1:t[s]={type:TQe,value:!1};break;case 2:t[s]={type:MQe,value:e.getInt8(i++)};break;case 3:t[s]={type:RQe,value:e.getInt16(i,!1)},i+=2;break;case 4:t[s]={type:NQe,value:e.getInt32(i,!1)},i+=4;break;case 5:t[s]={type:LQe,value:new kQe(new Uint8Array(e.buffer,e.byteOffset+i,8))},i+=8;break;case 6:const n=e.getUint16(i,!1);i+=2,t[s]={type:UQe,value:new Uint8Array(e.buffer,e.byteOffset+i,n)},i+=n;break;case 7:const r=e.getUint16(i,!1);i+=2,t[s]={type:HQe,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+i,r))},i+=r;break;case 8:t[s]={type:PQe,value:new Date(new kQe(new Uint8Array(e.buffer,e.byteOffset+i,8)).valueOf())},i+=8;break;case 9:const a=new Uint8Array(e.buffer,e.byteOffset+i,16);i+=16,t[s]={type:OQe,value:`${Oye(a.subarray(0,4))}-${Oye(a.subarray(4,6))}-${Oye(a.subarray(6,8))}-${Oye(a.subarray(8,10))}-${Oye(a.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(_Qe||(_Qe={}));const TQe="boolean",MQe="byte",RQe="short",NQe="integer",LQe="long",UQe="binary",HQe="string",PQe="timestamp",OQe="uuid",GQe=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class KQe{constructor(e,t){this.headerMarshaller=new FQe(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const i=this.headerMarshaller.format(e),n=i.byteLength+t.byteLength+16,s=new Uint8Array(n),r=new DataView(s.buffer,s.byteOffset,s.byteLength),a=new SQe;return r.setUint32(0,n,!1),r.setUint32(4,i.byteLength,!1),r.setUint32(8,a.update(s.subarray(0,8)).digest(),!1),s.set(i,12),s.set(t,i.byteLength+12),r.setUint32(n-4,a.update(s.subarray(8,n-4)).digest(),!1),s}decode(e){const{headers:t,body:i}=function({byteLength:e,byteOffset:t,buffer:i}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const n=new DataView(i,t,e),s=n.getUint32(0,!1);if(e!==s)throw new Error("Reported message length does not match received message length");const r=n.getUint32(4,!1),a=n.getUint32(8,!1),o=n.getUint32(e-4,!1),l=(new SQe).update(new Uint8Array(i,t,8));if(a!==l.digest())throw new Error(`The prelude checksum specified in the message (${a}) does not match the calculated CRC32 checksum (${l.digest()})`);if(l.update(new Uint8Array(i,t+8,e-12)),o!==l.digest())throw new Error(`The message checksum (${l.digest()}) did not match the expected value of ${o}`);return{headers:new DataView(i,t+8+4,r),body:new Uint8Array(i,t+8+4+r,s-r-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:i}}formatHeaders(e){return this.headerMarshaller.format(e)}}class qQe{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class YQe{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class VQe{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class WQe{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function jQe(e,t){return async function(i){const{value:n}=i.headers[":message-type"];if("error"===n){const e=new Error(i.headers[":error-message"].value||"UnknownError");throw e.name=i.headers[":error-code"].value,e}if("exception"===n){const n=i.headers[":exception-type"].value,s={[n]:i},r=await e(s);if(r.$unknown){const e=new Error(t(i.body));throw e.name=n,e}throw r[n]}if("event"===n){const t={[i.headers[":event-type"].value]:i},n=await e(t);if(n.$unknown)return;return n}throw Error(`Unrecognizable event type: ${i.headers[":event-type"].value}`)}}let JQe=class{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new KQe(e,t),this.utfEncoder=e}deserialize(e,t){const i=function(e){let t=0,i=0,n=null,s=null;const r=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,i=4,n=new Uint8Array(e),new DataView(n.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const a=e[Symbol.asyncIterator]();for(;;){const{value:e,done:o}=await a.next();if(o){if(!t)return;if(t!==i)throw new Error("Truncated event message received.");return void(yield n)}const l=e.length;let A=0;for(;A<l;){if(!n){const t=l-A;s||(s=new Uint8Array(4));const n=Math.min(4-i,t);if(s.set(e.slice(A,A+n),i),i+=n,A+=n,i<4)break;r(new DataView(s.buffer).getUint32(0,!1)),s=null}const a=Math.min(t-i,l-A);n.set(e.slice(A,A+a),i),i+=a,A+=a,t&&t===i&&(yield n,n=null,t=0,i=0)}}}}}(e);return new VQe({messageStream:new qQe({inputStream:i,decoder:this.eventStreamCodec}),deserializer:jQe(t,this.utfEncoder)})}serialize(e,t){return new YQe({messageStream:new WQe({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};class zQe{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new JQe({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const i=XQe(e)?(n=e,{[Symbol.asyncIterator]:async function*(){const e=n.getReader();try{for(;;){const{done:t,value:i}=await e.read();if(t)return;yield i}}finally{e.releaseLock()}}}):e;var n;return this.universalMarshaller.deserialize(i,t)}serialize(e,t){const i=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:i,value:n}=await t.next();if(i)return e.close();e.enqueue(n)}})})(i):i}}const XQe=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,$Qe=e=>new zQe(e),ZQe=e=>()=>Promise.reject(e),e_e="function"==typeof TextEncoder?new TextEncoder:null,t_e=e=>{if("string"==typeof e){if(e_e)return e_e.encode(e).byteLength;let t=e.length;for(let i=t-1;i>=0;i--){const n=e.charCodeAt(i);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&i--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},i_e="required",n_e="type",s_e="rules",r_e="conditions",a_e="fn",o_e="argv",l_e="ref",A_e="assign",c_e="url",u_e="properties",h_e="headers",d_e="isSet",g_e="stringEquals",p_e="aws.parseArn",f_e="arn",m_e="booleanEquals",C_e="endpoint",I_e="tree",v_e="error",B_e={[i_e]:!1,[n_e]:"String"},y_e={[i_e]:!0,default:!1,[n_e]:"Boolean"},b_e={[a_e]:"not",[o_e]:[{[a_e]:d_e,[o_e]:[{[l_e]:"Endpoint"}]}]},E_e={[l_e]:"Endpoint"},w_e={[a_e]:d_e,[o_e]:[{[l_e]:"Region"}]},Q_e={[a_e]:"aws.partition",[o_e]:[{[l_e]:"Region"}],[A_e]:"PartitionResult"},__e={[a_e]:"not",[o_e]:[{[a_e]:g_e,[o_e]:[{[a_e]:"getAttr",[o_e]:[{[l_e]:"PartitionResult"},"name"]},"aws-iso"]}]},S_e={[a_e]:"getAttr",[o_e]:[{[l_e]:"PartitionResult"},"name"]},x_e={[a_e]:"not",[o_e]:[{[a_e]:g_e,[o_e]:[S_e,"aws-iso-b"]}]},k_e={[a_e]:"getAttr",[o_e]:[{[l_e]:"PartitionResult"},"supportsFIPS"]},D_e={},F_e={[v_e]:"FIPS is enabled but this partition does not support FIPS",[n_e]:v_e},T_e={[v_e]:"DualStack is enabled but this partition does not support DualStack",[n_e]:v_e},M_e={[v_e]:"Invalid ARN: Failed to parse ARN.",[n_e]:v_e},R_e={[a_e]:m_e,[o_e]:[!0,{[a_e]:"getAttr",[o_e]:[{[l_e]:"PartitionResult"},"supportsDualStack"]}]},N_e=[{[l_e]:"StreamARN"}],L_e=[{[a_e]:d_e,[o_e]:[E_e]}],U_e=[{[r_e]:[{[a_e]:"isValidHostLabel",[o_e]:[{[a_e]:"getAttr",[o_e]:[{[l_e]:f_e},"accountId"]},!1]}],[s_e]:[{[r_e]:[{[a_e]:"isValidHostLabel",[o_e]:[{[a_e]:"getAttr",[o_e]:[{[l_e]:f_e},"region"]},!1]}],[s_e]:[{[r_e]:[{[a_e]:g_e,[o_e]:[{[a_e]:"getAttr",[o_e]:[{[l_e]:f_e},"service"]},"kinesis"]}],[s_e]:[{[r_e]:[{[a_e]:"getAttr",[o_e]:[{[l_e]:f_e},"resourceId[0]"],[A_e]:"arnType"},{[a_e]:"not",[o_e]:[{[a_e]:g_e,[o_e]:[{[l_e]:"arnType"},""]}]}],[s_e]:[{[r_e]:[{[a_e]:g_e,[o_e]:[{[l_e]:"arnType"},"stream"]}],[s_e]:[{[r_e]:[{[a_e]:g_e,[o_e]:[S_e,"{arn#partition}"]}],[s_e]:[{[r_e]:[{[a_e]:d_e,[o_e]:[{[l_e]:"OperationType"}]}],[s_e]:[{[r_e]:[{[a_e]:m_e,[o_e]:[{[l_e]:"UseFIPS"},!0]},{[a_e]:m_e,[o_e]:[{[l_e]:"UseDualStack"},!0]}],[s_e]:[{[r_e]:[{[a_e]:m_e,[o_e]:[k_e,!0]}],[s_e]:[{[r_e]:[{[a_e]:m_e,[o_e]:[{[a_e]:"getAttr",[o_e]:[{[l_e]:"PartitionResult"},"supportsDualStack"]},!0]}],[s_e]:[{[C_e]:{[c_e]:"https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[u_e]:{},[h_e]:{}},[n_e]:C_e}],[n_e]:I_e},{[v_e]:"DualStack is enabled, but this partition does not support DualStack.",[n_e]:v_e}],[n_e]:I_e},{[v_e]:"FIPS is enabled, but this partition does not support FIPS.",[n_e]:v_e}],[n_e]:I_e},{[r_e]:[{[a_e]:m_e,[o_e]:[{[l_e]:"UseFIPS"},!0]}],[s_e]:[{[r_e]:[{[a_e]:m_e,[o_e]:[k_e,!0]}],[s_e]:[{[C_e]:{[c_e]:"https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dnsSuffix}",[u_e]:{},[h_e]:{}},[n_e]:C_e}],[n_e]:I_e},F_e],[n_e]:I_e},{[r_e]:[{[a_e]:m_e,[o_e]:[{[l_e]:"UseDualStack"},!0]}],[s_e]:[{[r_e]:[{[a_e]:m_e,[o_e]:[{[a_e]:"getAttr",[o_e]:[{[l_e]:"PartitionResult"},"supportsDualStack"]},!0]}],[s_e]:[{[C_e]:{[c_e]:"https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}",[u_e]:{},[h_e]:{}},[n_e]:C_e}],[n_e]:I_e},T_e],[n_e]:I_e},{[C_e]:{[c_e]:"https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dnsSuffix}",[u_e]:{},[h_e]:{}},[n_e]:C_e}],[n_e]:I_e},{[v_e]:"Operation Type is not set. Please contact service team for resolution.",[n_e]:v_e}],[n_e]:I_e},{[v_e]:"Partition: {arn#partition} from ARN doesn't match with partition name: {PartitionResult#name}.",[n_e]:v_e}],[n_e]:I_e},{[v_e]:"Invalid ARN: Kinesis ARNs don't support `{arnType}` arn types.",[n_e]:v_e}],[n_e]:I_e},{[v_e]:"Invalid ARN: No ARN type specified",[n_e]:v_e}],[n_e]:I_e},{[v_e]:"Invalid ARN: The ARN was not for the Kinesis service, found: {arn#service}.",[n_e]:v_e}],[n_e]:I_e},{[v_e]:"Invalid ARN: Invalid region.",[n_e]:v_e}],[n_e]:I_e},{[v_e]:"Invalid ARN: Invalid account id.",[n_e]:v_e}],H_e=[{[a_e]:m_e,[o_e]:[{[l_e]:"UseFIPS"},!0]},{[a_e]:m_e,[o_e]:[{[l_e]:"UseDualStack"},!0]}],P_e=[{[a_e]:m_e,[o_e]:[k_e,!0]}],O_e=[{[a_e]:m_e,[o_e]:[{[l_e]:"UseFIPS"},!0]}],G_e=[{[a_e]:m_e,[o_e]:[{[l_e]:"UseDualStack"},!0]}],K_e=[{[l_e]:"ConsumerARN"}],q_e=[{[l_e]:"ResourceARN"}],Y_e={version:"1.0",parameters:{Region:B_e,UseDualStack:y_e,UseFIPS:y_e,Endpoint:B_e,StreamARN:B_e,OperationType:B_e,ConsumerARN:B_e,ResourceARN:B_e},[s_e]:[{[r_e]:[{[a_e]:d_e,[o_e]:N_e},b_e,w_e,Q_e,__e,x_e],[s_e]:[{[r_e]:[{[a_e]:p_e,[o_e]:N_e,[A_e]:f_e}],[s_e]:U_e,[n_e]:I_e},M_e],[n_e]:I_e},{[r_e]:[{[a_e]:d_e,[o_e]:K_e},b_e,w_e,Q_e,__e,x_e],[s_e]:[{[r_e]:[{[a_e]:p_e,[o_e]:K_e,[A_e]:f_e}],[s_e]:U_e,[n_e]:I_e},M_e],[n_e]:I_e},{[r_e]:[{[a_e]:d_e,[o_e]:q_e},b_e,w_e,Q_e,__e,x_e],[s_e]:[{[r_e]:[{[a_e]:p_e,[o_e]:q_e,[A_e]:f_e}],[s_e]:U_e,[n_e]:I_e},M_e],[n_e]:I_e},{[r_e]:L_e,[s_e]:[{[r_e]:O_e,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[n_e]:v_e},{[r_e]:G_e,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[n_e]:v_e},{endpoint:{[c_e]:E_e,[u_e]:D_e,[h_e]:D_e},[n_e]:C_e}],[n_e]:I_e},{[r_e]:[w_e],[s_e]:[{[r_e]:[Q_e],[s_e]:[{[r_e]:H_e,[s_e]:[{[r_e]:[{[a_e]:m_e,[o_e]:[!0,k_e]},R_e],[s_e]:[{endpoint:{[c_e]:"https://kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[u_e]:D_e,[h_e]:D_e},[n_e]:C_e}],[n_e]:I_e},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[n_e]:v_e}],[n_e]:I_e},{[r_e]:O_e,[s_e]:[{[r_e]:P_e,[s_e]:[{[r_e]:[{[a_e]:g_e,[o_e]:[S_e,"aws-us-gov"]}],endpoint:{[c_e]:"https://kinesis.{Region}.amazonaws.com",[u_e]:D_e,[h_e]:D_e},[n_e]:C_e},{endpoint:{[c_e]:"https://kinesis-fips.{Region}.{PartitionResult#dnsSuffix}",[u_e]:D_e,[h_e]:D_e},[n_e]:C_e}],[n_e]:I_e},F_e],[n_e]:I_e},{[r_e]:G_e,[s_e]:[{[r_e]:[R_e],[s_e]:[{endpoint:{[c_e]:"https://kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}",[u_e]:D_e,[h_e]:D_e},[n_e]:C_e}],[n_e]:I_e},T_e],[n_e]:I_e},{endpoint:{[c_e]:"https://kinesis.{Region}.{PartitionResult#dnsSuffix}",[u_e]:D_e,[h_e]:D_e},[n_e]:C_e}],[n_e]:I_e}],[n_e]:I_e},{error:"Invalid Configuration: Missing Region",[n_e]:v_e}]},V_e=new Wye({size:50,params:["ConsumerARN","Endpoint","OperationType","Region","ResourceARN","StreamARN","UseDualStack","UseFIPS"]}),W_e=(e,t={})=>V_e.get(e,(()=>Cbe(Y_e,{endpointParams:e,logger:t.logger})));$ye.aws=Bbe;const j_e=["in-region","cross-region","mobile","standard","legacy"],J_e=({defaultsMode:e}={})=>Sbe((async()=>{const t="function"==typeof e?await e():e;switch(null==t?void 0:t.toLowerCase()){case"auto":return Promise.resolve(z_e()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(null==t?void 0:t.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${j_e.join(", ")}, got ${t}`)}})),z_e=()=>{var e,t;const i="undefined"!=typeof window&&(null==(e=null==window?void 0:window.navigator)?void 0:e.userAgent)?wQe.parse(window.navigator.userAgent):void 0,n=null==(t=null==i?void 0:i.platform)?void 0:t.type;return"tablet"===n||"mobile"===n},X_e=e=>{const t=J_e(e),i=()=>t().then(vEe),n=(e=>({apiVersion:"2013-12-02",base64Decoder:(null==e?void 0:e.base64Decoder)??wye,base64Encoder:(null==e?void 0:e.base64Encoder)??xye,disableHostPrefix:(null==e?void 0:e.disableHostPrefix)??!1,endpointProvider:(null==e?void 0:e.endpointProvider)??W_e,extensions:(null==e?void 0:e.extensions)??[],httpAuthSchemeProvider:(null==e?void 0:e.httpAuthSchemeProvider)??qwe,httpAuthSchemes:(null==e?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new _be}],logger:(null==e?void 0:e.logger)??new _Ee,serviceId:(null==e?void 0:e.serviceId)??"Kinesis",urlParser:(null==e?void 0:e.urlParser)??Awe,utf8Decoder:(null==e?void 0:e.utf8Decoder)??Qye,utf8Encoder:(null==e?void 0:e.utf8Encoder)??Sye}))(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:(null==e?void 0:e.bodyLengthChecker)??t_e,credentialDefaultProvider:(null==e?void 0:e.credentialDefaultProvider)??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(null==e?void 0:e.defaultUserAgentProvider)??QQe({serviceId:n.serviceId,clientVersion:Vwe}),eventStreamSerdeProvider:(null==e?void 0:e.eventStreamSerdeProvider)??$Qe,maxAttempts:(null==e?void 0:e.maxAttempts)??3,region:(null==e?void 0:e.region)??ZQe("Region is missing"),requestHandler:Nye.create((null==e?void 0:e.requestHandler)??i),retryMode:(null==e?void 0:e.retryMode)??(async()=>(await i()).retryMode||Cwe),sha256:(null==e?void 0:e.sha256)??hQe,streamCollector:(null==e?void 0:e.streamCollector)??Lye,useDualstackEndpoint:(null==e?void 0:e.useDualstackEndpoint)??(()=>Promise.resolve(jEe)),useFipsEndpoint:(null==e?void 0:e.useFipsEndpoint)??(()=>Promise.resolve(JEe))}},$_e=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},Z_e=e=>({region:e.region()}),eSe=e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const i=t.findIndex((t=>t.schemeId===e.schemeId));-1===i?t.push(e):t.splice(i,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){i=e},httpAuthSchemeProvider:()=>i,setCredentials(e){n=e},credentials:()=>n}};class tSe extends dEe{constructor(...[e]){const t=X_e(e||{});var i;const n=Vye((i=t,{...i,useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"kinesis"})),s=Rwe(n),r=$Ee(s),a=pwe(r),o=(l=a,{...l,eventStreamMarshaller:l.eventStreamSerdeProvider(l)});var l;const A=((e,t)=>{const i={...$_e(e),...wEe(e),...LBe(e),...eSe(e)};return t.forEach((e=>e.configure(i))),{...e,...Z_e(i),...QEe(i),...UBe(i),...(n=i,{httpAuthSchemes:n.httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()})};var n})({...oEe(o)},(null==e?void 0:e.extensions)||[]);super(A),Ic(this,"config"),this.config=A,this.middlewareStack.use(YEe(this.config)),this.middlewareStack.use(Owe(this.config)),this.middlewareStack.use(twe(this.config)),this.middlewareStack.use(nye(this.config)),this.middlewareStack.use(rye(this.config)),this.middlewareStack.use(Aye(this.config)),this.middlewareStack.use(gye(this.config,{httpAuthSchemeParametersProvider:Kwe,identityProviderConfigProvider:async e=>new Gye({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(Bye(this.config))}destroy(){super.destroy()}}class iSe extends fEe{constructor(e){super(e),Object.setPrototypeOf(this,iSe.prototype)}}class nSe extends iSe{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Ic(this,"name","AccessDeniedException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,nSe.prototype)}}let sSe=class e extends iSe{constructor(t){super({name:"InvalidArgumentException",$fault:"client",...t}),Ic(this,"name","InvalidArgumentException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,e.prototype)}},rSe=class e extends iSe{constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Ic(this,"name","LimitExceededException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,e.prototype)}},aSe=class e extends iSe{constructor(t){super({name:"ResourceInUseException",$fault:"client",...t}),Ic(this,"name","ResourceInUseException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,e.prototype)}},oSe=class e extends iSe{constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Ic(this,"name","ResourceNotFoundException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,e.prototype)}};class lSe extends iSe{constructor(e){super({name:"ExpiredIteratorException",$fault:"client",...e}),Ic(this,"name","ExpiredIteratorException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,lSe.prototype)}}class ASe extends iSe{constructor(e){super({name:"ExpiredNextTokenException",$fault:"client",...e}),Ic(this,"name","ExpiredNextTokenException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,ASe.prototype)}}class cSe extends iSe{constructor(e){super({name:"KMSAccessDeniedException",$fault:"client",...e}),Ic(this,"name","KMSAccessDeniedException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,cSe.prototype)}}class uSe extends iSe{constructor(e){super({name:"KMSDisabledException",$fault:"client",...e}),Ic(this,"name","KMSDisabledException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,uSe.prototype)}}class hSe extends iSe{constructor(e){super({name:"KMSInvalidStateException",$fault:"client",...e}),Ic(this,"name","KMSInvalidStateException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,hSe.prototype)}}class dSe extends iSe{constructor(e){super({name:"KMSNotFoundException",$fault:"client",...e}),Ic(this,"name","KMSNotFoundException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,dSe.prototype)}}class gSe extends iSe{constructor(e){super({name:"KMSOptInRequired",$fault:"client",...e}),Ic(this,"name","KMSOptInRequired"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,gSe.prototype)}}class pSe extends iSe{constructor(e){super({name:"KMSThrottlingException",$fault:"client",...e}),Ic(this,"name","KMSThrottlingException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,pSe.prototype)}}class fSe extends iSe{constructor(e){super({name:"ProvisionedThroughputExceededException",$fault:"client",...e}),Ic(this,"name","ProvisionedThroughputExceededException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,fSe.prototype)}}class mSe extends iSe{constructor(e){super({name:"ValidationException",$fault:"client",...e}),Ic(this,"name","ValidationException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,mSe.prototype)}}var CSe;(CSe||(CSe={})).visit=(e,t)=>void 0!==e.SubscribeToShardEvent?t.SubscribeToShardEvent(e.SubscribeToShardEvent):void 0!==e.ResourceNotFoundException?t.ResourceNotFoundException(e.ResourceNotFoundException):void 0!==e.ResourceInUseException?t.ResourceInUseException(e.ResourceInUseException):void 0!==e.KMSDisabledException?t.KMSDisabledException(e.KMSDisabledException):void 0!==e.KMSInvalidStateException?t.KMSInvalidStateException(e.KMSInvalidStateException):void 0!==e.KMSAccessDeniedException?t.KMSAccessDeniedException(e.KMSAccessDeniedException):void 0!==e.KMSNotFoundException?t.KMSNotFoundException(e.KMSNotFoundException):void 0!==e.KMSOptInRequired?t.KMSOptInRequired(e.KMSOptInRequired):void 0!==e.KMSThrottlingException?t.KMSThrottlingException(e.KMSThrottlingException):void 0!==e.InternalFailureException?t.InternalFailureException(e.InternalFailureException):t._(e.$unknown[0],e.$unknown[1]);const ISe=async(e,t)=>{const i=YSe("PutRecord");let n;return n=JSON.stringify(HSe(e,t)),qSe(t,i,"/",void 0,n)},vSe=async(e,t)=>{const i=YSe("PutRecords");let n;return n=JSON.stringify(PSe(e,t)),qSe(t,i,"/",void 0,n)},BSe=async(e,t)=>{if(e.statusCode>=300)return bSe(e,t);const i=await MEe(e.body,t);let n={};n=FEe(i);return{$metadata:GSe(e),...n}},ySe=async(e,t)=>{if(e.statusCode>=300)return bSe(e,t);const i=await MEe(e.body,t);let n={};n=FEe(i);return{$metadata:GSe(e),...n}},bSe=async(e,t)=>{const i={...e,body:await REe(e.body,t)},n=NEe(e,i.body);switch(n){case"AccessDeniedException":case"com.amazonaws.kinesis#AccessDeniedException":throw await ESe(i);case"InvalidArgumentException":case"com.amazonaws.kinesis#InvalidArgumentException":throw await _Se(i);case"LimitExceededException":case"com.amazonaws.kinesis#LimitExceededException":throw await MSe(i);case"ResourceInUseException":case"com.amazonaws.kinesis#ResourceInUseException":throw await NSe(i);case"ResourceNotFoundException":case"com.amazonaws.kinesis#ResourceNotFoundException":throw await LSe(i);case"ExpiredIteratorException":case"com.amazonaws.kinesis#ExpiredIteratorException":throw await wSe(i);case"KMSAccessDeniedException":case"com.amazonaws.kinesis#KMSAccessDeniedException":throw await SSe(i);case"KMSDisabledException":case"com.amazonaws.kinesis#KMSDisabledException":throw await xSe(i);case"KMSInvalidStateException":case"com.amazonaws.kinesis#KMSInvalidStateException":throw await kSe(i);case"KMSNotFoundException":case"com.amazonaws.kinesis#KMSNotFoundException":throw await DSe(i);case"KMSOptInRequired":case"com.amazonaws.kinesis#KMSOptInRequired":throw await FSe(i);case"KMSThrottlingException":case"com.amazonaws.kinesis#KMSThrottlingException":throw await TSe(i);case"ProvisionedThroughputExceededException":case"com.amazonaws.kinesis#ProvisionedThroughputExceededException":throw await RSe(i);case"ExpiredNextTokenException":case"com.amazonaws.kinesis#ExpiredNextTokenException":throw await QSe(i);case"ValidationException":case"com.amazonaws.kinesis#ValidationException":throw await USe(i);default:const t=i.body;return KSe({output:e,parsedBody:t,errorCode:n})}},ESe=async(e,t)=>{const i=e.body,n=FEe(i),s=new nSe({$metadata:GSe(e),...n});return mEe(s,i)},wSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new lSe({$metadata:GSe(e),...n});return mEe(s,i)},QSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new ASe({$metadata:GSe(e),...n});return mEe(s,i)},_Se=async(e,t)=>{const i=e.body,n=FEe(i),s=new sSe({$metadata:GSe(e),...n});return mEe(s,i)},SSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new cSe({$metadata:GSe(e),...n});return mEe(s,i)},xSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new uSe({$metadata:GSe(e),...n});return mEe(s,i)},kSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new hSe({$metadata:GSe(e),...n});return mEe(s,i)},DSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new dSe({$metadata:GSe(e),...n});return mEe(s,i)},FSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new gSe({$metadata:GSe(e),...n});return mEe(s,i)},TSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new pSe({$metadata:GSe(e),...n});return mEe(s,i)},MSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new rSe({$metadata:GSe(e),...n});return mEe(s,i)},RSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new fSe({$metadata:GSe(e),...n});return mEe(s,i)},NSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new aSe({$metadata:GSe(e),...n});return mEe(s,i)},LSe=async(e,t)=>{const i=e.body,n=FEe(i),s=new oSe({$metadata:GSe(e),...n});return mEe(s,i)},USe=async(e,t)=>{const i=e.body,n=FEe(i),s=new mSe({$metadata:GSe(e),...n});return mEe(s,i)},HSe=(e,t)=>SEe(e,{Data:t.base64Encoder,ExplicitHashKey:[],PartitionKey:[],SequenceNumberForOrdering:[],StreamARN:[],StreamName:[]}),PSe=(e,t)=>SEe(e,{Records:e=>OSe(e,t),StreamARN:[],StreamName:[]}),OSe=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>SEe(e,{Data:t.base64Encoder,ExplicitHashKey:[],PartitionKey:[]}))(e,t))),GSe=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),KSe=CEe(iSe),qSe=async(e,t,i,n,s)=>{const{hostname:r,protocol:a="https",port:o,path:l}=await e.endpoint(),A={protocol:a,hostname:r,port:o,method:"POST",path:l.endsWith("/")?l.slice(0,-1)+i:l+i,headers:t};return void 0!==s&&(A.body=s),new eye(A)};function YSe(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Kinesis_20131202.${e}`}}let VSe=class extends(gEe.classBuilder().ep({...Ywe,OperationType:{type:"staticContextParams",value:"data"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m((function(e,t,i,n){return[mye(i,this.serialize,this.deserialize),gwe(i,e.getEndpointParameterInstructions())]})).s("Kinesis_20131202","PutRecord",{}).n("KinesisClient","PutRecordCommand").f(void 0,void 0).ser(ISe).de(BSe).build()){};class WSe extends(gEe.classBuilder().ep({...Ywe,OperationType:{type:"staticContextParams",value:"data"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m((function(e,t,i,n){return[mye(i,this.serialize,this.deserialize),gwe(i,e.getEndpointParameterInstructions())]})).s("Kinesis_20131202","PutRecords",{}).n("KinesisClient","PutRecordsCommand").f(void 0,void 0).ser(vSe).de(ySe).build()){}const jSe=async(e,t,i)=>({operation:cye(t).operation,region:await uye(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const JSe=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"firehose",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},zSe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},XSe="3.749.0",$Se="required",ZSe="fn",exe="argv",txe="ref",ixe=!0,nxe="isSet",sxe="booleanEquals",rxe="error",axe="endpoint",oxe="tree",lxe="PartitionResult",Axe={[$Se]:!1,type:"String"},cxe={[$Se]:!0,default:!1,type:"Boolean"},uxe={[txe]:"Endpoint"},hxe={[ZSe]:sxe,[exe]:[{[txe]:"UseFIPS"},!0]},dxe={[ZSe]:sxe,[exe]:[{[txe]:"UseDualStack"},!0]},gxe={},pxe={[ZSe]:"getAttr",[exe]:[{[txe]:lxe},"supportsFIPS"]},fxe={[ZSe]:sxe,[exe]:[!0,{[ZSe]:"getAttr",[exe]:[{[txe]:lxe},"supportsDualStack"]}]},mxe=[hxe],Cxe=[dxe],Ixe=[{[txe]:"Region"}],vxe={version:"1.0",parameters:{Region:Axe,UseDualStack:cxe,UseFIPS:cxe,Endpoint:Axe},rules:[{conditions:[{[ZSe]:nxe,[exe]:[uxe]}],rules:[{conditions:mxe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:rxe},{conditions:Cxe,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:rxe},{endpoint:{url:uxe,properties:gxe,headers:gxe},type:axe}],type:oxe},{conditions:[{[ZSe]:nxe,[exe]:Ixe}],rules:[{conditions:[{[ZSe]:"aws.partition",[exe]:Ixe,assign:lxe}],rules:[{conditions:[hxe,dxe],rules:[{conditions:[{[ZSe]:sxe,[exe]:[ixe,pxe]},fxe],rules:[{endpoint:{url:"https://firehose-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:gxe,headers:gxe},type:axe}],type:oxe},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:rxe}],type:oxe},{conditions:mxe,rules:[{conditions:[{[ZSe]:sxe,[exe]:[pxe,ixe]}],rules:[{endpoint:{url:"https://firehose-fips.{Region}.{PartitionResult#dnsSuffix}",properties:gxe,headers:gxe},type:axe}],type:oxe},{error:"FIPS is enabled but this partition does not support FIPS",type:rxe}],type:oxe},{conditions:Cxe,rules:[{conditions:[fxe],rules:[{endpoint:{url:"https://firehose.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:gxe,headers:gxe},type:axe}],type:oxe},{error:"DualStack is enabled but this partition does not support DualStack",type:rxe}],type:oxe},{endpoint:{url:"https://firehose.{Region}.{PartitionResult#dnsSuffix}",properties:gxe,headers:gxe},type:axe}],type:oxe}],type:oxe},{error:"Invalid Configuration: Missing Region",type:rxe}]},Bxe=new Wye({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),yxe=(e,t={})=>Bxe.get(e,(()=>Cbe(vxe,{endpointParams:e,logger:t.logger})));$ye.aws=Bbe;const bxe=e=>{const t=J_e(e),i=()=>t().then(vEe),n=(e=>({apiVersion:"2015-08-04",base64Decoder:(null==e?void 0:e.base64Decoder)??wye,base64Encoder:(null==e?void 0:e.base64Encoder)??xye,disableHostPrefix:(null==e?void 0:e.disableHostPrefix)??!1,endpointProvider:(null==e?void 0:e.endpointProvider)??yxe,extensions:(null==e?void 0:e.extensions)??[],httpAuthSchemeProvider:(null==e?void 0:e.httpAuthSchemeProvider)??JSe,httpAuthSchemes:(null==e?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new _be}],logger:(null==e?void 0:e.logger)??new _Ee,serviceId:(null==e?void 0:e.serviceId)??"Firehose",urlParser:(null==e?void 0:e.urlParser)??Awe,utf8Decoder:(null==e?void 0:e.utf8Decoder)??Qye,utf8Encoder:(null==e?void 0:e.utf8Encoder)??Sye}))(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:(null==e?void 0:e.bodyLengthChecker)??t_e,credentialDefaultProvider:(null==e?void 0:e.credentialDefaultProvider)??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(null==e?void 0:e.defaultUserAgentProvider)??QQe({serviceId:n.serviceId,clientVersion:XSe}),maxAttempts:(null==e?void 0:e.maxAttempts)??3,region:(null==e?void 0:e.region)??ZQe("Region is missing"),requestHandler:Nye.create((null==e?void 0:e.requestHandler)??i),retryMode:(null==e?void 0:e.retryMode)??(async()=>(await i()).retryMode||Cwe),sha256:(null==e?void 0:e.sha256)??hQe,streamCollector:(null==e?void 0:e.streamCollector)??Lye,useDualstackEndpoint:(null==e?void 0:e.useDualstackEndpoint)??(()=>Promise.resolve(jEe)),useFipsEndpoint:(null==e?void 0:e.useFipsEndpoint)??(()=>Promise.resolve(JEe))}},Exe=e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(e){const i=t.findIndex((t=>t.schemeId===e.schemeId));-1===i?t.push(e):t.splice(i,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){i=e},httpAuthSchemeProvider:()=>i,setCredentials(e){n=e},credentials:()=>n}};class wxe extends dEe{constructor(...[e]){const t=bxe(e||{});var i;const n=Vye((i=t,{...i,useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"firehose"})),s=Rwe(n),r=$Ee(s),a=pwe(r);const o=((e,t)=>{const i={...$_e(e),...wEe(e),...LBe(e),...Exe(e)};return t.forEach((e=>e.configure(i))),{...e,...Z_e(i),...QEe(i),...UBe(i),...(n=i,{httpAuthSchemes:n.httpAuthSchemes(),httpAuthSchemeProvider:n.httpAuthSchemeProvider(),credentials:n.credentials()})};var n})({...oEe(a)},(null==e?void 0:e.extensions)||[]);super(o),Ic(this,"config"),this.config=o,this.middlewareStack.use(YEe(this.config)),this.middlewareStack.use(Owe(this.config)),this.middlewareStack.use(twe(this.config)),this.middlewareStack.use(nye(this.config)),this.middlewareStack.use(rye(this.config)),this.middlewareStack.use(Aye(this.config)),this.middlewareStack.use(gye(this.config,{httpAuthSchemeParametersProvider:jSe,identityProviderConfigProvider:async e=>new Gye({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(Bye(this.config))}destroy(){super.destroy()}}class Qxe extends fEe{constructor(e){super(e),Object.setPrototypeOf(this,Qxe.prototype)}}class _xe extends Qxe{constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Ic(this,"name","ConcurrentModificationException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,_xe.prototype)}}class Sxe extends Qxe{constructor(e){super({name:"InvalidArgumentException",$fault:"client",...e}),Ic(this,"name","InvalidArgumentException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,Sxe.prototype)}}class xxe extends Qxe{constructor(e){super({name:"InvalidKMSResourceException",$fault:"client",...e}),Ic(this,"name","InvalidKMSResourceException"),Ic(this,"$fault","client"),Ic(this,"code"),Object.setPrototypeOf(this,xxe.prototype),this.code=e.code}}class kxe extends Qxe{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Ic(this,"name","LimitExceededException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,kxe.prototype)}}class Dxe extends Qxe{constructor(e){super({name:"ResourceInUseException",$fault:"client",...e}),Ic(this,"name","ResourceInUseException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,Dxe.prototype)}}class Fxe extends Qxe{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Ic(this,"name","ResourceNotFoundException"),Ic(this,"$fault","client"),Object.setPrototypeOf(this,Fxe.prototype)}}class Txe extends Qxe{constructor(e){super({name:"InvalidSourceException",$fault:"client",...e}),Ic(this,"name","InvalidSourceException"),Ic(this,"$fault","client"),Ic(this,"code"),Object.setPrototypeOf(this,Txe.prototype),this.code=e.code}}class Mxe extends Qxe{constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Ic(this,"name","ServiceUnavailableException"),Ic(this,"$fault","server"),Object.setPrototypeOf(this,Mxe.prototype)}}const Rxe=async(e,t)=>{const i={"content-type":"application/x-amz-json-1.1","x-amz-target":`Firehose_20150804.${"PutRecord"}`};let n;return n=JSON.stringify(Vxe(e,t)),zxe(t,i,"/",void 0,n)},Nxe=async(e,t)=>{if(e.statusCode>=300)return Lxe(e,t);const i=await MEe(e.body,t);let n={};n=FEe(i);return{$metadata:jxe(e),...n}},Lxe=async(e,t)=>{const i={...e,body:await REe(e.body,t)},n=NEe(e,i.body);switch(n){case"InvalidArgumentException":case"com.amazonaws.firehose#InvalidArgumentException":throw await Hxe(i);case"InvalidKMSResourceException":case"com.amazonaws.firehose#InvalidKMSResourceException":throw await Pxe(i);case"LimitExceededException":case"com.amazonaws.firehose#LimitExceededException":throw await Gxe(i);case"ResourceInUseException":case"com.amazonaws.firehose#ResourceInUseException":throw await Kxe(i);case"ResourceNotFoundException":case"com.amazonaws.firehose#ResourceNotFoundException":throw await qxe(i);case"InvalidSourceException":case"com.amazonaws.firehose#InvalidSourceException":throw await Oxe(i);case"ServiceUnavailableException":case"com.amazonaws.firehose#ServiceUnavailableException":throw await Yxe(i);case"ConcurrentModificationException":case"com.amazonaws.firehose#ConcurrentModificationException":throw await Uxe(i);default:const t=i.body;return Jxe({output:e,parsedBody:t,errorCode:n})}},Uxe=async(e,t)=>{const i=e.body,n=FEe(i),s=new _xe({$metadata:jxe(e),...n});return mEe(s,i)},Hxe=async(e,t)=>{const i=e.body,n=FEe(i),s=new Sxe({$metadata:jxe(e),...n});return mEe(s,i)},Pxe=async(e,t)=>{const i=e.body,n=FEe(i),s=new xxe({$metadata:jxe(e),...n});return mEe(s,i)},Oxe=async(e,t)=>{const i=e.body,n=FEe(i),s=new Txe({$metadata:jxe(e),...n});return mEe(s,i)},Gxe=async(e,t)=>{const i=e.body,n=FEe(i),s=new kxe({$metadata:jxe(e),...n});return mEe(s,i)},Kxe=async(e,t)=>{const i=e.body,n=FEe(i),s=new Dxe({$metadata:jxe(e),...n});return mEe(s,i)},qxe=async(e,t)=>{const i=e.body,n=FEe(i),s=new Fxe({$metadata:jxe(e),...n});return mEe(s,i)},Yxe=async(e,t)=>{const i=e.body,n=FEe(i),s=new Mxe({$metadata:jxe(e),...n});return mEe(s,i)},Vxe=(e,t)=>SEe(e,{DeliveryStreamName:[],Record:e=>Wxe(e,t)}),Wxe=(e,t)=>SEe(e,{Data:t.base64Encoder}),jxe=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Jxe=CEe(Qxe),zxe=async(e,t,i,n,s)=>{const{hostname:r,protocol:a="https",port:o,path:l}=await e.endpoint(),A={protocol:a,hostname:r,port:o,method:"POST",path:l.endsWith("/")?l.slice(0,-1)+i:l+i,headers:t};return void 0!==s&&(A.body=s),new eye(A)};class Xxe extends(gEe.classBuilder().ep(zSe).m((function(e,t,i,n){return[mye(i,this.serialize,this.deserialize),gwe(i,e.getEndpointParameterInstructions())]})).s("Firehose_20150804","PutRecord",{}).n("FirehoseClient","PutRecordCommand").f(void 0,void 0).ser(Rxe).de(Nxe).build()){}var $xe,Zxe="user-agent",eke="",tke="function",ike="undefined",nke="object",ske="string",rke="browser",ake="cpu",oke="device",lke="engine",Ake="os",cke="result",uke="name",hke="type",dke="vendor",gke="version",pke="architecture",fke="major",mke="model",Cke="console",Ike="mobile",vke="tablet",Bke="smarttv",yke="wearable",bke="xr",Eke="embedded",wke="inapp",Qke="brands",_ke="formFactors",Ske="fullVersionList",xke="platform",kke="platformVersion",Dke="bitness",Fke="sec-ch-ua",Tke=Fke+"-full-version-list",Mke=Fke+"-arch",Rke=Fke+"-"+Dke,Nke=Fke+"-form-factors",Lke=Fke+"-"+Ike,Uke=Fke+"-"+mke,Hke=Fke+"-"+xke,Pke=Hke+"-version",Oke=[Qke,Ske,Ike,mke,xke,kke,pke,_ke,Dke],Gke="Amazon",Kke="Apple",qke="ASUS",Yke="BlackBerry",Vke="Google",Wke="Huawei",jke="Lenovo",Jke="Honor",zke="LG",Xke="Microsoft",$ke="Motorola",Zke="Nvidia",eDe="OnePlus",tDe="OPPO",iDe="Samsung",nDe="Sharp",sDe="Sony",rDe="Xiaomi",aDe="Zebra",oDe="Chrome",lDe="Chromium",ADe="Chromecast",cDe="Firefox",uDe="Opera",hDe="Facebook",dDe="Sogou",gDe="Mobile ",pDe=" Browser",fDe="Windows",mDe=typeof window!==ike&&window.navigator?window.navigator:void 0,CDe=mDe&&mDe.userAgentData?mDe.userAgentData:void 0,IDe=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},vDe=function(e,t){if(typeof e===nke&&e.length>0){for(var i in e)if(EDe(e[i])==EDe(t))return!0;return!1}return!!yDe(e)&&-1!==EDe(t).indexOf(EDe(e))},BDe=function(e,t){for(var i in e)return/^(browser|cpu|device|engine|os)$/.test(i)||!!t&&BDe(e[i])},yDe=function(e){return typeof e===ske},bDe=function(e){if(e){for(var t=[],i=_De(/\\?\"/g,e).split(","),n=0;n<i.length;n++)if(i[n].indexOf(";")>-1){var s=xDe(i[n]).split(";v=");t[n]={brand:s[0],version:s[1]}}else t[n]=xDe(i[n]);return t}},EDe=function(e){return yDe(e)?e.toLowerCase():e},wDe=function(e){return yDe(e)?_De(/[^\d\.]/g,e).split(".")[0]:void 0},QDe=function(e){for(var t in e){var i=e[t];typeof i==nke&&2==i.length?this[i[0]]=i[1]:this[i]=void 0}return this},_De=function(e,t){return yDe(t)?t.replace(e,eke):t},SDe=function(e){return _De(/\\?\"/g,e)},xDe=function(e,t){if(yDe(e))return e=_De(/^\s\s*/,e),typeof t===ike?e:e.substring(0,500)},kDe=function(e,t){if(e&&t)for(var i,n,s,r,a,o,l=0;l<t.length&&!a;){var A=t[l],c=t[l+1];for(i=n=0;i<A.length&&!a&&A[i];)if(a=A[i++].exec(e))for(s=0;s<c.length;s++)o=a[++n],typeof(r=c[s])===nke&&r.length>0?2===r.length?typeof r[1]==tke?this[r[0]]=r[1].call(this,o):this[r[0]]=r[1]:3===r.length?typeof r[1]!==tke||r[1].exec&&r[1].test?this[r[0]]=o?o.replace(r[1],r[2]):void 0:this[r[0]]=o?r[1].call(this,o,r[2]):void 0:4===r.length&&(this[r[0]]=o?r[3].call(this,o.replace(r[1],r[2])):void 0):this[r]=o||void 0;l+=2}},DDe=function(e,t){for(var i in t)if(typeof t[i]===nke&&t[i].length>0){for(var n=0;n<t[i].length;n++)if(vDe(t[i][n],e))return"?"===i?void 0:i}else if(vDe(t[i],e))return"?"===i?void 0:i;return t.hasOwnProperty("*")?t["*"]:e},FDe={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},TDe={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},MDe={browser:[[
// Most common regardless engine
/\b(?:crmo|crios)\/([\w\.]+)/i],[gke,[uke,gDe+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[gke,[uke,"Edge"]],[
// Presto based
/(opera mini)\/([-\w\.]+)/i,
// Opera Mini
/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
// Opera Mobi/Tablet
/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[uke,gke],[/opios[\/ ]+([\w\.]+)/i],[gke,[uke,uDe+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[gke,[uke,uDe+" GX"]],[/\bopr\/([\w\.]+)/i],[gke,[uke,uDe]],[
// Mixed
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[gke,[uke,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[gke,[uke,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,
// Kindle
/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,
// Lunascape/Maxthon/Netfront/Jasmine/Blazer/Sleipnir
// Trident based
/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,
// Avant/IEMobile/SlimBrowser/SlimBoat/Slimjet
/(?:ms|\()(ie) ([\w\.]+)/i,
// Internet Explorer
// Blink/Webkit/KHTML based                                         // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon
/(heytap|ovi|115)browser\/([\d\.]+)/i,
// HeyTap/Ovi/115
/(weibo)__([\d\.]+)/i],[uke,gke],[/quark(?:pc)?\/([-\w\.]+)/i],[gke,[uke,"Quark"]],[/\bddg\/([\w\.]+)/i],[gke,[uke,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[gke,[uke,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,
// WeChat Desktop for Windows Built-in Browser
/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[gke,[uke,"WeChat"]],[/konqueror\/([\w\.]+)/i],[gke,[uke,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[gke,[uke,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[gke,[uke,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[gke,[uke,"Smart "+jke+pDe]],[/(avast|avg)\/([\w\.]+)/i],[[uke,/(.+)/,"$1 Secure"+pDe],gke],[/\bfocus\/([\w\.]+)/i],[gke,[uke,cDe+" Focus"]],[/\bopt\/([\w\.]+)/i],[gke,[uke,uDe+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[gke,[uke,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[gke,[uke,"Dolphin"]],[/coast\/([\w\.]+)/i],[gke,[uke,uDe+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[gke,[uke,"MIUI"+pDe]],[/fxios\/([\w\.-]+)/i],[gke,[uke,gDe+cDe]],[/\bqihoobrowser\/?([\w\.]*)/i],[gke,[uke,"360"]],[/\b(qq)\/([\w\.]+)/i],[[uke,/(.+)/,"$1Browser"],gke],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[uke,/(.+)/,"$1"+pDe],gke],[
// Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
/samsungbrowser\/([\w\.]+)/i],[gke,[uke,iDe+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[gke,[uke,dDe+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[uke,dDe+" Mobile"],gke],[/(electron)\/([\w\.]+) safari/i,
// Electron-based App
/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
// Tesla
/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[uke,gke],[/(lbbrowser|rekonq)/i],[uke],[/ome\/([\w\.]+) \w* ?(iron) saf/i,
// Iron
/ome\/([\w\.]+).+qihu (360)[es]e/i],[gke,uke],[
// WebView
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[uke,hDe],gke,[hke,wke]],[/(Klarna)\/([\w\.]+)/i,
// Klarna Shopping Browser for iOS & Android
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
// Kakao App
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
// Naver InApp
/(daum)apps[\/ ]([\w\.]+)/i,
// Daum App
/safari (line)\/([\w\.]+)/i,
// Line App for iOS
/\b(line)\/([\w\.]+)\/iab/i,
// Line App for Android
/(alipay)client\/([\w\.]+)/i,
// Alipay
/(twitter)(?:and| f.+e\/([\w\.]+))/i,
// Twitter
/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[uke,gke,[hke,wke]],[/\bgsa\/([\w\.]+) .*safari\//i],[gke,[uke,"GSA"],[hke,wke]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[gke,[uke,"TikTok"],[hke,wke]],[/\[(linkedin)app\]/i],[uke,[hke,wke]],[/(chromium)[\/ ]([-\w\.]+)/i],[uke,gke],[/headlesschrome(?:\/([\w\.]+)| )/i],[gke,[uke,oDe+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[uke,oDe+" WebView"],gke],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[gke,[uke,"Android"+pDe]],[/chrome\/([\w\.]+) mobile/i],[gke,[uke,gDe+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[uke,gke],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[gke,[uke,gDe+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[uke,gDe+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[gke,uke],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[uke,[gke,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[uke,gke],[
// Gecko based
/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[uke,gDe+cDe],gke],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[uke,"Netscape"],gke],[/(wolvic|librewolf)\/([\w\.]+)/i],[uke,gke],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[gke,[uke,cDe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,
// Flow
/(swiftfox)/i,
// Swiftfox
/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,
// IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror
/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,
// Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
/(firefox)\/([\w\.]+)/i,
// Other Firefox-based
/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,
// Mozilla
// Other
/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser/Ladybird
/\b(links) \(([\w\.]+)/i],[uke,[gke,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[uke,[gke,/[^\d\.]+./,eke]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[pke,"amd64"]],[/(ia32(?=;))/i,
// IA32 (quicktime)
/\b((i[346]|x)86)(pc)?\b/i],[[pke,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[pke,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[pke,"armhf"]],[
// PocketPC mistakenly identified as PowerPC
/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[pke,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[pke,/ower/,eke,EDe]],[/ sun4\w[;\)]/i],[[pke,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[pke,EDe]]],device:[[
//////////////////////////
// MOBILES & TABLETS
/////////////////////////
// Samsung
/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[mke,[dke,iDe],[hke,vke]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[mke,[dke,iDe],[hke,Ike]],[
// Apple
/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[mke,[dke,Kke],[hke,Ike]],[/\((ipad);[-\w\),; ]+apple/i,
// iPad
/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[mke,[dke,Kke],[hke,vke]],[/(macintosh);/i],[mke,[dke,Kke]],[
// Sharp
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[mke,[dke,nDe],[hke,Ike]],[
// Honor
/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[mke,[dke,Jke],[hke,vke]],[/honor([-\w ]+)[;\)]/i],[mke,[dke,Jke],[hke,Ike]],[
// Huawei
/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[mke,[dke,Wke],[hke,vke]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[mke,[dke,Wke],[hke,Ike]],[
// Xiaomi
/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[mke,/_/g," "],[dke,rDe],[hke,vke]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
// Xiaomi POCO
/\b; (\w+) build\/hm\1/i,
// Xiaomi Hongmi 'numeric' models
/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
// Xiaomi Hongmi
/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,
// Xiaomi Redmi
/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,
// Xiaomi Redmi 'numeric' models
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,
// Xiaomi Mi
/ ([\w ]+) miui\/v?\d/i],[[mke,/_/g," "],[dke,rDe],[hke,Ike]],[
// OPPO
/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[mke,[dke,tDe],[hke,Ike]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[mke,[dke,DDe,{OnePlus:["304","403","203"],"*":tDe}],[hke,vke]],[
// Vivo
/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[mke,[dke,"Vivo"],[hke,Ike]],[
// Realme
/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[mke,[dke,"Realme"],[hke,Ike]],[
// Motorola
/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[mke,[dke,$ke],[hke,Ike]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[mke,[dke,$ke],[hke,vke]],[
// LG
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[mke,[dke,zke],[hke,vke]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[mke,[dke,zke],[hke,Ike]],[
// Lenovo
/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[mke,[dke,jke],[hke,vke]],[
// Nokia
/(nokia) (t[12][01])/i],[dke,mke,[hke,vke]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[mke,/_/g," "],[hke,Ike],[dke,"Nokia"]],[
// Google
/(pixel (c|tablet))\b/i],[mke,[dke,Vke],[hke,vke]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[mke,[dke,Vke],[hke,Ike]],[
// Sony
/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[mke,[dke,sDe],[hke,Ike]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[mke,"Xperia Tablet"],[dke,sDe],[hke,vke]],[
// OnePlus
/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[mke,[dke,eDe],[hke,Ike]],[
// Amazon
/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,
// Kindle Fire without Silk / Echo Show
/(kf[a-z]+)( bui|\)).+silk\//i],[mke,[dke,Gke],[hke,vke]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[mke,/(.+)/g,"Fire Phone $1"],[dke,Gke],[hke,Ike]],[
// BlackBerry
/(playbook);[-\w\),; ]+(rim)/i],[mke,dke,[hke,vke]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[mke,[dke,Yke],[hke,Ike]],[
// Asus
/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[mke,[dke,qke],[hke,vke]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[mke,[dke,qke],[hke,Ike]],[
// HTC
/(nexus 9)/i],[mke,[dke,"HTC"],[hke,vke]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
// HTC
// ZTE
/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[dke,[mke,/_/g," "],[hke,Ike]],[
// TCL
/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[mke,[dke,"TCL"],[hke,vke]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[mke,[dke,"TCL"],[hke,Ike]],[
// itel
/(itel) ((\w+))/i],[[dke,EDe],mke,[hke,DDe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[
// Acer
/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[mke,[dke,"Acer"],[hke,vke]],[
// Meizu
/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[mke,[dke,"Meizu"],[hke,Ike]],[
// Ulefone
/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[mke,[dke,"Ulefone"],[hke,Ike]],[
// Energizer
/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[mke,[dke,"Energizer"],[hke,Ike]],[
// Cat
/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[mke,[dke,"Cat"],[hke,Ike]],[
// Smartfren
/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[mke,[dke,"Smartfren"],[hke,Ike]],[
// Nothing
/droid.+; (a(?:015|06[35]|142p?))/i],[mke,[dke,"Nothing"],[hke,Ike]],[
// MIXED
/(imo) (tab \w+)/i,
// IMO
/(infinix) (x1101b?)/i],[dke,mke,[hke,vke]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan
/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,
// HMD/IMO
/(hp) ([\w ]+\w)/i,
// HP iPAQ
/(microsoft); (lumia[\w ]+)/i,
// Microsoft Lumia
/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,
// Lenovo
/(oppo) ?([\w ]+) bui/i],[dke,mke,[hke,Ike]],[/(kobo)\s(ereader|touch)/i,
// Kobo
/(archos) (gamepad2?)/i,
// Archos
/(hp).+(touchpad(?!.+tablet)|tablet)/i,
// HP TouchPad
/(kindle)\/([\w\.]+)/i],[dke,mke,[hke,vke]],[/(surface duo)/i],[mke,[dke,Xke],[hke,vke]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[mke,[dke,"Fairphone"],[hke,Ike]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[mke,[dke,Zke],[hke,vke]],[/(sprint) (\w+)/i],[dke,mke,[hke,Ike]],[/(kin\.[onetw]{3})/i],[[mke,/\./g," "],[dke,Xke],[hke,Ike]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[mke,[dke,aDe],[hke,vke]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[mke,[dke,aDe],[hke,Ike]],[
///////////////////
// SMARTTVS
///////////////////
/smart-tv.+(samsung)/i],[dke,[hke,Bke]],[/hbbtv.+maple;(\d+)/i],[[mke,/^/,"SmartTV"],[dke,iDe],[hke,Bke]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[dke,zke],[hke,Bke]],[/(apple) ?tv/i],[dke,[mke,Kke+" TV"],[hke,Bke]],[/crkey.*devicetype\/chromecast/i],[[mke,ADe+" Third Generation"],[dke,Vke],[hke,Bke]],[/crkey.*devicetype\/([^/]*)/i],[[mke,/^/,"Chromecast "],[dke,Vke],[hke,Bke]],[/fuchsia.*crkey/i],[[mke,ADe+" Nest Hub"],[dke,Vke],[hke,Bke]],[/crkey/i],[[mke,ADe],[dke,Vke],[hke,Bke]],[/droid.+aft(\w+)( bui|\))/i],[mke,[dke,Gke],[hke,Bke]],[/(shield \w+ tv)/i],[mke,[dke,Zke],[hke,Bke]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[mke,[dke,nDe],[hke,Bke]],[/(bravia[\w ]+)( bui|\))/i],[mke,[dke,sDe],[hke,Bke]],[/(mi(tv|box)-?\w+) bui/i],[mke,[dke,rDe],[hke,Bke]],[/Hbbtv.*(technisat) (.*);/i],[dke,mke,[hke,Bke]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
// Roku
/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[dke,xDe],[mke,xDe],[hke,Bke]],[
// SmartTV from Unidentified Vendors
/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[mke,[hke,Bke]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[hke,Bke]],[
///////////////////
// CONSOLES
///////////////////
/(ouya)/i,
// Ouya
/(nintendo) (\w+)/i],[dke,mke,[hke,Cke]],[/droid.+; (shield)( bui|\))/i],[mke,[dke,Zke],[hke,Cke]],[/(playstation \w+)/i],[mke,[dke,sDe],[hke,Cke]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[mke,[dke,Xke],[hke,Cke]],[
///////////////////
// WEARABLES
///////////////////
/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[mke,[dke,iDe],[hke,yke]],[/((pebble))app/i,
// Pebble
/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[dke,mke,[hke,yke]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[mke,[dke,tDe],[hke,yke]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[mke,[dke,Kke],[hke,yke]],[/(opwwe\d{3})/i],[mke,[dke,eDe],[hke,yke]],[/(moto 360)/i],[mke,[dke,$ke],[hke,yke]],[/(smartwatch 3)/i],[mke,[dke,sDe],[hke,yke]],[/(g watch r)/i],[mke,[dke,zke],[hke,yke]],[/droid.+; (wt63?0{2,3})\)/i],[mke,[dke,aDe],[hke,yke]],[
///////////////////
// XR
///////////////////
/droid.+; (glass) \d/i],[mke,[dke,Vke],[hke,bke]],[/(pico) (4|neo3(?: link|pro)?)/i],[dke,mke,[hke,bke]],[/; (quest( \d| pro)?)/i],[mke,[dke,hDe],[hke,bke]],[
///////////////////
// EMBEDDED
///////////////////
/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[dke,[hke,Eke]],[/(aeobc)\b/i],[mke,[dke,Gke],[hke,Eke]],[/(homepod).+mac os/i],[mke,[dke,Kke],[hke,Eke]],[/windows iot/i],[[hke,Eke]],[
////////////////////
// MIXED (GENERIC)
///////////////////
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[mke,[hke,DDe,{mobile:"Mobile",xr:"VR","*":vke}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[hke,vke]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[hke,Ike]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[mke,[dke,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[gke,[uke,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[uke,gke],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[gke,[uke,"Blink"]],[/(presto)\/([\w\.]+)/i,
// Presto
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,
// WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna/Servo
/ekioh(flow)\/([\w\.]+)/i,
// Flow
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,
// KHTML/Tasman/Links
/(icab)[\/ ]([23]\.[\d\.]+)/i,
// iCab
/\b(libweb)/i],[uke,gke],[/ladybird\//i],[[uke,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[gke,uke]],os:[[
// Windows
/microsoft (windows) (vista|xp)/i],[uke,gke],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[uke,[gke,DDe,FDe]],[/windows nt 6\.2; (arm)/i,
// Windows RT
/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[gke,DDe,FDe],[uke,fDe]],[
// iOS/macOS
/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,
// iOS
/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[gke,/_/g,"."],[uke,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[uke,"macOS"],[gke,/_/g,"."]],[
// Google Chromecast
/android ([\d\.]+).*crkey/i],[gke,[uke,ADe+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[gke,[uke,ADe+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[gke,[uke,ADe+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[gke,[uke,ADe+" Linux"]],[/crkey\/([\d\.]+)/i],[gke,[uke,ADe]],[
// Mobile OSes
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[gke,uke],[/(ubuntu) ([\w\.]+) like android/i],[[uke,/(.+)/,"$1 Touch"],gke],[
// Android/Blackberry/WebOS/QNX/Bada/RIM/KaiOS/Maemo/MeeGo/S40/Sailfish OS/OpenHarmony/Tizen
/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[uke,gke],[/\(bb(10);/i],[gke,[uke,Yke]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[gke,[uke,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[gke,[uke,cDe+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[gke,[uke,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[gke,[uke,"watchOS"]],[
// Google ChromeOS
/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[uke,"Chrome OS"],gke],[
// Smart TVs
/panasonic;(viera)/i,
// Panasonic Viera
/(netrange)mmh/i,
// Netrange
/(nettv)\/(\d+\.[\w\.]+)/i,
// NetTV
// Console
/(nintendo|playstation) (\w+)/i,
// Nintendo/Playstation
/(xbox); +xbox ([^\);]+)/i,
// Microsoft Xbox (360, One, X, S, Series X, Series S)
/(pico) .+os([\w\.]+)/i,
// Pico
// Other
/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
// Joli/Palm
/(mint)[\/\(\) ]?(\w*)/i,
// Mint
/(mageia|vectorlinux)[; ]/i,
// Mageia/VectorLinux
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
// Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,
// Hurd/Linux
/(gnu) ?([\w\.]*)/i,
// GNU
/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
// FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
/(haiku) (\w+)/i],[uke,gke],[/(sunos) ?([\w\.\d]*)/i],[[uke,"Solaris"],gke],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
// Solaris
/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,
// AIX
/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,
// BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS
/(unix) ?([\w\.]*)/i],[uke,gke]]},RDe=(QDe.call(($xe={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[rke,[uke,gke,fke,hke]],[ake,[pke]],[oke,[hke,mke,dke]],[lke,[uke,gke]],[Ake,[uke,gke]]]),QDe.call($xe.isIgnore,[[rke,[gke,fke]],[lke,[gke]],[Ake,[gke]]]),QDe.call($xe.isIgnoreRgx,[[rke,/ ?browser$/i],[Ake,/ ?os$/i]]),QDe.call($xe.toString,[[rke,[uke,gke]],[ake,[pke]],[oke,[dke,mke]],[lke,[uke,gke]],[Ake,[uke,gke]]]),$xe),NDe=function(e,t){var i=RDe.init[t],n=RDe.isIgnore[t]||0,s=RDe.isIgnoreRgx[t]||0,r=RDe.toString[t]||0;function a(){QDe.call(this,i)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return CDe?CDe.getHighEntropyValues(Oke).then((function(t){return e.setCH(new LDe(t,!1)).parseCH().get()})):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=cke&&(a.prototype.is=function(e){var t=!1;for(var i in this)if(this.hasOwnProperty(i)&&!vDe(n,i)&&EDe(s?_De(s,this[i]):this[i])==EDe(s?_De(s,e):e)){if(t=!0,e!=ike)break}else if(e==ike&&t){t=!t;break}return t},a.prototype.toString=function(){var e=eke;for(var t in r)typeof this[r[t]]!==ike&&(e+=(e?" ":eke)+this[r[t]]);return e||ike}),CDe||(a.prototype.then=function(e){var t=this,i=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};i.prototype={is:a.prototype.is,toString:a.prototype.toString};var n=new i;return e(n),n}),new a};function LDe(e,t){if(e=e||{},QDe.call(this,Oke),t)QDe.call(this,[[Qke,bDe(e[Fke])],[Ske,bDe(e[Tke])],[Ike,/\?1/.test(e[Lke])],[mke,SDe(e[Uke])],[xke,SDe(e[Hke])],[kke,SDe(e[Pke])],[pke,SDe(e[Mke])],[_ke,bDe(e[Nke])],[Dke,SDe(e[Rke])]]);else for(var i in e)this.hasOwnProperty(i)&&typeof e[i]!==ike&&(this[i]=e[i])}function UDe(e,t,i,n){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,t){return this.data[e]=t,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(mDe&&mDe.userAgent==this.ua)switch(this.itemType){case rke:mDe.brave&&typeof mDe.brave.isBrave==tke&&this.set(uke,"Brave");break;case oke:!this.get(hke)&&CDe&&CDe[Ike]&&this.set(hke,Ike),"Macintosh"==this.get(mke)&&mDe&&typeof mDe.standalone!==ike&&mDe.maxTouchPoints&&mDe.maxTouchPoints>2&&this.set(mke,"iPad").set(hke,vke);break;case Ake:!this.get(uke)&&CDe&&CDe[xke]&&this.set(uke,CDe[xke]);break;case cke:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(rke,t(rke)).set(ake,t(ake)).set(oke,t(oke)).set(lke,t(lke)).set(Ake,t(Ake))}return this},this.parseUA=function(){return this.itemType!=cke&&kDe.call(this.data,this.ua,this.rgxMap),this.itemType==rke&&this.set(fke,wDe(this.get(gke))),this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case rke:case lke:var i,n=e[Ske]||e[Qke];if(n)for(var s in n){var r=n[s].brand||n[s],a=n[s].version;this.itemType!=rke||/not.a.brand/i.test(r)||i&&(!/chrom/i.test(i)||r==lDe)||(r=DDe(r,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome"}),this.set(uke,r).set(gke,a).set(fke,wDe(a)),i=r),this.itemType==lke&&r==lDe&&this.set(gke,a)}break;case ake:var o=e[pke];o&&(o&&"64"==e[Dke]&&(o+="64"),kDe.call(this.data,o+";",t));break;case oke:if(e[Ike]&&this.set(hke,Ike),e[mke]&&(this.set(mke,e[mke]),!this.get(hke)||!this.get(dke))){var l={};kDe.call(l,"droid 9; "+e[mke]+")",t),!this.get(hke)&&l.type&&this.set(hke,l.type),!this.get(dke)&&l.vendor&&this.set(dke,l.vendor)}if(e[_ke]){var A;if("string"!=typeof e[_ke])for(var c=0;!A&&c<e[_ke].length;)A=DDe(e[_ke][c++],TDe);else A=DDe(e[_ke],TDe);this.set(hke,A)}break;case Ake:var u=e[xke];if(u){var h=e[kke];u==fDe&&(h=parseInt(wDe(h),10)>=13?"11":"10"),this.set(uke,u).set(gke,h)}this.get(uke)==fDe&&"Xbox"==e[mke]&&this.set(uke,"Xbox").set(gke,void 0);break;case cke:var d=this.data,g=function(t){return d[t].getItem().setCH(e).parseCH().get()};this.set(rke,g(rke)).set(ake,g(ake)).set(oke,g(oke)).set(lke,g(lke)).set(Ake,g(Ake))}return this},QDe.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",i],["data",NDe(this,e)]]),this}function HDe(e,t,i){if(typeof e===nke?(BDe(e,!0)?(typeof t===nke&&(i=t),t=e):(i=e,t=void 0),e=void 0):typeof e!==ske||BDe(t,!0)||(i=t,t=void 0),i&&typeof i.append===tke){var n={};i.forEach((function(e,t){n[t]=e})),i=n}if(!(this instanceof HDe))return new HDe(e,t,i).getResult();var s=typeof e===ske?e:
// Passed user-agent string
i&&i[Zxe]?i[Zxe]:
// User-Agent from passed headers
mDe&&mDe.userAgent?mDe.userAgent:
// navigator.userAgent
eke,r=new LDe(i,!0),a=t?function(e,t){var i={},n=t;if(!BDe(t))for(var s in n={},t)for(var r in t[s])n[r]=t[s][r].concat(n[r]?n[r]:[]);for(var a in e)i[a]=n[a]&&n[a].length%2==0?n[a].concat(e[a]):e[a];return i}(MDe,t):MDe,o=function(e){return e==cke?function(){return new UDe(e,s,a,r).set("ua",s).set(rke,this.getBrowser()).set(ake,this.getCPU()).set(oke,this.getDevice()).set(lke,this.getEngine()).set(Ake,this.getOS()).get()}:function(){return new UDe(e,s,a[e],r).parseUA().get()}};return QDe.call(this,[["getBrowser",o(rke)],["getCPU",o(ake)],["getDevice",o(oke)],["getEngine",o(lke)],["getOS",o(Ake)],["getResult",o(cke)],["getUA",function(){return s}],["setUA",function(e){return yDe(e)&&(s=e.length>500?xDe(e,500):e),this}]]).setUA(s),this}HDe.VERSION="2.0.2",HDe.BROWSER=IDe([uke,gke,fke,hke]),HDe.CPU=IDe([pke]),HDe.DEVICE=IDe([mke,dke,hke,Cke,Ike,Bke,vke,yke,Eke]),HDe.ENGINE=HDe.OS=IDe([uke,gke]);const PDe=TC("logManage",(()=>{const e=JC(),t=cF(),i=RF();let n=zh(0),s=!1,r=[],a=Lh({readOverTime:3600,logParam:{},keyinfo:{},accessInfo:{},kinesisClient:null,firehoseClient:null,reading_json:{},awsRegion:"ap-northeast-1",streamNameMap:{firehose:"-actibookone-kinesis-firehose","kns-view":"-actibookone-kinesis-data-stream","kns-detail":"-actibookone-kinesis-access-log-detail-stream"},is_first_log:1,dwellTime:{
// 切换浏览器Tag 或 window.blur 或 window.focus ( 重新设置 dwell_timestamp / 计算dwell_second )
dwell_timestamp:0,
// 开始时间戳
// dwell_second: 0, // 累计秒数
open_timestamp:0},
// sendPage_actionType_paging_value: [],
lastReadLogIdByDetail:{},
//pageno为key ，value为log_id
oldViewPages:[0],logRandomNum:0});const o=async(t,i,n)=>{await l();try{const s=RBe.now().setZone("Asia/Tokyo");let r=[];r[0]=a.logParam.client_num,r[1]=a.logParam.content_num,r[2]=a.logParam.dl_url_key,r[3]=a.logParam.dl_url,r[4]=a.logParam.user_num,r[5]=a.logParam.session_key,r[6]=a.logParam.viewer_type,r[7]=a.logParam.device_type,r[8]=a.logParam.os_type,r[9]=a.logParam.os_ver,r[10]=a.logParam.browser_type,r[11]=a.logParam.browser_ver,r[12]=a.logParam.viewer_ver,r[13]=t,r[14]=i,r[15]=n,r[16]=s.toFormat("yyyy-MM-dd HH:mm:ss"),r[17]=e.get("readLinkUseremail")||"";const o={DeliveryStreamName:e.get("envType")+a.streamNameMap.firehose,Record:{Data:r.join(",")+"\n"}},l=new Xxe(o);a.firehoseClient.send(l)}catch(s){throw console.error("发送单条记录到 Firehose 时出错:",s),s}},l=async()=>{if(2!==n.value){if(1!==n.value)return 0===n.value&&(n.value=1),C(),await PC.post(e.apiUrl+"/api/get_kinesis_keyinfo",(e=>{if(e.result){let t={accessKeyId:yme(e.result.accessKeyId),secretAccessKey:yme(e.result.secretAccessKey)};a.keyinfo=t}})).then((async()=>{a.firehoseClient=new wxe({region:a.awsRegion,credentials:{accessKeyId:a.keyinfo.accessKeyId,secretAccessKey:a.keyinfo.secretAccessKey}}),a.kinesisClient=new tSe({region:a.awsRegion,credentials:{accessKeyId:a.keyinfo.accessKeyId,secretAccessKey:a.keyinfo.secretAccessKey}}),await A()}));{let e=function(e){return new Promise((t=>setTimeout(t,e)))};for(;1===n.value;)await e(500)}}},A=async()=>{let t={appVersion:OC.ActiBookOne_version,readType:e.readType,readFrom:e.readFrom,contentUpdateDate:e.contentUpdateDate,contentTitle:e.contentTitle,totalPageTime:e.totalPageTime,contentType:e.contentType,userNum:a.logParam.user_num,contentNum:a.logParam.content_num,clientNum:a.logParam.client_num,readProgress:e.readProgress,terminalOs:c(),terminalType:u(),readLinkCode:e.get("readLinkCode")||"",readLinkUseremail:e.get("readLinkUseremail")||"",dl_url:a.logParam.dl_url,dl_url_key:a.logParam.dl_url_key};return a.reading_json=t,PC.post(e.apiUrl+"/api/create_access_log",{parameters:JSON.stringify(t)},(e=>{2e3===e.result.accessStatus.code&&(a.accessInfo=e.result.resultInfo)}),"json").then((()=>{n.value=2}))},c=()=>{const e=navigator.userAgent,t=/Mac/i.test(e);return device.android()?OC.terminalOs_Android:device.ios()?OC.terminalOs_iOS:device.windows()?OC.terminalOs_windows:t?OC.terminalOs_mac:OC.terminalOs_others},u=()=>{let e=!!(navigator.userAgent.match(/(iPad)/)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1);return device.tablet()||e?OC.terminalType_pad_browser:device.mobile()?OC.terminalType_phone_browser:device.desktop()?OC.terminalType_pc_browser:OC.terminalType_others},h=(e,t,i)=>{let n=[],s=i-a.dwellTime.dwell_timestamp;return(s<1||a.dwellTime.dwell_timestamp<1)&&(s=1),t.map((t=>{let i={access_log_detail_sortkey_id:a.lastReadLogIdByDetail[t],session_key_content:a.accessInfo.accessLogSortkeyId,action_type:e,dwell_time:s,from_page:"",target_page:t,search_keyword:"",is_first_log:0};n.push(i)})),n},d=async(n,s,r)=>{await l();let o=t.getCurrentPagenos();if(e.get("shareBaseUrl").indexOf("://127.0.0.1")>-1||e.get("shareBaseUrl").indexOf("://localhost")>-1)return;let A=[],c=new Date,u=Math.floor(Date.now()/1e3);if("open"===n&&(a.dwellTime.open_timestamp=u),"read"===n)if(1===a.is_first_log){let e=Object.keys(a.lastReadLogIdByDetail);e.length>0&&h(n,e,u);let{newLogId:t,randomNum:i}=y(c),s={};o.map(((e,r)=>{let o=t+(i+r);s[e]=o;let l={access_log_detail_sortkey_id:o,session_key_content:a.accessInfo.accessLogSortkeyId,action_type:n,dwell_time:1,from_page:"",target_page:e,search_keyword:"",is_first_log:1};A.push(l)})),a.lastReadLogIdByDetail=s,a.is_first_log=0,m(),a.dwellTime.dwell_timestamp=u}else{let e=Object.keys(a.lastReadLogIdByDetail),t=h(n,e,u);A.push(...t)}else if("blur"===n){let e=Object.keys(a.lastReadLogIdByDetail);if(e.length>0){let t=h("read",e,u);A.push(...t)}}else{if("turn_page"===n&&0===Object.keys(a.lastReadLogIdByDetail).length)return;["turn_page","turn_link","turn_thumbnail","turn_search","turn_content","turn_tag","turn_taglist"].includes(n)&&(a.is_first_log=1);let{newLogId:e,randomNum:t}=y(c),{from_page:o,target_page:l}=g(n,s,r),u={access_log_detail_sortkey_id:e+t,session_key_content:a.accessInfo.accessLogSortkeyId,action_type:n,dwell_time:"",from_page:o,target_page:l,search_keyword:"search"===n?i.searchKeyword:""};A.push(u)}try{const t=A.map((e=>({Data:(new TextEncoder).encode(JSON.stringify(e)),PartitionKey:a.accessInfo.accessLogSortkeyId}))),i={StreamName:e.get("envType")+a.streamNameMap["kns-detail"],Records:t};"open"!==n&&(a.oldViewPages=JSON.parse(JSON.stringify(o)));const s=new WSe(i);a.kinesisClient.send(s).then((e=>{}))}catch(d){throw console.error("发送单条记录到 Kinesis Data Streams 时出错:",d),d}},g=(e,i,n)=>{if("read"===e||"open"===e||"rotate"===e||"search"===e)i="";else if(!i){let e=Object.keys(a.lastReadLogIdByDetail);i=Math.max(0,...e)}if("rotate"===e||"search"===e)n="";else if(!n){let e=t.getCurrentPagenos();n=Math.max(...e)}return{from_page:i,target_page:n}},p=async()=>{if(e.get("shareBaseUrl").indexOf("://127.0.0.1")>-1||e.get("shareBaseUrl").indexOf("://localhost")>-1||-1==e.readType)return!0;await l();let i=a.dwellTime.dwell_timestamp,n=Math.floor(Date.now()/1e3);i=i?n-i:1;let s=t.getCurrentPagenos(),r={appVersion:OC.ActiBookOne_version,userNum:a.logParam.user_num,readType:e.readType,readFrom:e.readFrom,contentNum:a.logParam.content_num,terminalOs:c(),terminalType:u(),readProgress:Math.max(1,...s),historySortkeyId:a.accessInfo.historySortkeyId,accessLogSortkeyId:a.accessInfo.accessLogSortkeyId,dwellTime:i};try{let t={StreamName:e.get("envType")+a.streamNameMap["kns-view"],PartitionKey:r.accessLogSortkeyId,Data:JSON.stringify(r)};const i=new VSe(t);a.kinesisClient.send(i).then((e=>{}))}catch(o){console.error("发送单条记录到 Kinesis Data Streams 时出错:",o)}};window.testlog=(e=0)=>{s=!0,e&&(a.readOverTime=e)};const f=()=>{r.map((e=>{clearInterval(e)}))},m=()=>{let e=setInterval((()=>{let e=Math.floor(Date.now()/1e3);s&&(a.dwellTime.open_timestamp,a.dwellTime.open_timestamp),e-a.dwellTime.open_timestamp>a.readOverTime?(f(),r=[],n.value=0,a.is_first_log=1,a.lastReadLogIdByDetail={},A().then((()=>{d("open"),d("read")}))):Promise.all([B(OC.kinesis_log_actionType_dwell_time),d("read"),p()]).then((()=>{a.dwellTime.dwell_timestamp=e}))}),5e3);r.push(e)},C=()=>{let t={};t.viewer_type=OC.kinesis_log_viewer_type_H5,t.viewer_ver=OC.ActiBookOne_version,t.content_num=e.get("contentNum"),t.client_num=e.get("clientNum")||0,t.user_num=e.get("userNum"),t.session_key=I(),t.device_type=u();const i=v();if(t.os_type=i.os_type,t.os_ver=i.os_ver,t.browser_type=i.browser_type,t.browser_ver=i.browser_ver,t.dl_url="",t.dl_url_key="","DL"===e.viewerType){t.dl_url=encodeURI(e.get("indexUrl"));var n=PC("<a></a>").attr("href",e.get("shareBaseUrl"))[0],s=n.pathname.split("/");""!==s[s.length-1]&&"index.html"!==s[s.length-1]||s.pop();let i=n.host+s.join("/");i.indexOf(":443")>-1?i=i.replace(":443","/"):i.indexOf(":80")>-1&&(i=i.replace(":80","/")),t.dl_url_key=md5(i)}a.logParam=t},I=()=>{var e=Math.ceil(1e6*Math.random())+"_"+ +new Date;return md5(e).substr(0,16)},v=()=>{var e=new HDe(window.navigator.userAgent),t=e.getOS(),i="",n="";t&&(n=t.version,i=c());var s=e.getBrowser(),r="",a="";if(s){a=s.version;var o=(s.name||"").toLowerCase();o=o.replace("mobile ",""),r=PC.inArray(o,OC.kinesis_log_browser_type)>-1?PC.inArray(o,OC.kinesis_log_browser_type):0}return{os_type:i,os_ver:n,browser_type:r,browser_ver:a}},B=(n,s)=>{let r,l;switch(n){case OC.kinesis_log_actionType_open:r=e.get("readFrom"),l=e.get("readProgress"),o(n,l,r);break;case OC.kinesis_log_actionType_paging:let A=e.get("spread_mode");r="single"===A?"1":"2",t.getCurrentPagenos().map((e=>{o(n,e,r)}));break;case OC.kinesis_log_actionType_link_click:let c=s.type.toString();l=s.pageno,r=s.target,r=unescape(decodeURI(r)),c!==OC.Link_Type_File&&c!==OC.Link_Type_Goto&&c!==OC.Link_Type_URL&&c!==OC.Link_Type_Audio||o(n,l,Bme(r));break;case OC.kinesis_log_actionType_search:let u=i.searchValueArr||[];r=u.join(" "),l="",o(n,l,Bme(r));break;case OC.kinesis_log_actionType_paging_reissue:let h=e.get("spread_mode");r="single"===h?"1":"2",t.getCurrentPagenos().map((e=>{o(OC.kinesis_log_actionType_paging,e,r)}));break;case OC.kinesis_log_actionType_dwell_time:r=Math.floor(Date.now()/1e3)-a.dwellTime.dwell_timestamp,o(n,-1,r)}},y=t=>{let i=t.format("yyyyMMdhhmmss"),n=a.logRandomNum>0?a.logRandomNum:Math.ceil(1e7*Math.random());return a.logRandomNum=n+1,{newLogId:e.get("clientNum")+"_"+e.get("contentNum")+"_"+i+"_",randomNum:n}};return{logState:a,windowBlur:()=>{f(),Promise.all([d("blur"),B(OC.kinesis_log_actionType_dwell_time),p()]).then((()=>{document.hasFocus()||(a.dwellTime.dwell_timestamp=0)}))},windowFocus:()=>{a.dwellTime.dwell_timestamp=Math.floor(Date.now()/1e3),m()},sendLogByActionTpye:B,sendKinesisDetailLog:d,sendKinesisViewLog:p,stopDelayedSendLog:f}}));var ODe={},GDe={},KDe={};let qDe;const YDe=[0,
// Not used
26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];KDe.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},KDe.getSymbolTotalCodewords=function(e){return YDe[e]},KDe.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},KDe.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');qDe=e},KDe.isKanjiModeEnabled=function(){return void 0!==qDe},KDe.toSJIS=function(e){return qDe(e)};var VDe,WDe={};function jDe(){this.buffer=[],this.length=0}(VDe=WDe).L={bit:1},VDe.M={bit:0},VDe.Q={bit:3},VDe.H={bit:2},VDe.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},VDe.from=function(e,t){if(VDe.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return VDe.L;case"m":case"medium":return VDe.M;case"q":case"quartile":return VDe.Q;case"h":case"high":return VDe.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(I2){return t}},jDe.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let i=0;i<t;i++)this.putBit(1==(e>>>t-i-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var JDe=jDe;function zDe(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}zDe.prototype.set=function(e,t,i,n){const s=e*this.size+t;this.data[s]=i,n&&(this.reservedBit[s]=!0)},zDe.prototype.get=function(e,t){return this.data[e*this.size+t]},zDe.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},zDe.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var XDe=zDe,$De={};!function(e){const t=KDe.getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const i=Math.floor(e/7)+2,n=t(e),s=145===n?26:2*Math.ceil((n-13)/(2*i-2)),r=[n-7];for(let t=1;t<i-1;t++)r[t]=r[t-1]-s;return r.push(6),r.reverse()},e.getPositions=function(t){const i=[],n=e.getRowColCoords(t),s=n.length;for(let e=0;e<s;e++)for(let t=0;t<s;t++)0===e&&0===t||// top-left
0===e&&t===s-1||// bottom-left
e===s-1&&0===t||i.push([n[e],n[t]]);return i}}($De);var ZDe={};const eFe=KDe.getSymbolSize;ZDe.getPositions=function(e){const t=eFe(e);return[
// top-left
[0,0],
// top-right
[t-7,0],
// bottom-left
[0,t-7]]};var tFe={};!function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t=3,i=3,n=40,s=10;function r(t,i,n){switch(t){case e.Patterns.PATTERN000:return(i+n)%2==0;case e.Patterns.PATTERN001:return i%2==0;case e.Patterns.PATTERN010:return n%3==0;case e.Patterns.PATTERN011:return(i+n)%3==0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(n/3))%2==0;case e.Patterns.PATTERN101:return i*n%2+i*n%3==0;case e.Patterns.PATTERN110:return(i*n%2+i*n%3)%2==0;case e.Patterns.PATTERN111:return(i*n%3+(i+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){const i=e.size;let n=0,s=0,r=0,a=null,o=null;for(let l=0;l<i;l++){s=r=0,a=o=null;for(let A=0;A<i;A++){let i=e.get(l,A);i===a?s++:(s>=5&&(n+=t+(s-5)),a=i,s=1),i=e.get(A,l),i===o?r++:(r>=5&&(n+=t+(r-5)),o=i,r=1)}s>=5&&(n+=t+(s-5)),r>=5&&(n+=t+(r-5))}return n},e.getPenaltyN2=function(e){const t=e.size;let n=0;for(let i=0;i<t-1;i++)for(let s=0;s<t-1;s++){const t=e.get(i,s)+e.get(i,s+1)+e.get(i+1,s)+e.get(i+1,s+1);4!==t&&0!==t||n++}return n*i},e.getPenaltyN3=function(e){const t=e.size;let i=0,s=0,r=0;for(let n=0;n<t;n++){s=r=0;for(let a=0;a<t;a++)s=s<<1&2047|e.get(n,a),a>=10&&(1488===s||93===s)&&i++,r=r<<1&2047|e.get(a,n),a>=10&&(1488===r||93===r)&&i++}return i*n},e.getPenaltyN4=function(e){let t=0;const i=e.data.length;for(let n=0;n<i;n++)t+=e.data[n];return Math.abs(Math.ceil(100*t/i/5)-10)*s},e.applyMask=function(e,t){const i=t.size;for(let n=0;n<i;n++)for(let s=0;s<i;s++)t.isReserved(s,n)||t.xor(s,n,r(e,s,n))},e.getBestMask=function(t,i){const n=Object.keys(e.Patterns).length;let s=0,r=1/0;for(let a=0;a<n;a++){i(a),e.applyMask(a,t);const n=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),n<r&&(r=n,s=a)}return s}}(tFe);var iFe={};const nFe=WDe,sFe=[
// L  M  Q  H
1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],rFe=[
// L  M  Q  H
7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];iFe.getBlocksCount=function(e,t){switch(t){case nFe.L:return sFe[4*(e-1)+0];case nFe.M:return sFe[4*(e-1)+1];case nFe.Q:return sFe[4*(e-1)+2];case nFe.H:return sFe[4*(e-1)+3];default:return}},iFe.getTotalCodewordsCount=function(e,t){switch(t){case nFe.L:return rFe[4*(e-1)+0];case nFe.M:return rFe[4*(e-1)+1];case nFe.Q:return rFe[4*(e-1)+2];case nFe.H:return rFe[4*(e-1)+3];default:return}};var aFe={},oFe={};const lFe=new Uint8Array(512),AFe=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)lFe[t]=e,AFe[e]=t,e<<=1,256&e&&(e^=285);for(let t=255;t<512;t++)lFe[t]=lFe[t-255]}(),oFe.log=function(e){if(e<1)throw new Error("log("+e+")");return AFe[e]},oFe.exp=function(e){return lFe[e]},oFe.mul=function(e,t){return 0===e||0===t?0:lFe[AFe[e]+AFe[t]]},function(e){const t=oFe;e.mul=function(e,i){const n=new Uint8Array(e.length+i.length-1);for(let s=0;s<e.length;s++)for(let r=0;r<i.length;r++)n[s+r]^=t.mul(e[s],i[r]);return n},e.mod=function(e,i){let n=new Uint8Array(e);for(;n.length-i.length>=0;){const e=n[0];for(let r=0;r<i.length;r++)n[r]^=t.mul(i[r],e);let s=0;for(;s<n.length&&0===n[s];)s++;n=n.slice(s)}return n},e.generateECPolynomial=function(i){let n=new Uint8Array([1]);for(let s=0;s<i;s++)n=e.mul(n,new Uint8Array([1,t.exp(s)]));return n}}(aFe);const cFe=aFe;function uFe(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}uFe.prototype.initialize=function(e){this.degree=e,this.genPoly=cFe.generateECPolynomial(this.degree)},uFe.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const i=cFe.mod(t,this.genPoly),n=this.degree-i.length;if(n>0){const e=new Uint8Array(this.degree);return e.set(i,n),e}return i};var hFe=uFe,dFe={},gFe={},pFe={isValid:function(e){return!isNaN(e)&&e>=1&&e<=40}},fFe={};const mFe="[0-9]+";let CFe="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";CFe=CFe.replace(/u/g,"\\u");const IFe="(?:(?![A-Z0-9 $%*+\\-./:]|"+CFe+")(?:.|[\r\n]))+";fFe.KANJI=new RegExp(CFe,"g"),fFe.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),fFe.BYTE=new RegExp(IFe,"g"),fFe.NUMERIC=new RegExp(mFe,"g"),fFe.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const vFe=new RegExp("^"+CFe+"$"),BFe=new RegExp("^"+mFe+"$"),yFe=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");fFe.testKanji=function(e){return vFe.test(e)},fFe.testNumeric=function(e){return BFe.test(e)},fFe.testAlphanumeric=function(e){return yFe.test(e)},function(e){const t=pFe,i=fFe;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,i){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?e.ccBits[0]:i<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return i.testNumeric(t)?e.NUMERIC:i.testAlphanumeric(t)?e.ALPHANUMERIC:i.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,i){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(I2){return i}}}(gFe),function(e){const t=KDe,i=iFe,n=WDe,s=gFe,r=pFe,a=t.getBCHDigit(7973);function o(e,t){return s.getCharCountIndicator(e,t)+4}function l(e,t){let i=0;return e.forEach((function(e){const n=o(e.mode,t);i+=n+e.getBitsLength()})),i}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,n,a){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===a&&(a=s.BYTE);const l=8*(t.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,n));if(a===s.MIXED)return l;const A=l-o(a,e);switch(a){case s.NUMERIC:return Math.floor(A/10*3);case s.ALPHANUMERIC:return Math.floor(A/11*2);case s.KANJI:return Math.floor(A/13);case s.BYTE:default:return Math.floor(A/8)}},e.getBestVersionForData=function(t,i){let r;const a=n.from(i,n.M);if(Array.isArray(t)){if(t.length>1)return function(t,i){for(let n=1;n<=40;n++)if(l(t,n)<=e.getCapacity(n,i,s.MIXED))return n}(t,a);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,i,n){for(let s=1;s<=40;s++)if(i<=e.getCapacity(s,n,t))return s}(r.mode,r.getLength(),a)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");let i=e<<12;for(;t.getBCHDigit(i)-a>=0;)i^=7973<<t.getBCHDigit(i)-a;return e<<12|i}}(dFe);var bFe={};const EFe=KDe,wFe=EFe.getBCHDigit(1335);bFe.getEncodedBits=function(e,t){const i=e.bit<<3|t;let n=i<<10;for(;EFe.getBCHDigit(n)-wFe>=0;)n^=1335<<EFe.getBCHDigit(n)-wFe;return 21522^(i<<10|n)};var QFe={};const _Fe=gFe;function SFe(e){this.mode=_Fe.NUMERIC,this.data=e.toString()}SFe.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},SFe.prototype.getLength=function(){return this.data.length},SFe.prototype.getBitsLength=function(){return SFe.getBitsLength(this.data.length)},SFe.prototype.write=function(e){let t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),e.put(n,10);const s=this.data.length-t;s>0&&(i=this.data.substr(t),n=parseInt(i,10),e.put(n,3*s+1))};var xFe=SFe;const kFe=gFe,DFe=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function FFe(e){this.mode=kFe.ALPHANUMERIC,this.data=e}FFe.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},FFe.prototype.getLength=function(){return this.data.length},FFe.prototype.getBitsLength=function(){return FFe.getBitsLength(this.data.length)},FFe.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let i=45*DFe.indexOf(this.data[t]);i+=DFe.indexOf(this.data[t+1]),e.put(i,11)}this.data.length%2&&e.put(DFe.indexOf(this.data[t]),6)};var TFe=FFe;const MFe=gFe;function RFe(e){this.mode=MFe.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}RFe.getBitsLength=function(e){return 8*e},RFe.prototype.getLength=function(){return this.data.length},RFe.prototype.getBitsLength=function(){return RFe.getBitsLength(this.data.length)},RFe.prototype.write=function(e){for(let t=0,i=this.data.length;t<i;t++)e.put(this.data[t],8)};var NFe=RFe;const LFe=gFe,UFe=KDe;function HFe(e){this.mode=LFe.KANJI,this.data=e}HFe.getBitsLength=function(e){return 13*e},HFe.prototype.getLength=function(){return this.data.length},HFe.prototype.getBitsLength=function(){return HFe.getBitsLength(this.data.length)},HFe.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let i=UFe.toSJIS(this.data[t]);if(i>=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13)}};var PFe,OFe=HFe,GFe={exports:{}};PFe={single_source_shortest_paths:function(e,t,i){var n={},s={};s[t]=0;var r,a,o,l,A,c,u,h=PFe.PriorityQueue.make();for(h.push(t,0);!h.empty();)for(o in a=(r=h.pop()).value,l=r.cost,A=e[a]||{})A.hasOwnProperty(o)&&(c=l+A[o],u=s[o],(void 0===s[o]||u>c)&&(s[o]=c,h.push(o,c),n[o]=a));if(void 0!==i&&void 0===s[i]){var d=["Could not find a path from ",t," to ",i,"."].join("");throw new Error(d)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var i=[],n=t;n;)i.push(n),e[n],n=e[n];return i.reverse(),i},find_path:function(e,t,i){var n=PFe.single_source_shortest_paths(e,t,i);return PFe.extract_shortest_path_from_predecessor_list(n,i)},
/**
     * A very naive priority queue implementation.
     */
PriorityQueue:{make:function(e){var t,i=PFe.PriorityQueue,n={};for(t in e=e||{},i)i.hasOwnProperty(t)&&(n[t]=i[t]);return n.queue=[],n.sorter=e.sorter||i.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},
/**
       * Add a new item to the queue and ensure the highest priority element
       * is at the front of the queue.
       */
push:function(e,t){var i={value:e,cost:t};this.queue.push(i),this.queue.sort(this.sorter)},
/**
       * Return the highest priority element in the queue.
       */
pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};var KFe=GFe.exports=PFe;!function(e){const t=gFe,i=xFe,n=TFe,s=NFe,r=OFe,a=fFe,o=KDe,l=KFe;function A(e){return unescape(encodeURIComponent(e)).length}function c(e,t,i){const n=[];let s;for(;null!==(s=e.exec(i));)n.push({data:s[0],index:s.index,mode:t,length:s[0].length});return n}function u(e){const i=c(a.NUMERIC,t.NUMERIC,e),n=c(a.ALPHANUMERIC,t.ALPHANUMERIC,e);let s,r;o.isKanjiModeEnabled()?(s=c(a.BYTE,t.BYTE,e),r=c(a.KANJI,t.KANJI,e)):(s=c(a.BYTE_KANJI,t.BYTE,e),r=[]);return i.concat(n,s,r).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function h(e,a){switch(a){case t.NUMERIC:return i.getBitsLength(e);case t.ALPHANUMERIC:return n.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return s.getBitsLength(e)}}function d(e,a){let l;const A=t.getBestModeForData(e);if(l=t.from(a,A),l!==t.BYTE&&l.bit<A.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(l)+".\n Suggested mode is: "+t.toString(A));switch(l!==t.KANJI||o.isKanjiModeEnabled()||(l=t.BYTE),l){case t.NUMERIC:return new i(e);case t.ALPHANUMERIC:return new n(e);case t.KANJI:return new r(e);case t.BYTE:return new s(e)}}e.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(d(t,null)):t.data&&e.push(d(t.data,t.mode)),e}),[])},e.fromString=function(i,n){const s=function(e){const i=[];for(let n=0;n<e.length;n++){const s=e[n];switch(s.mode){case t.NUMERIC:i.push([s,{data:s.data,mode:t.ALPHANUMERIC,length:s.length},{data:s.data,mode:t.BYTE,length:s.length}]);break;case t.ALPHANUMERIC:i.push([s,{data:s.data,mode:t.BYTE,length:s.length}]);break;case t.KANJI:i.push([s,{data:s.data,mode:t.BYTE,length:A(s.data)}]);break;case t.BYTE:i.push([{data:s.data,mode:t.BYTE,length:A(s.data)}])}}return i}(u(i,o.isKanjiModeEnabled())),r=function(e,i){const n={},s={start:{}};let r=["start"];for(let a=0;a<e.length;a++){const o=e[a],l=[];for(let e=0;e<o.length;e++){const A=o[e],c=""+a+e;l.push(c),n[c]={node:A,lastCount:0},s[c]={};for(let e=0;e<r.length;e++){const a=r[e];n[a]&&n[a].node.mode===A.mode?(s[a][c]=h(n[a].lastCount+A.length,A.mode)-h(n[a].lastCount,A.mode),n[a].lastCount+=A.length):(n[a]&&(n[a].lastCount=A.length),s[a][c]=h(A.length,A.mode)+4+t.getCharCountIndicator(A.mode,i))}}r=l}for(let t=0;t<r.length;t++)s[r[t]].end=0;return{map:s,table:n}}(s,n),a=l.find_path(r.map,"start","end"),c=[];for(let e=1;e<a.length-1;e++)c.push(r.table[a[e]].node);return e.fromArray(function(e){return e.reduce((function(e,t){const i=e.length-1>=0?e[e.length-1]:null;return i&&i.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(c))},e.rawSplit=function(t){return e.fromArray(u(t,o.isKanjiModeEnabled()))}}(QFe);const qFe=KDe,YFe=WDe,VFe=JDe,WFe=XDe,jFe=$De,JFe=ZDe,zFe=tFe,XFe=iFe,$Fe=hFe,ZFe=dFe,eTe=bFe,tTe=gFe,iTe=QFe;function nTe(e,t,i){const n=e.size,s=eTe.getEncodedBits(t,i);let r,a;for(r=0;r<15;r++)a=1==(s>>r&1),r<6?e.set(r,8,a,!0):r<8?e.set(r+1,8,a,!0):e.set(n-15+r,8,a,!0),r<8?e.set(8,n-r-1,a,!0):r<9?e.set(8,15-r-1+1,a,!0):e.set(8,15-r-1,a,!0);e.set(n-8,8,1,!0)}function sTe(e,t,i){const n=new VFe;i.forEach((function(t){n.put(t.mode.bit,4),n.put(t.getLength(),tTe.getCharCountIndicator(t.mode,e)),t.write(n)}));const s=8*(qFe.getSymbolTotalCodewords(e)-XFe.getTotalCodewordsCount(e,t));for(n.getLengthInBits()+4<=s&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);const r=(s-n.getLengthInBits())/8;for(let a=0;a<r;a++)n.put(a%2?17:236,8);return function(e,t,i){const n=qFe.getSymbolTotalCodewords(t),s=XFe.getTotalCodewordsCount(t,i),r=n-s,a=XFe.getBlocksCount(t,i),o=n%a,l=a-o,A=Math.floor(n/a),c=Math.floor(r/a),u=c+1,h=A-c,d=new $Fe(h);let g=0;const p=new Array(a),f=new Array(a);let m=0;const C=new Uint8Array(e.buffer);for(let b=0;b<a;b++){const e=b<l?c:u;p[b]=C.slice(g,g+e),f[b]=d.encode(p[b]),g+=e,m=Math.max(m,e)}const I=new Uint8Array(n);let v,B,y=0;for(v=0;v<m;v++)for(B=0;B<a;B++)v<p[B].length&&(I[y++]=p[B][v]);for(v=0;v<h;v++)for(B=0;B<a;B++)I[y++]=f[B][v];return I}(n,e,t)}function rTe(e,t,i,n){let s;if(Array.isArray(e))s=iTe.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let n=t;if(!n){const t=iTe.rawSplit(e);n=ZFe.getBestVersionForData(t,i)}s=iTe.fromString(e,n||40)}}const r=ZFe.getBestVersionForData(s,i);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<r)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+r+".\n")}else t=r;const a=sTe(t,i,s),o=qFe.getSymbolSize(t),l=new WFe(o);return function(e,t){const i=e.size,n=JFe.getPositions(t);for(let s=0;s<n.length;s++){const t=n[s][0],r=n[s][1];for(let n=-1;n<=7;n++)if(!(t+n<=-1||i<=t+n))for(let s=-1;s<=7;s++)r+s<=-1||i<=r+s||(n>=0&&n<=6&&(0===s||6===s)||s>=0&&s<=6&&(0===n||6===n)||n>=2&&n<=4&&s>=2&&s<=4?e.set(t+n,r+s,!0,!0):e.set(t+n,r+s,!1,!0))}}(l,t),function(e){const t=e.size;for(let i=8;i<t-8;i++){const t=i%2==0;e.set(i,6,t,!0),e.set(6,i,t,!0)}}(l),function(e,t){const i=jFe.getPositions(t);for(let n=0;n<i.length;n++){const t=i[n][0],s=i[n][1];for(let i=-2;i<=2;i++)for(let n=-2;n<=2;n++)-2===i||2===i||-2===n||2===n||0===i&&0===n?e.set(t+i,s+n,!0,!0):e.set(t+i,s+n,!1,!0)}}(l,t),nTe(l,i,0),t>=7&&function(e,t){const i=e.size,n=ZFe.getEncodedBits(t);let s,r,a;for(let o=0;o<18;o++)s=Math.floor(o/3),r=o%3+i-8-3,a=1==(n>>o&1),e.set(s,r,a,!0),e.set(r,s,a,!0)}(l,t),function(e,t){const i=e.size;let n=-1,s=i-1,r=7,a=0;for(let o=i-1;o>0;o-=2)for(6===o&&o--;;){for(let i=0;i<2;i++)if(!e.isReserved(s,o-i)){let n=!1;a<t.length&&(n=1==(t[a]>>>r&1)),e.set(s,o-i,n),r--,-1===r&&(a++,r=7)}if(s+=n,s<0||i<=s){s-=n,n=-n;break}}}(l,a),isNaN(n)&&(n=zFe.getBestMask(l,nTe.bind(null,l,i))),zFe.applyMask(n,l),nTe(l,i,n),{modules:l,version:t,errorCorrectionLevel:i,maskPattern:n,segments:s}}GDe.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let i,n,s=YFe.M;return void 0!==t&&(s=YFe.from(t.errorCorrectionLevel,YFe.M),i=ZFe.from(t.version),n=zFe.from(t.maskPattern),t.toSJISFunc&&qFe.setToSJISFunction(t.toSJISFunc)),rTe(e,i,s,n)};var aTe={},oTe={};!function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const i=parseInt(t.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const i=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,s=e.scale||4;return{width:n,scale:n?4:s,margin:i,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,i){const n=e.getScale(t,i);return Math.floor((t+2*i.margin)*n)},e.qrToImageData=function(t,i,n){const s=i.modules.size,r=i.modules.data,a=e.getScale(s,n),o=Math.floor((s+2*n.margin)*a),l=n.margin*a,A=[n.color.light,n.color.dark];for(let e=0;e<o;e++)for(let i=0;i<o;i++){let c=4*(e*o+i),u=n.color.light;if(e>=l&&i>=l&&e<o-l&&i<o-l){u=A[r[Math.floor((e-l)/a)*s+Math.floor((i-l)/a)]?1:0]}t[c++]=u.r,t[c++]=u.g,t[c++]=u.b,t[c]=u.a}}}(oTe),function(e){const t=oTe;e.render=function(e,i,n){let s=n,r=i;void 0!==s||i&&i.getContext||(s=i,i=void 0),i||(r=function(){try{return document.createElement("canvas")}catch(I2){throw new Error("You need to specify a canvas element")}}()),s=t.getOptions(s);const a=t.getImageWidth(e.modules.size,s),o=r.getContext("2d"),l=o.createImageData(a,a);return t.qrToImageData(l.data,e,s),function(e,t,i){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=i,t.width=i,t.style.height=i+"px",t.style.width=i+"px"}(o,r,a),o.putImageData(l,0,0),r},e.renderToDataURL=function(t,i,n){let s=n;void 0!==s||i&&i.getContext||(s=i,i=void 0),s||(s={});const r=e.render(t,i,s),a=s.type||"image/png",o=s.rendererOpts||{};return r.toDataURL(a,o.quality)}}(aTe);var lTe={};const ATe=oTe;function cTe(e,t){const i=e.a/255,n=t+'="'+e.hex+'"';return i<1?n+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':n}function uTe(e,t,i){let n=e+t;return void 0!==i&&(n+=" "+i),n}lTe.render=function(e,t,i){const n=ATe.getOptions(t),s=e.modules.size,r=e.modules.data,a=s+2*n.margin,o=n.color.light.a?"<path "+cTe(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",l="<path "+cTe(n.color.dark,"stroke")+' d="'+function(e,t,i){let n="",s=0,r=!1,a=0;for(let o=0;o<e.length;o++){const l=Math.floor(o%t),A=Math.floor(o/t);l||r||(r=!0),e[o]?(a++,o>0&&l>0&&e[o-1]||(n+=r?uTe("M",l+i,.5+A+i):uTe("m",s,0),s=0,r=!1),l+1<t&&e[o+1]||(n+=uTe("h",a),a=0)):s++}return n}(r,s,n.margin)+'"/>',A='viewBox="0 0 '+a+" "+a+'"',c='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+A+' shape-rendering="crispEdges">'+o+l+"</svg>\n";return"function"==typeof i&&i(null,c),c};const hTe=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then},dTe=GDe,gTe=aTe,pTe=lTe;function fTe(e,t,i,n,s){const r=[].slice.call(arguments,1),a=r.length,o="function"==typeof r[a-1];if(!o&&!hTe())throw new Error("Callback required as last argument");if(!o){if(a<1)throw new Error("Too few arguments provided");return 1===a?(i=t,t=n=void 0):2!==a||t.getContext||(n=i,i=t,t=void 0),new Promise((function(s,r){try{const r=dTe.create(i,n);s(e(r,t,n))}catch(I2){r(I2)}}))}if(a<2)throw new Error("Too few arguments provided");2===a?(s=i,i=t,t=n=void 0):3===a&&(t.getContext&&void 0===s?(s=n,n=void 0):(s=n,n=i,i=t,t=void 0));try{const r=dTe.create(i,n);s(null,e(r,t,n))}catch(I2){s(I2)}}ODe.create=dTe.create,ODe.toCanvas=fTe.bind(null,gTe.render),ODe.toDataURL=fTe.bind(null,gTe.renderToDataURL),ODe.toString=fTe.bind(null,(function(e,t,i){return pTe.render(e,i)}));const mTe=TC("share",(()=>{const e=JC(),t=cF(),i=Lh({shareUrl_twitter:"",shareUrl_line:"",share_qrcode_url:"",share_url:"",qrCodeImg:""}),n=()=>{PC(".share-main .images .line-it-button").remove();let t=`<div class="line-it-button" data-lang="${{1:"ja",2:"en",3:"zh-CN",4:"zh-TW"}[e.get("dispLanguage")]}" data-type="share-b" data-ver="3" data-url="${i.share_url}" data-color="default" data-size="small" data-count="false" style="display: none;"></div>`;PC(".share-main .images").append(t);try{LineIt.loadButton()}catch(I2){}},s=e=>{try{ODe.toDataURL(e,((e,t)=>{i.qrCodeImg=t}))}catch(I2){}};return{shareState:i,createQrcode:s,initShareUrl:r=>{let a="";0==e.get("contentInfoDispFlg")&&(a="&detailFlg=0");let o=[];o[0]=OC.ActiBookOne_Flg,o[1]=e.get("readType");let l=e.get("contentNum"),A=1;PC("#book_main").length&&(A=t.getCurrentPagenos()[0]);let c=e.get("shareBaseUrl");"5"===e.get("readType")&&(c=e.get("contentDetailUrl")),-1==o[1]?c+="&":c+="?";let u=o.slice(0);u[2]=OC.readFrom_Twitter;let h=c+"cNo="+l+"&param="+btoa(unescape(encodeURIComponent(u.join("_"))))+"&siteNum="+e.get("siteNum")+"&siteTitle="+e.get("siteTitle")+"&pNo="+A+a;i.shareUrl_twitter=OC.share_twitter+encodeURIComponent(h);let d=o.slice(0);d[2]=OC.readFrom_LINE,i.shareUrl_line=c+"cNo="+l+"&param="+btoa(unescape(encodeURIComponent(d.join("_"))))+"&siteNum="+e.get("siteNum")+"&siteTitle="+encodeURIComponent(e.get("siteTitle"))+"&pNo="+A+a;let g=o.slice(0);g[2]=OC.readFrom_QRcode,i.share_qrcode_url=c+"cNo="+l+"&param="+btoa(unescape(encodeURIComponent(g.join("_"))))+"&siteNum="+e.get("siteNum")+"&siteTitle="+encodeURIComponent(e.get("siteTitle"))+"&pNo="+A+a,i.share_url=c+"cNo="+l+"&param="+btoa(unescape(encodeURIComponent(g.join("_"))))+"&siteNum="+e.get("siteNum")+"&siteTitle="+e.get("siteTitle")+"&pNo="+A+a,n(),s(i.share_qrcode_url)}}})),CTe=function(){const e=Su(!0),t=e.run((()=>zh({})));let i=[],n=[];const s=Vh({install(e){CC(s),s._a=e,e.provide(IC,s),e.config.globalProperties.$pinia=s,n.forEach((e=>i.push(e))),n=[]},use(e){return this._a?i.push(e):n.push(e),this},_p:i,
// it's actually undefined here
// @ts-expect-error
_a:null,_e:e,_s:new Map,state:t});return s}();const ITe=""+new URL("../images/cancel.png",import.meta.url).href,vTe=""+new URL("../images/painter-curve.png",import.meta.url).href,BTe=""+new URL("../images/painter-straightline.png",import.meta.url).href,yTe=""+new URL("../images/painter-clear.png",import.meta.url).href,bTe=""+new URL("../images/painter-color-select.png",import.meta.url).href;const ETe="undefined"!=typeof window&&"undefined"!=typeof document;"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const wTe=Object.prototype.toString,QTe=()=>{},_Te=STe();function STe(){var e,t;return ETe&&(null==(e=null==window?void 0:window.navigator)?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(null==(t=null==window?void 0:window.navigator)?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(null==window?void 0:window.navigator.userAgent))}function xTe(e){return Array.isArray(e)?e:[e]}const kTe=ETe?window:void 0;function DTe(e){var t;const i=td(e);return null!=(t=null==i?void 0:i.$el)?t:i}function FTe(...e){let t,i,n,s;if("string"==typeof e[0]||Array.isArray(e[0])?([i,n,s]=e,t=kTe):[t,i,n,s]=e,!t)return QTe;i=xTe(i),n=xTe(n);const r=[],a=()=>{r.forEach((e=>e())),r.length=0},o=Pp((()=>[DTe(t),td(s)]),(([e,t])=>{if(a(),!e)return;const s=(o=t,"[object Object]"===wTe.call(o)?{...t}:t);var o;r.push(...i.flatMap((t=>n.map((i=>((e,t,i,n)=>(e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)))(e,t,i,s))))))}),{immediate:!0,flush:"post"}),l=()=>{o(),a()};var A;return A=l,xu()&&ku(A),l}let TTe=!1;function MTe(e,t,i={}){const{window:n=kTe,ignore:s=[],capture:r=!0,detectIframe:a=!1}=i;if(!n)return QTe;_Te&&!TTe&&(TTe=!0,Array.from(n.document.body.children).forEach((e=>e.addEventListener("click",QTe))),n.document.documentElement.addEventListener("click",QTe));let o=!0;const l=e=>td(s).some((t=>{if("string"==typeof t)return Array.from(n.document.querySelectorAll(t)).some((t=>t===e.target||e.composedPath().includes(t)));{const i=DTe(t);return i&&(e.target===i||e.composedPath().includes(i))}}));const A=i=>{const n=DTe(e);null!=i.target&&(n instanceof Element||!function(e){const t=td(e);return t&&16===t.$.subTree.shapeFlag}(e)||!function(e,t){const i=td(e),n=i.$.subTree&&i.$.subTree.children;return!(null==n||!Array.isArray(n))&&n.some((e=>e.el===t.target||t.composedPath().includes(e.el)))}(e,i))&&n&&n!==i.target&&!i.composedPath().includes(n)&&(0===i.detail&&(o=!l(i)),o?t(i):o=!0)};let c=!1;const u=[FTe(n,"click",(e=>{c||(c=!0,setTimeout((()=>{c=!1}),0),A(e))}),{passive:!0,capture:r}),FTe(n,"pointerdown",(t=>{const i=DTe(e);o=!l(t)&&!(!i||t.composedPath().includes(i))}),{passive:!0}),a&&FTe(n,"blur",(i=>{setTimeout((()=>{var s;const r=DTe(e);"IFRAME"!==(null==(s=n.document.activeElement)?void 0:s.tagName)||(null==r?void 0:r.contains(n.document.activeElement))||t(i)}),0)}))].filter(Boolean);return()=>u.forEach((e=>e()))}const RTe=(e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i},NTe={id:"screenshot-main"},LTe={class:"btn-list"},UTe={__name:"screenshot",setup(e){const t=rI(),i=Wfe(),n=zh(null),s=cF();Eg((()=>{i.setScreenshotWH(),r()}));const r=()=>{PC("#screen-view").resizable({handles:"n, e, s, w, ne, se, sw, nw",
// 设置 8 个缩放角和边
containment:"parent",
// 限制调整大小在 .container 元素内
start:function(){s.isResizingElement=!0},stop:function(e,t){s.isResizingElement=!1,i.setLeftDistanceWithRect()}}),PC("#screen-view").draggable({containment:"parent",
// 限制在父元素内拖动
stop:function(e,t){i.setLeftDistanceWithRect()}})};return(e,s)=>{const r=Mg("el-button");return af(),cf("div",NTe,[ff("div",LTe,[mf(r,{color:"#428bca",onClick:ed(i).saveScreen},{default:Nd((()=>[vf(yu(ed(t).pc_toolbar__cut__save),1)])),_:1},8,["onClick"]),mf(r,{class:"clear",color:"#abbac3",onClick:s[0]||(s[0]=e=>ed(i).screenshotStatus=!1)},{default:Nd((()=>[vf(yu(ed(t).pc_toolbar__cut__cancel),1)])),_:1})]),ff("div",{id:"screen-view",ref_key:"screenViewRef",ref:n,class:"screen-view"},null,512)])}}},HTe=RTe(UTe,[["__scopeId","data-v-9a5f4430"]]),PTe={class:"thumbnail-box",id:"toc-content-box"},OTe={class:"scroll-content"},GTe=["data-idx"],KTe=["id"],qTe=["id"],YTe={__name:"toc",setup(e){const t=JC(),i=cF();let n=zh([]),s=zh(null);const r=t.spread_mode,a=t.hasCover;Eg((()=>{l(),i.setScrollRef(s),Qd((()=>{let e=t.get("first_height")/(t.get("first_width")/75);PC(".toc-page-line").height(e),i.binkSelectedAndPosition()}))}));const o=(e,t)=>{var i,s;if(e){let e=n.value[t.getAttribute("data-idx")];PC(t).children(".img0").attr("src")||PC(t).children(".img0").attr("src",(null==(i=e[0])?void 0:i.src)||""),PC(t).children(".img1").attr("src")||PC(t).children(".img1").attr("src",(null==(s=e[1])?void 0:s.src)||"")}},l=()=>{let e=t.totalPageNo,i=[];a&&i.push({src:"",pageno:""});for(let s=1;s<=e;s++){let a=t.url_Prefix,o=t.url_Suffix,l=OC.thumbnailPath,A=t.imgType||OC.pageImgType,c={src:encodeURI(a+l+s+A+o),pageno:s};"single"===r?n.value.push([c]):i.length%2==0?(i=[],i.push(c),s===e&&n.value.push(i)):(i.push(c),"rtl"===t.get("direction")&&i.reverse(),n.value.push(i))}},A=e=>{let t=e.target.closest(".toc-page-line");if(t){PC(".image-border").removeClass("image-border right_border left_border");let e=t.getAttribute("data-idx");n.value[e].map((e=>{e.pageno&&PC("#pageno_"+e.pageno).addClass("image-border")}));let s=n.value[e][0].pageno||n.value[e][1].pageno;i.gotoPageByTarget("toPageno",s,"turn_thumbnail")}};return(e,t)=>{const i=Mg("el-scrollbar"),a=Lg("visibility");return af(),cf("div",PTe,[ff("div",OTe,[mf(i,{height:"100%",ref_key:"scrollRef",ref:s},{default:Nd((()=>[ff("div",{onClick:A,class:"content-box"},[(af(!0),cf(Zp,null,Pg(ed(n),((e,t)=>{var i,n;return Ld((af(),cf("div",{class:"toc-page-line","data-idx":t},[ff("img",{class:"img img0",id:`pageno_${null==(i=e[0])?void 0:i.pageno}`},null,8,KTe),"double"===ed(r)?(af(),cf("img",{key:0,class:"img img1",id:`pageno_${null==(n=e[1])?void 0:n.pageno}`},null,8,qTe)):Bf("",!0)],8,GTe)),[[a,o]])})),256))])])),_:1},512)])])}}},VTe=RTe(YTe,[["__scopeId","data-v-de30d75e"]]),WTe={class:"thumbnail-box catelog"},jTe={class:"scroll-content"},JTe=["pageno"],zTe={class:"target"},XTe={__name:"catalog",setup(e){const t=cF(),i=JC(),n=bme();let s=zh({});Eg((()=>{s.value=i.get("chapterJsons")}));const r=e=>{let i=PC(e.target).closest(".page-line").attr("pageno");i&&t.gotoPageByTarget("toPageno",i,"turn_content")};return(e,t)=>{const i=Mg("el-scrollbar");return af(),cf("div",WTe,[ff("div",jTe,[mf(i,{height:"100%"},{default:Nd((()=>[ff("div",{onClick:r,class:"content-box"},[(af(!0),cf(Zp,null,Pg(ed(s),((e,t)=>(af(),cf("div",{class:"page-line",pageno:e.target,key:t},[ff("span",{class:"title",style:cu({paddingLeft:13*e.level+"px",fontWeight:0==e.level?"bold":"normal"})},yu(e.title),5),ff("span",zTe,yu(ed(n).targetNum(e)),1)],8,JTe)))),128))])])),_:1})])])}}},$Te=RTe(XTe,[["__scopeId","data-v-d2a4413f"]]),ZTe={class:"thumbnail-box memo"},eMe={class:"scroll-content"},tMe=["data-idx"],iMe={class:"title"},nMe={class:"target"},sMe=RTe({__name:"memoList",setup(e){const t=cF();let i=uAe();Eg((()=>{i.updateMemoDataList()}));const n=e=>{let n=e.target.getAttribute("data-idx"),s=i.memoState.memoDataList[n],r=s.pageNum,a=s.id;r&&a&&(t.gotoPageByTarget("toPageno",r,"turn_taglist"),setTimeout((()=>{i.isShowEditBox(a,!1)}),800))},s=qf((()=>e=>{let i=t.updateTurnCurrPage(e);return i?i.length>15&&(i=i.slice(0,15)+"..."):i="",i}));return(e,t)=>{const r=Mg("el-scrollbar");return af(),cf("div",ZTe,[ff("div",eMe,[mf(r,{height:"100%"},{default:Nd((()=>[ff("div",{onClick:n,class:"content-box"},[(af(!0),cf(Zp,null,Pg(ed(i).memoState.memoDataList,((e,t)=>(af(),cf("div",{class:"page-line","data-idx":t,key:t},[ff("span",iMe,yu(e.text),1),ff("span",nMe,yu(s.value(e.pageNum)),1)],8,tMe)))),128))])])),_:1})])])}}},[["__scopeId","data-v-9d50d3e1"]]),rMe={class:"acti-sidewrap-inner"},aMe={class:"acti-sidebar_toggle_button noselect"},oMe=RTe({__name:"sidebar",setup(e){const t=bme(),i=JC(),n=uAe(),s=rI();Eg((()=>{})),Pp((()=>t.commonState.pcIsUnfold),(e=>{r(e)}));const r=e=>{let i=PC("div.acti-sideblock");e?i.animate({marginLeft:-i.width()},(function(){i.removeClass("sidebar-unfold")})):(i.addClass("sidebar-unfold"),i.animate({marginLeft:0}),t.commonState.pcSelButtonID||(t.commonState.pcSelButtonID="acti-sidebar-toc-button"))},a=function(e){t.commonState.pcSelButtonID=e};return(e,r)=>(af(),cf("div",{class:pu(["acti-sideblock",{"sidebar-unfold":ed(t).commonState.pcIsUnfold}])},[ff("div",{class:"acti-opener noselect",onClick:r[0]||(r[0]=e=>{ed(t).commonState.pcIsUnfold=!ed(t).commonState.pcIsUnfold})},r[4]||(r[4]=[ff("div",{class:"acti-opener_button"},[ff("i",{class:"xiconbasic-lists"})],-1),ff("div",{class:"acti-opener_shadow"},null,-1)])),ff("div",rMe,[ff("div",aMe,[ed(i).get("chapterJsons").length>0||ed(n).memoState.memoDataList.length>0?(af(),cf("div",{key:0,id:"acti-sidebar-toc-button",class:pu(["title-text",{toggle_button_selected:"acti-sidebar-toc-button"==ed(t).commonState.pcSelButtonID}]),onClick:r[1]||(r[1]=e=>a("acti-sidebar-toc-button"))},yu(ed(s).pc_sidewrap__thumbnail__text),3)):Bf("",!0),ed(i).get("chapterJsons").length>0?(af(),cf("div",{key:1,id:"acti-sidebar-hamburger-button",class:pu(["title-text",{toggle_button_selected:"acti-sidebar-hamburger-button"==ed(t).commonState.pcSelButtonID}]),onClick:r[2]||(r[2]=e=>a("acti-sidebar-hamburger-button"))},yu(ed(s).pc_sidewrap__contents__text),3)):Bf("",!0),ed(n).memoState.memoDataList.length>0?(af(),cf("div",{key:2,id:"acti-sidebar-mome-button",class:pu(["title-text",{toggle_button_selected:"acti-sidebar-mome-button"==ed(t).commonState.pcSelButtonID}]),onClick:r[3]||(r[3]=e=>a("acti-sidebar-mome-button"))},yu(ed(s).pc_sidewrap__mome__text),3)):Bf("",!0)]),Ld(mf(VTe,null,null,512),[[ym,"acti-sidebar-toc-button"===ed(t).commonState.pcSelButtonID]]),Ld(mf($Te,null,null,512),[[ym,"acti-sidebar-hamburger-button"===ed(t).commonState.pcSelButtonID]]),Ld(mf(sMe,null,null,512),[[ym,"acti-sidebar-mome-button"===ed(t).commonState.pcSelButtonID]])]),r[5]||(r[5]=ff("div",{class:"right_border"},null,-1)),r[6]||(r[6]=ff("div",{class:"top_border"},null,-1)),r[7]||(r[7]=ff("div",{class:"bottom_border"},null,-1))],2))}},[["__scopeId","data-v-c00d27e2"]]),lMe={class:"memo-box"},AMe={class:"title"},cMe={class:"memo-list"},uMe=["onClick"],hMe={class:"color-name"},dMe=RTe({__name:"create-memo",setup(e){const t=uAe(),i=rI(),n=bme();Eg((()=>{t.memoState.selectedColorIdx=-1}));const s=()=>{n.commonState.pcSelButtonID="acti-sidebar-mome-button",n.commonState.pcIsUnfold=!1,t.memoState.isShowDialog=!1};return(e,n)=>{const r=Mg("el-button");return af(),cf("div",lMe,[ff("div",AMe,yu(ed(i).memo_select_template_title_text),1),ff("div",cMe,[(af(!0),cf(Zp,null,Pg(Object.values(ed(t).memoState.memoColorList),(e=>(af(),cf("div",{class:pu(["memo-item",{"memo-item-active":ed(t).memoState.selectedColorIdx===e.colorName}])},[ff("div",{class:"memo-color",onClick:i=>ed(t).memoState.selectedColorIdx=e.colorName},[ff("div",{class:"w30",style:cu({backgroundColor:e.bgColor})},null,4),n[0]||(n[0]=ff("div",{class:"white"},null,-1))],8,uMe),ff("div",hMe,yu(e.name),1)],2)))),256))]),Ld(ff("div",{class:"desc"},yu(ed(i).memo_select_template_option_selected_text),513),[[ym,-1!==ed(t).memoState.selectedColorIdx]]),ed(t).memoState.memoDataList.length>0?(af(),uf(r,{key:0,class:"title btn",onClick:s},{default:Nd((()=>[vf(yu(ed(i).memo_select_template_option_selected_button),1)])),_:1})):Bf("",!0)])}}},[["__scopeId","data-v-dd175abf"]]),gMe={class:"print-main"},pMe={class:"title"},fMe={key:0,class:"radio-box"},mMe={class:"print-page-type"},CMe=["onClick"],IMe=["src"],vMe={class:"text"},BMe=RTe({__name:"print",setup(e){const t=rI(),i=JC(),n=cF(),s=i.get("spread_mode"),r=i.get("hasCover");let a=Lh([{type:"single",img:"print-single-page.png",text:t.pc_bottom_Choice_print_current},{type:"left",img:"print-left-page.png",text:t.pc_bottom_Choice_print_left},{type:"right",img:"print-right-page.png",text:t.pc_bottom_Choice_print_right},{type:"double",img:"print-double-page.png",text:t.pc_bottom_Choice_print_double},{type:"all",img:"print-all-page.png",text:t.pc_bottom_Choice_print_whole}]);const o=qf((()=>{let e=[],t=n.getCurrentPagenos();if(i.tmpInfo,"double"===i.get("spread_mode"))if(1===t.length){"R"===n.isPositionByPageno(t[0])?e.push("right"):e.push("left")}else e.push("left"),e.push("right"),e.push("double");else e.push("single");return e.push("all"),a.filter((t=>e.includes(t.type)))}));let l=zh("double");const A=e=>{let t=(e=>{let t=[],a="",o=n.getCurrentPagenos();"left"===e&&(1==o.length||"L"==n.isPositionByPageno(o[0])?t.push(o[0]):t.push(o[1]),a+='<div class="page"><div class="img-box"><img data-src="'+n.getPageImgByPageno(t[0])+'"></div></div>');"right"===e&&(1===o.length||"R"===n.isPositionByPageno(o[0])?t.push(o[0]):t.push(o[1]),a+='<div class="page"><div class="img-box"><img data-src="'+n.getPageImgByPageno(t[0])+'"></div></div>');if("double"===e){"L"===n.isPositionByPageno(o[0])?(t.push(o[0]),t.push(o[1])):(t.push(o[1]),t.push(o[0]));let e=n.getPageImgByPageno(t[0]),i=n.getPageImgByPageno(t[1]);a+='<div class="page">',"single"===l.value?(a+='<div class="img-box"><img data-src="'+e+'"></div>',a+='<div class="img-box"><img data-src="'+i+'"></div>'):"double"===l.value&&(a+='<div class="leftPage img-box"><img data-src="'+e+'"></div>',a+='<div class="rightPage img-box"><img data-src="'+i+'"></div>'),a+="</div>"}"single"===e&&(t.push(o[0]),a+='<div class="page"><div class="img-box"><img data-src="'+n.getPageImgByPageno(t[0])+'"></div></div>');if("all"===e){let e=parseInt(i.get("totalPageNo"));if("single"===s||"single"===l.value)for(let t=1;t<=e;t++)a+='<div class="page"><div class="img-box"><img data-src="'+n.getPageImgByPageno(t)+'"></div></div>';else{let t=1;for(r&&(t=0);t<=e;t++){let e="",i="";"L"===n.isPositionByPageno(t)?(e=n.getPageImgByPageno(t),i=n.getPageImgByPageno(t+1)):(e=n.getPageImgByPageno(t+1),i=n.getPageImgByPageno(t)),t++,a+='<div class="page">',a+=e?'<div class="leftPage img-box"><img data-src="'+e+'"></div>':'<div class="leftPage img-box"></div>',a+=i?'<div class="rightPage img-box"><img data-src="'+i+'"></div>':'<div class="rightPage img-box"></div>',a+="</div>"}}}return a})(e),a=window.open("","_blank");a.document.body.innerHTML=t;let o=0,A="",h="";PC("body img",a.document).each((function(){let t=PC(this).attr("data-src");this.onload=function(){let t="print_"+o;if(PC(this).attr("id",t),A+=c(this.width,this.height,t,e),h+=u(this.width,this.height,t,e),o++,o===PC("body img",a.document).length){let e="<style>";/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)?e+="body{font-size:0;}.page{width:100%;height:100%;page-break-after:always; display: inline-block;}.page .img-box{height:100%;width:100%; }.img-box img{max-width:100%;max-height:100%;}.leftPage.img-box{width:50%;display:inline-block;}.rightPage.img-box{width:50%;display:inline-block;}.leftPage.img-box img{float:right;}.rightPage.img-box img{float:left;}":window.ActiveXObject||"ActiveXObject"in window?(e+="@page{size: auto; margin: 0;} body{font-size: 0;} .page{width: 100%; height: 100%; page-break-after: always;} .page .img-box{margin-top: 35px; margin-bottom: 35px; height: calc(100% - 70px); width: 100%; float: left;} .img-box img{display: none; max-width: 100%; max-height: 100%;} .leftPage.img-box{width: 50%; display: inline-block;} .rightPage.img-box{width: 50%; display: inline-block;} .leftPage.img-box img{float: right;} .rightPage.img-box img{float: left;}",e+="@media print and (max-aspect-ratio: 1/1) {"+A+"}",e+="@media print and (min-aspect-ratio: 1/1) {"+h+"}"):(e+="@page{size: auto; margin: 0;} body{font-size: 0;} .page{width: 100%; height: 100%; page-break-after: always;} .page .img-box{margin-top: 10px; height: calc(100% - 20px); width: 100%; float: left;} .img-box img{display: none; max-width: 100%; max-height: 100%;} .leftPage.img-box{width: 50%; display: inline-block;} .rightPage.img-box{width: 50%; display: inline-block;} .leftPage.img-box img{float: right;} .rightPage.img-box img{float: left;}",e+="@media print and (max-aspect-ratio: 1/1) {"+A+"}",e+="@media print and (min-aspect-ratio: 1/1) {"+h+"}"),e+="</style>",PC(a.document.body).append(e);try{setTimeout((function(){a.focus();try{a.document.execCommand("print",!1,null)||a.print()}catch(e){a.print()}a.close()}),10)}catch(i){}}},this.src=t}))},c=(e,t,i,n)=>{let r,a,o,l,A="";return a=210,r=297,("double"===n||"all"===n&&"double"===s)&&(a/=2),e/t>=a/r?(l=a,o=a/e*t):(o=r,l=r/t*e),A+=l-a>o-r?" #"+i+" {width: 100%; height: auto; display: block;} ":" #"+i+" {height: 100%; width: auto; display: block;} ",A},u=(e,t,i,n)=>{let r,a,o,A,c="";return a=297,r=210,("double"===n||"all"===n&&"double"===s)&&(a/=2),e/t>=a/r?(A=a,o=a/e*t):(o=r,A=r/t*e),A-a>o-r?"single"===l.value?c+=" #"+i+" {width: 50%; height: auto; display: block;} ":"double"===l.value&&(c+=" #"+i+" {width: 100%; height: auto; display: block;} "):c+=" #"+i+" {height: 100%; width: auto; display: block;} ",c};return Eg((()=>{})),(e,n)=>{const s=Mg("el-radio"),r=Mg("el-radio-group");return af(),cf("div",gMe,[ff("div",pMe,yu(ed(t).pc_print_title_text),1),"double"===ed(i).get("spread_mode")?(af(),cf("div",fMe,[mf(r,{modelValue:ed(l),"onUpdate:modelValue":n[0]||(n[0]=e=>Jh(l)?l.value=e:l=e)},{default:Nd((()=>[mf(s,{value:"single","text-color":"#fff"},{default:Nd((()=>[vf(yu(ed(t).pc_print_single_option),1)])),_:1}),mf(s,{value:"double",label:2},{default:Nd((()=>[vf(yu(ed(t).pc_ptint_double_option),1)])),_:1})])),_:1},8,["modelValue"])])):Bf("",!0),ff("div",mMe,[(af(!0),cf(Zp,null,Pg(o.value,(e=>(af(),cf("div",{class:"page-type-item",onClick:t=>A(e.type)},[ff("img",{class:"img",src:`./images/${e.img}`,alt:""},null,8,IMe),ff("text",vMe,yu(e.text),1)],8,CMe)))),256))])])}}},[["__scopeId","data-v-587005f8"]]),yMe=""+new URL("../images/twitter-log.png",import.meta.url).href,bMe={key:0,class:"share-main"},EMe={class:"images"},wMe=["title"],QMe={class:"share_url"},_Me=["value"],SMe={key:0,class:"qr-code-box",id:"qrcode"},xMe=["src","title"],kMe={key:1,id:"acti-mobile-share-content",class:"content",style:{"z-index":"5646",display:"block"}},DMe={class:"acti-mobile-share-content-title"},FMe={class:"acti-mobile-share-content-buttons"},TMe={"data-icon":"true",id:"share_line_div_sd_id"},MMe=["data-url"],RMe={class:"acti-mobile-share-content-QR-sd"},NMe=["title"],LMe=["src"],UMe={class:"acti-mobile-share-content-url-title",style:{display:"none"}},HMe={key:2,id:"embed_share_dialog",style:{"z-index":"5260",display:"block"}},PMe={class:"share_title"},OMe={class:"share_buttons"},GMe=["title"],KMe={"data-icon":"true",id:"share_line_div_id",class:"share_button"},qMe=["data-url"],YMe={"data-clipboard-text":"",class:"copy_button loaded"},VMe=["title"],WMe=["src","title"],jMe={__name:"share",props:{from:{type:String,default:"pc"}},setup(e){const t=bme(),i=rI(),n=JC(),s=mTe(),r=e;Eg((()=>{s.initShareUrl()}));const a=e=>{window.open(s.shareState.shareUrl_twitter,"twitter","width=550,height=420,location=yes,resizable=yes,toolbar=no,menubar=no,scrollbars=yes,status=no")},o=e=>{e&&("desktop"!==mF.type&&(PC(".acti-mobile-share-content-url-title").css({opacity:0,display:"block"}),PC(".acti-mobile-share-content-url-title").animate({opacity:1},1e3)),PC(".input-url").select(),navigator.clipboard.writeText(e))},l=qf((()=>"5"!==n.get("readType")));return(e,n)=>(af(),cf(Zp,null,["pc"===r.from?(af(),cf("div",bMe,[ff("div",EMe,[ff("img",{class:"img",src:yMe,onClick:n[0]||(n[0]=e=>a()),title:ed(i).pc_share_dialog__twitter_title__text},null,8,wMe)]),ff("div",QMe,[ff("input",{class:"input-url",readonly:"",value:ed(s).shareState.share_url},null,8,_Me)]),ff("div",{class:"copy-btn",onClick:n[1]||(n[1]=e=>o(ed(s).shareState.share_url))},[ff("text",null,yu(ed(i).pc_share_dialog__copy_button__text),1)]),l.value?(af(),cf("div",SMe,[ff("img",{src:ed(s).shareState.qrCodeImg,title:ed(s).shareState.share_url},null,8,xMe)])):Bf("",!0)])):Bf("",!0),"sd"===r.from?(af(),cf("div",kMe,[ff("div",null,[ff("div",DMe,[vf(yu(ed(i).pc_right_sidebar__share__text)+" ",1),ff("div",{class:"close_button",onClick:n[2]||(n[2]=e=>ed(t).commonState.shareDialogVisible=!1)},n[8]||(n[8]=[ff("i",{"aria-hidden":"true",class:"fa fa-times"},null,-1)]))]),ff("div",FMe,[ff("div",{class:"share_button_twitter",onClick:n[3]||(n[3]=e=>a())},n[9]||(n[9]=[ff("span",{class:"twitter-log"},null,-1)])),ff("div",TMe,[ff("div",{class:"line-it-button","data-lang":"ja","data-type":"share-b","data-env":"REAL","data-url":ed(s).shareState.shareUrl_line,"data-color":"default","data-ver":"3",style:{display:"none",width:"40px",height:"40px"}},null,8,MMe)])]),ff("div",RMe,[ff("div",{id:"QRcode_img_mobile_sd",class:"QRcode_img_mobile_sd",title:ed(s).shareState.share_url},[ff("img",{alt:"Scan me!",src:ed(s).shareState.qrCodeImg,style:{display:"block",width:"100%"}},null,8,LMe)],8,NMe)]),ff("div",{class:"acti-mobile-share-content-url-button loaded",onClick:n[4]||(n[4]=e=>o(ed(s).shareState.share_url))},yu(ed(i).pc_embed_share_dialog__copy_button__text),1),ff("div",UMe,yu(ed(i).pad_share_content__content_url_title__text),1)])])):Bf("",!0),"embedFlg"===r.from?(af(),cf("div",HMe,[ff("div",PMe,[vf(yu(ed(i).pc_share_dialog__title__text)+" ",1),ff("div",{class:"close_button","data-ember-action":"","data-ember-action-350":"350",onClick:n[5]||(n[5]=e=>ed(t).commonState.shareEmbedFlgVisible=!1)},n[10]||(n[10]=[ff("i",{"aria-hidden":"true",class:"fa fa-times"},null,-1)]))]),ff("div",OMe,[ff("div",{title:ed(i).pc_share_dialog__twitter_title__text,class:"share_button share_button_twitter",onClick:n[6]||(n[6]=e=>a())},n[11]||(n[11]=[ff("span",{class:"twitter-log"},null,-1)]),8,GMe),ff("div",KMe,[ff("div",{class:"line-it-button","data-lang":"ja","data-type":"share-b","data-env":"REAL","data-url":ed(s).shareState.shareUrl_line,"data-color":"default","data-ver":"3",style:{display:"none",width:"40px",height:"40px"}},null,8,qMe)]),ff("div",{class:"share_url",onClick:n[7]||(n[7]=e=>o(ed(s).shareState.share_url))},[ff("div",YMe,yu(ed(i).pc_embed_share_dialog__copy_button__text),1)])]),ff("div",{class:"share_QRcode QRcode_img",title:ed(s).shareState.qrCodeImg,style:{padding:"0"}},[ff("img",{alt:"Scan me!",src:ed(s).shareState.qrCodeImg,style:{display:"block",width:"100%",height:"100%"},title:ed(s).shareState.share_url},null,8,WMe)],8,VMe)])):Bf("",!0)],64))}},JMe=RTe(jMe,[["__scopeId","data-v-5f819808"]]),zMe=function(e){PC("#index_main.phone > div.pack_book_div").css("z-index",e+10),PC("div.audioLink").css("z-index",e+5200),PC("#sidebar_main, #toolbar_main, #toolbar_main > div, #sidebar_main > div, #acti-header-container, #acti-mobile-toc-content, #acti-mobile-menu-button, #acti-mobile-search-content, #acti-mobile-hamburger-content, #acti-mobile-share-content, #acti-mobile-painter-content, #acti-mobile-memo-content").css("z-index",e+200),PC(".acti-sideblock").css("z-index",e+2e3),PC("div.memo-create-title-box").css("z-index",e+100),PC("div.tooltips_left, div.tooltips_top").css("z-index",e+5400),PC("#load_pdf_progress").css("z-index",e+5450),PC("div.covering_layer").css("z-index",e+5500)},XMe=["id"],$Me={class:"memo-content"},ZMe={class:"memo-input-box"},eRe={class:"memo-link-box"},tRe={class:"link-title-box"},iRe={class:"url-title-text"},nRe={class:"link-content-box"},sRe={class:"link-action-box"},rRe={class:"left-link-box"},aRe={class:"select-text"},oRe={class:"page-text"},lRe={class:"link-detail"},ARe={key:0,class:"zoom-icon"},cRe={__name:"memo-list",props:{memo:Object},setup(e){var t,i;let n=uAe();const s=rI(),r=JC(),a=bme(),o=cF();let l=zh(!1);const A=e,c=Lh({linkType:"",linkDetail:"",linkDateText:"",linkUrl:"",linkPageno:""});c.linkType=null==(t=A.memo.linkType)?void 0:t.toString(),c.linkDetail=null==(i=A.memo.linkDetail)?void 0:i.toString(),"1"===c.linkType?c.linkPageno=A.memo.linkDetail:c.linkUrl=A.memo.linkDetail;const u=()=>{o.turnDisable=!0,setTimeout((()=>{o.turnDisable=!1}),300)},h=()=>{eAe.confirm(s.memo_cleanLinkInfo_text,{closeOnClickModal:!1,confirmButtonText:s.memo_button_yes_text,cancelButtonText:s.memo_button_no_text}).then((()=>{A.memo.linkType="1",A.memo.linkDetail="",c.linkType="1",c.linkDetail="",c.linkUrl="",c.linkPageno=""})).catch((()=>{}))};Pp((()=>n.memoState.memoSaveCount),(()=>{let e=n.memoState.sdEditMemoObj.linkDateText;if(n.memoState.sdEditMemoObj.id!==A.memo.id)return;2===n.memoState.showEditContentTextarea?(n.memoState.sdEditMemoObj.linkDetail=e,c.linkUrl=e):(c.text=e,n.memoState.sdEditMemoObj.text=e);let t=o.getStorageDataByPageno(n.memoState.sdEditMemoObj.pageno),i=t.memo.memoData.find((e=>e.id===n.memoState.sdEditMemoObj.id));i.linkDetail=n.memoState.sdEditMemoObj.linkDetail,i.linkType=n.memoState.sdEditMemoObj.linkType,i.text=n.memoState.sdEditMemoObj.text,o.setStorageDataByPageno(n.memoState.sdEditMemoObj.pageno,t),n.memoState.showEditContentTextarea=!1,n.updateMemoDataList()})),Pp((()=>c.linkType),(e=>{"1"===e?(c.linkDetail=c.linkPageno,A.memo.linkDetail=c.linkPageno,f(c.linkPageno)):c.linkDetail=c.linkUrl,A.memo.linkType=e,d()})),Pp((()=>c.linkPageno),(e=>{A.memo.linkDetail=e,c.linkDetail=e,d(),f(e)})),Pp((()=>c.linkUrl),(e=>{A.memo.linkDetail=e,c.linkDetail=e,d()}));const d=()=>{let e=o.getStorageDataByPageno(A.memo.pageno),t=e.memo.memoData.find((e=>e.id===A.memo.id));t.linkType=c.linkType,t.linkDetail="1"===c.linkType?c.linkPageno:c.linkUrl,t.text=A.memo.text,o.setStorageDataByPageno(A.memo.pageno,e),n.updateMemoDataList()},g=()=>{n.setMemoZindex(A.memo.id)},p=e=>{"desktop"!==mF.type&&(n.memoState.showEditContentTextarea=e,n.memoState.sdEditMemoObj=A.memo,n.memoState.sdEditMemoObj.linkDateText=1===e?A.memo.text:A.memo.linkDetail)},f=e=>{let t=r.url_Prefix,i=r.url_Suffix,n=OC.thumbnailPath,s=r.imgType||OC.pageImgType,a=encodeURI(t+n+e+s+i);PC(`#${A.memo.id} .toc-img`).css({backgroundImage:`url(${a})`})};Eg((()=>{"desktop"===mF.type&&m(),1==c.linkType&&f(c.linkPageno)})),Pp((()=>A.memo.linkType),(()=>{A.memo.linkDetail=""})),qf((()=>(e,t)=>"l"===t?e/PC("#book_main").width()*100+"%":"t"===t?e/PC("#book_main").height()*100+"%":void 0));const m=()=>{PC("#"+A.memo.id+".memo-content-box").resizable({aspectRatio:!1,
// 保持宽高比
minWidth:260,
// 最小宽度
minHeight:300,
// 最小高度
maxWidth:420,
// 最大宽度
maxHeight:450,
// 最大高度
handle:".resize-handle",containment:"#book_main",
// 限制在容器内拖拽
start:function(e,t){o.isResizingElement=!0,PC(`#${e.target.id}.memo-content-box`).removeClass("memo-close-transition"),PC(`#${e.target.id}.memo-content-box`).removeClass("memo-open-transition")},stop:function(e,t){o.isResizingElement=!1;let i=t.size.width,s=t.size.height;n.resetWH(e.target.id,i,s)}})};return(t,i)=>{const r=Mg("el-input"),f=Mg("el-radio"),m=Mg("el-radio-group"),C=Mg("el-option"),I=Mg("el-select");return af(),cf("div",{onMouseenter:i[13]||(i[13]=e=>ed(o).turnDisable=!0),onMouseleave:i[14]||(i[14]=e=>ed(o).turnDisable=!1),onClick:g,class:pu(["memo-content-box aaa",!1===A.memo.foldStatus?"memo-close-transition memo-content-box-memo-close":"memo-open-transition"]),id:A.memo.id,style:cu({width:A.memo.width+"px",height:A.memo.height+"px",left:100*A.memo.left+"%",top:100*A.memo.top+"%",zIndex:A.memo.layer+A.memo.pageno+ed(a).toolBaseIndex.memo,position:"desktop"!==ed(mF).type&&A.memo.foldStatus?"fixed":"absolute"})},[ff("div",{class:pu(["memo-title",{handle2:"desktop"===ed(mF).type||"mobile"===ed(mF).type&&!1===A.memo.foldStatus}]),onTouchstart:u,onDblclick:i[3]||(i[3]=AC((()=>{}),["stop"])),style:cu({backgroundColor:ed(n).memoState.memoColorList[A.memo.color].bgColor})},[ff("div",{class:pu(["left-img",{"memo-left-img-h45":!1===A.memo.foldStatus}]),style:cu({backgroundImage:`url(./images/memo-${e.memo.color}-icon.png)`}),onClick:i[0]||(i[0]=e=>"desktop"!==ed(mF).type?null:ed(n).isShowEditBox(A.memo.id,A.memo.foldStatus)),onTouchend:i[1]||(i[1]=e=>"desktop"!==ed(mF).type?ed(n).isShowEditBox(A.memo.id,A.memo.foldStatus,e):null)},null,38),Ld(ff("div",{class:"text"},yu(ed(s).pc_toolbar__memo__text),513),[[ym,A.memo.foldStatus]]),Ld(ff("div",{class:"right-img",onClick:i[2]||(i[2]=t=>ed(n).delMemo(e.memo))},null,512),[[ym,A.memo.foldStatus]])],38),Ld(ff("div",$Me,[ff("div",ZMe,[mf(r,{class:"memo-input",modelValue:A.memo.text,"onUpdate:modelValue":i[4]||(i[4]=e=>A.memo.text=e),onKeydown:AC((()=>{}),["stop"]),onFocus:i[5]||(i[5]=e=>p(1)),onBlur:d,maxlength:"200",placeholder:ed(s).memo_template_control_text_placeholder_text,type:"textarea"},null,8,["modelValue","placeholder"])]),ff("div",eRe,[ff("div",tRe,[ff("div",iRe,yu(ed(s).memo_template_control_unfold_text),1),!A.memo.linkDetail||ed(l)?(af(),cf("div",{key:0,class:pu(["icon",{"icon-show":ed(l)}]),onClick:i[6]||(i[6]=AC((e=>Jh(l)?l.value=!ed(l):l=!ed(l)),["stop"]))},null,2)):Bf("",!0),Ld(ff("div",{class:"del-link-icon",onClick:h},null,512),[[ym,ed(l)]]),Ld(ff("div",{class:"right-text",onClick:i[7]||(i[7]=e=>Jh(l)?l.value=!ed(l):l=!ed(l))},yu(ed(s).memo_template_control_button_edit_text),513),[[ym,!ed(l)&&A.memo.linkDetail]])]),Ld(ff("div",nRe,[mf(m,{modelValue:c.linkType,"onUpdate:modelValue":i[8]||(i[8]=e=>c.linkType=e)},{default:Nd((()=>[mf(f,{value:"1"},{default:Nd((()=>[vf(yu(ed(s).memo_template_control_type_radio_1_text),1)])),_:1}),mf(f,{value:"2"},{default:Nd((()=>[vf(yu(ed(s).memo_template_control_type_radio_2_text),1)])),_:1})])),_:1},8,["modelValue"]),Ld(ff("div",sRe,[ff("div",rRe,[ff("div",aRe,yu(ed(s).memo_template_control_inlink_title_1_text),1),mf(I,{modelValue:c.linkPageno,"onUpdate:modelValue":i[9]||(i[9]=e=>c.linkPageno=e),placeholder:"",size:"large",class:"select-box"},{default:Nd((()=>[(af(!0),cf(Zp,null,Pg(ed(n).memoState.pagelinkList,(e=>(af(),uf(C,{key:e.target,label:e.show?e.show:" ",value:e.target},null,8,["label","value"])))),128))])),_:1},8,["modelValue"]),ff("div",oRe,yu(ed(s).memo_template_control_inlink_title_2_text),1)]),i[15]||(i[15]=ff("div",{class:"right-img-box"},[ff("div",{class:"toc-img"})],-1))],512),[[ym,"1"===c.linkType]]),Ld(ff("div",lRe,[mf(r,{modelValue:c.linkUrl,"onUpdate:modelValue":i[10]||(i[10]=e=>c.linkUrl=e),onKeydown:AC((()=>{}),["stop"]),type:"textarea",placeholder:ed(s).memo_template_control_outlink_placeholder_text,rows:4,onFocus:i[11]||(i[11]=e=>p(2))},null,8,["modelValue","placeholder"])],512),[[ym,"2"===c.linkType]])],512),[[ym,ed(l)]]),c.linkDetail&&!ed(l)?(af(),cf("div",{key:0,class:"memo-link-url",onClick:i[12]||(i[12]=AC((e=>ed(n).jumpUrl(A.memo)),["stop"]))},yu("1"===c.linkType?ed(s).getMemoInlinkContentJointText(c.linkPageno):c.linkUrl),1)):Bf("",!0)]),"desktop"===ed(mF).type?(af(),cf("div",ARe)):Bf("",!0)],512),[[ym,A.memo.foldStatus]])],46,XMe)}}},uRe=RTe(cRe,[["__scopeId","data-v-f0e9fad6"]]),hRe={__name:"index",setup(e){let t=1,i=JC(),n=RF(),s=parseInt(i.totalPageNo),r=cF(),a=uAe();const o=bme(),l=cAe(),A=uF(),c=PDe();Eg((()=>{c.sendKinesisDetailLog("open"),o.setButtonShowOrHideByPorts(),r.initBook(),zMe(s),A.loadPageLoadObj(),PC(window).resize((()=>{r.window_resize()})),o.bindLinkClickEvent(),Qd((()=>{window.addEventListener("blur",c.windowBlur),window.addEventListener("focus",c.windowFocus);let e=i.get("keyword");e&&1==i.get("hasText")&&(PC('input.searchRadio[name="searchRadio"][value="2"]').prop("checked",!0),n.searchKeyword=e,n.searchText(),o.commonState.sdIsShowMenu=!0,o.commonState.sdMenuType="search"),"desktop"===device.type?"1"!=i.get("embed_flg")&&PC("#book_main").focus():u(),setTimeout((()=>{window.resetPdfViewerWH()}),1500)}))}));const u=()=>{let e,n=i.get("zoomScale_max");const s=document.getElementById("book_main"),a=new oF(s);a.get("pinch").set({enable:!0}),a.on("pinchstart",(function(t){e=i.get("currentZoomScale")})),a.on("pinchmove",(function(i){var s=i.scale-(t||1);if("painter"===o.commonState.sdMenuType||!i.additionalEvent||1===e&&s<0||e===n&&s>0)return!1;e+=s>0?s:1.5*s,e<1?e=1:e>n&&(e=n),r.pdfViewZoomFun(i,e),t=i.scale})),a.on("pinchend",(function(e){var n=i.get("currentZoomScale");r.pdfViewZoomFun(e,n),t=0,l.resetPainterCanvasScale()})),a.on("doubletap",(function(e){r.doubleClick(e)}))},h=e=>{"ArrowLeft"===e.key&&r.gotoPageByTarget("previous"),"ArrowRight"===e.key&&r.gotoPageByTarget("next")},d=e=>{e.preventDefault();var t=i.get("currentZoomScale")||1,n=i.get("zoomScale_max");let s=t+-1*e.deltaY*.002;s>n&&(s=n),s<1&&(s=1),t!==s&&r.pdfViewZoomFun(e,s)};Pp((()=>n.pdfLoadStatus),((e,t)=>{2===e&&(g(!1),n.searchKeyword&&(n.searchValueArr=[],n.searchText()))}));const g=(e=!0)=>{e?PC("#load_pdf_progress > div").css("width","100%"):PC("#load_pdf_progress").hide()};return window.resetPdfViewerWH=()=>{r.window_resize()},window.webNotifyViewerToPage=e=>{(e>s||e<1)&&(e=1),r.gotoPageByTarget("toPageno",e)},(e,t)=>(af(),cf("div",{id:"book_main",onDblclick:t[0]||(t[0]=(...e)=>ed(r).doubleClick&&ed(r).doubleClick(...e)),onWheel:AC(d,["stop"]),onKeydown:h,tabindex:"0"},[(af(!0),cf(Zp,null,Pg(ed(a).memoState.showViewList,(e=>Ld((af(),uf(uRe,{key:e.id,memo:e},null,8,["memo"])),[[ym,ed(a).memoState.showViewList.length>0&&!1===ed(l).painterInfo.openPainterTool]]))),128))],32))}},dRe={id:"sidebar_main"},gRe={class:"pack_book_div noselect"},pRe={id:"toolbar_main",class:"noselect"},fRe={id:"bottom_sidebar_main"},mRe={cellspacing:"0",cellpadding:"0"},CRe={key:0,class:"w395px search_main"},IRe={class:"searchType"},vRe={class:"choose"},BRe={action:"",method:"get",onkeydown:"if(event.keyCode==13){return false;}",class:"keywordForm"},yRe=["placeholder"],bRe={class:"w45px"},ERe={class:"w45px"},wRe={class:"w45px"},QRe={class:"w45px"},_Re={class:"w45px"},SRe={class:"w45px"},xRe={class:"w45px"},kRe={key:1,class:"w45px"},DRe={class:"w160px"},FRe={action:"",method:"get",onkeydown:"if(event.keyCode==13){return false;}"},TRe={class:"toolbar_pageCount"},MRe={id:"right_sidebar_main",class:"noselect"},RRe={class:"sidebar_share"},NRe={class:"tooltips_left"},LRe={class:"sidebar_other_buttons"},URe={class:"sidebar_other_buttons_position"},HRe=["href"],PRe={class:"sidebar-button","data-full_screen":"0",id:"sidebar_full_srceen"},ORe={class:"tooltips_left"},GRe={class:"search_title"},KRe={id:"acti_search_value"},qRe={key:0,id:"acti_search_resultNum_div",class:"acti_search_resultNum"},YRe={key:1,id:"acti_search_resultNum_div",class:"acti_search_resultNum"},VRe={class:"search_content",id:"acti-sidebar-search-content-list"},WRe=["onClick"],jRe={class:"page_num"},JRe=["innerHTML"],zRe={class:"tool-title"},XRe={class:"tool-list"},$Re=["title"],ZRe=["title"],eNe=["title"],tNe=["src"],iNe=["title"],nNe=["title"],sNe=["src"],rNe=["title"],aNe=["src"],oNe=["src"],lNe=["src"],ANe=["src"],cNe=["color-idx","title"],uNe={key:0,src:bTe},hNe={__name:"index",setup(e){mTe();const t=RF(),i=JC(),n=bme(),s=cAe(),r=cF(),a=Wfe(),o=uAe(),l=rI(),A=zh(1),c=zh(null),u=i.get("compatibleFlg"),h=zh(null),d=zh(null),g=Lh({isShow:!1,selectPenTypeValue:1,lineType:1}),p=Lh({isShow:!1,colorValueIdx:0}),f=zh(null),m=zh(null),C=s.colorList,I=Lh({w:300,h:500});qf((()=>(window.innerWidth-500)/2));const v=qf((()=>e=>{let t=r.updateTurnCurrPage(e);return t?t.length>15&&(t=t.slice(0,15)+"..."):t="",t})),B=(e,t)=>{let n=i.get("currentZoomScale"),s=i.get("zoomScale_list"),a=n,o=s.filter((e=>e>a));-1===e&&(o=s.filter((e=>e<a)),o.reverse()),a=o[0]||n,a!==n&&r.pdfViewZoomFun(t,a)};MTe(f,(()=>{p.isShow=!1})),MTe(m,(()=>{g.isShow=!1}));const y=e=>{g.isShow=!1,g.selectPenTypeValue=e,s.set("painterW",{1:3,2:5,3:8,4:15}[e]||3)},b=()=>{!0!==s.painterInfo.openPainterTool&&n.showOnlyTools("painter-pc")},E=(e,t)=>{let i=r.getCurrentPagenos();if(t=r.setTargetByPage(t),("toPageno"!==e||t)&&(r.gotoPageByTarget(e,t),i.includes(t))){let e=r.updateTurnCurrPage(i[0]);PC("#goto_page_input").val(e)}};return Eg((()=>{s.bindDragEvent(),Qd((()=>{A.value=Math.max(...r.getCurrentPagenos());let e=PC("#book_main").height();I.h=e,I.w=e-100})),n.bindFunToWindow(),t.bindDragZoom()})),(e,r)=>{const A=Mg("el-dialog"),I=Mg("CloseBold"),w=Mg("el-popover");return af(),cf(Zp,null,[ff("div",{id:"index_main",class:pu(["computer",{watermark:"1"==ed(i).get("freeuseFlg")}]),onContextmenu:r[17]||(r[17]=AC((()=>{}),["prevent"]))},[ff("div",dRe,[mf(oMe)]),ff("div",gRe,[mf(hRe),r[33]||(r[33]=ff("div",{class:"audioLink noselect"},[ff("audio",{controls:"controls",id:"pageLink_audio_id",controlsList:"nodownload"})],-1))]),r[53]||(r[53]=ff("div",{id:"screenshot-box"},null,-1)),ff("div",pRe,[ff("div",fRe,[ff("table",mRe,[ff("tbody",null,[ff("tr",null,[ed(i).hasText?(af(),cf("td",CRe,[ff("div",IRe,[ff("span",vRe,[ff("label",{onChange:r[0]||(r[0]=(...e)=>ed(t).searchText&&ed(t).searchText(...e)),class:"radio"},r[34]||(r[34]=[vf("AND"),ff("input",{type:"radio",class:"searchRadio",name:"searchRadio",value:"1",id:"andRadio",checked:"true"},null,-1),ff("i",null,null,-1)]),32),ff("label",{onChange:r[1]||(r[1]=(...e)=>ed(t).searchText&&ed(t).searchText(...e)),class:"radio"},r[35]||(r[35]=[vf("OR"),ff("input",{type:"radio",class:"searchRadio",name:"searchRadio",value:"2",id:"orRadio"},null,-1),ff("i",null,null,-1)]),32)])]),ff("form",BRe,[Ld(ff("input",{type:"text","onUpdate:modelValue":r[2]||(r[2]=e=>ed(t).searchKeyword=e),onKeyup:r[3]||(r[3]=uC(((...e)=>ed(t).searchText&&ed(t).searchText(...e)),["enter","native"])),class:"search-keyword",autocomplete:"off",id:"sidebar_search_input",placeholder:ed(l).pc_toolbar__search__placeholder},null,40,yRe),[[tC,ed(t).searchKeyword]])]),ff("i",{class:"oneviewer oneviewer-search",onClick:r[4]||(r[4]=(...e)=>ed(t).searchText&&ed(t).searchText(...e))}),ff("i",{class:"oneviewer oneviewer-times-circle",id:"sidebar_circle_button",onClick:r[5]||(r[5]=e=>ed(t).clearSearch(ed(u)))})])):Bf("",!0),r[46]||(r[46]=ff("td",{class:"w42px toolbar_space"},null,-1)),ff("td",bRe,[ff("div",{class:"toolbar_button active toolbar-first",onClick:r[6]||(r[6]=e=>E("first"))},r[36]||(r[36]=[ff("div",{class:"tooltips_top"},null,-1),ff("i",{class:"oneviewer oneviewer-first"},null,-1)]))]),ff("td",ERe,[ff("div",{class:"toolbar_button active toolbar-previous",onClick:r[7]||(r[7]=e=>E("previous"))},r[37]||(r[37]=[ff("div",{class:"tooltips_top"},null,-1),ff("i",{class:"oneviewer oneviewer-prev"},null,-1)]))]),ff("td",wRe,[ff("div",{class:"toolbar_button active toolbar-next",onClick:r[8]||(r[8]=e=>E("next"))},r[38]||(r[38]=[ff("div",{class:"tooltips_top"},null,-1),ff("i",{class:"oneviewer oneviewer-next"},null,-1)]))]),ff("td",QRe,[ff("div",{class:"toolbar_button active toolbar-last",onClick:r[9]||(r[9]=e=>E("last"))},r[39]||(r[39]=[ff("div",{class:"tooltips_top"},null,-1),ff("i",{class:"oneviewer oneviewer-last"},null,-1)]))]),ff("td",_Re,[ff("div",{id:"sidebar_zoom_in","data-type":"in",class:"toolbar_button zoom-button",onClick:r[10]||(r[10]=e=>B(1,e))},r[40]||(r[40]=[ff("div",{class:"tooltips_top"},null,-1),ff("i",{class:"oneviewer oneviewer-magnifier"},null,-1)]))]),ff("td",SRe,[ff("div",{id:"sidebar_zoom_out","data-type":"out",class:"toolbar_button zoom-button",onClick:r[11]||(r[11]=e=>B(-1,e))},r[41]||(r[41]=[ff("div",{class:"tooltips_top"},null,-1),ff("i",{class:"oneviewer oneviewer-minifier"},null,-1)]))]),ff("td",{class:"w45px"},[ff("div",{id:"sidebar_pen","data-type":"out",class:"toolbar_button",onClick:b},r[42]||(r[42]=[ff("div",{class:"tooltips_top"},null,-1),ff("i",null,null,-1)]))]),ff("td",xRe,[ff("div",{id:"sidebar_memo","data-type":"out",class:"toolbar_button",onClick:r[12]||(r[12]=e=>ed(n).showOnlyTools("memo-pc"))},r[43]||(r[43]=[ff("i",null,null,-1)]))]),1==ed(i).get("cutFlg")?(af(),cf("td",kRe,[ff("div",{id:"sidebar_cut",onClick:r[13]||(r[13]=e=>ed(a).screenshotStatus=!0),"data-type":"out",class:"toolbar_button"},r[44]||(r[44]=[ff("i",null,null,-1)]))])):Bf("",!0),r[47]||(r[47]=ff("td",{class:"w16px toolbar_space"},null,-1)),ff("td",DRe,[ff("form",FRe,[ff("input",{type:"tel",class:"goto-input",onKeyup:r[14]||(r[14]=uC((e=>E("toPageno",e.target.value)),["enter","native"])),id:"goto_page_input",autocomplete:"off"},null,32),r[45]||(r[45]=ff("span",{class:"spacing_sign"},"/",-1)),ff("span",TRe,yu(ed(i).totalPageNo),1)])]),r[48]||(r[48]=ff("td",{class:"w45px acti_noContentInfo_hide"},null,-1)),r[49]||(r[49]=ff("td",{class:"w45px acti_noContentInfo_hide"},null,-1))])])])])]),ff("div",MRe,[ff("div",RRe,[ff("div",{class:"sidebar-button",id:"sidebar_QR_code_button",onClick:r[15]||(r[15]=e=>ed(n).commonState.shareEmbedFlgVisible=!0)},[ff("div",NRe,yu(ed(l).pc_right_sidebar__share__text),1),r[50]||(r[50]=ff("i",{class:"oneviewer oneviewer-viewer_right_share"},null,-1))])]),ff("div",LRe,[ff("div",URe,[ff("div",{class:"sidebar-button appdownload",onClick:r[16]||(r[16]=(...e)=>ed(n).openApp&&ed(n).openApp(...e))},r[51]||(r[51]=[ff("i",{class:"oneviewer oneviewer-viewer_right_app"},null,-1)])),ff("a",{href:ed(i).get("contentDetailUrl"),target:"_blank"},[ff("div",PRe,[ff("div",ORe,yu(ed(l).pc_right_sidebar__full_srceen__text),1),r[52]||(r[52]=ff("i",{class:"oneviewer oneviewer-viewer_right_maximize"},null,-1))])],8,HRe)])])])],34),ed(n).commonState.shareEmbedFlgVisible?(af(),uf(JMe,{key:ed(n).commonState.shareEmbedFlgVisible?1:0,from:"embedFlg"})):Bf("",!0),mf(A,{"model-value":ed(o).memoState.isShowDialog&&!ed(a).screenshotStatus,"close-on-click-modal":!1,modal:!1,class:"memo-dialog",draggable:!0,"destroy-on-close":!0,"modal-class":"modal-class","before-close":()=>{ed(o).memoState.isShowDialog=!1}},{default:Nd((()=>[mf(dMe)])),_:1},8,["model-value","before-close"]),ff("div",{id:"search_dialog",style:cu({zIndex:ed(t).show_dialog&&!ed(a).screenshotStatus?ed(n).toolBaseIndex.searchBox:"-1"})},[ff("div",GRe,[r[55]||(r[55]=ff("span",null,"「 ",-1)),ff("span",KRe,yu(ed(t).searchValueArr.join(" ")),1),r[56]||(r[56]=ff("span",null," 」 ",-1)),2===ed(t).searchActionStatus?(af(),cf("span",qRe,yu(ed(l).pc_toolbar__search__result)+" "+yu(ed(t).searchResultArray.length)+" "+yu(ed(l).pc_toolbar__search__piece),1)):Bf("",!0),1===ed(t).searchActionStatus?(af(),cf("span",YRe,yu(ed(l).pc_toolbar__search__Retrieval),1)):Bf("",!0),ff("div",{class:"close_button",onClick:r[18]||(r[18]=e=>ed(t).show_dialog=!1)},r[54]||(r[54]=[ff("img",{src:ITe,alt:""},null,-1)]))]),ff("div",VRe,[ff("div",{ref_key:"searchScrollbarRef",ref:c,height:"100%",always:"",class:"search-box-ref"},[(af(!0),cf(Zp,null,Pg(ed(t).searchResultArray,(e=>(af(),cf("div",{class:"acti-search-content",onClick:i=>ed(t).toPage(e,ed(u))},[ff("div",jRe,yu(v.value(e.pageno))+" "+yu(ed(l).pc_toolbar__search__page__text),1),ff("div",{class:"search_result",innerHTML:e.text},null,8,JRe)],8,WRe)))),256))],512)])],4),Ld(ff("div",{class:"painter_dialog",style:cu({zIndex:ed(n).toolBaseIndex.painterTool})},[ff("div",zRe,[ff("div",{class:"close-box",onClick:r[19]||(r[19]=e=>ed(s).saveCanvasToImg(!1))},[mf(I,{style:{width:"12px",color:"#fdfdfd"}})])]),ff("div",XRe,[ff("div",{class:pu(["tool-item tool-item-hover",{"tool-item-active":1===ed(s).painterInfo.lineType}]),onClick:r[20]||(r[20]=e=>ed(s).set("lineType",1)),title:ed(l).painter_curve_title_text},r[57]||(r[57]=[ff("img",{class:"img",src:vTe},null,-1)]),10,$Re),ff("div",{class:pu(["tool-item tool-item-hover",{"tool-item-active":2===ed(s).painterInfo.lineType}]),onClick:r[21]||(r[21]=e=>ed(s).set("lineType",2)),title:ed(l).painter_straightline_title_text},r[58]||(r[58]=[ff("img",{class:"img",src:BTe},null,-1)]),10,ZRe),ff("div",{class:"tool-item tool-item-hover",ref_key:"penTypeRef",ref:h,onClick:r[22]||(r[22]=e=>g.isShow=!0),title:ed(l).painter_lineWidth_title_text},[ff("img",{class:"img",src:`./images/painter-lineWidth-${g.selectPenTypeValue}-2.png`},null,8,tNe),r[59]||(r[59]=ff("div",{class:"select-icon",style:{"background-image":"url('./images/painter-select-icon.png')"}},null,-1))],8,eNe),ff("div",{class:"tool-item tool-item-hover",ref_key:"colorSelectionRef",ref:d,onClick:r[23]||(r[23]=e=>p.isShow=!0),title:ed(l).painter_color_title_text},[ff("div",{style:cu([{width:"18px",height:"18px",border:"1px solid #FFF","box-sizing":"border-box"},{backgroundColor:ed(C)[p.colorValueIdx]}])},null,4),r[60]||(r[60]=ff("div",{class:"select-icon",style:{"background-image":"url('./images/painter-select-icon.png')"}},null,-1))],8,iNe),ff("div",{class:pu(["tool-item",{"tool-item-hover":ed(s).painterInfo.linesTotal>0}]),onClick:r[24]||(r[24]=e=>ed(s).revokeAction()),title:ed(s).painterInfo.linesTotal>0?ed(l).painter_back_title_text:""},[ff("img",{class:"img",src:ed(s).painterInfo.linesTotal?"./images/painter-back.png":"./images/painter-back-inactive.png"},null,8,sNe)],10,nNe),r[62]||(r[62]=ff("div",{class:"split-line"},null,-1)),ff("div",{class:"tool-item tool-item-hover",onClick:r[25]||(r[25]=(...e)=>ed(s).delCanvasByPage&&ed(s).delCanvasByPage(...e)),title:ed(l).painter_clear_title_text},r[61]||(r[61]=[ff("img",{class:"img",src:yTe,alt:""},null,-1)]),8,rNe)]),mf(w,{visible:g.isShow,"virtual-ref":h.value,trigger:"click","virtual-triggering":"","hide-after":0,"popper-style":{minWidth:"33px",width:"auto",zIndex:"9999",padding:0,borderColor:"#000"}},{default:Nd((()=>[ff("div",{ref_key:"penListBoxRef",ref:m},[ff("div",{class:pu(["pen-list-item",{"pen-list-item-active":1===g.selectPenTypeValue}]),onClick:r[26]||(r[26]=e=>y(1))},[ff("img",{src:1===g.selectPenTypeValue?"./images/painter-lineWidth-1-2.png":"./images/painter-lineWidth-1-1.png"},null,8,aNe)],2),ff("div",{class:pu(["pen-list-item",{"pen-list-item-active":2===g.selectPenTypeValue}]),onClick:r[27]||(r[27]=e=>y(2))},[ff("img",{src:2===g.selectPenTypeValue?"./images/painter-lineWidth-2-2.png":"./images/painter-lineWidth-2-1.png"},null,8,oNe)],2),ff("div",{class:pu(["pen-list-item",{"pen-list-item-active":3===g.selectPenTypeValue}]),onClick:r[28]||(r[28]=e=>y(3))},[ff("img",{src:3===g.selectPenTypeValue?"./images/painter-lineWidth-3-2.png":"./images/painter-lineWidth-3-1.png"},null,8,lNe)],2),ff("div",{class:pu(["pen-list-item",{"pen-list-item-active":4===g.selectPenTypeValue}]),onClick:r[29]||(r[29]=e=>y(4))},[ff("img",{src:4===g.selectPenTypeValue?"./images/painter-lineWidth-4-2.png":"./images/painter-lineWidth-4-1.png"},null,8,ANe)],2)],512)])),_:1},8,["visible","virtual-ref"]),mf(w,{visible:p.isShow,"virtual-ref":d.value,trigger:"click","virtual-triggering":"","hide-after":0,"popper-style":{minWidth:"33px",width:"auto",zIndex:"9999",padding:0,borderColor:"#000",borderRadius:0}},{default:Nd((()=>[ff("div",{ref_key:"colorListBoxRef",ref:f,class:"color-list-box",onClick:r[30]||(r[30]=e=>(e=>{var t;let i=parseInt(null==(t=e.target)?void 0:t.getAttribute("color-idx"));isFinite(i)&&(p.colorValueIdx=i,p.isShow=!p.isShow,s.set("color",C[i]))})(e))},[(af(!0),cf(Zp,null,Pg(ed(C),((e,t)=>(af(),cf("div",{class:"color-item","color-idx":t,style:cu({backgroundColor:e}),title:e},[p.colorValueIdx===t?(af(),cf("img",uNe)):Bf("",!0)],12,cNe)))),256))],512)])),_:1},8,["visible","virtual-ref"])],4),[[ym,ed(s).painterInfo.openPainterTool&&ed(s).painterInfo.showPainterTool&&!ed(a).screenshotStatus]]),mf(A,{modelValue:ed(n).commonState.printDialogVisible,"onUpdate:modelValue":r[31]||(r[31]=e=>ed(n).commonState.printDialogVisible=e),width:"500",modal:!1,class:"print-dialog-box","modal-class":"print-modal-class"},{default:Nd((()=>[(af(),uf(BMe,{key:ed(n).commonState.printDialogVisible?1:0}))])),_:1},8,["modelValue"]),mf(A,{modelValue:ed(n).commonState.shareDialogVisible,"onUpdate:modelValue":r[32]||(r[32]=e=>ed(n).commonState.shareDialogVisible=e),width:"400",modal:!1,title:ed(l).pc_share_dialog__title__text,class:"share-dialog-box","modal-class":"share-modal-class",center:""},{default:Nd((()=>[(af(),uf(JMe,{key:ed(n).commonState.shareDialogVisible?1:0,from:"pc"}))])),_:1},8,["modelValue","title"]),ed(a).screenshotStatus?(af(),uf(HTe,{key:1})):Bf("",!0),r[63]||(r[63]=ff("div",{class:"progress",id:"load_pdf_progress"},[ff("div",{class:"progress-bar progress-bar-indicating active"})],-1))],64)}}},dNe=RTe(hNe,[["__scopeId","data-v-592b36f2"]]),gNe=""+new URL("../images/sd-painter-lineWidth-1-1.png",import.meta.url).href,pNe=""+new URL("../images/sd-painter-lineWidth-2-1.png",import.meta.url).href,fNe=""+new URL("../images/sd-painter-lineWidth-3-1.png",import.meta.url).href,mNe=""+new URL("../images/sd-painter-lineWidth-4-1.png",import.meta.url).href,CNe={id:"acti-header-container",class:"acti-header-container"},INe={class:"acti-header-title"},vNe={class:"acti_book_pageno"},BNe={class:"acti-menu-buttons"},yNe={id:"acti-mobile-toc-content",class:"content showFooter loaded",style:{"z-index":"5379",display:"block"}},bNe=["pageno"],ENe=["id","pageno"],wNe=["src"],QNe={id:"acti-mobile-hamburger-content",class:"content showFooter loaded",style:{"z-index":"5379",display:"block"}},_Ne=["pageno"],SNe={class:"chapter_text"},xNe={class:"chapter_target"},kNe={id:"acti-mobile-search-content",class:"content showFooter loaded",style:{"z-index":"5379",display:"block"}},DNe={class:"searchType"},FNe={class:"choose"},TNe={class:"title"},MNe={action:"",method:"get",onkeydown:"if(event.keyCode==13){return false;}"},RNe=["placeholder"],NNe={key:0,id:"acti_search_resultNum_div"},LNe={key:0},UNe={key:1},HNe={class:"acti-search-result"},PNe={id:"acti-search-content-view"},ONe=["onClick"],GNe={class:"page_num"},KNe=["innerHTML"],qNe={id:"acti-mobile-painter-content",class:"content noselect showFooter loaded",style:{"z-index":"5379",display:"block"}},YNe={class:"acti-mobile-painter-content-button-box"},VNe=["color-idx"],WNe={src:bTe},jNe={class:"acti-mobile-painter-content-color-box"},JNe={class:"sp-replacer acti-sd-pen-color"},zNe={class:"sp-preview"},XNe={class:"jsPanel jsPanel-theme-mobile-memo-select-list jsPanel-state-normalized",id:"memo_select_dialog",style:{top:"193px",left:"32px"}},$Ne={class:"jsPanel-content jsPanel-theme-mobile-memo-select-list",style:{overflow:"hidden",width:"auto",height:"auto"}},ZNe={class:"jsPanel-title"},eLe={class:"acti-memo-select-content"},tLe={class:"acti-memo-option-title"},iLe={class:"acti-memo-option-title"},nLe={class:"acti-memo-option-title"},sLe={class:"acti-memo-selected-title"},rLe={class:"memo-create-title-box-text"},aLe={class:"memo-create-title-box-button"},oLe={id:"acti-mobile-memo-content",class:"content showFooter",style:{"z-index":"5346",display:"block"}},lLe=["pageno","memo-id"],ALe=["pageno","memo-id"],cLe={__name:"sd-sidebar",setup(e){const t=uAe(),i=bme(),n=cAe(),s=rI(),r=RF(),a=cF(),o=JC(),l=o.get("compatibleFlg");let A=zh([]);zh("");const c=o.hasCover,u=o.direction;zh(!1),Lh({isShow:!1,selectPenTypeValue:1,lineType:1});const h=zh(null),d=zh(null),g=zh(null);let p=zh(null);const f={0:"4px",1:"19px",2:"34px",3:"49px"};Eg((()=>{m(),t.updateMemoDataList()}));const m=()=>{v(),p.value=c&&"rtl"==u||!c&&"ltr"==u?1:0},C=e=>{n.penTypeVisible.isShow=!1,n.penTypeVisible.selectPenTypeValue=e,n.set("painterW",{1:3,2:5,3:8,4:15}[e]||3)};let I=qf((()=>!(!0===n.painterInfo.openPainterTool&&!1===n.painterInfo.showPainterTool)));const v=()=>{let e=o.totalPageNo;for(let t=1;t<=e;t++){let e=o.url_Prefix,i=o.url_Suffix,n=OC.thumbnailPath,s=o.imgType||OC.pageImgType,r={src:encodeURI(e+n+t+s+i),pageno:t};"rtl"===u?A.value.unshift(r):A.value.push(r)}},B=e=>{let n=e.target.getAttribute("pageno"),s=e.target.getAttribute("memo-id");n&&s&&(a.gotoPageByTarget("toPageno",n,"turn_tag"),i.commonState.sdMenuType=null,t.memoState.sdIsShowMemoList=!1,setTimeout((()=>{t.isShowEditBox(s,!1)}),1e3))},y=e=>{var t;let i=null==(t=e.target.closest(".page_group"))?void 0:t.getAttribute("pageno");i&&a.gotoPageByTarget("toPageno",i,"turn_thumbnail")},b=()=>{r.showSearchTotalLine=!1,r.clearSearch(l),r.searchKeyword="",r.searchValueArr=[]},E=qf((()=>e=>{let t=a.updateTurnCurrPage(e);return t?t.length>15&&(t=t.slice(0,15)+"..."):t="",t}));return MTe(g,(()=>{n.colorVisible.isShow=!1})),MTe(h,(()=>{n.penTypeVisible.isShow=!1})),(e,c)=>{const u=Mg("ArrowRightBold"),m=Mg("el-icon"),v=Mg("el-popover");return af(),cf(Zp,null,[Ld(ff("div",CNe,[ff("div",INe,[c[29]||(c[29]=vf(" (")),ff("span",vNe,yu(ed(a).inputShowPageStr),1),vf("/"+yu(ed(o).totalPageNo)+") ",1)]),ff("div",{class:"acti-menu-close",onClick:c[0]||(c[0]=e=>ed(i).showThumbnail("close"))},c[30]||(c[30]=[ff("a",{id:"close_button",href:"javascript:;"},[ff("i",{class:"oneviewer oneviewer-sd_menuclose"})],-1)])),ff("div",BNe,[ff("div",null,[ff("a",{href:"javascript:;",id:"acti-mobile-toc-button",class:pu({active:"thumbnail"===ed(i).commonState.sdMenuType}),onClick:c[1]||(c[1]=e=>ed(i).showThumbnail("thumbnail"))},c[31]||(c[31]=[ff("i",{class:"oneviewer oneviewer-sd_thumbs"},null,-1)]),2)]),ff("div",null,[ff("a",{href:"javascript:;",id:"acti-mobile-hamburger-button",class:pu({active:"hamburger"===ed(i).commonState.sdMenuType}),onClick:c[2]||(c[2]=e=>ed(i).showThumbnail("hamburger"))},c[32]||(c[32]=[ff("i",{class:"oneviewer oneviewer-sd_toc"},null,-1)]),2)]),ff("div",null,[ff("a",{href:"javascript:;",id:"acti-mobile-search-button",class:pu({active:"search"===ed(i).commonState.sdMenuType}),onClick:c[3]||(c[3]=e=>ed(i).showThumbnail("search"))},c[33]||(c[33]=[ff("i",{class:"oneviewer oneviewer-sd_search"},null,-1)]),2)]),ff("div",null,[ff("a",{href:"javascript:;",id:"acti-mobile-painter-button",class:pu({active:"painter"===ed(i).commonState.sdMenuType}),onClick:c[4]||(c[4]=e=>ed(i).showThumbnail("painter"))},c[34]||(c[34]=[ff("i",{class:"acti-mobile-painter-button-icon"},null,-1)]),2)]),ff("div",null,[ff("a",{href:"javascript:;",id:"acti-mobile-memo-button",class:pu({active:"memo"===ed(i).commonState.sdMenuType}),onClick:c[5]||(c[5]=e=>ed(i).showThumbnail("memo"))},c[35]||(c[35]=[ff("i",{class:"acti-mobile-memo-button-icon"},null,-1)]),2)])])],512),[[ym,ed(i).commonState.sdIsShowMenu&&ed(I)]]),Ld(ff("div",{class:"acti-mobile-menu-button",onClick:c[6]||(c[6]=e=>ed(i).commonState.sdIsShowMenu=!ed(i).commonState.sdIsShowMenu)},[mf(m,null,{default:Nd((()=>[mf(u)])),_:1})],512),[[ym,!ed(i).commonState.sdIsShowMenu]]),Ld(ff("div",yNe,[ff("div",{class:"spread_mode_single",onClick:y},[(af(!0),cf(Zp,null,Pg(ed(A),((e,t)=>(af(),cf("div",{class:pu(["page_group",t%2===ed(p)?"page-left":"page-right"]),pageno:e.pageno},[ff("div",{class:"thumbnail loaded",id:`toc_canvas_${e.pageno}`,pageno:e.pageno,style:{width:"65px"}},[ff("img",{class:"",src:e.src},null,8,wNe)],8,ENe)],10,bNe)))),256))])],512),[[ym,"thumbnail"===ed(i).commonState.sdMenuType]]),Ld(ff("div",QNe,[ff("div",null,[ff("div",{class:"list",onClick:y},[(af(!0),cf(Zp,null,Pg(ed(o).get("chapterJsons"),((e,t)=>(af(),cf("div",{class:"chapter page_group",pageno:e.target,style:cu({paddingLeft:f[e.level],fontWeight:0===e.level?"bold":"normal"}),key:t},[ff("span",SNe,yu(e.title),1),ff("span",xNe,yu(ed(i).targetNum(e)),1)],12,_Ne)))),128))])])],512),[[ym,"hamburger"===ed(i).commonState.sdMenuType]]),Ld(ff("div",kNe,[ff("div",null,[ff("div",DNe,[ff("span",FNe,[ff("label",{onChange:c[7]||(c[7]=e=>ed(r).searchText()),class:"radio"},c[36]||(c[36]=[vf("AND"),ff("input",{type:"radio",class:"searchRadio",name:"searchRadio",value:"1",id:"andRadio",checked:"checked"},null,-1),ff("i",null,null,-1)]),32),ff("label",{onChange:c[8]||(c[8]=e=>ed(r).searchText()),class:"radio"},c[37]||(c[37]=[vf("OR"),ff("input",{type:"radio",class:"searchRadio",name:"searchRadio",value:"2",id:"orRadio"},null,-1),ff("i",null,null,-1)]),32)])]),ff("div",TNe,[ff("div",null,[ff("form",MNe,[Ld(ff("input",{type:"search",id:"sidebar_search_input","onUpdate:modelValue":c[9]||(c[9]=e=>ed(r).searchKeyword=e),onKeyup:c[10]||(c[10]=uC((e=>ed(r).searchText()),["enter","native"])),placeholder:ed(s).pc_toolbar__search__placeholder,autocomplete:"off",class:"acti-search-keyword"},null,40,RNe),[[tC,ed(r).searchKeyword]])]),ff("span",{id:"sidebar_empty_icon",onClick:c[11]||(c[11]=e=>ed(r).searchKeyword="")},c[38]||(c[38]=[ff("i",{class:"acti-icon xiconbasic-cross"},null,-1)]))]),ff("button",{id:"sidebar_clean_button",class:"acti-btn",onClick:b},yu(ed(s).pad_sidebar__search_clean_button__text),1)]),ed(r).showSearchTotalLine?(af(),cf("div",NNe,[2===ed(r).searchActionStatus?(af(),cf("span",LNe,"「"+yu(ed(r).searchValueArr.join(" "))+"」"+yu(ed(s).pc_toolbar__search__result)+" "+yu(ed(r).searchResultArray.length)+" "+yu(ed(s).pc_toolbar__search__piece),1)):Bf("",!0),1===ed(r).searchActionStatus?(af(),cf("span",UNe,yu(ed(s).pc_toolbar__search__Retrieval),1)):Bf("",!0)])):Bf("",!0),ff("div",HNe,[ff("ul",PNe,[(af(!0),cf(Zp,null,Pg(ed(r).searchResultArray,(e=>(af(),cf("li",{onClick:t=>(e=>{i.commonState.sdMenuType=null,r.toPage(e,l)})(e)},[ff("div",GNe,yu(E.value(e.pageno))+" "+yu(ed(s).pc_toolbar__search__page__text),1),ff("div",{class:"search_result",innerHTML:e.text},null,8,KNe)],8,ONe)))),256))])])])],512),[[ym,"search"===ed(i).commonState.sdMenuType]]),Ld(ff("div",qNe,[ff("div",YNe,[ff("div",{class:pu(["acti-mobile-painter-content-curve",{"acti-active":1===ed(n).painterInfo.lineType}]),onClick:c[12]||(c[12]=e=>ed(n).set("lineType",1))},null,2),ff("div",{class:pu(["acti-mobile-painter-content-straightline",{"acti-active":2===ed(n).painterInfo.lineType}]),onClick:c[13]||(c[13]=e=>ed(n).set("lineType",2))},null,2),mf(v,{visible:ed(n).penTypeVisible.isShow,trigger:"click",placement:"top","hide-after":0,"popper-style":{minWidth:"33px",width:"auto",zIndex:"9999",padding:0,borderColor:"#000"}},{reference:Nd((()=>[ff("div",{class:pu(["acti-mobile-painter-content-lineWidth",`acti-mobile-painter-content-lineWidth-${ed(n).penTypeVisible.selectPenTypeValue}`]),onClick:c[18]||(c[18]=e=>ed(n).penTypeVisible.isShow=!0)},c[43]||(c[43]=[ff("div",{class:"acti-painter-lineWidth-icon"},null,-1),ff("i",{class:"acti-painter-select-icon"},null,-1)]),2)])),default:Nd((()=>[Ld(ff("div",{ref_key:"penListBoxRef",ref:h},[ff("div",{class:pu(["pen-list-item",{"pen-list-item-active":1===ed(n).penTypeVisible.selectPenTypeValue}]),onClick:c[14]||(c[14]=e=>C(1))},c[39]||(c[39]=[ff("img",{src:gNe},null,-1)]),2),ff("div",{class:pu(["pen-list-item",{"pen-list-item-active":2===ed(n).penTypeVisible.selectPenTypeValue}]),onClick:c[15]||(c[15]=e=>C(2))},c[40]||(c[40]=[ff("img",{src:pNe},null,-1)]),2),ff("div",{class:pu(["pen-list-item",{"pen-list-item-active":3===ed(n).penTypeVisible.selectPenTypeValue}]),onClick:c[16]||(c[16]=e=>C(3))},c[41]||(c[41]=[ff("img",{src:fNe},null,-1)]),2),ff("div",{class:pu(["pen-list-item",{"pen-list-item-active":4===ed(n).penTypeVisible.selectPenTypeValue}]),onClick:c[17]||(c[17]=e=>C(4))},c[42]||(c[42]=[ff("img",{src:mNe},null,-1)]),2)],512),[[ym,ed(n).penTypeVisible.isShow]])])),_:1},8,["visible"]),mf(v,{visible:ed(n).colorVisible.isShow,trigger:"click",placement:"top","hide-after":0,"popper-style":{minWidth:"33px",width:"auto",zIndex:"9999",padding:0,borderColor:"#000",borderRadius:0}},{reference:Nd((()=>[ff("div",{class:"acti-mobile-painter-content-color",ref_key:"colorSelectionRef",ref:d,onClick:c[20]||(c[20]=e=>ed(n).colorVisible.isShow=!0)},[ff("div",jNe,[c[45]||(c[45]=ff("input",{type:"color",value:"#f90",class:"colorpicker",style:{display:"none"}},null,-1)),ff("div",JNe,[ff("div",zNe,[ff("div",{class:"sp-preview-inner",style:cu({height:"100%",backgroundColor:ed(n).painterInfo.color})},null,4)]),c[44]||(c[44]=ff("div",{class:"sp-dd"},"▼",-1))])]),c[46]||(c[46]=ff("i",{class:"acti-painter-select-icon"},null,-1))],512)])),default:Nd((()=>[Ld(ff("div",{ref_key:"colorListBoxRef",ref:g,class:"color-list-box",onClick:c[19]||(c[19]=e=>(e=>{var t;let i=parseInt(null==(t=e.target)?void 0:t.getAttribute("color-idx"));isFinite(i)&&(n.colorVisible.isShow=!1,n.colorVisible.colorValueIdx=i,n.set("color",n.colorList[i]))})(e))},[(af(!0),cf(Zp,null,Pg(ed(n).colorList,((e,t)=>(af(),cf("div",{class:"color-item","color-idx":t,style:cu({backgroundColor:e})},[Ld(ff("img",WNe,null,512),[[ym,ed(n).colorVisible.colorValueIdx===t]])],12,VNe)))),256))],512),[[ym,ed(n).colorVisible.isShow]])])),_:1},8,["visible"]),ff("div",{class:pu(["acti-mobile-painter-content-back",{"acti-inactive":0===ed(n).painterInfo.linesTotal}]),onClick:c[21]||(c[21]=e=>ed(n).revokeAction())},null,2),c[47]||(c[47]=ff("div",{class:"acti-mobile-painter-content-line"},null,-1)),ff("div",{class:"acti-mobile-painter-content-clear",onClick:c[22]||(c[22]=(...e)=>ed(n).delCanvasByPage&&ed(n).delCanvasByPage(...e))})])],512),[[ym,"painter"===ed(i).commonState.sdMenuType&&ed(I)]]),Ld(ff("div",XNe,[ff("div",$Ne,[ff("div",ZNe,yu(ed(s).memo_select_template_title_text),1),ff("div",{class:"jsPanel-btn-close",onClick:c[23]||(c[23]=e=>ed(i).showThumbnail("memo"))},c[48]||(c[48]=[ff("i",{class:"fa fa-times","aria-hidden":"true"},null,-1)])),ff("div",eLe,[ff("div",null,[ff("div",{class:"acti-memo-option",type:"yellow",onClick:c[24]||(c[24]=e=>ed(t).memoState.selectedColorIdx="yellow")},[c[49]||(c[49]=ff("div",{class:"acti-memo-option-icon memo-yellow"},null,-1)),ff("div",tLe,yu(ed(s).memo_select_template_option_yellow_text),1)]),ff("div",{class:"acti-memo-option",type:"red",onClick:c[25]||(c[25]=e=>ed(t).memoState.selectedColorIdx="red")},[c[50]||(c[50]=ff("div",{class:"acti-memo-option-icon memo-red"},null,-1)),ff("div",iLe,yu(ed(s).memo_select_template_option_red_text),1)]),ff("div",{class:"acti-memo-option",type:"blue",onClick:c[26]||(c[26]=e=>ed(t).memoState.selectedColorIdx="blue")},[c[51]||(c[51]=ff("div",{class:"acti-memo-option-icon memo-blue"},null,-1)),ff("div",nLe,yu(ed(s).memo_select_template_option_blue_text),1)])]),ff("div",sLe,yu(ed(s).memo_select_template_option_selected_text),1),Ld(ff("button",{onClick:c[27]||(c[27]=(...e)=>ed(t).showMemoListBySd&&ed(t).showMemoListBySd(...e)),id:"jumpToMemoList",class:"acti-memo-selected-button",style:{display:"block"}},[vf(yu(ed(s).memo_select_template_option_selected_button),1),c[52]||(c[52]=ff("i",{class:"oneviewer oneviewer-next"},null,-1))],512),[[ym,ed(t).memoState.memoDataList.length>0]])])]),c[53]||(c[53]=ff("div",{class:"jsPanel-ftr jsPanel-clearfix jsPanel-theme-mobile-memo-select-list"},null,-1))],512),[[ym,"memo"===ed(i).commonState.sdMenuType&&-1===ed(t).memoState.selectedColorIdx&&ed(t).memoState.sdIsShowSelectMemoBox]]),Ld(ff("div",{class:"memo-create-title-box content noselect showFooter",style:{"z-index":"5379",display:"block"},onClick:c[28]||(c[28]=e=>ed(t).memoState.selectedColorIdx=-1)},[ff("div",rLe,[vf(yu(ed(s).mobile_memo_create_text_1)+" ",1),c[54]||(c[54]=ff("br",null,null,-1)),vf(" "+yu(ed(s).mobile_memo_create_text_2),1)]),ff("div",aLe,yu(ed(s).pc_toolbar__cut__cancel),1)],512),[[ym,-1!==ed(t).memoState.selectedColorIdx&&"memo"===ed(i).commonState.sdMenuType]]),Ld(ff("div",oLe,[ff("div",null,[ff("div",{class:"list",onClick:B},[(af(!0),cf(Zp,null,Pg(ed(t).memoState.memoDataList,((e,t)=>(af(),cf("div",{class:"chapter",key:t},[ff("span",{class:"chapter_text memo-text-more text-book",pageno:e.pageNum,"memo-id":e.id},yu(e.text),9,lLe),ff("span",{class:"chapter_target",pageno:e.pageNum,"memo-id":e.id},yu(E.value(e.pageNum)),9,ALe)])))),128))])])],512),[[ym,!0===ed(t).memoState.sdIsShowMemoList&&"memo"===ed(i).commonState.sdMenuType]]),ed(i).commonState.shareDialogVisible?(af(),uf(JMe,{key:ed(i).commonState.shareDialogVisible?1:0,from:"sd"})):Bf("",!0)],64)}}},uLe=RTe(cLe,[["__scopeId","data-v-4fe06245"]]),hLe={id:"sidebar_main"},dLe={class:"pack_book_div noselect"},gLe={class:"acti-footer-content"},pLe={class:"memo-text-dialog-button-box"},fLe={class:"memo-text-dialog-title"},mLe={class:"memo-text-dialog-textarea"},CLe={__name:"index",setup(e){sF(),cF();const t=JC(),i=PDe();cAe();const n=rI(),s=bme(),r=window.matchMedia("(orientation: landscape)"),a=uAe(),o=e=>{l()},l=AF(1e3,(()=>{i.sendKinesisDetailLog("rotate"),i.sendLogByActionTpye(OC.kinesis_log_actionType_paging_reissue),i.logState.is_first_log=1,i.sendKinesisDetailLog("read"),i.sendKinesisViewLog()}));Eg((()=>{PC("body").on("click",(e=>{PC(e.target).closest(".memo-content-box").length<1&&a.hideAllMemo()})),Qd((()=>{r.addEventListener("change",o)})),s.bindFunToWindow()}));const A=e=>{window.parent&&window.parent.resizeParentSize&&window.parent.resizeParentSize(e),"in"===e?(YC(),PC(".resetParentPageSize_button_in").hide(),PC(".resetParentPageSize_button_out").show()):(PC(".resetParentPageSize_button_in").show(),PC(".resetParentPageSize_button_out").hide())};return Sg((()=>{r.removeEventListener("change",o)})),(e,i)=>{const r=Mg("el-input");return af(),cf(Zp,null,[ff("div",{id:"index_main",class:pu(["phone",{watermark:"1"==ed(t).get("freeuseFlg")}])},[Ld(ff("div",hLe,[mf(uLe)],512),[[ym,!1===ed(a).memoState.showEditContentTextarea]]),ff("div",dLe,[mf(hRe),i[5]||(i[5]=ff("div",{class:"audioLink noselect"},[ff("audio",{controls:"controls",id:"pageLink_audio_id",controlsList:"nodownload"})],-1))]),i[8]||(i[8]=ff("div",{class:"progress",id:"load_pdf_progress"},[ff("div",{class:"progress-bar progress-bar-indicating active"})],-1)),ff("div",gLe,[ff("div",{class:"resetParentPageSize_button resetParentPageSize_button_in",onClick:i[0]||(i[0]=e=>A("in"))},[i[6]||(i[6]=ff("i",{class:"oneviewer oneviewer-enlargebar_sd_larger"},null,-1)),vf(" "+yu(ed(n).sd_footer__larger_button__text),1)]),ff("div",{class:"resetParentPageSize_button resetParentPageSize_button_out",onClick:i[1]||(i[1]=e=>A("out"))},[i[7]||(i[7]=ff("i",{class:"oneviewer oneviewer-enlargebar_sd_normal"},null,-1)),vf(" "+yu(ed(n).sd_footer__normal_button__text),1)])])],2),ed(a).memoState.showEditContentTextarea?(af(),cf("div",{key:0,id:"memo-text-dialog",class:"memo-text-dialog",style:cu({zIndex:ed(s).toolBaseIndex.sdMemoEditBox})},[ff("div",pLe,[ff("div",fLe,yu(1===ed(a).memoState.showEditContentTextarea?ed(n).mobile_memo_text_dialog_text_title:ed(n).mobile_memo_text_dialog_outlink_title),1),ff("div",{class:"memo-text-dialog-cancel-button",onClick:i[2]||(i[2]=e=>ed(a).memoState.showEditContentTextarea=!1)},yu(ed(n).pc_toolbar__cut__cancel),1),ff("div",{class:"memo-text-dialog-save-button",onClick:i[3]||(i[3]=e=>ed(a).saveMemoContentBySd())},yu(ed(n).pc_toolbar__cut__save),1)]),ff("div",mLe,[mf(r,{type:"textarea",id:"sdMemoContentTextarea",style:{height:"100%"},placeholder:1===ed(a).memoState.showEditContentTextarea?ed(n).mobile_memo_text_dialog_text_placeholder:ed(n).memo_template_control_outlink_placeholder_text,tabindex:"-1",maxlength:"200",modelValue:ed(a).memoState.sdEditMemoObj.linkDateText,"onUpdate:modelValue":i[4]||(i[4]=e=>ed(a).memoState.sdEditMemoObj.linkDateText=e)},null,8,["placeholder","modelValue"])])],4)):Bf("",!0)],64)}}},ILe={id:"viewer-wrap",class:"viewer-wrap"},vLe={class:"viewer-wrap__inner"},BLe={class:"viewer-wrap__buttons"},yLe={class:"viewer-wrap__buttons__operation"},bLe=["href"],ELe={class:"viewer-wrap__buttons__share"},wLe={class:"btn-share-wrap"},QLe=["href"],_Le=["data-url"],SLe={id:"qrcode_wrap",class:"viewer-wrap__qrcode"},xLe={class:"viewer-wrap__qrcode__contents"},kLe={class:"viewer-wrap__qrcode__contents__wrap"},DLe={class:"viewer-wrap__qrcode__contents__text"},FLe={class:"viewer-wrap__qrcode__contents__image"},TLe={id:"QRcode_img_div",class:"viewer-wrap__qrcode__contents__image__frame",title:""},MLe=["src"],RLe=RTe({__name:"wrap",setup(e){const t=rI(),i=mTe(),n=JC();return Eg((()=>{i.initShareUrl(),PC("#share_qrcode").on("click",(function(){PC("#viewer-wrap").addClass("show_qrcode")})),PC("#qrcode_close").on("click",(function(){PC("#viewer-wrap").addClass("hide_qrcode")})),PC("#qrcode_wrap").on("animationend webkitAnimationEnd oAnimationEnd mozAnimationEnd",(function(){PC("#viewer-wrap").is(".hide_qrcode")&&PC("#viewer-wrap").removeClass("show_qrcode hide_qrcode")}));var e=n.get("url_Prefix")+"cover.png"+n.get("url_Suffix");PC("#book_cover").attr("src",e);try{LineIt.loadButton()}catch(I2){}})),(e,n)=>(af(),cf("div",ILe,[n[6]||(n[6]=ff("div",{class:"viewer-wrap__concealer"},null,-1)),ff("div",vLe,[n[3]||(n[3]=ff("div",{class:"viewer-wrap__image"},[ff("div",{class:"viewer-wrap__image__inner"},[ff("img",{id:"book_cover",class:"viewer-wrap__image__entity",src:""})])],-1)),ff("div",BLe,[ff("div",yLe,[n[1]||(n[1]=ff("a",{id:"app_button",href:"javascript: void(0);",style:{visibility:"hidden"},class:"btn btn-operation btn-operation--app waves-effect"},[ff("i",{class:"fa fa-mobile"})],-1)),ff("a",{id:"browser_button",href:ed(i).shareState.share_url,target:"_blank",class:"btn btn-operation btn-operation--browser waves-effect"},[n[0]||(n[0]=ff("i",{class:"xiconbasic-globe"},null,-1)),vf(yu(ed(t).embedded_sd_share_content__browser_button__text),1)],8,bLe)]),ff("div",ELe,[n[2]||(n[2]=ff("div",{class:"btn-share-wrap"},[ff("a",{id:"share_qrcode",href:"javascript: void(0);",class:"btn btn-share btn-share--qrcode waves-effect"})],-1)),ff("div",wLe,[ff("a",{id:"share_twitter",href:ed(i).shareState.shareUrl_twitter,target:"_blank",class:"btn btn-share waves-effect"},null,8,QLe)]),ff("div",{class:"line-it-button","data-lang":"ja","data-type":"share-b","data-env":"REAL","data-url":ed(i).shareState.shareUrl_line,"data-color":"default","data-size":"small","data-count":"false","data-ver":"3",style:{display:"none"}},null,8,_Le)])])]),ff("div",SLe,[ff("div",xLe,[n[5]||(n[5]=ff("div",{id:"qrcode_close",class:"viewer-wrap__qrcode__contents__close close_btn waves-effect waves-light"},[ff("i",{class:"xiconbasic-close"})],-1)),ff("div",kLe,[ff("div",DLe,[vf(yu(ed(t).embedded_sd_share_content__qrcode_contents_text__1)+" ",1),n[4]||(n[4]=ff("br",null,null,-1)),vf(" "+yu(ed(t).embedded_sd_share_content__qrcode_contents_text__2),1)]),ff("div",FLe,[ff("div",TLe,[ff("img",{alt:"Scan me!",src:ed(i).shareState.qrCodeImg,style:{display:"block",width:"100%",height:"100%"}},null,8,MLe)])])])])])]))}},[["__scopeId","data-v-2d719557"]]),NLe={__name:"App",setup(e){const t=JC();return window.device=mF,(e,i)=>"mobile"===ed(mF).type&&1==ed(t).get("embedFlg")?(af(),cf(Zp,{key:0},["mobile"===ed(mF).type?(af(),uf(RLe,{key:0})):Bf("",!0)],64)):(af(),cf(Zp,{key:1},["desktop"===ed(mF).type||1==ed(t).get("embedFlg")?(af(),uf(dNe,{key:0})):(af(),uf(CLe,{key:1}))],64))}};var LLe={d:(e,t)=>{for(var i in t)LLe.o(t,i)&&!LLe.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},ULe=globalThis.pdfjsLib={};LLe.d(ULe,{AbortException:()=>
/* reexport */JUe,AnnotationEditorLayer:()=>
/* reexport */sKe,AnnotationEditorParamsType:()=>
/* reexport */ZLe,AnnotationEditorType:()=>
/* reexport */$Le,AnnotationEditorUIManager:()=>
/* reexport */WHe,AnnotationLayer:()=>
/* reexport */LGe,AnnotationMode:()=>
/* reexport */XLe,ColorPicker:()=>
/* reexport */zGe,DOMSVGFactory:()=>
/* reexport */rGe,DrawLayer:()=>
/* reexport */aKe,FeatureTest:()=>
/* reexport */ZUe,GlobalWorkerOptions:()=>
/* reexport */qPe,ImageKind:()=>
/* reexport */oUe,InvalidPDFException:()=>
/* reexport */YUe,MissingPDFException:()=>
/* reexport */VUe,OPS:()=>
/* reexport */FUe,OutputScale:()=>
/* reexport */MHe,PDFDataRangeTransport:()=>
/* reexport */OOe,PDFDateString:()=>
/* reexport */SHe,PDFWorker:()=>
/* reexport */VOe,PasswordResponses:()=>
/* reexport */TUe,PermissionFlag:()=>
/* reexport */eUe,PixelsPerInch:()=>
/* reexport */mHe,RenderingCancelledException:()=>
/* reexport */vHe,TextLayer:()=>
/* reexport */kOe,UnexpectedResponseException:()=>
/* reexport */WUe,Util:()=>
/* reexport */tHe,VerbosityLevel:()=>
/* reexport */DUe,XfaLayer:()=>
/* reexport */aGe,build:()=>
/* reexport */eGe,createValidAbsoluteUrl:()=>
/* reexport */PUe,fetchData:()=>
/* reexport */CHe,getDocument:()=>
/* reexport */LOe,getFilenameFromUrl:()=>
/* reexport */bHe,getPdfFilenameFromUrl:()=>
/* reexport */EHe,getXfaPageViewport:()=>
/* reexport */xHe,isDataScheme:()=>
/* reexport */BHe,isPdfFile:()=>
/* reexport */yHe,noContextMenu:()=>
/* reexport */_He,normalizeUnicode:()=>
/* reexport */sHe,setLayerDimensions:()=>
/* reexport */THe,shadow:()=>
/* reexport */OUe,version:()=>
/* reexport */ZOe});const HLe=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),PLe=[1,0,0,1,0,0],OLe=[.001,0,0,.001,0,0],GLe=1.35,KLe=1,qLe=2,YLe=4,VLe=16,WLe=32,jLe=64,JLe=128,zLe=256,XLe={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},$Le={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},ZLe={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},eUe={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},tUe=0,iUe=1,nUe=2,sUe=3,rUe=3,aUe=4,oUe={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},lUe=1,AUe=2,cUe=3,uUe=4,hUe=5,dUe=6,gUe=7,pUe=8,fUe=9,mUe=10,CUe=11,IUe=12,vUe=13,BUe=14,yUe=15,bUe=16,EUe=17,wUe=20,QUe=1,_Ue=2,SUe=3,xUe=4,kUe=5,DUe={ERRORS:0,WARNINGS:1,INFOS:5},FUe={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},TUe={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let MUe=DUe.WARNINGS;function RUe(){return MUe}function NUe(e){DUe.INFOS}function LUe(e){DUe.WARNINGS}function UUe(e){throw new Error(e)}function HUe(e,t){e||UUe(t)}function PUe(e,t=null,i=null){if(!e)return null;try{if(i&&"string"==typeof e){if(i.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);(null==t?void 0:t.length)>=2&&(e=`http://${e}`)}if(i.tryConvertEncoding)try{e=decodeURIComponent(escape(e))}catch{}}const n=t?new URL(e,t):new URL(e);if(function(e){switch(null==e?void 0:e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(n))return n}catch{}return null}function OUe(e,t,i,n=!1){return Object.defineProperty(e,t,{value:i,enumerable:!n,configurable:!0,writable:!1}),i}const GUe=function(){function e(e,t){this.message=e,this.name=t}return e.prototype=new Error,e.constructor=e,e}();let KUe=class extends GUe{constructor(e,t){super(e,"PasswordException"),this.code=t}},qUe=class extends GUe{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}},YUe=class extends GUe{constructor(e){super(e,"InvalidPDFException")}},VUe=class extends GUe{constructor(e){super(e,"MissingPDFException")}},WUe=class extends GUe{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}},jUe=class extends GUe{constructor(e){super(e,"FormatError")}},JUe=class extends GUe{constructor(e){super(e,"AbortException")}};function zUe(e){"object"==typeof e&&void 0!==(null==e?void 0:e.length)||UUe("Invalid argument for bytesToString");const t=e.length,i=8192;if(t<i)return String.fromCharCode.apply(null,e);const n=[];for(let s=0;s<t;s+=i){const r=Math.min(s+i,t),a=e.subarray(s,r);n.push(String.fromCharCode.apply(null,a))}return n.join("")}function XUe(e){"string"!=typeof e&&UUe("Invalid argument for stringToBytes");const t=e.length,i=new Uint8Array(t);for(let n=0;n<t;++n)i[n]=255&e.charCodeAt(n);return i}function $Ue(e){const t=Object.create(null);for(const[i,n]of e)t[i]=n;return t}class ZUe{static get isLittleEndian(){return OUe(this,"isLittleEndian",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return OUe(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return OUe(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get isImageDecoderSupported(){return OUe(this,"isImageDecoderSupported","undefined"!=typeof ImageDecoder)}static get platform(){return"undefined"!=typeof navigator&&"string"==typeof(null==navigator?void 0:navigator.platform)?OUe(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:"string"==typeof(null==navigator?void 0:navigator.userAgent)&&navigator.userAgent.includes("Firefox")}):OUe(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var e,t;return OUe(this,"isCSSRoundSupported",null==(t=null==(e=globalThis.CSS)?void 0:e.supports)?void 0:t.call(e,"width: round(1.5px, 1px)"))}}const eHe=Array.from(Array(256).keys(),(e=>e.toString(16).padStart(2,"0")));let tHe=(t=class{static makeHexColor(e,t,i){return`#${eHe[e]}${eHe[t]}${eHe[i]}`}static scaleMinMax(e,t){let i;e[0]?(e[0]<0&&(i=t[0],t[0]=t[2],t[2]=i),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(i=t[1],t[1]=t[3],t[3]=i),t[1]*=e[3],t[3]*=e[3]):(i=t[0],t[0]=t[1],t[1]=i,i=t[2],t[2]=t[3],t[3]=i,e[1]<0&&(i=t[1],t[1]=t[3],t[3]=i),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(i=t[0],t[0]=t[2],t[2]=i),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const i=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/i,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/i]}static getAxialAlignedBoundingBox(e,t){const i=this.applyTransform(e,t),n=this.applyTransform(e.slice(2,4),t),s=this.applyTransform([e[0],e[3]],t),r=this.applyTransform([e[2],e[1]],t);return[Math.min(i[0],n[0],s[0],r[0]),Math.min(i[1],n[1],s[1],r[1]),Math.max(i[0],n[0],s[0],r[0]),Math.max(i[1],n[1],s[1],r[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],i=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],s=e[2]*t[0]+e[3]*t[2],r=e[2]*t[1]+e[3]*t[3],a=(i+r)/2,o=Math.sqrt((i+r)**2-4*(i*r-s*n))/2,l=a+o||1,A=a-o||1;return[Math.sqrt(l),Math.sqrt(A)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const i=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),n=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(i>n)return null;const s=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),r=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return s>r?null:[i,s,n,r]}static bezierBoundingBox(t,i,s,r,a,o,l,A,c){return c?(c[0]=Math.min(c[0],t,l),c[1]=Math.min(c[1],i,A),c[2]=Math.max(c[2],t,l),c[3]=Math.max(c[3],i,A)):c=[Math.min(t,l),Math.min(i,A),Math.max(t,l),Math.max(i,A)],Ec(this,e,n).call(this,t,s,a,l,i,r,o,A,3*(3*(s-a)-t+l),6*(t-2*s+a),3*(s-t),c),Ec(this,e,n).call(this,t,s,a,l,i,r,o,A,3*(3*(r-o)-i+A),6*(i-2*r+o),3*(r-i),c),c}},e=new WeakSet,i=function(e,t,i,n,s,r,a,o,l,A){if(l<=0||l>=1)return;const c=1-l,u=l*l,h=u*l,d=c*(c*(c*e+3*l*t)+3*u*i)+h*n,g=c*(c*(c*s+3*l*r)+3*u*a)+h*o;A[0]=Math.min(A[0],d),A[1]=Math.min(A[1],g),A[2]=Math.max(A[2],d),A[3]=Math.max(A[3],g)},n=function(t,n,s,r,a,o,l,A,c,u,h,d){if(Math.abs(c)<1e-12)return void(Math.abs(u)>=1e-12&&Ec(this,e,i).call(this,t,n,s,r,a,o,l,A,-h/u,d));const g=u**2-4*h*c;if(g<0)return;const p=Math.sqrt(g),f=2*c;Ec(this,e,i).call(this,t,n,s,r,a,o,l,A,(-u+p)/f,d),Ec(this,e,i).call(this,t,n,s,r,a,o,l,A,(-u-p)/f,d)},yc(t,e),t);let iHe=null,nHe=null;function sHe(e){return iHe||(iHe=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,nHe=new Map([["ﬅ","ſt"]])),e.replaceAll(iHe,((e,t,i)=>t?t.normalize("NFKC"):nHe.get(i)))}const rHe="pdfjs_internal_id_",aHe=0,oHe=1,lHe=2,AHe=3,cHe=4,uHe=5,hHe=6,dHe=7,gHe=8;const pHe="http://www.w3.org/2000/svg",fHe=class{};Ic(fHe,"CSS",96),Ic(fHe,"PDF",72),Ic(fHe,"PDF_TO_CSS_UNITS",fHe.CSS/fHe.PDF);let mHe=fHe;async function CHe(e,t="text"){if(QHe(e,document.baseURI)){const i=await fetch(e);if(!i.ok)throw new Error(i.statusText);switch(t){case"arraybuffer":return i.arrayBuffer();case"blob":return i.blob();case"json":return i.json()}return i.text()}return new Promise(((i,n)=>{const s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType=t,s.onreadystatechange=()=>{if(s.readyState===XMLHttpRequest.DONE)if(200!==s.status&&0!==s.status)n(new Error(s.statusText));else{switch(t){case"arraybuffer":case"blob":case"json":return void i(s.response)}i(s.responseText)}},s.send(null)}))}class IHe{constructor({viewBox:e,scale:t,rotation:i,offsetX:n=0,offsetY:s=0,dontFlip:r=!1}){this.viewBox=e,this.scale=t,this.rotation=i,this.offsetX=n,this.offsetY=s;const a=(e[2]+e[0])/2,o=(e[3]+e[1])/2;let l,A,c,u,h,d,g,p;switch((i%=360)<0&&(i+=360),i){case 180:l=-1,A=0,c=0,u=1;break;case 90:l=0,A=1,c=1,u=0;break;case 270:l=0,A=-1,c=-1,u=0;break;case 0:l=1,A=0,c=0,u=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}r&&(c=-c,u=-u),0===l?(h=Math.abs(o-e[1])*t+n,d=Math.abs(a-e[0])*t+s,g=(e[3]-e[1])*t,p=(e[2]-e[0])*t):(h=Math.abs(a-e[0])*t+n,d=Math.abs(o-e[1])*t+s,g=(e[2]-e[0])*t,p=(e[3]-e[1])*t),this.transform=[l*t,A*t,c*t,u*t,h-l*t*a-c*t*o,d-A*t*a-u*t*o],this.width=g,this.height=p}get rawDims(){const{viewBox:e}=this;return OUe(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:i=this.offsetX,offsetY:n=this.offsetY,dontFlip:s=!1}={}){return new IHe({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:i,offsetY:n,dontFlip:s})}convertToViewportPoint(e,t){return tHe.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=tHe.applyTransform([e[0],e[1]],this.transform),i=tHe.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],i[0],i[1]]}convertToPdfPoint(e,t){return tHe.applyInverseTransform([e,t],this.transform)}}class vHe extends GUe{constructor(e,t=0){super(e,"RenderingCancelledException"),this.extraDelay=t}}function BHe(e){const t=e.length;let i=0;for(;i<t&&""===e[i].trim();)i++;return"data:"===e.substring(i,i+5).toLowerCase()}function yHe(e){return"string"==typeof e&&/\.pdf$/i.test(e)}function bHe(e){return[e]=e.split(/[#?]/,1),e.substring(e.lastIndexOf("/")+1)}function EHe(e,t="document.pdf"){if("string"!=typeof e)return t;if(BHe(e))return LUe(),t;const i=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let s=i.exec(n[1])||i.exec(n[2])||i.exec(n[3]);if(s&&(s=s[0],s.includes("%")))try{s=i.exec(decodeURIComponent(s))[0]}catch{}return s||t}class wHe{constructor(){Ic(this,"started",Object.create(null)),Ic(this,"times",[])}time(e){e in this.started&&LUe(),this.started[e]=Date.now()}timeEnd(e){e in this.started||LUe(),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const{name:i}of this.times)t=Math.max(i.length,t);for(const{name:i,start:n,end:s}of this.times)e.push(`${i.padEnd(t)} ${s-n}ms\n`);return e.join("")}}function QHe(e,t){try{const{protocol:i}=t?new URL(e,t):new URL(e);return"http:"===i||"https:"===i}catch{return!1}}function _He(e){e.preventDefault()}class SHe{static toDateObject(e){if(!e||"string"!=typeof e)return null;Bc(this,s)||bc(this,s,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=Bc(this,s).exec(e);if(!t)return null;const i=parseInt(t[1],10);let n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;let r=parseInt(t[3],10);r=r>=1&&r<=31?r:1;let a=parseInt(t[4],10);a=a>=0&&a<=23?a:0;let o=parseInt(t[5],10);o=o>=0&&o<=59?o:0;let l=parseInt(t[6],10);l=l>=0&&l<=59?l:0;const A=t[7]||"Z";let c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;let u=parseInt(t[9],10)||0;return u=u>=0&&u<=59?u:0,"-"===A?(a+=c,o+=u):"+"===A&&(a-=c,o-=u),new Date(Date.UTC(i,n,r,a,o,l))}}function xHe(e,{scale:t=1,rotation:i=0}){const{width:n,height:s}=e.attributes.style,r=[0,0,parseInt(n),parseInt(s)];return new IHe({viewBox:r,scale:t,rotation:i})}function kHe(e){if(e.startsWith("#")){const t=parseInt(e.slice(1),16);return[(16711680&t)>>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map((e=>parseInt(e))):e.startsWith("rgba(")?e.slice(5,-1).split(",").map((e=>parseInt(e))).slice(0,3):(LUe(),[0,0,0])}function DHe(e){const{a:t,b:i,c:n,d:s,e:r,f:a}=e.getTransform();return[t,i,n,s,r,a]}function FHe(e){const{a:t,b:i,c:n,d:s,e:r,f:a}=e.getTransform().invertSelf();return[t,i,n,s,r,a]}function THe(e,t,i=!1,n=!0){if(t instanceof IHe){const{pageWidth:n,pageHeight:s}=t.rawDims,{style:r}=e,a=ZUe.isCSSRoundSupported,o=`var(--scale-factor) * ${n}px`,l=`var(--scale-factor) * ${s}px`,A=a?`round(down, ${o}, var(--scale-round-x, 1px))`:`calc(${o})`,c=a?`round(down, ${l}, var(--scale-round-y, 1px))`:`calc(${l})`;i&&t.rotation%180!=0?(r.width=c,r.height=A):(r.width=A,r.height=c)}n&&e.setAttribute("data-main-rotation",t.rotation)}s=new WeakMap,yc(SHe,s);class MHe{constructor(){const e=window.devicePixelRatio||1;this.sx=e,this.sy=e}get scaled(){return 1!==this.sx||1!==this.sy}get symmetric(){return this.sx===this.sy}}const RHe=class e{constructor(t){yc(this,d),yc(this,r,null),yc(this,a,null),yc(this,o),yc(this,l,null),yc(this,A,null),bc(this,o,t),Bc(e,c)||bc(e,c,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"}))}render(){const t=bc(this,r,document.createElement("div"));t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const i=Bc(this,o)._uiManager._signal;t.addEventListener("contextmenu",_He,{signal:i}),t.addEventListener("pointerdown",Ec(e,u,h),{signal:i});const n=bc(this,l,document.createElement("div"));n.className="buttons",t.append(n);const s=Bc(this,o).toolbarPosition;if(s){const{style:e}=t,i="ltr"===Bc(this,o)._uiManager.direction?1-s[0]:s[0];e.insetInlineEnd=100*i+"%",e.top=`calc(${100*s[1]}% + var(--editor-toolbar-vert-offset))`}return Ec(this,d,m).call(this),t}get div(){return Bc(this,r)}hide(){var e;Bc(this,r).classList.add("hidden"),null==(e=Bc(this,a))||e.hideDropdown()}show(){var e;Bc(this,r).classList.remove("hidden"),null==(e=Bc(this,A))||e.shown()}async addAltText(e){const t=await e.render();Ec(this,d,f).call(this,t),Bc(this,l).prepend(t,Bc(this,d,C)),bc(this,A,e)}addColorPicker(e){bc(this,a,e);const t=e.renderButton();Ec(this,d,f).call(this,t),Bc(this,l).prepend(t,Bc(this,d,C))}remove(){var e;Bc(this,r).remove(),null==(e=Bc(this,a))||e.destroy(),bc(this,a,null)}};r=new WeakMap,a=new WeakMap,o=new WeakMap,l=new WeakMap,A=new WeakMap,c=new WeakMap,u=new WeakSet,h=function(e){e.stopPropagation()},d=new WeakSet,g=function(e){Bc(this,o)._focusEventsAllowed=!1,e.preventDefault(),e.stopPropagation()},p=function(e){Bc(this,o)._focusEventsAllowed=!0,e.preventDefault(),e.stopPropagation()},f=function(e){const t=Bc(this,o)._uiManager._signal;e.addEventListener("focusin",Ec(this,d,g).bind(this),{capture:!0,signal:t}),e.addEventListener("focusout",Ec(this,d,p).bind(this),{capture:!0,signal:t}),e.addEventListener("contextmenu",_He,{signal:t})},m=function(){const{editorType:e,_uiManager:t}=Bc(this,o),i=document.createElement("button");i.className="delete",i.tabIndex=0,i.setAttribute("data-l10n-id",Bc(RHe,c)[e]),Ec(this,d,f).call(this,i),i.addEventListener("click",(e=>{t.delete()}),{signal:t._signal}),Bc(this,l).append(i)},C=function(){const e=document.createElement("div");return e.className="divider",e},yc(RHe,u),yc(RHe,c,null);let NHe=RHe;class LHe{constructor(e){yc(this,y),yc(this,I,null),yc(this,v,null),yc(this,B),bc(this,B,e)}show(e,t,i){const[n,s]=Ec(this,y,E).call(this,t,i),{style:r}=Bc(this,v)||bc(this,v,Ec(this,y,b).call(this));e.append(Bc(this,v)),r.insetInlineEnd=100*n+"%",r.top=`calc(${100*s}% + var(--editor-toolbar-vert-offset))`}hide(){Bc(this,v).remove()}}function UHe(e,t,i){for(const n of i)t.addEventListener(n,e[n].bind(e))}I=new WeakMap,v=new WeakMap,B=new WeakMap,y=new WeakSet,b=function(){const e=bc(this,v,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",_He,{signal:Bc(this,B)._signal});const t=bc(this,I,document.createElement("div"));return t.className="buttons",e.append(t),Ec(this,y,w).call(this),e},E=function(e,t){let i=0,n=0;for(const s of e){const e=s.y+s.height;if(e<i)continue;const r=s.x+(t?s.width:0);e>i?(n=r,i=e):t?r>n&&(n=r):r<n&&(n=r)}return[t?1-n:n,i]},w=function(){const e=document.createElement("button");e.className="highlightButton",e.tabIndex=0,e.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const t=document.createElement("span");e.append(t),t.className="visuallyHidden",t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const i=Bc(this,B)._signal;e.addEventListener("contextmenu",_He,{signal:i}),e.addEventListener("click",(()=>{Bc(this,B).highlightSelection("floating_button")}),{signal:i}),Bc(this,I).append(e)};class HHe{constructor(){yc(this,Q,0)}get id(){return"pdfjs_internal_editor_"+wc(this,Q)._++}}Q=new WeakMap;const PHe=class{constructor(){yc(this,D),yc(this,S,function(){if("undefined"!=typeof crypto&&"function"==typeof(null==crypto?void 0:crypto.randomUUID))return crypto.randomUUID();const e=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof(null==crypto?void 0:crypto.getRandomValues))crypto.getRandomValues(e);else for(let t=0;t<32;t++)e[t]=Math.floor(255*Math.random());return zUe(e)}()),yc(this,x,0),yc(this,k,null)}static get _isSVGFittingCanvas(){const e=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),t=new Image;t.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>';return OUe(this,"_isSVGFittingCanvas",t.decode().then((()=>(e.drawImage(t,0,0,1,1,0,0,1,3),0===new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0]))))}async getFromFile(e){const{lastModified:t,name:i,size:n,type:s}=e;return Ec(this,D,F).call(this,`${t}_${i}_${n}_${s}`,e)}async getFromUrl(e){return Ec(this,D,F).call(this,e,e)}async getFromBlob(e,t){const i=await t;return Ec(this,D,F).call(this,e,i)}async getFromId(e){Bc(this,k)||bc(this,k,new Map);const t=Bc(this,k).get(e);if(!t)return null;if(t.bitmap)return t.refCounter+=1,t;if(t.file)return this.getFromFile(t.file);if(t.blobPromise){const{blobPromise:e}=t;return delete t.blobPromise,this.getFromBlob(t.id,e)}return this.getFromUrl(t.url)}getFromCanvas(e,t){Bc(this,k)||bc(this,k,new Map);let i=Bc(this,k).get(e);if(null==i?void 0:i.bitmap)return i.refCounter+=1,i;const n=new OffscreenCanvas(t.width,t.height);return n.getContext("2d").drawImage(t,0,0),i={bitmap:n.transferToImageBitmap(),id:`image_${Bc(this,S)}_${wc(this,x)._++}`,refCounter:1,isSvg:!1},Bc(this,k).set(e,i),Bc(this,k).set(i.id,i),i}getSvgUrl(e){const t=Bc(this,k).get(e);return(null==t?void 0:t.isSvg)?t.svgUrl:null}deleteId(e){var t;Bc(this,k)||bc(this,k,new Map);const i=Bc(this,k).get(e);if(!i)return;if(i.refCounter-=1,0!==i.refCounter)return;const{bitmap:n}=i;if(!i.url&&!i.file){const e=new OffscreenCanvas(n.width,n.height);e.getContext("bitmaprenderer").transferFromImageBitmap(n),i.blobPromise=e.convertToBlob()}null==(t=n.close)||t.call(n),i.bitmap=null}isValidId(e){return e.startsWith(`image_${Bc(this,S)}_`)}};S=new WeakMap,x=new WeakMap,k=new WeakMap,D=new WeakSet,F=async function(e,t){Bc(this,k)||bc(this,k,new Map);let i=Bc(this,k).get(e);if(null===i)return null;if(null==i?void 0:i.bitmap)return i.refCounter+=1,i;try{let e;if(i||(i={bitmap:null,id:`image_${Bc(this,S)}_${wc(this,x)._++}`,refCounter:0,isSvg:!1}),"string"==typeof t?(i.url=t,e=await CHe(t,"blob")):t instanceof File?e=i.file=t:t instanceof Blob&&(e=t),"image/svg+xml"===e.type){const t=PHe._isSVGFittingCanvas,n=new FileReader,s=new Image,r=new Promise(((e,r)=>{s.onload=()=>{i.bitmap=s,i.isSvg=!0,e()},n.onload=async()=>{const e=i.svgUrl=n.result;s.src=await t?`${e}#svgView(preserveAspectRatio(none))`:e},s.onerror=n.onerror=r}));n.readAsDataURL(e),await r}else i.bitmap=await createImageBitmap(e);i.refCounter=1}catch(I2){LUe(),i=null}return Bc(this,k).set(e,i),i&&Bc(this,k).set(i.id,i),i};let OHe=PHe;class GHe{constructor(e=128){yc(this,T,[]),yc(this,M,!1),yc(this,R),yc(this,N,-1),bc(this,R,e)}add({cmd:e,undo:t,post:i,mustExec:n,type:s=NaN,overwriteIfSameType:r=!1,keepUndo:a=!1}){if(n&&e(),Bc(this,M))return;const o={cmd:e,undo:t,post:i,type:s};if(-1===Bc(this,N))return Bc(this,T).length>0&&(Bc(this,T).length=0),bc(this,N,0),void Bc(this,T).push(o);if(r&&Bc(this,T)[Bc(this,N)].type===s)return a&&(o.undo=Bc(this,T)[Bc(this,N)].undo),void(Bc(this,T)[Bc(this,N)]=o);const l=Bc(this,N)+1;l===Bc(this,R)?Bc(this,T).splice(0,1):(bc(this,N,l),l<Bc(this,T).length&&Bc(this,T).splice(l)),Bc(this,T).push(o)}undo(){if(-1===Bc(this,N))return;bc(this,M,!0);const{undo:e,post:t}=Bc(this,T)[Bc(this,N)];e(),null==t||t(),bc(this,M,!1),bc(this,N,Bc(this,N)-1)}redo(){if(Bc(this,N)<Bc(this,T).length-1){bc(this,N,Bc(this,N)+1),bc(this,M,!0);const{cmd:e,post:t}=Bc(this,T)[Bc(this,N)];e(),null==t||t(),bc(this,M,!1)}}hasSomethingToUndo(){return-1!==Bc(this,N)}hasSomethingToRedo(){return Bc(this,N)<Bc(this,T).length-1}destroy(){bc(this,T,null)}}T=new WeakMap,M=new WeakMap,R=new WeakMap,N=new WeakMap;class KHe{constructor(e){yc(this,L),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=ZUe.platform;for(const[i,n,s={}]of e)for(const e of i){const i=e.startsWith("mac+");t&&i?(this.callbacks.set(e.slice(4),{callback:n,options:s}),this.allKeys.add(e.split("+").at(-1))):t||i||(this.callbacks.set(e,{callback:n,options:s}),this.allKeys.add(e.split("+").at(-1)))}}exec(e,t){if(!this.allKeys.has(t.key))return;const i=this.callbacks.get(Ec(this,L,U).call(this,t));if(!i)return;const{callback:n,options:{bubbles:s=!1,args:r=[],checker:a=null}}=i;a&&!a(e,t)||(n.bind(e,...r,t)(),s||(t.stopPropagation(),t.preventDefault()))}}L=new WeakSet,U=function(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t};const qHe=class e{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return function(e){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const i of e.keys()){t.style.color=i;const n=window.getComputedStyle(t).color;e.set(i,kHe(n))}t.remove()}(e),OUe(this,"_colors",e)}convert(t){const i=kHe(t);if(!window.matchMedia("(forced-colors: active)").matches)return i;for(const[n,s]of this._colors)if(s.every(((e,t)=>e===i[t])))return e._colorsMapping.get(n);return i}getHexCode(e){const t=this._colors.get(e);return t?tHe.makeHexColor(...t):e}};Ic(qHe,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let YHe=qHe;const VHe=class e{constructor(e,t,i,n,s,r,a,o,l,A,c){yc(this,Qe),yc(this,H,new AbortController),yc(this,P,null),yc(this,O,new Map),yc(this,G,new Map),yc(this,K,null),yc(this,q,null),yc(this,Y,null),yc(this,V,new GHe),yc(this,W,null),yc(this,j,0),yc(this,J,new Set),yc(this,z,null),yc(this,X,null),yc(this,$,new Set),yc(this,Z,!1),yc(this,ee,!1),yc(this,te,!1),yc(this,ie,null),yc(this,ne,null),yc(this,se,null),yc(this,re,null),yc(this,ae,!1),yc(this,oe,null),yc(this,le,new HHe),yc(this,Ae,!1),yc(this,ce,!1),yc(this,ue,null),yc(this,he,null),yc(this,de,null),yc(this,ge,null),yc(this,pe,$Le.NONE),yc(this,fe,new Set),yc(this,me,null),yc(this,Ce,null),yc(this,Ie,null),yc(this,ve,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1}),yc(this,Be,[0,0]),yc(this,ye,null),yc(this,be,null),yc(this,Ee,null),yc(this,we,null);const u=this._signal=Bc(this,H).signal;bc(this,be,e),bc(this,Ee,t),bc(this,K,i),this._eventBus=n,n._on("editingaction",this.onEditingAction.bind(this),{signal:u}),n._on("pagechanging",this.onPageChanging.bind(this),{signal:u}),n._on("scalechanging",this.onScaleChanging.bind(this),{signal:u}),n._on("rotationchanging",this.onRotationChanging.bind(this),{signal:u}),n._on("setpreference",this.onSetPreference.bind(this),{signal:u}),n._on("switchannotationeditorparams",(e=>this.updateParams(e.type,e.value)),{signal:u}),Ec(this,Qe,Fe).call(this),Ec(this,Qe,He).call(this),Ec(this,Qe,Re).call(this),bc(this,q,s.annotationStorage),bc(this,ie,s.filterFactory),bc(this,Ce,r),bc(this,re,a||null),bc(this,Z,o),bc(this,ee,l),bc(this,te,A),bc(this,ge,c||null),this.viewParameters={realScale:mHe.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}static get _keyboardManager(){const t=e.prototype,i=e=>Bc(e,be).contains(document.activeElement)&&"BUTTON"!==document.activeElement.tagName&&e.hasSomethingToControl(),n=(e,{target:t})=>{if(t instanceof HTMLInputElement){const{type:e}=t;return"text"!==e&&"number"!==e}return!0},s=this.TRANSLATE_SMALL,r=this.TRANSLATE_BIG;return OUe(this,"_keyboardManager",new KHe([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:n}],[["ctrl+z","mac+meta+z"],t.undo,{checker:n}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:n}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:n}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(e,{target:t})=>!(t instanceof HTMLButtonElement)&&Bc(e,be).contains(t)&&!e.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(e,{target:t})=>!(t instanceof HTMLButtonElement)&&Bc(e,be).contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-s,0],checker:i}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-r,0],checker:i}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[s,0],checker:i}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[r,0],checker:i}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-s],checker:i}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-r],checker:i}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,s],checker:i}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,r],checker:i}]]))}destroy(){var e,t,i,n;null==(e=Bc(this,we))||e.resolve(),bc(this,we,null),null==(t=Bc(this,H))||t.abort(),bc(this,H,null),this._signal=null;for(const s of Bc(this,G).values())s.destroy();Bc(this,G).clear(),Bc(this,O).clear(),Bc(this,$).clear(),bc(this,P,null),Bc(this,fe).clear(),Bc(this,V).destroy(),null==(i=Bc(this,K))||i.destroy(),null==(n=Bc(this,oe))||n.hide(),bc(this,oe,null),Bc(this,ne)&&(clearTimeout(Bc(this,ne)),bc(this,ne,null)),Bc(this,ye)&&(clearTimeout(Bc(this,ye)),bc(this,ye,null))}combinedSignal(e){return AbortSignal.any([this._signal,e.signal])}get mlManager(){return Bc(this,ge)}get useNewAltTextFlow(){return Bc(this,ee)}get useNewAltTextWhenAddingImage(){return Bc(this,te)}get hcmFilter(){return OUe(this,"hcmFilter",Bc(this,Ce)?Bc(this,ie).addHCMFilter(Bc(this,Ce).foreground,Bc(this,Ce).background):"none")}get direction(){return OUe(this,"direction",getComputedStyle(Bc(this,be)).direction)}get highlightColors(){return OUe(this,"highlightColors",Bc(this,re)?new Map(Bc(this,re).split(",").map((e=>e.split("=").map((e=>e.trim()))))):null)}get highlightColorNames(){return OUe(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,(e=>e.reverse()))):null)}setMainHighlightColorPicker(e){bc(this,de,e)}editAltText(e,t=!1){var i;null==(i=Bc(this,K))||i.editAltText(this,e,t)}switchToMode(e,t){this._eventBus.on("annotationeditormodechanged",t,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:e})}setPreference(e,t){this._eventBus.dispatch("setpreference",{source:this,name:e,value:t})}onSetPreference({name:e,value:t}){if("enableNewAltTextWhenAddingImage"===e)bc(this,te,t)}onPageChanging({pageNumber:e}){bc(this,j,e-1)}focusMainContainer(){Bc(this,be).focus()}findParent(e,t){for(const i of Bc(this,G).values()){const{x:n,y:s,width:r,height:a}=i.div.getBoundingClientRect();if(e>=n&&e<=n+r&&t>=s&&t<=s+a)return i}return null}disableUserSelect(e=!1){Bc(this,Ee).classList.toggle("noUserSelect",e)}addShouldRescale(e){Bc(this,$).add(e)}removeShouldRescale(e){Bc(this,$).delete(e)}onScaleChanging({scale:e}){this.commitOrRemove(),this.viewParameters.realScale=e*mHe.PDF_TO_CSS_UNITS;for(const t of Bc(this,$))t.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}highlightSelection(e=""){const t=document.getSelection();if(!t||t.isCollapsed)return;const{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r}=t,a=t.toString(),o=Ec(this,Qe,_e).call(this,t).closest(".textLayer"),l=this.getSelectionBoxes(o);if(!l)return;t.empty();const A=Ec(this,Qe,Se).call(this,o),c=Bc(this,pe)===$Le.NONE,u=()=>{null==A||A.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:l,anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r,text:a}),c&&this.showAllEditors("highlight",!0,!0)};c?this.switchToMode($Le.HIGHLIGHT,u):u()}addToAnnotationStorage(e){e.isEmpty()||!Bc(this,q)||Bc(this,q).has(e.id)||Bc(this,q).setValue(e.id,e)}blur(){if(this.isShiftKeyDown=!1,Bc(this,ae)&&(bc(this,ae,!1),Ec(this,Qe,De).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:e}=document;for(const t of Bc(this,fe))if(t.div.contains(e)){bc(this,he,[t,e]),t._focusEventsAllowed=!1;break}}focus(){if(!Bc(this,he))return;const[e,t]=Bc(this,he);bc(this,he,null),t.addEventListener("focusin",(()=>{e._focusEventsAllowed=!0}),{once:!0,signal:this._signal}),t.focus()}addEditListeners(){Ec(this,Qe,Re).call(this),Ec(this,Qe,Le).call(this)}removeEditListeners(){Ec(this,Qe,Ne).call(this),Ec(this,Qe,Ue).call(this)}dragOver(e){for(const{type:t}of e.dataTransfer.items)for(const i of Bc(this,X))if(i.isHandlingMimeForPasting(t))return e.dataTransfer.dropEffect="copy",void e.preventDefault()}drop(e){for(const t of e.dataTransfer.items)for(const i of Bc(this,X))if(i.isHandlingMimeForPasting(t.type))return i.paste(t,this.currentLayer),void e.preventDefault()}copy(e){var t;if(e.preventDefault(),null==(t=Bc(this,P))||t.commitOrRemove(),!this.hasSelection)return;const i=[];for(const n of Bc(this,fe)){const e=n.serialize(!0);e&&i.push(e)}0!==i.length&&e.clipboardData.setData("application/pdfjs",JSON.stringify(i))}cut(e){this.copy(e),this.delete()}async paste(e){e.preventDefault();const{clipboardData:t}=e;for(const r of t.items)for(const e of Bc(this,X))if(e.isHandlingMimeForPasting(r.type))return void e.paste(r,this.currentLayer);let i=t.getData("application/pdfjs");if(!i)return;try{i=JSON.parse(i)}catch(s){return void LUe(s.message)}if(!Array.isArray(i))return;this.unselectAll();const n=this.currentLayer;try{const e=[];for(const r of i){const t=await n.deserialize(r);if(!t)return;e.push(t)}const t=()=>{for(const t of e)Ec(this,Qe,qe).call(this,t);Ec(this,Qe,We).call(this,e)},s=()=>{for(const t of e)t.remove()};this.addCommands({cmd:t,undo:s,mustExec:!0})}catch(s){LUe(s.message)}}keydown(t){this.isShiftKeyDown||"Shift"!==t.key||(this.isShiftKeyDown=!0),Bc(this,pe)===$Le.NONE||this.isEditorHandlingKeyboard||e._keyboardManager.exec(this,t)}keyup(e){this.isShiftKeyDown&&"Shift"===e.key&&(this.isShiftKeyDown=!1,Bc(this,ae)&&(bc(this,ae,!1),Ec(this,Qe,De).call(this,"main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu")}}setEditingState(e){e?(Ec(this,Qe,Te).call(this),Ec(this,Qe,Le).call(this),Ec(this,Qe,Pe).call(this,{isEditing:Bc(this,pe)!==$Le.NONE,isEmpty:Ec(this,Qe,Ve).call(this),hasSomethingToUndo:Bc(this,V).hasSomethingToUndo(),hasSomethingToRedo:Bc(this,V).hasSomethingToRedo(),hasSelectedEditor:!1})):(Ec(this,Qe,Me).call(this),Ec(this,Qe,Ue).call(this),Ec(this,Qe,Pe).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!Bc(this,X)){bc(this,X,e);for(const e of Bc(this,X))Ec(this,Qe,Oe).call(this,e.defaultPropertiesToUpdate)}}getId(){return Bc(this,le).id}get currentLayer(){return Bc(this,G).get(Bc(this,j))}getLayer(e){return Bc(this,G).get(e)}get currentPageIndex(){return Bc(this,j)}addLayer(e){Bc(this,G).set(e.pageIndex,e),Bc(this,Ae)?e.enable():e.disable()}removeLayer(e){Bc(this,G).delete(e.pageIndex)}async updateMode(e,t=null,i=!1){if(Bc(this,pe)!==e&&(!Bc(this,we)||(await Bc(this,we).promise,Bc(this,we)))){if(bc(this,we,Promise.withResolvers()),bc(this,pe,e),e===$Le.NONE)return this.setEditingState(!1),Ec(this,Qe,Ke).call(this),void Bc(this,we).resolve();this.setEditingState(!0),await Ec(this,Qe,Ge).call(this),this.unselectAll();for(const t of Bc(this,G).values())t.updateMode(e);if(!t)return i&&this.addNewEditorFromKeyboard(),void Bc(this,we).resolve();for(const e of Bc(this,O).values())e.annotationElementId===t?(this.setSelected(e),e.enterInEditMode()):e.unselect();Bc(this,we).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e!==Bc(this,pe)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){var i;if(Bc(this,X)){switch(e){case ZLe.CREATE:return void this.currentLayer.addNewEditor();case ZLe.HIGHLIGHT_DEFAULT_COLOR:null==(i=Bc(this,de))||i.updateColor(t);break;case ZLe.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(Bc(this,Ie)||bc(this,Ie,new Map)).set(e,t),this.showAllEditors("highlight",t)}for(const i of Bc(this,fe))i.updateParams(e,t);for(const i of Bc(this,X))i.updateDefaultParams(e,t)}}showAllEditors(e,t,i=!1){var n;for(const s of Bc(this,O).values())s.editorType===e&&s.show(t);((null==(n=Bc(this,Ie))?void 0:n.get(ZLe.HIGHLIGHT_SHOW_ALL))??!0)!==t&&Ec(this,Qe,Oe).call(this,[[ZLe.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(e=!1){if(Bc(this,ce)!==e){bc(this,ce,e);for(const t of Bc(this,G).values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}getEditors(e){const t=[];for(const i of Bc(this,O).values())i.pageIndex===e&&t.push(i);return t}getEditor(e){return Bc(this,O).get(e)}addEditor(e){Bc(this,O).set(e.id,e)}removeEditor(e){var t;e.div.contains(document.activeElement)&&(Bc(this,ne)&&clearTimeout(Bc(this,ne)),bc(this,ne,setTimeout((()=>{this.focusMainContainer(),bc(this,ne,null)}),0))),Bc(this,O).delete(e.id),this.unselect(e),e.annotationElementId&&Bc(this,J).has(e.annotationElementId)||null==(t=Bc(this,q))||t.remove(e.id)}addDeletedAnnotationElement(e){Bc(this,J).add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return Bc(this,J).has(e)}removeDeletedAnnotationElement(e){Bc(this,J).delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}setActiveEditor(e){Bc(this,P)!==e&&(bc(this,P,e),e&&Ec(this,Qe,Oe).call(this,e.propertiesToUpdate))}updateUI(e){Bc(this,Qe,Ye)===e&&Ec(this,Qe,Oe).call(this,e.propertiesToUpdate)}toggleSelected(e){if(Bc(this,fe).has(e))return Bc(this,fe).delete(e),e.unselect(),void Ec(this,Qe,Pe).call(this,{hasSelectedEditor:this.hasSelection});Bc(this,fe).add(e),e.select(),Ec(this,Qe,Oe).call(this,e.propertiesToUpdate),Ec(this,Qe,Pe).call(this,{hasSelectedEditor:!0})}setSelected(e){for(const t of Bc(this,fe))t!==e&&t.unselect();Bc(this,fe).clear(),Bc(this,fe).add(e),e.select(),Ec(this,Qe,Oe).call(this,e.propertiesToUpdate),Ec(this,Qe,Pe).call(this,{hasSelectedEditor:!0})}isSelected(e){return Bc(this,fe).has(e)}get firstSelectedEditor(){return Bc(this,fe).values().next().value}unselect(e){e.unselect(),Bc(this,fe).delete(e),Ec(this,Qe,Pe).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==Bc(this,fe).size}get isEnterHandled(){return 1===Bc(this,fe).size&&this.firstSelectedEditor.isEnterHandled}undo(){Bc(this,V).undo(),Ec(this,Qe,Pe).call(this,{hasSomethingToUndo:Bc(this,V).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:Ec(this,Qe,Ve).call(this)})}redo(){Bc(this,V).redo(),Ec(this,Qe,Pe).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:Bc(this,V).hasSomethingToRedo(),isEmpty:Ec(this,Qe,Ve).call(this)})}addCommands(e){Bc(this,V).add(e),Ec(this,Qe,Pe).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:Ec(this,Qe,Ve).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const e=[...Bc(this,fe)];this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)Ec(this,Qe,qe).call(this,t)},mustExec:!0})}commitOrRemove(){var e;null==(e=Bc(this,P))||e.commitOrRemove()}hasSomethingToControl(){return Bc(this,P)||this.hasSelection}selectAll(){for(const e of Bc(this,fe))e.commit();Ec(this,Qe,We).call(this,Bc(this,O).values())}unselectAll(){if((!Bc(this,P)||(Bc(this,P).commitOrRemove(),Bc(this,pe)===$Le.NONE))&&this.hasSelection){for(const e of Bc(this,fe))e.unselect();Bc(this,fe).clear(),Ec(this,Qe,Pe).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(e,t,i=!1){if(i||this.commitOrRemove(),!this.hasSelection)return;Bc(this,Be)[0]+=e,Bc(this,Be)[1]+=t;const[n,s]=Bc(this,Be),r=[...Bc(this,fe)];Bc(this,ye)&&clearTimeout(Bc(this,ye)),bc(this,ye,setTimeout((()=>{bc(this,ye,null),Bc(this,Be)[0]=Bc(this,Be)[1]=0,this.addCommands({cmd:()=>{for(const e of r)Bc(this,O).has(e.id)&&e.translateInPage(n,s)},undo:()=>{for(const e of r)Bc(this,O).has(e.id)&&e.translateInPage(-n,-s)},mustExec:!1})}),1e3));for(const a of r)a.translateInPage(e,t)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),bc(this,z,new Map);for(const e of Bc(this,fe))Bc(this,z).set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!Bc(this,z))return!1;this.disableUserSelect(!1);const e=Bc(this,z);bc(this,z,null);let t=!1;for(const[{x:n,y:s,pageIndex:r},a]of e)a.newX=n,a.newY=s,a.newPageIndex=r,t||(t=n!==a.savedX||s!==a.savedY||r!==a.savedPageIndex);if(!t)return!1;const i=(e,t,i,n)=>{if(Bc(this,O).has(e.id)){const s=Bc(this,G).get(n);s?e._setParentAndPosition(s,t,i):(e.pageIndex=n,e.x=t,e.y=i)}};return this.addCommands({cmd:()=>{for(const[t,{newX:n,newY:s,newPageIndex:r}]of e)i(t,n,s,r)},undo:()=>{for(const[t,{savedX:n,savedY:s,savedPageIndex:r}]of e)i(t,n,s,r)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(Bc(this,z))for(const i of Bc(this,z).keys())i.drag(e,t)}rebuild(e){if(null===e.parent){const t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){var e;return(null==(e=this.getActive())?void 0:e.shouldGetKeyboardEvents())||1===Bc(this,fe).size&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return Bc(this,P)===e}getActive(){return Bc(this,P)}getMode(){return Bc(this,pe)}get imageManager(){return OUe(this,"imageManager",new OHe)}getSelectionBoxes(e){if(!e)return null;const t=document.getSelection();for(let l=0,A=t.rangeCount;l<A;l++)if(!e.contains(t.getRangeAt(l).commonAncestorContainer))return null;const{x:i,y:n,width:s,height:r}=e.getBoundingClientRect();let a;switch(e.getAttribute("data-main-rotation")){case"90":a=(e,t,a,o)=>({x:(t-n)/r,y:1-(e+a-i)/s,width:o/r,height:a/s});break;case"180":a=(e,t,a,o)=>({x:1-(e+a-i)/s,y:1-(t+o-n)/r,width:a/s,height:o/r});break;case"270":a=(e,t,a,o)=>({x:1-(t+o-n)/r,y:(e-i)/s,width:o/r,height:a/s});break;default:a=(e,t,a,o)=>({x:(e-i)/s,y:(t-n)/r,width:a/s,height:o/r})}const o=[];for(let l=0,A=t.rangeCount;l<A;l++){const e=t.getRangeAt(l);if(!e.collapsed)for(const{x:t,y:i,width:n,height:s}of e.getClientRects())0!==n&&0!==s&&o.push(a(t,i,n,s))}return 0===o.length?null:o}addChangedExistingAnnotation({annotationElementId:e,id:t}){(Bc(this,Y)||bc(this,Y,new Map)).set(e,t)}removeChangedExistingAnnotation({annotationElementId:e}){var t;null==(t=Bc(this,Y))||t.delete(e)}renderAnnotationElement(e){var t;const i=null==(t=Bc(this,Y))?void 0:t.get(e.data.id);if(!i)return;const n=Bc(this,q).getRawValue(i);n&&(Bc(this,pe)!==$Le.NONE||n.hasBeenModified)&&n.renderAnnotationElement(e)}};H=new WeakMap,P=new WeakMap,O=new WeakMap,G=new WeakMap,K=new WeakMap,q=new WeakMap,Y=new WeakMap,V=new WeakMap,W=new WeakMap,j=new WeakMap,J=new WeakMap,z=new WeakMap,X=new WeakMap,$=new WeakMap,Z=new WeakMap,ee=new WeakMap,te=new WeakMap,ie=new WeakMap,ne=new WeakMap,se=new WeakMap,re=new WeakMap,ae=new WeakMap,oe=new WeakMap,le=new WeakMap,Ae=new WeakMap,ce=new WeakMap,ue=new WeakMap,he=new WeakMap,de=new WeakMap,ge=new WeakMap,pe=new WeakMap,fe=new WeakMap,me=new WeakMap,Ce=new WeakMap,Ie=new WeakMap,ve=new WeakMap,Be=new WeakMap,ye=new WeakMap,be=new WeakMap,Ee=new WeakMap,we=new WeakMap,Qe=new WeakSet,_e=function({anchorNode:e}){return e.nodeType===Node.TEXT_NODE?e.parentElement:e},Se=function(e){const{currentLayer:t}=this;if(t.hasTextLayer(e))return t;for(const i of Bc(this,G).values())if(i.hasTextLayer(e))return i;return null},xe=function(){const e=document.getSelection();if(!e||e.isCollapsed)return;const t=Ec(this,Qe,_e).call(this,e).closest(".textLayer"),i=this.getSelectionBoxes(t);i&&(Bc(this,oe)||bc(this,oe,new LHe(this)),Bc(this,oe).show(t,i,"ltr"===this.direction))},ke=function(){var e,t,i;const n=document.getSelection();if(!n||n.isCollapsed)return void(Bc(this,me)&&(null==(e=Bc(this,oe))||e.hide(),bc(this,me,null),Ec(this,Qe,Pe).call(this,{hasSelectedText:!1})));const{anchorNode:s}=n;if(s===Bc(this,me))return;const r=Ec(this,Qe,_e).call(this,n).closest(".textLayer");if(r){if(null==(i=Bc(this,oe))||i.hide(),bc(this,me,s),Ec(this,Qe,Pe).call(this,{hasSelectedText:!0}),(Bc(this,pe)===$Le.HIGHLIGHT||Bc(this,pe)===$Le.NONE)&&(Bc(this,pe)===$Le.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),bc(this,ae,this.isShiftKeyDown),!this.isShiftKeyDown)){const e=Bc(this,pe)===$Le.HIGHLIGHT?Ec(this,Qe,Se).call(this,r):null;null==e||e.toggleDrawing();const t=new AbortController,i=this.combinedSignal(t),n=i=>{"pointerup"===i.type&&0!==i.button||(t.abort(),null==e||e.toggleDrawing(!0),"pointerup"===i.type&&Ec(this,Qe,De).call(this,"main_toolbar"))};window.addEventListener("pointerup",n,{signal:i}),window.addEventListener("blur",n,{signal:i})}}else Bc(this,me)&&(null==(t=Bc(this,oe))||t.hide(),bc(this,me,null),Ec(this,Qe,Pe).call(this,{hasSelectedText:!1}))},De=function(e=""){Bc(this,pe)===$Le.HIGHLIGHT?this.highlightSelection(e):Bc(this,Z)&&Ec(this,Qe,xe).call(this)},Fe=function(){document.addEventListener("selectionchange",Ec(this,Qe,ke).bind(this),{signal:this._signal})},Te=function(){if(Bc(this,se))return;bc(this,se,new AbortController);const e=this.combinedSignal(Bc(this,se));window.addEventListener("focus",this.focus.bind(this),{signal:e}),window.addEventListener("blur",this.blur.bind(this),{signal:e})},Me=function(){var e;null==(e=Bc(this,se))||e.abort(),bc(this,se,null)},Re=function(){if(Bc(this,ue))return;bc(this,ue,new AbortController);const e=this.combinedSignal(Bc(this,ue));window.addEventListener("keydown",this.keydown.bind(this),{signal:e}),window.addEventListener("keyup",this.keyup.bind(this),{signal:e})},Ne=function(){var e;null==(e=Bc(this,ue))||e.abort(),bc(this,ue,null)},Le=function(){if(Bc(this,W))return;bc(this,W,new AbortController);const e=this.combinedSignal(Bc(this,W));document.addEventListener("copy",this.copy.bind(this),{signal:e}),document.addEventListener("cut",this.cut.bind(this),{signal:e}),document.addEventListener("paste",this.paste.bind(this),{signal:e})},Ue=function(){var e;null==(e=Bc(this,W))||e.abort(),bc(this,W,null)},He=function(){const e=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e}),document.addEventListener("drop",this.drop.bind(this),{signal:e})},Pe=function(e){Object.entries(e).some((([e,t])=>Bc(this,ve)[e]!==t))&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(Bc(this,ve),e)}),Bc(this,pe)===$Le.HIGHLIGHT&&!1===e.hasSelectedEditor&&Ec(this,Qe,Oe).call(this,[[ZLe.HIGHLIGHT_FREE,!0]]))},Oe=function(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})},Ge=async function(){if(!Bc(this,Ae)){bc(this,Ae,!0);const e=[];for(const t of Bc(this,G).values())e.push(t.enable());await Promise.all(e);for(const t of Bc(this,O).values())t.enable()}},Ke=function(){if(this.unselectAll(),Bc(this,Ae)){bc(this,Ae,!1);for(const e of Bc(this,G).values())e.disable();for(const e of Bc(this,O).values())e.disable()}},qe=function(e){const t=Bc(this,G).get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))},Ye=function(){let e=null;for(e of Bc(this,fe));return e},Ve=function(){if(0===Bc(this,O).size)return!0;if(1===Bc(this,O).size)for(const e of Bc(this,O).values())return e.isEmpty();return!1},We=function(e){for(const t of Bc(this,fe))t.unselect();Bc(this,fe).clear();for(const t of e)t.isEmpty()||(Bc(this,fe).add(t),t.select());Ec(this,Qe,Pe).call(this,{hasSelectedEditor:this.hasSelection})},Ic(VHe,"TRANSLATE_SMALL",1),Ic(VHe,"TRANSLATE_BIG",10);let WHe=VHe;const jHe=class e{constructor(t){yc(this,ot),yc(this,je,null),yc(this,Je,!1),yc(this,ze,null),yc(this,Xe,null),yc(this,$e,null),yc(this,Ze,null),yc(this,et,!1),yc(this,tt,null),yc(this,it,null),yc(this,nt,null),yc(this,st,null),yc(this,rt,!1),bc(this,it,t),bc(this,rt,t._uiManager.useNewAltTextFlow),Bc(e,at)||bc(e,at,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(t){e._l10n??(e._l10n=t)}async render(){const t=bc(this,ze,document.createElement("button"));t.className="altText",t.tabIndex="0";const i=bc(this,Xe,document.createElement("span"));t.append(i),Bc(this,rt)?(t.classList.add("new"),t.setAttribute("data-l10n-id",Bc(e,at).missing),i.setAttribute("data-l10n-id",Bc(e,at)["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),i.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const n=Bc(this,it)._uiManager._signal;t.addEventListener("contextmenu",_He,{signal:n}),t.addEventListener("pointerdown",(e=>e.stopPropagation()),{signal:n});const s=e=>{e.preventDefault(),Bc(this,it)._uiManager.editAltText(Bc(this,it)),Bc(this,rt)&&Bc(this,it)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:Bc(this,ot,lt)}})};return t.addEventListener("click",s,{capture:!0,signal:n}),t.addEventListener("keydown",(e=>{e.target===t&&"Enter"===e.key&&(bc(this,et,!0),s(e))}),{signal:n}),await Ec(this,ot,At).call(this),t}finish(){Bc(this,ze)&&(Bc(this,ze).focus({focusVisible:Bc(this,et)}),bc(this,et,!1))}isEmpty(){return Bc(this,rt)?null===Bc(this,je):!Bc(this,je)&&!Bc(this,Je)}hasData(){return Bc(this,rt)?null!==Bc(this,je)||!!Bc(this,nt):this.isEmpty()}get guessedText(){return Bc(this,nt)}async setGuessedText(t){null===Bc(this,je)&&(bc(this,nt,t),bc(this,st,await e._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t})),Ec(this,ot,At).call(this))}toggleAltTextBadge(e=!1){var t;if(!Bc(this,rt)||Bc(this,je))return null==(t=Bc(this,tt))||t.remove(),void bc(this,tt,null);if(!Bc(this,tt)){const e=bc(this,tt,document.createElement("div"));e.className="noAltTextBadge",Bc(this,it).div.append(e)}Bc(this,tt).classList.toggle("hidden",!e)}serialize(e){let t=Bc(this,je);return e||Bc(this,nt)!==t||(t=Bc(this,st)),{altText:t,decorative:Bc(this,Je),guessedText:Bc(this,nt),textWithDisclaimer:Bc(this,st)}}get data(){return{altText:Bc(this,je),decorative:Bc(this,Je)}}set data({altText:e,decorative:t,guessedText:i,textWithDisclaimer:n,cancel:s=!1}){i&&(bc(this,nt,i),bc(this,st,n)),Bc(this,je)===e&&Bc(this,Je)===t||(s||(bc(this,je,e),bc(this,Je,t)),Ec(this,ot,At).call(this))}toggle(e=!1){Bc(this,ze)&&(!e&&Bc(this,Ze)&&(clearTimeout(Bc(this,Ze)),bc(this,Ze,null)),Bc(this,ze).disabled=!e)}shown(){Bc(this,it)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:Bc(this,ot,lt)}})}destroy(){var e,t;null==(e=Bc(this,ze))||e.remove(),bc(this,ze,null),bc(this,Xe,null),bc(this,$e,null),null==(t=Bc(this,tt))||t.remove(),bc(this,tt,null)}};je=new WeakMap,Je=new WeakMap,ze=new WeakMap,Xe=new WeakMap,$e=new WeakMap,Ze=new WeakMap,et=new WeakMap,tt=new WeakMap,it=new WeakMap,nt=new WeakMap,st=new WeakMap,rt=new WeakMap,at=new WeakMap,ot=new WeakSet,lt=function(){return(Bc(this,je)?"added":null===Bc(this,je)&&this.guessedText&&"review")||"missing"},At=async function(){var e,t,i;const n=Bc(this,ze);if(!n)return;if(Bc(this,rt)){if(n.classList.toggle("done",!!Bc(this,je)),n.setAttribute("data-l10n-id",Bc(jHe,at)[Bc(this,ot,lt)]),null==(e=Bc(this,Xe))||e.setAttribute("data-l10n-id",Bc(jHe,at)[`${Bc(this,ot,lt)}-label`]),!Bc(this,je))return void(null==(t=Bc(this,$e))||t.remove())}else{if(!Bc(this,je)&&!Bc(this,Je))return n.classList.remove("done"),void(null==(i=Bc(this,$e))||i.remove());n.classList.add("done"),n.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let s=Bc(this,$e);if(!s){bc(this,$e,s=document.createElement("span")),s.className="tooltip",s.setAttribute("role","tooltip"),s.id=`alt-text-tooltip-${Bc(this,it).id}`;const e=100,t=Bc(this,it)._uiManager._signal;t.addEventListener("abort",(()=>{clearTimeout(Bc(this,Ze)),bc(this,Ze,null)}),{once:!0}),n.addEventListener("mouseenter",(()=>{bc(this,Ze,setTimeout((()=>{bc(this,Ze,null),Bc(this,$e).classList.add("show"),Bc(this,it)._reportTelemetry({action:"alt_text_tooltip"})}),e))}),{signal:t}),n.addEventListener("mouseleave",(()=>{var e;Bc(this,Ze)&&(clearTimeout(Bc(this,Ze)),bc(this,Ze,null)),null==(e=Bc(this,$e))||e.classList.remove("show")}),{signal:t})}Bc(this,Je)?s.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(s.removeAttribute("data-l10n-id"),s.textContent=Bc(this,je)),s.parentNode||n.append(s);const r=Bc(this,it).getImageForAltText();null==r||r.setAttribute("aria-describedby",s.id)},yc(jHe,at,null),Ic(jHe,"_l10n",null);let JHe=jHe;const zHe=class e{constructor(t){yc(this,kt),yc(this,ct,null),yc(this,ut,null),yc(this,ht,null),yc(this,dt,!1),yc(this,gt,!1),yc(this,pt,null),yc(this,ft,null),yc(this,mt,null),yc(this,Ct,""),yc(this,It,!1),yc(this,vt,null),yc(this,Bt,!1),yc(this,yt,!1),yc(this,bt,!1),yc(this,Et,null),yc(this,wt,0),yc(this,Qt,0),yc(this,_t,null),Ic(this,"_editToolbar",null),Ic(this,"_initialOptions",Object.create(null)),Ic(this,"_initialData",null),Ic(this,"_isVisible",!0),Ic(this,"_uiManager",null),Ic(this,"_focusEventsAllowed",!0),yc(this,St,!1),yc(this,xt,e._zIndex++),this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;const{rotation:i,rawDims:{pageWidth:n,pageHeight:s,pageX:r,pageY:a}}=this.parent.viewport;this.rotation=i,this.pageRotation=(360+i-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[n,s],this.pageTranslation=[r,a];const[o,l]=this.parentDimensions;this.x=t.x/o,this.y=t.y/l,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const t=e.prototype._resizeWithKeyboard,i=WHe.TRANSLATE_SMALL,n=WHe.TRANSLATE_BIG;return OUe(this,"_resizerKeyboardManager",new KHe([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-i,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-n,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[i,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[n,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-i]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-n]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,i]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,n]}],[["Escape","mac+Escape"],e.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return OUe(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){const t=new $He({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(t,i){if(e._l10n??(e._l10n=t),e._l10nResizer||(e._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),-1!==e._borderLineWidth)return;const n=getComputedStyle(document.documentElement);e._borderLineWidth=parseFloat(n.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){UUe("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return Bc(this,St)}set _isDraggable(e){var t;bc(this,St,e),null==(t=this.div)||t.classList.toggle("draggable",e)}get isEnterHandled(){return!0}center(){const[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(2*e),this.y+=this.width*e/(2*t);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(2*e),this.y-=this.width*e/(2*t);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=Bc(this,xt)}setParent(e){null!==e?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):Ec(this,kt,Vt).call(this),this.parent=e}focusin(e){this._focusEventsAllowed&&(Bc(this,It)?bc(this,It,!1):this.parent.setSelected(this))}focusout(e){var t;if(!this._focusEventsAllowed)return;if(!this.isAttachedToDOM)return;const i=e.relatedTarget;(null==i?void 0:i.closest(`#${this.id}`))||(e.preventDefault(),(null==(t=this.parent)?void 0:t.isMultipleSelection)||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,i,n){const[s,r]=this.parentDimensions;[i,n]=this.screenToPageTranslation(i,n),this.x=(e+i)/s,this.y=(t+n)/r,this.fixAndSetPosition()}translate(e,t){Ec(this,kt,Dt).call(this,this.parentDimensions,e,t)}translateInPage(e,t){Bc(this,vt)||bc(this,vt,[this.x,this.y]),Ec(this,kt,Dt).call(this,this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){Bc(this,vt)||bc(this,vt,[this.x,this.y]);const[i,n]=this.parentDimensions;if(this.x+=e/i,this.y+=t/n,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:e,y:t}=this.div.getBoundingClientRect();this.parent.findNewParent(this,e,t)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:s,y:r}=this;const[a,o]=this.getBaseTranslation();s+=a,r+=o,this.div.style.left=`${(100*s).toFixed(2)}%`,this.div.style.top=`${(100*r).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!Bc(this,vt)&&(Bc(this,vt)[0]!==this.x||Bc(this,vt)[1]!==this.y)}getBaseTranslation(){const[t,i]=this.parentDimensions,{_borderLineWidth:n}=e,s=n/t,r=n/i;switch(this.rotation){case 90:return[-s,r];case 180:return[s,r];case 270:return[s,-r];default:return[-s,-r]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){const[t,i]=this.pageDimensions;let{x:n,y:s,width:r,height:a}=this;if(r*=t,a*=i,n*=t,s*=i,this._mustFixPosition)switch(e){case 0:n=Math.max(0,Math.min(t-r,n)),s=Math.max(0,Math.min(i-a,s));break;case 90:n=Math.max(0,Math.min(t-a,n)),s=Math.min(i,Math.max(r,s));break;case 180:n=Math.min(t,Math.max(r,n)),s=Math.min(i,Math.max(a,s));break;case 270:n=Math.min(t,Math.max(a,n)),s=Math.max(0,Math.min(i-r,s))}this.x=n/=t,this.y=s/=i;const[o,l]=this.getBaseTranslation();n+=o,s+=l;const{style:A}=this.div;A.left=`${(100*n).toFixed(2)}%`,A.top=`${(100*s).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(t,i){var n;return Ec(n=e,Ft,Tt).call(n,t,i,this.parentRotation)}pageTranslationToScreen(t,i){var n;return Ec(n=e,Ft,Tt).call(n,t,i,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[t,i]}=this;return[t*e,i*e]}setDims(e,t){const[i,n]=this.parentDimensions;this.div.style.width=`${(100*e/i).toFixed(2)}%`,Bc(this,gt)||(this.div.style.height=`${(100*t/n).toFixed(2)}%`)}fixDims(){const{style:e}=this.div,{height:t,width:i}=e,n=i.endsWith("%"),s=!Bc(this,gt)&&t.endsWith("%");if(n&&s)return;const[r,a]=this.parentDimensions;n||(e.width=`${(100*parseFloat(i)/r).toFixed(2)}%`),Bc(this,gt)||s||(e.height=`${(100*parseFloat(t)/a).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}altTextFinish(){var e;null==(e=Bc(this,ht))||e.finish()}async addEditToolbar(){return this._editToolbar||Bc(this,yt)||(this._editToolbar=new NHe(this),this.div.append(this._editToolbar.render()),Bc(this,ht)&&await this._editToolbar.addAltText(Bc(this,ht))),this._editToolbar}removeEditToolbar(){var e;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,null==(e=Bc(this,ht))||e.destroy())}addContainer(e){var t;const i=null==(t=this._editToolbar)?void 0:t.div;i?i.before(e):this.div.append(e)}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){Bc(this,ht)||(JHe.initialize(e._l10n),bc(this,ht,new JHe(this)),Bc(this,ct)&&(Bc(this,ht).data=Bc(this,ct),bc(this,ct,null)),await this.addEditToolbar())}get altTextData(){var e;return null==(e=Bc(this,ht))?void 0:e.data}set altTextData(e){Bc(this,ht)&&(Bc(this,ht).data=e)}get guessedAltText(){var e;return null==(e=Bc(this,ht))?void 0:e.guessedText}async setGuessedAltText(e){var t;await(null==(t=Bc(this,ht))?void 0:t.setGuessedText(e))}serializeAltText(e){var t;return null==(t=Bc(this,ht))?void 0:t.serialize(e)}hasAltText(){return!!Bc(this,ht)&&!Bc(this,ht).isEmpty()}hasAltTextData(){var e;return(null==(e=Bc(this,ht))?void 0:e.hasData())??!1}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=Bc(this,dt)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),Ec(this,kt,Ot).call(this);const[e,t]=this.parentDimensions;this.parentRotation%180!=0&&(this.div.style.maxWidth=`${(100*t/e).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e/t).toFixed(2)}%`);const[i,n]=this.getInitialTranslation();return this.translate(i,n),UHe(this,this.div,["pointerdown"]),this.div}pointerdown(e){const{isMac:t}=ZUe.platform;0!==e.button||e.ctrlKey&&t?e.preventDefault():(bc(this,It,!0),this._isDraggable?Ec(this,kt,Pt).call(this,e):Ec(this,kt,Ht).call(this,e))}get isSelected(){return this._uiManager.isSelected(this)}moveInDOM(){Bc(this,Et)&&clearTimeout(Bc(this,Et)),bc(this,Et,setTimeout((()=>{var e;bc(this,Et,null),null==(e=this.parent)||e.moveEditorInDOM(this)}),0))}_setParentAndPosition(e,t,i){e.changeParent(this),this.x=t,this.y=i,this.fixAndSetPosition()}getRect(e,t,i=this.rotation){const n=this.parentScale,[s,r]=this.pageDimensions,[a,o]=this.pageTranslation,l=e/n,A=t/n,c=this.x*s,u=this.y*r,h=this.width*s,d=this.height*r;switch(i){case 0:return[c+l+a,r-u-A-d+o,c+l+h+a,r-u-A+o];case 90:return[c+A+a,r-u+l+o,c+A+d+a,r-u+l+h+o];case 180:return[c-l-h+a,r-u+A+o,c-l+a,r-u+A+d+o];case 270:return[c-A-d+a,r-u-l-h+o,c-A+a,r-u-l+o];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[i,n,s,r]=e,a=s-i,o=r-n;switch(this.rotation){case 0:return[i,t-r,a,o];case 90:return[i,t-n,o,a];case 180:return[s,t-n,a,o];case 270:return[s,t-r,o,a];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){bc(this,yt,!0)}disableEditMode(){bc(this,yt,!1)}isInEditMode(){return Bc(this,yt)}shouldGetKeyboardEvents(){return Bc(this,bt)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){Ec(this,kt,Ot).call(this)}rotate(e){}serializeDeleted(){var e;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:(null==(e=this._initialData)?void 0:e.popupRef)||""}}serialize(e=!1,t=null){UUe("An editor must be serializable")}static async deserialize(e,t,i){const n=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:i});n.rotation=e.rotation,bc(n,ct,e.accessibilityData);const[s,r]=n.pageDimensions,[a,o,l,A]=n.getRectInCurrentCoords(e.rect,r);return n.x=a/s,n.y=o/r,n.width=l/s,n.height=A/r,n}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||null!==this.serialize())}remove(){var e;if(null==(e=Bc(this,mt))||e.abort(),bc(this,mt,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),Bc(this,Et)&&(clearTimeout(Bc(this,Et)),bc(this,Et,null)),Ec(this,kt,Vt).call(this),this.removeEditToolbar(),Bc(this,_t)){for(const e of Bc(this,_t).values())clearTimeout(e);bc(this,_t,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(Ec(this,kt,Rt).call(this),Bc(this,pt).classList.remove("hidden"),UHe(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||"Enter"!==t.key)return;this._uiManager.setSelected(this),bc(this,ft,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const i=Bc(this,pt).children;if(!Bc(this,ut)){bc(this,ut,Array.from(i));const t=Ec(this,kt,Gt).bind(this),n=Ec(this,kt,Kt).bind(this),s=this._uiManager._signal;for(const i of Bc(this,ut)){const r=i.getAttribute("data-resizer-name");i.setAttribute("role","spinbutton"),i.addEventListener("keydown",t,{signal:s}),i.addEventListener("blur",n,{signal:s}),i.addEventListener("focus",Ec(this,kt,qt).bind(this,r),{signal:s}),i.setAttribute("data-l10n-id",e._l10nResizer[r])}}const n=Bc(this,ut)[0];let s=0;for(const e of i){if(e===n)break;s++}const r=(360-this.rotation+this.parentRotation)%360/90*(Bc(this,ut).length/4);if(r!==s){if(r<s)for(let e=0;e<s-r;e++)Bc(this,pt).append(Bc(this,pt).firstChild);else if(r>s)for(let e=0;e<r-s;e++)Bc(this,pt).firstChild.before(Bc(this,pt).lastChild);let t=0;for(const n of i){const i=Bc(this,ut)[t++].getAttribute("data-resizer-name");n.setAttribute("data-l10n-id",e._l10nResizer[i])}}Ec(this,kt,Yt).call(this,0),bc(this,bt,!0),Bc(this,pt).firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}_resizeWithKeyboard(e,t){Bc(this,bt)&&Ec(this,kt,Ut).call(this,Bc(this,Ct),{movementX:e,movementY:t})}_stopResizingWithKeyboard(){Ec(this,kt,Vt).call(this),this.div.focus()}select(){var e,t,i;this.makeResizable(),null==(e=this.div)||e.classList.add("selectedEditor"),this._editToolbar?(null==(t=this._editToolbar)||t.show(),null==(i=Bc(this,ht))||i.toggleAltTextBadge(!1)):this.addEditToolbar().then((()=>{var e,t;(null==(e=this.div)?void 0:e.classList.contains("selectedEditor"))&&(null==(t=this._editToolbar)||t.show())}))}unselect(){var e,t,i,n,s;null==(e=Bc(this,pt))||e.classList.add("hidden"),null==(t=this.div)||t.classList.remove("selectedEditor"),(null==(i=this.div)?void 0:i.contains(document.activeElement))&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),null==(n=this._editToolbar)||n.hide(),null==(s=Bc(this,ht))||s.toggleAltTextBadge(!0)}updateParams(e,t){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return Bc(this,Bt)}set isEditing(e){bc(this,Bt,e),this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){bc(this,gt,!0);const i=e/t,{style:n}=this.div;n.aspectRatio=i,n.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,i=!1){if(i){Bc(this,_t)||bc(this,_t,new Map);const{action:i}=t;let n=Bc(this,_t).get(i);return n&&clearTimeout(n),n=setTimeout((()=>{this._reportTelemetry(t),Bc(this,_t).delete(i),0===Bc(this,_t).size&&bc(this,_t,null)}),e._telemetryTimeout),void Bc(this,_t).set(i,n)}t.type||(t.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),bc(this,dt,!1)}disable(){this.div&&(this.div.tabIndex=-1),bc(this,dt,!0)}renderAnnotationElement(e){let t=e.container.querySelector(".annotationContent");if(t){if("CANVAS"===t.nodeName){const e=t;t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.before(t)}}else t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.container.prepend(t);return t}resetAnnotationElement(e){const{firstChild:t}=e.container;"DIV"===(null==t?void 0:t.nodeName)&&t.classList.contains("annotationContent")&&t.remove()}};ct=new WeakMap,ut=new WeakMap,ht=new WeakMap,dt=new WeakMap,gt=new WeakMap,pt=new WeakMap,ft=new WeakMap,mt=new WeakMap,Ct=new WeakMap,It=new WeakMap,vt=new WeakMap,Bt=new WeakMap,yt=new WeakMap,bt=new WeakMap,Et=new WeakMap,wt=new WeakMap,Qt=new WeakMap,_t=new WeakMap,St=new WeakMap,xt=new WeakMap,kt=new WeakSet,Dt=function([e,t],i,n){[i,n]=this.screenToPageTranslation(i,n),this.x+=i/e,this.y+=n/t,this.fixAndSetPosition()},Ft=new WeakSet,Tt=function(e,t,i){switch(i){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}},Mt=function(e){switch(e){case 90:{const[e,t]=this.pageDimensions;return[0,-e/t,t/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,t]=this.pageDimensions;return[0,e/t,-t/e,0]}default:return[1,0,0,1]}},Rt=function(){if(Bc(this,pt))return;bc(this,pt,document.createElement("div")),Bc(this,pt).classList.add("resizers");const e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(const i of e){const e=document.createElement("div");Bc(this,pt).append(e),e.classList.add("resizer",i),e.setAttribute("data-resizer-name",i),e.addEventListener("pointerdown",Ec(this,kt,Nt).bind(this,i),{signal:t}),e.addEventListener("contextmenu",_He,{signal:t}),e.tabIndex=-1}this.div.prepend(Bc(this,pt))},Nt=function(e,t){var i;t.preventDefault();const{isMac:n}=ZUe.platform;if(0!==t.button||t.ctrlKey&&n)return;null==(i=Bc(this,ht))||i.toggle(!1);const s=this._isDraggable;this._isDraggable=!1;const r=new AbortController,a=this._uiManager.combinedSignal(r);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",Ec(this,kt,Ut).bind(this,e),{passive:!0,capture:!0,signal:a}),window.addEventListener("contextmenu",_He,{signal:a});const o=this.x,l=this.y,A=this.width,c=this.height,u=this.parent.div.style.cursor,h=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const d=()=>{var e;r.abort(),this.parent.togglePointerEvents(!0),null==(e=Bc(this,ht))||e.toggle(!0),this._isDraggable=s,this.parent.div.style.cursor=u,this.div.style.cursor=h,Ec(this,kt,Lt).call(this,o,l,A,c)};window.addEventListener("pointerup",d,{signal:a}),window.addEventListener("blur",d,{signal:a})},Lt=function(e,t,i,n){const s=this.x,r=this.y,a=this.width,o=this.height;s===e&&r===t&&a===i&&o===n||this.addCommands({cmd:()=>{this.width=a,this.height=o,this.x=s,this.y=r;const[e,t]=this.parentDimensions;this.setDims(e*a,t*o),this.fixAndSetPosition()},undo:()=>{this.width=i,this.height=n,this.x=e,this.y=t;const[s,r]=this.parentDimensions;this.setDims(s*i,r*n),this.fixAndSetPosition()},mustExec:!0})},Ut=function(e,t){const[i,n]=this.parentDimensions,s=this.x,r=this.y,a=this.width,o=this.height,l=zHe.MIN_SIZE/i,A=zHe.MIN_SIZE/n,c=e=>Math.round(1e4*e)/1e4,u=Ec(this,kt,Mt).call(this,this.rotation),h=(e,t)=>[u[0]*e+u[2]*t,u[1]*e+u[3]*t],d=Ec(this,kt,Mt).call(this,360-this.rotation);let g,p,f=!1,m=!1;switch(e){case"topLeft":f=!0,g=(e,t)=>[0,0],p=(e,t)=>[e,t];break;case"topMiddle":g=(e,t)=>[e/2,0],p=(e,t)=>[e/2,t];break;case"topRight":f=!0,g=(e,t)=>[e,0],p=(e,t)=>[0,t];break;case"middleRight":m=!0,g=(e,t)=>[e,t/2],p=(e,t)=>[0,t/2];break;case"bottomRight":f=!0,g=(e,t)=>[e,t],p=(e,t)=>[0,0];break;case"bottomMiddle":g=(e,t)=>[e/2,t],p=(e,t)=>[e/2,0];break;case"bottomLeft":f=!0,g=(e,t)=>[0,t],p=(e,t)=>[e,0];break;case"middleLeft":m=!0,g=(e,t)=>[0,t/2],p=(e,t)=>[e,t/2]}const C=g(a,o),I=p(a,o);let v=h(...I);const B=c(s+v[0]),y=c(r+v[1]);let b=1,E=1,[w,Q]=this.screenToPageTranslation(t.movementX,t.movementY);var _,S;if([w,Q]=(_=w/i,S=Q/n,[d[0]*_+d[2]*S,d[1]*_+d[3]*S]),f){const e=Math.hypot(a,o);b=E=Math.max(Math.min(Math.hypot(I[0]-C[0]-w,I[1]-C[1]-Q)/e,1/a,1/o),l/a,A/o)}else m?b=Math.max(l,Math.min(1,Math.abs(I[0]-C[0]-w)))/a:E=Math.max(A,Math.min(1,Math.abs(I[1]-C[1]-Q)))/o;const x=c(a*b),k=c(o*E);v=h(...p(x,k));const D=B-v[0],F=y-v[1];this.width=x,this.height=k,this.x=D,this.y=F,this.setDims(i*x,n*k),this.fixAndSetPosition()},Ht=function(e){const{isMac:t}=ZUe.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)},Pt=function(e){const{isSelected:t}=this;this._uiManager.setUpDragSession();const i=new AbortController,n=this._uiManager.combinedSignal(i);if(t){this.div.classList.add("moving"),bc(this,wt,e.clientX),bc(this,Qt,e.clientY);const t=e=>{const{clientX:t,clientY:i}=e,[n,s]=this.screenToPageTranslation(t-Bc(this,wt),i-Bc(this,Qt));bc(this,wt,t),bc(this,Qt,i),this._uiManager.dragSelectedEditors(n,s)};window.addEventListener("pointermove",t,{passive:!0,capture:!0,signal:n})}const s=()=>{i.abort(),t&&this.div.classList.remove("moving"),bc(this,It,!1),this._uiManager.endDragSession()||Ec(this,kt,Ht).call(this,e)};window.addEventListener("pointerup",s,{signal:n}),window.addEventListener("blur",s,{signal:n})},Ot=function(){if(Bc(this,mt)||!this.div)return;bc(this,mt,new AbortController);const e=this._uiManager.combinedSignal(Bc(this,mt));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e})},Gt=function(e){zHe._resizerKeyboardManager.exec(this,e)},Kt=function(e){var t;Bc(this,bt)&&(null==(t=e.relatedTarget)?void 0:t.parentNode)!==Bc(this,pt)&&Ec(this,kt,Vt).call(this)},qt=function(e){bc(this,Ct,Bc(this,bt)?e:"")},Yt=function(e){if(Bc(this,ut))for(const t of Bc(this,ut))t.tabIndex=e},Vt=function(){if(bc(this,bt,!1),Ec(this,kt,Yt).call(this,-1),Bc(this,ft)){const{savedX:e,savedY:t,savedWidth:i,savedHeight:n}=Bc(this,ft);Ec(this,kt,Lt).call(this,e,t,i,n),bc(this,ft,null)}},yc(zHe,Ft),Ic(zHe,"_l10n",null),Ic(zHe,"_l10nResizer",null),Ic(zHe,"_borderLineWidth",-1),Ic(zHe,"_colorManager",new YHe),Ic(zHe,"_zIndex",1),Ic(zHe,"_telemetryTimeout",1e3);let XHe=zHe;class $He extends XHe{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const ZHe=3285377520,ePe=4294901760,tPe=65535;let iPe=class{constructor(e){this.h1=e?4294967295&e:ZHe,this.h2=e?4294967295&e:ZHe}update(e){let t,i;if("string"==typeof e){t=new Uint8Array(2*e.length),i=0;for(let n=0,s=e.length;n<s;n++){const s=e.charCodeAt(n);s<=255?t[i++]=s:(t[i++]=s>>>8,t[i++]=255&s)}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice(),i=t.byteLength}const n=i>>2,s=i-4*n,r=new Uint32Array(t.buffer,0,n);let a=0,o=0,l=this.h1,A=this.h2;const c=3432918353,u=461845907,h=11601,d=13715;for(let g=0;g<n;g++)1&g?(a=r[g],a=a*c&ePe|a*h&tPe,a=a<<15|a>>>17,a=a*u&ePe|a*d&tPe,l^=a,l=l<<13|l>>>19,l=5*l+3864292196):(o=r[g],o=o*c&ePe|o*h&tPe,o=o<<15|o>>>17,o=o*u&ePe|o*d&tPe,A^=o,A=A<<13|A>>>19,A=5*A+3864292196);switch(a=0,s){case 3:a^=t[4*n+2]<<16;case 2:a^=t[4*n+1]<<8;case 1:a^=t[4*n],a=a*c&ePe|a*h&tPe,a=a<<15|a>>>17,a=a*u&ePe|a*d&tPe,1&n?l^=a:A^=a}this.h1=l,this.h2=A}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&ePe|36045*e&tPe,t=4283543511*t&ePe|(2950163797*(t<<16|e>>>16)&ePe)>>>16,e^=t>>>1,e=444984403*e&ePe|60499*e&tPe,t=3301882366*t&ePe|(3120437893*(t<<16|e>>>16)&ePe)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}};const nPe=Object.freeze({map:null,hash:"",transfer:void 0});class sPe{constructor(){yc(this,zt),yc(this,Wt,!1),yc(this,jt,null),yc(this,Jt,new Map),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const i=Bc(this,Jt).get(e);return void 0===i?t:Object.assign(t,i)}getRawValue(e){return Bc(this,Jt).get(e)}remove(e){if(Bc(this,Jt).delete(e),0===Bc(this,Jt).size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const e of Bc(this,Jt).values())if(e instanceof XHe)return;this.onAnnotationEditor(null)}}setValue(e,t){const i=Bc(this,Jt).get(e);let n=!1;if(void 0!==i)for(const[s,r]of Object.entries(t))i[s]!==r&&(n=!0,i[s]=r);else n=!0,Bc(this,Jt).set(e,t);n&&Ec(this,zt,Xt).call(this),t instanceof XHe&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return Bc(this,Jt).has(e)}getAll(){return Bc(this,Jt).size>0?$Ue(Bc(this,Jt)):null}setAll(e){for(const[t,i]of Object.entries(e))this.setValue(t,i)}get size(){return Bc(this,Jt).size}resetModified(){Bc(this,Wt)&&(bc(this,Wt,!1),"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new rPe(this)}get serializable(){if(0===Bc(this,Jt).size)return nPe;const e=new Map,t=new iPe,i=[],n=Object.create(null);let s=!1;for(const[r,a]of Bc(this,Jt)){const i=a instanceof XHe?a.serialize(!1,n):a;i&&(e.set(r,i),t.update(`${r}:${JSON.stringify(i)}`),s||(s=!!i.bitmap))}if(s)for(const r of e.values())r.bitmap&&i.push(r.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:i}:nPe}get editorStats(){let e=null;const t=new Map;for(const i of Bc(this,Jt).values()){if(!(i instanceof XHe))continue;const n=i.telemetryFinalData;if(!n)continue;const{type:s}=n;t.has(s)||t.set(s,Object.getPrototypeOf(i).constructor),e||(e=Object.create(null));const r=e[s]||(e[s]=new Map);for(const[e,t]of Object.entries(n)){if("type"===e)continue;let i=r.get(e);i||(i=new Map,r.set(e,i));const n=i.get(t)??0;i.set(t,n+1)}}for(const[i,n]of t)e[i]=n.computeTelemetryFinalData(e[i]);return e}resetModifiedIds(){bc(this,jt,null)}get modifiedIds(){if(Bc(this,jt))return Bc(this,jt);const e=[];for(const t of Bc(this,Jt).values())t instanceof XHe&&t.annotationElementId&&t.serialize()&&e.push(t.annotationElementId);return bc(this,jt,{ids:new Set(e),hash:e.join(",")})}}Wt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,zt=new WeakSet,Xt=function(){Bc(this,Wt)||(bc(this,Wt,!0),"function"==typeof this.onSetModified&&this.onSetModified())};class rPe extends sPe{constructor(e){super(),yc(this,$t);const{map:t,hash:i,transfer:n}=e.serializable,s=structuredClone(t,n?{transfer:n}:null);bc(this,$t,{map:s,hash:i,transfer:n})}get print(){UUe("Should not call PrintAnnotationStorage.print")}get serializable(){return Bc(this,$t)}get modifiedIds(){return OUe(this,"modifiedIds",{ids:new Set,hash:""})}}$t=new WeakMap;class aPe{constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){yc(this,Zt,new Set),this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),Bc(this,Zt).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,_inspectFont:t}){if(e&&!Bc(this,Zt).has(e.loadedName))if(HUe(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:n,style:s}=e,r=new FontFace(i,n,s);this.addNativeFontFace(r);try{await r.load(),Bc(this,Zt).add(i),null==t||t(e)}catch{LUe(e.baseFontName),this.removeNativeFontFace(r)}}else UUe("Not implemented: loadSystemFont without the Font Loading API.")}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo)return void(await this.loadSystemFont(e));if(this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(i){throw LUe(t.family),e.disableFontFace=!0,i}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise((t=>{const i=this._queueLoadingCallback(t);this._prepareFontLoadEvent(e,i)}))}}get isFontLoadingAPISupported(){var e;return OUe(this,"isFontLoadingAPISupported",!!(null==(e=this._document)?void 0:e.fonts))}get isSyncFontLoadingSupported(){let e=!1;return(HLe||"undefined"!=typeof navigator&&"string"==typeof(null==navigator?void 0:navigator.userAgent)&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),OUe(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,i={done:!1,complete:function(){for(HUe(!i.done,"completeRequest() cannot be called twice."),i.done=!0;t.length>0&&t[0].done;){const e=t.shift();setTimeout(e.callback,0)}},callback:e};return t.push(i),i}get _loadTestFont(){return OUe(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t){function i(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function n(e,t,i,n){return e.substring(0,t)+n+e.substring(t+i)}let s,r;const a=this._document.createElement("canvas");a.width=1,a.height=1;const o=a.getContext("2d");let l=0;const A=`lt${Date.now()}${this.loadTestFontId++}`;let c=this._loadTestFont;c=n(c,976,A.length,A);const u=1482184792;let h=i(c,16);for(s=0,r=A.length-3;s<r;s+=4)h=h-u+i(A,s)|0;var d;s<A.length&&(h=h-u+i(A+"XXX",s)|0),c=n(c,16,4,(d=h,String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,255&d)));const g=`@font-face {font-family:"${A}";src:${`url(data:font/opentype;base64,${btoa(c)});`}}`;this.insertRule(g);const p=this._document.createElement("div");p.style.visibility="hidden",p.style.width=p.style.height="10px",p.style.position="absolute",p.style.top=p.style.left="0px";for(const f of[e.loadedName,A]){const e=this._document.createElement("span");e.textContent="Hi",e.style.fontFamily=f,p.append(e)}this._document.body.append(p),function e(t,i){if(++l>30)return LUe(),void i();o.font="30px "+t,o.fillText(".",0,20),o.getImageData(0,0,1,1).data[3]>0?i():setTimeout(e.bind(null,t,i))}(A,(()=>{p.remove(),t.complete()}))}}Zt=new WeakMap;class oPe{constructor(e,{disableFontFace:t=!1,inspectFont:i=null}){this.compiledGlyphs=Object.create(null);for(const n in e)this[n]=e[n];this.disableFontFace=!0===t,this._inspectFont=i}createNativeFontFace(){var e;if(!this.data||this.disableFontFace)return null;let t;if(this.cssFontInfo){const e={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(e.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,e)}else t=new FontFace(this.loadedName,this.data,{});return null==(e=this._inspectFont)||e.call(this,this),t}createFontFaceRule(){var e;if(!this.data||this.disableFontFace)return null;const t=`url(data:${this.mimetype};base64,${i=this.data,Uint8Array.prototype.toBase64?i.toBase64():btoa(zUe(i))});`;var i;let n;if(this.cssFontInfo){let e=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(e+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),n=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${e}src:${t}}`}else n=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return null==(e=this._inspectFont)||e.call(this,this,t),n}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let i;try{i=e.get(this.loadedName+"_path_"+t)}catch(s){LUe()}if(!Array.isArray(i)||0===i.length)return this.compiledGlyphs[t]=function(e,t){};const n=[];for(let r=0,a=i.length;r<a;)switch(i[r++]){case aHe:{const[e,t,s,a,o,l]=i.slice(r,r+6);n.push((i=>i.bezierCurveTo(e,t,s,a,o,l))),r+=6}break;case oHe:{const[e,t]=i.slice(r,r+2);n.push((i=>i.moveTo(e,t))),r+=2}break;case lHe:{const[e,t]=i.slice(r,r+2);n.push((i=>i.lineTo(e,t))),r+=2}break;case AHe:{const[e,t,s,a]=i.slice(r,r+4);n.push((i=>i.quadraticCurveTo(e,t,s,a))),r+=4}break;case cHe:n.push((e=>e.restore()));break;case uHe:n.push((e=>e.save()));break;case hHe:HUe(2===n.length,"Scale command is only valid at the third position.");break;case dHe:{const[e,t,s,a,o,l]=i.slice(r,r+6);n.push((i=>i.transform(e,t,s,a,o,l))),r+=6}break;case gHe:{const[e,t]=i.slice(r,r+2);n.push((i=>i.translate(e,t))),r+=2}}return n.push((e=>e.closePath())),this.compiledGlyphs[t]=function(e,t){n[0](e),n[1](e),e.scale(t,-t);for(let i=2,s=n.length;i<s;i++)n[i](e)}}}class lPe{constructor({enableHWA:e=!1}){yc(this,ei,!1),bc(this,ei,e)}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const i=this._createCanvas(e,t);return{canvas:i,context:i.getContext("2d",{willReadFrequently:!Bc(this,ei)})}}reset(e,t,i){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||i<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=i}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){UUe("Abstract method `_createCanvas` called.")}}ei=new WeakMap;class APe{constructor({baseUrl:e=null,isCompressed:t=!0}){this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!e)throw new Error("CMap name must be specified.");const t=this.baseUrl+e+(this.isCompressed?".bcmap":"");return this._fetch(t).then((e=>({cMapData:e,isCompressed:this.isCompressed}))).catch((e=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${t}`)}))}async _fetch(e){UUe("Abstract method `_fetch` called.")}}class cPe extends APe{async _fetch(e){const t=await CHe(e,this.isCompressed?"arraybuffer":"text");return t instanceof ArrayBuffer?new Uint8Array(t):XUe(t)}}class uPe{addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,t,i,n,s){return"none"}destroy(e=!1){}}ti=new WeakMap,ii=new WeakMap,ni=new WeakMap,si=new WeakMap,ri=new WeakMap,ai=new WeakMap,oi=new WeakMap,li=new WeakSet,Ai=function(){return Bc(this,ii)||bc(this,ii,new Map)},ci=function(){return Bc(this,ai)||bc(this,ai,new Map)},ui=function(){if(!Bc(this,ni)){const e=Bc(this,ri).createElement("div"),{style:t}=e;t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1;const i=Bc(this,ri).createElementNS(pHe,"svg");i.setAttribute("width",0),i.setAttribute("height",0),bc(this,ni,Bc(this,ri).createElementNS(pHe,"defs")),e.append(i),i.append(Bc(this,ni)),Bc(this,ri).body.append(e)}return Bc(this,ni)},hi=function(e){if(1===e.length){const t=e[0],i=new Array(256);for(let e=0;e<256;e++)i[e]=t[e]/255;const n=i.join(",");return[n,n,n]}const[t,i,n]=e,s=new Array(256),r=new Array(256),a=new Array(256);for(let o=0;o<256;o++)s[o]=t[o]/255,r[o]=i[o]/255,a[o]=n[o]/255;return[s.join(","),r.join(","),a.join(",")]},di=function(e){if(void 0===Bc(this,ti)){bc(this,ti,"");const e=Bc(this,ri).URL;e!==Bc(this,ri).baseURI&&(BHe(e)?LUe():bc(this,ti,e.split("#",1)[0]))}return`url(${Bc(this,ti)}#${e})`},gi=function(e){const t=Bc(this,ri).createElementNS(pHe,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.append(t)},pi=function(e){const t=Bc(this,ri).createElementNS(pHe,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(t)},fi=function(e){const t=Bc(this,ri).createElementNS(pHe,"filter");return t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("id",e),Bc(this,li,ui).append(t),t},mi=function(e,t,i){const n=Bc(this,ri).createElementNS(pHe,t);n.setAttribute("type","discrete"),n.setAttribute("tableValues",i),e.append(n)},Ci=function(e,t,i,n){const s=Bc(this,ri).createElementNS(pHe,"feComponentTransfer");n.append(s),Ec(this,li,mi).call(this,s,"feFuncR",e),Ec(this,li,mi).call(this,s,"feFuncG",t),Ec(this,li,mi).call(this,s,"feFuncB",i)},Ii=function(e,t){const i=Bc(this,ri).createElementNS(pHe,"feComponentTransfer");t.append(i),Ec(this,li,mi).call(this,i,"feFuncA",e)},vi=function(e){return Bc(this,li,ui).style.color=e,kHe(getComputedStyle(Bc(this,li,ui)).getPropertyValue("color"))};class hPe{constructor({baseUrl:e=null}){this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!e)throw new Error("Font filename must be specified.");const t=`${this.baseUrl}${e}`;return this._fetch(t).catch((e=>{throw new Error(`Unable to load font data at: ${t}`)}))}async _fetch(e){UUe("Abstract method `_fetch` called.")}}class dPe extends hPe{async _fetch(e){const t=await CHe(e,"arraybuffer");return new Uint8Array(t)}}async function gPe(e){const t=process.getBuiltinModule("fs"),i=await t.promises.readFile(e);return new Uint8Array(i)}const pPe="Fill",fPe="Stroke",mPe="Shading";function CPe(e,t){if(!t)return;const i=t[2]-t[0],n=t[3]-t[1],s=new Path2D;s.rect(t[0],t[1],i,n),e.clip(s)}class IPe{getPattern(){UUe("Abstract method `getPattern` called.")}}class vPe extends IPe{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const i of this._colorStops)t.addColorStop(i[0],i[1]);return t}getPattern(e,t,i,n){let s;if(n===fPe||n===pPe){const r=t.current.getClippedPathBoundingBox(n,DHe(e))||[0,0,0,0],a=Math.ceil(r[2]-r[0])||1,o=Math.ceil(r[3]-r[1])||1,l=t.cachedCanvases.getCanvas("pattern",a,o),A=l.context;A.clearRect(0,0,A.canvas.width,A.canvas.height),A.beginPath(),A.rect(0,0,A.canvas.width,A.canvas.height),A.translate(-r[0],-r[1]),i=tHe.transform(i,[1,0,0,1,r[0],r[1]]),A.transform(...t.baseTransform),this.matrix&&A.transform(...this.matrix),CPe(A,this._bbox),A.fillStyle=this._createGradient(A),A.fill(),s=e.createPattern(l.canvas,"no-repeat");const c=new DOMMatrix(i);s.setTransform(c)}else CPe(e,this._bbox),s=this._createGradient(e);return s}}function BPe(e,t,i,n,s,r,a,o){const l=t.coords,A=t.colors,c=e.data,u=4*e.width;let h;l[i+1]>l[n+1]&&(h=i,i=n,n=h,h=r,r=a,a=h),l[n+1]>l[s+1]&&(h=n,n=s,s=h,h=a,a=o,o=h),l[i+1]>l[n+1]&&(h=i,i=n,n=h,h=r,r=a,a=h);const d=(l[i]+t.offsetX)*t.scaleX,g=(l[i+1]+t.offsetY)*t.scaleY,p=(l[n]+t.offsetX)*t.scaleX,f=(l[n+1]+t.offsetY)*t.scaleY,m=(l[s]+t.offsetX)*t.scaleX,C=(l[s+1]+t.offsetY)*t.scaleY;if(g>=C)return;const I=A[r],v=A[r+1],B=A[r+2],y=A[a],b=A[a+1],E=A[a+2],w=A[o],Q=A[o+1],_=A[o+2],S=Math.round(g),x=Math.round(C);let k,D,F,T,M,R,N,L;for(let U=S;U<=x;U++){if(U<f){const e=U<g?0:(g-U)/(g-f);k=d-(d-p)*e,D=I-(I-y)*e,F=v-(v-b)*e,T=B-(B-E)*e}else{let e;e=U>C?1:f===C?0:(f-U)/(f-C),k=p-(p-m)*e,D=y-(y-w)*e,F=b-(b-Q)*e,T=E-(E-_)*e}let e;e=U<g?0:U>C?1:(g-U)/(g-C),M=d-(d-m)*e,R=I-(I-w)*e,N=v-(v-Q)*e,L=B-(B-_)*e;const t=Math.round(Math.min(k,M)),i=Math.round(Math.max(k,M));let n=u*U+4*t;for(let s=t;s<=i;s++)e=(k-s)/(k-M),e<0?e=0:e>1&&(e=1),c[n++]=D-(D-R)*e|0,c[n++]=F-(F-N)*e|0,c[n++]=T-(T-L)*e|0,c[n++]=255}}function yPe(e,t,i){const n=t.coords,s=t.colors;let r,a;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(n.length/o)-1,A=o-1;for(r=0;r<l;r++){let t=r*o;for(let r=0;r<A;r++,t++)BPe(e,i,n[t],n[t+1],n[t+o],s[t],s[t+1],s[t+o]),BPe(e,i,n[t+o+1],n[t+1],n[t+o],s[t+o+1],s[t+1],s[t+o])}break;case"triangles":for(r=0,a=n.length;r<a;r+=3)BPe(e,i,n[r],n[r+1],n[r+2],s[r],s[r+1],s[r+2]);break;default:throw new Error("illegal figure")}}class bPe extends IPe{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,i){const n=Math.floor(this._bounds[0]),s=Math.floor(this._bounds[1]),r=Math.ceil(this._bounds[2])-n,a=Math.ceil(this._bounds[3])-s,o=Math.min(Math.ceil(Math.abs(r*e[0]*1.1)),3e3),l=Math.min(Math.ceil(Math.abs(a*e[1]*1.1)),3e3),A=r/o,c=a/l,u={coords:this._coords,colors:this._colors,offsetX:-n,offsetY:-s,scaleX:1/A,scaleY:1/c},h=o+4,d=l+4,g=i.getCanvas("mesh",h,d),p=g.context,f=p.createImageData(o,l);if(t){const e=f.data;for(let i=0,n=e.length;i<n;i+=4)e[i]=t[0],e[i+1]=t[1],e[i+2]=t[2],e[i+3]=255}for(const m of this._figures)yPe(f,m,u);p.putImageData(f,2,2);return{canvas:g.canvas,offsetX:n-2*A,offsetY:s-2*c,scaleX:A,scaleY:c}}getPattern(e,t,i,n){let s;if(CPe(e,this._bbox),n===mPe)s=tHe.singularValueDecompose2dScale(DHe(e));else if(s=tHe.singularValueDecompose2dScale(t.baseTransform),this.matrix){const e=tHe.singularValueDecompose2dScale(this.matrix);s=[s[0]*e[0],s[1]*e[1]]}const r=this._createMeshCanvas(s,n===mPe?null:this._background,t.cachedCanvases);return n!==mPe&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(r.offsetX,r.offsetY),e.scale(r.scaleX,r.scaleY),e.createPattern(r.canvas,"no-repeat")}}class EPe extends IPe{getPattern(){return"hotpink"}}const wPe=1,QPe=2,_Pe=class e{constructor(e,t,i,n,s){this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=i,this.canvasGraphicsFactory=n,this.baseTransform=s}createPatternCanvas(e){const{bbox:t,operatorList:i,paintType:n,tilingType:s,color:r,canvasGraphicsFactory:a}=this;let{xstep:o,ystep:l}=this;o=Math.abs(o),l=Math.abs(l),NUe();const A=t[0],c=t[1],u=t[2],h=t[3],d=u-A,g=h-c,p=tHe.singularValueDecompose2dScale(this.matrix),f=tHe.singularValueDecompose2dScale(this.baseTransform),m=p[0]*f[0],C=p[1]*f[1];let I=d,v=g,B=!1,y=!1;const b=Math.ceil(o*m),E=Math.ceil(l*C);b>=Math.ceil(d*m)?I=o:B=!0,E>=Math.ceil(g*C)?v=l:y=!0;const w=this.getSizeAndScale(I,this.ctx.canvas.width,m),Q=this.getSizeAndScale(v,this.ctx.canvas.height,C),_=e.cachedCanvases.getCanvas("pattern",w.size,Q.size),S=_.context,x=a.createCanvasGraphics(S);if(x.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(x,n,r),S.translate(-w.scale*A,-Q.scale*c),x.transform(w.scale,0,0,Q.scale,0,0),S.save(),this.clipBbox(x,A,c,u,h),x.baseTransform=DHe(x.ctx),x.executeOperatorList(i),x.endDrawing(),S.restore(),B||y){const t=_.canvas;B&&(I=o),y&&(v=l);const i=this.getSizeAndScale(I,this.ctx.canvas.width,m),n=this.getSizeAndScale(v,this.ctx.canvas.height,C),s=i.size,r=n.size,a=e.cachedCanvases.getCanvas("pattern-workaround",s,r),u=a.context,h=B?Math.floor(d/o):0,p=y?Math.floor(g/l):0;for(let e=0;e<=h;e++)for(let i=0;i<=p;i++)u.drawImage(t,s*e,r*i,s,r,0,0,s,r);return{canvas:a.canvas,scaleX:i.scale,scaleY:n.scale,offsetX:A,offsetY:c}}return{canvas:_.canvas,scaleX:w.scale,scaleY:Q.scale,offsetX:A,offsetY:c}}getSizeAndScale(t,i,n){const s=Math.max(e.MAX_PATTERN_SIZE,i);let r=Math.ceil(t*n);return r>=s?r=s:n=r/t,{scale:n,size:r}}clipBbox(e,t,i,n,s){const r=n-t,a=s-i;e.ctx.rect(t,i,r,a),e.current.updateRectMinMax(DHe(e.ctx),[t,i,n,s]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,i){const n=e.ctx,s=e.current;switch(t){case wPe:const e=this.ctx;n.fillStyle=e.fillStyle,n.strokeStyle=e.strokeStyle,s.fillColor=e.fillStyle,s.strokeColor=e.strokeStyle;break;case QPe:const r=tHe.makeHexColor(i[0],i[1],i[2]);n.fillStyle=r,n.strokeStyle=r,s.fillColor=r,s.strokeColor=r;break;default:throw new jUe(`Unsupported paint type: ${t}`)}}getPattern(e,t,i,n){let s=i;n!==mPe&&(s=tHe.transform(s,t.baseTransform),this.matrix&&(s=tHe.transform(s,this.matrix)));const r=this.createPatternCanvas(t);let a=new DOMMatrix(s);a=a.translate(r.offsetX,r.offsetY),a=a.scale(1/r.scaleX,1/r.scaleY);const o=e.createPattern(r.canvas,"repeat");return o.setTransform(a),o}};Ic(_Pe,"MAX_PATTERN_SIZE",3e3);let SPe=_Pe;function xPe({src:e,srcPos:t=0,dest:i,width:n,height:s,nonBlackColor:r=4294967295,inverseDecode:a=!1}){const o=ZUe.isLittleEndian?4278190080:255,[l,A]=a?[r,o]:[o,r],c=n>>3,u=7&n,h=e.length;i=new Uint32Array(i.buffer);let d=0;for(let g=0;g<s;g++){for(const s=t+c;t<s;t++){const n=t<h?e[t]:255;i[d++]=128&n?A:l,i[d++]=64&n?A:l,i[d++]=32&n?A:l,i[d++]=16&n?A:l,i[d++]=8&n?A:l,i[d++]=4&n?A:l,i[d++]=2&n?A:l,i[d++]=1&n?A:l}if(0===u)continue;const n=t<h?e[t++]:255;for(let e=0;e<u;e++)i[d++]=n&1<<7-e?A:l}return{srcPos:t,destPos:d}}const kPe=16;class DPe{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,i){let n;return void 0!==this.cache[e]?(n=this.cache[e],this.canvasFactory.reset(n,t,i)):(n=this.canvasFactory.create(t,i),this.cache[e]=n),n}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function FPe(e,t,i,n,s,r,a,o,l,A){const[c,u,h,d,g,p]=DHe(e);if(0===u&&0===h){const f=a*c+g,m=Math.round(f),C=o*d+p,I=Math.round(C),v=(a+l)*c+g,B=Math.abs(Math.round(v)-m)||1,y=(o+A)*d+p,b=Math.abs(Math.round(y)-I)||1;return e.setTransform(Math.sign(c),0,0,Math.sign(d),m,I),e.drawImage(t,i,n,s,r,0,0,B,b),e.setTransform(c,u,h,d,g,p),[B,b]}if(0===c&&0===d){const f=o*h+g,m=Math.round(f),C=a*u+p,I=Math.round(C),v=(o+A)*h+g,B=Math.abs(Math.round(v)-m)||1,y=(a+l)*u+p,b=Math.abs(Math.round(y)-I)||1;return e.setTransform(0,Math.sign(u),Math.sign(h),0,m,I),e.drawImage(t,i,n,s,r,0,0,b,B),e.setTransform(c,u,h,d,g,p),[b,B]}e.drawImage(t,i,n,s,r,a,o,l,A);return[Math.hypot(c,u)*l,Math.hypot(h,d)*A]}class TPe{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=PLe,this.textMatrixScale=1,this.fontMatrix=OLe,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=tUe,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.patternStroke=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,i){[t,i]=tHe.applyTransform([t,i],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,i),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,i)}updateRectMinMax(e,t){const i=tHe.applyTransform(t,e),n=tHe.applyTransform(t.slice(2),e),s=tHe.applyTransform([t[0],t[3]],e),r=tHe.applyTransform([t[2],t[1]],e);this.minX=Math.min(this.minX,i[0],n[0],s[0],r[0]),this.minY=Math.min(this.minY,i[1],n[1],s[1],r[1]),this.maxX=Math.max(this.maxX,i[0],n[0],s[0],r[0]),this.maxY=Math.max(this.maxY,i[1],n[1],s[1],r[1])}updateScalingPathMinMax(e,t){tHe.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.minY=Math.min(this.minY,t[1]),this.maxX=Math.max(this.maxX,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,i,n,s,r,a,o,l,A){const c=tHe.bezierBoundingBox(t,i,n,s,r,a,o,l,A);A||this.updateRectMinMax(e,c)}getPathBoundingBox(e=pPe,t=null){const i=[this.minX,this.minY,this.maxX,this.maxY];if(e===fPe){t||UUe("Stroke bounding box must include transform.");const e=tHe.singularValueDecompose2dScale(t),n=e[0]*this.lineWidth/2,s=e[1]*this.lineWidth/2;i[0]-=n,i[1]-=s,i[2]+=n,i[3]+=s}return i}updateClipFromPath(){const e=tHe.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=pPe,t=null){return tHe.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function MPe(e,t){if(t instanceof ImageData)return void e.putImageData(t,0,0);const i=t.height,n=t.width,s=i%kPe,r=(i-s)/kPe,a=0===s?r:r+1,o=e.createImageData(n,kPe);let l,A=0;const c=t.data,u=o.data;let h,d,g,p;if(t.kind===oUe.GRAYSCALE_1BPP){const t=c.byteLength,i=new Uint32Array(u.buffer,0,u.byteLength>>2),p=i.length,f=n+7>>3,m=4294967295,C=ZUe.isLittleEndian?4278190080:255;for(h=0;h<a;h++){for(g=h<r?kPe:s,l=0,d=0;d<g;d++){const e=t-A;let s=0;const r=e>f?n:8*e-7,a=-8&r;let o=0,u=0;for(;s<a;s+=8)u=c[A++],i[l++]=128&u?m:C,i[l++]=64&u?m:C,i[l++]=32&u?m:C,i[l++]=16&u?m:C,i[l++]=8&u?m:C,i[l++]=4&u?m:C,i[l++]=2&u?m:C,i[l++]=1&u?m:C;for(;s<r;s++)0===o&&(u=c[A++],o=128),i[l++]=u&o?m:C,o>>=1}for(;l<p;)i[l++]=0;e.putImageData(o,0,h*kPe)}}else if(t.kind===oUe.RGBA_32BPP){for(d=0,p=n*kPe*4,h=0;h<r;h++)u.set(c.subarray(A,A+p)),A+=p,e.putImageData(o,0,d),d+=kPe;h<a&&(p=n*s*4,u.set(c.subarray(A,A+p)),e.putImageData(o,0,d))}else{if(t.kind!==oUe.RGB_24BPP)throw new Error(`bad image kind: ${t.kind}`);for(g=kPe,p=n*g,h=0;h<a;h++){for(h>=r&&(g=s,p=n*g),l=0,d=p;d--;)u[l++]=c[A++],u[l++]=c[A++],u[l++]=c[A++],u[l++]=255;e.putImageData(o,0,h*kPe)}}}function RPe(e,t){if(t.bitmap)return void e.drawImage(t.bitmap,0,0);const i=t.height,n=t.width,s=i%kPe,r=(i-s)/kPe,a=0===s?r:r+1,o=e.createImageData(n,kPe);let l=0;const A=t.data,c=o.data;for(let u=0;u<a;u++){const t=u<r?kPe:s;({srcPos:l}=xPe({src:A,srcPos:l,dest:c,width:n,height:t,nonBlackColor:0})),e.putImageData(o,0,u*kPe)}}function NPe(e,t){const i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const n of i)void 0!==e[n]&&(t[n]=e[n]);void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function LPe(e){if(e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0),!HLe){const{filter:t}=e;"none"!==t&&""!==t&&(e.filter="none")}}function UPe(e,t){if(t)return!0;const i=tHe.singularValueDecompose2dScale(e);i[0]=Math.fround(i[0]),i[1]=Math.fround(i[1]);const n=Math.fround((globalThis.devicePixelRatio||1)*mHe.PDF_TO_CSS_UNITS);return i[0]<=n&&i[1]<=n}const HPe=["butt","round","square"],PPe=["miter","round","bevel"],OPe={},GPe={};Bi=new WeakSet,yi=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},bi=function(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==e){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}};let KPe=class e{constructor(e,t,i,n,s,{optionalContentConfig:r,markedContentStack:a=null},o,l){yc(this,Bi),this.ctx=e,this.current=new TPe(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=i,this.canvasFactory=n,this.filterFactory=s,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=a||[],this.optionalContentConfig=r,this.cachedCanvases=new DPe(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=o,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=l,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:i=!1,background:n=null}){const s=this.ctx.canvas.width,r=this.ctx.canvas.height,a=this.ctx.fillStyle;if(this.ctx.fillStyle=n||"#ffffff",this.ctx.fillRect(0,0,s,r),this.ctx.fillStyle=a,i){const e=this.cachedCanvases.getCanvas("transparent",s,r);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...DHe(this.compositeCtx))}this.ctx.save(),LPe(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=DHe(this.ctx)}executeOperatorList(e,t,i,n){const s=e.argsArray,r=e.fnArray;let a=t||0;const o=s.length;if(o===a)return a;const l=o-a>10&&"function"==typeof i,A=l?Date.now()+15:0;let c=0;const u=this.commonObjs,h=this.objs;let d;for(;;){if(void 0!==n&&a===n.nextBreakPoint)return n.breakIt(a,i),a;if(d=r[a],d!==FUe.dependency)this[d].apply(this,s[a]);else for(const e of s[a]){const t=e.startsWith("g_")?u:h;if(!t.has(e))return t.get(e,i),a}if(a++,a===o)return a;if(l&&++c>10){if(Date.now()>A)return i(),a;c=0}}}endDrawing(){Ec(this,Bi,yi).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),Ec(this,Bi,bi).call(this)}_scaleImage(e,t){const i=e.width??e.displayWidth,n=e.height??e.displayHeight;let s,r,a=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),l=i,A=n,c="prescale1";for(;a>2&&l>1||o>2&&A>1;){let t=l,i=A;a>2&&l>1&&(t=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2),a/=l/t),o>2&&A>1&&(i=A>=16384?Math.floor(A/2)-1||1:Math.ceil(A)/2,o/=A/i),s=this.cachedCanvases.getCanvas(c,t,i),r=s.context,r.clearRect(0,0,t,i),r.drawImage(e,0,0,l,A,0,0,t,i),e=s.canvas,l=t,A=i,c="prescale1"===c?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:A}}_createMaskCanvas(e){const t=this.ctx,{width:i,height:n}=e,s=this.current.fillColor,r=this.current.patternFill,a=DHe(t);let o,l,A,c;if((e.bitmap||e.data)&&e.count>1){const t=e.bitmap||e.data.buffer;l=JSON.stringify(r?a:[a.slice(0,4),s]),o=this._cachedBitmapsMap.get(t),o||(o=new Map,this._cachedBitmapsMap.set(t,o));const i=o.get(l);if(i&&!r){return{canvas:i,offsetX:Math.round(Math.min(a[0],a[2])+a[4]),offsetY:Math.round(Math.min(a[1],a[3])+a[5])}}A=i}A||(c=this.cachedCanvases.getCanvas("maskCanvas",i,n),RPe(c.context,e));let u=tHe.transform(a,[1/i,0,0,-1/n,0,0]);u=tHe.transform(u,[1,0,0,1,0,-n]);const[h,d,g,p]=tHe.getAxialAlignedBoundingBox([0,0,i,n],u),f=Math.round(g-h)||1,m=Math.round(p-d)||1,C=this.cachedCanvases.getCanvas("fillCanvas",f,m),I=C.context,v=h,B=d;I.translate(-v,-B),I.transform(...u),A||(A=this._scaleImage(c.canvas,FHe(I)),A=A.img,o&&r&&o.set(l,A)),I.imageSmoothingEnabled=UPe(DHe(I),e.interpolate),FPe(I,A,0,0,A.width,A.height,0,0,i,n),I.globalCompositeOperation="source-in";const y=tHe.transform(FHe(I),[1,0,0,1,-v,-B]);return I.fillStyle=r?s.getPattern(t,this,y,pPe):s,I.fillRect(0,0,i,n),o&&!r&&(this.cachedCanvases.delete("fillCanvas"),o.set(l,C.canvas)),{canvas:C.canvas,offsetX:Math.round(v),offsetY:Math.round(B)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=HPe[e]}setLineJoin(e){this.ctx.lineJoin=PPe[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const i=this.ctx;void 0!==i.setLineDash&&(i.setLineDash(e),i.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,i]of e)switch(t){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i[0],i[1]);break;case"CA":this.current.strokeAlpha=i;break;case"ca":this.current.fillAlpha=i,this.ctx.globalAlpha=i;break;case"BM":this.ctx.globalCompositeOperation=i;break;case"SMask":this.current.activeSMask=i?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(i)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,t=this.ctx.canvas.height,i="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(i,e,t);this.suspendedCtx=this.ctx,this.ctx=n.context;const s=this.ctx;s.setTransform(...DHe(this.suspendedCtx)),NPe(this.suspendedCtx,s),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,i){t.translate(e,i),this.__originalTranslate(e,i)},e.scale=function(e,i){t.scale(e,i),this.__originalScale(e,i)},e.transform=function(e,i,n,s,r,a){t.transform(e,i,n,s,r,a),this.__originalTransform(e,i,n,s,r,a)},e.setTransform=function(e,i,n,s,r,a){t.setTransform(e,i,n,s,r,a),this.__originalSetTransform(e,i,n,s,r,a)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,i){t.moveTo(e,i),this.__originalMoveTo(e,i)},e.lineTo=function(e,i){t.lineTo(e,i),this.__originalLineTo(e,i)},e.bezierCurveTo=function(e,i,n,s,r,a){t.bezierCurveTo(e,i,n,s,r,a),this.__originalBezierCurveTo(e,i,n,s,r,a)},e.rect=function(e,i,n,s){t.rect(e,i,n,s),this.__originalRect(e,i,n,s)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(s,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),NPe(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask,i=this.suspendedCtx;this.composeSMask(i,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(e,t,i,n){const s=n[0],r=n[1],a=n[2]-s,o=n[3]-r;0!==a&&0!==o&&(this.genericComposeSMask(t.context,i,a,o,t.subtype,t.backdrop,t.transferMap,s,r,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(i.canvas,0,0),e.restore())}genericComposeSMask(e,t,i,n,s,r,a,o,l,A,c){let u=e.canvas,h=o-A,d=l-c;if(r){const t=tHe.makeHexColor(...r);if(h<0||d<0||h+i>u.width||d+n>u.height){const e=this.cachedCanvases.getCanvas("maskExtension",i,n),s=e.context;s.drawImage(u,-h,-d),s.globalCompositeOperation="destination-atop",s.fillStyle=t,s.fillRect(0,0,i,n),s.globalCompositeOperation="source-over",u=e.canvas,h=d=0}else{e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const s=new Path2D;s.rect(h,d,i,n),e.clip(s),e.globalCompositeOperation="destination-atop",e.fillStyle=t,e.fillRect(h,d,i,n),e.restore()}}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),"Alpha"===s&&a?t.filter=this.filterFactory.addAlphaFilter(a):"Luminosity"===s&&(t.filter=this.filterFactory.addLuminosityFilter(a));const g=new Path2D;g.rect(o,l,i,n),t.clip(g),t.globalCompositeOperation="destination-in",t.drawImage(u,h,d,i,n,o,l,i,n),t.restore()}save(){this.inSMaskMode?(NPe(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),NPe(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,i,n,s,r){this.ctx.transform(e,t,i,n,s,r),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,i){const n=this.ctx,s=this.current;let r,a,o=s.x,l=s.y;const A=DHe(n),c=0===A[0]&&0===A[3]||0===A[1]&&0===A[2],u=c?i.slice(0):null;for(let h=0,d=0,g=e.length;h<g;h++)switch(0|e[h]){case FUe.rectangle:o=t[d++],l=t[d++];const e=t[d++],i=t[d++],h=o+e,g=l+i;n.moveTo(o,l),0===e||0===i?n.lineTo(h,g):(n.lineTo(h,l),n.lineTo(h,g),n.lineTo(o,g)),c||s.updateRectMinMax(A,[o,l,h,g]),n.closePath();break;case FUe.moveTo:o=t[d++],l=t[d++],n.moveTo(o,l),c||s.updatePathMinMax(A,o,l);break;case FUe.lineTo:o=t[d++],l=t[d++],n.lineTo(o,l),c||s.updatePathMinMax(A,o,l);break;case FUe.curveTo:r=o,a=l,o=t[d+4],l=t[d+5],n.bezierCurveTo(t[d],t[d+1],t[d+2],t[d+3],o,l),s.updateCurvePathMinMax(A,r,a,t[d],t[d+1],t[d+2],t[d+3],o,l,u),d+=6;break;case FUe.curveTo2:r=o,a=l,n.bezierCurveTo(o,l,t[d],t[d+1],t[d+2],t[d+3]),s.updateCurvePathMinMax(A,r,a,o,l,t[d],t[d+1],t[d+2],t[d+3],u),o=t[d+2],l=t[d+3],d+=4;break;case FUe.curveTo3:r=o,a=l,o=t[d+2],l=t[d+3],n.bezierCurveTo(t[d],t[d+1],o,l,o,l),s.updateCurvePathMinMax(A,r,a,t[d],t[d+1],o,l,o,l,u),d+=4;break;case FUe.closePath:n.closePath()}c&&s.updateScalingPathMinMax(A,u),s.setCurrentPoint(o,l)}closePath(){this.ctx.closePath()}stroke(e=!0){const t=this.ctx,i=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof i&&(null==i?void 0:i.getPattern)?(t.save(),t.strokeStyle=i.getPattern(t,this,FHe(t),fPe),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e=!0){const t=this.ctx,i=this.current.fillColor;let n=!1;this.current.patternFill&&(t.save(),t.fillStyle=i.getPattern(t,this,FHe(t),pPe),n=!0);const s=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==s&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),n&&t.restore(),e&&this.consumePath(s)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=OPe}eoClip(){this.pendingClip=GPe}beginText(){this.current.textMatrix=PLe,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(const i of e)t.setTransform(...i.transform),t.translate(i.x,i.y),i.addToPath(t,i.fontSize);t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){var i;const n=this.commonObjs.get(e),s=this.current;if(!n)throw new Error(`Can't find font for ${e}`);if(s.fontMatrix=n.fontMatrix||OLe,0!==s.fontMatrix[0]&&0!==s.fontMatrix[3]||LUe(),t<0?(t=-t,s.fontDirection=-1):s.fontDirection=1,this.current.font=n,this.current.fontSize=t,n.isType3Font)return;const r=n.loadedName||"sans-serif",a=(null==(i=n.systemFontInfo)?void 0:i.css)||`"${r}", ${n.fallbackName}`;let o="normal";n.black?o="900":n.bold&&(o="bold");const l=n.italic?"italic":"normal";let A=t;t<16?A=16:t>100&&(A=100),this.current.fontSizeScale=t/A,this.ctx.font=`${l} ${o} ${A}px ${a}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,i,n,s,r){this.current.textMatrix=[e,t,i,n,s,r],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,i,n,s){const r=this.ctx,a=this.current,o=a.font,l=a.textRenderingMode,A=a.fontSize/a.fontSizeScale,c=l&rUe,u=!!(l&aUe),h=a.patternFill&&!o.missingFile,d=a.patternStroke&&!o.missingFile;let g;if((o.disableFontFace||u||h||d)&&(g=o.getPathGenerator(this.commonObjs,e)),o.disableFontFace||h||d?(r.save(),r.translate(t,i),r.beginPath(),g(r,A),c!==tUe&&c!==nUe||(n&&r.setTransform(...n),r.fill()),c!==iUe&&c!==nUe||(s&&r.setTransform(...s),r.stroke()),r.restore()):(c!==tUe&&c!==nUe||r.fillText(e,t,i),c!==iUe&&c!==nUe||r.strokeText(e,t,i)),u){(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:DHe(r),x:t,y:i,fontSize:A,addToPath:g})}}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let i=!1;for(let n=3;n<t.length;n+=4)if(t[n]>0&&t[n]<255){i=!0;break}return OUe(this,"isFontSubpixelAAEnabled",i)}showText(e){const t=this.current,i=t.font;if(i.isType3Font)return this.showType3Text(e);const n=t.fontSize;if(0===n)return;const s=this.ctx,r=t.fontSizeScale,a=t.charSpacing,o=t.wordSpacing,l=t.fontDirection,A=t.textHScale*l,c=e.length,u=i.vertical,h=u?1:-1,d=i.defaultVMetrics,g=n*t.fontMatrix[0],p=t.textRenderingMode===tUe&&!i.disableFontFace&&!t.patternFill;let f,m;if(s.save(),s.transform(...t.textMatrix),s.translate(t.x,t.y+t.textRise),l>0?s.scale(A,-1):s.scale(A,1),t.patternFill){s.save();const e=t.fillColor.getPattern(s,this,FHe(s),pPe);f=DHe(s),s.restore(),s.fillStyle=e}if(t.patternStroke){s.save();const e=t.strokeColor.getPattern(s,this,FHe(s),fPe);m=DHe(s),s.restore(),s.strokeStyle=e}let C=t.lineWidth;const I=t.textMatrixScale;if(0===I||0===C){const e=t.textRenderingMode&rUe;e!==iUe&&e!==nUe||(C=this.getSinglePixelWidth())}else C/=I;if(1!==r&&(s.scale(r,r),C/=r),s.lineWidth=C,i.isInvalidPDFjsFont){const i=[];let n=0;for(const t of e)i.push(t.unicode),n+=t.width;return s.fillText(i.join(""),0,0),t.x+=n*g*A,s.restore(),void this.compose()}let v,B=0;for(v=0;v<c;++v){const t=e[v];if("number"==typeof t){B+=h*t*n/1e3;continue}let A=!1;const c=(t.isSpace?o:0)+a,C=t.fontChar,I=t.accent;let y,b,E=t.width;if(u){const e=t.vmetric||d,i=-(t.vmetric?e[1]:.5*E)*g,n=e[2]*g;E=e?-e[0]:E,y=i/r,b=(B+n)/r}else y=B/r,b=0;if(i.remeasure&&E>0){const e=1e3*s.measureText(C).width/n*r;if(E<e&&this.isFontSubpixelAAEnabled){const t=E/e;A=!0,s.save(),s.scale(t,1),y/=t}else E!==e&&(y+=(E-e)/2e3*n/r)}if(this.contentVisible&&(t.isInFont||i.missingFile))if(p&&!I)s.fillText(C,y,b);else if(this.paintChar(C,y,b,f,m),I){const e=y+n*I.offset.x/r,t=b-n*I.offset.y/r;this.paintChar(I.fontChar,e,t,f,m)}B+=u?E*g-c*l:E*g+c*l,A&&s.restore()}u?t.y-=B:t.x+=B*A,s.restore(),this.compose()}showType3Text(e){const t=this.ctx,i=this.current,n=i.font,s=i.fontSize,r=i.fontDirection,a=n.vertical?1:-1,o=i.charSpacing,l=i.wordSpacing,A=i.textHScale*r,c=i.fontMatrix||OLe,u=e.length;let h,d,g,p;if(!(i.textRenderingMode===sUe)&&0!==s){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...i.textMatrix),t.translate(i.x,i.y),t.scale(A,r),h=0;h<u;++h){if(d=e[h],"number"==typeof d){p=a*d*s/1e3,this.ctx.translate(p,0),i.x+=p*A;continue}const r=(d.isSpace?l:0)+o,u=n.charProcOperatorList[d.operatorListId];if(!u){LUe(d.operatorListId);continue}this.contentVisible&&(this.processingType3=d,this.save(),t.scale(s,s),t.transform(...c),this.executeOperatorList(u),this.restore());g=tHe.applyTransform([d.width,0],c)[0]*s+r,t.translate(g,0),i.x+=g*A}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,i,n,s,r){this.ctx.rect(i,n,s-i,r-n),this.ctx.clip(),this.endPath()}getColorN_Pattern(t){let i;if("TilingPattern"===t[0]){const n=t[1],s=this.baseTransform||DHe(this.ctx),r={createCanvasGraphics:t=>new e(t,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};i=new SPe(t,n,this.ctx,r,s)}else i=this._getPattern(t[1],t[2]);return i}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,i){this.ctx.strokeStyle=this.current.strokeColor=tHe.makeHexColor(e,t,i),this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(e,t,i){this.ctx.fillStyle=this.current.fillColor=tHe.makeHexColor(e,t,i),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(e,t=null){let i;return this.cachedPatterns.has(e)?i=this.cachedPatterns.get(e):(i=function(e){switch(e[0]){case"RadialAxial":return new vPe(e);case"Mesh":return new bPe(e);case"Dummy":return new EPe}throw new Error(`Unknown IR type: ${e[0]}`)}(this.getObject(e)),this.cachedPatterns.set(e,i)),t&&(i.matrix=t),i}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const i=this._getPattern(e);t.fillStyle=i.getPattern(t,this,FHe(t),mPe);const n=FHe(t);if(n){const{width:e,height:i}=t.canvas,[s,r,a,o]=tHe.getAxialAlignedBoundingBox([0,0,e,i],n);this.ctx.fillRect(s,r,a-s,o-r)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){UUe("Should not call beginInlineImage")}beginImageData(){UUe("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=DHe(this.ctx),t)){const e=t[2]-t[0],i=t[3]-t[1];this.ctx.rect(t[0],t[1],e,i),this.current.updateRectMinMax(DHe(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||NUe(),e.knockout&&LUe();const i=DHe(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let n=tHe.getAxialAlignedBoundingBox(e.bbox,DHe(t));const s=[0,0,t.canvas.width,t.canvas.height];n=tHe.intersect(n,s)||[0,0,0,0];const r=Math.floor(n[0]),a=Math.floor(n[1]),o=Math.max(Math.ceil(n[2])-r,1),l=Math.max(Math.ceil(n[3])-a,1);this.current.startNewPathAndClipBox([0,0,o,l]);let A="groupAt"+this.groupLevel;e.smask&&(A+="_smask_"+this.smaskCounter++%2);const c=this.cachedCanvases.getCanvas(A,o,l),u=c.context;u.translate(-r,-a),u.transform(...i),e.smask?this.smaskStack.push({canvas:c.canvas,context:u,offsetX:r,offsetY:a,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(r,a),t.save()),NPe(t,u),this.ctx=u,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,i=this.groupStack.pop();if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const e=DHe(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...e);const i=tHe.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(i)}}beginAnnotation(e,t,i,n,s){if(Ec(this,Bi,yi).call(this),LPe(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),t){const n=t[2]-t[0],r=t[3]-t[1];if(s&&this.annotationCanvasMap){(i=i.slice())[4]-=t[0],i[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=n,t[3]=r;const[s,a]=tHe.singularValueDecompose2dScale(DHe(this.ctx)),{viewportScale:o}=this,l=Math.ceil(n*this.outputScaleX*o),A=Math.ceil(r*this.outputScaleY*o);this.annotationCanvas=this.canvasFactory.create(l,A);const{canvas:c,context:u}=this.annotationCanvas;this.annotationCanvasMap.set(e,c),this.annotationCanvas.savedCtx=this.ctx,this.ctx=u,this.ctx.save(),this.ctx.setTransform(s,0,0,-a,0,r*a),LPe(this.ctx)}else LPe(this.ctx),this.endPath(),this.ctx.rect(t[0],t[1],n,r),this.ctx.clip(),this.ctx.beginPath()}this.current=new TPe(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...i),this.transform(...n)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),Ec(this,Bi,bi).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const i=this.ctx,n=this.processingType3;if(n&&(void 0===n.compiled&&(n.compiled=function(e){const{width:t,height:i}=e;if(t>1e3||i>1e3)return null;const n=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),s=t+1;let r,a,o,l=new Uint8Array(s*(i+1));const A=t+7&-8;let c=new Uint8Array(A*i),u=0;for(const p of e.data){let e=128;for(;e>0;)c[u++]=p&e?0:255,e>>=1}let h=0;for(u=0,0!==c[u]&&(l[0]=1,++h),a=1;a<t;a++)c[u]!==c[u+1]&&(l[a]=c[u]?2:1,++h),u++;for(0!==c[u]&&(l[a]=2,++h),r=1;r<i;r++){u=r*A,o=r*s,c[u-A]!==c[u]&&(l[o]=c[u]?1:8,++h);let e=(c[u]?4:0)+(c[u-A]?8:0);for(a=1;a<t;a++)e=(e>>2)+(c[u+1]?4:0)+(c[u-A+1]?8:0),n[e]&&(l[o+a]=n[e],++h),u++;if(c[u-A]!==c[u]&&(l[o+a]=c[u]?2:4,++h),h>1e3)return null}for(u=A*(i-1),o=r*s,0!==c[u]&&(l[o]=8,++h),a=1;a<t;a++)c[u]!==c[u+1]&&(l[o+a]=c[u]?4:8,++h),u++;if(0!==c[u]&&(l[o+a]=4,++h),h>1e3)return null;const d=new Int32Array([0,s,-1,0,-s,0,0,0,1]),g=new Path2D;for(r=0;h&&r<=i;r++){let e=r*s;const i=e+t;for(;e<i&&!l[e];)e++;if(e===i)continue;g.moveTo(e%s,r);const n=e;let a=l[e];do{const t=d[a];do{e+=t}while(!l[e]);const i=l[e];5!==i&&10!==i?(a=i,l[e]=0):(a=i&51*a>>4,l[e]&=a>>2|a<<2),g.lineTo(e%s,e/s|0),l[e]||--h}while(n!==e);--r}return c=null,l=null,function(e){e.save(),e.scale(1/t,-1/i),e.translate(0,-i),e.fill(g),e.beginPath(),e.restore()}}(e)),n.compiled))return void n.compiled(i);const s=this._createMaskCanvas(e),r=s.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(r,s.offsetX,s.offsetY),i.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,i=0,n=0,s,r){if(!this.contentVisible)return;e=this.getObject(e.data,e);const a=this.ctx;a.save();const o=DHe(a);a.transform(t,i,n,s,0,0);const l=this._createMaskCanvas(e);a.setTransform(1,0,0,1,l.offsetX-o[4],l.offsetY-o[5]);for(let A=0,c=r.length;A<c;A+=2){const e=tHe.transform(o,[t,i,n,s,r[A],r[A+1]]),[c,u]=tHe.applyTransform([0,0],e);a.drawImage(l.canvas,c,u)}a.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,i=this.current.fillColor,n=this.current.patternFill;for(const s of e){const{data:e,width:r,height:a,transform:o}=s,l=this.cachedCanvases.getCanvas("maskCanvas",r,a),A=l.context;A.save();RPe(A,this.getObject(e,s)),A.globalCompositeOperation="source-in",A.fillStyle=n?i.getPattern(A,this,FHe(t),pPe):i,A.fillRect(0,0,r,a),A.restore(),t.save(),t.transform(...o),t.scale(1,-1),FPe(t,l.canvas,0,0,r,a,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):LUe()}paintImageXObjectRepeat(e,t,i,n){if(!this.contentVisible)return;const s=this.getObject(e);if(!s)return void LUe();const r=s.width,a=s.height,o=[];for(let l=0,A=n.length;l<A;l+=2)o.push({transform:[t,0,0,i,n[l],n[l+1]],x:0,y:0,w:r,h:a});this.paintInlineImageXObjectGroup(s,o)}applyTransferMapsToCanvas(e){return"none"!==this.current.transferMaps&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if("none"===this.current.transferMaps)return e.bitmap;const{bitmap:t,width:i,height:n}=e,s=this.cachedCanvases.getCanvas("inlineImage",i,n),r=s.context;return r.filter=this.current.transferMaps,r.drawImage(t,0,0),r.filter="none",s.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,i=e.height,n=this.ctx;if(this.save(),!HLe){const{filter:e}=n;"none"!==e&&""!==e&&(n.filter="none")}let s;if(n.scale(1/t,-1/i),e.bitmap)s=this.applyTransferMapsToBitmap(e);else if("function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)s=e;else{const n=this.cachedCanvases.getCanvas("inlineImage",t,i).context;MPe(n,e),s=this.applyTransferMapsToCanvas(n)}const r=this._scaleImage(s,FHe(n));n.imageSmoothingEnabled=UPe(DHe(n),e.interpolate),FPe(n,r.img,0,0,r.paintWidth,r.paintHeight,0,-i,t,i),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const i=this.ctx;let n;if(e.bitmap)n=e.bitmap;else{const t=e.width,i=e.height,s=this.cachedCanvases.getCanvas("inlineImage",t,i).context;MPe(s,e),n=this.applyTransferMapsToCanvas(s)}for(const s of t)i.save(),i.transform(...s.transform),i.scale(1,-1),FPe(i,n,s.x,s.y,s.w,s.h,0,-1,1,1),i.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const i=this.ctx;this.pendingClip&&(t||(this.pendingClip===GPe?i.clip("evenodd"):i.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),i.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=DHe(this.ctx);if(0===e[1]&&0===e[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),i=Math.hypot(e[0],e[2]),n=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(i,n)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){const{lineWidth:e}=this.current,{a:t,b:i,c:n,d:s}=this.ctx.getTransform();let r,a;if(0===i&&0===n){const i=Math.abs(t),n=Math.abs(s);if(i===n)if(0===e)r=a=1/i;else{const t=i*e;r=a=t<1?1/t:1}else if(0===e)r=1/i,a=1/n;else{const t=i*e,s=n*e;r=t<1?1/t:1,a=s<1?1/s:1}}else{const o=Math.abs(t*s-i*n),l=Math.hypot(t,i),A=Math.hypot(n,s);if(0===e)r=A/o,a=l/o;else{const t=e*o;r=A>t?A/t:1,a=l>t?l/t:1}}this._cachedScaleForStroking[0]=r,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:i}=this.current,[n,s]=this.getScaleForStroking();if(t.lineWidth=i||1,1===n&&1===s)return void t.stroke();const r=t.getLineDash();if(e&&t.save(),t.scale(n,s),r.length>0){const e=Math.max(n,s);t.setLineDash(r.map((t=>t/e))),t.lineDashOffset/=e}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}};for(const _ in FUe)void 0!==KPe.prototype[_]&&(KPe.prototype[FUe[_]]=KPe.prototype[_]);class qPe{static get workerPort(){return Bc(this,Ei)}static set workerPort(e){if(!("undefined"!=typeof Worker&&e instanceof Worker)&&null!==e)throw new Error("Invalid `workerPort` type.");bc(this,Ei,e)}static get workerSrc(){return Bc(this,wi)}static set workerSrc(e){if("string"!=typeof e)throw new Error("Invalid `workerSrc` type.");bc(this,wi,e)}}Ei=new WeakMap,wi=new WeakMap,yc(qPe,Ei,null),yc(qPe,wi,"");const YPe=1,VPe=2,WPe=1,jPe=2,JPe=3,zPe=4,XPe=5,$Pe=6,ZPe=7,eOe=8;function tOe(e){switch(e instanceof Error||"object"==typeof e&&null!==e||UUe('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new JUe(e.message);case"MissingPDFException":return new VUe(e.message);case"PasswordException":return new KUe(e.message,e.code);case"UnexpectedResponseException":return new WUe(e.message,e.status);case"UnknownErrorException":return new qUe(e.message,e.details);default:return new qUe(e.message,e.toString())}}let iOe=(Fi=class{constructor(e,t,i){yc(this,_i),yc(this,Qi,new AbortController),this.sourceName=e,this.targetName=t,this.comObj=i,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),i.addEventListener("message",Ec(this,_i,Si).bind(this),{signal:Bc(this,Qi).signal})}on(e,t){const i=this.actionHandler;if(i[e])throw new Error(`There is already an actionName called "${e}"`);i[e]=t}send(e,t,i){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},i)}sendWithPromise(e,t,i){const n=this.callbackId++,s=Promise.withResolvers();this.callbackCapabilities[n]=s;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},i)}catch(r){s.reject(r)}return s.promise}sendWithStream(e,t,i,n){const s=this.streamId++,r=this.sourceName,a=this.targetName,o=this.comObj;return new ReadableStream({start:i=>{const l=Promise.withResolvers();return this.streamControllers[s]={controller:i,startCall:l,pullCall:null,cancelCall:null,isClosed:!1},o.postMessage({sourceName:r,targetName:a,action:e,streamId:s,data:t,desiredSize:i.desiredSize},n),l.promise},pull:e=>{const t=Promise.withResolvers();return this.streamControllers[s].pullCall=t,o.postMessage({sourceName:r,targetName:a,stream:$Pe,streamId:s,desiredSize:e.desiredSize}),t.promise},cancel:e=>{HUe(e instanceof Error,"cancel must have a valid reason");const t=Promise.withResolvers();return this.streamControllers[s].cancelCall=t,this.streamControllers[s].isClosed=!0,o.postMessage({sourceName:r,targetName:a,stream:WPe,streamId:s,reason:tOe(e)}),t.promise}},i)}destroy(){var e;null==(e=Bc(this,Qi))||e.abort(),bc(this,Qi,null)}},Qi=new WeakMap,_i=new WeakSet,Si=function({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream)return void Ec(this,_i,ki).call(this,e);if(e.callback){const t=e.callbackId,i=this.callbackCapabilities[t];if(!i)throw new Error(`Cannot resolve callback ${t}`);if(delete this.callbackCapabilities[t],e.callback===YPe)i.resolve(e.data);else{if(e.callback!==VPe)throw new Error("Unexpected callback case");i.reject(tOe(e.reason))}return}const t=this.actionHandler[e.action];if(!t)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const i=this.sourceName,n=e.sourceName,s=this.comObj;new Promise((function(i){i(t(e.data))})).then((function(t){s.postMessage({sourceName:i,targetName:n,callback:YPe,callbackId:e.callbackId,data:t})}),(function(t){s.postMessage({sourceName:i,targetName:n,callback:VPe,callbackId:e.callbackId,reason:tOe(t)})}))}else e.streamId?Ec(this,_i,xi).call(this,e):t(e.data)},xi=function(e){const t=e.streamId,i=this.sourceName,n=e.sourceName,s=this.comObj,r=this,a=this.actionHandler[e.action],o={enqueue(e,r=1,a){if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=r,o>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),s.postMessage({sourceName:i,targetName:n,stream:zPe,streamId:t,chunk:e},a)},close(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:n,stream:JPe,streamId:t}),delete r.streamSinks[t])},error(e){HUe(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:n,stream:XPe,streamId:t,reason:tOe(e)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};o.sinkCapability.resolve(),o.ready=o.sinkCapability.promise,this.streamSinks[t]=o,new Promise((function(t){t(a(e.data,o))})).then((function(){s.postMessage({sourceName:i,targetName:n,stream:eOe,streamId:t,success:!0})}),(function(e){s.postMessage({sourceName:i,targetName:n,stream:eOe,streamId:t,reason:tOe(e)})}))},ki=function(e){const t=e.streamId,i=this.sourceName,n=e.sourceName,s=this.comObj,r=this.streamControllers[t],a=this.streamSinks[t];switch(e.stream){case eOe:e.success?r.startCall.resolve():r.startCall.reject(tOe(e.reason));break;case ZPe:e.success?r.pullCall.resolve():r.pullCall.reject(tOe(e.reason));break;case $Pe:if(!a){s.postMessage({sourceName:i,targetName:n,stream:ZPe,streamId:t,success:!0});break}a.desiredSize<=0&&e.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=e.desiredSize,new Promise((function(e){var t;e(null==(t=a.onPull)?void 0:t.call(a))})).then((function(){s.postMessage({sourceName:i,targetName:n,stream:ZPe,streamId:t,success:!0})}),(function(e){s.postMessage({sourceName:i,targetName:n,stream:ZPe,streamId:t,reason:tOe(e)})}));break;case zPe:if(HUe(r,"enqueue should have stream controller"),r.isClosed)break;r.controller.enqueue(e.chunk);break;case JPe:if(HUe(r,"close should have stream controller"),r.isClosed)break;r.isClosed=!0,r.controller.close(),Ec(this,_i,Di).call(this,r,t);break;case XPe:HUe(r,"error should have stream controller"),r.controller.error(tOe(e.reason)),Ec(this,_i,Di).call(this,r,t);break;case jPe:e.success?r.cancelCall.resolve():r.cancelCall.reject(tOe(e.reason)),Ec(this,_i,Di).call(this,r,t);break;case WPe:if(!a)break;new Promise((function(t){var i;t(null==(i=a.onCancel)?void 0:i.call(a,tOe(e.reason)))})).then((function(){s.postMessage({sourceName:i,targetName:n,stream:jPe,streamId:t,success:!0})}),(function(e){s.postMessage({sourceName:i,targetName:n,stream:jPe,streamId:t,reason:tOe(e)})})),a.sinkCapability.reject(tOe(e.reason)),a.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}},Di=async function(e,t){var i,n,s;await Promise.allSettled([null==(i=e.startCall)?void 0:i.promise,null==(n=e.pullCall)?void 0:n.promise,null==(s=e.cancelCall)?void 0:s.promise]),delete this.streamControllers[t]},Fi);class nOe{constructor({parsedData:e,rawData:t}){yc(this,Ti),yc(this,Mi),bc(this,Ti,e),bc(this,Mi,t)}getRaw(){return Bc(this,Mi)}get(e){return Bc(this,Ti).get(e)??null}getAll(){return $Ue(Bc(this,Ti))}has(e){return Bc(this,Ti).has(e)}}Ti=new WeakMap,Mi=new WeakMap;const sOe=Symbol("INTERNAL");class rOe{constructor(e,{name:t,intent:i,usage:n,rbGroups:s}){yc(this,Ri,!1),yc(this,Ni,!1),yc(this,Li,!1),yc(this,Ui,!0),bc(this,Ri,!!(e&qLe)),bc(this,Ni,!!(e&YLe)),this.name=t,this.intent=i,this.usage=n,this.rbGroups=s}get visible(){if(Bc(this,Li))return Bc(this,Ui);if(!Bc(this,Ui))return!1;const{print:e,view:t}=this.usage;return Bc(this,Ri)?"OFF"!==(null==t?void 0:t.viewState):!Bc(this,Ni)||"OFF"!==(null==e?void 0:e.printState)}_setVisible(e,t,i=!1){e!==sOe&&UUe("Internal method `_setVisible` called."),bc(this,Li,i),bc(this,Ui,t)}}Ri=new WeakMap,Ni=new WeakMap,Li=new WeakMap,Ui=new WeakMap;class aOe{constructor(e,t=qLe){if(yc(this,Ki),yc(this,Hi,null),yc(this,Pi,new Map),yc(this,Oi,null),yc(this,Gi,null),this.renderingIntent=t,this.name=null,this.creator=null,null!==e){this.name=e.name,this.creator=e.creator,bc(this,Gi,e.order);for(const i of e.groups)Bc(this,Pi).set(i.id,new rOe(t,i));if("OFF"===e.baseState)for(const e of Bc(this,Pi).values())e._setVisible(sOe,!1);for(const t of e.on)Bc(this,Pi).get(t)._setVisible(sOe,!0);for(const t of e.off)Bc(this,Pi).get(t)._setVisible(sOe,!1);bc(this,Oi,this.getHash())}}isVisible(e){if(0===Bc(this,Pi).size)return!0;if(!e)return NUe(),!0;if("OCG"===e.type)return Bc(this,Pi).has(e.id)?Bc(this,Pi).get(e.id).visible:(LUe(e.id),!0);if("OCMD"===e.type){if(e.expression)return Ec(this,Ki,qi).call(this,e.expression);if(!e.policy||"AnyOn"===e.policy){for(const t of e.ids){if(!Bc(this,Pi).has(t))return LUe(),!0;if(Bc(this,Pi).get(t).visible)return!0}return!1}if("AllOn"===e.policy){for(const t of e.ids){if(!Bc(this,Pi).has(t))return LUe(),!0;if(!Bc(this,Pi).get(t).visible)return!1}return!0}if("AnyOff"===e.policy){for(const t of e.ids){if(!Bc(this,Pi).has(t))return LUe(),!0;if(!Bc(this,Pi).get(t).visible)return!0}return!1}if("AllOff"===e.policy){for(const t of e.ids){if(!Bc(this,Pi).has(t))return LUe(),!0;if(Bc(this,Pi).get(t).visible)return!1}return!0}return LUe(e.policy),!0}return LUe(e.type),!0}setVisibility(e,t=!0,i=!0){var n;const s=Bc(this,Pi).get(e);if(s){if(i&&t&&s.rbGroups.length)for(const t of s.rbGroups)for(const i of t)i!==e&&(null==(n=Bc(this,Pi).get(i))||n._setVisible(sOe,!1,!0));s._setVisible(sOe,!!t,!0),bc(this,Hi,null)}else LUe()}setOCGState({state:e,preserveRB:t}){let i;for(const n of e){switch(n){case"ON":case"OFF":case"Toggle":i=n;continue}const e=Bc(this,Pi).get(n);if(e)switch(i){case"ON":this.setVisibility(n,!0,t);break;case"OFF":this.setVisibility(n,!1,t);break;case"Toggle":this.setVisibility(n,!e.visible,t)}}bc(this,Hi,null)}get hasInitialVisibility(){return null===Bc(this,Oi)||this.getHash()===Bc(this,Oi)}getOrder(){return Bc(this,Pi).size?Bc(this,Gi)?Bc(this,Gi).slice():[...Bc(this,Pi).keys()]:null}getGroups(){return Bc(this,Pi).size>0?$Ue(Bc(this,Pi)):null}getGroup(e){return Bc(this,Pi).get(e)||null}getHash(){if(null!==Bc(this,Hi))return Bc(this,Hi);const e=new iPe;for(const[t,i]of Bc(this,Pi))e.update(`${t}:${i.visible}`);return bc(this,Hi,e.hexdigest())}}Hi=new WeakMap,Pi=new WeakMap,Oi=new WeakMap,Gi=new WeakMap,Ki=new WeakSet,qi=function(e){const t=e.length;if(t<2)return!0;const i=e[0];for(let n=1;n<t;n++){const t=e[n];let s;if(Array.isArray(t))s=Ec(this,Ki,qi).call(this,t);else{if(!Bc(this,Pi).has(t))return LUe(),!0;s=Bc(this,Pi).get(t).visible}switch(i){case"And":if(!s)return!1;break;case"Or":if(s)return!0;break;case"Not":return!s;default:return!0}}return"And"===i};class oOe{constructor(e,{disableRange:t=!1,disableStream:i=!1}){HUe(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:n,initialData:s,progressiveDone:r,contentDispositionFilename:a}=e;if(this._queuedChunks=[],this._progressiveDone=r,this._contentDispositionFilename=a,(null==s?void 0:s.length)>0){const e=s instanceof Uint8Array&&s.byteLength===s.buffer.byteLength?s.buffer:new Uint8Array(s).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!i,this._isRangeSupported=!t,this._contentLength=n,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})})),e.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})})),e.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})})),e.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),e.transportReady()}_onReceiveData({begin:e,chunk:t}){const i=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;if(void 0===e)this._fullRequestReader?this._fullRequestReader._enqueue(i):this._queuedChunks.push(i);else{HUe(this._rangeReaders.some((function(t){return t._begin===e&&(t._enqueue(i),!0)})),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var e;return(null==(e=this._fullRequestReader)?void 0:e._loaded)??0}_onProgress(e){var t,i,n,s;void 0===e.total?null==(i=null==(t=this._rangeReaders[0])?void 0:t.onProgress)||i.call(t,{loaded:e.loaded}):null==(s=null==(n=this._fullRequestReader)?void 0:n.onProgress)||s.call(n,{loaded:e.loaded,total:e.total})}_onProgressiveDone(){var e;null==(e=this._fullRequestReader)||e.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){HUe(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new lOe(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const i=new AOe(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(i),i}cancelAllRequests(e){var t;null==(t=this._fullRequestReader)||t.cancel(e);for(const i of this._rangeReaders.slice(0))i.cancel(e);this._pdfDataRangeTransport.abort()}}class lOe{constructor(e,t,i=!1,n=null){this._stream=e,this._done=i||!1,this._filename=yHe(n)?n:null,this._queuedChunks=t||[],this._loaded=0;for(const s of this._queuedChunks)this._loaded+=s.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length>0){this._requests.shift().resolve({value:e,done:!1})}else this._queuedChunks.push(e);this._loaded+=e.byteLength}}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0){return{value:this._queuedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class AOe{constructor(e,t,i){this._stream=e,this._begin=t,this._end=i,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function cOe(e,t){const i=new Headers;if(!e||!t||"object"!=typeof t)return i;for(const n in t){const e=t[n];void 0!==e&&i.append(n,e)}return i}function uOe({responseHeaders:e,isHttp:t,rangeChunkSize:i,disableRange:n}){const s={allowRangeRequests:!1,suggestedLength:void 0},r=parseInt(e.get("Content-Length"),10);if(!Number.isInteger(r))return s;if(s.suggestedLength=r,r<=2*i)return s;if(n||!t)return s;if("bytes"!==e.get("Accept-Ranges"))return s;return"identity"!==(e.get("Content-Encoding")||"identity")||(s.allowRangeRequests=!0),s}function hOe(e){const t=e.get("Content-Disposition");if(t){let e=function(e){let t=!0,i=n("filename\\*","i").exec(e);if(i){i=i[1];let e=a(i);return e=unescape(e),e=o(e),e=l(e),r(e)}if(i=function(e){const t=[];let i;const s=n("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(i=s.exec(e));){let[,e,n,s]=i;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[n,s]}const r=[];for(let n=0;n<t.length&&n in t;++n){let[e,i]=t[n];i=a(i),e&&(i=unescape(i),0===n&&(i=o(i))),r.push(i)}return r.join("")}(e),i)return r(l(i));if(i=n("filename","i").exec(e),i){i=i[1];let e=a(i);return e=l(e),r(e)}function n(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function s(e,i){if(e){if(!/^[\x00-\xFF]+$/.test(i))return i;try{const n=new TextDecoder(e,{fatal:!0}),s=XUe(i);i=n.decode(s),t=!1}catch{}}return i}function r(e){return t&&/[\x80-\xff]/.test(e)&&(e=s("utf-8",e),t&&(e=s("iso-8859-1",e))),e}function a(e){if(e.startsWith('"')){const t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){const i=t[e].indexOf('"');-1!==i&&(t[e]=t[e].slice(0,i),t.length=e+1),t[e]=t[e].replaceAll(/\\(.)/g,"$1")}e=t.join('"')}return e}function o(e){const t=e.indexOf("'");return-1===t?e:s(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function l(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,i,n){if("q"===i||"Q"===i)return s(t,n=(n=n.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{n=atob(n)}catch{}return s(t,n)}))}return""}(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if(yHe(e))return e}return null}function dOe(e,t){return 404===e||0===e&&t.startsWith("file:")?new VUe('Missing PDF "'+t+'".'):new WUe(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)}function gOe(e){return 200===e||206===e}function pOe(e,t,i){return{method:"GET",headers:e,signal:i.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function fOe(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:(LUe(),new Uint8Array(e).buffer)}class mOe{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.headers=cOe(this.isHttp,e.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e;return(null==(e=this._fullRequestReader)?void 0:e._loaded)??0}getFullReader(){return HUe(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new COe(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const i=new IOe(this,e,t);return this._rangeRequestReaders.push(i),i}cancelAllRequests(e){var t;null==(t=this._fullRequestReader)||t.cancel(e);for(const i of this._rangeRequestReaders.slice(0))i.cancel(e)}}class COe{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange;const i=new Headers(e.headers),n=t.url;fetch(n,pOe(i,this._withCredentials,this._abortController)).then((t=>{if(!gOe(t.status))throw dOe(t.status,n);this._reader=t.body.getReader(),this._headersCapability.resolve();const i=t.headers,{allowRangeRequests:s,suggestedLength:r}=uOe({responseHeaders:i,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=r||this._contentLength,this._filename=hOe(i),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new JUe("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;await this._headersCapability.promise;const{value:t,done:i}=await this._reader.read();return i?{value:t,done:i}:(this._loaded+=t.byteLength,null==(e=this.onProgress)||e.call(this,{loaded:this._loaded,total:this._contentLength}),{value:fOe(t),done:!1})}cancel(e){var t;null==(t=this._reader)||t.cancel(e),this._abortController.abort()}}class IOe{constructor(e,t,i){this._stream=e,this._reader=null,this._loaded=0;const n=e.source;this._withCredentials=n.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!n.disableStream,this._abortController=new AbortController;const s=new Headers(e.headers);s.append("Range",`bytes=${t}-${i-1}`);const r=n.url;fetch(r,pOe(s,this._withCredentials,this._abortController)).then((e=>{if(!gOe(e.status))throw dOe(e.status,r);this._readCapability.resolve(),this._reader=e.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;await this._readCapability.promise;const{value:t,done:i}=await this._reader.read();return i?{value:t,done:i}:(this._loaded+=t.byteLength,null==(e=this.onProgress)||e.call(this,{loaded:this._loaded}),{value:fOe(t),done:!1})}cancel(e){var t;null==(t=this._reader)||t.cancel(e),this._abortController.abort()}}class vOe{constructor({url:e,httpHeaders:t,withCredentials:i}){this.url=e,this.isHttp=/^https?:/i.test(e),this.headers=cOe(this.isHttp,t),this.withCredentials=i||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,i){const n={begin:e,end:t};for(const s in i)n[s]=i[s];return this.request(n)}requestFull(e){return this.request(e)}request(e){const t=new XMLHttpRequest,i=this.currXhrId++,n=this.pendingRequests[i]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const[s,r]of this.headers)t.setRequestHeader(s,r);return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),n.expectedStatus=206):n.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(i){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,i),t.onprogress=this.onProgress.bind(this,i),n.onHeadersReceived=e.onHeadersReceived,n.onDone=e.onDone,n.onError=e.onError,n.onProgress=e.onProgress,t.send(null),i}onProgress(e,t){var i;const n=this.pendingRequests[e];n&&(null==(i=n.onProgress)||i.call(n,t))}onStateChange(e,t){var i,n,s;const r=this.pendingRequests[e];if(!r)return;const a=r.xhr;if(a.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4!==a.readyState)return;if(!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],0===a.status&&this.isHttp)return void(null==(i=r.onError)||i.call(r,a.status));const o=a.status||200;if(!(200===o&&206===r.expectedStatus)&&o!==r.expectedStatus)return void(null==(n=r.onError)||n.call(r,a.status));const l=function(e){const t=e.response;return"string"!=typeof t?t:XUe(t).buffer}(a);if(206===o){const e=a.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);r.onDone({begin:parseInt(t[1],10),chunk:l})}else l?r.onDone({begin:0,chunk:l}):null==(s=r.onError)||s.call(r,a.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}class BOe{constructor(e){this._source=e,this._manager=new vOe(e),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return HUe(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new yOe(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const i=new bOe(this._manager,e,t);return i.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(i),i}cancelAllRequests(e){var t;null==(t=this._fullRequestReader)||t.cancel(e);for(const i of this._rangeRequestReaders.slice(0))i.cancel(e)}}class yOe{constructor(e,t){this._manager=e;const i={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(i),this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e).getAllResponseHeaders(),i=new Headers(t?t.trim().split(/[\r\n]+/).map((e=>{const[t,...i]=e.split(": ");return[t,i.join(": ")]})):[]),{allowRangeRequests:n,suggestedLength:s}=uOe({responseHeaders:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});n&&(this._isRangeSupported=!0),this._contentLength=s||this._contentLength,this._filename=hOe(i),this._isRangeSupported&&this._manager.abortRequest(e),this._headersCapability.resolve()}_onDone(e){if(e)if(this._requests.length>0){this._requests.shift().resolve({value:e.chunk,done:!1})}else this._cachedChunks.push(e.chunk);if(this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=dOe(e,this._url),this._headersCapability.reject(this._storedError);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){var t;null==(t=this.onProgress)||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0){return{value:this._cachedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersCapability.reject(e);for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class bOe{constructor(e,t,i){this._manager=e;const n={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,i,n),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e;null==(e=this.onClosed)||e.call(this,this)}_onDone(e){const t=e.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}else this._queuedChunk=t;this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=dOe(e,this._url);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){var t;this.isStreamingSupported||null==(t=this.onProgress)||t.call(this,{loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const EOe=/^[a-z][a-z0-9\-+.]+:/i;class wOe{constructor(e){this.source=e,this.url=function(e){if(EOe.test(e))return new URL(e);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(e))}(e.url),HUe("file:"===this.url.protocol,"PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e;return(null==(e=this._fullRequestReader)?void 0:e._loaded)??0}getFullReader(){return HUe(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new QOe(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const i=new _Oe(this,e,t);return this._rangeRequestReaders.push(i),i}cancelAllRequests(e){var t;null==(t=this._fullRequestReader)||t.cancel(e);for(const i of this._rangeRequestReaders.slice(0))i.cancel(e)}}class QOe{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const i=process.getBuiltinModule("fs");i.promises.lstat(this._url).then((e=>{this._contentLength=e.size,this._setReadableStream(i.createReadStream(this._url)),this._headersCapability.resolve()}),(e=>{"ENOENT"===e.code&&(e=new VUe(`Missing PDF "${this._url}".`)),this._storedError=e,this._headersCapability.reject(e)}))}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();if(null===t)return this._readCapability=Promise.withResolvers(),this.read();this._loaded+=t.length,null==(e=this.onProgress)||e.call(this,{loaded:this._loaded,total:this._contentLength});return{value:new Uint8Array(t).buffer,done:!1}}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new JUe("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class _Oe{constructor(e,t,i){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const n=e.source;this._isStreamingSupported=!n.disableStream;const s=process.getBuiltinModule("fs");this._setReadableStream(s.createReadStream(this._url,{start:t,end:i-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){var e;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();if(null===t)return this._readCapability=Promise.withResolvers(),this.read();this._loaded+=t.length,null==(e=this.onProgress)||e.call(this,{loaded:this._loaded});return{value:new Uint8Array(t).buffer,done:!1}}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}const SOe=30,xOe=class e{constructor({textContentSource:t,container:i,viewport:n}){var s;if(yc(this,fn),yc(this,Vi,Promise.withResolvers()),yc(this,Wi,null),yc(this,ji,!1),yc(this,Ji,!!(null==(Yi=globalThis.FontInspector)?void 0:Yi.enabled)),yc(this,zi,null),yc(this,Xi,null),yc(this,$i,0),yc(this,Zi,0),yc(this,en,null),yc(this,tn,null),yc(this,nn,0),yc(this,sn,0),yc(this,rn,Object.create(null)),yc(this,an,[]),yc(this,on,null),yc(this,ln,[]),yc(this,An,new WeakMap),yc(this,cn,null),t instanceof ReadableStream)bc(this,on,t);else{if("object"!=typeof t)throw new Error('No "textContentSource" parameter specified.');bc(this,on,new ReadableStream({start(e){e.enqueue(t),e.close()}}))}bc(this,Wi,bc(this,tn,i)),bc(this,sn,n.scale*(globalThis.devicePixelRatio||1)),bc(this,nn,n.rotation),bc(this,Xi,{div:null,properties:null,ctx:null});const{pageWidth:r,pageHeight:a,pageX:o,pageY:l}=n.rawDims;bc(this,cn,[1,0,0,-1,-o,l+a]),bc(this,Zi,r),bc(this,$i,a),Ec(s=e,vn,bn).call(s),THe(i,n),Bc(this,Vi).promise.finally((()=>{Bc(e,pn).delete(this),bc(this,Xi,null),bc(this,rn,null)})).catch((()=>{}))}static get fontFamilyMap(){const{isWindows:e,isFirefox:t}=ZUe.platform;return OUe(this,"fontFamilyMap",new Map([["sans-serif",(e&&t?"Calibri, ":"")+"sans-serif"],["monospace",(e&&t?"Lucida Console, ":"")+"monospace"]]))}render(){const t=()=>{Bc(this,en).read().then((({value:e,done:i})=>{i?Bc(this,Vi).resolve():(Bc(this,zi)??bc(this,zi,e.lang),Object.assign(Bc(this,rn),e.styles),Ec(this,fn,mn).call(this,e.items),t())}),Bc(this,Vi).reject)};return bc(this,en,Bc(this,on).getReader()),Bc(e,pn).add(this),t(),Bc(this,Vi).promise}update({viewport:t,onBefore:i=null}){var n;const s=t.scale*(globalThis.devicePixelRatio||1),r=t.rotation;if(r!==Bc(this,nn)&&(null==i||i(),bc(this,nn,r),THe(Bc(this,tn),{rotation:r})),s!==Bc(this,sn)){null==i||i(),bc(this,sn,s);const t={div:null,properties:null,ctx:Ec(n=e,vn,Bn).call(n,Bc(this,zi))};for(const e of Bc(this,ln))t.properties=Bc(this,An).get(e),t.div=e,Ec(this,fn,In).call(this,t)}}cancel(){var e;const t=new JUe("TextLayer task cancelled.");null==(e=Bc(this,en))||e.cancel(t).catch((()=>{})),bc(this,en,null),Bc(this,Vi).reject(t)}get textDivs(){return Bc(this,ln)}get textContentItemsStr(){return Bc(this,an)}get container(){return Bc(this,Wi)}static cleanup(){if(!(Bc(this,pn).size>0)){Bc(this,un).clear();for(const{canvas:e}of Bc(this,hn).values())e.remove();Bc(this,hn).clear()}}};Vi=new WeakMap,Wi=new WeakMap,ji=new WeakMap,Ji=new WeakMap,zi=new WeakMap,Xi=new WeakMap,$i=new WeakMap,Zi=new WeakMap,en=new WeakMap,tn=new WeakMap,nn=new WeakMap,sn=new WeakMap,rn=new WeakMap,an=new WeakMap,on=new WeakMap,ln=new WeakMap,An=new WeakMap,cn=new WeakMap,un=new WeakMap,hn=new WeakMap,dn=new WeakMap,gn=new WeakMap,pn=new WeakMap,fn=new WeakSet,mn=function(e){var t,i;if(Bc(this,ji))return;(i=Bc(this,Xi)).ctx??(i.ctx=Ec(t=xOe,vn,Bn).call(t,Bc(this,zi)));const n=Bc(this,ln),s=Bc(this,an);for(const r of e){if(n.length>1e5)return LUe(),void bc(this,ji,!0);if(void 0!==r.str)s.push(r.str),Ec(this,fn,Cn).call(this,r);else if("beginMarkedContentProps"===r.type||"beginMarkedContent"===r.type){const e=Bc(this,Wi);bc(this,Wi,document.createElement("span")),Bc(this,Wi).classList.add("markedContent"),null!==r.id&&Bc(this,Wi).setAttribute("id",`${r.id}`),e.append(Bc(this,Wi))}else"endMarkedContent"===r.type&&bc(this,Wi,Bc(this,Wi).parentNode)}},Cn=function(e){var t;const i=document.createElement("span"),n={angle:0,canvasWidth:0,hasText:""!==e.str,hasEOL:e.hasEOL,fontSize:0};Bc(this,ln).push(i);const s=tHe.transform(Bc(this,cn),e.transform);let r=Math.atan2(s[1],s[0]);const a=Bc(this,rn)[e.fontName];a.vertical&&(r+=Math.PI/2);let o=Bc(this,Ji)&&a.fontSubstitution||a.fontFamily;o=xOe.fontFamilyMap.get(o)||o;const l=Math.hypot(s[2],s[3]),A=l*Ec(t=xOe,vn,En).call(t,o,Bc(this,zi));let c,u;0===r?(c=s[4],u=s[5]-A):(c=s[4]+A*Math.sin(r),u=s[5]-A*Math.cos(r));const h="calc(var(--scale-factor)*",d=i.style;Bc(this,Wi)===Bc(this,tn)?(d.left=`${(100*c/Bc(this,Zi)).toFixed(2)}%`,d.top=`${(100*u/Bc(this,$i)).toFixed(2)}%`):(d.left=`${h}${c.toFixed(2)}px)`,d.top=`${h}${u.toFixed(2)}px)`),d.fontSize=`${h}${(Bc(xOe,gn)*l).toFixed(2)}px)`,d.fontFamily=o,n.fontSize=l,i.setAttribute("role","presentation"),i.textContent=e.str,i.dir=e.dir,Bc(this,Ji)&&(i.dataset.fontName=a.fontSubstitutionLoadedName||e.fontName),0!==r&&(n.angle=r*(180/Math.PI));let g=!1;if(e.str.length>1)g=!0;else if(" "!==e.str&&e.transform[0]!==e.transform[3]){const t=Math.abs(e.transform[0]),i=Math.abs(e.transform[3]);t!==i&&Math.max(t,i)/Math.min(t,i)>1.5&&(g=!0)}if(g&&(n.canvasWidth=a.vertical?e.height:e.width),Bc(this,An).set(i,n),Bc(this,Xi).div=i,Bc(this,Xi).properties=n,Ec(this,fn,In).call(this,Bc(this,Xi)),n.hasText&&Bc(this,Wi).append(i),n.hasEOL){const e=document.createElement("br");e.setAttribute("role","presentation"),Bc(this,Wi).append(e)}},In=function(e){var t;const{div:i,properties:n,ctx:s}=e,{style:r}=i;let a="";if(Bc(xOe,gn)>1&&(a=`scale(${1/Bc(xOe,gn)})`),0!==n.canvasWidth&&n.hasText){const{fontFamily:e}=r,{canvasWidth:o,fontSize:l}=n;Ec(t=xOe,vn,yn).call(t,s,l*Bc(this,sn),e);const{width:A}=s.measureText(i.textContent);A>0&&(a=`scaleX(${o*Bc(this,sn)/A}) ${a}`)}0!==n.angle&&(a=`rotate(${n.angle}deg) ${a}`),a.length>0&&(r.transform=a)},vn=new WeakSet,Bn=function(e=null){let t=Bc(this,hn).get(e||(e=""));if(!t){const i=document.createElement("canvas");i.className="hiddenCanvasElement",i.lang=e,document.body.append(i),t=i.getContext("2d",{alpha:!1,willReadFrequently:!0}),Bc(this,hn).set(e,t),Bc(this,dn).set(t,{size:0,family:""})}return t},yn=function(e,t,i){const n=Bc(this,dn).get(e);t===n.size&&i===n.family||(e.font=`${t}px ${i}`,n.size=t,n.family=i)},bn=function(){if(null!==Bc(this,gn))return;const e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.style.position="absolute",e.textContent="X",document.body.append(e),bc(this,gn,e.getBoundingClientRect().height),e.remove()},En=function(e,t){const i=Bc(this,un).get(e);if(i)return i;const n=Ec(this,vn,Bn).call(this,t);n.canvas.width=n.canvas.height=SOe,Ec(this,vn,yn).call(this,n,SOe,e);const s=n.measureText("");let r=s.fontBoundingBoxAscent,a=Math.abs(s.fontBoundingBoxDescent);if(r){const t=r/(r+a);return Bc(this,un).set(e,t),n.canvas.width=n.canvas.height=0,t}n.strokeStyle="red",n.clearRect(0,0,SOe,SOe),n.strokeText("g",0,0);let o=n.getImageData(0,0,SOe,SOe).data;a=0;for(let A=o.length-1-3;A>=0;A-=4)if(o[A]>0){a=Math.ceil(A/4/SOe);break}n.clearRect(0,0,SOe,SOe),n.strokeText("A",0,SOe),o=n.getImageData(0,0,SOe,SOe).data,r=0;for(let A=0,c=o.length;A<c;A+=4)if(o[A]>0){r=SOe-Math.floor(A/4/SOe);break}n.canvas.width=n.canvas.height=0;const l=r?r/(r+a):.8;return Bc(this,un).set(e,l),l},yc(xOe,vn),yc(xOe,un,new Map),yc(xOe,hn,new Map),yc(xOe,dn,new WeakMap),yc(xOe,gn,null),yc(xOe,pn,new Set);let kOe=xOe;class DOe{static textContent(e){const t=[],i={items:t,styles:Object.create(null)};return function e(i){var n;if(!i)return;let s=null;const r=i.name;if("#text"===r)s=i.value;else{if(!DOe.shouldBuildText(r))return;(null==(n=null==i?void 0:i.attributes)?void 0:n.textContent)?s=i.attributes.textContent:i.value&&(s=i.value)}if(null!==s&&t.push({str:s}),i.children)for(const t of i.children)e(t)}(e),i}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}const FOe=65536,TOe=HLe?class extends lPe{_createCanvas(e,t){return process.getBuiltinModule("module").createRequire("file:///E:/99_Demo/pdf.js/src/display/node_utils.js")("@napi-rs/canvas").createCanvas(e,t)}}:class extends lPe{constructor({ownerDocument:e=globalThis.document,enableHWA:t=!1}){super({enableHWA:t}),this._document=e}_createCanvas(e,t){const i=this._document.createElement("canvas");return i.width=e,i.height=t,i}},MOe=HLe?class extends APe{async _fetch(e){return gPe(e)}}:cPe,ROe=HLe?class extends uPe{}:class extends uPe{constructor({docId:e,ownerDocument:t=globalThis.document}){super(),yc(this,li),yc(this,ti),yc(this,ii),yc(this,ni),yc(this,si),yc(this,ri),yc(this,ai),yc(this,oi,0),bc(this,si,e),bc(this,ri,t)}addFilter(e){if(!e)return"none";let t=Bc(this,li,Ai).get(e);if(t)return t;const[i,n,s]=Ec(this,li,hi).call(this,e),r=1===e.length?i:`${i}${n}${s}`;if(t=Bc(this,li,Ai).get(r),t)return Bc(this,li,Ai).set(e,t),t;const a=`g_${Bc(this,si)}_transfer_map_${wc(this,oi)._++}`,o=Ec(this,li,di).call(this,a);Bc(this,li,Ai).set(e,o),Bc(this,li,Ai).set(r,o);const l=Ec(this,li,fi).call(this,a);return Ec(this,li,Ci).call(this,i,n,s,l),o}addHCMFilter(e,t){var i;const n=`${e}-${t}`,s="base";let r=Bc(this,li,ci).get(s);if((null==r?void 0:r.key)===n)return r.url;if(r?(null==(i=r.filter)||i.remove(),r.key=n,r.url="none",r.filter=null):(r={key:n,url:"none",filter:null},Bc(this,li,ci).set(s,r)),!e||!t)return r.url;const a=Ec(this,li,vi).call(this,e);e=tHe.makeHexColor(...a);const o=Ec(this,li,vi).call(this,t);if(t=tHe.makeHexColor(...o),Bc(this,li,ui).style.color="","#000000"===e&&"#ffffff"===t||e===t)return r.url;const l=new Array(256);for(let d=0;d<=255;d++){const e=d/255;l[d]=e<=.03928?e/12.92:((e+.055)/1.055)**2.4}const A=l.join(","),c=`g_${Bc(this,si)}_hcm_filter`,u=r.filter=Ec(this,li,fi).call(this,c);Ec(this,li,Ci).call(this,A,A,A,u),Ec(this,li,pi).call(this,u);const h=(e,t)=>{const i=a[e]/255,n=o[e]/255,s=new Array(t+1);for(let r=0;r<=t;r++)s[r]=i+r/t*(n-i);return s.join(",")};return Ec(this,li,Ci).call(this,h(0,5),h(1,5),h(2,5),u),r.url=Ec(this,li,di).call(this,c),r.url}addAlphaFilter(e){let t=Bc(this,li,Ai).get(e);if(t)return t;const[i]=Ec(this,li,hi).call(this,[e]),n=`alpha_${i}`;if(t=Bc(this,li,Ai).get(n),t)return Bc(this,li,Ai).set(e,t),t;const s=`g_${Bc(this,si)}_alpha_map_${wc(this,oi)._++}`,r=Ec(this,li,di).call(this,s);Bc(this,li,Ai).set(e,r),Bc(this,li,Ai).set(n,r);const a=Ec(this,li,fi).call(this,s);return Ec(this,li,Ii).call(this,i,a),r}addLuminosityFilter(e){let t,i,n=Bc(this,li,Ai).get(e||"luminosity");if(n)return n;if(e?([t]=Ec(this,li,hi).call(this,[e]),i=`luminosity_${t}`):i="luminosity",n=Bc(this,li,Ai).get(i),n)return Bc(this,li,Ai).set(e,n),n;const s=`g_${Bc(this,si)}_luminosity_map_${wc(this,oi)._++}`,r=Ec(this,li,di).call(this,s);Bc(this,li,Ai).set(e,r),Bc(this,li,Ai).set(i,r);const a=Ec(this,li,fi).call(this,s);return Ec(this,li,gi).call(this,a),e&&Ec(this,li,Ii).call(this,t,a),r}addHighlightHCMFilter(e,t,i,n,s){var r;const a=`${t}-${i}-${n}-${s}`;let o=Bc(this,li,ci).get(e);if((null==o?void 0:o.key)===a)return o.url;if(o?(null==(r=o.filter)||r.remove(),o.key=a,o.url="none",o.filter=null):(o={key:a,url:"none",filter:null},Bc(this,li,ci).set(e,o)),!t||!i)return o.url;const[l,A]=[t,i].map(Ec(this,li,vi).bind(this));let c=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),u=Math.round(.2126*A[0]+.7152*A[1]+.0722*A[2]),[h,d]=[n,s].map(Ec(this,li,vi).bind(this));u<c&&([c,u,h,d]=[u,c,d,h]),Bc(this,li,ui).style.color="";const g=(e,t,i)=>{const n=new Array(256),s=(u-c)/i,r=e/255,a=(t-e)/(255*i);let o=0;for(let l=0;l<=i;l++){const e=Math.round(c+l*s),t=r+l*a;for(let i=o;i<=e;i++)n[i]=t;o=e+1}for(let l=o;l<256;l++)n[l]=n[o-1];return n.join(",")},p=`g_${Bc(this,si)}_hcm_${e}_filter`,f=o.filter=Ec(this,li,fi).call(this,p);return Ec(this,li,pi).call(this,f),Ec(this,li,Ci).call(this,g(h[0],d[0],5),g(h[1],d[1],5),g(h[2],d[2],5),f),o.url=Ec(this,li,di).call(this,p),o.url}destroy(e=!1){var t,i,n,s;e&&(null==(t=Bc(this,ai))?void 0:t.size)||(null==(i=Bc(this,ni))||i.parentNode.parentNode.remove(),bc(this,ni,null),null==(n=Bc(this,ii))||n.clear(),bc(this,ii,null),null==(s=Bc(this,ai))||s.clear(),bc(this,ai,null),bc(this,oi,0))}},NOe=HLe?class extends hPe{async _fetch(e){return gPe(e)}}:dPe;function LOe(e={}){"string"==typeof e||e instanceof URL?e={url:e}:(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(e={data:e});const t=new POe,{docId:i}=t,n=e.url?function(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch{if(HLe&&"string"==typeof e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(e.url):null,s=e.data?function(e){if(HLe&&"undefined"!=typeof Buffer&&e instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if("string"==typeof e)return XUe(e);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)||"object"==typeof e&&!isNaN(null==e?void 0:e.length))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(e.data):null,r=e.httpHeaders||null,a=!0===e.withCredentials,o=e.password??null,l=e.range instanceof OOe?e.range:null,A=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:FOe;let c=e.worker instanceof VOe?e.worker:null;const u=e.verbosity,h="string"!=typeof e.docBaseUrl||BHe(e.docBaseUrl)?null:e.docBaseUrl,d="string"==typeof e.cMapUrl?e.cMapUrl:null,g=!1!==e.cMapPacked,p=e.CMapReaderFactory||MOe,f="string"==typeof e.standardFontDataUrl?e.standardFontDataUrl:null,m=e.StandardFontDataFactory||NOe,C=!0!==e.stopAtErrors,I=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,v=!1!==e.isEvalSupported,B="boolean"==typeof e.isOffscreenCanvasSupported?e.isOffscreenCanvasSupported:!HLe,y="boolean"==typeof e.isImageDecoderSupported?e.isImageDecoderSupported:!HLe&&(ZUe.platform.isFirefox||!globalThis.chrome),b=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,E="boolean"==typeof e.disableFontFace?e.disableFontFace:HLe,w=!0===e.fontExtraProperties,Q=!0===e.enableXfa,_=e.ownerDocument||globalThis.document,S=!0===e.disableRange,x=!0===e.disableStream,k=!0===e.disableAutoFetch,D=!0===e.pdfBug,F=e.CanvasFactory||TOe,T=e.FilterFactory||ROe,M=!0===e.enableHWA,R=l?l.length:e.length??NaN,N="boolean"==typeof e.useSystemFonts?e.useSystemFonts:!HLe&&!E,L="boolean"==typeof e.useWorkerFetch?e.useWorkerFetch:p===cPe&&m===dPe&&d&&f&&QHe(d,document.baseURI)&&QHe(f,document.baseURI);e.canvasFactory,e.filterFactory;var U;U=u,Number.isInteger(U)&&(MUe=U);const H={canvasFactory:new F({ownerDocument:_,enableHWA:M}),filterFactory:new T({docId:i,ownerDocument:_}),cMapReaderFactory:L?null:new p({baseUrl:d,isCompressed:g}),standardFontDataFactory:L?null:new m({baseUrl:f})};if(!c){const e={verbosity:u,port:qPe.workerPort};c=e.port?VOe.fromPort(e):new VOe(e),t._worker=c}const P={docId:i,apiVersion:"4.9.72",data:s,password:o,disableAutoFetch:k,rangeChunkSize:A,length:R,docBaseUrl:h,enableXfa:Q,evaluatorOptions:{maxImageSize:I,disableFontFace:E,ignoreErrors:C,isEvalSupported:v,isOffscreenCanvasSupported:B,isImageDecoderSupported:y,canvasMaxAreaInBytes:b,fontExtraProperties:w,useSystemFonts:N,cMapUrl:L?d:null,standardFontDataUrl:L?f:null}},O={disableFontFace:E,fontExtraProperties:w,ownerDocument:_,pdfBug:D,styleElement:null,loadingParams:{disableAutoFetch:k,enableXfa:Q}};return c.promise.then((function(){if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const e=c.messageHandler.sendWithPromise("GetDocRequest",P,s?[s.buffer]:null);let o;if(l)o=new oOe(l,{disableRange:S,disableStream:x});else if(!s){if(!n)throw new Error("getDocument - no `url` parameter provided.");let e;if(HLe)if(QHe(n)){if("undefined"==typeof fetch||"undefined"==typeof Response||!("body"in Response.prototype))throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");e=mOe}else e=wOe;else e=QHe(n)?mOe:BOe;o=new e({url:n,length:R,httpHeaders:r,withCredentials:a,rangeChunkSize:A,disableRange:S,disableStream:x})}return e.then((e=>{if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const n=new iOe(i,e,c.port),s=new WOe(n,t,o,O,H);t._transport=s,n.send("Ready",null)}))})).catch(t._capability.reject),t}function UOe(e){return"object"==typeof e&&Number.isInteger(null==e?void 0:e.num)&&e.num>=0&&Number.isInteger(null==e?void 0:e.gen)&&e.gen>=0}const HOe=class e{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId="d"+wc(e,wn)._++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var e,t,i;this.destroyed=!0;try{(null==(e=this._worker)?void 0:e.port)&&(this._worker._pendingDestroy=!0),await(null==(t=this._transport)?void 0:t.destroy())}catch(n){throw(null==(i=this._worker)?void 0:i.port)&&delete this._worker._pendingDestroy,n}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};wn=new WeakMap,yc(HOe,wn,0);let POe=HOe;class OOe{constructor(e,t,i=!1,n=null){this.length=e,this.initialData=t,this.progressiveDone=i,this.contentDispositionFilename=n,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const i of this._rangeListeners)i(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const i of this._progressListeners)i(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){UUe("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class GOe{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return OUe(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class KOe{constructor(e,t,i,n=!1){yc(this,Sn),yc(this,Qn,null),yc(this,_n,!1),this._pageIndex=e,this._pageInfo=t,this._transport=i,this._stats=n?new wHe:null,this._pdfBug=n,this.commonObjs=i.commonObjs,this.objs=new JOe,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:i=0,offsetY:n=0,dontFlip:s=!1}={}){return new IHe({viewBox:this.view,scale:e,rotation:t,offsetX:i,offsetY:n,dontFlip:s})}getAnnotations({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return OUe(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var e;return(null==(e=this._transport._htmlForXfa)?void 0:e.children[this._pageIndex])||null}render({canvasContext:e,viewport:t,intent:i="display",annotationMode:n=XLe.ENABLE,transform:s=null,background:r=null,optionalContentConfigPromise:a=null,annotationCanvasMap:o=null,pageColors:l=null,printAnnotationStorage:A=null,isEditing:c=!1}){var u,h;null==(u=this._stats)||u.time("Overall");const d=this._transport.getRenderingIntent(i,n,A,c),{renderingIntent:g,cacheKey:p}=d;bc(this,_n,!1),Ec(this,Sn,kn).call(this),a||(a=this._transport.getOptionalContentConfig(g));let f=this._intentStates.get(p);f||(f=Object.create(null),this._intentStates.set(p,f)),f.streamReaderCancelTimeout&&(clearTimeout(f.streamReaderCancelTimeout),f.streamReaderCancelTimeout=null);const m=!!(g&YLe);f.displayReadyCapability||(f.displayReadyCapability=Promise.withResolvers(),f.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null==(h=this._stats)||h.time("Page Request"),this._pumpOperatorList(d));const C=e=>{var t;f.renderTasks.delete(I),(this._maybeCleanupAfterRender||m)&&bc(this,_n,!0),Ec(this,Sn,xn).call(this,!m),e?(I.capability.reject(e),this._abortOperatorList({intentState:f,reason:e instanceof Error?e:new Error(e)})):I.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(null==(t=globalThis.Stats)?void 0:t.enabled)&&globalThis.Stats.add(this.pageNumber,this._stats))},I=new $Oe({callback:C,params:{canvasContext:e,viewport:t,transform:s,background:r},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:o,operatorList:f.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!m,pdfBug:this._pdfBug,pageColors:l});(f.renderTasks||(f.renderTasks=new Set)).add(I);const v=I.task;return Promise.all([f.displayReadyCapability.promise,a]).then((([e,t])=>{var i;if(this.destroyed)C();else{if(null==(i=this._stats)||i.time("Rendering"),!(t.renderingIntent&g))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");I.initializeGraphics({transparency:e,optionalContentConfig:t}),I.operatorListChanged()}})).catch(C),v}getOperatorList({intent:e="display",annotationMode:t=XLe.ENABLE,printAnnotationStorage:i=null,isEditing:n=!1}={}){var s;const r=this._transport.getRenderingIntent(e,t,i,n,!0);let a,o=this._intentStates.get(r.cacheKey);return o||(o=Object.create(null),this._intentStates.set(r.cacheKey,o)),o.opListReadCapability||(a=Object.create(null),a.operatorListChanged=function(){o.operatorList.lastChunk&&(o.opListReadCapability.resolve(o.operatorList),o.renderTasks.delete(a))},o.opListReadCapability=Promise.withResolvers(),(o.renderTasks||(o.renderTasks=new Set)).add(a),o.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null==(s=this._stats)||s.time("Page Request"),this._pumpOperatorList(r)),o.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===e,disableNormalization:!0===t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then((e=>DOe.textContent(e)));const t=this.streamTextContent(e);return new Promise((function(e,i){const n=t.getReader(),s={items:[],styles:Object.create(null),lang:null};!function t(){n.read().then((function({value:i,done:n}){n?e(s):(s.lang??(s.lang=i.lang),Object.assign(s.styles,i.styles),s.items.push(...i.items),t())}),i)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const i of t.renderTasks)e.push(i.completed),i.cancel();return this.objs.clear(),bc(this,_n,!1),Ec(this,Sn,kn).call(this),Promise.all(e)}cleanup(e=!1){bc(this,_n,!0);const t=Ec(this,Sn,xn).call(this,!1);return e&&t&&this._stats&&(this._stats=new wHe),t}_startRenderPage(e,t){var i,n;const s=this._intentStates.get(t);s&&(null==(i=this._stats)||i.timeEnd("Page Request"),null==(n=s.displayReadyCapability)||n.resolve(e))}_renderPageChunk(e,t){for(let i=0,n=e.length;i<n;i++)t.operatorList.fnArray.push(e.fnArray[i]),t.operatorList.argsArray.push(e.argsArray[i]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const i of t.renderTasks)i.operatorListChanged();e.lastChunk&&Ec(this,Sn,xn).call(this,!0)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:i,modifiedIds:n}){const{map:s,transfer:r}=i,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:s,modifiedIds:n},r).getReader(),o=this._intentStates.get(t);o.streamReader=a;const l=()=>{a.read().then((({value:e,done:t})=>{t?o.streamReader=null:this._transport.destroyed||(this._renderPageChunk(e,o),l())}),(e=>{if(o.streamReader=null,!this._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(const e of o.renderTasks)e.operatorListChanged();Ec(this,Sn,xn).call(this,!0)}if(o.displayReadyCapability)o.displayReadyCapability.reject(e);else{if(!o.opListReadCapability)throw e;o.opListReadCapability.reject(e)}}}))};l()}_abortOperatorList({intentState:e,reason:t,force:i=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!i){if(e.renderTasks.size>0)return;if(t instanceof vHe){let i=100;return t.extraDelay>0&&t.extraDelay<1e3&&(i+=t.extraDelay),void(e.streamReaderCancelTimeout=setTimeout((()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})}),i))}}if(e.streamReader.cancel(new JUe(t.message)).catch((()=>{})),e.streamReader=null,!this._transport.destroyed){for(const[t,i]of this._intentStates)if(i===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}Qn=new WeakMap,_n=new WeakMap,Sn=new WeakSet,xn=function(e=!1){if(Ec(this,Sn,kn).call(this),!Bc(this,_n)||this.destroyed)return!1;if(e)return bc(this,Qn,setTimeout((()=>{bc(this,Qn,null),Ec(this,Sn,xn).call(this,!1)}),5e3)),!1;for(const{renderTasks:t,operatorList:i}of this._intentStates.values())if(t.size>0||!i.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),bc(this,_n,!1),!0},kn=function(){Bc(this,Qn)&&(clearTimeout(Bc(this,Qn)),bc(this,Qn,null))};class qOe{constructor(){yc(this,Dn,new Map),yc(this,Fn,Promise.resolve())}postMessage(e,t){const i={data:structuredClone(e,t?{transfer:t}:null)};Bc(this,Fn).then((()=>{for(const[e]of Bc(this,Dn))e.call(this,i)}))}addEventListener(e,t,i=null){let n=null;if((null==i?void 0:i.signal)instanceof AbortSignal){const{signal:s}=i;if(s.aborted)return void LUe();const r=()=>this.removeEventListener(e,t);n=()=>s.removeEventListener("abort",r),s.addEventListener("abort",r)}Bc(this,Dn).set(t,n)}removeEventListener(e,t){const i=Bc(this,Dn).get(t);null==i||i(),Bc(this,Dn).delete(t)}terminate(){for(const[,e]of Bc(this,Dn))null==e||e();Bc(this,Dn).clear()}}Dn=new WeakMap,Fn=new WeakMap;const YOe=class e{constructor({name:t=null,port:i=null,verbosity:n=RUe()}={}){var s;if(yc(this,Nn),this.name=t,this.destroyed=!1,this.verbosity=n,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,i){if(null==(s=Bc(e,Rn))?void 0:s.has(i))throw new Error("Cannot use more than one PDFWorker per port.");return(Bc(e,Rn)||bc(e,Rn,new WeakMap)).set(i,this),void this._initializeFromPort(i)}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new iOe("main","worker",e),this._messageHandler.on("ready",(function(){})),Ec(this,Nn,Ln).call(this)}_initialize(){if(Bc(e,Mn)||Bc(e,Un,Hn))return void this._setupFakeWorker();let{workerSrc:t}=e;try{e._isSameOrigin(window.location.href,t)||(t=e._createCDNWrapper(new URL(t,window.location).href));const i=new Worker(t,{type:"module"}),n=new iOe("main","worker",i),s=()=>{r.abort(),n.destroy(),i.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},r=new AbortController;i.addEventListener("error",(()=>{this._webWorker||s()}),{signal:r.signal}),n.on("test",(e=>{r.abort(),!this.destroyed&&e?(this._messageHandler=n,this._port=i,this._webWorker=i,Ec(this,Nn,Ln).call(this)):s()})),n.on("ready",(e=>{if(r.abort(),this.destroyed)s();else try{a()}catch{this._setupFakeWorker()}}));const a=()=>{const e=new Uint8Array;n.send("test",e,[e.buffer])};return void a()}catch{NUe()}this._setupFakeWorker()}_setupFakeWorker(){Bc(e,Mn)||(LUe(),bc(e,Mn,!0)),e._setupFakeWorkerGlobal.then((t=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const i=new qOe;this._port=i;const n="fake"+wc(e,Tn)._++,s=new iOe(n+"_worker",n,i);t.setup(s,i),this._messageHandler=new iOe(n,n+"_worker",i),Ec(this,Nn,Ln).call(this)})).catch((e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))}))}destroy(){var t;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),null==(t=Bc(e,Rn))||t.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(t){var i;if(!(null==t?void 0:t.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const n=null==(i=Bc(this,Rn))?void 0:i.get(t.port);if(n){if(n._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return n}return new e(t)}static get workerSrc(){if(qPe.workerSrc)return qPe.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return OUe(this,"_setupFakeWorkerGlobal",(async()=>{if(Bc(this,Un,Hn))return Bc(this,Un,Hn);return(await import(
/*webpackIgnore: true*/
this.workerSrc)).WorkerMessageHandler})())}};Tn=new WeakMap,Mn=new WeakMap,Rn=new WeakMap,Nn=new WeakSet,Ln=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},Un=new WeakSet,Hn=function(){var e;try{return(null==(e=globalThis.pdfjsWorker)?void 0:e.WorkerMessageHandler)||null}catch{return null}},yc(YOe,Un),yc(YOe,Tn,0),yc(YOe,Mn,!1),yc(YOe,Rn),HLe&&(bc(YOe,Mn,!0),qPe.workerSrc||(qPe.workerSrc="./pdf.worker.mjs")),YOe._isSameOrigin=(e,t)=>{let i;try{if(i=new URL(e),!i.origin||"null"===i.origin)return!1}catch{return!1}const n=new URL(t,i);return i.origin===n.origin},YOe._createCDNWrapper=e=>{const t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};let VOe=YOe;class WOe{constructor(e,t,i,n,s){yc(this,Yn),yc(this,Pn,new Map),yc(this,On,new Map),yc(this,Gn,new Map),yc(this,Kn,new Map),yc(this,qn,null),this.messageHandler=e,this.loadingTask=t,this.commonObjs=new JOe,this.fontLoader=new aPe({ownerDocument:n.ownerDocument,styleElement:n.styleElement}),this.loadingParams=n.loadingParams,this._params=n,this.canvasFactory=s.canvasFactory,this.filterFactory=s.filterFactory,this.cMapReaderFactory=s.cMapReaderFactory,this.standardFontDataFactory=s.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=i,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return OUe(this,"annotationStorage",new sPe)}getRenderingIntent(e,t=XLe.ENABLE,i=null,n=!1,s=!1){let r=qLe,a=nPe;switch(e){case"any":r=KLe;break;case"display":break;case"print":r=YLe;break;default:LUe()}const o=r&YLe&&i instanceof rPe?i:this.annotationStorage;switch(t){case XLe.DISABLE:r+=jLe;break;case XLe.ENABLE:break;case XLe.ENABLE_FORMS:r+=VLe;break;case XLe.ENABLE_STORAGE:r+=WLe,a=o.serializable;break;default:LUe()}n&&(r+=JLe),s&&(r+=zLe);const{ids:l,hash:A}=o.modifiedIds;return{renderingIntent:r,cacheKey:[r,a.hash,A].join("_"),annotationStorageSerializable:a,modifiedIds:l}}destroy(){var e;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),null==(e=Bc(this,qn))||e.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const n of Bc(this,On).values())t.push(n._destroy());Bc(this,On).clear(),Bc(this,Gn).clear(),Bc(this,Kn).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const i=this.messageHandler.sendWithPromise("Terminate",null);return t.push(i),Promise.all(t).then((()=>{var e;this.commonObjs.clear(),this.fontLoader.clear(),Bc(this,Pn).clear(),this.filterFactory.destroy(),kOe.cleanup(),null==(e=this._networkStream)||e.cancelAllRequests(new JUe("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",((e,t)=>{HUe(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function({value:e,done:i}){i?t.close():(HUe(e instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}})),e.on("ReaderHeadersReady",(async e=>{var i;await this._fullReader.headersReady;const{isStreamingSupported:n,isRangeSupported:s,contentLength:r}=this._fullReader;return n&&s||(this._lastProgress&&(null==(i=t.onProgress)||i.call(t,this._lastProgress)),this._fullReader.onProgress=e=>{var i;null==(i=t.onProgress)||i.call(t,{loaded:e.loaded,total:e.total})}),{isStreamingSupported:n,isRangeSupported:s,contentLength:r}})),e.on("GetRangeReader",((e,t)=>{HUe(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const i=this._networkStream.getRangeReader(e.begin,e.end);i?(t.onPull=()=>{i.read().then((function({value:e,done:i}){i?t.close():(HUe(e instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{i.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}):t.close()})),e.on("GetDoc",(({pdfInfo:e})=>{this._numPages=e.numPages,this._htmlForXfa=e.htmlForXfa,delete e.htmlForXfa,t._capability.resolve(new GOe(e,this))})),e.on("DocException",(function(e){let i;switch(e.name){case"PasswordException":i=new KUe(e.message,e.code);break;case"InvalidPDFException":i=new YUe(e.message);break;case"MissingPDFException":i=new VUe(e.message);break;case"UnexpectedResponseException":i=new WUe(e.message,e.status);break;case"UnknownErrorException":i=new qUe(e.message,e.details);break;default:UUe("DocException - expected a valid Error.")}t._capability.reject(i)})),e.on("PasswordRequest",(e=>{if(bc(this,qn,Promise.withResolvers()),t.onPassword){const n=e=>{e instanceof Error?Bc(this,qn).reject(e):Bc(this,qn).resolve({password:e})};try{t.onPassword(n,e.code)}catch(i){Bc(this,qn).reject(i)}}else Bc(this,qn).reject(new KUe(e.message,e.code));return Bc(this,qn).promise})),e.on("DataLoaded",(e=>{var i;null==(i=t.onProgress)||i.call(t,{loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(e=>{if(this.destroyed)return;Bc(this,On).get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)})),e.on("commonobj",(([t,i,n])=>{var s;if(this.destroyed)return null;if(this.commonObjs.has(t))return null;switch(i){case"Font":const{disableFontFace:r,fontExtraProperties:a,pdfBug:o}=this._params;if("error"in n){const e=n.error;LUe(),this.commonObjs.resolve(t,e);break}const l=o&&(null==(s=globalThis.FontInspector)?void 0:s.enabled)?(e,t)=>globalThis.FontInspector.fontAdded(e,t):null,A=new oPe(n,{disableFontFace:r,inspectFont:l});this.fontLoader.bind(A).catch((()=>e.sendWithPromise("FontFallback",{id:t}))).finally((()=>{!a&&A.data&&(A.data=null),this.commonObjs.resolve(t,A)}));break;case"CopyLocalImage":const{imageRef:c}=n;HUe(c,"The imageRef must be defined.");for(const e of Bc(this,On).values())for(const[,i]of e.objs)if((null==i?void 0:i.ref)===c)return i.dataLen?(this.commonObjs.resolve(t,structuredClone(i)),i.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(t,n);break;default:throw new Error(`Got unknown common object type ${i}`)}return null})),e.on("obj",(([e,t,i,n])=>{var s;if(this.destroyed)return;const r=Bc(this,On).get(t);if(!r.objs.has(e))if(0!==r._intentStates.size)switch(i){case"Image":r.objs.resolve(e,n),(null==n?void 0:n.dataLen)>1e7&&(r._maybeCleanupAfterRender=!0);break;case"Pattern":r.objs.resolve(e,n);break;default:throw new Error(`Got unknown object type ${i}`)}else null==(s=null==n?void 0:n.bitmap)||s.close()})),e.on("DocProgress",(e=>{var i;this.destroyed||null==(i=t.onProgress)||i.call(t,{loaded:e.loaded,total:e.total})})),e.on("FetchBuiltInCMap",(async e=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.cMapReaderFactory)throw new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(e)})),e.on("FetchStandardFontData",(async e=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.standardFontDataFactory)throw new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(e)}))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var e;this.annotationStorage.size<=0&&LUe();const{map:t,transfer:i}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:(null==(e=this._fullReader)?void 0:e.filename)??null},i).finally((()=>{this.annotationStorage.resetModified()}))}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,i=Bc(this,Gn).get(t);if(i)return i;const n=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((i=>{if(this.destroyed)throw new Error("Transport destroyed");i.refStr&&Bc(this,Kn).set(i.refStr,e);const n=new KOe(t,i,this,this._params.pdfBug);return Bc(this,On).set(t,n),n}));return Bc(this,Gn).set(t,n),n}getPageIndex(e){return UOe(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return Ec(this,Yn,Vn).call(this,"GetFieldObjects")}hasJSActions(){return Ec(this,Yn,Vn).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return Ec(this,Yn,Vn).call(this,"GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return Ec(this,Yn,Vn).call(this,"GetOptionalContentConfig").then((t=>new aOe(t,e)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=Bc(this,Pn).get(e);if(t)return t;const i=this.messageHandler.sendWithPromise(e,null).then((e=>{var t,i;return{info:e[0],metadata:e[1]?new nOe(e[1]):null,contentDispositionFilename:(null==(t=this._fullReader)?void 0:t.filename)??null,contentLength:(null==(i=this._fullReader)?void 0:i.contentLength)??null}}));return Bc(this,Pn).set(e,i),i}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of Bc(this,On).values()){if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`)}this.commonObjs.clear(),e||this.fontLoader.clear(),Bc(this,Pn).clear(),this.filterFactory.destroy(!0),kOe.cleanup()}}cachedPageNumber(e){if(!UOe(e))return null;const t=0===e.gen?`${e.num}R`:`${e.num}R${e.gen}`;return Bc(this,Kn).get(t)??null}}Pn=new WeakMap,On=new WeakMap,Gn=new WeakMap,Kn=new WeakMap,qn=new WeakMap,Yn=new WeakSet,Vn=function(e,t=null){const i=Bc(this,Pn).get(e);if(i)return i;const n=this.messageHandler.sendWithPromise(e,t);return Bc(this,Pn).set(e,n),n};const jOe=Symbol("INITIAL_DATA");class JOe{constructor(){yc(this,jn),yc(this,Wn,Object.create(null))}get(e,t=null){if(t){const i=Ec(this,jn,Jn).call(this,e);return i.promise.then((()=>t(i.data))),null}const i=Bc(this,Wn)[e];if(!i||i.data===jOe)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return i.data}has(e){const t=Bc(this,Wn)[e];return!!t&&t.data!==jOe}resolve(e,t=null){const i=Ec(this,jn,Jn).call(this,e);i.data=t,i.resolve()}clear(){var e;for(const t in Bc(this,Wn)){const{data:i}=Bc(this,Wn)[t];null==(e=null==i?void 0:i.bitmap)||e.close()}bc(this,Wn,Object.create(null))}*[Symbol.iterator](){for(const e in Bc(this,Wn)){const{data:t}=Bc(this,Wn)[e];t!==jOe&&(yield[e,t])}}}Wn=new WeakMap,jn=new WeakSet,Jn=function(e){var t;return(t=Bc(this,Wn))[e]||(t[e]={...Promise.withResolvers(),data:jOe})};class zOe{constructor(e){yc(this,zn,null),bc(this,zn,e),this.onContinue=null}get promise(){return Bc(this,zn).capability.promise}cancel(e=0){Bc(this,zn).cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=Bc(this,zn).operatorList;if(!e)return!1;const{annotationCanvasMap:t}=Bc(this,zn);return e.form||e.canvas&&(null==t?void 0:t.size)>0}}zn=new WeakMap;const XOe=class e{constructor({callback:e,params:t,objs:i,commonObjs:n,annotationCanvasMap:s,operatorList:r,pageIndex:a,canvasFactory:o,filterFactory:l,useRequestAnimationFrame:A=!1,pdfBug:c=!1,pageColors:u=null}){yc(this,Xn,null),this.callback=e,this.params=t,this.objs=i,this.commonObjs=n,this.annotationCanvasMap=s,this.operatorListIdx=null,this.operatorList=r,this._pageIndex=a,this.canvasFactory=o,this.filterFactory=l,this._pdfBug=c,this.pageColors=u,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===A&&"undefined"!=typeof window,this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new zOe(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics({transparency:t=!1,optionalContentConfig:i}){var n,s;if(this.cancelled)return;if(this._canvas){if(Bc(e,$n).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Bc(e,$n).add(this._canvas)}this._pdfBug&&(null==(n=globalThis.StepperManager)?void 0:n.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:r,viewport:a,transform:o,background:l}=this.params;this.gfx=new KPe(r,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:i},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:o,viewport:a,transparency:t,background:l}),this.operatorListIdx=0,this.graphicsReady=!0,null==(s=this.graphicsReadyCallback)||s.call(this)}cancel(t=null,i=0){var n;this.running=!1,this.cancelled=!0,null==(n=this.gfx)||n.endDrawing(),Bc(this,Xn)&&(window.cancelAnimationFrame(Bc(this,Xn)),bc(this,Xn,null)),Bc(e,$n).delete(this._canvas),this.callback(t||new vHe(`Rendering cancelled, page ${this._pageIndex+1}`,i))}operatorListChanged(){var e;this.graphicsReady?(null==(e=this.stepper)||e.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?bc(this,Xn,window.requestAnimationFrame((()=>{bc(this,Xn,null),this._nextBound().catch(this._cancelBound)}))):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Bc(e,$n).delete(this._canvas),this.callback())))}};Xn=new WeakMap,$n=new WeakMap,yc(XOe,$n,new WeakSet);let $Oe=XOe;const ZOe="4.9.72",eGe="07765e993";function tGe(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}function iGe(e){return Math.max(0,Math.min(255,255*e))}class nGe{static CMYK_G([e,t,i,n]){return["G",1-Math.min(1,.3*e+.59*i+.11*t+n)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return[e=iGe(e),e,e]}static G_HTML([e]){const t=tGe(e);return`#${t}${t}${t}`}static RGB_G([e,t,i]){return["G",.3*e+.59*t+.11*i]}static RGB_rgb(e){return e.map(iGe)}static RGB_HTML(e){return`#${e.map(tGe).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,i,n]){return["RGB",1-Math.min(1,e+n),1-Math.min(1,i+n),1-Math.min(1,t+n)]}static CMYK_rgb([e,t,i,n]){return[iGe(1-Math.min(1,e+n)),iGe(1-Math.min(1,i+n)),iGe(1-Math.min(1,t+n))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,i]){const n=1-e,s=1-t,r=1-i;return["CMYK",n,s,r,Math.min(n,s,r)]}}class sGe{create(e,t,i=!1){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const n=this._createSVG("svg:svg");return n.setAttribute("version","1.1"),i||(n.setAttribute("width",`${e}px`),n.setAttribute("height",`${t}px`)),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox",`0 0 ${e} ${t}`),n}createElement(e){if("string"!=typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){UUe("Abstract method `_createSVG` called.")}}class rGe extends sGe{_createSVG(e){return document.createElementNS(pHe,e)}}class aGe{static setupStorage(e,t,i,n,s){const r=n.getValue(t,{value:null});switch(i.name){case"textarea":if(null!==r.value&&(e.textContent=r.value),"print"===s)break;e.addEventListener("input",(e=>{n.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===i.attributes.type||"checkbox"===i.attributes.type){if(r.value===i.attributes.xfaOn?e.setAttribute("checked",!0):r.value===i.attributes.xfaOff&&e.removeAttribute("checked"),"print"===s)break;e.addEventListener("change",(e=>{n.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==r.value&&e.setAttribute("value",r.value),"print"===s)break;e.addEventListener("input",(e=>{n.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==r.value){e.setAttribute("value",r.value);for(const e of i.children)e.attributes.value===r.value?e.attributes.selected=!0:e.attributes.hasOwnProperty("selected")&&delete e.attributes.selected}e.addEventListener("input",(e=>{const i=e.target.options,s=-1===i.selectedIndex?"":i[i.selectedIndex].value;n.setValue(t,{value:s})}))}}static setAttributes({html:e,element:t,storage:i=null,intent:n,linkService:s}){const{attributes:r}=t,a=e instanceof HTMLAnchorElement;"radio"===r.type&&(r.name=`${r.name}-${n}`);for(const[o,l]of Object.entries(r))if(null!=l)switch(o){case"class":l.length&&e.setAttribute(o,l.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",l);break;case"style":Object.assign(e.style,l);break;case"textContent":e.textContent=l;break;default:(!a||"href"!==o&&"newWindow"!==o)&&e.setAttribute(o,l)}a&&s.addLinkAttributes(e,r.href,r.newWindow),i&&r.dataId&&this.setupStorage(e,r.dataId,t,i)}static render(e){var t,i;const n=e.annotationStorage,s=e.linkService,r=e.xfaHtml,a=e.intent||"display",o=document.createElement(r.name);r.attributes&&this.setAttributes({html:o,element:r,intent:a,linkService:s});const l="richText"!==a,A=e.div;if(A.append(o),e.viewport){const t=`matrix(${e.viewport.transform.join(",")})`;A.style.transform=t}l&&A.setAttribute("class","xfaLayer xfaFont");const c=[];if(0===r.children.length){if(r.value){const e=document.createTextNode(r.value);o.append(e),l&&DOe.shouldBuildText(r.name)&&c.push(e)}return{textDivs:c}}const u=[[r,-1,o]];for(;u.length>0;){const[e,r,o]=u.at(-1);if(r+1===e.children.length){u.pop();continue}const A=e.children[++u.at(-1)[1]];if(null===A)continue;const{name:h}=A;if("#text"===h){const e=document.createTextNode(A.value);c.push(e),o.append(e);continue}const d=(null==(t=null==A?void 0:A.attributes)?void 0:t.xmlns)?document.createElementNS(A.attributes.xmlns,h):document.createElement(h);if(o.append(d),A.attributes&&this.setAttributes({html:d,element:A,storage:n,intent:a,linkService:s}),(null==(i=A.children)?void 0:i.length)>0)u.push([A,-1,d]);else if(A.value){const e=document.createTextNode(A.value);l&&DOe.shouldBuildText(h)&&c.push(e),d.append(e)}}for(const h of A.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))h.setAttribute("readOnly",!0);return{textDivs:c}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}const oGe=1e3,lGe=new WeakSet;function AGe(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class cGe{static create(e){switch(e.data.annotationType){case AUe:return new hGe(e);case lUe:return new dGe(e);case wUe:switch(e.data.fieldType){case"Tx":return new pGe(e);case"Btn":return e.data.radioButton?new CGe(e):e.data.checkBox?new mGe(e):new IGe(e);case"Ch":return new vGe(e);case"Sig":return new fGe(e)}return new gGe(e);case bUe:return new BGe(e);case cUe:return new bGe(e);case uUe:return new EGe(e);case hUe:return new wGe(e);case dUe:return new QGe(e);case pUe:return new _Ge(e);case BUe:return new xGe(e);case yUe:return new kGe(e);case gUe:return new SGe(e);case fUe:return new DGe(e);case mUe:return new FGe(e);case CUe:return new TGe(e);case IUe:return new MGe(e);case vUe:return new RGe(e);case EUe:return new NGe(e);default:return new uGe(e)}}}Zn=new WeakMap,es=new WeakMap,ts=new WeakMap,is=new WeakSet,ns=function(e){const{container:{style:t},data:{rect:i,rotation:n},parent:{viewport:{rawDims:{pageWidth:s,pageHeight:r,pageX:a,pageY:o}}}}=this;null==i||i.splice(0,4,...e);const{width:l,height:A}=AGe(e);t.left=100*(e[0]-a)/s+"%",t.top=100*(r-e[3]+o)/r+"%",0===n?(t.width=100*l/s+"%",t.height=100*A/r+"%"):this.setRotation(n)};let uGe=class e{constructor(e,{isRenderable:t=!1,ignoreBorder:i=!1,createQuadrilaterals:n=!1}={}){yc(this,is),yc(this,Zn,null),yc(this,es,!1),yc(this,ts,null),this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(i)),n&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:t,richText:i}){return!!((null==e?void 0:e.str)||(null==t?void 0:t.str)||(null==i?void 0:i.str))}get _isEditable(){return this.data.isEditable}get hasPopupData(){return e._hasPopupData(this.data)}updateEdited(e){var t;if(!this.container)return;Bc(this,Zn)||bc(this,Zn,{rect:this.data.rect.slice(0)});const{rect:i}=e;i&&Ec(this,is,ns).call(this,i),null==(t=Bc(this,ts))||t.popup.updateEdited(e)}resetEdited(){var e;Bc(this,Zn)&&(Ec(this,is,ns).call(this,Bc(this,Zn).rect),null==(e=Bc(this,ts))||e.popup.resetEdited(),bc(this,Zn,null))}_createContainer(e){const{data:t,parent:{page:i,viewport:n}}=this,s=document.createElement("section");s.setAttribute("data-annotation-id",t.id),this instanceof gGe||(s.tabIndex=oGe);const{style:r}=s;if(r.zIndex=this.parent.zIndex++,t.alternativeText&&(s.title=t.alternativeText),t.noRotate&&s.classList.add("norotate"),!t.rect||this instanceof BGe){const{rotation:e}=t;return t.hasOwnCanvas||0===e||this.setRotation(e,s),s}const{width:a,height:o}=AGe(t.rect);if(!e&&t.borderStyle.width>0){r.borderWidth=`${t.borderStyle.width}px`;const e=t.borderStyle.horizontalCornerRadius,i=t.borderStyle.verticalCornerRadius;if(e>0||i>0){const t=`calc(${e}px * var(--scale-factor)) / calc(${i}px * var(--scale-factor))`;r.borderRadius=t}else if(this instanceof CGe){const e=`calc(${a}px * var(--scale-factor)) / calc(${o}px * var(--scale-factor))`;r.borderRadius=e}switch(t.borderStyle.style){case QUe:r.borderStyle="solid";break;case _Ue:r.borderStyle="dashed";break;case SUe:case xUe:LUe();break;case kUe:r.borderBottomStyle="solid"}const n=t.borderColor||null;n?(bc(this,es,!0),r.borderColor=tHe.makeHexColor(0|n[0],0|n[1],0|n[2])):r.borderWidth=0}const l=tHe.normalizeRect([t.rect[0],i.view[3]-t.rect[1]+i.view[1],t.rect[2],i.view[3]-t.rect[3]+i.view[1]]),{pageWidth:A,pageHeight:c,pageX:u,pageY:h}=n.rawDims;r.left=100*(l[0]-u)/A+"%",r.top=100*(l[1]-h)/c+"%";const{rotation:d}=t;return t.hasOwnCanvas||0===d?(r.width=100*a/A+"%",r.height=100*o/c+"%"):this.setRotation(d,s),s}setRotation(e,t=this.container){if(!this.data.rect)return;const{pageWidth:i,pageHeight:n}=this.parent.viewport.rawDims,{width:s,height:r}=AGe(this.data.rect);let a,o;e%180==0?(a=100*s/i,o=100*r/n):(a=100*r/i,o=100*s/n),t.style.width=`${a}%`,t.style.height=`${o}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(e,t,i)=>{const n=i.detail[e],s=n[0],r=n.slice(1);i.target.style[t]=nGe[`${s}_HTML`](r),this.annotationStorage.setValue(this.data.id,{[t]:nGe[`${s}_rgb`](r)})};return OUe(this,"_commonActions",{display:e=>{const{display:t}=e.detail,i=t%2==1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:1===t||2===t})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:t}=e.detail;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:t,noView:t})},focus:e=>{setTimeout((()=>e.target.focus({preventScroll:!1})),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:e=>{const t=e.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){const i=this._commonActions;for(const n of Object.keys(t.detail)){const s=e[n]||i[n];null==s||s(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const i=this._commonActions;for(const[n,s]of Object.entries(t)){const r=i[n];if(r){r({detail:{[n]:s},target:e}),delete t[n]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[t,i,n,s]=this.data.rect.map((e=>Math.fround(e)));if(8===e.length){const[r,a,o,l]=e.subarray(2,6);if(n===r&&s===a&&t===o&&i===l)return}const{style:r}=this.container;let a;if(Bc(this,es)){const{borderColor:e,borderWidth:t}=r;r.borderWidth=0,a=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${e}" stroke-width="${t}">`],this.container.classList.add("hasBorder")}const o=n-t,l=s-i,{svgFactory:A}=this,c=A.createElement("svg");c.classList.add("quadrilateralsContainer"),c.setAttribute("width",0),c.setAttribute("height",0);const u=A.createElement("defs");c.append(u);const h=A.createElement("clipPath"),d=`clippath_${this.data.id}`;h.setAttribute("id",d),h.setAttribute("clipPathUnits","objectBoundingBox"),u.append(h);for(let g=2,p=e.length;g<p;g+=8){const i=e[g],n=e[g+1],r=e[g+2],c=e[g+3],u=A.createElement("rect"),d=(r-t)/o,p=(s-n)/l,f=(i-r)/o,m=(n-c)/l;u.setAttribute("x",d),u.setAttribute("y",p),u.setAttribute("width",f),u.setAttribute("height",m),h.append(u),null==a||a.push(`<rect vector-effect="non-scaling-stroke" x="${d}" y="${p}" width="${f}" height="${m}"/>`)}Bc(this,es)&&(a.push("</g></svg>')"),r.backgroundImage=a.join("")),this.container.append(c),this.container.style.clipPath=`url(#${d})`}_createPopup(){const{data:e}=this,t=bc(this,ts,new BGe({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(t.render())}render(){UUe("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const i=[];if(this._fieldObjects){const n=this._fieldObjects[e];if(n)for(const{page:e,id:s,exportValues:r}of n){if(-1===e)continue;if(s===t)continue;const n="string"==typeof r?r:null,a=document.querySelector(`[data-element-id="${s}"]`);!a||lGe.has(a)?i.push({id:s,exportValue:n,domElement:a}):LUe()}return i}for(const n of document.getElementsByName(e)){const{exportValue:e}=n,s=n.getAttribute("data-element-id");s!==t&&(lGe.has(n)&&i.push({id:s,exportValue:e,domElement:n}))}return i}show(){var e;this.container&&(this.container.hidden=!1),null==(e=this.popup)||e.maybeShow()}hide(){var e;this.container&&(this.container.hidden=!0),null==(e=this.popup)||e.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",(()=>{var i;null==(i=this.linkService.eventBus)||i.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})}))}};class hGe extends uGe{constructor(e,t=null){super(e,{isRenderable:!0,ignoreBorder:!!(null==t?void 0:t.ignoreBorder),createQuadrilaterals:!0}),yc(this,ss),this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:t}=this,i=document.createElement("a");i.setAttribute("data-element-id",e.id);let n=!1;return e.url?(t.addLinkAttributes(i,e.url,e.newWindow),n=!0):e.action?(this._bindNamedAction(i,e.action),n=!0):e.attachment?(Ec(this,ss,as).call(this,i,e.attachment,e.attachmentDest),n=!0):e.setOCGState?(Ec(this,ss,os).call(this,i,e.setOCGState),n=!0):e.dest?(this._bindLink(i,e.dest),n=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,e),n=!0),e.resetForm?(this._bindResetFormAction(i,e.resetForm),n=!0):this.isTooltipOnly&&!n&&(this._bindLink(i,""),n=!0)),this.container.classList.add("linkAnnotation"),n&&this.container.append(i),this.container}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&Ec(this,ss,rs).call(this)}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),Ec(this,ss,rs).call(this)}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const n of Object.keys(t.actions)){const s=i.get(n);s&&(e[s]=()=>{var e;return null==(e=this.linkService.eventBus)||e.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:n}}),!1})}e.onclick||(e.onclick=()=>!1),Ec(this,ss,rs).call(this)}_bindResetFormAction(e,t){const i=e.onclick;if(i||(e.href=this.linkService.getAnchorUrl("")),Ec(this,ss,rs).call(this),!this._fieldObjects)return LUe(),void(i||(e.onclick=()=>!1));e.onclick=()=>{var e;null==i||i();const{fields:n,refs:s,include:r}=t,a=[];if(0!==n.length||0!==s.length){const e=new Set(s);for(const t of n){const i=this._fieldObjects[t]||[];for(const{id:t}of i)e.add(t)}for(const t of Object.values(this._fieldObjects))for(const i of t)e.has(i.id)===r&&a.push(i)}else for(const t of Object.values(this._fieldObjects))a.push(...t);const o=this.annotationStorage,l=[];for(const t of a){const{id:e}=t;switch(l.push(e),t.type){case"text":{const i=t.defaultValue||"";o.setValue(e,{value:i});break}case"checkbox":case"radiobutton":{const i=t.defaultValue===t.exportValues;o.setValue(e,{value:i});break}case"combobox":case"listbox":{const i=t.defaultValue||"";o.setValue(e,{value:i});break}default:continue}const i=document.querySelector(`[data-element-id="${e}"]`);i&&(lGe.has(i)?i.dispatchEvent(new Event("resetform")):LUe())}return this.enableScripting&&(null==(e=this.linkService.eventBus)||e.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:l,name:"ResetForm"}})),!1}}}ss=new WeakSet,rs=function(){this.container.setAttribute("data-internal-link","")},as=function(e,t,i=null){e.href=this.linkService.getAnchorUrl(""),t.description&&(e.title=t.description),e.onclick=()=>{var e;return null==(e=this.downloadManager)||e.openOrDownloadData(t.content,t.filename,i),!1},Ec(this,ss,rs).call(this)},os=function(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),Ec(this,ss,rs).call(this)};class dGe extends uGe{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class gGe extends uGe{render(){return this.container}showElementAndHideCanvas(e){var t;this.data.hasOwnCanvas&&("CANVAS"===(null==(t=e.previousSibling)?void 0:t.nodeName)&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return ZUe.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,i,n,s){i.includes("mouse")?e.addEventListener(i,(e=>{var t;null==(t=this.linkService.eventBus)||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:s(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})})):e.addEventListener(i,(e=>{var r;if("blur"===i){if(!t.focused||!e.relatedTarget)return;t.focused=!1}else if("focus"===i){if(t.focused)return;t.focused=!0}s&&(null==(r=this.linkService.eventBus)||r.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:s(e)}}))}))}_setEventListeners(e,t,i,n){var s,r,a;for(const[o,l]of i)("Action"===l||(null==(s=this.data.actions)?void 0:s[l]))&&("Focus"!==l&&"Blur"!==l||t||(t={focused:!1}),this._setEventListener(e,t,o,l,n),"Focus"!==l||(null==(r=this.data.actions)?void 0:r.Blur)?"Blur"!==l||(null==(a=this.data.actions)?void 0:a.Focus)||this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":tHe.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:i}=this.data.defaultAppearanceData,n=this.data.defaultAppearanceData.fontSize||9,s=e.style;let r;const a=e=>Math.round(10*e)/10;if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),t=e/(Math.round(e/(GLe*n))||1);r=Math.min(n,a(t/GLe))}else{const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2);r=Math.min(n,a(e/GLe))}s.fontSize=`calc(${r}px * var(--scale-factor))`,s.color=tHe.makeHexColor(i[0],i[1],i[2]),null!==this.data.textAlignment&&(s.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class pGe extends gGe{constructor(e){super(e,{isRenderable:e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,i,n){const s=this.annotationStorage;for(const r of this._getElementsByName(e.name,e.id))r.domElement&&(r.domElement[t]=i),s.setValue(r.id,{[n]:i})}render(){var e,t;const i=this.annotationStorage,n=this.data.id;this.container.classList.add("textWidgetAnnotation");let s=null;if(this.renderForms){const r=i.getValue(n,{value:this.data.fieldValue});let a=r.value||"";const o=i.getValue(n,{charLimit:this.data.maxLen}).charLimit;o&&a.length>o&&(a=a.slice(0,o));let l=r.formattedValue||(null==(e=this.data.textContent)?void 0:e.join("\n"))||null;l&&this.data.comb&&(l=l.replaceAll(/\s+/g,""));const A={userValue:a,formattedValue:l,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(s=document.createElement("textarea"),s.textContent=l??a,this.data.doNotScroll&&(s.style.overflowY="hidden")):(s=document.createElement("input"),s.type="text",s.setAttribute("value",l??a),this.data.doNotScroll&&(s.style.overflowX="hidden")),this.data.hasOwnCanvas&&(s.hidden=!0),lGe.add(s),s.setAttribute("data-element-id",n),s.disabled=this.data.readOnly,s.name=this.data.fieldName,s.tabIndex=oGe,this._setRequired(s,this.data.required),o&&(s.maxLength=o),s.addEventListener("input",(e=>{i.setValue(n,{value:e.target.value}),this.setPropertyOnSiblings(s,"value",e.target.value,"value"),A.formattedValue=null})),s.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue??"";s.value=A.userValue=t,A.formattedValue=null}));let c=e=>{const{formattedValue:t}=A;null!=t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){s.addEventListener("focus",(e=>{var t;if(A.focused)return;const{target:i}=e;A.userValue&&(i.value=A.userValue),A.lastCommittedValue=i.value,A.commitKey=1,(null==(t=this.data.actions)?void 0:t.Focus)||(A.focused=!0)})),s.addEventListener("updatefromsandbox",(e=>{this.showElementAndHideCanvas(e.target);const t={value(e){A.userValue=e.detail.value??"",i.setValue(n,{value:A.userValue.toString()}),e.target.value=A.userValue},formattedValue(e){const{formattedValue:t}=e.detail;A.formattedValue=t,null!=t&&e.target!==document.activeElement&&(e.target.value=t),i.setValue(n,{formattedValue:t})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:e=>{var t;const{charLimit:s}=e.detail,{target:r}=e;if(0===s)return void r.removeAttribute("maxLength");r.setAttribute("maxLength",s);let a=A.userValue;!a||a.length<=s||(a=a.slice(0,s),r.value=A.userValue=a,i.setValue(n,{value:a}),null==(t=this.linkService.eventBus)||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:a,willCommit:!0,commitKey:1,selStart:r.selectionStart,selEnd:r.selectionEnd}}))}};this._dispatchEventFromSandbox(t,e)})),s.addEventListener("keydown",(e=>{var t;A.commitKey=1;let i=-1;if("Escape"===e.key?i=0:"Enter"!==e.key||this.data.multiLine?"Tab"===e.key&&(A.commitKey=3):i=2,-1===i)return;const{value:s}=e.target;A.lastCommittedValue!==s&&(A.lastCommittedValue=s,A.userValue=s,null==(t=this.linkService.eventBus)||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:s,willCommit:!0,commitKey:i,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))}));const e=c;c=null,s.addEventListener("blur",(t=>{var i,s;if(!A.focused||!t.relatedTarget)return;(null==(i=this.data.actions)?void 0:i.Blur)||(A.focused=!1);const{value:r}=t.target;A.userValue=r,A.lastCommittedValue!==r&&(null==(s=this.linkService.eventBus)||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:r,willCommit:!0,commitKey:A.commitKey,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}})),e(t)})),(null==(t=this.data.actions)?void 0:t.Keystroke)&&s.addEventListener("beforeinput",(e=>{var t;A.lastCommittedValue=null;const{data:i,target:s}=e,{value:r,selectionStart:a,selectionEnd:o}=s;let l=a,c=o;switch(e.inputType){case"deleteWordBackward":{const e=r.substring(0,a).match(/\w*[^\w]*$/);e&&(l-=e[0].length);break}case"deleteWordForward":{const e=r.substring(a).match(/^[^\w]*\w*/);e&&(c+=e[0].length);break}case"deleteContentBackward":a===o&&(l-=1);break;case"deleteContentForward":a===o&&(c+=1)}e.preventDefault(),null==(t=this.linkService.eventBus)||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:r,change:i||"",willCommit:!1,selStart:l,selEnd:c}})})),this._setEventListeners(s,A,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.value))}if(c&&s.addEventListener("blur",c),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/o;s.classList.add("comb"),s.style.letterSpacing=`calc(${e}px * var(--scale-factor) - 1ch)`}}else s=document.createElement("div"),s.textContent=this.data.fieldValue,s.style.verticalAlign="middle",s.style.display="table-cell",this.data.hasOwnCanvas&&(s.hidden=!0);return this._setTextStyle(s),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class fGe extends gGe{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class mGe extends gGe{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,i=t.id;let n=e.getValue(i,{value:t.exportValue===t.fieldValue}).value;"string"==typeof n&&(n="Off"!==n,e.setValue(i,{value:n})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const s=document.createElement("input");return lGe.add(s),s.setAttribute("data-element-id",i),s.disabled=t.readOnly,this._setRequired(s,this.data.required),s.type="checkbox",s.name=t.fieldName,n&&s.setAttribute("checked",!0),s.setAttribute("exportValue",t.exportValue),s.tabIndex=oGe,s.addEventListener("change",(n=>{const{name:s,checked:r}=n.target;for(const a of this._getElementsByName(s,i)){const i=r&&a.exportValue===t.exportValue;a.domElement&&(a.domElement.checked=i),e.setValue(a.id,{value:i})}e.setValue(i,{value:r})})),s.addEventListener("resetform",(e=>{const i=t.defaultFieldValue||"Off";e.target.checked=i===t.exportValue})),this.enableScripting&&this.hasJSActions&&(s.addEventListener("updatefromsandbox",(t=>{const n={value(t){t.target.checked="Off"!==t.detail.value,e.setValue(i,{value:t.target.checked})}};this._dispatchEventFromSandbox(n,t)})),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class CGe extends gGe{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e=this.annotationStorage,t=this.data,i=t.id;let n=e.getValue(i,{value:t.fieldValue===t.buttonValue}).value;if("string"==typeof n&&(n=n!==t.buttonValue,e.setValue(i,{value:n})),n)for(const r of this._getElementsByName(t.fieldName,i))e.setValue(r.id,{value:!1});const s=document.createElement("input");if(lGe.add(s),s.setAttribute("data-element-id",i),s.disabled=t.readOnly,this._setRequired(s,this.data.required),s.type="radio",s.name=t.fieldName,n&&s.setAttribute("checked",!0),s.tabIndex=oGe,s.addEventListener("change",(t=>{const{name:n,checked:s}=t.target;for(const r of this._getElementsByName(n,i))e.setValue(r.id,{value:!1});e.setValue(i,{value:s})})),s.addEventListener("resetform",(e=>{const i=t.defaultFieldValue;e.target.checked=null!=i&&i===t.buttonValue})),this.enableScripting&&this.hasJSActions){const n=t.buttonValue;s.addEventListener("updatefromsandbox",(t=>{const s={value:t=>{const s=n===t.detail.value;for(const n of this._getElementsByName(t.target.name)){const t=s&&n.id===i;n.domElement&&(n.domElement.checked=t),e.setValue(n.id,{value:t})}}};this._dispatchEventFromSandbox(s,t)})),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))}return this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class IGe extends hGe{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",(e=>{this._dispatchEventFromSandbox({},e)}))),e}}class vGe extends gGe{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e=this.annotationStorage,t=this.data.id,i=e.getValue(t,{value:this.data.fieldValue}),n=document.createElement("select");lGe.add(n),n.setAttribute("data-element-id",t),n.disabled=this.data.readOnly,this._setRequired(n,this.data.required),n.name=this.data.fieldName,n.tabIndex=oGe;let s=this.data.combo&&this.data.options.length>0;this.data.combo||(n.size=this.data.options.length,this.data.multiSelect&&(n.multiple=!0)),n.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue;for(const i of n.options)i.selected=i.value===t}));for(const A of this.data.options){const e=document.createElement("option");e.textContent=A.displayValue,e.value=A.exportValue,i.value.includes(A.exportValue)&&(e.setAttribute("selected",!0),s=!1),n.append(e)}let r=null;if(s){const e=document.createElement("option");e.value=" ",e.setAttribute("hidden",!0),e.setAttribute("selected",!0),n.prepend(e),r=()=>{e.remove(),n.removeEventListener("input",r),r=null},n.addEventListener("input",r)}const a=e=>{const t=e?"value":"textContent",{options:i,multiple:s}=n;return s?Array.prototype.filter.call(i,(e=>e.selected)).map((e=>e[t])):-1===i.selectedIndex?null:i[i.selectedIndex][t]};let o=a(!1);const l=e=>{const t=e.target.options;return Array.prototype.map.call(t,(e=>({displayValue:e.textContent,exportValue:e.value})))};return this.enableScripting&&this.hasJSActions?(n.addEventListener("updatefromsandbox",(i=>{const s={value(i){null==r||r();const s=i.detail.value,l=new Set(Array.isArray(s)?s:[s]);for(const e of n.options)e.selected=l.has(e.value);e.setValue(t,{value:a(!0)}),o=a(!1)},multipleSelection(e){n.multiple=!0},remove(i){const s=n.options,r=i.detail.remove;if(s[r].selected=!1,n.remove(r),s.length>0){-1===Array.prototype.findIndex.call(s,(e=>e.selected))&&(s[0].selected=!0)}e.setValue(t,{value:a(!0),items:l(i)}),o=a(!1)},clear(i){for(;0!==n.length;)n.remove(0);e.setValue(t,{value:null,items:[]}),o=a(!1)},insert(i){const{index:s,displayValue:r,exportValue:A}=i.detail.insert,c=n.children[s],u=document.createElement("option");u.textContent=r,u.value=A,c?c.before(u):n.append(u),e.setValue(t,{value:a(!0),items:l(i)}),o=a(!1)},items(i){const{items:s}=i.detail;for(;0!==n.length;)n.remove(0);for(const e of s){const{displayValue:t,exportValue:i}=e,s=document.createElement("option");s.textContent=t,s.value=i,n.append(s)}n.options.length>0&&(n.options[0].selected=!0),e.setValue(t,{value:a(!0),items:l(i)}),o=a(!1)},indices(i){const n=new Set(i.detail.indices);for(const e of i.target.options)e.selected=n.has(e.index);e.setValue(t,{value:a(!0)}),o=a(!1)},editable(e){e.target.disabled=!e.detail.editable}};this._dispatchEventFromSandbox(s,i)})),n.addEventListener("input",(i=>{var n;const s=a(!0),r=a(!1);e.setValue(t,{value:s}),i.preventDefault(),null==(n=this.linkService.eventBus)||n.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:o,change:r,changeEx:s,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(n,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(e=>e.target.value))):n.addEventListener("input",(function(i){e.setValue(t,{value:a(!0)})})),this.data.combo&&this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class BGe extends uGe{constructor(e){const{data:t,elements:i}=e;super(e,{isRenderable:uGe._hasPopupData(t)}),this.elements=i,this.popup=null}render(){this.container.classList.add("popupAnnotation");const e=this.popup=new yGe({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),t=[];for(const i of this.elements)i.popup=e,i.container.ariaHasPopup="dialog",t.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",t.map((e=>`${rHe}${e}`)).join(",")),this.container}}class yGe{constructor({container:e,color:t,elements:i,titleObj:n,modificationDate:s,contentsObj:r,richText:a,parent:o,rect:l,parentRect:A,open:c}){var u;yc(this,_s),yc(this,ls,Ec(this,_s,Fs).bind(this)),yc(this,As,Ec(this,_s,Ns).bind(this)),yc(this,cs,Ec(this,_s,Rs).bind(this)),yc(this,us,Ec(this,_s,Ms).bind(this)),yc(this,hs,null),yc(this,ds,null),yc(this,gs,null),yc(this,ps,null),yc(this,fs,null),yc(this,ms,null),yc(this,Cs,null),yc(this,Is,!1),yc(this,vs,null),yc(this,Bs,null),yc(this,ys,null),yc(this,bs,null),yc(this,Es,null),yc(this,ws,null),yc(this,Qs,!1),bc(this,ds,e),bc(this,Es,n),bc(this,gs,r),bc(this,bs,a),bc(this,ms,o),bc(this,hs,t),bc(this,ys,l),bc(this,Cs,A),bc(this,fs,i),bc(this,ps,SHe.toDateObject(s)),this.trigger=i.flatMap((e=>e.getElementsToTriggerPopup()));for(const h of this.trigger)h.addEventListener("click",Bc(this,us)),h.addEventListener("mouseenter",Bc(this,cs)),h.addEventListener("mouseleave",Bc(this,As)),h.classList.add("popupTriggerArea");for(const h of i)null==(u=h.container)||u.addEventListener("keydown",Bc(this,ls));Bc(this,ds).hidden=!0,c&&Ec(this,_s,Ms).call(this)}render(){if(Bc(this,vs))return;const e=bc(this,vs,document.createElement("div"));if(e.className="popup",Bc(this,hs)){const t=e.style.outlineColor=tHe.makeHexColor(...Bc(this,hs));if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))e.style.backgroundColor=`color-mix(in srgb, ${t} 30%, white)`;else{const t=.7;e.style.backgroundColor=tHe.makeHexColor(...Bc(this,hs).map((e=>Math.floor(t*(255-e)+e))))}}const t=document.createElement("span");t.className="header";const i=document.createElement("h1");if(t.append(i),({dir:i.dir,str:i.textContent}=Bc(this,Es)),e.append(t),Bc(this,ps)){const e=document.createElement("span");e.classList.add("popupDate"),e.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),e.setAttribute("data-l10n-args",JSON.stringify({dateObj:Bc(this,ps).valueOf()})),t.append(e)}const n=Bc(this,_s,Ss);if(n)aGe.render({xfaHtml:n,intent:"richText",div:e}),e.lastChild.classList.add("richText","popupContent");else{const t=this._formatContents(Bc(this,gs));e.append(t)}Bc(this,ds).append(e)}_formatContents({str:e,dir:t}){const i=document.createElement("p");i.classList.add("popupContent"),i.dir=t;const n=e.split(/(?:\r\n?|\n)/);for(let s=0,r=n.length;s<r;++s){const e=n[s];i.append(document.createTextNode(e)),s<r-1&&i.append(document.createElement("br"))}return i}updateEdited({rect:e,popupContent:t}){var i;Bc(this,ws)||bc(this,ws,{contentsObj:Bc(this,gs),richText:Bc(this,bs)}),e&&bc(this,Bs,null),t&&(bc(this,bs,Ec(this,_s,Ds).call(this,t)),bc(this,gs,null)),null==(i=Bc(this,vs))||i.remove(),bc(this,vs,null)}resetEdited(){var e;Bc(this,ws)&&(({contentsObj:wc(this,gs)._,richText:wc(this,bs)._}=Bc(this,ws)),bc(this,ws,null),null==(e=Bc(this,vs))||e.remove(),bc(this,vs,null),bc(this,Bs,null))}forceHide(){bc(this,Qs,this.isVisible),Bc(this,Qs)&&(Bc(this,ds).hidden=!0)}maybeShow(){Bc(this,Qs)&&(Bc(this,vs)||Ec(this,_s,Rs).call(this),bc(this,Qs,!1),Bc(this,ds).hidden=!1)}get isVisible(){return!1===Bc(this,ds).hidden}}ls=new WeakMap,As=new WeakMap,cs=new WeakMap,us=new WeakMap,hs=new WeakMap,ds=new WeakMap,gs=new WeakMap,ps=new WeakMap,fs=new WeakMap,ms=new WeakMap,Cs=new WeakMap,Is=new WeakMap,vs=new WeakMap,Bs=new WeakMap,ys=new WeakMap,bs=new WeakMap,Es=new WeakMap,ws=new WeakMap,Qs=new WeakMap,_s=new WeakSet,Ss=function(){const e=Bc(this,bs),t=Bc(this,gs);return!(null==e?void 0:e.str)||(null==t?void 0:t.str)&&t.str!==e.str?null:Bc(this,bs).html||null},xs=function(){var e,t,i;return(null==(i=null==(t=null==(e=Bc(this,_s,Ss))?void 0:e.attributes)?void 0:t.style)?void 0:i.fontSize)||0},ks=function(){var e,t,i;return(null==(i=null==(t=null==(e=Bc(this,_s,Ss))?void 0:e.attributes)?void 0:t.style)?void 0:i.color)||null},Ds=function(e){const t=[],i={str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:t}]}},n={style:{color:Bc(this,_s,ks),fontSize:Bc(this,_s,xs)?`calc(${Bc(this,_s,xs)}px * var(--scale-factor))`:""}};for(const s of e.split("\n"))t.push({name:"span",value:s,attributes:n});return i},Fs=function(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||("Enter"===e.key||"Escape"===e.key&&Bc(this,Is))&&Ec(this,_s,Ms).call(this)},Ts=function(){if(null!==Bc(this,Bs))return;const{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:i,pageX:n,pageY:s}}}=Bc(this,ms);let r=!!Bc(this,Cs),a=Bc(this,r?Cs:ys);for(const h of Bc(this,fs))if(!a||null!==tHe.intersect(h.data.rect,a)){a=h.data.rect,r=!0;break}const o=tHe.normalizeRect([a[0],e[3]-a[1]+e[1],a[2],e[3]-a[3]+e[1]]),l=r?a[2]-a[0]+5:0,A=o[0]+l,c=o[1];bc(this,Bs,[100*(A-n)/t,100*(c-s)/i]);const{style:u}=Bc(this,ds);u.left=`${Bc(this,Bs)[0]}%`,u.top=`${Bc(this,Bs)[1]}%`},Ms=function(){bc(this,Is,!Bc(this,Is)),Bc(this,Is)?(Ec(this,_s,Rs).call(this),Bc(this,ds).addEventListener("click",Bc(this,us)),Bc(this,ds).addEventListener("keydown",Bc(this,ls))):(Ec(this,_s,Ns).call(this),Bc(this,ds).removeEventListener("click",Bc(this,us)),Bc(this,ds).removeEventListener("keydown",Bc(this,ls)))},Rs=function(){Bc(this,vs)||this.render(),this.isVisible?Bc(this,Is)&&Bc(this,ds).classList.add("focused"):(Ec(this,_s,Ts).call(this),Bc(this,ds).hidden=!1,Bc(this,ds).style.zIndex=parseInt(Bc(this,ds).style.zIndex)+1e3)},Ns=function(){Bc(this,ds).classList.remove("focused"),!Bc(this,Is)&&this.isVisible&&(Bc(this,ds).hidden=!0,Bc(this,ds).style.zIndex=parseInt(Bc(this,ds).style.zIndex)-1e3)};class bGe extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=$Le.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const t of this.textContent){const i=document.createElement("span");i.textContent=t,e.append(i)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class EGe extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),yc(this,Ls,null)}render(){this.container.classList.add("lineAnnotation");const e=this.data,{width:t,height:i}=AGe(e.rect),n=this.svgFactory.create(t,i,!0),s=bc(this,Ls,this.svgFactory.createElement("svg:line"));return s.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),s.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),s.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),s.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),s.setAttribute("stroke-width",e.borderStyle.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),n.append(s),this.container.append(n),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Bc(this,Ls)}addHighlightArea(){this.container.classList.add("highlightArea")}}Ls=new WeakMap;class wGe extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),yc(this,Us,null)}render(){this.container.classList.add("squareAnnotation");const e=this.data,{width:t,height:i}=AGe(e.rect),n=this.svgFactory.create(t,i,!0),s=e.borderStyle.width,r=bc(this,Us,this.svgFactory.createElement("svg:rect"));return r.setAttribute("x",s/2),r.setAttribute("y",s/2),r.setAttribute("width",t-s),r.setAttribute("height",i-s),r.setAttribute("stroke-width",s||1),r.setAttribute("stroke","transparent"),r.setAttribute("fill","transparent"),n.append(r),this.container.append(n),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Bc(this,Us)}addHighlightArea(){this.container.classList.add("highlightArea")}}Us=new WeakMap;class QGe extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),yc(this,Hs,null)}render(){this.container.classList.add("circleAnnotation");const e=this.data,{width:t,height:i}=AGe(e.rect),n=this.svgFactory.create(t,i,!0),s=e.borderStyle.width,r=bc(this,Hs,this.svgFactory.createElement("svg:ellipse"));return r.setAttribute("cx",t/2),r.setAttribute("cy",i/2),r.setAttribute("rx",t/2-s/2),r.setAttribute("ry",i/2-s/2),r.setAttribute("stroke-width",s||1),r.setAttribute("stroke","transparent"),r.setAttribute("fill","transparent"),n.append(r),this.container.append(n),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Bc(this,Hs)}addHighlightArea(){this.container.classList.add("highlightArea")}}Hs=new WeakMap;class _Ge extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),yc(this,Ps,null),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,vertices:t,borderStyle:i,popupRef:n}}=this;if(!t)return this.container;const{width:s,height:r}=AGe(e),a=this.svgFactory.create(s,r,!0);let o=[];for(let A=0,c=t.length;A<c;A+=2){const i=t[A]-e[0],n=e[3]-t[A+1];o.push(`${i},${n}`)}o=o.join(" ");const l=bc(this,Ps,this.svgFactory.createElement(this.svgElementName));return l.setAttribute("points",o),l.setAttribute("stroke-width",i.width||1),l.setAttribute("stroke","transparent"),l.setAttribute("fill","transparent"),a.append(l),this.container.append(a),!n&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Bc(this,Ps)}addHighlightArea(){this.container.classList.add("highlightArea")}}Ps=new WeakMap;class SGe extends _Ge{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class xGe extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class kGe extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),yc(this,Os,[]),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType="InkHighlight"===this.data.it?$Le.HIGHLIGHT:$Le.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,inkLists:t,borderStyle:i,popupRef:n}}=this,{width:s,height:r}=AGe(e),a=this.svgFactory.create(s,r,!0);for(const o of t){let t=[];for(let i=0,s=o.length;i<s;i+=2){const n=o[i]-e[0],s=e[3]-o[i+1];t.push(`${n},${s}`)}t=t.join(" ");const n=this.svgFactory.createElement(this.svgElementName);Bc(this,Os).push(n),n.setAttribute("points",t),n.setAttribute("stroke-width",i.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),a.append(n)}return!n&&this.hasPopupData&&this._createPopup(),this.container.append(a),this._editOnDoubleClick(),this.container}getElementsToTriggerPopup(){return Bc(this,Os)}addHighlightArea(){this.container.classList.add("highlightArea")}}Os=new WeakMap;class DGe extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=$Le.HIGHLIGHT}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),this.container}}class FGe extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class TGe extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class MGe extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class RGe extends uGe{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=$Le.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class NGe extends uGe{constructor(e){var t;super(e,{isRenderable:!0}),yc(this,Ks),yc(this,Gs,null);const{file:i}=this.data;this.filename=i.filename,this.content=i.content,null==(t=this.linkService.eventBus)||t.dispatch("fileattachmentannotation",{source:this,...i})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:e,data:t}=this;let i;t.hasAppearance||0===t.fillAlpha?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(t.name)?"paperclip":"pushpin"}.svg`,t.fillAlpha&&t.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(100*t.fillAlpha)}%);`)),i.addEventListener("dblclick",Ec(this,Ks,qs).bind(this)),bc(this,Gs,i);const{isMac:n}=ZUe.platform;return e.addEventListener("keydown",(e=>{"Enter"===e.key&&(n?e.metaKey:e.ctrlKey)&&Ec(this,Ks,qs).call(this)})),!t.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),e.append(i),e}getElementsToTriggerPopup(){return Bc(this,Gs)}addHighlightArea(){this.container.classList.add("highlightArea")}}Gs=new WeakMap,Ks=new WeakSet,qs=function(){var e;null==(e=this.downloadManager)||e.openOrDownloadData(this.content,this.filename)};class LGe{constructor({div:e,accessibilityManager:t,annotationCanvasMap:i,annotationEditorUIManager:n,page:s,viewport:r,structTreeLayer:a}){yc(this,Js),yc(this,Ys,null),yc(this,Vs,null),yc(this,Ws,new Map),yc(this,js,null),this.div=e,bc(this,Ys,t),bc(this,Vs,i),bc(this,js,a||null),this.page=s,this.viewport=r,this.zIndex=0,this._annotationEditorUIManager=n}hasEditableAnnotations(){return Bc(this,Ws).size>0}async render(e){var t;const{annotations:i}=e,n=this.div;THe(n,this.viewport);const s=new Map,r={data:null,layer:n,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new rGe,annotationStorage:e.annotationStorage||new sPe,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const a of i){if(a.noHTML)continue;const e=a.annotationType===bUe;if(e){const e=s.get(a.id);if(!e)continue;r.elements=e}else{const{width:e,height:t}=AGe(a.rect);if(e<=0||t<=0)continue}r.data=a;const i=cGe.create(r);if(!i.isRenderable)continue;if(!e&&a.popupRef){const e=s.get(a.popupRef);e?e.push(i):s.set(a.popupRef,[i])}const n=i.render();a.hidden&&(n.style.visibility="hidden"),await Ec(this,Js,zs).call(this,n,a.id),i._isEditable&&(Bc(this,Ws).set(i.data.id,i),null==(t=this._annotationEditorUIManager)||t.renderAnnotationElement(i))}Ec(this,Js,Xs).call(this)}update({viewport:e}){const t=this.div;this.viewport=e,THe(t,{rotation:e.rotation}),Ec(this,Js,Xs).call(this),t.hidden=!1}getEditableAnnotations(){return Array.from(Bc(this,Ws).values())}getEditableAnnotation(e){return Bc(this,Ws).get(e)}}Ys=new WeakMap,Vs=new WeakMap,Ws=new WeakMap,js=new WeakMap,Js=new WeakSet,zs=async function(e,t){var i,n;const s=e.firstChild||e,r=s.id=`${rHe}${t}`,a=await(null==(i=Bc(this,js))?void 0:i.getAriaAttributes(r));if(a)for(const[o,l]of a)s.setAttribute(o,l);this.div.append(e),null==(n=Bc(this,Ys))||n.moveElementInDOM(this.div,e,s,!1)},Xs=function(){if(!Bc(this,Vs))return;const e=this.div;for(const[t,i]of Bc(this,Vs)){const n=e.querySelector(`[data-annotation-id="${t}"]`);if(!n)continue;i.className="annotationContent";const{firstChild:s}=n;s?"CANVAS"===s.nodeName?s.replaceWith(i):s.classList.contains("annotationContent")?s.after(i):s.before(i):n.append(i)}Bc(this,Vs).clear()};const UGe=/\r\n?|\n/g,HGe=class e extends XHe{constructor(t){super({...t,name:"freeTextEditor"}),yc(this,nr),yc(this,$s),yc(this,Zs,""),yc(this,er,`${this.id}-editor`),yc(this,tr,null),yc(this,ir),bc(this,$s,t.color||e._defaultColor||XHe._defaultLineColor),bc(this,ir,t.fontSize||e._defaultFontSize)}static get _keyboardManager(){const t=e.prototype,i=e=>e.isEmpty(),n=WHe.TRANSLATE_SMALL,s=WHe.TRANSLATE_BIG;return OUe(this,"_keyboardManager",new KHe([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-n,0],checker:i}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-s,0],checker:i}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[n,0],checker:i}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[s,0],checker:i}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-n],checker:i}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-s],checker:i}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,n],checker:i}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,s],checker:i}]]))}static initialize(e,t){XHe.initialize(e,t);const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,i){switch(t){case ZLe.FREETEXT_SIZE:e._defaultFontSize=i;break;case ZLe.FREETEXT_COLOR:e._defaultColor=i}}updateParams(e,t){switch(e){case ZLe.FREETEXT_SIZE:Ec(this,nr,sr).call(this,t);break;case ZLe.FREETEXT_COLOR:Ec(this,nr,rr).call(this,t)}}static get defaultPropertiesToUpdate(){return[[ZLe.FREETEXT_SIZE,e._defaultFontSize],[ZLe.FREETEXT_COLOR,e._defaultColor||XHe._defaultLineColor]]}get propertiesToUpdate(){return[[ZLe.FREETEXT_SIZE,Bc(this,ir)],[ZLe.FREETEXT_COLOR,Bc(this,$s)]]}_translateEmpty(e,t){this._uiManager.translateSelectedEditors(e,t,!0)}getInitialTranslation(){const t=this.parentScale;return[-e._internalPadding*t,-(e._internalPadding+Bc(this,ir))*t]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar($Le.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),bc(this,tr,new AbortController);const e=this._uiManager.combinedSignal(Bc(this,tr));this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e})}disableEditMode(){var e;this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",Bc(this,er)),this._isDraggable=!0,null==(e=Bc(this,tr))||e.abort(),bc(this,tr,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var e;this.width||(this.enableEditMode(),this.editorDiv.focus(),(null==(e=this._initialOptions)?void 0:e.isCentered)&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=Bc(this,Zs),t=bc(this,Zs,Ec(this,nr,ar).call(this).trimEnd());if(e===t)return;const i=e=>{bc(this,Zs,e),e?(Ec(this,nr,cr).call(this),this._uiManager.rebuild(this),Ec(this,nr,or).call(this)):this.remove()};this.addCommands({cmd:()=>{i(t)},undo:()=>{i(e)},mustExec:!1}),Ec(this,nr,or).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(t){e._keyboardManager.exec(this,t)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",Bc(this,er)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${Bc(this,ir)}px * var(--scale-factor))`,i.color=Bc(this,$s),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),UHe(this,this.div,["dblclick","keydown"]),this.width){const[i,n]=this.parentDimensions;if(this.annotationElementId){const{position:s}=this._initialData;let[r,a]=this.getInitialTranslation();[r,a]=this.pageTranslationToScreen(r,a);const[o,l]=this.pageDimensions,[A,c]=this.pageTranslation;let u,h;switch(this.rotation){case 0:u=e+(s[0]-A)/o,h=t+this.height-(s[1]-c)/l;break;case 90:u=e+(s[0]-A)/o,h=t-(s[1]-c)/l,[r,a]=[a,-r];break;case 180:u=e-this.width+(s[0]-A)/o,h=t-(s[1]-c)/l,[r,a]=[-r,-a];break;case 270:u=e+(s[0]-A-this.height*l)/o,h=t+(s[1]-c-this.width*o)/l,[r,a]=[-a,r]}this.setAt(u*i,h*n,r,a)}else this.setAt(e*i,t*n,this.width*i,this.height*n);Ec(this,nr,cr).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(t){var i,n,s;const r=t.clipboardData||window.clipboardData,{types:a}=r;if(1===a.length&&"text/plain"===a[0])return;t.preventDefault();const o=Ec(i=e,lr,hr).call(i,r.getData("text")||"").replaceAll(UGe,"\n");if(!o)return;const l=window.getSelection();if(!l.rangeCount)return;this.editorDiv.normalize(),l.deleteFromDocument();const A=l.getRangeAt(0);if(!o.includes("\n"))return A.insertNode(document.createTextNode(o)),this.editorDiv.normalize(),void l.collapseToStart();const{startContainer:c,startOffset:u}=A,h=[],d=[];if(c.nodeType===Node.TEXT_NODE){const t=c.parentElement;if(d.push(c.nodeValue.slice(u).replaceAll(UGe,"")),t!==this.editorDiv){let i=h;for(const s of this.editorDiv.childNodes)s!==t?i.push(Ec(n=e,lr,Ar).call(n,s)):i=d}h.push(c.nodeValue.slice(0,u).replaceAll(UGe,""))}else if(c===this.editorDiv){let t=h,i=0;for(const n of this.editorDiv.childNodes)i++===u&&(t=d),t.push(Ec(s=e,lr,Ar).call(s,n))}bc(this,Zs,`${h.join("\n")}${o}${d.join("\n")}`),Ec(this,nr,cr).call(this);const g=new Range;let p=h.reduce(((e,t)=>e+t.length),0);for(const{firstChild:e}of this.editorDiv.childNodes)if(e.nodeType===Node.TEXT_NODE){const t=e.nodeValue.length;if(p<=t){g.setStart(e,p),g.setEnd(e,p);break}p-=t}l.removeAllRanges(),l.addRange(g)}get contentDiv(){return this.editorDiv}static async deserialize(t,i,n){var s;let r=null;if(t instanceof bGe){const{data:{defaultAppearanceData:{fontSize:e,fontColor:i},rect:n,rotation:s,id:a,popupRef:o},textContent:l,textPosition:A,parent:{page:{pageNumber:c}}}=t;if(!l||0===l.length)return null;r=t={annotationType:$Le.FREETEXT,color:Array.from(i),fontSize:e,value:l.join("\n"),position:A,pageIndex:c-1,rect:n.slice(0),rotation:s,id:a,deleted:!1,popupRef:o}}const a=await super.deserialize(t,i,n);return bc(a,ir,t.fontSize),bc(a,$s,tHe.makeHexColor(...t.color)),bc(a,Zs,Ec(s=e,lr,hr).call(s,t.value)),a.annotationElementId=t.id||null,a._initialData=r,a}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i=e._internalPadding*this.parentScale,n=this.getRect(i,i),s=XHe._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:Bc(this,$s)),r={annotationType:$Le.FREETEXT,color:s,fontSize:Bc(this,ir),value:Ec(this,nr,ur).call(this),pageIndex:this.pageIndex,rect:n,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return t?r:this.annotationElementId&&!Ec(this,nr,dr).call(this,r)?null:(r.id=this.annotationElementId,r)}renderAnnotationElement(t){const i=super.renderAnnotationElement(t);if(this.deleted)return i;const{style:n}=i;n.fontSize=`calc(${Bc(this,ir)}px * var(--scale-factor))`,n.color=Bc(this,$s),i.replaceChildren();for(const e of Bc(this,Zs).split("\n")){const t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),i.append(t)}const s=e._internalPadding*this.parentScale;return t.updateEdited({rect:this.getRect(s,s),popupContent:Bc(this,Zs)}),i}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}};$s=new WeakMap,Zs=new WeakMap,er=new WeakMap,tr=new WeakMap,ir=new WeakMap,nr=new WeakSet,sr=function(e){const t=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--scale-factor))`,this.translate(0,-(e-Bc(this,ir))*this.parentScale),bc(this,ir,e),Ec(this,nr,or).call(this)},i=Bc(this,ir);this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ZLe.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},rr=function(e){const t=e=>{bc(this,$s,this.editorDiv.style.color=e)},i=Bc(this,$s);this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ZLe.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},ar=function(){var e;const t=[];this.editorDiv.normalize();let i=null;for(const n of this.editorDiv.childNodes)(null==i?void 0:i.nodeType)===Node.TEXT_NODE&&"BR"===n.nodeName||(t.push(Ec(e=HGe,lr,Ar).call(e,n)),i=n);return t.join("\n")},or=function(){const[e,t]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:e,div:t}=this,n=t.style.display,s=t.classList.contains("hidden");t.classList.remove("hidden"),t.style.display="hidden",e.div.append(this.div),i=t.getBoundingClientRect(),t.remove(),t.style.display=n,t.classList.toggle("hidden",s)}this.rotation%180==this.parentRotation%180?(this.width=i.width/e,this.height=i.height/t):(this.width=i.height/e,this.height=i.width/t),this.fixAndSetPosition()},lr=new WeakSet,Ar=function(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(UGe,"")},cr=function(){if(this.editorDiv.replaceChildren(),Bc(this,Zs))for(const e of Bc(this,Zs).split("\n")){const t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}},ur=function(){return Bc(this,Zs).replaceAll(" "," ")},hr=function(e){return e.replaceAll(" "," ")},dr=function(e){const{value:t,fontSize:i,color:n,pageIndex:s}=this._initialData;return this._hasBeenMoved||e.value!==t||e.fontSize!==i||e.color.some(((e,t)=>e!==n[t]))||e.pageIndex!==s},yc(HGe,lr),Ic(HGe,"_freeTextDefaultContent",""),Ic(HGe,"_internalPadding",0),Ic(HGe,"_defaultColor",null),Ic(HGe,"_defaultFontSize",10),Ic(HGe,"_type","freetext"),Ic(HGe,"_editorType",$Le.FREETEXT);let PGe=HGe;class OGe{toSVGPath(){UUe("Abstract method `toSVGPath` must be implemented.")}get box(){UUe("Abstract getter `box` must be implemented.")}serialize(e,t){UUe("Abstract method `serialize` must be implemented.")}get classNamesForDrawing(){UUe("Abstract getter `classNamesForDrawing` must be implemented.")}get classNamesForOutlining(){UUe("Abstract getter `classNamesForOutlining` must be implemented.")}get mustRemoveSelfIntersections(){return!1}}const GGe=class e{constructor({x:t,y:i},n,s,r,a,o=0){yc(this,kr),yc(this,gr),yc(this,pr,[]),yc(this,fr),yc(this,mr),yc(this,Cr,[]),yc(this,Ir,new Float64Array(18)),yc(this,vr),yc(this,Br),yc(this,yr),yc(this,br),yc(this,Er),yc(this,wr),yc(this,Qr,[]),bc(this,gr,n),bc(this,wr,r*s),bc(this,mr,a),Bc(this,Ir).set([NaN,NaN,NaN,NaN,t,i],6),bc(this,fr,o),bc(this,br,Bc(e,_r)*s),bc(this,yr,Bc(e,xr)*s),bc(this,Er,s),Bc(this,Qr).push(t,i)}isEmpty(){return isNaN(Bc(this,Ir)[8])}add({x:e,y:t}){var i;bc(this,vr,e),bc(this,Br,t);const[n,s,r,a]=Bc(this,gr);let[o,l,A,c]=Bc(this,Ir).subarray(8,12);const u=e-A,h=t-c,d=Math.hypot(u,h);if(d<Bc(this,yr))return!1;const g=d-Bc(this,br),p=g/d,f=p*u,m=p*h;let C=o,I=l;o=A,l=c,A+=f,c+=m,null==(i=Bc(this,Qr))||i.push(e,t);const v=f/g,B=-m/g*Bc(this,wr),y=v*Bc(this,wr);if(Bc(this,Ir).set(Bc(this,Ir).subarray(2,8),0),Bc(this,Ir).set([A+B,c+y],4),Bc(this,Ir).set(Bc(this,Ir).subarray(14,18),12),Bc(this,Ir).set([A-B,c-y],16),isNaN(Bc(this,Ir)[6]))return 0===Bc(this,Cr).length&&(Bc(this,Ir).set([o+B,l+y],2),Bc(this,Cr).push(NaN,NaN,NaN,NaN,(o+B-n)/r,(l+y-s)/a),Bc(this,Ir).set([o-B,l-y],14),Bc(this,pr).push(NaN,NaN,NaN,NaN,(o-B-n)/r,(l-y-s)/a)),Bc(this,Ir).set([C,I,o,l,A,c],6),!this.isEmpty();Bc(this,Ir).set([C,I,o,l,A,c],6);return Math.abs(Math.atan2(I-l,C-o)-Math.atan2(m,f))<Math.PI/2?([o,l,A,c]=Bc(this,Ir).subarray(2,6),Bc(this,Cr).push(NaN,NaN,NaN,NaN,((o+A)/2-n)/r,((l+c)/2-s)/a),[o,l,C,I]=Bc(this,Ir).subarray(14,18),Bc(this,pr).push(NaN,NaN,NaN,NaN,((C+o)/2-n)/r,((I+l)/2-s)/a),!0):([C,I,o,l,A,c]=Bc(this,Ir).subarray(0,6),Bc(this,Cr).push(((C+5*o)/6-n)/r,((I+5*l)/6-s)/a,((5*o+A)/6-n)/r,((5*l+c)/6-s)/a,((o+A)/2-n)/r,((l+c)/2-s)/a),[A,c,o,l,C,I]=Bc(this,Ir).subarray(12,18),Bc(this,pr).push(((C+5*o)/6-n)/r,((I+5*l)/6-s)/a,((5*o+A)/6-n)/r,((5*l+c)/6-s)/a,((o+A)/2-n)/r,((l+c)/2-s)/a),!0)}toSVGPath(){if(this.isEmpty())return"";const e=Bc(this,Cr),t=Bc(this,pr);if(isNaN(Bc(this,Ir)[6])&&!this.isEmpty())return Ec(this,kr,Fr).call(this);const i=[];i.push(`M${e[4]} ${e[5]}`);for(let n=6;n<e.length;n+=6)isNaN(e[n])?i.push(`L${e[n+4]} ${e[n+5]}`):i.push(`C${e[n]} ${e[n+1]} ${e[n+2]} ${e[n+3]} ${e[n+4]} ${e[n+5]}`);Ec(this,kr,Mr).call(this,i);for(let n=t.length-6;n>=6;n-=6)isNaN(t[n])?i.push(`L${t[n+4]} ${t[n+5]}`):i.push(`C${t[n]} ${t[n+1]} ${t[n+2]} ${t[n+3]} ${t[n+4]} ${t[n+5]}`);return Ec(this,kr,Tr).call(this,i),i.join(" ")}newFreeDrawOutline(e,t,i,n,s,r){return new qGe(e,t,i,n,s,r)}getOutlines(){var e;const t=Bc(this,Cr),i=Bc(this,pr),n=Bc(this,Ir),[s,r,a,o]=Bc(this,gr),l=new Float64Array(((null==(e=Bc(this,Qr))?void 0:e.length)??0)+2);for(let u=0,h=l.length-2;u<h;u+=2)l[u]=(Bc(this,Qr)[u]-s)/a,l[u+1]=(Bc(this,Qr)[u+1]-r)/o;if(l[l.length-2]=(Bc(this,vr)-s)/a,l[l.length-1]=(Bc(this,Br)-r)/o,isNaN(n[6])&&!this.isEmpty())return Ec(this,kr,Rr).call(this,l);const A=new Float64Array(Bc(this,Cr).length+24+Bc(this,pr).length);let c=t.length;for(let u=0;u<c;u+=2)isNaN(t[u])?A[u]=A[u+1]=NaN:(A[u]=t[u],A[u+1]=t[u+1]);c=Ec(this,kr,Lr).call(this,A,c);for(let u=i.length-6;u>=6;u-=6)for(let e=0;e<6;e+=2)isNaN(i[u+e])?(A[c]=A[c+1]=NaN,c+=2):(A[c]=i[u+e],A[c+1]=i[u+e+1],c+=2);return Ec(this,kr,Nr).call(this,A,c),this.newFreeDrawOutline(A,l,Bc(this,gr),Bc(this,Er),Bc(this,fr),Bc(this,mr))}};gr=new WeakMap,pr=new WeakMap,fr=new WeakMap,mr=new WeakMap,Cr=new WeakMap,Ir=new WeakMap,vr=new WeakMap,Br=new WeakMap,yr=new WeakMap,br=new WeakMap,Er=new WeakMap,wr=new WeakMap,Qr=new WeakMap,_r=new WeakMap,Sr=new WeakMap,xr=new WeakMap,kr=new WeakSet,Dr=function(){const e=Bc(this,Ir).subarray(4,6),t=Bc(this,Ir).subarray(16,18),[i,n,s,r]=Bc(this,gr);return[(Bc(this,vr)+(e[0]-t[0])/2-i)/s,(Bc(this,Br)+(e[1]-t[1])/2-n)/r,(Bc(this,vr)+(t[0]-e[0])/2-i)/s,(Bc(this,Br)+(t[1]-e[1])/2-n)/r]},Fr=function(){const[e,t,i,n]=Bc(this,gr),[s,r,a,o]=Ec(this,kr,Dr).call(this);return`M${(Bc(this,Ir)[2]-e)/i} ${(Bc(this,Ir)[3]-t)/n} L${(Bc(this,Ir)[4]-e)/i} ${(Bc(this,Ir)[5]-t)/n} L${s} ${r} L${a} ${o} L${(Bc(this,Ir)[16]-e)/i} ${(Bc(this,Ir)[17]-t)/n} L${(Bc(this,Ir)[14]-e)/i} ${(Bc(this,Ir)[15]-t)/n} Z`},Tr=function(e){const t=Bc(this,pr);e.push(`L${t[4]} ${t[5]} Z`)},Mr=function(e){const[t,i,n,s]=Bc(this,gr),r=Bc(this,Ir).subarray(4,6),a=Bc(this,Ir).subarray(16,18),[o,l,A,c]=Ec(this,kr,Dr).call(this);e.push(`L${(r[0]-t)/n} ${(r[1]-i)/s} L${o} ${l} L${A} ${c} L${(a[0]-t)/n} ${(a[1]-i)/s}`)},Rr=function(e){const t=Bc(this,Ir),[i,n,s,r]=Bc(this,gr),[a,o,l,A]=Ec(this,kr,Dr).call(this),c=new Float64Array(36);return c.set([NaN,NaN,NaN,NaN,(t[2]-i)/s,(t[3]-n)/r,NaN,NaN,NaN,NaN,(t[4]-i)/s,(t[5]-n)/r,NaN,NaN,NaN,NaN,a,o,NaN,NaN,NaN,NaN,l,A,NaN,NaN,NaN,NaN,(t[16]-i)/s,(t[17]-n)/r,NaN,NaN,NaN,NaN,(t[14]-i)/s,(t[15]-n)/r],0),this.newFreeDrawOutline(c,e,Bc(this,gr),Bc(this,Er),Bc(this,fr),Bc(this,mr))},Nr=function(e,t){const i=Bc(this,pr);return e.set([NaN,NaN,NaN,NaN,i[4],i[5]],t),t+6},Lr=function(e,t){const i=Bc(this,Ir).subarray(4,6),n=Bc(this,Ir).subarray(16,18),[s,r,a,o]=Bc(this,gr),[l,A,c,u]=Ec(this,kr,Dr).call(this);return e.set([NaN,NaN,NaN,NaN,(i[0]-s)/a,(i[1]-r)/o,NaN,NaN,NaN,NaN,l,A,NaN,NaN,NaN,NaN,c,u,NaN,NaN,NaN,NaN,(n[0]-s)/a,(n[1]-r)/o],t),t+24},yc(GGe,_r,8),yc(GGe,Sr,2),yc(GGe,xr,Bc(GGe,_r)+Bc(GGe,Sr));let KGe=GGe;class qGe extends OGe{constructor(e,t,i,n,s,r){super(),yc(this,Yr),yc(this,Ur),yc(this,Hr,null),yc(this,Pr),yc(this,Or),yc(this,Gr),yc(this,Kr),yc(this,qr),bc(this,qr,e),bc(this,Gr,t),bc(this,Ur,i),bc(this,Kr,n),bc(this,Pr,s),bc(this,Or,r),Ec(this,Yr,jr).call(this,r);const{x:a,y:o,width:l,height:A}=Bc(this,Hr);for(let c=0,u=e.length;c<u;c+=2)e[c]=(e[c]-a)/l,e[c+1]=(e[c+1]-o)/A;for(let c=0,u=t.length;c<u;c+=2)t[c]=(t[c]-a)/l,t[c+1]=(t[c+1]-o)/A}toSVGPath(){const e=[`M${Bc(this,qr)[4]} ${Bc(this,qr)[5]}`];for(let t=6,i=Bc(this,qr).length;t<i;t+=6)isNaN(Bc(this,qr)[t])?e.push(`L${Bc(this,qr)[t+4]} ${Bc(this,qr)[t+5]}`):e.push(`C${Bc(this,qr)[t]} ${Bc(this,qr)[t+1]} ${Bc(this,qr)[t+2]} ${Bc(this,qr)[t+3]} ${Bc(this,qr)[t+4]} ${Bc(this,qr)[t+5]}`);return e.push("Z"),e.join(" ")}serialize([e,t,i,n],s){const r=i-e,a=n-t;let o,l;switch(s){case 0:o=Ec(this,Yr,Vr).call(this,Bc(this,qr),e,n,r,-a),l=Ec(this,Yr,Vr).call(this,Bc(this,Gr),e,n,r,-a);break;case 90:o=Ec(this,Yr,Wr).call(this,Bc(this,qr),e,t,r,a),l=Ec(this,Yr,Wr).call(this,Bc(this,Gr),e,t,r,a);break;case 180:o=Ec(this,Yr,Vr).call(this,Bc(this,qr),i,t,-r,a),l=Ec(this,Yr,Vr).call(this,Bc(this,Gr),i,t,-r,a);break;case 270:o=Ec(this,Yr,Wr).call(this,Bc(this,qr),i,n,-r,-a),l=Ec(this,Yr,Wr).call(this,Bc(this,Gr),i,n,-r,-a)}return{outline:Array.from(o),points:[Array.from(l)]}}get box(){return Bc(this,Hr)}newOutliner(e,t,i,n,s,r=0){return new KGe(e,t,i,n,s,r)}getNewOutline(e,t){const{x:i,y:n,width:s,height:r}=Bc(this,Hr),[a,o,l,A]=Bc(this,Ur),c=s*l,u=r*A,h=i*l+a,d=n*A+o,g=this.newOutliner({x:Bc(this,Gr)[0]*c+h,y:Bc(this,Gr)[1]*u+d},Bc(this,Ur),Bc(this,Kr),e,Bc(this,Or),t??Bc(this,Pr));for(let p=2;p<Bc(this,Gr).length;p+=2)g.add({x:Bc(this,Gr)[p]*c+h,y:Bc(this,Gr)[p+1]*u+d});return g.getOutlines()}get mustRemoveSelfIntersections(){return!0}}Ur=new WeakMap,Hr=new WeakMap,Pr=new WeakMap,Or=new WeakMap,Gr=new WeakMap,Kr=new WeakMap,qr=new WeakMap,Yr=new WeakSet,Vr=function(e,t,i,n,s){const r=new Float64Array(e.length);for(let a=0,o=e.length;a<o;a+=2)r[a]=t+e[a]*n,r[a+1]=i+e[a+1]*s;return r},Wr=function(e,t,i,n,s){const r=new Float64Array(e.length);for(let a=0,o=e.length;a<o;a+=2)r[a]=t+e[a+1]*n,r[a+1]=i+e[a]*s;return r},jr=function(e){const t=Bc(this,qr);let i=t[4],n=t[5],s=i,r=n,a=i,o=n,l=i,A=n;const c=e?Math.max:Math.min;for(let p=6,f=t.length;p<f;p+=6){if(isNaN(t[p]))s=Math.min(s,t[p+4]),r=Math.min(r,t[p+5]),a=Math.max(a,t[p+4]),o=Math.max(o,t[p+5]),A<t[p+5]?(l=t[p+4],A=t[p+5]):A===t[p+5]&&(l=c(l,t[p+4]));else{const e=tHe.bezierBoundingBox(i,n,...t.slice(p,p+6));s=Math.min(s,e[0]),r=Math.min(r,e[1]),a=Math.max(a,e[2]),o=Math.max(o,e[3]),A<e[3]?(l=e[2],A=e[3]):A===e[3]&&(l=c(l,e[2]))}i=t[p+4],n=t[p+5]}const u=s-Bc(this,Pr),h=r-Bc(this,Pr),d=a-s+2*Bc(this,Pr),g=o-r+2*Bc(this,Pr);bc(this,Hr,{x:u,y:h,width:d,height:g,lastPoint:[l,A]})};class YGe{constructor(e,t=0,i=0,n=!0){yc(this,$r),yc(this,Jr),yc(this,zr,[]),yc(this,Xr,[]);let s=1/0,r=-1/0,a=1/0,o=-1/0;const l=10**-4;for(const{x:p,y:f,width:m,height:C}of e){const e=Math.floor((p-t)/l)*l,i=Math.ceil((p+m+t)/l)*l,n=Math.floor((f-t)/l)*l,A=Math.ceil((f+C+t)/l)*l,c=[e,n,A,!0],u=[i,n,A,!1];Bc(this,zr).push(c,u),s=Math.min(s,e),r=Math.max(r,i),a=Math.min(a,n),o=Math.max(o,A)}const A=r-s+2*i,c=o-a+2*i,u=s-i,h=a-i,d=Bc(this,zr).at(n?-1:-2),g=[d[0],d[2]];for(const p of Bc(this,zr)){const[e,t,i]=p;p[0]=(e-u)/A,p[1]=(t-h)/c,p[2]=(i-h)/c}bc(this,Jr,{x:u,y:h,width:A,height:c,lastPoint:g})}getOutlines(){Bc(this,zr).sort(((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2]));const e=[];for(const t of Bc(this,zr))t[3]?(e.push(...Ec(this,$r,na).call(this,t)),Ec(this,$r,ta).call(this,t)):(Ec(this,$r,ia).call(this,t),e.push(...Ec(this,$r,na).call(this,t)));return Ec(this,$r,Zr).call(this,e)}}Jr=new WeakMap,zr=new WeakMap,Xr=new WeakMap,$r=new WeakSet,Zr=function(e){const t=[],i=new Set;for(const r of e){const[e,i,n]=r;t.push([e,i,r],[e,n,r])}t.sort(((e,t)=>e[1]-t[1]||e[0]-t[0]));for(let r=0,a=t.length;r<a;r+=2){const e=t[r][2],n=t[r+1][2];e.push(n),n.push(e),i.add(e),i.add(n)}const n=[];let s;for(;i.size>0;){const e=i.values().next().value;let[t,r,a,o,l]=e;i.delete(e);let A=t,c=r;for(s=[t,a],n.push(s);;){let e;if(i.has(o))e=o;else{if(!i.has(l))break;e=l}i.delete(e),[t,r,a,o,l]=e,A!==t&&(s.push(A,c,t,c===r?r:a),A=t),c=c===r?a:r}s.push(A,c)}return new VGe(n,Bc(this,Jr))},ea=function(e){const t=Bc(this,Xr);let i=0,n=t.length-1;for(;i<=n;){const s=i+n>>1,r=t[s][0];if(r===e)return s;r<e?i=s+1:n=s-1}return n+1},ta=function([,e,t]){const i=Ec(this,$r,ea).call(this,e);Bc(this,Xr).splice(i,0,[e,t])},ia=function([,e,t]){const i=Ec(this,$r,ea).call(this,e);for(let n=i;n<Bc(this,Xr).length;n++){const[i,s]=Bc(this,Xr)[n];if(i!==e)break;if(i===e&&s===t)return void Bc(this,Xr).splice(n,1)}for(let n=i-1;n>=0;n--){const[i,s]=Bc(this,Xr)[n];if(i!==e)break;if(i===e&&s===t)return void Bc(this,Xr).splice(n,1)}},na=function(e){const[t,i,n]=e,s=[[t,i,n]],r=Ec(this,$r,ea).call(this,n);for(let a=0;a<r;a++){const[e,i]=Bc(this,Xr)[a];for(let n=0,r=s.length;n<r;n++){const[,a,o]=s[n];if(!(i<=a||o<=e))if(a>=e)if(o>i)s[n][1]=i;else{if(1===r)return[];s.splice(n,1),n--,r--}else s[n][2]=e,o>i&&s.push([t,i,o])}}return s};class VGe extends OGe{constructor(e,t){super(),yc(this,sa),yc(this,ra),bc(this,ra,e),bc(this,sa,t)}toSVGPath(){const e=[];for(const t of Bc(this,ra)){let[i,n]=t;e.push(`M${i} ${n}`);for(let s=2;s<t.length;s+=2){const r=t[s],a=t[s+1];r===i?(e.push(`V${a}`),n=a):a===n&&(e.push(`H${r}`),i=r)}e.push("Z")}return e.join(" ")}serialize([e,t,i,n],s){const r=[],a=i-e,o=n-t;for(const l of Bc(this,ra)){const t=new Array(l.length);for(let i=0;i<l.length;i+=2)t[i]=e+l[i]*a,t[i+1]=n-l[i+1]*o;r.push(t)}return r}get box(){return Bc(this,sa)}get classNamesForDrawing(){return["highlight"]}get classNamesForOutlining(){return["highlightOutline"]}}sa=new WeakMap,ra=new WeakMap;class WGe extends KGe{newFreeDrawOutline(e,t,i,n,s,r){return new jGe(e,t,i,n,s,r)}get classNamesForDrawing(){return["highlight","free"]}}class jGe extends qGe{get classNamesForDrawing(){return["highlight","free"]}get classNamesForOutlining(){return["highlightOutline","free"]}newOutliner(e,t,i,n,s,r=0){return new WGe(e,t,i,n,s,r)}}const JGe=class e{constructor({editor:t=null,uiManager:i=null}){var n;yc(this,Ca),yc(this,aa,null),yc(this,oa,null),yc(this,la),yc(this,Aa,null),yc(this,ca,!1),yc(this,ua,!1),yc(this,ha,null),yc(this,da),yc(this,ga,null),yc(this,pa,null),yc(this,fa),t?(bc(this,ua,!1),bc(this,fa,ZLe.HIGHLIGHT_COLOR),bc(this,ha,t)):(bc(this,ua,!0),bc(this,fa,ZLe.HIGHLIGHT_DEFAULT_COLOR)),bc(this,pa,(null==t?void 0:t._uiManager)||i),bc(this,da,Bc(this,pa)._eventBus),bc(this,la,(null==t?void 0:t.color)||(null==(n=Bc(this,pa))?void 0:n.highlightColors.values().next().value)||"#FFFF98"),Bc(e,ma)||bc(e,ma,Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"}))}static get _keyboardManager(){return OUe(this,"_keyboardManager",new KHe([[["Escape","mac+Escape"],e.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],e.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],e.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],e.prototype._moveToPrevious],[["Home","mac+Home"],e.prototype._moveToBeginning],[["End","mac+End"],e.prototype._moveToEnd]]))}renderButton(){const e=bc(this,aa,document.createElement("button"));e.className="colorPicker",e.tabIndex="0",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),e.setAttribute("aria-haspopup",!0);const t=Bc(this,pa)._signal;e.addEventListener("click",Ec(this,Ca,ya).bind(this),{signal:t}),e.addEventListener("keydown",Ec(this,Ca,Ba).bind(this),{signal:t});const i=bc(this,oa,document.createElement("span"));return i.className="swatch",i.setAttribute("aria-hidden",!0),i.style.backgroundColor=Bc(this,la),e.append(i),e}renderMainDropdown(){const e=bc(this,Aa,Ec(this,Ca,Ia).call(this));return e.setAttribute("aria-orientation","horizontal"),e.setAttribute("aria-labelledby","highlightColorPickerLabel"),e}_colorSelectFromKeyboard(e){if(e.target===Bc(this,aa))return void Ec(this,Ca,ya).call(this,e);const t=e.target.getAttribute("data-color");t&&Ec(this,Ca,va).call(this,t,e)}_moveToNext(e){var t,i;Bc(this,Ca,Ea)?e.target!==Bc(this,aa)?null==(i=e.target.nextSibling)||i.focus():null==(t=Bc(this,Aa).firstChild)||t.focus():Ec(this,Ca,ya).call(this,e)}_moveToPrevious(e){var t,i;e.target!==(null==(t=Bc(this,Aa))?void 0:t.firstChild)&&e.target!==Bc(this,aa)?(Bc(this,Ca,Ea)||Ec(this,Ca,ya).call(this,e),null==(i=e.target.previousSibling)||i.focus()):Bc(this,Ca,Ea)&&this._hideDropdownFromKeyboard()}_moveToBeginning(e){var t;Bc(this,Ca,Ea)?null==(t=Bc(this,Aa).firstChild)||t.focus():Ec(this,Ca,ya).call(this,e)}_moveToEnd(e){var t;Bc(this,Ca,Ea)?null==(t=Bc(this,Aa).lastChild)||t.focus():Ec(this,Ca,ya).call(this,e)}hideDropdown(){var e,t;null==(e=Bc(this,Aa))||e.classList.add("hidden"),null==(t=Bc(this,ga))||t.abort(),bc(this,ga,null)}_hideDropdownFromKeyboard(){var e;Bc(this,ua)||(Bc(this,Ca,Ea)?(this.hideDropdown(),Bc(this,aa).focus({preventScroll:!0,focusVisible:Bc(this,ca)})):null==(e=Bc(this,ha))||e.unselect())}updateColor(e){if(Bc(this,oa)&&(Bc(this,oa).style.backgroundColor=e),!Bc(this,Aa))return;const t=Bc(this,pa).highlightColors.values();for(const i of Bc(this,Aa).children)i.setAttribute("aria-selected",t.next().value===e)}destroy(){var e,t;null==(e=Bc(this,aa))||e.remove(),bc(this,aa,null),bc(this,oa,null),null==(t=Bc(this,Aa))||t.remove(),bc(this,Aa,null)}};aa=new WeakMap,oa=new WeakMap,la=new WeakMap,Aa=new WeakMap,ca=new WeakMap,ua=new WeakMap,ha=new WeakMap,da=new WeakMap,ga=new WeakMap,pa=new WeakMap,fa=new WeakMap,ma=new WeakMap,Ca=new WeakSet,Ia=function(){const e=document.createElement("div"),t=Bc(this,pa)._signal;e.addEventListener("contextmenu",_He,{signal:t}),e.className="dropdown",e.role="listbox",e.setAttribute("aria-multiselectable",!1),e.setAttribute("aria-orientation","vertical"),e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown");for(const[i,n]of Bc(this,pa).highlightColors){const s=document.createElement("button");s.tabIndex="0",s.role="option",s.setAttribute("data-color",n),s.title=i,s.setAttribute("data-l10n-id",Bc(JGe,ma)[i]);const r=document.createElement("span");s.append(r),r.className="swatch",r.style.backgroundColor=n,s.setAttribute("aria-selected",n===Bc(this,la)),s.addEventListener("click",Ec(this,Ca,va).bind(this,n),{signal:t}),e.append(s)}return e.addEventListener("keydown",Ec(this,Ca,Ba).bind(this),{signal:t}),e},va=function(e,t){t.stopPropagation(),Bc(this,da).dispatch("switchannotationeditorparams",{source:this,type:Bc(this,fa),value:e})},Ba=function(e){JGe._keyboardManager.exec(this,e)},ya=function(e){if(Bc(this,Ca,Ea))return void this.hideDropdown();if(bc(this,ca,0===e.detail),Bc(this,ga)||(bc(this,ga,new AbortController),window.addEventListener("pointerdown",Ec(this,Ca,ba).bind(this),{signal:Bc(this,pa).combinedSignal(Bc(this,ga))})),Bc(this,Aa))return void Bc(this,Aa).classList.remove("hidden");const t=bc(this,Aa,Ec(this,Ca,Ia).call(this));Bc(this,aa).append(t)},ba=function(e){var t;(null==(t=Bc(this,Aa))?void 0:t.contains(e.target))||this.hideDropdown()},Ea=function(){return Bc(this,Aa)&&!Bc(this,Aa).classList.contains("hidden")},yc(JGe,ma,null);let zGe=JGe;const XGe=class e extends XHe{constructor(t){super({...t,name:"highlightEditor"}),yc(this,Ka),yc(this,wa,null),yc(this,Qa,0),yc(this,_a),yc(this,Sa,null),yc(this,xa,null),yc(this,ka,null),yc(this,Da,null),yc(this,Fa,0),yc(this,Ta,null),yc(this,Ma,null),yc(this,Ra,null),yc(this,Na,!1),yc(this,La,null),yc(this,Ua),yc(this,Ha,null),yc(this,Pa,""),yc(this,Oa),yc(this,Ga,""),this.color=t.color||e._defaultColor,bc(this,Oa,t.thickness||e._defaultThickness),bc(this,Ua,t.opacity||e._defaultOpacity),bc(this,_a,t.boxes||null),bc(this,Ga,t.methodOfCreation||""),bc(this,Pa,t.text||""),this._isDraggable=!1,t.highlightId>-1?(bc(this,Na,!0),Ec(this,Ka,Ya).call(this,t),Ec(this,Ka,za).call(this)):Bc(this,_a)&&(bc(this,wa,t.anchorNode),bc(this,Qa,t.anchorOffset),bc(this,Da,t.focusNode),bc(this,Fa,t.focusOffset),Ec(this,Ka,qa).call(this),Ec(this,Ka,za).call(this),this.rotate(this.rotation))}static get _keyboardManager(){const t=e.prototype;return OUe(this,"_keyboardManager",new KHe([[["ArrowLeft","mac+ArrowLeft"],t._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],t._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],t._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],t._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:Bc(this,Na)?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:Bc(this,Oa),methodOfCreation:Bc(this,Ga)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("color").size}}static initialize(t,i){var n;XHe.initialize(t,i),e._defaultColor||(e._defaultColor=(null==(n=i.highlightColors)?void 0:n.values().next().value)||"#fff066")}static updateDefaultParams(t,i){switch(t){case ZLe.HIGHLIGHT_DEFAULT_COLOR:e._defaultColor=i;break;case ZLe.HIGHLIGHT_THICKNESS:e._defaultThickness=i}}translateInPage(e,t){}get toolbarPosition(){return Bc(this,La)}updateParams(e,t){switch(e){case ZLe.HIGHLIGHT_COLOR:Ec(this,Ka,Va).call(this,t);break;case ZLe.HIGHLIGHT_THICKNESS:Ec(this,Ka,Wa).call(this,t)}}static get defaultPropertiesToUpdate(){return[[ZLe.HIGHLIGHT_DEFAULT_COLOR,e._defaultColor],[ZLe.HIGHLIGHT_THICKNESS,e._defaultThickness]]}get propertiesToUpdate(){return[[ZLe.HIGHLIGHT_COLOR,this.color||e._defaultColor],[ZLe.HIGHLIGHT_THICKNESS,Bc(this,Oa)||e._defaultThickness],[ZLe.HIGHLIGHT_FREE,Bc(this,Na)]]}async addEditToolbar(){const e=await super.addEditToolbar();return e?(this._uiManager.highlightColors&&(bc(this,xa,new zGe({editor:this})),e.addColorPicker(Bc(this,xa))),e):null}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(Ec(this,Ka,to).call(this))}getBaseTranslation(){return[0,0]}getRect(e,t){return super.getRect(e,t,Ec(this,Ka,to).call(this))}onceAdded(){this.annotationElementId||this.parent.addUndoableEditor(this),this.div.focus()}remove(){Ec(this,Ka,Ja).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(Ec(this,Ka,za).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){var t;let i=!1;this.parent&&!e?Ec(this,Ka,Ja).call(this):e&&(Ec(this,Ka,za).call(this,e),i=!this.parent&&(null==(t=this.div)?void 0:t.classList.contains("selectedEditor"))),super.setParent(e),this.show(this._isVisible),i&&this.select()}rotate(t){var i,n,s;const{drawLayer:r}=this.parent;let a;Bc(this,Na)?(t=(t-this.rotation+360)%360,a=Ec(i=e,Xa,$a).call(i,Bc(this,Ma).box,t)):a=Ec(n=e,Xa,$a).call(n,this,t),r.rotate(Bc(this,Ra),t),r.rotate(Bc(this,Ha),t),r.updateBox(Bc(this,Ra),a),r.updateBox(Bc(this,Ha),Ec(s=e,Xa,$a).call(s,Bc(this,ka).box,t))}render(){if(this.div)return this.div;const e=super.render();Bc(this,Pa)&&(e.setAttribute("aria-label",Bc(this,Pa)),e.setAttribute("role","mark")),Bc(this,Na)?e.classList.add("free"):this.div.addEventListener("keydown",Ec(this,Ka,Za).bind(this),{signal:this._uiManager._signal});const t=bc(this,Ta,document.createElement("div"));e.append(t),t.setAttribute("aria-hidden","true"),t.className="internal",t.style.clipPath=Bc(this,Sa);const[i,n]=this.parentDimensions;return this.setDims(this.width*i,this.height*n),UHe(this,Bc(this,Ta),["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){this.isSelected||this.parent.drawLayer.addClass(Bc(this,Ha),"hovered")}pointerleave(){this.isSelected||this.parent.drawLayer.removeClass(Bc(this,Ha),"hovered")}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:Ec(this,Ka,eo).call(this,!0);break;case 1:case 3:Ec(this,Ka,eo).call(this,!1)}}select(){var e,t;super.select(),Bc(this,Ha)&&(null==(e=this.parent)||e.drawLayer.removeClass(Bc(this,Ha),"hovered"),null==(t=this.parent)||t.drawLayer.addClass(Bc(this,Ha),"selected"))}unselect(){var e;super.unselect(),Bc(this,Ha)&&(null==(e=this.parent)||e.drawLayer.removeClass(Bc(this,Ha),"selected"),Bc(this,Na)||Ec(this,Ka,eo).call(this,!1))}get _mustFixPosition(){return!Bc(this,Na)}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.show(Bc(this,Ra),e),this.parent.drawLayer.show(Bc(this,Ha),e))}static startHighlighting(e,t,{target:i,x:n,y:s}){const{x:r,y:a,width:o,height:l}=i.getBoundingClientRect(),A=new AbortController,c=e.combinedSignal(A),u=t=>{A.abort(),Ec(this,Xa,ro).call(this,e,t)};window.addEventListener("blur",u,{signal:c}),window.addEventListener("pointerup",u,{signal:c}),window.addEventListener("pointerdown",(e=>{e.preventDefault(),e.stopPropagation()}),{capture:!0,passive:!1,signal:c}),window.addEventListener("contextmenu",_He,{signal:c}),i.addEventListener("pointermove",Ec(this,Xa,so).bind(this,e),{signal:c}),this._freeHighlight=new WGe({x:n,y:s},[r,a,o,l],e.scale,this._defaultThickness/2,t,.001),({id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.draw(this._freeHighlight,this._defaultColor,this._defaultOpacity,!0))}static async deserialize(e,t,i){var n,s,r,a;let o=null;if(e instanceof DGe){const{data:{quadPoints:t,rect:i,rotation:n,id:s,color:r,opacity:a,popupRef:l},parent:{page:{pageNumber:A}}}=e;o=e={annotationType:$Le.HIGHLIGHT,color:Array.from(r),opacity:a,quadPoints:t,boxes:null,pageIndex:A-1,rect:i.slice(0),rotation:n,id:s,deleted:!1,popupRef:l}}else if(e instanceof kGe){const{data:{inkLists:t,rect:i,rotation:n,id:s,color:r,borderStyle:{rawWidth:a},popupRef:l},parent:{page:{pageNumber:A}}}=e;o=e={annotationType:$Le.HIGHLIGHT,color:Array.from(r),thickness:a,inkLists:t,boxes:null,pageIndex:A-1,rect:i.slice(0),rotation:n,id:s,deleted:!1,popupRef:l}}const{color:l,quadPoints:A,inkLists:c,opacity:u}=e,h=await super.deserialize(e,t,i);h.color=tHe.makeHexColor(...l),bc(h,Ua,u||1),c&&bc(h,Oa,e.thickness),h.annotationElementId=e.id||null,h._initialData=o;const[d,g]=h.pageDimensions,[p,f]=h.pageTranslation;if(A){const e=bc(h,_a,[]);for(let t=0;t<A.length;t+=8)e.push({x:(A[t]-p)/d,y:1-(A[t+1]-f)/g,width:(A[t+2]-A[t])/d,height:(A[t+1]-A[t+5])/g});Ec(n=h,Ka,qa).call(n),Ec(s=h,Ka,za).call(s),h.rotate(h.rotation)}else if(c){bc(h,Na,!0);const e=c[0],i={x:e[0]-p,y:g-(e[1]-f)},n=new WGe(i,[0,0,d,g],1,Bc(h,Oa)/2,!0,.001);for(let t=0,r=e.length;t<r;t+=2)i.x=e[t]-p,i.y=g-(e[t+1]-f),n.add(i);const{id:s,clipPathId:o}=t.drawLayer.draw(n,h.color,h._defaultOpacity,!0);Ec(r=h,Ka,Ya).call(r,{highlightOutlines:n.getOutlines(),highlightId:s,clipPathId:o}),Ec(a=h,Ka,za).call(a)}return h}serialize(e=!1){if(this.isEmpty()||e)return null;if(this.deleted)return this.serializeDeleted();const t=this.getRect(0,0),i=XHe._colorManager.convert(this.color),n={annotationType:$Le.HIGHLIGHT,color:i,opacity:Bc(this,Ua),thickness:Bc(this,Oa),quadPoints:Ec(this,Ka,io).call(this),outlines:Ec(this,Ka,no).call(this,t),pageIndex:this.pageIndex,rect:t,rotation:Ec(this,Ka,to).call(this),structTreeParentId:this._structTreeParentId};return this.annotationElementId&&!Ec(this,Ka,ao).call(this,n)?null:(n.id=this.annotationElementId,n)}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}};wa=new WeakMap,Qa=new WeakMap,_a=new WeakMap,Sa=new WeakMap,xa=new WeakMap,ka=new WeakMap,Da=new WeakMap,Fa=new WeakMap,Ta=new WeakMap,Ma=new WeakMap,Ra=new WeakMap,Na=new WeakMap,La=new WeakMap,Ua=new WeakMap,Ha=new WeakMap,Pa=new WeakMap,Oa=new WeakMap,Ga=new WeakMap,Ka=new WeakSet,qa=function(){const e=new YGe(Bc(this,_a),.001);bc(this,Ma,e.getOutlines()),({x:this.x,y:this.y,width:this.width,height:this.height}=Bc(this,Ma).box);const t=new YGe(Bc(this,_a),.0025,.001,"ltr"===this._uiManager.direction);bc(this,ka,t.getOutlines());const{lastPoint:i}=Bc(this,ka).box;bc(this,La,[(i[0]-this.x)/this.width,(i[1]-this.y)/this.height])},Ya=function({highlightOutlines:e,highlightId:t,clipPathId:i}){var n,s;bc(this,Ma,e);if(bc(this,ka,e.getNewOutline(Bc(this,Oa)/2+1.5,.0025)),t>=0)bc(this,Ra,t),bc(this,Sa,i),this.parent.drawLayer.finalizeLine(t,e),bc(this,Ha,this.parent.drawLayer.drawOutline(Bc(this,ka)));else if(this.parent){const t=this.parent.viewport.rotation;this.parent.drawLayer.updateLine(Bc(this,Ra),e),this.parent.drawLayer.updateBox(Bc(this,Ra),Ec(n=XGe,Xa,$a).call(n,Bc(this,Ma).box,(t-this.rotation+360)%360)),this.parent.drawLayer.updateLine(Bc(this,Ha),Bc(this,ka)),this.parent.drawLayer.updateBox(Bc(this,Ha),Ec(s=XGe,Xa,$a).call(s,Bc(this,ka).box,t))}const{x:r,y:a,width:o,height:l}=e.box;switch(this.rotation){case 0:this.x=r,this.y=a,this.width=o,this.height=l;break;case 90:{const[e,t]=this.parentDimensions;this.x=a,this.y=1-r,this.width=o*t/e,this.height=l*e/t;break}case 180:this.x=1-r,this.y=1-a,this.width=o,this.height=l;break;case 270:{const[e,t]=this.parentDimensions;this.x=1-a,this.y=r,this.width=o*t/e,this.height=l*e/t;break}}const{lastPoint:A}=Bc(this,ka).box;bc(this,La,[(A[0]-r)/o,(A[1]-a)/l])},Va=function(e){const t=(e,t)=>{var i,n,s;this.color=e,null==(i=this.parent)||i.drawLayer.changeColor(Bc(this,Ra),e),null==(n=Bc(this,xa))||n.updateColor(e),bc(this,Ua,t),null==(s=this.parent)||s.drawLayer.changeOpacity(Bc(this,Ra),t)},i=this.color,n=Bc(this,Ua);this.addCommands({cmd:t.bind(this,e,XGe._defaultOpacity),undo:t.bind(this,i,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ZLe.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(e)},!0)},Wa=function(e){const t=Bc(this,Oa),i=e=>{bc(this,Oa,e),Ec(this,Ka,ja).call(this,e)};this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,t),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ZLe.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)},ja=function(e){if(!Bc(this,Na))return;Ec(this,Ka,Ya).call(this,{highlightOutlines:Bc(this,Ma).getNewOutline(e/2)}),this.fixAndSetPosition();const[t,i]=this.parentDimensions;this.setDims(this.width*t,this.height*i)},Ja=function(){null!==Bc(this,Ra)&&this.parent&&(this.parent.drawLayer.remove(Bc(this,Ra)),bc(this,Ra,null),this.parent.drawLayer.remove(Bc(this,Ha)),bc(this,Ha,null))},za=function(e=this.parent){null===Bc(this,Ra)&&(({id:wc(this,Ra)._,clipPathId:wc(this,Sa)._}=e.drawLayer.draw(Bc(this,Ma),this.color,Bc(this,Ua))),bc(this,Ha,e.drawLayer.drawOutline(Bc(this,ka))),Bc(this,Ta)&&(Bc(this,Ta).style.clipPath=Bc(this,Sa)))},Xa=new WeakSet,$a=function({x:e,y:t,width:i,height:n},s){switch(s){case 90:return{x:1-t-n,y:e,width:n,height:i};case 180:return{x:1-e-i,y:1-t-n,width:i,height:n};case 270:return{x:t,y:1-e-i,width:n,height:i}}return{x:e,y:t,width:i,height:n}},Za=function(e){XGe._keyboardManager.exec(this,e)},eo=function(e){if(!Bc(this,wa))return;const t=window.getSelection();e?t.setPosition(Bc(this,wa),Bc(this,Qa)):t.setPosition(Bc(this,Da),Bc(this,Fa))},to=function(){return Bc(this,Na)?this.rotation:0},io=function(){if(Bc(this,Na))return null;const[e,t]=this.pageDimensions,[i,n]=this.pageTranslation,s=Bc(this,_a),r=new Float32Array(8*s.length);let a=0;for(const{x:o,y:l,width:A,height:c}of s){const s=o*e+i,u=(1-l-c)*t+n;r[a]=r[a+4]=s,r[a+1]=r[a+3]=u,r[a+2]=r[a+6]=s+A*e,r[a+5]=r[a+7]=u+c*t,a+=8}return r},no=function(e){return Bc(this,Ma).serialize(e,Ec(this,Ka,to).call(this))},so=function(e,t){this._freeHighlight.add(t)&&e.drawLayer.updatePath(this._freeHighlightId,this._freeHighlight)},ro=function(e,t){this._freeHighlight.isEmpty()?e.drawLayer.remove(this._freeHighlightId):e.createAndAddNewEditor(t,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""},ao=function(e){const{color:t}=this._initialData;return e.color.some(((e,i)=>e!==t[i]))},yc(XGe,Xa),Ic(XGe,"_defaultColor",null),Ic(XGe,"_defaultOpacity",1),Ic(XGe,"_defaultThickness",12),Ic(XGe,"_type","highlight"),Ic(XGe,"_editorType",$Le.HIGHLIGHT),Ic(XGe,"_freeHighlightId",-1),Ic(XGe,"_freeHighlight",null),Ic(XGe,"_freeHighlightClipId","");let $Ge=XGe;const ZGe=class e extends XHe{constructor(e){super({...e,name:"inkEditor"}),yc(this,Bo),yc(this,oo,0),yc(this,lo,0),yc(this,Ao,null),yc(this,co,new Path2D),yc(this,uo,!1),yc(this,ho,null),yc(this,go,!1),yc(this,po,!1),yc(this,fo,null),yc(this,mo,null),yc(this,Co,0),yc(this,Io,0),yc(this,vo,null),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(e,t){XHe.initialize(e,t)}static updateDefaultParams(t,i){switch(t){case ZLe.INK_THICKNESS:e._defaultThickness=i;break;case ZLe.INK_COLOR:e._defaultColor=i;break;case ZLe.INK_OPACITY:e._defaultOpacity=i/100}}updateParams(e,t){switch(e){case ZLe.INK_THICKNESS:Ec(this,Bo,yo).call(this,t);break;case ZLe.INK_COLOR:Ec(this,Bo,bo).call(this,t);break;case ZLe.INK_OPACITY:Ec(this,Bo,Eo).call(this,t)}}static get defaultPropertiesToUpdate(){return[[ZLe.INK_THICKNESS,e._defaultThickness],[ZLe.INK_COLOR,e._defaultColor||XHe._defaultLineColor],[ZLe.INK_OPACITY,Math.round(100*e._defaultOpacity)]]}get propertiesToUpdate(){return[[ZLe.INK_THICKNESS,this.thickness||e._defaultThickness],[ZLe.INK_COLOR,this.color||e._defaultColor||XHe._defaultLineColor],[ZLe.INK_OPACITY,Math.round(100*(this.opacity??e._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.canvas||(Ec(this,Bo,Uo).call(this),Ec(this,Bo,Ho).call(this)),this.isAttachedToDOM||(this.parent.add(this),Ec(this,Bo,Po).call(this)),Ec(this,Bo,zo).call(this)))}remove(){var e;null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,Bc(this,Ao)&&(clearTimeout(Bc(this,Ao)),bc(this,Ao,null)),null==(e=Bc(this,fo))||e.disconnect(),bc(this,fo,null),super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){const[e,t]=this.parentDimensions,i=this.width*e,n=this.height*t;this.setDimensions(i,n)}enableEditMode(){Bc(this,uo)||null===this.canvas||(super.enableEditMode(),this._isDraggable=!1,Ec(this,Bo,Ro).call(this))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),Ec(this,Bo,No).call(this))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}commit(){Bc(this,uo)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),bc(this,uo,!0),this.div.classList.add("disabled"),Ec(this,Bo,zo).call(this,!0),this.select(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),this.enableEditMode())}canvasPointerdown(e){0===e.button&&this.isInEditMode()&&!Bc(this,uo)&&(this.setInForeground(),e.preventDefault(),this.div.contains(document.activeElement)||this.div.focus({preventScroll:!0}),Ec(this,Bo,_o).call(this,e.offsetX,e.offsetY))}canvasPointermove(e){e.preventDefault(),Ec(this,Bo,So).call(this,e.offsetX,e.offsetY)}canvasPointerup(e){e.preventDefault(),Ec(this,Bo,Lo).call(this,e)}canvasPointerleave(e){Ec(this,Bo,Lo).call(this,e)}get isResizable(){return!this.isEmpty()&&Bc(this,uo)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.div.setAttribute("data-l10n-id","pdfjs-ink");const[i,n,s,r]=Ec(this,Bo,wo).call(this);if(this.setAt(i,n,0,0),this.setDims(s,r),Ec(this,Bo,Uo).call(this),this.width){const[i,n]=this.parentDimensions;this.setAspectRatio(this.width*i,this.height*n),this.setAt(e*i,t*n,this.width*i,this.height*n),bc(this,po,!0),Ec(this,Bo,Po).call(this),this.setDims(this.width*i,this.height*n),Ec(this,Bo,Mo).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return Ec(this,Bo,Ho).call(this),this.div}setDimensions(e,t){const i=Math.round(e),n=Math.round(t);if(Bc(this,Co)===i&&Bc(this,Io)===n)return;bc(this,Co,i),bc(this,Io,n),this.canvas.style.visibility="hidden";const[s,r]=this.parentDimensions;this.width=e/s,this.height=t/r,this.fixAndSetPosition(),Bc(this,uo)&&Ec(this,Bo,Oo).call(this,e,t),Ec(this,Bo,Po).call(this),Ec(this,Bo,Mo).call(this),this.canvas.style.visibility="visible",this.fixDims()}static async deserialize(t,i,n){var s,r,a;if(t instanceof kGe)return null;const o=await super.deserialize(t,i,n);o.thickness=t.thickness,o.color=tHe.makeHexColor(...t.color),o.opacity=t.opacity;const[l,A]=o.pageDimensions,c=o.width*l,u=o.height*A,h=o.parentScale,d=t.thickness/2;bc(o,uo,!0),bc(o,Co,Math.round(c)),bc(o,Io,Math.round(u));const{paths:g,rect:p,rotation:f}=t;for(let{bezier:C}of g){C=Ec(s=e,Ko,Vo).call(s,C,p,f);const t=[];o.paths.push(t);let i=h*(C[0]-d),n=h*(C[1]-d);for(let e=2,s=C.length;e<s;e+=6){const s=h*(C[e]-d),r=h*(C[e+1]-d),a=h*(C[e+2]-d),o=h*(C[e+3]-d),l=h*(C[e+4]-d),A=h*(C[e+5]-d);t.push([[i,n],[s,r],[a,o],[l,A]]),i=l,n=A}const r=Ec(this,Ko,qo).call(this,t);o.bezierPath2D.push(r)}const m=Ec(r=o,Bo,jo).call(r);return bc(o,lo,Math.max(XHe.MIN_SIZE,m[2]-m[0])),bc(o,oo,Math.max(XHe.MIN_SIZE,m[3]-m[1])),Ec(a=o,Bo,Oo).call(a,c,u),o}serialize(){if(this.isEmpty())return null;const e=this.getRect(0,0),t=XHe._colorManager.convert(this.ctx.strokeStyle);return{annotationType:$Le.INK,color:t,thickness:this.thickness,opacity:this.opacity,paths:Ec(this,Bo,Wo).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,e),pageIndex:this.pageIndex,rect:e,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}};oo=new WeakMap,lo=new WeakMap,Ao=new WeakMap,co=new WeakMap,uo=new WeakMap,ho=new WeakMap,go=new WeakMap,po=new WeakMap,fo=new WeakMap,mo=new WeakMap,Co=new WeakMap,Io=new WeakMap,vo=new WeakMap,Bo=new WeakSet,yo=function(e){const t=e=>{this.thickness=e,Ec(this,Bo,zo).call(this)},i=this.thickness;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ZLe.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},bo=function(e){const t=e=>{this.color=e,Ec(this,Bo,Mo).call(this)},i=this.color;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ZLe.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},Eo=function(e){const t=e=>{this.opacity=e,Ec(this,Bo,Mo).call(this)};e/=100;const i=this.opacity;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ZLe.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},wo=function(){const{parentRotation:e,parentDimensions:[t,i]}=this;switch(e){case 90:return[0,i,i,t];case 180:return[t,i,t,i];case 270:return[t,0,i,t];default:return[0,0,t,i]}},Qo=function(){const{ctx:e,color:t,opacity:i,thickness:n,parentScale:s,scaleFactor:r}=this;e.lineWidth=n*s/r,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle=`${t}${function(e){return Math.round(Math.min(255,Math.max(1,255*e))).toString(16).padStart(2,"0")}(i)}`},_o=function(e,t){this.canvas.addEventListener("contextmenu",_He,{signal:this._uiManager._signal}),Ec(this,Bo,No).call(this),bc(this,ho,new AbortController);const i=this._uiManager.combinedSignal(Bc(this,ho));this.canvas.addEventListener("pointerleave",this.canvasPointerleave.bind(this),{signal:i}),this.canvas.addEventListener("pointermove",this.canvasPointermove.bind(this),{signal:i}),this.canvas.addEventListener("pointerup",this.canvasPointerup.bind(this),{signal:i}),this.isEditing=!0,Bc(this,po)||(bc(this,po,!0),Ec(this,Bo,Po).call(this),this.thickness||(this.thickness=ZGe._defaultThickness),this.color||(this.color=ZGe._defaultColor||XHe._defaultLineColor),this.opacity??(this.opacity=ZGe._defaultOpacity)),this.currentPath.push([e,t]),bc(this,go,!1),Ec(this,Bo,Qo).call(this),bc(this,vo,(()=>{Ec(this,Bo,Do).call(this),Bc(this,vo)&&window.requestAnimationFrame(Bc(this,vo))})),window.requestAnimationFrame(Bc(this,vo))},So=function(e,t){const[i,n]=this.currentPath.at(-1);if(this.currentPath.length>1&&e===i&&t===n)return;const s=this.currentPath;let r=Bc(this,co);if(s.push([e,t]),bc(this,go,!0),s.length<=2)return r.moveTo(...s[0]),void r.lineTo(e,t);3===s.length&&(bc(this,co,r=new Path2D),r.moveTo(...s[0])),Ec(this,Bo,Fo).call(this,r,...s.at(-3),...s.at(-2),e,t)},xo=function(){if(0===this.currentPath.length)return;const e=this.currentPath.at(-1);Bc(this,co).lineTo(...e)},ko=function(e,t){let i;if(bc(this,vo,null),e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height),Ec(this,Bo,So).call(this,e,t),Ec(this,Bo,xo).call(this),1!==this.currentPath.length)i=Ec(this,Bo,To).call(this);else{const n=[e,t];i=[[n,n.slice(),n.slice(),n]]}const n=Bc(this,co),s=this.currentPath;this.currentPath=[],bc(this,co,new Path2D);this.addCommands({cmd:()=>{this.allRawPaths.push(s),this.paths.push(i),this.bezierPath2D.push(n),this._uiManager.rebuild(this)},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(Ec(this,Bo,Uo).call(this),Ec(this,Bo,Ho).call(this)),Ec(this,Bo,zo).call(this))},mustExec:!0})},Do=function(){if(!Bc(this,go))return;bc(this,go,!1);Math.ceil(this.thickness*this.parentScale);const e=this.currentPath.slice(-3),t=e.map((e=>e[0])),i=e.map((e=>e[1]));Math.min(...t),Math.max(...t),Math.min(...i),Math.max(...i);const{ctx:n}=this;n.save(),n.clearRect(0,0,this.canvas.width,this.canvas.height);for(const s of this.bezierPath2D)n.stroke(s);n.stroke(Bc(this,co)),n.restore()},Fo=function(e,t,i,n,s,r,a){const o=(t+n)/2,l=(i+s)/2,A=(n+r)/2,c=(s+a)/2;e.bezierCurveTo(o+2*(n-o)/3,l+2*(s-l)/3,A+2*(n-A)/3,c+2*(s-c)/3,A,c)},To=function(){const e=this.currentPath;if(e.length<=2)return[[e[0],e[0],e.at(-1),e.at(-1)]];const t=[];let i,[n,s]=e[0];for(i=1;i<e.length-2;i++){const[r,a]=e[i],[o,l]=e[i+1],A=(r+o)/2,c=(a+l)/2,u=[n+2*(r-n)/3,s+2*(a-s)/3],h=[A+2*(r-A)/3,c+2*(a-c)/3];t.push([[n,s],u,h,[A,c]]),[n,s]=[A,c]}const[r,a]=e[i],[o,l]=e[i+1],A=[n+2*(r-n)/3,s+2*(a-s)/3],c=[o+2*(r-o)/3,l+2*(a-l)/3];return t.push([[n,s],A,c,[o,l]]),t},Mo=function(){if(this.isEmpty())return void Ec(this,Bo,Go).call(this);Ec(this,Bo,Qo).call(this);const{canvas:e,ctx:t}=this;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),Ec(this,Bo,Go).call(this);for(const i of this.bezierPath2D)t.stroke(i)},Ro=function(){if(Bc(this,mo))return;bc(this,mo,new AbortController);const e=this._uiManager.combinedSignal(Bc(this,mo));this.canvas.addEventListener("pointerdown",this.canvasPointerdown.bind(this),{signal:e})},No=function(){var e;null==(e=this.pointerdownAC)||e.abort(),this.pointerdownAC=null},Lo=function(e){var t;null==(t=Bc(this,ho))||t.abort(),bc(this,ho,null),Ec(this,Bo,Ro).call(this),Bc(this,Ao)&&clearTimeout(Bc(this,Ao)),bc(this,Ao,setTimeout((()=>{bc(this,Ao,null),this.canvas.removeEventListener("contextmenu",_He)}),10)),Ec(this,Bo,ko).call(this,e.offsetX,e.offsetY),this.addToAnnotationStorage(),this.setInBackground()},Uo=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",this.canvas.setAttribute("data-l10n-id","pdfjs-ink-canvas"),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},Ho=function(){bc(this,fo,new ResizeObserver((e=>{const t=e[0].contentRect;t.width&&t.height&&this.setDimensions(t.width,t.height)}))),Bc(this,fo).observe(this.div),this._uiManager._signal.addEventListener("abort",(()=>{var e;null==(e=Bc(this,fo))||e.disconnect(),bc(this,fo,null)}),{once:!0})},Po=function(){if(!Bc(this,po))return;const[e,t]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),Ec(this,Bo,Go).call(this)},Oo=function(e,t){const i=Ec(this,Bo,Jo).call(this),n=(e-i)/Bc(this,lo),s=(t-i)/Bc(this,oo);this.scaleFactor=Math.min(n,s)},Go=function(){const e=Ec(this,Bo,Jo).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)},Ko=new WeakSet,qo=function(e){const t=new Path2D;for(let i=0,n=e.length;i<n;i++){const[n,s,r,a]=e[i];0===i&&t.moveTo(...n),t.bezierCurveTo(s[0],s[1],r[0],r[1],a[0],a[1])}return t},Yo=function(e,t,i){const[n,s,r,a]=t;switch(i){case 0:for(let t=0,i=e.length;t<i;t+=2)e[t]+=n,e[t+1]=a-e[t+1];break;case 90:for(let t=0,i=e.length;t<i;t+=2){const i=e[t];e[t]=e[t+1]+n,e[t+1]=i+s}break;case 180:for(let t=0,i=e.length;t<i;t+=2)e[t]=r-e[t],e[t+1]+=s;break;case 270:for(let t=0,i=e.length;t<i;t+=2){const i=e[t];e[t]=r-e[t+1],e[t+1]=a-i}break;default:throw new Error("Invalid rotation")}return e},Vo=function(e,t,i){const[n,s,r,a]=t;switch(i){case 0:for(let t=0,i=e.length;t<i;t+=2)e[t]-=n,e[t+1]=a-e[t+1];break;case 90:for(let t=0,i=e.length;t<i;t+=2){const i=e[t];e[t]=e[t+1]-s,e[t+1]=i-n}break;case 180:for(let t=0,i=e.length;t<i;t+=2)e[t]=r-e[t],e[t+1]-=s;break;case 270:for(let t=0,i=e.length;t<i;t+=2){const i=e[t];e[t]=a-e[t+1],e[t+1]=r-i}break;default:throw new Error("Invalid rotation")}return e},Wo=function(e,t,i,n){var s,r;const a=[],o=this.thickness/2,l=e*t+o,A=e*i+o;for(const c of this.paths){const t=[],i=[];for(let n=0,s=c.length;n<s;n++){const[r,a,o,u]=c[n];if(r[0]===u[0]&&r[1]===u[1]&&1===s){const n=e*r[0]+l,s=e*r[1]+A;t.push(n,s),i.push(n,s);break}const h=e*r[0]+l,d=e*r[1]+A,g=e*a[0]+l,p=e*a[1]+A,f=e*o[0]+l,m=e*o[1]+A,C=e*u[0]+l,I=e*u[1]+A;0===n&&(t.push(h,d),i.push(h,d)),t.push(g,p,f,m,C,I),i.push(g,p),n===s-1&&i.push(C,I)}a.push({bezier:Ec(s=ZGe,Ko,Yo).call(s,t,n,this.rotation),points:Ec(r=ZGe,Ko,Yo).call(r,i,n,this.rotation)})}return a},jo=function(){let e=1/0,t=-1/0,i=1/0,n=-1/0;for(const s of this.paths)for(const[r,a,o,l]of s){const s=tHe.bezierBoundingBox(...r,...a,...o,...l);e=Math.min(e,s[0]),i=Math.min(i,s[1]),t=Math.max(t,s[2]),n=Math.max(n,s[3])}return[e,i,t,n]},Jo=function(){return Bc(this,uo)?Math.ceil(this.thickness*this.parentScale):0},zo=function(e=!1){if(this.isEmpty())return;if(!Bc(this,uo))return void Ec(this,Bo,Mo).call(this);const t=Ec(this,Bo,jo).call(this),i=Ec(this,Bo,Jo).call(this);bc(this,lo,Math.max(XHe.MIN_SIZE,t[2]-t[0])),bc(this,oo,Math.max(XHe.MIN_SIZE,t[3]-t[1]));const n=Math.ceil(i+Bc(this,lo)*this.scaleFactor),s=Math.ceil(i+Bc(this,oo)*this.scaleFactor),[r,a]=this.parentDimensions;this.width=n/r,this.height=s/a,this.setAspectRatio(n,s);const o=this.translationX,l=this.translationY;this.translationX=-t[0],this.translationY=-t[1],Ec(this,Bo,Po).call(this),Ec(this,Bo,Mo).call(this),bc(this,Co,n),bc(this,Io,s),this.setDims(n,s);const A=e?i/this.scaleFactor/2:0;this.translate(o-this.translationX-A,l-this.translationY-A)},yc(ZGe,Ko),Ic(ZGe,"_defaultColor",null),Ic(ZGe,"_defaultOpacity",1),Ic(ZGe,"_defaultThickness",1),Ic(ZGe,"_type","ink"),Ic(ZGe,"_editorType",$Le.INK);let eKe=ZGe;const tKe=class extends XHe{constructor(e){super({...e,name:"stampEditor"}),yc(this,ll),yc(this,Xo,null),yc(this,$o,null),yc(this,Zo,null),yc(this,el,null),yc(this,tl,null),yc(this,il,""),yc(this,nl,null),yc(this,sl,null),yc(this,rl,null),yc(this,al,!1),yc(this,ol,!1),bc(this,el,e.bitmapUrl),bc(this,tl,e.bitmapFile)}static initialize(e,t){XHe.initialize(e,t)}static get supportedTypes(){return OUe(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((e=>`image/${e}`)))}static get supportedTypesStr(){return OUe(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,t){t.pasteEditor($Le.STAMP,{bitmapFile:e.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){var e;return{type:"stamp",hasAltText:!!(null==(e=this.altTextData)?void 0:e.altText)}}static computeTelemetryFinalData(e){const t=e.get("hasAltText");return{hasAltText:t.get(!0)??0,hasNoAltText:t.get(!1)??0}}async mlGuessAltText(e=null,t=!0){if(this.hasAltTextData())return null;const{mlManager:i}=this._uiManager;if(!i)throw new Error("No ML.");if(!(await i.isEnabledFor("altText")))throw new Error("ML isn't enabled for alt text.");const{data:n,width:s,height:r}=e||this.copyCanvas(null,null,!0).imageData,a=await i.guess({name:"altText",request:{data:n,width:s,height:r,channels:n.length/(s*r)}});if(!a)throw new Error("No response from the AI service.");if(a.error)throw new Error("Error from the AI service.");if(a.cancel)return null;if(!a.output)throw new Error("No valid response from the AI service.");const o=a.output;return await this.setGuessedAltText(o),t&&!this.hasAltTextData()&&(this.altTextData={alt:o,decorative:!1}),o}remove(){var e,t;Bc(this,$o)&&(bc(this,Xo,null),this._uiManager.imageManager.deleteId(Bc(this,$o)),null==(e=Bc(this,nl))||e.remove(),bc(this,nl,null),null==(t=Bc(this,sl))||t.disconnect(),bc(this,sl,null),Bc(this,rl)&&(clearTimeout(Bc(this,rl)),bc(this,rl,null))),super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(Bc(this,$o)&&null===Bc(this,nl)&&Ec(this,ll,ul).call(this),this.isAttachedToDOM||this.parent.add(this))):Bc(this,$o)&&Ec(this,ll,ul).call(this)}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(Bc(this,Zo)||Bc(this,Xo)||Bc(this,el)||Bc(this,tl)||Bc(this,$o))}get isResizable(){return!0}render(){if(this.div)return this.div;let e,t;if(this.width&&(e=this.x,t=this.y),super.render(),this.div.hidden=!0,this.div.setAttribute("role","figure"),this.addAltTextButton(),Bc(this,Xo)?Ec(this,ll,hl).call(this):Ec(this,ll,ul).call(this),this.width&&!this.annotationElementId){const[i,n]=this.parentDimensions;this.setAt(e*i,t*n,this.width*i,this.height*n)}return this.div}copyCanvas(e,t,i=!1){var n;e||(e=224);const{width:s,height:r}=Bc(this,Xo),a=new MHe;let o=Bc(this,Xo),l=s,A=r,c=null;if(t){if(s>t||r>t){const e=Math.min(t/s,t/r);l=Math.floor(s*e),A=Math.floor(r*e)}c=document.createElement("canvas");const e=c.width=Math.ceil(l*a.sx),i=c.height=Math.ceil(A*a.sy);Bc(this,al)||(o=Ec(this,ll,gl).call(this,e,i));const u=c.getContext("2d");u.filter=this._uiManager.hcmFilter;let h="white",d="#cfcfd8";"none"!==this._uiManager.hcmFilter?d="black":(null==(n=window.matchMedia)?void 0:n.call(window,"(prefers-color-scheme: dark)").matches)&&(h="#8f8f9d",d="#42414d");const g=15,p=g*a.sx,f=g*a.sy,m=new OffscreenCanvas(2*p,2*f),C=m.getContext("2d");C.fillStyle=h,C.fillRect(0,0,2*p,2*f),C.fillStyle=d,C.fillRect(0,0,p,f),C.fillRect(p,f,p,f),u.fillStyle=u.createPattern(m,"repeat"),u.fillRect(0,0,e,i),u.drawImage(o,0,0,o.width,o.height,0,0,e,i)}let u=null;if(i){let t,i;if(a.symmetric&&o.width<e&&o.height<e)t=o.width,i=o.height;else if(o=Bc(this,Xo),s>e||r>e){const n=Math.min(e/s,e/r);t=Math.floor(s*n),i=Math.floor(r*n),Bc(this,al)||(o=Ec(this,ll,gl).call(this,t,i))}const n=new OffscreenCanvas(t,i).getContext("2d",{willReadFrequently:!0});n.drawImage(o,0,0,o.width,o.height,0,0,t,i),u={width:t,height:i,data:n.getImageData(0,0,t,i).data}}return{canvas:c,width:l,height:A,imageData:u}}getImageForAltText(){return Bc(this,nl)}static async deserialize(e,t,i){var n;let s=null;if(e instanceof RGe){const{data:{rect:r,rotation:a,id:o,structParent:l,popupRef:A},container:c,parent:{page:{pageNumber:u}}}=e,h=c.querySelector("canvas"),d=i.imageManager.getFromCanvas(c.id,h);h.remove();const g=(null==(n=await t._structTree.getAriaAttributes(`${rHe}${o}`))?void 0:n.get("aria-label"))||"";s=e={annotationType:$Le.STAMP,bitmapId:d.id,bitmap:d.bitmap,pageIndex:u-1,rect:r.slice(0),rotation:a,id:o,deleted:!1,accessibilityData:{decorative:!1,altText:g},isSvg:!1,structParent:l,popupRef:A}}const r=await super.deserialize(e,t,i),{rect:a,bitmap:o,bitmapUrl:l,bitmapId:A,isSvg:c,accessibilityData:u}=e;A&&i.imageManager.isValidId(A)?(bc(r,$o,A),o&&bc(r,Xo,o)):bc(r,el,l),bc(r,al,c);const[h,d]=r.pageDimensions;return r.width=(a[2]-a[0])/h,r.height=(a[3]-a[1])/d,r.annotationElementId=e.id||null,u&&(r.altTextData=u),r._initialData=s,bc(r,ol,!!s),r}serialize(e=!1,t=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i={annotationType:$Le.STAMP,bitmapId:Bc(this,$o),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:Bc(this,al),structTreeParentId:this._structTreeParentId};if(e)return i.bitmapUrl=Ec(this,ll,fl).call(this,!0),i.accessibilityData=this.serializeAltText(!0),i;const{decorative:n,altText:s}=this.serializeAltText(!1);if(!n&&s&&(i.accessibilityData={type:"Figure",alt:s}),this.annotationElementId){const e=Ec(this,ll,Cl).call(this,i);if(e.isSame)return null;e.isSameAltText?delete i.accessibilityData:i.accessibilityData.structParent=this._initialData.structParent??-1}if(i.id=this.annotationElementId,null===t)return i;t.stamps||(t.stamps=new Map);const r=Bc(this,al)?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(t.stamps.has(Bc(this,$o))){if(Bc(this,al)){const e=t.stamps.get(Bc(this,$o));r>e.area&&(e.area=r,e.serialized.bitmap.close(),e.serialized.bitmap=Ec(this,ll,fl).call(this,!1))}}else t.stamps.set(Bc(this,$o),{area:r,serialized:i}),i.bitmap=Ec(this,ll,fl).call(this,!1);return i}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}};Xo=new WeakMap,$o=new WeakMap,Zo=new WeakMap,el=new WeakMap,tl=new WeakMap,il=new WeakMap,nl=new WeakMap,sl=new WeakMap,rl=new WeakMap,al=new WeakMap,ol=new WeakMap,ll=new WeakSet,Al=function(e,t=!1){e?(bc(this,Xo,e.bitmap),t||(bc(this,$o,e.id),bc(this,al,e.isSvg)),e.file&&bc(this,il,e.file.name),Ec(this,ll,hl).call(this)):this.remove()},cl=function(){if(bc(this,Zo,null),this._uiManager.enableWaiting(!1),Bc(this,nl)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&Bc(this,Xo))return this._editToolbar.hide(),void this._uiManager.editAltText(this,!0);if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&Bc(this,Xo)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}},ul=function(){if(Bc(this,$o))return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(Bc(this,$o)).then((e=>Ec(this,ll,Al).call(this,e,!0))).finally((()=>Ec(this,ll,cl).call(this)));if(Bc(this,el)){const e=Bc(this,el);return bc(this,el,null),this._uiManager.enableWaiting(!0),void bc(this,Zo,this._uiManager.imageManager.getFromUrl(e).then((e=>Ec(this,ll,Al).call(this,e))).finally((()=>Ec(this,ll,cl).call(this))))}if(Bc(this,tl)){const e=Bc(this,tl);return bc(this,tl,null),this._uiManager.enableWaiting(!0),void bc(this,Zo,this._uiManager.imageManager.getFromFile(e).then((e=>Ec(this,ll,Al).call(this,e))).finally((()=>Ec(this,ll,cl).call(this))))}const e=document.createElement("input");e.type="file",e.accept=tKe.supportedTypesStr;const t=this._uiManager._signal;bc(this,Zo,new Promise((i=>{e.addEventListener("change",(async()=>{if(e.files&&0!==e.files.length){this._uiManager.enableWaiting(!0);const t=await this._uiManager.imageManager.getFromFile(e.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),Ec(this,ll,Al).call(this,t)}else this.remove();i()}),{signal:t}),e.addEventListener("cancel",(()=>{this.remove(),i()}),{signal:t})})).finally((()=>Ec(this,ll,cl).call(this)))),e.click()},hl=function(){const{div:e}=this;let{width:t,height:i}=Bc(this,Xo);const[n,s]=this.pageDimensions,r=.75;if(this.width)t=this.width*n,i=this.height*s;else if(t>r*n||i>r*s){const e=Math.min(r*n/t,r*s/i);t*=e,i*=e}const[a,o]=this.parentDimensions;this.setDims(t*a/n,i*o/s),this._uiManager.enableWaiting(!1);const l=bc(this,nl,document.createElement("canvas"));l.setAttribute("role","img"),this.addContainer(l),this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&!this.annotationElementId||(e.hidden=!1),Ec(this,ll,pl).call(this,t,i),Ec(this,ll,ml).call(this),Bc(this,ol)||(this.parent.addUndoableEditor(this),bc(this,ol,!0)),this._reportTelemetry({action:"inserted_image"}),Bc(this,il)&&l.setAttribute("aria-label",Bc(this,il))},dl=function(e,t){var i;const[n,s]=this.parentDimensions;this.width=e/n,this.height=t/s,(null==(i=this._initialOptions)?void 0:i.isCentered)?this.center():this.fixAndSetPosition(),this._initialOptions=null,null!==Bc(this,rl)&&clearTimeout(Bc(this,rl));bc(this,rl,setTimeout((()=>{bc(this,rl,null),Ec(this,ll,pl).call(this,e,t)}),200))},gl=function(e,t){const{width:i,height:n}=Bc(this,Xo);let s=i,r=n,a=Bc(this,Xo);for(;s>2*e||r>2*t;){const i=s,n=r;s>2*e&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2)),r>2*t&&(r=r>=16384?Math.floor(r/2)-1:Math.ceil(r/2));const o=new OffscreenCanvas(s,r);o.getContext("2d").drawImage(a,0,0,i,n,0,0,s,r),a=o.transferToImageBitmap()}return a},pl=function(e,t){const i=new MHe,n=Math.ceil(e*i.sx),s=Math.ceil(t*i.sy),r=Bc(this,nl);if(!r||r.width===n&&r.height===s)return;r.width=n,r.height=s;const a=Bc(this,al)?Bc(this,Xo):Ec(this,ll,gl).call(this,n,s),o=r.getContext("2d");o.filter=this._uiManager.hcmFilter,o.drawImage(a,0,0,a.width,a.height,0,0,n,s)},fl=function(e){if(e){if(Bc(this,al)){const e=this._uiManager.imageManager.getSvgUrl(Bc(this,$o));if(e)return e}const e=document.createElement("canvas");({width:e.width,height:e.height}=Bc(this,Xo));return e.getContext("2d").drawImage(Bc(this,Xo),0,0),e.toDataURL()}if(Bc(this,al)){const[e,t]=this.pageDimensions,i=Math.round(this.width*e*mHe.PDF_TO_CSS_UNITS),n=Math.round(this.height*t*mHe.PDF_TO_CSS_UNITS),s=new OffscreenCanvas(i,n);return s.getContext("2d").drawImage(Bc(this,Xo),0,0,Bc(this,Xo).width,Bc(this,Xo).height,0,0,i,n),s.transferToImageBitmap()}return structuredClone(Bc(this,Xo))},ml=function(){this._uiManager._signal&&(bc(this,sl,new ResizeObserver((e=>{const t=e[0].contentRect;t.width&&t.height&&Ec(this,ll,dl).call(this,t.width,t.height)}))),Bc(this,sl).observe(this.div),this._uiManager._signal.addEventListener("abort",(()=>{var e;null==(e=Bc(this,sl))||e.disconnect(),bc(this,sl,null)}),{once:!0}))},Cl=function(e){var t;const{rect:i,pageIndex:n,accessibilityData:{altText:s}}=this._initialData,r=e.rect.every(((e,t)=>Math.abs(e-i[t])<1)),a=e.pageIndex===n,o=((null==(t=e.accessibilityData)?void 0:t.alt)||"")===s;return{isSame:r&&a&&o,isSameAltText:o}},Ic(tKe,"_type","stamp"),Ic(tKe,"_editorType",$Le.STAMP);let iKe=tKe;const nKe=class e{constructor({uiManager:t,pageIndex:i,div:n,structTreeLayer:s,accessibilityManager:r,annotationLayer:a,drawLayer:o,textLayer:l,viewport:A,l10n:c}){yc(this,Fl),yc(this,Il),yc(this,vl,!1),yc(this,Bl,null),yc(this,yl,null),yc(this,bl,null),yc(this,El,new Map),yc(this,wl,!1),yc(this,Ql,!1),yc(this,_l,!1),yc(this,Sl,null),yc(this,xl,null),yc(this,kl);const u=[...Bc(e,Dl).values()];if(!e._initialized){e._initialized=!0;for(const e of u)e.initialize(c,t)}t.registerEditorTypes(u),bc(this,kl,t),this.pageIndex=i,this.div=n,bc(this,Il,r),bc(this,Bl,a),this.viewport=A,bc(this,Sl,l),this.drawLayer=o,this._structTree=s,Bc(this,kl).addLayer(this)}get isEmpty(){return 0===Bc(this,El).size}get isInvisible(){return this.isEmpty&&Bc(this,kl).getMode()===$Le.NONE}updateToolbar(e){Bc(this,kl).updateToolbar(e)}updateMode(t=Bc(this,kl).getMode()){switch(Ec(this,Fl,Ll).call(this),t){case $Le.NONE:return this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),void this.disableClick();case $Le.INK:this.addInkEditorIfNeeded(!1),this.disableTextSelection(),this.togglePointerEvents(!0),this.disableClick();break;case $Le.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:i}=this.div;for(const n of Bc(e,Dl).values())i.toggle(`${n._type}Editing`,t===n._editorType);this.div.hidden=!1}hasTextLayer(e){var t;return e===(null==(t=Bc(this,Sl))?void 0:t.div)}addInkEditorIfNeeded(e){if(Bc(this,kl).getMode()!==$Le.INK)return;if(!e)for(const t of Bc(this,El).values())if(t.isEmpty())return void t.setInBackground();this.createAndAddNewEditor({offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(e){Bc(this,kl).setEditingState(e)}addCommands(e){Bc(this,kl).addCommands(e)}toggleDrawing(e=!1){this.div.classList.toggle("drawing",!e)}togglePointerEvents(e=!1){this.div.classList.toggle("disabled",!e)}toggleAnnotationLayerPointerEvents(e=!1){var t;null==(t=Bc(this,Bl))||t.div.classList.toggle("disabled",!e)}async enable(){this.div.tabIndex=0,this.togglePointerEvents(!0);const e=new Set;for(const i of Bc(this,El).values())i.enableEditing(),i.show(!0),i.annotationElementId&&(Bc(this,kl).removeChangedExistingAnnotation(i),e.add(i.annotationElementId));if(!Bc(this,Bl))return;const t=Bc(this,Bl).getEditableAnnotations();for(const i of t){if(i.hide(),Bc(this,kl).isDeletedAnnotationElement(i.data.id))continue;if(e.has(i.data.id))continue;const t=await this.deserialize(i);t&&(this.addOrRebuild(t),t.enableEditing())}}disable(){var t;bc(this,_l,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1);const i=new Map,n=new Map;for(const e of Bc(this,El).values())e.disableEditing(),e.annotationElementId&&(null===e.serialize()?(n.set(e.annotationElementId,e),null==(t=this.getEditableAnnotation(e.annotationElementId))||t.show(),e.remove()):i.set(e.annotationElementId,e));if(Bc(this,Bl)){const e=Bc(this,Bl).getEditableAnnotations();for(const t of e){const{id:e}=t.data;if(Bc(this,kl).isDeletedAnnotationElement(e))continue;let s=n.get(e);s?(s.resetAnnotationElement(t),s.show(!1),t.show()):(s=i.get(e),s&&(Bc(this,kl).addChangedExistingAnnotation(s),s.renderAnnotationElement(t)&&s.show(!1)),t.show())}}Ec(this,Fl,Ll).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:s}=this.div;for(const r of Bc(e,Dl).values())s.remove(`${r._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),bc(this,_l,!1)}getEditableAnnotation(e){var t;return(null==(t=Bc(this,Bl))?void 0:t.getEditableAnnotation(e))||null}setActiveEditor(e){Bc(this,kl).getActive()!==e&&Bc(this,kl).setActiveEditor(e)}enableTextSelection(){var e;if(this.div.tabIndex=-1,(null==(e=Bc(this,Sl))?void 0:e.div)&&!Bc(this,xl)){bc(this,xl,new AbortController);const e=Bc(this,kl).combinedSignal(Bc(this,xl));Bc(this,Sl).div.addEventListener("pointerdown",Ec(this,Fl,Tl).bind(this),{signal:e}),Bc(this,Sl).div.classList.add("highlighting")}}disableTextSelection(){var e;this.div.tabIndex=0,(null==(e=Bc(this,Sl))?void 0:e.div)&&Bc(this,xl)&&(Bc(this,xl).abort(),bc(this,xl,null),Bc(this,Sl).div.classList.remove("highlighting"))}enableClick(){if(Bc(this,yl))return;bc(this,yl,new AbortController);const e=Bc(this,kl).combinedSignal(Bc(this,yl));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:e}),this.div.addEventListener("pointerup",this.pointerup.bind(this),{signal:e})}disableClick(){var e;null==(e=Bc(this,yl))||e.abort(),bc(this,yl,null)}attach(e){Bc(this,El).set(e.id,e);const{annotationElementId:t}=e;t&&Bc(this,kl).isDeletedAnnotationElement(t)&&Bc(this,kl).removeDeletedAnnotationElement(e)}detach(e){var t;Bc(this,El).delete(e.id),null==(t=Bc(this,Il))||t.removePointerInTextLayer(e.contentDiv),!Bc(this,_l)&&e.annotationElementId&&Bc(this,kl).addDeletedAnnotationElement(e)}remove(e){this.detach(e),Bc(this,kl).removeEditor(e),e.div.remove(),e.isAttachedToDOM=!1,Bc(this,Ql)||this.addInkEditorIfNeeded(!1)}changeParent(e){var t;e.parent!==this&&(e.parent&&e.annotationElementId&&(Bc(this,kl).addDeletedAnnotationElement(e.annotationElementId),XHe.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),null==(t=e.parent)||t.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}add(e){if(e.parent!==this||!e.isAttachedToDOM){if(this.changeParent(e),Bc(this,kl).addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render();this.div.append(t),e.isAttachedToDOM=!0}e.fixAndSetPosition(),e.onceAdded(),Bc(this,kl).addToAnnotationStorage(e),e._reportTelemetry(e.telemetryInitialData)}}moveEditorInDOM(e){var t;if(!e.isAttachedToDOM)return;const{activeElement:i}=document;e.div.contains(i)&&!Bc(this,bl)&&(e._focusEventsAllowed=!1,bc(this,bl,setTimeout((()=>{bc(this,bl,null),e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",(()=>{e._focusEventsAllowed=!0}),{once:!0,signal:Bc(this,kl)._signal}),i.focus())}),0))),e._structTreeParentId=null==(t=Bc(this,Il))?void 0:t.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?(e.parent||(e.parent=this),e.rebuild(),e.show()):this.add(e)}addUndoableEditor(e){this.addCommands({cmd:()=>e._uiManager.rebuild(e),undo:()=>{e.remove()},mustExec:!1})}getNextId(){return Bc(this,kl).getId()}combinedSignal(e){return Bc(this,kl).combinedSignal(e)}canCreateNewEmptyEditor(){var e;return null==(e=Bc(this,Fl,Ml))?void 0:e.canCreateNewEmptyEditor()}pasteEditor(e,t){Bc(this,kl).updateToolbar(e),Bc(this,kl).updateMode(e);const{offsetX:i,offsetY:n}=Ec(this,Fl,Nl).call(this),s=this.getNextId(),r=Ec(this,Fl,Rl).call(this,{parent:this,id:s,x:i,y:n,uiManager:Bc(this,kl),isCentered:!0,...t});r&&this.add(r)}async deserialize(t){var i;return await(null==(i=Bc(e,Dl).get(t.annotationType??t.annotationEditorType))?void 0:i.deserialize(t,this,Bc(this,kl)))||null}createAndAddNewEditor(e,t,i={}){const n=this.getNextId(),s=Ec(this,Fl,Rl).call(this,{parent:this,id:n,x:e.offsetX,y:e.offsetY,uiManager:Bc(this,kl),isCentered:t,...i});return s&&this.add(s),s}addNewEditor(){this.createAndAddNewEditor(Ec(this,Fl,Nl).call(this),!0)}setSelected(e){Bc(this,kl).setSelected(e)}toggleSelected(e){Bc(this,kl).toggleSelected(e)}unselect(e){Bc(this,kl).unselect(e)}pointerup(e){const{isMac:t}=ZUe.platform;0!==e.button||e.ctrlKey&&t||e.target===this.div&&Bc(this,wl)&&(bc(this,wl,!1),Bc(this,vl)?Bc(this,kl).getMode()!==$Le.STAMP?this.createAndAddNewEditor(e,!1):Bc(this,kl).unselectAll():bc(this,vl,!0))}pointerdown(e){if(Bc(this,kl).getMode()===$Le.HIGHLIGHT&&this.enableTextSelection(),Bc(this,wl))return void bc(this,wl,!1);const{isMac:t}=ZUe.platform;if(0!==e.button||e.ctrlKey&&t)return;if(e.target!==this.div)return;bc(this,wl,!0);const i=Bc(this,kl).getActive();bc(this,vl,!i||i.isEmpty())}findNewParent(e,t,i){const n=Bc(this,kl).findParent(t,i);return null!==n&&n!==this&&(n.changeParent(e),!0)}destroy(){var e,t;(null==(e=Bc(this,kl).getActive())?void 0:e.parent)===this&&(Bc(this,kl).commitOrRemove(),Bc(this,kl).setActiveEditor(null)),Bc(this,bl)&&(clearTimeout(Bc(this,bl)),bc(this,bl,null));for(const i of Bc(this,El).values())null==(t=Bc(this,Il))||t.removePointerInTextLayer(i.contentDiv),i.setParent(null),i.isAttachedToDOM=!1,i.div.remove();this.div=null,Bc(this,El).clear(),Bc(this,kl).removeLayer(this)}render({viewport:e}){this.viewport=e,THe(this.div,e);for(const t of Bc(this,kl).getEditors(this.pageIndex))this.add(t),t.rebuild();this.updateMode()}update({viewport:e}){Bc(this,kl).commitOrRemove(),Ec(this,Fl,Ll).call(this);const t=this.viewport.rotation,i=e.rotation;if(this.viewport=e,THe(this.div,{rotation:i}),t!==i)for(const n of Bc(this,El).values())n.rotate(i);this.addInkEditorIfNeeded(!1)}get pageDimensions(){const{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}get scale(){return Bc(this,kl).viewParameters.realScale}};Il=new WeakMap,vl=new WeakMap,Bl=new WeakMap,yl=new WeakMap,bl=new WeakMap,El=new WeakMap,wl=new WeakMap,Ql=new WeakMap,_l=new WeakMap,Sl=new WeakMap,xl=new WeakMap,kl=new WeakMap,Dl=new WeakMap,Fl=new WeakSet,Tl=function(e){Bc(this,kl).unselectAll();const{target:t}=e;if(t===Bc(this,Sl).div||("img"===t.getAttribute("role")||t.classList.contains("endOfContent"))&&Bc(this,Sl).div.contains(t)){const{isMac:t}=ZUe.platform;if(0!==e.button||e.ctrlKey&&t)return;Bc(this,kl).showAllEditors("highlight",!0,!0),Bc(this,Sl).div.classList.add("free"),this.toggleDrawing(),$Ge.startHighlighting(this,"ltr"===Bc(this,kl).direction,{target:Bc(this,Sl).div,x:e.x,y:e.y}),Bc(this,Sl).div.addEventListener("pointerup",(()=>{Bc(this,Sl).div.classList.remove("free"),this.toggleDrawing(!0)}),{once:!0,signal:Bc(this,kl)._signal}),e.preventDefault()}},Ml=function(){return Bc(nKe,Dl).get(Bc(this,kl).getMode())},Rl=function(e){const t=Bc(this,Fl,Ml);return t?new t.prototype.constructor(e):null},Nl=function(){const{x:e,y:t,width:i,height:n}=this.div.getBoundingClientRect(),s=Math.max(0,e),r=Math.max(0,t),a=(s+Math.min(window.innerWidth,e+i))/2-e,o=(r+Math.min(window.innerHeight,t+n))/2-t,[l,A]=this.viewport.rotation%180==0?[a,o]:[o,a];return{offsetX:l,offsetY:A}},Ll=function(){bc(this,Ql,!0);for(const e of Bc(this,El).values())e.isEmpty()&&e.remove();bc(this,Ql,!1)},Ic(nKe,"_initialized",!1),yc(nKe,Dl,new Map([PGe,eKe,iKe,$Ge].map((e=>[e._editorType,e]))));let sKe=nKe;const rKe=class e{constructor({pageIndex:e}){yc(this,ql),yc(this,Ul,null),yc(this,Hl,0),yc(this,Pl,new Map),yc(this,Ol,new Map),this.pageIndex=e}setParent(e){if(Bc(this,Ul)){if(Bc(this,Ul)!==e){if(Bc(this,Pl).size>0)for(const t of Bc(this,Pl).values())t.remove(),e.append(t);bc(this,Ul,e)}}else bc(this,Ul,e)}static get _svgFactory(){return OUe(this,"_svgFactory",new rGe)}draw(t,i,n,s=!1){const r=wc(this,Hl)._++,a=Ec(this,ql,Yl).call(this,t.box);a.classList.add(...t.classNamesForDrawing);const o=e._svgFactory.createElement("defs");a.append(o);const l=e._svgFactory.createElement("path");o.append(l);const A=`path_p${this.pageIndex}_${r}`;l.setAttribute("id",A),l.setAttribute("d",t.toSVGPath()),s&&Bc(this,Ol).set(r,l);const c=Ec(this,ql,Vl).call(this,o,A),u=e._svgFactory.createElement("use");return a.append(u),a.setAttribute("fill",i),a.setAttribute("fill-opacity",n),u.setAttribute("href",`#${A}`),Bc(this,Pl).set(r,a),{id:r,clipPathId:`url(#${c})`}}drawOutline(t){const i=wc(this,Hl)._++,n=Ec(this,ql,Yl).call(this,t.box);n.classList.add(...t.classNamesForOutlining);const s=e._svgFactory.createElement("defs");n.append(s);const r=e._svgFactory.createElement("path");s.append(r);const a=`path_p${this.pageIndex}_${i}`;let o;if(r.setAttribute("id",a),r.setAttribute("d",t.toSVGPath()),r.setAttribute("vector-effect","non-scaling-stroke"),t.mustRemoveSelfIntersections){const t=e._svgFactory.createElement("mask");s.append(t),o=`mask_p${this.pageIndex}_${i}`,t.setAttribute("id",o),t.setAttribute("maskUnits","objectBoundingBox");const n=e._svgFactory.createElement("rect");t.append(n),n.setAttribute("width","1"),n.setAttribute("height","1"),n.setAttribute("fill","white");const r=e._svgFactory.createElement("use");t.append(r),r.setAttribute("href",`#${a}`),r.setAttribute("stroke","none"),r.setAttribute("fill","black"),r.setAttribute("fill-rule","nonzero"),r.classList.add("mask")}const l=e._svgFactory.createElement("use");n.append(l),l.setAttribute("href",`#${a}`),o&&l.setAttribute("mask",`url(#${o})`);const A=l.cloneNode();return n.append(A),l.classList.add("mainOutline"),A.classList.add("secondaryOutline"),Bc(this,Pl).set(i,n),i}finalizeLine(e,t){const i=Bc(this,Ol).get(e);Bc(this,Ol).delete(e),this.updateBox(e,t.box),i.setAttribute("d",t.toSVGPath())}updateLine(e,t){Bc(this,Pl).get(e).firstChild.firstChild.setAttribute("d",t.toSVGPath())}updatePath(e,t){Bc(this,Ol).get(e).setAttribute("d",t.toSVGPath())}updateBox(t,i){var n;Ec(n=e,Gl,Kl).call(n,Bc(this,Pl).get(t),i)}show(e,t){Bc(this,Pl).get(e).classList.toggle("hidden",!t)}rotate(e,t){Bc(this,Pl).get(e).setAttribute("data-main-rotation",t)}changeColor(e,t){Bc(this,Pl).get(e).setAttribute("fill",t)}changeOpacity(e,t){Bc(this,Pl).get(e).setAttribute("fill-opacity",t)}addClass(e,t){Bc(this,Pl).get(e).classList.add(t)}removeClass(e,t){Bc(this,Pl).get(e).classList.remove(t)}getSVGRoot(e){return Bc(this,Pl).get(e)}remove(e){Bc(this,Ol).delete(e),null!==Bc(this,Ul)&&(Bc(this,Pl).get(e).remove(),Bc(this,Pl).delete(e))}destroy(){bc(this,Ul,null);for(const e of Bc(this,Pl).values())e.remove();Bc(this,Pl).clear(),Bc(this,Ol).clear()}};Ul=new WeakMap,Hl=new WeakMap,Pl=new WeakMap,Ol=new WeakMap,Gl=new WeakSet,Kl=function(e,{x:t=0,y:i=0,width:n=1,height:s=1}={}){const{style:r}=e;r.top=100*i+"%",r.left=100*t+"%",r.width=100*n+"%",r.height=100*s+"%"},ql=new WeakSet,Yl=function(e){var t;const i=rKe._svgFactory.create(1,1,!0);return Bc(this,Ul).append(i),i.setAttribute("aria-hidden",!0),Ec(t=rKe,Gl,Kl).call(t,i,e),i},Vl=function(e,t){const i=rKe._svgFactory.createElement("clipPath");e.append(i);const n=`clip_${t}`;i.setAttribute("id",n),i.setAttribute("clipPathUnits","objectBoundingBox");const s=rKe._svgFactory.createElement("use");return i.append(s),s.setAttribute("href",`#${t}`),s.classList.add("clip"),n},yc(rKe,Gl);let aKe=rKe;globalThis.pdfjsTestingUtils={HighlightOutliner:YGe};var oKe={d:(e,t)=>{for(var i in t)oKe.o(t,i)&&!oKe.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},lKe=globalThis.pdfjsWorker={};oKe.d(lKe,{WorkerMessageHandler:()=>
/* reexport */bnt});const AKe=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),cKe=[1,0,0,1,0,0],uKe=[.001,0,0,.001,0,0],hKe=1.35,dKe=.35,gKe=.25925925925925924,pKe=1,fKe=2,mKe=4,CKe=8,IKe=16,vKe=64,BKe=128,yKe=256,bKe="pdfjs_internal_editor_",EKe=3,wKe=9,QKe=13,_Ke=15,SKe={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},xKe=0,kKe=4,DKe=1,FKe=2,TKe=3,MKe=1,RKe=2,NKe=3,LKe=4,UKe=5,HKe=6,PKe=7,OKe=8,GKe=9,KKe=10,qKe=11,YKe=12,VKe=13,WKe=14,jKe=15,JKe=16,zKe=17,XKe=20,$Ke="Group",ZKe="R",eqe=1,tqe=2,iqe=4,nqe=16,sqe=32,rqe=128,aqe=512,oqe=1,lqe=2,Aqe=4096,cqe=8192,uqe=32768,hqe=65536,dqe=131072,gqe=1048576,pqe=2097152,fqe=8388608,mqe=16777216,Cqe=1,Iqe=2,vqe=3,Bqe=4,yqe=5,bqe={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},Eqe={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},wqe={O:"PageOpen",C:"PageClose"},Qqe=1,_qe=5,Sqe=1,xqe=2,kqe=3,Dqe=4,Fqe=5,Tqe=6,Mqe=7,Rqe=8,Nqe=9,Lqe=10,Uqe=11,Hqe=12,Pqe=13,Oqe=14,Gqe=15,Kqe=16,qqe=17,Yqe=18,Vqe=19,Wqe=20,jqe=21,Jqe=22,zqe=23,Xqe=24,$qe=25,Zqe=26,eYe=27,tYe=28,iYe=29,nYe=30,sYe=31,rYe=32,aYe=33,oYe=34,lYe=35,AYe=36,cYe=37,uYe=38,hYe=39,dYe=40,gYe=41,pYe=42,fYe=43,mYe=44,CYe=45,IYe=46,vYe=47,BYe=48,yYe=49,bYe=50,EYe=51,wYe=52,QYe=53,_Ye=54,SYe=55,xYe=56,kYe=57,DYe=58,FYe=59,TYe=60,MYe=61,RYe=62,NYe=63,LYe=64,UYe=65,HYe=66,PYe=67,OYe=68,GYe=69,KYe=70,qYe=71,YYe=72,VYe=73,WYe=74,jYe=75,JYe=76,zYe=77,XYe=80,$Ye=81,ZYe=83,eVe=84,tVe=85,iVe=86,nVe=87,sVe=88,rVe=89,aVe=90,oVe=91,lVe=92,AVe=93,cVe=1,uVe=2;let hVe=Qqe;function dVe(e){}function gVe(e){throw new Error(e)}function pVe(e,t){e||gVe(t)}function fVe(e,t=null,i=null){if(!e)return null;try{if(i&&"string"==typeof e){if(i.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);(null==t?void 0:t.length)>=2&&(e=`http://${e}`)}if(i.tryConvertEncoding)try{e=RVe(e)}catch{}}const n=t?new URL(e,t):new URL(e);if(function(e){switch(null==e?void 0:e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(n))return n}catch{}return null}function mVe(e,t,i,n=!1){return Object.defineProperty(e,t,{value:i,enumerable:!n,configurable:!0,writable:!1}),i}const CVe=function(){function e(e,t){this.message=e,this.name=t}return e.prototype=new Error,e.constructor=e,e}();class IVe extends CVe{constructor(e,t){super(e,"PasswordException"),this.code=t}}class vVe extends CVe{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}}class BVe extends CVe{constructor(e){super(e,"InvalidPDFException")}}class yVe extends CVe{constructor(e){super(e,"MissingPDFException")}}class bVe extends CVe{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}}class EVe extends CVe{constructor(e){super(e,"FormatError")}}class wVe extends CVe{constructor(e){super(e,"AbortException")}}function QVe(e){"object"==typeof e&&void 0!==(null==e?void 0:e.length)||gVe("Invalid argument for bytesToString");const t=e.length,i=8192;if(t<i)return String.fromCharCode.apply(null,e);const n=[];for(let s=0;s<t;s+=i){const r=Math.min(s+i,t),a=e.subarray(s,r);n.push(String.fromCharCode.apply(null,a))}return n.join("")}function _Ve(e){"string"!=typeof e&&gVe("Invalid argument for stringToBytes");const t=e.length,i=new Uint8Array(t);for(let n=0;n<t;++n)i[n]=255&e.charCodeAt(n);return i}function SVe(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function xVe(e){return Object.keys(e).length}class kVe{static get isLittleEndian(){return mVe(this,"isLittleEndian",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return mVe(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return mVe(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get isImageDecoderSupported(){return mVe(this,"isImageDecoderSupported","undefined"!=typeof ImageDecoder)}static get platform(){return"undefined"!=typeof navigator&&"string"==typeof(null==navigator?void 0:navigator.platform)?mVe(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:"string"==typeof(null==navigator?void 0:navigator.userAgent)&&navigator.userAgent.includes("Firefox")}):mVe(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var e,t;return mVe(this,"isCSSRoundSupported",null==(t=null==(e=globalThis.CSS)?void 0:e.supports)?void 0:t.call(e,"width: round(1.5px, 1px)"))}}const DVe=Array.from(Array(256).keys(),(e=>e.toString(16).padStart(2,"0")));class FVe{static makeHexColor(e,t,i){return`#${DVe[e]}${DVe[t]}${DVe[i]}`}static scaleMinMax(e,t){let i;e[0]?(e[0]<0&&(i=t[0],t[0]=t[2],t[2]=i),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(i=t[1],t[1]=t[3],t[3]=i),t[1]*=e[3],t[3]*=e[3]):(i=t[0],t[0]=t[1],t[1]=i,i=t[2],t[2]=t[3],t[3]=i,e[1]<0&&(i=t[1],t[1]=t[3],t[3]=i),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(i=t[0],t[0]=t[2],t[2]=i),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const i=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/i,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/i]}static getAxialAlignedBoundingBox(e,t){const i=this.applyTransform(e,t),n=this.applyTransform(e.slice(2,4),t),s=this.applyTransform([e[0],e[3]],t),r=this.applyTransform([e[2],e[1]],t);return[Math.min(i[0],n[0],s[0],r[0]),Math.min(i[1],n[1],s[1],r[1]),Math.max(i[0],n[0],s[0],r[0]),Math.max(i[1],n[1],s[1],r[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],i=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],s=e[2]*t[0]+e[3]*t[2],r=e[2]*t[1]+e[3]*t[3],a=(i+r)/2,o=Math.sqrt((i+r)**2-4*(i*r-s*n))/2,l=a+o||1,A=a-o||1;return[Math.sqrt(l),Math.sqrt(A)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const i=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),n=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(i>n)return null;const s=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),r=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return s>r?null:[i,s,n,r]}static bezierBoundingBox(e,t,i,n,s,r,a,o,l){return l?(l[0]=Math.min(l[0],e,a),l[1]=Math.min(l[1],t,o),l[2]=Math.max(l[2],e,a),l[3]=Math.max(l[3],t,o)):l=[Math.min(e,a),Math.min(t,o),Math.max(e,a),Math.max(t,o)],Ec(this,Wl,Jl).call(this,e,i,s,a,t,n,r,o,3*(3*(i-s)-e+a),6*(e-2*i+s),3*(i-e),l),Ec(this,Wl,Jl).call(this,e,i,s,a,t,n,r,o,3*(3*(n-r)-t+o),6*(t-2*n+r),3*(n-t),l),l}}Wl=new WeakSet,jl=function(e,t,i,n,s,r,a,o,l,A){if(l<=0||l>=1)return;const c=1-l,u=l*l,h=u*l,d=c*(c*(c*e+3*l*t)+3*u*i)+h*n,g=c*(c*(c*s+3*l*r)+3*u*a)+h*o;A[0]=Math.min(A[0],d),A[1]=Math.min(A[1],g),A[2]=Math.max(A[2],d),A[3]=Math.max(A[3],g)},Jl=function(e,t,i,n,s,r,a,o,l,A,c,u){if(Math.abs(l)<1e-12)return void(Math.abs(A)>=1e-12&&Ec(this,Wl,jl).call(this,e,t,i,n,s,r,a,o,-c/A,u));const h=A**2-4*c*l;if(h<0)return;const d=Math.sqrt(h),g=2*l;Ec(this,Wl,jl).call(this,e,t,i,n,s,r,a,o,(-A+d)/g,u),Ec(this,Wl,jl).call(this,e,t,i,n,s,r,a,o,(-A-d)/g,u)},yc(FVe,Wl);const TVe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function MVe(e){if(e[0]>="ï"){let t;if("þ"===e[0]&&"ÿ"===e[1]?(t="utf-16be",e.length%2==1&&(e=e.slice(0,-1))):"ÿ"===e[0]&&"þ"===e[1]?(t="utf-16le",e.length%2==1&&(e=e.slice(0,-1))):"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t)try{const i=new TextDecoder(t,{fatal:!0}),n=_Ve(e),s=i.decode(n);return s.includes("")?s.replaceAll(/\x1b[^\x1b]*(?:\x1b|$)/g,""):s}catch(i){}}const t=[];for(let n=0,s=e.length;n<s;n++){const i=e.charCodeAt(n);if(27===i){for(;++n<s&&27!==e.charCodeAt(n););continue}const r=TVe[i];t.push(r?String.fromCharCode(r):e.charAt(n))}return t.join("")}function RVe(e){return decodeURIComponent(escape(e))}function NVe(e){return unescape(encodeURIComponent(e))}function LVe(e,t){if(e.length!==t.length)return!1;for(let i=0,n=e.length;i<n;i++)if(e[i]!==t[i])return!1;return!0}function UVe(e=new Date){return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")}let HVe=null,PVe=null;const OVe=0,GVe=1,KVe=2,qVe=3,YVe=4,VVe=5,WVe=6,jVe=7,JVe=8;function zVe(e){return Uint8Array.prototype.toHex?e.toHex():Array.from(e,(e=>DVe[e])).join("")}const XVe=Symbol("CIRCULAR_REF"),$Ve=Symbol("EOF");let ZVe=Object.create(null),eWe=Object.create(null),tWe=Object.create(null);class iWe{constructor(e){this.name=e}static get(e){return eWe[e]||(eWe[e]=new iWe(e))}}class nWe{constructor(e){this.cmd=e}static get(e){return ZVe[e]||(ZVe[e]=new nWe(e))}}const sWe=function(){return sWe};class rWe{constructor(e=null){this._map=new Map,this.xref=e,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=sWe}assignXref(e){this.xref=e}get size(){return this._map.size}get(e,t,i){let n=this._map.get(e);return void 0===n&&void 0!==t&&(n=this._map.get(t),void 0===n&&void 0!==i&&(n=this._map.get(i))),n instanceof aWe&&this.xref?this.xref.fetch(n,this.suppressEncryption):n}async getAsync(e,t,i){let n=this._map.get(e);return void 0===n&&void 0!==t&&(n=this._map.get(t),void 0===n&&void 0!==i&&(n=this._map.get(i))),n instanceof aWe&&this.xref?this.xref.fetchAsync(n,this.suppressEncryption):n}getArray(e,t,i){let n=this._map.get(e);if(void 0===n&&void 0!==t&&(n=this._map.get(t),void 0===n&&void 0!==i&&(n=this._map.get(i))),n instanceof aWe&&this.xref&&(n=this.xref.fetch(n,this.suppressEncryption)),Array.isArray(n)){n=n.slice();for(let e=0,t=n.length;e<t;e++)n[e]instanceof aWe&&this.xref&&(n[e]=this.xref.fetch(n[e],this.suppressEncryption))}return n}getRaw(e){return this._map.get(e)}getKeys(){return[...this._map.keys()]}getRawValues(){return[...this._map.values()]}set(e,t){this._map.set(e,t)}has(e){return this._map.has(e)}*[Symbol.iterator](){for(const[e,t]of this._map)yield[e,t instanceof aWe&&this.xref?this.xref.fetch(t,this.suppressEncryption):t]}static get empty(){const e=new rWe(null);return e.set=(e,t)=>{gVe("Should not call `set` on the empty dictionary.")},mVe(this,"empty",e)}static merge({xref:e,dictArray:t,mergeSubDicts:i=!1}){const n=new rWe(e),s=new Map;for(const r of t)if(r instanceof rWe)for(const[e,t]of r._map){let n=s.get(e);if(void 0===n)n=[],s.set(e,n);else if(!(i&&t instanceof rWe))continue;n.push(t)}for(const[r,a]of s){if(1===a.length||!(a[0]instanceof rWe)){n._map.set(r,a[0]);continue}const t=new rWe(e);for(const e of a)for(const[i,n]of e._map)t._map.has(i)||t._map.set(i,n);t.size>0&&n._map.set(r,t)}return s.clear(),n.size>0?n:rWe.empty}clone(){const e=new rWe(this.xref);for(const t of this.getKeys())e.set(t,this.getRaw(t));return e}delete(e){delete this._map[e]}}class aWe{constructor(e,t){this.num=e,this.gen=t}toString(){return 0===this.gen?`${this.num}R`:`${this.num}R${this.gen}`}static fromString(e){const t=tWe[e];if(t)return t;const i=/^(\d+)R(\d*)$/.exec(e);return i&&"0"!==i[1]?tWe[e]=new aWe(parseInt(i[1]),i[2]?parseInt(i[2]):0):null}static get(e,t){const i=0===t?`${e}R`:`${e}R${t}`;return tWe[i]||(tWe[i]=new aWe(e,t))}}class oWe{constructor(e=null){this._set=new Set(null==e?void 0:e._set)}has(e){return this._set.has(e.toString())}put(e){this._set.add(e.toString())}remove(e){this._set.delete(e.toString())}[Symbol.iterator](){return this._set.values()}clear(){this._set.clear()}}class lWe{constructor(){this._map=new Map}get size(){return this._map.size}get(e){return this._map.get(e.toString())}has(e){return this._map.has(e.toString())}put(e,t){this._map.set(e.toString(),t)}putAlias(e,t){this._map.set(e.toString(),this.get(t))}[Symbol.iterator](){return this._map.values()}clear(){this._map.clear()}*values(){yield*this._map.values()}*items(){for(const[e,t]of this._map)yield[aWe.fromString(e),t]}}function AWe(e,t){return e instanceof iWe&&(void 0===t||e.name===t)}function cWe(e,t){return e instanceof nWe&&(void 0===t||e.cmd===t)}function uWe(e,t){return e instanceof rWe&&(void 0===t||AWe(e.get("Type"),t))}function hWe(e,t){return e.num===t.num&&e.gen===t.gen}class dWe{get length(){gVe("Abstract getter `length` accessed")}get isEmpty(){gVe("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return mVe(this,"isDataLoaded",!0)}getByte(){gVe("Abstract method `getByte` called")}getBytes(e){gVe("Abstract method `getBytes` called")}async getImageData(e,t){return this.getBytes(e,t)}async asyncGetBytes(){gVe("Abstract method `asyncGetBytes` called")}get isAsync(){return!1}get canAsyncDecodeImageFromBuffer(){return!1}async getTransferableImage(){return null}peekByte(){const e=this.getByte();return-1!==e&&this.pos--,e}peekBytes(e){const t=this.getBytes(e);return this.pos-=t.length,t}getUint16(){const e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(e,t){gVe("Abstract method `getByteRange` called")}getString(e){return QVe(this.getBytes(e))}skip(e){this.pos+=e||1}reset(){gVe("Abstract method `reset` called")}moveStart(){gVe("Abstract method `moveStart` called")}makeSubStream(e,t,i=null){gVe("Abstract method `makeSubStream` called")}getBaseStreams(){return null}}const gWe=/^[1-9]\.\d$/;function pWe(e){let t;return function(){return e&&(t=Object.create(null),e(t),e=null),t}}class fWe extends CVe{constructor(e,t){super(`Missing data [${e}, ${t})`,"MissingDataException"),this.begin=e,this.end=t}}class mWe extends CVe{constructor(e){super(e,"ParserEOFException")}}class CWe extends CVe{constructor(e){super(e,"XRefEntryException")}}class IWe extends CVe{constructor(e){super(e,"XRefParseException")}}function vWe(e){const t=e.length;if(0===t)return new Uint8Array(0);if(1===t)return new Uint8Array(e[0]);let i=0;for(let r=0;r<t;r++)i+=e[r].byteLength;const n=new Uint8Array(i);let s=0;for(let r=0;r<t;r++){const t=new Uint8Array(e[r]);n.set(t,s),s+=t.byteLength}return n}function BWe({dict:e,key:t,getArray:i=!1,stopWhenFound:n=!0}){let s;const r=new oWe;for(;e instanceof rWe&&(!e.objId||!r.has(e.objId));){e.objId&&r.put(e.objId);const a=i?e.getArray(t):e.get(t);if(void 0!==a){if(n)return a;(s||(s=[])).push(a)}e=e.get("Parent")}return s}const yWe=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];function bWe(e,t=!1){pVe(Number.isInteger(e)&&e>0,"The number should be a positive integer.");const i="M".repeat(e/1e3|0)+yWe[e%1e3/100|0]+yWe[10+(e%100/10|0)]+yWe[20+e%10];return t?i.toLowerCase():i}function EWe(e){return e>0?Math.ceil(Math.log2(e)):0}function wWe(e,t){return e[t]<<24>>24}function QWe(e,t){return e[t]<<8|e[t+1]}function _We(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function SWe(e){return 32===e||9===e||13===e||10===e}function xWe(e,t){return Array.isArray(e)?(null===t||e.length===t)&&e.every((e=>"number"==typeof e)):ArrayBuffer.isView(e)&&(0===e.length||"number"==typeof e[0])&&(null===t||e.length===t)}function kWe(e,t){return xWe(e,6)?e:t}function DWe(e,t){return xWe(e,4)?e:t}function FWe(e,t){return xWe(e,4)?FVe.normalizeRect(e):t}function TWe(e){const t=/(.+)\[(\d+)\]$/;return e.split(".").map((e=>{const i=e.match(t);return i?{name:i[1],pos:parseInt(i[2],10)}:{name:e,pos:0}}))}function MWe(e){const t=[];let i=0;for(let n=0,s=e.length;n<s;n++){const s=e.charCodeAt(n);(s<33||s>126||35===s||40===s||41===s||60===s||62===s||91===s||93===s||123===s||125===s||47===s||37===s)&&(i<n&&t.push(e.substring(i,n)),t.push(`#${s.toString(16)}`),i=n+1)}return 0===t.length?e:(i<e.length&&t.push(e.substring(i,e.length)),t.join(""))}function RWe(e){return e.replaceAll(/([()\\\n\r])/g,(e=>"\n"===e?"\\n":"\r"===e?"\\r":`\\${e}`))}function NWe(e,t,i,n){if(!e)return;let s=null;if(e instanceof aWe){if(n.has(e))return;s=e,n.put(s),e=t.fetch(e)}if(Array.isArray(e))for(const r of e)NWe(r,t,i,n);else if(e instanceof rWe){if(AWe(e.get("S"),"JavaScript")){const t=e.get("JS");let n;t instanceof dWe?n=t.getString():"string"==typeof t&&(n=t),n&&(n=MVe(n).replaceAll("\0","")),n&&i.push(n)}NWe(e.getRaw("Next"),t,i,n)}s&&n.remove(s)}function LWe(e,t,i){const n=Object.create(null),s=BWe({dict:t,key:"AA",stopWhenFound:!1});if(s)for(let r=s.length-1;r>=0;r--){const t=s[r];if(t instanceof rWe)for(const s of t.getKeys()){const r=i[s];if(!r)continue;const a=[];NWe(t.getRaw(s),e,a,new oWe),a.length>0&&(n[r]=a)}}if(t.has("A")){const i=[];NWe(t.get("A"),e,i,new oWe),i.length>0&&(n.Action=i)}return xVe(n)>0?n:null}const UWe={60:"&lt;",62:"&gt;",38:"&amp;",34:"&quot;",39:"&apos;"};function*HWe(e){for(let t=0,i=e.length;t<i;t++){const i=e.codePointAt(t);i>55295&&(i<57344||i>65533)&&t++,yield i}}function PWe(e){const t=[];let i=0;for(let n=0,s=e.length;n<s;n++){const s=e.codePointAt(n);if(32<=s&&s<=126){const r=UWe[s];r&&(i<n&&t.push(e.substring(i,n)),t.push(r),i=n+1)}else i<n&&t.push(e.substring(i,n)),t.push(`&#x${s.toString(16).toUpperCase()};`),s>55295&&(s<57344||s>65533)&&n++,i=n+1}return 0===t.length?e:(i<e.length&&t.push(e.substring(i,e.length)),t.join(""))}function OWe(e,t=!1){const i=/^("|').*("|')$/.exec(e);if(i&&i[1]===i[2]){if(new RegExp(`[^\\\\]${i[1]}`).test(e.slice(1,-1)))return t&&i[1],!1}else for(const n of e.split(/[ \t]+/))if(/^(\d|(-(\d|-)))/.test(n)||!/^[\w-\\]+$/.test(n))return!1;return!0}function GWe(e){const t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:i,fontWeight:n,italicAngle:s}=e;if(!OWe(i,!0))return!1;const r=n?n.toString():"";e.fontWeight=t.has(r)?r:"400";const a=parseFloat(s);return e.italicAngle=isNaN(a)||a<-90||a>90?"14":s.toString(),!0}function KWe(e){const t=new RegExp("^\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").replaceAll(".","\\.")+")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec(e);return(null==t?void 0:t[2])?{url:t[2],newWindow:"app.launchURL"===t[1]&&"true"===t[3]}:null}function qWe(e){if(Number.isInteger(e))return e.toString();const t=Math.round(100*e);return t%100==0?(t/100).toString():t%10==0?e.toFixed(1):e.toFixed(2)}function YWe(e){if(!e)return null;const t=new Map;for(const[i,n]of e){if(!i.startsWith(bKe))continue;let e=t.get(n.pageIndex);e||(e=[],t.set(n.pageIndex,e)),e.push(n)}return t.size>0?t:null}function VWe(e){return function(e){return/^[\x00-\x7F]*$/.test(e)}(e)?e:jWe(e,!0)}function WWe(e){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e.charCodeAt(i);t.push(DVe[n>>8&255],DVe[255&n])}return t.join("")}function jWe(e,t=!1){const i=[];t&&i.push("þÿ");for(let n=0,s=e.length;n<s;n++){const t=e.charCodeAt(n);i.push(String.fromCharCode(t>>8&255),String.fromCharCode(255&t))}return i.join("")}function JWe(e,t,i){switch(e){case 90:return[0,1,-1,0,t,0];case 180:return[-1,0,0,-1,t,i];case 270:return[0,-1,1,0,0,i];default:throw new Error("Invalid rotation")}}function zWe(e){return Math.ceil(Math.ceil(Math.log2(1+e))/8)}class XWe extends dWe{constructor(e,t,i,n){super(),this.bytes=e instanceof Uint8Array?e:new Uint8Array(e),this.start=t||0,this.pos=this.start,this.end=t+i||this.bytes.length,this.dict=n}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(e){const t=this.bytes,i=this.pos,n=this.end;if(!e)return t.subarray(i,n);let s=i+e;return s>n&&(s=n),this.pos=s,t.subarray(i,s)}getByteRange(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),this.bytes.subarray(e,t)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(e,t,i=null){return new XWe(this.bytes.buffer,e,t,i)}}class $We extends XWe{constructor(e){super(_Ve(e))}}class ZWe extends XWe{constructor(){super(new Uint8Array(0))}}class eje extends XWe{constructor(e,t,i){super(new Uint8Array(e),0,e,null),this.chunkSize=t,this._loadedChunks=new Set,this.numChunks=Math.ceil(e/t),this.manager=i,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}getMissingChunks(){const e=[];for(let t=0,i=this.numChunks;t<i;++t)this._loadedChunks.has(t)||e.push(t);return e}get numChunksLoaded(){return this._loadedChunks.size}get isDataLoaded(){return this.numChunksLoaded===this.numChunks}onReceiveData(e,t){const i=this.chunkSize;if(e%i!=0)throw new Error(`Bad begin offset: ${e}`);const n=e+t.byteLength;if(n%i!=0&&n!==this.bytes.length)throw new Error(`Bad end offset: ${n}`);this.bytes.set(new Uint8Array(t),e);const s=Math.floor(e/i),r=Math.floor((n-1)/i)+1;for(let a=s;a<r;++a)this._loadedChunks.add(a)}onReceiveProgressiveData(e){let t=this.progressiveDataLength;const i=Math.floor(t/this.chunkSize);this.bytes.set(new Uint8Array(e),t),t+=e.byteLength,this.progressiveDataLength=t;const n=t>=this.end?this.numChunks:Math.floor(t/this.chunkSize);for(let s=i;s<n;++s)this._loadedChunks.add(s)}ensureByte(e){if(e<this.progressiveDataLength)return;const t=Math.floor(e/this.chunkSize);if(!(t>this.numChunks)&&t!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(t))throw new fWe(e,e+1);this.lastSuccessfulEnsureByteChunk=t}}ensureRange(e,t){if(e>=t)return;if(t<=this.progressiveDataLength)return;const i=Math.floor(e/this.chunkSize);if(i>this.numChunks)return;const n=Math.min(Math.floor((t-1)/this.chunkSize)+1,this.numChunks);for(let s=i;s<n;++s)if(!this._loadedChunks.has(s))throw new fWe(e,t)}nextEmptyChunk(e){const t=this.numChunks;for(let i=0;i<t;++i){const n=(e+i)%t;if(!this._loadedChunks.has(n))return n}return null}hasChunk(e){return this._loadedChunks.has(e)}getByte(){const e=this.pos;return e>=this.end?-1:(e>=this.progressiveDataLength&&this.ensureByte(e),this.bytes[this.pos++])}getBytes(e){const t=this.bytes,i=this.pos,n=this.end;if(!e)return n>this.progressiveDataLength&&this.ensureRange(i,n),t.subarray(i,n);let s=i+e;return s>n&&(s=n),s>this.progressiveDataLength&&this.ensureRange(i,s),this.pos=s,t.subarray(i,s)}getByteRange(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),t>this.progressiveDataLength&&this.ensureRange(e,t),this.bytes.subarray(e,t)}makeSubStream(e,t,i=null){function n(){}t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e),n.prototype=Object.create(this),n.prototype.getMissingChunks=function(){const e=this.chunkSize,t=Math.floor(this.start/e),i=Math.floor((this.end-1)/e)+1,n=[];for(let s=t;s<i;++s)this._loadedChunks.has(s)||n.push(s);return n},Object.defineProperty(n.prototype,"isDataLoaded",{get(){return this.numChunksLoaded===this.numChunks||0===this.getMissingChunks().length},configurable:!0});const s=new n;return s.pos=s.start=e,s.end=e+t||this.end,s.dict=i,s}getBaseStreams(){return[this]}}class tje{constructor(e,t){this.length=t.length,this.chunkSize=t.rangeChunkSize,this.stream=new eje(this.length,this.chunkSize,this),this.pdfNetworkStream=e,this.disableAutoFetch=t.disableAutoFetch,this.msgHandler=t.msgHandler,this.currRequestId=0,this._chunksNeededByRequest=new Map,this._requestsByChunk=new Map,this._promisesByRequest=new Map,this.progressiveDataLength=0,this.aborted=!1,this._loadedStreamCapability=Promise.withResolvers()}sendRequest(e,t){const i=this.pdfNetworkStream.getRangeReader(e,t);i.isStreamingSupported||(i.onProgress=this.onProgress.bind(this));let n=[],s=0;return new Promise(((e,t)=>{const r=({value:a,done:o})=>{try{if(o){const t=vWe(n);return n=null,void e(t)}s+=a.byteLength,i.isStreamingSupported&&this.onProgress({loaded:s}),n.push(a),i.read().then(r,t)}catch(I2){t(I2)}};i.read().then(r,t)})).then((t=>{this.aborted||this.onReceiveData({chunk:t,begin:e})}))}requestAllChunks(e=!1){if(!e){const e=this.stream.getMissingChunks();this._requestChunks(e)}return this._loadedStreamCapability.promise}_requestChunks(e){const t=this.currRequestId++,i=new Set;this._chunksNeededByRequest.set(t,i);for(const r of e)this.stream.hasChunk(r)||i.add(r);if(0===i.size)return Promise.resolve();const n=Promise.withResolvers();this._promisesByRequest.set(t,n);const s=[];for(const r of i){let e=this._requestsByChunk.get(r);e||(e=[],this._requestsByChunk.set(r,e),s.push(r)),e.push(t)}if(s.length>0){const e=this.groupChunks(s);for(const t of e){const e=t.beginChunk*this.chunkSize,i=Math.min(t.endChunk*this.chunkSize,this.length);this.sendRequest(e,i).catch(n.reject)}}return n.promise.catch((e=>{if(!this.aborted)throw e}))}getStream(){return this.stream}requestRange(e,t){t=Math.min(t,this.length);const i=this.getBeginChunk(e),n=this.getEndChunk(t),s=[];for(let r=i;r<n;++r)s.push(r);return this._requestChunks(s)}requestRanges(e=[]){const t=[];for(const i of e){const e=this.getBeginChunk(i.begin),n=this.getEndChunk(i.end);for(let i=e;i<n;++i)t.includes(i)||t.push(i)}return t.sort((function(e,t){return e-t})),this._requestChunks(t)}groupChunks(e){const t=[];let i=-1,n=-1;for(let s=0,r=e.length;s<r;++s){const r=e[s];i<0&&(i=r),n>=0&&n+1!==r&&(t.push({beginChunk:i,endChunk:n+1}),i=r),s+1===e.length&&t.push({beginChunk:i,endChunk:r+1}),n=r}return t}onProgress(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}onReceiveData(e){const t=e.chunk,i=void 0===e.begin,n=i?this.progressiveDataLength:e.begin,s=n+t.byteLength,r=Math.floor(n/this.chunkSize),a=s<this.length?Math.floor(s/this.chunkSize):Math.ceil(s/this.chunkSize);i?(this.stream.onReceiveProgressiveData(t),this.progressiveDataLength=s):this.stream.onReceiveData(n,t),this.stream.isDataLoaded&&this._loadedStreamCapability.resolve(this.stream);const o=[];for(let l=r;l<a;++l){const e=this._requestsByChunk.get(l);if(e){this._requestsByChunk.delete(l);for(const t of e){const e=this._chunksNeededByRequest.get(t);e.has(l)&&e.delete(l),e.size>0||o.push(t)}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){let e;if(1===this.stream.numChunksLoaded){const t=this.stream.numChunks-1;this.stream.hasChunk(t)||(e=t)}else e=this.stream.nextEmptyChunk(a);Number.isInteger(e)&&this._requestChunks([e])}for(const l of o){const e=this._promisesByRequest.get(l);this._promisesByRequest.delete(l),e.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}onError(e){this._loadedStreamCapability.reject(e)}getBeginChunk(e){return Math.floor(e/this.chunkSize)}getEndChunk(e){return Math.floor((e-1)/this.chunkSize)+1}abort(e){var t;this.aborted=!0,null==(t=this.pdfNetworkStream)||t.cancelAllRequests(e);for(const i of this._promisesByRequest.values())i.reject(e)}}class ije{constructor(e,t){this.name=e,this.numComps=t}getRgb(e,t){const i=new Uint8ClampedArray(3);return this.getRgbItem(e,t,i,0),i}getRgbItem(e,t,i,n){gVe("Should not call ColorSpace.getRgbItem")}getRgbBuffer(e,t,i,n,s,r,a){gVe("Should not call ColorSpace.getRgbBuffer")}getOutputLength(e,t){gVe("Should not call ColorSpace.getOutputLength")}isPassthrough(e){return!1}isDefaultDecode(e,t){return ije.isDefaultDecode(e,this.numComps)}fillRgb(e,t,i,n,s,r,a,o,l){const A=t*i;let c=null;const u=1<<a,h=i!==s||t!==n;if(this.isPassthrough(a))c=o;else if(1===this.numComps&&A>u&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){const t=a<=8?new Uint8Array(u):new Uint16Array(u);for(let e=0;e<u;e++)t[e]=e;const i=new Uint8ClampedArray(3*u);if(this.getRgbBuffer(t,0,u,i,0,a,0),h){c=new Uint8Array(3*A);let e=0;for(let t=0;t<A;++t){const n=3*o[t];c[e++]=i[n],c[e++]=i[n+1],c[e++]=i[n+2]}}else{let t=0;for(let n=0;n<A;++n){const s=3*o[n];e[t++]=i[s],e[t++]=i[s+1],e[t++]=i[s+2],t+=l}}}else h?(c=new Uint8ClampedArray(3*A),this.getRgbBuffer(o,0,A,c,0,a,0)):this.getRgbBuffer(o,0,n*r,e,0,a,l);if(c)if(h)!function(e,t,i,n,s,r,a){a=1!==a?0:a;const o=i/s,l=n/r;let A,c=0;const u=new Uint16Array(s),h=3*i;for(let d=0;d<s;d++)u[d]=3*Math.floor(d*o);for(let d=0;d<r;d++){const i=Math.floor(d*l)*h;for(let n=0;n<s;n++)A=i+u[n],t[c++]=e[A++],t[c++]=e[A++],t[c++]=e[A++],c+=a}}(c,e,t,i,n,s,l);else{let t=0,i=0;for(let s=0,a=n*r;s<a;s++)e[t++]=c[i++],e[t++]=c[i++],e[t++]=c[i++],t+=l}}get usesZeroToOneRange(){return mVe(this,"usesZeroToOneRange",!0)}static _cache(e,t,i,n){if(!i)throw new Error('ColorSpace._cache - expected "localColorSpaceCache" argument.');if(!n)throw new Error('ColorSpace._cache - expected "parsedColorSpace" argument.');let s,r;e instanceof aWe&&(r=e,e=t.fetch(e)),e instanceof iWe&&(s=e.name),(s||r)&&i.set(s,r,n)}static getCached(e,t,i){if(!i)throw new Error('ColorSpace.getCached - expected "localColorSpaceCache" argument.');if(e instanceof aWe){const s=i.getByRef(e);if(s)return s;try{e=t.fetch(e)}catch(n){if(n instanceof fWe)throw n}}if(e instanceof iWe){const t=i.getByName(e.name);if(t)return t}return null}static async parseAsync({cs:e,xref:t,resources:i=null,pdfFunctionFactory:n,localColorSpaceCache:s}){const r=this._parse(e,t,i,n);return this._cache(e,t,s,r),r}static parse({cs:e,xref:t,resources:i=null,pdfFunctionFactory:n,localColorSpaceCache:s}){const r=this.getCached(e,t,s);if(r)return r;const a=this._parse(e,t,i,n);return this._cache(e,t,s,a),a}static _parse(e,t,i=null,n){if((e=t.fetchIfRef(e))instanceof iWe)switch(e.name){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"DeviceRGBA":return this.singletons.rgba;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"Pattern":return new sje(null);default:if(i instanceof rWe){const s=i.get("ColorSpace");if(s instanceof rWe){const r=s.get(e.name);if(r){if(r instanceof iWe)return this._parse(r,t,i,n);e=r;break}}}return e.name,this.singletons.gray}if(Array.isArray(e)){const s=t.fetchIfRef(e[0]).name;let r,a,o,l,A,c;switch(s){case"G":case"DeviceGray":default:return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"CalGray":return r=t.fetchIfRef(e[1]),l=r.getArray("WhitePoint"),A=r.getArray("BlackPoint"),c=r.get("Gamma"),new cje(l,A,c);case"CalRGB":r=t.fetchIfRef(e[1]),l=r.getArray("WhitePoint"),A=r.getArray("BlackPoint"),c=r.getArray("Gamma");const s=r.getArray("Matrix");return new hje(l,A,c,s);case"ICCBased":const u=t.fetchIfRef(e[1]).dict;a=u.get("N");const h=u.get("Alternate");if(h){const e=this._parse(h,t,i,n);if(e.numComps===a)return e}if(1===a)return this.singletons.gray;if(3===a)return this.singletons.rgb;if(4===a)return this.singletons.cmyk;break;case"Pattern":return o=e[1]||null,o&&(o=this._parse(o,t,i,n)),new sje(o);case"I":case"Indexed":o=this._parse(e[1],t,i,n);const d=Math.max(0,Math.min(t.fetchIfRef(e[2]),255)),g=t.fetchIfRef(e[3]);return new rje(o,d,g);case"Separation":case"DeviceN":const p=t.fetchIfRef(e[1]);a=Array.isArray(p)?p.length:1,o=this._parse(e[2],t,i,n);const f=n.create(e[3]);return new nje(a,o,f);case"Lab":r=t.fetchIfRef(e[1]),l=r.getArray("WhitePoint"),A=r.getArray("BlackPoint");const m=r.getArray("Range");return new dje(l,A,m)}}return this.singletons.gray}static isDefaultDecode(e,t){if(!Array.isArray(e))return!0;if(2*t!==e.length)return!0;for(let i=0,n=e.length;i<n;i+=2)if(0!==e[i]||1!==e[i+1])return!1;return!0}static get singletons(){return mVe(this,"singletons",{get gray(){return mVe(this,"gray",new aje)},get rgb(){return mVe(this,"rgb",new oje)},get rgba(){return mVe(this,"rgba",new lje)},get cmyk(){return mVe(this,"cmyk",new Aje)}})}}class nje extends ije{constructor(e,t,i){super("Alternate",e),this.base=t,this.tintFn=i,this.tmpBuf=new Float32Array(t.numComps)}getRgbItem(e,t,i,n){const s=this.tmpBuf;this.tintFn(e,t,s,0),this.base.getRgbItem(s,0,i,n)}getRgbBuffer(e,t,i,n,s,r,a){const o=this.tintFn,l=this.base,A=1/((1<<r)-1),c=l.numComps,u=l.usesZeroToOneRange,h=(l.isPassthrough(8)||!u)&&0===a;let d=h?s:0;const g=h?n:new Uint8ClampedArray(c*i),p=this.numComps,f=new Float32Array(p),m=new Float32Array(c);let C,I;for(C=0;C<i;C++){for(I=0;I<p;I++)f[I]=e[t++]*A;if(o(f,0,m,0),u)for(I=0;I<c;I++)g[d++]=255*m[I];else l.getRgbItem(m,0,g,d),d+=c}h||l.getRgbBuffer(g,0,i,n,s,8,a)}getOutputLength(e,t){return this.base.getOutputLength(e*this.base.numComps/this.numComps,t)}}class sje extends ije{constructor(e){super("Pattern",null),this.base=e}isDefaultDecode(e,t){gVe("Should not call PatternCS.isDefaultDecode")}}class rje extends ije{constructor(e,t,i){super("Indexed",1),this.base=e;const n=e.numComps*(t+1);if(this.lookup=new Uint8Array(n),i instanceof dWe){const e=i.getBytes(n);this.lookup.set(e)}else{if("string"!=typeof i)throw new EVe(`IndexedCS - unrecognized lookup table: ${i}`);for(let e=0;e<n;++e)this.lookup[e]=255&i.charCodeAt(e)}}getRgbItem(e,t,i,n){const s=this.base.numComps,r=e[t]*s;this.base.getRgbBuffer(this.lookup,r,1,i,n,8,0)}getRgbBuffer(e,t,i,n,s,r,a){const o=this.base,l=o.numComps,A=o.getOutputLength(l,a),c=this.lookup;for(let u=0;u<i;++u){const i=e[t++]*l;o.getRgbBuffer(c,i,1,n,s,8,a),s+=A}}getOutputLength(e,t){return this.base.getOutputLength(e*this.base.numComps,t)}isDefaultDecode(e,t){return!Array.isArray(e)||(2!==e.length||(!Number.isInteger(t)||t<1||0===e[0]&&e[1]===(1<<t)-1))}}class aje extends ije{constructor(){super("DeviceGray",1)}getRgbItem(e,t,i,n){const s=255*e[t];i[n]=i[n+1]=i[n+2]=s}getRgbBuffer(e,t,i,n,s,r,a){const o=255/((1<<r)-1);let l=t,A=s;for(let c=0;c<i;++c){const t=o*e[l++];n[A++]=t,n[A++]=t,n[A++]=t,A+=a}}getOutputLength(e,t){return e*(3+t)}}class oje extends ije{constructor(){super("DeviceRGB",3)}getRgbItem(e,t,i,n){i[n]=255*e[t],i[n+1]=255*e[t+1],i[n+2]=255*e[t+2]}getRgbBuffer(e,t,i,n,s,r,a){if(8===r&&0===a)return void n.set(e.subarray(t,t+3*i),s);const o=255/((1<<r)-1);let l=t,A=s;for(let c=0;c<i;++c)n[A++]=o*e[l++],n[A++]=o*e[l++],n[A++]=o*e[l++],A+=a}getOutputLength(e,t){return e*(3+t)/3|0}isPassthrough(e){return 8===e}}class lje extends ije{constructor(){super("DeviceRGBA",4)}getOutputLength(e,t){return 4*e}isPassthrough(e){return 8===e}fillRgb(e,t,i,n,s,r,a,o,l){i!==s||t!==n?function(e,t,i,n,s,r,a){const o=i/s,l=n/r;let A=0;const c=new Uint16Array(s);if(1===a){for(let e=0;e<s;e++)c[e]=Math.floor(e*o);const n=new Uint32Array(e.buffer),a=new Uint32Array(t.buffer),u=kVe.isLittleEndian?16777215:4294967040;for(let e=0;e<r;e++){const t=n.subarray(Math.floor(e*l)*i);for(let e=0;e<s;e++)a[A++]|=t[c[e]]&u}}else{const n=4,a=i*n;for(let e=0;e<s;e++)c[e]=Math.floor(e*o)*n;for(let i=0;i<r;i++){const n=e.subarray(Math.floor(i*l)*a);for(let e=0;e<s;e++){const i=c[e];t[A++]=n[i],t[A++]=n[i+1],t[A++]=n[i+2]}}}}(o,e,t,i,n,s,l):function(e,t,i){if(1===i){const i=new Uint32Array(e.buffer),n=new Uint32Array(t.buffer),s=kVe.isLittleEndian?16777215:4294967040;for(let e=0,t=i.length;e<t;e++)n[e]|=i[e]&s}else{let i=0;for(let n=0,s=e.length;n<s;n+=4)t[i++]=e[n],t[i++]=e[n+1],t[i++]=e[n+2]}}(o,e,l)}}class Aje extends ije{constructor(){super("DeviceCMYK",4),yc(this,zl)}getRgbItem(e,t,i,n){Ec(this,zl,Xl).call(this,e,t,1,i,n)}getRgbBuffer(e,t,i,n,s,r,a){const o=1/((1<<r)-1);for(let l=0;l<i;l++)Ec(this,zl,Xl).call(this,e,t,o,n,s),t+=4,s+=3+a}getOutputLength(e,t){return e/4*(3+t)|0}}zl=new WeakSet,Xl=function(e,t,i,n,s){const r=e[t]*i,a=e[t+1]*i,o=e[t+2]*i,l=e[t+3]*i;n[s]=255+r*(-4.387332384609988*r+54.48615194189176*a+18.82290502165302*o+212.25662451639585*l-285.2331026137004)+a*(1.7149763477362134*a-5.6096736904047315*o+-17.873870861415444*l-5.497006427196366)+o*(-2.5217340131683033*o-21.248923337353073*l+17.5119270841813)+l*(-21.86122147463605*l-189.48180835922747),n[s+1]=255+r*(8.841041422036149*r+60.118027045597366*a+6.871425592049007*o+31.159100130055922*l-79.2970844816548)+a*(-15.310361306967817*a+17.575251261109482*o+131.35250912493976*l-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*l-24.86741582555878)+l*(-20.737325471181034*l-187.80453709719578),n[s+2]=255+r*(.8842522430003296*r+8.078677503112928*a+30.89978309703729*o-.23883238689178934*l-14.183576799673286)+a*(10.49593273432072*a+63.02378494754052*o+50.606957656360734*l-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*l-193.58209356861505)+l*(-22.33816807309886*l-180.12613974708367)};class cje extends ije{constructor(e,t,i){if(super("CalGray",1),yc(this,$l),!e)throw new EVe("WhitePoint missing - required for color space CalGray");if([this.XW,this.YW,this.ZW]=e,[this.XB,this.YB,this.ZB]=t||[0,0,0],this.G=i||1,this.XW<0||this.ZW<0||1!==this.YW)throw new EVe(`Invalid WhitePoint components for ${this.name}, no fallback available`);(this.XB<0||this.YB<0||this.ZB<0)&&(this.name,this.XB=this.YB=this.ZB=0),0===this.XB&&0===this.YB&&0===this.ZB||(this.name,this.XB,this.YB,this.ZB),this.G<1&&(this.G,this.name,this.G=1)}getRgbItem(e,t,i,n){Ec(this,$l,Zl).call(this,e,t,i,n,1)}getRgbBuffer(e,t,i,n,s,r,a){const o=1/((1<<r)-1);for(let l=0;l<i;++l)Ec(this,$l,Zl).call(this,e,t,n,s,o),t+=1,s+=3+a}getOutputLength(e,t){return e*(3+t)}}$l=new WeakSet,Zl=function(e,t,i,n,s){const r=(e[t]*s)**this.G,a=this.YW*r,o=Math.max(295.8*a**.3333333333333333-40.8,0);i[n]=o,i[n+1]=o,i[n+2]=o};const uje=class extends ije{constructor(e,t,i,n){if(super("CalRGB",3),yc(this,lA),!e)throw new EVe("WhitePoint missing - required for color space CalRGB");const[s,r,a]=this.whitePoint=e,[o,l,A]=this.blackPoint=t||new Float32Array(3);if([this.GR,this.GG,this.GB]=i||new Float32Array([1,1,1]),[this.MXA,this.MYA,this.MZA,this.MXB,this.MYB,this.MZB,this.MXC,this.MYC,this.MZC]=n||new Float32Array([1,0,0,0,1,0,0,0,1]),s<0||a<0||1!==r)throw new EVe(`Invalid WhitePoint components for ${this.name}, no fallback available`);(o<0||l<0||A<0)&&(this.name,this.blackPoint=new Float32Array(3)),(this.GR<0||this.GG<0||this.GB<0)&&(this.GR,this.GG,this.GB,this.name,this.GR=this.GG=this.GB=1)}getRgbItem(e,t,i,n){Ec(this,lA,CA).call(this,e,t,i,n,1)}getRgbBuffer(e,t,i,n,s,r,a){const o=1/((1<<r)-1);for(let l=0;l<i;++l)Ec(this,lA,CA).call(this,e,t,n,s,o),t+=3,s+=3+a}getOutputLength(e,t){return e*(3+t)/3|0}};eA=new WeakMap,tA=new WeakMap,iA=new WeakMap,nA=new WeakMap,sA=new WeakMap,rA=new WeakMap,aA=new WeakMap,oA=new WeakMap,lA=new WeakSet,AA=function(e,t,i){i[0]=e[0]*t[0]+e[1]*t[1]+e[2]*t[2],i[1]=e[3]*t[0]+e[4]*t[1]+e[5]*t[2],i[2]=e[6]*t[0]+e[7]*t[1]+e[8]*t[2]},cA=function(e,t,i){i[0]=1*t[0]/e[0],i[1]=1*t[1]/e[1],i[2]=1*t[2]/e[2]},uA=function(e,t,i){i[0]=.95047*t[0]/e[0],i[1]=1*t[1]/e[1],i[2]=1.08883*t[2]/e[2]},hA=function(e){return e<=.0031308?Ec(this,lA,dA).call(this,0,1,12.92*e):e>=.99554525?1:Ec(this,lA,dA).call(this,0,1,1.055*e**(1/2.4)-.055)},dA=function(e,t,i){return Math.max(e,Math.min(t,i))},gA=function(e){return e<0?-Ec(this,lA,gA).call(this,-e):e>8?((e+16)/116)**3:e*Bc(uje,oA)},pA=function(e,t,i){if(0===e[0]&&0===e[1]&&0===e[2])return i[0]=t[0],i[1]=t[1],void(i[2]=t[2]);const n=Ec(this,lA,gA).call(this,0),s=(1-n)/(1-Ec(this,lA,gA).call(this,e[0])),r=1-s,a=(1-n)/(1-Ec(this,lA,gA).call(this,e[1])),o=1-a,l=(1-n)/(1-Ec(this,lA,gA).call(this,e[2])),A=1-l;i[0]=t[0]*s+r,i[1]=t[1]*a+o,i[2]=t[2]*l+A},fA=function(e,t,i){if(1===e[0]&&1===e[2])return i[0]=t[0],i[1]=t[1],void(i[2]=t[2]);const n=i;Ec(this,lA,AA).call(this,Bc(uje,eA),t,n);const s=Bc(uje,sA);Ec(this,lA,cA).call(this,e,n,s),Ec(this,lA,AA).call(this,Bc(uje,tA),s,i)},mA=function(e,t,i){const n=i;Ec(this,lA,AA).call(this,Bc(uje,eA),t,n);const s=Bc(uje,sA);Ec(this,lA,uA).call(this,e,n,s),Ec(this,lA,AA).call(this,Bc(uje,tA),s,i)},CA=function(e,t,i,n,s){const r=Ec(this,lA,dA).call(this,0,1,e[t]*s),a=Ec(this,lA,dA).call(this,0,1,e[t+1]*s),o=Ec(this,lA,dA).call(this,0,1,e[t+2]*s),l=1===r?1:r**this.GR,A=1===a?1:a**this.GG,c=1===o?1:o**this.GB,u=this.MXA*l+this.MXB*A+this.MXC*c,h=this.MYA*l+this.MYB*A+this.MYC*c,d=this.MZA*l+this.MZB*A+this.MZC*c,g=Bc(uje,rA);g[0]=u,g[1]=h,g[2]=d;const p=Bc(uje,aA);Ec(this,lA,fA).call(this,this.whitePoint,g,p);const f=Bc(uje,rA);Ec(this,lA,pA).call(this,this.blackPoint,p,f);const m=Bc(uje,aA);Ec(this,lA,mA).call(this,Bc(uje,nA),f,m);const C=Bc(uje,rA);Ec(this,lA,AA).call(this,Bc(uje,iA),m,C),i[n]=255*Ec(this,lA,hA).call(this,C[0]),i[n+1]=255*Ec(this,lA,hA).call(this,C[1]),i[n+2]=255*Ec(this,lA,hA).call(this,C[2])},yc(uje,eA,new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296])),yc(uje,tA,new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867])),yc(uje,iA,new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252])),yc(uje,nA,new Float32Array([1,1,1])),yc(uje,sA,new Float32Array(3)),yc(uje,rA,new Float32Array(3)),yc(uje,aA,new Float32Array(3)),yc(uje,oA,(24/116)**3/8);let hje=uje;class dje extends ije{constructor(e,t,i){if(super("Lab",3),yc(this,IA),!e)throw new EVe("WhitePoint missing - required for color space Lab");if([this.XW,this.YW,this.ZW]=e,[this.amin,this.amax,this.bmin,this.bmax]=i||[-100,100,-100,100],[this.XB,this.YB,this.ZB]=t||[0,0,0],this.XW<0||this.ZW<0||1!==this.YW)throw new EVe("Invalid WhitePoint components, no fallback available");(this.XB<0||this.YB<0||this.ZB<0)&&(this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&(this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}getRgbItem(e,t,i,n){Ec(this,IA,yA).call(this,e,t,!1,i,n)}getRgbBuffer(e,t,i,n,s,r,a){const o=(1<<r)-1;for(let l=0;l<i;l++)Ec(this,IA,yA).call(this,e,t,o,n,s),t+=3,s+=3+a}getOutputLength(e,t){return e*(3+t)/3|0}isDefaultDecode(e,t){return!0}get usesZeroToOneRange(){return mVe(this,"usesZeroToOneRange",!1)}}function gje(e,t){let i=0;for(let n=0;n<=t;n++)i=i<<8|e[n];return i>>>0}function pje(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode(...e.subarray(0,t+1))}function fje(e,t,i){let n=0;for(let s=i;s>=0;s--)n+=e[s]+t[s],e[s]=255&n,n>>=8}function mje(e,t){let i=1;for(let n=t;n>=0&&i>0;n--)i+=e[n],e[n]=255&i,i>>=8}IA=new WeakSet,vA=function(e){return e>=6/29?e**3:108/841*(e-4/29)},BA=function(e,t,i,n){return i+e*(n-i)/t},yA=function(e,t,i,n,s){let r=e[t],a=e[t+1],o=e[t+2];!1!==i&&(r=Ec(this,IA,BA).call(this,r,i,0,100),a=Ec(this,IA,BA).call(this,a,i,this.amin,this.amax),o=Ec(this,IA,BA).call(this,o,i,this.bmin,this.bmax)),a>this.amax?a=this.amax:a<this.amin&&(a=this.amin),o>this.bmax?o=this.bmax:o<this.bmin&&(o=this.bmin);const l=(r+16)/116,A=l+a/500,c=l-o/200,u=this.XW*Ec(this,IA,vA).call(this,A),h=this.YW*Ec(this,IA,vA).call(this,l),d=this.ZW*Ec(this,IA,vA).call(this,c);let g,p,f;this.ZW<1?(g=3.1339*u+-1.617*h+-.4906*d,p=-.9785*u+1.916*h+.0333*d,f=.072*u+-.229*h+1.4057*d):(g=3.2406*u+-1.5372*h+-.4986*d,p=-.9689*u+1.8758*h+.0415*d,f=.0557*u+-.204*h+1.057*d),n[s]=255*Math.sqrt(g),n[s+1]=255*Math.sqrt(p),n[s+2]=255*Math.sqrt(f)};const Cje=16;class Ije{constructor(e){this.buffer=e,this.pos=0,this.end=e.length,this.tmpBuf=new Uint8Array(19)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){let e,t=0;do{const i=this.readByte();if(i<0)throw new EVe("unexpected EOF in bcmap");e=!(128&i),t=t<<7|127&i}while(!e);return t}readSigned(){const e=this.readNumber();return 1&e?~(e>>>1):e>>>1}readHex(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1)),this.pos+=t+1}readHexNumber(e,t){let i;const n=this.tmpBuf;let s=0;do{const e=this.readByte();if(e<0)throw new EVe("unexpected EOF in bcmap");i=!(128&e),n[s++]=127&e}while(!i);let r=t,a=0,o=0;for(;r>=0;){for(;o<8&&n.length>0;)a|=n[--s]<<o,o+=7;e[r]=255&a,r--,a>>=8,o-=8}}readHexSigned(e,t){this.readHexNumber(e,t);const i=1&e[t]?255:0;let n=0;for(let s=0;s<=t;s++)n=(1&n)<<8|e[s],e[s]=n>>1^i}readString(){const e=this.readNumber(),t=new Array(e);for(let i=0;i<e;i++)t[i]=this.readNumber();return String.fromCharCode(...t)}}class vje{async process(e,t,i){const n=new Ije(e),s=n.readByte();t.vertical=!!(1&s);let r=null;const a=new Uint8Array(Cje),o=new Uint8Array(Cje),l=new Uint8Array(Cje),A=new Uint8Array(Cje),c=new Uint8Array(Cje);let u,h;for(;(h=n.readByte())>=0;){const e=h>>5;if(7===e){switch(31&h){case 0:n.readString();break;case 1:r=n.readString()}continue}const i=!!(16&h),s=15&h;if(s+1>Cje)throw new Error("BinaryCMapReader.process: Invalid dataSize.");const d=1,g=n.readNumber();switch(e){case 0:n.readHex(a,s),n.readHexNumber(o,s),fje(o,a,s),t.addCodespaceRange(s+1,gje(a,s),gje(o,s));for(let e=1;e<g;e++)mje(o,s),n.readHexNumber(a,s),fje(a,o,s),n.readHexNumber(o,s),fje(o,a,s),t.addCodespaceRange(s+1,gje(a,s),gje(o,s));break;case 1:n.readHex(a,s),n.readHexNumber(o,s),fje(o,a,s),n.readNumber();for(let e=1;e<g;e++)mje(o,s),n.readHexNumber(a,s),fje(a,o,s),n.readHexNumber(o,s),fje(o,a,s),n.readNumber();break;case 2:n.readHex(l,s),u=n.readNumber(),t.mapOne(gje(l,s),u);for(let e=1;e<g;e++)mje(l,s),i||(n.readHexNumber(c,s),fje(l,c,s)),u=n.readSigned()+(u+1),t.mapOne(gje(l,s),u);break;case 3:n.readHex(a,s),n.readHexNumber(o,s),fje(o,a,s),u=n.readNumber(),t.mapCidRange(gje(a,s),gje(o,s),u);for(let e=1;e<g;e++)mje(o,s),i?a.set(o):(n.readHexNumber(a,s),fje(a,o,s)),n.readHexNumber(o,s),fje(o,a,s),u=n.readNumber(),t.mapCidRange(gje(a,s),gje(o,s),u);break;case 4:n.readHex(l,d),n.readHex(A,s),t.mapOne(gje(l,d),pje(A,s));for(let e=1;e<g;e++)mje(l,d),i||(n.readHexNumber(c,d),fje(l,c,d)),mje(A,s),n.readHexSigned(c,s),fje(A,c,s),t.mapOne(gje(l,d),pje(A,s));break;case 5:n.readHex(a,d),n.readHexNumber(o,d),fje(o,a,d),n.readHex(A,s),t.mapBfRange(gje(a,d),gje(o,d),pje(A,s));for(let e=1;e<g;e++)mje(o,d),i?a.set(o):(n.readHexNumber(a,d),fje(a,o,d)),n.readHexNumber(o,d),fje(o,a,d),n.readHex(A,s),t.mapBfRange(gje(a,d),gje(o,d),pje(A,s));break;default:throw new Error(`BinaryCMapReader.process - unknown type: ${e}`)}}return r?i(r):t}}const Bje=new Uint8Array(0);class yje extends dWe{constructor(e){if(super(),this._rawMinBufferLength=e||0,this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=Bje,this.minBufferLength=512,e)for(;this.minBufferLength<e;)this.minBufferLength*=2}get isEmpty(){for(;!this.eof&&0===this.bufferLength;)this.readBlock();return 0===this.bufferLength}ensureBuffer(e){const t=this.buffer;if(e<=t.byteLength)return t;let i=this.minBufferLength;for(;i<e;)i*=2;const n=new Uint8Array(i);return n.set(t),this.buffer=n}getByte(){const e=this.pos;for(;this.bufferLength<=e;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}getBytes(e,t=null){const i=this.pos;let n;if(e){for(this.ensureBuffer(i+e),n=i+e;!this.eof&&this.bufferLength<n;)this.readBlock(t);const s=this.bufferLength;n>s&&(n=s)}else{for(;!this.eof;)this.readBlock(t);n=this.bufferLength}return this.pos=n,this.buffer.subarray(i,n)}async getImageData(e,t=null){if(!this.canAsyncDecodeImageFromBuffer)return this.getBytes(e,t);const i=await this.stream.asyncGetBytes();return this.decodeImage(i,t)}reset(){this.pos=0}makeSubStream(e,t,i=null){if(void 0===t)for(;!this.eof;)this.readBlock();else{const i=e+t;for(;this.bufferLength<=i&&!this.eof;)this.readBlock()}return new XWe(this.buffer,e,t,i)}getBaseStreams(){return this.str?this.str.getBaseStreams():null}}class bje extends yje{constructor(e,t=null){e=e.filter((e=>e instanceof dWe));let i=0;for(const n of e)i+=n instanceof yje?n._rawMinBufferLength:n.length;super(i),this.streams=e,this._onError=t}readBlock(){var e;const t=this.streams;if(0===t.length)return void(this.eof=!0);const i=t.shift();let n;try{n=i.getBytes()}catch(a){if(this._onError)return void this._onError(a,null==(e=i.dict)?void 0:e.objId);throw a}const s=this.bufferLength,r=s+n.length;this.ensureBuffer(r).set(n,s),this.bufferLength=r}getBaseStreams(){const e=[];for(const t of this.streams){const i=t.getBaseStreams();i&&e.push(...i)}return e.length>0?e:null}}class Eje extends yje{constructor(e,t){t&&(t*=.8),super(t),this.str=e,this.dict=e.dict,this.input=new Uint8Array(5)}readBlock(){const e=this.str;let t=e.getByte();for(;SWe(t);)t=e.getByte();if(-1===t||126===t)return void(this.eof=!0);const i=this.bufferLength;let n,s;if(122===t){for(n=this.ensureBuffer(i+4),s=0;s<4;++s)n[i+s]=0;this.bufferLength+=4}else{const r=this.input;for(r[0]=t,s=1;s<5;++s){for(t=e.getByte();SWe(t);)t=e.getByte();if(r[s]=t,-1===t||126===t)break}if(n=this.ensureBuffer(i+s-1),this.bufferLength+=s-1,s<5){for(;s<5;++s)r[s]=117;this.eof=!0}let a=0;for(s=0;s<5;++s)a=85*a+(r[s]-33);for(s=3;s>=0;--s)n[i+s]=255&a,a>>=8}}}class wje extends yje{constructor(e,t){t&&(t*=.5),super(t),this.str=e,this.dict=e.dict,this.firstDigit=-1}readBlock(){const e=this.str.getBytes(8e3);if(!e.length)return void(this.eof=!0);const t=e.length+1>>1,i=this.ensureBuffer(this.bufferLength+t);let n=this.bufferLength,s=this.firstDigit;for(const r of e){let e;if(r>=48&&r<=57)e=15&r;else{if(!(r>=65&&r<=70||r>=97&&r<=102)){if(62===r){this.eof=!0;break}continue}e=9+(15&r)}s<0?s=e:(i[n++]=s<<4|e,s=-1)}s>=0&&this.eof&&(i[n++]=s<<4,s=-1),this.firstDigit=s,this.bufferLength=n}}const Qje=-1,_je=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],Sje=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],xje=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],kje=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],Dje=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],Fje=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];class Tje{constructor(e,t={}){if(!e||"function"!=typeof e.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');let i;for(this.source=e,this.eof=!1,this.encoding=t.K||0,this.eoline=t.EndOfLine||!1,this.byteAlign=t.EncodedByteAlign||!1,this.columns=t.Columns||1728,this.rows=t.Rows||0,this.eoblock=t.EndOfBlock??!0,this.black=t.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;0===(i=this._lookBits(12));)this._eatBits(1);1===i&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}readNextChar(){if(this.eof)return-1;const e=this.refLine,t=this.codingLine,i=this.columns;let n,s,r,a,o;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;let r,o,l;if(this.err=!1,this.nextLine2D){for(a=0;t[a]<i;++a)e[a]=t[a];for(e[a++]=i,e[a]=i,t[0]=0,this.codingPos=0,n=0,s=0;t[this.codingPos]<i;)switch(r=this._getTwoDimCode(),r){case 0:this._addPixels(e[n+1],s),e[n+1]<i&&(n+=2);break;case 1:if(r=o=0,s){do{r+=l=this._getBlackCode()}while(l>=64);do{o+=l=this._getWhiteCode()}while(l>=64)}else{do{r+=l=this._getWhiteCode()}while(l>=64);do{o+=l=this._getBlackCode()}while(l>=64)}for(this._addPixels(t[this.codingPos]+r,s),t[this.codingPos]<i&&this._addPixels(t[this.codingPos]+o,1^s);e[n]<=t[this.codingPos]&&e[n]<i;)n+=2;break;case 7:if(this._addPixels(e[n]+3,s),s^=1,t[this.codingPos]<i)for(++n;e[n]<=t[this.codingPos]&&e[n]<i;)n+=2;break;case 5:if(this._addPixels(e[n]+2,s),s^=1,t[this.codingPos]<i)for(++n;e[n]<=t[this.codingPos]&&e[n]<i;)n+=2;break;case 3:if(this._addPixels(e[n]+1,s),s^=1,t[this.codingPos]<i)for(++n;e[n]<=t[this.codingPos]&&e[n]<i;)n+=2;break;case 2:if(this._addPixels(e[n],s),s^=1,t[this.codingPos]<i)for(++n;e[n]<=t[this.codingPos]&&e[n]<i;)n+=2;break;case 8:if(this._addPixelsNeg(e[n]-3,s),s^=1,t[this.codingPos]<i)for(n>0?--n:++n;e[n]<=t[this.codingPos]&&e[n]<i;)n+=2;break;case 6:if(this._addPixelsNeg(e[n]-2,s),s^=1,t[this.codingPos]<i)for(n>0?--n:++n;e[n]<=t[this.codingPos]&&e[n]<i;)n+=2;break;case 4:if(this._addPixelsNeg(e[n]-1,s),s^=1,t[this.codingPos]<i)for(n>0?--n:++n;e[n]<=t[this.codingPos]&&e[n]<i;)n+=2;break;case Qje:this._addPixels(i,0),this.eof=!0;break;default:this._addPixels(i,0),this.err=!0}}else for(t[0]=0,this.codingPos=0,s=0;t[this.codingPos]<i;){if(r=0,s)do{r+=l=this._getBlackCode()}while(l>=64);else do{r+=l=this._getWhiteCode()}while(l>=64);this._addPixels(t[this.codingPos]+r,s),s^=1}let A=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(r=this._lookBits(12),this.eoline)for(;r!==Qje&&1!==r;)this._eatBits(1),r=this._lookBits(12);else for(;0===r;)this._eatBits(1),r=this._lookBits(12);1===r?(this._eatBits(12),A=!0):r===Qje&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&A&&this.byteAlign){if(r=this._lookBits(12),1===r){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(a=0;a<4;++a)r=this._lookBits(12),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(r=this._lookBits(13),r===Qje)return this.eof=!0,-1;if(r>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&r))}this.outputBits=t[0]>0?t[this.codingPos=0]:t[this.codingPos=1],this.row++}if(this.outputBits>=8)o=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&t[this.codingPos]<i&&(this.codingPos++,this.outputBits=t[this.codingPos]-t[this.codingPos-1]);else{r=8,o=0;do{if("number"!=typeof this.outputBits)throw new EVe('Invalid /CCITTFaxDecode data, "outputBits" must be a number.');this.outputBits>r?(o<<=r,1&this.codingPos||(o|=255>>8-r),this.outputBits-=r,r=0):(o<<=this.outputBits,1&this.codingPos||(o|=255>>8-this.outputBits),r-=this.outputBits,this.outputBits=0,t[this.codingPos]<i?(this.codingPos++,this.outputBits=t[this.codingPos]-t[this.codingPos-1]):r>0&&(o<<=r,r=0))}while(r)}return this.black&&(o^=255),o}_addPixels(e,t){const i=this.codingLine;let n=this.codingPos;e>i[n]&&(e>this.columns&&(this.err=!0,e=this.columns),1&n^t&&++n,i[n]=e),this.codingPos=n}_addPixelsNeg(e,t){const i=this.codingLine;let n=this.codingPos;if(e>i[n])e>this.columns&&(this.err=!0,e=this.columns),1&n^t&&++n,i[n]=e;else if(e<i[n]){for(e<0&&(this.err=!0,e=0);n>0&&e<i[n-1];)--n;i[n]=e}this.codingPos=n}_findTableCode(e,t,i,n){const s=n||0;for(let r=e;r<=t;++r){let e=this._lookBits(r);if(e===Qje)return[!0,1,!1];if(r<t&&(e<<=t-r),!s||e>=s){const t=i[e-s];if(t[0]===r)return this._eatBits(r),[!0,t[1],!0]}}return[!1,0,!1]}_getTwoDimCode(){let e,t=0;if(this.eoblock){if(t=this._lookBits(7),e=_je[t],(null==e?void 0:e[0])>0)return this._eatBits(e[0]),e[1]}else{const e=this._findTableCode(1,7,_je);if(e[0]&&e[2])return e[1]}return Qje}_getWhiteCode(){let e,t=0;if(this.eoblock){if(t=this._lookBits(12),t===Qje)return 1;if(e=t>>5?xje[t>>3]:Sje[t],e[0]>0)return this._eatBits(e[0]),e[1]}else{let e=this._findTableCode(1,9,xje);if(e[0])return e[1];if(e=this._findTableCode(11,12,Sje),e[0])return e[1]}return this._eatBits(1),1}_getBlackCode(){let e,t;if(this.eoblock){if(e=this._lookBits(13),e===Qje)return 1;if(t=e>>7?!(e>>9)&&e>>7?Dje[(e>>1)-64]:Fje[e>>7]:kje[e],t[0]>0)return this._eatBits(t[0]),t[1]}else{let e=this._findTableCode(2,6,Fje);if(e[0])return e[1];if(e=this._findTableCode(7,12,Dje,64),e[0])return e[1];if(e=this._findTableCode(10,13,kje),e[0])return e[1]}return this._eatBits(1),1}_lookBits(e){let t;for(;this.inputBits<e;){if(-1===(t=this.source.next()))return 0===this.inputBits?Qje:this.inputBuf<<e-this.inputBits&65535>>16-e;this.inputBuf=this.inputBuf<<8|t,this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e}_eatBits(e){(this.inputBits-=e)<0&&(this.inputBits=0)}}class Mje extends yje{constructor(e,t,i){super(t),this.str=e,this.dict=e.dict,i instanceof rWe||(i=rWe.empty);const n={next:()=>e.getByte()};this.ccittFaxDecoder=new Tje(n,{K:i.get("K"),EndOfLine:i.get("EndOfLine"),EncodedByteAlign:i.get("EncodedByteAlign"),Columns:i.get("Columns"),Rows:i.get("Rows"),EndOfBlock:i.get("EndOfBlock"),BlackIs1:i.get("BlackIs1")})}readBlock(){for(;!this.eof;){const e=this.ccittFaxDecoder.readNextChar();if(-1===e)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=e}}}const Rje=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Nje=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),Lje=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),Uje=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],Hje=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];class Pje extends yje{constructor(e,t){super(t),yc(this,bA),this.str=e,this.dict=e.dict;const i=e.getByte(),n=e.getByte();if(-1===i||-1===n)throw new EVe(`Invalid header in flate stream: ${i}, ${n}`);if(8!=(15&i))throw new EVe(`Unknown compression method in flate stream: ${i}, ${n}`);if(((i<<8)+n)%31!=0)throw new EVe(`Bad FCHECK in flate stream: ${i}, ${n}`);if(32&n)throw new EVe(`FDICT bit set in flate stream: ${i}, ${n}`);this.codeSize=0,this.codeBuf=0}async getImageData(e,t){const i=await this.asyncGetBytes();return(null==i?void 0:i.subarray(0,e))||this.getBytes(e)}async asyncGetBytes(){this.str.reset();const e=this.str.getBytes();try{const{readable:t,writable:i}=new DecompressionStream("deflate"),n=i.getWriter();await n.ready,n.write(e).then((async()=>{await n.ready,await n.close()})).catch((()=>{}));const s=[];let r=0;for await(const e of t)s.push(e),r+=e.byteLength;const a=new Uint8Array(r);let o=0;for(const e of s)a.set(e,o),o+=e.byteLength;return a}catch{return this.str=new XWe(e,2,e.length,this.str.dict),this.reset(),null}}get isAsync(){return!0}getBits(e){const t=this.str;let i,n=this.codeSize,s=this.codeBuf;for(;n<e;){if(-1===(i=t.getByte()))throw new EVe("Bad encoding in flate stream");s|=i<<n,n+=8}return i=s&(1<<e)-1,this.codeBuf=s>>e,this.codeSize=n-=e,i}getCode(e){const t=this.str,i=e[0],n=e[1];let s,r=this.codeSize,a=this.codeBuf;for(;r<n&&-1!==(s=t.getByte());)a|=s<<r,r+=8;const o=i[a&(1<<n)-1],l=o>>16,A=65535&o;if(l<1||r<l)throw new EVe("Bad encoding in flate stream");return this.codeBuf=a>>l,this.codeSize=r-l,A}generateHuffmanTable(e){const t=e.length;let i,n=0;for(i=0;i<t;++i)e[i]>n&&(n=e[i]);const s=1<<n,r=new Int32Array(s);for(let a=1,o=0,l=2;a<=n;++a,o<<=1,l<<=1)for(let n=0;n<t;++n)if(e[n]===a){let e=0,t=o;for(i=0;i<a;++i)e=e<<1|1&t,t>>=1;for(i=e;i<s;i+=l)r[i]=a<<16|n;++o}return[r,n]}readBlock(){let e,t,i;const n=this.str;try{t=this.getBits(3)}catch(l){return void Ec(this,bA,EA).call(this,l.message)}if(1&t&&(this.eof=!0),t>>=1,0===t){let t;if(-1===(t=n.getByte()))return void Ec(this,bA,EA).call(this,"Bad block header in flate stream");let i=t;if(-1===(t=n.getByte()))return void Ec(this,bA,EA).call(this,"Bad block header in flate stream");if(i|=t<<8,-1===(t=n.getByte()))return void Ec(this,bA,EA).call(this,"Bad block header in flate stream");let s=t;if(-1===(t=n.getByte()))return void Ec(this,bA,EA).call(this,"Bad block header in flate stream");if(s|=t<<8,s!==(65535&~i)&&(0!==i||0!==s))throw new EVe("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;const r=this.bufferLength,a=r+i;if(e=this.ensureBuffer(a),this.bufferLength=a,0===i)-1===n.peekByte()&&(this.eof=!0);else{const t=n.getBytes(i);e.set(t,r),t.length<i&&(this.eof=!0)}return}let s,r;if(1===t)s=Uje,r=Hje;else{if(2!==t)throw new EVe("Unknown block type in flate stream");{const e=this.getBits(5)+257,t=this.getBits(5)+1,n=this.getBits(4)+4,a=new Uint8Array(Rje.length);let o;for(o=0;o<n;++o)a[Rje[o]]=this.getBits(3);const l=this.generateHuffmanTable(a);i=0,o=0;const A=e+t,c=new Uint8Array(A);let u,h,d;for(;o<A;){const e=this.getCode(l);if(16===e)u=2,h=3,d=i;else if(17===e)u=3,h=3,d=i=0;else{if(18!==e){c[o++]=i=e;continue}u=7,h=11,d=i=0}let t=this.getBits(u)+h;for(;t-- >0;)c[o++]=d}s=this.generateHuffmanTable(c.subarray(0,e)),r=this.generateHuffmanTable(c.subarray(e,A))}}e=this.buffer;let a=e?e.length:0,o=this.bufferLength;for(;;){let t=this.getCode(s);if(t<256){o+1>=a&&(e=this.ensureBuffer(o+1),a=e.length),e[o++]=t;continue}if(256===t)return void(this.bufferLength=o);t-=257,t=Nje[t];let n=t>>16;n>0&&(n=this.getBits(n)),i=(65535&t)+n,t=this.getCode(r),t=Lje[t],n=t>>16,n>0&&(n=this.getBits(n));const l=(65535&t)+n;o+i>=a&&(e=this.ensureBuffer(o+i),a=e.length);for(let s=0;s<i;++s,++o)e[o]=e[o-l]}}}bA=new WeakSet,EA=function(e){this.eof=!0};const Oje=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];class Gje{constructor(e,t,i){this.data=e,this.bp=t,this.dataEnd=i,this.chigh=e[t],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}byteIn(){const e=this.data;let t=this.bp;255===e[t]?e[t+1]>143?(this.clow+=65280,this.ct=8):(t++,this.clow+=e[t]<<9,this.ct=7,this.bp=t):(t++,this.clow+=t<this.dataEnd?e[t]<<8:65280,this.ct=8,this.bp=t),this.clow>65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}readBit(e,t){let i=e[t]>>1,n=1&e[t];const s=Oje[i],r=s.qe;let a,o=this.a-r;if(this.chigh<r)o<r?(o=r,a=n,i=s.nmps):(o=r,a=1^n,1===s.switchFlag&&(n=a),i=s.nlps);else{if(this.chigh-=r,32768&o)return this.a=o,n;o<r?(a=1^n,1===s.switchFlag&&(n=a),i=s.nlps):(a=n,i=s.nmps)}do{0===this.ct&&this.byteIn(),o<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--}while(!(32768&o));return this.a=o,e[t]=i<<1|n,a}}class Kje extends CVe{constructor(e){super(e,"Jbig2Error")}}class qje{getContexts(e){return e in this?this[e]:this[e]=new Int8Array(65536)}}class Yje{constructor(e,t,i){this.data=e,this.start=t,this.end=i}get decoder(){return mVe(this,"decoder",new Gje(this.data,this.start,this.end))}get contextCache(){return mVe(this,"contextCache",new qje)}}function Vje(e,t,i){const n=e.getContexts(t);let s=1;function r(e){let t=0;for(let r=0;r<e;r++){const e=i.readBit(n,s);s=s<256?s<<1|e:511&(s<<1|e)|256,t=t<<1|e}return t>>>0}const a=r(1),o=r(1)?r(1)?r(1)?r(1)?r(1)?r(32)+4436:r(12)+340:r(8)+84:r(6)+20:r(4)+4:r(2);let l;return 0===a?l=o:o>0&&(l=-o),l>=-2147483648&&l<=2147483647?l:null}function Wje(e,t,i){const n=e.getContexts("IAID");let s=1;for(let r=0;r<i;r++){s=s<<1|t.readBit(n,s)}return i<31?s&(1<<i)-1:2147483647&s}const jje=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],Jje=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],zje=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],Xje=[39717,1941,229,405];function $je(e,t,i,n,s,r,a,o){if(e){return fJe(new dJe(o.data,o.start,o.end),t,i,!1)}if(0===n&&!r&&!s&&4===a.length&&3===a[0].x&&-1===a[0].y&&-3===a[1].x&&-1===a[1].y&&2===a[2].x&&-2===a[2].y&&-2===a[3].x&&-2===a[3].y)return function(e,t,i){const n=i.decoder,s=i.contextCache.getContexts("GB"),r=[];let a,o,l,A,c,u,h;for(o=0;o<t;o++)for(c=r[o]=new Uint8Array(e),u=o<1?c:r[o-1],h=o<2?c:r[o-2],a=h[0]<<13|h[1]<<12|h[2]<<11|u[0]<<7|u[1]<<6|u[2]<<5|u[3]<<4,l=0;l<e;l++)c[l]=A=n.readBit(s,a),a=(31735&a)<<1|(l+3<e?h[l+3]<<11:0)|(l+4<e?u[l+4]<<4:0)|A;return r}(t,i,o);const l=Jje[n].concat(a);l.sort((function(e,t){return e.y-t.y||e.x-t.x}));const A=l.length,c=new Int8Array(A),u=new Int8Array(A),h=[];let d,g,p=0,f=0,m=0,C=0;for(g=0;g<A;g++)c[g]=l[g].x,u[g]=l[g].y,f=Math.min(f,l[g].x),m=Math.max(m,l[g].x),C=Math.min(C,l[g].y),g<A-1&&l[g].y===l[g+1].y&&l[g].x===l[g+1].x-1?p|=1<<A-1-g:h.push(g);const I=h.length,v=new Int8Array(I),B=new Int8Array(I),y=new Uint16Array(I);for(d=0;d<I;d++)g=h[d],v[d]=l[g].x,B[d]=l[g].y,y[d]=1<<A-1-g;const b=-f,E=-C,w=t-m,Q=Xje[n];let _=new Uint8Array(t);const S=[],x=o.decoder,k=o.contextCache.getContexts("GB");let D,F,T,M,R,N=0,L=0;for(let U=0;U<i;U++){if(s){if(N^=x.readBit(k,Q),N){S.push(_);continue}}for(_=new Uint8Array(_),S.push(_),D=0;D<t;D++){if(D>=b&&D<w&&U>=E)for(L=L<<1&p,g=0;g<I;g++)F=U+B[g],T=D+v[g],M=S[F][T],M&&(M=y[g],L|=M);else for(L=0,R=A-1,g=0;g<A;g++,R--)T=D+c[g],T>=0&&T<t&&(F=U+u[g],F>=0&&(M=S[F][T],M&&(L|=M<<R)));const e=x.readBit(k,L);_[D]=e}}return S}function Zje(e,t,i,n,s,r,a,o,l){let A=zje[i].coding;0===i&&(A=A.concat([o[0]]));const c=A.length,u=new Int32Array(c),h=new Int32Array(c);let d;for(d=0;d<c;d++)u[d]=A[d].x,h[d]=A[d].y;let g=zje[i].reference;0===i&&(g=g.concat([o[1]]));const p=g.length,f=new Int32Array(p),m=new Int32Array(p);for(d=0;d<p;d++)f[d]=g[d].x,m[d]=g[d].y;const C=n[0].length,I=n.length,v=[],B=l.decoder,y=l.contextCache.getContexts("GR");for(let b=0;b<t;b++){const t=new Uint8Array(e);v.push(t);for(let i=0;i<e;i++){let a,o,l=0;for(d=0;d<c;d++)a=b+h[d],o=i+u[d],a<0||o<0||o>=e?l<<=1:l=l<<1|v[a][o];for(d=0;d<p;d++)a=b+m[d]-r,o=i+f[d]-s,a<0||a>=I||o<0||o>=C?l<<=1:l=l<<1|n[a][o];const A=B.readBit(y,l);t[i]=A}}return v}function eJe(e,t,i,n,s,r,a,o,l,A,c,u,h,d,g,p,f,m,C){if(e&&t)throw new Kje("refinement with Huffman is not supported");const I=[];let v,B;for(v=0;v<n;v++){if(B=new Uint8Array(i),s)for(let e=0;e<i;e++)B[e]=s;I.push(B)}const y=f.decoder,b=f.contextCache;let E=e?-d.tableDeltaT.decode(C):-Vje(b,"IADT",y),w=0;for(v=0;v<r;){E+=e?d.tableDeltaT.decode(C):Vje(b,"IADT",y);w+=e?d.tableFirstS.decode(C):Vje(b,"IAFS",y);let n=w;for(;;){let s=0;a>1&&(s=e?C.readBits(m):Vje(b,"IAIT",y));const r=a*E+s,w=e?d.symbolIDTable.decode(C):Wje(b,y,l),Q=t&&(e?C.readBit():Vje(b,"IARI",y));let _=o[w],S=_[0].length,x=_.length;if(Q){const e=Vje(b,"IARDW",y),t=Vje(b,"IARDH",y);S+=e,x+=t,_=Zje(S,x,g,_,(e>>1)+Vje(b,"IARDX",y),(t>>1)+Vje(b,"IARDY",y),0,p,f)}let k=0;A?1&u?k=x-1:n+=x-1:u>1?n+=S-1:k=S-1;const D=r-(1&u?0:x-1),F=n-(2&u?S-1:0);let T,M,R;if(A)for(T=0;T<x;T++){if(B=I[F+T],!B)continue;R=_[T];const e=Math.min(i-D,S);switch(h){case 0:for(M=0;M<e;M++)B[D+M]|=R[M];break;case 2:for(M=0;M<e;M++)B[D+M]^=R[M];break;default:throw new Kje(`operator ${h} is not supported`)}}else for(M=0;M<x;M++)if(B=I[D+M],B)switch(R=_[M],h){case 0:for(T=0;T<S;T++)B[F+T]|=R[T];break;case 2:for(T=0;T<S;T++)B[F+T]^=R[T];break;default:throw new Kje(`operator ${h} is not supported`)}v++;const N=e?d.tableDeltaS.decode(C):Vje(b,"IADS",y);if(null===N)break;n+=k+N+c}}return I}function tJe(e,t){const i={};i.number=_We(e,t);const n=e[t+4],s=63&n;if(!jje[s])throw new Kje("invalid segment type: "+s);i.type=s,i.typeName=jje[s],i.deferredNonRetain=!!(128&n);const r=!!(64&n),a=e[t+5];let o=a>>5&7;const l=[31&a];let A=t+6;if(7===a){o=536870911&_We(e,A-1),A+=3;let t=o+7>>3;for(l[0]=e[A++];--t>0;)l.push(e[A++])}else if(5===a||6===a)throw new Kje("invalid referred-to flags");i.retainBits=l;let c=4;i.number<=256?c=1:i.number<=65536&&(c=2);const u=[];let h,d;for(h=0;h<o;h++){let t;t=1===c?e[A]:2===c?QWe(e,A):_We(e,A),u.push(t),A+=c}if(i.referredTo=u,r?(i.pageAssociation=_We(e,A),A+=4):i.pageAssociation=e[A++],i.length=_We(e,A),A+=4,4294967295===i.length){if(38!==s)throw new Kje("invalid unknown segment length");{const t=nJe(e,A),n=!!(1&e[A+sJe]),s=6,r=new Uint8Array(s);for(n||(r[0]=255,r[1]=172),r[2]=t.height>>>24&255,r[3]=t.height>>16&255,r[4]=t.height>>8&255,r[5]=255&t.height,h=A,d=e.length;h<d;h++){let t=0;for(;t<s&&r[t]===e[h+t];)t++;if(t===s){i.length=h+s;break}}if(4294967295===i.length)throw new Kje("segment end was not found")}}return i.headerEnd=A,i}function iJe(e,t,i,n){const s=[];let r=i;for(;r<n;){const i=tJe(t,r);r=i.headerEnd;const n={header:i,data:t};if(e.randomAccess||(n.start=r,r+=i.length,n.end=r),s.push(n),51===i.type)break}if(e.randomAccess)for(let a=0,o=s.length;a<o;a++)s[a].start=r,r+=s[a].header.length,s[a].end=r;return s}function nJe(e,t){return{width:_We(e,t),height:_We(e,t+4),x:_We(e,t+8),y:_We(e,t+12),combinationOperator:7&e[t+16]}}const sJe=17;function rJe(e,t){const i=e.header,n=e.data,s=e.end;let r,a,o,l,A=e.start;switch(i.type){case 0:const e={},t=QWe(n,A);if(e.huffman=!!(1&t),e.refinement=!!(2&t),e.huffmanDHSelector=t>>2&3,e.huffmanDWSelector=t>>4&3,e.bitmapSizeSelector=t>>6&1,e.aggregationInstancesSelector=t>>7&1,e.bitmapCodingContextUsed=!!(256&t),e.bitmapCodingContextRetained=!!(512&t),e.template=t>>10&3,e.refinementTemplate=t>>12&1,A+=2,!e.huffman){for(l=0===e.template?4:1,a=[],o=0;o<l;o++)a.push({x:wWe(n,A),y:wWe(n,A+1)}),A+=2;e.at=a}if(e.refinement&&!e.refinementTemplate){for(a=[],o=0;o<2;o++)a.push({x:wWe(n,A),y:wWe(n,A+1)}),A+=2;e.refinementAt=a}e.numberOfExportedSymbols=_We(n,A),A+=4,e.numberOfNewSymbols=_We(n,A),A+=4,r=[e,i.number,i.referredTo,n,A,s];break;case 6:case 7:const c={};c.info=nJe(n,A),A+=sJe;const u=QWe(n,A);if(A+=2,c.huffman=!!(1&u),c.refinement=!!(2&u),c.logStripSize=u>>2&3,c.stripSize=1<<c.logStripSize,c.referenceCorner=u>>4&3,c.transposed=!!(64&u),c.combinationOperator=u>>7&3,c.defaultPixelValue=u>>9&1,c.dsOffset=u<<17>>27,c.refinementTemplate=u>>15&1,c.huffman){const e=QWe(n,A);A+=2,c.huffmanFS=3&e,c.huffmanDS=e>>2&3,c.huffmanDT=e>>4&3,c.huffmanRefinementDW=e>>6&3,c.huffmanRefinementDH=e>>8&3,c.huffmanRefinementDX=e>>10&3,c.huffmanRefinementDY=e>>12&3,c.huffmanRefinementSizeSelector=!!(16384&e)}if(c.refinement&&!c.refinementTemplate){for(a=[],o=0;o<2;o++)a.push({x:wWe(n,A),y:wWe(n,A+1)}),A+=2;c.refinementAt=a}c.numberOfSymbolInstances=_We(n,A),A+=4,r=[c,i.referredTo,n,A,s];break;case 16:const h={},d=n[A++];h.mmr=!!(1&d),h.template=d>>1&3,h.patternWidth=n[A++],h.patternHeight=n[A++],h.maxPatternIndex=_We(n,A),A+=4,r=[h,i.number,n,A,s];break;case 22:case 23:const g={};g.info=nJe(n,A),A+=sJe;const p=n[A++];g.mmr=!!(1&p),g.template=p>>1&3,g.enableSkip=!!(8&p),g.combinationOperator=p>>4&7,g.defaultPixelValue=p>>7&1,g.gridWidth=_We(n,A),A+=4,g.gridHeight=_We(n,A),A+=4,g.gridOffsetX=4294967295&_We(n,A),A+=4,g.gridOffsetY=4294967295&_We(n,A),A+=4,g.gridVectorX=QWe(n,A),A+=2,g.gridVectorY=QWe(n,A),A+=2,r=[g,i.referredTo,n,A,s];break;case 38:case 39:const f={};f.info=nJe(n,A),A+=sJe;const m=n[A++];if(f.mmr=!!(1&m),f.template=m>>1&3,f.prediction=!!(8&m),!f.mmr){for(l=0===f.template?4:1,a=[],o=0;o<l;o++)a.push({x:wWe(n,A),y:wWe(n,A+1)}),A+=2;f.at=a}r=[f,n,A,s];break;case 48:const C={width:_We(n,A),height:_We(n,A+4),resolutionX:_We(n,A+8),resolutionY:_We(n,A+12)};4294967295===C.height&&delete C.height;const I=n[A+16];QWe(n,A+17),C.lossless=!!(1&I),C.refinement=!!(2&I),C.defaultPixelValue=I>>2&1,C.combinationOperator=I>>3&3,C.requiresBuffer=!!(32&I),C.combinationOperatorOverride=!!(64&I),r=[C];break;case 49:case 50:case 51:case 62:break;case 53:r=[i.number,n,A,s];break;default:throw new Kje(`segment type ${i.typeName}(${i.type}) is not implemented`)}const c="on"+i.typeName;c in t&&t[c].apply(t,r)}function aJe(e,t){for(let i=0,n=e.length;i<n;i++)rJe(e[i],t)}class oJe{onPageInformation(e){this.currentPageInfo=e;const t=e.width+7>>3,i=new Uint8ClampedArray(t*e.height);e.defaultPixelValue&&i.fill(255),this.buffer=i}drawBitmap(e,t){const i=this.currentPageInfo,n=e.width,s=e.height,r=i.width+7>>3,a=i.combinationOperatorOverride?e.combinationOperator:i.combinationOperator,o=this.buffer,l=128>>(7&e.x);let A,c,u,h,d=e.y*r+(e.x>>3);switch(a){case 0:for(A=0;A<s;A++){for(u=l,h=d,c=0;c<n;c++)t[A][c]&&(o[h]|=u),u>>=1,u||(u=128,h++);d+=r}break;case 2:for(A=0;A<s;A++){for(u=l,h=d,c=0;c<n;c++)t[A][c]&&(o[h]^=u),u>>=1,u||(u=128,h++);d+=r}break;default:throw new Kje(`operator ${a} is not supported`)}}onImmediateGenericRegion(e,t,i,n){const s=e.info,r=new Yje(t,i,n),a=$je(e.mmr,s.width,s.height,e.template,e.prediction,null,e.at,r);this.drawBitmap(s,a)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(e,t,i,n,s,r){let a,o;e.huffman&&(a=function(e,t,i){let n,s,r,a,o=0;switch(e.huffmanDHSelector){case 0:case 1:n=hJe(e.huffmanDHSelector+4);break;case 3:n=gJe(o,t,i),o++;break;default:throw new Kje("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:s=hJe(e.huffmanDWSelector+2);break;case 3:s=gJe(o,t,i),o++;break;default:throw new Kje("invalid Huffman DW selector")}e.bitmapSizeSelector?(r=gJe(o,t,i),o++):r=hJe(1);a=e.aggregationInstancesSelector?gJe(o,t,i):hJe(1);return{tableDeltaHeight:n,tableDeltaWidth:s,tableBitmapSize:r,tableAggregateInstances:a}}(e,i,this.customTables),o=new dJe(n,s,r));let l=this.symbols;l||(this.symbols=l={});const A=[];for(const u of i){const e=l[u];e&&A.push(...e)}const c=new Yje(n,s,r);l[t]=function(e,t,i,n,s,r,a,o,l,A,c,u){if(e&&t)throw new Kje("symbol refinement with Huffman is not supported");const h=[];let d=0,g=EWe(i.length+n);const p=c.decoder,f=c.contextCache;let m,C;for(e&&(m=hJe(1),C=[],g=Math.max(g,1));h.length<n;){d+=e?r.tableDeltaHeight.decode(u):Vje(f,"IADH",p);let n=0,s=0;const m=e?C.length:0;for(;;){const m=e?r.tableDeltaWidth.decode(u):Vje(f,"IADW",p);if(null===m)break;let I;if(n+=m,s+=n,t){const s=Vje(f,"IAAI",p);if(s>1)I=eJe(e,t,n,d,0,s,1,i.concat(h),g,0,0,1,0,r,l,A,c,0,u);else{const e=Wje(f,p,g),t=Vje(f,"IARDX",p),s=Vje(f,"IARDY",p);I=Zje(n,d,l,e<i.length?i[e]:h[e-i.length],t,s,0,A,c)}h.push(I)}else e?C.push(n):(I=$je(!1,n,d,a,!1,null,o,c),h.push(I))}if(e&&!t){const e=r.tableBitmapSize.decode(u);let t;if(u.byteAlign(),0===e)t=pJe(u,s,d);else{const i=u.end,n=u.position+e;u.end=n,t=fJe(u,s,d,!1),u.end=i,u.position=n}const i=C.length;if(m===i-1)h.push(t);else{let e,n,s,r,a,o=0;for(e=m;e<i;e++){for(r=C[e],s=o+r,a=[],n=0;n<d;n++)a.push(t[n].subarray(o,s));h.push(a),o=s}}}}const I=[],v=[];let B,y,b=!1;const E=i.length+n;for(;v.length<E;){let t=e?m.decode(u):Vje(f,"IAEX",p);for(;t--;)v.push(b);b=!b}for(B=0,y=i.length;B<y;B++)v[B]&&I.push(i[B]);for(let w=0;w<n;B++,w++)v[B]&&I.push(h[w]);return I}(e.huffman,e.refinement,A,e.numberOfNewSymbols,e.numberOfExportedSymbols,a,e.template,e.at,e.refinementTemplate,e.refinementAt,c,o)}onImmediateTextRegion(e,t,i,n,s){const r=e.info;let a,o;const l=this.symbols,A=[];for(const d of t){const e=l[d];e&&A.push(...e)}const c=EWe(A.length);e.huffman&&(o=new dJe(i,n,s),a=function(e,t,i,n,s){const r=[];for(let h=0;h<=34;h++){const e=s.readBits(4);r.push(new lJe([h,e,0,0]))}const a=new cJe(r,!1);r.length=0;for(let h=0;h<n;){const e=a.decode(s);if(e>=32){let t,i,n;switch(e){case 32:if(0===h)throw new Kje("no previous value in symbol ID table");i=s.readBits(2)+3,t=r[h-1].prefixLength;break;case 33:i=s.readBits(3)+3,t=0;break;case 34:i=s.readBits(7)+11,t=0;break;default:throw new Kje("invalid code length in symbol ID table")}for(n=0;n<i;n++)r.push(new lJe([h,t,0,0])),h++}else r.push(new lJe([h,e,0,0])),h++}s.byteAlign();const o=new cJe(r,!1);let l,A,c,u=0;switch(e.huffmanFS){case 0:case 1:l=hJe(e.huffmanFS+6);break;case 3:l=gJe(u,t,i),u++;break;default:throw new Kje("invalid Huffman FS selector")}switch(e.huffmanDS){case 0:case 1:case 2:A=hJe(e.huffmanDS+8);break;case 3:A=gJe(u,t,i),u++;break;default:throw new Kje("invalid Huffman DS selector")}switch(e.huffmanDT){case 0:case 1:case 2:c=hJe(e.huffmanDT+11);break;case 3:c=gJe(u,t,i),u++;break;default:throw new Kje("invalid Huffman DT selector")}if(e.refinement)throw new Kje("refinement with Huffman is not supported");return{symbolIDTable:o,tableFirstS:l,tableDeltaS:A,tableDeltaT:c}}(e,t,this.customTables,A.length,o));const u=new Yje(i,n,s),h=eJe(e.huffman,e.refinement,r.width,r.height,e.defaultPixelValue,e.numberOfSymbolInstances,e.stripSize,A,c,e.transposed,e.dsOffset,e.referenceCorner,e.combinationOperator,a,e.refinementTemplate,e.refinementAt,u,e.logStripSize,o);this.drawBitmap(r,h)}onImmediateLosslessTextRegion(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(e,t,i,n,s){let r=this.patterns;r||(this.patterns=r={});const a=new Yje(i,n,s);r[t]=function(e,t,i,n,s,r){const a=[];e||(a.push({x:-t,y:0}),0===s&&a.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const o=$je(e,(n+1)*t,i,s,!1,null,a,r),l=[];for(let A=0;A<=n;A++){const e=[],n=t*A,s=n+t;for(let t=0;t<i;t++)e.push(o[t].subarray(n,s));l.push(e)}return l}(e.mmr,e.patternWidth,e.patternHeight,e.maxPatternIndex,e.template,a)}onImmediateHalftoneRegion(e,t,i,n,s){const r=this.patterns[t[0]],a=e.info,o=new Yje(i,n,s),l=function(e,t,i,n,s,r,a,o,l,A,c,u,h,d,g){if(a)throw new Kje("skip is not supported");if(0!==o)throw new Kje(`operator "${o}" is not supported in halftone region`);const p=[];let f,m,C;for(f=0;f<s;f++){if(C=new Uint8Array(n),r)for(m=0;m<n;m++)C[m]=r;p.push(C)}const I=t.length,v=t[0],B=v[0].length,y=v.length,b=EWe(I),E=[];e||(E.push({x:i<=1?3:2,y:-1}),0===i&&E.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const w=[];let Q,_,S,x,k,D,F,T,M,R,N;for(e&&(Q=new dJe(g.data,g.start,g.end)),f=b-1;f>=0;f--)_=e?fJe(Q,l,A,!0):$je(!1,l,A,i,!1,null,E,g),w[f]=_;for(S=0;S<A;S++)for(x=0;x<l;x++){for(k=0,D=0,m=b-1;m>=0;m--)k^=w[m][S][x],D|=k<<m;if(F=t[D],T=c+S*d+x*h>>8,M=u+S*h-x*d>>8,T>=0&&T+B<=n&&M>=0&&M+y<=s)for(f=0;f<y;f++)for(N=p[M+f],R=F[f],m=0;m<B;m++)N[T+m]|=R[m];else{let e,t;for(f=0;f<y;f++)if(t=M+f,!(t<0||t>=s))for(N=p[t],R=F[f],m=0;m<B;m++)e=T+m,e>=0&&e<n&&(N[e]|=R[m])}}return p}(e.mmr,r,e.template,a.width,a.height,e.defaultPixelValue,e.enableSkip,e.combinationOperator,e.gridWidth,e.gridHeight,e.gridOffsetX,e.gridOffsetY,e.gridVectorX,e.gridVectorY,o);this.drawBitmap(a,l)}onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion(...arguments)}onTables(e,t,i,n){let s=this.customTables;s||(this.customTables=s={}),s[e]=function(e,t,i){const n=e[t],s=4294967295&_We(e,t+1),r=4294967295&_We(e,t+5),a=new dJe(e,t+9,i),o=1+(n>>1&7),l=1+(n>>4&7),A=[];let c,u,h=s;do{c=a.readBits(o),u=a.readBits(l),A.push(new lJe([h,c,u,0])),h+=1<<u}while(h<r);c=a.readBits(o),A.push(new lJe([s-1,c,32,0,"lower"])),c=a.readBits(o),A.push(new lJe([r,c,32,0])),1&n&&(c=a.readBits(o),A.push(new lJe([c,0])));return new cJe(A,!1)}(t,i,n)}}class lJe{constructor(e){2===e.length?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=e[0],this.rangeLength=0,this.prefixCode=e[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=e[0],this.prefixLength=e[1],this.rangeLength=e[2],this.prefixCode=e[3],this.isLowerRange="lower"===e[4])}}class AJe{constructor(e){this.children=[],e?(this.isLeaf=!0,this.rangeLength=e.rangeLength,this.rangeLow=e.rangeLow,this.isLowerRange=e.isLowerRange,this.isOOB=e.isOOB):this.isLeaf=!1}buildTree(e,t){const i=e.prefixCode>>t&1;if(t<=0)this.children[i]=new AJe(e);else{let n=this.children[i];n||(this.children[i]=n=new AJe(null)),n.buildTree(e,t-1)}}decodeNode(e){if(this.isLeaf){if(this.isOOB)return null;const t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}const t=this.children[e.readBit()];if(!t)throw new Kje("invalid Huffman data");return t.decodeNode(e)}}class cJe{constructor(e,t){t||this.assignPrefixCodes(e),this.rootNode=new AJe(null);for(let i=0,n=e.length;i<n;i++){const t=e[i];t.prefixLength>0&&this.rootNode.buildTree(t,t.prefixLength-1)}}decode(e){return this.rootNode.decodeNode(e)}assignPrefixCodes(e){const t=e.length;let i=0;for(let A=0;A<t;A++)i=Math.max(i,e[A].prefixLength);const n=new Uint32Array(i+1);for(let A=0;A<t;A++)n[e[A].prefixLength]++;let s,r,a,o=1,l=0;for(n[0]=0;o<=i;){for(l=l+n[o-1]<<1,s=l,r=0;r<t;)a=e[r],a.prefixLength===o&&(a.prefixCode=s,s++),r++;o++}}}const uJe={};function hJe(e){let t,i=uJe[e];if(i)return i;switch(e){case 1:t=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:t=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:t=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:t=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:t=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:t=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:t=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:t=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:t=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:t=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:t=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:t=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:t=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:t=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:t=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new Kje(`standard table B.${e} does not exist`)}for(let n=0,s=t.length;n<s;n++)t[n]=new lJe(t[n]);return i=new cJe(t,!0),uJe[e]=i,i}class dJe{constructor(e,t,i){this.data=e,this.start=t,this.end=i,this.position=t,this.shift=-1,this.currentByte=0}readBit(){if(this.shift<0){if(this.position>=this.end)throw new Kje("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}const e=this.currentByte>>this.shift&1;return this.shift--,e}readBits(e){let t,i=0;for(t=e-1;t>=0;t--)i|=this.readBit()<<t;return i}byteAlign(){this.shift=-1}next(){return this.position>=this.end?-1:this.data[this.position++]}}function gJe(e,t,i){let n=0;for(let s=0,r=t.length;s<r;s++){const r=i[t[s]];if(r){if(e===n)return r;n++}}throw new Kje("can't find custom Huffman table")}function pJe(e,t,i){const n=[];for(let s=0;s<i;s++){const i=new Uint8Array(t);n.push(i);for(let n=0;n<t;n++)i[n]=e.readBit();e.byteAlign()}return n}function fJe(e,t,i,n){const s=new Tje(e,{K:-1,Columns:t,Rows:i,BlackIs1:!0,EndOfBlock:n}),r=[];let a,o=!1;for(let l=0;l<i;l++){const e=new Uint8Array(t);r.push(e);let i=-1;for(let n=0;n<t;n++)i<0&&(a=s.readNextChar(),-1===a&&(a=0,o=!0),i=7),e[n]=a>>i&1,i--}if(n&&!o){const e=5;for(let t=0;t<e&&-1!==s.readNextChar();t++);}return r}class mJe{parseChunks(e){return function(e){const t=new oJe;for(let i=0,n=e.length;i<n;i++){const n=e[i];aJe(iJe({},n.data,n.start,n.end),t)}return t.buffer}(e)}parse(e){throw new Error("Not implemented: Jbig2Image.parse")}}class CJe extends yje{constructor(e,t,i){super(t),this.stream=e,this.dict=e.dict,this.maybeLength=t,this.params=i}get bytes(){return mVe(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){this.decodeImage()}decodeImage(e){if(this.eof)return this.buffer;e||(e=this.bytes);const t=new mJe,i=[];if(this.params instanceof rWe){const e=this.params.get("JBIG2Globals");if(e instanceof dWe){const t=e.getBytes();i.push({data:t,start:0,end:t.length})}}i.push({data:e,start:0,end:e.length});const n=t.parseChunks(i),s=n.length;for(let r=0;r<s;r++)n[r]^=255;return this.buffer=n,this.bufferLength=s,this.eof=!0,this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}}function IJe(e){switch(e.kind){case DKe:return vJe(e);case FKe:return function({src:e,srcPos:t=0,dest:i,destPos:n=0,width:s,height:r}){let a=0;const o=e.length>>2,l=new Uint32Array(e.buffer,t,o);if(kVe.isLittleEndian){for(;a<o-2;a+=3,n+=4){const e=l[a],t=l[a+1],s=l[a+2];i[n]=4278190080|e,i[n+1]=e>>>24|t<<8|4278190080,i[n+2]=t>>>16|s<<16|4278190080,i[n+3]=s>>>8|4278190080}for(let t=4*a,s=e.length;t<s;t+=3)i[n++]=e[t]|e[t+1]<<8|e[t+2]<<16|4278190080}else{for(;a<o-2;a+=3,n+=4){const e=l[a],t=l[a+1],s=l[a+2];i[n]=255|e,i[n+1]=e<<24|t>>>8|255,i[n+2]=t<<16|s>>>16|255,i[n+3]=s<<8|255}for(let t=4*a,s=e.length;t<s;t+=3)i[n++]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|255}return{srcPos:t,destPos:n}}(e)}return null}function vJe({src:e,srcPos:t=0,dest:i,width:n,height:s,nonBlackColor:r=4294967295,inverseDecode:a=!1}){const o=kVe.isLittleEndian?4278190080:255,[l,A]=a?[r,o]:[o,r],c=n>>3,u=7&n,h=e.length;i=new Uint32Array(i.buffer);let d=0;for(let g=0;g<s;g++){for(const s=t+c;t<s;t++){const n=t<h?e[t]:255;i[d++]=128&n?A:l,i[d++]=64&n?A:l,i[d++]=32&n?A:l,i[d++]=16&n?A:l,i[d++]=8&n?A:l,i[d++]=4&n?A:l,i[d++]=2&n?A:l,i[d++]=1&n?A:l}if(0===u)continue;const n=t<h?e[t++]:255;for(let e=0;e<u;e++)i[d++]=n&1<<7-e?A:l}return{srcPos:t,destPos:d}}class BJe extends CVe{constructor(e){super(e,"JpegError")}}class yJe extends CVe{constructor(e,t){super(e,"DNLMarkerError"),this.scanLines=t}}class bJe extends CVe{constructor(e){super(e,"EOIMarkerError")}}const EJe=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),wJe=4017,QJe=799,_Je=3406,SJe=2276,xJe=1567,kJe=3784,DJe=5793,FJe=2896;function TJe(e,t){let i,n,s=0,r=16;for(;r>0&&!e[r-1];)r--;const a=[{children:[],index:0}];let o,l=a[0];for(i=0;i<r;i++){for(n=0;n<e[i];n++){for(l=a.pop(),l.children[l.index]=t[s];l.index>0;)l=a.pop();for(l.index++,a.push(l);a.length<=i;)a.push(o={children:[],index:0}),l.children[l.index]=o.children,l=o;s++}i+1<r&&(a.push(o={children:[],index:0}),l.children[l.index]=o.children,l=o)}return a[0].children}function MJe(e,t,i){return 64*((e.blocksPerLine+1)*t+i)}function RJe(e,t,i,n,s,r,a,o,l,A=!1){const c=i.mcusPerLine,u=i.progressive,h=t;let d=0,g=0;function p(){if(g>0)return g--,d>>g&1;if(d=e[t++],255===d){const n=e[t++];if(n){if(220===n&&A){const n=QWe(e,t+=2);if(t+=2,n>0&&n!==i.scanLines)throw new yJe("Found DNL marker (0xFFDC) while parsing scan data",n)}else if(217===n){if(A){const e=y*(8===i.precision?8:0);if(e>0&&Math.round(i.scanLines/e)>=5)throw new yJe("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",e)}throw new bJe("Found EOI marker (0xFFD9) while parsing scan data")}throw new BJe(`unexpected marker ${(d<<8|n).toString(16)}`)}}return g=7,d>>>7}function f(e){let t=e;for(;;){switch(t=t[p()],typeof t){case"number":return t;case"object":continue}throw new BJe("invalid huffman sequence")}}function m(e){let t=0;for(;e>0;)t=t<<1|p(),e--;return t}function C(e){if(1===e)return 1===p()?1:-1;const t=m(e);return t>=1<<e-1?t:t+(-1<<e)+1}let I=0;let v,B=0;let y=0;function b(e,t,i,n,s){const r=i%c;y=(i/c|0)*e.v+n;const a=r*e.h+s;t(e,MJe(e,y,a))}function E(e,t,i){y=i/e.blocksPerLine|0;const n=i%e.blocksPerLine;t(e,MJe(e,y,n))}const w=n.length;let Q,_,S,x,k,D;D=u?0===r?0===o?function(e,t){const i=f(e.huffmanTableDC),n=0===i?0:C(i)<<l;e.blockData[t]=e.pred+=n}:function(e,t){e.blockData[t]|=p()<<l}:0===o?function(e,t){if(I>0)return void I--;let i=r;const n=a;for(;i<=n;){const n=f(e.huffmanTableAC),s=15&n,r=n>>4;if(0===s){if(r<15){I=m(r)+(1<<r)-1;break}i+=16;continue}i+=r;const a=EJe[i];e.blockData[t+a]=C(s)*(1<<l),i++}}:function(e,t){let i=r;const n=a;let s,o,A=0;for(;i<=n;){const n=t+EJe[i],r=e.blockData[n]<0?-1:1;switch(B){case 0:if(o=f(e.huffmanTableAC),s=15&o,A=o>>4,0===s)A<15?(I=m(A)+(1<<A),B=4):(A=16,B=1);else{if(1!==s)throw new BJe("invalid ACn encoding");v=C(s),B=A?2:3}continue;case 1:case 2:e.blockData[n]?e.blockData[n]+=r*(p()<<l):(A--,0===A&&(B=2===B?3:0));break;case 3:e.blockData[n]?e.blockData[n]+=r*(p()<<l):(e.blockData[n]=v<<l,B=0);break;case 4:e.blockData[n]&&(e.blockData[n]+=r*(p()<<l))}i++}4===B&&(I--,0===I&&(B=0))}:function(e,t){const i=f(e.huffmanTableDC),n=0===i?0:C(i);e.blockData[t]=e.pred+=n;let s=1;for(;s<64;){const i=f(e.huffmanTableAC),n=15&i,r=i>>4;if(0===n){if(r<15)break;s+=16;continue}s+=r;const a=EJe[s];e.blockData[t+a]=C(n),s++}};let F,T=0;const M=1===w?n[0].blocksPerLine*n[0].blocksPerColumn:c*i.mcusPerColumn;let R,N;for(;T<=M;){const i=s?Math.min(M-T,s):M;if(i>0){for(_=0;_<w;_++)n[_].pred=0;if(I=0,1===w)for(Q=n[0],k=0;k<i;k++)E(Q,D,T),T++;else for(k=0;k<i;k++){for(_=0;_<w;_++)for(Q=n[_],R=Q.h,N=Q.v,S=0;S<N;S++)for(x=0;x<R;x++)b(Q,D,T,S,x);T++}}if(g=0,F=UJe(e,t),!F)break;if(F.invalid){F.invalid,t=F.offset}if(!(F.marker>=65488&&F.marker<=65495))break;t+=2}return t-h}function NJe(e,t,i){const n=e.quantizationTable,s=e.blockData;let r,a,o,l,A,c,u,h,d,g,p,f,m,C,I,v,B;if(!n)throw new BJe("missing required Quantization Table.");for(let y=0;y<64;y+=8)d=s[t+y],g=s[t+y+1],p=s[t+y+2],f=s[t+y+3],m=s[t+y+4],C=s[t+y+5],I=s[t+y+6],v=s[t+y+7],d*=n[y],g|p|f|m|C|I|v?(g*=n[y+1],p*=n[y+2],f*=n[y+3],m*=n[y+4],C*=n[y+5],I*=n[y+6],v*=n[y+7],r=DJe*d+128>>8,a=DJe*m+128>>8,o=p,l=I,A=FJe*(g-v)+128>>8,h=FJe*(g+v)+128>>8,c=f<<4,u=C<<4,r=r+a+1>>1,a=r-a,B=o*kJe+l*xJe+128>>8,o=o*xJe-l*kJe+128>>8,l=B,A=A+u+1>>1,u=A-u,h=h+c+1>>1,c=h-c,r=r+l+1>>1,l=r-l,a=a+o+1>>1,o=a-o,B=A*SJe+h*_Je+2048>>12,A=A*_Je-h*SJe+2048>>12,h=B,B=c*QJe+u*wJe+2048>>12,c=c*wJe-u*QJe+2048>>12,u=B,i[y]=r+h,i[y+7]=r-h,i[y+1]=a+u,i[y+6]=a-u,i[y+2]=o+c,i[y+5]=o-c,i[y+3]=l+A,i[y+4]=l-A):(B=DJe*d+512>>10,i[y]=B,i[y+1]=B,i[y+2]=B,i[y+3]=B,i[y+4]=B,i[y+5]=B,i[y+6]=B,i[y+7]=B);for(let y=0;y<8;++y)d=i[y],g=i[y+8],p=i[y+16],f=i[y+24],m=i[y+32],C=i[y+40],I=i[y+48],v=i[y+56],g|p|f|m|C|I|v?(r=DJe*d+2048>>12,a=DJe*m+2048>>12,o=p,l=I,A=FJe*(g-v)+2048>>12,h=FJe*(g+v)+2048>>12,c=f,u=C,r=4112+(r+a+1>>1),a=r-a,B=o*kJe+l*xJe+2048>>12,o=o*xJe-l*kJe+2048>>12,l=B,A=A+u+1>>1,u=A-u,h=h+c+1>>1,c=h-c,r=r+l+1>>1,l=r-l,a=a+o+1>>1,o=a-o,B=A*SJe+h*_Je+2048>>12,A=A*_Je-h*SJe+2048>>12,h=B,B=c*QJe+u*wJe+2048>>12,c=c*wJe-u*QJe+2048>>12,u=B,d=r+h,v=r-h,g=a+u,I=a-u,p=o+c,C=o-c,f=l+A,m=l-A,d<16?d=0:d>=4080?d=255:d>>=4,g<16?g=0:g>=4080?g=255:g>>=4,p<16?p=0:p>=4080?p=255:p>>=4,f<16?f=0:f>=4080?f=255:f>>=4,m<16?m=0:m>=4080?m=255:m>>=4,C<16?C=0:C>=4080?C=255:C>>=4,I<16?I=0:I>=4080?I=255:I>>=4,v<16?v=0:v>=4080?v=255:v>>=4,s[t+y]=d,s[t+y+8]=g,s[t+y+16]=p,s[t+y+24]=f,s[t+y+32]=m,s[t+y+40]=C,s[t+y+48]=I,s[t+y+56]=v):(B=DJe*d+8192>>14,B=B<-2040?0:B>=2024?255:B+2056>>4,s[t+y]=B,s[t+y+8]=B,s[t+y+16]=B,s[t+y+24]=B,s[t+y+32]=B,s[t+y+40]=B,s[t+y+48]=B,s[t+y+56]=B)}function LJe(e,t){const i=t.blocksPerLine,n=t.blocksPerColumn,s=new Int16Array(64);for(let r=0;r<n;r++)for(let e=0;e<i;e++){NJe(t,MJe(t,r,e),s)}return t.blockData}function UJe(e,t,i=t){const n=e.length-1;let s=i<t?i:t;if(t>=n)return null;const r=QWe(e,t);if(r>=65472&&r<=65534)return{invalid:null,marker:r,offset:t};let a=QWe(e,s);for(;!(a>=65472&&a<=65534);){if(++s>=n)return null;a=QWe(e,s)}return{invalid:r.toString(16),marker:a,offset:s}}function HJe(e){const t=Math.ceil(e.samplesPerLine/8/e.maxH),i=Math.ceil(e.scanLines/8/e.maxV);for(const n of e.components){const s=Math.ceil(Math.ceil(e.samplesPerLine/8)*n.h/e.maxH),r=Math.ceil(Math.ceil(e.scanLines/8)*n.v/e.maxV),a=t*n.h,o=64*(i*n.v)*(a+1);n.blockData=new Int16Array(o),n.blocksPerLine=s,n.blocksPerColumn=r}e.mcusPerLine=t,e.mcusPerColumn=i}function PJe(e,t){const i=QWe(e,t);let n=(t+=2)+i-2;const s=UJe(e,n,t);(null==s?void 0:s.invalid)&&(s.invalid,n=s.offset);const r=e.subarray(t,n);return{appData:r,newOffset:t+=r.length}}function OJe(e,t){const i=QWe(e,t),n=(t+=2)+i-2,s=UJe(e,n,t);return(null==s?void 0:s.invalid)?s.offset:n}class GJe{constructor({decodeTransform:e=null,colorTransform:t=-1}={}){this._decodeTransform=e,this._colorTransform=t}static canUseImageDecoder(e,t=-1){let i=0,n=null,s=QWe(e,i);if(i+=2,65496!==s)throw new BJe("SOI not found");s=QWe(e,i),i+=2;e:for(;65497!==s;){switch(s){case 65472:case 65473:case 65474:n=e[i+7];break e;case 65535:255!==e[i]&&i--}i=OJe(e,i),s=QWe(e,i),i+=2}return 4!==n&&(3!==n||0!==t)}parse(e,{dnlScanLines:t=null}={}){let i,n,s=0,r=null,a=null,o=0;const l=[],A=[],c=[];let u=QWe(e,s);if(s+=2,65496!==u)throw new BJe("SOI not found");u=QWe(e,s),s+=2;e:for(;65497!==u;){let d,g,p;switch(u){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:const{appData:f,newOffset:m}=PJe(e,s);s=m,65504===u&&74===f[0]&&70===f[1]&&73===f[2]&&70===f[3]&&0===f[4]&&(r={version:{major:f[5],minor:f[6]},densityUnits:f[7],xDensity:f[8]<<8|f[9],yDensity:f[10]<<8|f[11],thumbWidth:f[12],thumbHeight:f[13],thumbData:f.subarray(14,14+3*f[12]*f[13])}),65518===u&&65===f[0]&&100===f[1]&&111===f[2]&&98===f[3]&&101===f[4]&&(a={version:f[5]<<8|f[6],flags0:f[7]<<8|f[8],flags1:f[9]<<8|f[10],transformCode:f[11]});break;case 65499:const C=QWe(e,s);s+=2;const I=C+s-2;let v;for(;s<I;){const t=e[s++],i=new Uint16Array(64);if(t>>4){if(t>>4!=1)throw new BJe("DQT - invalid table spec");for(g=0;g<64;g++)v=EJe[g],i[v]=QWe(e,s),s+=2}else for(g=0;g<64;g++)v=EJe[g],i[v]=e[s++];l[15&t]=i}break;case 65472:case 65473:case 65474:if(i)throw new BJe("Only single frame JPEGs supported");s+=2,i={},i.extended=65473===u,i.progressive=65474===u,i.precision=e[s++];const B=QWe(e,s);s+=2,i.scanLines=t||B,i.samplesPerLine=QWe(e,s),s+=2,i.components=[],i.componentIds={};const y=e[s++];let b=0,E=0;for(d=0;d<y;d++){const t=e[s],n=e[s+1]>>4,r=15&e[s+1];b<n&&(b=n),E<r&&(E=r);const a=e[s+2];p=i.components.push({h:n,v:r,quantizationId:a,quantizationTable:null}),i.componentIds[t]=p-1,s+=3}i.maxH=b,i.maxV=E,HJe(i);break;case 65476:const w=QWe(e,s);for(s+=2,d=2;d<w;){const t=e[s++],i=new Uint8Array(16);let n=0;for(g=0;g<16;g++,s++)n+=i[g]=e[s];const r=new Uint8Array(n);for(g=0;g<n;g++,s++)r[g]=e[s];d+=17+n,(t>>4?A:c)[15&t]=TJe(i,r)}break;case 65501:s+=2,n=QWe(e,s),s+=2;break;case 65498:const Q=1==++o&&!t;s+=2;const _=e[s++],S=[];for(d=0;d<_;d++){const t=e[s++],n=i.componentIds[t],r=i.components[n];r.index=t;const a=e[s++];r.huffmanTableDC=c[a>>4],r.huffmanTableAC=A[15&a],S.push(r)}const x=e[s++],k=e[s++],D=e[s++];try{s+=RJe(e,s,i,S,n,x,k,D>>4,15&D,Q)}catch(h){if(h instanceof yJe)return h.message,this.parse(e,{dnlScanLines:h.scanLines});if(h instanceof bJe){h.message;break e}throw h}break;case 65500:s+=4;break;case 65535:255!==e[s]&&s--;break;default:const F=UJe(e,s-2,s-3);if(null==F?void 0:F.invalid){F.invalid,s=F.offset;break}if(!F||s>=e.length-1)break e;throw new BJe("JpegImage.parse - unknown marker: "+u.toString(16))}u=QWe(e,s),s+=2}if(!i)throw new BJe("JpegImage.parse - no frame data found.");this.width=i.samplesPerLine,this.height=i.scanLines,this.jfif=r,this.adobe=a,this.components=[];for(const d of i.components){const e=l[d.quantizationId];e&&(d.quantizationTable=e),this.components.push({index:d.index,output:LJe(0,d),scaleX:d.h/i.maxH,scaleY:d.v/i.maxV,blocksPerLine:d.blocksPerLine,blocksPerColumn:d.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(e,t,i=!1){const n=this.width/e,s=this.height/t;let r,a,o,l,A,c,u,h,d,g,p,f=0;const m=this.components.length,C=e*t*m,I=new Uint8ClampedArray(C),v=new Uint32Array(e),B=4294967288;let y;for(u=0;u<m;u++){if(r=this.components[u],a=r.scaleX*n,o=r.scaleY*s,f=u,p=r.output,l=r.blocksPerLine+1<<3,a!==y){for(A=0;A<e;A++)h=0|A*a,v[A]=(h&B)<<3|7&h;y=a}for(c=0;c<t;c++)for(h=0|c*o,g=l*(h&B)|(7&h)<<3,A=0;A<e;A++)I[f]=p[g+v[A]],f+=m}let b=this._decodeTransform;if(i||4!==m||b||(b=new Int32Array([-256,255,-256,255,-256,255,-256,255])),b)for(u=0;u<C;)for(h=0,d=0;h<m;h++,u++,d+=2)I[u]=(I[u]*b[d]>>8)+b[d+1];return I}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}_convertYccToRgb(e){let t,i,n;for(let s=0,r=e.length;s<r;s+=3)t=e[s],i=e[s+1],n=e[s+2],e[s]=t-179.456+1.402*n,e[s+1]=t+135.459-.344*i-.714*n,e[s+2]=t-226.816+1.772*i;return e}_convertYccToRgba(e,t){for(let i=0,n=0,s=e.length;i<s;i+=3,n+=4){const s=e[i],r=e[i+1],a=e[i+2];t[n]=s-179.456+1.402*a,t[n+1]=s+135.459-.344*r-.714*a,t[n+2]=s-226.816+1.772*r,t[n+3]=255}return t}_convertYcckToRgb(e){let t,i,n,s,r=0;for(let a=0,o=e.length;a<o;a+=4)t=e[a],i=e[a+1],n=e[a+2],s=e[a+3],e[r++]=i*(-660635669420364e-19*i+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*s-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*s+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*s+.48357088451265)+s*(-.000336197177618394*s+.484791561490776),e[r++]=107.268039397724+i*(219927104525741e-19*i-.000640992018297945*n+.000659397001245577*t+.000426105652938837*s-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*s-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*s+.25802910206845)+s*(-.000318913117588328*s-.213742400323665),e[r++]=i*(-.000570115196973677*i-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*s+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*s-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*s+.116935020465145)+s*(-.000343531996510555*s+.24165260232407);return e.subarray(0,r)}_convertYcckToRgba(e){for(let t=0,i=e.length;t<i;t+=4){const i=e[t],n=e[t+1],s=e[t+2],r=e[t+3];e[t]=n*(-660635669420364e-19*n+.000437130475926232*s-54080610064599e-18*i+.00048449797120281*r-.154362151871126)-122.67195406894+s*(-.000957964378445773*s+.000817076911346625*i-.00477271405408747*r+1.53380253221734)+i*(.000961250184130688*i-.00266257332283933*r+.48357088451265)+r*(-.000336197177618394*r+.484791561490776),e[t+1]=107.268039397724+n*(219927104525741e-19*n-.000640992018297945*s+.000659397001245577*i+.000426105652938837*r-.176491792462875)+s*(-.000778269941513683*s+.00130872261408275*i+.000770482631801132*r-.151051492775562)+i*(.00126935368114843*i-.00265090189010898*r+.25802910206845)+r*(-.000318913117588328*r-.213742400323665),e[t+2]=n*(-.000570115196973677*n-263409051004589e-19*s+.0020741088115012*i-.00288260236853442*r+.814272968359295)-20.810012546947+s*(-153496057440975e-19*s-.000132689043961446*i+.000560833691242812*r-.195152027534049)+i*(.00174418132927582*i-.00255243321439347*r+.116935020465145)+r*(-.000343531996510555*r+.24165260232407),e[t+3]=255}return e}_convertYcckToCmyk(e){let t,i,n;for(let s=0,r=e.length;s<r;s+=4)t=e[s],i=e[s+1],n=e[s+2],e[s]=434.456-t-1.402*n,e[s+1]=119.541-t+.344*i+.714*n,e[s+2]=481.816-t-1.772*i;return e}_convertCmykToRgb(e){let t,i,n,s,r=0;for(let a=0,o=e.length;a<o;a+=4)t=e[a],i=e[a+1],n=e[a+2],s=e[a+3],e[r++]=255+t*(-6747147073602441e-20*t+.0008379262121013727*i+.0002894718188643294*n+.003264231057537806*s-1.1185611867203937)+i*(26374107616089405e-21*i-8626949158638572e-20*n-.0002748769067499491*s-.02155688794978967)+n*(-3878099212869363e-20*n-.0003267808279485286*s+.0686742238595345)-s*(.0003361971776183937*s+.7430659151342254),e[r++]=255+t*(.00013596372813588848*t+.000924537132573585*i+.00010567359618683593*n+.0004791864687436512*s-.3109689587515875)+i*(-.00023545346108370344*i+.0002702845253534714*n+.0020200308977307156*s-.7488052167015494)+n*(6834815998235662e-20*n+.00015168452363460973*s-.09751927774728933)-s*(.0003189131175883281*s+.7364883807733168),e[r++]=255+t*(13598650411385307e-21*t+.00012423956175490851*i+.0004751985097583589*n-36729317476630422e-22*s-.05562186980264034)+i*(.00016141380598724676*i+.0009692239130725186*n+.0007782692450036253*s-.44015232367526463)+n*(5.068882914068769e-7*n+.0017778369011375071*s-.7591454649749609)-s*(.0003435319965105553*s+.7063770186160144);return e.subarray(0,r)}_convertCmykToRgba(e){for(let t=0,i=e.length;t<i;t+=4){const i=e[t],n=e[t+1],s=e[t+2],r=e[t+3];e[t]=255+i*(-6747147073602441e-20*i+.0008379262121013727*n+.0002894718188643294*s+.003264231057537806*r-1.1185611867203937)+n*(26374107616089405e-21*n-8626949158638572e-20*s-.0002748769067499491*r-.02155688794978967)+s*(-3878099212869363e-20*s-.0003267808279485286*r+.0686742238595345)-r*(.0003361971776183937*r+.7430659151342254),e[t+1]=255+i*(.00013596372813588848*i+.000924537132573585*n+.00010567359618683593*s+.0004791864687436512*r-.3109689587515875)+n*(-.00023545346108370344*n+.0002702845253534714*s+.0020200308977307156*r-.7488052167015494)+s*(6834815998235662e-20*s+.00015168452363460973*r-.09751927774728933)-r*(.0003189131175883281*r+.7364883807733168),e[t+2]=255+i*(13598650411385307e-21*i+.00012423956175490851*n+.0004751985097583589*s-36729317476630422e-22*r-.05562186980264034)+n*(.00016141380598724676*n+.0009692239130725186*s+.0007782692450036253*r-.44015232367526463)+s*(5.068882914068769e-7*s+.0017778369011375071*r-.7591454649749609)-r*(.0003435319965105553*r+.7063770186160144),e[t+3]=255}return e}getData({width:e,height:t,forceRGBA:i=!1,forceRGB:n=!1,isSourcePDF:s=!1}){if(this.numComponents>4)throw new BJe("Unsupported color mode");const r=this._getLinearizedBlockData(e,t,s);if(1===this.numComponents&&(i||n)){const e=r.length*(i?4:3),t=new Uint8ClampedArray(e);let n=0;if(i)!function(e,t){if(kVe.isLittleEndian)for(let i=0,n=e.length;i<n;i++)t[i]=65793*e[i]|4278190080;else for(let i=0,n=e.length;i<n;i++)t[i]=16843008*e[i]|255}(r,new Uint32Array(t.buffer));else for(const i of r)t[n++]=i,t[n++]=i,t[n++]=i;return t}if(3===this.numComponents&&this._isColorConversionNeeded){if(i){const e=new Uint8ClampedArray(r.length/3*4);return this._convertYccToRgba(r,e)}return this._convertYccToRgb(r)}if(4===this.numComponents){if(this._isColorConversionNeeded)return i?this._convertYcckToRgba(r):n?this._convertYcckToRgb(r):this._convertYcckToCmyk(r);if(i)return this._convertCmykToRgba(r);if(n)return this._convertCmykToRgb(r)}return r}}const KJe=class e extends yje{constructor(e,t,i){super(t),yc(this,QA),this.stream=e,this.dict=e.dict,this.maybeLength=t,this.params=i}static get canUseImageDecoder(){return mVe(this,"canUseImageDecoder",Bc(this,wA)?ImageDecoder.isTypeSupported("image/jpeg"):Promise.resolve(!1))}static setOptions({isImageDecoderSupported:e=!1}){bc(this,wA,e)}get bytes(){return mVe(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){this.decodeImage()}get jpegOptions(){const e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(t)){const i=this.dict.get("BPC","BitsPerComponent")||8,n=t.length,s=new Int32Array(n);let r=!1;const a=(1<<i)-1;for(let e=0;e<n;e+=2)s[e]=256*(t[e+1]-t[e])|0,s[e+1]=t[e]*a|0,256===s[e]&&0===s[e+1]||(r=!0);r&&(e.decodeTransform=s)}if(this.params instanceof rWe){const t=this.params.get("ColorTransform");Number.isInteger(t)&&(e.colorTransform=t)}return mVe(this,"jpegOptions",e)}decodeImage(e){if(this.eof)return this.buffer;e=Ec(this,QA,_A).call(this,e||this.bytes);const t=new GJe(this.jpegOptions);t.parse(e);const i=t.getData({width:this.drawWidth,height:this.drawHeight,forceRGBA:this.forceRGBA,forceRGB:this.forceRGB,isSourcePDF:!0});return this.buffer=i,this.bufferLength=i.length,this.eof=!0,this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}async getTransferableImage(){if(!(await e.canUseImageDecoder))return null;const t=this.jpegOptions;if(t.decodeTransform)return null;let i;try{const e=this.canAsyncDecodeImageFromBuffer&&await this.stream.asyncGetBytes()||this.bytes;if(!e)return null;const n=Ec(this,QA,_A).call(this,e);return GJe.canUseImageDecoder(n,t.colorTransform)?(i=new ImageDecoder({data:n,type:"image/jpeg",preferAnimation:!1}),(await i.decode()).image):null}catch(n){return null}finally{null==i||i.close()}}};wA=new WeakMap,QA=new WeakSet,_A=function(e){for(let t=0,i=e.length-1;t<i;t++)if(255===e[t]&&216===e[t+1]){t>0&&(e=e.subarray(t));break}return e},yc(KJe,wA,kVe.isImageDecoderSupported);let qJe=KJe;var YJe,VJe,WJe=(VJe="undefined"!=typeof document?null==(YJe=document.currentScript)?void 0:YJe.src:void 0,function(e={}){var t,i,n=e;new Promise(((e,n)=>{t=e,i=n})),n.decode=function(e,{numComponents:t=4,isIndexedColormap:i=!1,smaskInData:s=!1}){const r=e.length,a=n._malloc(r);n.HEAPU8.set(e,a);const o=n._jp2_decode(a,r,t>0?t:0,!!i,!!s);if(n._free(a),o){const{errorMessages:e}=n;return e?(delete n.errorMessages,e):"Unknown error"}const{imageData:l}=n;return n.imageData=null,l};var s=Object.assign({},n),r="./this.program",a="";"undefined"!=typeof document&&document.currentScript&&(a=document.currentScript.src),VJe&&(a=VJe),a=a.startsWith("blob:")?"":a.substr(0,a.replace(/[?#].*/,"").lastIndexOf("/")+1);var o,l,A,c,u,h=n.print||console.log.bind(console),d=n.printErr||console.error.bind(console);function g(e){if(b(e))return function(e){for(var t=atob(e),i=new Uint8Array(t.length),n=0;n<t.length;++n)i[n]=t.charCodeAt(n);return i}(e.slice(y.length))}function p(){var e=l.buffer;n.HEAP8=A=new Int8Array(e),n.HEAP16=new Int16Array(e),n.HEAPU8=c=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAP32=new Int32Array(e),n.HEAPU32=u=new Uint32Array(e),n.HEAPF32=new Float32Array(e),n.HEAPF64=new Float64Array(e)}Object.assign(n,s),s=null,n.arguments&&n.arguments,n.thisProgram&&(r=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(o=n.wasmBinary);var f,m=[],C=[],I=[],v=0,B=null,y="data:application/octet-stream;base64,",b=e=>e.startsWith(y);function E(e,t){var i,n=function(e){if(e==f&&o)return new Uint8Array(o);var t=g(e);if(t)return t;throw'sync fetching of the wasm failed: you can preload it to Module["wasmBinary"] manually, or emcc.py will do that for you when generating HTML (but not JS)'}(e);return i=new WebAssembly.Module(n),[new WebAssembly.Instance(i,t),i]}var w=e=>{for(;e.length>0;)e.shift()(n)};n.noExitRuntime;var Q,_=e=>{var t=(e-l.buffer.byteLength+65535)/65536;try{return l.grow(t),p(),1}catch(I2){}},S={},x=()=>{if(!x.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:r||"./this.program"};for(var t in S)void 0===S[t]?delete e[t]:e[t]=S[t];var i=[];for(var t in e)i.push(`${t}=${e[t]}`);x.strings=i}return x.strings},k=[null,[],[]],D="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,F=(e,t,i)=>{for(var n=t+i,s=t;e[s]&&!(s>=n);)++s;if(s-t>16&&e.buffer&&D)return D.decode(e.subarray(t,s));for(var r="";t<s;){var a=e[t++];if(128&a){var o=63&e[t++];if(192!=(224&a)){var l=63&e[t++];if((a=224==(240&a)?(15&a)<<12|o<<6|l:(7&a)<<18|o<<12|l<<6|63&e[t++])<65536)r+=String.fromCharCode(a);else{var A=a-65536;r+=String.fromCharCode(55296|A>>10,56320|1023&A)}}else r+=String.fromCharCode((31&a)<<6|o)}else r+=String.fromCharCode(a)}return r},T=(e,t)=>{var i=k[e];0===t||10===t?((1===e?h:d)(F(i,0)),i.length=0):i.push(t)},M=(e,t)=>e?F(c,e,t):"",R={c:(e,t,i)=>c.copyWithin(e,t,t+i),g:function(e,t){e>>=2;const i=n.imageData=new Uint8ClampedArray(t),s=n.HEAP32.subarray(e,e+t);i.set(s)},f:function(e,t,i,s){e>>=2,t>>=2,i>>=2;const r=n.imageData=new Uint8ClampedArray(3*s),a=n.HEAP32.subarray(e,e+s),o=n.HEAP32.subarray(t,t+s),l=n.HEAP32.subarray(i,i+s);for(let n=0;n<s;n++)r[3*n]=a[n],r[3*n+1]=o[n],r[3*n+2]=l[n]},e:function(e,t,i,s,r){e>>=2,t>>=2,i>>=2,s>>=2;const a=n.imageData=new Uint8ClampedArray(4*r),o=n.HEAP32.subarray(e,e+r),l=n.HEAP32.subarray(t,t+r),A=n.HEAP32.subarray(i,i+r),c=n.HEAP32.subarray(s,s+r);for(let n=0;n<r;n++)a[4*n]=o[n],a[4*n+1]=l[n],a[4*n+2]=A[n],a[4*n+3]=c[n]},k:e=>{var t=c.length,i=2147483648;if((e>>>=0)>i)return!1;for(var n,s,r=1;r<=4;r*=2){var a=t*(1+.2/r);a=Math.min(a,e+100663296);var o=Math.min(i,(n=Math.max(e,a))+((s=65536)-n%s)%s);if(_(o))return!0}return!1},l:(e,t)=>{var i=0;return x().forEach(((n,s)=>{var r=t+i;u[e+4*s>>2]=r,((e,t)=>{for(var i=0;i<e.length;++i)A[t++]=e.charCodeAt(i);A[t]=0})(n,r),i+=n.length+1})),0},m:(e,t)=>{var i=x();u[e>>2]=i.length;var n=0;return i.forEach((e=>n+=e.length+1)),u[t>>2]=n,0},n:e=>52,j:function(e,t,i,n,s){return 70},b:(e,t,i,n)=>{for(var s=0,r=0;r<i;r++){var a=u[t>>2],o=u[t+4>>2];t+=8;for(var l=0;l<o;l++)T(e,c[a+l]);s+=o}return u[n>>2]=s,0},o:function(e,t){e>>=2;const i=n.imageData=new Uint8ClampedArray(4*t),s=n.HEAP32.subarray(e,e+t);for(let n=0;n<t;n++)i[4*n]=i[4*n+1]=i[4*n+2]=s[n],i[4*n+3]=255},i:function(e,t,i){e>>=2,t>>=2;const s=n.imageData=new Uint8ClampedArray(4*i),r=n.HEAP32.subarray(e,e+i),a=n.HEAP32.subarray(t,t+i);for(let n=0;n<i;n++)s[4*n]=s[4*n+1]=s[4*n+2]=r[n],s[4*n+3]=a[n]},d:function(e){const t=M(e);(n.warn||console.warn)(`OpenJPEG: ${t}`)},h:function(e,t,i,s){e>>=2,t>>=2,i>>=2;const r=n.imageData=new Uint8ClampedArray(4*s),a=n.HEAP32.subarray(e,e+s),o=n.HEAP32.subarray(t,t+s),l=n.HEAP32.subarray(i,i+s);for(let n=0;n<s;n++)r[4*n]=a[n],r[4*n+1]=o[n],r[4*n+2]=l[n],r[4*n+3]=255},a:function(e){const t=M(e);n.errorMessages?n.errorMessages+="\n"+t:n.errorMessages=t}},N=function(){var e,t={a:R};function s(e,t){var i;return N=e.exports,l=N.p,p(),i=N.q,C.unshift(i),function(){var e;if(v--,null==(e=n.monitorRunDependencies)||e.call(n,v),0==v&&B){var t=B;B=null,t()}}(),N}if(v++,null==(e=n.monitorRunDependencies)||e.call(n,v),n.instantiateWasm)try{return n.instantiateWasm(t,s)}catch(I2){d(`Module.instantiateWasm callback failed with error: ${I2}`),i(I2)}return f||(f="data:application/octet-stream;base64, "),s(E(f,t)[0])}();function L(){function e(){Q||(Q=!0,n.calledRun=!0,w(C),t(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),I.unshift(e);var e;w(I)}())}v>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),m.unshift(e);var e;w(m)}(),v>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(N.q,n._malloc=N.r,n._free=N.s,n._jp2_decode=N.u,B=function e(){Q||L(),Q||(B=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return L(),n});const jJe=WJe;class JJe extends CVe{constructor(e){super(e,"JpxError")}}class zJe{static decode(e,t){t||(t={}),Bc(this,SA)||bc(this,SA,jJe({warn:dVe}));const i=Bc(this,SA).decode(e,t);if("string"==typeof i)throw new JJe(i);return i}static cleanup(){bc(this,SA,null)}static parseImageProperties(e){let t=e.getByte();for(;t>=0;){const i=t;t=e.getByte();if(65361===(i<<8|t)){e.skip(4);const t=e.getInt32()>>>0,i=e.getInt32()>>>0,n=e.getInt32()>>>0,s=e.getInt32()>>>0;e.skip(16);return{width:t-n,height:i-s,bitsPerComponent:8,componentsCount:e.getUint16()}}}throw new JJe("No size marker found in JPX stream")}}SA=new WeakMap,yc(zJe,SA,null);class XJe extends yje{constructor(e,t,i){super(t),this.stream=e,this.dict=e.dict,this.maybeLength=t,this.params=i}get bytes(){return mVe(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(e){this.decodeImage(null,e)}decodeImage(e,t){return this.eof||(e||(e=this.bytes),this.buffer=zJe.decode(e,t),this.bufferLength=this.buffer.length,this.eof=!0),this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}}class $Je extends yje{constructor(e,t,i){super(t),this.str=e,this.dict=e.dict,this.cachedData=0,this.bitsCached=0;const n=4096,s={earlyChange:i,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(n),dictionaryLengths:new Uint16Array(n),dictionaryPrevCodes:new Uint16Array(n),currentSequence:new Uint8Array(n),currentSequenceLength:0};for(let r=0;r<256;++r)s.dictionaryValues[r]=r,s.dictionaryLengths[r]=1;this.lzwState=s}readBits(e){let t=this.bitsCached,i=this.cachedData;for(;t<e;){const e=this.str.getByte();if(-1===e)return this.eof=!0,null;i=i<<8|e,t+=8}return this.bitsCached=t-=e,this.cachedData=i,this.lastCode=null,i>>>t&(1<<e)-1}readBlock(){let e,t,i,n=1024;const s=this.lzwState;if(!s)return;const r=s.earlyChange;let a=s.nextCode;const o=s.dictionaryValues,l=s.dictionaryLengths,A=s.dictionaryPrevCodes;let c=s.codeLength,u=s.prevCode;const h=s.currentSequence;let d=s.currentSequenceLength,g=0,p=this.bufferLength,f=this.ensureBuffer(this.bufferLength+n);for(e=0;e<512;e++){const e=this.readBits(c),s=d>0;if(e<256)h[0]=e,d=1;else{if(!(e>=258)){if(256===e){c=9,a=258,d=0;continue}this.eof=!0,delete this.lzwState;break}if(e<a)for(d=l[e],t=d-1,i=e;t>=0;t--)h[t]=o[i],i=A[i];else h[d++]=h[0]}if(s&&(A[a]=u,l[a]=l[u]+1,o[a]=h[0],a++,c=a+r&a+r-1?c:0|Math.min(Math.log(a+r)/.6931471805599453+1,12)),u=e,g+=d,n<g){do{n+=512}while(n<g);f=this.ensureBuffer(this.bufferLength+n)}for(t=0;t<d;t++)f[p++]=h[t]}s.nextCode=a,s.codeLength=c,s.prevCode=u,s.currentSequenceLength=d,this.bufferLength=p}}class ZJe extends yje{constructor(e,t,i){if(super(t),!(i instanceof rWe))return e;const n=this.predictor=i.get("Predictor")||1;if(n<=1)return e;if(2!==n&&(n<10||n>15))throw new EVe(`Unsupported predictor: ${n}`);this.readBlock=2===n?this.readBlockTiff:this.readBlockPng,this.str=e,this.dict=e.dict;const s=this.colors=i.get("Colors")||1,r=this.bits=i.get("BPC","BitsPerComponent")||8,a=this.columns=i.get("Columns")||1;return this.pixBytes=s*r+7>>3,this.rowBytes=a*s*r+7>>3,this}readBlockTiff(){const e=this.rowBytes,t=this.bufferLength,i=this.ensureBuffer(t+e),n=this.bits,s=this.colors,r=this.str.getBytes(e);if(this.eof=!r.length,this.eof)return;let a,o=0,l=0,A=0,c=0,u=t;if(1===n&&1===s)for(a=0;a<e;++a){let e=r[a]^o;e^=e>>1,e^=e>>2,e^=e>>4,o=(1&e)<<7,i[u++]=e}else if(8===n){for(a=0;a<s;++a)i[u++]=r[a];for(;a<e;++a)i[u]=i[u-s]+r[a],u++}else if(16===n){const t=2*s;for(a=0;a<t;++a)i[u++]=r[a];for(;a<e;a+=2){const e=((255&r[a])<<8)+(255&r[a+1])+((255&i[u-t])<<8)+(255&i[u-t+1]);i[u++]=e>>8&255,i[u++]=255&e}}else{const e=new Uint8Array(s+1),u=(1<<n)-1;let h=0,d=t;const g=this.columns;for(a=0;a<g;++a)for(let t=0;t<s;++t)A<n&&(o=o<<8|255&r[h++],A+=8),e[t]=e[t]+(o>>A-n)&u,A-=n,l=l<<n|e[t],c+=n,c>=8&&(i[d++]=l>>c-8&255,c-=8);c>0&&(i[d++]=(l<<8-c)+(o&(1<<8-c)-1))}this.bufferLength+=e}readBlockPng(){const e=this.rowBytes,t=this.pixBytes,i=this.str.getByte(),n=this.str.getBytes(e);if(this.eof=!n.length,this.eof)return;const s=this.bufferLength,r=this.ensureBuffer(s+e);let a=r.subarray(s-e,s);0===a.length&&(a=new Uint8Array(e));let o,l,A,c=s;switch(i){case 0:for(o=0;o<e;++o)r[c++]=n[o];break;case 1:for(o=0;o<t;++o)r[c++]=n[o];for(;o<e;++o)r[c]=r[c-t]+n[o]&255,c++;break;case 2:for(o=0;o<e;++o)r[c++]=a[o]+n[o]&255;break;case 3:for(o=0;o<t;++o)r[c++]=(a[o]>>1)+n[o];for(;o<e;++o)r[c]=(a[o]+r[c-t]>>1)+n[o]&255,c++;break;case 4:for(o=0;o<t;++o)l=a[o],A=n[o],r[c++]=l+A;for(;o<e;++o){l=a[o];const e=a[o-t],i=r[c-t],s=i+l-e;let u=s-i;u<0&&(u=-u);let h=s-l;h<0&&(h=-h);let d=s-e;d<0&&(d=-d),A=n[o],r[c++]=u<=h&&u<=d?i+A:h<=d?l+A:e+A}break;default:throw new EVe(`Unsupported predictor: ${i}`)}this.bufferLength+=e}}class eze extends yje{constructor(e,t){super(t),this.str=e,this.dict=e.dict}readBlock(){const e=this.str.getBytes(2);if(!e||e.length<2||128===e[0])return void(this.eof=!0);let t,i=this.bufferLength,n=e[0];if(n<128){if(t=this.ensureBuffer(i+n+1),t[i++]=e[1],n>0){const e=this.str.getBytes(n);t.set(e,i),i+=n}}else{n=257-n;const s=e[1];t=this.ensureBuffer(i+n+1);for(let e=0;e<n;e++)t[i++]=s}this.bufferLength=i}}class tze{constructor({lexer:e,xref:t,allowStreams:i=!1,recoveryMode:n=!1}){yc(this,xA),this.lexer=e,this.xref=t,this.allowStreams=i,this.recoveryMode=n,this.imageCache=Object.create(null),this._imageId=0,this.refill()}refill(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()}shift(){this.buf2 instanceof nWe&&"ID"===this.buf2.cmd?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())}tryShift(){try{return this.shift(),!0}catch(I2){if(I2 instanceof fWe)throw I2;return!1}}getObj(e=null){const t=this.buf1;if(this.shift(),t instanceof nWe)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":const i=[];for(;!cWe(this.buf1,"]")&&this.buf1!==$Ve;)i.push(this.getObj(e));if(this.buf1===$Ve){if(this.recoveryMode)return i;throw new mWe("End of file inside array.")}return this.shift(),i;case"<<":const n=new rWe(this.xref);for(;!cWe(this.buf1,">>")&&this.buf1!==$Ve;){if(!(this.buf1 instanceof iWe)){this.shift();continue}const t=this.buf1.name;if(this.shift(),this.buf1===$Ve)break;n.set(t,this.getObj(e))}if(this.buf1===$Ve){if(this.recoveryMode)return n;throw new mWe("End of file inside dictionary.")}return cWe(this.buf2,"stream")?this.allowStreams?this.makeStream(n,e):n:(this.shift(),n);default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&cWe(this.buf2,"R")){const e=aWe.get(t,this.buf1);return this.shift(),this.shift(),e}return t}return"string"==typeof t&&e?e.decryptString(t):t}findDefaultInlineStreamEnd(e){const{knownCommands:t}=this.lexer,i=e.pos;let n,s,r=0;for(;-1!==(n=e.getByte());)if(0===r)r=69===n?1:0;else if(1===r)r=73===n?2:0;else if(32===n||10===n||13===n){s=e.pos;const i=e.peekBytes(15),a=i.length;if(0===a)break;for(let e=0;e<a;e++)if(n=i[e],(0!==n||0===i[e+1])&&10!==n&&13!==n&&(n<32||n>127)){r=0;break}if(2!==r)continue;if(!t)continue;const o=new sze(new XWe(i.slice()),t);o._hexStringWarn=()=>{};let l=0;for(;;){const e=o.getObj();if(e===$Ve){r=0;break}if(e instanceof nWe){const i=t[e.cmd];if(!i){r=0;break}if(i.variableArgs?l<=i.numArgs:l===i.numArgs)break;l=0}else l++}if(2===r)break}else r=0;-1===n&&s&&e.skip(-(e.pos-s));let a=4;return e.skip(-a),n=e.peekByte(),e.skip(a),SWe(n)||a--,e.pos-a-i}findDCTDecodeInlineStreamEnd(e){const t=e.pos;let i,n,s=!1;for(;-1!==(i=e.getByte());)if(255===i){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:s=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:n=e.getUint16(),n>2?e.skip(n-2):e.skip(-2)}if(s)break}const r=e.pos-t;return-1===i?(e.skip(-r),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),r)}findASCII85DecodeInlineStreamEnd(e){const t=e.pos;let i;for(;-1!==(i=e.getByte());)if(126===i){const t=e.pos;for(i=e.peekByte();SWe(i);)e.skip(),i=e.peekByte();if(62===i){e.skip();break}if(e.pos>t){const t=e.peekBytes(2);if(69===t[0]&&73===t[1])break}}const n=e.pos-t;return-1===i?(e.skip(-n),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),n)}findASCIIHexDecodeInlineStreamEnd(e){const t=e.pos;let i;for(;-1!==(i=e.getByte())&&62!==i;);const n=e.pos-t;return-1===i?(e.skip(-n),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),n)}inlineStreamSkipEI(e){let t,i=0;for(;-1!==(t=e.getByte());)if(0===i)i=69===t?1:0;else if(1===i)i=73===t?2:0;else if(2===i)break}makeInlineImage(e){const t=this.lexer,i=t.stream,n=Object.create(null);let s;for(;!cWe(this.buf1,"ID")&&this.buf1!==$Ve;){if(!(this.buf1 instanceof iWe))throw new EVe("Dictionary key must be a name object");const t=this.buf1.name;if(this.shift(),this.buf1===$Ve)break;n[t]=this.getObj(e)}-1!==t.beginInlineImagePos&&(s=i.pos-t.beginInlineImagePos);const r=this.xref.fetchIfRef(n.F||n.Filter);let a;if(r instanceof iWe)a=r.name;else if(Array.isArray(r)){const e=this.xref.fetchIfRef(r[0]);e instanceof iWe&&(a=e.name)}const o=i.pos;let l,A;switch(a){case"DCT":case"DCTDecode":l=this.findDCTDecodeInlineStreamEnd(i);break;case"A85":case"ASCII85Decode":l=this.findASCII85DecodeInlineStreamEnd(i);break;case"AHx":case"ASCIIHexDecode":l=this.findASCIIHexDecodeInlineStreamEnd(i);break;default:l=this.findDefaultInlineStreamEnd(i)}if(l<1e3&&s>0){const e=i.pos;i.pos=t.beginInlineImagePos,A=function(e){const t=[],i=e.length;let n=0;for(;n<i-1;)t.push(e[n++]<<8|e[n++]);return n<i&&t.push(e[n]),i+"_"+String.fromCharCode.apply(null,t)}(i.getBytes(s+l)),i.pos=e;const n=this.imageCache[A];if(void 0!==n)return this.buf2=nWe.get("EI"),this.shift(),n.reset(),n}const c=new rWe(this.xref);for(const h in n)c.set(h,n[h]);let u=i.makeSubStream(o,l,c);return e&&(u=e.createStream(u,l)),u=this.filter(u,c,l),u.dict=c,void 0!==A&&(u.cacheKey="inline_img_"+ ++this._imageId,this.imageCache[A]=u),this.buf2=nWe.get("EI"),this.shift(),u}makeStream(e,t){const i=this.lexer;let n=i.stream;i.skipToNextLine();const s=n.pos-1;let r=e.get("Length");if(Number.isInteger(r)||(r&&r.toString(),r=0),n.pos=s+r,i.nextChar(),this.tryShift()&&cWe(this.buf2,"endstream"))this.shift();else{if(r=Ec(this,xA,kA).call(this,s),r<0)throw new EVe("Missing endstream command.");i.nextChar(),this.shift(),this.shift()}return this.shift(),n=n.makeSubStream(s,r,e),t&&(n=t.createStream(n,r)),n=this.filter(n,e,r),n.dict=e,n}filter(e,t,i){let n=t.get("F","Filter"),s=t.get("DP","DecodeParms");if(n instanceof iWe)return Array.isArray(s),this.makeFilter(e,n.name,i,s);let r=i;if(Array.isArray(n)){const t=n,i=s;for(let a=0,o=t.length;a<o;++a){if(n=this.xref.fetchIfRef(t[a]),!(n instanceof iWe))throw new EVe(`Bad filter name "${n}"`);s=null,Array.isArray(i)&&a in i&&(s=this.xref.fetchIfRef(i[a])),e=this.makeFilter(e,n.name,r,s),r=null}}return e}makeFilter(e,t,i,n){if(0===i)return new ZWe;try{switch(t){case"Fl":case"FlateDecode":return n?new ZJe(new Pje(e,i),i,n):new Pje(e,i);case"LZW":case"LZWDecode":let t=1;return n?(n.has("EarlyChange")&&(t=n.get("EarlyChange")),new ZJe(new $Je(e,i,t),i,n)):new $Je(e,i,t);case"DCT":case"DCTDecode":return new qJe(e,i,n);case"JPX":case"JPXDecode":return new XJe(e,i,n);case"A85":case"ASCII85Decode":return new Eje(e,i);case"AHx":case"ASCIIHexDecode":return new wje(e,i);case"CCF":case"CCITTFaxDecode":return new Mje(e,i,n);case"RL":case"RunLengthDecode":return new eze(e,i);case"JBIG2Decode":return new CJe(e,i,n)}return e}catch(s){if(s instanceof fWe)throw s;return new ZWe}}}xA=new WeakSet,kA=function(e){const{stream:t}=this.lexer;t.pos=e;const i=new Uint8Array([101,110,100]),n=i.length,s=[new Uint8Array([115,116,114,101,97,109]),new Uint8Array([115,116,101,97,109]),new Uint8Array([115,116,114,101,97])],r=9-n;for(;t.pos<t.end;){const a=t.peekBytes(2048),o=a.length-9;if(o<=0)break;let l=0;for(;l<o;){let o=0;for(;o<n&&a[l+o]===i[o];)o++;if(o>=n){let n=!1;for(const e of s){const t=e.length;let s=0;for(;s<t&&a[l+o+s]===e[s];)s++;if(s>=r){n=!0;break}if(s>=t){SWe(a[l+o+s])&&(QVe([...i,...e]),n=!0);break}}if(n)return t.pos+=l,t.pos-e}l++}t.pos+=o}return-1};const ize=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function nze(e){return e>=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}class sze{constructor(e,t=null){this.stream=e,this.nextChar(),this.strBuf=[],this.knownCommands=t,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let e=this.currentChar,t=!1,i=0,n=1;if(45===e?(n=-1,e=this.nextChar(),45===e&&(e=this.nextChar())):43===e&&(e=this.nextChar()),10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e&&(i=10,e=this.nextChar()),e<48||e>57){const t=`Invalid number: ${String.fromCharCode(e)} (charCode ${e})`;if(SWe(e)||-1===e)return 0;throw new EVe(t)}let s=e-48,r=0,a=1;for(;(e=this.nextChar())>=0;)if(e>=48&&e<=57){const n=e-48;t?r=10*r+n:(0!==i&&(i*=10),s=10*s+n)}else if(46===e){if(0!==i)break;i=1}else if(45===e);else{if(69!==e&&101!==e)break;if(e=this.peekChar(),43===e||45===e)a=45===e?-1:1,this.nextChar();else if(e<48||e>57)break;t=!0}return 0!==i&&(s/=i),t&&(s*=10**(a*r)),n*s}getString(){let e=1,t=!1;const i=this.strBuf;i.length=0;let n=this.nextChar();for(;;){let s=!1;switch(0|n){case-1:t=!0;break;case 40:++e,i.push("(");break;case 41:0==--e?(this.nextChar(),t=!0):i.push(")");break;case 92:switch(n=this.nextChar(),n){case-1:t=!0;break;case 110:i.push("\n");break;case 114:i.push("\r");break;case 116:i.push("\t");break;case 98:i.push("\b");break;case 102:i.push("\f");break;case 92:case 40:case 41:i.push(String.fromCharCode(n));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let e=15&n;n=this.nextChar(),s=!0,n>=48&&n<=55&&(e=(e<<3)+(15&n),n=this.nextChar(),n>=48&&n<=55&&(s=!1,e=(e<<3)+(15&n))),i.push(String.fromCharCode(e));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:i.push(String.fromCharCode(n))}break;default:i.push(String.fromCharCode(n))}if(t)break;s||(n=this.nextChar())}return i.join("")}getName(){let e,t;const i=this.strBuf;for(i.length=0;(e=this.nextChar())>=0&&!ize[e];)if(35===e){if(e=this.nextChar(),ize[e]){i.push("#");break}const n=nze(e);if(-1!==n){t=e,e=this.nextChar();const s=nze(e);if(-1===s){if(String.fromCharCode(e),i.push("#",String.fromCharCode(t)),ize[e])break;i.push(String.fromCharCode(e));continue}i.push(String.fromCharCode(n<<4|s))}else i.push("#",String.fromCharCode(e))}else i.push(String.fromCharCode(e));return i.length>127&&i.length,iWe.get(i.join(""))}_hexStringWarn(e){5!=this._hexStringNumWarn++&&this._hexStringNumWarn}getHexString(){const e=this.strBuf;e.length=0;let t=this.currentChar,i=-1,n=-1;for(this._hexStringNumWarn=0;!(t<0);){if(62===t){this.nextChar();break}1!==ize[t]?(n=nze(t),-1===n?this._hexStringWarn(t):-1===i?i=n:(e.push(String.fromCharCode(i<<4|n)),i=-1),t=this.nextChar()):t=this.nextChar()}return-1!==i&&e.push(String.fromCharCode(i<<4)),e.join("")}getObj(){let e=!1,t=this.currentChar;for(;;){if(t<0)return $Ve;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==ize[t])break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),nWe.get("[");case 93:return this.nextChar(),nWe.get("]");case 60:return t=this.nextChar(),60===t?(this.nextChar(),nWe.get("<<")):this.getHexString();case 62:return t=this.nextChar(),62===t?(this.nextChar(),nWe.get(">>")):nWe.get(">");case 123:return this.nextChar(),nWe.get("{");case 125:return this.nextChar(),nWe.get("}");case 41:throw this.nextChar(),new EVe(`Illegal character: ${t}`)}let i=String.fromCharCode(t);if(t<32||t>127){const e=this.peekChar();if(e>=32&&e<=127)return this.nextChar(),nWe.get(i)}const n=this.knownCommands;let s=void 0!==(null==n?void 0:n[i]);for(;(t=this.nextChar())>=0&&!ize[t];){const e=i+String.fromCharCode(t);if(s&&void 0===n[e])break;if(128===i.length)throw new EVe(`Command token too long: ${i.length}`);i=e,s=void 0!==(null==n?void 0:n[i])}return"true"===i||"false"!==i&&("null"===i?null:("BI"===i&&(this.beginInlineImagePos=this.stream.pos),nWe.get(i)))}skipToNextLine(){let e=this.currentChar;for(;e>=0;){if(13===e){e=this.nextChar(),10===e&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}class rze{static create(e){function t(e,t,i=!1){const n=e.get(t);if(Number.isInteger(n)&&(i?n>=0:n>0))return n;throw new Error(`The "${t}" parameter in the linearization dictionary is invalid.`)}const i=new tze({lexer:new sze(e),xref:null}),n=i.getObj(),s=i.getObj(),r=i.getObj(),a=i.getObj();let o,l;if(!(Number.isInteger(n)&&Number.isInteger(s)&&cWe(r,"obj")&&a instanceof rWe&&"number"==typeof(o=a.get("Linearized"))&&o>0))return null;if((l=t(a,"L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:l,hints:function(e){const t=e.get("H");let i;if(Array.isArray(t)&&(2===(i=t.length)||4===i)){for(let e=0;e<i;e++){const i=t[e];if(!(Number.isInteger(i)&&i>0))throw new Error(`Hint (${e}) in the linearization dictionary is invalid.`)}return t}throw new Error("Hint array in the linearization dictionary is invalid.")}(a),objectNumberFirst:t(a,"O"),endFirst:t(a,"E"),numPages:t(a,"N"),mainXRefEntriesOffset:t(a,"T"),pageFirst:a.has("P")?t(a,"P",!0):0}}}const aze=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],oze=2**24-1;class lze{constructor(e=!1){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=e}addCodespaceRange(e,t,i){this.codespaceRanges[e-1].push(t,i),this.numCodespaceRanges++}mapCidRange(e,t,i){if(t-e>oze)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=i++}mapBfRange(e,t,i){if(t-e>oze)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");const n=i.length-1;for(;e<=t;){this._map[e++]=i;const t=i.charCodeAt(n)+1;t>255?i=i.substring(0,n-1)+String.fromCharCode(i.charCodeAt(n-1)+1)+"\0":i=i.substring(0,n)+String.fromCharCode(t)}}mapBfRangeToArray(e,t,i){if(t-e>oze)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");const n=i.length;let s=0;for(;e<=t&&s<n;)this._map[e]=i[s++],++e}mapOne(e,t){this._map[e]=t}lookup(e){return this._map[e]}contains(e){return void 0!==this._map[e]}forEach(e){const t=this._map,i=t.length;if(i<=65536)for(let n=0;n<i;n++)void 0!==t[n]&&e(n,t[n]);else for(const n in t)e(n,t[n])}charCodeOf(e){const t=this._map;if(t.length<=65536)return t.indexOf(e);for(const i in t)if(t[i]===e)return 0|i;return-1}getMap(){return this._map}readCharCode(e,t,i){let n=0;const s=this.codespaceRanges;for(let r=0,a=s.length;r<a;r++){n=(n<<8|e.charCodeAt(t+r))>>>0;const a=s[r];for(let e=0,t=a.length;e<t;){const t=a[e++],s=a[e++];if(n>=t&&n<=s)return i.charcode=n,void(i.length=r+1)}}i.charcode=0,i.length=1}getCharCodeLength(e){const t=this.codespaceRanges;for(let i=0,n=t.length;i<n;i++){const n=t[i];for(let t=0,s=n.length;t<s;){const s=n[t++],r=n[t++];if(e>=s&&e<=r)return i+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(let e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}class Aze extends lze{constructor(e,t){super(),this.vertical=e,this.addCodespaceRange(t,0,65535)}mapCidRange(e,t,i){gVe("should not call mapCidRange")}mapBfRange(e,t,i){gVe("should not call mapBfRange")}mapBfRangeToArray(e,t,i){gVe("should not call mapBfRangeToArray")}mapOne(e,t){gVe("should not call mapCidOne")}lookup(e){return Number.isInteger(e)&&e<=65535?e:void 0}contains(e){return Number.isInteger(e)&&e<=65535}forEach(e){for(let t=0;t<=65535;t++)e(t,t)}charCodeOf(e){return Number.isInteger(e)&&e<=65535?e:-1}getMap(){const e=new Array(65536);for(let t=0;t<=65535;t++)e[t]=t;return e}get length(){return 65536}get isIdentityCMap(){gVe("should not access .isIdentityCMap")}}function cze(e){let t=0;for(let i=0;i<e.length;i++)t=t<<8|e.charCodeAt(i);return t>>>0}function uze(e){if("string"!=typeof e)throw new EVe("Malformed CMap: expected string.")}function hze(e){if(!Number.isInteger(e))throw new EVe("Malformed CMap: expected int.")}function dze(e,t){for(;;){let i=t.getObj();if(i===$Ve)break;if(cWe(i,"endbfchar"))return;uze(i);const n=cze(i);i=t.getObj(),uze(i);const s=i;e.mapOne(n,s)}}function gze(e,t){for(;;){let i=t.getObj();if(i===$Ve)break;if(cWe(i,"endbfrange"))return;uze(i);const n=cze(i);i=t.getObj(),uze(i);const s=cze(i);if(i=t.getObj(),Number.isInteger(i)||"string"==typeof i){const t=Number.isInteger(i)?String.fromCharCode(i):i;e.mapBfRange(n,s,t)}else{if(!cWe(i,"["))break;{i=t.getObj();const r=[];for(;!cWe(i,"]")&&i!==$Ve;)r.push(i),i=t.getObj();e.mapBfRangeToArray(n,s,r)}}}throw new EVe("Invalid bf range.")}function pze(e,t){for(;;){let i=t.getObj();if(i===$Ve)break;if(cWe(i,"endcidchar"))return;uze(i);const n=cze(i);i=t.getObj(),hze(i);const s=i;e.mapOne(n,s)}}function fze(e,t){for(;;){let i=t.getObj();if(i===$Ve)break;if(cWe(i,"endcidrange"))return;uze(i);const n=cze(i);i=t.getObj(),uze(i);const s=cze(i);i=t.getObj(),hze(i);const r=i;e.mapCidRange(n,s,r)}}function mze(e,t){for(;;){let i=t.getObj();if(i===$Ve)break;if(cWe(i,"endcodespacerange"))return;if("string"!=typeof i)break;const n=cze(i);if(i=t.getObj(),"string"!=typeof i)break;const s=cze(i);e.addCodespaceRange(i.length,n,s)}throw new EVe("Invalid codespace range.")}function Cze(e,t){const i=t.getObj();Number.isInteger(i)&&(e.vertical=!!i)}function Ize(e,t){const i=t.getObj();i instanceof iWe&&(e.name=i.name)}async function vze(e,t,i,n){let s,r;e:for(;;)try{const i=t.getObj();if(i===$Ve)break;if(i instanceof iWe)"WMode"===i.name?Cze(e,t):"CMapName"===i.name&&Ize(e,t),s=i;else if(i instanceof nWe)switch(i.cmd){case"endcmap":break e;case"usecmap":s instanceof iWe&&(r=s.name);break;case"begincodespacerange":mze(e,t);break;case"beginbfchar":dze(e,t);break;case"begincidchar":pze(e,t);break;case"beginbfrange":gze(e,t);break;case"begincidrange":fze(e,t)}}catch(a){if(a instanceof fWe)throw a;continue}return!n&&r&&(n=r),n?Bze(e,i,n):e}async function Bze(e,t,i){if(e.useCMap=await yze(i,t),0===e.numCodespaceRanges){const t=e.useCMap.codespaceRanges;for(let i=0;i<t.length;i++)e.codespaceRanges[i]=t[i].slice();e.numCodespaceRanges=e.useCMap.numCodespaceRanges}return e.useCMap.forEach((function(t,i){e.contains(t)||e.mapOne(t,i)})),e}async function yze(e,t){if("Identity-H"===e)return new Aze(!1,2);if("Identity-V"===e)return new Aze(!0,2);if(!aze.includes(e))throw new Error("Unknown CMap name: "+e);if(!t)throw new Error("Built-in CMap parameters are not provided.");const{cMapData:i,isCompressed:n}=await t(e),s=new lze(!0);if(n)return(new vje).process(i,s,(e=>Bze(s,t,e)));const r=new sze(new XWe(i));return vze(s,r,t,null)}class bze{static async create({encoding:e,fetchBuiltInCMap:t,useCMap:i}){if(e instanceof iWe)return yze(e.name,t);if(e instanceof dWe){const n=await vze(new lze,new sze(e),t,i);return n.isIdentityCMap?yze(n.name,t):n}throw new Error("Encoding required.")}}const Eze=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],wze=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],Qze=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"],_ze=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],Sze=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","centoldstyle","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","","threequartersemdash","","questionsmall","","","","","Ethsmall","","","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","","","","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hypheninferior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","asuperior","centsuperior","","","","","Aacutesmall","Agravesmall","Acircumflexsmall","Adieresissmall","Atildesmall","Aringsmall","Ccedillasmall","Eacutesmall","Egravesmall","Ecircumflexsmall","Edieresissmall","Iacutesmall","Igravesmall","Icircumflexsmall","Idieresissmall","Ntildesmall","Oacutesmall","Ogravesmall","Ocircumflexsmall","Odieresissmall","Otildesmall","Uacutesmall","Ugravesmall","Ucircumflexsmall","Udieresissmall","","eightsuperior","fourinferior","threeinferior","sixinferior","eightinferior","seveninferior","Scaronsmall","","centinferior","twoinferior","","Dieresissmall","","Caronsmall","osuperior","fiveinferior","","commainferior","periodinferior","Yacutesmall","","dollarinferior","","","Thornsmall","","nineinferior","zeroinferior","Zcaronsmall","AEsmall","Oslashsmall","questiondownsmall","oneinferior","Lslashsmall","","","","","","","Cedillasmall","","","","","","OEsmall","figuredash","hyphensuperior","","","","","exclamdownsmall","","Ydieresissmall","","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","ninesuperior","zerosuperior","","esuperior","rsuperior","tsuperior","","","isuperior","ssuperior","dsuperior","","","","","","lsuperior","Ogoneksmall","Brevesmall","Macronsmall","bsuperior","nsuperior","msuperior","commasuperior","periodsuperior","Dotaccentsmall","Ringsmall","","","",""],xze=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","space","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron"],kze=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls","","","",""],Dze=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","bullet","Euro","bullet","quotesinglbase","florin","quotedblbase","ellipsis","dagger","daggerdbl","circumflex","perthousand","Scaron","guilsinglleft","OE","bullet","Zcaron","bullet","bullet","quoteleft","quoteright","quotedblleft","quotedblright","bullet","endash","emdash","tilde","trademark","scaron","guilsinglright","oe","bullet","zcaron","Ydieresis","space","exclamdown","cent","sterling","currency","yen","brokenbar","section","dieresis","copyright","ordfeminine","guillemotleft","logicalnot","hyphen","registered","macron","degree","plusminus","twosuperior","threesuperior","acute","mu","paragraph","periodcentered","cedilla","onesuperior","ordmasculine","guillemotright","onequarter","onehalf","threequarters","questiondown","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring","AE","Ccedilla","Egrave","Eacute","Ecircumflex","Edieresis","Igrave","Iacute","Icircumflex","Idieresis","Eth","Ntilde","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","multiply","Oslash","Ugrave","Uacute","Ucircumflex","Udieresis","Yacute","Thorn","germandbls","agrave","aacute","acircumflex","atilde","adieresis","aring","ae","ccedilla","egrave","eacute","ecircumflex","edieresis","igrave","iacute","icircumflex","idieresis","eth","ntilde","ograve","oacute","ocircumflex","otilde","odieresis","divide","oslash","ugrave","uacute","ucircumflex","udieresis","yacute","thorn","ydieresis"],Fze=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","universal","numbersign","existential","percent","ampersand","suchthat","parenleft","parenright","asteriskmath","plus","comma","minus","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","congruent","Alpha","Beta","Chi","Delta","Epsilon","Phi","Gamma","Eta","Iota","theta1","Kappa","Lambda","Mu","Nu","Omicron","Pi","Theta","Rho","Sigma","Tau","Upsilon","sigma1","Omega","Xi","Psi","Zeta","bracketleft","therefore","bracketright","perpendicular","underscore","radicalex","alpha","beta","chi","delta","epsilon","phi","gamma","eta","iota","phi1","kappa","lambda","mu","nu","omicron","pi","theta","rho","sigma","tau","upsilon","omega1","omega","xi","psi","zeta","braceleft","bar","braceright","similar","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Euro","Upsilon1","minute","lessequal","fraction","infinity","florin","club","diamond","heart","spade","arrowboth","arrowleft","arrowup","arrowright","arrowdown","degree","plusminus","second","greaterequal","multiply","proportional","partialdiff","bullet","divide","notequal","equivalence","approxequal","ellipsis","arrowvertex","arrowhorizex","carriagereturn","aleph","Ifraktur","Rfraktur","weierstrass","circlemultiply","circleplus","emptyset","intersection","union","propersuperset","reflexsuperset","notsubset","propersubset","reflexsubset","element","notelement","angle","gradient","registerserif","copyrightserif","trademarkserif","product","radical","dotmath","logicalnot","logicaland","logicalor","arrowdblboth","arrowdblleft","arrowdblup","arrowdblright","arrowdbldown","lozenge","angleleft","registersans","copyrightsans","trademarksans","summation","parenlefttp","parenleftex","parenleftbt","bracketlefttp","bracketleftex","bracketleftbt","bracelefttp","braceleftmid","braceleftbt","braceex","","angleright","integral","integraltp","integralex","integralbt","parenrighttp","parenrightex","parenrightbt","bracketrighttp","bracketrightex","bracketrightbt","bracerighttp","bracerightmid","bracerightbt",""],Tze=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","a1","a2","a202","a3","a4","a5","a119","a118","a117","a11","a12","a13","a14","a15","a16","a105","a17","a18","a19","a20","a21","a22","a23","a24","a25","a26","a27","a28","a6","a7","a8","a9","a10","a29","a30","a31","a32","a33","a34","a35","a36","a37","a38","a39","a40","a41","a42","a43","a44","a45","a46","a47","a48","a49","a50","a51","a52","a53","a54","a55","a56","a57","a58","a59","a60","a61","a62","a63","a64","a65","a66","a67","a68","a69","a70","a71","a72","a73","a74","a203","a75","a204","a76","a77","a78","a79","a81","a82","a83","a84","a97","a98","a99","a100","","a89","a90","a93","a94","a91","a92","a205","a85","a206","a86","a87","a88","a95","a96","","","","","","","","","","","","","","","","","","","","a101","a102","a103","a104","a106","a107","a108","a112","a111","a110","a109","a120","a121","a122","a123","a124","a125","a126","a127","a128","a129","a130","a131","a132","a133","a134","a135","a136","a137","a138","a139","a140","a141","a142","a143","a144","a145","a146","a147","a148","a149","a150","a151","a152","a153","a154","a155","a156","a157","a158","a159","a160","a161","a163","a164","a196","a165","a192","a166","a167","a168","a169","a170","a171","a172","a173","a162","a174","a175","a176","a177","a178","a179","a193","a180","a199","a181","a200","a182","","a201","a183","a184","a197","a185","a194","a198","a186","a195","a187","a188","a189","a190","a191",""];function Mze(e){switch(e){case"WinAnsiEncoding":return Dze;case"StandardEncoding":return kze;case"MacRomanEncoding":return xze;case"SymbolSetEncoding":return Fze;case"ZapfDingbatsEncoding":return Tze;case"ExpertEncoding":return _ze;case"MacExpertEncoding":return Sze;default:return null}}const Rze=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],Nze=391,Lze=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],Uze=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]+e[t-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]-e[t-1]}},{id:"div",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]/e[t-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(e,t){e[t-1]=-e[t-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]*e[t-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];class Hze{constructor(e,t,i){this.bytes=e.getBytes(),this.properties=t,this.seacAnalysisEnabled=!!i}parse(){const e=this.properties,t=new Pze;this.cff=t;const i=this.parseHeader(),n=this.parseIndex(i.endPos),s=this.parseIndex(n.endPos),r=this.parseIndex(s.endPos),a=this.parseIndex(r.endPos),o=this.parseDict(s.obj.get(0)),l=this.createDict(Vze,o,t.strings);t.header=i.obj,t.names=this.parseNameIndex(n.obj),t.strings=this.parseStringIndex(r.obj),t.topDict=l,t.globalSubrIndex=a.obj,this.parsePrivateDict(t.topDict),t.isCIDFont=l.hasName("ROS");const A=l.getByName("CharStrings"),c=this.parseIndex(A).obj,u=l.getByName("FontMatrix");u&&(e.fontMatrix=u);const h=l.getByName("FontBBox");let d,g;if(h&&(e.ascent=Math.max(h[3],h[1]),e.descent=Math.min(h[1],h[3]),e.ascentScaled=!0),t.isCIDFont){const e=this.parseIndex(l.getByName("FDArray")).obj;for(let i=0,n=e.count;i<n;++i){const n=e.get(i),s=this.createDict(Vze,this.parseDict(n),t.strings);this.parsePrivateDict(s),t.fdArray.push(s)}g=null,d=this.parseCharsets(l.getByName("charset"),c.count,t.strings,!0),t.fdSelect=this.parseFDSelect(l.getByName("FDSelect"),c.count)}else d=this.parseCharsets(l.getByName("charset"),c.count,t.strings,!1),g=this.parseEncoding(l.getByName("Encoding"),e,t.strings,d.charset);t.charset=d,t.encoding=g;const p=this.parseCharStrings({charStrings:c,localSubrIndex:l.privateDict.subrsIndex,globalSubrIndex:a.obj,fdSelect:t.fdSelect,fdArray:t.fdArray,privateDict:l.privateDict});return t.charStrings=p.charStrings,t.seacs=p.seacs,t.widths=p.widths,t}parseHeader(){let e=this.bytes;const t=e.length;let i=0;for(;i<t&&1!==e[i];)++i;if(i>=t)throw new EVe("Invalid CFF header");0!==i&&(e=e.subarray(i),this.bytes=e);const n=e[0],s=e[1],r=e[2],a=e[3];return{obj:new Oze(n,s,r,a),endPos:r}}parseDict(e){let t=0;function i(){let i=e[t++];return 30===i?function(){let i="";const n=15,s=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],r=e.length;for(;t<r;){const r=e[t++],a=r>>4,o=15&r;if(a===n)break;if(i+=s[a],o===n)break;i+=s[o]}return parseFloat(i)}():28===i?(i=e[t++],i=(i<<24|e[t++]<<16)>>16,i):29===i?(i=e[t++],i=i<<8|e[t++],i=i<<8|e[t++],i=i<<8|e[t++],i):i>=32&&i<=246?i-139:i>=247&&i<=250?256*(i-247)+e[t++]+108:i>=251&&i<=254?-256*(i-251)-e[t++]-108:NaN}let n=[];const s=[];t=0;const r=e.length;for(;t<r;){let r=e[t];r<=21?(12===r&&(r=r<<8|e[++t]),s.push([r,n]),n=[],++t):n.push(i())}return s}parseIndex(e){const t=new Kze,i=this.bytes,n=i[e++]<<8|i[e++],s=[];let r,a,o=e;if(0!==n){const t=i[e++],l=e+(n+1)*t-1;for(r=0,a=n+1;r<a;++r){let n=0;for(let s=0;s<t;++s)n<<=8,n+=i[e++];s.push(l+n)}o=s[n]}for(r=0,a=s.length-1;r<a;++r){const e=s[r],n=s[r+1];t.add(i.subarray(e,n))}return{obj:t,endPos:o}}parseNameIndex(e){const t=[];for(let i=0,n=e.count;i<n;++i){const n=e.get(i);t.push(QVe(n))}return t}parseStringIndex(e){const t=new Gze;for(let i=0,n=e.count;i<n;++i){const n=e.get(i);t.add(QVe(n))}return t}createDict(e,t,i){const n=new e(i);for(const[s,r]of t)n.setByKey(s,r);return n}parseCharString(e,t,i,n){if(!t||e.callDepth>10)return!1;let s=e.stackSize;const r=e.stack;let a=t.length;for(let o=0;o<a;){const l=t[o++];let A=null;if(12===l){const e=t[o++];0===e?(t[o-2]=139,t[o-1]=22,s=0):A=Uze[e]}else if(28===l)r[s]=(t[o]<<24|t[o+1]<<16)>>16,o+=2,s++;else if(14===l){if(s>=4&&(s-=4,this.seacAnalysisEnabled))return e.seac=r.slice(s,s+4),!1;A=Lze[l]}else if(l>=32&&l<=246)r[s]=l-139,s++;else if(l>=247&&l<=254)r[s]=l<251?(l-247<<8)+t[o]+108:-(l-251<<8)-t[o]-108,o++,s++;else if(255===l)r[s]=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])/65536,o+=4,s++;else if(19===l||20===l){if(e.hints+=s>>1,0===e.hints){t.copyWithin(o-1,o,-1),o-=1,a-=1;continue}o+=e.hints+7>>3,s%=2,A=Lze[l]}else{if(10===l||29===l){const t=10===l?i:n;if(!t)return A=Lze[l],A.id,!1;let a=32768;t.count<1240?a=107:t.count<33900&&(a=1131);const o=r[--s]+a;if(o<0||o>=t.count||isNaN(o))return A=Lze[l],A.id,!1;e.stackSize=s,e.callDepth++;if(!this.parseCharString(e,t.get(o),i,n))return!1;e.callDepth--,s=e.stackSize;continue}if(11===l)return e.stackSize=s,!0;if(0===l&&o===t.length)t[o-1]=14,A=Lze[14];else{if(9===l){t.copyWithin(o-1,o,-1),o-=1,a-=1;continue}A=Lze[l]}}if(A){if(A.stem&&(e.hints+=s>>1,3===l||23===l?e.hasVStems=!0:!e.hasVStems||1!==l&&18!==l||(t[o-1]=1===l?3:23)),"min"in A&&!e.undefStack&&s<A.min)return A.id,A.min,0===s&&(t[o-1]=14,!0);e.firstStackClearing&&A.stackClearing&&(e.firstStackClearing=!1,s-=A.min,s>=2&&A.stem&&(s%=2),s>0&&(e.width=r[s-1])),"stackDelta"in A?("stackFn"in A&&A.stackFn(r,s),s+=A.stackDelta):A.stackClearing?s=0:A.resetStack?(s=0,e.undefStack=!1):A.undefStack&&(s=0,e.undefStack=!0,e.firstStackClearing=!1)}}return a<t.length&&t.fill(14,a),e.stackSize=s,!0}parseCharStrings({charStrings:e,localSubrIndex:t,globalSubrIndex:i,fdSelect:n,fdArray:s,privateDict:r}){const a=[],o=[],l=e.count;for(let A=0;A<l;A++){const l=e.get(A),c={callDepth:0,stackSize:0,stack:[],undefStack:!0,hints:0,firstStackClearing:!0,seac:null,width:null,hasVStems:!1};let u=!0,h=null,d=r;if(n&&s.length){const e=n.getFDIndex(A);-1===e&&(u=!1),e>=s.length&&(u=!1),u&&(d=s[e].privateDict,h=d.subrsIndex)}else t&&(h=t);if(u&&(u=this.parseCharString(c,l,h,i)),null!==c.width){const e=d.getByName("nominalWidthX");o[A]=e+c.width}else{const e=d.getByName("defaultWidthX");o[A]=e}null!==c.seac&&(a[A]=c.seac),u||e.set(A,new Uint8Array([14]))}return{charStrings:e,seacs:a,widths:o}}emptyPrivateDictionary(e){const t=this.createDict(jze,[],e.strings);e.setByKey(18,[0,0]),e.privateDict=t}parsePrivateDict(e){if(!e.hasName("Private"))return void this.emptyPrivateDictionary(e);const t=e.getByName("Private");if(!Array.isArray(t)||2!==t.length)return void e.removeByName("Private");const i=t[0],n=t[1];if(0===i||n>=this.bytes.length)return void this.emptyPrivateDictionary(e);const s=n+i,r=this.bytes.subarray(n,s),a=this.parseDict(r),o=this.createDict(jze,a,e.strings);if(e.privateDict=o,0===o.getByName("ExpansionFactor")&&o.setByName("ExpansionFactor",.06),!o.getByName("Subrs"))return;const l=o.getByName("Subrs"),A=n+l;if(0===l||A>=this.bytes.length)return void this.emptyPrivateDictionary(e);const c=this.parseIndex(A);o.subrsIndex=c.obj}parseCharsets(e,t,i,n){if(0===e)return new zze(!0,Jze.ISO_ADOBE,Eze);if(1===e)return new zze(!0,Jze.EXPERT,wze);if(2===e)return new zze(!0,Jze.EXPERT_SUBSET,Qze);const s=this.bytes,r=e,a=s[e++],o=[n?0:".notdef"];let l,A,c;switch(t-=1,a){case 0:for(c=0;c<t;c++)l=s[e++]<<8|s[e++],o.push(n?l:i.get(l));break;case 1:for(;o.length<=t;)for(l=s[e++]<<8|s[e++],A=s[e++],c=0;c<=A;c++)o.push(n?l++:i.get(l++));break;case 2:for(;o.length<=t;)for(l=s[e++]<<8|s[e++],A=s[e++]<<8|s[e++],c=0;c<=A;c++)o.push(n?l++:i.get(l++));break;default:throw new EVe("Unknown charset format")}const u=e,h=s.subarray(r,u);return new zze(!1,a,o,h)}parseEncoding(e,t,i,n){const s=Object.create(null),r=this.bytes;let a,o,l,A=!1,c=null;if(0===e||1===e){A=!0,a=e;const t=e?_ze:kze;for(o=0,l=n.length;o<l;o++){const e=t.indexOf(n[o]);-1!==e&&(s[e]=o)}}else{const t=e;switch(a=r[e++],127&a){case 0:const t=r[e++];for(o=1;o<=t;o++)s[r[e++]]=o;break;case 1:const i=r[e++];let n=1;for(o=0;o<i;o++){const t=r[e++],i=r[e++];for(let e=t;e<=t+i;e++)s[e]=n++}break;default:throw new EVe(`Unknown encoding format: ${a} in CFF`)}const l=e;128&a&&(r[t]&=127,function(){const t=r[e++];for(o=0;o<t;o++){const t=r[e++],a=(r[e++]<<8)+(255&r[e++]);s[t]=n.indexOf(i.get(a))}}()),c=r.subarray(t,l)}return a&=127,new Xze(A,a,s,c)}parseFDSelect(e,t){const i=this.bytes,n=i[e++],s=[];let r;switch(n){case 0:for(r=0;r<t;++r){const t=i[e++];s.push(t)}break;case 3:const a=i[e++]<<8|i[e++];for(r=0;r<a;++r){let t=i[e++]<<8|i[e++];0===r&&0!==t&&(t=0);const n=i[e++],a=i[e]<<8|i[e+1];for(let e=t;e<a;++e)s.push(n)}e+=2;break;default:throw new EVe(`parseFDSelect: Unknown format "${n}".`)}if(s.length!==t)throw new EVe("parseFDSelect: Invalid font data.");return new $ze(n,s)}}class Pze{constructor(){this.header=null,this.names=[],this.topDict=null,this.strings=new Gze,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}duplicateFirstGlyph(){if(this.charStrings.count>=65535)return;const e=this.charStrings.get(0);this.charStrings.add(e),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}hasGlyphId(e){if(e<0||e>=this.charStrings.count)return!1;return this.charStrings.get(e).length>0}}class Oze{constructor(e,t,i,n){this.major=e,this.minor=t,this.hdrSize=i,this.offSize=n}}class Gze{constructor(){this.strings=[]}get(e){return e>=0&&e<=390?Rze[e]:e-Nze<=this.strings.length?this.strings[e-Nze]:Rze[0]}getSID(e){let t=Rze.indexOf(e);return-1!==t?t:(t=this.strings.indexOf(e),-1!==t?t+Nze:-1)}add(e){this.strings.push(e)}get count(){return this.strings.length}}class Kze{constructor(){this.objects=[],this.length=0}add(e){this.length+=e.length,this.objects.push(e)}set(e,t){this.length+=t.length-this.objects[e].length,this.objects[e]=t}get(e){return this.objects[e]}get count(){return this.objects.length}}class qze{constructor(e,t){this.keyToNameMap=e.keyToNameMap,this.nameToKeyMap=e.nameToKeyMap,this.defaults=e.defaults,this.types=e.types,this.opcodes=e.opcodes,this.order=e.order,this.strings=t,this.values=Object.create(null)}setByKey(e,t){if(!(e in this.keyToNameMap))return!1;if(0===t.length)return!0;for(const n of t)if(isNaN(n))return!0;const i=this.types[e];return"num"!==i&&"sid"!==i&&"offset"!==i||(t=t[0]),this.values[e]=t,!0}setByName(e,t){if(!(e in this.nameToKeyMap))throw new EVe(`Invalid dictionary name "${e}"`);this.values[this.nameToKeyMap[e]]=t}hasName(e){return this.nameToKeyMap[e]in this.values}getByName(e){if(!(e in this.nameToKeyMap))throw new EVe(`Invalid dictionary name ${e}"`);const t=this.nameToKeyMap[e];return t in this.values?this.values[t]:this.defaults[t]}removeByName(e){delete this.values[this.nameToKeyMap[e]]}static createTables(e){const t={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]};for(const i of e){const e=Array.isArray(i[0])?(i[0][0]<<8)+i[0][1]:i[0];t.keyToNameMap[e]=i[1],t.nameToKeyMap[i[1]]=e,t.types[e]=i[2],t.defaults[e]=i[3],t.opcodes[e]=Array.isArray(i[0])?i[0]:[i[0]],t.order.push(e)}return t}}const Yze=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]];class Vze extends qze{static get tables(){return mVe(this,"tables",this.createTables(Yze))}constructor(e){super(Vze.tables,e),this.privateDict=null}}const Wze=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]];class jze extends qze{static get tables(){return mVe(this,"tables",this.createTables(Wze))}constructor(e){super(jze.tables,e),this.subrsIndex=null}}const Jze={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2};class zze{constructor(e,t,i,n){this.predefined=e,this.format=t,this.charset=i,this.raw=n}}class Xze{constructor(e,t,i,n){this.predefined=e,this.format=t,this.encoding=i,this.raw=n}}class $ze{constructor(e,t){this.format=e,this.fdSelect=t}getFDIndex(e){return e<0||e>=this.fdSelect.length?-1:this.fdSelect[e]}}class Zze{constructor(){this.offsets=Object.create(null)}isTracking(e){return e in this.offsets}track(e,t){if(e in this.offsets)throw new EVe(`Already tracking location of ${e}`);this.offsets[e]=t}offset(e){for(const t in this.offsets)this.offsets[t]+=e}setEntryLocation(e,t,i){if(!(e in this.offsets))throw new EVe(`Not tracking location of ${e}`);const n=i.data,s=this.offsets[e];for(let r=0,a=t.length;r<a;++r){const e=5*r+s,i=e+1,a=e+2,o=e+3,l=e+4;if(29!==n[e]||0!==n[i]||0!==n[a]||0!==n[o]||0!==n[l])throw new EVe("writing to an offset that is not empty");const A=t[r];n[e]=29,n[i]=A>>24&255,n[a]=A>>16&255,n[o]=A>>8&255,n[l]=255&A}}}class eXe{constructor(e){this.cff=e}compile(){const e=this.cff,t={data:[],length:0,add(e){try{this.data.push(...e)}catch{this.data=this.data.concat(e)}this.length=this.data.length}},i=this.compileHeader(e.header);t.add(i);const n=this.compileNameIndex(e.names);if(t.add(n),e.isCIDFont&&e.topDict.hasName("FontMatrix")){const t=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(const i of e.fdArray){let e=t.slice(0);i.hasName("FontMatrix")&&(e=FVe.transform(e,i.getByName("FontMatrix"))),i.setByName("FontMatrix",e)}}const s=e.topDict.getByName("XUID");(null==s?void 0:s.length)>16&&e.topDict.removeByName("XUID"),e.topDict.setByName("charset",0);let r=this.compileTopDicts([e.topDict],t.length,e.isCIDFont);t.add(r.output);const a=r.trackers[0],o=this.compileStringIndex(e.strings.strings);t.add(o);const l=this.compileIndex(e.globalSubrIndex);if(t.add(l),e.encoding&&e.topDict.hasName("Encoding"))if(e.encoding.predefined)a.setEntryLocation("Encoding",[e.encoding.format],t);else{const i=this.compileEncoding(e.encoding);a.setEntryLocation("Encoding",[t.length],t),t.add(i)}const A=this.compileCharset(e.charset,e.charStrings.count,e.strings,e.isCIDFont);a.setEntryLocation("charset",[t.length],t),t.add(A);const c=this.compileCharStrings(e.charStrings);if(a.setEntryLocation("CharStrings",[t.length],t),t.add(c),e.isCIDFont){a.setEntryLocation("FDSelect",[t.length],t);const i=this.compileFDSelect(e.fdSelect);t.add(i),r=this.compileTopDicts(e.fdArray,t.length,!0),a.setEntryLocation("FDArray",[t.length],t),t.add(r.output);const n=r.trackers;this.compilePrivateDicts(e.fdArray,n,t)}return this.compilePrivateDicts([e.topDict],[a],t),t.add([0]),t.data}encodeNumber(e){return Number.isInteger(e)?this.encodeInteger(e):this.encodeFloat(e)}static get EncodeFloatRegExp(){return mVe(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}encodeFloat(e){let t=e.toString();const i=eXe.EncodeFloatRegExp.exec(t);if(i){const n=parseFloat("1e"+((i[2]?+i[2]:0)+i[1].length));t=(Math.round(e*n)/n).toString()}let n,s,r="";for(n=0,s=t.length;n<s;++n){const e=t[n];r+="e"===e?"-"===t[++n]?"c":"b":"."===e?"a":"-"===e?"e":e}r+=1&r.length?"f":"ff";const a=[30];for(n=0,s=r.length;n<s;n+=2)a.push(parseInt(r.substring(n,n+2),16));return a}encodeInteger(e){let t;return t=e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e],t}compileHeader(e){return[e.major,e.minor,4,e.offSize]}compileNameIndex(e){const t=new Kze;for(const i of e){const e=Math.min(i.length,127);let n=new Array(e);for(let t=0;t<e;t++){let e=i[t];(e<"!"||e>"~"||"["===e||"]"===e||"("===e||")"===e||"{"===e||"}"===e||"<"===e||">"===e||"/"===e||"%"===e)&&(e="_"),n[t]=e}n=n.join(""),""===n&&(n="Bad_Font_Name"),t.add(_Ve(n))}return this.compileIndex(t)}compileTopDicts(e,t,i){const n=[];let s=new Kze;for(const r of e){i&&(r.removeByName("CIDFontVersion"),r.removeByName("CIDFontRevision"),r.removeByName("CIDFontType"),r.removeByName("CIDCount"),r.removeByName("UIDBase"));const e=new Zze,a=this.compileDict(r,e);n.push(e),s.add(a),e.offset(t)}return s=this.compileIndex(s,n),{trackers:n,output:s}}compilePrivateDicts(e,t,i){for(let n=0,s=e.length;n<s;++n){const s=e[n],r=s.privateDict;if(!r||!s.hasName("Private"))throw new EVe("There must be a private dictionary.");const a=new Zze,o=this.compileDict(r,a);let l=i.length;if(a.offset(l),o.length||(l=0),t[n].setEntryLocation("Private",[o.length,l],i),i.add(o),r.subrsIndex&&r.hasName("Subrs")){const e=this.compileIndex(r.subrsIndex);a.setEntryLocation("Subrs",[o.length],i),i.add(e)}}}compileDict(e,t){const i=[];for(const n of e.order){if(!(n in e.values))continue;let s=e.values[n],r=e.types[n];if(Array.isArray(r)||(r=[r]),Array.isArray(s)||(s=[s]),0!==s.length){for(let a=0,o=r.length;a<o;++a){const o=r[a],l=s[a];switch(o){case"num":case"sid":i.push(...this.encodeNumber(l));break;case"offset":const r=e.keyToNameMap[n];t.isTracking(r)||t.track(r,i.length),i.push(29,0,0,0,0);break;case"array":case"delta":i.push(...this.encodeNumber(l));for(let e=1,t=s.length;e<t;++e)i.push(...this.encodeNumber(s[e]));break;default:throw new EVe(`Unknown data type of ${o}`)}}i.push(...e.opcodes[n])}}return i}compileStringIndex(e){const t=new Kze;for(const i of e)t.add(_Ve(i));return this.compileIndex(t)}compileCharStrings(e){const t=new Kze;for(let i=0;i<e.count;i++){const n=e.get(i);0!==n.length?t.add(n):t.add(new Uint8Array([139,14]))}return this.compileIndex(t)}compileCharset(e,t,i,n){let s;const r=t-1;if(n)s=new Uint8Array([2,0,0,r>>8&255,255&r]);else{s=new Uint8Array(1+2*r),s[0]=0;let t=0;const n=e.charset.length;let a=!1;for(let r=1;r<s.length;r+=2){let o=0;if(t<n){const n=e.charset[t++];o=i.getSID(n),-1===o&&(o=0,a||(a=!0))}s[r]=o>>8&255,s[r+1]=255&o}}return this.compileTypedArray(s)}compileEncoding(e){return this.compileTypedArray(e.raw)}compileFDSelect(e){const t=e.format;let i,n;switch(t){case 0:for(i=new Uint8Array(1+e.fdSelect.length),i[0]=t,n=0;n<e.fdSelect.length;n++)i[n+1]=e.fdSelect[n];break;case 3:const s=0;let r=e.fdSelect[0];const a=[t,0,0,s>>8&255,255&s,r];for(n=1;n<e.fdSelect.length;n++){const t=e.fdSelect[n];t!==r&&(a.push(n>>8&255,255&n,t),r=t)}const o=(a.length-3)/3;a[1]=o>>8&255,a[2]=255&o,a.push(n>>8&255,255&n),i=new Uint8Array(a)}return this.compileTypedArray(i)}compileTypedArray(e){return Array.from(e)}compileIndex(e,t=[]){const i=e.objects,n=i.length;if(0===n)return[0,0];const s=[n>>8&255,255&n];let r,a,o=1;for(r=0;r<n;++r)o+=i[r].length;a=o<256?1:o<65536?2:o<16777216?3:4,s.push(a);let l=1;for(r=0;r<n+1;r++)1===a?s.push(255&l):2===a?s.push(l>>8&255,255&l):3===a?s.push(l>>16&255,l>>8&255,255&l):s.push(l>>>24&255,l>>16&255,l>>8&255,255&l),i[r]&&(l+=i[r].length);for(r=0;r<n;r++)t[r]&&t[r].offset(s.length),s.push(...i[r]);return s}}const tXe=pWe((function(e){e.A=65,e.AE=198,e.AEacute=508,e.AEmacron=482,e.AEsmall=63462,e.Aacute=193,e.Aacutesmall=63457,e.Abreve=258,e.Abreveacute=7854,e.Abrevecyrillic=1232,e.Abrevedotbelow=7862,e.Abrevegrave=7856,e.Abrevehookabove=7858,e.Abrevetilde=7860,e.Acaron=461,e.Acircle=9398,e.Acircumflex=194,e.Acircumflexacute=7844,e.Acircumflexdotbelow=7852,e.Acircumflexgrave=7846,e.Acircumflexhookabove=7848,e.Acircumflexsmall=63458,e.Acircumflextilde=7850,e.Acute=63177,e.Acutesmall=63412,e.Acyrillic=1040,e.Adblgrave=512,e.Adieresis=196,e.Adieresiscyrillic=1234,e.Adieresismacron=478,e.Adieresissmall=63460,e.Adotbelow=7840,e.Adotmacron=480,e.Agrave=192,e.Agravesmall=63456,e.Ahookabove=7842,e.Aiecyrillic=1236,e.Ainvertedbreve=514,e.Alpha=913,e.Alphatonos=902,e.Amacron=256,e.Amonospace=65313,e.Aogonek=260,e.Aring=197,e.Aringacute=506,e.Aringbelow=7680,e.Aringsmall=63461,e.Asmall=63329,e.Atilde=195,e.Atildesmall=63459,e.Aybarmenian=1329,e.B=66,e.Bcircle=9399,e.Bdotaccent=7682,e.Bdotbelow=7684,e.Becyrillic=1041,e.Benarmenian=1330,e.Beta=914,e.Bhook=385,e.Blinebelow=7686,e.Bmonospace=65314,e.Brevesmall=63220,e.Bsmall=63330,e.Btopbar=386,e.C=67,e.Caarmenian=1342,e.Cacute=262,e.Caron=63178,e.Caronsmall=63221,e.Ccaron=268,e.Ccedilla=199,e.Ccedillaacute=7688,e.Ccedillasmall=63463,e.Ccircle=9400,e.Ccircumflex=264,e.Cdot=266,e.Cdotaccent=266,e.Cedillasmall=63416,e.Chaarmenian=1353,e.Cheabkhasiancyrillic=1212,e.Checyrillic=1063,e.Chedescenderabkhasiancyrillic=1214,e.Chedescendercyrillic=1206,e.Chedieresiscyrillic=1268,e.Cheharmenian=1347,e.Chekhakassiancyrillic=1227,e.Cheverticalstrokecyrillic=1208,e.Chi=935,e.Chook=391,e.Circumflexsmall=63222,e.Cmonospace=65315,e.Coarmenian=1361,e.Csmall=63331,e.D=68,e.DZ=497,e.DZcaron=452,e.Daarmenian=1332,e.Dafrican=393,e.Dcaron=270,e.Dcedilla=7696,e.Dcircle=9401,e.Dcircumflexbelow=7698,e.Dcroat=272,e.Ddotaccent=7690,e.Ddotbelow=7692,e.Decyrillic=1044,e.Deicoptic=1006,e.Delta=8710,e.Deltagreek=916,e.Dhook=394,e.Dieresis=63179,e.DieresisAcute=63180,e.DieresisGrave=63181,e.Dieresissmall=63400,e.Digammagreek=988,e.Djecyrillic=1026,e.Dlinebelow=7694,e.Dmonospace=65316,e.Dotaccentsmall=63223,e.Dslash=272,e.Dsmall=63332,e.Dtopbar=395,e.Dz=498,e.Dzcaron=453,e.Dzeabkhasiancyrillic=1248,e.Dzecyrillic=1029,e.Dzhecyrillic=1039,e.E=69,e.Eacute=201,e.Eacutesmall=63465,e.Ebreve=276,e.Ecaron=282,e.Ecedillabreve=7708,e.Echarmenian=1333,e.Ecircle=9402,e.Ecircumflex=202,e.Ecircumflexacute=7870,e.Ecircumflexbelow=7704,e.Ecircumflexdotbelow=7878,e.Ecircumflexgrave=7872,e.Ecircumflexhookabove=7874,e.Ecircumflexsmall=63466,e.Ecircumflextilde=7876,e.Ecyrillic=1028,e.Edblgrave=516,e.Edieresis=203,e.Edieresissmall=63467,e.Edot=278,e.Edotaccent=278,e.Edotbelow=7864,e.Efcyrillic=1060,e.Egrave=200,e.Egravesmall=63464,e.Eharmenian=1335,e.Ehookabove=7866,e.Eightroman=8551,e.Einvertedbreve=518,e.Eiotifiedcyrillic=1124,e.Elcyrillic=1051,e.Elevenroman=8554,e.Emacron=274,e.Emacronacute=7702,e.Emacrongrave=7700,e.Emcyrillic=1052,e.Emonospace=65317,e.Encyrillic=1053,e.Endescendercyrillic=1186,e.Eng=330,e.Enghecyrillic=1188,e.Enhookcyrillic=1223,e.Eogonek=280,e.Eopen=400,e.Epsilon=917,e.Epsilontonos=904,e.Ercyrillic=1056,e.Ereversed=398,e.Ereversedcyrillic=1069,e.Escyrillic=1057,e.Esdescendercyrillic=1194,e.Esh=425,e.Esmall=63333,e.Eta=919,e.Etarmenian=1336,e.Etatonos=905,e.Eth=208,e.Ethsmall=63472,e.Etilde=7868,e.Etildebelow=7706,e.Euro=8364,e.Ezh=439,e.Ezhcaron=494,e.Ezhreversed=440,e.F=70,e.Fcircle=9403,e.Fdotaccent=7710,e.Feharmenian=1366,e.Feicoptic=996,e.Fhook=401,e.Fitacyrillic=1138,e.Fiveroman=8548,e.Fmonospace=65318,e.Fourroman=8547,e.Fsmall=63334,e.G=71,e.GBsquare=13191,e.Gacute=500,e.Gamma=915,e.Gammaafrican=404,e.Gangiacoptic=1002,e.Gbreve=286,e.Gcaron=486,e.Gcedilla=290,e.Gcircle=9404,e.Gcircumflex=284,e.Gcommaaccent=290,e.Gdot=288,e.Gdotaccent=288,e.Gecyrillic=1043,e.Ghadarmenian=1346,e.Ghemiddlehookcyrillic=1172,e.Ghestrokecyrillic=1170,e.Gheupturncyrillic=1168,e.Ghook=403,e.Gimarmenian=1331,e.Gjecyrillic=1027,e.Gmacron=7712,e.Gmonospace=65319,e.Grave=63182,e.Gravesmall=63328,e.Gsmall=63335,e.Gsmallhook=667,e.Gstroke=484,e.H=72,e.H18533=9679,e.H18543=9642,e.H18551=9643,e.H22073=9633,e.HPsquare=13259,e.Haabkhasiancyrillic=1192,e.Hadescendercyrillic=1202,e.Hardsigncyrillic=1066,e.Hbar=294,e.Hbrevebelow=7722,e.Hcedilla=7720,e.Hcircle=9405,e.Hcircumflex=292,e.Hdieresis=7718,e.Hdotaccent=7714,e.Hdotbelow=7716,e.Hmonospace=65320,e.Hoarmenian=1344,e.Horicoptic=1e3,e.Hsmall=63336,e.Hungarumlaut=63183,e.Hungarumlautsmall=63224,e.Hzsquare=13200,e.I=73,e.IAcyrillic=1071,e.IJ=306,e.IUcyrillic=1070,e.Iacute=205,e.Iacutesmall=63469,e.Ibreve=300,e.Icaron=463,e.Icircle=9406,e.Icircumflex=206,e.Icircumflexsmall=63470,e.Icyrillic=1030,e.Idblgrave=520,e.Idieresis=207,e.Idieresisacute=7726,e.Idieresiscyrillic=1252,e.Idieresissmall=63471,e.Idot=304,e.Idotaccent=304,e.Idotbelow=7882,e.Iebrevecyrillic=1238,e.Iecyrillic=1045,e.Ifraktur=8465,e.Igrave=204,e.Igravesmall=63468,e.Ihookabove=7880,e.Iicyrillic=1048,e.Iinvertedbreve=522,e.Iishortcyrillic=1049,e.Imacron=298,e.Imacroncyrillic=1250,e.Imonospace=65321,e.Iniarmenian=1339,e.Iocyrillic=1025,e.Iogonek=302,e.Iota=921,e.Iotaafrican=406,e.Iotadieresis=938,e.Iotatonos=906,e.Ismall=63337,e.Istroke=407,e.Itilde=296,e.Itildebelow=7724,e.Izhitsacyrillic=1140,e.Izhitsadblgravecyrillic=1142,e.J=74,e.Jaarmenian=1345,e.Jcircle=9407,e.Jcircumflex=308,e.Jecyrillic=1032,e.Jheharmenian=1355,e.Jmonospace=65322,e.Jsmall=63338,e.K=75,e.KBsquare=13189,e.KKsquare=13261,e.Kabashkircyrillic=1184,e.Kacute=7728,e.Kacyrillic=1050,e.Kadescendercyrillic=1178,e.Kahookcyrillic=1219,e.Kappa=922,e.Kastrokecyrillic=1182,e.Kaverticalstrokecyrillic=1180,e.Kcaron=488,e.Kcedilla=310,e.Kcircle=9408,e.Kcommaaccent=310,e.Kdotbelow=7730,e.Keharmenian=1364,e.Kenarmenian=1343,e.Khacyrillic=1061,e.Kheicoptic=998,e.Khook=408,e.Kjecyrillic=1036,e.Klinebelow=7732,e.Kmonospace=65323,e.Koppacyrillic=1152,e.Koppagreek=990,e.Ksicyrillic=1134,e.Ksmall=63339,e.L=76,e.LJ=455,e.LL=63167,e.Lacute=313,e.Lambda=923,e.Lcaron=317,e.Lcedilla=315,e.Lcircle=9409,e.Lcircumflexbelow=7740,e.Lcommaaccent=315,e.Ldot=319,e.Ldotaccent=319,e.Ldotbelow=7734,e.Ldotbelowmacron=7736,e.Liwnarmenian=1340,e.Lj=456,e.Ljecyrillic=1033,e.Llinebelow=7738,e.Lmonospace=65324,e.Lslash=321,e.Lslashsmall=63225,e.Lsmall=63340,e.M=77,e.MBsquare=13190,e.Macron=63184,e.Macronsmall=63407,e.Macute=7742,e.Mcircle=9410,e.Mdotaccent=7744,e.Mdotbelow=7746,e.Menarmenian=1348,e.Mmonospace=65325,e.Msmall=63341,e.Mturned=412,e.Mu=924,e.N=78,e.NJ=458,e.Nacute=323,e.Ncaron=327,e.Ncedilla=325,e.Ncircle=9411,e.Ncircumflexbelow=7754,e.Ncommaaccent=325,e.Ndotaccent=7748,e.Ndotbelow=7750,e.Nhookleft=413,e.Nineroman=8552,e.Nj=459,e.Njecyrillic=1034,e.Nlinebelow=7752,e.Nmonospace=65326,e.Nowarmenian=1350,e.Nsmall=63342,e.Ntilde=209,e.Ntildesmall=63473,e.Nu=925,e.O=79,e.OE=338,e.OEsmall=63226,e.Oacute=211,e.Oacutesmall=63475,e.Obarredcyrillic=1256,e.Obarreddieresiscyrillic=1258,e.Obreve=334,e.Ocaron=465,e.Ocenteredtilde=415,e.Ocircle=9412,e.Ocircumflex=212,e.Ocircumflexacute=7888,e.Ocircumflexdotbelow=7896,e.Ocircumflexgrave=7890,e.Ocircumflexhookabove=7892,e.Ocircumflexsmall=63476,e.Ocircumflextilde=7894,e.Ocyrillic=1054,e.Odblacute=336,e.Odblgrave=524,e.Odieresis=214,e.Odieresiscyrillic=1254,e.Odieresissmall=63478,e.Odotbelow=7884,e.Ogoneksmall=63227,e.Ograve=210,e.Ogravesmall=63474,e.Oharmenian=1365,e.Ohm=8486,e.Ohookabove=7886,e.Ohorn=416,e.Ohornacute=7898,e.Ohorndotbelow=7906,e.Ohorngrave=7900,e.Ohornhookabove=7902,e.Ohorntilde=7904,e.Ohungarumlaut=336,e.Oi=418,e.Oinvertedbreve=526,e.Omacron=332,e.Omacronacute=7762,e.Omacrongrave=7760,e.Omega=8486,e.Omegacyrillic=1120,e.Omegagreek=937,e.Omegaroundcyrillic=1146,e.Omegatitlocyrillic=1148,e.Omegatonos=911,e.Omicron=927,e.Omicrontonos=908,e.Omonospace=65327,e.Oneroman=8544,e.Oogonek=490,e.Oogonekmacron=492,e.Oopen=390,e.Oslash=216,e.Oslashacute=510,e.Oslashsmall=63480,e.Osmall=63343,e.Ostrokeacute=510,e.Otcyrillic=1150,e.Otilde=213,e.Otildeacute=7756,e.Otildedieresis=7758,e.Otildesmall=63477,e.P=80,e.Pacute=7764,e.Pcircle=9413,e.Pdotaccent=7766,e.Pecyrillic=1055,e.Peharmenian=1354,e.Pemiddlehookcyrillic=1190,e.Phi=934,e.Phook=420,e.Pi=928,e.Piwrarmenian=1363,e.Pmonospace=65328,e.Psi=936,e.Psicyrillic=1136,e.Psmall=63344,e.Q=81,e.Qcircle=9414,e.Qmonospace=65329,e.Qsmall=63345,e.R=82,e.Raarmenian=1356,e.Racute=340,e.Rcaron=344,e.Rcedilla=342,e.Rcircle=9415,e.Rcommaaccent=342,e.Rdblgrave=528,e.Rdotaccent=7768,e.Rdotbelow=7770,e.Rdotbelowmacron=7772,e.Reharmenian=1360,e.Rfraktur=8476,e.Rho=929,e.Ringsmall=63228,e.Rinvertedbreve=530,e.Rlinebelow=7774,e.Rmonospace=65330,e.Rsmall=63346,e.Rsmallinverted=641,e.Rsmallinvertedsuperior=694,e.S=83,e.SF010000=9484,e.SF020000=9492,e.SF030000=9488,e.SF040000=9496,e.SF050000=9532,e.SF060000=9516,e.SF070000=9524,e.SF080000=9500,e.SF090000=9508,e.SF100000=9472,e.SF110000=9474,e.SF190000=9569,e.SF200000=9570,e.SF210000=9558,e.SF220000=9557,e.SF230000=9571,e.SF240000=9553,e.SF250000=9559,e.SF260000=9565,e.SF270000=9564,e.SF280000=9563,e.SF360000=9566,e.SF370000=9567,e.SF380000=9562,e.SF390000=9556,e.SF400000=9577,e.SF410000=9574,e.SF420000=9568,e.SF430000=9552,e.SF440000=9580,e.SF450000=9575,e.SF460000=9576,e.SF470000=9572,e.SF480000=9573,e.SF490000=9561,e.SF500000=9560,e.SF510000=9554,e.SF520000=9555,e.SF530000=9579,e.SF540000=9578,e.Sacute=346,e.Sacutedotaccent=7780,e.Sampigreek=992,e.Scaron=352,e.Scarondotaccent=7782,e.Scaronsmall=63229,e.Scedilla=350,e.Schwa=399,e.Schwacyrillic=1240,e.Schwadieresiscyrillic=1242,e.Scircle=9416,e.Scircumflex=348,e.Scommaaccent=536,e.Sdotaccent=7776,e.Sdotbelow=7778,e.Sdotbelowdotaccent=7784,e.Seharmenian=1357,e.Sevenroman=8550,e.Shaarmenian=1351,e.Shacyrillic=1064,e.Shchacyrillic=1065,e.Sheicoptic=994,e.Shhacyrillic=1210,e.Shimacoptic=1004,e.Sigma=931,e.Sixroman=8549,e.Smonospace=65331,e.Softsigncyrillic=1068,e.Ssmall=63347,e.Stigmagreek=986,e.T=84,e.Tau=932,e.Tbar=358,e.Tcaron=356,e.Tcedilla=354,e.Tcircle=9417,e.Tcircumflexbelow=7792,e.Tcommaaccent=354,e.Tdotaccent=7786,e.Tdotbelow=7788,e.Tecyrillic=1058,e.Tedescendercyrillic=1196,e.Tenroman=8553,e.Tetsecyrillic=1204,e.Theta=920,e.Thook=428,e.Thorn=222,e.Thornsmall=63486,e.Threeroman=8546,e.Tildesmall=63230,e.Tiwnarmenian=1359,e.Tlinebelow=7790,e.Tmonospace=65332,e.Toarmenian=1337,e.Tonefive=444,e.Tonesix=388,e.Tonetwo=423,e.Tretroflexhook=430,e.Tsecyrillic=1062,e.Tshecyrillic=1035,e.Tsmall=63348,e.Twelveroman=8555,e.Tworoman=8545,e.U=85,e.Uacute=218,e.Uacutesmall=63482,e.Ubreve=364,e.Ucaron=467,e.Ucircle=9418,e.Ucircumflex=219,e.Ucircumflexbelow=7798,e.Ucircumflexsmall=63483,e.Ucyrillic=1059,e.Udblacute=368,e.Udblgrave=532,e.Udieresis=220,e.Udieresisacute=471,e.Udieresisbelow=7794,e.Udieresiscaron=473,e.Udieresiscyrillic=1264,e.Udieresisgrave=475,e.Udieresismacron=469,e.Udieresissmall=63484,e.Udotbelow=7908,e.Ugrave=217,e.Ugravesmall=63481,e.Uhookabove=7910,e.Uhorn=431,e.Uhornacute=7912,e.Uhorndotbelow=7920,e.Uhorngrave=7914,e.Uhornhookabove=7916,e.Uhorntilde=7918,e.Uhungarumlaut=368,e.Uhungarumlautcyrillic=1266,e.Uinvertedbreve=534,e.Ukcyrillic=1144,e.Umacron=362,e.Umacroncyrillic=1262,e.Umacrondieresis=7802,e.Umonospace=65333,e.Uogonek=370,e.Upsilon=933,e.Upsilon1=978,e.Upsilonacutehooksymbolgreek=979,e.Upsilonafrican=433,e.Upsilondieresis=939,e.Upsilondieresishooksymbolgreek=980,e.Upsilonhooksymbol=978,e.Upsilontonos=910,e.Uring=366,e.Ushortcyrillic=1038,e.Usmall=63349,e.Ustraightcyrillic=1198,e.Ustraightstrokecyrillic=1200,e.Utilde=360,e.Utildeacute=7800,e.Utildebelow=7796,e.V=86,e.Vcircle=9419,e.Vdotbelow=7806,e.Vecyrillic=1042,e.Vewarmenian=1358,e.Vhook=434,e.Vmonospace=65334,e.Voarmenian=1352,e.Vsmall=63350,e.Vtilde=7804,e.W=87,e.Wacute=7810,e.Wcircle=9420,e.Wcircumflex=372,e.Wdieresis=7812,e.Wdotaccent=7814,e.Wdotbelow=7816,e.Wgrave=7808,e.Wmonospace=65335,e.Wsmall=63351,e.X=88,e.Xcircle=9421,e.Xdieresis=7820,e.Xdotaccent=7818,e.Xeharmenian=1341,e.Xi=926,e.Xmonospace=65336,e.Xsmall=63352,e.Y=89,e.Yacute=221,e.Yacutesmall=63485,e.Yatcyrillic=1122,e.Ycircle=9422,e.Ycircumflex=374,e.Ydieresis=376,e.Ydieresissmall=63487,e.Ydotaccent=7822,e.Ydotbelow=7924,e.Yericyrillic=1067,e.Yerudieresiscyrillic=1272,e.Ygrave=7922,e.Yhook=435,e.Yhookabove=7926,e.Yiarmenian=1349,e.Yicyrillic=1031,e.Yiwnarmenian=1362,e.Ymonospace=65337,e.Ysmall=63353,e.Ytilde=7928,e.Yusbigcyrillic=1130,e.Yusbigiotifiedcyrillic=1132,e.Yuslittlecyrillic=1126,e.Yuslittleiotifiedcyrillic=1128,e.Z=90,e.Zaarmenian=1334,e.Zacute=377,e.Zcaron=381,e.Zcaronsmall=63231,e.Zcircle=9423,e.Zcircumflex=7824,e.Zdot=379,e.Zdotaccent=379,e.Zdotbelow=7826,e.Zecyrillic=1047,e.Zedescendercyrillic=1176,e.Zedieresiscyrillic=1246,e.Zeta=918,e.Zhearmenian=1338,e.Zhebrevecyrillic=1217,e.Zhecyrillic=1046,e.Zhedescendercyrillic=1174,e.Zhedieresiscyrillic=1244,e.Zlinebelow=7828,e.Zmonospace=65338,e.Zsmall=63354,e.Zstroke=437,e.a=97,e.aabengali=2438,e.aacute=225,e.aadeva=2310,e.aagujarati=2694,e.aagurmukhi=2566,e.aamatragurmukhi=2622,e.aarusquare=13059,e.aavowelsignbengali=2494,e.aavowelsigndeva=2366,e.aavowelsigngujarati=2750,e.abbreviationmarkarmenian=1375,e.abbreviationsigndeva=2416,e.abengali=2437,e.abopomofo=12570,e.abreve=259,e.abreveacute=7855,e.abrevecyrillic=1233,e.abrevedotbelow=7863,e.abrevegrave=7857,e.abrevehookabove=7859,e.abrevetilde=7861,e.acaron=462,e.acircle=9424,e.acircumflex=226,e.acircumflexacute=7845,e.acircumflexdotbelow=7853,e.acircumflexgrave=7847,e.acircumflexhookabove=7849,e.acircumflextilde=7851,e.acute=180,e.acutebelowcmb=791,e.acutecmb=769,e.acutecomb=769,e.acutedeva=2388,e.acutelowmod=719,e.acutetonecmb=833,e.acyrillic=1072,e.adblgrave=513,e.addakgurmukhi=2673,e.adeva=2309,e.adieresis=228,e.adieresiscyrillic=1235,e.adieresismacron=479,e.adotbelow=7841,e.adotmacron=481,e.ae=230,e.aeacute=509,e.aekorean=12624,e.aemacron=483,e.afii00208=8213,e.afii08941=8356,e.afii10017=1040,e.afii10018=1041,e.afii10019=1042,e.afii10020=1043,e.afii10021=1044,e.afii10022=1045,e.afii10023=1025,e.afii10024=1046,e.afii10025=1047,e.afii10026=1048,e.afii10027=1049,e.afii10028=1050,e.afii10029=1051,e.afii10030=1052;e.afii10031=1053,e.afii10032=1054,e.afii10033=1055,e.afii10034=1056,e.afii10035=1057,e.afii10036=1058,e.afii10037=1059,e.afii10038=1060,e.afii10039=1061,e.afii10040=1062,e.afii10041=1063,e.afii10042=1064,e.afii10043=1065,e.afii10044=1066,e.afii10045=1067,e.afii10046=1068,e.afii10047=1069,e.afii10048=1070,e.afii10049=1071,e.afii10050=1168,e.afii10051=1026,e.afii10052=1027,e.afii10053=1028,e.afii10054=1029,e.afii10055=1030,e.afii10056=1031,e.afii10057=1032,e.afii10058=1033,e.afii10059=1034,e.afii10060=1035,e.afii10061=1036,e.afii10062=1038,e.afii10063=63172,e.afii10064=63173,e.afii10065=1072,e.afii10066=1073,e.afii10067=1074,e.afii10068=1075,e.afii10069=1076,e.afii10070=1077,e.afii10071=1105,e.afii10072=1078,e.afii10073=1079,e.afii10074=1080,e.afii10075=1081,e.afii10076=1082,e.afii10077=1083,e.afii10078=1084,e.afii10079=1085,e.afii10080=1086,e.afii10081=1087,e.afii10082=1088,e.afii10083=1089,e.afii10084=1090,e.afii10085=1091,e.afii10086=1092,e.afii10087=1093,e.afii10088=1094,e.afii10089=1095,e.afii10090=1096,e.afii10091=1097,e.afii10092=1098,e.afii10093=1099,e.afii10094=1100,e.afii10095=1101,e.afii10096=1102,e.afii10097=1103,e.afii10098=1169,e.afii10099=1106,e.afii10100=1107,e.afii10101=1108,e.afii10102=1109,e.afii10103=1110,e.afii10104=1111,e.afii10105=1112,e.afii10106=1113,e.afii10107=1114,e.afii10108=1115,e.afii10109=1116,e.afii10110=1118,e.afii10145=1039,e.afii10146=1122,e.afii10147=1138,e.afii10148=1140,e.afii10192=63174,e.afii10193=1119,e.afii10194=1123,e.afii10195=1139,e.afii10196=1141,e.afii10831=63175,e.afii10832=63176,e.afii10846=1241,e.afii299=8206,e.afii300=8207,e.afii301=8205,e.afii57381=1642,e.afii57388=1548,e.afii57392=1632,e.afii57393=1633,e.afii57394=1634,e.afii57395=1635,e.afii57396=1636,e.afii57397=1637,e.afii57398=1638,e.afii57399=1639,e.afii57400=1640,e.afii57401=1641,e.afii57403=1563,e.afii57407=1567,e.afii57409=1569,e.afii57410=1570,e.afii57411=1571,e.afii57412=1572,e.afii57413=1573,e.afii57414=1574,e.afii57415=1575,e.afii57416=1576,e.afii57417=1577,e.afii57418=1578,e.afii57419=1579,e.afii57420=1580,e.afii57421=1581,e.afii57422=1582,e.afii57423=1583,e.afii57424=1584,e.afii57425=1585,e.afii57426=1586,e.afii57427=1587,e.afii57428=1588,e.afii57429=1589,e.afii57430=1590,e.afii57431=1591,e.afii57432=1592,e.afii57433=1593,e.afii57434=1594,e.afii57440=1600,e.afii57441=1601,e.afii57442=1602,e.afii57443=1603,e.afii57444=1604,e.afii57445=1605,e.afii57446=1606,e.afii57448=1608,e.afii57449=1609,e.afii57450=1610,e.afii57451=1611,e.afii57452=1612,e.afii57453=1613,e.afii57454=1614,e.afii57455=1615,e.afii57456=1616,e.afii57457=1617,e.afii57458=1618,e.afii57470=1607,e.afii57505=1700,e.afii57506=1662,e.afii57507=1670,e.afii57508=1688,e.afii57509=1711,e.afii57511=1657,e.afii57512=1672,e.afii57513=1681,e.afii57514=1722,e.afii57519=1746,e.afii57534=1749,e.afii57636=8362,e.afii57645=1470,e.afii57658=1475,e.afii57664=1488,e.afii57665=1489,e.afii57666=1490,e.afii57667=1491,e.afii57668=1492,e.afii57669=1493,e.afii57670=1494,e.afii57671=1495,e.afii57672=1496,e.afii57673=1497,e.afii57674=1498,e.afii57675=1499,e.afii57676=1500,e.afii57677=1501,e.afii57678=1502,e.afii57679=1503,e.afii57680=1504,e.afii57681=1505,e.afii57682=1506,e.afii57683=1507,e.afii57684=1508,e.afii57685=1509,e.afii57686=1510,e.afii57687=1511,e.afii57688=1512,e.afii57689=1513,e.afii57690=1514,e.afii57694=64298,e.afii57695=64299,e.afii57700=64331,e.afii57705=64287,e.afii57716=1520,e.afii57717=1521,e.afii57718=1522,e.afii57723=64309,e.afii57793=1460,e.afii57794=1461,e.afii57795=1462,e.afii57796=1467,e.afii57797=1464,e.afii57798=1463,e.afii57799=1456,e.afii57800=1458,e.afii57801=1457,e.afii57802=1459,e.afii57803=1474,e.afii57804=1473,e.afii57806=1465,e.afii57807=1468,e.afii57839=1469,e.afii57841=1471,e.afii57842=1472,e.afii57929=700,e.afii61248=8453,e.afii61289=8467,e.afii61352=8470,e.afii61573=8236,e.afii61574=8237,e.afii61575=8238,e.afii61664=8204,e.afii63167=1645,e.afii64937=701,e.agrave=224,e.agujarati=2693,e.agurmukhi=2565,e.ahiragana=12354,e.ahookabove=7843,e.aibengali=2448,e.aibopomofo=12574,e.aideva=2320,e.aiecyrillic=1237,e.aigujarati=2704,e.aigurmukhi=2576,e.aimatragurmukhi=2632,e.ainarabic=1593,e.ainfinalarabic=65226,e.aininitialarabic=65227,e.ainmedialarabic=65228,e.ainvertedbreve=515,e.aivowelsignbengali=2504,e.aivowelsigndeva=2376,e.aivowelsigngujarati=2760,e.akatakana=12450,e.akatakanahalfwidth=65393,e.akorean=12623,e.alef=1488,e.alefarabic=1575,e.alefdageshhebrew=64304,e.aleffinalarabic=65166,e.alefhamzaabovearabic=1571,e.alefhamzaabovefinalarabic=65156,e.alefhamzabelowarabic=1573,e.alefhamzabelowfinalarabic=65160,e.alefhebrew=1488,e.aleflamedhebrew=64335,e.alefmaddaabovearabic=1570,e.alefmaddaabovefinalarabic=65154,e.alefmaksuraarabic=1609,e.alefmaksurafinalarabic=65264,e.alefmaksurainitialarabic=65267,e.alefmaksuramedialarabic=65268,e.alefpatahhebrew=64302,e.alefqamatshebrew=64303,e.aleph=8501,e.allequal=8780,e.alpha=945,e.alphatonos=940,e.amacron=257,e.amonospace=65345,e.ampersand=38,e.ampersandmonospace=65286,e.ampersandsmall=63270,e.amsquare=13250,e.anbopomofo=12578,e.angbopomofo=12580,e.angbracketleft=12296,e.angbracketright=12297,e.angkhankhuthai=3674,e.angle=8736,e.anglebracketleft=12296,e.anglebracketleftvertical=65087,e.anglebracketright=12297,e.anglebracketrightvertical=65088,e.angleleft=9001,e.angleright=9002,e.angstrom=8491,e.anoteleia=903,e.anudattadeva=2386,e.anusvarabengali=2434,e.anusvaradeva=2306,e.anusvaragujarati=2690,e.aogonek=261,e.apaatosquare=13056,e.aparen=9372,e.apostrophearmenian=1370,e.apostrophemod=700,e.apple=63743,e.approaches=8784,e.approxequal=8776,e.approxequalorimage=8786,e.approximatelyequal=8773,e.araeaekorean=12686,e.araeakorean=12685,e.arc=8978,e.arighthalfring=7834,e.aring=229,e.aringacute=507,e.aringbelow=7681,e.arrowboth=8596,e.arrowdashdown=8675,e.arrowdashleft=8672,e.arrowdashright=8674,e.arrowdashup=8673,e.arrowdblboth=8660,e.arrowdbldown=8659,e.arrowdblleft=8656,e.arrowdblright=8658,e.arrowdblup=8657,e.arrowdown=8595,e.arrowdownleft=8601,e.arrowdownright=8600,e.arrowdownwhite=8681,e.arrowheaddownmod=709,e.arrowheadleftmod=706,e.arrowheadrightmod=707,e.arrowheadupmod=708,e.arrowhorizex=63719,e.arrowleft=8592,e.arrowleftdbl=8656,e.arrowleftdblstroke=8653,e.arrowleftoverright=8646,e.arrowleftwhite=8678,e.arrowright=8594,e.arrowrightdblstroke=8655,e.arrowrightheavy=10142,e.arrowrightoverleft=8644,e.arrowrightwhite=8680,e.arrowtableft=8676,e.arrowtabright=8677,e.arrowup=8593,e.arrowupdn=8597,e.arrowupdnbse=8616,e.arrowupdownbase=8616,e.arrowupleft=8598,e.arrowupleftofdown=8645,e.arrowupright=8599,e.arrowupwhite=8679,e.arrowvertex=63718,e.asciicircum=94,e.asciicircummonospace=65342,e.asciitilde=126,e.asciitildemonospace=65374,e.ascript=593,e.ascriptturned=594,e.asmallhiragana=12353,e.asmallkatakana=12449,e.asmallkatakanahalfwidth=65383,e.asterisk=42,e.asteriskaltonearabic=1645,e.asteriskarabic=1645,e.asteriskmath=8727,e.asteriskmonospace=65290,e.asterisksmall=65121,e.asterism=8258,e.asuperior=63209,e.asymptoticallyequal=8771,e.at=64,e.atilde=227,e.atmonospace=65312,e.atsmall=65131,e.aturned=592,e.aubengali=2452,e.aubopomofo=12576,e.audeva=2324,e.augujarati=2708,e.augurmukhi=2580,e.aulengthmarkbengali=2519,e.aumatragurmukhi=2636,e.auvowelsignbengali=2508,e.auvowelsigndeva=2380,e.auvowelsigngujarati=2764,e.avagrahadeva=2365,e.aybarmenian=1377,e.ayin=1506,e.ayinaltonehebrew=64288,e.ayinhebrew=1506,e.b=98,e.babengali=2476,e.backslash=92,e.backslashmonospace=65340,e.badeva=2348,e.bagujarati=2732,e.bagurmukhi=2604,e.bahiragana=12400,e.bahtthai=3647,e.bakatakana=12496,e.bar=124,e.barmonospace=65372,e.bbopomofo=12549,e.bcircle=9425,e.bdotaccent=7683,e.bdotbelow=7685,e.beamedsixteenthnotes=9836,e.because=8757,e.becyrillic=1073,e.beharabic=1576,e.behfinalarabic=65168,e.behinitialarabic=65169,e.behiragana=12409,e.behmedialarabic=65170,e.behmeeminitialarabic=64671,e.behmeemisolatedarabic=64520,e.behnoonfinalarabic=64621,e.bekatakana=12505,e.benarmenian=1378,e.bet=1489,e.beta=946,e.betasymbolgreek=976,e.betdagesh=64305,e.betdageshhebrew=64305,e.bethebrew=1489,e.betrafehebrew=64332,e.bhabengali=2477,e.bhadeva=2349,e.bhagujarati=2733,e.bhagurmukhi=2605,e.bhook=595,e.bihiragana=12403,e.bikatakana=12499,e.bilabialclick=664,e.bindigurmukhi=2562,e.birusquare=13105,e.blackcircle=9679,e.blackdiamond=9670,e.blackdownpointingtriangle=9660,e.blackleftpointingpointer=9668,e.blackleftpointingtriangle=9664,e.blacklenticularbracketleft=12304,e.blacklenticularbracketleftvertical=65083,e.blacklenticularbracketright=12305,e.blacklenticularbracketrightvertical=65084,e.blacklowerlefttriangle=9699,e.blacklowerrighttriangle=9698,e.blackrectangle=9644,e.blackrightpointingpointer=9658,e.blackrightpointingtriangle=9654,e.blacksmallsquare=9642,e.blacksmilingface=9787,e.blacksquare=9632,e.blackstar=9733,e.blackupperlefttriangle=9700,e.blackupperrighttriangle=9701,e.blackuppointingsmalltriangle=9652,e.blackuppointingtriangle=9650,e.blank=9251,e.blinebelow=7687,e.block=9608,e.bmonospace=65346,e.bobaimaithai=3610,e.bohiragana=12412,e.bokatakana=12508,e.bparen=9373,e.bqsquare=13251,e.braceex=63732,e.braceleft=123,e.braceleftbt=63731,e.braceleftmid=63730,e.braceleftmonospace=65371,e.braceleftsmall=65115,e.bracelefttp=63729,e.braceleftvertical=65079,e.braceright=125,e.bracerightbt=63742,e.bracerightmid=63741,e.bracerightmonospace=65373,e.bracerightsmall=65116,e.bracerighttp=63740,e.bracerightvertical=65080,e.bracketleft=91,e.bracketleftbt=63728,e.bracketleftex=63727,e.bracketleftmonospace=65339,e.bracketlefttp=63726,e.bracketright=93,e.bracketrightbt=63739,e.bracketrightex=63738,e.bracketrightmonospace=65341,e.bracketrighttp=63737,e.breve=728,e.brevebelowcmb=814,e.brevecmb=774,e.breveinvertedbelowcmb=815,e.breveinvertedcmb=785,e.breveinverteddoublecmb=865,e.bridgebelowcmb=810,e.bridgeinvertedbelowcmb=826,e.brokenbar=166,e.bstroke=384,e.bsuperior=63210,e.btopbar=387,e.buhiragana=12406,e.bukatakana=12502,e.bullet=8226,e.bulletinverse=9688,e.bulletoperator=8729,e.bullseye=9678,e.c=99,e.caarmenian=1390,e.cabengali=2458,e.cacute=263,e.cadeva=2330,e.cagujarati=2714,e.cagurmukhi=2586,e.calsquare=13192,e.candrabindubengali=2433,e.candrabinducmb=784,e.candrabindudeva=2305,e.candrabindugujarati=2689,e.capslock=8682,e.careof=8453,e.caron=711,e.caronbelowcmb=812,e.caroncmb=780,e.carriagereturn=8629,e.cbopomofo=12568,e.ccaron=269,e.ccedilla=231,e.ccedillaacute=7689,e.ccircle=9426,e.ccircumflex=265,e.ccurl=597,e.cdot=267,e.cdotaccent=267,e.cdsquare=13253,e.cedilla=184,e.cedillacmb=807,e.cent=162,e.centigrade=8451,e.centinferior=63199,e.centmonospace=65504,e.centoldstyle=63394,e.centsuperior=63200,e.chaarmenian=1401,e.chabengali=2459,e.chadeva=2331,e.chagujarati=2715,e.chagurmukhi=2587,e.chbopomofo=12564,e.cheabkhasiancyrillic=1213,e.checkmark=10003,e.checyrillic=1095,e.chedescenderabkhasiancyrillic=1215,e.chedescendercyrillic=1207,e.chedieresiscyrillic=1269,e.cheharmenian=1395,e.chekhakassiancyrillic=1228,e.cheverticalstrokecyrillic=1209,e.chi=967,e.chieuchacirclekorean=12919,e.chieuchaparenkorean=12823,e.chieuchcirclekorean=12905,e.chieuchkorean=12618,e.chieuchparenkorean=12809,e.chochangthai=3594,e.chochanthai=3592,e.chochingthai=3593,e.chochoethai=3596,e.chook=392,e.cieucacirclekorean=12918,e.cieucaparenkorean=12822,e.cieuccirclekorean=12904,e.cieuckorean=12616,e.cieucparenkorean=12808,e.cieucuparenkorean=12828,e.circle=9675,e.circlecopyrt=169,e.circlemultiply=8855,e.circleot=8857,e.circleplus=8853,e.circlepostalmark=12342,e.circlewithlefthalfblack=9680,e.circlewithrighthalfblack=9681,e.circumflex=710,e.circumflexbelowcmb=813,e.circumflexcmb=770,e.clear=8999,e.clickalveolar=450,e.clickdental=448,e.clicklateral=449,e.clickretroflex=451,e.club=9827,e.clubsuitblack=9827,e.clubsuitwhite=9831,e.cmcubedsquare=13220,e.cmonospace=65347,e.cmsquaredsquare=13216,e.coarmenian=1409,e.colon=58,e.colonmonetary=8353,e.colonmonospace=65306,e.colonsign=8353,e.colonsmall=65109,e.colontriangularhalfmod=721,e.colontriangularmod=720,e.comma=44,e.commaabovecmb=787,e.commaaboverightcmb=789,e.commaaccent=63171,e.commaarabic=1548,e.commaarmenian=1373,e.commainferior=63201,e.commamonospace=65292,e.commareversedabovecmb=788,e.commareversedmod=701,e.commasmall=65104,e.commasuperior=63202,e.commaturnedabovecmb=786,e.commaturnedmod=699,e.compass=9788,e.congruent=8773,e.contourintegral=8750,e.control=8963,e.controlACK=6,e.controlBEL=7,e.controlBS=8,e.controlCAN=24,e.controlCR=13,e.controlDC1=17,e.controlDC2=18,e.controlDC3=19,e.controlDC4=20,e.controlDEL=127,e.controlDLE=16,e.controlEM=25,e.controlENQ=5,e.controlEOT=4,e.controlESC=27,e.controlETB=23,e.controlETX=3,e.controlFF=12,e.controlFS=28,e.controlGS=29,e.controlHT=9,e.controlLF=10,e.controlNAK=21,e.controlNULL=0,e.controlRS=30,e.controlSI=15,e.controlSO=14,e.controlSOT=2,e.controlSTX=1,e.controlSUB=26,e.controlSYN=22,e.controlUS=31,e.controlVT=11,e.copyright=169,e.copyrightsans=63721,e.copyrightserif=63193,e.cornerbracketleft=12300,e.cornerbracketlefthalfwidth=65378,e.cornerbracketleftvertical=65089,e.cornerbracketright=12301,e.cornerbracketrighthalfwidth=65379,e.cornerbracketrightvertical=65090,e.corporationsquare=13183,e.cosquare=13255,e.coverkgsquare=13254,e.cparen=9374,e.cruzeiro=8354,e.cstretched=663,e.curlyand=8911,e.curlyor=8910,e.currency=164,e.cyrBreve=63185,e.cyrFlex=63186,e.cyrbreve=63188,e.cyrflex=63189,e.d=100,e.daarmenian=1380,e.dabengali=2470,e.dadarabic=1590,e.dadeva=2342,e.dadfinalarabic=65214,e.dadinitialarabic=65215,e.dadmedialarabic=65216,e.dagesh=1468,e.dageshhebrew=1468,e.dagger=8224,e.daggerdbl=8225,e.dagujarati=2726,e.dagurmukhi=2598,e.dahiragana=12384,e.dakatakana=12480,e.dalarabic=1583,e.dalet=1491,e.daletdagesh=64307,e.daletdageshhebrew=64307,e.dalethebrew=1491,e.dalfinalarabic=65194,e.dammaarabic=1615,e.dammalowarabic=1615,e.dammatanaltonearabic=1612,e.dammatanarabic=1612,e.danda=2404,e.dargahebrew=1447,e.dargalefthebrew=1447,e.dasiapneumatacyrilliccmb=1157,e.dblGrave=63187,e.dblanglebracketleft=12298,e.dblanglebracketleftvertical=65085,e.dblanglebracketright=12299,e.dblanglebracketrightvertical=65086,e.dblarchinvertedbelowcmb=811,e.dblarrowleft=8660,e.dblarrowright=8658,e.dbldanda=2405,e.dblgrave=63190,e.dblgravecmb=783,e.dblintegral=8748,e.dbllowline=8215,e.dbllowlinecmb=819,e.dbloverlinecmb=831,e.dblprimemod=698,e.dblverticalbar=8214,e.dblverticallineabovecmb=782,e.dbopomofo=12553,e.dbsquare=13256,e.dcaron=271,e.dcedilla=7697,e.dcircle=9427,e.dcircumflexbelow=7699,e.dcroat=273,e.ddabengali=2465,e.ddadeva=2337,e.ddagujarati=2721,e.ddagurmukhi=2593,e.ddalarabic=1672,e.ddalfinalarabic=64393,e.dddhadeva=2396,e.ddhabengali=2466,e.ddhadeva=2338,e.ddhagujarati=2722,e.ddhagurmukhi=2594,e.ddotaccent=7691,e.ddotbelow=7693,e.decimalseparatorarabic=1643,e.decimalseparatorpersian=1643,e.decyrillic=1076,e.degree=176,e.dehihebrew=1453,e.dehiragana=12391,e.deicoptic=1007,e.dekatakana=12487,e.deleteleft=9003,e.deleteright=8998,e.delta=948,e.deltaturned=397,e.denominatorminusonenumeratorbengali=2552,e.dezh=676,e.dhabengali=2471,e.dhadeva=2343,e.dhagujarati=2727,e.dhagurmukhi=2599,e.dhook=599,e.dialytikatonos=901,e.dialytikatonoscmb=836,e.diamond=9830,e.diamondsuitwhite=9826,e.dieresis=168,e.dieresisacute=63191,e.dieresisbelowcmb=804,e.dieresiscmb=776,e.dieresisgrave=63192,e.dieresistonos=901,e.dihiragana=12386,e.dikatakana=12482,e.dittomark=12291,e.divide=247,e.divides=8739,e.divisionslash=8725,e.djecyrillic=1106,e.dkshade=9619,e.dlinebelow=7695,e.dlsquare=13207,e.dmacron=273,e.dmonospace=65348,e.dnblock=9604,e.dochadathai=3598,e.dodekthai=3604,e.dohiragana=12393,e.dokatakana=12489,e.dollar=36;e.dollarinferior=63203,e.dollarmonospace=65284,e.dollaroldstyle=63268,e.dollarsmall=65129,e.dollarsuperior=63204,e.dong=8363,e.dorusquare=13094,e.dotaccent=729,e.dotaccentcmb=775,e.dotbelowcmb=803,e.dotbelowcomb=803,e.dotkatakana=12539,e.dotlessi=305,e.dotlessj=63166,e.dotlessjstrokehook=644,e.dotmath=8901,e.dottedcircle=9676,e.doubleyodpatah=64287,e.doubleyodpatahhebrew=64287,e.downtackbelowcmb=798,e.downtackmod=725,e.dparen=9375,e.dsuperior=63211,e.dtail=598,e.dtopbar=396,e.duhiragana=12389,e.dukatakana=12485,e.dz=499,e.dzaltone=675,e.dzcaron=454,e.dzcurl=677,e.dzeabkhasiancyrillic=1249,e.dzecyrillic=1109,e.dzhecyrillic=1119,e.e=101,e.eacute=233,e.earth=9793,e.ebengali=2447,e.ebopomofo=12572,e.ebreve=277,e.ecandradeva=2317,e.ecandragujarati=2701,e.ecandravowelsigndeva=2373,e.ecandravowelsigngujarati=2757,e.ecaron=283,e.ecedillabreve=7709,e.echarmenian=1381,e.echyiwnarmenian=1415,e.ecircle=9428,e.ecircumflex=234,e.ecircumflexacute=7871,e.ecircumflexbelow=7705,e.ecircumflexdotbelow=7879,e.ecircumflexgrave=7873,e.ecircumflexhookabove=7875,e.ecircumflextilde=7877,e.ecyrillic=1108,e.edblgrave=517,e.edeva=2319,e.edieresis=235,e.edot=279,e.edotaccent=279,e.edotbelow=7865,e.eegurmukhi=2575,e.eematragurmukhi=2631,e.efcyrillic=1092,e.egrave=232,e.egujarati=2703,e.eharmenian=1383,e.ehbopomofo=12573,e.ehiragana=12360,e.ehookabove=7867,e.eibopomofo=12575,e.eight=56,e.eightarabic=1640,e.eightbengali=2542,e.eightcircle=9319,e.eightcircleinversesansserif=10129,e.eightdeva=2414,e.eighteencircle=9329,e.eighteenparen=9349,e.eighteenperiod=9369,e.eightgujarati=2798,e.eightgurmukhi=2670,e.eighthackarabic=1640,e.eighthangzhou=12328,e.eighthnotebeamed=9835,e.eightideographicparen=12839,e.eightinferior=8328,e.eightmonospace=65304,e.eightoldstyle=63288,e.eightparen=9339,e.eightperiod=9359,e.eightpersian=1784,e.eightroman=8567,e.eightsuperior=8312,e.eightthai=3672,e.einvertedbreve=519,e.eiotifiedcyrillic=1125,e.ekatakana=12456,e.ekatakanahalfwidth=65396,e.ekonkargurmukhi=2676,e.ekorean=12628,e.elcyrillic=1083,e.element=8712,e.elevencircle=9322,e.elevenparen=9342,e.elevenperiod=9362,e.elevenroman=8570,e.ellipsis=8230,e.ellipsisvertical=8942,e.emacron=275,e.emacronacute=7703,e.emacrongrave=7701,e.emcyrillic=1084,e.emdash=8212,e.emdashvertical=65073,e.emonospace=65349,e.emphasismarkarmenian=1371,e.emptyset=8709,e.enbopomofo=12579,e.encyrillic=1085,e.endash=8211,e.endashvertical=65074,e.endescendercyrillic=1187,e.eng=331,e.engbopomofo=12581,e.enghecyrillic=1189,e.enhookcyrillic=1224,e.enspace=8194,e.eogonek=281,e.eokorean=12627,e.eopen=603,e.eopenclosed=666,e.eopenreversed=604,e.eopenreversedclosed=606,e.eopenreversedhook=605,e.eparen=9376,e.epsilon=949,e.epsilontonos=941,e.equal=61,e.equalmonospace=65309,e.equalsmall=65126,e.equalsuperior=8316,e.equivalence=8801,e.erbopomofo=12582,e.ercyrillic=1088,e.ereversed=600,e.ereversedcyrillic=1101,e.escyrillic=1089,e.esdescendercyrillic=1195,e.esh=643,e.eshcurl=646,e.eshortdeva=2318,e.eshortvowelsigndeva=2374,e.eshreversedloop=426,e.eshsquatreversed=645,e.esmallhiragana=12359,e.esmallkatakana=12455,e.esmallkatakanahalfwidth=65386,e.estimated=8494,e.esuperior=63212,e.eta=951,e.etarmenian=1384,e.etatonos=942,e.eth=240,e.etilde=7869,e.etildebelow=7707,e.etnahtafoukhhebrew=1425,e.etnahtafoukhlefthebrew=1425,e.etnahtahebrew=1425,e.etnahtalefthebrew=1425,e.eturned=477,e.eukorean=12641,e.euro=8364,e.evowelsignbengali=2503,e.evowelsigndeva=2375,e.evowelsigngujarati=2759,e.exclam=33,e.exclamarmenian=1372,e.exclamdbl=8252,e.exclamdown=161,e.exclamdownsmall=63393,e.exclammonospace=65281,e.exclamsmall=63265,e.existential=8707,e.ezh=658,e.ezhcaron=495,e.ezhcurl=659,e.ezhreversed=441,e.ezhtail=442,e.f=102,e.fadeva=2398,e.fagurmukhi=2654,e.fahrenheit=8457,e.fathaarabic=1614,e.fathalowarabic=1614,e.fathatanarabic=1611,e.fbopomofo=12552,e.fcircle=9429,e.fdotaccent=7711,e.feharabic=1601,e.feharmenian=1414,e.fehfinalarabic=65234,e.fehinitialarabic=65235,e.fehmedialarabic=65236,e.feicoptic=997,e.female=9792,e.ff=64256,e.f_f=64256,e.ffi=64259,e.f_f_i=64259,e.ffl=64260,e.f_f_l=64260,e.fi=64257,e.f_i=64257,e.fifteencircle=9326,e.fifteenparen=9346,e.fifteenperiod=9366,e.figuredash=8210,e.filledbox=9632,e.filledrect=9644,e.finalkaf=1498,e.finalkafdagesh=64314,e.finalkafdageshhebrew=64314,e.finalkafhebrew=1498,e.finalmem=1501,e.finalmemhebrew=1501,e.finalnun=1503,e.finalnunhebrew=1503,e.finalpe=1507,e.finalpehebrew=1507,e.finaltsadi=1509,e.finaltsadihebrew=1509,e.firsttonechinese=713,e.fisheye=9673,e.fitacyrillic=1139,e.five=53,e.fivearabic=1637,e.fivebengali=2539,e.fivecircle=9316,e.fivecircleinversesansserif=10126,e.fivedeva=2411,e.fiveeighths=8541,e.fivegujarati=2795,e.fivegurmukhi=2667,e.fivehackarabic=1637,e.fivehangzhou=12325,e.fiveideographicparen=12836,e.fiveinferior=8325,e.fivemonospace=65301,e.fiveoldstyle=63285,e.fiveparen=9336,e.fiveperiod=9356,e.fivepersian=1781,e.fiveroman=8564,e.fivesuperior=8309,e.fivethai=3669,e.fl=64258,e.f_l=64258,e.florin=402,e.fmonospace=65350,e.fmsquare=13209,e.fofanthai=3615,e.fofathai=3613,e.fongmanthai=3663,e.forall=8704,e.four=52,e.fourarabic=1636,e.fourbengali=2538,e.fourcircle=9315,e.fourcircleinversesansserif=10125,e.fourdeva=2410,e.fourgujarati=2794,e.fourgurmukhi=2666,e.fourhackarabic=1636,e.fourhangzhou=12324,e.fourideographicparen=12835,e.fourinferior=8324,e.fourmonospace=65300,e.fournumeratorbengali=2551,e.fouroldstyle=63284,e.fourparen=9335,e.fourperiod=9355,e.fourpersian=1780,e.fourroman=8563,e.foursuperior=8308,e.fourteencircle=9325,e.fourteenparen=9345,e.fourteenperiod=9365,e.fourthai=3668,e.fourthtonechinese=715,e.fparen=9377,e.fraction=8260,e.franc=8355,e.g=103,e.gabengali=2455,e.gacute=501,e.gadeva=2327,e.gafarabic=1711,e.gaffinalarabic=64403,e.gafinitialarabic=64404,e.gafmedialarabic=64405,e.gagujarati=2711,e.gagurmukhi=2583,e.gahiragana=12364,e.gakatakana=12460,e.gamma=947,e.gammalatinsmall=611,e.gammasuperior=736,e.gangiacoptic=1003,e.gbopomofo=12557,e.gbreve=287,e.gcaron=487,e.gcedilla=291,e.gcircle=9430,e.gcircumflex=285,e.gcommaaccent=291,e.gdot=289,e.gdotaccent=289,e.gecyrillic=1075,e.gehiragana=12370,e.gekatakana=12466,e.geometricallyequal=8785,e.gereshaccenthebrew=1436,e.gereshhebrew=1523,e.gereshmuqdamhebrew=1437,e.germandbls=223,e.gershayimaccenthebrew=1438,e.gershayimhebrew=1524,e.getamark=12307,e.ghabengali=2456,e.ghadarmenian=1394,e.ghadeva=2328,e.ghagujarati=2712,e.ghagurmukhi=2584,e.ghainarabic=1594,e.ghainfinalarabic=65230,e.ghaininitialarabic=65231,e.ghainmedialarabic=65232,e.ghemiddlehookcyrillic=1173,e.ghestrokecyrillic=1171,e.gheupturncyrillic=1169,e.ghhadeva=2394,e.ghhagurmukhi=2650,e.ghook=608,e.ghzsquare=13203,e.gihiragana=12366,e.gikatakana=12462,e.gimarmenian=1379,e.gimel=1490,e.gimeldagesh=64306,e.gimeldageshhebrew=64306,e.gimelhebrew=1490,e.gjecyrillic=1107,e.glottalinvertedstroke=446,e.glottalstop=660,e.glottalstopinverted=662,e.glottalstopmod=704,e.glottalstopreversed=661,e.glottalstopreversedmod=705,e.glottalstopreversedsuperior=740,e.glottalstopstroke=673,e.glottalstopstrokereversed=674,e.gmacron=7713,e.gmonospace=65351,e.gohiragana=12372,e.gokatakana=12468,e.gparen=9378,e.gpasquare=13228,e.gradient=8711,e.grave=96,e.gravebelowcmb=790,e.gravecmb=768,e.gravecomb=768,e.gravedeva=2387,e.gravelowmod=718,e.gravemonospace=65344,e.gravetonecmb=832,e.greater=62,e.greaterequal=8805,e.greaterequalorless=8923,e.greatermonospace=65310,e.greaterorequivalent=8819,e.greaterorless=8823,e.greateroverequal=8807,e.greatersmall=65125,e.gscript=609,e.gstroke=485,e.guhiragana=12368,e.guillemotleft=171,e.guillemotright=187,e.guilsinglleft=8249,e.guilsinglright=8250,e.gukatakana=12464,e.guramusquare=13080,e.gysquare=13257,e.h=104,e.haabkhasiancyrillic=1193,e.haaltonearabic=1729,e.habengali=2489,e.hadescendercyrillic=1203,e.hadeva=2361,e.hagujarati=2745,e.hagurmukhi=2617,e.haharabic=1581,e.hahfinalarabic=65186,e.hahinitialarabic=65187,e.hahiragana=12399,e.hahmedialarabic=65188,e.haitusquare=13098,e.hakatakana=12495,e.hakatakanahalfwidth=65418,e.halantgurmukhi=2637,e.hamzaarabic=1569,e.hamzalowarabic=1569,e.hangulfiller=12644,e.hardsigncyrillic=1098,e.harpoonleftbarbup=8636,e.harpoonrightbarbup=8640,e.hasquare=13258,e.hatafpatah=1458,e.hatafpatah16=1458,e.hatafpatah23=1458,e.hatafpatah2f=1458,e.hatafpatahhebrew=1458,e.hatafpatahnarrowhebrew=1458,e.hatafpatahquarterhebrew=1458,e.hatafpatahwidehebrew=1458,e.hatafqamats=1459,e.hatafqamats1b=1459,e.hatafqamats28=1459,e.hatafqamats34=1459,e.hatafqamatshebrew=1459,e.hatafqamatsnarrowhebrew=1459,e.hatafqamatsquarterhebrew=1459,e.hatafqamatswidehebrew=1459,e.hatafsegol=1457,e.hatafsegol17=1457,e.hatafsegol24=1457,e.hatafsegol30=1457,e.hatafsegolhebrew=1457,e.hatafsegolnarrowhebrew=1457,e.hatafsegolquarterhebrew=1457,e.hatafsegolwidehebrew=1457,e.hbar=295,e.hbopomofo=12559,e.hbrevebelow=7723,e.hcedilla=7721,e.hcircle=9431,e.hcircumflex=293,e.hdieresis=7719,e.hdotaccent=7715,e.hdotbelow=7717,e.he=1492,e.heart=9829,e.heartsuitblack=9829,e.heartsuitwhite=9825,e.hedagesh=64308,e.hedageshhebrew=64308,e.hehaltonearabic=1729,e.heharabic=1607,e.hehebrew=1492,e.hehfinalaltonearabic=64423,e.hehfinalalttwoarabic=65258,e.hehfinalarabic=65258,e.hehhamzaabovefinalarabic=64421,e.hehhamzaaboveisolatedarabic=64420,e.hehinitialaltonearabic=64424,e.hehinitialarabic=65259,e.hehiragana=12408,e.hehmedialaltonearabic=64425,e.hehmedialarabic=65260,e.heiseierasquare=13179,e.hekatakana=12504,e.hekatakanahalfwidth=65421,e.hekutaarusquare=13110,e.henghook=615,e.herutusquare=13113,e.het=1495,e.hethebrew=1495,e.hhook=614,e.hhooksuperior=689,e.hieuhacirclekorean=12923,e.hieuhaparenkorean=12827,e.hieuhcirclekorean=12909,e.hieuhkorean=12622,e.hieuhparenkorean=12813,e.hihiragana=12402,e.hikatakana=12498,e.hikatakanahalfwidth=65419,e.hiriq=1460,e.hiriq14=1460,e.hiriq21=1460,e.hiriq2d=1460,e.hiriqhebrew=1460,e.hiriqnarrowhebrew=1460,e.hiriqquarterhebrew=1460,e.hiriqwidehebrew=1460,e.hlinebelow=7830,e.hmonospace=65352,e.hoarmenian=1392,e.hohipthai=3627,e.hohiragana=12411,e.hokatakana=12507,e.hokatakanahalfwidth=65422,e.holam=1465,e.holam19=1465,e.holam26=1465,e.holam32=1465,e.holamhebrew=1465,e.holamnarrowhebrew=1465,e.holamquarterhebrew=1465,e.holamwidehebrew=1465,e.honokhukthai=3630,e.hookabovecomb=777,e.hookcmb=777,e.hookpalatalizedbelowcmb=801,e.hookretroflexbelowcmb=802,e.hoonsquare=13122,e.horicoptic=1001,e.horizontalbar=8213,e.horncmb=795,e.hotsprings=9832,e.house=8962,e.hparen=9379,e.hsuperior=688,e.hturned=613,e.huhiragana=12405,e.huiitosquare=13107,e.hukatakana=12501,e.hukatakanahalfwidth=65420,e.hungarumlaut=733,e.hungarumlautcmb=779,e.hv=405,e.hyphen=45,e.hypheninferior=63205,e.hyphenmonospace=65293,e.hyphensmall=65123,e.hyphensuperior=63206,e.hyphentwo=8208,e.i=105,e.iacute=237,e.iacyrillic=1103,e.ibengali=2439,e.ibopomofo=12583,e.ibreve=301,e.icaron=464,e.icircle=9432,e.icircumflex=238,e.icyrillic=1110,e.idblgrave=521,e.ideographearthcircle=12943,e.ideographfirecircle=12939,e.ideographicallianceparen=12863,e.ideographiccallparen=12858,e.ideographiccentrecircle=12965,e.ideographicclose=12294,e.ideographiccomma=12289,e.ideographiccommaleft=65380,e.ideographiccongratulationparen=12855,e.ideographiccorrectcircle=12963,e.ideographicearthparen=12847,e.ideographicenterpriseparen=12861,e.ideographicexcellentcircle=12957,e.ideographicfestivalparen=12864,e.ideographicfinancialcircle=12950,e.ideographicfinancialparen=12854,e.ideographicfireparen=12843,e.ideographichaveparen=12850,e.ideographichighcircle=12964,e.ideographiciterationmark=12293,e.ideographiclaborcircle=12952,e.ideographiclaborparen=12856,e.ideographicleftcircle=12967,e.ideographiclowcircle=12966,e.ideographicmedicinecircle=12969,e.ideographicmetalparen=12846,e.ideographicmoonparen=12842,e.ideographicnameparen=12852,e.ideographicperiod=12290,e.ideographicprintcircle=12958,e.ideographicreachparen=12867,e.ideographicrepresentparen=12857,e.ideographicresourceparen=12862,e.ideographicrightcircle=12968,e.ideographicsecretcircle=12953,e.ideographicselfparen=12866,e.ideographicsocietyparen=12851,e.ideographicspace=12288,e.ideographicspecialparen=12853,e.ideographicstockparen=12849,e.ideographicstudyparen=12859,e.ideographicsunparen=12848,e.ideographicsuperviseparen=12860,e.ideographicwaterparen=12844,e.ideographicwoodparen=12845,e.ideographiczero=12295,e.ideographmetalcircle=12942,e.ideographmooncircle=12938,e.ideographnamecircle=12948,e.ideographsuncircle=12944,e.ideographwatercircle=12940,e.ideographwoodcircle=12941,e.ideva=2311,e.idieresis=239,e.idieresisacute=7727,e.idieresiscyrillic=1253,e.idotbelow=7883,e.iebrevecyrillic=1239,e.iecyrillic=1077,e.ieungacirclekorean=12917,e.ieungaparenkorean=12821,e.ieungcirclekorean=12903,e.ieungkorean=12615,e.ieungparenkorean=12807,e.igrave=236,e.igujarati=2695,e.igurmukhi=2567,e.ihiragana=12356,e.ihookabove=7881,e.iibengali=2440,e.iicyrillic=1080,e.iideva=2312,e.iigujarati=2696,e.iigurmukhi=2568,e.iimatragurmukhi=2624,e.iinvertedbreve=523,e.iishortcyrillic=1081,e.iivowelsignbengali=2496,e.iivowelsigndeva=2368,e.iivowelsigngujarati=2752,e.ij=307,e.ikatakana=12452,e.ikatakanahalfwidth=65394,e.ikorean=12643,e.ilde=732,e.iluyhebrew=1452,e.imacron=299,e.imacroncyrillic=1251,e.imageorapproximatelyequal=8787,e.imatragurmukhi=2623,e.imonospace=65353,e.increment=8710,e.infinity=8734,e.iniarmenian=1387,e.integral=8747,e.integralbottom=8993,e.integralbt=8993,e.integralex=63733,e.integraltop=8992,e.integraltp=8992,e.intersection=8745,e.intisquare=13061,e.invbullet=9688,e.invcircle=9689,e.invsmileface=9787,e.iocyrillic=1105,e.iogonek=303,e.iota=953,e.iotadieresis=970,e.iotadieresistonos=912,e.iotalatin=617,e.iotatonos=943,e.iparen=9380,e.irigurmukhi=2674,e.ismallhiragana=12355,e.ismallkatakana=12451,e.ismallkatakanahalfwidth=65384,e.issharbengali=2554,e.istroke=616,e.isuperior=63213,e.iterationhiragana=12445,e.iterationkatakana=12541,e.itilde=297,e.itildebelow=7725,e.iubopomofo=12585,e.iucyrillic=1102,e.ivowelsignbengali=2495,e.ivowelsigndeva=2367,e.ivowelsigngujarati=2751,e.izhitsacyrillic=1141,e.izhitsadblgravecyrillic=1143,e.j=106,e.jaarmenian=1393,e.jabengali=2460,e.jadeva=2332,e.jagujarati=2716,e.jagurmukhi=2588,e.jbopomofo=12560,e.jcaron=496,e.jcircle=9433,e.jcircumflex=309,e.jcrossedtail=669,e.jdotlessstroke=607,e.jecyrillic=1112,e.jeemarabic=1580,e.jeemfinalarabic=65182,e.jeeminitialarabic=65183,e.jeemmedialarabic=65184,e.jeharabic=1688,e.jehfinalarabic=64395,e.jhabengali=2461,e.jhadeva=2333,e.jhagujarati=2717,e.jhagurmukhi=2589,e.jheharmenian=1403,e.jis=12292,e.jmonospace=65354,e.jparen=9381,e.jsuperior=690,e.k=107,e.kabashkircyrillic=1185,e.kabengali=2453,e.kacute=7729,e.kacyrillic=1082,e.kadescendercyrillic=1179,e.kadeva=2325,e.kaf=1499,e.kafarabic=1603,e.kafdagesh=64315,e.kafdageshhebrew=64315,e.kaffinalarabic=65242,e.kafhebrew=1499,e.kafinitialarabic=65243,e.kafmedialarabic=65244,e.kafrafehebrew=64333,e.kagujarati=2709,e.kagurmukhi=2581,e.kahiragana=12363,e.kahookcyrillic=1220,e.kakatakana=12459,e.kakatakanahalfwidth=65398,e.kappa=954,e.kappasymbolgreek=1008,e.kapyeounmieumkorean=12657,e.kapyeounphieuphkorean=12676,e.kapyeounpieupkorean=12664,e.kapyeounssangpieupkorean=12665,e.karoriisquare=13069,e.kashidaautoarabic=1600,e.kashidaautonosidebearingarabic=1600,e.kasmallkatakana=12533,e.kasquare=13188,e.kasraarabic=1616,e.kasratanarabic=1613,e.kastrokecyrillic=1183,e.katahiraprolongmarkhalfwidth=65392,e.kaverticalstrokecyrillic=1181,e.kbopomofo=12558,e.kcalsquare=13193,e.kcaron=489,e.kcedilla=311,e.kcircle=9434,e.kcommaaccent=311,e.kdotbelow=7731,e.keharmenian=1412,e.kehiragana=12369,e.kekatakana=12465,e.kekatakanahalfwidth=65401,e.kenarmenian=1391,e.kesmallkatakana=12534,e.kgreenlandic=312,e.khabengali=2454,e.khacyrillic=1093,e.khadeva=2326,e.khagujarati=2710,e.khagurmukhi=2582,e.khaharabic=1582,e.khahfinalarabic=65190,e.khahinitialarabic=65191,e.khahmedialarabic=65192,e.kheicoptic=999,e.khhadeva=2393,e.khhagurmukhi=2649,e.khieukhacirclekorean=12920,e.khieukhaparenkorean=12824,e.khieukhcirclekorean=12906,e.khieukhkorean=12619,e.khieukhparenkorean=12810,e.khokhaithai=3586,e.khokhonthai=3589,e.khokhuatthai=3587,e.khokhwaithai=3588,e.khomutthai=3675,e.khook=409,e.khorakhangthai=3590,e.khzsquare=13201,e.kihiragana=12365,e.kikatakana=12461,e.kikatakanahalfwidth=65399,e.kiroguramusquare=13077,e.kiromeetorusquare=13078,e.kirosquare=13076,e.kiyeokacirclekorean=12910,e.kiyeokaparenkorean=12814,e.kiyeokcirclekorean=12896,e.kiyeokkorean=12593,e.kiyeokparenkorean=12800,e.kiyeoksioskorean=12595;e.kjecyrillic=1116,e.klinebelow=7733,e.klsquare=13208,e.kmcubedsquare=13222,e.kmonospace=65355,e.kmsquaredsquare=13218,e.kohiragana=12371,e.kohmsquare=13248,e.kokaithai=3585,e.kokatakana=12467,e.kokatakanahalfwidth=65402,e.kooposquare=13086,e.koppacyrillic=1153,e.koreanstandardsymbol=12927,e.koroniscmb=835,e.kparen=9382,e.kpasquare=13226,e.ksicyrillic=1135,e.ktsquare=13263,e.kturned=670,e.kuhiragana=12367,e.kukatakana=12463,e.kukatakanahalfwidth=65400,e.kvsquare=13240,e.kwsquare=13246,e.l=108,e.labengali=2482,e.lacute=314,e.ladeva=2354,e.lagujarati=2738,e.lagurmukhi=2610,e.lakkhangyaothai=3653,e.lamaleffinalarabic=65276,e.lamalefhamzaabovefinalarabic=65272,e.lamalefhamzaaboveisolatedarabic=65271,e.lamalefhamzabelowfinalarabic=65274,e.lamalefhamzabelowisolatedarabic=65273,e.lamalefisolatedarabic=65275,e.lamalefmaddaabovefinalarabic=65270,e.lamalefmaddaaboveisolatedarabic=65269,e.lamarabic=1604,e.lambda=955,e.lambdastroke=411,e.lamed=1500,e.lameddagesh=64316,e.lameddageshhebrew=64316,e.lamedhebrew=1500,e.lamfinalarabic=65246,e.lamhahinitialarabic=64714,e.laminitialarabic=65247,e.lamjeeminitialarabic=64713,e.lamkhahinitialarabic=64715,e.lamlamhehisolatedarabic=65010,e.lammedialarabic=65248,e.lammeemhahinitialarabic=64904,e.lammeeminitialarabic=64716,e.largecircle=9711,e.lbar=410,e.lbelt=620,e.lbopomofo=12556,e.lcaron=318,e.lcedilla=316,e.lcircle=9435,e.lcircumflexbelow=7741,e.lcommaaccent=316,e.ldot=320,e.ldotaccent=320,e.ldotbelow=7735,e.ldotbelowmacron=7737,e.leftangleabovecmb=794,e.lefttackbelowcmb=792,e.less=60,e.lessequal=8804,e.lessequalorgreater=8922,e.lessmonospace=65308,e.lessorequivalent=8818,e.lessorgreater=8822,e.lessoverequal=8806,e.lesssmall=65124,e.lezh=622,e.lfblock=9612,e.lhookretroflex=621,e.lira=8356,e.liwnarmenian=1388,e.lj=457,e.ljecyrillic=1113,e.ll=63168,e.lladeva=2355,e.llagujarati=2739,e.llinebelow=7739,e.llladeva=2356,e.llvocalicbengali=2529,e.llvocalicdeva=2401,e.llvocalicvowelsignbengali=2531,e.llvocalicvowelsigndeva=2403,e.lmiddletilde=619,e.lmonospace=65356,e.lmsquare=13264,e.lochulathai=3628,e.logicaland=8743,e.logicalnot=172,e.logicalnotreversed=8976,e.logicalor=8744,e.lolingthai=3621,e.longs=383,e.lowlinecenterline=65102,e.lowlinecmb=818,e.lowlinedashed=65101,e.lozenge=9674,e.lparen=9383,e.lslash=322,e.lsquare=8467,e.lsuperior=63214,e.ltshade=9617,e.luthai=3622,e.lvocalicbengali=2444,e.lvocalicdeva=2316,e.lvocalicvowelsignbengali=2530,e.lvocalicvowelsigndeva=2402,e.lxsquare=13267,e.m=109,e.mabengali=2478,e.macron=175,e.macronbelowcmb=817,e.macroncmb=772,e.macronlowmod=717,e.macronmonospace=65507,e.macute=7743,e.madeva=2350,e.magujarati=2734,e.magurmukhi=2606,e.mahapakhhebrew=1444,e.mahapakhlefthebrew=1444,e.mahiragana=12414,e.maichattawalowleftthai=63637,e.maichattawalowrightthai=63636,e.maichattawathai=3659,e.maichattawaupperleftthai=63635,e.maieklowleftthai=63628,e.maieklowrightthai=63627,e.maiekthai=3656,e.maiekupperleftthai=63626,e.maihanakatleftthai=63620,e.maihanakatthai=3633,e.maitaikhuleftthai=63625,e.maitaikhuthai=3655,e.maitholowleftthai=63631,e.maitholowrightthai=63630,e.maithothai=3657,e.maithoupperleftthai=63629,e.maitrilowleftthai=63634,e.maitrilowrightthai=63633,e.maitrithai=3658,e.maitriupperleftthai=63632,e.maiyamokthai=3654,e.makatakana=12510,e.makatakanahalfwidth=65423,e.male=9794,e.mansyonsquare=13127,e.maqafhebrew=1470,e.mars=9794,e.masoracirclehebrew=1455,e.masquare=13187,e.mbopomofo=12551,e.mbsquare=13268,e.mcircle=9436,e.mcubedsquare=13221,e.mdotaccent=7745,e.mdotbelow=7747,e.meemarabic=1605,e.meemfinalarabic=65250,e.meeminitialarabic=65251,e.meemmedialarabic=65252,e.meemmeeminitialarabic=64721,e.meemmeemisolatedarabic=64584,e.meetorusquare=13133,e.mehiragana=12417,e.meizierasquare=13182,e.mekatakana=12513,e.mekatakanahalfwidth=65426,e.mem=1502,e.memdagesh=64318,e.memdageshhebrew=64318,e.memhebrew=1502,e.menarmenian=1396,e.merkhahebrew=1445,e.merkhakefulahebrew=1446,e.merkhakefulalefthebrew=1446,e.merkhalefthebrew=1445,e.mhook=625,e.mhzsquare=13202,e.middledotkatakanahalfwidth=65381,e.middot=183,e.mieumacirclekorean=12914,e.mieumaparenkorean=12818,e.mieumcirclekorean=12900,e.mieumkorean=12609,e.mieumpansioskorean=12656,e.mieumparenkorean=12804,e.mieumpieupkorean=12654,e.mieumsioskorean=12655,e.mihiragana=12415,e.mikatakana=12511,e.mikatakanahalfwidth=65424,e.minus=8722,e.minusbelowcmb=800,e.minuscircle=8854,e.minusmod=727,e.minusplus=8723,e.minute=8242,e.miribaarusquare=13130,e.mirisquare=13129,e.mlonglegturned=624,e.mlsquare=13206,e.mmcubedsquare=13219,e.mmonospace=65357,e.mmsquaredsquare=13215,e.mohiragana=12418,e.mohmsquare=13249,e.mokatakana=12514,e.mokatakanahalfwidth=65427,e.molsquare=13270,e.momathai=3617,e.moverssquare=13223,e.moverssquaredsquare=13224,e.mparen=9384,e.mpasquare=13227,e.mssquare=13235,e.msuperior=63215,e.mturned=623,e.mu=181,e.mu1=181,e.muasquare=13186,e.muchgreater=8811,e.muchless=8810,e.mufsquare=13196,e.mugreek=956,e.mugsquare=13197,e.muhiragana=12416,e.mukatakana=12512,e.mukatakanahalfwidth=65425,e.mulsquare=13205,e.multiply=215,e.mumsquare=13211,e.munahhebrew=1443,e.munahlefthebrew=1443,e.musicalnote=9834,e.musicalnotedbl=9835,e.musicflatsign=9837,e.musicsharpsign=9839,e.mussquare=13234,e.muvsquare=13238,e.muwsquare=13244,e.mvmegasquare=13241,e.mvsquare=13239,e.mwmegasquare=13247,e.mwsquare=13245,e.n=110,e.nabengali=2472,e.nabla=8711,e.nacute=324,e.nadeva=2344,e.nagujarati=2728,e.nagurmukhi=2600,e.nahiragana=12394,e.nakatakana=12490,e.nakatakanahalfwidth=65413,e.napostrophe=329,e.nasquare=13185,e.nbopomofo=12555,e.nbspace=160,e.ncaron=328,e.ncedilla=326,e.ncircle=9437,e.ncircumflexbelow=7755,e.ncommaaccent=326,e.ndotaccent=7749,e.ndotbelow=7751,e.nehiragana=12397,e.nekatakana=12493,e.nekatakanahalfwidth=65416,e.newsheqelsign=8362,e.nfsquare=13195,e.ngabengali=2457,e.ngadeva=2329,e.ngagujarati=2713,e.ngagurmukhi=2585,e.ngonguthai=3591,e.nhiragana=12435,e.nhookleft=626,e.nhookretroflex=627,e.nieunacirclekorean=12911,e.nieunaparenkorean=12815,e.nieuncieuckorean=12597,e.nieuncirclekorean=12897,e.nieunhieuhkorean=12598,e.nieunkorean=12596,e.nieunpansioskorean=12648,e.nieunparenkorean=12801,e.nieunsioskorean=12647,e.nieuntikeutkorean=12646,e.nihiragana=12395,e.nikatakana=12491,e.nikatakanahalfwidth=65414,e.nikhahitleftthai=63641,e.nikhahitthai=3661,e.nine=57,e.ninearabic=1641,e.ninebengali=2543,e.ninecircle=9320,e.ninecircleinversesansserif=10130,e.ninedeva=2415,e.ninegujarati=2799,e.ninegurmukhi=2671,e.ninehackarabic=1641,e.ninehangzhou=12329,e.nineideographicparen=12840,e.nineinferior=8329,e.ninemonospace=65305,e.nineoldstyle=63289,e.nineparen=9340,e.nineperiod=9360,e.ninepersian=1785,e.nineroman=8568,e.ninesuperior=8313,e.nineteencircle=9330,e.nineteenparen=9350,e.nineteenperiod=9370,e.ninethai=3673,e.nj=460,e.njecyrillic=1114,e.nkatakana=12531,e.nkatakanahalfwidth=65437,e.nlegrightlong=414,e.nlinebelow=7753,e.nmonospace=65358,e.nmsquare=13210,e.nnabengali=2467,e.nnadeva=2339,e.nnagujarati=2723,e.nnagurmukhi=2595,e.nnnadeva=2345,e.nohiragana=12398,e.nokatakana=12494,e.nokatakanahalfwidth=65417,e.nonbreakingspace=160,e.nonenthai=3603,e.nonuthai=3609,e.noonarabic=1606,e.noonfinalarabic=65254,e.noonghunnaarabic=1722,e.noonghunnafinalarabic=64415,e.nooninitialarabic=65255,e.noonjeeminitialarabic=64722,e.noonjeemisolatedarabic=64587,e.noonmedialarabic=65256,e.noonmeeminitialarabic=64725,e.noonmeemisolatedarabic=64590,e.noonnoonfinalarabic=64653,e.notcontains=8716,e.notelement=8713,e.notelementof=8713,e.notequal=8800,e.notgreater=8815,e.notgreaternorequal=8817,e.notgreaternorless=8825,e.notidentical=8802,e.notless=8814,e.notlessnorequal=8816,e.notparallel=8742,e.notprecedes=8832,e.notsubset=8836,e.notsucceeds=8833,e.notsuperset=8837,e.nowarmenian=1398,e.nparen=9385,e.nssquare=13233,e.nsuperior=8319,e.ntilde=241,e.nu=957,e.nuhiragana=12396,e.nukatakana=12492,e.nukatakanahalfwidth=65415,e.nuktabengali=2492,e.nuktadeva=2364,e.nuktagujarati=2748,e.nuktagurmukhi=2620,e.numbersign=35,e.numbersignmonospace=65283,e.numbersignsmall=65119,e.numeralsigngreek=884,e.numeralsignlowergreek=885,e.numero=8470,e.nun=1504,e.nundagesh=64320,e.nundageshhebrew=64320,e.nunhebrew=1504,e.nvsquare=13237,e.nwsquare=13243,e.nyabengali=2462,e.nyadeva=2334,e.nyagujarati=2718,e.nyagurmukhi=2590,e.o=111,e.oacute=243,e.oangthai=3629,e.obarred=629,e.obarredcyrillic=1257,e.obarreddieresiscyrillic=1259,e.obengali=2451,e.obopomofo=12571,e.obreve=335,e.ocandradeva=2321,e.ocandragujarati=2705,e.ocandravowelsigndeva=2377,e.ocandravowelsigngujarati=2761,e.ocaron=466,e.ocircle=9438,e.ocircumflex=244,e.ocircumflexacute=7889,e.ocircumflexdotbelow=7897,e.ocircumflexgrave=7891,e.ocircumflexhookabove=7893,e.ocircumflextilde=7895,e.ocyrillic=1086,e.odblacute=337,e.odblgrave=525,e.odeva=2323,e.odieresis=246,e.odieresiscyrillic=1255,e.odotbelow=7885,e.oe=339,e.oekorean=12634,e.ogonek=731,e.ogonekcmb=808,e.ograve=242,e.ogujarati=2707,e.oharmenian=1413,e.ohiragana=12362,e.ohookabove=7887,e.ohorn=417,e.ohornacute=7899,e.ohorndotbelow=7907,e.ohorngrave=7901,e.ohornhookabove=7903,e.ohorntilde=7905,e.ohungarumlaut=337,e.oi=419,e.oinvertedbreve=527,e.okatakana=12458,e.okatakanahalfwidth=65397,e.okorean=12631,e.olehebrew=1451,e.omacron=333,e.omacronacute=7763,e.omacrongrave=7761,e.omdeva=2384,e.omega=969,e.omega1=982,e.omegacyrillic=1121,e.omegalatinclosed=631,e.omegaroundcyrillic=1147,e.omegatitlocyrillic=1149,e.omegatonos=974,e.omgujarati=2768,e.omicron=959,e.omicrontonos=972,e.omonospace=65359,e.one=49,e.onearabic=1633,e.onebengali=2535,e.onecircle=9312,e.onecircleinversesansserif=10122,e.onedeva=2407,e.onedotenleader=8228,e.oneeighth=8539,e.onefitted=63196,e.onegujarati=2791,e.onegurmukhi=2663,e.onehackarabic=1633,e.onehalf=189,e.onehangzhou=12321,e.oneideographicparen=12832,e.oneinferior=8321,e.onemonospace=65297,e.onenumeratorbengali=2548,e.oneoldstyle=63281,e.oneparen=9332,e.oneperiod=9352,e.onepersian=1777,e.onequarter=188,e.oneroman=8560,e.onesuperior=185,e.onethai=3665,e.onethird=8531,e.oogonek=491,e.oogonekmacron=493,e.oogurmukhi=2579,e.oomatragurmukhi=2635,e.oopen=596,e.oparen=9386,e.openbullet=9702,e.option=8997,e.ordfeminine=170,e.ordmasculine=186,e.orthogonal=8735,e.oshortdeva=2322,e.oshortvowelsigndeva=2378,e.oslash=248,e.oslashacute=511,e.osmallhiragana=12361,e.osmallkatakana=12457,e.osmallkatakanahalfwidth=65387,e.ostrokeacute=511,e.osuperior=63216,e.otcyrillic=1151,e.otilde=245,e.otildeacute=7757,e.otildedieresis=7759,e.oubopomofo=12577,e.overline=8254,e.overlinecenterline=65098,e.overlinecmb=773,e.overlinedashed=65097,e.overlinedblwavy=65100,e.overlinewavy=65099,e.overscore=175,e.ovowelsignbengali=2507,e.ovowelsigndeva=2379,e.ovowelsigngujarati=2763,e.p=112,e.paampssquare=13184,e.paasentosquare=13099,e.pabengali=2474,e.pacute=7765,e.padeva=2346,e.pagedown=8671,e.pageup=8670,e.pagujarati=2730,e.pagurmukhi=2602,e.pahiragana=12401,e.paiyannoithai=3631,e.pakatakana=12497,e.palatalizationcyrilliccmb=1156,e.palochkacyrillic=1216,e.pansioskorean=12671,e.paragraph=182,e.parallel=8741,e.parenleft=40,e.parenleftaltonearabic=64830,e.parenleftbt=63725,e.parenleftex=63724,e.parenleftinferior=8333,e.parenleftmonospace=65288,e.parenleftsmall=65113,e.parenleftsuperior=8317,e.parenlefttp=63723,e.parenleftvertical=65077,e.parenright=41,e.parenrightaltonearabic=64831,e.parenrightbt=63736,e.parenrightex=63735,e.parenrightinferior=8334,e.parenrightmonospace=65289,e.parenrightsmall=65114,e.parenrightsuperior=8318,e.parenrighttp=63734,e.parenrightvertical=65078,e.partialdiff=8706,e.paseqhebrew=1472,e.pashtahebrew=1433,e.pasquare=13225,e.patah=1463,e.patah11=1463,e.patah1d=1463,e.patah2a=1463,e.patahhebrew=1463,e.patahnarrowhebrew=1463,e.patahquarterhebrew=1463,e.patahwidehebrew=1463,e.pazerhebrew=1441,e.pbopomofo=12550,e.pcircle=9439,e.pdotaccent=7767,e.pe=1508,e.pecyrillic=1087,e.pedagesh=64324,e.pedageshhebrew=64324,e.peezisquare=13115,e.pefinaldageshhebrew=64323,e.peharabic=1662,e.peharmenian=1402,e.pehebrew=1508,e.pehfinalarabic=64343,e.pehinitialarabic=64344,e.pehiragana=12410,e.pehmedialarabic=64345,e.pekatakana=12506,e.pemiddlehookcyrillic=1191,e.perafehebrew=64334,e.percent=37,e.percentarabic=1642,e.percentmonospace=65285,e.percentsmall=65130,e.period=46,e.periodarmenian=1417,e.periodcentered=183,e.periodhalfwidth=65377,e.periodinferior=63207,e.periodmonospace=65294,e.periodsmall=65106,e.periodsuperior=63208,e.perispomenigreekcmb=834,e.perpendicular=8869,e.perthousand=8240,e.peseta=8359,e.pfsquare=13194,e.phabengali=2475,e.phadeva=2347,e.phagujarati=2731,e.phagurmukhi=2603,e.phi=966,e.phi1=981,e.phieuphacirclekorean=12922,e.phieuphaparenkorean=12826,e.phieuphcirclekorean=12908,e.phieuphkorean=12621,e.phieuphparenkorean=12812,e.philatin=632,e.phinthuthai=3642,e.phisymbolgreek=981,e.phook=421,e.phophanthai=3614,e.phophungthai=3612,e.phosamphaothai=3616,e.pi=960,e.pieupacirclekorean=12915,e.pieupaparenkorean=12819,e.pieupcieuckorean=12662,e.pieupcirclekorean=12901,e.pieupkiyeokkorean=12658,e.pieupkorean=12610,e.pieupparenkorean=12805,e.pieupsioskiyeokkorean=12660,e.pieupsioskorean=12612,e.pieupsiostikeutkorean=12661,e.pieupthieuthkorean=12663,e.pieuptikeutkorean=12659,e.pihiragana=12404,e.pikatakana=12500,e.pisymbolgreek=982,e.piwrarmenian=1411,e.planckover2pi=8463,e.planckover2pi1=8463,e.plus=43,e.plusbelowcmb=799,e.pluscircle=8853,e.plusminus=177,e.plusmod=726,e.plusmonospace=65291,e.plussmall=65122,e.plussuperior=8314,e.pmonospace=65360,e.pmsquare=13272,e.pohiragana=12413,e.pointingindexdownwhite=9759,e.pointingindexleftwhite=9756,e.pointingindexrightwhite=9758,e.pointingindexupwhite=9757,e.pokatakana=12509,e.poplathai=3611,e.postalmark=12306,e.postalmarkface=12320,e.pparen=9387,e.precedes=8826,e.prescription=8478,e.primemod=697,e.primereversed=8245,e.product=8719,e.projective=8965,e.prolongedkana=12540,e.propellor=8984,e.propersubset=8834,e.propersuperset=8835,e.proportion=8759,e.proportional=8733,e.psi=968,e.psicyrillic=1137,e.psilipneumatacyrilliccmb=1158,e.pssquare=13232,e.puhiragana=12407,e.pukatakana=12503,e.pvsquare=13236,e.pwsquare=13242,e.q=113,e.qadeva=2392,e.qadmahebrew=1448,e.qafarabic=1602,e.qaffinalarabic=65238,e.qafinitialarabic=65239,e.qafmedialarabic=65240,e.qamats=1464,e.qamats10=1464,e.qamats1a=1464,e.qamats1c=1464,e.qamats27=1464,e.qamats29=1464,e.qamats33=1464,e.qamatsde=1464,e.qamatshebrew=1464,e.qamatsnarrowhebrew=1464,e.qamatsqatanhebrew=1464,e.qamatsqatannarrowhebrew=1464,e.qamatsqatanquarterhebrew=1464,e.qamatsqatanwidehebrew=1464,e.qamatsquarterhebrew=1464,e.qamatswidehebrew=1464,e.qarneyparahebrew=1439,e.qbopomofo=12561,e.qcircle=9440,e.qhook=672,e.qmonospace=65361,e.qof=1511,e.qofdagesh=64327,e.qofdageshhebrew=64327,e.qofhebrew=1511,e.qparen=9388,e.quarternote=9833,e.qubuts=1467,e.qubuts18=1467,e.qubuts25=1467,e.qubuts31=1467,e.qubutshebrew=1467,e.qubutsnarrowhebrew=1467,e.qubutsquarterhebrew=1467,e.qubutswidehebrew=1467,e.question=63,e.questionarabic=1567,e.questionarmenian=1374,e.questiondown=191,e.questiondownsmall=63423,e.questiongreek=894,e.questionmonospace=65311,e.questionsmall=63295,e.quotedbl=34,e.quotedblbase=8222,e.quotedblleft=8220,e.quotedblmonospace=65282,e.quotedblprime=12318,e.quotedblprimereversed=12317,e.quotedblright=8221,e.quoteleft=8216,e.quoteleftreversed=8219,e.quotereversed=8219,e.quoteright=8217,e.quoterightn=329,e.quotesinglbase=8218,e.quotesingle=39,e.quotesinglemonospace=65287,e.r=114,e.raarmenian=1404,e.rabengali=2480,e.racute=341,e.radeva=2352,e.radical=8730,e.radicalex=63717,e.radoverssquare=13230,e.radoverssquaredsquare=13231,e.radsquare=13229,e.rafe=1471,e.rafehebrew=1471,e.ragujarati=2736,e.ragurmukhi=2608,e.rahiragana=12425,e.rakatakana=12521,e.rakatakanahalfwidth=65431,e.ralowerdiagonalbengali=2545,e.ramiddlediagonalbengali=2544,e.ramshorn=612,e.ratio=8758,e.rbopomofo=12566,e.rcaron=345,e.rcedilla=343,e.rcircle=9441,e.rcommaaccent=343,e.rdblgrave=529,e.rdotaccent=7769,e.rdotbelow=7771,e.rdotbelowmacron=7773,e.referencemark=8251,e.reflexsubset=8838,e.reflexsuperset=8839,e.registered=174,e.registersans=63720,e.registerserif=63194,e.reharabic=1585,e.reharmenian=1408,e.rehfinalarabic=65198,e.rehiragana=12428,e.rekatakana=12524;e.rekatakanahalfwidth=65434,e.resh=1512,e.reshdageshhebrew=64328,e.reshhebrew=1512,e.reversedtilde=8765,e.reviahebrew=1431,e.reviamugrashhebrew=1431,e.revlogicalnot=8976,e.rfishhook=638,e.rfishhookreversed=639,e.rhabengali=2525,e.rhadeva=2397,e.rho=961,e.rhook=637,e.rhookturned=635,e.rhookturnedsuperior=693,e.rhosymbolgreek=1009,e.rhotichookmod=734,e.rieulacirclekorean=12913,e.rieulaparenkorean=12817,e.rieulcirclekorean=12899,e.rieulhieuhkorean=12608,e.rieulkiyeokkorean=12602,e.rieulkiyeoksioskorean=12649,e.rieulkorean=12601,e.rieulmieumkorean=12603,e.rieulpansioskorean=12652,e.rieulparenkorean=12803,e.rieulphieuphkorean=12607,e.rieulpieupkorean=12604,e.rieulpieupsioskorean=12651,e.rieulsioskorean=12605,e.rieulthieuthkorean=12606,e.rieultikeutkorean=12650,e.rieulyeorinhieuhkorean=12653,e.rightangle=8735,e.righttackbelowcmb=793,e.righttriangle=8895,e.rihiragana=12426,e.rikatakana=12522,e.rikatakanahalfwidth=65432,e.ring=730,e.ringbelowcmb=805,e.ringcmb=778,e.ringhalfleft=703,e.ringhalfleftarmenian=1369,e.ringhalfleftbelowcmb=796,e.ringhalfleftcentered=723,e.ringhalfright=702,e.ringhalfrightbelowcmb=825,e.ringhalfrightcentered=722,e.rinvertedbreve=531,e.rittorusquare=13137,e.rlinebelow=7775,e.rlongleg=636,e.rlonglegturned=634,e.rmonospace=65362,e.rohiragana=12429,e.rokatakana=12525,e.rokatakanahalfwidth=65435,e.roruathai=3619,e.rparen=9389,e.rrabengali=2524,e.rradeva=2353,e.rragurmukhi=2652,e.rreharabic=1681,e.rrehfinalarabic=64397,e.rrvocalicbengali=2528,e.rrvocalicdeva=2400,e.rrvocalicgujarati=2784,e.rrvocalicvowelsignbengali=2500,e.rrvocalicvowelsigndeva=2372,e.rrvocalicvowelsigngujarati=2756,e.rsuperior=63217,e.rtblock=9616,e.rturned=633,e.rturnedsuperior=692,e.ruhiragana=12427,e.rukatakana=12523,e.rukatakanahalfwidth=65433,e.rupeemarkbengali=2546,e.rupeesignbengali=2547,e.rupiah=63197,e.ruthai=3620,e.rvocalicbengali=2443,e.rvocalicdeva=2315,e.rvocalicgujarati=2699,e.rvocalicvowelsignbengali=2499,e.rvocalicvowelsigndeva=2371,e.rvocalicvowelsigngujarati=2755,e.s=115,e.sabengali=2488,e.sacute=347,e.sacutedotaccent=7781,e.sadarabic=1589,e.sadeva=2360,e.sadfinalarabic=65210,e.sadinitialarabic=65211,e.sadmedialarabic=65212,e.sagujarati=2744,e.sagurmukhi=2616,e.sahiragana=12373,e.sakatakana=12469,e.sakatakanahalfwidth=65403,e.sallallahoualayhewasallamarabic=65018,e.samekh=1505,e.samekhdagesh=64321,e.samekhdageshhebrew=64321,e.samekhhebrew=1505,e.saraaathai=3634,e.saraaethai=3649,e.saraaimaimalaithai=3652,e.saraaimaimuanthai=3651,e.saraamthai=3635,e.saraathai=3632,e.saraethai=3648,e.saraiileftthai=63622,e.saraiithai=3637,e.saraileftthai=63621,e.saraithai=3636,e.saraothai=3650,e.saraueeleftthai=63624,e.saraueethai=3639,e.saraueleftthai=63623,e.sarauethai=3638,e.sarauthai=3640,e.sarauuthai=3641,e.sbopomofo=12569,e.scaron=353,e.scarondotaccent=7783,e.scedilla=351,e.schwa=601,e.schwacyrillic=1241,e.schwadieresiscyrillic=1243,e.schwahook=602,e.scircle=9442,e.scircumflex=349,e.scommaaccent=537,e.sdotaccent=7777,e.sdotbelow=7779,e.sdotbelowdotaccent=7785,e.seagullbelowcmb=828,e.second=8243,e.secondtonechinese=714,e.section=167,e.seenarabic=1587,e.seenfinalarabic=65202,e.seeninitialarabic=65203,e.seenmedialarabic=65204,e.segol=1462,e.segol13=1462,e.segol1f=1462,e.segol2c=1462,e.segolhebrew=1462,e.segolnarrowhebrew=1462,e.segolquarterhebrew=1462,e.segoltahebrew=1426,e.segolwidehebrew=1462,e.seharmenian=1405,e.sehiragana=12379,e.sekatakana=12475,e.sekatakanahalfwidth=65406,e.semicolon=59,e.semicolonarabic=1563,e.semicolonmonospace=65307,e.semicolonsmall=65108,e.semivoicedmarkkana=12444,e.semivoicedmarkkanahalfwidth=65439,e.sentisquare=13090,e.sentosquare=13091,e.seven=55,e.sevenarabic=1639,e.sevenbengali=2541,e.sevencircle=9318,e.sevencircleinversesansserif=10128,e.sevendeva=2413,e.seveneighths=8542,e.sevengujarati=2797,e.sevengurmukhi=2669,e.sevenhackarabic=1639,e.sevenhangzhou=12327,e.sevenideographicparen=12838,e.seveninferior=8327,e.sevenmonospace=65303,e.sevenoldstyle=63287,e.sevenparen=9338,e.sevenperiod=9358,e.sevenpersian=1783,e.sevenroman=8566,e.sevensuperior=8311,e.seventeencircle=9328,e.seventeenparen=9348,e.seventeenperiod=9368,e.seventhai=3671,e.sfthyphen=173,e.shaarmenian=1399,e.shabengali=2486,e.shacyrillic=1096,e.shaddaarabic=1617,e.shaddadammaarabic=64609,e.shaddadammatanarabic=64606,e.shaddafathaarabic=64608,e.shaddakasraarabic=64610,e.shaddakasratanarabic=64607,e.shade=9618,e.shadedark=9619,e.shadelight=9617,e.shademedium=9618,e.shadeva=2358,e.shagujarati=2742,e.shagurmukhi=2614,e.shalshelethebrew=1427,e.shbopomofo=12565,e.shchacyrillic=1097,e.sheenarabic=1588,e.sheenfinalarabic=65206,e.sheeninitialarabic=65207,e.sheenmedialarabic=65208,e.sheicoptic=995,e.sheqel=8362,e.sheqelhebrew=8362,e.sheva=1456,e.sheva115=1456,e.sheva15=1456,e.sheva22=1456,e.sheva2e=1456,e.shevahebrew=1456,e.shevanarrowhebrew=1456,e.shevaquarterhebrew=1456,e.shevawidehebrew=1456,e.shhacyrillic=1211,e.shimacoptic=1005,e.shin=1513,e.shindagesh=64329,e.shindageshhebrew=64329,e.shindageshshindot=64300,e.shindageshshindothebrew=64300,e.shindageshsindot=64301,e.shindageshsindothebrew=64301,e.shindothebrew=1473,e.shinhebrew=1513,e.shinshindot=64298,e.shinshindothebrew=64298,e.shinsindot=64299,e.shinsindothebrew=64299,e.shook=642,e.sigma=963,e.sigma1=962,e.sigmafinal=962,e.sigmalunatesymbolgreek=1010,e.sihiragana=12375,e.sikatakana=12471,e.sikatakanahalfwidth=65404,e.siluqhebrew=1469,e.siluqlefthebrew=1469,e.similar=8764,e.sindothebrew=1474,e.siosacirclekorean=12916,e.siosaparenkorean=12820,e.sioscieuckorean=12670,e.sioscirclekorean=12902,e.sioskiyeokkorean=12666,e.sioskorean=12613,e.siosnieunkorean=12667,e.siosparenkorean=12806,e.siospieupkorean=12669,e.siostikeutkorean=12668,e.six=54,e.sixarabic=1638,e.sixbengali=2540,e.sixcircle=9317,e.sixcircleinversesansserif=10127,e.sixdeva=2412,e.sixgujarati=2796,e.sixgurmukhi=2668,e.sixhackarabic=1638,e.sixhangzhou=12326,e.sixideographicparen=12837,e.sixinferior=8326,e.sixmonospace=65302,e.sixoldstyle=63286,e.sixparen=9337,e.sixperiod=9357,e.sixpersian=1782,e.sixroman=8565,e.sixsuperior=8310,e.sixteencircle=9327,e.sixteencurrencydenominatorbengali=2553,e.sixteenparen=9347,e.sixteenperiod=9367,e.sixthai=3670,e.slash=47,e.slashmonospace=65295,e.slong=383,e.slongdotaccent=7835,e.smileface=9786,e.smonospace=65363,e.sofpasuqhebrew=1475,e.softhyphen=173,e.softsigncyrillic=1100,e.sohiragana=12381,e.sokatakana=12477,e.sokatakanahalfwidth=65407,e.soliduslongoverlaycmb=824,e.solidusshortoverlaycmb=823,e.sorusithai=3625,e.sosalathai=3624,e.sosothai=3595,e.sosuathai=3626,e.space=32,e.spacehackarabic=32,e.spade=9824,e.spadesuitblack=9824,e.spadesuitwhite=9828,e.sparen=9390,e.squarebelowcmb=827,e.squarecc=13252,e.squarecm=13213,e.squarediagonalcrosshatchfill=9641,e.squarehorizontalfill=9636,e.squarekg=13199,e.squarekm=13214,e.squarekmcapital=13262,e.squareln=13265,e.squarelog=13266,e.squaremg=13198,e.squaremil=13269,e.squaremm=13212,e.squaremsquared=13217,e.squareorthogonalcrosshatchfill=9638,e.squareupperlefttolowerrightfill=9639,e.squareupperrighttolowerleftfill=9640,e.squareverticalfill=9637,e.squarewhitewithsmallblack=9635,e.srsquare=13275,e.ssabengali=2487,e.ssadeva=2359,e.ssagujarati=2743,e.ssangcieuckorean=12617,e.ssanghieuhkorean=12677,e.ssangieungkorean=12672,e.ssangkiyeokkorean=12594,e.ssangnieunkorean=12645,e.ssangpieupkorean=12611,e.ssangsioskorean=12614,e.ssangtikeutkorean=12600,e.ssuperior=63218,e.sterling=163,e.sterlingmonospace=65505,e.strokelongoverlaycmb=822,e.strokeshortoverlaycmb=821,e.subset=8834,e.subsetnotequal=8842,e.subsetorequal=8838,e.succeeds=8827,e.suchthat=8715,e.suhiragana=12377,e.sukatakana=12473,e.sukatakanahalfwidth=65405,e.sukunarabic=1618,e.summation=8721,e.sun=9788,e.superset=8835,e.supersetnotequal=8843,e.supersetorequal=8839,e.svsquare=13276,e.syouwaerasquare=13180,e.t=116,e.tabengali=2468,e.tackdown=8868,e.tackleft=8867,e.tadeva=2340,e.tagujarati=2724,e.tagurmukhi=2596,e.taharabic=1591,e.tahfinalarabic=65218,e.tahinitialarabic=65219,e.tahiragana=12383,e.tahmedialarabic=65220,e.taisyouerasquare=13181,e.takatakana=12479,e.takatakanahalfwidth=65408,e.tatweelarabic=1600,e.tau=964,e.tav=1514,e.tavdages=64330,e.tavdagesh=64330,e.tavdageshhebrew=64330,e.tavhebrew=1514,e.tbar=359,e.tbopomofo=12554,e.tcaron=357,e.tccurl=680,e.tcedilla=355,e.tcheharabic=1670,e.tchehfinalarabic=64379,e.tchehinitialarabic=64380,e.tchehmedialarabic=64381,e.tcircle=9443,e.tcircumflexbelow=7793,e.tcommaaccent=355,e.tdieresis=7831,e.tdotaccent=7787,e.tdotbelow=7789,e.tecyrillic=1090,e.tedescendercyrillic=1197,e.teharabic=1578,e.tehfinalarabic=65174,e.tehhahinitialarabic=64674,e.tehhahisolatedarabic=64524,e.tehinitialarabic=65175,e.tehiragana=12390,e.tehjeeminitialarabic=64673,e.tehjeemisolatedarabic=64523,e.tehmarbutaarabic=1577,e.tehmarbutafinalarabic=65172,e.tehmedialarabic=65176,e.tehmeeminitialarabic=64676,e.tehmeemisolatedarabic=64526,e.tehnoonfinalarabic=64627,e.tekatakana=12486,e.tekatakanahalfwidth=65411,e.telephone=8481,e.telephoneblack=9742,e.telishagedolahebrew=1440,e.telishaqetanahebrew=1449,e.tencircle=9321,e.tenideographicparen=12841,e.tenparen=9341,e.tenperiod=9361,e.tenroman=8569,e.tesh=679,e.tet=1496,e.tetdagesh=64312,e.tetdageshhebrew=64312,e.tethebrew=1496,e.tetsecyrillic=1205,e.tevirhebrew=1435,e.tevirlefthebrew=1435,e.thabengali=2469,e.thadeva=2341,e.thagujarati=2725,e.thagurmukhi=2597,e.thalarabic=1584,e.thalfinalarabic=65196,e.thanthakhatlowleftthai=63640,e.thanthakhatlowrightthai=63639,e.thanthakhatthai=3660,e.thanthakhatupperleftthai=63638,e.theharabic=1579,e.thehfinalarabic=65178,e.thehinitialarabic=65179,e.thehmedialarabic=65180,e.thereexists=8707,e.therefore=8756,e.theta=952,e.theta1=977,e.thetasymbolgreek=977,e.thieuthacirclekorean=12921,e.thieuthaparenkorean=12825,e.thieuthcirclekorean=12907,e.thieuthkorean=12620,e.thieuthparenkorean=12811,e.thirteencircle=9324,e.thirteenparen=9344,e.thirteenperiod=9364,e.thonangmonthothai=3601,e.thook=429,e.thophuthaothai=3602,e.thorn=254,e.thothahanthai=3607,e.thothanthai=3600,e.thothongthai=3608,e.thothungthai=3606,e.thousandcyrillic=1154,e.thousandsseparatorarabic=1644,e.thousandsseparatorpersian=1644,e.three=51,e.threearabic=1635,e.threebengali=2537,e.threecircle=9314,e.threecircleinversesansserif=10124,e.threedeva=2409,e.threeeighths=8540,e.threegujarati=2793,e.threegurmukhi=2665,e.threehackarabic=1635,e.threehangzhou=12323,e.threeideographicparen=12834,e.threeinferior=8323,e.threemonospace=65299,e.threenumeratorbengali=2550,e.threeoldstyle=63283,e.threeparen=9334,e.threeperiod=9354,e.threepersian=1779,e.threequarters=190,e.threequartersemdash=63198,e.threeroman=8562,e.threesuperior=179,e.threethai=3667,e.thzsquare=13204,e.tihiragana=12385,e.tikatakana=12481,e.tikatakanahalfwidth=65409,e.tikeutacirclekorean=12912,e.tikeutaparenkorean=12816,e.tikeutcirclekorean=12898,e.tikeutkorean=12599,e.tikeutparenkorean=12802,e.tilde=732,e.tildebelowcmb=816,e.tildecmb=771,e.tildecomb=771,e.tildedoublecmb=864,e.tildeoperator=8764,e.tildeoverlaycmb=820,e.tildeverticalcmb=830,e.timescircle=8855,e.tipehahebrew=1430,e.tipehalefthebrew=1430,e.tippigurmukhi=2672,e.titlocyrilliccmb=1155,e.tiwnarmenian=1407,e.tlinebelow=7791,e.tmonospace=65364,e.toarmenian=1385,e.tohiragana=12392,e.tokatakana=12488,e.tokatakanahalfwidth=65412,e.tonebarextrahighmod=741,e.tonebarextralowmod=745,e.tonebarhighmod=742,e.tonebarlowmod=744,e.tonebarmidmod=743,e.tonefive=445,e.tonesix=389,e.tonetwo=424,e.tonos=900,e.tonsquare=13095,e.topatakthai=3599,e.tortoiseshellbracketleft=12308,e.tortoiseshellbracketleftsmall=65117,e.tortoiseshellbracketleftvertical=65081,e.tortoiseshellbracketright=12309,e.tortoiseshellbracketrightsmall=65118,e.tortoiseshellbracketrightvertical=65082,e.totaothai=3605,e.tpalatalhook=427,e.tparen=9391,e.trademark=8482,e.trademarksans=63722,e.trademarkserif=63195,e.tretroflexhook=648,e.triagdn=9660,e.triaglf=9668,e.triagrt=9658,e.triagup=9650,e.ts=678,e.tsadi=1510,e.tsadidagesh=64326,e.tsadidageshhebrew=64326,e.tsadihebrew=1510,e.tsecyrillic=1094,e.tsere=1461,e.tsere12=1461,e.tsere1e=1461,e.tsere2b=1461,e.tserehebrew=1461,e.tserenarrowhebrew=1461,e.tserequarterhebrew=1461,e.tserewidehebrew=1461,e.tshecyrillic=1115,e.tsuperior=63219,e.ttabengali=2463,e.ttadeva=2335,e.ttagujarati=2719,e.ttagurmukhi=2591,e.tteharabic=1657,e.ttehfinalarabic=64359,e.ttehinitialarabic=64360,e.ttehmedialarabic=64361,e.tthabengali=2464,e.tthadeva=2336,e.tthagujarati=2720,e.tthagurmukhi=2592,e.tturned=647,e.tuhiragana=12388,e.tukatakana=12484,e.tukatakanahalfwidth=65410,e.tusmallhiragana=12387,e.tusmallkatakana=12483,e.tusmallkatakanahalfwidth=65391,e.twelvecircle=9323,e.twelveparen=9343,e.twelveperiod=9363,e.twelveroman=8571,e.twentycircle=9331,e.twentyhangzhou=21316,e.twentyparen=9351,e.twentyperiod=9371,e.two=50,e.twoarabic=1634,e.twobengali=2536,e.twocircle=9313,e.twocircleinversesansserif=10123,e.twodeva=2408,e.twodotenleader=8229,e.twodotleader=8229,e.twodotleadervertical=65072,e.twogujarati=2792,e.twogurmukhi=2664,e.twohackarabic=1634,e.twohangzhou=12322,e.twoideographicparen=12833,e.twoinferior=8322,e.twomonospace=65298,e.twonumeratorbengali=2549,e.twooldstyle=63282,e.twoparen=9333,e.twoperiod=9353,e.twopersian=1778,e.tworoman=8561,e.twostroke=443,e.twosuperior=178,e.twothai=3666,e.twothirds=8532,e.u=117,e.uacute=250,e.ubar=649,e.ubengali=2441,e.ubopomofo=12584,e.ubreve=365,e.ucaron=468,e.ucircle=9444,e.ucircumflex=251,e.ucircumflexbelow=7799,e.ucyrillic=1091,e.udattadeva=2385,e.udblacute=369,e.udblgrave=533,e.udeva=2313,e.udieresis=252,e.udieresisacute=472,e.udieresisbelow=7795,e.udieresiscaron=474,e.udieresiscyrillic=1265,e.udieresisgrave=476,e.udieresismacron=470,e.udotbelow=7909,e.ugrave=249,e.ugujarati=2697,e.ugurmukhi=2569,e.uhiragana=12358,e.uhookabove=7911,e.uhorn=432,e.uhornacute=7913,e.uhorndotbelow=7921,e.uhorngrave=7915,e.uhornhookabove=7917,e.uhorntilde=7919,e.uhungarumlaut=369,e.uhungarumlautcyrillic=1267,e.uinvertedbreve=535,e.ukatakana=12454,e.ukatakanahalfwidth=65395,e.ukcyrillic=1145,e.ukorean=12636,e.umacron=363,e.umacroncyrillic=1263,e.umacrondieresis=7803,e.umatragurmukhi=2625,e.umonospace=65365,e.underscore=95,e.underscoredbl=8215,e.underscoremonospace=65343,e.underscorevertical=65075,e.underscorewavy=65103,e.union=8746,e.universal=8704,e.uogonek=371,e.uparen=9392,e.upblock=9600,e.upperdothebrew=1476,e.upsilon=965,e.upsilondieresis=971,e.upsilondieresistonos=944,e.upsilonlatin=650,e.upsilontonos=973,e.uptackbelowcmb=797,e.uptackmod=724,e.uragurmukhi=2675,e.uring=367,e.ushortcyrillic=1118,e.usmallhiragana=12357,e.usmallkatakana=12453,e.usmallkatakanahalfwidth=65385,e.ustraightcyrillic=1199,e.ustraightstrokecyrillic=1201,e.utilde=361,e.utildeacute=7801,e.utildebelow=7797,e.uubengali=2442,e.uudeva=2314,e.uugujarati=2698,e.uugurmukhi=2570,e.uumatragurmukhi=2626,e.uuvowelsignbengali=2498,e.uuvowelsigndeva=2370,e.uuvowelsigngujarati=2754,e.uvowelsignbengali=2497,e.uvowelsigndeva=2369,e.uvowelsigngujarati=2753,e.v=118,e.vadeva=2357,e.vagujarati=2741,e.vagurmukhi=2613,e.vakatakana=12535,e.vav=1493,e.vavdagesh=64309,e.vavdagesh65=64309,e.vavdageshhebrew=64309,e.vavhebrew=1493,e.vavholam=64331,e.vavholamhebrew=64331,e.vavvavhebrew=1520,e.vavyodhebrew=1521,e.vcircle=9445,e.vdotbelow=7807,e.vecyrillic=1074,e.veharabic=1700,e.vehfinalarabic=64363,e.vehinitialarabic=64364,e.vehmedialarabic=64365,e.vekatakana=12537,e.venus=9792,e.verticalbar=124,e.verticallineabovecmb=781,e.verticallinebelowcmb=809,e.verticallinelowmod=716,e.verticallinemod=712,e.vewarmenian=1406,e.vhook=651,e.vikatakana=12536,e.viramabengali=2509,e.viramadeva=2381,e.viramagujarati=2765,e.visargabengali=2435,e.visargadeva=2307,e.visargagujarati=2691,e.vmonospace=65366,e.voarmenian=1400,e.voicediterationhiragana=12446,e.voicediterationkatakana=12542,e.voicedmarkkana=12443,e.voicedmarkkanahalfwidth=65438,e.vokatakana=12538,e.vparen=9393,e.vtilde=7805,e.vturned=652,e.vuhiragana=12436,e.vukatakana=12532,e.w=119,e.wacute=7811,e.waekorean=12633,e.wahiragana=12431,e.wakatakana=12527,e.wakatakanahalfwidth=65436,e.wakorean=12632,e.wasmallhiragana=12430,e.wasmallkatakana=12526,e.wattosquare=13143,e.wavedash=12316,e.wavyunderscorevertical=65076,e.wawarabic=1608,e.wawfinalarabic=65262,e.wawhamzaabovearabic=1572,e.wawhamzaabovefinalarabic=65158,e.wbsquare=13277,e.wcircle=9446,e.wcircumflex=373,e.wdieresis=7813,e.wdotaccent=7815,e.wdotbelow=7817,e.wehiragana=12433,e.weierstrass=8472,e.wekatakana=12529,e.wekorean=12638,e.weokorean=12637,e.wgrave=7809,e.whitebullet=9702,e.whitecircle=9675,e.whitecircleinverse=9689,e.whitecornerbracketleft=12302,e.whitecornerbracketleftvertical=65091,e.whitecornerbracketright=12303,e.whitecornerbracketrightvertical=65092,e.whitediamond=9671,e.whitediamondcontainingblacksmalldiamond=9672,e.whitedownpointingsmalltriangle=9663;e.whitedownpointingtriangle=9661,e.whiteleftpointingsmalltriangle=9667,e.whiteleftpointingtriangle=9665,e.whitelenticularbracketleft=12310,e.whitelenticularbracketright=12311,e.whiterightpointingsmalltriangle=9657,e.whiterightpointingtriangle=9655,e.whitesmallsquare=9643,e.whitesmilingface=9786,e.whitesquare=9633,e.whitestar=9734,e.whitetelephone=9743,e.whitetortoiseshellbracketleft=12312,e.whitetortoiseshellbracketright=12313,e.whiteuppointingsmalltriangle=9653,e.whiteuppointingtriangle=9651,e.wihiragana=12432,e.wikatakana=12528,e.wikorean=12639,e.wmonospace=65367,e.wohiragana=12434,e.wokatakana=12530,e.wokatakanahalfwidth=65382,e.won=8361,e.wonmonospace=65510,e.wowaenthai=3623,e.wparen=9394,e.wring=7832,e.wsuperior=695,e.wturned=653,e.wynn=447,e.x=120,e.xabovecmb=829,e.xbopomofo=12562,e.xcircle=9447,e.xdieresis=7821,e.xdotaccent=7819,e.xeharmenian=1389,e.xi=958,e.xmonospace=65368,e.xparen=9395,e.xsuperior=739,e.y=121,e.yaadosquare=13134,e.yabengali=2479,e.yacute=253,e.yadeva=2351,e.yaekorean=12626,e.yagujarati=2735,e.yagurmukhi=2607,e.yahiragana=12420,e.yakatakana=12516,e.yakatakanahalfwidth=65428,e.yakorean=12625,e.yamakkanthai=3662,e.yasmallhiragana=12419,e.yasmallkatakana=12515,e.yasmallkatakanahalfwidth=65388,e.yatcyrillic=1123,e.ycircle=9448,e.ycircumflex=375,e.ydieresis=255,e.ydotaccent=7823,e.ydotbelow=7925,e.yeharabic=1610,e.yehbarreearabic=1746,e.yehbarreefinalarabic=64431,e.yehfinalarabic=65266,e.yehhamzaabovearabic=1574,e.yehhamzaabovefinalarabic=65162,e.yehhamzaaboveinitialarabic=65163,e.yehhamzaabovemedialarabic=65164,e.yehinitialarabic=65267,e.yehmedialarabic=65268,e.yehmeeminitialarabic=64733,e.yehmeemisolatedarabic=64600,e.yehnoonfinalarabic=64660,e.yehthreedotsbelowarabic=1745,e.yekorean=12630,e.yen=165,e.yenmonospace=65509,e.yeokorean=12629,e.yeorinhieuhkorean=12678,e.yerahbenyomohebrew=1450,e.yerahbenyomolefthebrew=1450,e.yericyrillic=1099,e.yerudieresiscyrillic=1273,e.yesieungkorean=12673,e.yesieungpansioskorean=12675,e.yesieungsioskorean=12674,e.yetivhebrew=1434,e.ygrave=7923,e.yhook=436,e.yhookabove=7927,e.yiarmenian=1397,e.yicyrillic=1111,e.yikorean=12642,e.yinyang=9775,e.yiwnarmenian=1410,e.ymonospace=65369,e.yod=1497,e.yoddagesh=64313,e.yoddageshhebrew=64313,e.yodhebrew=1497,e.yodyodhebrew=1522,e.yodyodpatahhebrew=64287,e.yohiragana=12424,e.yoikorean=12681,e.yokatakana=12520,e.yokatakanahalfwidth=65430,e.yokorean=12635,e.yosmallhiragana=12423,e.yosmallkatakana=12519,e.yosmallkatakanahalfwidth=65390,e.yotgreek=1011,e.yoyaekorean=12680,e.yoyakorean=12679,e.yoyakthai=3618,e.yoyingthai=3597,e.yparen=9396,e.ypogegrammeni=890,e.ypogegrammenigreekcmb=837,e.yr=422,e.yring=7833,e.ysuperior=696,e.ytilde=7929,e.yturned=654,e.yuhiragana=12422,e.yuikorean=12684,e.yukatakana=12518,e.yukatakanahalfwidth=65429,e.yukorean=12640,e.yusbigcyrillic=1131,e.yusbigiotifiedcyrillic=1133,e.yuslittlecyrillic=1127,e.yuslittleiotifiedcyrillic=1129,e.yusmallhiragana=12421,e.yusmallkatakana=12517,e.yusmallkatakanahalfwidth=65389,e.yuyekorean=12683,e.yuyeokorean=12682,e.yyabengali=2527,e.yyadeva=2399,e.z=122,e.zaarmenian=1382,e.zacute=378,e.zadeva=2395,e.zagurmukhi=2651,e.zaharabic=1592,e.zahfinalarabic=65222,e.zahinitialarabic=65223,e.zahiragana=12374,e.zahmedialarabic=65224,e.zainarabic=1586,e.zainfinalarabic=65200,e.zakatakana=12470,e.zaqefgadolhebrew=1429,e.zaqefqatanhebrew=1428,e.zarqahebrew=1432,e.zayin=1494,e.zayindagesh=64310,e.zayindageshhebrew=64310,e.zayinhebrew=1494,e.zbopomofo=12567,e.zcaron=382,e.zcircle=9449,e.zcircumflex=7825,e.zcurl=657,e.zdot=380,e.zdotaccent=380,e.zdotbelow=7827,e.zecyrillic=1079,e.zedescendercyrillic=1177,e.zedieresiscyrillic=1247,e.zehiragana=12380,e.zekatakana=12476,e.zero=48,e.zeroarabic=1632,e.zerobengali=2534,e.zerodeva=2406,e.zerogujarati=2790,e.zerogurmukhi=2662,e.zerohackarabic=1632,e.zeroinferior=8320,e.zeromonospace=65296,e.zerooldstyle=63280,e.zeropersian=1776,e.zerosuperior=8304,e.zerothai=3664,e.zerowidthjoiner=65279,e.zerowidthnonjoiner=8204,e.zerowidthspace=8203,e.zeta=950,e.zhbopomofo=12563,e.zhearmenian=1386,e.zhebrevecyrillic=1218,e.zhecyrillic=1078,e.zhedescendercyrillic=1175,e.zhedieresiscyrillic=1245,e.zihiragana=12376,e.zikatakana=12472,e.zinorhebrew=1454,e.zlinebelow=7829,e.zmonospace=65370,e.zohiragana=12382,e.zokatakana=12478,e.zparen=9397,e.zretroflexhook=656,e.zstroke=438,e.zuhiragana=12378,e.zukatakana=12474,e[".notdef"]=0,e.angbracketleftbig=9001,e.angbracketleftBig=9001,e.angbracketleftbigg=9001,e.angbracketleftBigg=9001,e.angbracketrightBig=9002,e.angbracketrightbig=9002,e.angbracketrightBigg=9002,e.angbracketrightbigg=9002,e.arrowhookleft=8618,e.arrowhookright=8617,e.arrowlefttophalf=8636,e.arrowleftbothalf=8637,e.arrownortheast=8599,e.arrownorthwest=8598,e.arrowrighttophalf=8640,e.arrowrightbothalf=8641,e.arrowsoutheast=8600,e.arrowsouthwest=8601,e.backslashbig=8726,e.backslashBig=8726,e.backslashBigg=8726,e.backslashbigg=8726,e.bardbl=8214,e.bracehtipdownleft=65079,e.bracehtipdownright=65079,e.bracehtipupleft=65080,e.bracehtipupright=65080,e.braceleftBig=123,e.braceleftbig=123,e.braceleftbigg=123,e.braceleftBigg=123,e.bracerightBig=125,e.bracerightbig=125,e.bracerightbigg=125,e.bracerightBigg=125,e.bracketleftbig=91,e.bracketleftBig=91,e.bracketleftbigg=91,e.bracketleftBigg=91,e.bracketrightBig=93,e.bracketrightbig=93,e.bracketrightbigg=93,e.bracketrightBigg=93,e.ceilingleftbig=8968,e.ceilingleftBig=8968,e.ceilingleftBigg=8968,e.ceilingleftbigg=8968,e.ceilingrightbig=8969,e.ceilingrightBig=8969,e.ceilingrightbigg=8969,e.ceilingrightBigg=8969,e.circledotdisplay=8857,e.circledottext=8857,e.circlemultiplydisplay=8855,e.circlemultiplytext=8855,e.circleplusdisplay=8853,e.circleplustext=8853,e.contintegraldisplay=8750,e.contintegraltext=8750,e.coproductdisplay=8720,e.coproducttext=8720,e.floorleftBig=8970,e.floorleftbig=8970,e.floorleftbigg=8970,e.floorleftBigg=8970,e.floorrightbig=8971,e.floorrightBig=8971,e.floorrightBigg=8971,e.floorrightbigg=8971,e.hatwide=770,e.hatwider=770,e.hatwidest=770,e.intercal=7488,e.integraldisplay=8747,e.integraltext=8747,e.intersectiondisplay=8898,e.intersectiontext=8898,e.logicalanddisplay=8743,e.logicalandtext=8743,e.logicalordisplay=8744,e.logicalortext=8744,e.parenleftBig=40,e.parenleftbig=40,e.parenleftBigg=40,e.parenleftbigg=40,e.parenrightBig=41,e.parenrightbig=41,e.parenrightBigg=41,e.parenrightbigg=41,e.prime=8242,e.productdisplay=8719,e.producttext=8719,e.radicalbig=8730,e.radicalBig=8730,e.radicalBigg=8730,e.radicalbigg=8730,e.radicalbt=8730,e.radicaltp=8730,e.radicalvertex=8730,e.slashbig=47,e.slashBig=47,e.slashBigg=47,e.slashbigg=47,e.summationdisplay=8721,e.summationtext=8721,e.tildewide=732,e.tildewider=732,e.tildewidest=732,e.uniondisplay=8899,e.unionmultidisplay=8846,e.unionmultitext=8846,e.unionsqdisplay=8852,e.unionsqtext=8852,e.uniontext=8899,e.vextenddouble=8741,e.vextendsingle=8739})),iXe=pWe((function(e){e.space=32,e.a1=9985,e.a2=9986,e.a202=9987,e.a3=9988,e.a4=9742,e.a5=9990,e.a119=9991,e.a118=9992,e.a117=9993,e.a11=9755,e.a12=9758,e.a13=9996,e.a14=9997,e.a15=9998,e.a16=9999,e.a105=1e4,e.a17=10001,e.a18=10002,e.a19=10003,e.a20=10004,e.a21=10005,e.a22=10006,e.a23=10007,e.a24=10008,e.a25=10009,e.a26=10010,e.a27=10011,e.a28=10012,e.a6=10013,e.a7=10014,e.a8=10015,e.a9=10016,e.a10=10017,e.a29=10018,e.a30=10019,e.a31=10020,e.a32=10021,e.a33=10022,e.a34=10023,e.a35=9733,e.a36=10025,e.a37=10026,e.a38=10027,e.a39=10028,e.a40=10029,e.a41=10030,e.a42=10031,e.a43=10032,e.a44=10033,e.a45=10034,e.a46=10035,e.a47=10036,e.a48=10037,e.a49=10038,e.a50=10039,e.a51=10040,e.a52=10041,e.a53=10042,e.a54=10043,e.a55=10044,e.a56=10045,e.a57=10046,e.a58=10047,e.a59=10048,e.a60=10049,e.a61=10050,e.a62=10051,e.a63=10052,e.a64=10053,e.a65=10054,e.a66=10055,e.a67=10056,e.a68=10057,e.a69=10058,e.a70=10059,e.a71=9679,e.a72=10061,e.a73=9632,e.a74=10063,e.a203=10064,e.a75=10065,e.a204=10066,e.a76=9650,e.a77=9660,e.a78=9670,e.a79=10070,e.a81=9687,e.a82=10072,e.a83=10073,e.a84=10074,e.a97=10075,e.a98=10076,e.a99=10077,e.a100=10078,e.a101=10081,e.a102=10082,e.a103=10083,e.a104=10084,e.a106=10085,e.a107=10086,e.a108=10087,e.a112=9827,e.a111=9830,e.a110=9829,e.a109=9824,e.a120=9312,e.a121=9313,e.a122=9314,e.a123=9315,e.a124=9316,e.a125=9317,e.a126=9318,e.a127=9319,e.a128=9320,e.a129=9321,e.a130=10102,e.a131=10103,e.a132=10104,e.a133=10105,e.a134=10106,e.a135=10107,e.a136=10108,e.a137=10109,e.a138=10110,e.a139=10111,e.a140=10112,e.a141=10113,e.a142=10114,e.a143=10115,e.a144=10116,e.a145=10117,e.a146=10118,e.a147=10119,e.a148=10120,e.a149=10121,e.a150=10122,e.a151=10123,e.a152=10124,e.a153=10125,e.a154=10126,e.a155=10127,e.a156=10128,e.a157=10129,e.a158=10130,e.a159=10131,e.a160=10132,e.a161=8594,e.a163=8596,e.a164=8597,e.a196=10136,e.a165=10137,e.a192=10138,e.a166=10139,e.a167=10140,e.a168=10141,e.a169=10142,e.a170=10143,e.a171=10144,e.a172=10145,e.a173=10146,e.a162=10147,e.a174=10148,e.a175=10149,e.a176=10150,e.a177=10151,e.a178=10152,e.a179=10153,e.a193=10154,e.a180=10155,e.a199=10156,e.a181=10157,e.a200=10158,e.a182=10159,e.a201=10161,e.a183=10162,e.a184=10163,e.a197=10164,e.a185=10165,e.a194=10166,e.a198=10167,e.a186=10168,e.a195=10169,e.a187=10170,e.a188=10171,e.a189=10172,e.a190=10173,e.a191=10174,e.a89=10088,e.a90=10089,e.a93=10090,e.a94=10091,e.a91=10092,e.a92=10093,e.a205=10094,e.a85=10095,e.a206=10096,e.a86=10097,e.a87=10098,e.a88=10099,e.a95=10100,e.a96=10101,e[".notdef"]=0})),nXe=pWe((function(e){e[63721]=169,e[63193]=169,e[63720]=174,e[63194]=174,e[63722]=8482,e[63195]=8482,e[63729]=9127,e[63730]=9128,e[63731]=9129,e[63740]=9131,e[63741]=9132,e[63742]=9133,e[63726]=9121,e[63727]=9122,e[63728]=9123,e[63737]=9124,e[63738]=9125,e[63739]=9126,e[63723]=9115,e[63724]=9116,e[63725]=9117,e[63734]=9118,e[63735]=9119,e[63736]=9120}));function sXe(e,t){let i=t[e];if(void 0!==i)return i;if(!e)return-1;if("u"===e[0]){const t=e.length;let n;if(7===t&&"n"===e[1]&&"i"===e[2])n=e.substring(3);else{if(!(t>=5&&t<=7))return-1;n=e.substring(1)}if(n===n.toUpperCase()&&(i=parseInt(n,16),i>=0))return i}return-1}const rXe=[[0,127],[128,255],[256,383],[384,591],[592,687,7424,7551,7552,7615],[688,767,42752,42783],[768,879,7616,7679],[880,1023],[11392,11519],[1024,1279,1280,1327,11744,11775,42560,42655],[1328,1423],[1424,1535],[42240,42559],[1536,1791,1872,1919],[1984,2047],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3584,3711],[3712,3839],[4256,4351,11520,11567],[6912,7039],[4352,4607],[7680,7935,11360,11391,42784,43007],[7936,8191],[8192,8303,11776,11903],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703,10224,10239,10496,10623,11008,11263],[8704,8959,10752,11007,10176,10223,10624,10751],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[12288,12351],[12352,12447],[12448,12543,12784,12799],[12544,12591,12704,12735],[12592,12687],[43072,43135],[12800,13055],[13056,13311],[44032,55215],[55296,57343],[67840,67871],[19968,40959,11904,12031,12032,12255,12272,12287,13312,19903,131072,173791,12688,12703],[57344,63743],[12736,12783,63744,64255,194560,195103],[64256,64335],[64336,65023],[65056,65071],[65040,65055],[65104,65135],[65136,65279],[65280,65519],[65520,65535],[3840,4095],[1792,1871],[1920,1983],[3456,3583],[4096,4255],[4608,4991,4992,5023,11648,11743],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[10240,10495],[40960,42127],[5888,5919,5920,5951,5952,5983,5984,6015],[66304,66351],[66352,66383],[66560,66639],[118784,119039,119040,119295,119296,119375],[119808,120831],[1044480,1048573],[65024,65039,917760,917999],[917504,917631],[6400,6479],[6480,6527],[6528,6623],[6656,6687],[11264,11359],[11568,11647],[19904,19967],[43008,43055],[65536,65663,65664,65791,65792,65855],[65856,65935],[66432,66463],[66464,66527],[66640,66687],[66688,66735],[67584,67647],[68096,68191],[119552,119647],[73728,74751,74752,74879],[119648,119679],[7040,7103],[7168,7247],[7248,7295],[43136,43231],[43264,43311],[43312,43359],[43520,43615],[65936,65999],[66e3,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];function aXe(e,t=-1){if(-1!==t){const i=rXe[t];for(let n=0,s=i.length;n<s;n+=2)if(e>=i[n]&&e<=i[n+1])return t}for(let i=0,n=rXe.length;i<n;i++){const t=rXe[i];for(let n=0,s=t.length;n<s;n+=2)if(e>=t[n]&&e<=t[n+1])return i}return-1}const oXe=new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$","u"),lXe=new Map;const AXe=!0,cXe=1,uXe=2,hXe=4,dXe=32,gXe=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function pXe(e,t){if(void 0!==t[e])return e;const i=sXe(e,t);if(-1!==i)for(const n in t)if(t[n]===i)return n;return e}function fXe(e,t,i){const n=Object.create(null);let s,r,a;const o=!!(e.flags&hXe);if(e.isInternalFont)for(a=t,r=0;r<a.length;r++)s=i.indexOf(a[r]),n[r]=s>=0?s:0;else if(e.baseEncodingName)for(a=Mze(e.baseEncodingName),r=0;r<a.length;r++)s=i.indexOf(a[r]),n[r]=s>=0?s:0;else if(o)for(r in t)n[r]=t[r];else for(a=kze,r=0;r<a.length;r++)s=i.indexOf(a[r]),n[r]=s>=0?s:0;const l=e.differences;let A;if(l)for(r in l){const e=l[r];if(s=i.indexOf(e),-1===s){A||(A=tXe());const t=pXe(e,A);t!==e&&(s=i.indexOf(t))}n[r]=s>=0?s:0}return n}function mXe(e){return e.replaceAll(/[,_]/g,"-").replaceAll(/\s/g,"")}const CXe=pWe((e=>{e[8211]=65074,e[8212]=65073,e[8229]=65072,e[8230]=65049,e[12289]=65041,e[12290]=65042,e[12296]=65087,e[12297]=65088,e[12298]=65085,e[12299]=65086,e[12300]=65089,e[12301]=65090,e[12302]=65091,e[12303]=65092,e[12304]=65083,e[12305]=65084,e[12308]=65081,e[12309]=65082,e[12310]=65047,e[12311]=65048,e[65103]=65076,e[65281]=65045,e[65288]=65077,e[65289]=65078,e[65292]=65040,e[65306]=65043,e[65307]=65044,e[65311]=65046,e[65339]=65095,e[65341]=65096,e[65343]=65075,e[65371]=65079,e[65373]=65080})),IXe=pWe((function(e){e["Times-Roman"]="Times-Roman",e.Helvetica="Helvetica",e.Courier="Courier",e.Symbol="Symbol",e["Times-Bold"]="Times-Bold",e["Helvetica-Bold"]="Helvetica-Bold",e["Courier-Bold"]="Courier-Bold",e.ZapfDingbats="ZapfDingbats",e["Times-Italic"]="Times-Italic",e["Helvetica-Oblique"]="Helvetica-Oblique",e["Courier-Oblique"]="Courier-Oblique",e["Times-BoldItalic"]="Times-BoldItalic",e["Helvetica-BoldOblique"]="Helvetica-BoldOblique",e["Courier-BoldOblique"]="Courier-BoldOblique",e.ArialNarrow="Helvetica",e["ArialNarrow-Bold"]="Helvetica-Bold",e["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",e["ArialNarrow-Italic"]="Helvetica-Oblique",e.ArialBlack="Helvetica",e["ArialBlack-Bold"]="Helvetica-Bold",e["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",e["ArialBlack-Italic"]="Helvetica-Oblique",e["Arial-Black"]="Helvetica",e["Arial-Black-Bold"]="Helvetica-Bold",e["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Black-Italic"]="Helvetica-Oblique",e.Arial="Helvetica",e["Arial-Bold"]="Helvetica-Bold",e["Arial-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Italic"]="Helvetica-Oblique",e.ArialMT="Helvetica",e["Arial-BoldItalicMT"]="Helvetica-BoldOblique",e["Arial-BoldMT"]="Helvetica-Bold",e["Arial-ItalicMT"]="Helvetica-Oblique",e["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique",e["Arial-BoldMT-Bold"]="Helvetica-Bold",e["Arial-ItalicMT-Italic"]="Helvetica-Oblique",e.ArialUnicodeMS="Helvetica",e["ArialUnicodeMS-Bold"]="Helvetica-Bold",e["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique",e["ArialUnicodeMS-Italic"]="Helvetica-Oblique",e["Courier-BoldItalic"]="Courier-BoldOblique",e["Courier-Italic"]="Courier-Oblique",e.CourierNew="Courier",e["CourierNew-Bold"]="Courier-Bold",e["CourierNew-BoldItalic"]="Courier-BoldOblique",e["CourierNew-Italic"]="Courier-Oblique",e["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",e["CourierNewPS-BoldMT"]="Courier-Bold",e["CourierNewPS-ItalicMT"]="Courier-Oblique",e.CourierNewPSMT="Courier",e["Helvetica-BoldItalic"]="Helvetica-BoldOblique",e["Helvetica-Italic"]="Helvetica-Oblique",e["Symbol-Bold"]="Symbol",e["Symbol-BoldItalic"]="Symbol",e["Symbol-Italic"]="Symbol",e.TimesNewRoman="Times-Roman",e["TimesNewRoman-Bold"]="Times-Bold",e["TimesNewRoman-BoldItalic"]="Times-BoldItalic",e["TimesNewRoman-Italic"]="Times-Italic",e.TimesNewRomanPS="Times-Roman",e["TimesNewRomanPS-Bold"]="Times-Bold",e["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",e["TimesNewRomanPS-BoldMT"]="Times-Bold",e["TimesNewRomanPS-Italic"]="Times-Italic",e["TimesNewRomanPS-ItalicMT"]="Times-Italic",e.TimesNewRomanPSMT="Times-Roman",e["TimesNewRomanPSMT-Bold"]="Times-Bold",e["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPSMT-Italic"]="Times-Italic"})),vXe=pWe((function(e){e.Courier="FoxitFixed.pfb",e["Courier-Bold"]="FoxitFixedBold.pfb",e["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb",e["Courier-Oblique"]="FoxitFixedItalic.pfb",e.Helvetica="LiberationSans-Regular.ttf",e["Helvetica-Bold"]="LiberationSans-Bold.ttf",e["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf",e["Helvetica-Oblique"]="LiberationSans-Italic.ttf",e["Times-Roman"]="FoxitSerif.pfb",e["Times-Bold"]="FoxitSerifBold.pfb",e["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb",e["Times-Italic"]="FoxitSerifItalic.pfb",e.Symbol="FoxitSymbol.pfb",e.ZapfDingbats="FoxitDingbats.pfb",e["LiberationSans-Regular"]="LiberationSans-Regular.ttf",e["LiberationSans-Bold"]="LiberationSans-Bold.ttf",e["LiberationSans-Italic"]="LiberationSans-Italic.ttf",e["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"})),BXe=pWe((function(e){e.Calibri="Helvetica",e["Calibri-Bold"]="Helvetica-Bold",e["Calibri-BoldItalic"]="Helvetica-BoldOblique",e["Calibri-Italic"]="Helvetica-Oblique",e.CenturyGothic="Helvetica",e["CenturyGothic-Bold"]="Helvetica-Bold",e["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",e["CenturyGothic-Italic"]="Helvetica-Oblique",e.ComicSansMS="Comic Sans MS",e["ComicSansMS-Bold"]="Comic Sans MS-Bold",e["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",e["ComicSansMS-Italic"]="Comic Sans MS-Italic",e.GillSansMT="Helvetica",e["GillSansMT-Bold"]="Helvetica-Bold",e["GillSansMT-BoldItalic"]="Helvetica-BoldOblique",e["GillSansMT-Italic"]="Helvetica-Oblique",e.Impact="Helvetica",e["ItcSymbol-Bold"]="Helvetica-Bold",e["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique",e["ItcSymbol-Book"]="Helvetica",e["ItcSymbol-BookItalic"]="Helvetica-Oblique",e["ItcSymbol-Medium"]="Helvetica",e["ItcSymbol-MediumItalic"]="Helvetica-Oblique",e.LucidaConsole="Courier",e["LucidaConsole-Bold"]="Courier-Bold",e["LucidaConsole-BoldItalic"]="Courier-BoldOblique",e["LucidaConsole-Italic"]="Courier-Oblique",e["LucidaSans-Demi"]="Helvetica-Bold",e["MS-Gothic"]="MS Gothic",e["MS-Gothic-Bold"]="MS Gothic-Bold",e["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",e["MS-Gothic-Italic"]="MS Gothic-Italic",e["MS-Mincho"]="MS Mincho",e["MS-Mincho-Bold"]="MS Mincho-Bold",e["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",e["MS-Mincho-Italic"]="MS Mincho-Italic",e["MS-PGothic"]="MS PGothic",e["MS-PGothic-Bold"]="MS PGothic-Bold",e["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",e["MS-PGothic-Italic"]="MS PGothic-Italic",e["MS-PMincho"]="MS PMincho",e["MS-PMincho-Bold"]="MS PMincho-Bold",e["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",e["MS-PMincho-Italic"]="MS PMincho-Italic",e.NuptialScript="Times-Italic",e.SegoeUISymbol="Helvetica"})),yXe=pWe((function(e){e["Adobe Jenson"]=!0,e["Adobe Text"]=!0,e.Albertus=!0,e.Aldus=!0,e.Alexandria=!0,e.Algerian=!0,e["American Typewriter"]=!0,e.Antiqua=!0,e.Apex=!0,e.Arno=!0,e.Aster=!0,e.Aurora=!0,e.Baskerville=!0,e.Bell=!0,e.Bembo=!0,e["Bembo Schoolbook"]=!0,e.Benguiat=!0,e["Berkeley Old Style"]=!0,e["Bernhard Modern"]=!0,e["Berthold City"]=!0,e.Bodoni=!0,e["Bauer Bodoni"]=!0,e["Book Antiqua"]=!0,e.Bookman=!0,e["Bordeaux Roman"]=!0,e["Californian FB"]=!0,e.Calisto=!0,e.Calvert=!0,e.Capitals=!0,e.Cambria=!0,e.Cartier=!0,e.Caslon=!0,e.Catull=!0,e.Centaur=!0,e["Century Old Style"]=!0,e["Century Schoolbook"]=!0,e.Chaparral=!0,e["Charis SIL"]=!0,e.Cheltenham=!0,e["Cholla Slab"]=!0,e.Clarendon=!0,e.Clearface=!0,e.Cochin=!0,e.Colonna=!0,e["Computer Modern"]=!0,e["Concrete Roman"]=!0,e.Constantia=!0,e["Cooper Black"]=!0,e.Corona=!0,e.Ecotype=!0,e.Egyptienne=!0,e.Elephant=!0,e.Excelsior=!0,e.Fairfield=!0,e["FF Scala"]=!0,e.Folkard=!0,e.Footlight=!0,e.FreeSerif=!0,e["Friz Quadrata"]=!0,e.Garamond=!0,e.Gentium=!0,e.Georgia=!0,e.Gloucester=!0,e["Goudy Old Style"]=!0,e["Goudy Schoolbook"]=!0,e["Goudy Pro Font"]=!0,e.Granjon=!0,e["Guardian Egyptian"]=!0,e.Heather=!0,e.Hercules=!0,e["High Tower Text"]=!0,e.Hiroshige=!0,e["Hoefler Text"]=!0,e["Humana Serif"]=!0,e.Imprint=!0,e["Ionic No. 5"]=!0,e.Janson=!0,e.Joanna=!0,e.Korinna=!0,e.Lexicon=!0,e.LiberationSerif=!0,e["Liberation Serif"]=!0,e["Linux Libertine"]=!0,e.Literaturnaya=!0,e.Lucida=!0,e["Lucida Bright"]=!0,e.Melior=!0,e.Memphis=!0,e.Miller=!0,e.Minion=!0,e.Modern=!0,e["Mona Lisa"]=!0,e["Mrs Eaves"]=!0,e["MS Serif"]=!0,e["Museo Slab"]=!0,e["New York"]=!0,e["Nimbus Roman"]=!0,e["NPS Rawlinson Roadway"]=!0,e.NuptialScript=!0,e.Palatino=!0,e.Perpetua=!0,e.Plantin=!0,e["Plantin Schoolbook"]=!0,e.Playbill=!0,e["Poor Richard"]=!0,e["Rawlinson Roadway"]=!0,e.Renault=!0,e.Requiem=!0,e.Rockwell=!0,e.Roman=!0,e["Rotis Serif"]=!0,e.Sabon=!0,e.Scala=!0,e.Seagull=!0,e.Sistina=!0,e.Souvenir=!0,e.STIX=!0,e["Stone Informal"]=!0,e["Stone Serif"]=!0,e.Sylfaen=!0,e.Times=!0,e.Trajan=!0,e["Trinité"]=!0,e["Trump Mediaeval"]=!0,e.Utopia=!0,e["Vale Type"]=!0,e["Bitstream Vera"]=!0,e["Vera Serif"]=!0,e.Versailles=!0,e.Wanted=!0,e.Weiss=!0,e["Wide Latin"]=!0,e.Windsor=!0,e.XITS=!0})),bXe=pWe((function(e){e.Dingbats=!0,e.Symbol=!0,e.ZapfDingbats=!0,e.Wingdings=!0,e["Wingdings-Bold"]=!0,e["Wingdings-Regular"]=!0})),EXe=pWe((function(e){e[2]=10,e[3]=32,e[4]=33,e[5]=34,e[6]=35,e[7]=36,e[8]=37,e[9]=38,e[10]=39,e[11]=40,e[12]=41,e[13]=42,e[14]=43,e[15]=44,e[16]=45,e[17]=46,e[18]=47,e[19]=48,e[20]=49,e[21]=50,e[22]=51,e[23]=52,e[24]=53,e[25]=54,e[26]=55,e[27]=56,e[28]=57,e[29]=58,e[30]=894,e[31]=60,e[32]=61,e[33]=62,e[34]=63,e[35]=64,e[36]=65,e[37]=66,e[38]=67,e[39]=68,e[40]=69,e[41]=70,e[42]=71,e[43]=72,e[44]=73,e[45]=74,e[46]=75,e[47]=76,e[48]=77,e[49]=78,e[50]=79,e[51]=80,e[52]=81,e[53]=82,e[54]=83,e[55]=84,e[56]=85,e[57]=86,e[58]=87,e[59]=88,e[60]=89,e[61]=90,e[62]=91,e[63]=92,e[64]=93,e[65]=94,e[66]=95,e[67]=96,e[68]=97,e[69]=98,e[70]=99,e[71]=100,e[72]=101,e[73]=102,e[74]=103,e[75]=104,e[76]=105,e[77]=106,e[78]=107,e[79]=108,e[80]=109,e[81]=110,e[82]=111,e[83]=112,e[84]=113,e[85]=114,e[86]=115,e[87]=116,e[88]=117,e[89]=118,e[90]=119,e[91]=120,e[92]=121,e[93]=122,e[94]=123,e[95]=124,e[96]=125,e[97]=126,e[98]=196,e[99]=197,e[100]=199,e[101]=201,e[102]=209,e[103]=214,e[104]=220,e[105]=225,e[106]=224,e[107]=226,e[108]=228,e[109]=227,e[110]=229,e[111]=231,e[112]=233,e[113]=232,e[114]=234,e[115]=235,e[116]=237,e[117]=236,e[118]=238,e[119]=239,e[120]=241,e[121]=243,e[122]=242,e[123]=244,e[124]=246,e[125]=245,e[126]=250,e[127]=249,e[128]=251,e[129]=252,e[130]=8224,e[131]=176,e[132]=162,e[133]=163,e[134]=167,e[135]=8226,e[136]=182,e[137]=223,e[138]=174,e[139]=169,e[140]=8482,e[141]=180,e[142]=168,e[143]=8800,e[144]=198,e[145]=216,e[146]=8734,e[147]=177,e[148]=8804,e[149]=8805,e[150]=165,e[151]=181,e[152]=8706,e[153]=8721,e[154]=8719,e[156]=8747,e[157]=170,e[158]=186,e[159]=8486,e[160]=230,e[161]=248,e[162]=191,e[163]=161,e[164]=172,e[165]=8730,e[166]=402,e[167]=8776,e[168]=8710,e[169]=171,e[170]=187,e[171]=8230,e[179]=8220,e[180]=8221,e[181]=8216,e[182]=8217,e[200]=193,e[203]=205,e[207]=211,e[210]=218,e[223]=711,e[224]=321,e[225]=322,e[226]=352,e[227]=353,e[228]=381,e[229]=382,e[233]=221,e[234]=253,e[252]=263,e[253]=268,e[254]=269,e[258]=258,e[260]=260,e[261]=261,e[265]=280,e[266]=281,e[267]=282,e[268]=283,e[269]=313,e[275]=323,e[276]=324,e[278]=328,e[283]=344,e[284]=345,e[285]=346,e[286]=347,e[292]=367,e[295]=377,e[296]=378,e[298]=380,e[305]=963,e[306]=964,e[307]=966,e[308]=8215,e[309]=8252,e[310]=8319,e[311]=8359,e[312]=8592,e[313]=8593,e[337]=9552,e[493]=1039,e[494]=1040,e[672]=1488,e[673]=1489,e[674]=1490,e[675]=1491,e[676]=1492,e[677]=1493,e[678]=1494,e[679]=1495,e[680]=1496,e[681]=1497,e[682]=1498,e[683]=1499,e[684]=1500,e[685]=1501,e[686]=1502,e[687]=1503,e[688]=1504,e[689]=1505,e[690]=1506,e[691]=1507,e[692]=1508,e[693]=1509,e[694]=1510,e[695]=1511,e[696]=1512,e[697]=1513,e[698]=1514,e[705]=1524,e[706]=8362,e[710]=64288,e[711]=64298,e[759]=1617,e[761]=1776,e[763]=1778,e[775]=1652,e[777]=1764,e[778]=1780,e[779]=1781,e[780]=1782,e[782]=771,e[783]=64726,e[786]=8363,e[788]=8532,e[790]=768,e[791]=769,e[792]=768,e[795]=803,e[797]=64336,e[798]=64337,e[799]=64342,e[800]=64343,e[801]=64344,e[802]=64345,e[803]=64362,e[804]=64363,e[805]=64364,e[2424]=7821,e[2425]=7822,e[2426]=7823,e[2427]=7824,e[2428]=7825,e[2429]=7826,e[2430]=7827,e[2433]=7682,e[2678]=8045,e[2679]=8046,e[2830]=1552,e[2838]=686,e[2840]=751,e[2842]=753,e[2843]=754,e[2844]=755,e[2846]=757,e[2856]=767,e[2857]=848,e[2858]=849,e[2862]=853,e[2863]=854,e[2864]=855,e[2865]=861,e[2866]=862,e[2906]=7460,e[2908]=7462,e[2909]=7463,e[2910]=7464,e[2912]=7466,e[2913]=7467,e[2914]=7468,e[2916]=7470,e[2917]=7471,e[2918]=7472,e[2920]=7474,e[2921]=7475,e[2922]=7476,e[2924]=7478,e[2925]=7479,e[2926]=7480,e[2928]=7482,e[2929]=7483,e[2930]=7484,e[2932]=7486,e[2933]=7487,e[2934]=7488,e[2936]=7490,e[2937]=7491,e[2938]=7492,e[2940]=7494,e[2941]=7495,e[2942]=7496,e[2944]=7498,e[2946]=7500,e[2948]=7502,e[2950]=7504,e[2951]=7505,e[2952]=7506,e[2954]=7508,e[2955]=7509,e[2956]=7510,e[2958]=7512,e[2959]=7513,e[2960]=7514,e[2962]=7516,e[2963]=7517,e[2964]=7518,e[2966]=7520,e[2967]=7521,e[2968]=7522,e[2970]=7524,e[2971]=7525,e[2972]=7526,e[2974]=7528,e[2975]=7529,e[2976]=7530,e[2978]=1537,e[2979]=1538,e[2980]=1539,e[2982]=1549,e[2983]=1551,e[2984]=1552,e[2986]=1554,e[2987]=1555,e[2988]=1556,e[2990]=1623,e[2991]=1624,e[2995]=1775,e[2999]=1791,e[3002]=64290,e[3003]=64291,e[3004]=64292,e[3006]=64294,e[3007]=64295,e[3008]=64296,e[3011]=1900,e[3014]=8223,e[3015]=8244,e[3017]=7532,e[3018]=7533,e[3019]=7534,e[3075]=7590,e[3076]=7591,e[3079]=7594,e[3080]=7595,e[3083]=7598,e[3084]=7599,e[3087]=7602,e[3088]=7603,e[3091]=7606,e[3092]=7607,e[3095]=7610,e[3096]=7611,e[3099]=7614,e[3100]=7615,e[3103]=7618,e[3104]=7619,e[3107]=8337,e[3108]=8338,e[3116]=1884,e[3119]=1885,e[3120]=1885,e[3123]=1886,e[3124]=1886,e[3127]=1887,e[3128]=1887,e[3131]=1888,e[3132]=1888,e[3135]=1889,e[3136]=1889,e[3139]=1890,e[3140]=1890,e[3143]=1891,e[3144]=1891,e[3147]=1892,e[3148]=1892,e[3153]=580,e[3154]=581,e[3157]=584,e[3158]=585,e[3161]=588,e[3162]=589,e[3165]=891,e[3166]=892,e[3169]=1274,e[3170]=1275,e[3173]=1278,e[3174]=1279,e[3181]=7622,e[3182]=7623,e[3282]=11799,e[3316]=578,e[3379]=42785,e[3393]=1159,e[3416]=8377})),wXe=pWe((function(e){e[227]=322,e[264]=261,e[291]=346})),QXe=pWe((function(e){e[1]=32,e[4]=65,e[5]=192,e[6]=193,e[9]=196,e[17]=66,e[18]=67,e[21]=268,e[24]=68,e[28]=69,e[29]=200,e[30]=201,e[32]=282,e[38]=70,e[39]=71,e[44]=72,e[47]=73,e[48]=204,e[49]=205,e[58]=74,e[60]=75,e[62]=76,e[68]=77,e[69]=78,e[75]=79,e[76]=210,e[80]=214,e[87]=80,e[89]=81,e[90]=82,e[92]=344,e[94]=83,e[97]=352,e[100]=84,e[104]=85,e[109]=220,e[115]=86,e[116]=87,e[121]=88,e[122]=89,e[124]=221,e[127]=90,e[129]=381,e[258]=97,e[259]=224,e[260]=225,e[263]=228,e[268]=261,e[271]=98,e[272]=99,e[273]=263,e[275]=269,e[282]=100,e[286]=101,e[287]=232,e[288]=233,e[290]=283,e[295]=281,e[296]=102,e[336]=103,e[346]=104,e[349]=105,e[350]=236,e[351]=237,e[361]=106,e[364]=107,e[367]=108,e[371]=322,e[373]=109,e[374]=110,e[381]=111,e[382]=242,e[383]=243,e[386]=246,e[393]=112,e[395]=113,e[396]=114,e[398]=345,e[400]=115,e[401]=347,e[403]=353,e[410]=116,e[437]=117,e[442]=252,e[448]=118,e[449]=119,e[454]=120,e[455]=121,e[457]=253,e[460]=122,e[462]=382,e[463]=380,e[853]=44,e[855]=58,e[856]=46,e[876]=47,e[878]=45,e[882]=45,e[894]=40,e[895]=41,e[896]=91,e[897]=93,e[923]=64,e[1004]=48,e[1005]=49,e[1006]=50,e[1007]=51,e[1008]=52,e[1009]=53,e[1010]=54,e[1011]=55,e[1012]=56,e[1013]=57,e[1081]=37,e[1085]=43,e[1086]=45}));function _Xe(e){const t=mXe(e);return IXe()[t]}function SXe(e){const t=mXe(e);return!!(IXe()[t]||BXe()[t]||yXe()[t]||bXe()[t])}class xXe{constructor(e=[]){this._map=e}get length(){return this._map.length}forEach(e){for(const t in this._map)e(t,this._map[t].charCodeAt(0))}has(e){return void 0!==this._map[e]}get(e){return this._map[e]}charCodeOf(e){const t=this._map;if(t.length<=65536)return t.indexOf(e);for(const i in t)if(t[i]===e)return 0|i;return-1}amend(e){for(const t in e)this._map[t]=e[t]}}class kXe{constructor(e,t){this.firstChar=e,this.lastChar=t}get length(){return this.lastChar+1-this.firstChar}forEach(e){for(let t=this.firstChar,i=this.lastChar;t<=i;t++)e(t,t)}has(e){return this.firstChar<=e&&e<=this.lastChar}get(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)}charCodeOf(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1}amend(e){gVe("Should not call amend()")}}class DXe{constructor(e,t){this.properties=t;const i=new Hze(e,t,AXe);this.cff=i.parse(),this.cff.duplicateFirstGlyph();const n=new eXe(this.cff);this.seacs=this.cff.seacs;try{this.data=n.compile()}catch{t.loadedName,this.data=e}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){const e=this.cff,t=this.properties,{cidToGidMap:i,cMap:n}=t,s=e.charset.charset;let r,a;if(t.composite){let t,o;if((null==i?void 0:i.length)>0){t=Object.create(null);for(let e=0,n=i.length;e<n;e++){const n=i[e];void 0!==n&&(t[n]=e)}}if(r=Object.create(null),e.isCIDFont)for(a=0;a<s.length;a++){const e=s[a];o=n.charCodeOf(e),void 0!==(null==t?void 0:t[o])&&(o=t[o]),r[o]=a}else for(a=0;a<e.charStrings.count;a++)o=n.charCodeOf(a),r[o]=a;return r}let o=e.encoding?e.encoding.encoding:null;return t.isInternalFont&&(o=t.defaultEncoding),r=fXe(t,o,s),r}hasGlyphId(e){return this.cff.hasGlyphId(e)}_createBuiltInEncoding(){const{charset:e,encoding:t}=this.cff;if(!e||!t)return;const i=e.charset,n=t.encoding,s=[];for(const r in n){const e=n[r];if(e>=0){const t=i[e];t&&(s[r]=t)}}s.length>0&&(this.properties.builtInEncoding=s)}}function FXe(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function TXe(e,t){return e[t]<<8|e[t+1]}function MXe(e,t){return(e[t]<<24|e[t+1]<<16)>>16}function RXe(e,t){return e[t]<<24>>24}function NXe(e,t){return MXe(e,t)/16384}function LXe(e){const t=e.length;let i=32768;return t<1240?i=107:t<33900&&(i=1131),i}function UXe(e,t,i){const n=1===TXe(e,t+2)?FXe(e,t+8):FXe(e,t+16),s=TXe(e,t+n);let r,a,o;if(4===s){TXe(e,t+n+2);const i=TXe(e,t+n+6)>>1;for(a=t+n+14,r=[],o=0;o<i;o++,a+=2)r[o]={end:TXe(e,a)};for(a+=2,o=0;o<i;o++,a+=2)r[o].start=TXe(e,a);for(o=0;o<i;o++,a+=2)r[o].idDelta=TXe(e,a);for(o=0;o<i;o++,a+=2){let t=TXe(e,a);if(0!==t){r[o].ids=[];for(let i=0,n=r[o].end-r[o].start+1;i<n;i++)r[o].ids[i]=TXe(e,a+t),t+=2}}return r}if(12===s){const i=FXe(e,t+n+12);for(a=t+n+16,r=[],o=0;o<i;o++)t=FXe(e,a),r.push({start:t,end:FXe(e,a+4),idDelta:FXe(e,a+8)-t}),a+=12;return r}throw new EVe(`unsupported cmap: ${s}`)}function HXe(e,t,i,n){var s,r,a;const o=new Hze(new XWe(e,t,i-t),{},n).parse();return{glyphs:o.charStrings.objects,subrs:null==(r=null==(s=o.topDict.privateDict)?void 0:s.subrsIndex)?void 0:r.objects,gsubrs:null==(a=o.globalSubrIndex)?void 0:a.objects,isCFFCIDFont:o.isCIDFont,fdSelect:o.fdSelect,fdArray:o.fdArray}}function PXe(e,t){const i=t.codePointAt(0);let n=0,s=0,r=e.length-1;for(;s<r;){const t=s+r+1>>1;i<e[t].start?r=t-1:s=t}return e[s].start<=i&&i<=e[s].end&&(n=e[s].idDelta+(e[s].ids?e[s].ids[i-e[s].start]:i)&65535),{charCode:i,glyphId:n}}function OXe(e,t,i){function n(e,i){t.add(KVe,[e,i])}function s(e,i,n,s){t.add(qVe,[e,i,n,s])}let r=0;const a=MXe(e,r);let o,l=0,A=0;if(r+=10,a<0)do{o=TXe(e,r);const n=TXe(e,r+2);let s,a;r+=4,1&o?(2&o?(s=MXe(e,r),a=MXe(e,r+2)):(s=TXe(e,r),a=TXe(e,r+2)),r+=4):2&o?(s=RXe(e,r++),a=RXe(e,r++)):(s=e[r++],a=e[r++]),2&o?(l=s,A=a):(l=0,A=0);let c=1,u=1,h=0,d=0;8&o?(c=u=NXe(e,r),r+=2):64&o?(c=NXe(e,r),u=NXe(e,r+2),r+=4):128&o&&(c=NXe(e,r),h=NXe(e,r+2),d=NXe(e,r+4),u=NXe(e,r+6),r+=8);const g=i.glyphs[n];g&&(t.add(VVe),t.add(jVe,[c,h,d,u,l,A]),OXe(g,t,i),t.add(YVe))}while(32&o);else{const i=[];let h,d;for(h=0;h<a;h++)i.push(TXe(e,r)),r+=2;r+=2+TXe(e,r);const g=i.at(-1)+1,p=[];for(;p.length<g;){o=e[r++];let t=1;for(8&o&&(t+=e[r++]);t-- >0;)p.push({flags:o})}for(h=0;h<g;h++){switch(18&p[h].flags){case 0:l+=MXe(e,r),r+=2;break;case 2:l-=e[r++];break;case 18:l+=e[r++]}p[h].x=l}for(h=0;h<g;h++){switch(36&p[h].flags){case 0:A+=MXe(e,r),r+=2;break;case 4:A-=e[r++];break;case 36:A+=e[r++]}p[h].y=A}let f=0;for(r=0;r<a;r++){const e=i[r],a=p.slice(f,e+1);if(1&a[0].flags)a.push(a[0]);else if(1&a.at(-1).flags)a.unshift(a.at(-1));else{const e={flags:1,x:(a[0].x+a.at(-1).x)/2,y:(a[0].y+a.at(-1).y)/2};a.unshift(e),a.push(e)}for(c=a[0].x,u=a[0].y,t.add(GVe,[c,u]),h=1,d=a.length;h<d;h++)1&a[h].flags?n(a[h].x,a[h].y):1&a[h+1].flags?(s(a[h].x,a[h].y,a[h+1].x,a[h+1].y),h++):s(a[h].x,a[h].y,(a[h].x+a[h+1].x)/2,(a[h].y+a[h+1].y)/2);f=e+1}}var c,u}function GXe(e,t,i,n){function s(e,i){t.add(GVe,[e,i])}function r(e,i){t.add(KVe,[e,i])}function a(e,i,n,s,r,a){t.add(OVe,[e,i,n,s,r,a])}const o=[];let l=0,A=0,c=0;!function e(u){var h;let d=0;for(;d<u.length;){let g,p,f,m,C,I,v,B,y,b=!1,E=u[d++];switch(E){case 1:case 3:case 18:case 23:c+=o.length>>1,b=!0;break;case 4:A+=o.pop(),s(l,A),b=!0;break;case 5:for(;o.length>0;)l+=o.shift(),A+=o.shift(),r(l,A);break;case 6:for(;o.length>0&&(l+=o.shift(),r(l,A),0!==o.length);)A+=o.shift(),r(l,A);break;case 7:for(;o.length>0&&(A+=o.shift(),r(l,A),0!==o.length);)l+=o.shift(),r(l,A);break;case 8:for(;o.length>0;)g=l+o.shift(),f=A+o.shift(),p=g+o.shift(),m=f+o.shift(),l=p+o.shift(),A=m+o.shift(),a(g,f,p,m,l,A);break;case 10:if(B=o.pop(),y=null,i.isCFFCIDFont){const e=i.fdSelect.getFDIndex(n);if(e>=0&&e<i.fdArray.length){const t=i.fdArray[e];let n;(null==(h=t.privateDict)?void 0:h.subrsIndex)&&(n=t.privateDict.subrsIndex.objects),n&&(B+=LXe(n),y=n[B])}}else y=i.subrs[B+i.subrsBias];y&&e(y);break;case 11:return;case 12:switch(E=u[d++],E){case 34:g=l+o.shift(),p=g+o.shift(),C=A+o.shift(),l=p+o.shift(),a(g,A,p,C,l,C),g=l+o.shift(),p=g+o.shift(),l=p+o.shift(),a(g,C,p,A,l,A);break;case 35:g=l+o.shift(),f=A+o.shift(),p=g+o.shift(),m=f+o.shift(),l=p+o.shift(),A=m+o.shift(),a(g,f,p,m,l,A),g=l+o.shift(),f=A+o.shift(),p=g+o.shift(),m=f+o.shift(),l=p+o.shift(),A=m+o.shift(),a(g,f,p,m,l,A),o.pop();break;case 36:g=l+o.shift(),C=A+o.shift(),p=g+o.shift(),I=C+o.shift(),l=p+o.shift(),a(g,C,p,I,l,I),g=l+o.shift(),p=g+o.shift(),v=I+o.shift(),l=p+o.shift(),a(g,I,p,v,l,A);break;case 37:const e=l,t=A;g=l+o.shift(),f=A+o.shift(),p=g+o.shift(),m=f+o.shift(),l=p+o.shift(),A=m+o.shift(),a(g,f,p,m,l,A),g=l+o.shift(),f=A+o.shift(),p=g+o.shift(),m=f+o.shift(),l=p,A=m,Math.abs(l-e)>Math.abs(A-t)?l+=o.shift():A+=o.shift(),a(g,f,p,m,l,A);break;default:throw new EVe(`unknown operator: 12 ${E}`)}break;case 14:if(o.length>=4){const e=o.pop(),n=o.pop();A=o.pop(),l=o.pop(),t.add(VVe),t.add(JVe,[l,A]);let s=PXe(i.cmap,String.fromCharCode(i.glyphNameMap[kze[e]]));GXe(i.glyphs[s.glyphId],t,i,s.glyphId),t.add(YVe),s=PXe(i.cmap,String.fromCharCode(i.glyphNameMap[kze[n]])),GXe(i.glyphs[s.glyphId],t,i,s.glyphId)}return;case 19:case 20:c+=o.length>>1,d+=c+7>>3,b=!0;break;case 21:A+=o.pop(),l+=o.pop(),s(l,A),b=!0;break;case 22:l+=o.pop(),s(l,A),b=!0;break;case 24:for(;o.length>2;)g=l+o.shift(),f=A+o.shift(),p=g+o.shift(),m=f+o.shift(),l=p+o.shift(),A=m+o.shift(),a(g,f,p,m,l,A);l+=o.shift(),A+=o.shift(),r(l,A);break;case 25:for(;o.length>6;)l+=o.shift(),A+=o.shift(),r(l,A);g=l+o.shift(),f=A+o.shift(),p=g+o.shift(),m=f+o.shift(),l=p+o.shift(),A=m+o.shift(),a(g,f,p,m,l,A);break;case 26:for(o.length%2&&(l+=o.shift());o.length>0;)g=l,f=A+o.shift(),p=g+o.shift(),m=f+o.shift(),l=p,A=m+o.shift(),a(g,f,p,m,l,A);break;case 27:for(o.length%2&&(A+=o.shift());o.length>0;)g=l+o.shift(),f=A,p=g+o.shift(),m=f+o.shift(),l=p+o.shift(),A=m,a(g,f,p,m,l,A);break;case 28:o.push((u[d]<<24|u[d+1]<<16)>>16),d+=2;break;case 29:B=o.pop()+i.gsubrsBias,y=i.gsubrs[B],y&&e(y);break;case 30:for(;o.length>0&&(g=l,f=A+o.shift(),p=g+o.shift(),m=f+o.shift(),l=p+o.shift(),A=m+(1===o.length?o.shift():0),a(g,f,p,m,l,A),0!==o.length);)g=l+o.shift(),f=A,p=g+o.shift(),m=f+o.shift(),A=m+o.shift(),l=p+(1===o.length?o.shift():0),a(g,f,p,m,l,A);break;case 31:for(;o.length>0&&(g=l+o.shift(),f=A,p=g+o.shift(),m=f+o.shift(),A=m+o.shift(),l=p+(1===o.length?o.shift():0),a(g,f,p,m,l,A),0!==o.length);)g=l,f=A+o.shift(),p=g+o.shift(),m=f+o.shift(),l=p+o.shift(),A=m+(1===o.length?o.shift():0),a(g,f,p,m,l,A);break;default:if(E<32)throw new EVe(`unknown operator: ${E}`);E<247?o.push(E-139):E<251?o.push(256*(E-247)+u[d++]+108):E<255?o.push(256*-(E-251)-u[d++]-108):(o.push((u[d]<<24|u[d+1]<<16|u[d+2]<<8|u[d+3])/65536),d+=4)}b&&(o.length=0)}}(e)}const KXe=[];class qXe{constructor(){Ic(this,"cmds",[])}add(e,t){if(t)if(xWe(t,null))this.cmds.push(e,...t);else{const i=t.map((e=>"number"==typeof e?e:0));this.cmds.push(e,...i)}else this.cmds.push(e)}}class YXe{constructor(e){this.fontMatrix=e,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}getPathJs(e){var t;const{charCode:i,glyphId:n}=PXe(this.cmap,e);let s,r=this.compiledGlyphs[n];if(!r){try{r=this.compileGlyph(this.glyphs[n],n)}catch(a){r=KXe,s=a}this.compiledGlyphs[n]=r}if((t=this.compiledCharCodeToGlyphId)[i]??(t[i]=n),s)throw s;return r}compileGlyph(e,t){if(!e||0===e.length||14===e[0])return KXe;let i=this.fontMatrix;if(this.isCFFCIDFont){const e=this.fdSelect.getFDIndex(t);if(e>=0&&e<this.fdArray.length){i=this.fdArray[e].getByName("FontMatrix")||uKe}}const n=new qXe;return n.add(VVe),n.add(jVe,i.slice()),n.add(WVe),this.compileGlyphImpl(e,n,t),n.add(YVe),n.cmds}compileGlyphImpl(){gVe("Children classes should implement this.")}hasBuiltPath(e){const{charCode:t,glyphId:i}=PXe(this.cmap,e);return void 0!==this.compiledGlyphs[i]&&void 0!==this.compiledCharCodeToGlyphId[t]}}class VXe extends YXe{constructor(e,t,i){super(i||[488e-6,0,0,488e-6,0,0]),this.glyphs=e,this.cmap=t}compileGlyphImpl(e,t){OXe(e,t,this)}}class WXe extends YXe{constructor(e,t,i,n){super(i||[.001,0,0,.001,0,0]),this.glyphs=e.glyphs,this.gsubrs=e.gsubrs||[],this.subrs=e.subrs||[],this.cmap=t,this.glyphNameMap=n||tXe(),this.gsubrsBias=LXe(this.gsubrs),this.subrsBias=LXe(this.subrs),this.isCFFCIDFont=e.isCFFCIDFont,this.fdSelect=e.fdSelect,this.fdArray=e.fdArray}compileGlyphImpl(e,t,i){GXe(e,t,this,i)}}class jXe{static create(e,t){const i=new Uint8Array(e.data);let n,s,r,a,o,l;const A=TXe(i,4);for(let c=0,u=12;c<A;c++,u+=16){const e=QVe(i.subarray(u,u+4)),A=FXe(i,u+8),c=FXe(i,u+12);switch(e){case"cmap":n=UXe(i,A);break;case"glyf":s=i.subarray(A,A+c);break;case"loca":r=i.subarray(A,A+c);break;case"head":l=TXe(i,A+18),o=TXe(i,A+50);break;case"CFF ":a=HXe(i,A,A+c,t)}}if(s){const t=l?[1/l,0,0,1/l,0,0]:e.fontMatrix;return new VXe(function(e,t,i){let n,s;i?(n=4,s=FXe):(n=2,s=(e,t)=>2*TXe(e,t));const r=[];let a=s(t,0);for(let o=n;o<t.length;o+=n){const i=s(t,o);r.push(e.subarray(a,i)),a=i}return r}(s,r,o),n,t)}return new WXe(a,n,e.fontMatrix,e.glyphNameMap)}}const JXe=pWe((function(e){e.Courier=600,e["Courier-Bold"]=600,e["Courier-BoldOblique"]=600,e["Courier-Oblique"]=600,e.Helvetica=pWe((function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-Bold"]=pWe((function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-BoldOblique"]=pWe((function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-Oblique"]=pWe((function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556})),e.Symbol=pWe((function(e){e.space=250,e.exclam=333,e.universal=713,e.numbersign=500,e.existential=549,e.percent=833,e.ampersand=778,e.suchthat=439,e.parenleft=333,e.parenright=333,e.asteriskmath=500,e.plus=549,e.comma=250,e.minus=549,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=549,e.equal=549,e.greater=549,e.question=444,e.congruent=549,e.Alpha=722,e.Beta=667,e.Chi=722,e.Delta=612,e.Epsilon=611,e.Phi=763,e.Gamma=603,e.Eta=722,e.Iota=333,e.theta1=631,e.Kappa=722,e.Lambda=686,e.Mu=889,e.Nu=722,e.Omicron=722,e.Pi=768,e.Theta=741,e.Rho=556,e.Sigma=592,e.Tau=611,e.Upsilon=690,e.sigma1=439,e.Omega=768,e.Xi=645,e.Psi=795,e.Zeta=611,e.bracketleft=333,e.therefore=863,e.bracketright=333,e.perpendicular=658,e.underscore=500,e.radicalex=500,e.alpha=631,e.beta=549,e.chi=549,e.delta=494,e.epsilon=439,e.phi=521,e.gamma=411,e.eta=603,e.iota=329,e.phi1=603,e.kappa=549,e.lambda=549,e.mu=576,e.nu=521,e.omicron=549,e.pi=549,e.theta=521,e.rho=549,e.sigma=603,e.tau=439,e.upsilon=576,e.omega1=713,e.omega=686,e.xi=493,e.psi=686,e.zeta=494,e.braceleft=480,e.bar=200,e.braceright=480,e.similar=549,e.Euro=750,e.Upsilon1=620,e.minute=247,e.lessequal=549,e.fraction=167,e.infinity=713,e.florin=500,e.club=753,e.diamond=753,e.heart=753,e.spade=753,e.arrowboth=1042,e.arrowleft=987,e.arrowup=603,e.arrowright=987,e.arrowdown=603,e.degree=400,e.plusminus=549,e.second=411,e.greaterequal=549,e.multiply=549,e.proportional=713,e.partialdiff=494,e.bullet=460,e.divide=549,e.notequal=549,e.equivalence=549,e.approxequal=549,e.ellipsis=1e3,e.arrowvertex=603,e.arrowhorizex=1e3,e.carriagereturn=658,e.aleph=823,e.Ifraktur=686,e.Rfraktur=795,e.weierstrass=987,e.circlemultiply=768,e.circleplus=768,e.emptyset=823,e.intersection=768,e.union=768,e.propersuperset=713,e.reflexsuperset=713,e.notsubset=713,e.propersubset=713,e.reflexsubset=713,e.element=713,e.notelement=713,e.angle=768,e.gradient=713,e.registerserif=790,e.copyrightserif=790,e.trademarkserif=890,e.product=823,e.radical=549,e.dotmath=250,e.logicalnot=713,e.logicaland=603,e.logicalor=603,e.arrowdblboth=1042,e.arrowdblleft=987,e.arrowdblup=603,e.arrowdblright=987,e.arrowdbldown=603,e.lozenge=494,e.angleleft=329,e.registersans=790,e.copyrightsans=790,e.trademarksans=786,e.summation=713,e.parenlefttp=384,e.parenleftex=384,e.parenleftbt=384,e.bracketlefttp=384,e.bracketleftex=384,e.bracketleftbt=384,e.bracelefttp=494,e.braceleftmid=494,e.braceleftbt=494,e.braceex=494,e.angleright=329,e.integral=274,e.integraltp=686,e.integralex=686,e.integralbt=686,e.parenrighttp=384,e.parenrightex=384,e.parenrightbt=384,e.bracketrighttp=384,e.bracketrightex=384,e.bracketrightbt=384,e.bracerighttp=494,e.bracerightmid=494,e.bracerightbt=494,e.apple=790})),e["Times-Roman"]=pWe((function(e){e.space=250,e.exclam=333,e.quotedbl=408,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=564,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=564,e.equal=564,e.greater=564,e.question=444,e.at=921,e.A=722,e.B=667,e.C=667,e.D=722,e.E=611,e.F=556,e.G=722,e.H=722,e.I=333,e.J=389,e.K=722,e.L=611,e.M=889,e.N=722,e.O=722,e.P=556,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=722,e.W=944,e.X=722,e.Y=722,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=469,e.underscore=500,e.quoteleft=333,e.a=444,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=500,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=500,e.o=500,e.p=500,e.q=500,e.r=333,e.s=389,e.t=278,e.u=500,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=480,e.bar=200,e.braceright=480,e.asciitilde=541,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=180,e.quotedblleft=444,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=453,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=444,e.quotedblright=444,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=444,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=889,e.ordfeminine=276,e.Lslash=611,e.Oslash=722,e.OE=889,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=444,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=722,e.divide=564,e.Yacute=722,e.Acircumflex=722,e.aacute=444,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=444,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=444,e.Ncommaaccent=722,e.lacute=278,e.agrave=444,e.Tcommaaccent=611,e.Cacute=667,e.atilde=444,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=444,e.Amacron=722,e.rcaron=333,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=556,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=588,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=722,e.Abreve=722,e.multiply=564,e.uacute=500,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=444,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=722,e.Iacute=333,e.plusminus=564,e.brokenbar=200,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=333,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=326,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=444,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=344,e.Kcommaaccent=722,e.Lacute=611,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=722,e.zdotaccent=444,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=500,e.minus=564,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=564,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-Bold"]=pWe((function(e){e.space=250,e.exclam=333,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=1e3,e.ampersand=833,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=930,e.A=722,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=778,e.I=389,e.J=500,e.K=778,e.L=667,e.M=944,e.N=722,e.O=778,e.P=611,e.Q=778,e.R=722,e.S=556,e.T=667,e.U=722,e.V=722,e.W=1e3,e.X=722,e.Y=722,e.Z=667,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=581,e.underscore=500,e.quoteleft=333,e.a=500,e.b=556,e.c=444,e.d=556,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=333,e.k=556,e.l=278,e.m=833,e.n=556,e.o=500,e.p=556,e.q=556,e.r=444,e.s=389,e.t=333,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=394,e.bar=220,e.braceright=394,e.asciitilde=520,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=540,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=300,e.Lslash=667,e.Oslash=778,e.OE=1e3,e.ordmasculine=330,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=556,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=722,e.divide=570,e.Yacute=722,e.Acircumflex=722,e.aacute=500,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=667,e.Cacute=722,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=500,e.Amacron=722,e.rcaron=444,e.ccedilla=444,e.Zdotaccent=667,e.Thorn=611,e.Omacron=778,e.Racute=722,e.Sacute=556,e.dcaron=672,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=570,e.uacute=556,e.Tcaron=667,e.partialdiff=494,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=778,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=444,e.omacron=500,e.Zacute=667,e.Zcaron=667,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=416,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=778,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=300,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=556,e.threequarters=750,e.Scedilla=556,e.lcaron=394,e.Kcommaaccent=778,e.Lacute=667,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=667,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=778,e.degree=400,e.ograve=500,e.Ccaron=722,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=444,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=722,e.Lcommaaccent=667,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=444,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=556,e.minus=570,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=333,e.logicalnot=570,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-BoldItalic"]=pWe((function(e){e.space=250,e.exclam=389,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=832,e.A=667,e.B=667,e.C=667,e.D=722,e.E=667,e.F=667,e.G=722,e.H=778,e.I=389,e.J=500,e.K=667,e.L=611,e.M=889,e.N=722,e.O=722,e.P=611,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=667,e.W=889,e.X=667,e.Y=611,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=570,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=556,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=556,e.v=444,e.w=667,e.x=500,e.y=444,e.z=389,e.braceleft=348,e.bar=220,e.braceright=348,e.asciitilde=570,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=500,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=944,e.ordfeminine=266,e.Lslash=611,e.Oslash=722,e.OE=944,e.ordmasculine=300,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=611,e.divide=570,e.Yacute=611,e.Acircumflex=667,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=611,e.Cacute=667,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=556,e.acircumflex=500,e.Amacron=667,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=611,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=608,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=722,e.Agrave=667,e.Abreve=667,e.multiply=570,e.uacute=556,e.Tcaron=611,e.partialdiff=494,e.ydieresis=444,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=722,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=366,e.eogonek=444,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=576,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=382,e.Kcommaaccent=667,e.Lacute=611,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=722,e.zdotaccent=389,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=500,e.minus=606,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=606,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-Italic"]=pWe((function(e){e.space=250,e.exclam=333,e.quotedbl=420,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=675,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=675,e.equal=675,e.greater=675,e.question=500,e.at=920,e.A=611,e.B=611,e.C=667,e.D=722,e.E=611,e.F=611,e.G=722,e.H=722,e.I=333,e.J=444,e.K=667,e.L=556,e.M=833,e.N=667,e.O=722,e.P=611,e.Q=722,e.R=611,e.S=500,e.T=556,e.U=722,e.V=611,e.W=833,e.X=611,e.Y=556,e.Z=556,e.bracketleft=389,e.backslash=278,e.bracketright=389,e.asciicircum=422,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=278,e.g=500,e.h=500,e.i=278,e.j=278,e.k=444,e.l=278,e.m=722,e.n=500,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=500,e.v=444,e.w=667,e.x=444,e.y=444,e.z=389,e.braceleft=400,e.bar=275,e.braceright=400,e.asciitilde=541,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=214,e.quotedblleft=556,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=523,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=556,e.quotedblright=556,e.guillemotright=500,e.ellipsis=889,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=889,e.AE=889,e.ordfeminine=276,e.Lslash=556,e.Oslash=722,e.OE=944,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=667,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=500,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=556,e.divide=675,e.Yacute=556,e.Acircumflex=611,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=500,e.Ncommaaccent=667,e.lacute=278,e.agrave=500,e.Tcommaaccent=556,e.Cacute=667,e.atilde=500,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=611,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=500,e.Amacron=611,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=556,e.Thorn=611,e.Omacron=722,e.Racute=611,e.Sacute=500,e.dcaron=544,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=611,e.Abreve=611,e.multiply=675,e.uacute=500,e.Tcaron=556,e.partialdiff=476,e.ydieresis=444,e.Nacute=667,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=667,e.Iacute=333,e.plusminus=675,e.brokenbar=275,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=389,e.omacron=500,e.Zacute=556,e.Zcaron=556,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=300,e.eogonek=444,e.Uogonek=722,e.Aacute=611,e.Adieresis=611,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=500,e.lcaron=300,e.Kcommaaccent=667,e.Lacute=556,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=500,e.Scommaaccent=500,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=667,e.otilde=500,e.Rcommaaccent=611,e.Lcommaaccent=556,e.Atilde=611,e.Aogonek=611,e.Aring=611,e.Otilde=722,e.zdotaccent=389,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=444,e.minus=675,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=675,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500})),e.ZapfDingbats=pWe((function(e){e.space=278,e.a1=974,e.a2=961,e.a202=974,e.a3=980,e.a4=719,e.a5=789,e.a119=790,e.a118=791,e.a117=690,e.a11=960,e.a12=939,e.a13=549,e.a14=855,e.a15=911,e.a16=933,e.a105=911,e.a17=945,e.a18=974,e.a19=755,e.a20=846,e.a21=762,e.a22=761,e.a23=571,e.a24=677,e.a25=763,e.a26=760,e.a27=759,e.a28=754,e.a6=494,e.a7=552,e.a8=537,e.a9=577,e.a10=692,e.a29=786,e.a30=788,e.a31=788,e.a32=790,e.a33=793,e.a34=794,e.a35=816,e.a36=823,e.a37=789,e.a38=841,e.a39=823,e.a40=833,e.a41=816,e.a42=831,e.a43=923,e.a44=744,e.a45=723,e.a46=749,e.a47=790,e.a48=792,e.a49=695,e.a50=776,e.a51=768,e.a52=792,e.a53=759,e.a54=707,e.a55=708,e.a56=682,e.a57=701,e.a58=826,e.a59=815,e.a60=789,e.a61=789,e.a62=707,e.a63=687,e.a64=696,e.a65=689,e.a66=786,e.a67=787,e.a68=713,e.a69=791,e.a70=785,e.a71=791,e.a72=873,e.a73=761,e.a74=762,e.a203=762,e.a75=759,e.a204=759,e.a76=892,e.a77=892,e.a78=788,e.a79=784,e.a81=438,e.a82=138,e.a83=277,e.a84=415,e.a97=392,e.a98=392,e.a99=668,e.a100=668,e.a89=390,e.a90=390,e.a93=317,e.a94=317,e.a91=276,e.a92=276,e.a205=509,e.a85=509,e.a206=410,e.a86=410,e.a87=234,e.a88=234,e.a95=334,e.a96=334,e.a101=732,e.a102=544,e.a103=544,e.a104=910,e.a106=667,e.a107=760,e.a108=760,e.a112=776,e.a111=595,e.a110=694,e.a109=626,e.a120=788,e.a121=788,e.a122=788,e.a123=788,e.a124=788,e.a125=788,e.a126=788,e.a127=788,e.a128=788,e.a129=788,e.a130=788,e.a131=788,e.a132=788,e.a133=788,e.a134=788,e.a135=788,e.a136=788,e.a137=788,e.a138=788,e.a139=788,e.a140=788,e.a141=788,e.a142=788,e.a143=788,e.a144=788,e.a145=788,e.a146=788,e.a147=788,e.a148=788,e.a149=788,e.a150=788,e.a151=788,e.a152=788,e.a153=788,e.a154=788,e.a155=788,e.a156=788,e.a157=788,e.a158=788,e.a159=788,e.a160=894,e.a161=838,e.a163=1016,e.a164=458,e.a196=748,e.a165=924,e.a192=748,e.a166=918,e.a167=927,e.a168=928,e.a169=928,e.a170=834,e.a171=873,e.a172=828,e.a173=924,e.a162=924,e.a174=917,e.a175=930,e.a176=931,e.a177=463,e.a178=883,e.a179=836,e.a193=836,e.a180=867,e.a199=867,e.a181=696,e.a200=696,e.a182=874,e.a201=874,e.a183=760,e.a184=946,e.a197=771,e.a185=865,e.a194=771,e.a198=888,e.a186=967,e.a195=888,e.a187=831,e.a188=873,e.a189=927,e.a190=970,e.a191=918}))})),zXe=pWe((function(e){e.Courier={ascent:629,descent:-157,capHeight:562,xHeight:-426},e["Courier-Bold"]={ascent:629,descent:-157,capHeight:562,xHeight:439},e["Courier-Oblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},e["Courier-BoldOblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},e.Helvetica={ascent:718,descent:-207,capHeight:718,xHeight:523},e["Helvetica-Bold"]={ascent:718,descent:-207,capHeight:718,xHeight:532},e["Helvetica-Oblique"]={ascent:718,descent:-207,capHeight:718,xHeight:523},e["Helvetica-BoldOblique"]={ascent:718,descent:-207,capHeight:718,xHeight:532},e["Times-Roman"]={ascent:683,descent:-217,capHeight:662,xHeight:450},e["Times-Bold"]={ascent:683,descent:-217,capHeight:676,xHeight:461},e["Times-Italic"]={ascent:683,descent:-217,capHeight:653,xHeight:441},e["Times-BoldItalic"]={ascent:683,descent:-217,capHeight:669,xHeight:462},e.Symbol={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN},e.ZapfDingbats={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN}}));class XXe{constructor({glyfTable:e,isGlyphLocationsLong:t,locaTable:i,numGlyphs:n}){this.glyphs=[];const s=new DataView(i.buffer,i.byteOffset,i.byteLength),r=new DataView(e.buffer,e.byteOffset,e.byteLength),a=t?4:2;let o=t?s.getUint32(0):2*s.getUint16(0),l=0;for(let A=0;A<n;A++){l+=a;const e=t?s.getUint32(l):2*s.getUint16(l);if(e===o){this.glyphs.push(new $Xe({}));continue}const i=$Xe.parse(o,r);this.glyphs.push(i),o=e}}getSize(){return this.glyphs.reduce(((e,t)=>e+(t.getSize()+3&-4)),0)}write(){const e=this.getSize(),t=new DataView(new ArrayBuffer(e)),i=e>131070,n=i?4:2,s=new DataView(new ArrayBuffer((this.glyphs.length+1)*n));i?s.setUint32(0,0):s.setUint16(0,0);let r=0,a=0;for(const o of this.glyphs)r+=o.write(r,t),r=r+3&-4,a+=n,i?s.setUint32(a,r):s.setUint16(a,r>>1);return{isLocationLong:i,loca:new Uint8Array(s.buffer),glyf:new Uint8Array(t.buffer)}}scale(e){for(let t=0,i=this.glyphs.length;t<i;t++)this.glyphs[t].scale(e[t])}}class $Xe{constructor({header:e=null,simple:t=null,composites:i=null}){this.header=e,this.simple=t,this.composites=i}static parse(e,t){const[i,n]=ZXe.parse(e,t);if(e+=i,n.numberOfContours<0){const i=[];for(;;){const[n,s]=i$e.parse(e,t);if(e+=n,i.push(s),!(32&s.flags))break}return new $Xe({header:n,composites:i})}const s=t$e.parse(e,t,n.numberOfContours);return new $Xe({header:n,simple:s})}getSize(){if(!this.header)return 0;const e=this.simple?this.simple.getSize():this.composites.reduce(((e,t)=>e+t.getSize()),0);return this.header.getSize()+e}write(e,t){if(!this.header)return 0;const i=e;if(e+=this.header.write(e,t),this.simple)e+=this.simple.write(e,t);else for(const n of this.composites)e+=n.write(e,t);return e-i}scale(e){if(!this.header)return;const t=(this.header.xMin+this.header.xMax)/2;if(this.header.scale(t,e),this.simple)this.simple.scale(t,e);else for(const i of this.composites)i.scale(t,e)}}class ZXe{constructor({numberOfContours:e,xMin:t,yMin:i,xMax:n,yMax:s}){this.numberOfContours=e,this.xMin=t,this.yMin=i,this.xMax=n,this.yMax=s}static parse(e,t){return[10,new ZXe({numberOfContours:t.getInt16(e),xMin:t.getInt16(e+2),yMin:t.getInt16(e+4),xMax:t.getInt16(e+6),yMax:t.getInt16(e+8)})]}getSize(){return 10}write(e,t){return t.setInt16(e,this.numberOfContours),t.setInt16(e+2,this.xMin),t.setInt16(e+4,this.yMin),t.setInt16(e+6,this.xMax),t.setInt16(e+8,this.yMax),10}scale(e,t){this.xMin=Math.round(e+(this.xMin-e)*t),this.xMax=Math.round(e+(this.xMax-e)*t)}}class e$e{constructor({flags:e,xCoordinates:t,yCoordinates:i}){this.xCoordinates=t,this.yCoordinates=i,this.flags=e}}class t$e{constructor({contours:e,instructions:t}){this.contours=e,this.instructions=t}static parse(e,t,i){const n=[];for(let p=0;p<i;p++){const i=t.getUint16(e);e+=2,n.push(i)}const s=n[i-1]+1,r=t.getUint16(e);e+=2;const a=new Uint8Array(t).slice(e,e+r);e+=r;const o=[];for(let p=0;p<s;e++,p++){let i=t.getUint8(e);if(o.push(i),8&i){const n=t.getUint8(++e);i^=8;for(let e=0;e<n;e++)o.push(i);p+=n}}const l=[];let A=[],c=[],u=[];const h=[];let d=0,g=0;for(let p=0;p<s;p++){const i=o[p];if(2&i){const n=t.getUint8(e++);g+=16&i?n:-n,A.push(g)}else 16&i||(g+=t.getInt16(e),e+=2),A.push(g);n[d]===p&&(d++,l.push(A),A=[])}g=0,d=0;for(let p=0;p<s;p++){const i=o[p];if(4&i){const n=t.getUint8(e++);g+=32&i?n:-n,c.push(g)}else 32&i||(g+=t.getInt16(e),e+=2),c.push(g);u.push(1&i|64&i),n[d]===p&&(A=l[d],d++,h.push(new e$e({flags:u,xCoordinates:A,yCoordinates:c})),c=[],u=[])}return new t$e({contours:h,instructions:a})}getSize(){let e=2*this.contours.length+2+this.instructions.length,t=0,i=0;for(const n of this.contours){e+=n.flags.length;for(let s=0,r=n.xCoordinates.length;s<r;s++){const r=n.xCoordinates[s],a=n.yCoordinates[s];let o=Math.abs(r-t);o>255?e+=2:o>0&&(e+=1),t=r,o=Math.abs(a-i),o>255?e+=2:o>0&&(e+=1),i=a}}return e}write(e,t){const i=e,n=[],s=[],r=[];let a=0,o=0;for(const l of this.contours){for(let e=0,t=l.xCoordinates.length;e<t;e++){let t=l.flags[e];const i=l.xCoordinates[e];let A=i-a;if(0===A)t|=16,n.push(0);else{const e=Math.abs(A);e<=255?(t|=A>=0?18:2,n.push(e)):n.push(A)}a=i;const c=l.yCoordinates[e];if(A=c-o,0===A)t|=32,s.push(0);else{const e=Math.abs(A);e<=255?(t|=A>=0?36:4,s.push(e)):s.push(A)}o=c,r.push(t)}t.setUint16(e,n.length-1),e+=2}t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length);for(const l of r)t.setUint8(e++,l);for(let l=0,A=n.length;l<A;l++){const i=n[l],s=r[l];2&s?t.setUint8(e++,i):16&s||(t.setInt16(e,i),e+=2)}for(let l=0,A=s.length;l<A;l++){const i=s[l],n=r[l];4&n?t.setUint8(e++,i):32&n||(t.setInt16(e,i),e+=2)}return e-i}scale(e,t){for(const i of this.contours)if(0!==i.xCoordinates.length)for(let n=0,s=i.xCoordinates.length;n<s;n++)i.xCoordinates[n]=Math.round(e+(i.xCoordinates[n]-e)*t)}}class i$e{constructor({flags:e,glyphIndex:t,argument1:i,argument2:n,transf:s,instructions:r}){this.flags=e,this.glyphIndex=t,this.argument1=i,this.argument2=n,this.transf=s,this.instructions=r}static parse(e,t){const i=e,n=[];let s=t.getUint16(e);const r=t.getUint16(e+2);let a,o;e+=4,1&s?(2&s?(a=t.getInt16(e),o=t.getInt16(e+2)):(a=t.getUint16(e),o=t.getUint16(e+2)),e+=4,s^=1):(2&s?(a=t.getInt8(e),o=t.getInt8(e+1)):(a=t.getUint8(e),o=t.getUint8(e+1)),e+=2),8&s?(n.push(t.getUint16(e)),e+=2):64&s?(n.push(t.getUint16(e),t.getUint16(e+2)),e+=4):128&s&&(n.push(t.getUint16(e),t.getUint16(e+2),t.getUint16(e+4),t.getUint16(e+6)),e+=8);let l=null;if(256&s){const i=t.getUint16(e);e+=2,l=new Uint8Array(t).slice(e,e+i),e+=i}return[e-i,new i$e({flags:s,glyphIndex:r,argument1:a,argument2:o,transf:n,instructions:l})]}getSize(){let e=4+2*this.transf.length;return 256&this.flags&&(e+=2+this.instructions.length),e+=2,2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(e+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(e+=2),e}write(e,t){const i=e;return 2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=1),t.setUint16(e,this.flags),t.setUint16(e+2,this.glyphIndex),e+=4,1&this.flags?(2&this.flags?(t.setInt16(e,this.argument1),t.setInt16(e+2,this.argument2)):(t.setUint16(e,this.argument1),t.setUint16(e+2,this.argument2)),e+=4):(t.setUint8(e,this.argument1),t.setUint8(e+1,this.argument2),e+=2),256&this.flags&&(t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length)),e-i}scale(e,t){}}function n$e(e,t,i){e[t]=i>>8&255,e[t+1]=255&i}function s$e(e,t,i){e[t]=i>>24&255,e[t+1]=i>>16&255,e[t+2]=i>>8&255,e[t+3]=255&i}function r$e(e,t,i){if(i instanceof Uint8Array)e.set(i,t);else if("string"==typeof i)for(let n=0,s=i.length;n<s;n++)e[t++]=255&i.charCodeAt(n);else for(const n of i)e[t++]=255&n}class a$e{constructor(e){this.sfnt=e,this.tables=Object.create(null)}static getSearchParams(e,t){let i=1,n=0;for(;(i^e)>i;)i<<=1,n++;const s=i*t;return{range:s,entry:n,rangeShift:t*e-s}}toArray(){let e=this.sfnt;const t=this.tables,i=Object.keys(t);i.sort();const n=i.length;let s,r,a,o,l,A=12+16*n;const c=[A];for(s=0;s<n;s++){o=t[i[s]];A+=(o.length+3&-4)>>>0,c.push(A)}const u=new Uint8Array(A);for(s=0;s<n;s++)o=t[i[s]],r$e(u,c[s],o);"true"===e&&(e=SVe(65536)),u[0]=255&e.charCodeAt(0),u[1]=255&e.charCodeAt(1),u[2]=255&e.charCodeAt(2),u[3]=255&e.charCodeAt(3),n$e(u,4,n);const h=a$e.getSearchParams(n,16);for(n$e(u,6,h.range),n$e(u,8,h.entry),n$e(u,10,h.rangeShift),A=12,s=0;s<n;s++){l=i[s],u[A]=255&l.charCodeAt(0),u[A+1]=255&l.charCodeAt(1),u[A+2]=255&l.charCodeAt(2),u[A+3]=255&l.charCodeAt(3);let e=0;for(r=c[s],a=c[s+1];r<a;r+=4){e=e+_We(u,r)>>>0}s$e(u,A+4,e),s$e(u,A+8,c[s]),s$e(u,A+12,t[l].length),A+=16}return u}addTable(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}}const o$e=[4],l$e=[5],A$e=[6],c$e=[7],u$e=[8],h$e=[12,35],d$e=[14],g$e=[21],p$e=[22],f$e=[30],m$e=[31];class C$e{constructor(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}convert(e,t,i){const n=e.length;let s,r,a,o=!1;for(let l=0;l<n;l++){let n=e[l];if(n<32){switch(12===n&&(n=(n<<8)+e[++l]),n){case 1:case 3:case 9:case 3072:case 3073:case 3074:case 3105:this.stack=[];break;case 4:if(this.flexing){if(this.stack.length<1){o=!0;break}const e=this.stack.pop();this.stack.push(0,e);break}o=this.executeCommand(1,o$e);break;case 5:o=this.executeCommand(2,l$e);break;case 6:o=this.executeCommand(1,A$e);break;case 7:o=this.executeCommand(1,c$e);break;case 8:o=this.executeCommand(6,u$e);break;case 10:if(this.stack.length<1){o=!0;break}if(a=this.stack.pop(),!t[a]){o=!0;break}o=this.convert(t[a],t,i);break;case 11:return o;case 13:if(this.stack.length<2){o=!0;break}s=this.stack.pop(),r=this.stack.pop(),this.lsb=r,this.width=s,this.stack.push(s,r),o=this.executeCommand(2,p$e);break;case 14:this.output.push(d$e[0]);break;case 21:if(this.flexing)break;o=this.executeCommand(2,g$e);break;case 22:if(this.flexing){this.stack.push(0);break}o=this.executeCommand(1,p$e);break;case 30:o=this.executeCommand(4,f$e);break;case 31:o=this.executeCommand(4,m$e);break;case 3078:if(i){const e=this.stack.at(-5);this.seac=this.stack.splice(-4,4),this.seac[0]+=this.lsb-e,o=this.executeCommand(0,d$e)}else o=this.executeCommand(4,d$e);break;case 3079:if(this.stack.length<4){o=!0;break}this.stack.pop(),s=this.stack.pop();const e=this.stack.pop();r=this.stack.pop(),this.lsb=r,this.width=s,this.stack.push(s,r,e),o=this.executeCommand(3,g$e);break;case 3084:if(this.stack.length<2){o=!0;break}const n=this.stack.pop(),l=this.stack.pop();this.stack.push(l/n);break;case 3088:if(this.stack.length<2){o=!0;break}a=this.stack.pop();const A=this.stack.pop();if(0===a&&3===A){const e=this.stack.splice(-17,17);this.stack.push(e[2]+e[0],e[3]+e[1],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14]),o=this.executeCommand(13,h$e,!0),this.flexing=!1,this.stack.push(e[15],e[16])}else 1===a&&0===A&&(this.flexing=!0)}if(o)break}else n<=246?n-=139:n=n<=250?256*(n-247)+e[++l]+108:n<=254?-256*(n-251)-e[++l]-108:(255&e[++l])<<24|(255&e[++l])<<16|(255&e[++l])<<8|255&e[++l],this.stack.push(n)}return o}executeCommand(e,t,i){const n=this.stack.length;if(e>n)return!0;const s=n-e;for(let r=s;r<n;r++){let e=this.stack[r];Number.isInteger(e)?this.output.push(28,e>>8&255,255&e):(e=65536*e|0,this.output.push(255,e>>24&255,e>>16&255,e>>8&255,255&e))}return this.output.push(...t),i?this.stack.splice(s,e):this.stack.length=0,!1}}function I$e(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function v$e(e,t,i){if(i>=e.length)return new Uint8Array(0);let n,s,r=0|t;for(n=0;n<i;n++)r=52845*(e[n]+r)+22719&65535;const a=e.length-i,o=new Uint8Array(a);for(n=i,s=0;s<a;n++,s++){const t=e[n];o[s]=t^r>>8,r=52845*(t+r)+22719&65535}return o}function B$e(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}class y$e{constructor(e,t,i){if(t){const t=e.getBytes(),i=!((I$e(t[0])||SWe(t[0]))&&I$e(t[1])&&I$e(t[2])&&I$e(t[3])&&I$e(t[4])&&I$e(t[5])&&I$e(t[6])&&I$e(t[7]));e=new XWe(i?v$e(t,55665,4):function(e,t,i){let n=0|t;const s=e.length,r=new Uint8Array(s>>>1);let a,o;for(a=0,o=0;a<s;a++){const t=e[a];if(!I$e(t))continue;let i;for(a++;a<s&&!I$e(i=e[a]);)a++;if(a<s){const e=parseInt(String.fromCharCode(t,i),16);r[o++]=e^n>>8,n=52845*(e+n)+22719&65535}}return r.slice(i,o)}(t,55665,4))}this.seacAnalysisEnabled=!!i,this.stream=e,this.nextChar()}readNumberArray(){this.getToken();const e=[];for(;;){const t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e}readNumber(){const e=this.getToken();return parseFloat(e||0)}readInt(){const e=this.getToken();return 0|parseInt(e||0,10)}readBoolean(){return"true"===this.getToken()?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){return this.stream.skip(-2),this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!SWe(t))break;t=this.nextChar()}if(B$e(t))return this.nextChar(),String.fromCharCode(t);let i="";do{i+=String.fromCharCode(t),t=this.nextChar()}while(t>=0&&!SWe(t)&&!B$e(t));return i}readCharStrings(e,t){return-1===t?e:v$e(e,4330,t)}extractFontProgram(e){const t=this.stream,i=[],n=[],s=Object.create(null);s.lenIV=4;const r={subrs:[],charstrings:[],properties:{privateData:s}};let a,o,l,A;for(;null!==(a=this.getToken());)if("/"===a)switch(a=this.getToken(),a){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();a=this.getToken(),null!==a&&"end"!==a;){if("/"!==a)continue;const e=this.getToken();o=this.readInt(),this.getToken(),l=o>0?t.getBytes(o):new Uint8Array(0),A=r.properties.privateData.lenIV;const i=this.readCharStrings(l,A);this.nextChar(),a=this.getToken(),"noaccess"===a?this.getToken():"/"===a&&this.prevChar(),n.push({glyph:e,encoded:i})}break;case"Subrs":for(this.readInt(),this.getToken();"dup"===this.getToken();){const e=this.readInt();o=this.readInt(),this.getToken(),l=o>0?t.getBytes(o):new Uint8Array(0),A=r.properties.privateData.lenIV;const n=this.readCharStrings(l,A);this.nextChar(),a=this.getToken(),"noaccess"===a&&this.getToken(),i[e]=n}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":const e=this.readNumberArray();e.length>0&&e.length,0;break;case"StemSnapH":case"StemSnapV":r.properties.privateData[a]=this.readNumberArray();break;case"StdHW":case"StdVW":r.properties.privateData[a]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":r.properties.privateData[a]=this.readNumber();break;case"ExpansionFactor":r.properties.privateData[a]=this.readNumber()||.06;break;case"ForceBold":r.properties.privateData[a]=this.readBoolean()}for(const{encoded:c,glyph:u}of n){const t=new C$e,n=t.convert(c,i,this.seacAnalysisEnabled);let s=t.output;n&&(s=[14]);const a={glyphName:u,charstring:s,width:t.width,lsb:t.lsb,seac:t.seac};if(".notdef"===u?r.charstrings.unshift(a):r.charstrings.push(a),e.builtInEncoding){const i=e.builtInEncoding.indexOf(u);i>-1&&void 0===e.widths[i]&&i>=e.firstChar&&i<=e.lastChar&&(e.widths[i]=t.width)}}return r}extractFontHeader(e){let t;for(;null!==(t=this.getToken());)if("/"===t)switch(t=this.getToken(),t){case"FontMatrix":const i=this.readNumberArray();e.fontMatrix=i;break;case"Encoding":const n=this.getToken();let s;if(/^\d+$/.test(n)){s=[];const e=0|parseInt(n,10);this.getToken();for(let i=0;i<e;i++){for(t=this.getToken();"dup"!==t&&"def"!==t;)if(t=this.getToken(),null===t)return;if("def"===t)break;const e=this.readInt();this.getToken();const i=this.getToken();s[e]=i,this.getToken()}}else s=Mze(n);e.builtInEncoding=s;break;case"FontBBox":const r=this.readNumberArray();e.ascent=Math.max(r[3],r[1]),e.descent=Math.min(r[1],r[3]),e.ascentScaled=!0}}}function b$e(e,t,i){const n=e.length,s=t.length,r=n-s;let a=i,o=!1;for(;a<r;){let i=0;for(;i<s&&e[a+i]===t[i];)i++;if(i>=s){for(a+=i;a<n&&SWe(e[a]);)a++;o=!0;break}a++}return{found:o,length:a}}class E$e{constructor(e,t,i){let n=i.length1;i.length2;let s=t.peekBytes(6);const r=128===s[0]&&1===s[1];r&&(t.skip(6),n=s[5]<<24|s[4]<<16|s[3]<<8|s[2]);const a=function(e,t){const i=[101,101,120,101,99],n=e.pos;let s,r,a,o;try{s=e.getBytes(t),r=s.length}catch{}if(r===t&&(a=b$e(s,i,t-2*i.length),a.found&&a.length===t))return{stream:new XWe(s),length:t};for(e.pos=n;a=b$e(e.peekBytes(2048),i,0),0!==a.length;)if(e.pos+=a.length,a.found){o=e.pos-n;break}return e.pos=n,o?{stream:new XWe(e.getBytes(o)),length:o}:{stream:new XWe(e.getBytes(t)),length:t}}(t,n);new y$e(a.stream,!1,AXe).extractFontHeader(i),r&&(s=t.getBytes(6),s[5],s[4],s[3],s[2]);const o=function(e){const t=e.getBytes();if(0===t.length)throw new EVe("getEexecBlock - no font program found.");return{stream:new XWe(t),length:t.length}}(t),l=new y$e(o.stream,!0,AXe).extractFontProgram(i);for(const h in l.properties)i[h]=l.properties[h];const A=l.charstrings,c=this.getType2Charstrings(A),u=this.getType2Subrs(l.subrs);this.charstrings=A,this.data=this.wrap(e,c,this.charstrings,u,i),this.seacs=this.getSeacs(l.charstrings)}get numGlyphs(){return this.charstrings.length+1}getCharset(){const e=[".notdef"];for(const{glyphName:t}of this.charstrings)e.push(t);return e}getGlyphMapping(e){const t=this.charstrings;if(e.composite){const i=Object.create(null);for(let n=0,s=t.length;n<s;n++){i[e.cMap.charCodeOf(n)]=n+1}return i}const i=[".notdef"];let n,s;for(s=0;s<t.length;s++)i.push(t[s].glyphName);const r=e.builtInEncoding;if(r){n=Object.create(null);for(const e in r)s=i.indexOf(r[e]),s>=0&&(n[e]=s)}return fXe(e,n,i)}hasGlyphId(e){if(e<0||e>=this.numGlyphs)return!1;if(0===e)return!0;return this.charstrings[e-1].charstring.length>0}getSeacs(e){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];n.seac&&(t[i+1]=n.seac)}return t}getType2Charstrings(e){const t=[];for(const i of e)t.push(i.charstring);return t}getType2Subrs(e){let t=0;const i=e.length;t=i<1133?107:i<33769?1131:32768;const n=[];let s;for(s=0;s<t;s++)n.push([11]);for(s=0;s<i;s++)n.push(e[s]);return n}wrap(e,t,i,n,s){const r=new Pze;r.header=new Oze(1,0,4,4),r.names=[e];const a=new Vze;a.setByName("version",391),a.setByName("Notice",392),a.setByName("FullName",393),a.setByName("FamilyName",394),a.setByName("Weight",395),a.setByName("Encoding",null),a.setByName("FontMatrix",s.fontMatrix),a.setByName("FontBBox",s.bbox),a.setByName("charset",null),a.setByName("CharStrings",null),a.setByName("Private",null),r.topDict=a;const o=new Gze;o.add("Version 0.11"),o.add("See original notice"),o.add(e),o.add(e),o.add("Medium"),r.strings=o,r.globalSubrIndex=new Kze;const l=t.length,A=[".notdef"];let c,u;for(c=0;c<l;c++){const e=i[c].glyphName;-1===Rze.indexOf(e)&&o.add(e),A.push(e)}r.charset=new zze(!1,0,A);const h=new Kze;for(h.add([139,14]),c=0;c<l;c++)h.add(t[c]);r.charStrings=h;const d=new jze;d.setByName("Subrs",null);const g=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(c=0,u=g.length;c<u;c++){const e=g[c];if(!(e in s.privateData))continue;const t=s.privateData[e];if(Array.isArray(t))for(let i=t.length-1;i>0;i--)t[i]-=t[i-1];d.setByName(e,t)}r.topDict.privateDict=d;const p=new Kze;for(c=0,u=n.length;c<u;c++)p.add(n[c]);d.subrsIndex=p;return new eXe(r).compile()}}const w$e=[[57344,63743],[1048576,1114109]],Q$e=1e3,_$e=["ascent","bbox","black","bold","charProcOperatorList","composite","cssFontInfo","data","defaultVMetrics","defaultWidth","descent","fallbackName","fontMatrix","isInvalidPDFjsFont","isType3Font","italic","loadedName","mimetype","missingFile","name","remeasure","subtype","systemFontInfo","type","vertical"],S$e=["cMap","defaultEncoding","differences","isMonospace","isSerifFont","isSymbolicFont","seacMap","toFontChar","toUnicode","vmetrics","widths"];function x$e(e){if(!e.fontMatrix)return;if(e.fontMatrix[0]===uKe[0])return;const t=.001/e.fontMatrix[0],i=e.widths;for(const n in i)i[n]*=t;e.defaultWidth*=t}function k$e(e){if(!e.fallbackToUnicode)return;if(e.toUnicode instanceof kXe)return;const t=[];for(const i in e.fallbackToUnicode)e.toUnicode.has(i)||(t[i]=e.fallbackToUnicode[i]);t.length>0&&e.toUnicode.amend(t)}class D$e{constructor(e,t,i,n,s,r,a,o,l){this.originalCharCode=e,this.fontChar=t,this.unicode=i,this.accent=n,this.width=s,this.vmetric=r,this.operatorListId=a,this.isSpace=o,this.isInFont=l}get category(){return mVe(this,"category",function(e){const t=lXe.get(e);if(t)return t;const i=e.match(oXe),n={isWhitespace:!!(null==i?void 0:i[1]),isZeroWidthDiacritic:!!(null==i?void 0:i[2]),isInvisibleFormatMark:!!(null==i?void 0:i[3])};return lXe.set(e,n),n}(this.unicode),!0)}}function F$e(e,t){return(e<<8)+t}function T$e(e,t,i){e[t+1]=i,e[t]=i>>>8}function M$e(e,t){const i=(e<<8)+t;return 32768&i?i-65536:i}function R$e(e){return String.fromCharCode(e>>8&255,255&e)}function N$e(e){return e>32767?e=32767:e<-32768&&(e=-32768),String.fromCharCode(e>>8&255,255&e)}function L$e(e){return"ttcf"===QVe(e.peekBytes(4))}function U$e(e,{type:t,subtype:i,composite:n}){let s,r;return function(e){const t=e.peekBytes(4);return 65536===_We(t,0)||"true"===QVe(t)}(e)||L$e(e)?s=n?"CIDFontType2":"TrueType":!function(e){return"OTTO"===QVe(e.peekBytes(4))}(e)?!function(e){const t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}(e)?!function(e){const t=e.peekBytes(4);return t[0]>=1&&t[3]>=1&&t[3]<=4}(e)?(s=t,r=i):n?(s="CIDFontType0",r="CIDFontType0C"):(s="MMType1"===t?"MMType1":"Type1",r="Type1C"):s=n?"CIDFontType0":"MMType1"===t?"MMType1":"Type1":s=n?"CIDFontType2":"OpenType",[s,r]}function H$e(e,t){for(const i in t)e[+i]=t[i]}function P$e(e,t,i){const n=[];let s;for(let r=0,a=e.length;r<a;r++)s=sXe(e[r],t),-1!==s&&(n[r]=s);for(const r in i)s=sXe(i[r],t),-1!==s&&(n[+r]=s);return n}function O$e(e){return 1===e.platform&&0===e.encoding&&0===e.language}function G$e(e){return 3===e.platform&&1===e.encoding&&1033===e.language}function K$e(e,t,i=!1){switch(t.length){case 1:return t.charCodeAt(0);case 2:return t.charCodeAt(0)<<8|t.charCodeAt(1)}const n=`Unsupported CID string (charCode ${e}): "${t}".`;if(i)throw new EVe(n);return t}function q$e(e,t,i,n){const s=Object.create(null),r=new Map,a=[],o=new Set;let l=0;let A=w$e[l][0],c=w$e[l][1];for(const h in e){let d=e[h];if(!t(d))continue;if(A>c){if(l++,l>=w$e.length)break;A=w$e[l][0],c=w$e[l][1]}const g=A++;0===d&&(d=i);let p=n.get(h);"string"==typeof p&&(p=p.codePointAt(0)),!p||(u=p,w$e[0][0]<=u&&u<=w$e[0][1]||w$e[1][0]<=u&&u<=w$e[1][1])||o.has(d)||(r.set(p,d),o.add(d)),s[g]=d,a[h]=g}var u;return{toFontChar:a,charCodeToGlyphId:s,toUnicodeExtraMap:r,nextAvailableFontCharCode:A}}function Y$e(e,t,i){const n=function(e,t,i){const n=[];for(const a in e)e[a]>=i||n.push({fontCharCode:0|a,glyphId:e[a]});if(t)for(const[a,o]of t)o>=i||n.push({fontCharCode:a,glyphId:o});0===n.length&&n.push({fontCharCode:0,glyphId:0}),n.sort((function(e,t){return e.fontCharCode-t.fontCharCode}));const s=[],r=n.length;for(let a=0;a<r;){const e=n[a].fontCharCode,t=[n[a].glyphId];++a;let i=e;for(;a<r&&i+1===n[a].fontCharCode&&(t.push(n[a].glyphId),++i,++a,65535!==i););s.push([e,i,t])}return s}(e,t,i),s=n.at(-1)[1]>65535?2:1;let r,a,o,l,A="\0\0"+R$e(s)+"\0\0"+SVe(4+8*s);for(r=n.length-1;r>=0&&!(n[r][0]<=65535);--r);const c=r+1;n[r][0]<65535&&65535===n[r][1]&&(n[r][1]=65534);const u=n[r][1]<65535?1:0,h=c+u,d=a$e.getSearchParams(h,2);let g,p,f,m,C="",I="",v="",B="",y="",b=0;for(r=0,a=c;r<a;r++){g=n[r],p=g[0],f=g[1],C+=R$e(p),I+=R$e(f),m=g[2];let e=!0;for(o=1,l=m.length;o<l;++o)if(m[o]!==m[o-1]+1){e=!1;break}if(e){v+=R$e(m[0]-p&65535),B+=R$e(0)}else{const e=2*(h-r)+2*b;for(b+=f-p+1,v+=R$e(0),B+=R$e(e),o=0,l=m.length;o<l;++o)y+=R$e(m[o])}}u>0&&(I+="ÿÿ",C+="ÿÿ",v+="\0",B+="\0\0");const E="\0\0"+R$e(2*h)+R$e(d.range)+R$e(d.entry)+R$e(d.rangeShift)+I+"\0\0"+C+v+B+y;let w="",Q="";if(s>1){for(A+="\0\0\n"+SVe(4+8*s+4+E.length),w="",r=0,a=n.length;r<a;r++){g=n[r],p=g[0],m=g[2];let e=m[0];for(o=1,l=m.length;o<l;++o)m[o]!==m[o-1]+1&&(f=g[0]+o-1,w+=SVe(p)+SVe(f)+SVe(e),p=f+1,e=m[o]);w+=SVe(p)+SVe(g[1])+SVe(e)}Q="\0\f\0\0"+SVe(w.length+16)+"\0\0\0\0"+SVe(w.length/12)}return A+"\0"+R$e(E.length+4)+E+Q+w}function V$e(e,t,i){i||(i={unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0});let n=0,s=0,r=0,a=0,o=null,l=0,A=-1;if(t){for(let e in t)if(e|=0,(o>e||!o)&&(o=e),l<e&&(l=e),A=aXe(e,A),A<32)n|=1<<A;else if(A<64)s|=1<<A-32;else if(A<96)r|=1<<A-64;else{if(!(A<123))throw new EVe("Unicode ranges Bits > 123 are reserved for internal usage");a|=1<<A-96}l>65535&&(l=65535)}else o=0,l=255;const c=e.bbox||[0,0,0,0],u=i.unitsPerEm||(e.fontMatrix?1/Math.max(...e.fontMatrix.slice(0,4).map(Math.abs)):1e3),h=e.ascentScaled?1:u/Q$e,d=i.ascent||Math.round(h*(e.ascent||c[3]));let g=i.descent||Math.round(h*(e.descent||c[1]));g>0&&e.descent>0&&c[1]<0&&(g=-g);const p=i.yMax||d,f=-i.yMin||-g;return"\0$ô\0\0\0»\0\0\0»\0\0ß\x001\0\0\0\0"+String.fromCharCode(e.fixedPitch?9:0)+"\0\0\0\0\0\0"+SVe(n)+SVe(s)+SVe(r)+SVe(a)+"*21*"+R$e(e.italicAngle?1:0)+R$e(o||e.firstChar)+R$e(l||e.lastChar)+R$e(d)+R$e(g)+"\0d"+R$e(p)+R$e(f)+"\0\0\0\0\0\0\0\0"+R$e(e.xHeight)+R$e(e.capHeight)+R$e(0)+R$e(o||e.firstChar)+"\0"}function W$e(e){return"\0\0\0"+SVe(Math.floor(65536*e.italicAngle))+"\0\0\0\0"+SVe(e.fixedPitch?1:0)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function j$e(e){return e.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g,"").slice(0,63)}function J$e(e,t){t||(t=[[],[]]);const i=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||j$e(e),t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],n=[];let s,r,a,o,l;for(s=0,r=i.length;s<r;s++){l=t[1][s]||i[s];const e=[];for(a=0,o=l.length;a<o;a++)e.push(R$e(l.charCodeAt(a)));n.push(e.join(""))}const A=[i,n],c=["\0","\0"],u=["\0\0","\0"],h=["\0\0","\t"],d=i.length*c.length;let g="\0\0"+R$e(d)+R$e(12*d+6),p=0;for(s=0,r=c.length;s<r;s++){const e=A[s];for(a=0,o=e.length;a<o;a++){l=e[a];g+=c[s]+u[s]+h[s]+R$e(a)+R$e(l.length)+R$e(p),p+=l.length}}return g+=i.join("")+n.join(""),g}class z$e{constructor(e,t,i){var n;this.name=e,this.psName=null,this.mimetype=null,this.disableFontFace=!1,this.loadedName=i.loadedName,this.isType3Font=i.isType3Font,this.missingFile=!1,this.cssFontInfo=i.cssFontInfo,this._charsCache=Object.create(null),this._glyphCache=Object.create(null);let s=!!(i.flags&uXe);if(!s&&!i.isSimulatedFlags){const t=e.replaceAll(/[,_]/g,"-").split("-",1)[0],i=yXe();for(const e of t.split("+"))if(i[e]){s=!0;break}}this.isSerifFont=s,this.isSymbolicFont=!!(i.flags&hXe),this.isMonospace=!!(i.flags&cXe);let{type:r,subtype:a}=i;this.type=r,this.subtype=a,this.systemFontInfo=i.systemFontInfo;const o=e.match(/^InvalidPDFjsFont_(.*)_\d+$/);if(this.isInvalidPDFjsFont=!!o,this.isInvalidPDFjsFont?this.fallbackName=o[1]:this.isMonospace?this.fallbackName="monospace":this.isSerifFont?this.fallbackName="serif":this.fallbackName="sans-serif",(null==(n=this.systemFontInfo)?void 0:n.guessFallback)&&(this.systemFontInfo.guessFallback=!1,this.systemFontInfo.css+=`,${this.fallbackName}`),this.differences=i.differences,this.widths=i.widths,this.defaultWidth=i.defaultWidth,this.composite=i.composite,this.cMap=i.cMap,this.capHeight=i.capHeight/Q$e,this.ascent=i.ascent/Q$e,this.descent=i.descent/Q$e,this.lineHeight=this.ascent-this.descent,this.fontMatrix=i.fontMatrix,this.bbox=i.bbox,this.defaultEncoding=i.defaultEncoding,this.toUnicode=i.toUnicode,this.toFontChar=[],"Type3"===i.type){for(let e=0;e<256;e++)this.toFontChar[e]=this.differences[e]||i.defaultEncoding[e];return}if(this.cidEncoding=i.cidEncoding||"",this.vertical=!!i.vertical,this.vertical&&(this.vmetrics=i.vmetrics,this.defaultVMetrics=i.defaultVMetrics),!t||t.isEmpty)return t&&this.loadedName,void this.fallbackToSystemFont(i);let l;[r,a]=U$e(t,i),r===this.type&&a===this.subtype||(this.type,this.subtype);try{switch(r){case"MMType1":case"Type1":case"CIDFontType0":this.mimetype="font/opentype";const n="Type1C"===a||"CIDFontType0C"===a?new DXe(t,i):new E$e(e,t,i);x$e(i),l=this.convert(e,n,i);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",l=this.checkAndRepair(e,t,i),this.isOpenType&&(x$e(i),r="OpenType");break;default:throw new EVe(`Font ${r} is not supported`)}}catch(I2){return void this.fallbackToSystemFont(i)}k$e(i),this.data=l,this.type=r,this.subtype=a,this.fontMatrix=i.fontMatrix,this.widths=i.widths,this.defaultWidth=i.defaultWidth,this.toUnicode=i.toUnicode,this.seacMap=i.seacMap}get renderer(){return mVe(this,"renderer",jXe.create(this,AXe))}exportData(e=!1){const t=e?[..._$e,...S$e]:_$e,i=Object.create(null);let n,s;for(n of t)s=this[n],void 0!==s&&(i[n]=s);return i}fallbackToSystemFont(e){this.missingFile=!0;const{name:t,type:i}=this;let n=mXe(t);const s=IXe(),r=BXe(),a=!!s[n],o=!(!r[n]||!s[r[n]]);n=s[n]||r[n]||n;const l=zXe()[n];l&&(isNaN(this.ascent)&&(this.ascent=l.ascent/Q$e),isNaN(this.descent)&&(this.descent=l.descent/Q$e),isNaN(this.capHeight)&&(this.capHeight=l.capHeight/Q$e)),this.bold=/bold/gi.test(n),this.italic=/oblique|italic/gi.test(n),this.black=/Black/g.test(t);const A=/Narrow/g.test(t);if(this.remeasure=(!a||A)&&Object.keys(this.widths).length>0,(a||o)&&"CIDFontType2"===i&&this.cidEncoding.startsWith("Identity-")){const i=e.cidToGidMap,n=[];if(H$e(n,EXe()),/Arial-?Black/i.test(t)?H$e(n,wXe()):/Calibri/i.test(t)&&H$e(n,QXe()),i){for(const e in n){const t=n[e];void 0!==i[t]&&(n[+e]=i[t])}i.length!==this.toUnicode.length&&e.hasIncludedToUnicodeMap&&this.toUnicode instanceof kXe&&this.toUnicode.forEach((function(e,t){const s=n[e];void 0===i[s]&&(n[+e]=t)}))}this.toUnicode instanceof kXe||this.toUnicode.forEach((function(e,t){n[+e]=t})),this.toFontChar=n,this.toUnicode=new xXe(n)}else if(/Symbol/i.test(n))this.toFontChar=P$e(Fze,tXe(),this.differences);else if(/Dingbats/i.test(n))this.toFontChar=P$e(Tze,iXe(),this.differences);else if(a||o){const e=P$e(this.defaultEncoding,tXe(),this.differences);"CIDFontType2"!==i||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof kXe||this.toUnicode.forEach((function(t,i){e[+t]=i})),this.toFontChar=e}else{const e=tXe(),i=[];this.toUnicode.forEach(((t,n)=>{if(!this.composite){const i=sXe(this.differences[t]||this.defaultEncoding[t],e);-1!==i&&(n=i)}i[+t]=n})),this.composite&&this.toUnicode instanceof kXe&&/Tahoma|Verdana/i.test(t)&&H$e(i,EXe()),this.toFontChar=i}k$e(e),this.loadedName=n.split("-",1)[0]}checkAndRepair(e,t,i){var n,s,r;const a=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function o(e,t){const i=Object.create(null);i["OS/2"]=null,i.cmap=null,i.head=null,i.hhea=null,i.hmtx=null,i.maxp=null,i.name=null,i.post=null;for(let n=0;n<t;n++){const t=l(e);a.includes(t.tag)&&(0!==t.length&&(i[t.tag]=t))}return i}function l(e){const t=e.getString(4),i=e.getInt32()>>>0,n=e.getInt32()>>>0,s=e.getInt32()>>>0,r=e.pos;e.pos=e.start||0,e.skip(n);const a=e.getBytes(s);return e.pos=r,"head"===t&&(a[8]=a[9]=a[10]=a[11]=0,a[17]|=32),{tag:t,checksum:i,length:s,offset:n,data:a}}function A(e){return{version:e.getString(4),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function c(e,t,i,n,s,r){const a={length:0,sizeOfInstructions:0};if(t<0||t>=e.length||i>e.length||i-t<=12)return a;const o=e.subarray(t,i),l=M$e(o[2],o[3]),A=M$e(o[4],o[5]),c=M$e(o[6],o[7]),u=M$e(o[8],o[9]);l>c&&(T$e(o,2,c),T$e(o,6,l)),A>u&&(T$e(o,4,u),T$e(o,8,A));const h=M$e(o[0],o[1]);if(h<0)return h<-1||(n.set(o,s),a.length=o.length),a;let d,g=10,p=0;for(d=0;d<h;d++){p=(o[g]<<8|o[g+1])+1,g+=2}const f=g,m=o[g]<<8|o[g+1];a.sizeOfInstructions=m,g+=2+m;const C=g;let I=0;for(d=0;d<p;d++){const e=o[g++];192&e&&(o[g-1]=63&e);let t=2;2&e?t=1:16&e&&(t=0);let i=2;4&e?i=1:32&e&&(i=0);const n=t+i;if(I+=n,8&e){const e=o[g++];0===e&&(o[g-1]^=8),d+=e,I+=e*n}}if(0===I)return a;let v=g+I;return v>o.length?a:!r&&m>0?(n.set(o.subarray(0,f),s),n.set([0,0],s+f),n.set(o.subarray(C,v),s+f+2),v-=m,o.length-v>3&&(v=v+3&-4),a.length=v,a):o.length-v>3?(v=v+3&-4,n.set(o.subarray(0,v),s),a.length=v,a):(n.set(o,s),a.length=o.length,a)}function u(e){const i=(t.start||0)+e.offset;t.pos=i;const n=[[],[]],s=[],r=e.length,a=i+r;if(0!==t.getUint16()||r<6)return[n,s];const o=t.getUint16(),l=t.getUint16();let A,c;for(A=0;A<o&&t.pos+12<=a;A++){const e={platform:t.getUint16(),encoding:t.getUint16(),language:t.getUint16(),name:t.getUint16(),length:t.getUint16(),offset:t.getUint16()};(O$e(e)||G$e(e))&&s.push(e)}for(A=0,c=s.length;A<c;A++){const e=s[A];if(e.length<=0)continue;const r=i+l+e.offset;if(r+e.length>a)continue;t.pos=r;const o=e.name;if(e.encoding){let i="";for(let n=0,s=e.length;n<s;n+=2)i+=String.fromCharCode(t.getUint16());n[1][o]=i}else n[0][o]=t.getString(e.length)}return[n,s]}const h=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];function d(e,t){let i,n,s,r,a,o=e.data,l=0,A=0,c=0;const u=[],d=[],g=[];let p=t.tooComplexToFollowFunctions,f=!1,m=0,C=0;for(let v=o.length;l<v;){const e=o[l++];if(64===e)if(n=o[l++],f||C)l+=n;else for(i=0;i<n;i++)u.push(o[l++]);else if(65===e)if(n=o[l++],f||C)l+=2*n;else for(i=0;i<n;i++)s=o[l++],u.push(s<<8|o[l++]);else if(176==(248&e))if(n=e-176+1,f||C)l+=n;else for(i=0;i<n;i++)u.push(o[l++]);else if(184==(248&e))if(n=e-184+1,f||C)l+=2*n;else for(i=0;i<n;i++)s=o[l++],u.push(M$e(s,o[l++]));else if(43!==e||p)if(44!==e||p){if(45===e)if(f)f=!1,A=l;else{if(a=d.pop(),!a)return void(t.hintsValid=!1);r=g.pop(),o=a.data,l=a.i,t.functionsStackDeltas[r]=u.length-a.stackTop}else if(137===e)(f||C)&&(p=!0),f=!0,c=l;else if(88===e)++m;else if(27===e)C=m;else if(89===e)C===m&&(C=0),--m;else if(28===e&&!f&&!C){const e=u.at(-1);e>0&&(l+=e-1)}}else(f||C)&&(p=!0),f=!0,c=l,r=u.pop(),t.functionsDefined[r]={data:o,i:l};else if(!f&&!C)if(r=u.at(-1),isNaN(r));else if(t.functionsUsed[r]=!0,r in t.functionsStackDeltas){const e=u.length+t.functionsStackDeltas[r];if(e<0)return void(t.hintsValid=!1);u.length=e}else if(r in t.functionsDefined&&!g.includes(r)){if(d.push({data:o,i:l,stackTop:u.length-1}),g.push(r),a=t.functionsDefined[r],!a)return void(t.hintsValid=!1);o=a.data,l=a.i}if(!f&&!C){let t=0;for(e<=142?t=h[e]:e>=192&&e<=223?t=-1:e>=224&&(t=-2),e>=113&&e<=117&&(n=u.pop(),isNaN(n)||(t=2*-n));t<0&&u.length>0;)u.pop(),t++;for(;t>0;)u.push(NaN),t--}}t.tooComplexToFollowFunctions=p;const I=[o];l>o.length&&I.push(new Uint8Array(l-o.length)),c>A&&I.push(new Uint8Array([34,45])),function(e,t){if(t.length>1){let i,n,s=0;for(i=0,n=t.length;i<n;i++)s+=t[i].length;s=s+3&-4;const r=new Uint8Array(s);let a=0;for(i=0,n=t.length;i<n;i++)r.set(t[i],a),a+=t[i].length;e.data=r,e.length=s}}(e,I)}let g,p,f,m;if(L$e(t=new XWe(new Uint8Array(t.getBytes())))){const e=function(e,t){var i;const{numFonts:n,offsetTable:s}=function(e){const t=e.getString(4);pVe("ttcf"===t,"Must be a TrueType Collection font.");const i=e.getUint16(),n=e.getUint16(),s=e.getInt32()>>>0,r=[];for(let o=0;o<s;o++)r.push(e.getInt32()>>>0);const a={ttcTag:t,majorVersion:i,minorVersion:n,numFonts:s,offsetTable:r};switch(i){case 1:return a;case 2:return a.dsigTag=e.getInt32()>>>0,a.dsigLength=e.getInt32()>>>0,a.dsigOffset=e.getInt32()>>>0,a}throw new EVe(`Invalid TrueType Collection majorVersion: ${i}.`)}(e),r=t.split("+");let a;for(let l=0;l<n;l++){e.pos=(e.start||0)+s[l];const n=A(e),c=o(e,n.numTables);if(!c.name)throw new EVe('TrueType Collection font must contain a "name" table.');const[h]=u(c.name);for(let e=0,s=h.length;e<s;e++)for(let o=0,l=h[e].length;o<l;o++){const s=null==(i=h[e][o])?void 0:i.replaceAll(/\s/g,"");if(s){if(s===t)return{header:n,tables:c};if(!(r.length<2))for(const e of r)s===e&&(a={name:e,header:n,tables:c})}}}if(a)return a.name,{header:a.header,tables:a.tables};throw new EVe(`TrueType Collection does not contain "${t}" font.`)}(t,this.name);g=e.header,p=e.tables}else g=A(t),p=o(t,g.numTables);const C=!p["CFF "];if(C){if(!p.loca)throw new EVe('Required "loca" table is not found');p.glyf||(p.glyf={tag:"glyf",data:new Uint8Array(0)}),this.isOpenType=!1}else{const t=i.composite&&((null==(n=i.cidToGidMap)?void 0:n.length)>0||!(i.cMap instanceof Aze));if("OTTO"===g.version&&!t||!p.head||!p.hhea||!p.maxp||!p.post)return m=new XWe(p["CFF "].data),f=new DXe(m,i),x$e(i),this.convert(e,f,i);delete p.glyf,delete p.loca,delete p.fpgm,delete p.prep,delete p["cvt "],this.isOpenType=!0}if(!p.maxp)throw new EVe('Required "maxp" table is not found');t.pos=(t.start||0)+p.maxp.offset;let I=t.getInt32();const v=t.getUint16();if(65536!==I&&20480!==I){if(6===p.maxp.length)I=20480;else{if(!(p.maxp.length>=32))throw new EVe('"maxp" table has a wrong version number');I=65536}!function(e,t,i){e[t+3]=255&i,e[t+2]=i>>>8,e[t+1]=i>>>16,e[t]=i>>>24}(p.maxp.data,0,I)}if((null==(s=i.scaleFactors)?void 0:s.length)===v&&C){const{scaleFactors:e}=i,t=F$e(p.head.data[50],p.head.data[51]),n=new XXe({glyfTable:p.glyf.data,isGlyphLocationsLong:t,locaTable:p.loca.data,numGlyphs:v});n.scale(e);const{glyf:s,loca:r,isLocationLong:a}=n.write();p.glyf.data=s,p.loca.data=r,a!==!!t&&(p.head.data[50]=0,p.head.data[51]=a?1:0);const o=p.hmtx.data;for(let i=0;i<v;i++){const t=4*i,n=Math.round(e[i]*F$e(o[t],o[t+1]));o[t]=n>>8&255,o[t+1]=255&n;T$e(o,t+2,Math.round(e[i]*M$e(o[t+2],o[t+3])))}}let B=v+1,y=!0;B>65535&&(y=!1,B=v);let b=0,E=0;if(I>=65536&&p.maxp.length>=32){t.pos+=8;t.getUint16()>2&&(p.maxp.data[14]=0,p.maxp.data[15]=2),t.pos+=4,b=t.getUint16(),t.pos+=4,E=t.getUint16()}p.maxp.data[4]=B>>8,p.maxp.data[5]=255&B;const w=function(e,t,i,n){const s={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(e&&d(e,s),t&&d(t,s),e&&function(e,t){if(!e.tooComplexToFollowFunctions)if(e.functionsDefined.length>t)e.hintsValid=!1;else for(let i=0,n=e.functionsUsed.length;i<n;i++){if(i>t)return void(e.hintsValid=!1);if(e.functionsUsed[i]&&!e.functionsDefined[i])return void(e.hintsValid=!1)}}(s,n),i&&1&i.length){const e=new Uint8Array(i.length+1);e.set(i.data),i.data=e}return s.hintsValid}(p.fpgm,p.prep,p["cvt "],b);if(w||(delete p.fpgm,delete p.prep,delete p["cvt "]),function(e,t,i,n,s,r){if(!t)return void(i&&(i.data=null));e.pos=(e.start||0)+t.offset,e.pos+=4,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2;const a=e.getUint16();e.pos+=8,e.pos+=2;let o=e.getUint16();if(0!==a){2&F$e(n.data[44],n.data[45])||(t.data[22]=0,t.data[23]=0)}o>s&&(o=s,t.data[34]=(65280&o)>>8,t.data[35]=255&o);const l=s-o-(i.length-4*o>>1);if(l>0){const e=new Uint8Array(i.length+2*l);e.set(i.data),r&&(e[i.length]=i.data[2],e[i.length+1]=i.data[3]),i.data=e}}(t,p.hhea,p.hmtx,p.head,B,y),!p.head)throw new EVe('Required "head" table is not found');!function(e,t,i){const n=e.data,s=function(e,t,i,n){return(e<<24)+(t<<16)+(i<<8)+n}(n[0],n[1],n[2],n[3]);s>>16!=1&&(n[0]=0,n[1]=1,n[2]=0,n[3]=0);const r=F$e(n[50],n[51]);if(r<0||r>1){const e=t+1;if(i===e<<1)n[50]=0,n[51]=0;else{if(i!==e<<2)throw new EVe("Could not fix indexToLocFormat: "+r);n[50]=0,n[51]=1}}}(p.head,v,C?p.loca.length:0);let Q=Object.create(null);if(C){const e=F$e(p.head.data[50],p.head.data[51]),t=function(e,t,i,n,s,r,a){let o,l,A;n?(o=4,l=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]},A=function(e,t,i){e[t]=i>>>24&255,e[t+1]=i>>16&255,e[t+2]=i>>8&255,e[t+3]=255&i}):(o=2,l=function(e,t){return e[t]<<9|e[t+1]<<1},A=function(e,t,i){e[t]=i>>9&255,e[t+1]=i>>1&255});const u=r?i+1:i,h=o*(1+u),d=new Uint8Array(h);d.set(e.data.subarray(0,h)),e.data=d;const g=t.data,p=g.length,f=new Uint8Array(p);let m,C;const I=[];for(m=0,C=0;m<i+1;m++,C+=o){let e=l(d,C);e>p&&(e=p),I.push({index:m,offset:e,endOffset:0})}for(I.sort(((e,t)=>e.offset-t.offset)),m=0;m<i;m++)I[m].endOffset=I[m+1].offset;for(I.sort(((e,t)=>e.index-t.index)),m=0;m<i;m++){const{offset:e,endOffset:t}=I[m];if(0!==e||0!==t)break;const i=I[m+1].offset;if(0!==i){I[m].endOffset=i;break}}const v=I.at(-2);0!==v.offset&&0===v.endOffset&&(v.endOffset=p);const B=Object.create(null);let y=0;for(A(d,0,y),m=0,C=o;m<i;m++,C+=o){const e=c(g,I[m].offset,I[m].endOffset,f,y,s),t=e.length;0===t&&(B[m]=!0),e.sizeOfInstructions>a&&(a=e.sizeOfInstructions),y+=t,A(d,C,y)}if(0===y){const e=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(m=0,C=o;m<u;m++,C+=o)A(d,C,e.length);t.data=e}else if(r){const i=l(d,o);f.length>i+y?t.data=f.subarray(0,i+y):(t.data=new Uint8Array(i+y),t.data.set(f.subarray(0,y))),t.data.set(f.subarray(0,i),y),A(e.data,d.length-o,y+i)}else t.data=f.subarray(0,y);return{missingGlyphs:B,maxSizeOfInstructions:a}}(p.loca,p.glyf,v,e,w,y,E);Q=t.missingGlyphs,I>=65536&&p.maxp.length>=32&&(p.maxp.data[26]=t.maxSizeOfInstructions>>8,p.maxp.data[27]=255&t.maxSizeOfInstructions)}if(!p.hhea)throw new EVe('Required "hhea" table is not found');0===p.hhea.data[10]&&0===p.hhea.data[11]&&(p.hhea.data[10]=255,p.hhea.data[11]=255);const _={unitsPerEm:F$e(p.head.data[18],p.head.data[19]),yMax:M$e(p.head.data[42],p.head.data[43]),yMin:M$e(p.head.data[38],p.head.data[39]),ascent:M$e(p.hhea.data[4],p.hhea.data[5]),descent:M$e(p.hhea.data[6],p.hhea.data[7]),lineGap:M$e(p.hhea.data[8],p.hhea.data[9])};this.ascent=_.ascent/_.unitsPerEm,this.descent=_.descent/_.unitsPerEm,this.lineGap=_.lineGap/_.unitsPerEm,(null==(r=this.cssFontInfo)?void 0:r.lineHeight)?(this.lineHeight=this.cssFontInfo.metrics.lineHeight,this.lineGap=this.cssFontInfo.metrics.lineGap):this.lineHeight=this.ascent-this.descent+this.lineGap,p.post&&function(e,i,n){const s=(t.start||0)+e.offset;t.pos=s;const r=s+e.length,a=t.getInt32();let o;t.skip(28);let l,A=!0;switch(a){case 65536:o=gXe;break;case 131072:const e=t.getUint16();if(e!==n){A=!1;break}const s=[];for(l=0;l<e;++l){const e=t.getUint16();if(e>=32768){A=!1;break}s.push(e)}if(!A)break;const a=[],c=[];for(;t.pos<r;){const e=t.getByte();for(c.length=e,l=0;l<e;++l)c[l]=String.fromCharCode(t.getByte());a.push(c.join(""))}for(o=[],l=0;l<e;++l){const e=s[l];e<258?o.push(gXe[e]):o.push(a[e-258])}break;case 196608:break;default:A=!1,i.defaultEncoding&&(o=i.defaultEncoding)}i.glyphNames=o}(p.post,i,v),p.post={tag:"post",data:W$e(i)};const S=Object.create(null);function x(e){return!Q[e]}if(i.composite){const e=i.cidToGidMap||[],t=0===e.length;i.cMap.forEach((function(i,n){if("string"==typeof n&&(n=K$e(i,n,!0)),n>65535)throw new EVe("Max size of CID is 65,535");let s=-1;t?s=n:void 0!==e[n]&&(s=e[n]),s>=0&&s<v&&x(s)&&(S[i]=s)}))}else{const e=function(e,t,i,n){if(!e)return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};let s,r=(t.start||0)+e.offset;t.pos=r,t.skip(2);const a=t.getUint16();let o,l=!1;for(let g=0;g<a;g++){const e=t.getUint16(),s=t.getUint16(),r=t.getInt32()>>>0;let A=!1;if((null==o?void 0:o.platformId)!==e||(null==o?void 0:o.encodingId)!==s){if(0!==e||0!==s&&1!==s&&3!==s)if(1===e&&0===s)A=!0;else if(3!==e||1!==s||!n&&o){if(i&&3===e&&0===s){A=!0;let i=!0;if(g<a-1){const n=t.peekBytes(2);F$e(n[0],n[1])<e&&(i=!1)}i&&(l=!0)}}else A=!0,i||(l=!0);else A=!0;if(A&&(o={platformId:e,encodingId:s,offset:r}),l)break}}if(o&&(t.pos=r+o.offset),!o||-1===t.peekByte())return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};const A=t.getUint16();let c=!1;const u=[];let h,d;if(0===A){for(t.skip(4),h=0;h<256;h++){const e=t.getByte();e&&u.push({charCode:h,glyphId:e})}c=!0}else if(2===A){t.skip(4);const e=[];let i=0;for(let s=0;s<256;s++){const n=t.getUint16()>>3;e.push(n),i=Math.max(n,i)}const n=[];for(let s=0;s<=i;s++)n.push({firstCode:t.getUint16(),entryCount:t.getUint16(),idDelta:M$e(t.getByte(),t.getByte()),idRangePos:t.pos+t.getUint16()});for(let s=0;s<256;s++)if(0===e[s])t.pos=n[0].idRangePos+2*s,d=t.getUint16(),u.push({charCode:s,glyphId:d});else{const i=n[e[s]];for(h=0;h<i.entryCount;h++){const e=(s<<8)+h+i.firstCode;t.pos=i.idRangePos+2*h,d=t.getUint16(),0!==d&&(d=(d+i.idDelta)%65536),u.push({charCode:e,glyphId:d})}}}else if(4===A){t.skip(4);const e=t.getUint16()>>1;t.skip(6);const i=[];let n;for(n=0;n<e;n++)i.push({end:t.getUint16()});for(t.skip(2),n=0;n<e;n++)i[n].start=t.getUint16();for(n=0;n<e;n++)i[n].delta=t.getUint16();let a,o=0;for(n=0;n<e;n++){s=i[n];const r=t.getUint16();r?(a=(r>>1)-(e-n),s.offsetIndex=a,o=Math.max(o,a+s.end-s.start+1)):s.offsetIndex=-1}const l=[];for(h=0;h<o;h++)l.push(t.getUint16());for(n=0;n<e;n++){s=i[n],r=s.start;const e=s.end,t=s.delta;for(a=s.offsetIndex,h=r;h<=e;h++)65535!==h&&(d=a<0?h:l[a+h-r],d=d+t&65535,u.push({charCode:h,glyphId:d}))}}else if(6===A){t.skip(4);const e=t.getUint16(),i=t.getUint16();for(h=0;h<i;h++){d=t.getUint16();const i=e+h;u.push({charCode:i,glyphId:d})}}else{if(12!==A)return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};{t.skip(10);const e=t.getInt32()>>>0;for(h=0;h<e;h++){const e=t.getInt32()>>>0,i=t.getInt32()>>>0;let n=t.getInt32()>>>0;for(let t=e;t<=i;t++)u.push({charCode:t,glyphId:n++})}}}u.sort((function(e,t){return e.charCode-t.charCode}));for(let g=1;g<u.length;g++)u[g-1].charCode===u[g].charCode&&(u.splice(g,1),g--);return{platformId:o.platformId,encodingId:o.encodingId,mappings:u,hasShortCmap:c}}(p.cmap,t,this.isSymbolicFont,i.hasEncoding),n=e.platformId,s=e.encodingId,r=e.mappings;let a=[],o=!1;if(!i.hasEncoding||"MacRomanEncoding"!==i.baseEncodingName&&"WinAnsiEncoding"!==i.baseEncodingName||(a=Mze(i.baseEncodingName)),i.hasEncoding&&!this.isSymbolicFont&&(3===n&&1===s||1===n&&0===s)){const e=tXe();for(let t=0;t<256;t++){let o;if(o=void 0!==this.differences[t]?this.differences[t]:a.length&&""!==a[t]?a[t]:kze[t],!o)continue;const l=pXe(o,e);let A;if(3===n&&1===s?A=e[l]:1===n&&0===s&&(A=xze.indexOf(l)),void 0===A){if(!i.glyphNames&&i.hasIncludedToUnicodeMap&&!(this.toUnicode instanceof kXe)){const e=this.toUnicode.get(t);e&&(A=e.codePointAt(0))}if(void 0===A)continue}for(const e of r)if(e.charCode===A){S[t]=e.glyphId;break}}}else if(0===n){for(const e of r)S[e.charCode]=e.glyphId;o=!0}else if(3===n&&0===s)for(const t of r){let e=t.charCode;e>=61440&&e<=61695&&(e&=255),S[e]=t.glyphId}else for(const t of r)S[t.charCode]=t.glyphId;if(i.glyphNames&&(a.length||this.differences.length))for(let t=0;t<256;++t){if(!o&&void 0!==S[t])continue;const e=this.differences[t]||a[t];if(!e)continue;const n=i.glyphNames.indexOf(e);n>0&&x(n)&&(S[t]=n)}}0===S.length&&(S[0]=0);let k=B-1;if(y||(k=0),!i.cssFontInfo){const e=q$e(S,x,k,this.toUnicode);this.toFontChar=e.toFontChar,p.cmap={tag:"cmap",data:Y$e(e.charCodeToGlyphId,e.toUnicodeExtraMap,B)},p["OS/2"]&&function(e,t){t.pos=(t.start||0)+e.offset;const i=t.getUint16();t.skip(60);const n=t.getUint16();return!(i<4&&768&n)&&(!(t.getUint16()>t.getUint16())&&(t.skip(6),0!==t.getUint16()&&(e.data[8]=e.data[9]=0,!0)))}(p["OS/2"],t)||(p["OS/2"]={tag:"OS/2",data:V$e(i,e.charCodeToGlyphId,_)})}if(!C)try{m=new XWe(p["CFF "].data);f=new Hze(m,i,AXe).parse(),f.duplicateFirstGlyph();const e=new eXe(f);p["CFF "].data=e.compile()}catch{i.loadedName}if(p.name){const[t,n]=u(p.name);p.name.data=J$e(e,t),this.psName=t[0][6]||null,i.composite||function(e,t,i){if(e.isInternalFont)return;if(e.hasIncludedToUnicodeMap)return;if(e.hasEncoding)return;if(e.toUnicode instanceof kXe)return;if(!t)return;if(0===i.length)return;if(e.defaultEncoding===Dze)return;for(const a of i)if(!G$e(a))return;const n=Dze,s=[],r=tXe();for(const a in n){const e=n[a];if(""===e)continue;const t=r[e];void 0!==t&&(s[a]=String.fromCharCode(t))}s.length>0&&e.toUnicode.amend(s)}(i,this.isSymbolicFont,n)}else p.name={tag:"name",data:J$e(this.name)};const D=new a$e(g.version);for(const F in p)D.addTable(F,p[F].data);return D.toArray()}convert(e,t,i){i.fixedPitch=!1,i.builtInEncoding&&function(e,t){if(e.isInternalFont)return;if(e.hasIncludedToUnicodeMap)return;if(t===e.defaultEncoding)return;if(e.toUnicode instanceof kXe)return;const i=[],n=tXe();for(const s in t){if(e.hasEncoding&&(e.baseEncodingName||void 0!==e.differences[s]))continue;const r=sXe(t[s],n);-1!==r&&(i[s]=String.fromCharCode(r))}i.length>0&&e.toUnicode.amend(i)}(i,i.builtInEncoding);let n=1;t instanceof DXe&&(n=t.numGlyphs-1);const s=t.getGlyphMapping(i);let r=null,a=s,o=null;i.cssFontInfo||(r=q$e(s,t.hasGlyphId.bind(t),n,this.toUnicode),this.toFontChar=r.toFontChar,a=r.charCodeToGlyphId,o=r.toUnicodeExtraMap);const l=t.numGlyphs;function A(e,t){let i=null;for(const n in e)t===e[n]&&(i||(i=[])).push(0|n);return i}function c(e,t){for(const i in e)if(t===e[i])return 0|i;return r.charCodeToGlyphId[r.nextAvailableFontCharCode]=t,r.nextAvailableFontCharCode++}const u=t.seacs;if(r&&(null==u?void 0:u.length)){const e=i.fontMatrix||uKe,n=t.getCharset(),a=Object.create(null);for(let t in u){t|=0;const i=u[t],o=kze[i[2]],l=kze[i[3]],h=n.indexOf(o),d=n.indexOf(l);if(h<0||d<0)continue;const g={x:i[0]*e[0]+i[1]*e[2]+e[4],y:i[0]*e[1]+i[1]*e[3]+e[5]},p=A(s,t);if(p)for(const e of p){const t=r.charCodeToGlyphId,i=c(t,h),n=c(t,d);a[e]={baseFontCharCode:i,accentFontCharCode:n,accentOffset:g}}}i.seacMap=a}const h=i.fontMatrix?1/Math.max(...i.fontMatrix.slice(0,4).map(Math.abs)):1e3,d=new a$e("OTTO");return d.addTable("CFF ",t.data),d.addTable("OS/2",V$e(i,a)),d.addTable("cmap",Y$e(a,o,l)),d.addTable("head","\0\0\0\0\0\0\0\0\0\0_<õ\0\0"+N$e(h)+"\0\0\0\0\v~'\0\0\0\0\v~'\0\0"+N$e(i.descent)+"ÿ"+N$e(i.ascent)+R$e(i.italicAngle?2:0)+"\0\0\0\0\0\0\0"),d.addTable("hhea","\0\0\0"+N$e(i.ascent)+N$e(i.descent)+"\0\0ÿÿ\0\0\0\0\0\0"+N$e(i.capHeight)+N$e(Math.tan(i.italicAngle)*i.xHeight)+"\0\0\0\0\0\0\0\0\0\0\0\0"+R$e(l)),d.addTable("hmtx",function(){const e=t.charstrings,i=t.cff?t.cff.widths:null;let n="\0\0\0\0";for(let t=1,s=l;t<s;t++){let s=0;if(e){const i=e[t-1];s="width"in i?i.width:0}else i&&(s=Math.ceil(i[t]||0));n+=R$e(s)+R$e(0)}return n}()),d.addTable("maxp","\0\0P\0"+R$e(l)),d.addTable("name",J$e(e)),d.addTable("post",W$e(i)),d.toArray()}get _spaceWidth(){const e=["space","minus","one","i","I"];let t;for(const i of e){if(i in this.widths){t=this.widths[i];break}const e=tXe()[i];let n=0;if(this.composite&&this.cMap.contains(e)&&(n=this.cMap.lookup(e),"string"==typeof n&&(n=K$e(e,n))),!n&&this.toUnicode&&(n=this.toUnicode.charCodeOf(e)),n<=0&&(n=e),t=this.widths[n],t)break}return mVe(this,"_spaceWidth",t||this.defaultWidth)}_charToGlyph(e,t=!1){var i,n,s;let r,a,o,l=this._glyphCache[e];if((null==l?void 0:l.isSpace)===t)return l;let A=e;(null==(i=this.cMap)?void 0:i.contains(e))&&(A=this.cMap.lookup(e),"string"==typeof A&&(A=K$e(e,A))),a=this.widths[A],"number"!=typeof a&&(a=this.defaultWidth);const c=null==(n=this.vmetrics)?void 0:n[A];let u=this.toUnicode.get(e)||e;"number"==typeof u&&(u=String.fromCharCode(u));let h=void 0!==this.toFontChar[e];if(r=this.toFontChar[e]||e,this.missingFile){const t=this.differences[e]||this.defaultEncoding[e];".notdef"!==t&&""!==t||"Type1"!==this.type||(r=32,""===t&&(a||(a=this._spaceWidth),u=String.fromCharCode(r))),r=(d=r)>=65520&&d<=65535?0:d>=62976&&d<=63743?nXe()[d]||d:173===d?45:d}var d;this.isType3Font&&(o=r);let g=null;if(null==(s=this.seacMap)?void 0:s[e]){h=!0;const t=this.seacMap[e];r=t.baseFontCharCode,g={fontChar:String.fromCodePoint(t.accentFontCharCode),offset:t.accentOffset}}let p="";if("number"==typeof r&&r<=1114111&&(p=String.fromCodePoint(r)),this.missingFile&&this.vertical&&1===p.length){const e=CXe()[p.charCodeAt(0)];e&&(p=u=String.fromCharCode(e))}return l=new D$e(e,p,u,g,a,c,o,t,h),this._glyphCache[e]=l}charsToGlyphs(e){let t=this._charsCache[e];if(t)return t;if(t=[],this.cMap){const i=Object.create(null),n=e.length;let s=0;for(;s<n;){this.cMap.readCharCode(e,s,i);const{charcode:n,length:r}=i;s+=r;const a=this._charToGlyph(n,1===r&&32===e.charCodeAt(s-1));t.push(a)}}else for(let i=0,n=e.length;i<n;++i){const n=e.charCodeAt(i),s=this._charToGlyph(n,32===n);t.push(s)}return this._charsCache[e]=t}getCharPositions(e){const t=[];if(this.cMap){const i=Object.create(null);let n=0;for(;n<e.length;){this.cMap.readCharCode(e,n,i);const s=i.length;t.push([n,n+s]),n+=s}}else for(let i=0,n=e.length;i<n;++i)t.push([i,i+1]);return t}get glyphCacheValues(){return Object.values(this._glyphCache)}encodeString(e){const t=[],i=[],n=()=>t.length%2==1,s=this.toUnicode instanceof kXe?e=>this.toUnicode.charCodeOf(e):e=>this.toUnicode.charCodeOf(String.fromCodePoint(e));for(let r=0,a=e.length;r<a;r++){const a=e.codePointAt(r);if(a>55295&&(a<57344||a>65533)&&r++,this.toUnicode){const e=s(a);if(-1!==e){n()&&(t.push(i.join("")),i.length=0);for(let t=(this.cMap?this.cMap.getCharCodeLength(e):1)-1;t>=0;t--)i.push(String.fromCharCode(e>>8*t&255));continue}}n()||(t.push(i.join("")),i.length=0),i.push(String.fromCodePoint(a))}return t.push(i.join("")),t}}class X$e{constructor(e){this.error=e,this.loadedName="g_font_error",this.missingFile=!0}charsToGlyphs(){return[]}encodeString(e){return[e]}exportData(e=!1){return{error:this.error}}}const $$e=2,Z$e=3,eZe=4,tZe=5,iZe=6,nZe=7;class sZe{constructor(){gVe("Cannot initialize Pattern.")}static parseShading(e,t,i,n,s){const r=e instanceof dWe?e.dict:e,a=r.get("ShadingType");try{switch(a){case $$e:case Z$e:return new aZe(r,t,i,n,s);case eZe:case tZe:case iZe:case nZe:return new uZe(e,t,i,n,s);default:throw new EVe("Unsupported ShadingType: "+a)}}catch(o){if(o instanceof fWe)throw o;return new hZe}}}class rZe{getIR(){gVe("Abstract method `getIR` called.")}}Ic(rZe,"SMALL_NUMBER",1e-6);class aZe extends rZe{constructor(e,t,i,n,s){super(),this.shadingType=e.get("ShadingType");let r=0;if(this.shadingType===$$e?r=4:this.shadingType===Z$e&&(r=6),this.coordsArr=e.getArray("Coords"),!xWe(this.coordsArr,r))throw new EVe("RadialAxialShading: Invalid /Coords array.");const a=ije.parse({cs:e.getRaw("CS")||e.getRaw("ColorSpace"),xref:t,resources:i,pdfFunctionFactory:n,localColorSpaceCache:s});this.bbox=FWe(e.getArray("BBox"),null);let o=0,l=1;const A=e.getArray("Domain");xWe(A,2)&&([o,l]=A);let c=!1,u=!1;const h=e.getArray("Extend");var d,g;if(d=h,g=2,Array.isArray(d)&&d.length===g&&d.every((e=>"boolean"==typeof e))&&([c,u]=h),!(this.shadingType!==Z$e||c&&u)){const[e,t,i,n,s,r]=this.coordsArr;Math.hypot(e-n,t-s)}this.extendStart=c,this.extendEnd=u;const p=e.getRaw("Function"),f=n.createFromArray(p),m=(l-o)/840,C=this.colorStops=[];if(o>=l||m<=0)return;const I=new Float32Array(a.numComps),v=new Float32Array(1);let B,y=0;v[0]=o,f(v,0,I,0);let b=a.getRgb(I,0);const E=FVe.makeHexColor(b[0],b[1],b[2]);C.push([0,E]);let w=1;v[0]=o+m,f(v,0,I,0);let Q=a.getRgb(I,0),_=Q[0]-b[0]+1,S=Q[1]-b[1]+1,x=Q[2]-b[2]+1,k=Q[0]-b[0]-1,D=Q[1]-b[1]-1,F=Q[2]-b[2]-1;for(let R=2;R<840;R++){v[0]=o+R*m,f(v,0,I,0),B=a.getRgb(I,0);const e=R-y;_=Math.min(_,(B[0]-b[0]+1)/e),S=Math.min(S,(B[1]-b[1]+1)/e),x=Math.min(x,(B[2]-b[2]+1)/e),k=Math.max(k,(B[0]-b[0]-1)/e),D=Math.max(D,(B[1]-b[1]-1)/e),F=Math.max(F,(B[2]-b[2]-1)/e);if(!(k<=_&&D<=S&&F<=x)){const e=FVe.makeHexColor(Q[0],Q[1],Q[2]);C.push([w/840,e]),_=B[0]-Q[0]+1,S=B[1]-Q[1]+1,x=B[2]-Q[2]+1,k=B[0]-Q[0]-1,D=B[1]-Q[1]-1,F=B[2]-Q[2]-1,y=w,b=Q}w=R,Q=B}const T=FVe.makeHexColor(Q[0],Q[1],Q[2]);C.push([1,T]);let M="transparent";e.has("Background")&&(B=a.getRgb(e.get("Background"),0),M=FVe.makeHexColor(B[0],B[1],B[2])),c||(C.unshift([0,M]),C[1][0]+=rZe.SMALL_NUMBER),u||(C.at(-1)[0]-=rZe.SMALL_NUMBER,C.push([1,M])),this.colorStops=C}getIR(){const{coordsArr:e,shadingType:t}=this;let i,n,s,r,a;return t===$$e?(n=[e[0],e[1]],s=[e[2],e[3]],r=null,a=null,i="axial"):t===Z$e?(n=[e[0],e[1]],s=[e[3],e[4]],r=e[2],a=e[5],i="radial"):gVe(`getPattern type unknown: ${t}`),["RadialAxial",i,this.bbox,this.colorStops,n,s,r,a]}}class oZe{constructor(e,t){this.stream=e,this.context=t,this.buffer=0,this.bufferLength=0;const i=t.numComps;this.tmpCompsBuf=new Float32Array(i);const n=t.colorSpace.numComps;this.tmpCsCompsBuf=t.colorFn?new Float32Array(n):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.pos<this.stream.end;if(this.bufferLength>0)return!0;const e=this.stream.getByte();return!(e<0)&&(this.buffer=e,this.bufferLength=8,!0)}readBits(e){let t=this.buffer,i=this.bufferLength;if(32===e){if(0===i)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();const e=this.stream.getByte();return this.buffer=e&(1<<i)-1,(t<<8-i|(255&e)>>i)>>>0}if(8===e&&0===i)return this.stream.getByte();for(;i<e;)t=t<<8|this.stream.getByte(),i+=8;return i-=e,this.bufferLength=i,this.buffer=t&(1<<i)-1,t>>i}align(){this.buffer=0,this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){const e=this.context.bitsPerCoordinate,t=this.readBits(e),i=this.readBits(e),n=this.context.decode,s=e<32?1/((1<<e)-1):2.3283064365386963e-10;return[t*s*(n[1]-n[0])+n[0],i*s*(n[3]-n[2])+n[2]]}readComponents(){const e=this.context.numComps,t=this.context.bitsPerComponent,i=t<32?1/((1<<t)-1):2.3283064365386963e-10,n=this.context.decode,s=this.tmpCompsBuf;for(let a=0,o=4;a<e;a++,o+=2){const e=this.readBits(t);s[a]=e*i*(n[o+1]-n[o])+n[o]}const r=this.tmpCsCompsBuf;return this.context.colorFn&&this.context.colorFn(s,0,r,0),this.context.colorSpace.getRgb(r,0)}}let lZe=Object.create(null);function AZe(e){return lZe[e]||(lZe[e]=function(e){const t=[];for(let i=0;i<=e;i++){const n=i/e,s=1-n;t.push(new Float32Array([s**3,3*n*s**2,3*n**2*s,n**3]))}return t}(e))}const cZe=class e extends rZe{constructor(e,t,i,n,s){if(super(),!(e instanceof dWe))throw new EVe("Mesh data is not a stream");const r=e.dict;this.shadingType=r.get("ShadingType"),this.bbox=FWe(r.getArray("BBox"),null);const a=ije.parse({cs:r.getRaw("CS")||r.getRaw("ColorSpace"),xref:t,resources:i,pdfFunctionFactory:n,localColorSpaceCache:s});this.background=r.has("Background")?a.getRgb(r.get("Background"),0):null;const o=r.getRaw("Function"),l=o?n.createFromArray(o):null;this.coords=[],this.colors=[],this.figures=[];const A={bitsPerCoordinate:r.get("BitsPerCoordinate"),bitsPerComponent:r.get("BitsPerComponent"),bitsPerFlag:r.get("BitsPerFlag"),decode:r.getArray("Decode"),colorFn:l,colorSpace:a,numComps:l?1:a.numComps},c=new oZe(e,A);let u=!1;switch(this.shadingType){case eZe:this._decodeType4Shading(c);break;case tZe:const e=0|r.get("VerticesPerRow");if(e<2)throw new EVe("Invalid VerticesPerRow");this._decodeType5Shading(c,e);break;case iZe:this._decodeType6Shading(c),u=!0;break;case nZe:this._decodeType7Shading(c),u=!0;break;default:gVe("Unsupported mesh type.")}if(u){this._updateBounds();for(let e=0,t=this.figures.length;e<t;e++)this._buildFigureFromPatch(e)}this._updateBounds(),this._packData()}_decodeType4Shading(e){const t=this.coords,i=this.colors,n=[];let s=0;for(;e.hasData;){const r=e.readFlag(),a=e.readCoordinate(),o=e.readComponents();if(0===s){if(!(0<=r&&r<=2))throw new EVe("Unknown type4 flag");switch(r){case 0:s=3;break;case 1:n.push(n.at(-2),n.at(-1)),s=1;break;case 2:n.push(n.at(-3),n.at(-1)),s=1}}n.push(t.length),t.push(a),i.push(o),s--,e.align()}this.figures.push({type:"triangles",coords:new Int32Array(n),colors:new Int32Array(n)})}_decodeType5Shading(e,t){const i=this.coords,n=this.colors,s=[];for(;e.hasData;){const t=e.readCoordinate(),r=e.readComponents();s.push(i.length),i.push(t),n.push(r)}this.figures.push({type:"lattice",coords:new Int32Array(s),colors:new Int32Array(s),verticesPerRow:t})}_decodeType6Shading(e){const t=this.coords,i=this.colors,n=new Int32Array(16),s=new Int32Array(4);for(;e.hasData;){const r=e.readFlag();if(!(0<=r&&r<=3))throw new EVe("Unknown type6 flag");const a=t.length;for(let i=0,n=0!==r?8:12;i<n;i++)t.push(e.readCoordinate());const o=i.length;for(let t=0,n=0!==r?2:4;t<n;t++)i.push(e.readComponents());let l,A,c,u;switch(r){case 0:n[12]=a+3,n[13]=a+4,n[14]=a+5,n[15]=a+6,n[8]=a+2,n[11]=a+7,n[4]=a+1,n[7]=a+8,n[0]=a,n[1]=a+11,n[2]=a+10,n[3]=a+9,s[2]=o+1,s[3]=o+2,s[0]=o,s[1]=o+3;break;case 1:l=n[12],A=n[13],c=n[14],u=n[15],n[12]=u,n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=c,n[11]=a+3,n[4]=A,n[7]=a+4,n[0]=l,n[1]=a+7,n[2]=a+6,n[3]=a+5,l=s[2],A=s[3],s[2]=A,s[3]=o,s[0]=l,s[1]=o+1;break;case 2:l=n[15],A=n[11],n[12]=n[3],n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=n[7],n[11]=a+3,n[4]=A,n[7]=a+4,n[0]=l,n[1]=a+7,n[2]=a+6,n[3]=a+5,l=s[3],s[2]=s[1],s[3]=o,s[0]=l,s[1]=o+1;break;case 3:n[12]=n[0],n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=n[1],n[11]=a+3,n[4]=n[2],n[7]=a+4,n[0]=n[3],n[1]=a+7,n[2]=a+6,n[3]=a+5,s[2]=s[0],s[3]=o,s[0]=s[1],s[1]=o+1}n[5]=t.length,t.push([(-4*t[n[0]][0]-t[n[15]][0]+6*(t[n[4]][0]+t[n[1]][0])-2*(t[n[12]][0]+t[n[3]][0])+3*(t[n[13]][0]+t[n[7]][0]))/9,(-4*t[n[0]][1]-t[n[15]][1]+6*(t[n[4]][1]+t[n[1]][1])-2*(t[n[12]][1]+t[n[3]][1])+3*(t[n[13]][1]+t[n[7]][1]))/9]),n[6]=t.length,t.push([(-4*t[n[3]][0]-t[n[12]][0]+6*(t[n[2]][0]+t[n[7]][0])-2*(t[n[0]][0]+t[n[15]][0])+3*(t[n[4]][0]+t[n[14]][0]))/9,(-4*t[n[3]][1]-t[n[12]][1]+6*(t[n[2]][1]+t[n[7]][1])-2*(t[n[0]][1]+t[n[15]][1])+3*(t[n[4]][1]+t[n[14]][1]))/9]),n[9]=t.length,t.push([(-4*t[n[12]][0]-t[n[3]][0]+6*(t[n[8]][0]+t[n[13]][0])-2*(t[n[0]][0]+t[n[15]][0])+3*(t[n[11]][0]+t[n[1]][0]))/9,(-4*t[n[12]][1]-t[n[3]][1]+6*(t[n[8]][1]+t[n[13]][1])-2*(t[n[0]][1]+t[n[15]][1])+3*(t[n[11]][1]+t[n[1]][1]))/9]),n[10]=t.length,t.push([(-4*t[n[15]][0]-t[n[0]][0]+6*(t[n[11]][0]+t[n[14]][0])-2*(t[n[12]][0]+t[n[3]][0])+3*(t[n[2]][0]+t[n[8]][0]))/9,(-4*t[n[15]][1]-t[n[0]][1]+6*(t[n[11]][1]+t[n[14]][1])-2*(t[n[12]][1]+t[n[3]][1])+3*(t[n[2]][1]+t[n[8]][1]))/9]),this.figures.push({type:"patch",coords:new Int32Array(n),colors:new Int32Array(s)})}}_decodeType7Shading(e){const t=this.coords,i=this.colors,n=new Int32Array(16),s=new Int32Array(4);for(;e.hasData;){const r=e.readFlag();if(!(0<=r&&r<=3))throw new EVe("Unknown type7 flag");const a=t.length;for(let i=0,n=0!==r?12:16;i<n;i++)t.push(e.readCoordinate());const o=i.length;for(let t=0,n=0!==r?2:4;t<n;t++)i.push(e.readComponents());let l,A,c,u;switch(r){case 0:n[12]=a+3,n[13]=a+4,n[14]=a+5,n[15]=a+6,n[8]=a+2,n[9]=a+13,n[10]=a+14,n[11]=a+7,n[4]=a+1,n[5]=a+12,n[6]=a+15,n[7]=a+8,n[0]=a,n[1]=a+11,n[2]=a+10,n[3]=a+9,s[2]=o+1,s[3]=o+2,s[0]=o,s[1]=o+3;break;case 1:l=n[12],A=n[13],c=n[14],u=n[15],n[12]=u,n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=c,n[9]=a+9,n[10]=a+10,n[11]=a+3,n[4]=A,n[5]=a+8,n[6]=a+11,n[7]=a+4,n[0]=l,n[1]=a+7,n[2]=a+6,n[3]=a+5,l=s[2],A=s[3],s[2]=A,s[3]=o,s[0]=l,s[1]=o+1;break;case 2:l=n[15],A=n[11],n[12]=n[3],n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=n[7],n[9]=a+9,n[10]=a+10,n[11]=a+3,n[4]=A,n[5]=a+8,n[6]=a+11,n[7]=a+4,n[0]=l,n[1]=a+7,n[2]=a+6,n[3]=a+5,l=s[3],s[2]=s[1],s[3]=o,s[0]=l,s[1]=o+1;break;case 3:n[12]=n[0],n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=n[1],n[9]=a+9,n[10]=a+10,n[11]=a+3,n[4]=n[2],n[5]=a+8,n[6]=a+11,n[7]=a+4,n[0]=n[3],n[1]=a+7,n[2]=a+6,n[3]=a+5,s[2]=s[0],s[3]=o,s[0]=s[1],s[1]=o+1}this.figures.push({type:"patch",coords:new Int32Array(n),colors:new Int32Array(s)})}}_buildFigureFromPatch(t){const i=this.figures[t];pVe("patch"===i.type,"Unexpected patch mesh figure");const n=this.coords,s=this.colors,r=i.coords,a=i.colors,o=Math.min(n[r[0]][0],n[r[3]][0],n[r[12]][0],n[r[15]][0]),l=Math.min(n[r[0]][1],n[r[3]][1],n[r[12]][1],n[r[15]][1]),A=Math.max(n[r[0]][0],n[r[3]][0],n[r[12]][0],n[r[15]][0]),c=Math.max(n[r[0]][1],n[r[3]][1],n[r[12]][1],n[r[15]][1]);let u=Math.ceil((A-o)*e.TRIANGLE_DENSITY/(this.bounds[2]-this.bounds[0]));u=Math.max(e.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(e.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,u));let h=Math.ceil((c-l)*e.TRIANGLE_DENSITY/(this.bounds[3]-this.bounds[1]));h=Math.max(e.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(e.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,h));const d=u+1,g=new Int32Array((h+1)*d),p=new Int32Array((h+1)*d);let f=0;const m=new Uint8Array(3),C=new Uint8Array(3),I=s[a[0]],v=s[a[1]],B=s[a[2]],y=s[a[3]],b=AZe(h),E=AZe(u);for(let e=0;e<=h;e++){m[0]=(I[0]*(h-e)+B[0]*e)/h|0,m[1]=(I[1]*(h-e)+B[1]*e)/h|0,m[2]=(I[2]*(h-e)+B[2]*e)/h|0,C[0]=(v[0]*(h-e)+y[0]*e)/h|0,C[1]=(v[1]*(h-e)+y[1]*e)/h|0,C[2]=(v[2]*(h-e)+y[2]*e)/h|0;for(let t=0;t<=u;t++,f++){if(!(0!==e&&e!==h||0!==t&&t!==u))continue;let i=0,a=0,o=0;for(let s=0;s<=3;s++)for(let l=0;l<=3;l++,o++){const A=b[e][s]*E[t][l];i+=n[r[o]][0]*A,a+=n[r[o]][1]*A}g[f]=n.length,n.push([i,a]),p[f]=s.length;const l=new Uint8Array(3);l[0]=(m[0]*(u-t)+C[0]*t)/u|0,l[1]=(m[1]*(u-t)+C[1]*t)/u|0,l[2]=(m[2]*(u-t)+C[2]*t)/u|0,s.push(l)}}g[0]=r[0],p[0]=a[0],g[u]=r[3],p[u]=a[1],g[d*h]=r[12],p[d*h]=a[2],g[d*h+u]=r[15],p[d*h+u]=a[3],this.figures[t]={type:"lattice",coords:g,colors:p,verticesPerRow:d}}_updateBounds(){let e=this.coords[0][0],t=this.coords[0][1],i=e,n=t;for(let s=1,r=this.coords.length;s<r;s++){const r=this.coords[s][0],a=this.coords[s][1];e=e>r?r:e,t=t>a?a:t,i=i<r?r:i,n=n<a?a:n}this.bounds=[e,t,i,n]}_packData(){let e,t,i,n;const s=this.coords,r=new Float32Array(2*s.length);for(e=0,i=0,t=s.length;e<t;e++){const t=s[e];r[i++]=t[0],r[i++]=t[1]}this.coords=r;const a=this.colors,o=new Uint8Array(3*a.length);for(e=0,i=0,t=a.length;e<t;e++){const t=a[e];o[i++]=t[0],o[i++]=t[1],o[i++]=t[2]}this.colors=o;const l=this.figures;for(e=0,t=l.length;e<t;e++){const t=l[e],s=t.coords,r=t.colors;for(i=0,n=s.length;i<n;i++)s[i]*=2,r[i]*=3}}getIR(){const{bounds:e}=this;if(e[2]-e[0]==0||e[3]-e[1]==0)throw new EVe(`Invalid MeshShading bounds: [${e}].`);return["Mesh",this.shadingType,this.coords,this.colors,this.figures,e,this.bbox,this.background]}};Ic(cZe,"MIN_SPLIT_PATCH_CHUNKS_AMOUNT",3),Ic(cZe,"MAX_SPLIT_PATCH_CHUNKS_AMOUNT",20),Ic(cZe,"TRIANGLE_DENSITY",20);let uZe=cZe;class hZe extends rZe{getIR(){return["Dummy"]}}function dZe(e,t,i){const n=kWe(t.getArray("Matrix"),cKe),s=FWe(t.getArray("BBox"),null);if(!s||s[2]-s[0]==0||s[3]-s[1]==0)throw new EVe("Invalid getTilingPatternIR /BBox array.");const r=t.get("XStep");if("number"!=typeof r)throw new EVe("Invalid getTilingPatternIR /XStep value.");const a=t.get("YStep");if("number"!=typeof a)throw new EVe("Invalid getTilingPatternIR /YStep value.");const o=t.get("PaintType");if(!Number.isInteger(o))throw new EVe("Invalid getTilingPatternIR /PaintType value.");const l=t.get("TilingType");if(!Number.isInteger(l))throw new EVe("Invalid getTilingPatternIR /TilingType value.");return["TilingPattern",i,e,n,s,r,a,o,l]}const gZe=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.54657,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.73293,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.9121,.86943,.79795,.88198,.77958,.70864,.81055,.90399,.88653,.96017,.82577,.77892,.78257,.97507,1.54657,.97507,.85284,.89552,.90176,.88762,.8785,.75241,.8785,.90518,.95015,.77618,.8785,.88401,.91916,.86304,.88401,.91488,.8785,.8801,.8785,.8785,.91343,.7173,1.04106,.8785,.85075,.95794,.82616,.85162,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.12401,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.73293,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.9121,.86943,.86943,.86943,.86943,.86943,.85284,.87508,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.88762,.88762,.88762,.88762,.88762,.88762,.8715,.75241,.90518,.90518,.90518,.90518,.88401,.88401,.88401,.88401,.8785,.8785,.8801,.8801,.8801,.8801,.8801,.90747,.89049,.8785,.8785,.8785,.8785,.85162,.8785,.85162,.83908,.88762,.83908,.88762,.83908,.88762,.73293,.75241,.73293,.75241,.73293,.75241,.73293,.75241,.87289,.83016,.88506,.93125,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.81921,.77618,.81921,.77618,.81921,.77618,1,1,.87356,.8785,.91075,.89608,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76229,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.79468,.91926,.88175,.70823,.94903,.9121,.8785,1,1,.9121,.8785,.87802,.88656,.8785,.86943,.8801,.86943,.8801,.86943,.8801,.87402,.89291,.77958,.91343,1,1,.77958,.91343,.70864,.7173,.70864,.7173,.70864,.7173,.70864,.7173,1,1,.81055,.75841,.81055,1.06452,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.96017,.95794,.77892,.85162,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.88762,.77539,.8715,.87508,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70674,.98387,.94721,1.33431,1.45894,.95161,1.06303,.83908,.80352,.57184,.6965,.56289,.82001,.56029,.81235,1.02988,.83908,.7762,.68156,.80367,.73133,.78257,.87356,.86943,.95958,.75727,.89019,1.04924,.9121,.7648,.86943,.87356,.79795,.78275,.81055,.77892,.9762,.82577,.99819,.84896,.95958,.77892,.96108,1.01407,.89049,1.02988,.94211,.96108,.8936,.84021,.87842,.96399,.79109,.89049,1.00813,1.02988,.86077,.87445,.92099,.84723,.86513,.8801,.75638,.85714,.78216,.79586,.87965,.94211,.97747,.78287,.97926,.84971,1.02988,.94211,.8801,.94211,.84971,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90264,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.90518,1,1,1,1,1,1,1,1,1,1,1,1,.90548,1,1,1,1,1,1,.96017,.95794,.96017,.95794,.96017,.95794,.77892,.85162,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.92794,.87012,.87012,.87012,.89552,.89552,1.42259,.71143,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.93835,.83406,.91133,.84107,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90527,1.81055,.90527,1.81055,1.31006,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],pZe={lineHeight:1.2207,lineGap:.2207},fZe=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.56239,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.71805,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.90872,.85938,.79795,.87068,.77958,.69766,.81055,.90399,.88653,.96068,.82577,.77892,.78257,.97507,1.529,.97507,.85284,.89552,.90176,.94908,.86411,.74012,.86411,.88323,.95015,.86411,.86331,.88401,.91916,.86304,.88401,.9039,.86331,.86331,.86411,.86411,.90464,.70852,1.04106,.86331,.84372,.95794,.82616,.84548,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.19129,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.71805,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.90872,.85938,.85938,.85938,.85938,.85938,.85284,.87068,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.94908,.94908,.94908,.94908,.94908,.94908,.85887,.74012,.88323,.88323,.88323,.88323,.88401,.88401,.88401,.88401,.8785,.86331,.86331,.86331,.86331,.86331,.86331,.90747,.89049,.86331,.86331,.86331,.86331,.84548,.86411,.84548,.83908,.94908,.83908,.94908,.83908,.94908,.71805,.74012,.71805,.74012,.71805,.74012,.71805,.74012,.87289,.79538,.88506,.92726,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.81921,.86411,.81921,.86411,.81921,.86411,1,1,.87356,.86331,.91075,.8777,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76467,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.77312,.91926,.88175,.70823,.94903,.90872,.86331,1,1,.90872,.86331,.86906,.88116,.86331,.85938,.86331,.85938,.86331,.85938,.86331,.87402,.86549,.77958,.90464,1,1,.77958,.90464,.69766,.70852,.69766,.70852,.69766,.70852,.69766,.70852,1,1,.81055,.75841,.81055,1.06452,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.96068,.95794,.77892,.84548,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.94908,.77539,.85887,.87068,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70088,.98387,.94721,1.33431,1.45894,.95161,1.48387,.83908,.80352,.57118,.6965,.56347,.79179,.55853,.80346,1.02988,.83908,.7762,.67174,.86036,.73133,.78257,.87356,.86441,.95958,.75727,.89019,1.04924,.90872,.74889,.85938,.87891,.79795,.7957,.81055,.77892,.97447,.82577,.97466,.87179,.95958,.77892,.94252,.95612,.8753,1.02988,.92733,.94252,.87411,.84021,.8728,.95612,.74081,.8753,1.02189,1.02988,.84814,.87445,.91822,.84723,.85668,.86331,.81344,.87581,.76422,.82046,.96057,.92733,.99375,.78022,.95452,.86015,1.02988,.92733,.86331,.92733,.86015,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90631,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.88323,1,1,1,1,1,1,1,1,1,1,1,1,.85174,1,1,1,1,1,1,.96068,.95794,.96068,.95794,.96068,.95794,.77892,.84548,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.89807,.87012,.87012,.87012,.89552,.89552,1.42259,.71094,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.92972,.83406,.91133,.83326,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90616,1.81055,.90527,1.81055,1.3107,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],mZe={lineHeight:1.2207,lineGap:.2207},CZe=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39543,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.72346,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89249,.84118,.77452,.85374,.75186,.67789,.79776,.88844,.85066,.94309,.77818,.7306,.76659,1.10369,1.38313,1.10369,1.06139,.89552,.8739,.9245,.9245,.83203,.9245,.85865,1.09842,.9245,.9245,1.03297,1.07692,.90918,1.03297,.94959,.9245,.92274,.9245,.9245,1.02933,.77832,1.20562,.9245,.8916,.98986,.86621,.89453,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.16359,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.72346,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89249,.84118,.84118,.84118,.84118,.84118,.85284,.84557,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.9245,.9245,.9245,.9245,.9245,.9245,.84843,.83203,.85865,.85865,.85865,.85865,.82601,.82601,.82601,.82601,.94469,.9245,.92274,.92274,.92274,.92274,.92274,.90747,.86651,.9245,.9245,.9245,.9245,.89453,.9245,.89453,.8675,.9245,.8675,.9245,.8675,.9245,.72346,.83203,.72346,.83203,.72346,.83203,.72346,.83203,.85193,.8875,.86477,.99034,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.81105,.9245,.81105,.9245,.81105,.9245,1,1,.86275,.9245,.90872,.93591,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77896,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.9375,.98156,.93407,.77261,1.11429,.89249,.9245,1,1,.89249,.9245,.92534,.86698,.9245,.84118,.92274,.84118,.92274,.84118,.92274,.8667,.86291,.75186,1.02933,1,1,.75186,1.02933,.67789,.77832,.67789,.77832,.67789,.77832,.67789,.77832,1,1,.79776,.97655,.79776,1.23023,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.94309,.98986,.7306,.89453,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.9245,.76318,.84843,.84557,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67009,.96334,.93695,1.35191,1.40909,.95161,1.48387,.8675,.90861,.6192,.7363,.64824,.82411,.56321,.85696,1.23516,.8675,.81552,.7286,.84134,.73206,.76659,.86275,.84369,.90685,.77892,.85871,1.02638,.89249,.75828,.84118,.85984,.77452,.76466,.79776,.7306,.90782,.77818,.903,.87291,.90685,.7306,.99058,1.03667,.94635,1.23516,.9849,.99058,.92393,.8916,.942,1.03667,.75026,.94635,1.0297,1.23516,.90918,.94048,.98217,.89746,.84153,.92274,.82507,.88832,.84438,.88178,1.03525,.9849,1.00225,.78086,.97248,.89404,1.23516,.9849,.92274,.9849,.89404,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.89693,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.85865,1,1,1,1,1,1,1,1,1,1,1,1,.90933,1,1,1,1,1,1,.94309,.98986,.94309,.98986,.94309,.98986,.7306,.89453,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.68994,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.97858,.82616,.91133,.83437,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90572,1.81055,.90749,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85284,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],IZe={lineHeight:1.2207,lineGap:.2207},vZe=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39016,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.73834,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89385,.85122,.77452,.86503,.75186,.68887,.79776,.88844,.85066,.94258,.77818,.7306,.76659,1.10369,1.39016,1.10369,1.06139,.89552,.8739,.86128,.94469,.8457,.94469,.89464,1.09842,.84636,.94469,1.03297,1.07692,.90918,1.03297,.95897,.94469,.9482,.94469,.94469,1.04692,.78223,1.20562,.94469,.90332,.98986,.86621,.90527,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.08707,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.73834,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89385,.85122,.85122,.85122,.85122,.85122,.85284,.85311,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.86128,.86128,.86128,.86128,.86128,.86128,.8693,.8457,.89464,.89464,.89464,.89464,.82601,.82601,.82601,.82601,.94469,.94469,.9482,.9482,.9482,.9482,.9482,.90747,.86651,.94469,.94469,.94469,.94469,.90527,.94469,.90527,.8675,.86128,.8675,.86128,.8675,.86128,.73834,.8457,.73834,.8457,.73834,.8457,.73834,.8457,.85193,.92454,.86477,.9921,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.81105,.84636,.81105,.84636,.81105,.84636,1,1,.86275,.94469,.90872,.95786,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77741,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.90452,.98156,1.11842,.77261,1.11429,.89385,.94469,1,1,.89385,.94469,.95877,.86901,.94469,.85122,.9482,.85122,.9482,.85122,.9482,.8667,.90016,.75186,1.04692,1,1,.75186,1.04692,.68887,.78223,.68887,.78223,.68887,.78223,.68887,.78223,1,1,.79776,.92188,.79776,1.23023,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.94258,.98986,.7306,.90527,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.86128,.76318,.8693,.85311,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67742,.96334,.93695,1.35191,1.40909,.95161,1.48387,.86686,.90861,.62267,.74359,.65649,.85498,.56963,.88254,1.23516,.8675,.81552,.75443,.84503,.73206,.76659,.86275,.85122,.90685,.77892,.85746,1.02638,.89385,.75657,.85122,.86275,.77452,.74171,.79776,.7306,.95165,.77818,.89772,.88831,.90685,.7306,.98142,1.02191,.96576,1.23516,.99018,.98142,.9236,.89258,.94035,1.02191,.78848,.96576,.9561,1.23516,.90918,.92578,.95424,.89746,.83969,.9482,.80113,.89442,.85208,.86155,.98022,.99018,1.00452,.81209,.99247,.89181,1.23516,.99018,.9482,.99018,.89181,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.88844,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.89464,1,1,1,1,1,1,1,1,1,1,1,1,.96766,1,1,1,1,1,1,.94258,.98986,.94258,.98986,.94258,.98986,.7306,.90527,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.69043,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.99331,.82616,.91133,.84286,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90527,1.81055,.90527,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1.07185,.99413,.96334,1.08065,1,1,1,1,1,1,1,1,1,1,1],BZe={lineHeight:1.2207,lineGap:.2207},yZe=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.03374,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.00042,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.03828,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00034,.99977,1,.99997,1.00026,1.00078,1.00036,.99973,1.00013,1.0006,.99977,.99977,.99988,.85148,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,1.00069,1.00022,.99977,1.00001,.99984,1.00026,1.00001,1.00024,1.00001,.9999,1,1.0006,1.00001,1.00041,.99962,1.00026,1.0006,.99995,1.00041,.99942,.99973,.99927,1.00082,.99902,1.00026,1.00087,1.0006,1.00069,.99973,.99867,.99973,.9993,1.00026,1.00049,1.00056,1,.99988,.99935,.99995,.99954,1.00055,.99945,1.00032,1.0006,.99995,1.00026,.99995,1.00032,1.00001,1.00008,.99971,1.00019,.9994,1.00001,1.0006,1.00044,.99973,1.00023,1.00047,1,.99942,.99561,.99989,1.00035,.99977,1.00035,.99977,1.00019,.99944,1.00001,1.00021,.99926,1.00035,1.00035,.99942,1.00048,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.99989,1.00057,1.00001,.99936,1.00052,1.00012,.99996,1.00043,1,1.00035,.9994,.99976,1.00035,.99973,1.00052,1.00041,1.00119,1.00037,.99973,1.00002,.99986,1.00041,1.00041,.99902,.9996,1.00034,.99999,1.00026,.99999,1.00026,.99973,1.00052,.99973,1,.99973,1.00041,1.00075,.9994,1.0003,.99999,1,1.00041,.99955,1,.99915,.99973,.99973,1.00026,1.00119,.99955,.99973,1.0006,.99911,1.0006,1.00026,.99972,1.00026,.99902,1.00041,.99973,.99999,1,1,1.00038,1.0005,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,1.00047,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],bZe={lineHeight:1.2,lineGap:.2},EZe=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.0044,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99971,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.01011,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99977,1,1,1.00026,.99969,.99972,.99981,.9998,1.0006,.99977,.99977,1.00022,.91155,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,.99966,1.00022,1.00032,1.00001,.99944,1.00026,1.00001,.99968,1.00001,1.00047,1,1.0006,1.00001,.99981,1.00101,1.00026,1.0006,.99948,.99981,1.00064,.99973,.99942,1.00101,1.00061,1.00026,1.00069,1.0006,1.00014,.99973,1.01322,.99973,1.00065,1.00026,1.00012,.99923,1,1.00064,1.00076,.99948,1.00055,1.00063,1.00007,.99943,1.0006,.99948,1.00026,.99948,.99943,1.00001,1.00001,1.00029,1.00038,1.00035,1.00001,1.0006,1.0006,.99973,.99978,1.00001,1.00057,.99989,.99967,.99964,.99967,.99977,.99999,.99977,1.00038,.99977,1.00001,.99973,1.00066,.99967,.99967,1.00041,.99998,.99999,.99977,1.00022,.99967,1.00001,.99977,1.00026,.99964,1.00031,1.00001,.99999,.99999,1,1.00023,1,1,.99999,1.00035,1.00001,.99999,.99973,.99977,.99999,1.00058,.99973,.99973,.99955,.9995,1.00026,1.00026,1.00032,.99989,1.00034,.99999,1.00026,1.00026,1.00026,.99973,.45998,.99973,1.00026,.99973,1.00001,.99999,.99982,.99994,.99996,1,1.00042,1.00044,1.00029,1.00023,.99973,.99973,1.00026,.99949,1.00002,.99973,1.0006,1.0006,1.0006,.99975,1.00026,1.00026,1.00032,.98685,.99973,1.00026,1,1,.99966,1.00044,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1,.99973,.99971,.99978,1,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00098,1,1,1,1.00049,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],wZe={lineHeight:1.35,lineGap:.2},QZe=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.0288,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,.99946,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.06311,.99973,1.00024,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,1.00041,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.89547,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00001,1,1.00054,.99977,1.00084,1.00007,.99973,1.00013,.99924,1.00001,1.00001,.99945,.91221,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00001,.99999,.99977,.99933,1.00022,1.00054,1.00001,1.00065,1.00026,1.00001,1.0001,1.00001,1.00052,1,1.0006,1.00001,.99945,.99897,.99968,.99924,1.00036,.99945,.99949,1,1.0006,.99897,.99918,.99968,.99911,.99924,1,.99962,1.01487,1,1.0005,.99973,1.00012,1.00043,1,.99995,.99994,1.00036,.99947,1.00019,1.00063,1.00025,.99924,1.00036,.99973,1.00036,1.00025,1.00001,1.00001,1.00027,1.0001,1.00068,1.00001,1.0006,1.0006,1,1.00008,.99957,.99972,.9994,.99954,.99975,1.00051,1.00001,1.00019,1.00001,1.0001,.99986,1.00001,1.00001,1.00038,.99954,.99954,.9994,1.00066,.99999,.99977,1.00022,1.00054,1.00001,.99977,1.00026,.99975,1.0001,1.00001,.99993,.9995,.99955,1.00016,.99978,.99974,1.00019,1.00022,.99955,1.00053,.99973,1.00089,1.00005,.99967,1.00048,.99973,1.00002,1.00034,.99973,.99973,.99964,1.00006,1.00066,.99947,.99973,.98894,.99973,1,.44898,1,.99946,1,1.00039,1.00082,.99991,.99991,.99985,1.00022,1.00023,1.00061,1.00006,.99966,.99973,.99973,.99973,1.00019,1.0008,1,.99924,.99924,.99924,.99983,1.00044,.99973,.99964,.98332,1,.99973,1,1,.99962,.99895,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,1.00423,.99925,.99999,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00049,1,1.00245,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,1.00003,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],_Ze={lineHeight:1.35,lineGap:.2},SZe=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.04596,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,1.00019,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.02572,.99973,1.00005,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,.99999,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.84533,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99928,1,.99977,1.00013,1.00055,.99947,.99945,.99941,.99924,1.00001,1.00001,1.0004,.91621,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00005,.99999,.99977,1.00015,1.00022,.99977,1.00001,.99973,1.00026,1.00001,1.00019,1.00001,.99946,1,1.0006,1.00001,.99978,1.00045,.99973,.99924,1.00023,.99978,.99966,1,1.00065,1.00045,1.00019,.99973,.99973,.99924,1,1,.96499,1,1.00055,.99973,1.00008,1.00027,1,.9997,.99995,1.00023,.99933,1.00019,1.00015,1.00031,.99924,1.00023,.99973,1.00023,1.00031,1.00001,.99928,1.00029,1.00092,1.00035,1.00001,1.0006,1.0006,1,.99988,.99975,1,1.00082,.99561,.9996,1.00035,1.00001,.99962,1.00001,1.00092,.99964,1.00001,.99963,.99999,1.00035,1.00035,1.00082,.99962,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.9996,.99967,1.00001,1.00034,1.00074,1.00054,1.00053,1.00063,.99971,.99962,1.00035,.99975,.99977,.99973,1.00043,.99953,1.0007,.99915,.99973,1.00008,.99892,1.00073,1.00073,1.00114,.99915,1.00073,.99955,.99973,1.00092,.99973,1,.99998,1,1.0003,1,1.00043,1.00001,.99969,1.0003,1,1.00035,1.00001,.9995,1,1.00092,.99973,.99973,.99973,1.0007,.9995,1,.99924,1.0006,.99924,.99972,1.00062,.99973,1.00114,1.00073,1,.99955,1,1,1.00047,.99968,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,.99925,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],xZe={lineHeight:1.2,lineGap:.2},kZe=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,719,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,785,556,556,278,722,556,556,611,278,611,278,611,385,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,465,722,333,853,906,474,825,927,838,278,722,722,601,719,667,611,722,778,278,722,667,833,722,644,778,722,667,600,611,667,821,667,809,802,278,667,615,451,611,278,582,615,610,556,606,475,460,611,541,278,558,556,612,556,445,611,766,619,520,684,446,582,715,576,753,845,278,582,611,582,845,667,669,885,567,711,667,278,276,556,1094,1062,875,610,722,622,719,722,719,722,567,712,667,904,626,719,719,610,702,833,722,778,719,667,722,611,622,854,667,730,703,1005,1019,870,979,719,711,1031,719,556,618,615,417,635,556,709,497,615,615,500,635,740,604,611,604,611,556,490,556,875,556,615,581,833,844,729,854,615,552,854,583,556,556,611,417,552,556,278,281,278,969,906,611,500,615,556,604,778,611,487,447,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1094,556,885,489,1115,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],DZe=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],FZe=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,740,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,782,556,556,278,722,556,556,611,278,611,278,611,396,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,333,722,333,854,906,473,844,930,847,278,722,722,610,671,667,611,722,778,278,722,667,833,722,657,778,718,667,590,611,667,822,667,829,781,278,667,620,479,611,278,591,620,621,556,610,479,492,611,558,278,566,556,603,556,450,611,712,605,532,664,409,591,704,578,773,834,278,591,611,591,834,667,667,886,614,719,667,278,278,556,1094,1042,854,622,719,677,719,722,708,722,614,722,667,927,643,719,719,615,687,833,722,778,719,667,722,611,677,781,667,729,708,979,989,854,1e3,708,719,1042,729,556,619,604,534,618,556,736,510,611,611,507,622,740,604,611,611,611,556,889,556,885,556,646,583,889,935,707,854,594,552,865,589,556,556,611,469,563,556,278,278,278,969,906,611,507,619,556,611,778,611,575,467,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1104,556,885,516,1146,1e3,768,600,834,834,834,834,999,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],TZe=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],MZe=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,625,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,733,444,500,222,667,500,500,556,222,556,222,556,281,556,400,556,222,722,556,722,556,722,556,615,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,354,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,789,846,389,794,865,775,222,667,667,570,671,667,611,722,778,278,667,667,833,722,648,778,725,667,600,611,667,837,667,831,761,278,667,570,439,555,222,550,570,571,500,556,439,463,555,542,222,500,492,548,500,447,556,670,573,486,603,374,550,652,546,728,779,222,550,556,550,779,667,667,843,544,708,667,278,278,500,1066,982,844,589,715,639,724,667,651,667,544,704,667,917,614,715,715,589,686,833,722,778,725,667,722,611,639,795,667,727,673,920,923,805,886,651,694,1022,682,556,562,522,493,553,556,688,465,556,556,472,564,686,550,556,556,556,500,833,500,835,500,572,518,830,851,621,736,526,492,752,534,556,556,556,378,496,500,222,222,222,910,828,556,472,565,500,556,778,556,492,339,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1083,1e3,768,600,834,834,834,834,1e3,500,998,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,584,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],RZe=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],NZe=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,615,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,735,444,500,222,667,500,500,556,222,556,222,556,292,556,334,556,222,722,556,722,556,722,556,604,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,375,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,784,838,384,774,855,752,222,667,667,551,668,667,611,722,778,278,667,668,833,722,650,778,722,667,618,611,667,798,667,835,748,278,667,578,446,556,222,547,578,575,500,557,446,441,556,556,222,500,500,576,500,448,556,690,569,482,617,395,547,648,525,713,781,222,547,556,547,781,667,667,865,542,719,667,278,278,500,1057,1010,854,583,722,635,719,667,656,667,542,677,667,923,604,719,719,583,656,833,722,778,719,667,722,611,635,760,667,740,667,917,938,792,885,656,719,1010,722,556,573,531,365,583,556,669,458,559,559,438,583,688,552,556,542,556,500,458,500,823,500,573,521,802,823,625,719,521,510,750,542,556,556,556,365,510,500,222,278,222,906,812,556,438,559,500,552,778,556,489,411,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1073,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],LZe=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],UZe=[1.36898,1,1,.72706,.80479,.83734,.98894,.99793,.9897,.93884,.86209,.94292,.94292,1.16661,1.02058,.93582,.96694,.93582,1.19137,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.78076,.78076,1.02058,1.02058,1.02058,.72851,.78966,.90838,.83637,.82391,.96376,.80061,.86275,.8768,.95407,1.0258,.73901,.85022,.83655,1.0156,.95546,.92179,.87107,.92179,.82114,.8096,.89713,.94438,.95353,.94083,.91905,.90406,.9446,.94292,1.18777,.94292,1.02058,.89903,.90088,.94938,.97898,.81093,.97571,.94938,1.024,.9577,.95933,.98621,1.0474,.97455,.98981,.9672,.95933,.9446,.97898,.97407,.97646,.78036,1.10208,.95442,.95298,.97579,.9332,.94039,.938,.80687,1.01149,.80687,1.02058,.80479,.99793,.99793,.99793,.99793,1.01149,1.00872,.90088,.91882,1.0213,.8361,1.02058,.62295,.54324,.89022,1.08595,1,1,.90088,1,.97455,.93582,.90088,1,1.05686,.8361,.99642,.99642,.99642,.72851,.90838,.90838,.90838,.90838,.90838,.90838,.868,.82391,.80061,.80061,.80061,.80061,1.0258,1.0258,1.0258,1.0258,.97484,.95546,.92179,.92179,.92179,.92179,.92179,1.02058,.92179,.94438,.94438,.94438,.94438,.90406,.86958,.98225,.94938,.94938,.94938,.94938,.94938,.94938,.9031,.81093,.94938,.94938,.94938,.94938,.98621,.98621,.98621,.98621,.93969,.95933,.9446,.9446,.9446,.9446,.9446,1.08595,.9446,.95442,.95442,.95442,.95442,.94039,.97898,.94039,.90838,.94938,.90838,.94938,.90838,.94938,.82391,.81093,.82391,.81093,.82391,.81093,.82391,.81093,.96376,.84313,.97484,.97571,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.8768,.9577,.8768,.9577,.8768,.9577,1,1,.95407,.95933,.97069,.95933,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,.887,1.01591,.73901,1.0474,1,1,.97455,.83655,.98981,1,1,.83655,.73977,.83655,.73903,.84638,1.033,.95546,.95933,1,1,.95546,.95933,.8271,.95417,.95933,.92179,.9446,.92179,.9446,.92179,.9446,.936,.91964,.82114,.97646,1,1,.82114,.97646,.8096,.78036,.8096,.78036,1,1,.8096,.78036,1,1,.89713,.77452,.89713,1.10208,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94083,.97579,.90406,.94039,.90406,.9446,.938,.9446,.938,.9446,.938,1,.99793,.90838,.94938,.868,.9031,.92179,.9446,1,1,.89713,1.10208,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90989,.9358,.91945,.83181,.75261,.87992,.82976,.96034,.83689,.97268,1.0078,.90838,.83637,.8019,.90157,.80061,.9446,.95407,.92436,1.0258,.85022,.97153,1.0156,.95546,.89192,.92179,.92361,.87107,.96318,.89713,.93704,.95638,.91905,.91709,.92796,1.0258,.93704,.94836,1.0373,.95933,1.0078,.95871,.94836,.96174,.92601,.9498,.98607,.95776,.95933,1.05453,1.0078,.98275,.9314,.95617,.91701,1.05993,.9446,.78367,.9553,1,.86832,1.0128,.95871,.99394,.87548,.96361,.86774,1.0078,.95871,.9446,.95871,.86774,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.94083,.97579,.94083,.97579,.94083,.97579,.90406,.94039,.96694,1,.89903,1,1,1,.93582,.93582,.93582,1,.908,.908,.918,.94219,.94219,.96544,1,1.285,1,1,.81079,.81079,1,1,.74854,1,1,1,1,.99793,1,1,1,.65,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.17173,1,.80535,.76169,1.02058,1.0732,1.05486,1,1,1.30692,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.16161,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],HZe={lineHeight:1.2,lineGap:.2},PZe=[1.36898,1,1,.66227,.80779,.81625,.97276,.97276,.97733,.92222,.83266,.94292,.94292,1.16148,1.02058,.93582,.96694,.93582,1.17337,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.78076,.78076,1.02058,1.02058,1.02058,.71541,.76813,.85576,.80591,.80729,.94299,.77512,.83655,.86523,.92222,.98621,.71743,.81698,.79726,.98558,.92222,.90637,.83809,.90637,.80729,.76463,.86275,.90699,.91605,.9154,.85308,.85458,.90531,.94292,1.21296,.94292,1.02058,.89903,1.18616,.99613,.91677,.78216,.91677,.90083,.98796,.9135,.92168,.95381,.98981,.95298,.95381,.93459,.92168,.91513,.92004,.91677,.95077,.748,1.04502,.91677,.92061,.94236,.89544,.89364,.9,.80687,.8578,.80687,1.02058,.80779,.97276,.97276,.97276,.97276,.8578,.99973,1.18616,.91339,1.08074,.82891,1.02058,.55509,.71526,.89022,1.08595,1,1,1.18616,1,.96736,.93582,1.18616,1,1.04864,.82711,.99043,.99043,.99043,.71541,.85576,.85576,.85576,.85576,.85576,.85576,.845,.80729,.77512,.77512,.77512,.77512,.98621,.98621,.98621,.98621,.95961,.92222,.90637,.90637,.90637,.90637,.90637,1.02058,.90251,.90699,.90699,.90699,.90699,.85458,.83659,.94951,.99613,.99613,.99613,.99613,.99613,.99613,.85811,.78216,.90083,.90083,.90083,.90083,.95381,.95381,.95381,.95381,.9135,.92168,.91513,.91513,.91513,.91513,.91513,1.08595,.91677,.91677,.91677,.91677,.91677,.89364,.92332,.89364,.85576,.99613,.85576,.99613,.85576,.99613,.80729,.78216,.80729,.78216,.80729,.78216,.80729,.78216,.94299,.76783,.95961,.91677,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.86523,.9135,.86523,.9135,.86523,.9135,1,1,.92222,.92168,.92222,.92168,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.86036,.97096,.71743,.98981,1,1,.95298,.79726,.95381,1,1,.79726,.6894,.79726,.74321,.81691,1.0006,.92222,.92168,1,1,.92222,.92168,.79464,.92098,.92168,.90637,.91513,.90637,.91513,.90637,.91513,.909,.87514,.80729,.95077,1,1,.80729,.95077,.76463,.748,.76463,.748,1,1,.76463,.748,1,1,.86275,.72651,.86275,1.04502,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.9154,.94236,.85458,.89364,.85458,.90531,.9,.90531,.9,.90531,.9,1,.97276,.85576,.99613,.845,.85811,.90251,.91677,1,1,.86275,1.04502,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.00899,1.30628,.85576,.80178,.66862,.7927,.69323,.88127,.72459,.89711,.95381,.85576,.80591,.7805,.94729,.77512,.90531,.92222,.90637,.98621,.81698,.92655,.98558,.92222,.85359,.90637,.90976,.83809,.94523,.86275,.83509,.93157,.85308,.83392,.92346,.98621,.83509,.92886,.91324,.92168,.95381,.90646,.92886,.90557,.86847,.90276,.91324,.86842,.92168,.99531,.95381,.9224,.85408,.92699,.86847,1.0051,.91513,.80487,.93481,1,.88159,1.05214,.90646,.97355,.81539,.89398,.85923,.95381,.90646,.91513,.90646,.85923,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.9154,.94236,.9154,.94236,.9154,.94236,.85458,.89364,.96694,1,.89903,1,1,1,.91782,.91782,.91782,1,.896,.896,.896,.9332,.9332,.95973,1,1.26,1,1,.80479,.80178,1,1,.85633,1,1,1,1,.97276,1,1,1,.698,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.14542,1,.79199,.78694,1.02058,1.03493,1.05486,1,1,1.23026,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.20006,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],OZe={lineHeight:1.2,lineGap:.2},GZe=[1.36898,1,1,.65507,.84943,.85639,.88465,.88465,.86936,.88307,.86948,.85283,.85283,1.06383,1.02058,.75945,.9219,.75945,1.17337,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.75945,.75945,1.02058,1.02058,1.02058,.69046,.70926,.85158,.77812,.76852,.89591,.70466,.76125,.80094,.86822,.83864,.728,.77212,.79475,.93637,.87514,.8588,.76013,.8588,.72421,.69866,.77598,.85991,.80811,.87832,.78112,.77512,.8562,1.0222,1.18417,1.0222,1.27014,.89903,1.15012,.93859,.94399,.846,.94399,.81453,1.0186,.94219,.96017,1.03075,1.02175,.912,1.03075,.96998,.96017,.93859,.94399,.94399,.95493,.746,1.12658,.94578,.91,.979,.882,.882,.83,.85034,.83537,.85034,1.02058,.70869,.88465,.88465,.88465,.88465,.83537,.90083,1.15012,.9161,.94565,.73541,1.02058,.53609,.69353,.79519,1.08595,1,1,1.15012,1,.91974,.75945,1.15012,1,.9446,.73361,.9005,.9005,.9005,.62864,.85158,.85158,.85158,.85158,.85158,.85158,.773,.76852,.70466,.70466,.70466,.70466,.83864,.83864,.83864,.83864,.90561,.87514,.8588,.8588,.8588,.8588,.8588,1.02058,.85751,.85991,.85991,.85991,.85991,.77512,.76013,.88075,.93859,.93859,.93859,.93859,.93859,.93859,.8075,.846,.81453,.81453,.81453,.81453,.82424,.82424,.82424,.82424,.9278,.96017,.93859,.93859,.93859,.93859,.93859,1.08595,.8562,.94578,.94578,.94578,.94578,.882,.94578,.882,.85158,.93859,.85158,.93859,.85158,.93859,.76852,.846,.76852,.846,.76852,.846,.76852,.846,.89591,.8544,.90561,.94399,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.80094,.94219,.80094,.94219,.80094,.94219,1,1,.86822,.96017,.86822,.96017,.83864,.82424,.83864,.82424,.83864,.82424,.83864,1.03075,.83864,.82424,.81402,1.02738,.728,1.02175,1,1,.912,.79475,1.03075,1,1,.79475,.83911,.79475,.66266,.80553,1.06676,.87514,.96017,1,1,.87514,.96017,.86865,.87396,.96017,.8588,.93859,.8588,.93859,.8588,.93859,.867,.84759,.72421,.95493,1,1,.72421,.95493,.69866,.746,.69866,.746,1,1,.69866,.746,1,1,.77598,.88417,.77598,1.12658,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.87832,.979,.77512,.882,.77512,.8562,.83,.8562,.83,.8562,.83,1,.88465,.85158,.93859,.773,.8075,.85751,.8562,1,1,.77598,1.12658,1.15012,1.15012,1.15012,1.15012,1.15012,1.15313,1.15012,1.15012,1.15012,1.08106,1.03901,.85158,.77025,.62264,.7646,.65351,.86026,.69461,.89947,1.03075,.85158,.77812,.76449,.88836,.70466,.8562,.86822,.8588,.83864,.77212,.85308,.93637,.87514,.82352,.8588,.85701,.76013,.89058,.77598,.8156,.82565,.78112,.77899,.89386,.83864,.8156,.9486,.92388,.96186,1.03075,.91123,.9486,.93298,.878,.93942,.92388,.84596,.96186,.95119,1.03075,.922,.88787,.95829,.88,.93559,.93859,.78815,.93758,1,.89217,1.03737,.91123,.93969,.77487,.85769,.86799,1.03075,.91123,.93859,.91123,.86799,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.87832,.979,.87832,.979,.87832,.979,.77512,.882,.9219,1,.89903,1,1,1,.87321,.87321,.87321,1,1.027,1.027,1.027,.86847,.86847,.79121,1,1.124,1,1,.73572,.73572,1,1,.85034,1,1,1,1,.88465,1,1,1,.669,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.04828,1,.74948,.75187,1.02058,.98391,1.02119,1,1,1.06233,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05233,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],KZe={lineHeight:1.2,lineGap:.2},qZe=[1.36898,1,1,.76305,.82784,.94935,.89364,.92241,.89073,.90706,.98472,.85283,.85283,1.0664,1.02058,.74505,.9219,.74505,1.23456,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.74505,.74505,1.02058,1.02058,1.02058,.73002,.72601,.91755,.8126,.80314,.92222,.73764,.79726,.83051,.90284,.86023,.74,.8126,.84869,.96518,.91115,.8858,.79761,.8858,.74498,.73914,.81363,.89591,.83659,.89633,.85608,.8111,.90531,1.0222,1.22736,1.0222,1.27014,.89903,.90088,.86667,1.0231,.896,1.01411,.90083,1.05099,1.00512,.99793,1.05326,1.09377,.938,1.06226,1.00119,.99793,.98714,1.0231,1.01231,.98196,.792,1.19137,.99074,.962,1.01915,.926,.942,.856,.85034,.92006,.85034,1.02058,.69067,.92241,.92241,.92241,.92241,.92006,.9332,.90088,.91882,.93484,.75339,1.02058,.56866,.54324,.79519,1.08595,1,1,.90088,1,.95325,.74505,.90088,1,.97198,.75339,.91009,.91009,.91009,.66466,.91755,.91755,.91755,.91755,.91755,.91755,.788,.80314,.73764,.73764,.73764,.73764,.86023,.86023,.86023,.86023,.92915,.91115,.8858,.8858,.8858,.8858,.8858,1.02058,.8858,.89591,.89591,.89591,.89591,.8111,.79611,.89713,.86667,.86667,.86667,.86667,.86667,.86667,.86936,.896,.90083,.90083,.90083,.90083,.84224,.84224,.84224,.84224,.97276,.99793,.98714,.98714,.98714,.98714,.98714,1.08595,.89876,.99074,.99074,.99074,.99074,.942,1.0231,.942,.91755,.86667,.91755,.86667,.91755,.86667,.80314,.896,.80314,.896,.80314,.896,.80314,.896,.92222,.93372,.92915,1.01411,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.83051,1.00512,.83051,1.00512,.83051,1.00512,1,1,.90284,.99793,.90976,.99793,.86023,.84224,.86023,.84224,.86023,.84224,.86023,1.05326,.86023,.84224,.82873,1.07469,.74,1.09377,1,1,.938,.84869,1.06226,1,1,.84869,.83704,.84869,.81441,.85588,1.08927,.91115,.99793,1,1,.91115,.99793,.91887,.90991,.99793,.8858,.98714,.8858,.98714,.8858,.98714,.894,.91434,.74498,.98196,1,1,.74498,.98196,.73914,.792,.73914,.792,1,1,.73914,.792,1,1,.81363,.904,.81363,1.19137,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89633,1.01915,.8111,.942,.8111,.90531,.856,.90531,.856,.90531,.856,1,.92241,.91755,.86667,.788,.86936,.8858,.89876,1,1,.81363,1.19137,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90388,1.03901,.92138,.78105,.7154,.86169,.80513,.94007,.82528,.98612,1.06226,.91755,.8126,.81884,.92819,.73764,.90531,.90284,.8858,.86023,.8126,.91172,.96518,.91115,.83089,.8858,.87791,.79761,.89297,.81363,.88157,.89992,.85608,.81992,.94307,.86023,.88157,.95308,.98699,.99793,1.06226,.95817,.95308,.97358,.928,.98088,.98699,.92761,.99793,.96017,1.06226,.986,.944,.95978,.938,.96705,.98714,.80442,.98972,1,.89762,1.04552,.95817,.99007,.87064,.91879,.88888,1.06226,.95817,.98714,.95817,.88888,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.89633,1.01915,.89633,1.01915,.89633,1.01915,.8111,.942,.9219,1,.89903,1,1,1,.93173,.93173,.93173,1,1.06304,1.06304,1.06904,.89903,.89903,.80549,1,1.156,1,1,.76575,.76575,1,1,.72458,1,1,1,1,.92241,1,1,1,.619,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.07257,1,.74705,.71119,1.02058,1.024,1.02119,1,1,1.1536,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05638,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],YZe={lineHeight:1.2,lineGap:.2},VZe=[1.76738,1,1,.99297,.9824,1.04016,1.06497,1.03424,.97529,1.17647,1.23203,1.1085,1.1085,1.16939,1.2107,.9754,1.21408,.9754,1.59578,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,.81378,.81378,1.2107,1.2107,1.2107,.71703,.97847,.97363,.88776,.8641,1.02096,.79795,.85132,.914,1.06085,1.1406,.8007,.89858,.83693,1.14889,1.09398,.97489,.92094,.97489,.90399,.84041,.95923,1.00135,1,1.06467,.98243,.90996,.99361,1.1085,1.56942,1.1085,1.2107,.74627,.94282,.96752,1.01519,.86304,1.01359,.97278,1.15103,1.01359,.98561,1.02285,1.02285,1.00527,1.02285,1.0302,.99041,1.0008,1.01519,1.01359,1.02258,.79104,1.16862,.99041,.97454,1.02511,.99298,.96752,.95801,.94856,1.16579,.94856,1.2107,.9824,1.03424,1.03424,1,1.03424,1.16579,.8727,1.3871,1.18622,1.10818,1.04478,1.2107,1.18622,.75155,.94994,1.28826,1.21408,1.21408,.91056,1,.91572,.9754,.64663,1.18328,1.24866,1.04478,1.14169,1.15749,1.17389,.71703,.97363,.97363,.97363,.97363,.97363,.97363,.93506,.8641,.79795,.79795,.79795,.79795,1.1406,1.1406,1.1406,1.1406,1.02096,1.09398,.97426,.97426,.97426,.97426,.97426,1.2107,.97489,1.00135,1.00135,1.00135,1.00135,.90996,.92094,1.02798,.96752,.96752,.96752,.96752,.96752,.96752,.93136,.86304,.97278,.97278,.97278,.97278,1.02285,1.02285,1.02285,1.02285,.97122,.99041,1,1,1,1,1,1.28826,1.0008,.99041,.99041,.99041,.99041,.96752,1.01519,.96752,.97363,.96752,.97363,.96752,.97363,.96752,.8641,.86304,.8641,.86304,.8641,.86304,.8641,.86304,1.02096,1.03057,1.02096,1.03517,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.914,1.01359,.914,1.01359,.914,1.01359,1,1,1.06085,.98561,1.06085,1.00879,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,.97138,1.08692,.8007,1.02285,1,1,1.00527,.83693,1.02285,1,1,.83693,.9455,.83693,.90418,.83693,1.13005,1.09398,.99041,1,1,1.09398,.99041,.96692,1.09251,.99041,.97489,1.0008,.97489,1.0008,.97489,1.0008,.93994,.97931,.90399,1.02258,1,1,.90399,1.02258,.84041,.79104,.84041,.79104,.84041,.79104,.84041,.79104,1,1,.95923,1.07034,.95923,1.16862,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.06467,1.02511,.90996,.96752,.90996,.99361,.95801,.99361,.95801,.99361,.95801,1.07733,1.03424,.97363,.96752,.93506,.93136,.97489,1.0008,1,1,.95923,1.16862,1.15103,1.15103,1.01173,1.03959,.75953,.81378,.79912,1.15103,1.21994,.95161,.87815,1.01149,.81525,.7676,.98167,1.01134,1.02546,.84097,1.03089,1.18102,.97363,.88776,.85134,.97826,.79795,.99361,1.06085,.97489,1.1406,.89858,1.0388,1.14889,1.09398,.86039,.97489,1.0595,.92094,.94793,.95923,.90996,.99346,.98243,1.02112,.95493,1.1406,.90996,1.03574,1.02597,1.0008,1.18102,1.06628,1.03574,1.0192,1.01932,1.00886,.97531,1.0106,1.0008,1.13189,1.18102,1.02277,.98683,1.0016,.99561,1.07237,1.0008,.90434,.99921,.93803,.8965,1.23085,1.06628,1.04983,.96268,1.0499,.98439,1.18102,1.06628,1.0008,1.06628,.98439,.79795,1,1,1,1,1,1,1,1,1,1,1,1,1.09466,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.97278,1,1,1,1,1,1,1,1,1,1,1,1,1.02065,1,1,1,1,1,1,1.06467,1.02511,1.06467,1.02511,1.06467,1.02511,.90996,.96752,1,1.21408,.89903,1,1,.75155,1.04394,1.04394,1.04394,1.04394,.98633,.98633,.98633,.73047,.73047,1.20642,.91211,1.25635,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.12454,.93503,1.03424,1.19687,1.03424,1,1,1,.771,1,1,1.15749,1.15749,1.15749,1.10948,.86279,.94434,.86279,.94434,.86182,1,1,1.16897,1,.96085,.90137,1.2107,1.18416,1.13973,.69825,.9716,2.10339,1.29004,1.29004,1.21172,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18874,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.09193,1.09193,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],WZe={lineHeight:1.33008,lineGap:0},jZe=[1.76738,1,1,.98946,1.03959,1.04016,1.02809,1.036,.97639,1.10953,1.23203,1.11144,1.11144,1.16939,1.21237,.9754,1.21261,.9754,1.59754,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,.81378,.81378,1.21237,1.21237,1.21237,.73541,.97847,.97363,.89723,.87897,1.0426,.79429,.85292,.91149,1.05815,1.1406,.79631,.90128,.83853,1.04396,1.10615,.97552,.94436,.97552,.88641,.80527,.96083,1.00135,1,1.06777,.9817,.91142,.99361,1.11144,1.57293,1.11144,1.21237,.74627,1.31818,1.06585,.97042,.83055,.97042,.93503,1.1261,.97042,.97922,1.14236,.94552,1.01054,1.14236,1.02471,.97922,.94165,.97042,.97042,1.0276,.78929,1.1261,.97922,.95874,1.02197,.98507,.96752,.97168,.95107,1.16579,.95107,1.21237,1.03959,1.036,1.036,1,1.036,1.16579,.87357,1.31818,1.18754,1.26781,1.05356,1.21237,1.18622,.79487,.94994,1.29004,1.24047,1.24047,1.31818,1,.91484,.9754,1.31818,1.1349,1.24866,1.05356,1.13934,1.15574,1.17389,.73541,.97363,.97363,.97363,.97363,.97363,.97363,.94385,.87897,.79429,.79429,.79429,.79429,1.1406,1.1406,1.1406,1.1406,1.0426,1.10615,.97552,.97552,.97552,.97552,.97552,1.21237,.97552,1.00135,1.00135,1.00135,1.00135,.91142,.94436,.98721,1.06585,1.06585,1.06585,1.06585,1.06585,1.06585,.96705,.83055,.93503,.93503,.93503,.93503,1.14236,1.14236,1.14236,1.14236,.93125,.97922,.94165,.94165,.94165,.94165,.94165,1.29004,.94165,.97922,.97922,.97922,.97922,.96752,.97042,.96752,.97363,1.06585,.97363,1.06585,.97363,1.06585,.87897,.83055,.87897,.83055,.87897,.83055,.87897,.83055,1.0426,1.0033,1.0426,.97042,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.91149,.97042,.91149,.97042,.91149,.97042,1,1,1.05815,.97922,1.05815,.97922,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,.97441,1.04302,.79631,1.01582,1,1,1.01054,.83853,1.14236,1,1,.83853,1.09125,.83853,.90418,.83853,1.19508,1.10615,.97922,1,1,1.10615,.97922,1.01034,1.10466,.97922,.97552,.94165,.97552,.94165,.97552,.94165,.91602,.91981,.88641,1.0276,1,1,.88641,1.0276,.80527,.78929,.80527,.78929,.80527,.78929,.80527,.78929,1,1,.96083,1.05403,.95923,1.16862,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.06777,1.02197,.91142,.96752,.91142,.99361,.97168,.99361,.97168,.99361,.97168,1.23199,1.036,.97363,1.06585,.94385,.96705,.97552,.94165,1,1,.96083,1.1261,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,.95161,1.27126,1.00811,.83284,.77702,.99137,.95253,1.0347,.86142,1.07205,1.14236,.97363,.89723,.86869,1.09818,.79429,.99361,1.05815,.97552,1.1406,.90128,1.06662,1.04396,1.10615,.84918,.97552,1.04694,.94436,.98015,.96083,.91142,1.00356,.9817,1.01945,.98999,1.1406,.91142,1.04961,.9898,1.00639,1.14236,1.07514,1.04961,.99607,1.02897,1.008,.9898,.95134,1.00639,1.11121,1.14236,1.00518,.97981,1.02186,1,1.08578,.94165,.99314,.98387,.93028,.93377,1.35125,1.07514,1.10687,.93491,1.04232,1.00351,1.14236,1.07514,.94165,1.07514,1.00351,.79429,1,1,1,1,1,1,1,1,1,1,1,1,1.09097,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.93503,1,1,1,1,1,1,1,1,1,1,1,1,.96609,1,1,1,1,1,1,1.06777,1.02197,1.06777,1.02197,1.06777,1.02197,.91142,.96752,1,1.21261,.89903,1,1,.75155,1.04745,1.04745,1.04745,1.04394,.98633,.98633,.98633,.72959,.72959,1.20502,.91406,1.26514,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.09125,.93327,1.03336,1.16541,1.036,1,1,1,.771,1,1,1.15574,1.15574,1.15574,1.15574,.86364,.94434,.86279,.94434,.86224,1,1,1.16798,1,.96085,.90068,1.21237,1.18416,1.13904,.69825,.9716,2.10339,1.29004,1.29004,1.21339,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18775,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.13269,1.13269,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],JZe={lineHeight:1.33008,lineGap:0},zZe=[1.76738,1,1,.98946,1.14763,1.05365,1.06234,.96927,.92586,1.15373,1.18414,.91349,.91349,1.07403,1.17308,.78383,1.20088,.78383,1.42531,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78383,.78383,1.17308,1.17308,1.17308,.77349,.94565,.94729,.85944,.88506,.9858,.74817,.80016,.88449,.98039,.95782,.69238,.89898,.83231,.98183,1.03989,.96924,.86237,.96924,.80595,.74524,.86091,.95402,.94143,.98448,.8858,.83089,.93285,1.0949,1.39016,1.0949,1.45994,.74627,1.04839,.97454,.97454,.87207,.97454,.87533,1.06151,.97454,1.00176,1.16484,1.08132,.98047,1.16484,1.02989,1.01054,.96225,.97454,.97454,1.06598,.79004,1.16344,1.00351,.94629,.9973,.91016,.96777,.9043,.91082,.92481,.91082,1.17308,.95748,.96927,.96927,1,.96927,.92481,.80597,1.04839,1.23393,1.1781,.9245,1.17308,1.20808,.63218,.94261,1.24822,1.09971,1.09971,1.04839,1,.85273,.78032,1.04839,1.09971,1.22326,.9245,1.09836,1.13525,1.15222,.70424,.94729,.94729,.94729,.94729,.94729,.94729,.85498,.88506,.74817,.74817,.74817,.74817,.95782,.95782,.95782,.95782,.9858,1.03989,.96924,.96924,.96924,.96924,.96924,1.17308,.96924,.95402,.95402,.95402,.95402,.83089,.86237,.88409,.97454,.97454,.97454,.97454,.97454,.97454,.92916,.87207,.87533,.87533,.87533,.87533,.93146,.93146,.93146,.93146,.93854,1.01054,.96225,.96225,.96225,.96225,.96225,1.24822,.8761,1.00351,1.00351,1.00351,1.00351,.96777,.97454,.96777,.94729,.97454,.94729,.97454,.94729,.97454,.88506,.87207,.88506,.87207,.88506,.87207,.88506,.87207,.9858,.95391,.9858,.97454,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.88449,.97454,.88449,.97454,.88449,.97454,1,1,.98039,1.00176,.98039,1.00176,.95782,.93146,.95782,.93146,.95782,.93146,.95782,1.16484,.95782,.93146,.84421,1.12761,.69238,1.08132,1,1,.98047,.83231,1.16484,1,1,.84723,1.04861,.84723,.78755,.83231,1.23736,1.03989,1.01054,1,1,1.03989,1.01054,.9857,1.03849,1.01054,.96924,.96225,.96924,.96225,.96924,.96225,.92383,.90171,.80595,1.06598,1,1,.80595,1.06598,.74524,.79004,.74524,.79004,.74524,.79004,.74524,.79004,1,1,.86091,1.02759,.85771,1.16344,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.98448,.9973,.83089,.96777,.83089,.93285,.9043,.93285,.9043,.93285,.9043,1.31868,.96927,.94729,.97454,.85498,.92916,.96924,.8761,1,1,.86091,1.16344,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,.81965,.81965,.94729,.78032,.71022,.90883,.84171,.99877,.77596,1.05734,1.2,.94729,.85944,.82791,.9607,.74817,.93285,.98039,.96924,.95782,.89898,.98316,.98183,1.03989,.78614,.96924,.97642,.86237,.86075,.86091,.83089,.90082,.8858,.97296,1.01284,.95782,.83089,1.0976,1.04,1.03342,1.2,1.0675,1.0976,.98205,1.03809,1.05097,1.04,.95364,1.03342,1.05401,1.2,1.02148,1.0119,1.04724,1.0127,1.02732,.96225,.8965,.97783,.93574,.94818,1.30679,1.0675,1.11826,.99821,1.0557,1.0326,1.2,1.0675,.96225,1.0675,1.0326,.74817,1,1,1,1,1,1,1,1,1,1,1,1,1.03754,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.87533,1,1,1,1,1,1,1,1,1,1,1,1,.98705,1,1,1,1,1,1,.98448,.9973,.98448,.9973,.98448,.9973,.83089,.96777,1,1.20088,.89903,1,1,.75155,.94945,.94945,.94945,.94945,1.12317,1.12317,1.12317,.67603,.67603,1.15621,.73584,1.21191,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87709,.96927,1.01473,.96927,1,1,1,.77295,1,1,1.09836,1.09836,1.09836,1.01522,.86321,.94434,.8649,.94434,.86182,1,1,1.083,1,.91578,.86438,1.17308,1.18416,1.14589,.69825,.97622,1.96791,1.24822,1.24822,1.17308,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.17984,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10742,1.10742,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],XZe={lineHeight:1.33008,lineGap:0},$Ze=[1.76738,1,1,.98594,1.02285,1.10454,1.06234,.96927,.92037,1.19985,1.2046,.90616,.90616,1.07152,1.1714,.78032,1.20088,.78032,1.40246,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78032,.78032,1.1714,1.1714,1.1714,.80597,.94084,.96706,.85944,.85734,.97093,.75842,.79936,.88198,.9831,.95782,.71387,.86969,.84636,1.07796,1.03584,.96924,.83968,.96924,.82826,.79649,.85771,.95132,.93119,.98965,.88433,.8287,.93365,1.08612,1.3638,1.08612,1.45786,.74627,.80499,.91484,1.05707,.92383,1.05882,.9403,1.12654,1.05882,1.01756,1.09011,1.09011,.99414,1.09011,1.034,1.01756,1.05356,1.05707,1.05882,1.04399,.84863,1.21968,1.01756,.95801,1.00068,.91797,.96777,.9043,.90351,.92105,.90351,1.1714,.85337,.96927,.96927,.99912,.96927,.92105,.80597,1.2434,1.20808,1.05937,.90957,1.1714,1.20808,.75155,.94261,1.24644,1.09971,1.09971,.84751,1,.85273,.78032,.61584,1.05425,1.17914,.90957,1.08665,1.11593,1.14169,.73381,.96706,.96706,.96706,.96706,.96706,.96706,.86035,.85734,.75842,.75842,.75842,.75842,.95782,.95782,.95782,.95782,.97093,1.03584,.96924,.96924,.96924,.96924,.96924,1.1714,.96924,.95132,.95132,.95132,.95132,.8287,.83968,.89049,.91484,.91484,.91484,.91484,.91484,.91484,.93575,.92383,.9403,.9403,.9403,.9403,.8717,.8717,.8717,.8717,1.00527,1.01756,1.05356,1.05356,1.05356,1.05356,1.05356,1.24644,.95923,1.01756,1.01756,1.01756,1.01756,.96777,1.05707,.96777,.96706,.91484,.96706,.91484,.96706,.91484,.85734,.92383,.85734,.92383,.85734,.92383,.85734,.92383,.97093,1.0969,.97093,1.05882,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.88198,1.05882,.88198,1.05882,.88198,1.05882,1,1,.9831,1.01756,.9831,1.01756,.95782,.8717,.95782,.8717,.95782,.8717,.95782,1.09011,.95782,.8717,.84784,1.11551,.71387,1.09011,1,1,.99414,.84636,1.09011,1,1,.84636,1.0536,.84636,.94298,.84636,1.23297,1.03584,1.01756,1,1,1.03584,1.01756,1.00323,1.03444,1.01756,.96924,1.05356,.96924,1.05356,.96924,1.05356,.93066,.98293,.82826,1.04399,1,1,.82826,1.04399,.79649,.84863,.79649,.84863,.79649,.84863,.79649,.84863,1,1,.85771,1.17318,.85771,1.21968,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.98965,1.00068,.8287,.96777,.8287,.93365,.9043,.93365,.9043,.93365,.9043,1.08571,.96927,.96706,.91484,.86035,.93575,.96924,.95923,1,1,.85771,1.21968,1.11437,1.11437,.93109,.91202,.60411,.84164,.55572,1.01173,.97361,.81818,.81818,.96635,.78032,.72727,.92366,.98601,1.03405,.77968,1.09799,1.2,.96706,.85944,.85638,.96491,.75842,.93365,.9831,.96924,.95782,.86969,.94152,1.07796,1.03584,.78437,.96924,.98715,.83968,.83491,.85771,.8287,.94492,.88433,.9287,1.0098,.95782,.8287,1.0625,.98248,1.03424,1.2,1.01071,1.0625,.95246,1.03809,1.04912,.98248,1.00221,1.03424,1.05443,1.2,1.04785,.99609,1.00169,1.05176,.99346,1.05356,.9087,1.03004,.95542,.93117,1.23362,1.01071,1.07831,1.02512,1.05205,1.03502,1.2,1.01071,1.05356,1.01071,1.03502,.75842,1,1,1,1,1,1,1,1,1,1,1,1,1.03719,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.9403,1,1,1,1,1,1,1,1,1,1,1,1,1.04021,1,1,1,1,1,1,.98965,1.00068,.98965,1.00068,.98965,1.00068,.8287,.96777,1,1.20088,.89903,1,1,.75155,1.03077,1.03077,1.03077,1.03077,1.13196,1.13196,1.13196,.67428,.67428,1.16039,.73291,1.20996,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87796,.96927,1.01518,.96927,1,1,1,.77295,1,1,1.10539,1.10539,1.11358,1.06967,.86279,.94434,.86279,.94434,.86182,1,1,1.083,1,.91578,.86507,1.1714,1.18416,1.14589,.69825,.97622,1.9697,1.24822,1.24822,1.17238,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18083,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10938,1.10938,1,1,1,1.05425,1.09971,1.09971,1.09971,1,1,1,1,1,1,1,1,1,1,1],ZZe={lineHeight:1.33008,lineGap:0},e0e=pWe((function(e){e["MyriadPro-Regular"]=e["PdfJS-Fallback-Regular"]={name:"LiberationSans-Regular",factors:qZe,baseWidths:NZe,baseMapping:LZe,metrics:YZe},e["MyriadPro-Bold"]=e["PdfJS-Fallback-Bold"]={name:"LiberationSans-Bold",factors:UZe,baseWidths:kZe,baseMapping:DZe,metrics:HZe},e["MyriadPro-It"]=e["MyriadPro-Italic"]=e["PdfJS-Fallback-Italic"]={name:"LiberationSans-Italic",factors:GZe,baseWidths:MZe,baseMapping:RZe,metrics:KZe},e["MyriadPro-BoldIt"]=e["MyriadPro-BoldItalic"]=e["PdfJS-Fallback-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:PZe,baseWidths:FZe,baseMapping:TZe,metrics:OZe},e.ArialMT=e.Arial=e["Arial-Regular"]={name:"LiberationSans-Regular",baseWidths:NZe,baseMapping:LZe},e["Arial-BoldMT"]=e["Arial-Bold"]={name:"LiberationSans-Bold",baseWidths:kZe,baseMapping:DZe},e["Arial-ItalicMT"]=e["Arial-Italic"]={name:"LiberationSans-Italic",baseWidths:MZe,baseMapping:RZe},e["Arial-BoldItalicMT"]=e["Arial-BoldItalic"]={name:"LiberationSans-BoldItalic",baseWidths:FZe,baseMapping:TZe},e["Calibri-Regular"]={name:"LiberationSans-Regular",factors:vZe,baseWidths:NZe,baseMapping:LZe,metrics:BZe},e["Calibri-Bold"]={name:"LiberationSans-Bold",factors:gZe,baseWidths:kZe,baseMapping:DZe,metrics:pZe},e["Calibri-Italic"]={name:"LiberationSans-Italic",factors:CZe,baseWidths:MZe,baseMapping:RZe,metrics:IZe},e["Calibri-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:fZe,baseWidths:FZe,baseMapping:TZe,metrics:mZe},e["Segoeui-Regular"]={name:"LiberationSans-Regular",factors:$Ze,baseWidths:NZe,baseMapping:LZe,metrics:ZZe},e["Segoeui-Bold"]={name:"LiberationSans-Bold",factors:VZe,baseWidths:kZe,baseMapping:DZe,metrics:WZe},e["Segoeui-Italic"]={name:"LiberationSans-Italic",factors:zZe,baseWidths:MZe,baseMapping:RZe,metrics:XZe},e["Segoeui-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:jZe,baseWidths:FZe,baseMapping:TZe,metrics:JZe},e["Helvetica-Regular"]=e.Helvetica={name:"LiberationSans-Regular",factors:SZe,baseWidths:NZe,baseMapping:LZe,metrics:xZe},e["Helvetica-Bold"]={name:"LiberationSans-Bold",factors:yZe,baseWidths:kZe,baseMapping:DZe,metrics:bZe},e["Helvetica-Italic"]={name:"LiberationSans-Italic",factors:QZe,baseWidths:MZe,baseMapping:RZe,metrics:_Ze},e["Helvetica-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:EZe,baseWidths:FZe,baseMapping:TZe,metrics:wZe}}));function t0e(e){const t=mXe(e);return e0e()[t]}function i0e(e){const t=function(e){const t=t0e(e);if(!t)return null;const{baseWidths:i,baseMapping:n,factors:s}=t,r=s?i.map(((e,t)=>e*s[t])):i;let a,o=-2;const l=[];for(const[A,c]of n.map(((e,t)=>[e,t])).sort((([e],[t])=>e-t)))-1!==A&&(A===o+1?(a.push(r[c]),o+=1):(o=A,a=[r[c]],l.push(A,a)));return l}(e),i=new rWe(null);i.set("BaseFont",iWe.get(e)),i.set("Type",iWe.get("Font")),i.set("Subtype",iWe.get("CIDFontType2")),i.set("Encoding",iWe.get("Identity-H")),i.set("CIDToGIDMap",iWe.get("Identity")),i.set("W",t),i.set("FirstChar",t[0]),i.set("LastChar",t.at(-2)+t.at(-1).length-1);const n=new rWe(null);i.set("FontDescriptor",n);const s=new rWe(null);return s.set("Ordering","Identity"),s.set("Registry","Adobe"),s.set("Supplement",0),i.set("CIDSystemInfo",s),i}class n0e{constructor(e){this.lexer=e,this.operators=[],this.token=null,this.prev=null}nextToken(){this.prev=this.token,this.token=this.lexer.getToken()}accept(e){return this.token.type===e&&(this.nextToken(),!0)}expect(e){if(this.accept(e))return!0;throw new EVe(`Unexpected symbol: found ${this.token.type} expected ${e}.`)}parse(){return this.nextToken(),this.expect(s0e.LBRACE),this.parseBlock(),this.expect(s0e.RBRACE),this.operators}parseBlock(){for(;;)if(this.accept(s0e.NUMBER))this.operators.push(this.prev.value);else if(this.accept(s0e.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(s0e.LBRACE))return;this.parseCondition()}}parseCondition(){const e=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(s0e.RBRACE),this.accept(s0e.IF))this.operators[e]=this.operators.length,this.operators[e+1]="jz";else{if(!this.accept(s0e.LBRACE))throw new EVe("PS Function: error parsing conditional.");{const t=this.operators.length;this.operators.push(null,null);const i=this.operators.length;this.parseBlock(),this.expect(s0e.RBRACE),this.expect(s0e.IFELSE),this.operators[t]=this.operators.length,this.operators[t+1]="j",this.operators[e]=i,this.operators[e+1]="jz"}}}}const s0e={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};class r0e{static get opCache(){return mVe(this,"opCache",Object.create(null))}constructor(e,t){this.type=e,this.value=t}static getOperator(e){var t;return(t=r0e.opCache)[e]||(t[e]=new r0e(s0e.OPERATOR,e))}static get LBRACE(){return mVe(this,"LBRACE",new r0e(s0e.LBRACE,"{"))}static get RBRACE(){return mVe(this,"RBRACE",new r0e(s0e.RBRACE,"}"))}static get IF(){return mVe(this,"IF",new r0e(s0e.IF,"IF"))}static get IFELSE(){return mVe(this,"IFELSE",new r0e(s0e.IFELSE,"IFELSE"))}}class a0e{constructor(e){this.stream=e,this.nextChar(),this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(t<0)return $Ve;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!SWe(t))break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new r0e(s0e.NUMBER,this.getNumber());case 123:return this.nextChar(),r0e.LBRACE;case 125:return this.nextChar(),r0e.RBRACE}const i=this.strBuf;for(i.length=0,i[0]=String.fromCharCode(t);(t=this.nextChar())>=0&&(t>=65&&t<=90||t>=97&&t<=122);)i.push(String.fromCharCode(t));const n=i.join("");switch(n.toLowerCase()){case"if":return r0e.IF;case"ifelse":return r0e.IFELSE;default:return r0e.getOperator(n)}}getNumber(){let e=this.currentChar;const t=this.strBuf;for(t.length=0,t[0]=String.fromCharCode(e);(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));const i=parseFloat(t.join(""));if(isNaN(i))throw new EVe(`Invalid floating point number: ${i}`);return i}}class o0e{constructor(e){this._onlyRefs=!0===(null==e?void 0:e.onlyRefs),this._onlyRefs||(this._nameRefMap=new Map,this._imageMap=new Map),this._imageCache=new lWe}getByName(e){this._onlyRefs&&gVe("Should not call `getByName` method.");const t=this._nameRefMap.get(e);return t?this.getByRef(t):this._imageMap.get(e)||null}getByRef(e){return this._imageCache.get(e)||null}set(e,t,i){gVe("Abstract method `set` called.")}}class l0e extends o0e{set(e,t=null,i){if("string"!=typeof e)throw new Error('LocalImageCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,i)}this._imageMap.has(e)||this._imageMap.set(e,i)}}class A0e extends o0e{set(e=null,t=null,i){if("string"!=typeof e&&!t)throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(t){if(this._imageCache.has(t))return;return null!==e&&this._nameRefMap.set(e,t),void this._imageCache.put(t,i)}this._imageMap.has(e)||this._imageMap.set(e,i)}}class c0e extends o0e{constructor(e){super({onlyRefs:!0})}set(e=null,t,i){if(!t)throw new Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,i)}}class u0e extends o0e{set(e,t=null,i){if("string"!=typeof e)throw new Error('LocalGStateCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,i)}this._imageMap.has(e)||this._imageMap.set(e,i)}}class h0e extends o0e{constructor(e){super({onlyRefs:!0})}set(e=null,t,i){if(!t)throw new Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,i)}}class d0e extends o0e{constructor(e){super({onlyRefs:!0})}set(e=null,t,i){if(!t)throw new Error('RegionalImageCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,i)}}const g0e=class e{constructor(){yc(this,FA),yc(this,DA,new oWe),this._refCache=new lWe,this._imageCache=new lWe}shouldCache(t,i){let n=this._refCache.get(t);return n||(n=new Set,this._refCache.put(t,n)),n.add(i),!(n.size<e.NUM_PAGES_THRESHOLD)&&!(!this._imageCache.has(t)&&Bc(this,FA,MA))}addDecodeFailed(e){Bc(this,DA).put(e)}hasDecodeFailed(e){return Bc(this,DA).has(e)}addByteSize(e,t){const i=this._imageCache.get(e);i&&(i.byteSize||(i.byteSize=t))}getData(t,i){const n=this._refCache.get(t);if(!n)return null;if(n.size<e.NUM_PAGES_THRESHOLD)return null;const s=this._imageCache.get(t);return s?(n.add(i),s):null}setData(e,t){if(!this._refCache.has(e))throw new Error('GlobalImageCache.setData - expected "shouldCache" to have been called.');this._imageCache.has(e)||Bc(this,FA,MA)||this._imageCache.put(e,t)}clear(e=!1){e||(Bc(this,DA).clear(),this._refCache.clear()),this._imageCache.clear()}};DA=new WeakMap,FA=new WeakSet,TA=function(){let e=0;for(const t of this._imageCache)e+=t.byteSize;return e},MA=function(){return!(this._imageCache.size<g0e.MIN_IMAGES_TO_CACHE)&&!(Bc(this,FA,TA)<g0e.MAX_BYTE_SIZE)},Ic(g0e,"NUM_PAGES_THRESHOLD",2),Ic(g0e,"MIN_IMAGES_TO_CACHE",10),Ic(g0e,"MAX_BYTE_SIZE",5e7);let p0e=g0e;class f0e{constructor({xref:e,isEvalSupported:t=!0}){this.xref=e,this.isEvalSupported=!1!==t}create(e){const t=this.getCached(e);if(t)return t;const i=C0e.parse({xref:this.xref,isEvalSupported:this.isEvalSupported,fn:e instanceof aWe?this.xref.fetch(e):e});return this._cache(e,i),i}createFromArray(e){const t=this.getCached(e);if(t)return t;const i=C0e.parseArray({xref:this.xref,isEvalSupported:this.isEvalSupported,fnObj:e instanceof aWe?this.xref.fetch(e):e});return this._cache(e,i),i}getCached(e){var t;let i;if(e instanceof aWe?i=e:e instanceof rWe?i=e.objId:e instanceof dWe&&(i=null==(t=e.dict)?void 0:t.objId),i){const e=this._localFunctionCache.getByRef(i);if(e)return e}return null}_cache(e,t){var i;if(!t)throw new Error('PDFFunctionFactory._cache - expected "parsedFunction" argument.');let n;e instanceof aWe?n=e:e instanceof rWe?n=e.objId:e instanceof dWe&&(n=null==(i=e.dict)?void 0:i.objId),n&&this._localFunctionCache.set(null,n,t)}get _localFunctionCache(){return mVe(this,"_localFunctionCache",new c0e)}}function m0e(e){return Array.isArray(e)?xWe(e,null)?e:e.map((e=>+e)):null}class C0e{static getSampleArray(e,t,i,n){let s,r,a=1;for(s=0,r=e.length;s<r;s++)a*=e[s];a*=t;const o=new Array(a);let l=0,A=0;const c=1/(2**i-1),u=n.getBytes((a*i+7)/8);let h=0;for(s=0;s<a;s++){for(;l<i;)A<<=8,A|=u[h++],l+=8;l-=i,o[s]=(A>>l)*c,A&=(1<<l)-1}return o}static parse({xref:e,isEvalSupported:t,fn:i}){const n=i.dict||i;switch(n.get("FunctionType")){case 0:return this.constructSampled({xref:e,isEvalSupported:t,fn:i,dict:n});case 1:break;case 2:return this.constructInterpolated({xref:e,isEvalSupported:t,dict:n});case 3:return this.constructStiched({xref:e,isEvalSupported:t,dict:n});case 4:return this.constructPostScript({xref:e,isEvalSupported:t,fn:i,dict:n})}throw new EVe("Unknown type of function")}static parseArray({xref:e,isEvalSupported:t,fnObj:i}){if(!Array.isArray(i))return this.parse({xref:e,isEvalSupported:t,fn:i});const n=[];for(const s of i)n.push(this.parse({xref:e,isEvalSupported:t,fn:e.fetchIfRef(s)}));return function(e,t,i,s){for(let r=0,a=n.length;r<a;r++)n[r](e,t,i,s+r)}}static constructSampled({xref:e,isEvalSupported:t,fn:i,dict:n}){function s(e){const t=e.length,i=[];let n=0;for(let s=0;s<t;s+=2)i[n++]=[e[s],e[s+1]];return i}function r(e,t,i,n,s){return n+(s-n)/(i-t)*(e-t)}let a=m0e(n.getArray("Domain")),o=m0e(n.getArray("Range"));if(!a||!o)throw new EVe("No domain or range");const l=a.length/2,A=o.length/2;a=s(a),o=s(o);const c=m0e(n.getArray("Size")),u=n.get("BitsPerSample");n.get("Order");let h=m0e(n.getArray("Encode"));if(h)h=s(h);else{h=[];for(let e=0;e<l;++e)h.push([0,c[e]-1])}let d=m0e(n.getArray("Decode"));d=d?s(d):o;const g=this.getSampleArray(c,A,u,i);return function(e,t,i,n){const s=1<<l,u=new Float64Array(s),p=new Uint32Array(s);let f,m;for(m=0;m<s;m++)u[m]=1;let C=A,I=1;for(f=0;f<l;++f){const i=a[f][0],n=a[f][1];let o=r(Math.min(Math.max(e[t+f],i),n),i,n,h[f][0],h[f][1]);const l=c[f];o=Math.min(Math.max(o,0),l-1);const A=o<l-1?Math.floor(o):o-1,d=A+1-o,g=o-A,v=A*C,B=v+C;for(m=0;m<s;m++)m&I?(u[m]*=g,p[m]+=B):(u[m]*=d,p[m]+=v);C*=l,I<<=1}for(m=0;m<A;++m){let e=0;for(f=0;f<s;f++)e+=g[p[f]+m]*u[f];e=r(e,0,1,d[m][0],d[m][1]),i[n+m]=Math.min(Math.max(e,o[m][0]),o[m][1])}}}static constructInterpolated({xref:e,isEvalSupported:t,dict:i}){const n=m0e(i.getArray("C0"))||[0],s=m0e(i.getArray("C1"))||[1],r=i.get("N"),a=[];for(let l=0,A=n.length;l<A;++l)a.push(s[l]-n[l]);const o=a.length;return function(e,t,i,s){const l=1===r?e[t]:e[t]**r;for(let r=0;r<o;++r)i[s+r]=n[r]+l*a[r]}}static constructStiched({xref:e,isEvalSupported:t,dict:i}){const n=m0e(i.getArray("Domain"));if(!n)throw new EVe("No domain");if(1!==n.length/2)throw new EVe("Bad domain for stiched function");const s=[];for(const l of i.get("Functions"))s.push(this.parse({xref:e,isEvalSupported:t,fn:e.fetchIfRef(l)}));const r=m0e(i.getArray("Bounds")),a=m0e(i.getArray("Encode")),o=new Float32Array(1);return function(e,t,i,l){const A=(c=e[t],u=n[0],h=n[1],c>h?c=h:c<u&&(c=u),c);var c,u,h;const d=r.length;let g;for(g=0;g<d&&!(A<r[g]);++g);let p=n[0];g>0&&(p=r[g-1]);let f=n[1];g<r.length&&(f=r[g]);const m=a[2*g],C=a[2*g+1];o[0]=p===f?m:m+(A-p)*(C-m)/(f-p),s[g](o,0,i,l)}}static constructPostScript({xref:e,isEvalSupported:t,fn:i,dict:n}){const s=m0e(n.getArray("Domain")),r=m0e(n.getArray("Range"));if(!s)throw new EVe("No domain.");if(!r)throw new EVe("No range.");const a=new a0e(i),o=new n0e(a).parse();if(t&&kVe.isEvalSupported){const e=(new R0e).compile(o,s,r);if(e)return new Function("src","srcOffset","dest","destOffset",e)}const l=r.length>>1,A=s.length>>1,c=new y0e(o),u=Object.create(null);let h=8192;const d=new Float32Array(A);return function(e,t,i,n){let s,a,o="";const g=d;for(s=0;s<A;s++)a=e[t+s],g[s]=a,o+=a+"_";const p=u[o];if(void 0!==p)return void i.set(p,n);const f=new Float32Array(l),m=c.execute(g),C=m.length-l;for(s=0;s<l;s++){a=m[C+s];let e=r[2*s];a<e?a=e:(e=r[2*s+1],a>e&&(a=e)),f[s]=a}h>0&&(h--,u[o]=f),i.set(f,n)}}}function I0e(e){let t;if(e instanceof rWe)t=e;else{if(!(e instanceof dWe))return!1;t=e.dict}return t.has("FunctionType")}const v0e=class e{constructor(e){this.stack=e?Array.from(e):[]}push(t){if(this.stack.length>=e.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(t)}pop(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}copy(t){if(this.stack.length+t>=e.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");const i=this.stack;for(let e=i.length-t,n=t-1;n>=0;n--,e++)i.push(i[e])}index(e){this.push(this.stack[this.stack.length-e-1])}roll(e,t){const i=this.stack,n=i.length-e,s=i.length-1,r=n+(t-Math.floor(t/e)*e);for(let a=n,o=s;a<o;a++,o--){const e=i[a];i[a]=i[o],i[o]=e}for(let a=n,o=r-1;a<o;a++,o--){const e=i[a];i[a]=i[o],i[o]=e}for(let a=r,o=s;a<o;a++,o--){const e=i[a];i[a]=i[o],i[o]=e}}};Ic(v0e,"MAX_STACK_SIZE",100);let B0e=v0e;class y0e{constructor(e){this.operators=e}execute(e){const t=new B0e(e);let i=0;const n=this.operators,s=n.length;let r,a,o;for(;i<s;)if(r=n[i++],"number"!=typeof r)switch(r){case"jz":o=t.pop(),a=t.pop(),a||(i=o);break;case"j":a=t.pop(),i=a;break;case"abs":a=t.pop(),t.push(Math.abs(a));break;case"add":o=t.pop(),a=t.pop(),t.push(a+o);break;case"and":o=t.pop(),a=t.pop(),"boolean"==typeof a&&"boolean"==typeof o?t.push(a&&o):t.push(a&o);break;case"atan":o=t.pop(),a=t.pop(),a=Math.atan2(a,o)/Math.PI*180,a<0&&(a+=360),t.push(a);break;case"bitshift":o=t.pop(),a=t.pop(),a>0?t.push(a<<o):t.push(a>>o);break;case"ceiling":a=t.pop(),t.push(Math.ceil(a));break;case"copy":a=t.pop(),t.copy(a);break;case"cos":a=t.pop(),t.push(Math.cos(a%360/180*Math.PI));break;case"cvi":a=0|t.pop(),t.push(a);break;case"cvr":break;case"div":o=t.pop(),a=t.pop(),t.push(a/o);break;case"dup":t.copy(1);break;case"eq":o=t.pop(),a=t.pop(),t.push(a===o);break;case"exch":t.roll(2,1);break;case"exp":o=t.pop(),a=t.pop(),t.push(a**o);break;case"false":t.push(!1);break;case"floor":a=t.pop(),t.push(Math.floor(a));break;case"ge":o=t.pop(),a=t.pop(),t.push(a>=o);break;case"gt":o=t.pop(),a=t.pop(),t.push(a>o);break;case"idiv":o=t.pop(),a=t.pop(),t.push(a/o|0);break;case"index":a=t.pop(),t.index(a);break;case"le":o=t.pop(),a=t.pop(),t.push(a<=o);break;case"ln":a=t.pop(),t.push(Math.log(a));break;case"log":a=t.pop(),t.push(Math.log10(a));break;case"lt":o=t.pop(),a=t.pop(),t.push(a<o);break;case"mod":o=t.pop(),a=t.pop(),t.push(a%o);break;case"mul":o=t.pop(),a=t.pop(),t.push(a*o);break;case"ne":o=t.pop(),a=t.pop(),t.push(a!==o);break;case"neg":a=t.pop(),t.push(-a);break;case"not":a=t.pop(),"boolean"==typeof a?t.push(!a):t.push(~a);break;case"or":o=t.pop(),a=t.pop(),"boolean"==typeof a&&"boolean"==typeof o?t.push(a||o):t.push(a|o);break;case"pop":t.pop();break;case"roll":o=t.pop(),a=t.pop(),t.roll(a,o);break;case"round":a=t.pop(),t.push(Math.round(a));break;case"sin":a=t.pop(),t.push(Math.sin(a%360/180*Math.PI));break;case"sqrt":a=t.pop(),t.push(Math.sqrt(a));break;case"sub":o=t.pop(),a=t.pop(),t.push(a-o);break;case"true":t.push(!0);break;case"truncate":a=t.pop(),a=a<0?Math.ceil(a):Math.floor(a),t.push(a);break;case"xor":o=t.pop(),a=t.pop(),"boolean"==typeof a&&"boolean"==typeof o?t.push(a!==o):t.push(a^o);break;default:throw new EVe(`Unknown operator ${r}`)}else t.push(r);return t.stack}}class b0e{constructor(e){this.type=e}visit(e){gVe("abstract method")}}class E0e extends b0e{constructor(e,t,i){super("args"),this.index=e,this.min=t,this.max=i}visit(e){e.visitArgument(this)}}class w0e extends b0e{constructor(e){super("literal"),this.number=e,this.min=e,this.max=e}visit(e){e.visitLiteral(this)}}class Q0e extends b0e{constructor(e,t,i,n,s){super("binary"),this.op=e,this.arg1=t,this.arg2=i,this.min=n,this.max=s}visit(e){e.visitBinaryOperation(this)}}class _0e extends b0e{constructor(e,t){super("max"),this.arg=e,this.min=e.min,this.max=t}visit(e){e.visitMin(this)}}class S0e extends b0e{constructor(e,t,i){super("var"),this.index=e,this.min=t,this.max=i}visit(e){e.visitVariable(this)}}class x0e extends b0e{constructor(e,t){super("definition"),this.variable=e,this.arg=t}visit(e){e.visitVariableDefinition(this)}}class k0e{constructor(){this.parts=[]}visitArgument(e){this.parts.push("Math.max(",e.min,", Math.min(",e.max,", src[srcOffset + ",e.index,"]))")}visitVariable(e){this.parts.push("v",e.index)}visitLiteral(e){this.parts.push(e.number)}visitBinaryOperation(e){this.parts.push("("),e.arg1.visit(this),this.parts.push(" ",e.op," "),e.arg2.visit(this),this.parts.push(")")}visitVariableDefinition(e){this.parts.push("var "),e.variable.visit(this),this.parts.push(" = "),e.arg.visit(this),this.parts.push(";")}visitMin(e){this.parts.push("Math.min("),e.arg.visit(this),this.parts.push(", ",e.max,")")}toString(){return this.parts.join("")}}function D0e(e,t){return"literal"===t.type&&0===t.number?e:"literal"===e.type&&0===e.number?t:"literal"===t.type&&"literal"===e.type?new w0e(e.number+t.number):new Q0e("+",e,t,e.min+t.min,e.max+t.max)}function F0e(e,t){if("literal"===t.type){if(0===t.number)return new w0e(0);if(1===t.number)return e;if("literal"===e.type)return new w0e(e.number*t.number)}if("literal"===e.type){if(0===e.number)return new w0e(0);if(1===e.number)return t}const i=Math.min(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max),n=Math.max(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max);return new Q0e("*",e,t,i,n)}function T0e(e,t){if("literal"===t.type){if(0===t.number)return e;if("literal"===e.type)return new w0e(e.number-t.number)}return"binary"===t.type&&"-"===t.op&&"literal"===e.type&&1===e.number&&"literal"===t.arg1.type&&1===t.arg1.number?t.arg2:new Q0e("-",e,t,e.min-t.max,e.max-t.min)}function M0e(e,t){return e.min>=t?new w0e(t):e.max<=t?e:new _0e(e,t)}class R0e{compile(e,t,i){const n=[],s=[],r=t.length>>1,a=i.length>>1;let o,l,A,c,u,h,d,g,p=0;for(let m=0;m<r;m++)n.push(new E0e(m,t[2*m],t[2*m+1]));for(let m=0,C=e.length;m<C;m++)if(g=e[m],"number"!=typeof g)switch(g){case"add":if(n.length<2)return null;c=n.pop(),A=n.pop(),n.push(D0e(A,c));break;case"cvr":if(n.length<1)return null;break;case"mul":if(n.length<2)return null;c=n.pop(),A=n.pop(),n.push(F0e(A,c));break;case"sub":if(n.length<2)return null;c=n.pop(),A=n.pop(),n.push(T0e(A,c));break;case"exch":if(n.length<2)return null;u=n.pop(),h=n.pop(),n.push(u,h);break;case"pop":if(n.length<1)return null;n.pop();break;case"index":if(n.length<1)return null;if(A=n.pop(),"literal"!==A.type)return null;if(o=A.number,o<0||!Number.isInteger(o)||n.length<o)return null;if(u=n[n.length-o-1],"literal"===u.type||"var"===u.type){n.push(u);break}d=new S0e(p++,u.min,u.max),n[n.length-o-1]=d,n.push(d),s.push(new x0e(d,u));break;case"dup":if(n.length<1)return null;if("number"==typeof e[m+1]&&"gt"===e[m+2]&&e[m+3]===m+7&&"jz"===e[m+4]&&"pop"===e[m+5]&&e[m+6]===e[m+1]){A=n.pop(),n.push(M0e(A,e[m+1])),m+=6;break}if(u=n.at(-1),"literal"===u.type||"var"===u.type){n.push(u);break}d=new S0e(p++,u.min,u.max),n[n.length-1]=d,n.push(d),s.push(new x0e(d,u));break;case"roll":if(n.length<2)return null;if(c=n.pop(),A=n.pop(),"literal"!==c.type||"literal"!==A.type)return null;if(l=c.number,o=A.number,o<=0||!Number.isInteger(o)||!Number.isInteger(l)||n.length<o)return null;if(l=(l%o+o)%o,0===l)break;n.push(...n.splice(n.length-o,o-l));break;default:return null}else n.push(new w0e(g));if(n.length!==a)return null;const f=[];for(const m of s){const e=new k0e;m.visit(e),f.push(e.toString())}for(let m=0,C=n.length;m<C;m++){const e=n[m],t=new k0e;e.visit(t);const s=i[2*m],r=i[2*m+1],a=[t.toString()];s>e.min&&(a.unshift("Math.max(",s,", "),a.push(")")),r<e.max&&(a.unshift("Math.min(",r,", "),a.push(")")),a.unshift("dest[destOffset + ",m,"] = "),a.push(";"),f.push(a.join(""))}return f.join("\n")}}const N0e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],L0e=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];function U0e(e){return!!(1&e)}function H0e(e){return!(1&e)}function P0e(e,t,i){let n,s;for(n=t,s=e.length;n<s;++n)if(e[n]!==i)return n;return n}function O0e(e,t,i,n){for(let s=t;s<i;++s)e[s]=n}function G0e(e,t,i){for(let n=t,s=i-1;n<s;++n,--s){const t=e[n];e[n]=e[s],e[s]=t}}function K0e(e,t,i=!1){let n="ltr";return i?n="ttb":t||(n="rtl"),{str:e,dir:n}}const q0e=[],Y0e=[];function V0e(e,t=-1,i=!1){let n=!0;const s=e.length;if(0===s||i)return K0e(e,n,i);q0e.length=s,Y0e.length=s;let r,a,o=0;for(r=0;r<s;++r){q0e[r]=e.charAt(r);const t=e.charCodeAt(r);let i="L";t<=255?i=N0e[t]:1424<=t&&t<=1524?i="R":1536<=t&&t<=1791?(i=L0e[255&t],i||t.toString(16)):(1792<=t&&t<=2220||64336<=t&&t<=65023||65136<=t&&t<=65279)&&(i="AL"),"R"!==i&&"AL"!==i&&"AN"!==i||o++,Y0e[r]=i}if(0===o)return n=!0,K0e(e,n);-1===t&&(o/s<.3&&s>4?(n=!0,t=0):(n=!1,t=1));const l=[];for(r=0;r<s;++r)l[r]=t;const A=U0e(t)?"R":"L",c=A,u=c;let h,d=c;for(r=0;r<s;++r)"NSM"===Y0e[r]?Y0e[r]=d:d=Y0e[r];for(d=c,r=0;r<s;++r)h=Y0e[r],"EN"===h?Y0e[r]="AL"===d?"AN":"EN":"R"!==h&&"L"!==h&&"AL"!==h||(d=h);for(r=0;r<s;++r)h=Y0e[r],"AL"===h&&(Y0e[r]="R");for(r=1;r<s-1;++r)"ES"===Y0e[r]&&"EN"===Y0e[r-1]&&"EN"===Y0e[r+1]&&(Y0e[r]="EN"),"CS"!==Y0e[r]||"EN"!==Y0e[r-1]&&"AN"!==Y0e[r-1]||Y0e[r+1]!==Y0e[r-1]||(Y0e[r]=Y0e[r-1]);for(r=0;r<s;++r)if("EN"===Y0e[r]){for(let e=r-1;e>=0&&"ET"===Y0e[e];--e)Y0e[e]="EN";for(let e=r+1;e<s&&"ET"===Y0e[e];++e)Y0e[e]="EN"}for(r=0;r<s;++r)h=Y0e[r],"WS"!==h&&"ES"!==h&&"ET"!==h&&"CS"!==h||(Y0e[r]="ON");for(d=c,r=0;r<s;++r)h=Y0e[r],"EN"===h?Y0e[r]="L"===d?"L":"EN":"R"!==h&&"L"!==h||(d=h);for(r=0;r<s;++r)if("ON"===Y0e[r]){const e=P0e(Y0e,r+1,"ON");let t=c;r>0&&(t=Y0e[r-1]);let i=u;e+1<s&&(i=Y0e[e+1]),"L"!==t&&(t="R"),"L"!==i&&(i="R"),t===i&&O0e(Y0e,r,e,t),r=e-1}for(r=0;r<s;++r)"ON"===Y0e[r]&&(Y0e[r]=A);for(r=0;r<s;++r)h=Y0e[r],H0e(l[r])?"R"===h?l[r]+=1:"AN"!==h&&"EN"!==h||(l[r]+=2):"L"!==h&&"AN"!==h&&"EN"!==h||(l[r]+=1);let g,p=-1,f=99;for(r=0,a=l.length;r<a;++r)g=l[r],p<g&&(p=g),f>g&&U0e(g)&&(f=g);for(g=p;g>=f;--g){let e=-1;for(r=0,a=l.length;r<a;++r)l[r]<g?e>=0&&(G0e(q0e,e,r),e=-1):e<0&&(e=r);e>=0&&G0e(q0e,e,l.length)}for(r=0,a=q0e.length;r<a;++r){const e=q0e[r];"<"!==e&&">"!==e||(q0e[r]="")}return K0e(q0e.join(""),n)}const W0e={style:"normal",weight:"normal"},j0e={style:"normal",weight:"bold"},J0e={style:"italic",weight:"normal"},z0e={style:"italic",weight:"bold"},X0e=new Map([["Times-Roman",{local:["Times New Roman","Times-Roman","Times","Liberation Serif","Nimbus Roman","Nimbus Roman L","Tinos","Thorndale","TeX Gyre Termes","FreeSerif","Linux Libertine O","Libertinus Serif","DejaVu Serif","Bitstream Vera Serif","Ubuntu"],style:W0e,ultimate:"serif"}],["Times-Bold",{alias:"Times-Roman",style:j0e,ultimate:"serif"}],["Times-Italic",{alias:"Times-Roman",style:J0e,ultimate:"serif"}],["Times-BoldItalic",{alias:"Times-Roman",style:z0e,ultimate:"serif"}],["Helvetica",{local:["Helvetica","Helvetica Neue","Arial","Arial Nova","Liberation Sans","Arimo","Nimbus Sans","Nimbus Sans L","A030","TeX Gyre Heros","FreeSans","DejaVu Sans","Albany","Bitstream Vera Sans","Arial Unicode MS","Microsoft Sans Serif","Apple Symbols","Cantarell"],path:"LiberationSans-Regular.ttf",style:W0e,ultimate:"sans-serif"}],["Helvetica-Bold",{alias:"Helvetica",path:"LiberationSans-Bold.ttf",style:j0e,ultimate:"sans-serif"}],["Helvetica-Oblique",{alias:"Helvetica",path:"LiberationSans-Italic.ttf",style:J0e,ultimate:"sans-serif"}],["Helvetica-BoldOblique",{alias:"Helvetica",path:"LiberationSans-BoldItalic.ttf",style:z0e,ultimate:"sans-serif"}],["Courier",{local:["Courier","Courier New","Liberation Mono","Nimbus Mono","Nimbus Mono L","Cousine","Cumberland","TeX Gyre Cursor","FreeMono","Linux Libertine Mono O","Libertinus Mono"],style:W0e,ultimate:"monospace"}],["Courier-Bold",{alias:"Courier",style:j0e,ultimate:"monospace"}],["Courier-Oblique",{alias:"Courier",style:J0e,ultimate:"monospace"}],["Courier-BoldOblique",{alias:"Courier",style:z0e,ultimate:"monospace"}],["ArialBlack",{local:["Arial Black"],style:{style:"normal",weight:"900"},fallback:"Helvetica-Bold"}],["ArialBlack-Bold",{alias:"ArialBlack"}],["ArialBlack-Italic",{alias:"ArialBlack",style:{style:"italic",weight:"900"},fallback:"Helvetica-BoldOblique"}],["ArialBlack-BoldItalic",{alias:"ArialBlack-Italic"}],["ArialNarrow",{local:["Arial Narrow","Liberation Sans Narrow","Helvetica Condensed","Nimbus Sans Narrow","TeX Gyre Heros Cn"],style:W0e,fallback:"Helvetica"}],["ArialNarrow-Bold",{alias:"ArialNarrow",style:j0e,fallback:"Helvetica-Bold"}],["ArialNarrow-Italic",{alias:"ArialNarrow",style:J0e,fallback:"Helvetica-Oblique"}],["ArialNarrow-BoldItalic",{alias:"ArialNarrow",style:z0e,fallback:"Helvetica-BoldOblique"}],["Calibri",{local:["Calibri","Carlito"],style:W0e,fallback:"Helvetica"}],["Calibri-Bold",{alias:"Calibri",style:j0e,fallback:"Helvetica-Bold"}],["Calibri-Italic",{alias:"Calibri",style:J0e,fallback:"Helvetica-Oblique"}],["Calibri-BoldItalic",{alias:"Calibri",style:z0e,fallback:"Helvetica-BoldOblique"}],["Wingdings",{local:["Wingdings","URW Dingbats"],style:W0e}],["Wingdings-Regular",{alias:"Wingdings"}],["Wingdings-Bold",{alias:"Wingdings"}]]),$0e=new Map([["Arial-Black","ArialBlack"]]);function Z0e(e){const t=new Set(["thin","extralight","ultralight","demilight","semilight","light","book","regular","normal","medium","demibold","semibold","bold","extrabold","ultrabold","black","heavy","extrablack","ultrablack","roman","italic","oblique","ultracondensed","extracondensed","condensed","semicondensed","normal","semiexpanded","expanded","extraexpanded","ultraexpanded","bolditalic"]);return e.split(/[- ,+]+/g).filter((e=>!t.has(e.toLowerCase()))).join(" ")}function e1e({alias:e,local:t,path:i,fallback:n,style:s,ultimate:r},a,o,l=!0,A=!0,c=""){const u={style:null,ultimate:null};if(t){const e=c?` ${c}`:"";for(const i of t)a.push(`local(${i}${e})`)}if(e){const t=X0e.get(e),r=c||function(e){switch(e){case j0e:return"Bold";case J0e:return"Italic";case z0e:return"Bold Italic";default:if("bold"===(null==e?void 0:e.weight))return"Bold";if("italic"===(null==e?void 0:e.style))return"Italic"}return""}(s);Object.assign(u,e1e(t,a,o,l&&!n,A&&!i,r))}if(s&&(u.style=s),r&&(u.ultimate=r),l&&n){const e=X0e.get(n),{ultimate:t}=e1e(e,a,o,l,A&&!i,c);u.ultimate||(u.ultimate=t)}return A&&i&&o&&a.push(`url(${o}${i})`),u}function t1e(e,t,i,n,s,r){if(n.startsWith("InvalidPDFjsFont_"))return null;"TrueType"!==r&&"Type1"!==r||!/^[A-Z]{6}\+/.test(n)||(n=n.slice(7));const a=n=mXe(n);let o=e.get(a);if(o)return o;let l=X0e.get(n);if(!l)for(const[f,m]of $0e)if(n.startsWith(f)){n=`${m}${n.substring(f.length)}`,l=X0e.get(n);break}let A=!1;l||(l=X0e.get(s),A=!0);const c=`${t.getDocId()}_s${t.createFontId()}`;if(!l){if(!OWe(n))return e.set(a,null),null;const t=/bold/gi.test(n),i=/oblique|italic/gi.test(n),s=t&&i&&z0e||t&&j0e||i&&J0e||W0e;return o={css:`"${Z0e(n)}",${c}`,guessFallback:!0,loadedName:c,baseFontName:n,src:`local(${n})`,style:s},e.set(a,o),o}const u=[];A&&OWe(n)&&u.push(`local(${n})`);const{style:h,ultimate:d}=e1e(l,u,i),g=null===d,p=g?"":`,${d}`;return o={css:`"${Z0e(n)}",${c}${p}`,guessFallback:g,loadedName:c,baseFontName:n,src:u.join(","),style:h},e.set(a,o),o}const i1e=class e{constructor(e,t){this._imgData=e,this._isMask=t}static get canUseImageDecoder(){return mVe(this,"canUseImageDecoder",Bc(this,NA)?ImageDecoder.isTypeSupported("image/bmp"):Promise.resolve(!1))}static needsToBeResized(e,t){if(e<=Bc(this,RA)&&t<=Bc(this,RA))return!1;const{MAX_DIM:i}=this;if(e>i||t>i)return!0;const n=e*t;if(this._hasMaxArea)return n>this.MAX_AREA;if(n<Bc(this,RA)**2)return!1;if(this._areGoodDims(e,t))return bc(this,RA,Math.max(Bc(this,RA),Math.floor(Math.sqrt(e*t)))),!1;bc(this,RA,this._guessMax(Bc(this,RA),i,128,0));return n>(this.MAX_AREA=Bc(this,RA)**2)}static get MAX_DIM(){return mVe(this,"MAX_DIM",this._guessMax(2048,65537,0,1))}static get MAX_AREA(){return this._hasMaxArea=!0,mVe(this,"MAX_AREA",this._guessMax(Bc(this,RA),this.MAX_DIM,128,0)**2)}static set MAX_AREA(e){e>=0&&(this._hasMaxArea=!0,mVe(this,"MAX_AREA",e))}static setOptions({canvasMaxAreaInBytes:e=-1,isImageDecoderSupported:t=!1}){this._hasMaxArea||(this.MAX_AREA=e>>2),bc(this,NA,t)}static _areGoodDims(e,t){try{const i=new OffscreenCanvas(e,t),n=i.getContext("2d");n.fillRect(0,0,1,1);const s=n.getImageData(0,0,1,1).data[3];return i.width=i.height=1,0!==s}catch{return!1}}static _guessMax(e,t,i,n){for(;e+i+1<t;){const i=Math.floor((e+t)/2),s=n||i;this._areGoodDims(i,s)?e=i:t=i}return e}static async createImage(t,i=!1){return new e(t,i)._createImage()}async _createImage(){const t=this._encodeBMP();let i,n;await e.canUseImageDecoder?(i=new ImageDecoder({data:t,type:"image/bmp",preferAnimation:!1,transfer:[t.buffer]}),n=i.decode().catch((e=>createImageBitmap(new Blob([this._encodeBMP().buffer],{type:"image/bmp"})))).finally((()=>{i.close()}))):n=createImageBitmap(new Blob([t.buffer],{type:"image/bmp"}));const{MAX_AREA:s,MAX_DIM:r}=e,{_imgData:a}=this,{width:o,height:l}=a,A=Math.max(o/r,l/r,Math.sqrt(o*l/s)),c=Math.max(A,2),u=Math.round(10*(A+1.25))/10/c,h=Math.floor(Math.log2(u)),d=new Array(h+2).fill(2);d[0]=c,d.splice(-1,1,u/(1<<h));let g=o,p=l;const f=await n;let m=f.image||f;for(const e of d){const t=g,i=p;g=Math.floor(g/e)-1,p=Math.floor(p/e)-1;const n=new OffscreenCanvas(g,p);n.getContext("2d").drawImage(m,0,0,t,i,0,0,g,p),m.close(),m=n.transferToImageBitmap()}return a.data=null,a.bitmap=m,a.width=g,a.height=p,a}_encodeBMP(){const{width:e,height:t,kind:i}=this._imgData;let n,s=this._imgData.data,r=new Uint8Array(0),a=r,o=0;switch(i){case DKe:{n=1,r=new Uint8Array(this._isMask?[255,255,255,255,0,0,0,0]:[0,0,0,0,255,255,255,255]);const i=e+7>>3,a=i+3&-4;if(i!==a){const e=new Uint8Array(a*t);let n=0;for(let r=0,o=t*i;r<o;r+=i,n+=a)e.set(s.subarray(r,r+i),n);s=e}break}case FKe:if(n=24,3&e){const i=3*e,n=i+3&-4,r=n-i,a=new Uint8Array(n*t);let o=0;for(let e=0,l=t*i;e<l;e+=i){const t=s.subarray(e,e+i);for(let e=0;e<i;e+=3)a[o++]=t[e+2],a[o++]=t[e+1],a[o++]=t[e];o+=r}s=a}else for(let e=0,t=s.length;e<t;e+=3){const t=s[e];s[e]=s[e+2],s[e+2]=t}break;case TKe:n=32,o=3,a=new Uint8Array(68);const i=new DataView(a.buffer);kVe.isLittleEndian?(i.setUint32(0,255,!0),i.setUint32(4,65280,!0),i.setUint32(8,16711680,!0),i.setUint32(12,4278190080,!0)):(i.setUint32(0,4278190080,!0),i.setUint32(4,16711680,!0),i.setUint32(8,65280,!0),i.setUint32(12,255,!0));break;default:throw new Error("invalid format")}let l=0;const A=40+a.length,c=14+A+r.length+s.length,u=new Uint8Array(c),h=new DataView(u.buffer);return h.setUint16(l,19778,!0),l+=2,h.setUint32(l,c,!0),l+=4,h.setUint32(l,0,!0),l+=4,h.setUint32(l,14+A+r.length,!0),l+=4,h.setUint32(l,A,!0),l+=4,h.setInt32(l,e,!0),l+=4,h.setInt32(l,-t,!0),l+=4,h.setUint16(l,1,!0),l+=2,h.setUint16(l,n,!0),l+=2,h.setUint32(l,o,!0),l+=4,h.setUint32(l,0,!0),l+=4,h.setInt32(l,0,!0),l+=4,h.setInt32(l,0,!0),l+=4,h.setUint32(l,r.length/4,!0),l+=4,h.setUint32(l,0,!0),l+=4,u.set(a,l),l+=a.length,u.set(r,l),l+=r.length,u.set(s,l),u}};RA=new WeakMap,NA=new WeakMap,yc(i1e,RA,2048),yc(i1e,NA,kVe.isImageDecoderSupported);let n1e=i1e;const s1e=3285377520,r1e=4294901760,a1e=65535;class o1e{constructor(e){this.h1=e?4294967295&e:s1e,this.h2=e?4294967295&e:s1e}update(e){let t,i;if("string"==typeof e){t=new Uint8Array(2*e.length),i=0;for(let n=0,s=e.length;n<s;n++){const s=e.charCodeAt(n);s<=255?t[i++]=s:(t[i++]=s>>>8,t[i++]=255&s)}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice(),i=t.byteLength}const n=i>>2,s=i-4*n,r=new Uint32Array(t.buffer,0,n);let a=0,o=0,l=this.h1,A=this.h2;const c=3432918353,u=461845907,h=11601,d=13715;for(let g=0;g<n;g++)1&g?(a=r[g],a=a*c&r1e|a*h&a1e,a=a<<15|a>>>17,a=a*u&r1e|a*d&a1e,l^=a,l=l<<13|l>>>19,l=5*l+3864292196):(o=r[g],o=o*c&r1e|o*h&a1e,o=o<<15|o>>>17,o=o*u&r1e|o*d&a1e,A^=o,A=A<<13|A>>>19,A=5*A+3864292196);switch(a=0,s){case 3:a^=t[4*n+2]<<16;case 2:a^=t[4*n+1]<<8;case 1:a^=t[4*n],a=a*c&r1e|a*h&a1e,a=a<<15|a>>>17,a=a*u&r1e|a*d&a1e,1&n?l^=a:A^=a}this.h1=l,this.h2=A}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&r1e|36045*e&a1e,t=4283543511*t&r1e|(2950163797*(t<<16|e>>>16)&r1e)>>>16,e^=t>>>1,e=444984403*e&r1e|60499*e&a1e,t=3301882366*t&r1e|(3120437893*(t<<16|e>>>16)&r1e)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}function l1e(e,t,i,n,s){let r=e;for(let a=0,o=t.length-1;a<o;a++){const e=t[a];r=r[e]||(r[e]=[])}r[t.at(-1)]={checkFn:i,iterateFn:n,processFn:s}}const A1e=[];l1e(A1e,[Lqe,Hqe,iVe,Uqe],null,(function(e,t){const i=e.fnArray,n=(t-(e.iCurr-3))%4;switch(n){case 0:return i[t]===Lqe;case 1:return i[t]===Hqe;case 2:return i[t]===iVe;case 3:return i[t]===Uqe}throw new Error(`iterateInlineImageGroup - invalid pos: ${n}`)}),(function(e,t){const i=e.fnArray,n=e.argsArray,s=e.iCurr,r=s-3,a=s-2,o=s-1,l=Math.min(Math.floor((t-r)/4),200);if(l<10)return t-(t-r)%4;let A=0;const c=[];let u=0,h=1,d=1;for(let I=0;I<l;I++){const e=n[a+(I<<2)],t=n[o+(I<<2)][0];h+t.width>1e3&&(A=Math.max(A,h),d+=u+2,h=0,u=0),c.push({transform:e,x:h,y:d,w:t.width,h:t.height}),h+=t.width+2,u=Math.max(u,t.height)}const g=Math.max(A,h)+1,p=d+u+1,f=new Uint8Array(g*p*4),m=g<<2;for(let I=0;I<l;I++){const e=n[o+(I<<2)][0].data,t=c[I].w<<2;let i=0,s=c[I].x+c[I].y*g<<2;f.set(e.subarray(0,t),s-m);for(let n=0,r=c[I].h;n<r;n++)f.set(e.subarray(i,i+t),s),i+=t,s+=m;for(f.set(e.subarray(i-t,i),s);s>=0;)e[s-4]=e[s],e[s-3]=e[s+1],e[s-2]=e[s+2],e[s-1]=e[s+3],e[s+t]=e[s+t-4],e[s+t+1]=e[s+t-3],e[s+t+2]=e[s+t-2],e[s+t+3]=e[s+t-1],s-=m}const C={width:g,height:p};if(e.isOffscreenCanvasSupported){const e=new OffscreenCanvas(g,p);e.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(f.buffer),g,p),0,0),C.bitmap=e.transferToImageBitmap(),C.data=null}else C.kind=TKe,C.data=f;return i.splice(r,4*l,nVe),n.splice(r,4*l,[C,c]),r+1})),l1e(A1e,[Lqe,Hqe,ZYe,Uqe],null,(function(e,t){const i=e.fnArray,n=(t-(e.iCurr-3))%4;switch(n){case 0:return i[t]===Lqe;case 1:return i[t]===Hqe;case 2:return i[t]===ZYe;case 3:return i[t]===Uqe}throw new Error(`iterateImageMaskGroup - invalid pos: ${n}`)}),(function(e,t){const i=e.fnArray,n=e.argsArray,s=e.iCurr,r=s-3,a=s-2,o=s-1;let l=Math.floor((t-r)/4);if(l<10)return t-(t-r)%4;let A,c,u=!1;const h=n[o][0],d=n[a][0],g=n[a][1],p=n[a][2],f=n[a][3];if(g===p){u=!0,A=a+4;let e=o+4;for(let t=1;t<l;t++,A+=4,e+=4)if(c=n[A],n[e][0]!==h||c[0]!==d||c[1]!==g||c[2]!==p||c[3]!==f){t<10?u=!1:l=t;break}}if(u){l=Math.min(l,1e3);const e=new Float32Array(2*l);A=a;for(let t=0;t<l;t++,A+=4)c=n[A],e[t<<1]=c[4],e[1+(t<<1)]=c[5];i.splice(r,4*l,rVe),n.splice(r,4*l,[h,d,g,p,f,e])}else{l=Math.min(l,100);const e=[];for(let t=0;t<l;t++){c=n[a+(t<<2)];const i=n[o+(t<<2)][0];e.push({data:i.data,width:i.width,height:i.height,interpolate:i.interpolate,count:i.count,transform:c})}i.splice(r,4*l,eVe),n.splice(r,4*l,[e])}return r+1})),l1e(A1e,[Lqe,Hqe,tVe,Uqe],(function(e){const t=e.argsArray,i=e.iCurr-2;return 0===t[i][1]&&0===t[i][2]}),(function(e,t){const i=e.fnArray,n=e.argsArray,s=(t-(e.iCurr-3))%4;switch(s){case 0:return i[t]===Lqe;case 1:if(i[t]!==Hqe)return!1;const s=e.iCurr-2,r=n[s][0],a=n[s][3];return n[t][0]===r&&0===n[t][1]&&0===n[t][2]&&n[t][3]===a;case 2:if(i[t]!==tVe)return!1;const o=n[e.iCurr-1][0];return n[t][0]===o;case 3:return i[t]===Uqe}throw new Error(`iterateImageGroup - invalid pos: ${s}`)}),(function(e,t){const i=e.fnArray,n=e.argsArray,s=e.iCurr,r=s-3,a=s-2,o=n[s-1][0],l=n[a][0],A=n[a][3],c=Math.min(Math.floor((t-r)/4),1e3);if(c<3)return t-(t-r)%4;const u=new Float32Array(2*c);let h=a;for(let g=0;g<c;g++,h+=4){const e=n[h];u[g<<1]=e[4],u[1+(g<<1)]=e[5]}const d=[o,l,A,u];return i.splice(r,4*c,sVe),n.splice(r,4*c,d),r+1})),l1e(A1e,[sYe,cYe,pYe,mYe,rYe],null,(function(e,t){const i=e.fnArray,n=e.argsArray,s=(t-(e.iCurr-4))%5;switch(s){case 0:return i[t]===sYe;case 1:return i[t]===cYe;case 2:return i[t]===pYe;case 3:if(i[t]!==mYe)return!1;const s=e.iCurr-3,r=n[s][0],a=n[s][1];return n[t][0]===r&&n[t][1]===a;case 4:return i[t]===rYe}throw new Error(`iterateShowTextGroup - invalid pos: ${s}`)}),(function(e,t){const i=e.fnArray,n=e.argsArray,s=e.iCurr,r=s-4,a=s-3,o=s-2,l=s-1,A=s,c=n[a][0],u=n[a][1];let h=Math.min(Math.floor((t-r)/5),1e3);if(h<3)return t-(t-r)%5;let d=r;r>=4&&i[r-4]===i[a]&&i[r-3]===i[o]&&i[r-2]===i[l]&&i[r-1]===i[A]&&n[r-4][0]===c&&n[r-4][1]===u&&(h++,d-=5);let g=d+4;for(let p=1;p<h;p++)i.splice(g,3),n.splice(g,3),g+=2;return g+1}));class c1e{constructor(e){this.queue=e}_optimize(){}push(e,t){this.queue.fnArray.push(e),this.queue.argsArray.push(t),this._optimize()}flush(){}reset(){}}class u1e extends c1e{constructor(e){super(e),this.state=null,this.context={iCurr:0,fnArray:e.fnArray,argsArray:e.argsArray,isOffscreenCanvasSupported:!1},this.match=null,this.lastProcessed=0}set isOffscreenCanvasSupported(e){this.context.isOffscreenCanvasSupported=e}_optimize(){const e=this.queue.fnArray;let t=this.lastProcessed,i=e.length,n=this.state,s=this.match;if(!n&&!s&&t+1===i&&!A1e[e[t]])return void(this.lastProcessed=i);const r=this.context;for(;t<i;){if(s){if((0,s.iterateFn)(r,t)){t++;continue}if(t=(0,s.processFn)(r,t+1),i=e.length,s=null,n=null,t>=i)break}n=(n||A1e)[e[t]],n&&!Array.isArray(n)?(r.iCurr=t,t++,!n.checkFn||(0,n.checkFn)(r)?(s=n,n=null):n=null):t++}this.state=n,this.match=s,this.lastProcessed=t}flush(){for(;this.match;){const e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e),this.match=null,this.state=null,this._optimize()}}reset(){this.state=null,this.match=null,this.lastProcessed=0}}const h1e=class e{constructor(e=0,t){this._streamSink=t,this.fnArray=[],this.argsArray=[],this.optimizer=!t||e&yKe?new c1e(this):new u1e(this),this.dependencies=new Set,this._totalLength=0,this.weight=0,this._resolved=t?null:Promise.resolve()}set isOffscreenCanvasSupported(e){this.optimizer.isOffscreenCanvasSupported=e}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addOp(t,i){this.optimizer.push(t,i),this.weight++,this._streamSink&&(this.weight>=e.CHUNK_SIZE||this.weight>=e.CHUNK_SIZE_ABOUT&&(t===Uqe||t===rYe))&&this.flush()}addImageOps(e,t,i){void 0!==i&&this.addOp(KYe,["OC",i]),this.addOp(e,t),void 0!==i&&this.addOp(qYe,[])}addDependency(e){this.dependencies.has(e)||(this.dependencies.add(e),this.addOp(Sqe,[e]))}addDependencies(e){for(const t of e)this.addDependency(t)}addOpList(t){if(t instanceof e){for(const e of t.dependencies)this.dependencies.add(e);for(let e=0,i=t.length;e<i;e++)this.addOp(t.fnArray[e],t.argsArray[e])}}getIR(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}}get _transfers(){var e;const t=[],{fnArray:i,argsArray:n,length:s}=this;for(let r=0;r<s;r++)switch(i[r]){case iVe:case nVe:case ZYe:const i=n[r][0];!i.cached&&(null==(e=i.data)?void 0:e.buffer)instanceof ArrayBuffer&&t.push(i.data.buffer)}return t}flush(e=!1,t=null){this.optimizer.flush();const i=this.length;this._totalLength+=i,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:e,separateAnnots:t,length:i},1,this._transfers),this.dependencies.clear(),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}};Ic(h1e,"CHUNK_SIZE",1e3),Ic(h1e,"CHUNK_SIZE_ABOUT",h1e.CHUNK_SIZE-5);let d1e=h1e;function g1e(e,t,i,n){return(e=t+e*i)<0?e=0:e>n&&(e=n),e}function p1e(e,t,i,n,s,r){const a=s*r;let o;o=t<=8?new Uint8Array(a):t<=16?new Uint16Array(a):new Uint32Array(a);const l=i/s,A=n/r;let c,u,h,d,g=0;const p=new Uint16Array(s),f=i;for(c=0;c<s;c++)p[c]=Math.floor(c*l);for(c=0;c<r;c++)for(h=Math.floor(c*A)*f,u=0;u<s;u++)d=h+p[u],o[g++]=e[d];return o}LA=new WeakSet,UA=async function(e,t){const i=await this.image.getTransferableImage();return i?{data:null,width:e,height:t,bitmap:i,interpolate:this.interpolate}:null};let f1e=class e{constructor({xref:t,res:i,image:n,isInline:s=!1,smask:r=null,mask:a=null,isMask:o=!1,pdfFunctionFactory:l,localColorSpaceCache:A}){var c,u;yc(this,LA),this.image=n;const h=n.dict,d=h.get("F","Filter");let g;if(d instanceof iWe)g=d.name;else if(Array.isArray(d)){const e=t.fetchIfRef(d[0]);e instanceof iWe&&(g=e.name)}switch(g){case"JPXDecode":({width:n.width,height:n.height,componentsCount:n.numComps,bitsPerComponent:n.bitsPerComponent}=zJe.parseImageProperties(n.stream)),n.stream.reset(),this.jpxDecoderOptions={numComponents:0,isIndexedColormap:!1,smaskInData:h.has("SMaskInData")};break;case"JBIG2Decode":n.bitsPerComponent=1,n.numComps=1}let p=h.get("W","Width"),f=h.get("H","Height");if(Number.isInteger(n.width)&&n.width>0&&Number.isInteger(n.height)&&n.height>0&&(n.width!==p||n.height!==f)&&(p=n.width,f=n.height),p<1||f<1)throw new EVe(`Invalid image width: ${p} or height: ${f}`);this.width=p,this.height=f,this.interpolate=h.get("I","Interpolate"),this.imageMask=h.get("IM","ImageMask")||!1,this.matte=h.get("Matte")||!1;let m=n.bitsPerComponent;if(!m&&(m=h.get("BPC","BitsPerComponent"),!m)){if(!this.imageMask)throw new EVe(`Bits per component missing in image: ${this.imageMask}`);m=1}if(this.bpc=m,!this.imageMask){let e=h.getRaw("CS")||h.getRaw("ColorSpace");const r=!!e;if(r)(null==(c=this.jpxDecoderOptions)?void 0:c.smaskInData)&&(e=iWe.get("DeviceRGBA"));else if(this.jpxDecoderOptions)e=iWe.get("DeviceRGBA");else switch(n.numComps){case 1:e=iWe.get("DeviceGray");break;case 3:e=iWe.get("DeviceRGB");break;case 4:e=iWe.get("DeviceCMYK");break;default:throw new Error(`Images with ${n.numComps} color components not supported.`)}this.colorSpace=ije.parse({cs:e,xref:t,resources:s?i:null,pdfFunctionFactory:l,localColorSpaceCache:A}),this.numComps=this.colorSpace.numComps,this.jpxDecoderOptions&&(this.jpxDecoderOptions.numComponents=r?this.numComp:0,this.jpxDecoderOptions.isIndexedColormap="Indexed"===this.colorSpace.name)}if(this.decode=h.getArray("D","Decode"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,m)||o&&!ije.isDefaultDecode(this.decode,1))){this.needsDecode=!0;const e=(1<<m)-1;this.decodeCoefficients=[],this.decodeAddends=[];const t="Indexed"===(null==(u=this.colorSpace)?void 0:u.name);for(let i=0,n=0;i<this.decode.length;i+=2,++n){const s=this.decode[i],r=this.decode[i+1];this.decodeCoefficients[n]=t?(r-s)/e:r-s,this.decodeAddends[n]=t?s:e*s}}if(r)this.smask=new e({xref:t,res:i,image:r,isInline:s,pdfFunctionFactory:l,localColorSpaceCache:A});else if(a)if(a instanceof dWe){a.dict.get("IM","ImageMask")&&(this.mask=new e({xref:t,res:i,image:a,isInline:s,isMask:!0,pdfFunctionFactory:l,localColorSpaceCache:A}))}else this.mask=a}static async buildImage({xref:t,res:i,image:n,isInline:s=!1,pdfFunctionFactory:r,localColorSpaceCache:a}){const o=n;let l=null,A=null;const c=n.dict.get("SMask"),u=n.dict.get("Mask");return c?c instanceof dWe&&(l=c):u&&(u instanceof dWe||Array.isArray(u))&&(A=u),new e({xref:t,res:i,image:o,isInline:s,smask:l,mask:A,pdfFunctionFactory:r,localColorSpaceCache:a})}static createRawMask({imgArray:e,width:t,height:i,imageIsFromDecodeStream:n,inverseDecode:s,interpolate:r}){const a=(t+7>>3)*i,o=e.byteLength;let l,A;if(!n||s&&!(a===o)?s?(l=new Uint8Array(a),l.set(e),l.fill(255,o)):l=new Uint8Array(e):l=e,s)for(A=0;A<o;A++)l[A]^=255;return{data:l,width:t,height:i,interpolate:r}}static async createMask({imgArray:e,width:t,height:i,imageIsFromDecodeStream:n,inverseDecode:s,interpolate:r,isOffscreenCanvasSupported:a=!1}){const o=1===t&&1===i&&s===(0===e.length||!!(128&e[0]));if(o)return{isSingleOpaquePixel:o};if(a){if(n1e.needsToBeResized(t,i)){const n=new Uint8ClampedArray(t*i*4);return vJe({src:e,dest:n,width:t,height:i,nonBlackColor:0,inverseDecode:s}),n1e.createImage({kind:TKe,data:n,width:t,height:i,interpolate:r})}const n=new OffscreenCanvas(t,i),a=n.getContext("2d"),o=a.createImageData(t,i);vJe({src:e,dest:o.data,width:t,height:i,nonBlackColor:0,inverseDecode:s}),a.putImageData(o,0,0);return{data:null,width:t,height:i,interpolate:r,bitmap:n.transferToImageBitmap()}}return this.createRawMask({imgArray:e,width:t,height:i,inverseDecode:s,imageIsFromDecodeStream:n,interpolate:r})}get drawWidth(){var e,t;return Math.max(this.width,(null==(e=this.smask)?void 0:e.width)||0,(null==(t=this.mask)?void 0:t.width)||0)}get drawHeight(){var e,t;return Math.max(this.height,(null==(e=this.smask)?void 0:e.height)||0,(null==(t=this.mask)?void 0:t.height)||0)}decodeBuffer(e){const t=this.bpc,i=this.numComps,n=this.decodeAddends,s=this.decodeCoefficients,r=(1<<t)-1;let a,o;if(1===t){for(a=0,o=e.length;a<o;a++)e[a]=+!e[a];return}let l=0;for(a=0,o=this.width*this.height;a<o;a++)for(let t=0;t<i;t++)e[l]=g1e(e[l],n[t],s[t],r),l++}getComponents(e){const t=this.bpc;if(8===t)return e;const i=this.width,n=this.height,s=this.numComps,r=i*n*s;let a,o=0;a=t<=8?new Uint8Array(r):t<=16?new Uint16Array(r):new Uint32Array(r);const l=i*s,A=(1<<t)-1;let c,u,h=0;if(1===t){let t,i,s;for(let r=0;r<n;r++){for(i=h+(-8&l),s=h+l;h<i;)u=e[o++],a[h]=u>>7&1,a[h+1]=u>>6&1,a[h+2]=u>>5&1,a[h+3]=u>>4&1,a[h+4]=u>>3&1,a[h+5]=u>>2&1,a[h+6]=u>>1&1,a[h+7]=1&u,h+=8;if(h<s)for(u=e[o++],t=128;h<s;)a[h++]=+!!(u&t),t>>=1}}else{let i=0;for(u=0,h=0,c=r;h<c;++h){for(h%l==0&&(u=0,i=0);i<t;)u=u<<8|e[o++],i+=8;const n=i-t;let s=u>>n;s<0?s=0:s>A&&(s=A),a[h]=s,u&=(1<<n)-1,i=n}}return a}async fillOpacity(t,i,n,s,r){const a=this.smask,o=this.mask;let l,A,c,u,h,d;if(a)A=a.width,c=a.height,l=new Uint8ClampedArray(A*c),await a.fillGrayBuffer(l),A===i&&c===n||(l=p1e(l,a.bpc,A,c,i,n));else if(o)if(o instanceof e){for(A=o.width,c=o.height,l=new Uint8ClampedArray(A*c),o.numComps=1,await o.fillGrayBuffer(l),u=0,h=A*c;u<h;++u)l[u]=255-l[u];A===i&&c===n||(l=p1e(l,o.bpc,A,c,i,n))}else{if(!Array.isArray(o))throw new EVe("Unknown mask format.");{l=new Uint8ClampedArray(i*n);const e=this.numComps;for(u=0,h=i*n;u<h;++u){let t=0;const i=u*e;for(d=0;d<e;++d){const e=r[i+d],n=2*d;if(e<o[n]||e>o[n+1]){t=255;break}}l[u]=t}}}if(l)for(u=0,d=3,h=i*s;u<h;++u,d+=4)t[d]=l[u];else for(u=0,d=3,h=i*s;u<h;++u,d+=4)t[d]=255}undoPreblend(e,t,i){var n;const s=null==(n=this.smask)?void 0:n.matte;if(!s)return;const r=this.colorSpace.getRgb(s,0),a=r[0],o=r[1],l=r[2],A=t*i*4;for(let c=0;c<A;c+=4){const t=e[c+3];if(0===t){e[c]=255,e[c+1]=255,e[c+2]=255;continue}const i=255/t;e[c]=(e[c]-a)*i+a,e[c+1]=(e[c+1]-o)*i+o,e[c+2]=(e[c+2]-l)*i+l}}async createImageData(e=!1,t=!1){const i=this.drawWidth,n=this.drawHeight,s={width:i,height:n,interpolate:this.interpolate,kind:0,data:null},r=this.numComps,a=this.width,o=this.height,l=this.bpc,A=a*r*l+7>>3,c=t&&n1e.needsToBeResized(i,n);if(!this.smask&&!this.mask&&"DeviceRGBA"===this.colorSpace.name){s.kind=TKe;const e=s.data=await this.getImageBytes(o*a*4,{});return t?c?n1e.createImage(s,!1):this.createBitmap(TKe,i,n,e):s}if(!e){let e;if("DeviceGray"===this.colorSpace.name&&1===l?e=DKe:"DeviceRGB"!==this.colorSpace.name||8!==l||this.needsDecode||(e=FKe),e&&!this.smask&&!this.mask&&i===a&&n===o){const r=await Ec(this,LA,UA).call(this,a,o);if(r)return r;const l=await this.getImageBytes(o*A,{});if(t)return c?n1e.createImage({data:l,kind:e,width:i,height:n,interpolate:this.interpolate},this.needsDecode):this.createBitmap(e,a,o,l);if(s.kind=e,s.data=l,this.needsDecode){pVe(e===DKe,"PDFImage.createImageData: The image must be grayscale.");const t=s.data;for(let e=0,i=t.length;e<i;e++)t[e]^=255}return s}if(this.image instanceof qJe&&!this.smask&&!this.mask&&!this.needsDecode){let e=o*A;if(t&&!c){let t=!1;switch(this.colorSpace.name){case"DeviceGray":e*=4,t=!0;break;case"DeviceRGB":e=e/3*4,t=!0;break;case"DeviceCMYK":t=!0}if(t){const t=await Ec(this,LA,UA).call(this,i,n);if(t)return t;const s=await this.getImageBytes(e,{drawWidth:i,drawHeight:n,forceRGBA:!0});return this.createBitmap(TKe,i,n,s)}}else switch(this.colorSpace.name){case"DeviceGray":e*=3;case"DeviceRGB":case"DeviceCMYK":return s.kind=FKe,s.data=await this.getImageBytes(e,{drawWidth:i,drawHeight:n,forceRGB:!0}),c?n1e.createImage(s):s}}}const u=await this.getImageBytes(o*A,{internal:!0}),h=0|u.length/A*n/o,d=this.getComponents(u);let g,p,f,m,C,I;if(t&&!c&&(f=new OffscreenCanvas(i,n),m=f.getContext("2d"),C=m.createImageData(i,n),I=C.data),s.kind=TKe,e||this.smask||this.mask)t&&!c||(I=new Uint8ClampedArray(i*n*4)),g=1,p=!0,await this.fillOpacity(I,i,n,h,d);else{if(!t||c)s.kind=FKe,I=new Uint8ClampedArray(i*n*3),g=0;else{new Uint32Array(I.buffer).fill(kVe.isLittleEndian?4278190080:255),g=1}p=!1}if(this.needsDecode&&this.decodeBuffer(d),this.colorSpace.fillRgb(I,a,o,i,n,h,l,d,g),p&&this.undoPreblend(I,i,h),t&&!c){m.putImageData(C,0,0);return{data:null,width:i,height:n,bitmap:f.transferToImageBitmap(),interpolate:this.interpolate}}return s.data=I,c?n1e.createImage(s):s}async fillGrayBuffer(e){const t=this.numComps;if(1!==t)throw new EVe(`Reading gray scale from a color image: ${t}`);const i=this.width,n=this.height,s=this.bpc,r=i*t*s+7>>3,a=await this.getImageBytes(n*r,{internal:!0}),o=this.getComponents(a);let l,A;if(1===s){if(A=i*n,this.needsDecode)for(l=0;l<A;++l)e[l]=o[l]-1&255;else for(l=0;l<A;++l)e[l]=255&-o[l];return}this.needsDecode&&this.decodeBuffer(o),A=i*n;const c=255/((1<<s)-1);for(l=0;l<A;++l)e[l]=c*o[l]}createBitmap(e,t,i,n){const s=new OffscreenCanvas(t,i),r=s.getContext("2d");let a;e===TKe?a=new ImageData(n,t,i):(a=r.createImageData(t,i),IJe({kind:e,src:n,dest:new Uint32Array(a.data.buffer),width:t,height:i,inverseDecode:this.needsDecode})),r.putImageData(a,0,0);return{data:null,width:t,height:i,bitmap:s.transferToImageBitmap(),interpolate:this.interpolate}}async getImageBytes(e,{drawWidth:t,drawHeight:i,forceRGBA:n=!1,forceRGB:s=!1,internal:r=!1}){this.image.reset(),this.image.drawWidth=t||this.width,this.image.drawHeight=i||this.height,this.image.forceRGBA=!!n,this.image.forceRGB=!!s;const a=await this.image.getImageData(e,this.jpxDecoderOptions);return r||this.image instanceof yje?a:(pVe(a instanceof Uint8Array,'PDFImage.getImageBytes: Unsupported "imageBytes" type.'),new Uint8Array(a))}};const m1e=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupported:!0,isOffscreenCanvasSupported:!1,isImageDecoderSupported:!1,canvasMaxAreaInBytes:-1,fontExtraProperties:!1,useSystemFonts:!0,cMapUrl:null,standardFontDataUrl:null}),C1e=1,I1e=2,v1e=Promise.resolve();function B1e(e,t=!1){if(Array.isArray(e)){for(const t of e){const e=B1e(t,!0);if(e)return e}return"source-over"}if(!(e instanceof iWe))return t?null:"source-over";switch(e.name){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";case"Luminosity":return"luminosity"}return t?null:(e.name,"source-over")}function y1e(e,t){var i;t.objId&&e.addDependency(t.objId),e.addImageOps(t.fn,t.args,t.optionalContent),t.fn===ZYe&&(null==(i=t.args[0])?void 0:i.count)>0&&t.args[0].count++}const b1e=class e{constructor(){this.reset()}check(){return!(++this.checked<e.CHECK_TIME_EVERY)&&(this.checked=0,this.endTime<=Date.now())}reset(){this.endTime=Date.now()+e.TIME_SLOT_DURATION_MS,this.checked=0}};Ic(b1e,"TIME_SLOT_DURATION_MS",20),Ic(b1e,"CHECK_TIME_EVERY",100);let E1e=b1e;HA=new WeakSet,PA=async function(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch file "${e}" with "${t.statusText}".`);return new Uint8Array(await t.arrayBuffer())};let w1e=class e{constructor({xref:e,handler:t,pageIndex:i,idFactory:n,fontCache:s,builtInCMapCache:r,standardFontDataCache:a,globalImageCache:o,systemFontCache:l,options:A=null}){yc(this,HA),this.xref=e,this.handler=t,this.pageIndex=i,this.idFactory=n,this.fontCache=s,this.builtInCMapCache=r,this.standardFontDataCache=a,this.globalImageCache=o,this.systemFontCache=l,this.options=A||m1e,this.type3FontRefs=null,this._regionalImageCache=new d0e,this._fetchBuiltInCMapBound=this.fetchBuiltInCMap.bind(this),n1e.setOptions(this.options),qJe.setOptions(this.options)}get _pdfFunctionFactory(){return mVe(this,"_pdfFunctionFactory",new f0e({xref:this.xref,isEvalSupported:this.options.isEvalSupported}))}get parsingType3Font(){return!!this.type3FontRefs}clone(e=null){const t=Object.create(this);return t.options=Object.assign(Object.create(null),this.options,e),t}hasBlendModes(e,t){if(!(e instanceof rWe))return!1;if(e.objId&&t.has(e.objId))return!1;const i=new oWe(t);e.objId&&i.put(e.objId);const n=[e],s=this.xref;for(;n.length;){const e=n.shift(),t=e.get("ExtGState");if(t instanceof rWe)for(let n of t.getRawValues()){if(n instanceof aWe){if(i.has(n))continue;try{n=s.fetch(n)}catch(r){i.put(n);continue}}if(!(n instanceof rWe))continue;n.objId&&i.put(n.objId);const e=n.get("BM");if(e instanceof iWe){if("Normal"!==e.name)return!0}else if(void 0!==e&&Array.isArray(e))for(const t of e)if(t instanceof iWe&&"Normal"!==t.name)return!0}const a=e.get("XObject");if(a instanceof rWe)for(let o of a.getRawValues()){if(o instanceof aWe){if(i.has(o))continue;try{o=s.fetch(o)}catch(r){i.put(o);continue}}if(!(o instanceof dWe))continue;o.dict.objId&&i.put(o.dict.objId);const e=o.dict.get("Resources");e instanceof rWe&&(e.objId&&i.has(e.objId)||(n.push(e),e.objId&&i.put(e.objId)))}}for(const a of i)t.put(a);return!1}async fetchBuiltInCMap(e){const t=this.builtInCMapCache.get(e);if(t)return t;let i;if(null!==this.options.cMapUrl){i={cMapData:await Ec(this,HA,PA).call(this,`${this.options.cMapUrl}${e}.bcmap`),isCompressed:!0}}else i=await this.handler.sendWithPromise("FetchBuiltInCMap",{name:e});return this.builtInCMapCache.set(e,i),i}async fetchStandardFontData(e){const t=this.standardFontDataCache.get(e);if(t)return new XWe(t);if(this.options.useSystemFonts&&"Symbol"!==e&&"ZapfDingbats"!==e)return null;const i=vXe()[e];let n;try{n=null!==this.options.standardFontDataUrl?await Ec(this,HA,PA).call(this,`${this.options.standardFontDataUrl}${i}`):await this.handler.sendWithPromise("FetchStandardFontData",{filename:i})}catch(s){return null}return this.standardFontDataCache.set(e,n),new XWe(n)}async buildFormXObject(e,t,i,n,s,r,a){const o=t.dict,l=kWe(o.getArray("Matrix"),null),A=FWe(o.getArray("BBox"),null);let c,u;o.has("OC")&&(c=await this.parseMarkedContentProps(o.get("OC"),e)),void 0!==c&&n.addOp(KYe,["OC",c]);const h=o.get("Group");if(h){u={matrix:l,bbox:A,smask:i,isolated:!1,knockout:!1};let t=null;if(AWe(h.get("S"),"Transparency")&&(u.isolated=h.get("I")||!1,u.knockout=h.get("K")||!1,h.has("CS"))){const i=h.getRaw("CS"),n=ije.getCached(i,this.xref,a);t=n||await this.parseColorSpace({cs:i,resources:e,localColorSpaceCache:a})}(null==i?void 0:i.backdrop)&&(t||(t=ije.singletons.rgb),i.backdrop=t.getRgb(i.backdrop,0)),n.addOp(JYe,[u])}const d=h?[l,null]:[l,A];n.addOp(WYe,d),await this.getOperatorList({stream:t,task:s,resources:o.get("Resources")||e,operatorList:n,initialState:r}),n.addOp(jYe,[]),h&&n.addOp(zYe,[u]),void 0!==c&&n.addOp(qYe,[])}_sendImgData(e,t,i=!1){const n=t?[t.bitmap||t.data.buffer]:null;return this.parsingType3Font||i?this.handler.send("commonobj",[e,"Image",t],n):this.handler.send("obj",[e,this.pageIndex,"Image",t],n)}async buildPaintImageXObject({resources:e,image:t,isInline:i=!1,operatorList:n,cacheKey:s,localImageCache:r,localColorSpaceCache:a}){const o=t.dict,l=o.objId,A=o.get("W","Width"),c=o.get("H","Height");if(!A||"number"!=typeof A||!c||"number"!=typeof c)return;const u=this.options.maxImageSize;if(-1!==u&&A*c>u){const e="Image exceeded maximum allowed size and was removed.";if(this.options.ignoreErrors)return;throw new Error(e)}let h;o.has("OC")&&(h=await this.parseMarkedContentProps(o.get("OC"),e));let d,g;if(o.get("IM","ImageMask")||!1){const e=o.get("I","Interpolate"),i=A+7>>3,a=t.getBytes(i*c),u=o.getArray("D","Decode");if(this.parsingType3Font){if(d=f1e.createRawMask({imgArray:a,width:A,height:c,imageIsFromDecodeStream:t instanceof yje,inverseDecode:(null==u?void 0:u[0])>0,interpolate:e}),d.cached=!!s,g=[d],n.addImageOps(ZYe,g,h),s){const e={fn:ZYe,args:g,optionalContent:h};r.set(s,l,e),l&&this._regionalImageCache.set(null,l,e)}return}if(d=await f1e.createMask({imgArray:a,width:A,height:c,imageIsFromDecodeStream:t instanceof yje,inverseDecode:(null==u?void 0:u[0])>0,interpolate:e,isOffscreenCanvasSupported:this.options.isOffscreenCanvasSupported}),d.isSingleOpaquePixel){if(n.addImageOps(aVe,[],h),s){const e={fn:aVe,args:[],optionalContent:h};r.set(s,l,e),l&&this._regionalImageCache.set(null,l,e)}return}const p=`mask_${this.idFactory.createObjId()}`;if(n.addDependency(p),d.dataLen=d.bitmap?d.width*d.height*4:d.data.length,this._sendImgData(p,d),g=[{data:p,width:d.width,height:d.height,interpolate:d.interpolate,count:1}],n.addImageOps(ZYe,g,h),s){const e={objId:p,fn:ZYe,args:g,optionalContent:h};r.set(s,l,e),l&&this._regionalImageCache.set(null,l,e)}return}if(i&&A+c<200&&!o.has("SMask")&&!o.has("Mask")){try{const s=new f1e({xref:this.xref,res:e,image:t,isInline:i,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:a});d=await s.createImageData(!0,!1),n.isOffscreenCanvasSupported=this.options.isOffscreenCanvasSupported,n.addImageOps(iVe,[d],h)}catch(m){const e=`Unable to decode inline image: "${m}".`;if(!this.options.ignoreErrors)throw new Error(e)}return}let p=`img_${this.idFactory.createObjId()}`,f=!1;if(this.parsingType3Font?p=`${this.idFactory.getDocId()}_type3_${p}`:s&&l&&(f=this.globalImageCache.shouldCache(l,this.pageIndex),f&&(pVe(!i,"Cannot cache an inline image globally."),p=`${this.idFactory.getDocId()}_${p}`)),n.addDependency(p),g=[p,A,c],n.addImageOps(tVe,g,h),f){if(this.globalImageCache.hasDecodeFailed(l))return this.globalImageCache.setData(l,{objId:p,fn:tVe,args:g,optionalContent:h,byteSize:0}),void this._sendImgData(p,null,f);if(A*c>25e4||o.has("SMask")||o.has("Mask")){const e=await this.handler.sendWithPromise("commonobj",[p,"CopyLocalImage",{imageRef:l}]);if(e)return this.globalImageCache.setData(l,{objId:p,fn:tVe,args:g,optionalContent:h,byteSize:0}),void this.globalImageCache.addByteSize(l,e)}}if(f1e.buildImage({xref:this.xref,res:e,image:t,isInline:i,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:a}).then((async e=>(d=await e.createImageData(!1,this.options.isOffscreenCanvasSupported),d.dataLen=d.bitmap?d.width*d.height*4:d.data.length,d.ref=l,f&&this.globalImageCache.addByteSize(l,d.dataLen),this._sendImgData(p,d,f)))).catch((e=>(l&&this.globalImageCache.addDecodeFailed(l),this._sendImgData(p,null,f)))),s){const e={objId:p,fn:tVe,args:g,optionalContent:h};r.set(s,l,e),l&&(this._regionalImageCache.set(null,l,e),f&&this.globalImageCache.setData(l,{objId:p,fn:tVe,args:g,optionalContent:h,byteSize:0}))}}handleSMask(e,t,i,n,s,r){const a=e.get("G"),o={subtype:e.get("S").name,backdrop:e.get("BC")},l=e.get("TR");if(I0e(l)){const e=this._pdfFunctionFactory.create(l),t=new Uint8Array(256),i=new Float32Array(1);for(let n=0;n<256;n++)i[0]=n/255,e(i,0,i,0),t[n]=255*i[0]|0;o.transferMap=t}return this.buildFormXObject(t,a,o,i,n,s.state.clone(),r)}handleTransferFunction(e){let t;if(Array.isArray(e))t=e;else{if(!I0e(e))return null;t=[e]}const i=[];let n=0,s=0;for(const r of t){const e=this.xref.fetchIfRef(r);if(n++,AWe(e,"Identity")){i.push(null);continue}if(!I0e(e))return null;const t=this._pdfFunctionFactory.create(e),a=new Uint8Array(256),o=new Float32Array(1);for(let i=0;i<256;i++)o[0]=i/255,t(o,0,o,0),a[i]=255*o[0]|0;i.push(a),s++}return 1!==n&&4!==n||0===s?null:i}handleTilingType(e,t,i,n,s,r,a,o){const l=new d1e,A=rWe.merge({xref:this.xref,dictArray:[s.get("Resources"),i]});return this.getOperatorList({stream:n,task:a,resources:A,operatorList:l}).then((function(){const i=l.getIR(),n=dZe(i,s,t);r.addDependencies(l.dependencies),r.addOp(e,n),s.objId&&o.set(null,s.objId,{operatorListIR:i,dict:s})})).catch((e=>{if(!(e instanceof wVe||this.options.ignoreErrors))throw e}))}async handleSetFont(e,t,i,n,s,r,a=null,o=null){const l=(null==t?void 0:t[0])instanceof iWe?t[0].name:null;let A=await this.loadFont(l,i,e,a,o);if(A.font.isType3Font)try{await A.loadType3Data(this,e,s),n.addDependencies(A.type3Dependencies)}catch(c){A=new Q1e({loadedName:"g_font_error",font:new X$e(`Type3 font load error: ${c}`),dict:A.font,evaluatorOptions:this.options})}return r.font=A.font,A.send(this.handler),A.loadedName}handleText(t,i){const n=i.font,s=n.charsToGlyphs(t);if(n.data){(!!(i.textRenderingMode&kKe)||"Pattern"===i.fillColorSpace.name||n.disableFontFace||this.options.disableFontFace)&&e.buildFontPaths(n,s,this.handler,this.options)}return s}ensureStateFont(e){if(e.font)return;const t=new EVe("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw t}async setGState({resources:e,gState:t,operatorList:i,cacheKey:n,task:s,stateManager:r,localGStateCache:a,localColorSpaceCache:o}){const l=t.objId;let A=!0;const c=[];let u=Promise.resolve();for(const h of t.getKeys()){const n=t.get(h);switch(h){case"Type":case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":default:break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":c.push([h,n]);break;case"Font":A=!1,u=u.then((()=>this.handleSetFont(e,null,n[0],i,s,r.state).then((function(e){i.addDependency(e),c.push([h,[e,n[1]]])}))));break;case"BM":c.push([h,B1e(n)]);break;case"SMask":if(AWe(n,"None")){c.push([h,!1]);break}n instanceof rWe&&(A=!1,u=u.then((()=>this.handleSMask(n,e,i,s,r,o))),c.push([h,!0]));break;case"TR":const t=this.handleTransferFunction(n);c.push([h,t])}}await u,c.length>0&&i.addOp(Nqe,[c]),A&&a.set(n,l,c)}loadFont(t,i,n,s=null,r=null){var a;const o=async()=>new Q1e({loadedName:"g_font_error",font:new X$e(`Font "${t}" is not available.`),dict:i,evaluatorOptions:this.options});let l;if(i)i instanceof aWe&&(l=i);else{const e=n.get("Font");e&&(l=e.getRaw(t))}if(l){if(null==(a=this.type3FontRefs)?void 0:a.has(l))return o();if(this.fontCache.has(l))return this.fontCache.get(l);try{i=this.xref.fetchIfRef(l)}catch(f){}}if(!(i instanceof rWe)){if(!this.options.ignoreErrors&&!this.parsingType3Font)return o();i=s||e.fallbackFontDict}if(i.cacheKey&&this.fontCache.has(i.cacheKey))return this.fontCache.get(i.cacheKey);const{promise:A,resolve:c}=Promise.withResolvers();let u;try{u=this.preEvaluateFont(i),u.cssFontInfo=r}catch(m){return o()}const{descriptor:h,hash:d}=u,g=l instanceof aWe;let p;if(d&&h instanceof rWe){const e=h.fontAliases||(h.fontAliases=Object.create(null));if(e[d]){const t=e[d].aliasRef;if(g&&t&&this.fontCache.has(t))return this.fontCache.putAlias(l,t),this.fontCache.get(l)}else e[d]={fontID:this.idFactory.createFontId()};g&&(e[d].aliasRef=l),p=e[d].fontID}else p=this.idFactory.createFontId();return pVe(null==p?void 0:p.startsWith("f"),'The "fontID" must be (correctly) defined.'),g?this.fontCache.put(l,A):(i.cacheKey=`cacheKey_${p}`,this.fontCache.put(i.cacheKey,A)),i.loadedName=`${this.idFactory.getDocId()}_${p}`,this.translateFont(u).then((e=>{c(new Q1e({loadedName:i.loadedName,font:e,dict:i,evaluatorOptions:this.options}))})).catch((e=>{c(new Q1e({loadedName:i.loadedName,font:new X$e(e instanceof Error?e.message:e),dict:i,evaluatorOptions:this.options}))})),A}buildPath(e,t,i,n=!1){const s=e.length-1;if(i||(i=[]),s<0||e.fnArray[s]!==oVe){let s;switch(n&&e.addOp(Lqe,null),t){case Vqe:const e=i[0]+i[2],t=i[1]+i[3];s=[Math.min(i[0],e),Math.min(i[1],t),Math.max(i[0],e),Math.max(i[1],t)];break;case Pqe:case Oqe:s=[i[0],i[1],i[0],i[1]];break;default:s=[1/0,1/0,-1/0,-1/0]}e.addOp(oVe,[[t],i,s]),n&&e.addOp(Uqe,null)}else{const n=e.argsArray[s];n[0].push(t),n[1].push(...i);const r=n[2];switch(t){case Vqe:const e=i[0]+i[2],t=i[1]+i[3];r[0]=Math.min(r[0],i[0],e),r[1]=Math.min(r[1],i[1],t),r[2]=Math.max(r[2],i[0],e),r[3]=Math.max(r[3],i[1],t);break;case Pqe:case Oqe:r[0]=Math.min(r[0],i[0]),r[1]=Math.min(r[1],i[1]),r[2]=Math.max(r[2],i[0]),r[3]=Math.max(r[3],i[1])}}}parseColorSpace({cs:e,resources:t,localColorSpaceCache:i}){return ije.parseAsync({cs:e,xref:this.xref,resources:t,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:i}).catch((e=>{if(e instanceof wVe)return null;if(this.options.ignoreErrors)return null;throw e}))}parseShading({shading:e,resources:t,localColorSpaceCache:i,localShadingPatternCache:n}){let s,r=n.get(e);if(r)return r;try{s=sZe.parseShading(e,this.xref,t,this._pdfFunctionFactory,i).getIR()}catch(a){if(a instanceof wVe)return null;if(this.options.ignoreErrors)return n.set(e,null),null;throw a}return r=`pattern_${this.idFactory.createObjId()}`,this.parsingType3Font&&(r=`${this.idFactory.getDocId()}_type3_${r}`),n.set(e,r),this.parsingType3Font?this.handler.send("commonobj",[r,"Pattern",s]):this.handler.send("obj",[r,this.pageIndex,"Pattern",s]),r}handleColorN(e,t,i,n,s,r,a,o,l,A){const c=i.pop();if(c instanceof iWe){const u=s.getRaw(c.name),h=u instanceof aWe&&l.getByRef(u);if(h)try{const s=n.base?n.base.getRgb(i,0):null,r=dZe(h.operatorListIR,h.dict,s);return void e.addOp(t,r)}catch{}const d=this.xref.fetchIfRef(u);if(d){const s=d instanceof dWe?d.dict:d,c=s.get("PatternType");if(c===C1e){const o=n.base?n.base.getRgb(i,0):null;return this.handleTilingType(t,o,r,d,s,e,a,l)}if(c===I1e){const i=s.get("Shading"),n=this.parseShading({shading:i,resources:r,localColorSpaceCache:o,localShadingPatternCache:A});if(n){const i=kWe(s.getArray("Matrix"),null);e.addOp(t,["Shading",n,i])}return}throw new EVe(`Unknown PatternType: ${c}`)}}throw new EVe(`Unknown PatternName: ${c}`)}_parseVisibilityExpression(e,t,i){if(++t>10)return;const n=e.length,s=this.xref.fetchIfRef(e[0]);if(!(n<2)&&s instanceof iWe){switch(s.name){case"And":case"Or":case"Not":i.push(s.name);break;default:return void s.name}for(let s=1;s<n;s++){const n=e[s],r=this.xref.fetchIfRef(n);if(Array.isArray(r)){const e=[];i.push(e),this._parseVisibilityExpression(r,t,e)}else n instanceof aWe&&i.push(n.toString())}}}async parseMarkedContentProps(e,t){var i;let n;if(e instanceof iWe){n=t.get("Properties").get(e.name)}else{if(!(e instanceof rWe))throw new EVe("Optional content properties malformed.");n=e}const s=null==(i=n.get("Type"))?void 0:i.name;if("OCG"===s)return{type:s,id:n.objId};if("OCMD"===s){const e=n.get("VE");if(Array.isArray(e)){const t=[];if(this._parseVisibilityExpression(e,0,t),t.length>0)return{type:"OCMD",expression:t}}const t=n.get("OCGs");if(Array.isArray(t)||t instanceof rWe){const e=[];if(Array.isArray(t))for(const i of t)e.push(i.toString());else e.push(t.objId);return{type:s,ids:e,policy:n.get("P")instanceof iWe?n.get("P").name:null,expression:null}}if(t instanceof aWe)return{type:s,id:t.toString()}}return null}getOperatorList({stream:e,task:t,resources:i,operatorList:n,initialState:s=null,fallbackFontDict:r=null}){if(i||(i=rWe.empty),s||(s=new x1e),!n)throw new Error('getOperatorList: missing "operatorList" parameter');const a=this,o=this.xref;let l=!1;const A=new l0e,c=new A0e,u=new u0e,h=new h0e,d=new Map,g=i.get("XObject")||rWe.empty,p=i.get("Pattern")||rWe.empty,f=new _1e(s),m=new D1e(e,o,f),C=new E1e;function I(e){for(let t=0,i=m.savedStatesDepth;t<i;t++)n.addOp(Uqe,[])}return new Promise((function e(s,v){const B=function(t){Promise.all([t,n.ready]).then((function(){try{e(s,v)}catch(t){v(t)}}),v)};t.ensureNotTerminated(),C.reset();const y={};let b,E,w,Q,_,S;for(;!(b=C.check())&&(y.args=null,m.read(y));){let e=y.args,s=y.fn;switch(0|s){case HYe:if(S=e[0]instanceof iWe,_=e[0].name,S){const t=A.getByName(_);if(t){y1e(n,t),e=null;continue}}return void B(new Promise((function(e,s){if(!S)throw new EVe("XObject must be referred to by name.");let r=g.getRaw(_);if(r instanceof aWe){const t=A.getByRef(r)||a._regionalImageCache.getByRef(r);if(t)return y1e(n,t),void e();const i=a.globalImageCache.getData(r,a.pageIndex);if(i)return n.addDependency(i.objId),n.addImageOps(i.fn,i.args,i.optionalContent),void e();r=o.fetch(r)}if(!(r instanceof dWe))throw new EVe("XObject should be a stream");const l=r.dict.get("Subtype");if(!(l instanceof iWe))throw new EVe("XObject should have a Name subtype");if("Form"===l.name)return f.save(),void a.buildFormXObject(i,r,null,n,t,f.state.clone(),c).then((function(){f.restore(),e()}),s);if("Image"!==l.name){if("PS"!==l.name)throw new EVe(`Unhandled XObject subtype ${l.name}`);e()}else a.buildPaintImageXObject({resources:i,image:r,operatorList:n,cacheKey:_,localImageCache:A,localColorSpaceCache:c}).then(e,s)})).catch((function(e){if(!(e instanceof wVe||a.options.ignoreErrors))throw e})));case cYe:const m=e[1];return void B(a.handleSetFont(i,e,null,n,t,f.state,r).then((function(e){n.addDependency(e),n.addOp(cYe,[e,m])})));case sYe:l=!0;break;case rYe:l=!1;break;case UYe:const C=e[0].cacheKey;if(C){const t=A.getByName(C);if(t){y1e(n,t),e=null;continue}}return void B(a.buildPaintImageXObject({resources:i,image:e[0],isInline:!0,operatorList:n,cacheKey:C,localImageCache:A,localColorSpaceCache:c}));case mYe:if(!f.state.font){a.ensureStateFont(f.state);continue}e[0]=a.handleText(e[0],f.state);break;case CYe:if(!f.state.font){a.ensureStateFont(f.state);continue}const I=[],v=f.state;for(const t of e[0])"string"==typeof t?I.push(...a.handleText(t,v)):"number"==typeof t&&I.push(t);e[0]=I,s=mYe;break;case IYe:if(!f.state.font){a.ensureStateFont(f.state);continue}n.addOp(fYe),e[0]=a.handleText(e[0],f.state),s=mYe;break;case vYe:if(!f.state.font){a.ensureStateFont(f.state);continue}n.addOp(fYe),n.addOp(oYe,[e.shift()]),n.addOp(aYe,[e.shift()]),e[0]=a.handleText(e[0],f.state),s=mYe;break;case uYe:f.state.textRenderingMode=e[0];break;case EYe:{const t=ije.getCached(e[0],o,c);if(t){f.state.fillColorSpace=t;continue}return void B(a.parseColorSpace({cs:e[0],resources:i,localColorSpaceCache:c}).then((function(e){f.state.fillColorSpace=e||ije.singletons.gray})))}case bYe:{const t=ije.getCached(e[0],o,c);if(t){f.state.strokeColorSpace=t;continue}return void B(a.parseColorSpace({cs:e[0],resources:i,localColorSpaceCache:c}).then((function(e){f.state.strokeColorSpace=e||ije.singletons.gray})))}case _Ye:Q=f.state.fillColorSpace,e=Q.getRgb(e,0),s=FYe;break;case wYe:Q=f.state.strokeColorSpace,e=Q.getRgb(e,0),s=DYe;break;case kYe:f.state.fillColorSpace=ije.singletons.gray,e=ije.singletons.gray.getRgb(e,0),s=FYe;break;case xYe:f.state.strokeColorSpace=ije.singletons.gray,e=ije.singletons.gray.getRgb(e,0),s=DYe;break;case MYe:f.state.fillColorSpace=ije.singletons.cmyk,e=ije.singletons.cmyk.getRgb(e,0),s=FYe;break;case TYe:f.state.strokeColorSpace=ije.singletons.cmyk,e=ije.singletons.cmyk.getRgb(e,0),s=DYe;break;case FYe:f.state.fillColorSpace=ije.singletons.rgb,e=ije.singletons.rgb.getRgb(e,0);break;case DYe:f.state.strokeColorSpace=ije.singletons.rgb,e=ije.singletons.rgb.getRgb(e,0);break;case SYe:if(Q=f.state.patternFillColorSpace,!Q){if(xWe(e,null)){e=ije.singletons.gray.getRgb(e,0),s=FYe;break}e=[],s=AVe;break}if("Pattern"===Q.name)return void B(a.handleColorN(n,SYe,e,Q,p,i,t,c,h,d));e=Q.getRgb(e,0),s=FYe;break;case QYe:if(Q=f.state.patternStrokeColorSpace,!Q){if(xWe(e,null)){e=ije.singletons.gray.getRgb(e,0),s=DYe;break}e=[],s=lVe;break}if("Pattern"===Q.name)return void B(a.handleColorN(n,QYe,e,Q,p,i,t,c,h,d));e=Q.getRgb(e,0),s=DYe;break;case RYe:let y;try{const t=i.get("Shading");if(!t)throw new EVe("No shading resource found");if(y=t.get(e[0].name),!y)throw new EVe("No shading object found")}catch(x){if(x instanceof wVe)continue;if(a.options.ignoreErrors)continue;throw x}const b=a.parseShading({shading:y,resources:i,localColorSpaceCache:c,localShadingPatternCache:d});if(!b)continue;e=[b],s=RYe;break;case Nqe:if(S=e[0]instanceof iWe,_=e[0].name,S){const t=u.getByName(_);if(t){t.length>0&&n.addOp(Nqe,[t]),e=null;continue}}return void B(new Promise((function(e,s){if(!S)throw new EVe("GState must be referred to by name.");const r=i.get("ExtGState");if(!(r instanceof rWe))throw new EVe("ExtGState should be a dictionary.");const o=r.get(_);if(!(o instanceof rWe))throw new EVe("GState should be a dictionary.");a.setGState({resources:i,gState:o,operatorList:n,cacheKey:_,task:t,stateManager:f,localGStateCache:u,localColorSpaceCache:c}).then(e,s)})).catch((function(e){if(!(e instanceof wVe||a.options.ignoreErrors))throw e})));case Pqe:case Oqe:case Gqe:case Kqe:case qqe:case Yqe:case Vqe:a.buildPath(n,s,e,l);continue;case PYe:case OYe:case YYe:case VYe:continue;case KYe:if(!(e[0]instanceof iWe)){e[0],n.addOp(KYe,["OC",null]);continue}if("OC"===e[0].name)return void B(a.parseMarkedContentProps(e[1],i).then((e=>{n.addOp(KYe,["OC",e])})).catch((e=>{if(!(e instanceof wVe)){if(!a.options.ignoreErrors)throw e;n.addOp(KYe,["OC",null])}})));e=[e[0].name,e[1]instanceof rWe?e[1].get("MCID"):null];break;default:if(null!==e){for(E=0,w=e.length;E<w&&!(e[E]instanceof rWe);E++);if(E<w)continue}}n.addOp(s,e)}b?B(v1e):(I(),s())})).catch((e=>{if(!(e instanceof wVe)){if(this.options.ignoreErrors)return t.name,void I();throw e}}))}getTextContent({stream:e,task:t,resources:i,stateManager:n=null,includeMarkedContent:s=!1,sink:r,seenStyles:a=new Set,viewBox:o,lang:l=null,markedContentData:A=null,disableNormalization:c=!1,keepWhiteSpace:u=!1}){i||(i=rWe.empty),n||(n=new _1e(new S1e)),s&&(A||(A={level:0}));const h={items:[],styles:Object.create(null),lang:l},d={initialized:!1,str:[],totalWidth:0,totalHeight:0,width:0,height:0,vertical:!1,prevTransform:null,textAdvanceScale:0,spaceInFlowMin:0,spaceInFlowMax:0,trackingSpaceMin:1/0,negativeSpaceMax:-1/0,notASpace:-1/0,transform:null,fontName:null,hasEOL:!1},g=[" "," "];let p=0;function f(e){const t=(p+1)%2,i=" "!==g[p]&&" "===g[t];return g[p]=e,p=t,!u&&i}function m(){return!u&&" "!==g[p]&&" "===g[(p+1)%2]}function C(){g[0]=g[1]=" ",p=0}const I=this,v=this.xref,B=[];let y=null;const b=new l0e,E=new u0e,w=new D1e(e,v,n);let Q;function _({width:e=0,height:t=0,transform:i=d.prevTransform,fontName:n=d.fontName}){h.items.push({str:" ",dir:"ltr",width:e,height:t,transform:i,fontName:n,hasEOL:!1})}function S(){const e=Q.font,t=[Q.fontSize*Q.textHScale,0,0,Q.fontSize,0,Q.textRise];if(e.isType3Font&&(Q.fontSize<=1||e.isCharBBox)&&!LVe(Q.fontMatrix,uKe)){const i=e.bbox[3]-e.bbox[1];i>0&&(t[3]*=i*Q.fontMatrix[3])}return FVe.transform(Q.ctm,FVe.transform(Q.textMatrix,t))}function x(){if(d.initialized)return d;const{font:e,loadedName:t}=Q;if(!a.has(t)&&(a.add(t),h.styles[t]={fontFamily:e.fallbackName,ascent:e.ascent,descent:e.descent,vertical:e.vertical},I.options.fontExtraProperties&&e.systemFontInfo)){const i=h.styles[t];i.fontSubstitution=e.systemFontInfo.css,i.fontSubstitutionLoadedName=e.systemFontInfo.loadedName}d.fontName=t;const i=d.transform=S();e.vertical?(d.width=d.totalWidth=Math.hypot(i[0],i[1]),d.height=d.totalHeight=0,d.vertical=!0):(d.width=d.totalWidth=0,d.height=d.totalHeight=Math.hypot(i[2],i[3]),d.vertical=!1);const n=Math.hypot(Q.textLineMatrix[0],Q.textLineMatrix[1]),s=Math.hypot(Q.ctm[0],Q.ctm[1]);d.textAdvanceScale=s*n;const{fontSize:r}=Q;return d.trackingSpaceMin=.102*r,d.notASpace=.03*r,d.negativeSpaceMax=-.2*r,d.spaceInFlowMin=.102*r,d.spaceInFlowMax=.6*r,d.hasEOL=!1,d.initialized=!0,d}function k(){if(!d.initialized)return;const e=Math.hypot(Q.textLineMatrix[0],Q.textLineMatrix[1]),t=Math.hypot(Q.ctm[0],Q.ctm[1])*e;t!==d.textAdvanceScale&&(d.vertical?(d.totalHeight+=d.height*d.textAdvanceScale,d.height=0):(d.totalWidth+=d.width*d.textAdvanceScale,d.width=0),d.textAdvanceScale=t)}function D(e){let t=e.str.join("");var i;c||(i=t,HVe||(HVe=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,PVe=new Map([["ﬅ","ſt"]])),t=i.replaceAll(HVe,((e,t,i)=>t?t.normalize("NFKC"):PVe.get(i))));const n=V0e(t,-1,e.vertical);return{str:n.str,dir:n.dir,width:Math.abs(e.totalWidth),height:Math.abs(e.totalHeight),transform:e.transform,fontName:e.fontName,hasEOL:e.hasEOL}}async function F(e,n){const s=await I.loadFont(e,n,i);if(s.font.isType3Font)try{await s.loadType3Data(I,i,t)}catch{}Q.loadedName=s.loadedName,Q.font=s.font,Q.fontMatrix=s.font.fontMatrix||uKe}function T(e,t,i){const n=Math.hypot(i[0],i[1]);return[(i[0]*e+i[1]*t)/n,(i[2]*e+i[3]*t)/n]}function M(e){var t;const i=S();let n=i[4],s=i[5];if(null==(t=Q.font)?void 0:t.vertical){if(n<o[0]||n>o[2]||s+e<o[1]||s>o[3])return!1}else if(n+e<o[0]||n>o[2]||s<o[1]||s>o[3])return!1;if(!Q.font||!d.prevTransform)return!0;let r=d.prevTransform[4],a=d.prevTransform[5];if(r===n&&a===s)return!0;let l=-1;switch(i[0]&&0===i[1]&&0===i[2]?l=i[0]>0?0:180:i[1]&&0===i[0]&&0===i[3]&&(l=i[1]>0?90:270),l){case 0:break;case 90:[n,s]=[s,n],[r,a]=[a,r];break;case 180:[n,s,r,a]=[-n,-s,-r,-a];break;case 270:[n,s]=[-s,-n],[r,a]=[-a,-r];break;default:[n,s]=T(n,s,i),[r,a]=T(r,a,d.prevTransform)}if(Q.font.vertical){const e=(a-s)/d.textAdvanceScale,t=n-r,i=Math.sign(d.height);return e<i*d.negativeSpaceMax?Math.abs(t)>.5*d.width?(N(),!0):(C(),U(),!0):Math.abs(t)>d.width?(N(),!0):(e<=i*d.notASpace&&C(),e<=i*d.trackingSpaceMin?m()?(C(),U(),_({height:Math.abs(e)})):d.height+=e:L(e,d.prevTransform,i)||(0===d.str.length?(C(),_({height:Math.abs(e)})):d.height+=e),Math.abs(t)>.25*d.width&&U(),!0)}const A=(n-r)/d.textAdvanceScale,c=s-a,u=Math.sign(d.width);return A<u*d.negativeSpaceMax?Math.abs(c)>.5*d.height?(N(),!0):(C(),U(),!0):Math.abs(c)>d.height?(N(),!0):(A<=u*d.notASpace&&C(),A<=u*d.trackingSpaceMin?m()?(C(),U(),_({width:Math.abs(A)})):d.width+=A:L(A,d.prevTransform,u)||(0===d.str.length?(C(),_({width:Math.abs(A)})):d.width+=A),Math.abs(c)>.25*d.height&&U(),!0)}function R({chars:e,extraSpacing:t}){const i=Q.font;if(!e){const e=Q.charSpacing+t;return e&&(i.vertical?Q.translateTextMatrix(0,-e):Q.translateTextMatrix(e*Q.textHScale,0)),void(u&&M(0))}const n=i.charsToGlyphs(e),s=Q.fontMatrix[0]*Q.fontSize;for(let r=0,a=n.length;r<a;r++){const e=n[r],{category:o}=e;if(o.isInvisibleFormatMark)continue;let l=Q.charSpacing+(r+1===a?t:0),A=e.width;i.vertical&&(A=e.vmetric?e.vmetric[0]:-A);let c=A*s;if(!u&&o.isWhitespace){i.vertical?(l+=-c+Q.wordSpacing,Q.translateTextMatrix(0,-l)):(l+=c+Q.wordSpacing,Q.translateTextMatrix(l*Q.textHScale,0)),f(" ");continue}if(!o.isZeroWidthDiacritic&&!M(c)){i.vertical?Q.translateTextMatrix(0,c):Q.translateTextMatrix(c*Q.textHScale,0);continue}const h=x();o.isZeroWidthDiacritic&&(c=0),i.vertical?(Q.translateTextMatrix(0,c),c=Math.abs(c),h.height+=c):(c*=Q.textHScale,Q.translateTextMatrix(c,0),h.width+=c),c&&(h.prevTransform=S());const d=e.unicode;f(d)&&h.str.push(" "),h.str.push(d),l&&(i.vertical?Q.translateTextMatrix(0,-l):Q.translateTextMatrix(l*Q.textHScale,0))}}function N(){C(),d.initialized?(d.hasEOL=!0,U()):h.items.push({str:"",dir:"ltr",width:0,height:0,transform:S(),fontName:Q.loadedName,hasEOL:!0})}function L(e,t,i){if(i*d.spaceInFlowMin<=e&&e<=i*d.spaceInFlowMax)return d.initialized&&(C(),d.str.push(" ")),!1;const n=d.fontName;let s=0;return d.vertical&&(s=e,e=0),U(),C(),_({width:Math.abs(e),height:Math.abs(s),transform:t||S(),fontName:n}),!0}function U(){d.initialized&&d.str&&(d.vertical?d.totalHeight+=d.height*d.textAdvanceScale:d.totalWidth+=d.width*d.textAdvanceScale,h.items.push(D(d)),d.initialized=!1,d.str.length=0)}function H(e=!1){const t=h.items.length;0!==t&&(e&&t<10||(r.enqueue(h,t),h.items=[],h.styles=Object.create(null)))}const P=new E1e;return new Promise((function e(d,g){const p=function(t){H(!0),Promise.all([t,r.ready]).then((function(){try{e(d,g)}catch(t){g(t)}}),g)};t.ensureNotTerminated(),P.reset();const f={};let m,C,_,S=[];for(;!(m=P.check())&&(S.length=0,f.args=S,w.read(f));){const e=Q;Q=n.state;const d=f.fn;switch(S=f.args,0|d){case cYe:const d=S[0].name,g=S[1];if(Q.font&&d===Q.fontName&&g===Q.fontSize)break;return U(),Q.fontName=d,Q.fontSize=g,void p(F(d,null));case hYe:Q.textRise=S[0];break;case lYe:Q.textHScale=S[0]/100;break;case AYe:Q.leading=S[0];break;case dYe:Q.translateTextLineMatrix(S[0],S[1]),Q.textMatrix=Q.textLineMatrix.slice();break;case gYe:Q.leading=-S[1],Q.translateTextLineMatrix(S[0],S[1]),Q.textMatrix=Q.textLineMatrix.slice();break;case fYe:Q.carriageReturn();break;case pYe:Q.setTextMatrix(S[0],S[1],S[2],S[3],S[4],S[5]),Q.setTextLineMatrix(S[0],S[1],S[2],S[3],S[4],S[5]),k();break;case aYe:Q.charSpacing=S[0];break;case oYe:Q.wordSpacing=S[0];break;case sYe:Q.textMatrix=cKe.slice(),Q.textLineMatrix=cKe.slice();break;case CYe:if(!n.state.font){I.ensureStateFont(n.state);continue}const f=(Q.font.vertical?1:-1)*Q.fontSize/1e3,m=S[0];for(let e=0,t=m.length;e<t;e++){const t=m[e];if("string"==typeof t)B.push(t);else if("number"==typeof t&&0!==t){const e=B.join("");B.length=0,R({chars:e,extraSpacing:t*f})}}if(B.length>0){const e=B.join("");B.length=0,R({chars:e,extraSpacing:0})}break;case mYe:if(!n.state.font){I.ensureStateFont(n.state);continue}R({chars:S[0],extraSpacing:0});break;case IYe:if(!n.state.font){I.ensureStateFont(n.state);continue}Q.carriageReturn(),R({chars:S[0],extraSpacing:0});break;case vYe:if(!n.state.font){I.ensureStateFont(n.state);continue}Q.wordSpacing=S[0],Q.charSpacing=S[1],Q.carriageReturn(),R({chars:S[2],extraSpacing:0});break;case HYe:if(U(),y??(y=i.get("XObject")||rWe.empty),_=S[0]instanceof iWe,C=S[0].name,_&&b.getByName(C))break;return void p(new Promise((function(e,h){if(!_)throw new EVe("XObject must be referred to by name.");let d=y.getRaw(C);if(d instanceof aWe){if(b.getByRef(d))return void e();if(I.globalImageCache.getData(d,I.pageIndex))return void e();d=v.fetch(d)}if(!(d instanceof dWe))throw new EVe("XObject should be a stream");const g=d.dict.get("Subtype");if(!(g instanceof iWe))throw new EVe("XObject should have a Name subtype");if("Form"!==g.name)return b.set(C,d.dict.objId,!0),void e();const p=n.state.clone(),f=new _1e(p),m=kWe(d.dict.getArray("Matrix"),null);m&&f.transform(m),H();const B={enqueueInvoked:!1,enqueue(e,t){this.enqueueInvoked=!0,r.enqueue(e,t)},get desiredSize(){return r.desiredSize},get ready(){return r.ready}};I.getTextContent({stream:d,task:t,resources:d.dict.get("Resources")||i,stateManager:f,includeMarkedContent:s,sink:B,seenStyles:a,viewBox:o,lang:l,markedContentData:A,disableNormalization:c,keepWhiteSpace:u}).then((function(){B.enqueueInvoked||b.set(C,d.dict.objId,!0),e()}),h)})).catch((function(e){if(!(e instanceof wVe||I.options.ignoreErrors))throw e})));case Nqe:if(_=S[0]instanceof iWe,C=S[0].name,_&&E.getByName(C))break;return void p(new Promise((function(e,t){if(!_)throw new EVe("GState must be referred to by name.");const n=i.get("ExtGState");if(!(n instanceof rWe))throw new EVe("ExtGState should be a dictionary.");const s=n.get(C);if(!(s instanceof rWe))throw new EVe("GState should be a dictionary.");const r=s.get("Font");if(!r)return E.set(C,s.objId,!0),void e();U(),Q.fontName=null,Q.fontSize=r[1],F(null,r[0]).then(e,t)})).catch((function(e){if(!(e instanceof wVe||I.options.ignoreErrors))throw e})));case GYe:U(),s&&(A.level++,h.items.push({type:"beginMarkedContent",tag:S[0]instanceof iWe?S[0].name:null}));break;case KYe:if(U(),s){A.level++;let e=null;S[1]instanceof rWe&&(e=S[1].get("MCID")),h.items.push({type:"beginMarkedContentProps",id:Number.isInteger(e)?`${I.idFactory.getPageObjId()}_mc${e}`:null,tag:S[0]instanceof iWe?S[0].name:null})}break;case qYe:if(U(),s){if(0===A.level)break;A.level--,h.items.push({type:"endMarkedContent"})}break;case Uqe:!e||e.font===Q.font&&e.fontSize===Q.fontSize&&e.fontName===Q.fontName||U()}if(h.items.length>=r.desiredSize){m=!0;break}}m?p(v1e):(U(),H(),d())})).catch((e=>{if(!(e instanceof wVe)){if(this.options.ignoreErrors)return t.name,U(),void H();throw e}}))}async extractDataStructures(e,t){const i=this.xref;let n;const s=this.readToUnicode(t.toUnicode);if(t.composite){const i=e.get("CIDSystemInfo");i instanceof rWe&&(t.cidSystemInfo={registry:MVe(i.get("Registry")),ordering:MVe(i.get("Ordering")),supplement:i.get("Supplement")});try{const t=e.get("CIDToGIDMap");t instanceof dWe&&(n=t.getBytes())}catch(u){if(!this.options.ignoreErrors)throw u}}const r=[];let a,o=null;if(e.has("Encoding")){if(a=e.get("Encoding"),a instanceof rWe){if(o=a.get("BaseEncoding"),o=o instanceof iWe?o.name:null,a.has("Differences")){const e=a.get("Differences");let t=0;for(const n of e){const e=i.fetchIfRef(n);if("number"==typeof e)t=e;else{if(!(e instanceof iWe))throw new EVe(`Invalid entry in 'Differences' array: ${e}`);r[t++]=e.name}}}}else if(a instanceof iWe)o=a.name;else{const e="Encoding is not a Name nor a Dict";if(!this.options.ignoreErrors)throw new EVe(e)}"MacRomanEncoding"!==o&&"MacExpertEncoding"!==o&&"WinAnsiEncoding"!==o&&(o=null)}const l=!t.file||t.isInternalFont,A=bXe()[t.name];if(o&&l&&A&&(o=null),o)t.defaultEncoding=Mze(o);else{const e=!!(t.flags&hXe),i=!!(t.flags&dXe);a=kze,"TrueType"!==t.type||i||(a=Dze),(e||A)&&(a=xze,l&&(/Symbol/i.test(t.name)?a=Fze:/Dingbats/i.test(t.name)?a=Tze:/Wingdings/i.test(t.name)&&(a=Dze))),t.defaultEncoding=a}t.differences=r,t.baseEncodingName=o,t.hasEncoding=!!o||r.length>0,t.dict=e,t.toUnicode=await s;const c=await this.buildToUnicode(t);return t.toUnicode=c,n&&(t.cidToGidMap=this.readCidToGidMap(n,c)),t}_simpleFontToUnicode(e,t=!1){pVe(!e.composite,"Must be a simple font.");const i=[],n=e.defaultEncoding.slice(),s=e.baseEncodingName,r=e.differences;for(const o in r){const e=r[o];".notdef"!==e&&(n[o]=e)}const a=tXe();for(const o in n){let r=n[o];if(""===r)continue;let l=a[r];if(void 0!==l){i[o]=String.fromCharCode(l);continue}let A=0;switch(r[0]){case"G":3===r.length&&(A=parseInt(r.substring(1),16));break;case"g":5===r.length&&(A=parseInt(r.substring(1),16));break;case"C":case"c":if(r.length>=3&&r.length<=4){const i=r.substring(1);if(t){A=parseInt(i,16);break}if(A=+i,Number.isNaN(A)&&Number.isInteger(parseInt(i,16)))return this._simpleFontToUnicode(e,!0)}break;case"u":l=sXe(r,a),-1!==l&&(A=l);break;default:switch(r){case"f_h":case"f_t":case"T_h":i[o]=r.replaceAll("_","");continue}}if(A>0&&A<=1114111&&Number.isInteger(A)){if(s&&A===+o){const e=Mze(s);if(e&&(r=e[o])){i[o]=String.fromCharCode(a[r]);continue}}i[o]=String.fromCodePoint(A)}}return i}async buildToUnicode(e){var t,i;if(e.hasIncludedToUnicodeMap=(null==(t=e.toUnicode)?void 0:t.length)>0,e.hasIncludedToUnicodeMap)return!e.composite&&e.hasEncoding&&(e.fallbackToUnicode=this._simpleFontToUnicode(e)),e.toUnicode;if(!e.composite)return new xXe(this._simpleFontToUnicode(e));if(e.composite&&(e.cMap.builtInCMap&&!(e.cMap instanceof Aze)||"Adobe"===(null==(i=e.cidSystemInfo)?void 0:i.registry)&&("GB1"===e.cidSystemInfo.ordering||"CNS1"===e.cidSystemInfo.ordering||"Japan1"===e.cidSystemInfo.ordering||"Korea1"===e.cidSystemInfo.ordering))){const{registry:t,ordering:i}=e.cidSystemInfo,n=iWe.get(`${t}-${i}-UCS2`),s=await bze.create({encoding:n,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),r=[],a=[];return e.cMap.forEach((function(e,t){if(t>65535)throw new EVe("Max size of CID is 65,535");const i=s.lookup(t);if(i){a.length=0;for(let e=0,t=i.length;e<t;e+=2)a.push((i.charCodeAt(e)<<8)+i.charCodeAt(e+1));r[e]=String.fromCharCode(...a)}})),new xXe(r)}return new kXe(e.firstChar,e.lastChar)}async readToUnicode(e){if(!e)return null;if(e instanceof iWe){const t=await bze.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});return t instanceof Aze?new kXe(0,65535):new xXe(t.getMap())}if(e instanceof dWe)try{const t=await bze.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});if(t instanceof Aze)return new kXe(0,65535);const i=new Array(t.length);return t.forEach((function(e,t){if("number"==typeof t)return void(i[e]=String.fromCodePoint(t));t.length%2!=0&&(t="\0"+t);const n=[];for(let i=0;i<t.length;i+=2){const e=t.charCodeAt(i)<<8|t.charCodeAt(i+1);if(55296!=(63488&e)){n.push(e);continue}i+=2;const s=t.charCodeAt(i)<<8|t.charCodeAt(i+1);n.push(((1023&e)<<10)+(1023&s)+65536)}i[e]=String.fromCodePoint(...n)})),new xXe(i)}catch(t){if(t instanceof wVe)return null;if(this.options.ignoreErrors)return null;throw t}return null}readCidToGidMap(e,t){const i=[];for(let n=0,s=e.length;n<s;n++){const s=e[n++]<<8|e[n],r=n>>1;(0!==s||t.has(r))&&(i[r]=s)}return i}extractWidths(e,t,i){const n=this.xref;let s=[],r=0;const a=[];let o;if(i.composite){const t=e.get("DW");r="number"==typeof t?Math.ceil(t):1e3;const l=e.get("W");if(Array.isArray(l))for(let e=0,i=l.length;e<i;e++){let t=n.fetchIfRef(l[e++]);if(!Number.isInteger(t))break;const i=n.fetchIfRef(l[e]);if(Array.isArray(i))for(const e of i){const i=n.fetchIfRef(e);"number"==typeof i&&(s[t]=i),t++}else{if(!Number.isInteger(i))break;{const r=n.fetchIfRef(l[++e]);if("number"!=typeof r)continue;for(let e=t;e<=i;e++)s[e]=r}}}if(i.vertical){const t=e.getArray("DW2");let i=xWe(t,2)?t:[880,-1e3];if(o=[i[1],.5*r,i[0]],i=e.get("W2"),Array.isArray(i))for(let e=0,s=i.length;e<s;e++){let t=n.fetchIfRef(i[e++]);if(!Number.isInteger(t))break;const s=n.fetchIfRef(i[e]);if(Array.isArray(s))for(let e=0,i=s.length;e<i;e++){const i=[n.fetchIfRef(s[e++]),n.fetchIfRef(s[e++]),n.fetchIfRef(s[e])];xWe(i,null)&&(a[t]=i),t++}else{if(!Number.isInteger(s))break;{const r=[n.fetchIfRef(i[++e]),n.fetchIfRef(i[++e]),n.fetchIfRef(i[++e])];if(!xWe(r,null))continue;for(let e=t;e<=s;e++)a[e]=r}}}}}else{const a=e.get("Widths");if(Array.isArray(a)){let e=i.firstChar;for(const t of a){const i=n.fetchIfRef(t);"number"==typeof i&&(s[e]=i),e++}const o=t.get("MissingWidth");r="number"==typeof o?o:0}else{const t=e.get("BaseFont");if(t instanceof iWe){const e=this.getBaseFontMetrics(t.name);s=this.buildCharCodeToWidth(e.widths,i),r=e.defaultWidth}}}let l=!0,A=r;for(const c in s){const e=s[c];if(e)if(A){if(A!==e){l=!1;break}}else A=e}l?i.flags|=cXe:i.flags&=~cXe,i.defaultWidth=r,i.widths=s,i.defaultVMetrics=o,i.vmetrics=a}isSerifFont(e){const t=e.split("-",1)[0];return t in yXe()||/serif/gi.test(t)}getBaseFontMetrics(e){let t=0,i=Object.create(null),n=!1;let s=IXe()[e]||e;const r=JXe();s in r||(s=this.isSerifFont(e)?"Times-Roman":"Helvetica");const a=r[s];return"number"==typeof a?(t=a,n=!0):i=a(),{defaultWidth:t,monospace:n,widths:i}}buildCharCodeToWidth(e,t){const i=Object.create(null),n=t.differences,s=t.defaultEncoding;for(let r=0;r<256;r++)r in n&&e[n[r]]?i[r]=e[n[r]]:r in s&&e[s[r]]&&(i[r]=e[s[r]]);return i}preEvaluateFont(e){const t=e;let i=e.get("Subtype");if(!(i instanceof iWe))throw new EVe("invalid font Subtype");let n,s=!1;if("Type0"===i.name){const t=e.get("DescendantFonts");if(!t)throw new EVe("Descendant fonts are not specified");if(!((e=Array.isArray(t)?this.xref.fetchIfRef(t[0]):t)instanceof rWe))throw new EVe("Descendant font is not a dictionary.");if(i=e.get("Subtype"),!(i instanceof iWe))throw new EVe("invalid font Subtype");s=!0}let r=e.get("FirstChar");Number.isInteger(r)||(r=0);let a=e.get("LastChar");Number.isInteger(a)||(a=s?65535:255);const o=e.get("FontDescriptor"),l=e.get("ToUnicode")||t.get("ToUnicode");if(o){n=new o1e;const i=t.getRaw("Encoding");if(i instanceof iWe)n.update(i.name);else if(i instanceof aWe)n.update(i.toString());else if(i instanceof rWe)for(const e of i.getRawValues())if(e instanceof iWe)n.update(e.name);else if(e instanceof aWe)n.update(e.toString());else if(Array.isArray(e)){const t=e.length,i=new Array(t);for(let n=0;n<t;n++){const t=e[n];t instanceof iWe?i[n]=t.name:("number"==typeof t||t instanceof aWe)&&(i[n]=t.toString())}n.update(i.join())}if(n.update(`${r}-${a}`),l instanceof dWe){const e=l.str||l,t=e.buffer?new Uint8Array(e.buffer.buffer,0,e.bufferLength):new Uint8Array(e.bytes.buffer,e.start,e.end-e.start);n.update(t)}else l instanceof iWe&&n.update(l.name);const o=e.get("Widths")||t.get("Widths");if(Array.isArray(o)){const e=[];for(const t of o)("number"==typeof t||t instanceof aWe)&&e.push(t.toString());n.update(e.join())}if(s){n.update("compositeFont");const i=e.get("W")||t.get("W");if(Array.isArray(i)){const e=[];for(const t of i)if("number"==typeof t||t instanceof aWe)e.push(t.toString());else if(Array.isArray(t)){const i=[];for(const e of t)("number"==typeof e||e instanceof aWe)&&i.push(e.toString());e.push(`[${i.join()}]`)}n.update(e.join())}const s=e.getRaw("CIDToGIDMap")||t.getRaw("CIDToGIDMap");s instanceof iWe?n.update(s.name):s instanceof aWe?n.update(s.toString()):s instanceof dWe&&n.update(s.peekBytes())}}return{descriptor:o,dict:e,baseDict:t,composite:s,type:i.name,firstChar:r,lastChar:a,toUnicode:l,hash:n?n.hexdigest():""}}async translateFont({descriptor:e,dict:t,baseDict:i,composite:n,type:s,firstChar:r,lastChar:a,toUnicode:o,cssFontInfo:l}){const A="Type3"===s;if(!e){if(!A){let e=t.get("BaseFont");if(!(e instanceof iWe))throw new EVe("Base font is not specified");e=e.name.replaceAll(/[,_]/g,"-");const n=this.getBaseFontMetrics(e),l=e.split("-",1)[0],c=(this.isSerifFont(l)?uXe:0)|(n.monospace?cXe:0)|(bXe()[l]?hXe:dXe),u={type:s,name:e,loadedName:i.loadedName,systemFontInfo:null,widths:n.widths,defaultWidth:n.defaultWidth,isSimulatedFlags:!0,flags:c,firstChar:r,lastChar:a,toUnicode:o,xHeight:0,capHeight:0,italicAngle:0,isType3Font:A},h=t.get("Widths"),d=_Xe(e);let g=null;d&&(g=await this.fetchStandardFontData(d),u.isInternalFont=!!g),!u.isInternalFont&&this.options.useSystemFonts&&(u.systemFontInfo=t1e(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,e,d,s));const p=await this.extractDataStructures(t,u);if(Array.isArray(h)){const e=[];let t=r;for(const i of h){const n=this.xref.fetchIfRef(i);"number"==typeof n&&(e[t]=n),t++}p.widths=e}else p.widths=this.buildCharCodeToWidth(n.widths,p);return new z$e(e,g,p)}{const i=FWe(t.getArray("FontBBox"),[0,0,0,0]);(e=new rWe(null)).set("FontName",iWe.get(s)),e.set("FontBBox",i)}}let c=e.get("FontName"),u=t.get("BaseFont");"string"==typeof c&&(c=iWe.get(c)),"string"==typeof u&&(u=iWe.get(u));const h=null==c?void 0:c.name,d=null==u?void 0:u.name;if(A||h===d||h&&d&&(d.startsWith(h)||!SXe(h)&&SXe(d))&&(c=null),c||(c=u),!(c instanceof iWe))throw new EVe("invalid font name");let g,p,f,m,C;try{if(g=e.get("FontFile","FontFile2","FontFile3"),g){if(!(g instanceof dWe))throw new EVe("FontFile should be a stream");if(g.isEmpty)throw new EVe("FontFile is empty")}}catch(F){if(!this.options.ignoreErrors)throw F;c.name,g=null}let I=!1,v=null,B=null;if(g){if(g.dict){const e=g.dict.get("Subtype");e instanceof iWe&&(p=e.name),f=g.dict.get("Length1"),m=g.dict.get("Length2"),C=g.dict.get("Length3")}}else if(l){const e=t0e(c.name);e&&(l.fontFamily=`${l.fontFamily}-PdfJS-XFA`,l.metrics=e.metrics||null,v=e.factors||null,g=await this.fetchStandardFontData(e.name),I=!!g,i=t=i0e(c.name),n=!0)}else if(!A){const e=_Xe(c.name);e&&(g=await this.fetchStandardFontData(e),I=!!g),!I&&this.options.useSystemFonts&&(B=t1e(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,c.name,e,s))}const y=kWe(t.getArray("FontMatrix"),uKe),b=FWe(e.getArray("FontBBox")||t.getArray("FontBBox"),void 0);let E=e.get("Ascent");"number"!=typeof E&&(E=void 0);let w=e.get("Descent");"number"!=typeof w&&(w=void 0);let Q=e.get("XHeight");"number"!=typeof Q&&(Q=0);let _=e.get("CapHeight");"number"!=typeof _&&(_=0);let S=e.get("Flags");Number.isInteger(S)||(S=0);let x=e.get("ItalicAngle");"number"!=typeof x&&(x=0);const k={type:s,name:c.name,subtype:p,file:g,length1:f,length2:m,length3:C,isInternalFont:I,loadedName:i.loadedName,composite:n,fixedPitch:!1,fontMatrix:y,firstChar:r,lastChar:a,toUnicode:o,bbox:b,ascent:E,descent:w,xHeight:Q,capHeight:_,flags:S,italicAngle:x,isType3Font:A,cssFontInfo:l,scaleFactors:v,systemFontInfo:B};if(n){const e=i.get("Encoding");e instanceof iWe&&(k.cidEncoding=e.name);const t=await bze.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});k.cMap=t,k.vertical=k.cMap.vertical}const D=await this.extractDataStructures(t,k);return this.extractWidths(t,e,D),new z$e(c.name,g,D)}static buildFontPaths(e,t,i,n){function s(t){const s=`${e.loadedName}_path_${t}`;try{if(e.renderer.hasBuiltPath(t))return;i.send("commonobj",[s,"FontPath",e.renderer.getPathJs(t)])}catch(r){if(n.ignoreErrors)return;throw r}}for(const r of t){s(r.fontChar);const e=r.accent;(null==e?void 0:e.fontChar)&&s(e.fontChar)}}static get fallbackFontDict(){const e=new rWe;return e.set("BaseFont",iWe.get("Helvetica")),e.set("Type",iWe.get("FallbackType")),e.set("Subtype",iWe.get("FallbackType")),e.set("Encoding",iWe.get("WinAnsiEncoding")),mVe(this,"fallbackFontDict",e)}};class Q1e{constructor({loadedName:e,font:t,dict:i,evaluatorOptions:n}){this.loadedName=e,this.font=t,this.dict=i,this._evaluatorOptions=n||m1e,this.type3Loaded=null,this.type3Dependencies=t.isType3Font?new Set:null,this.sent=!1}send(e){this.sent||(this.sent=!0,e.send("commonobj",[this.loadedName,"Font",this.font.exportData(this._evaluatorOptions.fontExtraProperties)]))}fallback(e){this.font.data&&(this.font.disableFontFace=!0,w1e.buildFontPaths(this.font,this.font.glyphCacheValues,e,this._evaluatorOptions))}loadType3Data(e,t,i){if(this.type3Loaded)return this.type3Loaded;if(!this.font.isType3Font)throw new Error("Must be a Type3 font.");const n=e.clone({ignoreErrors:!1}),s=new oWe(e.type3FontRefs);this.dict.objId&&!s.has(this.dict.objId)&&s.put(this.dict.objId),n.type3FontRefs=s;const r=this.font,a=this.type3Dependencies;let o=Promise.resolve();const l=this.dict.get("CharProcs"),A=this.dict.get("Resources")||t,c=Object.create(null),u=FVe.normalizeRect(r.bbox||[0,0,0,0]),h=u[2]-u[0],d=u[3]-u[1],g=Math.hypot(h,d);for(const p of l.getKeys())o=o.then((()=>{const e=l.get(p),t=new d1e;return n.getOperatorList({stream:e,task:i,resources:A,operatorList:t}).then((()=>{t.fnArray[0]===yYe&&this._removeType3ColorOperators(t,g),c[p]=t.getIR();for(const e of t.dependencies)a.add(e)})).catch((function(e){const t=new d1e;c[p]=t.getIR()}))}));return this.type3Loaded=o.then((()=>{r.charProcOperatorList=c,this._bbox&&(r.isCharBBox=!0,r.bbox=this._bbox)})),this.type3Loaded}_removeType3ColorOperators(e,t=NaN){const i=FVe.normalizeRect(e.argsArray[0].slice(2)),n=i[2]-i[0],s=i[3]-i[1],r=Math.hypot(n,s);0===n||0===s?(e.fnArray.splice(0,1),e.argsArray.splice(0,1)):(0===t||Math.round(r/t)>=10)&&(this._bbox||(this._bbox=[1/0,1/0,-1/0,-1/0]),this._bbox[0]=Math.min(this._bbox[0],i[0]),this._bbox[1]=Math.min(this._bbox[1],i[1]),this._bbox[2]=Math.max(this._bbox[2],i[2]),this._bbox[3]=Math.max(this._bbox[3],i[3]));let a=0,o=e.length;for(;a<o;){switch(e.fnArray[a]){case yYe:break;case bYe:case EYe:case wYe:case QYe:case _Ye:case SYe:case xYe:case kYe:case DYe:case FYe:case TYe:case MYe:case RYe:case Mqe:e.fnArray.splice(a,1),e.argsArray.splice(a,1),o--;continue;case Nqe:const[t]=e.argsArray[a];let i=0,n=t.length;for(;i<n;){const[e]=t[i];switch(e){case"TR":case"TR2":case"HT":case"BG":case"BG2":case"UCR":case"UCR2":t.splice(i,1),n--;continue}i++}}a++}}}class _1e{constructor(e=new x1e){this.state=e,this.stateStack=[]}save(){const e=this.state;this.stateStack.push(this.state),this.state=e.clone()}restore(){const e=this.stateStack.pop();e&&(this.state=e)}transform(e){this.state.ctm=FVe.transform(this.state.ctm,e)}}class S1e{constructor(){this.ctm=new Float32Array(cKe),this.fontName=null,this.fontSize=0,this.loadedName=null,this.font=null,this.fontMatrix=uKe,this.textMatrix=cKe.slice(),this.textLineMatrix=cKe.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}setTextMatrix(e,t,i,n,s,r){const a=this.textMatrix;a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=s,a[5]=r}setTextLineMatrix(e,t,i,n,s,r){const a=this.textLineMatrix;a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=s,a[5]=r}translateTextMatrix(e,t){const i=this.textMatrix;i[4]=i[0]*e+i[2]*t+i[4],i[5]=i[1]*e+i[3]*t+i[5]}translateTextLineMatrix(e,t){const i=this.textLineMatrix;i[4]=i[0]*e+i[2]*t+i[4],i[5]=i[1]*e+i[3]*t+i[5]}carriageReturn(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()}clone(){const e=Object.create(this);return e.textMatrix=this.textMatrix.slice(),e.textLineMatrix=this.textLineMatrix.slice(),e.fontMatrix=this.fontMatrix.slice(),e}}class x1e{constructor(){this.ctm=new Float32Array(cKe),this.font=null,this.textRenderingMode=xKe,this._fillColorSpace=ije.singletons.gray,this._strokeColorSpace=ije.singletons.gray,this.patternFillColorSpace=null,this.patternStrokeColorSpace=null}get fillColorSpace(){return this._fillColorSpace}set fillColorSpace(e){this._fillColorSpace=this.patternFillColorSpace=e}get strokeColorSpace(){return this._strokeColorSpace}set strokeColorSpace(e){this._strokeColorSpace=this.patternStrokeColorSpace=e}clone(){return Object.create(this)}}const k1e=class e{static get opMap(){return mVe(this,"opMap",Object.assign(Object.create(null),{w:{id:xqe,numArgs:1,variableArgs:!1},J:{id:kqe,numArgs:1,variableArgs:!1},j:{id:Dqe,numArgs:1,variableArgs:!1},M:{id:Fqe,numArgs:1,variableArgs:!1},d:{id:Tqe,numArgs:2,variableArgs:!1},ri:{id:Mqe,numArgs:1,variableArgs:!1},i:{id:Rqe,numArgs:1,variableArgs:!1},gs:{id:Nqe,numArgs:1,variableArgs:!1},q:{id:Lqe,numArgs:0,variableArgs:!1},Q:{id:Uqe,numArgs:0,variableArgs:!1},cm:{id:Hqe,numArgs:6,variableArgs:!1},m:{id:Pqe,numArgs:2,variableArgs:!1},l:{id:Oqe,numArgs:2,variableArgs:!1},c:{id:Gqe,numArgs:6,variableArgs:!1},v:{id:Kqe,numArgs:4,variableArgs:!1},y:{id:qqe,numArgs:4,variableArgs:!1},h:{id:Yqe,numArgs:0,variableArgs:!1},re:{id:Vqe,numArgs:4,variableArgs:!1},S:{id:Wqe,numArgs:0,variableArgs:!1},s:{id:jqe,numArgs:0,variableArgs:!1},f:{id:Jqe,numArgs:0,variableArgs:!1},F:{id:Jqe,numArgs:0,variableArgs:!1},"f*":{id:zqe,numArgs:0,variableArgs:!1},B:{id:Xqe,numArgs:0,variableArgs:!1},"B*":{id:$qe,numArgs:0,variableArgs:!1},b:{id:Zqe,numArgs:0,variableArgs:!1},"b*":{id:eYe,numArgs:0,variableArgs:!1},n:{id:tYe,numArgs:0,variableArgs:!1},W:{id:iYe,numArgs:0,variableArgs:!1},"W*":{id:nYe,numArgs:0,variableArgs:!1},BT:{id:sYe,numArgs:0,variableArgs:!1},ET:{id:rYe,numArgs:0,variableArgs:!1},Tc:{id:aYe,numArgs:1,variableArgs:!1},Tw:{id:oYe,numArgs:1,variableArgs:!1},Tz:{id:lYe,numArgs:1,variableArgs:!1},TL:{id:AYe,numArgs:1,variableArgs:!1},Tf:{id:cYe,numArgs:2,variableArgs:!1},Tr:{id:uYe,numArgs:1,variableArgs:!1},Ts:{id:hYe,numArgs:1,variableArgs:!1},Td:{id:dYe,numArgs:2,variableArgs:!1},TD:{id:gYe,numArgs:2,variableArgs:!1},Tm:{id:pYe,numArgs:6,variableArgs:!1},"T*":{id:fYe,numArgs:0,variableArgs:!1},Tj:{id:mYe,numArgs:1,variableArgs:!1},TJ:{id:CYe,numArgs:1,variableArgs:!1},"'":{id:IYe,numArgs:1,variableArgs:!1},'"':{id:vYe,numArgs:3,variableArgs:!1},d0:{id:BYe,numArgs:2,variableArgs:!1},d1:{id:yYe,numArgs:6,variableArgs:!1},CS:{id:bYe,numArgs:1,variableArgs:!1},cs:{id:EYe,numArgs:1,variableArgs:!1},SC:{id:wYe,numArgs:4,variableArgs:!0},SCN:{id:QYe,numArgs:33,variableArgs:!0},sc:{id:_Ye,numArgs:4,variableArgs:!0},scn:{id:SYe,numArgs:33,variableArgs:!0},G:{id:xYe,numArgs:1,variableArgs:!1},g:{id:kYe,numArgs:1,variableArgs:!1},RG:{id:DYe,numArgs:3,variableArgs:!1},rg:{id:FYe,numArgs:3,variableArgs:!1},K:{id:TYe,numArgs:4,variableArgs:!1},k:{id:MYe,numArgs:4,variableArgs:!1},sh:{id:RYe,numArgs:1,variableArgs:!1},BI:{id:NYe,numArgs:0,variableArgs:!1},ID:{id:LYe,numArgs:0,variableArgs:!1},EI:{id:UYe,numArgs:1,variableArgs:!1},Do:{id:HYe,numArgs:1,variableArgs:!1},MP:{id:PYe,numArgs:1,variableArgs:!1},DP:{id:OYe,numArgs:2,variableArgs:!1},BMC:{id:GYe,numArgs:1,variableArgs:!1},BDC:{id:KYe,numArgs:2,variableArgs:!1},EMC:{id:qYe,numArgs:0,variableArgs:!1},BX:{id:YYe,numArgs:0,variableArgs:!1},EX:{id:VYe,numArgs:0,variableArgs:!1},BM:null,BD:null,true:null,fa:null,fal:null,fals:null,false:null,nu:null,nul:null,null:null}))}constructor(t,i,n=new _1e){this.parser=new tze({lexer:new sze(t,e.opMap),xref:i}),this.stateManager=n,this.nonProcessedArgs=[],this._isPathOp=!1,this._numInvalidPathOPS=0}get savedStatesDepth(){return this.stateManager.stateStack.length}read(t){let i=t.args;for(;;){const n=this.parser.getObj();if(n instanceof nWe){const s=n.cmd,r=e.opMap[s];if(!r)continue;const a=r.id,o=r.numArgs;let l=null!==i?i.length:0;if(this._isPathOp||(this._numInvalidPathOPS=0),this._isPathOp=a>=Pqe&&a<=tYe,!r.variableArgs){if(l!==o){const e=this.nonProcessedArgs;for(;l>o;)e.push(i.shift()),l--;for(;l<o&&0!==e.length;)null===i&&(i=[]),i.unshift(e.pop()),l++}if(l<o){const t=`command ${s}: expected ${o} args, but received ${l} args.`;if(this._isPathOp&&++this._numInvalidPathOPS>e.MAX_INVALID_PATH_OPS)throw new EVe(`Invalid ${t}`);null!==i&&(i.length=0);continue}}return this.preprocessCommand(a,i),t.fn=a,t.args=i,!0}if(n===$Ve)return!1;if(null!==n&&(null===i&&(i=[]),i.push(n),i.length>33))throw new EVe("Too many arguments")}}preprocessCommand(e,t){switch(0|e){case Lqe:this.stateManager.save();break;case Uqe:this.stateManager.restore();break;case Hqe:this.stateManager.transform(t)}}};Ic(k1e,"MAX_INVALID_PATH_OPS",10);let D1e=k1e;class F1e extends D1e{constructor(e){super(new $We(e))}parse(){const e={fn:0,args:[]},t={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;e.args.length=0,this.read(e);){if(0!==this.savedStatesDepth)continue;const{fn:i,args:n}=e;switch(0|i){case cYe:const[e,i]=n;e instanceof iWe&&(t.fontName=e.name),"number"==typeof i&&i>0&&(t.fontSize=i);break;case FYe:ije.singletons.rgb.getRgbItem(n,0,t.fontColor,0);break;case kYe:ije.singletons.gray.getRgbItem(n,0,t.fontColor,0);break;case MYe:ije.singletons.cmyk.getRgbItem(n,0,t.fontColor,0)}}}catch(i){}return t}}function T1e(e){return new F1e(e).parse()}class M1e extends D1e{constructor(e,t,i){var n;super(e),this.stream=e,this.evaluatorOptions=t,this.xref=i,this.resources=null==(n=e.dict)?void 0:n.get("Resources")}parse(){const e={fn:0,args:[]};let t={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:ije.singletons.gray},i=!1;const n=[];try{for(;e.args.length=0,!i&&this.read(e);){const{fn:s,args:r}=e;switch(0|s){case Lqe:n.push({scaleFactor:t.scaleFactor,fontSize:t.fontSize,fontName:t.fontName,fontColor:t.fontColor.slice(),fillColorSpace:t.fillColorSpace});break;case Uqe:t=n.pop()||t;break;case pYe:t.scaleFactor*=Math.hypot(r[0],r[1]);break;case cYe:const[e,s]=r;e instanceof iWe&&(t.fontName=e.name),"number"==typeof s&&s>0&&(t.fontSize=s*t.scaleFactor);break;case EYe:t.fillColorSpace=ije.parse({cs:r[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:this._localColorSpaceCache});break;case _Ye:t.fillColorSpace.getRgbItem(r,0,t.fontColor,0);break;case FYe:ije.singletons.rgb.getRgbItem(r,0,t.fontColor,0);break;case kYe:ije.singletons.gray.getRgbItem(r,0,t.fontColor,0);break;case MYe:ije.singletons.cmyk.getRgbItem(r,0,t.fontColor,0);break;case mYe:case CYe:case IYe:case vYe:i=!0}}}catch(s){}return this.stream.reset(),delete t.scaleFactor,delete t.fillColorSpace,t}get _localColorSpaceCache(){return mVe(this,"_localColorSpaceCache",new A0e)}get _pdfFunctionFactory(){return mVe(this,"_pdfFunctionFactory",new f0e({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported}))}}function R1e(e,t){if(e[0]===e[1]&&e[1]===e[2]){return`${qWe(e[0]/255)} ${t?"g":"G"}`}return Array.from(e,(e=>qWe(e/255))).join(" ")+" "+(t?"rg":"RG")}class N1e{constructor(e,t){this.xref=e,this.widths=null,this.firstChar=1/0,this.lastChar=-1/0,this.fontFamily=t;const i=new OffscreenCanvas(1,1);this.ctxMeasure=i.getContext("2d",{willReadFrequently:!0}),N1e._fontNameId||(N1e._fontNameId=1),this.fontName=iWe.get(`InvalidPDFjsFont_${t}_${N1e._fontNameId++}`)}get fontDescriptorRef(){if(!N1e._fontDescriptorRef){const e=new rWe(this.xref);e.set("Type",iWe.get("FontDescriptor")),e.set("FontName",this.fontName),e.set("FontFamily","MyriadPro Regular"),e.set("FontBBox",[0,0,0,0]),e.set("FontStretch",iWe.get("Normal")),e.set("FontWeight",400),e.set("ItalicAngle",0),N1e._fontDescriptorRef=this.xref.getNewPersistentRef(e)}return N1e._fontDescriptorRef}get descendantFontRef(){const e=new rWe(this.xref);e.set("BaseFont",this.fontName),e.set("Type",iWe.get("Font")),e.set("Subtype",iWe.get("CIDFontType0")),e.set("CIDToGIDMap",iWe.get("Identity")),e.set("FirstChar",this.firstChar),e.set("LastChar",this.lastChar),e.set("FontDescriptor",this.fontDescriptorRef),e.set("DW",1e3);const t=[],i=[...this.widths.entries()].sort();let n=null,s=null;for(const[a,o]of i)n?a===n+s.length?s.push(o):(t.push(n,s),n=a,s=[o]):(n=a,s=[o]);n&&t.push(n,s),e.set("W",t);const r=new rWe(this.xref);return r.set("Ordering","Identity"),r.set("Registry","Adobe"),r.set("Supplement",0),e.set("CIDSystemInfo",r),this.xref.getNewPersistentRef(e)}get baseFontRef(){const e=new rWe(this.xref);return e.set("BaseFont",this.fontName),e.set("Type",iWe.get("Font")),e.set("Subtype",iWe.get("Type0")),e.set("Encoding",iWe.get("Identity-H")),e.set("DescendantFonts",[this.descendantFontRef]),e.set("ToUnicode",iWe.get("Identity-H")),this.xref.getNewPersistentRef(e)}get resources(){const e=new rWe(this.xref),t=new rWe(this.xref);return t.set(this.fontName.name,this.baseFontRef),e.set("Font",t),e}_createContext(){return this.widths=new Map,this.ctxMeasure.font=`1000px ${this.fontFamily}`,this.ctxMeasure}createFontResources(e){const t=this._createContext();for(const i of e.split(/\r\n?|\n/))for(const e of i.split("")){const i=e.charCodeAt(0);if(this.widths.has(i))continue;const n=t.measureText(e),s=Math.ceil(n.width);this.widths.set(i,s),this.firstChar=Math.min(i,this.firstChar),this.lastChar=Math.max(i,this.lastChar)}return this.resources}static getFirstPositionInfo(e,t,i){const[n,s,r,a]=e;let o=r-n,l=a-s;t%180!=0&&([o,l]=[l,o]);const A=hKe*i;return{coords:[0,l+dKe*i-A],bbox:[0,0,o,l],matrix:0!==t?JWe(t,l,A):void 0}}createAppearance(e,t,i,n,s,r){const a=this._createContext(),o=[];let l=-1/0;for(const _ of e.split(/\r\n?|\n/)){o.push(_);const e=a.measureText(_).width;l=Math.max(l,e);for(const t of HWe(_)){const e=String.fromCodePoint(t);let i=this.widths.get(t);if(void 0===i){const n=a.measureText(e);i=Math.ceil(n.width),this.widths.set(t,i),this.firstChar=Math.min(t,this.firstChar),this.lastChar=Math.max(t,this.lastChar)}}}l*=n/1e3;const[A,c,u,h]=t;let d=u-A,g=h-c;i%180!=0&&([d,g]=[g,d]);let p=1;l>d&&(p=d/l);let f=1;const m=hKe*n,C=dKe*n,I=m*o.length;I>g&&(f=g/I);const v=n*Math.min(p,f),B=["q",`0 0 ${qWe(d)} ${qWe(g)} re W n`,"BT",`1 0 0 1 0 ${qWe(g+C)} Tm 0 Tc ${R1e(s,!0)}`,`/${this.fontName.name} ${qWe(v)} Tf`],{resources:y}=this;if(1!==(r="number"==typeof r&&r>=0&&r<=1?r:1)){B.push("/R0 gs");const e=new rWe(this.xref),t=new rWe(this.xref);t.set("ca",r),t.set("CA",r),t.set("Type",iWe.get("ExtGState")),e.set("R0",t),y.set("ExtGState",e)}const b=qWe(m);for(const _ of o)B.push(`0 -${b} Td <${WWe(_)}> Tj`);B.push("ET","Q");const E=B.join("\n"),w=new rWe(this.xref);if(w.set("Subtype",iWe.get("Form")),w.set("Type",iWe.get("XObject")),w.set("BBox",[0,0,d,g]),w.set("Length",E.length),w.set("Resources",y),i){const e=JWe(i,d,g);w.set("Matrix",e)}const Q=new $We(E);return Q.dict=w,Q}}class L1e{constructor(e,t,i){this.root=e,this.xref=t,this._type=i}getAll(){const e=new Map;if(!this.root)return e;const t=this.xref,i=new oWe;i.put(this.root);const n=[this.root];for(;n.length>0;){const s=t.fetchIfRef(n.shift());if(!(s instanceof rWe))continue;if(s.has("Kids")){const e=s.get("Kids");if(!Array.isArray(e))continue;for(const t of e){if(i.has(t))throw new EVe(`Duplicate entry in "${this._type}" tree.`);n.push(t),i.put(t)}continue}const r=s.get(this._type);if(Array.isArray(r))for(let i=0,n=r.length;i<n;i+=2)e.set(t.fetchIfRef(r[i]),t.fetchIfRef(r[i+1]))}return e}getRaw(e){if(!this.root)return null;const t=this.xref;let i=t.fetchIfRef(this.root),n=0;for(;i.has("Kids");){if(++n>10)return this._type,null;const s=i.get("Kids");if(!Array.isArray(s))return null;let r=0,a=s.length-1;for(;r<=a;){const n=r+a>>1,o=t.fetchIfRef(s[n]),l=o.get("Limits");if(e<t.fetchIfRef(l[0]))a=n-1;else{if(!(e>t.fetchIfRef(l[1]))){i=o;break}r=n+1}}if(r>a)return null}const s=i.get(this._type);if(Array.isArray(s)){let i=0,n=s.length-2;for(;i<=n;){const r=i+n>>1,a=r+(1&r),o=t.fetchIfRef(s[a]);if(e<o)n=a-2;else{if(!(e>o))return s[a+1];i=a+2}}}return null}get(e){return this.xref.fetchIfRef(this.getRaw(e))}}class U1e extends L1e{constructor(e,t){super(e,t,"Names")}}class H1e extends L1e{constructor(e,t){super(e,t,"Nums")}}function P1e(){lZe=Object.create(null),ZVe=Object.create(null),eWe=Object.create(null),tWe=Object.create(null),lXe.clear(),zJe.cleanup()}function O1e(e){return e instanceof rWe?e.has("UF")?e.get("UF"):e.has("F")?e.get("F"):e.has("Unix")?e.get("Unix"):e.has("Mac")?e.get("Mac"):e.has("DOS")?e.get("DOS"):null:null}class G1e{constructor(e,t,i=!1){yc(this,OA,!1),e instanceof rWe&&(this.xref=t,this.root=e,e.has("FS")&&(this.fs=e.get("FS")),e.has("RF"),i||e.has("EF")&&bc(this,OA,!0))}get filename(){let e="";const t=O1e(this.root);return t&&"string"==typeof t&&(e=MVe(t).replaceAll("\\\\","\\").replaceAll("\\/","/").replaceAll("\\","/")),mVe(this,"filename",e||"unnamed")}get content(){var e;if(!Bc(this,OA))return null;this._contentRef||(this._contentRef=O1e(null==(e=this.root)?void 0:e.get("EF")));let t=null;if(this._contentRef){const e=this.xref.fetchIfRef(this._contentRef);e instanceof dWe&&(t=e.getBytes())}return t}get description(){var e;let t="";const i=null==(e=this.root)?void 0:e.get("Desc");return i&&"string"==typeof i&&(t=MVe(i)),mVe(this,"description",t)}get serializable(){return{rawFilename:this.filename,filename:(e=this.filename,e.substring(e.lastIndexOf("/")+1)),content:this.content,description:this.description};var e}}OA=new WeakMap;const K1e=0,q1e=-2,Y1e=-3,V1e=-4,W1e=-5,j1e=-6,J1e=-9;function z1e(e,t){const i=e[t];return" "===i||"\n"===i||"\r"===i||"\t"===i}class X1e{_resolveEntities(e){return e.replaceAll(/&([^;]+);/g,((e,t)=>{if("#x"===t.substring(0,2))return String.fromCodePoint(parseInt(t.substring(2),16));if("#"===t.substring(0,1))return String.fromCodePoint(parseInt(t.substring(1),10));switch(t){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return this.onResolveEntity(t)}))}_parseContent(e,t){const i=[];let n=t;function s(){for(;n<e.length&&z1e(e,n);)++n}for(;n<e.length&&!z1e(e,n)&&">"!==e[n]&&"/"!==e[n];)++n;const r=e.substring(t,n);for(s();n<e.length&&">"!==e[n]&&"/"!==e[n]&&"?"!==e[n];){s();let t="",r="";for(;n<e.length&&!z1e(e,n)&&"="!==e[n];)t+=e[n],++n;if(s(),"="!==e[n])return null;++n,s();const a=e[n];if('"'!==a&&"'"!==a)return null;const o=e.indexOf(a,++n);if(o<0)return null;r=e.substring(n,o),i.push({name:t,value:this._resolveEntities(r)}),n=o+1,s()}return{name:r,attributes:i,parsed:n-t}}_parseProcessingInstruction(e,t){let i=t;for(;i<e.length&&!z1e(e,i)&&">"!==e[i]&&"?"!==e[i]&&"/"!==e[i];)++i;const n=e.substring(t,i);!function(){for(;i<e.length&&z1e(e,i);)++i}();const s=i;for(;i<e.length&&("?"!==e[i]||">"!==e[i+1]);)++i;return{name:n,value:e.substring(s,i),parsed:i-t}}parseXml(e){let t=0;for(;t<e.length;){let i=t;if("<"===e[t]){++i;let t;switch(e[i]){case"/":if(++i,t=e.indexOf(">",i),t<0)return void this.onError(J1e);this.onEndElement(e.substring(i,t)),i=t+1;break;case"?":++i;const n=this._parseProcessingInstruction(e,i);if("?>"!==e.substring(i+n.parsed,i+n.parsed+2))return void this.onError(Y1e);this.onPi(n.name,n.value),i+=n.parsed+2;break;case"!":if("--"===e.substring(i+1,i+3)){if(t=e.indexOf("--\x3e",i+3),t<0)return void this.onError(W1e);this.onComment(e.substring(i+3,t)),i=t+3}else if("[CDATA["===e.substring(i+1,i+8)){if(t=e.indexOf("]]>",i+8),t<0)return void this.onError(q1e);this.onCdata(e.substring(i+8,t)),i=t+3}else{if("DOCTYPE"!==e.substring(i+1,i+8))return void this.onError(j1e);{const n=e.indexOf("[",i+8);let s=!1;if(t=e.indexOf(">",i+8),t<0)return void this.onError(V1e);if(n>0&&t>n){if(t=e.indexOf("]>",i+8),t<0)return void this.onError(V1e);s=!0}const r=e.substring(i+8,t+(s?1:0));this.onDoctype(r),i=t+(s?2:1)}}break;default:const s=this._parseContent(e,i);if(null===s)return void this.onError(j1e);let r=!1;if("/>"===e.substring(i+s.parsed,i+s.parsed+2))r=!0;else if(">"!==e.substring(i+s.parsed,i+s.parsed+1))return void this.onError(J1e);this.onBeginElement(s.name,s.attributes,r),i+=s.parsed+(r?2:1)}}else{for(;i<e.length&&"<"!==e[i];)i++;const n=e.substring(t,i);this.onText(this._resolveEntities(n))}t=i}}onResolveEntity(e){return`&${e};`}onPi(e,t){}onComment(e){}onCdata(e){}onDoctype(e){}onText(e){}onBeginElement(e,t,i){}onEndElement(e){}onError(e){}}class $1e{constructor(e,t){this.nodeName=e,this.nodeValue=t,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){var e;return null==(e=this.childNodes)?void 0:e[0]}get nextSibling(){const e=this.parentNode.childNodes;if(!e)return;const t=e.indexOf(this);return-1!==t?e[t+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((function(e){return e.textContent})).join(""):this.nodeValue||""}get children(){return this.childNodes||[]}hasChildNodes(){var e;return(null==(e=this.childNodes)?void 0:e.length)>0}searchNode(e,t){var i;if(t>=e.length)return this;const n=e[t];if(n.name.startsWith("#")&&t<e.length-1)return this.searchNode(e,t+1);const s=[];let r=this;for(;;){if(n.name===r.nodeName){if(0!==n.pos){if(0===s.length)return null;{const[i]=s.pop();let a=0;for(const s of i.childNodes)if(n.name===s.nodeName){if(a===n.pos)return s.searchNode(e,t+1);a++}return r.searchNode(e,t+1)}}{const i=r.searchNode(e,t+1);if(null!==i)return i}}if((null==(i=r.childNodes)?void 0:i.length)>0)s.push([r,0]),r=r.childNodes[0];else{if(0===s.length)return null;for(;0!==s.length;){const[e,t]=s.pop(),i=t+1;if(i<e.childNodes.length){s.push([e,i]),r=e.childNodes[i];break}}if(0===s.length)return null}}}dump(e){if("#text"!==this.nodeName){if(e.push(`<${this.nodeName}`),this.attributes)for(const t of this.attributes)e.push(` ${t.name}="${PWe(t.value)}"`);if(this.hasChildNodes()){e.push(">");for(const t of this.childNodes)t.dump(e);e.push(`</${this.nodeName}>`)}else this.nodeValue?e.push(`>${PWe(this.nodeValue)}</${this.nodeName}>`):e.push("/>")}else e.push(PWe(this.nodeValue))}}class Z1e extends X1e{constructor({hasAttributes:e=!1,lowerCaseName:t=!1}){super(),this._currentFragment=null,this._stack=null,this._errorCode=K1e,this._hasAttributes=e,this._lowerCaseName=t}parseFromString(e){if(this._currentFragment=[],this._stack=[],this._errorCode=K1e,this.parseXml(e),this._errorCode!==K1e)return;const[t]=this._currentFragment;return t?{documentElement:t}:void 0}onText(e){if(function(e){for(let t=0,i=e.length;t<i;t++)if(!z1e(e,t))return!1;return!0}(e))return;const t=new $1e("#text",e);this._currentFragment.push(t)}onCdata(e){const t=new $1e("#text",e);this._currentFragment.push(t)}onBeginElement(e,t,i){this._lowerCaseName&&(e=e.toLowerCase());const n=new $1e(e);n.childNodes=[],this._hasAttributes&&(n.attributes=t),this._currentFragment.push(n),i||(this._stack.push(this._currentFragment),this._currentFragment=n.childNodes)}onEndElement(e){this._currentFragment=this._stack.pop()||[];const t=this._currentFragment.at(-1);if(!t)return null;for(const i of t.childNodes)i.parentNode=t;return t}onError(e){this._errorCode=e}}class e2e{constructor(e){e=this._repair(e);const t=new Z1e({lowerCaseName:!0}).parseFromString(e);this._metadataMap=new Map,this._data=e,t&&this._parse(t)}_repair(e){return e.replace(/^[^<]+/,"").replaceAll(/>\\376\\377([^<]+)/g,(function(e,t){const i=t.replaceAll(/\\([0-3])([0-7])([0-7])/g,(function(e,t,i,n){return String.fromCharCode(64*t+8*i+1*n)})).replaceAll(/&(amp|apos|gt|lt|quot);/g,(function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error(`_repair: ${t} isn't defined.`)})),n=[">"];for(let s=0,r=i.length;s<r;s+=2){const e=256*i.charCodeAt(s)+i.charCodeAt(s+1);e>=32&&e<127&&60!==e&&62!==e&&38!==e?n.push(String.fromCharCode(e)):n.push("&#x"+(65536+e).toString(16).substring(1)+";")}return n.join("")}))}_getSequence(e){const t=e.nodeName;return"rdf:bag"!==t&&"rdf:seq"!==t&&"rdf:alt"!==t?null:e.childNodes.filter((e=>"rdf:li"===e.nodeName))}_parseArray(e){if(!e.hasChildNodes())return;const[t]=e.childNodes,i=this._getSequence(t)||[];this._metadataMap.set(e.nodeName,i.map((e=>e.textContent.trim())))}_parse(e){let t=e.documentElement;if("rdf:rdf"!==t.nodeName)for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName;)t=t.nextSibling;if(t&&"rdf:rdf"===t.nodeName&&t.hasChildNodes())for(const i of t.childNodes)if("rdf:description"===i.nodeName)for(const e of i.childNodes){const t=e.nodeName;switch(t){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(e);continue}this._metadataMap.set(t,e.textContent.trim())}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}const t2e=1,i2e=2,n2e=3,s2e=4,r2e=5,a2e=class e{constructor(e,t){yc(this,GA),this.dict=e,this.ref=t instanceof aWe?t:null,this.roleMap=new Map,this.structParentIds=null}init(){this.readRoleMap()}addAnnotationIdToPage(e,t){Ec(this,GA,KA).call(this,e,t,s2e)}readRoleMap(){const e=this.dict.get("RoleMap");if(e instanceof rWe)for(const[t,i]of e)i instanceof iWe&&this.roleMap.set(t,i.name)}static async canCreateStructureTree({catalogRef:e,pdfManager:t,newAnnotationsByPage:i}){var n;if(!(e instanceof aWe))return!1;let s=0,r=!0;for(const[a,o]of i){const{ref:e}=await t.getPage(a);if(!(e instanceof aWe)){r=!0;break}for(const t of o)(null==(n=t.accessibilityData)?void 0:n.type)&&(t.parentTreeId=s++,r=!1)}if(r){for(const e of i.values())for(const t of e)delete t.parentTreeId;return!1}return!0}static async createStructureTree({newAnnotationsByPage:e,xref:t,catalogRef:i,pdfManager:n,changes:s}){const r=n.catalog.cloneDict(),a=new lWe;a.put(i,r);const o=t.getNewTemporaryRef();r.set("StructTreeRoot",o);const l=new rWe(t);l.set("Type",iWe.get("StructTreeRoot"));const A=t.getNewTemporaryRef();l.set("ParentTree",A);const c=[];l.set("K",c),a.put(o,l);const u=new rWe(t),h=[];u.set("Nums",h);const d=await Ec(this,qA,YA).call(this,{newAnnotationsByPage:e,structTreeRootRef:o,structTreeRoot:null,kids:c,nums:h,xref:t,pdfManager:n,changes:s,cache:a});l.set("ParentTreeNextKey",d),a.put(A,u);for(const[g,p]of a.items())s.put(g,{data:p})}async canUpdateStructTree({pdfManager:t,xref:i,newAnnotationsByPage:n}){var s,r;if(!this.ref)return!1;let a=this.dict.get("ParentTreeNextKey");if(!Number.isInteger(a)||a<0)return!1;const o=this.dict.get("ParentTree");if(!(o instanceof rWe))return!1;const l=o.get("Nums");if(!Array.isArray(l))return!1;const A=new H1e(o,i);for(const e of n.keys()){const{pageDict:i}=await t.getPage(e);if(!i.has("StructParents"))continue;const n=i.get("StructParents");if(!Number.isInteger(n)||!Array.isArray(A.get(n)))return!1}let c=!0;for(const[u,h]of n){const{pageDict:i}=await t.getPage(u);Ec(s=e,qA,WA).call(s,{elements:h,xref:this.dict.xref,pageDict:i,numberTree:A});for(const e of h)(null==(r=e.accessibilityData)?void 0:r.type)&&(e.accessibilityData.structParent>=0||(e.parentTreeId=a++),c=!1)}if(c){for(const e of n.values())for(const t of e)delete t.parentTreeId,delete t.structTreeParent;return!1}return!0}async updateStructureTree({newAnnotationsByPage:t,pdfManager:i,changes:n}){var s;const r=this.dict.xref,a=this.dict.clone(),o=this.ref,l=new lWe;l.put(o,a);let A,c=a.getRaw("ParentTree");c instanceof aWe?A=r.fetch(c):(A=c,c=r.getNewTemporaryRef(),a.set("ParentTree",c)),A=A.clone(),l.put(c,A);let u=A.getRaw("Nums"),h=null;u instanceof aWe&&(h=u,u=r.fetch(h)),u=u.slice(),h||A.set("Nums",u);const d=await Ec(s=e,qA,YA).call(s,{newAnnotationsByPage:t,structTreeRootRef:o,structTreeRoot:this,kids:null,nums:u,xref:r,pdfManager:i,changes:n,cache:l});if(-1!==d){a.set("ParentTreeNextKey",d),h&&l.put(h,u);for(const[e,t]of l.items())n.put(e,{data:t})}}};GA=new WeakSet,KA=function(e,t,i){if(!(e instanceof aWe)||t<0)return;this.structParentIds||(this.structParentIds=new lWe);let n=this.structParentIds.get(e);n||(n=[],this.structParentIds.put(e,n)),n.push([t,i])},qA=new WeakSet,YA=async function({newAnnotationsByPage:e,structTreeRootRef:t,structTreeRoot:i,kids:n,nums:s,xref:r,pdfManager:a,changes:o,cache:l}){var A,c;const u=iWe.get("OBJR");let h,d=-1;for(const[g,p]of e){const e=await a.getPage(g),{ref:f}=e,m=f instanceof aWe;for(const{accessibilityData:a,ref:C,parentTreeId:I,structTreeParent:v}of p){if(!(null==a?void 0:a.type))continue;const{structParent:p}=a;if(i&&Number.isInteger(p)&&p>=0){let t=(h||(h=new Map)).get(g);if(void 0===t){t=new c2e(i,e.pageDict).collectObjects(f),h.set(g,t)}const n=null==t?void 0:t.get(p);if(n){const e=r.fetch(n).clone();Ec(A=a2e,qA,VA).call(A,e,a),o.put(n,{data:e});continue}}d=Math.max(d,I);const B=r.getNewTemporaryRef(),y=new rWe(r);Ec(c=a2e,qA,VA).call(c,y,a),await Ec(this,qA,jA).call(this,{structTreeParent:v,tagDict:y,newTagRef:B,structTreeRootRef:t,fallbackKids:n,xref:r,cache:l});const b=new rWe(r);y.set("K",b),b.set("Type",u),m&&b.set("Pg",f),b.set("Obj",C),l.put(B,y),s.push(I,B)}}return d+1},VA=function(e,{type:t,title:i,lang:n,alt:s,expanded:r,actualText:a}){e.set("S",iWe.get(t)),i&&e.set("T",VWe(i)),n&&e.set("Lang",VWe(n)),s&&e.set("Alt",VWe(s)),r&&e.set("E",VWe(r)),a&&e.set("ActualText",VWe(a))},WA=function({elements:e,xref:t,pageDict:i,numberTree:n}){const s=new Map;for(const l of e)if(l.structTreeParentId){const e=parseInt(l.structTreeParentId.split("_mc")[1],10);let t=s.get(e);t||(t=[],s.set(e,t)),t.push(l)}const r=i.get("StructParents");if(!Number.isInteger(r))return;const a=n.get(r),o=(e,i,n)=>{const r=s.get(e);if(r){const e=i.getRaw("P"),s=t.fetchIfRef(e);if(e instanceof aWe&&s instanceof rWe){const e={ref:n,dict:i};for(const t of r)t.structTreeParent=e}return!0}return!1};for(const l of a){if(!(l instanceof aWe))continue;const e=t.fetch(l),i=e.get("K");if(Number.isInteger(i))o(i,e,l);else if(Array.isArray(i))for(let n of i){if(n=t.fetchIfRef(n),Number.isInteger(n)&&o(n,e,l))break;if(!(n instanceof rWe))continue;if(!AWe(n.get("Type"),"MCR"))break;const i=n.get("MCID");if(Number.isInteger(i)&&o(i,e,l))break}}},jA=async function({structTreeParent:e,tagDict:t,newTagRef:i,structTreeRootRef:n,fallbackKids:s,xref:r,cache:a}){let o,l=null;e?(({ref:l}=e),o=e.dict.getRaw("P")||n):o=n,t.set("P",o);const A=r.fetchIfRef(o);if(!A)return void s.push(i);let c=a.get(o);c||(c=A.clone(),a.put(o,c));const u=c.getRaw("K");let h=u instanceof aWe?a.get(u):null;if(!h){h=r.fetchIfRef(u),h=Array.isArray(h)?h.slice():[u];const e=r.getNewTemporaryRef();c.set("K",e),a.put(e,h)}const d=h.indexOf(l);h.splice(d>=0?d+1:h.length,0,i)},yc(a2e,qA);let o2e=a2e;class l2e{constructor(e,t){this.tree=e,this.dict=t,this.kids=[],this.parseKids()}get role(){const e=this.dict.get("S"),t=e instanceof iWe?e.name:"",{root:i}=this.tree;return i.roleMap.has(t)?i.roleMap.get(t):t}parseKids(){let e=null;const t=this.dict.getRaw("Pg");t instanceof aWe&&(e=t.toString());const i=this.dict.get("K");if(Array.isArray(i))for(const n of i){const t=this.parseKid(e,n);t&&this.kids.push(t)}else{const t=this.parseKid(e,i);t&&this.kids.push(t)}}parseKid(e,t){if(Number.isInteger(t))return this.tree.pageDict.objId!==e?null:new A2e({type:t2e,mcid:t,pageObjId:e});let i=null;if(t instanceof aWe?i=this.dict.xref.fetch(t):t instanceof rWe&&(i=t),!i)return null;const n=i.getRaw("Pg");n instanceof aWe&&(e=n.toString());const s=i.get("Type")instanceof iWe?i.get("Type").name:null;if("MCR"===s){if(this.tree.pageDict.objId!==e)return null;const t=i.getRaw("Stm");return new A2e({type:i2e,refObjId:t instanceof aWe?t.toString():null,pageObjId:e,mcid:i.get("MCID")})}if("OBJR"===s){if(this.tree.pageDict.objId!==e)return null;const t=i.getRaw("Obj");return new A2e({type:n2e,refObjId:t instanceof aWe?t.toString():null,pageObjId:e})}return new A2e({type:r2e,dict:i})}}class A2e{constructor({type:e,dict:t=null,mcid:i=null,pageObjId:n=null,refObjId:s=null}){this.type=e,this.dict=t,this.mcid=i,this.pageObjId=n,this.refObjId=s,this.parentNode=null}}class c2e{constructor(e,t){this.root=e,this.rootDict=e?e.dict:null,this.pageDict=t,this.nodes=[]}collectObjects(e){var t;if(!(this.root&&this.rootDict&&e instanceof aWe))return null;const i=this.rootDict.get("ParentTree");if(!i)return null;const n=null==(t=this.root.structParentIds)?void 0:t.get(e);if(!n)return null;const s=new Map,r=new H1e(i,this.rootDict.xref);for(const[a]of n){const e=r.getRaw(a);e instanceof aWe&&s.set(a,e)}return s}parse(e){var t,i;if(!(this.root&&this.rootDict&&e instanceof aWe))return;const n=this.rootDict.get("ParentTree");if(!n)return;const s=this.pageDict.get("StructParents"),r=null==(t=this.root.structParentIds)?void 0:t.get(e);if(!Number.isInteger(s)&&!r)return;const a=new Map,o=new H1e(n,this.rootDict.xref);if(Number.isInteger(s)){const e=o.get(s);if(Array.isArray(e))for(const t of e)t instanceof aWe&&this.addNode(this.rootDict.xref.fetch(t),a)}if(r)for(const[l,A]of r){const e=o.get(l);if(e){const t=this.addNode(this.rootDict.xref.fetchIfRef(e),a);1===(null==(i=null==t?void 0:t.kids)?void 0:i.length)&&t.kids[0].type===n2e&&(t.kids[0].type=A)}}}addNode(e,t,i=0){if(i>40)return null;if(!(e instanceof rWe))return null;if(t.has(e))return t.get(e);const n=new l2e(this,e);t.set(e,n);const s=e.get("P");if(!s||AWe(s.get("Type"),"StructTreeRoot"))return this.addTopLevelNode(e,n)||t.delete(e),n;const r=this.addNode(s,t,i+1);if(!r)return n;let a=!1;for(const o of r.kids)o.type===r2e&&o.dict===e&&(o.parentNode=n,a=!0);return a||t.delete(e),n}addTopLevelNode(e,t){const i=this.rootDict.get("K");if(!i)return!1;if(i instanceof rWe)return i.objId===e.objId&&(this.nodes[0]=t,!0);if(!Array.isArray(i))return!0;let n=!1;for(let s=0;s<i.length;s++){const r=i[s];(null==r?void 0:r.toString())===e.objId&&(this.nodes[s]=t,n=!0)}return n}get serializable(){function e(t,i,n=0){if(n>40)return;const s=Object.create(null);s.role=t.role,s.children=[],i.children.push(s);let r=t.dict.get("Alt");"string"!=typeof r&&(r=t.dict.get("ActualText")),"string"==typeof r&&(s.alt=MVe(r));const a=t.dict.get("A");if(a instanceof rWe){const e=FWe(a.getArray("BBox"),null);if(e)s.bbox=e;else{const e=a.get("Width"),t=a.get("Height");"number"==typeof e&&e>0&&"number"==typeof t&&t>0&&(s.bbox=[0,0,e,t])}}const o=t.dict.get("Lang");"string"==typeof o&&(s.lang=MVe(o));for(const l of t.kids){const t=l.type===r2e?l.parentNode:null;t?e(t,s,n+1):l.type===t2e||l.type===i2e?s.children.push({type:"content",id:`p${l.pageObjId}_mc${l.mcid}`}):l.type===n2e?s.children.push({type:"object",id:l.refObjId}):l.type===s2e&&s.children.push({type:"annotation",id:`pdfjs_internal_id_${l.refObjId}`})}}const t=Object.create(null);t.children=[],t.role="Root";for(const i of this.nodes)i&&e(i,t);return t}}function u2e(e){if(!Array.isArray(e)||e.length<2)return!1;const[t,i,...n]=e;if(!(t instanceof aWe||Number.isInteger(t)))return!1;if(!(i instanceof iWe))return!1;const s=n.length;let r=!0;switch(i.name){case"XYZ":if(s<2||s>3)return!1;break;case"Fit":case"FitB":return 0===s;case"FitH":case"FitBH":case"FitV":case"FitBV":if(s>1)return!1;break;case"FitR":if(4!==s)return!1;r=!1;break;default:return!1}for(const a of n)if(!("number"==typeof a||r&&null===a))return!1;return!0}function h2e(e){return e instanceof rWe&&(e=e.get("D")),u2e(e)?e:null}function d2e(e){let t=e.get("D");if(t){if(t instanceof iWe&&(t=t.name),"string"==typeof t)return MVe(t);if(u2e(t))return JSON.stringify(t)}return null}JA=new WeakSet,zA=function(e){const t=this.xref.fetch(e),i={id:e.toString(),name:null,intent:null,usage:{print:null,view:null},rbGroups:[]},n=t.get("Name");"string"==typeof n&&(i.name=MVe(n));let s=t.getArray("Intent");Array.isArray(s)||(s=[s]),s.every((e=>e instanceof iWe))&&(i.intent=s.map((e=>e.name)));const r=t.get("Usage");if(!(r instanceof rWe))return i;const a=i.usage,o=r.get("Print");if(o instanceof rWe){const e=o.get("PrintState");if(e instanceof iWe)switch(e.name){case"ON":case"OFF":a.print={printState:e.name}}}const l=r.get("View");if(l instanceof rWe){const e=l.get("ViewState");if(e instanceof iWe)switch(e.name){case"ON":case"OFF":a.view={viewState:e.name}}}return i},XA=function(e,t){function i(e){const i=[];if(Array.isArray(e))for(const n of e)n instanceof aWe&&t.has(n)&&i.push(n.toString());return i}function n(e,i=0){if(!Array.isArray(e))return null;const n=[];for(const o of e){if(o instanceof aWe&&t.has(o)){a.put(o),n.push(o.toString());continue}const e=s(o,i);e&&n.push(e)}if(i>0)return n;const r=[];for(const[s]of t.items())a.has(s)||r.push(s.toString());return r.length&&n.push({name:null,order:r}),n}function s(e,t){if(++t>o)return null;const i=r.fetchIfRef(e);if(!Array.isArray(i))return null;const s=r.fetchIfRef(i[0]);if("string"!=typeof s)return null;const a=n(i.slice(1),t);return a&&a.length?{name:MVe(s),order:a}:null}const r=this.xref,a=new oWe,o=10;return function(e){if(Array.isArray(e))for(const i of e){const e=r.fetchIfRef(i);if(!Array.isArray(e)||!e.length)continue;const n=new Set;for(const i of e)i instanceof aWe&&t.has(i)&&!n.has(i.toString())&&(n.add(i.toString()),t.get(i).rbGroups.push(n))}}(e.get("RBGroups")),{name:"string"==typeof e.get("Name")?MVe(e.get("Name")):null,creator:"string"==typeof e.get("Creator")?MVe(e.get("Creator")):null,baseState:e.get("BaseState")instanceof iWe?e.get("BaseState").name:null,on:i(e.get("ON")),off:i(e.get("OFF")),order:n(e.get("Order")),groups:[...t]}};let g2e=class e{constructor(e,t){if(yc(this,JA),this.pdfManager=e,this.xref=t,this._catDict=t.getCatalogObj(),!(this._catDict instanceof rWe))throw new EVe("Catalog object is not a dictionary.");this.toplevelPagesDict,this._actualNumPages=null,this.fontCache=new lWe,this.builtInCMapCache=new Map,this.standardFontDataCache=new Map,this.globalImageCache=new p0e,this.pageKidsCountCache=new lWe,this.pageIndexCache=new lWe,this.pageDictCache=new lWe,this.nonBlendModesSet=new oWe,this.systemFontCache=new Map}cloneDict(){return this._catDict.clone()}get version(){const e=this._catDict.get("Version");if(e instanceof iWe){if(gWe.test(e.name))return mVe(this,"version",e.name);e.name}return mVe(this,"version",null)}get lang(){const e=this._catDict.get("Lang");return mVe(this,"lang",e&&"string"==typeof e?MVe(e):null)}get needsRendering(){const e=this._catDict.get("NeedsRendering");return mVe(this,"needsRendering","boolean"==typeof e&&e)}get collection(){let e=null;try{const t=this._catDict.get("Collection");t instanceof rWe&&t.size>0&&(e=t)}catch(t){if(t instanceof fWe)throw t}return mVe(this,"collection",e)}get acroForm(){let e=null;try{const t=this._catDict.get("AcroForm");t instanceof rWe&&t.size>0&&(e=t)}catch(t){if(t instanceof fWe)throw t}return mVe(this,"acroForm",e)}get acroFormRef(){const e=this._catDict.getRaw("AcroForm");return mVe(this,"acroFormRef",e instanceof aWe?e:null)}get metadata(){var e;const t=this._catDict.getRaw("Metadata");if(!(t instanceof aWe))return mVe(this,"metadata",null);let i=null;try{const n=this.xref.fetch(t,!(null==(e=this.xref.encrypt)?void 0:e.encryptMetadata));if(n instanceof dWe&&n.dict instanceof rWe){const e=n.dict.get("Type"),t=n.dict.get("Subtype");if(AWe(e,"Metadata")&&AWe(t,"XML")){const e=RVe(n.getString());e&&(i=new e2e(e).serializable)}}}catch(n){if(n instanceof fWe)throw n}return mVe(this,"metadata",i)}get markInfo(){let e=null;try{e=this._readMarkInfo()}catch(t){if(t instanceof fWe)throw t}return mVe(this,"markInfo",e)}_readMarkInfo(){const e=this._catDict.get("MarkInfo");if(!(e instanceof rWe))return null;const t={Marked:!1,UserProperties:!1,Suspects:!1};for(const i in t){const n=e.get(i);"boolean"==typeof n&&(t[i]=n)}return t}get structTreeRoot(){let e=null;try{e=this._readStructTreeRoot()}catch(t){if(t instanceof fWe)throw t}return mVe(this,"structTreeRoot",e)}_readStructTreeRoot(){const e=this._catDict.getRaw("StructTreeRoot"),t=this.xref.fetchIfRef(e);if(!(t instanceof rWe))return null;const i=new o2e(t,e);return i.init(),i}get toplevelPagesDict(){const e=this._catDict.get("Pages");if(!(e instanceof rWe))throw new EVe("Invalid top-level pages dictionary.");return mVe(this,"toplevelPagesDict",e)}get documentOutline(){let e=null;try{e=this._readDocumentOutline()}catch(t){if(t instanceof fWe)throw t}return mVe(this,"documentOutline",e)}_readDocumentOutline(){let t=this._catDict.get("Outlines");if(!(t instanceof rWe))return null;if(t=t.getRaw("First"),!(t instanceof aWe))return null;const i={items:[]},n=[{obj:t,parent:i}],s=new oWe;s.put(t);const r=this.xref,a=new Uint8ClampedArray(3);for(;n.length>0;){const i=n.shift(),o=r.fetchIfRef(i.obj);if(null===o)continue;o.has("Title");const l={url:null,dest:null,action:null};e.parseDestDictionary({destDict:o,resultObj:l,docBaseUrl:this.baseUrl,docAttachments:this.attachments});const A=o.get("Title"),c=o.get("F")||0,u=o.getArray("C"),h=o.get("Count");let d=a;!xWe(u,3)||0===u[0]&&0===u[1]&&0===u[2]||(d=ije.singletons.rgb.getRgb(u,0));const g={action:l.action,attachment:l.attachment,dest:l.dest,url:l.url,unsafeUrl:l.unsafeUrl,newWindow:l.newWindow,setOCGState:l.setOCGState,title:"string"==typeof A?MVe(A):"",color:d,count:Number.isInteger(h)?h:void 0,bold:!!(2&c),italic:!!(1&c),items:[]};i.parent.items.push(g),t=o.getRaw("First"),t instanceof aWe&&!s.has(t)&&(n.push({obj:t,parent:g}),s.put(t)),t=o.getRaw("Next"),t instanceof aWe&&!s.has(t)&&(n.push({obj:t,parent:i.parent}),s.put(t))}return i.items.length>0?i.items:null}get permissions(){let e=null;try{e=this._readPermissions()}catch(t){if(t instanceof fWe)throw t}return mVe(this,"permissions",e)}_readPermissions(){const e=this.xref.trailer.get("Encrypt");if(!(e instanceof rWe))return null;let t=e.get("P");if("number"!=typeof t)return null;t+=2**32;const i=[];for(const n in SKe){const e=SKe[n];t&e&&i.push(e)}return i}get optionalContentConfig(){let e=null;try{const t=this._catDict.get("OCProperties");if(!t)return mVe(this,"optionalContentConfig",null);const i=t.get("D");if(!i)return mVe(this,"optionalContentConfig",null);const n=t.get("OCGs");if(!Array.isArray(n))return mVe(this,"optionalContentConfig",null);const s=new lWe;for(const e of n)e instanceof aWe&&!s.has(e)&&s.put(e,Ec(this,JA,zA).call(this,e));e=Ec(this,JA,XA).call(this,i,s)}catch(t){if(t instanceof fWe)throw t}return mVe(this,"optionalContentConfig",e)}setActualNumPages(e=null){this._actualNumPages=e}get hasActualNumPages(){return null!==this._actualNumPages}get _pagesCount(){const e=this.toplevelPagesDict.get("Count");if(!Number.isInteger(e))throw new EVe("Page count in top-level pages dictionary is not an integer.");return mVe(this,"_pagesCount",e)}get numPages(){return this.hasActualNumPages?this._actualNumPages:this._pagesCount}get destinations(){const e=this._readDests(),t=Object.create(null);if(e instanceof U1e)for(const[i,n]of e.getAll()){const e=h2e(n);e&&(t[MVe(i)]=e)}else if(e instanceof rWe)for(const[i,n]of e){const e=h2e(n);e&&(t[i]=e)}return mVe(this,"destinations",t)}getDestination(e){const t=this._readDests();if(t instanceof U1e){const i=h2e(t.get(e));if(i)return i;const n=this.destinations[e];if(n)return n}else if(t instanceof rWe){const i=h2e(t.get(e));if(i)return i}return null}_readDests(){const e=this._catDict.get("Names");return(null==e?void 0:e.has("Dests"))?new U1e(e.getRaw("Dests"),this.xref):this._catDict.has("Dests")?this._catDict.get("Dests"):void 0}get pageLabels(){let e=null;try{e=this._readPageLabels()}catch(t){if(t instanceof fWe)throw t}return mVe(this,"pageLabels",e)}_readPageLabels(){const e=this._catDict.getRaw("PageLabels");if(!e)return null;const t=new Array(this.numPages);let i=null,n="";const s=new H1e(e,this.xref).getAll();let r="",a=1;for(let o=0,l=this.numPages;o<l;o++){const e=s.get(o);if(void 0!==e){if(!(e instanceof rWe))throw new EVe("PageLabel is not a dictionary.");if(e.has("Type")&&!AWe(e.get("Type"),"PageLabel"))throw new EVe("Invalid type in PageLabel dictionary.");if(e.has("S")){const t=e.get("S");if(!(t instanceof iWe))throw new EVe("Invalid style in PageLabel dictionary.");i=t.name}else i=null;if(e.has("P")){const t=e.get("P");if("string"!=typeof t)throw new EVe("Invalid prefix in PageLabel dictionary.");n=MVe(t)}else n="";if(e.has("St")){const t=e.get("St");if(!(Number.isInteger(t)&&t>=1))throw new EVe("Invalid start in PageLabel dictionary.");a=t}else a=1}switch(i){case"D":r=a;break;case"R":case"r":r=bWe(a,"r"===i);break;case"A":case"a":const e=26,t="a"===i?97:65,n=a-1;r=String.fromCharCode(t+n%e).repeat(Math.floor(n/e)+1);break;default:if(i)throw new EVe(`Invalid style "${i}" in PageLabel dictionary.`);r=""}t[o]=n+r,a++}return t}get pageLayout(){const e=this._catDict.get("PageLayout");let t="";if(e instanceof iWe)switch(e.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":t=e.name}return mVe(this,"pageLayout",t)}get pageMode(){const e=this._catDict.get("PageMode");let t="UseNone";if(e instanceof iWe)switch(e.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":t=e.name}return mVe(this,"pageMode",t)}get viewerPreferences(){const e=this._catDict.get("ViewerPreferences");if(!(e instanceof rWe))return mVe(this,"viewerPreferences",null);let t=null;for(const i of e.getKeys()){const n=e.get(i);let s;switch(i){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":"boolean"==typeof n&&(s=n);break;case"NonFullScreenPageMode":if(n instanceof iWe)switch(n.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":s=n.name;break;default:s="UseNone"}break;case"Direction":if(n instanceof iWe)switch(n.name){case"L2R":case"R2L":s=n.name;break;default:s="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(n instanceof iWe)switch(n.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":s=n.name;break;default:s="CropBox"}break;case"PrintScaling":if(n instanceof iWe)switch(n.name){case"None":case"AppDefault":s=n.name;break;default:s="AppDefault"}break;case"Duplex":if(n instanceof iWe)switch(n.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":s=n.name;break;default:s="None"}break;case"PrintPageRange":if(Array.isArray(n)&&n.length%2==0){n.every(((e,t,i)=>Number.isInteger(e)&&e>0&&(0===t||e>=i[t-1])&&e<=this.numPages))&&(s=n)}break;case"NumCopies":Number.isInteger(n)&&n>0&&(s=n);break;default:continue}void 0!==s&&(t||(t=Object.create(null)),t[i]=s)}return mVe(this,"viewerPreferences",t)}get openAction(){const t=this._catDict.get("OpenAction"),i=Object.create(null);if(t instanceof rWe){const n=new rWe(this.xref);n.set("A",t);const s={url:null,dest:null,action:null};e.parseDestDictionary({destDict:n,resultObj:s}),Array.isArray(s.dest)?i.dest=s.dest:s.action&&(i.action=s.action)}else Array.isArray(t)&&(i.dest=t);return mVe(this,"openAction",xVe(i)>0?i:null)}get attachments(){const e=this._catDict.get("Names");let t=null;if(e instanceof rWe&&e.has("EmbeddedFiles")){const i=new U1e(e.getRaw("EmbeddedFiles"),this.xref);for(const[e,n]of i.getAll()){const i=new G1e(n,this.xref);t||(t=Object.create(null)),t[MVe(e)]=i.serializable}}return mVe(this,"attachments",t)}get xfaImages(){const e=this._catDict.get("Names");let t=null;if(e instanceof rWe&&e.has("XFAImages")){const i=new U1e(e.getRaw("XFAImages"),this.xref);for(const[e,n]of i.getAll())t||(t=new rWe(this.xref)),t.set(MVe(e),n)}return mVe(this,"xfaImages",t)}_collectJavaScript(){const e=this._catDict.get("Names");let t=null;function i(e,i){if(!(i instanceof rWe))return;if(!AWe(i.get("S"),"JavaScript"))return;let n=i.get("JS");if(n instanceof dWe)n=n.getString();else if("string"!=typeof n)return;n=MVe(n).replaceAll("\0",""),n&&(t||(t=new Map)).set(e,n)}if(e instanceof rWe&&e.has("JavaScript")){const t=new U1e(e.getRaw("JavaScript"),this.xref);for(const[e,n]of t.getAll())i(MVe(e),n)}const n=this._catDict.get("OpenAction");return n&&i("OpenAction",n),t}get jsActions(){const e=this._collectJavaScript();let t=LWe(this.xref,this._catDict,Eqe);if(e){t||(t=Object.create(null));for(const[i,n]of e)i in t?t[i].push(n):t[i]=[n]}return mVe(this,"jsActions",t)}async fontFallback(e,t){const i=await Promise.all(this.fontCache);for(const n of i)if(n.loadedName===e)return void n.fallback(t)}async cleanup(e=!1){P1e(),this.globalImageCache.clear(e),this.pageKidsCountCache.clear(),this.pageIndexCache.clear(),this.pageDictCache.clear(),this.nonBlendModesSet.clear();const t=await Promise.all(this.fontCache);for(const{dict:i}of t)delete i.cacheKey;this.fontCache.clear(),this.builtInCMapCache.clear(),this.standardFontDataCache.clear(),this.systemFontCache.clear()}async getPageDict(e){const t=[this.toplevelPagesDict],i=new oWe,n=this._catDict.getRaw("Pages");n instanceof aWe&&i.put(n);const s=this.xref,r=this.pageKidsCountCache,a=this.pageIndexCache,o=this.pageDictCache;let l=0;for(;t.length;){const n=t.pop();if(n instanceof aWe){const A=r.get(n);if(A>=0&&l+A<=e){l+=A;continue}if(i.has(n))throw new EVe("Pages tree contains circular reference.");i.put(n);const c=await(o.get(n)||s.fetchAsync(n));if(c instanceof rWe){let t=c.getRaw("Type");if(t instanceof aWe&&(t=await s.fetchAsync(t)),AWe(t,"Page")||!c.has("Kids")){if(r.has(n)||r.put(n,1),a.has(n)||a.put(n,l),l===e)return[c,n];l++;continue}}t.push(c);continue}if(!(n instanceof rWe))throw new EVe("Page dictionary kid reference points to wrong type of object.");const{objId:A}=n;let c=n.getRaw("Count");if(c instanceof aWe&&(c=await s.fetchAsync(c)),Number.isInteger(c)&&c>=0&&(A&&!r.has(A)&&r.put(A,c),l+c<=e)){l+=c;continue}let u=n.getRaw("Kids");if(u instanceof aWe&&(u=await s.fetchAsync(u)),!Array.isArray(u)){let t=n.getRaw("Type");if(t instanceof aWe&&(t=await s.fetchAsync(t)),AWe(t,"Page")||!n.has("Kids")){if(l===e)return[n,null];l++;continue}throw new EVe("Page dictionary kids object is not an array.")}for(let e=u.length-1;e>=0;e--){const i=u[e];t.push(i),n===this.toplevelPagesDict&&i instanceof aWe&&!o.has(i)&&o.put(i,s.fetchAsync(i))}}throw new Error(`Page index ${e} not found.`)}async getAllPageDicts(e=!1){const{ignoreErrors:t}=this.pdfManager.evaluatorOptions,i=[{currentNode:this.toplevelPagesDict,posInKids:0}],n=new oWe,s=this._catDict.getRaw("Pages");s instanceof aWe&&n.put(s);const r=new Map,a=this.xref,o=this.pageIndexCache;let l=0;function A(i){if(i instanceof CWe&&!e)throw i;e&&t&&0===l&&(i=rWe.empty),r.set(l++,[i,null])}for(;i.length>0;){const e=i.at(-1),{currentNode:t,posInKids:s}=e;let d=t.getRaw("Kids");if(d instanceof aWe)try{d=await a.fetchAsync(d)}catch(h){A(h);break}if(!Array.isArray(d)){A(new EVe("Page dictionary kids object is not an array."));break}if(s>=d.length){i.pop();continue}const g=d[s];let p;if(g instanceof aWe){if(n.has(g)){A(new EVe("Pages tree contains circular reference."));break}n.put(g);try{p=await a.fetchAsync(g)}catch(h){A(h);break}}else p=g;if(!(p instanceof rWe)){A(new EVe("Page dictionary kid reference points to wrong type of object."));break}let f=p.getRaw("Type");if(f instanceof aWe)try{f=await a.fetchAsync(f)}catch(h){A(h);break}AWe(f,"Page")||!p.has("Kids")?(c=p,(u=g instanceof aWe?g:null)&&!o.has(u)&&o.put(u,l),r.set(l++,[c,u])):i.push({currentNode:p,posInKids:0}),e.posInKids++}var c,u;return r}getPageIndex(e){const t=this.pageIndexCache.get(e);if(void 0!==t)return Promise.resolve(t);const i=this.xref;let n=0;const s=t=>function(t){let n,s=0;return i.fetchAsync(t).then((function(i){if(hWe(t,e)&&!uWe(i,"Page")&&!(i instanceof rWe&&!i.has("Type")&&i.has("Contents")))throw new EVe("The reference does not point to a /Page dictionary.");if(!i)return null;if(!(i instanceof rWe))throw new EVe("Node must be a dictionary.");return n=i.getRaw("Parent"),i.getAsync("Parent")})).then((function(e){if(!e)return null;if(!(e instanceof rWe))throw new EVe("Parent must be a dictionary.");return e.getAsync("Kids")})).then((function(e){if(!e)return null;const r=[];let a=!1;for(const n of e){if(!(n instanceof aWe))throw new EVe("Kid must be a reference.");if(hWe(n,t)){a=!0;break}r.push(i.fetchAsync(n).then((function(e){if(!(e instanceof rWe))throw new EVe("Kid node must be a dictionary.");e.has("Count")?s+=e.get("Count"):s++})))}if(!a)throw new EVe("Kid reference not found in parent's kids.");return Promise.all(r).then((function(){return[s,n]}))}))}(t).then((t=>{if(!t)return this.pageIndexCache.put(e,n),n;const[i,r]=t;return n+=i,s(r)}));return s(e)}get baseUrl(){const e=this._catDict.get("URI");if(e instanceof rWe){const t=e.get("Base");if("string"==typeof t){const e=fVe(t,null,{tryConvertEncoding:!0});if(e)return mVe(this,"baseUrl",e.href)}}return mVe(this,"baseUrl",this.pdfManager.docBaseUrl)}static parseDestDictionary({destDict:e,resultObj:t,docBaseUrl:i=null,docAttachments:n=null}){if(!(e instanceof rWe))return;let s,r,a=e.get("A");if(a instanceof rWe||(e.has("Dest")?a=e.get("Dest"):(a=e.get("AA"),a instanceof rWe&&(a.has("D")?a=a.get("D"):a.has("U")&&(a=a.get("U"))))),a instanceof rWe){const e=a.get("S");if(!(e instanceof iWe))return;const i=e.name;switch(i){case"ResetForm":const e=a.get("Flags"),o=!(1&("number"==typeof e?e:0)),l=[],A=[];for(const t of a.get("Fields")||[])t instanceof aWe?A.push(t.toString()):"string"==typeof t&&l.push(MVe(t));t.resetForm={fields:l,refs:A,include:o};break;case"URI":s=a.get("URI"),s instanceof iWe&&(s="/"+s.name);break;case"GoTo":r=a.get("D");break;case"Launch":case"GoToR":const c=a.get("F");if(c instanceof rWe){const e=new G1e(c,null,!0),{rawFilename:t}=e.serializable;s=t}else"string"==typeof c&&(s=c);const u=d2e(a);u&&"string"==typeof s&&(s=s.split("#",1)[0]+"#"+u);const h=a.get("NewWindow");"boolean"==typeof h&&(t.newWindow=h);break;case"GoToE":const d=a.get("T");let g;if(n&&d instanceof rWe){const e=d.get("R"),t=d.get("N");AWe(e,"C")&&"string"==typeof t&&(g=n[MVe(t)])}if(g){t.attachment=g;const e=d2e(a);e&&(t.attachmentDest=e)}break;case"Named":const p=a.get("N");p instanceof iWe&&(t.action=p.name);break;case"SetOCGState":const f=a.get("State"),m=a.get("PreserveRB");if(!Array.isArray(f)||0===f.length)break;const C=[];for(const t of f)if(t instanceof iWe)switch(t.name){case"ON":case"OFF":case"Toggle":C.push(t.name)}else t instanceof aWe&&C.push(t.toString());if(C.length!==f.length)break;t.setOCGState={state:C,preserveRB:"boolean"!=typeof m||m};break;case"JavaScript":const I=a.get("JS");let v;I instanceof dWe?v=I.getString():"string"==typeof I&&(v=I);const B=v&&KWe(MVe(v));if(B){s=B.url,t.newWindow=B.newWindow;break}default:if("JavaScript"===i||"SubmitForm"===i)break}}else e.has("Dest")&&(r=e.get("Dest"));if("string"==typeof s){const e=fVe(s,i,{addDefaultProtocol:!0,tryConvertEncoding:!0});e&&(t.url=e.href),t.unsafeUrl=s}r&&(r instanceof iWe&&(r=r.name),"string"==typeof r?t.dest=MVe(r):u2e(r)&&(t.dest=r))}};function p2e(e,t){if(e instanceof rWe)e=e.getRawValues();else if(e instanceof dWe)e=e.dict.getRawValues();else if(!Array.isArray(e))return;for(const n of e)((i=n)instanceof aWe||i instanceof rWe||i instanceof dWe||Array.isArray(i))&&t.push(n);var i}class f2e{constructor(e,t,i){this.dict=e,this.keys=t,this.xref=i,this.refSet=null}async load(){if(this.xref.stream.isDataLoaded)return;const{keys:e,dict:t}=this;this.refSet=new oWe;const i=[];for(const n of e){const e=t.getRaw(n);void 0!==e&&i.push(e)}return this._walk(i)}async _walk(e){const t=[],i=[];for(;e.length;){let s=e.pop();if(s instanceof aWe){if(this.refSet.has(s))continue;try{this.refSet.put(s),s=this.xref.fetch(s)}catch(n){if(!(n instanceof fWe)){this.refSet=null;const{manager:e}=this.xref.stream;return e.requestAllChunks()}t.push(s),i.push({begin:n.begin,end:n.end})}}if(s instanceof dWe){const e=s.getBaseStreams();if(e){let n=!1;for(const t of e)t.isDataLoaded||(n=!0,i.push({begin:t.start,end:t.end}));n&&t.push(s)}}p2e(s,e)}if(i.length){await this.xref.stream.manager.requestRanges(i);for(const e of t)e instanceof aWe&&this.refSet.remove(e);return this._walk(t)}this.refSet=null}}const m2e=Symbol(),C2e=Symbol(),I2e=Symbol(),v2e=Symbol(),B2e=Symbol(),y2e=Symbol(),b2e=Symbol(),E2e=Symbol(),w2e=Symbol(),Q2e=Symbol("content"),_2e=Symbol("data"),S2e=Symbol(),x2e=Symbol("extra"),k2e=Symbol(),D2e=Symbol(),F2e=Symbol(),T2e=Symbol(),M2e=Symbol(),R2e=Symbol(),N2e=Symbol(),L2e=Symbol(),U2e=Symbol(),H2e=Symbol(),P2e=Symbol(),O2e=Symbol(),G2e=Symbol(),K2e=Symbol(),q2e=Symbol(),Y2e=Symbol(),V2e=Symbol(),W2e=Symbol(),j2e=Symbol(),J2e=Symbol(),z2e=Symbol(),X2e=Symbol(),$2e=Symbol(),Z2e=Symbol(),e4e=Symbol(),t4e=Symbol(),i4e=Symbol(),n4e=Symbol(),s4e=Symbol(),r4e=Symbol(),a4e=Symbol(),o4e=Symbol(),l4e=Symbol("namespaceId"),A4e=Symbol("nodeName"),c4e=Symbol(),u4e=Symbol(),h4e=Symbol(),d4e=Symbol(),g4e=Symbol(),p4e=Symbol(),f4e=Symbol(),m4e=Symbol(),C4e=Symbol("root"),I4e=Symbol(),v4e=Symbol(),B4e=Symbol(),y4e=Symbol(),b4e=Symbol(),E4e=Symbol(),w4e=Symbol(),Q4e=Symbol(),_4e=Symbol(),S4e=Symbol(),x4e=Symbol(),k4e=Symbol("uid"),D4e=Symbol(),F4e={config:{id:0,check:e=>e.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:e=>"http://ns.adobe.com/xdp/pdf/"===e},signature:{id:6,check:e=>"http://www.w3.org/2000/09/xmldsig#"===e},sourceSet:{id:7,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:e=>"http://www.w3.org/1999/XSL/Transform"===e},template:{id:9,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:e=>e.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:e=>"http://ns.adobe.com/xdp/"===e},xfdf:{id:12,check:e=>"http://ns.adobe.com/xfdf/"===e},xhtml:{id:13,check:e=>"http://www.w3.org/1999/xhtml"===e},xmpmeta:{id:14,check:e=>"http://ns.adobe.com/xmpmeta/"===e}},T4e={pt:e=>e,cm:e=>e/2.54*72,mm:e=>e/25.4*72,in:e=>72*e,px:e=>e},M4e=/([+-]?\d+\.?\d*)(.*)/;function R4e(e){return e.startsWith("'")||e.startsWith('"')?e.slice(1,-1):e}function N4e({data:e,defaultValue:t,validate:i}){if(!e)return t;e=e.trim();const n=parseInt(e,10);return!isNaN(n)&&i(n)?n:t}function L4e({data:e,defaultValue:t,validate:i}){if(!e)return t;e=e.trim();const n=parseFloat(e);return!isNaN(n)&&i(n)?n:t}function U4e({data:e,defaultValue:t,validate:i}){return e&&i(e=e.trim())?e:t}function H4e(e,t){return U4e({data:e,defaultValue:t[0],validate:e=>t.includes(e)})}function P4e(e,t="0"){if(t||(t="0"),!e)return P4e(t);const i=e.trim().match(M4e);if(!i)return P4e(t);const[,n,s]=i,r=parseFloat(n);if(isNaN(r))return P4e(t);if(0===r)return 0;const a=T4e[s];return a?a(r):r}function O4e(e){if(!e)return{num:1,den:1};const t=e.trim().split(/\s*:\s*/).map((e=>parseFloat(e))).filter((e=>!isNaN(e)));if(1===t.length&&t.push(1),0===t.length)return{num:1,den:1};const[i,n]=t;return{num:i,den:n}}function G4e(e){return e?e.trim().split(/\s+/).map((e=>({excluded:"-"===e[0],viewname:e.substring(1)}))):[]}class K4e{static get FAILURE(){return mVe(this,"FAILURE",new K4e(!1,null,null,null))}static get EMPTY(){return mVe(this,"EMPTY",new K4e(!0,null,null,null))}constructor(e,t,i,n){this.success=e,this.html=t,this.bbox=i,this.breakNode=n}isBreak(){return!!this.breakNode}static breakNode(e){return new K4e(!1,null,null,e)}static success(e,t=null){return new K4e(!0,e,t,null)}}class q4e{constructor(e){this.fonts=new Map,this.cache=new Map,this.warned=new Set,this.defaultFont=null,this.add(e)}add(e,t=null){for(const n of e)this.addPdfFont(n);for(const n of this.fonts.values())n.regular||(n.regular=n.italic||n.bold||n.bolditalic);if(!t||0===t.size)return;const i=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(const n of t)this.fonts.set(n,i)}addPdfFont(e){var t,i,n;const s=e.cssFontInfo,r=s.fontFamily;let a=this.fonts.get(r);a||(a=Object.create(null),this.fonts.set(r,a),this.defaultFont||(this.defaultFont=a));let o="";const l=parseFloat(s.fontWeight);0!==parseFloat(s.italicAngle)?o=l>=700?"bolditalic":"italic":l>=700&&(o="bold"),o||((e.name.includes("Bold")||(null==(t=e.psName)?void 0:t.includes("Bold")))&&(o="bold"),(e.name.includes("Italic")||e.name.endsWith("It")||(null==(i=e.psName)?void 0:i.includes("Italic"))||(null==(n=e.psName)?void 0:n.endsWith("It")))&&(o+="italic")),o||(o="regular"),a[o]=e}getDefault(){return this.defaultFont}find(e,t=!0){var i,n;let s=this.fonts.get(e)||this.cache.get(e);if(s)return s;const r=/,|-|_| |bolditalic|bold|italic|regular|it/gi;let a=e.replaceAll(r,"");if(s=this.fonts.get(a),s)return this.cache.set(e,s),s;a=a.toLowerCase();const o=[];for(const[l,A]of this.fonts.entries())l.replaceAll(r,"").toLowerCase().startsWith(a)&&o.push(A);if(0===o.length)for(const[,l]of this.fonts.entries())(null==(i=l.regular.name)?void 0:i.replaceAll(r,"").toLowerCase().startsWith(a))&&o.push(l);if(0===o.length){a=a.replaceAll(/psmt|mt/gi,"");for(const[e,t]of this.fonts.entries())e.replaceAll(r,"").toLowerCase().startsWith(a)&&o.push(t)}if(0===o.length)for(const l of this.fonts.values())(null==(n=l.regular.name)?void 0:n.replaceAll(r,"").toLowerCase().startsWith(a))&&o.push(l);return o.length>=1?(o.length,this.cache.set(e,o[0]),o[0]):(t&&!this.warned.has(e)&&this.warned.add(e),null)}}function Y4e(e,t){return"italic"===e.posture?"bold"===e.weight?t.bolditalic:t.italic:"bold"===e.weight?t.bold:t.regular}class V4e{constructor(e,t,i,n){if(this.lineHeight=i,this.paraMargin=t||{top:0,bottom:0,left:0,right:0},!e)return void([this.pdfFont,this.xfaFont]=this.defaultFont(n));this.xfaFont={typeface:e.typeface,posture:e.posture,weight:e.weight,size:e.size,letterSpacing:e.letterSpacing};const s=n.find(e.typeface);s?(this.pdfFont=Y4e(e,s),this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(n))):[this.pdfFont,this.xfaFont]=this.defaultFont(n)}defaultFont(e){const t=e.find("Helvetica",!1)||e.find("Myriad Pro",!1)||e.find("Arial",!1)||e.getDefault();if(null==t?void 0:t.regular){const e=t.regular;return[e,{typeface:e.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0}]}return[null,{typeface:"Courier",posture:"normal",weight:"normal",size:10,letterSpacing:0}]}}class W4e{constructor(e,t,i,n){this.fontFinder=n,this.stack=[new V4e(e,t,i,n)]}pushData(e,t,i){const n=this.stack.at(-1);for(const r of["typeface","posture","weight","size","letterSpacing"])e[r]||(e[r]=n.xfaFont[r]);for(const r of["top","bottom","left","right"])isNaN(t[r])&&(t[r]=n.paraMargin[r]);const s=new V4e(e,t,i||n.lineHeight,this.fontFinder);s.pdfFont||(s.pdfFont=n.pdfFont),this.stack.push(s)}popFont(){this.stack.pop()}topFont(){return this.stack.at(-1)}}class j4e{constructor(e,t,i,n){this.glyphs=[],this.fontSelector=new W4e(e,t,i,n),this.extraHeight=0}pushData(e,t,i){this.fontSelector.pushData(e,t,i)}popFont(e){return this.fontSelector.popFont()}addPara(){const e=this.fontSelector.topFont();this.extraHeight+=e.paraMargin.top+e.paraMargin.bottom}addString(e){if(!e)return;const t=this.fontSelector.topFont(),i=t.xfaFont.size;if(t.pdfFont){const n=t.xfaFont.letterSpacing,s=t.pdfFont,r=s.lineHeight||1.2,a=t.lineHeight||Math.max(1.2,r)*i,o=r-(void 0===s.lineGap?.2:s.lineGap),l=Math.max(1,o)*i,A=i/1e3,c=s.defaultWidth||s.charsToGlyphs(" ")[0].width;for(const t of e.split(/[\u2029\n]/)){const e=s.encodeString(t).join(""),i=s.charsToGlyphs(e);for(const t of i){const e=t.width||c;this.glyphs.push([e*A+n,a,l,t.unicode,!1])}this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}else{for(const t of e.split(/[\u2029\n]/)){for(const e of t.split(""))this.glyphs.push([i,1.2*i,i,e,!1]);this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}}compute(e){let t=-1,i=0,n=0,s=0,r=0,a=0,o=!1,l=!0;for(let A=0,c=this.glyphs.length;A<c;A++){const[c,u,h,d,g]=this.glyphs[A],p=" "===d,f=l?h:u;g?(n=Math.max(n,r),r=0,s+=a,a=f,t=-1,i=0,l=!1):p?r+c>e?(n=Math.max(n,r),r=0,s+=a,a=f,t=-1,i=0,o=!0,l=!1):(a=Math.max(f,a),i=r,r+=c,t=A):r+c>e?(s+=a,a=f,-1!==t?(A=t,n=Math.max(n,i),r=0,t=-1,i=0):(n=Math.max(n,r),r=c),o=!0,l=!1):(r+=c,a=Math.max(f,a))}return n=Math.max(n,r),s+=a+this.extraHeight,{width:1.02*n,height:s,isBroken:o}}}const J4e=/^[^.[]+/,z4e=/^[^\]]+/,X4e=0,$4e=1,Z4e=2,e3e=3,t3e=4,i3e=new Map([["$data",(e,t)=>e.datasets?e.datasets.data:e],["$record",(e,t)=>(e.datasets?e.datasets.data:e)[O2e]()[0]],["$template",(e,t)=>e.template],["$connectionSet",(e,t)=>e.connectionSet],["$form",(e,t)=>e.form],["$layout",(e,t)=>e.layout],["$host",(e,t)=>e.host],["$dataWindow",(e,t)=>e.dataWindow],["$event",(e,t)=>e.event],["!",(e,t)=>e.datasets],["$xfa",(e,t)=>e],["xfa",(e,t)=>e],["$",(e,t)=>t]]),n3e=new WeakMap;function s3e(e){return"*"===(e=e.trim())?1/0:parseInt(e,10)||0}function r3e(e,t,i=!0){let n=e.match(J4e);if(!n)return null;let[s]=n;const r=[{name:s,cacheName:"."+s,index:0,js:null,formCalc:null,operator:X4e}];let a=s.length;for(;a<e.length;){const o=a;if("["===e.charAt(a++)){if(n=e.slice(a).match(z4e),!n)return null;r.at(-1).index=s3e(n[0]),a+=n[0].length+1;continue}let l;switch(e.charAt(a)){case".":if(!t)return null;a++,l=$4e;break;case"#":a++,l=Z4e;break;case"[":if(i)return null;l=e3e;break;case"(":if(i)return null;l=t3e;break;default:l=X4e}if(n=e.slice(a).match(J4e),!n)break;[s]=n,a+=s.length,r.push({name:s,cacheName:e.slice(o,a),operator:l,index:0,js:null,formCalc:null})}return r}function a3e(e,t,i,n=!0,s=!0){const r=r3e(i,n);if(!r)return null;const a=i3e.get(r[0].name);let o,l=0;a?(o=!0,e=[a(e,t)],l=1):(o=null===t,e=[t||e]);for(let A=r.length;l<A;l++){const{name:i,cacheName:n,operator:a,index:A}=r[l],c=[];for(const t of e){if(!t.isXFAObject)continue;let e,r;if(s&&(r=n3e.get(t),r||(r=new Map,n3e.set(t,r)),e=r.get(n)),!e){switch(a){case X4e:e=t[N2e](i,!1);break;case $4e:e=t[N2e](i,!0);break;case Z4e:e=t[R2e](i),e=e.isXFAObjectArray?e.children:[e]}s&&r.set(n,e)}e.length>0&&c.push(e)}if(0!==c.length||o||0!==l)e=isFinite(A)?c.filter((e=>A<e.length)).map((e=>e[A])):c.flat();else{const i=t[Y2e]();if(!(t=i))return null;l=-1,e=[t]}}return 0===e.length?null:e}function o3e(e,t,i){const n=r3e(i);if(!n)return null;if(n.some((e=>e.operator===$4e)))return null;const s=i3e.get(n[0].name);let r=0;s?(e=s(e,t),r=1):e=t||e;for(let a=n.length;r<a;r++){const{name:t,operator:i,index:s}=n[r];if(!isFinite(s))return n[r].index=0,e.createNodes(n.slice(r));let a;switch(i){case X4e:a=e[N2e](t,!1);break;case $4e:a=e[N2e](t,!0);break;case Z4e:a=e[R2e](t),a=a.isXFAObjectArray?a.children:[a]}if(0===a.length)return e.createNodes(n.slice(r));if(!(s<a.length))return n[r].index=s-a.length,e.createNodes(n.slice(r));{const t=a[s];if(!t.isXFAObject)return null;e=t}}return null}const l3e=Symbol(),A3e=Symbol(),c3e=Symbol(),u3e=Symbol("_children"),h3e=Symbol(),d3e=Symbol(),g3e=Symbol(),p3e=Symbol(),f3e=Symbol(),m3e=Symbol(),C3e=Symbol(),I3e=Symbol(),v3e=Symbol(),B3e=Symbol("parent"),y3e=Symbol(),b3e=Symbol(),E3e=Symbol();let w3e=0;const Q3e=F4e.datasets.id;class _3e{constructor(e,t,i=!1){this[l4e]=e,this[A4e]=t,this[C3e]=i,this[B3e]=null,this[u3e]=[],this[k4e]=`${t}${w3e++}`,this[W2e]=null}get isXFAObject(){return!0}get isXFAObjectArray(){return!1}createNodes(e){let t=this,i=null;for(const{name:n,index:s}of e){for(let e=0,r=isFinite(s)?s:0;e<=r;e++){const e=t[l4e]===Q3e?-1:t[l4e];i=new k3e(e,n),t[I2e](i)}t=i}return i}[u4e](e){if(!this[C3e]||!this[h4e](e))return!1;const t=e[A4e],i=this[t];if(!(i instanceof S3e))return null!==i&&this[m4e](i),this[t]=e,this[I2e](e),!0;if(i.push(e))return this[I2e](e),!0;let n="";return this.id?n=` (id: ${this.id})`:this.name&&(n=` (name: ${this.name} ${this.h.value})`),this[A4e],!1}[h4e](e){return this.hasOwnProperty(e[A4e])&&e[l4e]===this[l4e]}[i4e](){return!1}[m2e](){return!1}[$2e](){return!1}[Z2e](){return!1}[p4e](){this.para&&this[V2e]()[x2e].paraStack.pop()}[f4e](){this[V2e]()[x2e].paraStack.push(this.para)}[B4e](e){this.id&&this[l4e]===F4e.template.id&&e.set(this.id,this)}[V2e](){return this[W2e].template}[n4e](){return!1}[s4e](){return!1}[I2e](e){e[B3e]=this,this[u3e].push(e),!e[W2e]&&this[W2e]&&(e[W2e]=this[W2e])}[m4e](e){const t=this[u3e].indexOf(e);this[u3e].splice(t,1)}[j2e](){return this.hasOwnProperty("value")}[b4e](e){}[d4e](e){}[k2e](){}[B2e](e){delete this[C3e],this[b2e]&&(e.clean(this[b2e]),delete this[b2e])}[z2e](e){return this[u3e].indexOf(e)}[X2e](e,t){t[B3e]=this,this[u3e].splice(e,0,t),!t[W2e]&&this[W2e]&&(t[W2e]=this[W2e])}[r4e](){return!this.name}[o4e](){return""}[w4e](){return 0===this[u3e].length?this[Q2e]:this[u3e].map((e=>e[w4e]())).join("")}get[c3e](){const e=Object.getPrototypeOf(this);if(!e._attributes){const t=e._attributes=new Set;for(const e of Object.getOwnPropertyNames(this)){if(null===this[e]||this[e]instanceof _3e||this[e]instanceof S3e)break;t.add(e)}}return mVe(this,c3e,e._attributes)}[t4e](e){let t=this;for(;t;){if(t===e)return!0;t=t[Y2e]()}return!1}[Y2e](){return this[B3e]}[q2e](){return this[Y2e]()}[O2e](e=null){return e?this[e]:this[u3e]}[S2e](){const e=Object.create(null);this[Q2e]&&(e.$content=this[Q2e]);for(const t of Object.getOwnPropertyNames(this)){const i=this[t];null!==i&&(i instanceof _3e?e[t]=i[S2e]():i instanceof S3e?i.isEmpty()||(e[t]=i.dump()):e[t]=i)}return e}[x4e](){return null}[_4e](){return K4e.EMPTY}*[G2e](){for(const e of this[O2e]())yield e}*[p3e](e,t){for(const i of this[G2e]())if(!e||t===e.has(i[A4e])){const e=this[M2e](),t=i[_4e](e);t.success||(this[x2e].failingNode=i),yield t}}[D2e](){return null}[C2e](e,t){this[x2e].children.push(e)}[M2e](){}[v2e]({filter:e=null,include:t=!0}){if(this[x2e].generator){const e=this[M2e](),t=this[x2e].failingNode[_4e](e);if(!t.success)return t;t.html&&this[C2e](t.html,t.bbox),delete this[x2e].failingNode}else this[x2e].generator=this[p3e](e,t);for(;;){const e=this[x2e].generator.next();if(e.done)break;const t=e.value;if(!t.success)return t;t.html&&this[C2e](t.html,t.bbox)}return this[x2e].generator=null,K4e.EMPTY}[y4e](e){this[b3e]=new Set(Object.keys(e))}[m3e](e){const t=this[c3e],i=this[b3e];return[...e].filter((e=>t.has(e)&&!i.has(e)))}[I4e](e,t=new Set){for(const i of this[u3e])i[y3e](e,t)}[y3e](e,t){const i=this[f3e](e,t);i?this[l3e](i,e,t):this[I4e](e,t)}[f3e](e,t){const{use:i,usehref:n}=this;if(!i&&!n)return null;let s=null,r=null,a=null,o=i;if(n?(o=n,n.startsWith("#som(")&&n.endsWith(")")?r=n.slice(5,-1):n.startsWith(".#som(")&&n.endsWith(")")?r=n.slice(6,-1):n.startsWith("#")?a=n.slice(1):n.startsWith(".#")&&(a=n.slice(2))):i.startsWith("#")?a=i.slice(1):r=i,this.use=this.usehref="",a?s=e.get(a):(s=a3e(e.get(C4e),this,r,!0,!1),s&&(s=s[0])),!s)return null;if(s[A4e]!==this[A4e])return s[A4e],this[A4e],null;if(t.has(s))return null;t.add(s);const l=s[f3e](e,t);return l&&s[l3e](l,e,t),s[I4e](e,t),t.delete(s),s}[l3e](e,t,i){if(i.has(e))return;!this[Q2e]&&e[Q2e]&&(this[Q2e]=e[Q2e]);new Set(i).add(e);for(const n of this[m3e](e[b3e]))this[n]=e[n],this[b3e]&&this[b3e].add(n);for(const n of Object.getOwnPropertyNames(this)){if(this[c3e].has(n))continue;const s=this[n],r=e[n];if(s instanceof S3e){for(const e of s[u3e])e[y3e](t,i);for(let n=s[u3e].length,a=r[u3e].length;n<a;n++){const r=e[u3e][n][E2e]();if(!s.push(r))break;r[B3e]=this,this[u3e].push(r),r[y3e](t,i)}}else if(null===s){if(null!==r){const e=r[E2e]();e[B3e]=this,this[n]=e,this[u3e].push(e),e[y3e](t,i)}}else s[I4e](t,i),r&&s[l3e](r,t,i)}}static[h3e](e){return Array.isArray(e)?e.map((e=>_3e[h3e](e))):"object"==typeof e&&null!==e?Object.assign({},e):e}[E2e](){const e=Object.create(Object.getPrototypeOf(this));for(const t of Object.getOwnPropertySymbols(this))try{e[t]=this[t]}catch{mVe(e,t,this[t])}e[k4e]=`${e[A4e]}${w3e++}`,e[u3e]=[];for(const t of Object.getOwnPropertyNames(this)){if(this[c3e].has(t)){e[t]=_3e[h3e](this[t]);continue}const i=this[t];e[t]=i instanceof S3e?new S3e(i[I3e]):null}for(const t of this[u3e]){const i=t[A4e],n=t[E2e]();e[u3e].push(n),n[B3e]=e,null===e[i]?e[i]=n:e[i][u3e].push(n)}return e}[O2e](e=null){return e?this[u3e].filter((t=>t[A4e]===e)):this[u3e]}[R2e](e){return this[e]}[N2e](e,t,i=!0){return Array.from(this[L2e](e,t,i))}*[L2e](e,t,i=!0){if("parent"!==e){for(const i of this[u3e])i[A4e]===e&&(yield i),i.name===e&&(yield i),(t||i[r4e]())&&(yield*i[L2e](e,t,!1));i&&this[c3e].has(e)&&(yield new x3e(this,e,this[e]))}else yield this[B3e]}}class S3e{constructor(e=1/0){this[I3e]=e,this[u3e]=[]}get isXFAObject(){return!1}get isXFAObjectArray(){return!0}push(e){return this[u3e].length<=this[I3e]?(this[u3e].push(e),!0):(e[A4e],this[I3e],!1)}isEmpty(){return 0===this[u3e].length}dump(){return 1===this[u3e].length?this[u3e][0][S2e]():this[u3e].map((e=>e[S2e]()))}[E2e](){const e=new S3e(this[I3e]);return e[u3e]=this[u3e].map((e=>e[E2e]())),e}get children(){return this[u3e]}clear(){this[u3e].length=0}}class x3e{constructor(e,t,i){this[B3e]=e,this[A4e]=t,this[Q2e]=i,this[w2e]=!1,this[k4e]="attribute"+w3e++}[Y2e](){return this[B3e]}[e4e](){return!0}[U2e](){return this[Q2e].trim()}[b4e](e){e=e.value||"",this[Q2e]=e.toString()}[w4e](){return this[Q2e]}[t4e](e){return this[B3e]===e||this[B3e][t4e](e)}}class k3e extends _3e{constructor(e,t,i={}){if(super(e,t),this[Q2e]="",this[d3e]=null,"#text"!==t){const e=new Map;this[A3e]=e;for(const[t,n]of Object.entries(i))e.set(t,new x3e(this,t,n));if(i.hasOwnProperty(c4e)){const e=i[c4e].xfa.dataNode;void 0!==e&&("dataGroup"===e?this[d3e]=!1:"dataValue"===e&&(this[d3e]=!0))}}this[w2e]=!1}[S4e](e){const t=this[A4e];if("#text"===t)return void e.push(PWe(this[Q2e]));const i=NVe(t),n=this[l4e]===Q3e?"xfa:":"";e.push(`<${n}${i}`);for(const[s,r]of this[A3e].entries()){const t=NVe(s);e.push(` ${t}="${PWe(r[Q2e])}"`)}if(null!==this[d3e]&&(this[d3e]?e.push(' xfa:dataNode="dataValue"'):e.push(' xfa:dataNode="dataGroup"')),this[Q2e]||0!==this[u3e].length){if(e.push(">"),this[Q2e])"string"==typeof this[Q2e]?e.push(PWe(this[Q2e])):this[Q2e][S4e](e);else for(const t of this[u3e])t[S4e](e);e.push(`</${n}${i}>`)}else e.push("/>")}[u4e](e){if(this[Q2e]){const e=new k3e(this[l4e],"#text");this[I2e](e),e[Q2e]=this[Q2e],this[Q2e]=""}return this[I2e](e),!0}[d4e](e){this[Q2e]+=e}[k2e](){if(this[Q2e]&&this[u3e].length>0){const e=new k3e(this[l4e],"#text");this[I2e](e),e[Q2e]=this[Q2e],delete this[Q2e]}}[_4e](){return"#text"===this[A4e]?K4e.success({name:"#text",value:this[Q2e]}):K4e.EMPTY}[O2e](e=null){return e?this[u3e].filter((t=>t[A4e]===e)):this[u3e]}[T2e](){return this[A3e]}[R2e](e){const t=this[A3e].get(e);return void 0!==t?t:this[O2e](e)}*[L2e](e,t){const i=this[A3e].get(e);i&&(yield i);for(const n of this[u3e])n[A4e]===e&&(yield n),t&&(yield*n[L2e](e,t))}*[F2e](e,t){const i=this[A3e].get(e);!i||t&&i[w2e]||(yield i);for(const n of this[u3e])yield*n[F2e](e,t)}*[P2e](e,t,i){for(const n of this[u3e])n[A4e]!==e||i&&n[w2e]||(yield n),t&&(yield*n[P2e](e,t,i))}[e4e](){return null===this[d3e]?0===this[u3e].length||this[u3e][0][l4e]===F4e.xhtml.id:this[d3e]}[U2e](){return null===this[d3e]?0===this[u3e].length?this[Q2e].trim():this[u3e][0][l4e]===F4e.xhtml.id?this[u3e][0][w4e]().trim():null:this[Q2e].trim()}[b4e](e){e=e.value||"",this[Q2e]=e.toString()}[S2e](e=!1){const t=Object.create(null);e&&(t.$ns=this[l4e]),this[Q2e]&&(t.$content=this[Q2e]),t.$name=this[A4e],t.children=[];for(const i of this[u3e])t.children.push(i[S2e](e));t.attributes=Object.create(null);for(const[i,n]of this[A3e])t.attributes[i]=n[Q2e];return t}}class D3e extends _3e{constructor(e,t){super(e,t),this[Q2e]=""}[d4e](e){this[Q2e]+=e}[k2e](){}}class F3e extends D3e{constructor(e,t,i){super(e,t),this[v3e]=i}[k2e](){this[Q2e]=U4e({data:this[Q2e],defaultValue:this[v3e][0],validate:e=>this[v3e].includes(e)})}[B2e](e){super[B2e](e),delete this[v3e]}}class T3e extends D3e{[k2e](){this[Q2e]=this[Q2e].trim()}}class M3e extends D3e{constructor(e,t,i,n){super(e,t),this[g3e]=i,this[E3e]=n}[k2e](){this[Q2e]=N4e({data:this[Q2e],defaultValue:this[g3e],validate:this[E3e]})}[B2e](e){super[B2e](e),delete this[g3e],delete this[E3e]}}class R3e extends M3e{constructor(e,t){super(e,t,0,(e=>1===e))}}class N3e extends M3e{constructor(e,t){super(e,t,1,(e=>0===e))}}function L3e(e){return"string"==typeof e?"0px":Number.isInteger(e)?`${e}px`:`${e.toFixed(2)}px`}const U3e={anchorType(e,t){const i=e[q2e]();if(i&&(!i.layout||"position"===i.layout))switch("transform"in t||(t.transform=""),e.anchorType){case"bottomCenter":t.transform+="translate(-50%, -100%)";break;case"bottomLeft":t.transform+="translate(0,-100%)";break;case"bottomRight":t.transform+="translate(-100%,-100%)";break;case"middleCenter":t.transform+="translate(-50%,-50%)";break;case"middleLeft":t.transform+="translate(0,-50%)";break;case"middleRight":t.transform+="translate(-100%,-50%)";break;case"topCenter":t.transform+="translate(-50%,0)";break;case"topRight":t.transform+="translate(-100%,0)"}},dimensions(e,t){var i;const n=e[q2e]();let s=e.w;const r=e.h;if(null==(i=n.layout)?void 0:i.includes("row")){const t=n[x2e],i=e.colSpan;let r;-1===i?(r=t.columnWidths.slice(t.currentColumn).reduce(((e,t)=>e+t),0),t.currentColumn=0):(r=t.columnWidths.slice(t.currentColumn,t.currentColumn+i).reduce(((e,t)=>e+t),0),t.currentColumn=(t.currentColumn+e.colSpan)%t.columnWidths.length),isNaN(r)||(s=e.w=r)}t.width=""!==s?L3e(s):"auto",t.height=""!==r?L3e(r):"auto"},position(e,t){const i=e[q2e]();(null==i?void 0:i.layout)&&"position"!==i.layout||(t.position="absolute",t.left=L3e(e.x),t.top=L3e(e.y))},rotate(e,t){e.rotate&&("transform"in t||(t.transform=""),t.transform+=`rotate(-${e.rotate}deg)`,t.transformOrigin="top left")},presence(e,t){switch(e.presence){case"invisible":t.visibility="hidden";break;case"hidden":case"inactive":t.display="none"}},hAlign(e,t){if("para"===e[A4e])switch(e.hAlign){case"justifyAll":t.textAlign="justify-all";break;case"radix":t.textAlign="left";break;default:t.textAlign=e.hAlign}else switch(e.hAlign){case"left":t.alignSelf="start";break;case"center":t.alignSelf="center";break;case"right":t.alignSelf="end"}},margin(e,t){e.margin&&(t.margin=e.margin[x4e]().margin)}};function H3e(e,t){"position"===e[q2e]().layout&&(e.minW>0&&(t.minWidth=L3e(e.minW)),e.maxW>0&&(t.maxWidth=L3e(e.maxW)),e.minH>0&&(t.minHeight=L3e(e.minH)),e.maxH>0&&(t.maxHeight=L3e(e.maxH)))}function P3e(e,t,i,n,s,r){const a=new j4e(t,i,n,s);return"string"==typeof e?a.addString(e):e[g4e](a),a.compute(r)}function O3e(e,t){let i=null,n=null,s=!1;if((!e.w||!e.h)&&e.value){let r=0,a=0;e.margin&&(r=e.margin.leftInset+e.margin.rightInset,a=e.margin.topInset+e.margin.bottomInset);let o=null,l=null;e.para&&(l=Object.create(null),o=""===e.para.lineHeight?null:e.para.lineHeight,l.top=""===e.para.spaceAbove?0:e.para.spaceAbove,l.bottom=""===e.para.spaceBelow?0:e.para.spaceBelow,l.left=""===e.para.marginLeft?0:e.para.marginLeft,l.right=""===e.para.marginRight?0:e.para.marginRight);let A=e.font;if(!A){const t=e[V2e]();let i=e[Y2e]();for(;i&&i!==t;){if(i.font){A=i.font;break}i=i[Y2e]()}}const c=(e.w||t.width)-r,u=e[W2e].fontFinder;if(e.value.exData&&e.value.exData[Q2e]&&"text/html"===e.value.exData.contentType){const t=P3e(e.value.exData[Q2e],A,l,o,u,c);n=t.width,i=t.height,s=t.isBroken}else{const t=e.value[w4e]();if(t){const e=P3e(t,A,l,o,u,c);n=e.width,i=e.height,s=e.isBroken}}null===n||e.w||(n+=r),null===i||e.h||(i+=a)}return{w:n,h:i,isBroken:s}}function G3e(e,t,i){let n;if(""!==e.w&&""!==e.h)n=[e.x,e.y,e.w,e.h];else{if(!i)return null;let s=e.w;if(""===s){if(0===e.maxW){const t=e[q2e]();s="position"===t.layout&&""!==t.w?0:e.minW}else s=Math.min(e.maxW,i.width);t.attributes.style.width=L3e(s)}let r=e.h;if(""===r){if(0===e.maxH){const t=e[q2e]();r="position"===t.layout&&""!==t.h?0:e.minH}else r=Math.min(e.maxH,i.height);t.attributes.style.height=L3e(r)}n=[e.x,e.y,s,r]}return n}function K3e(e){var t;const i=e[q2e]();if(null==(t=i.layout)?void 0:t.includes("row")){const t=i[x2e],n=e.colSpan;let s;s=-1===n?t.columnWidths.slice(t.currentColumn).reduce(((e,t)=>e+t),0):t.columnWidths.slice(t.currentColumn,t.currentColumn+n).reduce(((e,t)=>e+t),0),isNaN(s)||(e.w=s)}i.layout&&"position"!==i.layout&&(e.x=e.y=0),"table"===e.layout&&""===e.w&&Array.isArray(e.columnWidths)&&(e.w=e.columnWidths.reduce(((e,t)=>e+t),0))}function q3e(e){switch(e.layout){case"position":default:return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb"}}function Y3e(e,...t){const i=Object.create(null);for(const n of t){const t=e[n];if(null!==t)if(U3e.hasOwnProperty(n))U3e[n](e,i);else if(t instanceof _3e){const e=t[x4e]();e&&Object.assign(i,e)}}return i}function V3e(e,t){const{attributes:i}=t,{style:n}=i,s={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};if(i.class.push("xfaWrapped"),e.border){const{widths:i,insets:r}=e.border[x2e];let a,o,l=r[0],A=r[3];const c=r[0]+r[2],u=r[1]+r[3];switch(e.border.hand){case"even":l-=i[0]/2,A-=i[3]/2,a=`calc(100% + ${(i[1]+i[3])/2-u}px)`,o=`calc(100% + ${(i[0]+i[2])/2-c}px)`;break;case"left":l-=i[0],A-=i[3],a=`calc(100% + ${i[1]+i[3]-u}px)`,o=`calc(100% + ${i[0]+i[2]-c}px)`;break;case"right":a=u?`calc(100% - ${u}px)`:"100%",o=c?`calc(100% - ${c}px)`:"100%"}const h=["xfaBorder"];J3e(e.border)&&h.push("xfaPrintOnly");const d={name:"div",attributes:{class:h,style:{top:`${l}px`,left:`${A}px`,width:a,height:o}},children:[]};for(const e of["border","borderWidth","borderColor","borderRadius","borderStyle"])void 0!==n[e]&&(d.attributes.style[e]=n[e],delete n[e]);s.children.push(d,t)}else s.children.push(t);for(const r of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])void 0!==n[r]&&(s.attributes.style[r]=n[r],delete n[r]);return s.attributes.style.position="absolute"===n.position?"absolute":"relative",delete n.position,n.alignSelf&&(s.attributes.style.alignSelf=n.alignSelf,delete n.alignSelf),s}function W3e(e){const t=P4e(e.textIndent,"0px");if(t>=0)return;const i="padding"+("left"===("right"===e.textAlign?"right":"left")?"Left":"Right"),n=P4e(e[i],"0px");e[i]=n-t+"px"}function j3e(e,t){switch(e.access){case"nonInteractive":t.push("xfaNonInteractive");break;case"readOnly":t.push("xfaReadOnly");break;case"protected":t.push("xfaDisabled")}}function J3e(e){return e.relevant.length>0&&!e.relevant[0].excluded&&"print"===e.relevant[0].viewname}function z3e(e){const t=e[V2e]()[x2e].paraStack;return t.length?t.at(-1):null}function X3e(e,t,i){var n;if(null==(n=i.attributes.class)?void 0:n.includes("xfaRich")){t&&(""===e.h&&(t.height="auto"),""===e.w&&(t.width="auto"));const n=z3e(e);if(n){const e=i.attributes.style;switch(e.display="flex",e.flexDirection="column",n.vAlign){case"top":e.justifyContent="start";break;case"bottom":e.justifyContent="end";break;case"middle":e.justifyContent="center"}const t=n[x4e]();for(const[i,n]of Object.entries(t))i in e||(e[i]=n)}}}function $3e(e,t,i,n){if(!i)return void delete n.fontFamily;const s=R4e(e.typeface);n.fontFamily=`"${s}"`;const r=i.find(s);if(r){const{fontFamily:i}=r.regular.cssFontInfo;i!==s&&(n.fontFamily=`"${i}"`);const a=z3e(t);if(a&&""!==a.lineHeight)return;if(n.lineHeight)return;const o=Y4e(e,r);o&&(n.lineHeight=Math.max(1.2,o.lineHeight))}}function Z3e(e){const t=fVe(e,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return t?t.href:null}function e6e(e,t){return{name:"div",attributes:{class:["lr-tb"===e.layout?"xfaLr":"xfaRl"]},children:t}}function t6e(e){if(!e[x2e])return null;const t={name:"div",attributes:e[x2e].attributes,children:e[x2e].children};if(e[x2e].failingNode){const i=e[x2e].failingNode[D2e]();i&&(e.layout.endsWith("-tb")?t.children.push(e6e(e,[i])):t.children.push(i))}return 0===t.children.length?null:t}function i6e(e,t,i){const n=e[x2e],s=n.availableSpace,[r,a,o,l]=i;switch(e.layout){case"position":n.width=Math.max(n.width,r+o),n.height=Math.max(n.height,a+l),n.children.push(t);break;case"lr-tb":case"rl-tb":n.line&&1!==n.attempt||(n.line=e6e(e,[]),n.children.push(n.line),n.numberInLine=0),n.numberInLine+=1,n.line.children.push(t),0===n.attempt?(n.currentWidth+=o,n.height=Math.max(n.height,n.prevHeight+l)):(n.currentWidth=o,n.prevHeight=n.height,n.height+=l,n.attempt=0),n.width=Math.max(n.width,n.currentWidth);break;case"rl-row":case"row":{n.children.push(t),n.width+=o,n.height=Math.max(n.height,l);const e=L3e(n.height);for(const t of n.children)t.attributes.style.height=e;break}case"table":case"tb":n.width=Math.min(s.width,Math.max(n.width,o)),n.height+=l,n.children.push(t)}}function n6e(e){const t=e[x2e].availableSpace,i=e.margin?e.margin.topInset+e.margin.bottomInset:0,n=e.margin?e.margin.leftInset+e.margin.rightInset:0;switch(e.layout){case"lr-tb":case"rl-tb":return 0===e[x2e].attempt?{width:t.width-n-e[x2e].currentWidth,height:t.height-i-e[x2e].prevHeight}:{width:t.width-n,height:t.height-i-e[x2e].height};case"rl-row":case"row":const s=e[x2e].columnWidths.slice(e[x2e].currentColumn).reduce(((e,t)=>e+t));return{width:s,height:t.height-n};case"table":case"tb":return{width:t.width-n,height:t.height-i-e[x2e].height};default:return t}}function s6e(e,t){var i;if(null===e[V2e]()[x2e].firstUnsplittable)return!0;if(0===e.w||0===e.h)return!0;const n=e[q2e](),s=(null==(i=n[x2e])?void 0:i.attempt)||0,[,r,a,o]=function(e){let t,i,n=""===e.w?NaN:e.w,s=""===e.h?NaN:e.h,[r,a]=[0,0];switch(e.anchorType||""){case"bottomCenter":[r,a]=[n/2,s];break;case"bottomLeft":[r,a]=[0,s];break;case"bottomRight":[r,a]=[n,s];break;case"middleCenter":[r,a]=[n/2,s/2];break;case"middleLeft":[r,a]=[0,s/2];break;case"middleRight":[r,a]=[n,s/2];break;case"topCenter":[r,a]=[n/2,0];break;case"topRight":[r,a]=[n,0]}switch(e.rotate||0){case 0:[t,i]=[-r,-a];break;case 90:[t,i]=[-a,r],[n,s]=[s,-n];break;case 180:[t,i]=[r,a],[n,s]=[-n,-s];break;case 270:[t,i]=[a,-r],[n,s]=[-s,n]}return[e.x+t+Math.min(0,n),e.y+i+Math.min(0,s),Math.abs(n),Math.abs(s)]}(e);switch(n.layout){case"lr-tb":case"rl-tb":return 0===s?e[V2e]()[x2e].noLayoutFailure?""!==e.w?Math.round(a-t.width)<=2:t.width>2:!(""!==e.h&&Math.round(o-t.height)>2)&&(""!==e.w?Math.round(a-t.width)<=2||0===n[x2e].numberInLine&&t.height>2:t.width>2):!!e[V2e]()[x2e].noLayoutFailure||!(""!==e.h&&Math.round(o-t.height)>2)&&((""===e.w||Math.round(a-t.width)<=2||!n[s4e]())&&t.height>2);case"table":case"tb":return!!e[V2e]()[x2e].noLayoutFailure||(""===e.h||e[n4e]()?(""===e.w||Math.round(a-t.width)<=2||!n[s4e]())&&t.height>2:Math.round(o-t.height)<=2);case"position":if(e[V2e]()[x2e].noLayoutFailure)return!0;if(""===e.h||Math.round(o+r-t.height)<=2)return!0;return o+r>e[V2e]()[x2e].currentContentArea.h;case"rl-row":case"row":return!!e[V2e]()[x2e].noLayoutFailure||(""===e.h||Math.round(o-t.height)<=2);default:return!0}}const r6e=F4e.template.id,a6e="http://www.w3.org/2000/svg",o6e=/^H(\d+)$/,l6e=new Set(["image/gif","image/jpeg","image/jpg","image/pjpeg","image/png","image/apng","image/x-png","image/bmp","image/x-ms-bmp","image/tiff","image/tif","application/octet-stream"]),A6e=[[[66,77],"image/bmp"],[[255,216,255],"image/jpeg"],[[73,73,42,0],"image/tiff"],[[77,77,0,42],"image/tiff"],[[71,73,70,56,57,97],"image/gif"],[[137,80,78,71,13,10,26,10],"image/png"]];function c6e(e){if(!e||!e.border)return{w:0,h:0};const t=e.border[H2e]();return t?{w:t.widths[0]+t.widths[2]+t.insets[0]+t.insets[2],h:t.widths[1]+t.widths[3]+t.insets[1]+t.insets[3]}:{w:0,h:0}}function u6e(e){return e.margin&&(e.margin.topInset||e.margin.rightInset||e.margin.bottomInset||e.margin.leftInset)}function h6e(e,t){if(!e.value){const t=new Q9e({});e[I2e](t),e.value=t}e.value[b4e](t)}function*d6e(e){for(const t of e[O2e]())t instanceof h9e?yield*t[G2e]():yield t}function g6e(e){var t;return"error"===(null==(t=e.validate)?void 0:t.nullTest)}function p6e(e){for(;e;){if(!e.traversal)return void(e[E4e]=e[Y2e]()[E4e]);if(e[E4e])return;let t=null;for(const s of e.traversal[O2e]())if("next"===s.operation){t=s;break}if(!t||!t.ref)return void(e[E4e]=e[Y2e]()[E4e]);const i=e[V2e]();e[E4e]=++i[E4e];const n=i[v4e](t.ref,e);if(!n)return;e=n[0]}}function f6e(e,t){var i;const n=e.assist;if(n){const e=n[_4e]();e&&(t.title=e);const i=n.role.match(o6e);if(i){const e="heading",n=i[1];t.role=e,t["aria-level"]=n}}if("table"===e.layout)t.role="table";else if("row"===e.layout)t.role="row";else{const n=e[Y2e]();"row"===n.layout&&(t.role="TH"===(null==(i=n.assist)?void 0:i.role)?"columnheader":"cell")}}function m6e(e){if(!e.assist)return null;const t=e.assist;return t.speak&&""!==t.speak[Q2e]?t.speak[Q2e]:t.toolTip?t.toolTip[Q2e]:null}function C6e(e){return K4e.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:e}]})}function I6e(e){const t=e[V2e]();null===t[x2e].firstUnsplittable&&(t[x2e].firstUnsplittable=e,t[x2e].noLayoutFailure=!0)}function v6e(e){const t=e[V2e]();t[x2e].firstUnsplittable===e&&(t[x2e].noLayoutFailure=!1)}function B6e(e){if(e[x2e])return!1;if(e[x2e]=Object.create(null),"auto"===e.targetType)return!1;const t=e[V2e]();let i=null;if(e.target){if(i=t[v4e](e.target,e[Y2e]()),!i)return!1;i=i[0]}const{currentPageArea:n,currentContentArea:s}=t[x2e];if("pageArea"===e.targetType)return i instanceof Y8e||(i=null),e.startNew?(e[x2e].target=i||n,!0):!(!i||i===n)&&(e[x2e].target=i,!0);i instanceof V6e||(i=null);const r=i&&i[Y2e]();let a,o=r;if(e.startNew)if(i){const e=r.contentArea.children,t=e.indexOf(s),n=e.indexOf(i);-1!==t&&t<n&&(o=null),a=n-1}else a=n.contentArea.children.indexOf(s);else{if(!i||i===s)return!1;a=r.contentArea.children.indexOf(i)-1,o=r===n?null:r}return e[x2e].target=o,e[x2e].index=a,!0}function y6e(e,t,i){const n=e[V2e](),s=n[x2e].noLayoutFailure,r=t[q2e];t[q2e]=()=>e,n[x2e].noLayoutFailure=!0;const a=t[_4e](i);e[C2e](a.html,a.bbox),n[x2e].noLayoutFailure=s,t[q2e]=r}class b6e extends T3e{constructor(e){super(r6e,"appearanceFilter"),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class E6e extends _3e{constructor(e){super(r6e,"arc",!0),this.circular=N4e({data:e.circular,defaultValue:0,validate:e=>1===e}),this.hand=H4e(e.hand,["even","left","right"]),this.id=e.id||"",this.startAngle=L4e({data:e.startAngle,defaultValue:0,validate:e=>!0}),this.sweepAngle=L4e({data:e.sweepAngle,defaultValue:360,validate:e=>!0}),this.use=e.use||"",this.usehref=e.usehref||"",this.edge=null,this.fill=null}[_4e](){var e;const t=this.edge||new n8e({}),i=t[x4e](),n=Object.create(null);let s;"visible"===(null==(e=this.fill)?void 0:e.presence)?Object.assign(n,this.fill[x4e]()):n.fill="transparent",n.strokeWidth=L3e("visible"===t.presence?t.thickness:0),n.stroke=i.color;const r={xmlns:a6e,style:{width:"100%",height:"100%",overflow:"visible"}};if(360===this.sweepAngle)s={name:"ellipse",attributes:{xmlns:a6e,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:n}};else{const e=this.startAngle*Math.PI/180,t=this.sweepAngle*Math.PI/180,i=this.sweepAngle>180?1:0,[a,o,l,A]=[50*(1+Math.cos(e)),50*(1-Math.sin(e)),50*(1+Math.cos(e+t)),50*(1-Math.sin(e+t))];s={name:"path",attributes:{xmlns:a6e,d:`M ${a} ${o} A 50 50 0 ${i} 0 ${l} ${A}`,vectorEffect:"non-scaling-stroke",style:n}},Object.assign(r,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}const a={name:"svg",children:[s],attributes:r};return u6e(this[Y2e]()[Y2e]())?K4e.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[a]}):(a.attributes.style.position="absolute",K4e.success(a))}}class w6e extends _3e{constructor(e){super(r6e,"area",!0),this.colSpan=N4e({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.id=e.id||"",this.name=e.name||"",this.relevant=G4e(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.x=P4e(e.x,"0pt"),this.y=P4e(e.y,"0pt"),this.desc=null,this.extras=null,this.area=new S3e,this.draw=new S3e,this.exObject=new S3e,this.exclGroup=new S3e,this.field=new S3e,this.subform=new S3e,this.subformSet=new S3e}*[G2e](){yield*d6e(this)}[r4e](){return!0}[Z2e](){return!0}[C2e](e,t){const[i,n,s,r]=t;this[x2e].width=Math.max(this[x2e].width,i+s),this[x2e].height=Math.max(this[x2e].height,n+r),this[x2e].children.push(e)}[M2e](){return this[x2e].availableSpace}[_4e](e){const t=Y3e(this,"position"),i={style:t,id:this[k4e],class:["xfaArea"]};J3e(this)&&i.class.push("xfaPrintOnly"),this.name&&(i.xfaName=this.name);const n=[];this[x2e]={children:n,width:0,height:0,availableSpace:e};const s=this[v2e]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!s.success)return s.isBreak()?s:(delete this[x2e],K4e.FAILURE);t.width=L3e(this[x2e].width),t.height=L3e(this[x2e].height);const r={name:"div",attributes:i,children:n},a=[this.x,this.y,this[x2e].width,this[x2e].height];return delete this[x2e],K4e.success(r,a)}}class Q6e extends _3e{constructor(e){super(r6e,"assist",!0),this.id=e.id||"",this.role=e.role||"",this.use=e.use||"",this.usehref=e.usehref||"",this.speak=null,this.toolTip=null}[_4e](){var e;return(null==(e=this.toolTip)?void 0:e[Q2e])||null}}class _6e extends _3e{constructor(e){super(r6e,"barcode",!0),this.charEncoding=U4e({data:e.charEncoding?e.charEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\d{2}/)}),this.checksum=H4e(e.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),this.dataColumnCount=N4e({data:e.dataColumnCount,defaultValue:-1,validate:e=>e>=0}),this.dataLength=N4e({data:e.dataLength,defaultValue:-1,validate:e=>e>=0}),this.dataPrep=H4e(e.dataPrep,["none","flateCompress"]),this.dataRowCount=N4e({data:e.dataRowCount,defaultValue:-1,validate:e=>e>=0}),this.endChar=e.endChar||"",this.errorCorrectionLevel=N4e({data:e.errorCorrectionLevel,defaultValue:-1,validate:e=>e>=0&&e<=8}),this.id=e.id||"",this.moduleHeight=P4e(e.moduleHeight,"5mm"),this.moduleWidth=P4e(e.moduleWidth,"0.25mm"),this.printCheckDigit=N4e({data:e.printCheckDigit,defaultValue:0,validate:e=>1===e}),this.rowColumnRatio=O4e(e.rowColumnRatio),this.startChar=e.startChar||"",this.textLocation=H4e(e.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),this.truncate=N4e({data:e.truncate,defaultValue:0,validate:e=>1===e}),this.type=H4e(e.type?e.type.toLowerCase():"",["aztec","codabar","code2of5industrial","code2of5interleaved","code2of5matrix","code2of5standard","code3of9","code3of9extended","code11","code49","code93","code128","code128a","code128b","code128c","code128sscc","datamatrix","ean8","ean8add2","ean8add5","ean13","ean13add2","ean13add5","ean13pwcd","fim","logmars","maxicode","msi","pdf417","pdf417macro","plessey","postauscust2","postauscust3","postausreplypaid","postausstandard","postukrm4scc","postusdpbc","postusimb","postusstandard","postus5zip","qrcode","rfid","rss14","rss14expanded","rss14limited","rss14stacked","rss14stackedomni","rss14truncated","telepen","ucc128","ucc128random","ucc128sscc","upca","upcaadd2","upcaadd5","upcapwcd","upce","upceadd2","upceadd5","upcean2","upcean5","upsmaxicode"]),this.upsMode=H4e(e.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),this.use=e.use||"",this.usehref=e.usehref||"",this.wideNarrowRatio=O4e(e.wideNarrowRatio),this.encrypt=null,this.extras=null}}class S6e extends _3e{constructor(e){super(r6e,"bind",!0),this.match=H4e(e.match,["once","dataRef","global","none"]),this.ref=e.ref||"",this.picture=null}}class x6e extends _3e{constructor(e){super(r6e,"bindItems"),this.connection=e.connection||"",this.labelRef=e.labelRef||"",this.ref=e.ref||"",this.valueRef=e.valueRef||""}}class k6e extends _3e{constructor(e){super(r6e,"bookend"),this.id=e.id||"",this.leader=e.leader||"",this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||""}}class D6e extends R3e{constructor(e){super(r6e,"boolean"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[_4e](e){return C6e(1===this[Q2e]?"1":"0")}}class F6e extends _3e{constructor(e){super(r6e,"border",!0),this.break=H4e(e.break,["close","open"]),this.hand=H4e(e.hand,["even","left","right"]),this.id=e.id||"",this.presence=H4e(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=G4e(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.corner=new S3e(4),this.edge=new S3e(4),this.extras=null,this.fill=null,this.margin=null}[H2e](){if(!this[x2e]){const e=this.edge.children.slice();if(e.length<4){const t=e.at(-1)||new n8e({});for(let i=e.length;i<4;i++)e.push(t)}const t=e.map((e=>e.thickness)),i=[0,0,0,0];this.margin&&(i[0]=this.margin.topInset,i[1]=this.margin.rightInset,i[2]=this.margin.bottomInset,i[3]=this.margin.leftInset),this[x2e]={widths:t,insets:i,edges:e}}return this[x2e]}[x4e](){var e;const{edges:t}=this[H2e](),i=t.map((e=>{const t=e[x4e]();return t.color||(t.color="#000000"),t})),n=Object.create(null);if(this.margin&&Object.assign(n,this.margin[x4e]()),"visible"===(null==(e=this.fill)?void 0:e.presence)&&Object.assign(n,this.fill[x4e]()),this.corner.children.some((e=>0!==e.radius))){const e=this.corner.children.map((e=>e[x4e]()));if(2===e.length||3===e.length){const t=e.at(-1);for(let i=e.length;i<4;i++)e.push(t)}n.borderRadius=e.map((e=>e.radius)).join(" ")}switch(this.presence){case"invisible":case"hidden":n.borderStyle="";break;case"inactive":n.borderStyle="none";break;default:n.borderStyle=i.map((e=>e.style)).join(" ")}return n.borderWidth=i.map((e=>e.width)).join(" "),n.borderColor=i.map((e=>e.color)).join(" "),n}}class T6e extends _3e{constructor(e){super(r6e,"break",!0),this.after=H4e(e.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.afterTarget=e.afterTarget||"",this.before=H4e(e.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.beforeTarget=e.beforeTarget||"",this.bookendLeader=e.bookendLeader||"",this.bookendTrailer=e.bookendTrailer||"",this.id=e.id||"",this.overflowLeader=e.overflowLeader||"",this.overflowTarget=e.overflowTarget||"",this.overflowTrailer=e.overflowTrailer||"",this.startNew=N4e({data:e.startNew,defaultValue:0,validate:e=>1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}}class M6e extends _3e{constructor(e){super(r6e,"breakAfter",!0),this.id=e.id||"",this.leader=e.leader||"",this.startNew=N4e({data:e.startNew,defaultValue:0,validate:e=>1===e}),this.target=e.target||"",this.targetType=H4e(e.targetType,["auto","contentArea","pageArea"]),this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||"",this.script=null}}class R6e extends _3e{constructor(e){super(r6e,"breakBefore",!0),this.id=e.id||"",this.leader=e.leader||"",this.startNew=N4e({data:e.startNew,defaultValue:0,validate:e=>1===e}),this.target=e.target||"",this.targetType=H4e(e.targetType,["auto","contentArea","pageArea"]),this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||"",this.script=null}[_4e](e){return this[x2e]={},K4e.FAILURE}}class N6e extends _3e{constructor(e){super(r6e,"button",!0),this.highlight=H4e(e.highlight,["inverted","none","outline","push"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[_4e](e){const t=this[Y2e]()[Y2e](),i={name:"button",attributes:{id:this[k4e],class:["xfaButton"],style:{}},children:[]};for(const n of t.event.children){if("click"!==n.activity||!n.script)continue;const e=KWe(n.script[Q2e]);if(!e)continue;const t=Z3e(e.url);t&&i.children.push({name:"a",attributes:{id:"link"+this[k4e],href:t,newWindow:e.newWindow,class:["xfaLink"],style:{}},children:[]})}return K4e.success(i)}}class L6e extends _3e{constructor(e){super(r6e,"calculate",!0),this.id=e.id||"",this.override=H4e(e.override,["disabled","error","ignore","warning"]),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.message=null,this.script=null}}class U6e extends _3e{constructor(e){super(r6e,"caption",!0),this.id=e.id||"",this.placement=H4e(e.placement,["left","bottom","inline","right","top"]),this.presence=H4e(e.presence,["visible","hidden","inactive","invisible"]),this.reserve=Math.ceil(P4e(e.reserve)),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.font=null,this.margin=null,this.para=null,this.value=null}[b4e](e){h6e(this,e)}[H2e](e){if(!this[x2e]){let{width:t,height:i}=e;switch(this.placement){case"left":case"right":case"inline":t=this.reserve<=0?t:this.reserve;break;case"top":case"bottom":i=this.reserve<=0?i:this.reserve}this[x2e]=O3e(this,{width:t,height:i})}return this[x2e]}[_4e](e){if(!this.value)return K4e.EMPTY;this[f4e]();const t=this.value[_4e](e).html;if(!t)return this[p4e](),K4e.EMPTY;const i=this.reserve;if(this.reserve<=0){const{w:t,h:i}=this[H2e](e);switch(this.placement){case"left":case"right":case"inline":this.reserve=t;break;case"top":case"bottom":this.reserve=i}}const n=[];"string"==typeof t?n.push({name:"#text",value:t}):n.push(t);const s=Y3e(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(s.width=L3e(this.reserve));break;case"top":case"bottom":this.reserve>0&&(s.height=L3e(this.reserve))}return X3e(this,null,t),this[p4e](),this.reserve=i,K4e.success({name:"div",attributes:{style:s,class:["xfaCaption"]},children:n})}}class H6e extends T3e{constructor(e){super(r6e,"certificate"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class P6e extends _3e{constructor(e){super(r6e,"certificates",!0),this.credentialServerPolicy=H4e(e.credentialServerPolicy,["optional","required"]),this.id=e.id||"",this.url=e.url||"",this.urlPolicy=e.urlPolicy||"",this.use=e.use||"",this.usehref=e.usehref||"",this.encryption=null,this.issuers=null,this.keyUsage=null,this.oids=null,this.signing=null,this.subjectDNs=null}}class O6e extends _3e{constructor(e){super(r6e,"checkButton",!0),this.id=e.id||"",this.mark=H4e(e.mark,["default","check","circle","cross","diamond","square","star"]),this.shape=H4e(e.shape,["square","round"]),this.size=P4e(e.size,"10pt"),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}[_4e](e){var t,i,n;const s=Y3e("margin"),r=L3e(this.size);let a,o,l;s.width=s.height=r;const A=this[Y2e]()[Y2e](),c=A.items.children.length&&A.items.children[0][_4e]().html||[],u={on:(void 0!==c[0]?c[0]:"on").toString(),off:(void 0!==c[1]?c[1]:"off").toString()},h=((null==(t=A.value)?void 0:t[w4e]())||"off")===u.on||void 0,d=A[q2e](),g=A[k4e];let p;d instanceof g8e?(l=d[k4e],a="radio",o="xfaRadio",p=(null==(i=d[_2e])?void 0:i[k4e])||d[k4e]):(a="checkbox",o="xfaCheckbox",p=(null==(n=A[_2e])?void 0:n[k4e])||A[k4e]);const f={name:"input",attributes:{class:[o],style:s,fieldId:g,dataId:p,type:a,checked:h,xfaOn:u.on,xfaOff:u.off,"aria-label":m6e(A),"aria-required":!1}};return l&&(f.attributes.name=l),g6e(A)&&(f.attributes["aria-required"]=!0,f.attributes.required=!0),K4e.success({name:"label",attributes:{class:["xfaLabel"]},children:[f]})}}class G6e extends _3e{constructor(e){super(r6e,"choiceList",!0),this.commitOn=H4e(e.commitOn,["select","exit"]),this.id=e.id||"",this.open=H4e(e.open,["userControl","always","multiSelect","onEntry"]),this.textEntry=N4e({data:e.textEntry,defaultValue:0,validate:e=>1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}[_4e](e){var t,i,n;const s=Y3e(this,"border","margin"),r=this[Y2e]()[Y2e](),a={fontSize:`calc(${(null==(t=r.font)?void 0:t.size)||10}px * var(--scale-factor))`},o=[];if(r.items.children.length>0){const e=r.items;let t=0,n=0;2===e.children.length&&(t=e.children[0].save,n=1-t);const s=e.children[t][_4e]().html,l=e.children[n][_4e]().html;let A=!1;const c=(null==(i=r.value)?void 0:i[w4e]())||"";for(let i=0,r=s.length;i<r;i++){const e={name:"option",attributes:{value:l[i]||s[i],style:a},value:s[i]};l[i]===c&&(e.attributes.selected=A=!0),o.push(e)}A||o.splice(0,0,{name:"option",attributes:{hidden:!0,selected:!0},value:" "})}const l={class:["xfaSelect"],fieldId:r[k4e],dataId:(null==(n=r[_2e])?void 0:n[k4e])||r[k4e],style:s,"aria-label":m6e(r),"aria-required":!1};return g6e(r)&&(l["aria-required"]=!0,l.required=!0),"multiSelect"===this.open&&(l.multiple=!0),K4e.success({name:"label",attributes:{class:["xfaLabel"]},children:[{name:"select",children:o,attributes:l}]})}}class K6e extends _3e{constructor(e){super(r6e,"color",!0),this.cSpace=H4e(e.cSpace,["SRGB"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.value=e.value?function(e,t=[0,0,0]){let[i,n,s]=t;if(!e)return{r:i,g:n,b:s};const r=e.trim().split(/\s*,\s*/).map((e=>Math.min(Math.max(0,parseInt(e.trim(),10)),255))).map((e=>isNaN(e)?0:e));return r.length<3||([i,n,s]=r),{r:i,g:n,b:s}}(e.value):"",this.extras=null}[j2e](){return!1}[x4e](){return this.value?FVe.makeHexColor(this.value.r,this.value.g,this.value.b):null}}class q6e extends _3e{constructor(e){super(r6e,"comb"),this.id=e.id||"",this.numberOfCells=N4e({data:e.numberOfCells,defaultValue:0,validate:e=>e>=0}),this.use=e.use||"",this.usehref=e.usehref||""}}class Y6e extends _3e{constructor(e){super(r6e,"connect",!0),this.connection=e.connection||"",this.id=e.id||"",this.ref=e.ref||"",this.usage=H4e(e.usage,["exportAndImport","exportOnly","importOnly"]),this.use=e.use||"",this.usehref=e.usehref||"",this.picture=null}}class V6e extends _3e{constructor(e){super(r6e,"contentArea",!0),this.h=P4e(e.h),this.id=e.id||"",this.name=e.name||"",this.relevant=G4e(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.w=P4e(e.w),this.x=P4e(e.x,"0pt"),this.y=P4e(e.y,"0pt"),this.desc=null,this.extras=null}[_4e](e){const t={left:L3e(this.x),top:L3e(this.y),width:L3e(this.w),height:L3e(this.h)},i=["xfaContentarea"];return J3e(this)&&i.push("xfaPrintOnly"),K4e.success({name:"div",children:[],attributes:{style:t,class:i,id:this[k4e]}})}}class W6e extends _3e{constructor(e){super(r6e,"corner",!0),this.id=e.id||"",this.inverted=N4e({data:e.inverted,defaultValue:0,validate:e=>1===e}),this.join=H4e(e.join,["square","round"]),this.presence=H4e(e.presence,["visible","hidden","inactive","invisible"]),this.radius=P4e(e.radius),this.stroke=H4e(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=P4e(e.thickness,"0.5pt"),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[x4e](){const e=Y3e(this,"visibility");return e.radius=L3e("square"===this.join?0:this.radius),e}}class j6e extends D3e{constructor(e){super(r6e,"date"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[k2e](){const e=this[Q2e].trim();this[Q2e]=e?new Date(e):null}[_4e](e){return C6e(this[Q2e]?this[Q2e].toString():"")}}class J6e extends D3e{constructor(e){super(r6e,"dateTime"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[k2e](){const e=this[Q2e].trim();this[Q2e]=e?new Date(e):null}[_4e](e){return C6e(this[Q2e]?this[Q2e].toString():"")}}class z6e extends _3e{constructor(e){super(r6e,"dateTimeEdit",!0),this.hScrollPolicy=H4e(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.picker=H4e(e.picker,["host","none"]),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[_4e](e){var t;const i=Y3e(this,"border","font","margin"),n=this[Y2e]()[Y2e](),s={name:"input",attributes:{type:"text",fieldId:n[k4e],dataId:(null==(t=n[_2e])?void 0:t[k4e])||n[k4e],class:["xfaTextfield"],style:i,"aria-label":m6e(n),"aria-required":!1}};return g6e(n)&&(s.attributes["aria-required"]=!0,s.attributes.required=!0),K4e.success({name:"label",attributes:{class:["xfaLabel"]},children:[s]})}}class X6e extends D3e{constructor(e){super(r6e,"decimal"),this.fracDigits=N4e({data:e.fracDigits,defaultValue:2,validate:e=>!0}),this.id=e.id||"",this.leadDigits=N4e({data:e.leadDigits,defaultValue:-1,validate:e=>!0}),this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[k2e](){const e=parseFloat(this[Q2e].trim());this[Q2e]=isNaN(e)?null:e}[_4e](e){return C6e(null!==this[Q2e]?this[Q2e].toString():"")}}class $6e extends _3e{constructor(e){super(r6e,"defaultUi",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}}class Z6e extends _3e{constructor(e){super(r6e,"desc",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new S3e,this.date=new S3e,this.dateTime=new S3e,this.decimal=new S3e,this.exData=new S3e,this.float=new S3e,this.image=new S3e,this.integer=new S3e,this.text=new S3e,this.time=new S3e}}class e8e extends F3e{constructor(e){super(r6e,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class t8e extends _3e{constructor(e){super(r6e,"digestMethods",!0),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.digestMethod=new S3e}}class i8e extends _3e{constructor(e){super(r6e,"draw",!0),this.anchorType=H4e(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=N4e({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.h=e.h?P4e(e.h):"",this.hAlign=H4e(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.locale=e.locale||"",this.maxH=P4e(e.maxH,"0pt"),this.maxW=P4e(e.maxW,"0pt"),this.minH=P4e(e.minH,"0pt"),this.minW=P4e(e.minW,"0pt"),this.name=e.name||"",this.presence=H4e(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=G4e(e.relevant),this.rotate=N4e({data:e.rotate,defaultValue:0,validate:e=>e%90==0}),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?P4e(e.w):"",this.x=P4e(e.x,"0pt"),this.y=P4e(e.y,"0pt"),this.assist=null,this.border=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.value=null,this.setProperty=new S3e}[b4e](e){h6e(this,e)}[_4e](e){if(p6e(this),"hidden"===this.presence||"inactive"===this.presence)return K4e.EMPTY;K3e(this),this[f4e]();const t=this.w,i=this.h,{w:n,h:s,isBroken:r}=O3e(this,e);if(n&&""===this.w){if(r&&this[q2e]()[s4e]())return this[p4e](),K4e.FAILURE;this.w=n}if(s&&""===this.h&&(this.h=s),I6e(this),!s6e(this,e))return this.w=t,this.h=i,this[p4e](),K4e.FAILURE;v6e(this);const a=Y3e(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");H3e(this,a),a.margin&&(a.padding=a.margin,delete a.margin);const o=["xfaDraw"];this.font&&o.push("xfaFont"),J3e(this)&&o.push("xfaPrintOnly");const l={style:a,id:this[k4e],class:o};this.name&&(l.xfaName=this.name);const A={name:"div",attributes:l,children:[]};f6e(this,l);const c=G3e(this,A,e),u=this.value?this.value[_4e](e).html:null;return null===u?(this.w=t,this.h=i,this[p4e](),K4e.success(V3e(this,A),c)):(A.children.push(u),X3e(this,a,u),this.w=t,this.h=i,this[p4e](),K4e.success(V3e(this,A),c))}}class n8e extends _3e{constructor(e){super(r6e,"edge",!0),this.cap=H4e(e.cap,["square","butt","round"]),this.id=e.id||"",this.presence=H4e(e.presence,["visible","hidden","inactive","invisible"]),this.stroke=H4e(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=P4e(e.thickness,"0.5pt"),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[x4e](){const e=Y3e(this,"visibility");if(Object.assign(e,{linecap:this.cap,width:L3e(this.thickness),color:this.color?this.color[x4e]():"#000000",style:""}),"visible"!==this.presence)e.style="none";else switch(this.stroke){case"solid":e.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":e.style="dashed";break;case"dotted":e.style="dotted";break;case"embossed":e.style="ridge";break;case"etched":e.style="groove";break;case"lowered":e.style="inset";break;case"raised":e.style="outset"}return e}}class s8e extends F3e{constructor(e){super(r6e,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class r8e extends _3e{constructor(e){super(r6e,"encodings",!0),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.encoding=new S3e}}class a8e extends _3e{constructor(e){super(r6e,"encrypt",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=null}}class o8e extends _3e{constructor(e){super(r6e,"encryptData",!0),this.id=e.id||"",this.operation=H4e(e.operation,["encrypt","decrypt"]),this.target=e.target||"",this.use=e.use||"",this.usehref=e.usehref||"",this.filter=null,this.manifest=null}}class l8e extends _3e{constructor(e){super(r6e,"encryption",!0),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=new S3e}}class A8e extends F3e{constructor(e){super(r6e,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class c8e extends _3e{constructor(e){super(r6e,"encryptionMethods",!0),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.encryptionMethod=new S3e}}let u8e=class extends _3e{constructor(e){super(r6e,"event",!0),this.activity=H4e(e.activity,["click","change","docClose","docReady","enter","exit","full","indexChange","initialize","mouseDown","mouseEnter","mouseExit","mouseUp","postExecute","postOpen","postPrint","postSave","postSign","postSubmit","preExecute","preOpen","prePrint","preSave","preSign","preSubmit","ready","validationState"]),this.id=e.id||"",this.listen=H4e(e.listen,["refOnly","refAndDescendents"]),this.name=e.name||"",this.ref=e.ref||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.encryptData=null,this.execute=null,this.script=null,this.signData=null,this.submit=null}};class h8e extends D3e{constructor(e){super(r6e,"exData"),this.contentType=e.contentType||"",this.href=e.href||"",this.id=e.id||"",this.maxLength=N4e({data:e.maxLength,defaultValue:-1,validate:e=>e>=-1}),this.name=e.name||"",this.rid=e.rid||"",this.transferEncoding=H4e(e.transferEncoding,["none","base64","package"]),this.use=e.use||"",this.usehref=e.usehref||""}[$2e](){return"text/html"===this.contentType}[u4e](e){return("text/html"===this.contentType&&e[l4e]===F4e.xhtml.id||"text/xml"===this.contentType)&&(this[Q2e]=e,!0)}[_4e](e){return"text/html"===this.contentType&&this[Q2e]?this[Q2e][_4e](e):K4e.EMPTY}}class d8e extends _3e{constructor(e){super(r6e,"exObject",!0),this.archive=e.archive||"",this.classId=e.classId||"",this.codeBase=e.codeBase||"",this.codeType=e.codeType||"",this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.boolean=new S3e,this.date=new S3e,this.dateTime=new S3e,this.decimal=new S3e,this.exData=new S3e,this.exObject=new S3e,this.float=new S3e,this.image=new S3e,this.integer=new S3e,this.text=new S3e,this.time=new S3e}}class g8e extends _3e{constructor(e){super(r6e,"exclGroup",!0),this.access=H4e(e.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=e.accessKey||"",this.anchorType=H4e(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=N4e({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.h=e.h?P4e(e.h):"",this.hAlign=H4e(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.layout=H4e(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.maxH=P4e(e.maxH,"0pt"),this.maxW=P4e(e.maxW,"0pt"),this.minH=P4e(e.minH,"0pt"),this.minW=P4e(e.minW,"0pt"),this.name=e.name||"",this.presence=H4e(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=G4e(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?P4e(e.w):"",this.x=P4e(e.x,"0pt"),this.y=P4e(e.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.margin=null,this.para=null,this.traversal=null,this.validate=null,this.connect=new S3e,this.event=new S3e,this.field=new S3e,this.setProperty=new S3e}[Z2e](){return!0}[j2e](){return!0}[b4e](e){for(const t of this.field.children){if(!t.value){const e=new Q9e({});t[I2e](e),t.value=e}t.value[b4e](e)}}[s4e](){return this.layout.endsWith("-tb")&&0===this[x2e].attempt&&this[x2e].numberInLine>0||this[Y2e]()[s4e]()}[n4e](){var e;const t=this[q2e]();return!!t[n4e]()&&(void 0!==this[x2e]._isSplittable?this[x2e]._isSplittable:"position"===this.layout||this.layout.includes("row")?(this[x2e]._isSplittable=!1,!1):(!(null==(e=t.layout)?void 0:e.endsWith("-tb"))||0===t[x2e].numberInLine)&&(this[x2e]._isSplittable=!0,!0))}[D2e](){return t6e(this)}[C2e](e,t){i6e(this,e,t)}[M2e](){return n6e(this)}[_4e](e){if(p6e(this),"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return K4e.EMPTY;K3e(this);const t=[],i={id:this[k4e],class:[]};j3e(this,i.class),this[x2e]||(this[x2e]=Object.create(null)),Object.assign(this[x2e],{children:t,attributes:i,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const n=this[n4e]();if(n||I6e(this),!s6e(this,e))return K4e.FAILURE;const s=new Set(["field"]);if(this.layout.includes("row")){const e=this[q2e]().columnWidths;Array.isArray(e)&&e.length>0&&(this[x2e].columnWidths=e,this[x2e].currentColumn=0)}const r=Y3e(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),a=["xfaExclgroup"],o=q3e(this);o&&a.push(o),J3e(this)&&a.push("xfaPrintOnly"),i.style=r,i.class=a,this.name&&(i.xfaName=this.name),this[f4e]();const l="lr-tb"===this.layout||"rl-tb"===this.layout,A=l?2:1;for(;this[x2e].attempt<A;this[x2e].attempt++){l&&1===this[x2e].attempt&&(this[x2e].numberInLine=0);const e=this[v2e]({filter:s,include:!0});if(e.success)break;if(e.isBreak())return this[p4e](),e;if(l&&0===this[x2e].attempt&&0===this[x2e].numberInLine&&!this[V2e]()[x2e].noLayoutFailure){this[x2e].attempt=A;break}}if(this[p4e](),n||v6e(this),this[x2e].attempt===A)return n||delete this[x2e],K4e.FAILURE;let c=0,u=0;this.margin&&(c=this.margin.leftInset+this.margin.rightInset,u=this.margin.topInset+this.margin.bottomInset);const h=Math.max(this[x2e].width+c,this.w||0),d=Math.max(this[x2e].height+u,this.h||0),g=[this.x,this.y,h,d];""===this.w&&(r.width=L3e(h)),""===this.h&&(r.height=L3e(d));const p={name:"div",attributes:i,children:t};return f6e(this,i),delete this[x2e],K4e.success(V3e(this,p),g)}}class p8e extends _3e{constructor(e){super(r6e,"execute"),this.connection=e.connection||"",this.executeType=H4e(e.executeType,["import","remerge"]),this.id=e.id||"",this.runAt=H4e(e.runAt,["client","both","server"]),this.use=e.use||"",this.usehref=e.usehref||""}}class f8e extends _3e{constructor(e){super(r6e,"extras",!0),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new S3e,this.date=new S3e,this.dateTime=new S3e,this.decimal=new S3e,this.exData=new S3e,this.extras=new S3e,this.float=new S3e,this.image=new S3e,this.integer=new S3e,this.text=new S3e,this.time=new S3e}}class m8e extends _3e{constructor(e){super(r6e,"field",!0),this.access=H4e(e.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=e.accessKey||"",this.anchorType=H4e(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=N4e({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.h=e.h?P4e(e.h):"",this.hAlign=H4e(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.locale=e.locale||"",this.maxH=P4e(e.maxH,"0pt"),this.maxW=P4e(e.maxW,"0pt"),this.minH=P4e(e.minH,"0pt"),this.minW=P4e(e.minW,"0pt"),this.name=e.name||"",this.presence=H4e(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=G4e(e.relevant),this.rotate=N4e({data:e.rotate,defaultValue:0,validate:e=>e%90==0}),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?P4e(e.w):"",this.x=P4e(e.x,"0pt"),this.y=P4e(e.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.format=null,this.items=new S3e(2),this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.validate=null,this.value=null,this.bindItems=new S3e,this.connect=new S3e,this.event=new S3e,this.setProperty=new S3e}[Z2e](){return!0}[b4e](e){h6e(this,e)}[_4e](e){var t,i,n;if(p6e(this),!this.ui){let e;switch(this.ui=new E9e({}),this.ui[W2e]=this[W2e],this[I2e](this.ui),this.items.children.length){case 0:e=new C9e({}),this.ui.textEdit=e;break;case 1:e=new O6e({}),this.ui.checkButton=e;break;case 2:e=new G6e({}),this.ui.choiceList=e}this.ui[I2e](e)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return K4e.EMPTY;this.caption&&delete this.caption[x2e],this[f4e]();const s=this.caption?this.caption[_4e](e).html:null,r=this.w,a=this.h;let o=0,l=0;this.margin&&(o=this.margin.leftInset+this.margin.rightInset,l=this.margin.topInset+this.margin.bottomInset);let A=null;if(""===this.w||""===this.h){let t=null,i=null,n=0,s=0;if(this.ui.checkButton)n=s=this.ui.checkButton.size;else{const{w:t,h:i}=O3e(this,e);null!==t?(n=t,s=i):s=function(e,t=!1){let i=null;if(e){const t=R4e(e.typeface),n=e[W2e].fontFinder.find(t);i=Y4e(e,n)}if(!i)return{lineHeight:12,lineGap:2,lineNoGap:10};const n=e.size||10,s=i.lineHeight?Math.max(t?0:1.2,i.lineHeight):1.2,r=void 0===i.lineGap?.2:i.lineGap;return{lineHeight:s*n,lineGap:r*n,lineNoGap:Math.max(1,s-r)*n}}(this.font,!0).lineNoGap}if(A=c6e(this.ui[H2e]()),n+=A.w,s+=A.h,this.caption){const{w:r,h:a,isBroken:o}=this.caption[H2e](e);if(o&&this[q2e]()[s4e]())return this[p4e](),K4e.FAILURE;switch(t=r,i=a,this.caption.placement){case"left":case"right":case"inline":t+=n;break;case"top":case"bottom":i+=s}}else t=n,i=s;t&&""===this.w&&(t+=o,this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1<t?t:this.minW)),i&&""===this.h&&(i+=l,this.h=Math.min(this.maxH<=0?1/0:this.maxH,this.minH+1<i?i:this.minH))}if(this[p4e](),K3e(this),I6e(this),!s6e(this,e))return this.w=r,this.h=a,this[p4e](),K4e.FAILURE;v6e(this);const c=Y3e(this,"font","dimensions","position","rotate","anchorType","presence","margin","hAlign");H3e(this,c);const u=["xfaField"];this.font&&u.push("xfaFont"),J3e(this)&&u.push("xfaPrintOnly");const h={style:c,id:this[k4e],class:u};c.margin&&(c.padding=c.margin,delete c.margin),j3e(this,u),this.name&&(h.xfaName=this.name);const d=[],g={name:"div",attributes:h,children:d};f6e(this,h);const p=this.border?this.border[x4e]():null,f=G3e(this,g,e),m=this.ui[_4e]().html;if(!m)return Object.assign(c,p),K4e.success(V3e(this,g),f);this[E4e]&&((null==(t=m.children)?void 0:t[0])?m.children[0].attributes.tabindex=this[E4e]:m.attributes.tabindex=this[E4e]),m.attributes.style||(m.attributes.style=Object.create(null));let C=null;if(this.ui.button?(1===m.children.length&&([C]=m.children.splice(0,1)),Object.assign(m.attributes.style,p)):Object.assign(c,p),d.push(m),this.value)if(this.ui.imageEdit)m.children.push(this.value[_4e]().html);else if(!this.ui.button){let e="";if(this.value.exData)e=this.value.exData[w4e]();else if(this.value.text)e=this.value.text[H2e]();else{const t=this.value[_4e]().html;null!==t&&(e=t.children[0].value)}this.ui.textEdit&&(null==(i=this.value.text)?void 0:i.maxChars)&&(m.children[0].attributes.maxLength=this.value.text.maxChars),e&&(this.ui.numericEdit&&(e=parseFloat(e),e=isNaN(e)?"":e.toString()),"textarea"===m.children[0].name?m.children[0].attributes.textContent=e:m.children[0].attributes.value=e)}if(!this.ui.imageEdit&&(null==(n=m.children)?void 0:n[0])&&this.h){A=A||c6e(this.ui[H2e]());let t=0;if(this.caption&&["top","bottom"].includes(this.caption.placement)){t=this.caption.reserve,t<=0&&(t=this.caption[H2e](e).h);const i=this.h-t-l-A.h;m.children[0].attributes.style.height=L3e(i)}else m.children[0].attributes.style.height="100%"}if(C&&m.children.push(C),!s)return m.attributes.class&&m.attributes.class.push("xfaLeft"),this.w=r,this.h=a,K4e.success(V3e(this,g),f);if(this.ui.button)return c.padding&&delete c.padding,"div"===s.name&&(s.name="span"),m.children.push(s),K4e.success(g,f);switch(this.ui.checkButton&&(s.attributes.class[0]="xfaCaptionForCheckButton"),m.attributes.class||(m.attributes.class=[]),m.children.splice(0,0,s),this.caption.placement){case"left":case"inline":m.attributes.class.push("xfaLeft");break;case"right":m.attributes.class.push("xfaRight");break;case"top":m.attributes.class.push("xfaTop");break;case"bottom":m.attributes.class.push("xfaBottom")}return this.w=r,this.h=a,K4e.success(V3e(this,g),f)}}class C8e extends _3e{constructor(e){super(r6e,"fill",!0),this.id=e.id||"",this.presence=H4e(e.presence,["visible","hidden","inactive","invisible"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null,this.linear=null,this.pattern=null,this.radial=null,this.solid=null,this.stipple=null}[x4e](){var e;const t=this[Y2e](),i=t[Y2e]()[Y2e](),n=Object.create(null);let s="color",r=s;t instanceof F6e&&(s="background-color",r="background",i instanceof E9e&&(n.backgroundColor="white")),(t instanceof t9e||t instanceof E6e)&&(s=r="fill",n.fill="white");for(const a of Object.getOwnPropertyNames(this)){if("extras"===a||"color"===a)continue;const e=this[a];if(!(e instanceof _3e))continue;const t=e[x4e](this.color);return t&&(n[t.startsWith("#")?s:r]=t),n}if(null==(e=this.color)?void 0:e.value){const e=this.color[x4e]();n[e.startsWith("#")?s:r]=e}return n}}class I8e extends _3e{constructor(e){super(r6e,"filter",!0),this.addRevocationInfo=H4e(e.addRevocationInfo,["","required","optional","none"]),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.version=N4e({data:this.version,defaultValue:5,validate:e=>e>=1&&e<=5}),this.appearanceFilter=null,this.certificates=null,this.digestMethods=null,this.encodings=null,this.encryptionMethods=null,this.handler=null,this.lockDocument=null,this.mdp=null,this.reasons=null,this.timeStamp=null}}class v8e extends D3e{constructor(e){super(r6e,"float"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[k2e](){const e=parseFloat(this[Q2e].trim());this[Q2e]=isNaN(e)?null:e}[_4e](e){return C6e(null!==this[Q2e]?this[Q2e].toString():"")}}class B8e extends _3e{constructor(e){super(r6e,"font",!0),this.baselineShift=P4e(e.baselineShift),this.fontHorizontalScale=L4e({data:e.fontHorizontalScale,defaultValue:100,validate:e=>e>=0}),this.fontVerticalScale=L4e({data:e.fontVerticalScale,defaultValue:100,validate:e=>e>=0}),this.id=e.id||"",this.kerningMode=H4e(e.kerningMode,["none","pair"]),this.letterSpacing=P4e(e.letterSpacing,"0"),this.lineThrough=N4e({data:e.lineThrough,defaultValue:0,validate:e=>1===e||2===e}),this.lineThroughPeriod=H4e(e.lineThroughPeriod,["all","word"]),this.overline=N4e({data:e.overline,defaultValue:0,validate:e=>1===e||2===e}),this.overlinePeriod=H4e(e.overlinePeriod,["all","word"]),this.posture=H4e(e.posture,["normal","italic"]),this.size=P4e(e.size,"10pt"),this.typeface=e.typeface||"Courier",this.underline=N4e({data:e.underline,defaultValue:0,validate:e=>1===e||2===e}),this.underlinePeriod=H4e(e.underlinePeriod,["all","word"]),this.use=e.use||"",this.usehref=e.usehref||"",this.weight=H4e(e.weight,["normal","bold"]),this.extras=null,this.fill=null}[B2e](e){super[B2e](e),this[W2e].usedTypefaces.add(this.typeface)}[x4e](){const e=Y3e(this,"fill"),t=e.color;return t&&("#000000"===t?delete e.color:t.startsWith("#")||(e.background=t,e.backgroundClip="text",e.color="transparent")),this.baselineShift&&(e.verticalAlign=L3e(this.baselineShift)),e.fontKerning="none"===this.kerningMode?"none":"normal",e.letterSpacing=L3e(this.letterSpacing),0!==this.lineThrough&&(e.textDecoration="line-through",2===this.lineThrough&&(e.textDecorationStyle="double")),0!==this.overline&&(e.textDecoration="overline",2===this.overline&&(e.textDecorationStyle="double")),e.fontStyle=this.posture,e.fontSize=L3e(.99*this.size),$3e(this,this,this[W2e].fontFinder,e),0!==this.underline&&(e.textDecoration="underline",2===this.underline&&(e.textDecorationStyle="double")),e.fontWeight=this.weight,e}}class y8e extends _3e{constructor(e){super(r6e,"format",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.picture=null}}class b8e extends T3e{constructor(e){super(r6e,"handler"),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class E8e extends _3e{constructor(e){super(r6e,"hyphenation"),this.excludeAllCaps=N4e({data:e.excludeAllCaps,defaultValue:0,validate:e=>1===e}),this.excludeInitialCap=N4e({data:e.excludeInitialCap,defaultValue:0,validate:e=>1===e}),this.hyphenate=N4e({data:e.hyphenate,defaultValue:0,validate:e=>1===e}),this.id=e.id||"",this.pushCharacterCount=N4e({data:e.pushCharacterCount,defaultValue:3,validate:e=>e>=0}),this.remainCharacterCount=N4e({data:e.remainCharacterCount,defaultValue:3,validate:e=>e>=0}),this.use=e.use||"",this.usehref=e.usehref||"",this.wordCharacterCount=N4e({data:e.wordCharacterCount,defaultValue:7,validate:e=>e>=0})}}let w8e=class extends T3e{constructor(e){super(r6e,"image"),this.aspect=H4e(e.aspect,["fit","actual","height","none","width"]),this.contentType=e.contentType||"",this.href=e.href||"",this.id=e.id||"",this.name=e.name||"",this.transferEncoding=H4e(e.transferEncoding,["base64","none","package"]),this.use=e.use||"",this.usehref=e.usehref||""}[_4e](){if(this.contentType&&!l6e.has(this.contentType.toLowerCase()))return K4e.EMPTY;let e=this[W2e].images&&this[W2e].images.get(this.href);if(!e&&(this.href||!this[Q2e]))return K4e.EMPTY;var t;if(e||"base64"!==this.transferEncoding||(t=this[Q2e],e=Uint8Array.fromBase64?Uint8Array.fromBase64(t):_Ve(atob(t))),!e)return K4e.EMPTY;if(!this.contentType){for(const[t,i]of A6e)if(e.length>t.length&&t.every(((t,i)=>t===e[i]))){this.contentType=i;break}if(!this.contentType)return K4e.EMPTY}const i=new Blob([e],{type:this.contentType});let n;switch(this.aspect){case"fit":case"actual":break;case"height":n={height:"100%",objectFit:"fill"};break;case"none":n={width:"100%",height:"100%",objectFit:"fill"};break;case"width":n={width:"100%",objectFit:"fill"}}const s=this[Y2e]();return K4e.success({name:"img",attributes:{class:["xfaImage"],style:n,src:URL.createObjectURL(i),alt:s?m6e(s[Y2e]()):null}})}};class Q8e extends _3e{constructor(e){super(r6e,"imageEdit",!0),this.data=H4e(e.data,["link","embed"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}[_4e](e){return"embed"===this.data?K4e.success({name:"div",children:[],attributes:{}}):K4e.EMPTY}}class _8e extends D3e{constructor(e){super(r6e,"integer"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[k2e](){const e=parseInt(this[Q2e].trim(),10);this[Q2e]=isNaN(e)?null:e}[_4e](e){return C6e(null!==this[Q2e]?this[Q2e].toString():"")}}class S8e extends _3e{constructor(e){super(r6e,"issuers",!0),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=new S3e}}class x8e extends _3e{constructor(e){super(r6e,"items",!0),this.id=e.id||"",this.name=e.name||"",this.presence=H4e(e.presence,["visible","hidden","inactive","invisible"]),this.ref=e.ref||"",this.save=N4e({data:e.save,defaultValue:0,validate:e=>1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new S3e,this.date=new S3e,this.dateTime=new S3e,this.decimal=new S3e,this.exData=new S3e,this.float=new S3e,this.image=new S3e,this.integer=new S3e,this.text=new S3e,this.time=new S3e}[_4e](){const e=[];for(const t of this[O2e]())e.push(t[w4e]());return K4e.success(e)}}class k8e extends _3e{constructor(e){super(r6e,"keep",!0),this.id=e.id||"";const t=["none","contentArea","pageArea"];this.intact=H4e(e.intact,t),this.next=H4e(e.next,t),this.previous=H4e(e.previous,t),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}}class D8e extends _3e{constructor(e){super(r6e,"keyUsage");const t=["","yes","no"];this.crlSign=H4e(e.crlSign,t),this.dataEncipherment=H4e(e.dataEncipherment,t),this.decipherOnly=H4e(e.decipherOnly,t),this.digitalSignature=H4e(e.digitalSignature,t),this.encipherOnly=H4e(e.encipherOnly,t),this.id=e.id||"",this.keyAgreement=H4e(e.keyAgreement,t),this.keyCertSign=H4e(e.keyCertSign,t),this.keyEncipherment=H4e(e.keyEncipherment,t),this.nonRepudiation=H4e(e.nonRepudiation,t),this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class F8e extends _3e{constructor(e){super(r6e,"line",!0),this.hand=H4e(e.hand,["even","left","right"]),this.id=e.id||"",this.slope=H4e(e.slope,["\\","/"]),this.use=e.use||"",this.usehref=e.usehref||"",this.edge=null}[_4e](){const e=this[Y2e]()[Y2e](),t=this.edge||new n8e({}),i=t[x4e](),n=Object.create(null),s="visible"===t.presence?t.thickness:0;let r,a,o,l;n.strokeWidth=L3e(s),n.stroke=i.color;let A="100%",c="100%";e.w<=s?([r,a,o,l]=["50%",0,"50%","100%"],A=n.strokeWidth):e.h<=s?([r,a,o,l]=[0,"50%","100%","50%"],c=n.strokeWidth):"\\"===this.slope?[r,a,o,l]=[0,0,"100%","100%"]:[r,a,o,l]=[0,"100%","100%",0];const u={name:"svg",children:[{name:"line",attributes:{xmlns:a6e,x1:r,y1:a,x2:o,y2:l,style:n}}],attributes:{xmlns:a6e,width:A,height:c,style:{overflow:"visible"}}};return u6e(e)?K4e.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[u]}):(u.attributes.style.position="absolute",K4e.success(u))}}class T8e extends _3e{constructor(e){super(r6e,"linear",!0),this.id=e.id||"",this.type=H4e(e.type,["toRight","toBottom","toLeft","toTop"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[x4e](e){e=e?e[x4e]():"#FFFFFF";return`linear-gradient(${this.type.replace(/([RBLT])/," $1").toLowerCase()}, ${e}, ${this.color?this.color[x4e]():"#000000"})`}}class M8e extends D3e{constructor(e){super(r6e,"lockDocument"),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}[k2e](){this[Q2e]=H4e(this[Q2e],["auto","0","1"])}}class R8e extends _3e{constructor(e){super(r6e,"manifest",!0),this.action=H4e(e.action,["include","all","exclude"]),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.ref=new S3e}}class N8e extends _3e{constructor(e){super(r6e,"margin",!0),this.bottomInset=P4e(e.bottomInset,"0"),this.id=e.id||"",this.leftInset=P4e(e.leftInset,"0"),this.rightInset=P4e(e.rightInset,"0"),this.topInset=P4e(e.topInset,"0"),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[x4e](){return{margin:L3e(this.topInset)+" "+L3e(this.rightInset)+" "+L3e(this.bottomInset)+" "+L3e(this.leftInset)}}}class L8e extends _3e{constructor(e){super(r6e,"mdp"),this.id=e.id||"",this.permissions=N4e({data:e.permissions,defaultValue:2,validate:e=>1===e||3===e}),this.signatureType=H4e(e.signatureType,["filler","author"]),this.use=e.use||"",this.usehref=e.usehref||""}}class U8e extends _3e{constructor(e){super(r6e,"medium"),this.id=e.id||"",this.imagingBBox=function(e){const t=-1;if(!e)return{x:t,y:t,width:t,height:t};const i=e.trim().split(/\s*,\s*/).map((e=>P4e(e,"-1")));if(i.length<4||i[2]<0||i[3]<0)return{x:t,y:t,width:t,height:t};const[n,s,r,a]=i;return{x:n,y:s,width:r,height:a}}(e.imagingBBox),this.long=P4e(e.long),this.orientation=H4e(e.orientation,["portrait","landscape"]),this.short=P4e(e.short),this.stock=e.stock||"",this.trayIn=H4e(e.trayIn,["auto","delegate","pageFront"]),this.trayOut=H4e(e.trayOut,["auto","delegate"]),this.use=e.use||"",this.usehref=e.usehref||""}}class H8e extends _3e{constructor(e){super(r6e,"message",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.text=new S3e}}class P8e extends _3e{constructor(e){super(r6e,"numericEdit",!0),this.hScrollPolicy=H4e(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[_4e](e){var t;const i=Y3e(this,"border","font","margin"),n=this[Y2e]()[Y2e](),s={name:"input",attributes:{type:"text",fieldId:n[k4e],dataId:(null==(t=n[_2e])?void 0:t[k4e])||n[k4e],class:["xfaTextfield"],style:i,"aria-label":m6e(n),"aria-required":!1}};return g6e(n)&&(s.attributes["aria-required"]=!0,s.attributes.required=!0),K4e.success({name:"label",attributes:{class:["xfaLabel"]},children:[s]})}}class O8e extends _3e{constructor(e){super(r6e,"occur",!0),this.id=e.id||"",this.initial=""!==e.initial?N4e({data:e.initial,defaultValue:"",validate:e=>!0}):"",this.max=""!==e.max?N4e({data:e.max,defaultValue:1,validate:e=>!0}):"",this.min=""!==e.min?N4e({data:e.min,defaultValue:1,validate:e=>!0}):"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[B2e](){const e=this[Y2e](),t=this.min;""===this.min&&(this.min=e instanceof Y8e||e instanceof V8e?0:1),""===this.max&&(this.max=""===t?e instanceof Y8e||e instanceof V8e?-1:1:this.min),-1!==this.max&&this.max<this.min&&(this.max=this.min),""===this.initial&&(this.initial=e instanceof f9e?1:this.min)}}class G8e extends T3e{constructor(e){super(r6e,"oid"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class K8e extends _3e{constructor(e){super(r6e,"oids",!0),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.oid=new S3e}}class q8e extends _3e{constructor(e){super(r6e,"overflow"),this.id=e.id||"",this.leader=e.leader||"",this.target=e.target||"",this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||""}[H2e](){if(!this[x2e]){const e=this[Y2e](),t=this[V2e](),i=t[v4e](this.target,e),n=t[v4e](this.leader,e),s=t[v4e](this.trailer,e);this[x2e]={target:(null==i?void 0:i[0])||null,leader:(null==n?void 0:n[0])||null,trailer:(null==s?void 0:s[0])||null,addLeader:!1,addTrailer:!1}}return this[x2e]}}class Y8e extends _3e{constructor(e){super(r6e,"pageArea",!0),this.blankOrNotBlank=H4e(e.blankOrNotBlank,["any","blank","notBlank"]),this.id=e.id||"",this.initialNumber=N4e({data:e.initialNumber,defaultValue:1,validate:e=>!0}),this.name=e.name||"",this.numbered=N4e({data:e.numbered,defaultValue:1,validate:e=>!0}),this.oddOrEven=H4e(e.oddOrEven,["any","even","odd"]),this.pagePosition=H4e(e.pagePosition,["any","first","last","only","rest"]),this.relevant=G4e(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.desc=null,this.extras=null,this.medium=null,this.occur=null,this.area=new S3e,this.contentArea=new S3e,this.draw=new S3e,this.exclGroup=new S3e,this.field=new S3e,this.subform=new S3e}[a4e](){return this[x2e]?!this.occur||-1===this.occur.max||this[x2e].numberOfUse<this.occur.max:(this[x2e]={numberOfUse:0},!0)}[y2e](){delete this[x2e]}[K2e](){this[x2e]||(this[x2e]={numberOfUse:0});const e=this[Y2e]();return"orderedOccurrence"===e.relation&&this[a4e]()?(this[x2e].numberOfUse+=1,this):e[K2e]()}[M2e](){return this[x2e].space||{width:0,height:0}}[_4e](){this[x2e]||(this[x2e]={numberOfUse:1});const e=[];this[x2e].children=e;const t=Object.create(null);if(this.medium&&this.medium.short&&this.medium.long&&(t.width=L3e(this.medium.short),t.height=L3e(this.medium.long),this[x2e].space={width:this.medium.short,height:this.medium.long},"landscape"===this.medium.orientation)){const e=t.width;t.width=t.height,t.height=e,this[x2e].space={width:this.medium.long,height:this.medium.short}}return this[v2e]({filter:new Set(["area","draw","field","subform"]),include:!0}),this[v2e]({filter:new Set(["contentArea"]),include:!0}),K4e.success({name:"div",children:e,attributes:{class:["xfaPage"],id:this[k4e],style:t,xfaName:this.name}})}}class V8e extends _3e{constructor(e){super(r6e,"pageSet",!0),this.duplexImposition=H4e(e.duplexImposition,["longEdge","shortEdge"]),this.id=e.id||"",this.name=e.name||"",this.relation=H4e(e.relation,["orderedOccurrence","duplexPaginated","simplexPaginated"]),this.relevant=G4e(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.occur=null,this.pageArea=new S3e,this.pageSet=new S3e}[y2e](){for(const e of this.pageArea.children)e[y2e]();for(const e of this.pageSet.children)e[y2e]()}[a4e](){return!this.occur||-1===this.occur.max||this[x2e].numberOfUse<this.occur.max}[K2e](){if(this[x2e]||(this[x2e]={numberOfUse:1,pageIndex:-1,pageSetIndex:-1}),"orderedOccurrence"===this.relation){if(this[x2e].pageIndex+1<this.pageArea.children.length){this[x2e].pageIndex+=1;return this.pageArea.children[this[x2e].pageIndex][K2e]()}if(this[x2e].pageSetIndex+1<this.pageSet.children.length)return this[x2e].pageSetIndex+=1,this.pageSet.children[this[x2e].pageSetIndex][K2e]();if(this[a4e]())return this[x2e].numberOfUse+=1,this[x2e].pageIndex=-1,this[x2e].pageSetIndex=-1,this[K2e]();const e=this[Y2e]();return e instanceof V8e?e[K2e]():(this[y2e](),this[K2e]())}const e=this[V2e]()[x2e].pageNumber,t=e%2==0?"even":"odd",i=0===e?"first":"rest";let n=this.pageArea.children.find((e=>e.oddOrEven===t&&e.pagePosition===i));return n||(n=this.pageArea.children.find((e=>"any"===e.oddOrEven&&e.pagePosition===i)),n||(n=this.pageArea.children.find((e=>"any"===e.oddOrEven&&"any"===e.pagePosition)),n||this.pageArea.children[0]))}}class W8e extends _3e{constructor(e){super(r6e,"para",!0),this.hAlign=H4e(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.lineHeight=e.lineHeight?P4e(e.lineHeight,"0pt"):"",this.marginLeft=e.marginLeft?P4e(e.marginLeft,"0pt"):"",this.marginRight=e.marginRight?P4e(e.marginRight,"0pt"):"",this.orphans=N4e({data:e.orphans,defaultValue:0,validate:e=>e>=0}),this.preserve=e.preserve||"",this.radixOffset=e.radixOffset?P4e(e.radixOffset,"0pt"):"",this.spaceAbove=e.spaceAbove?P4e(e.spaceAbove,"0pt"):"",this.spaceBelow=e.spaceBelow?P4e(e.spaceBelow,"0pt"):"",this.tabDefault=e.tabDefault?P4e(this.tabDefault):"",this.tabStops=(e.tabStops||"").trim().split(/\s+/).map(((e,t)=>t%2==1?P4e(e):e)),this.textIndent=e.textIndent?P4e(e.textIndent,"0pt"):"",this.use=e.use||"",this.usehref=e.usehref||"",this.vAlign=H4e(e.vAlign,["top","bottom","middle"]),this.widows=N4e({data:e.widows,defaultValue:0,validate:e=>e>=0}),this.hyphenation=null}[x4e](){const e=Y3e(this,"hAlign");return""!==this.marginLeft&&(e.paddingLeft=L3e(this.marginLeft)),""!==this.marginRight&&(e.paddingRight=L3e(this.marginRight)),""!==this.spaceAbove&&(e.paddingTop=L3e(this.spaceAbove)),""!==this.spaceBelow&&(e.paddingBottom=L3e(this.spaceBelow)),""!==this.textIndent&&(e.textIndent=L3e(this.textIndent),W3e(e)),this.lineHeight>0&&(e.lineHeight=L3e(this.lineHeight)),""!==this.tabDefault&&(e.tabSize=L3e(this.tabDefault)),this.tabStops.length,this.hyphenatation&&Object.assign(e,this.hyphenatation[x4e]()),e}}class j8e extends _3e{constructor(e){super(r6e,"passwordEdit",!0),this.hScrollPolicy=H4e(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.passwordChar=e.passwordChar||"*",this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}}class J8e extends _3e{constructor(e){super(r6e,"pattern",!0),this.id=e.id||"",this.type=H4e(e.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[x4e](e){e=e?e[x4e]():"#FFFFFF";const t=this.color?this.color[x4e]():"#000000",i="repeating-linear-gradient",n=`${e},${e} 5px,${t} 5px,${t} 10px`;switch(this.type){case"crossHatch":return`${i}(to top,${n}) ${i}(to right,${n})`;case"crossDiagonal":return`${i}(45deg,${n}) ${i}(-45deg,${n})`;case"diagonalLeft":return`${i}(45deg,${n})`;case"diagonalRight":return`${i}(-45deg,${n})`;case"horizontal":return`${i}(to top,${n})`;case"vertical":return`${i}(to right,${n})`}return""}}class z8e extends T3e{constructor(e){super(r6e,"picture"),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class X8e extends _3e{constructor(e){super(r6e,"proto",!0),this.appearanceFilter=new S3e,this.arc=new S3e,this.area=new S3e,this.assist=new S3e,this.barcode=new S3e,this.bindItems=new S3e,this.bookend=new S3e,this.boolean=new S3e,this.border=new S3e,this.break=new S3e,this.breakAfter=new S3e,this.breakBefore=new S3e,this.button=new S3e,this.calculate=new S3e,this.caption=new S3e,this.certificate=new S3e,this.certificates=new S3e,this.checkButton=new S3e,this.choiceList=new S3e,this.color=new S3e,this.comb=new S3e,this.connect=new S3e,this.contentArea=new S3e,this.corner=new S3e,this.date=new S3e,this.dateTime=new S3e,this.dateTimeEdit=new S3e,this.decimal=new S3e,this.defaultUi=new S3e,this.desc=new S3e,this.digestMethod=new S3e,this.digestMethods=new S3e,this.draw=new S3e,this.edge=new S3e,this.encoding=new S3e,this.encodings=new S3e,this.encrypt=new S3e,this.encryptData=new S3e,this.encryption=new S3e,this.encryptionMethod=new S3e,this.encryptionMethods=new S3e,this.event=new S3e,this.exData=new S3e,this.exObject=new S3e,this.exclGroup=new S3e,this.execute=new S3e,this.extras=new S3e,this.field=new S3e,this.fill=new S3e,this.filter=new S3e,this.float=new S3e,this.font=new S3e,this.format=new S3e,this.handler=new S3e,this.hyphenation=new S3e,this.image=new S3e,this.imageEdit=new S3e,this.integer=new S3e,this.issuers=new S3e,this.items=new S3e,this.keep=new S3e,this.keyUsage=new S3e,this.line=new S3e,this.linear=new S3e,this.lockDocument=new S3e,this.manifest=new S3e,this.margin=new S3e,this.mdp=new S3e,this.medium=new S3e,this.message=new S3e,this.numericEdit=new S3e,this.occur=new S3e,this.oid=new S3e,this.oids=new S3e,this.overflow=new S3e,this.pageArea=new S3e,this.pageSet=new S3e,this.para=new S3e,this.passwordEdit=new S3e,this.pattern=new S3e,this.picture=new S3e,this.radial=new S3e,this.reason=new S3e,this.reasons=new S3e,this.rectangle=new S3e,this.ref=new S3e,this.script=new S3e,this.setProperty=new S3e,this.signData=new S3e,this.signature=new S3e,this.signing=new S3e,this.solid=new S3e,this.speak=new S3e,this.stipple=new S3e,this.subform=new S3e,this.subformSet=new S3e,this.subjectDN=new S3e,this.subjectDNs=new S3e,this.submit=new S3e,this.text=new S3e,this.textEdit=new S3e,this.time=new S3e,this.timeStamp=new S3e,this.toolTip=new S3e,this.traversal=new S3e,this.traverse=new S3e,this.ui=new S3e,this.validate=new S3e,this.value=new S3e,this.variables=new S3e}}class $8e extends _3e{constructor(e){super(r6e,"radial",!0),this.id=e.id||"",this.type=H4e(e.type,["toEdge","toCenter"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[x4e](e){e=e?e[x4e]():"#FFFFFF";const t=this.color?this.color[x4e]():"#000000";return`radial-gradient(circle at center, ${"toEdge"===this.type?`${e},${t}`:`${t},${e}`})`}}class Z8e extends T3e{constructor(e){super(r6e,"reason"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class e9e extends _3e{constructor(e){super(r6e,"reasons",!0),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.reason=new S3e}}class t9e extends _3e{constructor(e){super(r6e,"rectangle",!0),this.hand=H4e(e.hand,["even","left","right"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.corner=new S3e(4),this.edge=new S3e(4),this.fill=null}[_4e](){var e;const t=this.edge.children.length?this.edge.children[0]:new n8e({}),i=t[x4e](),n=Object.create(null);"visible"===(null==(e=this.fill)?void 0:e.presence)?Object.assign(n,this.fill[x4e]()):n.fill="transparent",n.strokeWidth=L3e("visible"===t.presence?t.thickness:0),n.stroke=i.color;const s=(this.corner.children.length?this.corner.children[0]:new W6e({}))[x4e](),r={name:"svg",children:[{name:"rect",attributes:{xmlns:a6e,width:"100%",height:"100%",x:0,y:0,rx:s.radius,ry:s.radius,style:n}}],attributes:{xmlns:a6e,style:{overflow:"visible"},width:"100%",height:"100%"}};return u6e(this[Y2e]()[Y2e]())?K4e.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[r]}):(r.attributes.style.position="absolute",K4e.success(r))}}class i9e extends T3e{constructor(e){super(r6e,"ref"),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class n9e extends T3e{constructor(e){super(r6e,"script"),this.binding=e.binding||"",this.contentType=e.contentType||"",this.id=e.id||"",this.name=e.name||"",this.runAt=H4e(e.runAt,["client","both","server"]),this.use=e.use||"",this.usehref=e.usehref||""}}class s9e extends _3e{constructor(e){super(r6e,"setProperty"),this.connection=e.connection||"",this.ref=e.ref||"",this.target=e.target||""}}class r9e extends _3e{constructor(e){super(r6e,"signData",!0),this.id=e.id||"",this.operation=H4e(e.operation,["sign","clear","verify"]),this.ref=e.ref||"",this.target=e.target||"",this.use=e.use||"",this.usehref=e.usehref||"",this.filter=null,this.manifest=null}}class a9e extends _3e{constructor(e){super(r6e,"signature",!0),this.id=e.id||"",this.type=H4e(e.type,["PDF1.3","PDF1.6"]),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.filter=null,this.manifest=null,this.margin=null}}class o9e extends _3e{constructor(e){super(r6e,"signing",!0),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=new S3e}}class l9e extends _3e{constructor(e){super(r6e,"solid",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[x4e](e){return e?e[x4e]():"#FFFFFF"}}class A9e extends T3e{constructor(e){super(r6e,"speak"),this.disable=N4e({data:e.disable,defaultValue:0,validate:e=>1===e}),this.id=e.id||"",this.priority=H4e(e.priority,["custom","caption","name","toolTip"]),this.rid=e.rid||"",this.use=e.use||"",this.usehref=e.usehref||""}}class c9e extends _3e{constructor(e){super(r6e,"stipple",!0),this.id=e.id||"",this.rate=N4e({data:e.rate,defaultValue:50,validate:e=>e>=0&&e<=100}),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[x4e](e){const t=this.rate/100;return FVe.makeHexColor(Math.round(e.value.r*(1-t)+this.value.r*t),Math.round(e.value.g*(1-t)+this.value.g*t),Math.round(e.value.b*(1-t)+this.value.b*t))}}class u9e extends _3e{constructor(e){super(r6e,"subform",!0),this.access=H4e(e.access,["open","nonInteractive","protected","readOnly"]),this.allowMacro=N4e({data:e.allowMacro,defaultValue:0,validate:e=>1===e}),this.anchorType=H4e(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=N4e({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.columnWidths=(e.columnWidths||"").trim().split(/\s+/).map((e=>"-1"===e?-1:P4e(e))),this.h=e.h?P4e(e.h):"",this.hAlign=H4e(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.layout=H4e(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.locale=e.locale||"",this.maxH=P4e(e.maxH,"0pt"),this.maxW=P4e(e.maxW,"0pt"),this.mergeMode=H4e(e.mergeMode,["consumeData","matchTemplate"]),this.minH=P4e(e.minH,"0pt"),this.minW=P4e(e.minW,"0pt"),this.name=e.name||"",this.presence=H4e(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=G4e(e.relevant),this.restoreState=H4e(e.restoreState,["manual","auto"]),this.scope=H4e(e.scope,["name","none"]),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?P4e(e.w):"",this.x=P4e(e.x,"0pt"),this.y=P4e(e.y,"0pt"),this.assist=null,this.bind=null,this.bookend=null,this.border=null,this.break=null,this.calculate=null,this.desc=null,this.extras=null,this.keep=null,this.margin=null,this.occur=null,this.overflow=null,this.pageSet=null,this.para=null,this.traversal=null,this.validate=null,this.variables=null,this.area=new S3e,this.breakAfter=new S3e,this.breakBefore=new S3e,this.connect=new S3e,this.draw=new S3e,this.event=new S3e,this.exObject=new S3e,this.exclGroup=new S3e,this.field=new S3e,this.proto=new S3e,this.setProperty=new S3e,this.subform=new S3e,this.subformSet=new S3e}[q2e](){const e=this[Y2e]();return e instanceof h9e?e[q2e]():e}[Z2e](){return!0}[s4e](){return this.layout.endsWith("-tb")&&0===this[x2e].attempt&&this[x2e].numberInLine>0||this[Y2e]()[s4e]()}*[G2e](){yield*d6e(this)}[D2e](){return t6e(this)}[C2e](e,t){i6e(this,e,t)}[M2e](){return n6e(this)}[n4e](){var e;const t=this[q2e]();return!!t[n4e]()&&(void 0!==this[x2e]._isSplittable?this[x2e]._isSplittable:"position"===this.layout||this.layout.includes("row")||this.keep&&"none"!==this.keep.intact?(this[x2e]._isSplittable=!1,!1):(!(null==(e=t.layout)?void 0:e.endsWith("-tb"))||0===t[x2e].numberInLine)&&(this[x2e]._isSplittable=!0,!0))}[_4e](e){var t;if(p6e(this),this.break){if("auto"!==this.break.after||""!==this.break.afterTarget){const e=new M6e({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});e[W2e]=this[W2e],this[I2e](e),this.breakAfter.push(e)}if("auto"!==this.break.before||""!==this.break.beforeTarget){const e=new R6e({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});e[W2e]=this[W2e],this[I2e](e),this.breakBefore.push(e)}if(""!==this.break.overflowTarget){const e=new q8e({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});e[W2e]=this[W2e],this[I2e](e),this.overflow.push(e)}this[m4e](this.break),this.break=null}if("hidden"===this.presence||"inactive"===this.presence)return K4e.EMPTY;if(this.breakBefore.children.length>1||this.breakAfter.children.length,this.breakBefore.children.length>=1){const e=this.breakBefore.children[0];if(B6e(e))return K4e.breakNode(e)}if(null==(t=this[x2e])?void 0:t.afterBreakAfter)return K4e.EMPTY;K3e(this);const i=[],n={id:this[k4e],class:[]};j3e(this,n.class),this[x2e]||(this[x2e]=Object.create(null)),Object.assign(this[x2e],{children:i,line:null,attributes:n,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const s=this[V2e](),r=s[x2e].noLayoutFailure,a=this[n4e]();if(a||I6e(this),!s6e(this,e))return K4e.FAILURE;const o=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){const e=this[q2e]().columnWidths;Array.isArray(e)&&e.length>0&&(this[x2e].columnWidths=e,this[x2e].currentColumn=0)}const l=Y3e(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),A=["xfaSubform"],c=q3e(this);if(c&&A.push(c),n.style=l,n.class=A,this.name&&(n.xfaName=this.name),this.overflow){const t=this.overflow[H2e]();t.addLeader&&(t.addLeader=!1,y6e(this,t.leader,e))}this[f4e]();const u="lr-tb"===this.layout||"rl-tb"===this.layout,h=u?2:1;for(;this[x2e].attempt<h;this[x2e].attempt++){u&&1===this[x2e].attempt&&(this[x2e].numberInLine=0);const e=this[v2e]({filter:o,include:!0});if(e.success)break;if(e.isBreak())return this[p4e](),e;if(u&&0===this[x2e].attempt&&0===this[x2e].numberInLine&&!s[x2e].noLayoutFailure){this[x2e].attempt=h;break}}if(this[p4e](),a||v6e(this),s[x2e].noLayoutFailure=r,this[x2e].attempt===h)return this.overflow&&(this[V2e]()[x2e].overflowNode=this.overflow),a||delete this[x2e],K4e.FAILURE;if(this.overflow){const t=this.overflow[H2e]();t.addTrailer&&(t.addTrailer=!1,y6e(this,t.trailer,e))}let d=0,g=0;this.margin&&(d=this.margin.leftInset+this.margin.rightInset,g=this.margin.topInset+this.margin.bottomInset);const p=Math.max(this[x2e].width+d,this.w||0),f=Math.max(this[x2e].height+g,this.h||0),m=[this.x,this.y,p,f];if(""===this.w&&(l.width=L3e(p)),""===this.h&&(l.height=L3e(f)),("0px"===l.width||"0px"===l.height)&&0===i.length)return K4e.EMPTY;const C={name:"div",attributes:n,children:i};f6e(this,n);const I=K4e.success(V3e(this,C),m);if(this.breakAfter.children.length>=1){const e=this.breakAfter.children[0];if(B6e(e))return this[x2e].afterBreakAfter=I,K4e.breakNode(e)}return delete this[x2e],I}}class h9e extends _3e{constructor(e){super(r6e,"subformSet",!0),this.id=e.id||"",this.name=e.name||"",this.relation=H4e(e.relation,["ordered","choice","unordered"]),this.relevant=G4e(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.bookend=null,this.break=null,this.desc=null,this.extras=null,this.occur=null,this.overflow=null,this.breakAfter=new S3e,this.breakBefore=new S3e,this.subform=new S3e,this.subformSet=new S3e}*[G2e](){yield*d6e(this)}[q2e](){let e=this[Y2e]();for(;!(e instanceof u9e);)e=e[Y2e]();return e}[Z2e](){return!0}}class d9e extends D3e{constructor(e){super(r6e,"subjectDN"),this.delimiter=e.delimiter||",",this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[k2e](){this[Q2e]=new Map(this[Q2e].split(this.delimiter).map((e=>((e=e.split("=",2))[0]=e[0].trim(),e))))}}class g9e extends _3e{constructor(e){super(r6e,"subjectDNs",!0),this.id=e.id||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.subjectDN=new S3e}}class p9e extends _3e{constructor(e){super(r6e,"submit",!0),this.embedPDF=N4e({data:e.embedPDF,defaultValue:0,validate:e=>1===e}),this.format=H4e(e.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),this.id=e.id||"",this.target=e.target||"",this.textEncoding=U4e({data:e.textEncoding?e.textEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\d{2}/)}),this.use=e.use||"",this.usehref=e.usehref||"",this.xdpContent=e.xdpContent||"",this.encrypt=null,this.encryptData=new S3e,this.signData=new S3e}}class f9e extends _3e{constructor(e){super(r6e,"template",!0),this.baseProfile=H4e(e.baseProfile,["full","interactiveForms"]),this.extras=null,this.subform=new S3e}[k2e](){this.subform.children.length,this.subform.children.length,this[E4e]=5e3}[n4e](){return!0}[v4e](e,t){return e.startsWith("#")?[this[J2e].get(e.slice(1))]:a3e(this,t,e,!0,!0)}*[Q4e](){var e,t,i;if(!this.subform.children.length)return K4e.success({name:"div",children:[]});this[x2e]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};const n=this.subform.children[0];n.pageSet[y2e]();const s=n.pageSet.pageArea.children,r={name:"div",children:[]};let a=null,o=null,l=null;if(n.breakBefore.children.length>=1?(o=n.breakBefore.children[0],l=o.target):n.subform.children.length>=1&&n.subform.children[0].breakBefore.children.length>=1?(o=n.subform.children[0].breakBefore.children[0],l=o.target):(null==(e=n.break)?void 0:e.beforeTarget)?(o=n.break,l=o.beforeTarget):n.subform.children.length>=1&&(null==(t=n.subform.children[0].break)?void 0:t.beforeTarget)&&(o=n.subform.children[0].break,l=o.beforeTarget),o){const e=this[v4e](l,o[Y2e]());e instanceof Y8e&&(a=e,o[x2e]={})}a||(a=s[0]),a[x2e]={numberOfUse:1};const A=a[Y2e]();let c;A[x2e]={numberOfUse:1,pageIndex:A.pageArea.children.indexOf(a),pageSetIndex:0};let u=null,h=null,d=!0,g=0,p=0;for(;;){if(d)g=0;else if(r.children.pop(),3==++g)return r;c=null,this[x2e].currentPageArea=a;const e=a[_4e]().html;r.children.push(e),u&&(this[x2e].noLayoutFailure=!0,e.children.push(u[_4e](a[x2e].space).html),u=null),h&&(this[x2e].noLayoutFailure=!0,e.children.push(h[_4e](a[x2e].space).html),h=null);const t=a.contentArea.children,s=e.children.filter((e=>e.attributes.class.includes("xfaContentarea")));d=!1,this[x2e].firstUnsplittable=null,this[x2e].noLayoutFailure=!1;const o=e=>{var t;const i=n[D2e]();i&&(d||(d=(null==(t=i.children)?void 0:t.length)>0),s[e].children.push(i))};for(let a=p,l=t.length;a<l;a++){const e=this[x2e].currentContentArea=t[a],l={width:e.w,height:e.h};p=0,u&&(s[a].children.push(u[_4e](l).html),u=null),h&&(s[a].children.push(h[_4e](l).html),h=null);const A=n[_4e](l);if(A.success)return A.html?(d||(d=(null==(i=A.html.children)?void 0:i.length)>0),s[a].children.push(A.html)):!d&&r.children.length>1&&r.children.pop(),r;if(A.isBreak()){const e=A.breakNode;if(o(a),"auto"===e.targetType)continue;e.leader&&(u=this[v4e](e.leader,e[Y2e]()),u=u?u[0]:null),e.trailer&&(h=this[v4e](e.trailer,e[Y2e]()),h=h?h[0]:null),"pageArea"===e.targetType?(c=e[x2e].target,a=1/0):e[x2e].target?(c=e[x2e].target,p=e[x2e].index+1,a=1/0):a=e[x2e].index}else if(this[x2e].overflowNode){const e=this[x2e].overflowNode;this[x2e].overflowNode=null;const i=e[H2e](),n=i.target;i.addLeader=null!==i.leader,i.addTrailer=null!==i.trailer,o(a);const s=a;if(a=1/0,n instanceof Y8e)c=n;else if(n instanceof V6e){const e=t.indexOf(n);-1!==e?e>s?a=e-1:p=e:(c=n[Y2e](),p=c.contentArea.children.indexOf(n))}}else o(a)}this[x2e].pageNumber+=1,c&&(c[a4e]()?c[x2e].numberOfUse+=1:c=null),a=c||a[K2e](),yield null}}}class m9e extends D3e{constructor(e){super(r6e,"text"),this.id=e.id||"",this.maxChars=N4e({data:e.maxChars,defaultValue:0,validate:e=>e>=0}),this.name=e.name||"",this.rid=e.rid||"",this.use=e.use||"",this.usehref=e.usehref||""}[m2e](){return!0}[u4e](e){return e[l4e]===F4e.xhtml.id?(this[Q2e]=e,!0):(e[A4e],!1)}[d4e](e){this[Q2e]instanceof _3e||super[d4e](e)}[k2e](){"string"==typeof this[Q2e]&&(this[Q2e]=this[Q2e].replaceAll("\r\n","\n"))}[H2e](){return"string"==typeof this[Q2e]?this[Q2e].split(/[\u2029\u2028\n]/).reduce(((e,t)=>(t&&e.push(t),e)),[]).join("\n"):this[Q2e][w4e]()}[_4e](e){if("string"==typeof this[Q2e]){const e=C6e(this[Q2e]).html;return this[Q2e].includes("\u2029")?(e.name="div",e.children=[],this[Q2e].split("\u2029").map((e=>e.split(/[\u2028\n]/).reduce(((e,t)=>(e.push({name:"span",value:t},{name:"br"}),e)),[]))).forEach((t=>{e.children.push({name:"p",children:t})}))):/[\u2028\n]/.test(this[Q2e])&&(e.name="div",e.children=[],this[Q2e].split(/[\u2028\n]/).forEach((t=>{e.children.push({name:"span",value:t},{name:"br"})}))),K4e.success(e)}return this[Q2e][_4e](e)}}class C9e extends _3e{constructor(e){super(r6e,"textEdit",!0),this.allowRichText=N4e({data:e.allowRichText,defaultValue:0,validate:e=>1===e}),this.hScrollPolicy=H4e(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.multiLine=N4e({data:e.multiLine,defaultValue:"",validate:e=>0===e||1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.vScrollPolicy=H4e(e.vScrollPolicy,["auto","off","on"]),this.border=null,this.comb=null,this.extras=null,this.margin=null}[_4e](e){var t,i;const n=Y3e(this,"border","font","margin");let s;const r=this[Y2e]()[Y2e]();return""===this.multiLine&&(this.multiLine=r instanceof i8e?1:0),s=1===this.multiLine?{name:"textarea",attributes:{dataId:(null==(t=r[_2e])?void 0:t[k4e])||r[k4e],fieldId:r[k4e],class:["xfaTextfield"],style:n,"aria-label":m6e(r),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:(null==(i=r[_2e])?void 0:i[k4e])||r[k4e],fieldId:r[k4e],class:["xfaTextfield"],style:n,"aria-label":m6e(r),"aria-required":!1}},g6e(r)&&(s.attributes["aria-required"]=!0,s.attributes.required=!0),K4e.success({name:"label",attributes:{class:["xfaLabel"]},children:[s]})}}class I9e extends T3e{constructor(e){super(r6e,"time"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[k2e](){const e=this[Q2e].trim();this[Q2e]=e?new Date(e):null}[_4e](e){return C6e(this[Q2e]?this[Q2e].toString():"")}}class v9e extends _3e{constructor(e){super(r6e,"timeStamp"),this.id=e.id||"",this.server=e.server||"",this.type=H4e(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class B9e extends T3e{constructor(e){super(r6e,"toolTip"),this.id=e.id||"",this.rid=e.rid||"",this.use=e.use||"",this.usehref=e.usehref||""}}class y9e extends _3e{constructor(e){super(r6e,"traversal",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.traverse=new S3e}}class b9e extends _3e{constructor(e){super(r6e,"traverse",!0),this.id=e.id||"",this.operation=H4e(e.operation,["next","back","down","first","left","right","up"]),this.ref=e.ref||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.script=null}get name(){return this.operation}[r4e](){return!1}}class E9e extends _3e{constructor(e){super(r6e,"ui",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.picture=null,this.barcode=null,this.button=null,this.checkButton=null,this.choiceList=null,this.dateTimeEdit=null,this.defaultUi=null,this.imageEdit=null,this.numericEdit=null,this.passwordEdit=null,this.signature=null,this.textEdit=null}[H2e](){if(void 0===this[x2e]){for(const e of Object.getOwnPropertyNames(this)){if("extras"===e||"picture"===e)continue;const t=this[e];if(t instanceof _3e)return this[x2e]=t,t}this[x2e]=null}return this[x2e]}[_4e](e){const t=this[H2e]();return t?t[_4e](e):K4e.EMPTY}}class w9e extends _3e{constructor(e){super(r6e,"validate",!0),this.formatTest=H4e(e.formatTest,["warning","disabled","error"]),this.id=e.id||"",this.nullTest=H4e(e.nullTest,["disabled","error","warning"]),this.scriptTest=H4e(e.scriptTest,["error","disabled","warning"]),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.message=null,this.picture=null,this.script=null}}class Q9e extends _3e{constructor(e){super(r6e,"value",!0),this.id=e.id||"",this.override=N4e({data:e.override,defaultValue:0,validate:e=>1===e}),this.relevant=G4e(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.arc=null,this.boolean=null,this.date=null,this.dateTime=null,this.decimal=null,this.exData=null,this.float=null,this.image=null,this.integer=null,this.line=null,this.rectangle=null,this.text=null,this.time=null}[b4e](e){var t;const i=this[Y2e]();if(i instanceof m8e&&(null==(t=i.ui)?void 0:t.imageEdit))return this.image||(this.image=new w8e({}),this[I2e](this.image)),void(this.image[Q2e]=e[Q2e]);const n=e[A4e];if(null===this[n]){for(const e of Object.getOwnPropertyNames(this)){const t=this[e];t instanceof _3e&&(this[e]=null,this[m4e](t))}this[e[A4e]]=e,this[I2e](e)}else this[n][Q2e]=e[Q2e]}[w4e](){if(this.exData)return"string"==typeof this.exData[Q2e]?this.exData[Q2e].trim():this.exData[Q2e][w4e]().trim();for(const e of Object.getOwnPropertyNames(this)){if("image"===e)continue;const t=this[e];if(t instanceof _3e)return(t[Q2e]||"").toString().trim()}return null}[_4e](e){for(const t of Object.getOwnPropertyNames(this)){const i=this[t];if(i instanceof _3e)return i[_4e](e)}return K4e.EMPTY}}class _9e extends _3e{constructor(e){super(r6e,"variables",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new S3e,this.date=new S3e,this.dateTime=new S3e,this.decimal=new S3e,this.exData=new S3e,this.float=new S3e,this.image=new S3e,this.integer=new S3e,this.manifest=new S3e,this.script=new S3e,this.text=new S3e,this.time=new S3e}[r4e](){return!0}}class S9e{static[D4e](e,t){if(S9e.hasOwnProperty(e)){const i=S9e[e](t);return i[y4e](t),i}}static appearanceFilter(e){return new b6e(e)}static arc(e){return new E6e(e)}static area(e){return new w6e(e)}static assist(e){return new Q6e(e)}static barcode(e){return new _6e(e)}static bind(e){return new S6e(e)}static bindItems(e){return new x6e(e)}static bookend(e){return new k6e(e)}static boolean(e){return new D6e(e)}static border(e){return new F6e(e)}static break(e){return new T6e(e)}static breakAfter(e){return new M6e(e)}static breakBefore(e){return new R6e(e)}static button(e){return new N6e(e)}static calculate(e){return new L6e(e)}static caption(e){return new U6e(e)}static certificate(e){return new H6e(e)}static certificates(e){return new P6e(e)}static checkButton(e){return new O6e(e)}static choiceList(e){return new G6e(e)}static color(e){return new K6e(e)}static comb(e){return new q6e(e)}static connect(e){return new Y6e(e)}static contentArea(e){return new V6e(e)}static corner(e){return new W6e(e)}static date(e){return new j6e(e)}static dateTime(e){return new J6e(e)}static dateTimeEdit(e){return new z6e(e)}static decimal(e){return new X6e(e)}static defaultUi(e){return new $6e(e)}static desc(e){return new Z6e(e)}static digestMethod(e){return new e8e(e)}static digestMethods(e){return new t8e(e)}static draw(e){return new i8e(e)}static edge(e){return new n8e(e)}static encoding(e){return new s8e(e)}static encodings(e){return new r8e(e)}static encrypt(e){return new a8e(e)}static encryptData(e){return new o8e(e)}static encryption(e){return new l8e(e)}static encryptionMethod(e){return new A8e(e)}static encryptionMethods(e){return new c8e(e)}static event(e){return new u8e(e)}static exData(e){return new h8e(e)}static exObject(e){return new d8e(e)}static exclGroup(e){return new g8e(e)}static execute(e){return new p8e(e)}static extras(e){return new f8e(e)}static field(e){return new m8e(e)}static fill(e){return new C8e(e)}static filter(e){return new I8e(e)}static float(e){return new v8e(e)}static font(e){return new B8e(e)}static format(e){return new y8e(e)}static handler(e){return new b8e(e)}static hyphenation(e){return new E8e(e)}static image(e){return new w8e(e)}static imageEdit(e){return new Q8e(e)}static integer(e){return new _8e(e)}static issuers(e){return new S8e(e)}static items(e){return new x8e(e)}static keep(e){return new k8e(e)}static keyUsage(e){return new D8e(e)}static line(e){return new F8e(e)}static linear(e){return new T8e(e)}static lockDocument(e){return new M8e(e)}static manifest(e){return new R8e(e)}static margin(e){return new N8e(e)}static mdp(e){return new L8e(e)}static medium(e){return new U8e(e)}static message(e){return new H8e(e)}static numericEdit(e){return new P8e(e)}static occur(e){return new O8e(e)}static oid(e){return new G8e(e)}static oids(e){return new K8e(e)}static overflow(e){return new q8e(e)}static pageArea(e){return new Y8e(e)}static pageSet(e){return new V8e(e)}static para(e){return new W8e(e)}static passwordEdit(e){return new j8e(e)}static pattern(e){return new J8e(e)}static picture(e){return new z8e(e)}static proto(e){return new X8e(e)}static radial(e){return new $8e(e)}static reason(e){return new Z8e(e)}static reasons(e){return new e9e(e)}static rectangle(e){return new t9e(e)}static ref(e){return new i9e(e)}static script(e){return new n9e(e)}static setProperty(e){return new s9e(e)}static signData(e){return new r9e(e)}static signature(e){return new a9e(e)}static signing(e){return new o9e(e)}static solid(e){return new l9e(e)}static speak(e){return new A9e(e)}static stipple(e){return new c9e(e)}static subform(e){return new u9e(e)}static subformSet(e){return new h9e(e)}static subjectDN(e){return new d9e(e)}static subjectDNs(e){return new g9e(e)}static submit(e){return new p9e(e)}static template(e){return new f9e(e)}static text(e){return new m9e(e)}static textEdit(e){return new C9e(e)}static time(e){return new I9e(e)}static timeStamp(e){return new v9e(e)}static toolTip(e){return new B9e(e)}static traversal(e){return new y9e(e)}static traverse(e){return new b9e(e)}static ui(e){return new E9e(e)}static validate(e){return new w9e(e)}static value(e){return new Q9e(e)}static variables(e){return new _9e(e)}}const x9e=F4e.datasets.id;function k9e(e){const t=new m9e({});return t[Q2e]=e,t}class D9e{constructor(e){var t;this.root=e,this.datasets=e.datasets,this.data=(null==(t=e.datasets)?void 0:t.data)||new k3e(F4e.datasets.id,"data"),this.emptyMerge=0===this.data[O2e]().length,this.root.form=this.form=e.template[E2e]()}_isConsumeData(){return!this.emptyMerge&&this._mergeMode}_isMatchTemplate(){return!this._isConsumeData()}bind(){return this._bindElement(this.form,this.data),this.form}getData(){return this.data}_bindValue(e,t,i){var n,s;if(e[_2e]=t,e[j2e]())if(t[e4e]()){const i=t[U2e]();e[b4e](k9e(i))}else if(e instanceof m8e&&"multiSelect"===(null==(s=null==(n=e.ui)?void 0:n.choiceList)?void 0:s.open)){const i=t[O2e]().map((e=>e[Q2e].trim())).join("\n");e[b4e](k9e(i))}else this._isConsumeData();else t[e4e]()&&!this._isMatchTemplate()||this._bindElement(e,t)}_findDataByNameToConsume(e,t,i,n){if(!e)return null;let s,r;for(let a=0;a<3;a++){for(s=i[P2e](e,!1,!0);r=s.next().value,r;)if(t===r[e4e]())return r;if(i[l4e]===F4e.datasets.id&&"data"===i[A4e])break;i=i[Y2e]()}return n?(s=this.data[P2e](e,!0,!1),r=s.next().value,r||(s=this.data[F2e](e,!0),r=s.next().value,(null==r?void 0:r[e4e]())?r:null)):null}_setProperties(e,t){if(e.hasOwnProperty("setProperty"))for(const{ref:i,target:n,connection:s}of e.setProperty.children){if(s)continue;if(!i)continue;const r=a3e(this.root,t,i,!1,!1);if(!r)continue;const[a]=r;if(!a[t4e](this.data))continue;const o=a3e(this.root,e,n,!1,!1);if(!o)continue;const[l]=o;if(!l[t4e](e))continue;const A=l[Y2e]();if(l instanceof s9e||A instanceof s9e)continue;if(l instanceof x6e||A instanceof x6e)continue;const c=a[w4e](),u=l[A4e];if(l instanceof x3e){const e=Object.create(null);e[u]=c;const t=Reflect.construct(Object.getPrototypeOf(A).constructor,[e]);A[u]=t[u]}else l.hasOwnProperty(Q2e)&&(l[_2e]=a,l[Q2e]=c,l[k2e]())}}_bindItems(e,t){if(!e.hasOwnProperty("items")||!e.hasOwnProperty("bindItems")||e.bindItems.isEmpty())return;for(const s of e.items.children)e[m4e](s);e.items.clear();const i=new x8e({}),n=new x8e({});e[I2e](i),e.items.push(i),e[I2e](n),e.items.push(n);for(const{ref:s,labelRef:r,valueRef:a,connection:o}of e.bindItems.children){if(o)continue;if(!s)continue;const e=a3e(this.root,t,s,!1,!1);if(e)for(const t of e){if(!t[t4e](this.datasets))continue;const e=a3e(this.root,t,r,!0,!1);if(!e)continue;const[s]=e;if(!s[t4e](this.datasets))continue;const o=a3e(this.root,t,a,!0,!1);if(!o)continue;const[l]=o;if(!l[t4e](this.datasets))continue;const A=k9e(s[w4e]()),c=k9e(l[w4e]());i[I2e](A),i.text.push(A),n[I2e](c),n.text.push(c)}}}_bindOccurrences(e,t,i){let n;if(t.length>1&&(n=e[E2e](),n[m4e](n.occur),n.occur=null),this._bindValue(e,t[0],i),this._setProperties(e,t[0]),this._bindItems(e,t[0]),1===t.length)return;const s=e[Y2e](),r=e[A4e],a=s[z2e](e);for(let o=1,l=t.length;o<l;o++){const e=t[o],l=n[E2e]();s[r].push(l),s[X2e](a+o,l),this._bindValue(l,e,i),this._setProperties(l,e),this._bindItems(l,e)}}_createOccurrences(e){if(!this.emptyMerge)return;const{occur:t}=e;if(!t||t.initial<=1)return;const i=e[Y2e](),n=e[A4e];if(!(i[n]instanceof S3e))return;let s;s=e.name?i[n].children.filter((t=>t.name===e.name)).length:i[n].children.length;const r=i[z2e](e)+1,a=t.initial-s;if(a){const t=e[E2e]();t[m4e](t.occur),t.occur=null,i[n].push(t),i[X2e](r,t);for(let e=1;e<a;e++){const s=t[E2e]();i[n].push(s),i[X2e](r+e,s)}}}_getOccurInfo(e){const{name:t,occur:i}=e;if(!i||!t)return[1,1];const n=-1===i.max?1/0:i.max;return[i.min,n]}_setAndBind(e,t){this._setProperties(e,t),this._bindItems(e,t),this._bindElement(e,t)}_bindElement(e,t){const i=[];this._createOccurrences(e);for(const n of e[O2e]()){if(n[_2e])continue;if(void 0===this._mergeMode&&"subform"===n[A4e]){this._mergeMode="consumeData"===n.mergeMode;const e=t[O2e]();if(e.length>0)this._bindOccurrences(n,[e[0]],null);else if(this.emptyMerge){const e=t[l4e]===x9e?-1:t[l4e],i=n[_2e]=new k3e(e,n.name||"root");t[I2e](i),this._bindElement(n,i)}continue}if(!n[Z2e]())continue;let e=!1,s=null,r=null,a=null;if(n.bind){switch(n.bind.match){case"none":this._setAndBind(n,t);continue;case"global":e=!0;break;case"dataRef":if(!n.bind.ref){n[A4e],this._setAndBind(n,t);continue}r=n.bind.ref}n.bind.picture&&(s=n.bind.picture[Q2e])}const[o,l]=this._getOccurInfo(n);if(r){if(a=a3e(this.root,t,r,!0,!1),null===a){if(a=o3e(this.data,t,r),!a)continue;this._isConsumeData()&&(a[w2e]=!0),this._setAndBind(n,a);continue}this._isConsumeData()&&(a=a.filter((e=>!e[w2e]))),a.length>l?a=a.slice(0,l):0===a.length&&(a=null),a&&this._isConsumeData()&&a.forEach((e=>{e[w2e]=!0}))}else{if(!n.name){this._setAndBind(n,t);continue}if(this._isConsumeData()){const i=[];for(;i.length<l;){const s=this._findDataByNameToConsume(n.name,n[j2e](),t,e);if(!s)break;s[w2e]=!0,i.push(s)}a=i.length>0?i:null}else{if(a=t[P2e](n.name,!1,this.emptyMerge).next().value,!a){if(0===o){i.push(n);continue}const e=t[l4e]===x9e?-1:t[l4e];a=n[_2e]=new k3e(e,n.name),this.emptyMerge&&(a[w2e]=!0),t[I2e](a),this._setAndBind(n,a);continue}this.emptyMerge&&(a[w2e]=!0),a=[a]}}a?this._bindOccurrences(n,a,s):o>0?this._setAndBind(n,t):i.push(n)}i.forEach((e=>e[Y2e]()[m4e](e)))}}class F9e{constructor(e,t){this.data=t,this.dataset=e.datasets||null}serialize(e){const t=[[-1,this.data[O2e]()]];for(;t.length>0;){const i=t.at(-1),[n,s]=i;if(n+1===s.length){t.pop();continue}const r=s[++i[0]],a=e.get(r[k4e]);if(a)r[b4e](a);else{const t=r[T2e]();for(const i of t.values()){const t=e.get(i[k4e]);if(t){i[b4e](t);break}}}const o=r[O2e]();o.length>0&&t.push([-1,o])}const i=['<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">'];if(this.dataset)for(const n of this.dataset[O2e]())"data"!==n[A4e]&&n[S4e](i);return this.data[S4e](i),i.push("</xfa:datasets>"),i.join("")}}const T9e=F4e.config.id;class M9e extends _3e{constructor(e){super(T9e,"acrobat",!0),this.acrobat7=null,this.autoSave=null,this.common=null,this.validate=null,this.validateApprovalSignatures=null,this.submitUrl=new S3e}}class R9e extends _3e{constructor(e){super(T9e,"acrobat7",!0),this.dynamicRender=null}}class N9e extends F3e{constructor(e){super(T9e,"ADBE_JSConsole",["delegate","Enable","Disable"])}}class L9e extends F3e{constructor(e){super(T9e,"ADBE_JSDebugger",["delegate","Enable","Disable"])}}class U9e extends R3e{constructor(e){super(T9e,"addSilentPrint")}}class H9e extends R3e{constructor(e){super(T9e,"addViewerPreferences")}}class P9e extends N3e{constructor(e){super(T9e,"adjustData")}}class O9e extends M3e{constructor(e){super(T9e,"adobeExtensionLevel",0,(e=>e>=1&&e<=8))}}class G9e extends _3e{constructor(e){super(T9e,"agent",!0),this.name=e.name?e.name.trim():"",this.common=new S3e}}class K9e extends D3e{constructor(e){super(T9e,"alwaysEmbed")}}class q9e extends T3e{constructor(e){super(T9e,"amd")}}class Y9e extends _3e{constructor(e){super(T9e,"area"),this.level=N4e({data:e.level,defaultValue:0,validate:e=>e>=1&&e<=3}),this.name=H4e(e.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}}class V9e extends F3e{constructor(e){super(T9e,"attributes",["preserve","delegate","ignore"])}}class W9e extends F3e{constructor(e){super(T9e,"autoSave",["disabled","enabled"])}}class j9e extends T3e{constructor(e){super(T9e,"base")}}class J9e extends _3e{constructor(e){super(T9e,"batchOutput"),this.format=H4e(e.format,["none","concat","zip","zipCompress"])}}class z9e extends D3e{constructor(e){super(T9e,"behaviorOverride")}[k2e](){this[Q2e]=new Map(this[Q2e].trim().split(/\s+/).filter((e=>e.includes(":"))).map((e=>e.split(":",2))))}}class X9e extends _3e{constructor(e){super(T9e,"cache",!0),this.templateCache=null}}class $9e extends R3e{constructor(e){super(T9e,"change")}}class Z9e extends _3e{constructor(e){super(T9e,"common",!0),this.data=null,this.locale=null,this.localeSet=null,this.messaging=null,this.suppressBanner=null,this.template=null,this.validationMessaging=null,this.versionControl=null,this.log=new S3e}}class e5e extends _3e{constructor(e){super(T9e,"compress"),this.scope=H4e(e.scope,["imageOnly","document"])}}class t5e extends R3e{constructor(e){super(T9e,"compressLogicalStructure")}}class i5e extends N3e{constructor(e){super(T9e,"compressObjectStream")}}class n5e extends _3e{constructor(e){super(T9e,"compression",!0),this.compressLogicalStructure=null,this.compressObjectStream=null,this.level=null,this.type=null}}class s5e extends _3e{constructor(e){super(T9e,"config",!0),this.acrobat=null,this.present=null,this.trace=null,this.agent=new S3e}}class r5e extends F3e{constructor(e){super(T9e,"conformance",["A","B"])}}class a5e extends R3e{constructor(e){super(T9e,"contentCopy")}}class o5e extends M3e{constructor(e){super(T9e,"copies",1,(e=>e>=1))}}class l5e extends T3e{constructor(e){super(T9e,"creator")}}class A5e extends M3e{constructor(e){super(T9e,"currentPage",0,(e=>e>=0))}}class c5e extends _3e{constructor(e){super(T9e,"data",!0),this.adjustData=null,this.attributes=null,this.incrementalLoad=null,this.outputXSL=null,this.range=null,this.record=null,this.startNode=null,this.uri=null,this.window=null,this.xsl=null,this.excludeNS=new S3e,this.transform=new S3e}}class u5e extends _3e{constructor(e){super(T9e,"debug",!0),this.uri=null}}class h5e extends D3e{constructor(e){super(T9e,"defaultTypeface"),this.writingScript=H4e(e.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}}class d5e extends F3e{constructor(e){super(T9e,"destination",["pdf","pcl","ps","webClient","zpl"])}}class g5e extends R3e{constructor(e){super(T9e,"documentAssembly")}}class p5e extends _3e{constructor(e){super(T9e,"driver",!0),this.name=e.name?e.name.trim():"",this.fontInfo=null,this.xdc=null}}class f5e extends F3e{constructor(e){super(T9e,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}}class m5e extends F3e{constructor(e){super(T9e,"dynamicRender",["forbidden","required"])}}class C5e extends R3e{constructor(e){super(T9e,"embed")}}class I5e extends R3e{constructor(e){super(T9e,"encrypt")}}class v5e extends _3e{constructor(e){super(T9e,"encryption",!0),this.encrypt=null,this.encryptionLevel=null,this.permissions=null}}class B5e extends F3e{constructor(e){super(T9e,"encryptionLevel",["40bit","128bit"])}}class y5e extends T3e{constructor(e){super(T9e,"enforce")}}class b5e extends _3e{constructor(e){super(T9e,"equate"),this.force=N4e({data:e.force,defaultValue:1,validate:e=>0===e}),this.from=e.from||"",this.to=e.to||""}}class E5e extends _3e{constructor(e){super(T9e,"equateRange"),this.from=e.from||"",this.to=e.to||"",this._unicodeRange=e.unicodeRange||""}get unicodeRange(){const e=[],t=/U\+([0-9a-fA-F]+)/,i=this._unicodeRange;for(let n of i.split(",").map((e=>e.trim())).filter((e=>!!e)))n=n.split("-",2).map((e=>{const i=e.match(t);return i?parseInt(i[1],16):0})),1===n.length&&n.push(n[0]),e.push(n);return mVe(this,"unicodeRange",e)}}class w5e extends D3e{constructor(e){super(T9e,"exclude")}[k2e](){this[Q2e]=this[Q2e].trim().split(/\s+/).filter((e=>e&&["calculate","close","enter","exit","initialize","ready","validate"].includes(e)))}}class Q5e extends T3e{constructor(e){super(T9e,"excludeNS")}}class _5e extends F3e{constructor(e){super(T9e,"flipLabel",["usePrinterSetting","on","off"])}}class S5e extends _3e{constructor(e){super(T9e,"fontInfo",!0),this.embed=null,this.map=null,this.subsetBelow=null,this.alwaysEmbed=new S3e,this.defaultTypeface=new S3e,this.neverEmbed=new S3e}}class x5e extends R3e{constructor(e){super(T9e,"formFieldFilling")}}class k5e extends T3e{constructor(e){super(T9e,"groupParent")}}class D5e extends F3e{constructor(e){super(T9e,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}}class F5e extends T3e{constructor(e){super(T9e,"includeXDPContent")}}class T5e extends F3e{constructor(e){super(T9e,"incrementalLoad",["none","forwardOnly"])}}class M5e extends R3e{constructor(e){super(T9e,"incrementalMerge")}}class R5e extends R3e{constructor(e){super(T9e,"interactive")}}class N5e extends F3e{constructor(e){super(T9e,"jog",["usePrinterSetting","none","pageSet"])}}class L5e extends _3e{constructor(e){super(T9e,"labelPrinter",!0),this.name=H4e(e.name,["zpl","dpl","ipl","tcpl"]),this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class U5e extends F3e{constructor(e){super(T9e,"layout",["paginate","panel"])}}class H5e extends M3e{constructor(e){super(T9e,"level",0,(e=>e>0))}}class P5e extends R3e{constructor(e){super(T9e,"linearized")}}class O5e extends T3e{constructor(e){super(T9e,"locale")}}class G5e extends T3e{constructor(e){super(T9e,"localeSet")}}class K5e extends _3e{constructor(e){super(T9e,"log",!0),this.mode=null,this.threshold=null,this.to=null,this.uri=null}}class q5e extends _3e{constructor(e){super(T9e,"map",!0),this.equate=new S3e,this.equateRange=new S3e}}class Y5e extends _3e{constructor(e){super(T9e,"mediumInfo",!0),this.map=null}}class V5e extends _3e{constructor(e){super(T9e,"message",!0),this.msgId=null,this.severity=null}}class W5e extends _3e{constructor(e){super(T9e,"messaging",!0),this.message=new S3e}}class j5e extends F3e{constructor(e){super(T9e,"mode",["append","overwrite"])}}class J5e extends R3e{constructor(e){super(T9e,"modifyAnnots")}}class z5e extends M3e{constructor(e){super(T9e,"msgId",1,(e=>e>=1))}}class X5e extends T3e{constructor(e){super(T9e,"nameAttr")}}class $5e extends D3e{constructor(e){super(T9e,"neverEmbed")}}class Z5e extends M3e{constructor(e){super(T9e,"numberOfCopies",null,(e=>e>=2&&e<=5))}}class e7e extends _3e{constructor(e){super(T9e,"openAction",!0),this.destination=null}}class t7e extends _3e{constructor(e){super(T9e,"output",!0),this.to=null,this.type=null,this.uri=null}}class i7e extends T3e{constructor(e){super(T9e,"outputBin")}}class n7e extends _3e{constructor(e){super(T9e,"outputXSL",!0),this.uri=null}}class s7e extends F3e{constructor(e){super(T9e,"overprint",["none","both","draw","field"])}}class r7e extends T3e{constructor(e){super(T9e,"packets")}[k2e](){"*"!==this[Q2e]&&(this[Q2e]=this[Q2e].trim().split(/\s+/).filter((e=>["config","datasets","template","xfdf","xslt"].includes(e))))}}class a7e extends _3e{constructor(e){super(T9e,"pageOffset"),this.x=N4e({data:e.x,defaultValue:"useXDCSetting",validate:e=>!0}),this.y=N4e({data:e.y,defaultValue:"useXDCSetting",validate:e=>!0})}}class o7e extends T3e{constructor(e){super(T9e,"pageRange")}[k2e](){const e=this[Q2e].trim().split(/\s+/).map((e=>parseInt(e,10))),t=[];for(let i=0,n=e.length;i<n;i+=2)t.push(e.slice(i,i+2));this[Q2e]=t}}class l7e extends F3e{constructor(e){super(T9e,"pagination",["simplex","duplexShortEdge","duplexLongEdge"])}}class A7e extends F3e{constructor(e){super(T9e,"paginationOverride",["none","forceDuplex","forceDuplexLongEdge","forceDuplexShortEdge","forceSimplex"])}}class c7e extends M3e{constructor(e){super(T9e,"part",1,(e=>!1))}}class u7e extends _3e{constructor(e){super(T9e,"pcl",!0),this.name=e.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.pageOffset=null,this.staple=null,this.xdc=null}}class h7e extends _3e{constructor(e){super(T9e,"pdf",!0),this.name=e.name||"",this.adobeExtensionLevel=null,this.batchOutput=null,this.compression=null,this.creator=null,this.encryption=null,this.fontInfo=null,this.interactive=null,this.linearized=null,this.openAction=null,this.pdfa=null,this.producer=null,this.renderPolicy=null,this.scriptModel=null,this.silentPrint=null,this.submitFormat=null,this.tagged=null,this.version=null,this.viewerPreferences=null,this.xdc=null}}class d7e extends _3e{constructor(e){super(T9e,"pdfa",!0),this.amd=null,this.conformance=null,this.includeXDPContent=null,this.part=null}}class g7e extends _3e{constructor(e){super(T9e,"permissions",!0),this.accessibleContent=null,this.change=null,this.contentCopy=null,this.documentAssembly=null,this.formFieldFilling=null,this.modifyAnnots=null,this.plaintextMetadata=null,this.print=null,this.printHighQuality=null}}class p7e extends R3e{constructor(e){super(T9e,"pickTrayByPDFSize")}}class f7e extends T3e{constructor(e){super(T9e,"picture")}}class m7e extends R3e{constructor(e){super(T9e,"plaintextMetadata")}}class C7e extends F3e{constructor(e){super(T9e,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}}class I7e extends _3e{constructor(e){super(T9e,"present",!0),this.behaviorOverride=null,this.cache=null,this.common=null,this.copies=null,this.destination=null,this.incrementalMerge=null,this.layout=null,this.output=null,this.overprint=null,this.pagination=null,this.paginationOverride=null,this.script=null,this.validate=null,this.xdp=null,this.driver=new S3e,this.labelPrinter=new S3e,this.pcl=new S3e,this.pdf=new S3e,this.ps=new S3e,this.submitUrl=new S3e,this.webClient=new S3e,this.zpl=new S3e}}class v7e extends R3e{constructor(e){super(T9e,"print")}}class B7e extends R3e{constructor(e){super(T9e,"printHighQuality")}}class y7e extends F3e{constructor(e){super(T9e,"printScaling",["appdefault","noScaling"])}}class b7e extends T3e{constructor(e){super(T9e,"printerName")}}class E7e extends T3e{constructor(e){super(T9e,"producer")}}class w7e extends _3e{constructor(e){super(T9e,"ps",!0),this.name=e.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.staple=null,this.xdc=null}}let Q7e=class extends D3e{constructor(e){super(T9e,"range")}[k2e](){this[Q2e]=this[Q2e].trim().split(/\s*,\s*/,2).map((e=>e.split("-").map((e=>parseInt(e.trim(),10))))).filter((e=>e.every((e=>!isNaN(e))))).map((e=>(1===e.length&&e.push(e[0]),e)))}};class _7e extends D3e{constructor(e){super(T9e,"record")}[k2e](){this[Q2e]=this[Q2e].trim();const e=parseInt(this[Q2e],10);!isNaN(e)&&e>=0&&(this[Q2e]=e)}}class S7e extends D3e{constructor(e){super(T9e,"relevant")}[k2e](){this[Q2e]=this[Q2e].trim().split(/\s+/)}}class x7e extends D3e{constructor(e){super(T9e,"rename")}[k2e](){this[Q2e]=this[Q2e].trim(),this[Q2e].toLowerCase().startsWith("xml")||new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*","u").test(this[Q2e])}}class k7e extends F3e{constructor(e){super(T9e,"renderPolicy",["server","client"])}}class D7e extends F3e{constructor(e){super(T9e,"runScripts",["both","client","none","server"])}}class F7e extends _3e{constructor(e){super(T9e,"script",!0),this.currentPage=null,this.exclude=null,this.runScripts=null}}class T7e extends F3e{constructor(e){super(T9e,"scriptModel",["XFA","none"])}}class M7e extends F3e{constructor(e){super(T9e,"severity",["ignore","error","information","trace","warning"])}}class R7e extends _3e{constructor(e){super(T9e,"silentPrint",!0),this.addSilentPrint=null,this.printerName=null}}class N7e extends _3e{constructor(e){super(T9e,"staple"),this.mode=H4e(e.mode,["usePrinterSetting","on","off"])}}class L7e extends T3e{constructor(e){super(T9e,"startNode")}}class U7e extends M3e{constructor(e){super(T9e,"startPage",0,(e=>!0))}}class H7e extends F3e{constructor(e){super(T9e,"submitFormat",["html","delegate","fdf","xml","pdf"])}}class P7e extends T3e{constructor(e){super(T9e,"submitUrl")}}class O7e extends M3e{constructor(e){super(T9e,"subsetBelow",100,(e=>e>=0&&e<=100))}}class G7e extends R3e{constructor(e){super(T9e,"suppressBanner")}}class K7e extends R3e{constructor(e){super(T9e,"tagged")}}class q7e extends _3e{constructor(e){super(T9e,"template",!0),this.base=null,this.relevant=null,this.startPage=null,this.uri=null,this.xsl=null}}class Y7e extends F3e{constructor(e){super(T9e,"threshold",["trace","error","information","warning"])}}class V7e extends F3e{constructor(e){super(T9e,"to",["null","memory","stderr","stdout","system","uri"])}}class W7e extends _3e{constructor(e){super(T9e,"templateCache"),this.maxEntries=N4e({data:e.maxEntries,defaultValue:5,validate:e=>e>=0})}}class j7e extends _3e{constructor(e){super(T9e,"trace",!0),this.area=new S3e}}class J7e extends _3e{constructor(e){super(T9e,"transform",!0),this.groupParent=null,this.ifEmpty=null,this.nameAttr=null,this.picture=null,this.presence=null,this.rename=null,this.whitespace=null}}class z7e extends F3e{constructor(e){super(T9e,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}}class X7e extends T3e{constructor(e){super(T9e,"uri")}}class $7e extends F3e{constructor(e){super(T9e,"validate",["preSubmit","prePrint","preExecute","preSave"])}}class Z7e extends D3e{constructor(e){super(T9e,"validateApprovalSignatures")}[k2e](){this[Q2e]=this[Q2e].trim().split(/\s+/).filter((e=>["docReady","postSign"].includes(e)))}}class eet extends F3e{constructor(e){super(T9e,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}}class tet extends F3e{constructor(e){super(T9e,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}}class iet extends _3e{constructor(e){super(T9e,"VersionControl"),this.outputBelow=H4e(e.outputBelow,["warn","error","update"]),this.sourceAbove=H4e(e.sourceAbove,["warn","error"]),this.sourceBelow=H4e(e.sourceBelow,["update","maintain"])}}class net extends _3e{constructor(e){super(T9e,"viewerPreferences",!0),this.ADBE_JSConsole=null,this.ADBE_JSDebugger=null,this.addViewerPreferences=null,this.duplexOption=null,this.enforce=null,this.numberOfCopies=null,this.pageRange=null,this.pickTrayByPDFSize=null,this.printScaling=null}}class set extends _3e{constructor(e){super(T9e,"webClient",!0),this.name=e.name?e.name.trim():"",this.fontInfo=null,this.xdc=null}}class ret extends F3e{constructor(e){super(T9e,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}}let aet=class extends D3e{constructor(e){super(T9e,"window")}[k2e](){const e=this[Q2e].trim().split(/\s*,\s*/,2).map((e=>parseInt(e,10)));e.some((e=>isNaN(e)))?this[Q2e]=[0,0]:(1===e.length&&e.push(e[0]),this[Q2e]=e)}};class oet extends _3e{constructor(e){super(T9e,"xdc",!0),this.uri=new S3e,this.xsl=new S3e}}class Aet extends _3e{constructor(e){super(T9e,"xdp",!0),this.packets=null}}class cet extends _3e{constructor(e){super(T9e,"xsl",!0),this.debug=null,this.uri=null}}class uet extends _3e{constructor(e){super(T9e,"zpl",!0),this.name=e.name?e.name.trim():"",this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class het{static[D4e](e,t){if(het.hasOwnProperty(e))return het[e](t)}static acrobat(e){return new M9e(e)}static acrobat7(e){return new R9e(e)}static ADBE_JSConsole(e){return new N9e(e)}static ADBE_JSDebugger(e){return new L9e(e)}static addSilentPrint(e){return new U9e(e)}static addViewerPreferences(e){return new H9e(e)}static adjustData(e){return new P9e(e)}static adobeExtensionLevel(e){return new O9e(e)}static agent(e){return new G9e(e)}static alwaysEmbed(e){return new K9e(e)}static amd(e){return new q9e(e)}static area(e){return new Y9e(e)}static attributes(e){return new V9e(e)}static autoSave(e){return new W9e(e)}static base(e){return new j9e(e)}static batchOutput(e){return new J9e(e)}static behaviorOverride(e){return new z9e(e)}static cache(e){return new X9e(e)}static change(e){return new $9e(e)}static common(e){return new Z9e(e)}static compress(e){return new e5e(e)}static compressLogicalStructure(e){return new t5e(e)}static compressObjectStream(e){return new i5e(e)}static compression(e){return new n5e(e)}static config(e){return new s5e(e)}static conformance(e){return new r5e(e)}static contentCopy(e){return new a5e(e)}static copies(e){return new o5e(e)}static creator(e){return new l5e(e)}static currentPage(e){return new A5e(e)}static data(e){return new c5e(e)}static debug(e){return new u5e(e)}static defaultTypeface(e){return new h5e(e)}static destination(e){return new d5e(e)}static documentAssembly(e){return new g5e(e)}static driver(e){return new p5e(e)}static duplexOption(e){return new f5e(e)}static dynamicRender(e){return new m5e(e)}static embed(e){return new C5e(e)}static encrypt(e){return new I5e(e)}static encryption(e){return new v5e(e)}static encryptionLevel(e){return new B5e(e)}static enforce(e){return new y5e(e)}static equate(e){return new b5e(e)}static equateRange(e){return new E5e(e)}static exclude(e){return new w5e(e)}static excludeNS(e){return new Q5e(e)}static flipLabel(e){return new _5e(e)}static fontInfo(e){return new S5e(e)}static formFieldFilling(e){return new x5e(e)}static groupParent(e){return new k5e(e)}static ifEmpty(e){return new D5e(e)}static includeXDPContent(e){return new F5e(e)}static incrementalLoad(e){return new T5e(e)}static incrementalMerge(e){return new M5e(e)}static interactive(e){return new R5e(e)}static jog(e){return new N5e(e)}static labelPrinter(e){return new L5e(e)}static layout(e){return new U5e(e)}static level(e){return new H5e(e)}static linearized(e){return new P5e(e)}static locale(e){return new O5e(e)}static localeSet(e){return new G5e(e)}static log(e){return new K5e(e)}static map(e){return new q5e(e)}static mediumInfo(e){return new Y5e(e)}static message(e){return new V5e(e)}static messaging(e){return new W5e(e)}static mode(e){return new j5e(e)}static modifyAnnots(e){return new J5e(e)}static msgId(e){return new z5e(e)}static nameAttr(e){return new X5e(e)}static neverEmbed(e){return new $5e(e)}static numberOfCopies(e){return new Z5e(e)}static openAction(e){return new e7e(e)}static output(e){return new t7e(e)}static outputBin(e){return new i7e(e)}static outputXSL(e){return new n7e(e)}static overprint(e){return new s7e(e)}static packets(e){return new r7e(e)}static pageOffset(e){return new a7e(e)}static pageRange(e){return new o7e(e)}static pagination(e){return new l7e(e)}static paginationOverride(e){return new A7e(e)}static part(e){return new c7e(e)}static pcl(e){return new u7e(e)}static pdf(e){return new h7e(e)}static pdfa(e){return new d7e(e)}static permissions(e){return new g7e(e)}static pickTrayByPDFSize(e){return new p7e(e)}static picture(e){return new f7e(e)}static plaintextMetadata(e){return new m7e(e)}static presence(e){return new C7e(e)}static present(e){return new I7e(e)}static print(e){return new v7e(e)}static printHighQuality(e){return new B7e(e)}static printScaling(e){return new y7e(e)}static printerName(e){return new b7e(e)}static producer(e){return new E7e(e)}static ps(e){return new w7e(e)}static range(e){return new Q7e(e)}static record(e){return new _7e(e)}static relevant(e){return new S7e(e)}static rename(e){return new x7e(e)}static renderPolicy(e){return new k7e(e)}static runScripts(e){return new D7e(e)}static script(e){return new F7e(e)}static scriptModel(e){return new T7e(e)}static severity(e){return new M7e(e)}static silentPrint(e){return new R7e(e)}static staple(e){return new N7e(e)}static startNode(e){return new L7e(e)}static startPage(e){return new U7e(e)}static submitFormat(e){return new H7e(e)}static submitUrl(e){return new P7e(e)}static subsetBelow(e){return new O7e(e)}static suppressBanner(e){return new G7e(e)}static tagged(e){return new K7e(e)}static template(e){return new q7e(e)}static templateCache(e){return new W7e(e)}static threshold(e){return new Y7e(e)}static to(e){return new V7e(e)}static trace(e){return new j7e(e)}static transform(e){return new J7e(e)}static type(e){return new z7e(e)}static uri(e){return new X7e(e)}static validate(e){return new $7e(e)}static validateApprovalSignatures(e){return new Z7e(e)}static validationMessaging(e){return new eet(e)}static version(e){return new tet(e)}static versionControl(e){return new iet(e)}static viewerPreferences(e){return new net(e)}static webClient(e){return new set(e)}static whitespace(e){return new ret(e)}static window(e){return new aet(e)}static xdc(e){return new oet(e)}static xdp(e){return new Aet(e)}static xsl(e){return new cet(e)}static zpl(e){return new uet(e)}}const det=F4e.connectionSet.id;class get extends _3e{constructor(e){super(det,"connectionSet",!0),this.wsdlConnection=new S3e,this.xmlConnection=new S3e,this.xsdConnection=new S3e}}class pet extends _3e{constructor(e){super(det,"effectiveInputPolicy"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class fet extends _3e{constructor(e){super(det,"effectiveOutputPolicy"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class met extends T3e{constructor(e){super(det,"operation"),this.id=e.id||"",this.input=e.input||"",this.name=e.name||"",this.output=e.output||"",this.use=e.use||"",this.usehref=e.usehref||""}}class Cet extends T3e{constructor(e){super(det,"rootElement"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class Iet extends T3e{constructor(e){super(det,"soapAction"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class vet extends T3e{constructor(e){super(det,"soapAddress"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class Bet extends T3e{constructor(e){super(det,"uri"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class yet extends T3e{constructor(e){super(det,"wsdlAddress"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class bet extends _3e{constructor(e){super(det,"wsdlConnection",!0),this.dataDescription=e.dataDescription||"",this.name=e.name||"",this.effectiveInputPolicy=null,this.effectiveOutputPolicy=null,this.operation=null,this.soapAction=null,this.soapAddress=null,this.wsdlAddress=null}}class Eet extends _3e{constructor(e){super(det,"xmlConnection",!0),this.dataDescription=e.dataDescription||"",this.name=e.name||"",this.uri=null}}class wet extends _3e{constructor(e){super(det,"xsdConnection",!0),this.dataDescription=e.dataDescription||"",this.name=e.name||"",this.rootElement=null,this.uri=null}}class Qet{static[D4e](e,t){if(Qet.hasOwnProperty(e))return Qet[e](t)}static connectionSet(e){return new get(e)}static effectiveInputPolicy(e){return new pet(e)}static effectiveOutputPolicy(e){return new fet(e)}static operation(e){return new met(e)}static rootElement(e){return new Cet(e)}static soapAction(e){return new Iet(e)}static soapAddress(e){return new vet(e)}static uri(e){return new Bet(e)}static wsdlAddress(e){return new yet(e)}static wsdlConnection(e){return new bet(e)}static xmlConnection(e){return new Eet(e)}static xsdConnection(e){return new wet(e)}}const _et=F4e.datasets.id;class xet extends k3e{constructor(e){super(_et,"data",e)}[i4e](){return!0}}class ket extends _3e{constructor(e){super(_et,"datasets",!0),this.data=null,this.Signature=null}[u4e](e){const t=e[A4e];("data"===t&&e[l4e]===_et||"Signature"===t&&e[l4e]===F4e.signature.id)&&(this[t]=e),this[I2e](e)}}class Det{static[D4e](e,t){if(Det.hasOwnProperty(e))return Det[e](t)}static datasets(e){return new ket(e)}static data(e){return new xet(e)}}const Fet=F4e.localeSet.id;class Tet extends _3e{constructor(e){super(Fet,"calendarSymbols",!0),this.name="gregorian",this.dayNames=new S3e(2),this.eraNames=null,this.meridiemNames=null,this.monthNames=new S3e(2)}}class Met extends T3e{constructor(e){super(Fet,"currencySymbol"),this.name=H4e(e.name,["symbol","isoname","decimal"])}}class Ret extends _3e{constructor(e){super(Fet,"currencySymbols",!0),this.currencySymbol=new S3e(3)}}class Net extends T3e{constructor(e){super(Fet,"datePattern"),this.name=H4e(e.name,["full","long","med","short"])}}class Let extends _3e{constructor(e){super(Fet,"datePatterns",!0),this.datePattern=new S3e(4)}}class Uet extends D3e{constructor(e){super(Fet,"dateTimeSymbols")}}class Het extends T3e{constructor(e){super(Fet,"day")}}class Pet extends _3e{constructor(e){super(Fet,"dayNames",!0),this.abbr=N4e({data:e.abbr,defaultValue:0,validate:e=>1===e}),this.day=new S3e(7)}}class Oet extends T3e{constructor(e){super(Fet,"era")}}class Get extends _3e{constructor(e){super(Fet,"eraNames",!0),this.era=new S3e(2)}}class Ket extends _3e{constructor(e){super(Fet,"locale",!0),this.desc=e.desc||"",this.name="isoname",this.calendarSymbols=null,this.currencySymbols=null,this.datePatterns=null,this.dateTimeSymbols=null,this.numberPatterns=null,this.numberSymbols=null,this.timePatterns=null,this.typeFaces=null}}class qet extends _3e{constructor(e){super(Fet,"localeSet",!0),this.locale=new S3e}}class Yet extends T3e{constructor(e){super(Fet,"meridiem")}}class Vet extends _3e{constructor(e){super(Fet,"meridiemNames",!0),this.meridiem=new S3e(2)}}class Wet extends T3e{constructor(e){super(Fet,"month")}}class jet extends _3e{constructor(e){super(Fet,"monthNames",!0),this.abbr=N4e({data:e.abbr,defaultValue:0,validate:e=>1===e}),this.month=new S3e(12)}}class Jet extends T3e{constructor(e){super(Fet,"numberPattern"),this.name=H4e(e.name,["full","long","med","short"])}}class zet extends _3e{constructor(e){super(Fet,"numberPatterns",!0),this.numberPattern=new S3e(4)}}class Xet extends T3e{constructor(e){super(Fet,"numberSymbol"),this.name=H4e(e.name,["decimal","grouping","percent","minus","zero"])}}class $et extends _3e{constructor(e){super(Fet,"numberSymbols",!0),this.numberSymbol=new S3e(5)}}class Zet extends T3e{constructor(e){super(Fet,"timePattern"),this.name=H4e(e.name,["full","long","med","short"])}}class ett extends _3e{constructor(e){super(Fet,"timePatterns",!0),this.timePattern=new S3e(4)}}class ttt extends _3e{constructor(e){super(Fet,"typeFace",!0),this.name=""|e.name}}class itt extends _3e{constructor(e){super(Fet,"typeFaces",!0),this.typeFace=new S3e}}class ntt{static[D4e](e,t){if(ntt.hasOwnProperty(e))return ntt[e](t)}static calendarSymbols(e){return new Tet(e)}static currencySymbol(e){return new Met(e)}static currencySymbols(e){return new Ret(e)}static datePattern(e){return new Net(e)}static datePatterns(e){return new Let(e)}static dateTimeSymbols(e){return new Uet(e)}static day(e){return new Het(e)}static dayNames(e){return new Pet(e)}static era(e){return new Oet(e)}static eraNames(e){return new Get(e)}static locale(e){return new Ket(e)}static localeSet(e){return new qet(e)}static meridiem(e){return new Yet(e)}static meridiemNames(e){return new Vet(e)}static month(e){return new Wet(e)}static monthNames(e){return new jet(e)}static numberPattern(e){return new Jet(e)}static numberPatterns(e){return new zet(e)}static numberSymbol(e){return new Xet(e)}static numberSymbols(e){return new $et(e)}static timePattern(e){return new Zet(e)}static timePatterns(e){return new ett(e)}static typeFace(e){return new ttt(e)}static typeFaces(e){return new itt(e)}}const stt=F4e.signature.id;class rtt extends _3e{constructor(e){super(stt,"signature",!0)}}class att{static[D4e](e,t){if(att.hasOwnProperty(e))return att[e](t)}static signature(e){return new rtt(e)}}const ott=F4e.stylesheet.id;class ltt extends _3e{constructor(e){super(ott,"stylesheet",!0)}}class Att{static[D4e](e,t){if(Att.hasOwnProperty(e))return Att[e](t)}static stylesheet(e){return new ltt(e)}}const ctt=F4e.xdp.id;class utt extends _3e{constructor(e){super(ctt,"xdp",!0),this.uuid=e.uuid||"",this.timeStamp=e.timeStamp||"",this.config=null,this.connectionSet=null,this.datasets=null,this.localeSet=null,this.stylesheet=new S3e,this.template=null}[h4e](e){const t=F4e[e[A4e]];return t&&e[l4e]===t.id}}class htt{static[D4e](e,t){if(htt.hasOwnProperty(e))return htt[e](t)}static xdp(e){return new utt(e)}}const dtt=F4e.xhtml.id,gtt=Symbol(),ptt=new Set(["color","font","font-family","font-size","font-stretch","font-style","font-weight","margin","margin-bottom","margin-left","margin-right","margin-top","letter-spacing","line-height","orphans","page-break-after","page-break-before","page-break-inside","tab-interval","tab-stop","text-align","text-decoration","text-indent","vertical-align","widows","kerning-mode","xfa-font-horizontal-scale","xfa-font-vertical-scale","xfa-spacerun","xfa-tab-stops"]),ftt=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",e=>"none"===e?"none":"normal"],["xfa-font-horizontal-scale",e=>`scaleX(${Math.max(0,Math.min(parseInt(e)/100)).toFixed(2)})`],["xfa-font-vertical-scale",e=>`scaleY(${Math.max(0,Math.min(parseInt(e)/100)).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(e,t)=>L3e(.99*(e=t.fontSize=P4e(e)))],["letter-spacing",e=>L3e(P4e(e))],["line-height",e=>L3e(P4e(e))],["margin",e=>L3e(P4e(e))],["margin-bottom",e=>L3e(P4e(e))],["margin-left",e=>L3e(P4e(e))],["margin-right",e=>L3e(P4e(e))],["margin-top",e=>L3e(P4e(e))],["text-indent",e=>L3e(P4e(e))],["font-family",e=>e],["vertical-align",e=>L3e(P4e(e))]]),mtt=/\s+/g,Ctt=/[\r\n]+/g,Itt=/\r\n?/g;function vtt(e,t,i){const n=Object.create(null);if(!e)return n;const s=Object.create(null);for(const[r,a]of e.split(";").map((e=>e.split(":",2)))){const e=ftt.get(r);if(""===e)continue;let t=a;e&&(t="string"==typeof e?e:e(a,s)),r.endsWith("scale")?n.transform=n.transform?`${n[r]} ${t}`:t:n[r.replaceAll(/-([a-zA-Z])/g,((e,t)=>t.toUpperCase()))]=t}if(n.fontFamily&&$3e({typeface:n.fontFamily,weight:n.fontWeight||"normal",posture:n.fontStyle||"normal",size:s.fontSize||0},t,t[W2e].fontFinder,n),i&&n.verticalAlign&&"0px"!==n.verticalAlign&&n.fontSize){const e=.583,t=.333,i=P4e(n.fontSize);n.fontSize=L3e(i*e),n.verticalAlign=L3e(Math.sign(P4e(n.verticalAlign))*i*t)}return i&&n.fontSize&&(n.fontSize=`calc(${n.fontSize} * var(--scale-factor))`),W3e(n),n}const Btt=new Set(["body","html"]);class ytt extends k3e{constructor(e,t){super(dtt,t),this[gtt]=!1,this.style=e.style||""}[B2e](e){var t;super[B2e](e),this.style=(t=this).style?t.style.trim().split(/\s*;\s*/).filter((e=>!!e)).map((e=>e.split(/\s*:\s*/,2))).filter((([e,i])=>("font-family"===e&&t[W2e].usedTypefaces.add(i),ptt.has(e)))).map((e=>e.join(":"))).join(";"):""}[m2e](){return!Btt.has(this[A4e])}[d4e](e,t=!1){t?this[gtt]=!0:(e=e.replaceAll(Ctt,""),this.style.includes("xfa-spacerun:yes")||(e=e.replaceAll(mtt," "))),e&&(this[Q2e]+=e)}[g4e](e,t=!0){const i=Object.create(null),n={top:NaN,bottom:NaN,left:NaN,right:NaN};let s=null;for(const[r,a]of this.style.split(";").map((e=>e.split(":",2))))switch(r){case"font-family":i.typeface=R4e(a);break;case"font-size":i.size=P4e(a);break;case"font-weight":i.weight=a;break;case"font-style":i.posture=a;break;case"letter-spacing":i.letterSpacing=P4e(a);break;case"margin":const e=a.split(/ \t/).map((e=>P4e(e)));switch(e.length){case 1:n.top=n.bottom=n.left=n.right=e[0];break;case 2:n.top=n.bottom=e[0],n.left=n.right=e[1];break;case 3:n.top=e[0],n.bottom=e[2],n.left=n.right=e[1];break;case 4:n.top=e[0],n.left=e[1],n.bottom=e[2],n.right=e[3]}break;case"margin-top":n.top=P4e(a);break;case"margin-bottom":n.bottom=P4e(a);break;case"margin-left":n.left=P4e(a);break;case"margin-right":n.right=P4e(a);break;case"line-height":s=P4e(a)}if(e.pushData(i,n,s),this[Q2e])e.addString(this[Q2e]);else for(const r of this[O2e]())"#text"!==r[A4e]?r[g4e](e):e.addString(r[Q2e]);t&&e.popFont()}[_4e](e){const t=[];if(this[x2e]={children:t},this[v2e]({}),0===t.length&&!this[Q2e])return K4e.EMPTY;let i;return i=this[gtt]?this[Q2e]?this[Q2e].replaceAll(Itt,"\n"):void 0:this[Q2e]||void 0,K4e.success({name:this[A4e],attributes:{href:this.href,style:vtt(this.style,this,this[gtt])},children:t,value:i})}}class btt extends ytt{constructor(e){super(e,"a"),this.href=Z3e(e.href)||""}}class Ett extends ytt{constructor(e){super(e,"b")}[g4e](e){e.pushFont({weight:"bold"}),super[g4e](e),e.popFont()}}class wtt extends ytt{constructor(e){super(e,"body")}[_4e](e){const t=super[_4e](e),{html:i}=t;return i?(i.name="div",i.attributes.class=["xfaRich"],t):K4e.EMPTY}}class Qtt extends ytt{constructor(e){super(e,"br")}[w4e](){return"\n"}[g4e](e){e.addString("\n")}[_4e](e){return K4e.success({name:"br"})}}class _tt extends ytt{constructor(e){super(e,"html")}[_4e](e){var t;const i=[];if(this[x2e]={children:i},this[v2e]({}),0===i.length)return K4e.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[Q2e]||""});if(1===i.length){const e=i[0];if(null==(t=e.attributes)?void 0:t.class.includes("xfaRich"))return K4e.success(e)}return K4e.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:i})}}class Stt extends ytt{constructor(e){super(e,"i")}[g4e](e){e.pushFont({posture:"italic"}),super[g4e](e),e.popFont()}}class xtt extends ytt{constructor(e){super(e,"li")}}class ktt extends ytt{constructor(e){super(e,"ol")}}class Dtt extends ytt{constructor(e){super(e,"p")}[g4e](e){super[g4e](e,!1),e.addString("\n"),e.addPara(),e.popFont()}[w4e](){return this[Y2e]()[O2e]().at(-1)===this?super[w4e]():super[w4e]()+"\n"}}class Ftt extends ytt{constructor(e){super(e,"span")}}class Ttt extends ytt{constructor(e){super(e,"sub")}}class Mtt extends ytt{constructor(e){super(e,"sup")}}class Rtt extends ytt{constructor(e){super(e,"ul")}}class Ntt{static[D4e](e,t){if(Ntt.hasOwnProperty(e))return Ntt[e](t)}static a(e){return new btt(e)}static b(e){return new Ett(e)}static body(e){return new wtt(e)}static br(e){return new Qtt(e)}static html(e){return new _tt(e)}static i(e){return new Stt(e)}static li(e){return new xtt(e)}static ol(e){return new ktt(e)}static p(e){return new Dtt(e)}static span(e){return new Ftt(e)}static sub(e){return new Ttt(e)}static sup(e){return new Mtt(e)}static ul(e){return new Rtt(e)}}const Ltt={config:het,connection:Qet,datasets:Det,localeSet:ntt,signature:att,stylesheet:Att,template:S9e,xdp:htt,xhtml:Ntt};class Utt{constructor(e){this.namespaceId=e}[D4e](e,t){return new k3e(this.namespaceId,e,t)}}class Htt extends _3e{constructor(e){super(-1,"root",Object.create(null)),this.element=null,this[J2e]=e}[u4e](e){return this.element=e,!0}[k2e](){super[k2e](),this.element.template instanceof f9e&&(this[J2e].set(C4e,this.element),this.element.template[I4e](this[J2e]),this.element.template[J2e]=this[J2e])}}class Ptt extends _3e{constructor(){super(-1,"",Object.create(null))}[u4e](e){return!1}}class Ott{constructor(e=null){this._namespaceStack=[],this._nsAgnosticLevel=0,this._namespacePrefixes=new Map,this._namespaces=new Map,this._nextNsId=Math.max(...Object.values(F4e).map((({id:e})=>e))),this._currentNamespace=e||new Utt(++this._nextNsId)}buildRoot(e){return new Htt(e)}build({nsPrefix:e,name:t,attributes:i,namespace:n,prefixes:s}){const r=null!==n;if(r&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(n)),s&&this._addNamespacePrefix(s),i.hasOwnProperty(c4e)){const e=Ltt.datasets,t=i[c4e];let n=null;for(const[i,s]of Object.entries(t)){if(this._getNamespaceToUse(i)===e){n={xfa:s};break}}n?i[c4e]=n:delete i[c4e]}const a=this._getNamespaceToUse(e),o=(null==a?void 0:a[D4e](t,i))||new Ptt;return o[i4e]()&&this._nsAgnosticLevel++,(r||s||o[i4e]())&&(o[b2e]={hasNamespace:r,prefixes:s,nsAgnostic:o[i4e]()}),o}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(e){let t=this._namespaces.get(e);if(t)return t;for(const[i,{check:n}]of Object.entries(F4e))if(n(e)){if(t=Ltt[i],t)return this._namespaces.set(e,t),t;break}return t=new Utt(++this._nextNsId),this._namespaces.set(e,t),t}_addNamespacePrefix(e){for(const{prefix:t,value:i}of e){const e=this._searchNamespace(i);let n=this._namespacePrefixes.get(t);n||(n=[],this._namespacePrefixes.set(t,n)),n.push(e)}}_getNamespaceToUse(e){if(!e)return this._currentNamespace;const t=this._namespacePrefixes.get(e);return(null==t?void 0:t.length)>0?t.at(-1):null}clean(e){const{hasNamespace:t,prefixes:i,nsAgnostic:n}=e;t&&(this._currentNamespace=this._namespaceStack.pop()),i&&i.forEach((({prefix:e})=>{this._namespacePrefixes.get(e).pop()})),n&&this._nsAgnosticLevel--}}class Gtt extends X1e{constructor(e=null,t=!1){super(),this._builder=new Ott(e),this._stack=[],this._globalData={usedTypefaces:new Set},this._ids=new Map,this._current=this._builder.buildRoot(this._ids),this._errorCode=K1e,this._whiteRegex=/^\s+$/,this._nbsps=/\xa0+/g,this._richText=t}parse(e){if(this.parseXml(e),this._errorCode===K1e)return this._current[k2e](),this._current.element}onText(e){e=e.replace(this._nbsps,(e=>e.slice(1)+" ")),this._richText||this._current[m2e]()?this._current[d4e](e,this._richText):this._whiteRegex.test(e)||this._current[d4e](e.trim())}onCdata(e){this._current[d4e](e)}_mkAttributes(e,t){let i=null,n=null;const s=Object.create({});for(const{name:r,value:a}of e)if("xmlns"===r)i||(i=a);else if(r.startsWith("xmlns:")){const e=r.substring(6);n||(n=[]),n.push({prefix:e,value:a})}else{const e=r.indexOf(":");if(-1===e)s[r]=a;else{let t=s[c4e];t||(t=s[c4e]=Object.create(null));const[i,n]=[r.slice(0,e),r.slice(e+1)];(t[i]||(t[i]=Object.create(null)))[n]=a}}return[i,n,s]}_getNameAndPrefix(e,t){const i=e.indexOf(":");return-1===i?[e,null]:[e.substring(i+1),t?"":e.substring(0,i)]}onBeginElement(e,t,i){const[n,s,r]=this._mkAttributes(t,e),[a,o]=this._getNameAndPrefix(e,this._builder.isNsAgnostic()),l=this._builder.build({nsPrefix:o,name:a,attributes:r,namespace:n,prefixes:s});if(l[W2e]=this._globalData,i)return l[k2e](),this._current[u4e](l)&&l[B4e](this._ids),void l[B2e](this._builder);this._stack.push(this._current),this._current=l}onEndElement(e){const t=this._current;if(t[$2e]()&&"string"==typeof t[Q2e]){const e=new Gtt;e._globalData=this._globalData;const i=e.parse(t[Q2e]);t[Q2e]=null,t[u4e](i)}t[k2e](),this._current=this._stack.pop(),this._current[u4e](t)&&t[B4e](this._ids),t[B2e](this._builder)}onError(e){this._errorCode=e}}class Ktt{constructor(e){try{this.root=(new Gtt).parse(Ktt._createDocument(e));const t=new D9e(this.root);this.form=t.bind(),this.dataHandler=new F9e(this.root,t.getData()),this.form[W2e].template=this.form}catch(I2){}}isValid(){return this.root&&this.form}_createPagesHelper(){const e=this.form[Q4e]();return new Promise(((t,i)=>{const n=()=>{try{const i=e.next();i.done?t(i.value):setTimeout(n,0)}catch(I2){i(I2)}};setTimeout(n,0)}))}async _createPages(){try{this.pages=await this._createPagesHelper(),this.dims=this.pages.children.map((e=>{const{width:t,height:i}=e.attributes.style;return[0,0,parseInt(t),parseInt(i)]}))}catch(I2){}}getBoundingBox(e){return this.dims[e]}async getNumPages(){return this.pages||await this._createPages(),this.dims.length}setImages(e){this.form[W2e].images=e}setFonts(e){this.form[W2e].fontFinder=new q4e(e);const t=[];for(let i of this.form[W2e].usedTypefaces){i=R4e(i);this.form[W2e].fontFinder.find(i)||t.push(i)}return t.length>0?t:null}appendFonts(e,t){this.form[W2e].fontFinder.add(e,t)}async getPages(){this.pages||await this._createPages();const e=this.pages;return this.pages=null,e}serializeData(e){return this.dataHandler.serialize(e)}static _createDocument(e){return e["/xdp:xdp"]?Object.values(e).join(""):e["xdp:xdp"]}static getRichTextAsHtml(e){if(!e||"string"!=typeof e)return null;try{let t=new Gtt(Ntt,!0).parse(e);if(!["body","xhtml"].includes(t[A4e])){const e=Ntt.body({});e[I2e](t),t=e}const i=t[_4e]();if(!i.success)return null;const{html:n}=i,{attributes:s}=n;return s&&(s.class&&(s.class=s.class.filter((e=>!e.startsWith("xfa")))),s.dir="auto"),{html:n,str:t[w4e]()}}catch(I2){}return null}}class qtt{static createGlobals(e){return Promise.all([e.ensureCatalog("acroForm"),e.ensureDoc("xfaDatasets"),e.ensureCatalog("structTreeRoot"),e.ensureCatalog("baseUrl"),e.ensureCatalog("attachments")]).then((([t,i,n,s,r])=>({pdfManager:e,acroForm:t instanceof rWe?t:rWe.empty,xfaDatasets:i,structTreeRoot:n,baseUrl:s,attachments:r})),(e=>null))}static async create(e,t,i,n,s,r,a){const o=s?await this._getPageIndex(e,t,i.pdfManager):null;return i.pdfManager.ensure(this,"_create",[e,t,i,n,s,r,o,a])}static _create(e,t,i,n,s=!1,r=null,a=null,o=null){const l=e.fetchIfRef(t);if(!(l instanceof rWe))return;const{acroForm:A,pdfManager:c}=i,u=t instanceof aWe?t.toString():`annot_${n.createObjId()}`;let h=l.get("Subtype");h=h instanceof iWe?h.name:null;const d={xref:e,ref:t,dict:l,subtype:h,id:u,annotationGlobals:i,collectFields:s,orphanFields:r,needAppearances:!s&&!0===A.get("NeedAppearances"),pageIndex:a,evaluatorOptions:c.evaluatorOptions,pageRef:o};switch(h){case"Link":return new sit(d);case"Text":return new nit(d);case"Widget":let e=BWe({dict:l,key:"FT"});switch(e=e instanceof iWe?e.name:null,e){case"Tx":return new Ztt(d);case"Btn":return new eit(d);case"Ch":return new tit(d);case"Sig":return new iit(d)}return new $tt(d);case"Popup":return new rit(d);case"FreeText":return new ait(d);case"Line":return new oit(d);case"Square":return new lit(d);case"Circle":return new Ait(d);case"PolyLine":return new cit(d);case"Polygon":return new uit(d);case"Caret":return new hit(d);case"Ink":return new dit(d);case"Highlight":return new git(d);case"Underline":return new pit(d);case"Squiggly":return new fit(d);case"StrikeOut":return new mit(d);case"Stamp":return new Cit(d);case"FileAttachment":return new Iit(d);default:return new Jtt(d)}}static async _getPageIndex(e,t,i){try{const s=await e.fetchIfRefAsync(t);if(!(s instanceof rWe))return-1;const r=s.getRaw("P");if(r instanceof aWe)try{return await i.ensureCatalog("getPageIndex",[r])}catch(n){}if(s.has("Kids"))return-1;const a=await i.ensureDoc("numPages");for(let e=0;e<a;e++){const n=await i.getPage(e),s=await i.ensure(n,"annotations");for(const i of s)if(i instanceof aWe&&hWe(i,t))return e}}catch(n){}return-1}static generateImages(e,t,i){if(!i)return null;let n;for(const{bitmapId:s,bitmap:r}of e)r&&(n||(n=new Map),n.set(s,Cit.createImage(r,t)));return n}static async saveNewAnnotations(e,t,i,n,s){const r=e.xref;let a;const o=[],{isOffscreenCanvasSupported:l}=e.options;for(const A of i)if(!A.deleted)switch(A.annotationType){case EKe:if(!a){const e=new rWe(r);e.set("BaseFont",iWe.get("Helvetica")),e.set("Type",iWe.get("Font")),e.set("Subtype",iWe.get("Type1")),e.set("Encoding",iWe.get("WinAnsiEncoding")),a=r.getNewTemporaryRef(),s.put(a,{data:e})}o.push(ait.createNewAnnotation(r,A,s,{evaluator:e,task:t,baseFontRef:a}));break;case wKe:A.quadPoints?o.push(git.createNewAnnotation(r,A,s)):o.push(dit.createNewAnnotation(r,A,s));break;case _Ke:o.push(dit.createNewAnnotation(r,A,s));break;case QKe:const i=l?await(null==n?void 0:n.get(A.bitmapId)):null;if(null==i?void 0:i.imageStream){const{imageStream:e,smaskStream:t}=i;if(t){const i=r.getNewTemporaryRef();s.put(i,{data:t}),e.dict.set("SMask",i)}const n=i.imageRef=r.getNewTemporaryRef();s.put(n,{data:e}),i.imageStream=i.smaskStream=null}o.push(Cit.createNewAnnotation(r,A,s,{image:i}))}return{annotations:await Promise.all(o)}}static async printNewAnnotations(e,t,i,n,s){if(!n)return null;const{options:r,xref:a}=t,o=[];for(const l of n)if(!l.deleted)switch(l.annotationType){case EKe:o.push(ait.createNewPrintAnnotation(e,a,l,{evaluator:t,task:i,evaluatorOptions:r}));break;case wKe:l.quadPoints?o.push(git.createNewPrintAnnotation(e,a,l,{evaluatorOptions:r})):o.push(dit.createNewPrintAnnotation(e,a,l,{evaluatorOptions:r}));break;case _Ke:o.push(dit.createNewPrintAnnotation(e,a,l,{evaluatorOptions:r}));break;case QKe:const n=r.isOffscreenCanvasSupported?await(null==s?void 0:s.get(l.bitmapId)):null;if(null==n?void 0:n.imageStream){const{imageStream:e,smaskStream:t}=n;t&&e.dict.set("SMask",t),n.imageRef=new qJe(e,e.length),n.imageStream=n.smaskStream=null}o.push(Cit.createNewPrintAnnotation(e,a,l,{image:n,evaluatorOptions:r}))}return Promise.all(o)}}function Ytt(e,t=new Uint8ClampedArray(3)){if(!Array.isArray(e))return t;const i=t||new Uint8ClampedArray(3);switch(e.length){case 0:return null;case 1:return ije.singletons.gray.getRgbItem(e,0,i,0),i;case 3:return ije.singletons.rgb.getRgbItem(e,0,i,0),i;case 4:return ije.singletons.cmyk.getRgbItem(e,0,i,0),i;default:return t}}function Vtt(e){return Array.from(e,(e=>e/255))}function Wtt(e,t){const i=e.getArray("QuadPoints");if(!xWe(i,null)||0===i.length||i.length%8>0)return null;const n=new Float32Array(i.length);for(let s=0,r=i.length;s<r;s+=8){const[e,r,a,o,l,A,c,u]=i.slice(s,s+8),h=Math.min(e,a,l,c),d=Math.max(e,a,l,c),g=Math.min(r,o,A,u),p=Math.max(r,o,A,u);if(null!==t&&(h<t[0]||d>t[2]||g<t[1]||p>t[3]))return null;n.set([h,p,d,p,h,g,d,g],s)}return n}function jtt(e,t,i){const[n,s,r,a]=FVe.getAxialAlignedBoundingBox(t,i);if(n===r||s===a)return[1,0,0,1,e[0],e[1]];const o=(e[2]-e[0])/(r-n),l=(e[3]-e[1])/(a-s);return[o,0,0,l,e[0]-n*o,e[1]-s*l]}class Jtt{constructor(e){const{dict:t,xref:i,annotationGlobals:n,ref:s,orphanFields:r}=e,a=null==r?void 0:r.get(s);a&&t.set("Parent",a),this.setTitle(t.get("T")),this.setContents(t.get("Contents")),this.setModificationDate(t.get("M")),this.setFlags(t.get("F")),this.setRectangle(t.getArray("Rect")),this.setColor(t.getArray("C")),this.setBorderStyle(t),this.setAppearance(t),this.setOptionalContent(t);const o=t.get("MK");this.setBorderAndBackgroundColors(o),this.setRotation(o,t),this.ref=e.ref instanceof aWe?e.ref:null,this._streams=[],this.appearance&&this._streams.push(this.appearance);const l=!!(this.flags&rqe),A=!!(this.flags&aqe);if(this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,rotation:this.rotation,contentsObj:this._contents,hasAppearance:!!this.appearance,id:e.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:e.subtype,hasOwnCanvas:!1,noRotate:!!(this.flags&nqe),noHTML:l&&A,isEditable:!1,structParent:-1},n.structTreeRoot){let i=t.get("StructParent");this.data.structParent=i=Number.isInteger(i)&&i>=0?i:-1,n.structTreeRoot.addAnnotationIdToPage(e.pageRef,i)}if(e.collectFields){const n=t.get("Kids");if(Array.isArray(n)){const e=[];for(const t of n)t instanceof aWe&&e.push(t.toString());0!==e.length&&(this.data.kidIds=e)}this.data.actions=LWe(i,t,bqe),this.data.fieldName=this._constructFieldName(t),this.data.pageIndex=e.pageIndex}const c=t.get("IT");c instanceof iWe&&(this.data.it=c.name),this._isOffscreenCanvasSupported=e.evaluatorOptions.isOffscreenCanvasSupported,this._fallbackFontDict=null,this._needAppearances=!1}_hasFlag(e,t){return!!(e&t)}_buildFlags(e,t){let{flags:i}=this;if(void 0===e){if(void 0===t)return;return t?i&~iqe:i&~tqe|iqe}return e?(i|=iqe,t?i&~sqe|tqe:i&~tqe|sqe):(i&=~(tqe|sqe),t?i&~iqe:i|iqe)}_isViewable(e){return!this._hasFlag(e,eqe)&&!this._hasFlag(e,sqe)}_isPrintable(e){return this._hasFlag(e,iqe)&&!this._hasFlag(e,tqe)&&!this._hasFlag(e,eqe)}mustBeViewed(e,t){var i;const n=null==(i=null==e?void 0:e.get(this.data.id))?void 0:i.noView;return void 0!==n?!n:this.viewable&&!this._hasFlag(this.flags,tqe)}mustBePrinted(e){var t;const i=null==(t=null==e?void 0:e.get(this.data.id))?void 0:t.noPrint;return void 0!==i?!i:this.printable}mustBeViewedWhenEditing(e,t=null){return e?!this.data.isEditable:!(null==t?void 0:t.has(this.data.id))}get viewable(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}get printable(){return null!==this.data.quadPoints&&(0!==this.flags&&this._isPrintable(this.flags))}_parseStringHelper(e){const t="string"==typeof e?MVe(e):"";return{str:t,dir:t&&"rtl"===V0e(t).dir?"rtl":"ltr"}}setDefaultAppearance(e){const{dict:t,annotationGlobals:i}=e,n=BWe({dict:t,key:"DA"})||i.acroForm.get("DA");this._defaultAppearance="string"==typeof n?n:"",this.data.defaultAppearanceData=T1e(this._defaultAppearance)}setTitle(e){this._title=this._parseStringHelper(e)}setContents(e){this._contents=this._parseStringHelper(e)}setModificationDate(e){this.modificationDate="string"==typeof e?e:null}setFlags(e){this.flags=Number.isInteger(e)&&e>0?e:0,this.flags&eqe&&"Annotation"!==this.constructor.name&&(this.flags^=eqe)}hasFlag(e){return this._hasFlag(this.flags,e)}setRectangle(e){this.rectangle=FWe(e,[0,0,0,0])}setColor(e){this.color=Ytt(e)}setLineEndings(e){if(this.lineEndings=["None","None"],Array.isArray(e)&&2===e.length)for(let t=0;t<2;t++){const i=e[t];if(i instanceof iWe)switch(i.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[t]=i.name;continue}}}setRotation(e,t){this.rotation=0;let i=e instanceof rWe?e.get("R")||0:t.get("Rotate")||0;Number.isInteger(i)&&0!==i&&(i%=360,i<0&&(i+=360),i%90==0&&(this.rotation=i))}setBorderAndBackgroundColors(e){e instanceof rWe?(this.borderColor=Ytt(e.getArray("BC"),null),this.backgroundColor=Ytt(e.getArray("BG"),null)):this.borderColor=this.backgroundColor=null}setBorderStyle(e){if(this.borderStyle=new ztt,e instanceof rWe)if(e.has("BS")){const t=e.get("BS");if(t instanceof rWe){const e=t.get("Type");e&&!AWe(e,"Border")||(this.borderStyle.setWidth(t.get("W"),this.rectangle),this.borderStyle.setStyle(t.get("S")),this.borderStyle.setDashArray(t.getArray("D")))}}else if(e.has("Border")){const t=e.getArray("Border");Array.isArray(t)&&t.length>=3&&(this.borderStyle.setHorizontalCornerRadius(t[0]),this.borderStyle.setVerticalCornerRadius(t[1]),this.borderStyle.setWidth(t[2],this.rectangle),4===t.length&&this.borderStyle.setDashArray(t[3],!0))}else this.borderStyle.setWidth(0)}setAppearance(e){this.appearance=null;const t=e.get("AP");if(!(t instanceof rWe))return;const i=t.get("N");if(i instanceof dWe)return void(this.appearance=i);if(!(i instanceof rWe))return;const n=e.get("AS");if(!(n instanceof iWe&&i.has(n.name)))return;const s=i.get(n.name);s instanceof dWe&&(this.appearance=s)}setOptionalContent(e){this.oc=null;const t=e.get("OC");t instanceof iWe||t instanceof rWe&&(this.oc=t)}loadResources(e,t){return t.dict.getAsync("Resources").then((t=>{if(!t)return;return new f2e(t,e,t.xref).load().then((function(){return t}))}))}async getOperatorList(e,t,i,n){const{hasOwnCanvas:s,id:r,rect:a}=this.data;let o=this.appearance;const l=!!(s&&i&fKe);if(l&&(a[0]===a[2]||a[1]===a[3]))return this.data.hasOwnCanvas=!1,{opList:new d1e,separateForm:!1,separateCanvas:!1};if(!o){if(!l)return{opList:new d1e,separateForm:!1,separateCanvas:!1};o=new $We(""),o.dict=new rWe}const A=o.dict,c=await this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"],o),u=DWe(A.getArray("BBox"),[0,0,1,1]),h=kWe(A.getArray("Matrix"),cKe),d=jtt(a,u,h),g=new d1e;let p;return this.oc&&(p=await e.parseMarkedContentProps(this.oc,null)),void 0!==p&&g.addOp(KYe,["OC",p]),g.addOp(XYe,[r,a,d,h,l]),await e.getOperatorList({stream:o,task:t,resources:c,operatorList:g,fallbackFontDict:this._fallbackFontDict}),g.addOp($Ye,[]),void 0!==p&&g.addOp(qYe,[]),this.reset(),{opList:g,separateForm:!1,separateCanvas:l}}async save(e,t,i,n){return null}get hasTextContent(){return!1}async extractTextContent(e,t,i){if(!this.appearance)return;const n=await this.loadResources(["ExtGState","Font","Properties","XObject"],this.appearance),s=[],r=[];let a=null;const o={desiredSize:Math.Infinity,ready:!0,enqueue(e,t){for(const i of e.items)void 0!==i.str&&(a||(a=i.transform.slice(-2)),r.push(i.str),i.hasEOL&&(s.push(r.join("").trimEnd()),r.length=0))}};if(await e.getTextContent({stream:this.appearance,task:t,resources:n,includeMarkedContent:!0,keepWhiteSpace:!0,sink:o,viewBox:i}),this.reset(),r.length&&s.push(r.join("").trimEnd()),s.length>1||s[0]){const e=this.appearance.dict,t=DWe(e.getArray("BBox"),null),i=kWe(e.getArray("Matrix"),null);this.data.textPosition=this._transformPoint(a,t,i),this.data.textContent=s}}_transformPoint(e,t,i){const{rect:n}=this.data;t||(t=[0,0,1,1]),i||(i=[1,0,0,1,0,0]);const s=jtt(n,t,i);return s[4]-=n[0],s[5]-=n[1],e=FVe.applyTransform(e,s),FVe.applyTransform(e,i)}getFieldObject(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex,rotation:this.rotation}:null}reset(){for(const e of this._streams)e.reset()}_constructFieldName(e){if(!e.has("T")&&!e.has("Parent"))return"";if(!e.has("Parent"))return MVe(e.get("T"));const t=[];e.has("T")&&t.unshift(MVe(e.get("T")));let i=e;const n=new oWe;for(e.objId&&n.put(e.objId);i.has("Parent")&&(i=i.get("Parent"),i instanceof rWe&&(!i.objId||!n.has(i.objId)));)i.objId&&n.put(i.objId),i.has("T")&&t.unshift(MVe(i.get("T")));return t.join(".")}}class ztt{constructor(){this.width=1,this.rawWidth=1,this.style=Cqe,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}setWidth(e,t=[0,0,0,0]){if(e instanceof iWe)this.width=0;else if("number"==typeof e){if(e>0){this.rawWidth=e;const i=(t[2]-t[0])/2,n=(t[3]-t[1])/2;i>0&&n>0&&(e>i||e>n)&&(e=1)}this.width=e}}setStyle(e){if(e instanceof iWe)switch(e.name){case"S":this.style=Cqe;break;case"D":this.style=Iqe;break;case"B":this.style=vqe;break;case"I":this.style=Bqe;break;case"U":this.style=yqe}}setDashArray(e,t=!1){if(Array.isArray(e)){let i=!0,n=!0;for(const t of e){if(!(+t>=0)){i=!1;break}t>0&&(n=!1)}0===e.length||i&&!n?(this.dashArray=e,t&&this.setStyle(iWe.get("D"))):this.width=0}else e&&(this.width=0)}setHorizontalCornerRadius(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}setVerticalCornerRadius(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}class Xtt extends Jtt{constructor(e){super(e);const{dict:t}=e;if(t.has("IRT")){const e=t.getRaw("IRT");this.data.inReplyTo=e instanceof aWe?e.toString():null;const i=t.get("RT");this.data.replyType=i instanceof iWe?i.name:ZKe}let i=null;if(this.data.replyType===$Ke){const e=t.get("IRT");this.setTitle(e.get("T")),this.data.titleObj=this._title,this.setContents(e.get("Contents")),this.data.contentsObj=this._contents,e.has("CreationDate")?(this.setCreationDate(e.get("CreationDate")),this.data.creationDate=this.creationDate):this.data.creationDate=null,e.has("M")?(this.setModificationDate(e.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,i=e.getRaw("Popup"),e.has("C")?(this.setColor(e.getArray("C")),this.data.color=this.color):this.data.color=null}else this.data.titleObj=this._title,this.setCreationDate(t.get("CreationDate")),this.data.creationDate=this.creationDate,i=t.getRaw("Popup"),t.has("C")||(this.data.color=null);this.data.popupRef=i instanceof aWe?i.toString():null,t.has("RC")&&(this.data.richText=Ktt.getRichTextAsHtml(t.get("RC")))}setCreationDate(e){this.creationDate="string"==typeof e?e:null}_setDefaultAppearance({xref:e,extra:t,strokeColor:i,fillColor:n,blendMode:s,strokeAlpha:r,fillAlpha:a,pointsCallback:o}){let l=Number.MAX_VALUE,A=Number.MAX_VALUE,c=Number.MIN_VALUE,u=Number.MIN_VALUE;const h=["q"];t&&h.push(t),i&&h.push(`${i[0]} ${i[1]} ${i[2]} RG`),n&&h.push(`${n[0]} ${n[1]} ${n[2]} rg`);let d=this.data.quadPoints;d||(d=Float32Array.from([this.rectangle[0],this.rectangle[3],this.rectangle[2],this.rectangle[3],this.rectangle[0],this.rectangle[1],this.rectangle[2],this.rectangle[1]]));for(let y=0,b=d.length;y<b;y+=8){const[e,t,i,n]=o(h,d.subarray(y,y+8));l=Math.min(l,e),c=Math.max(c,t),A=Math.min(A,i),u=Math.max(u,n)}h.push("Q");const g=new rWe(e),p=new rWe(e);p.set("Subtype",iWe.get("Form"));const f=new $We(h.join(" "));f.dict=p,g.set("Fm0",f);const m=new rWe(e);s&&m.set("BM",iWe.get(s)),"number"==typeof r&&m.set("CA",r),"number"==typeof a&&m.set("ca",a);const C=new rWe(e);C.set("GS0",m);const I=new rWe(e);I.set("ExtGState",C),I.set("XObject",g);const v=new rWe(e);v.set("Resources",I);const B=this.data.rect=[l,A,c,u];v.set("BBox",B),this.appearance=new $We("/GS0 gs /Fm0 Do"),this.appearance.dict=v,this._streams.push(this.appearance,f)}static async createNewAnnotation(e,t,i,n){t.ref||(t.ref=e.getNewTemporaryRef());const s=t.ref,r=await this.createNewAppearanceStream(t,e,n);let a;if(r){const n=e.getNewTemporaryRef();a=this.createNewDict(t,e,{apRef:n}),i.put(n,{data:r})}else a=this.createNewDict(t,e,{});return Number.isInteger(t.parentTreeId)&&a.set("StructParent",t.parentTreeId),i.put(s,{data:a}),{ref:s}}static async createNewPrintAnnotation(e,t,i,n){const s=await this.createNewAppearanceStream(i,t,n),r=this.createNewDict(i,t,s?{ap:s}:{}),a=new this.prototype.constructor({dict:r,xref:t,annotationGlobals:e,evaluatorOptions:n.evaluatorOptions});return i.ref&&(a.ref=a.refToReplace=i.ref),a}}class $tt extends Jtt{constructor(e){var t;super(e);const{dict:i,xref:n,annotationGlobals:s}=e,r=this.data;this._needAppearances=e.needAppearances,r.annotationType=XKe,void 0===r.fieldName&&(r.fieldName=this._constructFieldName(i)),void 0===r.actions&&(r.actions=LWe(n,i,bqe));let a=BWe({dict:i,key:"V",getArray:!0});r.fieldValue=this._decodeFormValue(a);const o=BWe({dict:i,key:"DV",getArray:!0});if(r.defaultFieldValue=this._decodeFormValue(o),void 0===a&&s.xfaDatasets){const e=this._title.str;e&&(this._hasValueFromXFA=!0,r.fieldValue=a=s.xfaDatasets.getValue(e))}void 0===a&&null!==r.defaultFieldValue&&(r.fieldValue=r.defaultFieldValue),r.alternativeText=MVe(i.get("TU")||""),this.setDefaultAppearance(e),r.hasAppearance||(r.hasAppearance=this._needAppearances&&void 0!==r.fieldValue&&null!==r.fieldValue);const l=BWe({dict:i,key:"FT"});r.fieldType=l instanceof iWe?l.name:null;const A=BWe({dict:i,key:"DR"}),c=s.acroForm.get("DR"),u=null==(t=this.appearance)?void 0:t.dict.get("Resources");this._fieldResources={localResources:A,acroFormResources:c,appearanceResources:u,mergedResources:rWe.merge({xref:n,dictArray:[A,u,c],mergeSubDicts:!0})},r.fieldFlags=BWe({dict:i,key:"Ff"}),(!Number.isInteger(r.fieldFlags)||r.fieldFlags<0)&&(r.fieldFlags=0),r.readOnly=this.hasFieldFlag(oqe),r.required=this.hasFieldFlag(lqe),r.hidden=this._hasFlag(r.annotationFlags,tqe)||this._hasFlag(r.annotationFlags,sqe)}_decodeFormValue(e){return Array.isArray(e)?e.filter((e=>"string"==typeof e)).map((e=>MVe(e))):e instanceof iWe?MVe(e.name):"string"==typeof e?MVe(e):null}hasFieldFlag(e){return!!(this.data.fieldFlags&e)}_isViewable(e){return!0}mustBeViewed(e,t){return t?this.viewable:super.mustBeViewed(e,t)&&!this._hasFlag(this.flags,sqe)}getRotationMatrix(e){var t;let i=null==(t=null==e?void 0:e.get(this.data.id))?void 0:t.rotation;if(void 0===i&&(i=this.rotation),0===i)return cKe;return JWe(i,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1])}getBorderAndBackgroundAppearances(e){var t;let i=null==(t=null==e?void 0:e.get(this.data.id))?void 0:t.rotation;if(void 0===i&&(i=this.rotation),!this.backgroundColor&&!this.borderColor)return"";const n=this.data.rect[2]-this.data.rect[0],s=this.data.rect[3]-this.data.rect[1],r=0===i||180===i?`0 0 ${n} ${s} re`:`0 0 ${s} ${n} re`;let a="";if(this.backgroundColor&&(a=`${R1e(this.backgroundColor,!0)} ${r} f `),this.borderColor){a+=`${this.borderStyle.width||1} w ${R1e(this.borderColor,!1)} ${r} S `}return a}async getOperatorList(e,t,i,n){if(i&IKe&&!(this instanceof iit)&&!this.data.noHTML&&!this.data.hasOwnCanvas)return{opList:new d1e,separateForm:!0,separateCanvas:!1};if(!this._hasText)return super.getOperatorList(e,t,i,n);const s=await this._getAppearance(e,t,i,n);if(this.appearance&&null===s)return super.getOperatorList(e,t,i,n);const r=new d1e;if(!this._defaultAppearance||null===s)return{opList:r,separateForm:!1,separateCanvas:!1};const a=!!(this.data.hasOwnCanvas&&i&fKe),o=[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]],l=jtt(this.data.rect,o,[1,0,0,1,0,0]);let A;this.oc&&(A=await e.parseMarkedContentProps(this.oc,null)),void 0!==A&&r.addOp(KYe,["OC",A]),r.addOp(XYe,[this.data.id,this.data.rect,l,this.getRotationMatrix(n),a]);const c=new $We(s);return await e.getOperatorList({stream:c,task:t,resources:this._fieldResources.mergedResources,operatorList:r}),r.addOp($Ye,[]),void 0!==A&&r.addOp(qYe,[]),{opList:r,separateForm:!1,separateCanvas:a}}_getMKDict(e){const t=new rWe(null);return e&&t.set("R",e),this.borderColor&&t.set("BC",Vtt(this.borderColor)),this.backgroundColor&&t.set("BG",Vtt(this.backgroundColor)),t.size>0?t:null}amendSavedDict(e,t){}setValue(e,t,i,n){const{dict:s,ref:r}=function(e,t,i){const n=new oWe,s=e,r={dict:null,ref:null};for(;e instanceof rWe&&!n.has(t)&&(n.put(t),!e.has("T"));){if(!((t=e.getRaw("Parent"))instanceof aWe))return r;e=i.fetch(t)}return e instanceof rWe&&e!==s&&(r.dict=e,r.ref=t),r}(e,this.ref,i);if(s){if(!n.has(r)){const e=s.clone();return e.set("V",t),n.put(r,{data:e}),e}}else e.set("V",t);return null}async save(e,t,i,n){const s=null==i?void 0:i.get(this.data.id),r=this._buildFlags(null==s?void 0:s.noView,null==s?void 0:s.noPrint);let a=null==s?void 0:s.value,o=null==s?void 0:s.rotation;if(a===this.data.fieldValue||void 0===a){if(!this._hasValueFromXFA&&void 0===o&&void 0===r)return;a||(a=this.data.fieldValue)}if(void 0===o&&!this._hasValueFromXFA&&Array.isArray(a)&&Array.isArray(this.data.fieldValue)&&LVe(a,this.data.fieldValue)&&void 0===r)return;void 0===o&&(o=this.rotation);let l=null;if(!this._needAppearances&&(l=await this._getAppearance(e,t,CKe,i),null===l&&void 0===r))return;let A=!1;(null==l?void 0:l.needAppearances)&&(A=!0,l=null);const{xref:c}=e,u=c.fetchIfRef(this.ref);if(!(u instanceof rWe))return;const h=new rWe(c);for(const f of u.getKeys())"AP"!==f&&h.set(f,u.getRaw(f));if(void 0!==r&&(h.set("F",r),null===l&&!A)){const e=u.getRaw("AP");e&&h.set("AP",e)}const d={path:this.data.fieldName,value:a},g=this.setValue(h,Array.isArray(a)?a.map(VWe):VWe(a),c,n);this.amendSavedDict(i,g||h);const p=this._getMKDict(o);if(p&&h.set("MK",p),n.put(this.ref,{data:h,xfa:d,needAppearances:A}),null!==l){const e=c.getNewTemporaryRef(),t=new rWe(c);h.set("AP",t),t.set("N",e);const s=this._getSaveFieldResources(c),r=new $We(l),a=r.dict=new rWe(c);a.set("Subtype",iWe.get("Form")),a.set("Resources",s),a.set("BBox",[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]]);const o=this.getRotationMatrix(i);o!==cKe&&a.set("Matrix",o),n.put(e,{data:r,xfa:null,needAppearances:!1})}h.set("M",`D:${UVe()}`)}async _getAppearance(e,t,i,n){if(this.hasFieldFlag(cqe))return null;const s=null==n?void 0:n.get(this.data.id);let r,a;if(s&&(r=s.formattedValue||s.value,a=s.rotation),void 0===a&&void 0===r&&!this._needAppearances&&(!this._hasValueFromXFA||this.appearance))return null;const o=this.getBorderAndBackgroundAppearances(n);if(void 0===r&&(r=this.data.fieldValue,!r))return`/Tx BMC q ${o}Q EMC`;if(Array.isArray(r)&&1===r.length&&(r=r[0]),pVe("string"==typeof r,"Expected `value` to be a string."),r=r.trimEnd(),this.data.combo){const e=this.data.options.find((({exportValue:e})=>r===e));r=(null==e?void 0:e.displayValue)||r}if(""===r)return`/Tx BMC q ${o}Q EMC`;void 0===a&&(a=this.rotation);let l,A=-1;this.data.multiLine?(l=r.split(/\r\n?|\n/).map((e=>e.normalize("NFC"))),A=l.length):l=[r.replace(/\r\n?|\n/,"").normalize("NFC")];let c=this.data.rect[3]-this.data.rect[1],u=this.data.rect[2]-this.data.rect[0];90!==a&&270!==a||([u,c]=[c,u]),this._defaultAppearance||(this.data.defaultAppearanceData=T1e(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let h,d,g,p=await $tt._getFontData(e,t,this.data.defaultAppearanceData,this._fieldResources.mergedResources);const f=[];let m=!1;for(const y of l){const e=p.encodeString(y);e.length>1&&(m=!0),f.push(e.join(""))}if(m&&i&CKe)return{needAppearances:!0};if(m&&this._isOffscreenCanvasSupported){const i=this.data.comb?"monospace":"sans-serif",n=new N1e(e.xref,i),s=n.createFontResources(l.join("")),a=s.getRaw("Font");if(this._fieldResources.mergedResources.has("Font")){const e=this._fieldResources.mergedResources.get("Font");for(const t of a.getKeys())e.set(t,a.getRaw(t))}else this._fieldResources.mergedResources.set("Font",a);const o=n.fontName.name;p=await $tt._getFontData(e,t,{fontName:o,fontSize:0},s);for(let e=0,t=f.length;e<t;e++)f[e]=jWe(l[e]);const m=Object.assign(Object.create(null),this.data.defaultAppearanceData);this.data.defaultAppearanceData.fontSize=0,this.data.defaultAppearanceData.fontName=o,[h,d,g]=this._computeFontSize(c-2,u-4,r,p,A),this.data.defaultAppearanceData=m}else this._isOffscreenCanvasSupported,[h,d,g]=this._computeFontSize(c-2,u-4,r,p,A);let C=p.descent;C=isNaN(C)?gKe*g:Math.max(gKe*g,Math.abs(C)*d);const I=Math.min(Math.floor((c-d)/2),1),v=this.data.textAlignment;if(this.data.multiLine)return this._getMultilineAppearance(h,f,p,d,u,c,v,2,I,C,g,n);if(this.data.comb)return this._getCombAppearance(h,p,f[0],d,u,c,2,I,C,g,n);const B=I+C;if(0===v||v>2)return`/Tx BMC q ${o}BT `+h+` 1 0 0 1 ${qWe(2)} ${qWe(B)} Tm (${RWe(f[0])}) Tj ET Q EMC`;return`/Tx BMC q ${o}BT `+h+` 1 0 0 1 0 0 Tm ${this._renderText(f[0],p,d,u,v,{shift:0},2,B)} ET Q EMC`}static async _getFontData(e,t,i,n){const s=new d1e,r={font:null,clone(){return this}},{fontName:a,fontSize:o}=i;return await e.handleSetFont(n,[a&&iWe.get(a),o],null,s,t,r,null),r.font}_getTextWidth(e,t){return t.charsToGlyphs(e).reduce(((e,t)=>e+t.width),0)/1e3}_computeFontSize(e,t,i,n,s){let{fontSize:r}=this.data.defaultAppearanceData,a=(r||12)*hKe,o=Math.round(e/a);if(!r){const l=e=>Math.floor(100*e)/100;if(-1===s){const s=this._getTextWidth(i,n);r=l(Math.min(e/hKe,t/s)),o=1}else{const A=i.split(/\r\n?|\n/),c=[];for(const e of A){const t=n.encodeString(e).join(""),i=n.charsToGlyphs(t),s=n.getCharPositions(t);c.push({line:t,glyphs:i,positions:s})}const u=i=>{let s=0;for(const r of c){if(s+=this._splitLine(null,n,i,t,r).length*i,s>e)return!0}return!1};for(o=Math.max(o,s);a=e/o,r=l(a/hKe),u(r);)o++}const{fontName:A,fontColor:c}=this.data.defaultAppearanceData;this._defaultAppearance=function({fontSize:e,fontName:t,fontColor:i}){return`/${MWe(t)} ${e} Tf ${R1e(i,!0)}`}({fontSize:r,fontName:A,fontColor:c})}return[this._defaultAppearance,r,e/o]}_renderText(e,t,i,n,s,r,a,o){let l;if(1===s){l=(n-this._getTextWidth(e,t)*i)/2}else if(2===s){l=n-this._getTextWidth(e,t)*i-a}else l=a;const A=qWe(l-r.shift);return r.shift=l,`${A} ${o=qWe(o)} Td (${RWe(e)}) Tj`}_getSaveFieldResources(e){var t;const{localResources:i,appearanceResources:n,acroFormResources:s}=this._fieldResources,r=null==(t=this.data.defaultAppearanceData)?void 0:t.fontName;if(!r)return i||rWe.empty;for(const a of[i,n])if(a instanceof rWe){const e=a.get("Font");if(e instanceof rWe&&e.has(r))return a}if(s instanceof rWe){const t=s.get("Font");if(t instanceof rWe&&t.has(r)){const n=new rWe(e);n.set(r,t.getRaw(r));const s=new rWe(e);return s.set("Font",n),rWe.merge({xref:e,dictArray:[s,i],mergeSubDicts:!0})}}return i||rWe.empty}getFieldObject(){return null}}class Ztt extends $tt{constructor(e){super(e);const{dict:t}=e;t.has("PMD")&&(this.flags|=tqe,this.data.hidden=!0),this.data.hasOwnCanvas=this.data.readOnly&&!this.data.noHTML,this._hasText=!0,"string"!=typeof this.data.fieldValue&&(this.data.fieldValue="");let i=BWe({dict:t,key:"Q"});(!Number.isInteger(i)||i<0||i>2)&&(i=null),this.data.textAlignment=i;let n=BWe({dict:t,key:"MaxLen"});(!Number.isInteger(n)||n<0)&&(n=0),this.data.maxLen=n,this.data.multiLine=this.hasFieldFlag(Aqe),this.data.comb=this.hasFieldFlag(mqe)&&!this.hasFieldFlag(Aqe)&&!this.hasFieldFlag(cqe)&&!this.hasFieldFlag(gqe)&&0!==this.data.maxLen,this.data.doNotScroll=this.hasFieldFlag(fqe)}get hasTextContent(){return!!this.appearance&&!this._needAppearances}_getCombAppearance(e,t,i,n,s,r,a,o,l,A,c){const u=s/this.data.maxLen,h=this.getBorderAndBackgroundAppearances(c),d=[],g=t.getCharPositions(i);for(const[f,m]of g)d.push(`(${RWe(i.substring(f,m))}) Tj`);const p=d.join(` ${qWe(u)} 0 Td `);return`/Tx BMC q ${h}BT `+e+` 1 0 0 1 ${qWe(a)} ${qWe(o+l)} Tm ${p} ET Q EMC`}_getMultilineAppearance(e,t,i,n,s,r,a,o,l,A,c,u){const h=[],d=s-2*o,g={shift:0};for(let m=0,C=t.length;m<C;m++){const e=t[m],r=this._splitLine(e,i,n,d);for(let t=0,u=r.length;t<u;t++){const e=r[t],u=0===m&&0===t?-l-(c-A):-c;h.push(this._renderText(e,i,n,s,a,g,o,u))}}const p=this.getBorderAndBackgroundAppearances(u),f=h.join("\n");return`/Tx BMC q ${p}BT `+e+` 1 0 0 1 0 ${qWe(r)} Tm ${f} ET Q EMC`}_splitLine(e,t,i,n,s={}){e=s.line||e;const r=s.glyphs||t.charsToGlyphs(e);if(r.length<=1)return[e];const a=s.positions||t.getCharPositions(e),o=i/1e3,l=[];let A=-1,c=-1,u=-1,h=0,d=0;for(let g=0,p=r.length;g<p;g++){const[t,i]=a[g],s=r[g],p=s.width*o;" "===s.unicode?d+p>n?(l.push(e.substring(h,t)),h=t,d=p,A=-1,u=-1):(d+=p,A=t,c=i,u=g):d+p>n?-1!==A?(l.push(e.substring(h,c)),h=c,g=u+1,A=-1,d=0):(l.push(e.substring(h,t)),h=t,d=p):d+=p}return h<e.length&&l.push(e.substring(h,e.length)),l}async extractTextContent(e,t,i){await super.extractTextContent(e,t,i);const n=this.data.textContent;if(!n)return;const s=n.join("\n");if(s===this.data.fieldValue)return;const r=s.replaceAll(/([.*+?^${}()|[\]\\])|(\s+)/g,((e,t)=>t?`\\${t}`:"\\s+"));new RegExp(`^\\s*${r}\\s*$`).test(this.data.fieldValue)&&(this.data.textContent=this.data.fieldValue.split("\n"))}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue||"",multiline:this.data.multiLine,password:this.hasFieldFlag(cqe),charLimit:this.data.maxLen,comb:this.data.comb,editable:!this.data.readOnly,hidden:this.data.hidden,name:this.data.fieldName,rect:this.data.rect,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:"text"}}}class eit extends $tt{constructor(e){super(e),this.checkedAppearance=null,this.uncheckedAppearance=null,this.data.checkBox=!this.hasFieldFlag(uqe)&&!this.hasFieldFlag(hqe),this.data.radioButton=this.hasFieldFlag(uqe)&&!this.hasFieldFlag(hqe),this.data.pushButton=this.hasFieldFlag(hqe),this.data.isTooltipOnly=!1,this.data.checkBox?this._processCheckBox(e):this.data.radioButton?this._processRadioButton(e):this.data.pushButton&&(this.data.hasOwnCanvas=!0,this.data.noHTML=!1,this._processPushButton(e))}async getOperatorList(e,t,i,n){if(this.data.pushButton)return super.getOperatorList(e,t,i,!1,n);let s=null,r=null;if(n){const e=n.get(this.data.id);s=e?e.value:null,r=e?e.rotation:null}if(null===s&&this.appearance)return super.getOperatorList(e,t,i,n);null==s&&(s=this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue);const a=s?this.checkedAppearance:this.uncheckedAppearance;if(a){const s=this.appearance,o=kWe(a.dict.getArray("Matrix"),cKe);r&&a.dict.set("Matrix",this.getRotationMatrix(n)),this.appearance=a;const l=super.getOperatorList(e,t,i,n);return this.appearance=s,a.dict.set("Matrix",o),l}return{opList:new d1e,separateForm:!1,separateCanvas:!1}}async save(e,t,i,n){this.data.checkBox?this._saveCheckbox(e,t,i,n):this.data.radioButton&&this._saveRadioButton(e,t,i,n)}async _saveCheckbox(e,t,i,n){if(!i)return;const s=i.get(this.data.id),r=this._buildFlags(null==s?void 0:s.noView,null==s?void 0:s.noPrint);let a=null==s?void 0:s.rotation,o=null==s?void 0:s.value;if(void 0===a&&void 0===r){if(void 0===o)return;if(this.data.fieldValue===this.data.exportValue===o)return}let l=e.xref.fetchIfRef(this.ref);if(!(l instanceof rWe))return;l=l.clone(),void 0===a&&(a=this.rotation),void 0===o&&(o=this.data.fieldValue===this.data.exportValue);const A={path:this.data.fieldName,value:o?this.data.exportValue:""},c=iWe.get(o?this.data.exportValue:"Off");this.setValue(l,c,e.xref,n),l.set("AS",c),l.set("M",`D:${UVe()}`),void 0!==r&&l.set("F",r);const u=this._getMKDict(a);u&&l.set("MK",u),n.put(this.ref,{data:l,xfa:A,needAppearances:!1})}async _saveRadioButton(e,t,i,n){if(!i)return;const s=i.get(this.data.id),r=this._buildFlags(null==s?void 0:s.noView,null==s?void 0:s.noPrint);let a=null==s?void 0:s.rotation,o=null==s?void 0:s.value;if(void 0===a&&void 0===r){if(void 0===o)return;if(this.data.fieldValue===this.data.buttonValue===o)return}let l=e.xref.fetchIfRef(this.ref);if(!(l instanceof rWe))return;l=l.clone(),void 0===o&&(o=this.data.fieldValue===this.data.buttonValue),void 0===a&&(a=this.rotation);const A={path:this.data.fieldName,value:o?this.data.buttonValue:""},c=iWe.get(o?this.data.buttonValue:"Off");o&&this.setValue(l,c,e.xref,n),l.set("AS",c),l.set("M",`D:${UVe()}`),void 0!==r&&l.set("F",r);const u=this._getMKDict(a);u&&l.set("MK",u),n.put(this.ref,{data:l,xfa:A,needAppearances:!1})}_getDefaultCheckedAppearance(e,t){const i=this.data.rect[2]-this.data.rect[0],n=this.data.rect[3]-this.data.rect[1],s=[0,0,i,n],r=.8*Math.min(i,n);let a,o;"check"===t?(a={width:.755*r,height:.705*r},o="3"):"disc"===t?(a={width:.791*r,height:.705*r},o="l"):gVe(`_getDefaultCheckedAppearance - unsupported type: ${t}`);const l=`q BT /PdfJsZaDb ${r} Tf 0 g ${qWe((i-a.width)/2)} ${qWe((n-a.height)/2)} Td (${o}) Tj ET Q`,A=new rWe(e.xref);A.set("FormType",1),A.set("Subtype",iWe.get("Form")),A.set("Type",iWe.get("XObject")),A.set("BBox",s),A.set("Matrix",[1,0,0,1,0,0]),A.set("Length",l.length);const c=new rWe(e.xref),u=new rWe(e.xref);u.set("PdfJsZaDb",this.fallbackFontDict),c.set("Font",u),A.set("Resources",c),this.checkedAppearance=new $We(l),this.checkedAppearance.dict=A,this._streams.push(this.checkedAppearance)}_processCheckBox(e){const t=e.dict.get("AP");if(!(t instanceof rWe))return;const i=t.get("N");if(!(i instanceof rWe))return;const n=this._decodeFormValue(e.dict.get("AS"));"string"==typeof n&&(this.data.fieldValue=n);const s=null!==this.data.fieldValue&&"Off"!==this.data.fieldValue?this.data.fieldValue:"Yes",r=i.getKeys();if(0===r.length)r.push("Off",s);else if(1===r.length)"Off"===r[0]?r.push(s):r.unshift("Off");else if(r.includes(s))r.length=0,r.push("Off",s);else{const e=r.find((e=>"Off"!==e));r.length=0,r.push("Off",e)}r.includes(this.data.fieldValue)||(this.data.fieldValue="Off"),this.data.exportValue=r[1];const a=i.get(this.data.exportValue);this.checkedAppearance=a instanceof dWe?a:null;const o=i.get("Off");this.uncheckedAppearance=o instanceof dWe?o:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"check"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processRadioButton(e){this.data.buttonValue=null;const t=e.dict.get("Parent");if(t instanceof rWe){this.parent=e.dict.getRaw("Parent");const i=t.get("V");i instanceof iWe&&(this.data.fieldValue=this._decodeFormValue(i))}const i=e.dict.get("AP");if(!(i instanceof rWe))return;const n=i.get("N");if(!(n instanceof rWe))return;for(const a of n.getKeys())if("Off"!==a){this.data.buttonValue=this._decodeFormValue(a);break}const s=n.get(this.data.buttonValue);this.checkedAppearance=s instanceof dWe?s:null;const r=n.get("Off");this.uncheckedAppearance=r instanceof dWe?r:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"disc"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processPushButton(e){const{dict:t,annotationGlobals:i}=e;(t.has("A")||t.has("AA")||this.data.alternativeText)&&(this.data.isTooltipOnly=!t.has("A")&&!t.has("AA"),g2e.parseDestDictionary({destDict:t,resultObj:this.data,docBaseUrl:i.baseUrl,docAttachments:i.attachments}))}getFieldObject(){let e,t="button";return this.data.checkBox?(t="checkbox",e=this.data.exportValue):this.data.radioButton&&(t="radiobutton",e=this.data.buttonValue),{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:e,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,hidden:this.data.hidden,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:t}}get fallbackFontDict(){const e=new rWe;return e.set("BaseFont",iWe.get("ZapfDingbats")),e.set("Type",iWe.get("FallbackType")),e.set("Subtype",iWe.get("FallbackType")),e.set("Encoding",iWe.get("ZapfDingbatsEncoding")),mVe(this,"fallbackFontDict",e)}}class tit extends $tt{constructor(e){super(e);const{dict:t,xref:i}=e;this.indices=t.getArray("I"),this.hasIndices=Array.isArray(this.indices)&&this.indices.length>0,this.data.options=[];const n=BWe({dict:t,key:"Opt"});if(Array.isArray(n))for(let s=0,r=n.length;s<r;s++){const e=i.fetchIfRef(n[s]),t=Array.isArray(e);this.data.options[s]={exportValue:this._decodeFormValue(t?i.fetchIfRef(e[0]):e),displayValue:this._decodeFormValue(t?i.fetchIfRef(e[1]):e)}}if(this.hasIndices){this.data.fieldValue=[];const e=this.data.options.length;for(const t of this.indices)Number.isInteger(t)&&t>=0&&t<e&&this.data.fieldValue.push(this.data.options[t].exportValue)}else"string"==typeof this.data.fieldValue?this.data.fieldValue=[this.data.fieldValue]:this.data.fieldValue||(this.data.fieldValue=[]);this.data.combo=this.hasFieldFlag(dqe),this.data.multiSelect=this.hasFieldFlag(pqe),this._hasText=!0}getFieldObject(){const e=this.data.combo?"combobox":"listbox",t=this.data.fieldValue.length>0?this.data.fieldValue[0]:null;return{id:this.data.id,value:t,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:e}}amendSavedDict(e,t){var i;if(!this.hasIndices)return;let n=null==(i=null==e?void 0:e.get(this.data.id))?void 0:i.value;Array.isArray(n)||(n=[n]);const s=[],{options:r}=this.data;for(let a=0,o=0,l=r.length;a<l;a++)r[a].exportValue===n[o]&&(s.push(a),o+=1);t.set("I",s)}async _getAppearance(e,t,i,n){if(this.data.combo)return super._getAppearance(e,t,i,n);let s,r;const a=null==n?void 0:n.get(this.data.id);if(a&&(r=a.rotation,s=a.value),void 0===r&&void 0===s&&!this._needAppearances)return null;void 0===s?s=this.data.fieldValue:Array.isArray(s)||(s=[s]);let o=this.data.rect[3]-this.data.rect[1],l=this.data.rect[2]-this.data.rect[0];90!==r&&270!==r||([l,o]=[o,l]);const A=this.data.options.length,c=[];for(let B=0;B<A;B++){const{exportValue:e}=this.data.options[B];s.includes(e)&&c.push(B)}this._defaultAppearance||(this.data.defaultAppearanceData=T1e(this._defaultAppearance="/Helvetica 0 Tf 0 g"));const u=await $tt._getFontData(e,t,this.data.defaultAppearanceData,this._fieldResources.mergedResources);let h,{fontSize:d}=this.data.defaultAppearanceData;if(d)h=this._defaultAppearance;else{const e=(o-1)/A;let t,i=-1;for(const{displayValue:n}of this.data.options){const e=this._getTextWidth(n,u);e>i&&(i=e,t=n)}[h,d]=this._computeFontSize(e,l-4,t,u,-1)}const g=d*hKe,p=(g-d)/2,f=Math.floor(o/g);let m=0;if(c.length>0){const e=Math.min(...c),t=Math.max(...c);m=Math.max(0,t-f+1),m>e&&(m=e)}const C=Math.min(m+f+1,A),I=["/Tx BMC q",`1 1 ${l} ${o} re W n`];if(c.length){I.push("0.600006 0.756866 0.854904 rg");for(const e of c)m<=e&&e<C&&I.push(`1 ${o-(e-m+1)*g} ${l} ${g} re f`)}I.push("BT",h,`1 0 0 1 0 ${o} Tm`);const v={shift:0};for(let B=m;B<C;B++){const{displayValue:e}=this.data.options[B],t=B===m?p:0;I.push(this._renderText(e,u,d,l,0,v,2,-g+t))}return I.push("ET Q EMC"),I.join("\n")}}class iit extends $tt{constructor(e){super(e),this.data.fieldValue=null,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!this.data.hasOwnCanvas}getFieldObject(){return{id:this.data.id,value:null,page:this.data.pageIndex,type:"signature"}}}class nit extends Xtt{constructor(e){super(e),this.data.noRotate=!0,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;const{dict:t}=e;this.data.annotationType=MKe,this.data.hasAppearance?this.data.name="NoIcon":(this.data.rect[1]=this.data.rect[3]-22,this.data.rect[2]=this.data.rect[0]+22,this.data.name=t.has("Name")?t.get("Name").name:"Note"),t.has("State")?(this.data.state=t.get("State")||null,this.data.stateModel=t.get("StateModel")||null):(this.data.state=null,this.data.stateModel=null)}}class sit extends Jtt{constructor(e){var t;super(e);const{dict:i,annotationGlobals:n}=e;this.data.annotationType=RKe,this.data.noHTML=!1;const s=Wtt(i,this.rectangle);s&&(this.data.quadPoints=s),(t=this.data).borderColor||(t.borderColor=this.data.color),g2e.parseDestDictionary({destDict:i,resultObj:this.data,docBaseUrl:n.baseUrl,docAttachments:n.attachments})}}class rit extends Jtt{constructor(e){super(e);const{dict:t}=e;this.data.annotationType=JKe,this.data.noHTML=!1,this.data.rect[0]!==this.data.rect[2]&&this.data.rect[1]!==this.data.rect[3]||(this.data.rect=null);let i=t.get("Parent");if(!i)return;this.data.parentRect=FWe(i.getArray("Rect"),null);if(AWe(i.get("RT"),$Ke)&&(i=i.get("IRT")),i.has("M")?(this.setModificationDate(i.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,i.has("C")?(this.setColor(i.getArray("C")),this.data.color=this.color):this.data.color=null,!this.viewable){const e=i.get("F");this._isViewable(e)&&this.setFlags(e)}this.setTitle(i.get("T")),this.data.titleObj=this._title,this.setContents(i.get("Contents")),this.data.contentsObj=this._contents,i.has("RC")&&(this.data.richText=Ktt.getRichTextAsHtml(i.get("RC"))),this.data.open=!!t.get("Open")}}class ait extends Xtt{constructor(e){var t;super(e),this.data.hasOwnCanvas=this.data.noRotate,this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1;const{evaluatorOptions:i,xref:n}=e;if(this.data.annotationType=NKe,this.setDefaultAppearance(e),this._hasAppearance=!!this.appearance,this._hasAppearance){const{fontColor:e,fontSize:t}=function(e,t,i){return new M1e(e,t,i).parse()}(this.appearance,i,n);this.data.defaultAppearanceData.fontColor=e,this.data.defaultAppearanceData.fontSize=t||10}else{(t=this.data.defaultAppearanceData).fontSize||(t.fontSize=10);const{fontColor:i,fontSize:s}=this.data.defaultAppearanceData;if(this._contents.str){this.data.textContent=this._contents.str.split(/\r\n?|\n/).map((e=>e.trimEnd()));const{coords:e,bbox:t,matrix:i}=N1e.getFirstPositionInfo(this.rectangle,this.rotation,s);this.data.textPosition=this._transformPoint(e,t,i)}if(this._isOffscreenCanvasSupported){const t=e.dict.get("CA"),r=new N1e(n,"sans-serif");this.appearance=r.createAppearance(this._contents.str,this.rectangle,this.rotation,s,i,t),this._streams.push(this.appearance)}}}get hasTextContent(){return this._hasAppearance}static createNewDict(e,t,{apRef:i,ap:n}){const{color:s,fontSize:r,oldAnnotation:a,rect:o,rotation:l,user:A,value:c}=e,u=a||new rWe(t);u.set("Type",iWe.get("Annot")),u.set("Subtype",iWe.get("FreeText")),a?(u.set("M",`D:${UVe()}`),u.delete("RC")):u.set("CreationDate",`D:${UVe()}`),u.set("Rect",o);const h=`/Helv ${r} Tf ${R1e(s,!0)}`;if(u.set("DA",h),u.set("Contents",VWe(c)),u.set("F",4),u.set("Border",[0,0,0]),u.set("Rotate",l),A&&u.set("T",VWe(A)),i||n){const e=new rWe(t);u.set("AP",e),i?e.set("N",i):e.set("N",n)}return u}static async createNewAppearanceStream(e,t,i){const{baseFontRef:n,evaluator:s,task:r}=i,{color:a,fontSize:o,rect:l,rotation:A,value:c}=e,u=new rWe(t),h=new rWe(t);if(n)h.set("Helv",n);else{const e=new rWe(t);e.set("BaseFont",iWe.get("Helvetica")),e.set("Type",iWe.get("Font")),e.set("Subtype",iWe.get("Type1")),e.set("Encoding",iWe.get("WinAnsiEncoding")),h.set("Helv",e)}u.set("Font",h);const d=await $tt._getFontData(s,r,{fontName:"Helv",fontSize:o},u),[g,p,f,m]=l;let C=f-g,I=m-p;A%180!=0&&([C,I]=[I,C]);const v=c.split("\n"),B=o/1e3;let y=-1/0;const b=[];for(let U of v){const e=d.encodeString(U);if(e.length>1)return null;U=e.join(""),b.push(U);let t=0;const i=d.charsToGlyphs(U);for(const n of i)t+=n.width*B;y=Math.max(y,t)}let E=1;y>C&&(E=C/y);let w=1;const Q=hKe*o,_=1*o,S=Q*v.length;S>I&&(w=I/S);const x=o*Math.min(E,w);let k,D,F;switch(A){case 0:F=[1,0,0,1],D=[l[0],l[1],C,I],k=[l[0],l[3]-_];break;case 90:F=[0,1,-1,0],D=[l[1],-l[2],C,I],k=[l[1],-l[0]-_];break;case 180:F=[-1,0,0,-1],D=[-l[2],-l[3],C,I],k=[-l[2],-l[1]-_];break;case 270:F=[0,-1,1,0],D=[-l[3],l[0],C,I],k=[-l[3],l[2]-_]}const T=["q",`${F.join(" ")} 0 0 cm`,`${D.join(" ")} re W n`,"BT",`${R1e(a,!0)}`,`0 Tc /Helv ${qWe(x)} Tf`];T.push(`${k.join(" ")} Td (${RWe(b[0])}) Tj`);const M=qWe(Q);for(let U=1,H=b.length;U<H;U++){const e=b[U];T.push(`0 -${M} Td (${RWe(e)}) Tj`)}T.push("ET","Q");const R=T.join("\n"),N=new rWe(t);N.set("FormType",1),N.set("Subtype",iWe.get("Form")),N.set("Type",iWe.get("XObject")),N.set("BBox",l),N.set("Resources",u),N.set("Matrix",[1,0,0,1,-l[0],-l[1]]);const L=new $We(R);return L.dict=N,L}}class oit extends Xtt{constructor(e){super(e);const{dict:t,xref:i}=e;this.data.annotationType=LKe,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;const n=DWe(t.getArray("L"),[0,0,0,0]);if(this.data.lineCoordinates=FVe.normalizeRect(n),this.setLineEndings(t.getArray("LE")),this.data.lineEndings=this.lineEndings,!this.appearance){const e=this.color?Vtt(this.color):[0,0,0],s=t.get("CA"),r=Ytt(t.getArray("IC"),null),a=r?Vtt(r):null,o=a?s:null,l=this.borderStyle.width||1,A=2*l,c=[this.data.lineCoordinates[0]-A,this.data.lineCoordinates[1]-A,this.data.lineCoordinates[2]+A,this.data.lineCoordinates[3]+A];FVe.intersect(this.rectangle,c)||(this.rectangle=c),this._setDefaultAppearance({xref:i,extra:`${l} w`,strokeColor:e,fillColor:a,strokeAlpha:s,fillAlpha:o,pointsCallback:(e,t)=>(e.push(`${n[0]} ${n[1]} m`,`${n[2]} ${n[3]} l`,"S"),[t[0]-l,t[2]+l,t[7]-l,t[3]+l])})}}}class lit extends Xtt{constructor(e){super(e);const{dict:t,xref:i}=e;if(this.data.annotationType=UKe,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,!this.appearance){const e=this.color?Vtt(this.color):[0,0,0],n=t.get("CA"),s=Ytt(t.getArray("IC"),null),r=s?Vtt(s):null,a=r?n:null;if(0===this.borderStyle.width&&!r)return;this._setDefaultAppearance({xref:i,extra:`${this.borderStyle.width} w`,strokeColor:e,fillColor:r,strokeAlpha:n,fillAlpha:a,pointsCallback:(e,t)=>{const i=t[4]+this.borderStyle.width/2,n=t[5]+this.borderStyle.width/2,s=t[6]-t[4]-this.borderStyle.width,a=t[3]-t[7]-this.borderStyle.width;return e.push(`${i} ${n} ${s} ${a} re`),r?e.push("B"):e.push("S"),[t[0],t[2],t[7],t[3]]}})}}}class Ait extends Xtt{constructor(e){super(e);const{dict:t,xref:i}=e;if(this.data.annotationType=HKe,!this.appearance){const e=this.color?Vtt(this.color):[0,0,0],n=t.get("CA"),s=Ytt(t.getArray("IC"),null),r=s?Vtt(s):null,a=r?n:null;if(0===this.borderStyle.width&&!r)return;const o=4/3*Math.tan(Math.PI/8);this._setDefaultAppearance({xref:i,extra:`${this.borderStyle.width} w`,strokeColor:e,fillColor:r,strokeAlpha:n,fillAlpha:a,pointsCallback:(e,t)=>{const i=t[0]+this.borderStyle.width/2,n=t[1]-this.borderStyle.width/2,s=t[6]-this.borderStyle.width/2,a=t[7]+this.borderStyle.width/2,l=i+(s-i)/2,A=n+(a-n)/2,c=(s-i)/2*o,u=(a-n)/2*o;return e.push(`${l} ${a} m`,`${l+c} ${a} ${s} ${A+u} ${s} ${A} c`,`${s} ${A-u} ${l+c} ${n} ${l} ${n} c`,`${l-c} ${n} ${i} ${A-u} ${i} ${A} c`,`${i} ${A+u} ${l-c} ${a} ${l} ${a} c`,"h"),r?e.push("B"):e.push("S"),[t[0],t[2],t[7],t[3]]}})}}}class cit extends Xtt{constructor(e){super(e);const{dict:t,xref:i}=e;this.data.annotationType=OKe,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,this.data.vertices=null,this instanceof uit||(this.setLineEndings(t.getArray("LE")),this.data.lineEndings=this.lineEndings);const n=t.getArray("Vertices");if(!xWe(n,null))return;const s=this.data.vertices=Float32Array.from(n);if(!this.appearance){const e=this.color?Vtt(this.color):[0,0,0],n=t.get("CA"),r=this.borderStyle.width||1,a=2*r,o=[1/0,1/0,-1/0,-1/0];for(let t=0,i=s.length;t<i;t+=2)o[0]=Math.min(o[0],s[t]-a),o[1]=Math.min(o[1],s[t+1]-a),o[2]=Math.max(o[2],s[t]+a),o[3]=Math.max(o[3],s[t+1]+a);FVe.intersect(this.rectangle,o)||(this.rectangle=o),this._setDefaultAppearance({xref:i,extra:`${r} w`,strokeColor:e,strokeAlpha:n,pointsCallback:(e,t)=>{for(let i=0,n=s.length;i<n;i+=2)e.push(`${s[i]} ${s[i+1]} ${0===i?"m":"l"}`);return e.push("S"),[t[0],t[2],t[7],t[3]]}})}}}class uit extends cit{constructor(e){super(e),this.data.annotationType=PKe}}class hit extends Xtt{constructor(e){super(e),this.data.annotationType=WKe}}class dit extends Xtt{constructor(e){super(e),this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;const{dict:t,xref:i}=e;this.data.annotationType=jKe,this.data.inkLists=[],this.data.isEditable=!this.data.noHTML&&"InkHighlight"===this.data.it,this.data.noHTML=!1,this.data.opacity=t.get("CA")||1;const n=t.getArray("InkList");if(Array.isArray(n)){for(let e=0,t=n.length;e<t;++e){if(!Array.isArray(n[e]))continue;const t=new Float32Array(n[e].length);this.data.inkLists.push(t);for(let s=0,r=n[e].length;s<r;s+=2){const r=i.fetchIfRef(n[e][s]),a=i.fetchIfRef(n[e][s+1]);"number"==typeof r&&"number"==typeof a&&(t[s]=r,t[s+1]=a)}}if(!this.appearance){const e=this.color?Vtt(this.color):[0,0,0],n=t.get("CA"),s=this.borderStyle.width||1,r=2*s,a=[1/0,1/0,-1/0,-1/0];for(const t of this.data.inkLists)for(let e=0,i=t.length;e<i;e+=2)a[0]=Math.min(a[0],t[e]-r),a[1]=Math.min(a[1],t[e+1]-r),a[2]=Math.max(a[2],t[e]+r),a[3]=Math.max(a[3],t[e+1]+r);FVe.intersect(this.rectangle,a)||(this.rectangle=a),this._setDefaultAppearance({xref:i,extra:`${s} w`,strokeColor:e,strokeAlpha:n,pointsCallback:(e,t)=>{for(const i of this.data.inkLists){for(let t=0,n=i.length;t<n;t+=2)e.push(`${i[t]} ${i[t+1]} ${0===t?"m":"l"}`);e.push("S")}return[t[0],t[2],t[7],t[3]]}})}}}static createNewDict(e,t,{apRef:i,ap:n}){const{color:s,opacity:r,paths:a,outlines:o,rect:l,rotation:A,thickness:c}=e,u=new rWe(t);u.set("Type",iWe.get("Annot")),u.set("Subtype",iWe.get("Ink")),u.set("CreationDate",`D:${UVe()}`),u.set("Rect",l),u.set("InkList",(null==o?void 0:o.points)||a.map((e=>e.points))),u.set("F",4),u.set("Rotate",A),o&&u.set("IT",iWe.get("InkHighlight"));const h=new rWe(t);u.set("BS",h),h.set("W",c),u.set("C",Array.from(s,(e=>e/255))),u.set("CA",r);const d=new rWe(t);return u.set("AP",d),i?d.set("N",i):d.set("N",n),u}static async createNewAppearanceStream(e,t,i){if(e.outlines)return this.createNewAppearanceStreamForHighlight(e,t,i);const{color:n,rect:s,paths:r,thickness:a,opacity:o}=e,l=[`${a} w 1 J 1 j`,`${R1e(n,!1)}`];1!==o&&l.push("/R0 gs");const A=[];for(const{bezier:d}of r){if(A.length=0,A.push(`${qWe(d[0])} ${qWe(d[1])} m`),2===d.length)A.push(`${qWe(d[0])} ${qWe(d[1])} l S`);else{for(let e=2,t=d.length;e<t;e+=6){const t=d.slice(e,e+6).map(qWe).join(" ");A.push(`${t} c`)}A.push("S")}l.push(A.join("\n"))}const c=l.join("\n"),u=new rWe(t);if(u.set("FormType",1),u.set("Subtype",iWe.get("Form")),u.set("Type",iWe.get("XObject")),u.set("BBox",s),u.set("Length",c.length),1!==o){const e=new rWe(t),i=new rWe(t),n=new rWe(t);n.set("CA",o),n.set("Type",iWe.get("ExtGState")),i.set("R0",n),e.set("ExtGState",i),u.set("Resources",e)}const h=new $We(c);return h.dict=u,h}static async createNewAppearanceStreamForHighlight(e,t,i){const{color:n,rect:s,outlines:{outline:r},opacity:a}=e,o=[`${R1e(n,!0)}`,"/R0 gs"];o.push(`${qWe(r[4])} ${qWe(r[5])} m`);for(let g=6,p=r.length;g<p;g+=6)if(isNaN(r[g])||null===r[g])o.push(`${qWe(r[g+4])} ${qWe(r[g+5])} l`);else{const e=r.slice(g,g+6).map(qWe).join(" ");o.push(`${e} c`)}o.push("h f");const l=o.join("\n"),A=new rWe(t);A.set("FormType",1),A.set("Subtype",iWe.get("Form")),A.set("Type",iWe.get("XObject")),A.set("BBox",s),A.set("Length",l.length);const c=new rWe(t),u=new rWe(t);c.set("ExtGState",u),A.set("Resources",c);const h=new rWe(t);u.set("R0",h),h.set("BM",iWe.get("Multiply")),1!==a&&(h.set("ca",a),h.set("Type",iWe.get("ExtGState")));const d=new $We(l);return d.dict=A,d}}class git extends Xtt{constructor(e){var t;super(e);const{dict:i,xref:n}=e;this.data.annotationType=GKe,this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1,this.data.opacity=i.get("CA")||1;if(this.data.quadPoints=Wtt(i,null)){const e=null==(t=this.appearance)?void 0:t.dict.get("Resources");if(!this.appearance||!(null==e?void 0:e.has("ExtGState"))){this.appearance;const e=this.color?Vtt(this.color):[1,1,0],t=i.get("CA");this._setDefaultAppearance({xref:n,fillColor:e,blendMode:"Multiply",fillAlpha:t,pointsCallback:(e,t)=>(e.push(`${t[0]} ${t[1]} m`,`${t[2]} ${t[3]} l`,`${t[6]} ${t[7]} l`,`${t[4]} ${t[5]} l`,"f"),[t[0],t[2],t[7],t[3]])})}}else this.data.popupRef=null}static createNewDict(e,t,{apRef:i,ap:n}){const{color:s,oldAnnotation:r,opacity:a,rect:o,rotation:l,user:A,quadPoints:c}=e,u=r||new rWe(t);if(u.set("Type",iWe.get("Annot")),u.set("Subtype",iWe.get("Highlight")),u.set(r?"M":"CreationDate",`D:${UVe()}`),u.set("CreationDate",`D:${UVe()}`),u.set("Rect",o),u.set("F",4),u.set("Border",[0,0,0]),u.set("Rotate",l),u.set("QuadPoints",c),u.set("C",Array.from(s,(e=>e/255))),u.set("CA",a),A&&u.set("T",VWe(A)),i||n){const e=new rWe(t);u.set("AP",e),e.set("N",i||n)}return u}static async createNewAppearanceStream(e,t,i){const{color:n,rect:s,outlines:r,opacity:a}=e,o=[`${R1e(n,!0)}`,"/R0 gs"],l=[];for(const p of r){l.length=0,l.push(`${qWe(p[0])} ${qWe(p[1])} m`);for(let e=2,t=p.length;e<t;e+=2)l.push(`${qWe(p[e])} ${qWe(p[e+1])} l`);l.push("h"),o.push(l.join("\n"))}o.push("f*");const A=o.join("\n"),c=new rWe(t);c.set("FormType",1),c.set("Subtype",iWe.get("Form")),c.set("Type",iWe.get("XObject")),c.set("BBox",s),c.set("Length",A.length);const u=new rWe(t),h=new rWe(t);u.set("ExtGState",h),c.set("Resources",u);const d=new rWe(t);h.set("R0",d),d.set("BM",iWe.get("Multiply")),1!==a&&(d.set("ca",a),d.set("Type",iWe.get("ExtGState")));const g=new $We(A);return g.dict=c,g}}class pit extends Xtt{constructor(e){super(e);const{dict:t,xref:i}=e;this.data.annotationType=KKe;if(this.data.quadPoints=Wtt(t,null)){if(!this.appearance){const e=this.color?Vtt(this.color):[0,0,0],n=t.get("CA");this._setDefaultAppearance({xref:i,extra:"[] 0 d 0.571 w",strokeColor:e,strokeAlpha:n,pointsCallback:(e,t)=>(e.push(`${t[4]} ${t[5]+1.3} m`,`${t[6]} ${t[7]+1.3} l`,"S"),[t[0],t[2],t[7],t[3]])})}}else this.data.popupRef=null}}class fit extends Xtt{constructor(e){super(e);const{dict:t,xref:i}=e;this.data.annotationType=qKe;if(this.data.quadPoints=Wtt(t,null)){if(!this.appearance){const e=this.color?Vtt(this.color):[0,0,0],n=t.get("CA");this._setDefaultAppearance({xref:i,extra:"[] 0 d 1 w",strokeColor:e,strokeAlpha:n,pointsCallback:(e,t)=>{const i=(t[1]-t[5])/6;let n=i,s=t[4];const r=t[5],a=t[6];e.push(`${s} ${r+n} m`);do{s+=2,n=0===n?i:0,e.push(`${s} ${r+n} l`)}while(s<a);return e.push("S"),[t[4],a,r-2*i,r+2*i]}})}}else this.data.popupRef=null}}class mit extends Xtt{constructor(e){super(e);const{dict:t,xref:i}=e;this.data.annotationType=YKe;if(this.data.quadPoints=Wtt(t,null)){if(!this.appearance){const e=this.color?Vtt(this.color):[0,0,0],n=t.get("CA");this._setDefaultAppearance({xref:i,extra:"[] 0 d 1 w",strokeColor:e,strokeAlpha:n,pointsCallback:(e,t)=>(e.push(`${(t[0]+t[4])/2} ${(t[1]+t[5])/2} m`,`${(t[2]+t[6])/2} ${(t[3]+t[7])/2} l`,"S"),[t[0],t[2],t[7],t[3]])})}}else this.data.popupRef=null}}class Cit extends Xtt{constructor(e){super(e),yc(this,$A),this.data.annotationType=VKe,bc(this,$A,this.data.hasOwnCanvas=this.data.noRotate),this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1}mustBeViewedWhenEditing(e,t=null){return e?!!this.data.isEditable&&(bc(this,$A,this.data.hasOwnCanvas),this.data.hasOwnCanvas=!0,!0):(this.data.hasOwnCanvas=Bc(this,$A),!(null==t?void 0:t.has(this.data.id)))}static async createImage(e,t){const{width:i,height:n}=e,s=new OffscreenCanvas(i,n),r=s.getContext("2d",{alpha:!0});r.drawImage(e,0,0);const a=r.getImageData(0,0,i,n).data,o=new Uint32Array(a.buffer),l=o.some(kVe.isLittleEndian?e=>e>>>24!=255:e=>!!(255&~e));l&&(r.fillStyle="white",r.fillRect(0,0,i,n),r.drawImage(e,0,0));const A=s.convertToBlob({type:"image/jpeg",quality:1}).then((e=>e.arrayBuffer())),c=iWe.get("XObject"),u=iWe.get("Image"),h=new rWe(t);h.set("Type",c),h.set("Subtype",u),h.set("BitsPerComponent",8),h.set("ColorSpace",iWe.get("DeviceRGB")),h.set("Filter",iWe.get("DCTDecode")),h.set("BBox",[0,0,i,n]),h.set("Width",i),h.set("Height",n);let d=null;if(l){const e=new Uint8Array(o.length);if(kVe.isLittleEndian)for(let t=0,i=o.length;t<i;t++)e[t]=o[t]>>>24;else for(let t=0,i=o.length;t<i;t++)e[t]=255&o[t];const s=new rWe(t);s.set("Type",c),s.set("Subtype",u),s.set("BitsPerComponent",8),s.set("ColorSpace",iWe.get("DeviceGray")),s.set("Width",i),s.set("Height",n),d=new XWe(e,0,0,s)}return{imageStream:new XWe(await A,0,0,h),smaskStream:d,width:i,height:n}}static createNewDict(e,t,{apRef:i,ap:n}){const{oldAnnotation:s,rect:r,rotation:a,user:o}=e,l=s||new rWe(t);if(l.set("Type",iWe.get("Annot")),l.set("Subtype",iWe.get("Stamp")),l.set(s?"M":"CreationDate",`D:${UVe()}`),l.set("CreationDate",`D:${UVe()}`),l.set("Rect",r),l.set("F",4),l.set("Border",[0,0,0]),l.set("Rotate",a),o&&l.set("T",VWe(o)),i||n){const e=new rWe(t);l.set("AP",e),i?e.set("N",i):e.set("N",n)}return l}static async createNewAppearanceStream(e,t,i){if(e.oldAnnotation)return null;const{rotation:n}=e,{imageRef:s,width:r,height:a}=i.image,o=new rWe(t),l=new rWe(t);o.set("XObject",l),l.set("Im0",s);const A=`q ${r} 0 0 ${a} 0 0 cm /Im0 Do Q`,c=new rWe(t);if(c.set("FormType",1),c.set("Subtype",iWe.get("Form")),c.set("Type",iWe.get("XObject")),c.set("BBox",[0,0,r,a]),c.set("Resources",o),n){const e=JWe(n,r,a);c.set("Matrix",e)}const u=new $We(A);return u.dict=c,u}}$A=new WeakMap;class Iit extends Xtt{constructor(e){super(e);const{dict:t,xref:i}=e,n=new G1e(t.get("FS"),i);this.data.annotationType=zKe,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,this.data.file=n.serializable;const s=t.get("Name");this.data.name=s instanceof iWe?MVe(s.name):"PushPin";const r=t.get("ca");this.data.fillAlpha="number"==typeof r&&r>=0&&r<=1?r:null}}class vit extends yje{constructor(e,t,i){super(t),this.str=e,this.dict=e.dict,this.decrypt=i,this.nextChunk=null,this.initialized=!1}readBlock(){var e;let t;if(this.initialized?t=this.nextChunk:(t=this.str.getBytes(512),this.initialized=!0),!t||0===t.length)return void(this.eof=!0);this.nextChunk=this.str.getBytes(512);const i=(null==(e=this.nextChunk)?void 0:e.length)>0;t=(0,this.decrypt)(t,!i);const n=this.bufferLength,s=n+t.length;this.ensureBuffer(s).set(t,n),this.bufferLength=s}}class Bit{constructor(e){this.a=0,this.b=0;const t=new Uint8Array(256),i=e.length;for(let n=0;n<256;++n)t[n]=n;for(let n=0,s=0;n<256;++n){const r=t[n];s=s+r+e[n%i]&255,t[n]=t[s],t[s]=r}this.s=t}encryptBlock(e){let t=this.a,i=this.b;const n=this.s,s=e.length,r=new Uint8Array(s);for(let a=0;a<s;++a){t=t+1&255;const s=n[t];i=i+s&255;const o=n[i];n[t]=o,n[i]=s,r[a]=e[a]^n[s+o&255]}return this.a=t,this.b=i,r}decryptBlock(e){return this.encryptBlock(e)}encrypt(e){return this.encryptBlock(e)}}const yit=function(){const e=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),t=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);return function(i,n,s){let r=1732584193,a=-271733879,o=-1732584194,l=271733878;const A=s+72&-64,c=new Uint8Array(A);let u,h;for(u=0;u<s;++u)c[u]=i[n++];c[u++]=128;const d=A-8;for(;u<d;)c[u++]=0;c[u++]=s<<3&255,c[u++]=s>>5&255,c[u++]=s>>13&255,c[u++]=s>>21&255,c[u++]=s>>>29&255,c[u++]=0,c[u++]=0,c[u++]=0;const g=new Int32Array(16);for(u=0;u<A;){for(h=0;h<16;++h,u+=4)g[h]=c[u]|c[u+1]<<8|c[u+2]<<16|c[u+3]<<24;let i,n,s=r,A=a,d=o,p=l;for(h=0;h<64;++h){h<16?(i=A&d|~A&p,n=h):h<32?(i=p&A|~p&d,n=5*h+1&15):h<48?(i=A^d^p,n=3*h+5&15):(i=d^(A|~p),n=7*h&15);const r=p,a=s+i+t[h]+g[n]|0,o=e[h];p=d,d=A,A=A+(a<<o|a>>>32-o)|0,s=r}r=r+s|0,a=a+A|0,o=o+d|0,l=l+p|0}return new Uint8Array([255&r,r>>8&255,r>>16&255,r>>>24&255,255&a,a>>8&255,a>>16&255,a>>>24&255,255&o,o>>8&255,o>>16&255,o>>>24&255,255&l,l>>8&255,l>>16&255,l>>>24&255])}}();class bit{constructor(e,t){this.high=0|e,this.low=0|t}and(e){this.high&=e.high,this.low&=e.low}xor(e){this.high^=e.high,this.low^=e.low}or(e){this.high|=e.high,this.low|=e.low}shiftRight(e){e>=32?(this.low=this.high>>>e-32|0,this.high=0):(this.low=this.low>>>e|this.high<<32-e,this.high=this.high>>>e|0)}shiftLeft(e){e>=32?(this.high=this.low<<e-32,this.low=0):(this.high=this.high<<e|this.low>>>32-e,this.low<<=e)}rotateRight(e){let t,i;32&e?(i=this.low,t=this.high):(t=this.low,i=this.high),e&=31,this.low=t>>>e|i<<32-e,this.high=i>>>e|t<<32-e}not(){this.high=~this.high,this.low=~this.low}add(e){const t=(this.low>>>0)+(e.low>>>0);let i=(this.high>>>0)+(e.high>>>0);t>4294967295&&(i+=1),this.low=0|t,this.high=0|i}copyTo(e,t){e[t]=this.high>>>24&255,e[t+1]=this.high>>16&255,e[t+2]=this.high>>8&255,e[t+3]=255&this.high,e[t+4]=this.low>>>24&255,e[t+5]=this.low>>16&255,e[t+6]=this.low>>8&255,e[t+7]=255&this.low}assign(e){this.high=e.high,this.low=e.low}}const Eit=function(){function e(e,t){return e>>>t|e<<32-t}function t(e,t,i){return e&t^~e&i}function i(e,t,i){return e&t^e&i^t&i}function n(t){return e(t,2)^e(t,13)^e(t,22)}function s(t){return e(t,6)^e(t,11)^e(t,25)}function r(t){return e(t,7)^e(t,18)^t>>>3}const a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return function(o,l,A){let c=1779033703,u=3144134277,h=1013904242,d=2773480762,g=1359893119,p=2600822924,f=528734635,m=1541459225;const C=64*Math.ceil((A+9)/64),I=new Uint8Array(C);let v,B;for(v=0;v<A;++v)I[v]=o[l++];I[v++]=128;const y=C-8;for(;v<y;)I[v++]=0;I[v++]=0,I[v++]=0,I[v++]=0,I[v++]=A>>>29&255,I[v++]=A>>21&255,I[v++]=A>>13&255,I[v++]=A>>5&255,I[v++]=A<<3&255;const b=new Uint32Array(64);for(v=0;v<C;){for(B=0;B<16;++B)b[B]=I[v]<<24|I[v+1]<<16|I[v+2]<<8|I[v+3],v+=4;for(B=16;B<64;++B)b[B]=0|(e(E=b[B-2],17)^e(E,19)^E>>>10)+b[B-7]+r(b[B-15])+b[B-16];let o,l,A=c,C=u,y=h,w=d,Q=g,_=p,S=f,x=m;for(B=0;B<64;++B)o=x+s(Q)+t(Q,_,S)+a[B]+b[B],l=n(A)+i(A,C,y),x=S,S=_,_=Q,Q=w+o|0,w=y,y=C,C=A,A=o+l|0;c=c+A|0,u=u+C|0,h=h+y|0,d=d+w|0,g=g+Q|0,p=p+_|0,f=f+S|0,m=m+x|0}var E;return new Uint8Array([c>>24&255,c>>16&255,c>>8&255,255&c,u>>24&255,u>>16&255,u>>8&255,255&u,h>>24&255,h>>16&255,h>>8&255,255&h,d>>24&255,d>>16&255,d>>8&255,255&d,g>>24&255,g>>16&255,g>>8&255,255&g,p>>24&255,p>>16&255,p>>8&255,255&p,f>>24&255,f>>16&255,f>>8&255,255&f,m>>24&255,m>>16&255,m>>8&255,255&m])}}(),wit=function(){function e(e,t,i,n,s){e.assign(t),e.and(i),s.assign(t),s.not(),s.and(n),e.xor(s)}function t(e,t,i,n,s){e.assign(t),e.and(i),s.assign(t),s.and(n),e.xor(s),s.assign(i),s.and(n),e.xor(s)}function i(e,t,i){e.assign(t),e.rotateRight(28),i.assign(t),i.rotateRight(34),e.xor(i),i.assign(t),i.rotateRight(39),e.xor(i)}function n(e,t,i){e.assign(t),e.rotateRight(14),i.assign(t),i.rotateRight(18),e.xor(i),i.assign(t),i.rotateRight(41),e.xor(i)}function s(e,t,i){e.assign(t),e.rotateRight(1),i.assign(t),i.rotateRight(8),e.xor(i),i.assign(t),i.shiftRight(7),e.xor(i)}function r(e,t,i){e.assign(t),e.rotateRight(19),i.assign(t),i.rotateRight(61),e.xor(i),i.assign(t),i.shiftRight(6),e.xor(i)}const a=[new bit(1116352408,3609767458),new bit(1899447441,602891725),new bit(3049323471,3964484399),new bit(3921009573,2173295548),new bit(961987163,4081628472),new bit(1508970993,3053834265),new bit(2453635748,2937671579),new bit(2870763221,3664609560),new bit(3624381080,2734883394),new bit(310598401,1164996542),new bit(607225278,1323610764),new bit(1426881987,3590304994),new bit(1925078388,4068182383),new bit(2162078206,991336113),new bit(2614888103,633803317),new bit(3248222580,3479774868),new bit(3835390401,2666613458),new bit(4022224774,944711139),new bit(264347078,2341262773),new bit(604807628,2007800933),new bit(770255983,1495990901),new bit(1249150122,1856431235),new bit(1555081692,3175218132),new bit(1996064986,2198950837),new bit(2554220882,3999719339),new bit(2821834349,766784016),new bit(2952996808,2566594879),new bit(3210313671,3203337956),new bit(3336571891,1034457026),new bit(3584528711,2466948901),new bit(113926993,3758326383),new bit(338241895,168717936),new bit(666307205,1188179964),new bit(773529912,1546045734),new bit(1294757372,1522805485),new bit(1396182291,2643833823),new bit(1695183700,2343527390),new bit(1986661051,1014477480),new bit(2177026350,1206759142),new bit(2456956037,344077627),new bit(2730485921,1290863460),new bit(2820302411,3158454273),new bit(3259730800,3505952657),new bit(3345764771,106217008),new bit(3516065817,3606008344),new bit(3600352804,1432725776),new bit(4094571909,1467031594),new bit(275423344,851169720),new bit(430227734,3100823752),new bit(506948616,1363258195),new bit(659060556,3750685593),new bit(883997877,3785050280),new bit(958139571,3318307427),new bit(1322822218,3812723403),new bit(1537002063,2003034995),new bit(1747873779,3602036899),new bit(1955562222,1575990012),new bit(2024104815,1125592928),new bit(2227730452,2716904306),new bit(2361852424,442776044),new bit(2428436474,593698344),new bit(2756734187,3733110249),new bit(3204031479,2999351573),new bit(3329325298,3815920427),new bit(3391569614,3928383900),new bit(3515267271,566280711),new bit(3940187606,3454069534),new bit(4118630271,4000239992),new bit(116418474,1914138554),new bit(174292421,2731055270),new bit(289380356,3203993006),new bit(460393269,320620315),new bit(685471733,587496836),new bit(852142971,1086792851),new bit(1017036298,365543100),new bit(1126000580,2618297676),new bit(1288033470,3409855158),new bit(1501505948,4234509866),new bit(1607167915,987167468),new bit(1816402316,1246189591)];return function(o,l,A,c=!1){let u,h,d,g,p,f,m,C;c?(u=new bit(3418070365,3238371032),h=new bit(1654270250,914150663),d=new bit(2438529370,812702999),g=new bit(355462360,4144912697),p=new bit(1731405415,4290775857),f=new bit(2394180231,1750603025),m=new bit(3675008525,1694076839),C=new bit(1203062813,3204075428)):(u=new bit(1779033703,4089235720),h=new bit(3144134277,2227873595),d=new bit(1013904242,4271175723),g=new bit(2773480762,1595750129),p=new bit(1359893119,2917565137),f=new bit(2600822924,725511199),m=new bit(528734635,4215389547),C=new bit(1541459225,327033209));const I=128*Math.ceil((A+17)/128),v=new Uint8Array(I);let B,y;for(B=0;B<A;++B)v[B]=o[l++];v[B++]=128;const b=I-16;for(;B<b;)v[B++]=0;v[B++]=0,v[B++]=0,v[B++]=0,v[B++]=0,v[B++]=0,v[B++]=0,v[B++]=0,v[B++]=0,v[B++]=0,v[B++]=0,v[B++]=0,v[B++]=A>>>29&255,v[B++]=A>>21&255,v[B++]=A>>13&255,v[B++]=A>>5&255,v[B++]=A<<3&255;const E=new Array(80);for(B=0;B<80;B++)E[B]=new bit(0,0);let w=new bit(0,0),Q=new bit(0,0),_=new bit(0,0),S=new bit(0,0),x=new bit(0,0),k=new bit(0,0),D=new bit(0,0),F=new bit(0,0);const T=new bit(0,0),M=new bit(0,0),R=new bit(0,0),N=new bit(0,0);let L,U;for(B=0;B<I;){for(y=0;y<16;++y)E[y].high=v[B]<<24|v[B+1]<<16|v[B+2]<<8|v[B+3],E[y].low=v[B+4]<<24|v[B+5]<<16|v[B+6]<<8|v[B+7],B+=8;for(y=16;y<80;++y)L=E[y],r(L,E[y-2],N),L.add(E[y-7]),s(R,E[y-15],N),L.add(R),L.add(E[y-16]);for(w.assign(u),Q.assign(h),_.assign(d),S.assign(g),x.assign(p),k.assign(f),D.assign(m),F.assign(C),y=0;y<80;++y)T.assign(F),n(R,x,N),T.add(R),e(R,x,k,D,N),T.add(R),T.add(a[y]),T.add(E[y]),i(M,w,N),t(R,w,Q,_,N),M.add(R),L=F,F=D,D=k,k=x,S.add(T),x=S,S=_,_=Q,Q=w,L.assign(T),L.add(M),w=L;u.add(w),h.add(Q),d.add(_),g.add(S),p.add(x),f.add(k),m.add(D),C.add(F)}return c?(U=new Uint8Array(48),u.copyTo(U,0),h.copyTo(U,8),d.copyTo(U,16),g.copyTo(U,24),p.copyTo(U,32),f.copyTo(U,40)):(U=new Uint8Array(64),u.copyTo(U,0),h.copyTo(U,8),d.copyTo(U,16),g.copyTo(U,24),p.copyTo(U,32),f.copyTo(U,40),m.copyTo(U,48),C.copyTo(U,56)),U}}();function Qit(e,t,i){return wit(e,t,i,!0)}class _it{decryptBlock(e){return e}encrypt(e){return e}}class Sit{constructor(){this._s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),this._inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),this._mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]),this._mixCol=new Uint8Array(256);for(let e=0;e<256;e++)this._mixCol[e]=e<128?e<<1:e<<1^27;this.buffer=new Uint8Array(16),this.bufferPosition=0}_expandKey(e){gVe("Cannot call `_expandKey` on the base class")}_decrypt(e,t){let i,n,s;const r=new Uint8Array(16);r.set(e);for(let a=0,o=this._keySize;a<16;++a,++o)r[a]^=t[o];for(let a=this._cyclesOfRepetition-1;a>=1;--a){i=r[13],r[13]=r[9],r[9]=r[5],r[5]=r[1],r[1]=i,i=r[14],n=r[10],r[14]=r[6],r[10]=r[2],r[6]=i,r[2]=n,i=r[15],n=r[11],s=r[7],r[15]=r[3],r[11]=i,r[7]=n,r[3]=s;for(let e=0;e<16;++e)r[e]=this._inv_s[r[e]];for(let e=0,i=16*a;e<16;++e,++i)r[e]^=t[i];for(let e=0;e<16;e+=4){const t=this._mix[r[e]],n=this._mix[r[e+1]],s=this._mix[r[e+2]],a=this._mix[r[e+3]];i=t^n>>>8^n<<24^s>>>16^s<<16^a>>>24^a<<8,r[e]=i>>>24&255,r[e+1]=i>>16&255,r[e+2]=i>>8&255,r[e+3]=255&i}}i=r[13],r[13]=r[9],r[9]=r[5],r[5]=r[1],r[1]=i,i=r[14],n=r[10],r[14]=r[6],r[10]=r[2],r[6]=i,r[2]=n,i=r[15],n=r[11],s=r[7],r[15]=r[3],r[11]=i,r[7]=n,r[3]=s;for(let a=0;a<16;++a)r[a]=this._inv_s[r[a]],r[a]^=t[a];return r}_encrypt(e,t){const i=this._s;let n,s,r;const a=new Uint8Array(16);a.set(e);for(let o=0;o<16;++o)a[o]^=t[o];for(let o=1;o<this._cyclesOfRepetition;o++){for(let e=0;e<16;++e)a[e]=i[a[e]];r=a[1],a[1]=a[5],a[5]=a[9],a[9]=a[13],a[13]=r,r=a[2],s=a[6],a[2]=a[10],a[6]=a[14],a[10]=r,a[14]=s,r=a[3],s=a[7],n=a[11],a[3]=a[15],a[7]=r,a[11]=s,a[15]=n;for(let e=0;e<16;e+=4){const t=a[e+0],i=a[e+1],s=a[e+2],r=a[e+3];n=t^i^s^r,a[e+0]^=n^this._mixCol[t^i],a[e+1]^=n^this._mixCol[i^s],a[e+2]^=n^this._mixCol[s^r],a[e+3]^=n^this._mixCol[r^t]}for(let e=0,i=16*o;e<16;++e,++i)a[e]^=t[i]}for(let o=0;o<16;++o)a[o]=i[a[o]];r=a[1],a[1]=a[5],a[5]=a[9],a[9]=a[13],a[13]=r,r=a[2],s=a[6],a[2]=a[10],a[6]=a[14],a[10]=r,a[14]=s,r=a[3],s=a[7],n=a[11],a[3]=a[15],a[7]=r,a[11]=s,a[15]=n;for(let o=0,l=this._keySize;o<16;++o,++l)a[o]^=t[l];return a}_decryptBlock2(e,t){const i=e.length;let n=this.buffer,s=this.bufferPosition;const r=[];let a=this.iv;for(let A=0;A<i;++A){if(n[s]=e[A],++s,s<16)continue;const t=this._decrypt(n,this._key);for(let e=0;e<16;++e)t[e]^=a[e];a=n,r.push(t),n=new Uint8Array(16),s=0}if(this.buffer=n,this.bufferLength=s,this.iv=a,0===r.length)return new Uint8Array(0);let o=16*r.length;if(t){const e=r.at(-1);let t=e[15];if(t<=16){for(let i=15,n=16-t;i>=n;--i)if(e[i]!==t){t=0;break}o-=t,r[r.length-1]=e.subarray(0,16-t)}}const l=new Uint8Array(o);for(let A=0,c=0,u=r.length;A<u;++A,c+=16)l.set(r[A],c);return l}decryptBlock(e,t,i=null){const n=e.length,s=this.buffer;let r=this.bufferPosition;if(i)this.iv=i;else{for(let t=0;r<16&&t<n;++t,++r)s[r]=e[t];if(r<16)return this.bufferLength=r,new Uint8Array(0);this.iv=s,e=e.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=this._decryptBlock2,this.decryptBlock(e,t)}encrypt(e,t){const i=e.length;let n=this.buffer,s=this.bufferPosition;const r=[];t||(t=new Uint8Array(16));for(let l=0;l<i;++l){if(n[s]=e[l],++s,s<16)continue;for(let e=0;e<16;++e)n[e]^=t[e];const i=this._encrypt(n,this._key);t=i,r.push(i),n=new Uint8Array(16),s=0}if(this.buffer=n,this.bufferLength=s,this.iv=t,0===r.length)return new Uint8Array(0);const a=16*r.length,o=new Uint8Array(a);for(let l=0,A=0,c=r.length;l<c;++l,A+=16)o.set(r[l],A);return o}}class xit extends Sit{constructor(e){super(),this._cyclesOfRepetition=10,this._keySize=160,this._rcon=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),this._key=this._expandKey(e)}_expandKey(e){const t=this._s,i=this._rcon,n=new Uint8Array(176);n.set(e);for(let s=16,r=1;s<176;++r){let e=n[s-3],a=n[s-2],o=n[s-1],l=n[s-4];e=t[e],a=t[a],o=t[o],l=t[l],e^=i[r];for(let t=0;t<4;++t)n[s]=e^=n[s-16],s++,n[s]=a^=n[s-16],s++,n[s]=o^=n[s-16],s++,n[s]=l^=n[s-16],s++}return n}}class kit extends Sit{constructor(e){super(),this._cyclesOfRepetition=14,this._keySize=224,this._key=this._expandKey(e)}_expandKey(e){const t=this._s,i=new Uint8Array(240);i.set(e);let n,s,r,a,o=1;for(let l=32,A=1;l<240;++A){l%32==16?(n=t[n],s=t[s],r=t[r],a=t[a]):l%32==0&&(n=i[l-3],s=i[l-2],r=i[l-1],a=i[l-4],n=t[n],s=t[s],r=t[r],a=t[a],n^=o,(o<<=1)>=256&&(o=255&(27^o)));for(let e=0;e<4;++e)i[l]=n^=i[l-32],l++,i[l]=s^=i[l-32],l++,i[l]=r^=i[l-32],l++,i[l]=a^=i[l-32],l++}return i}}class Dit{checkOwnerPassword(e,t,i,n){const s=new Uint8Array(e.length+56);s.set(e,0),s.set(t,e.length),s.set(i,e.length+t.length);return LVe(Eit(s,0,s.length),n)}checkUserPassword(e,t,i){const n=new Uint8Array(e.length+8);n.set(e,0),n.set(t,e.length);return LVe(Eit(n,0,n.length),i)}getOwnerKey(e,t,i,n){const s=new Uint8Array(e.length+56);s.set(e,0),s.set(t,e.length),s.set(i,e.length+t.length);const r=Eit(s,0,s.length);return new kit(r).decryptBlock(n,!1,new Uint8Array(16))}getUserKey(e,t,i){const n=new Uint8Array(e.length+8);n.set(e,0),n.set(t,e.length);const s=Eit(n,0,n.length);return new kit(s).decryptBlock(i,!1,new Uint8Array(16))}}class Fit{_hash(e,t,i){let n=Eit(t,0,t.length).subarray(0,32),s=[0],r=0;for(;r<64||s.at(-1)>r-32;){const t=e.length+n.length+i.length,a=new Uint8Array(t);let o=0;a.set(e,o),o+=e.length,a.set(n,o),o+=n.length,a.set(i,o);const l=new Uint8Array(64*t);for(let e=0,i=0;e<64;e++,i+=t)l.set(a,i);s=new xit(n.subarray(0,16)).encrypt(l,n.subarray(16,32));const A=s.slice(0,16).reduce(((e,t)=>e+t),0)%3;0===A?n=Eit(s,0,s.length):1===A?n=Qit(s,0,s.length):2===A&&(n=wit(s,0,s.length)),r++}return n.subarray(0,32)}checkOwnerPassword(e,t,i,n){const s=new Uint8Array(e.length+56);s.set(e,0),s.set(t,e.length),s.set(i,e.length+t.length);return LVe(this._hash(e,s,i),n)}checkUserPassword(e,t,i){const n=new Uint8Array(e.length+8);n.set(e,0),n.set(t,e.length);return LVe(this._hash(e,n,[]),i)}getOwnerKey(e,t,i,n){const s=new Uint8Array(e.length+56);s.set(e,0),s.set(t,e.length),s.set(i,e.length+t.length);const r=this._hash(e,s,i);return new kit(r).decryptBlock(n,!1,new Uint8Array(16))}getUserKey(e,t,i){const n=new Uint8Array(e.length+8);n.set(e,0),n.set(t,e.length);const s=this._hash(e,n,[]);return new kit(s).decryptBlock(i,!1,new Uint8Array(16))}}class Tit{constructor(e,t){this.StringCipherConstructor=e,this.StreamCipherConstructor=t}createStream(e,t){const i=new this.StreamCipherConstructor;return new vit(e,t,(function(e,t){return i.decryptBlock(e,t)}))}decryptString(e){const t=new this.StringCipherConstructor;let i=_Ve(e);return i=t.decryptBlock(i,!0),QVe(i)}encryptString(e){const t=new this.StringCipherConstructor;if(t instanceof Sit){const i=16-e.length%16;e+=String.fromCharCode(i).repeat(i);const n=new Uint8Array(16);if("undefined"!=typeof crypto)crypto.getRandomValues(n);else for(let e=0;e<16;e++)n[e]=Math.floor(256*Math.random());let s=_Ve(e);s=t.encrypt(s,n);const r=new Uint8Array(16+s.length);return r.set(n),r.set(s,16),QVe(r)}let i=_Ve(e);return i=t.encrypt(i),QVe(i)}}const Mit=class{constructor(e,t,i){yc(this,ec);const n=e.get("Filter");if(!AWe(n,"Standard"))throw new EVe("unknown encryption method");this.filterName=n.name,this.dict=e;const s=e.get("V");if(!Number.isInteger(s)||1!==s&&2!==s&&4!==s&&5!==s)throw new EVe("unsupported encryption algorithm");this.algorithm=s;let r=e.get("Length");if(!r)if(s<=3)r=40;else{const t=e.get("CF"),i=e.get("StmF");if(t instanceof rWe&&i instanceof iWe){t.suppressEncryption=!0;const e=t.get(i.name);r=(null==e?void 0:e.get("Length"))||128,r<40&&(r<<=3)}}if(!Number.isInteger(r)||r<40||r%8!=0)throw new EVe("invalid key length");const a=_Ve(e.get("O")),o=_Ve(e.get("U")),l=a.subarray(0,32),A=o.subarray(0,32),c=e.get("P"),u=e.get("R"),h=(4===s||5===s)&&!1!==e.get("EncryptMetadata");this.encryptMetadata=h;const d=_Ve(t);let g,p;if(i){if(6===u)try{i=NVe(i)}catch{}g=_Ve(i)}if(5!==s)p=Ec(this,ec,ic).call(this,d,g,l,A,c,u,r,h);else{const t=a.subarray(32,40),i=a.subarray(40,48),n=o.subarray(0,48),s=o.subarray(32,40),r=o.subarray(40,48),c=_Ve(e.get("OE")),h=_Ve(e.get("UE")),d=_Ve(e.get("Perms"));p=Ec(this,ec,tc).call(this,u,g,l,t,i,n,A,s,r,c,h,d)}if(!p&&!i)throw new IVe("No password given",cVe);if(!p&&i){const e=Ec(this,ec,nc).call(this,g,l,u,r);p=Ec(this,ec,ic).call(this,d,e,l,A,c,u,r,h)}if(!p)throw new IVe("Incorrect Password",uVe);if(this.encryptionKey=p,s>=4){const t=e.get("CF");t instanceof rWe&&(t.suppressEncryption=!0),this.cf=t,this.stmf=e.get("StmF")||iWe.get("Identity"),this.strf=e.get("StrF")||iWe.get("Identity"),this.eff=e.get("EFF")||this.stmf}}createCipherTransform(e,t){if(4===this.algorithm||5===this.algorithm)return new Tit(Ec(this,ec,rc).call(this,this.cf,this.strf,e,t,this.encryptionKey),Ec(this,ec,rc).call(this,this.cf,this.stmf,e,t,this.encryptionKey));const i=Ec(this,ec,sc).call(this,e,t,this.encryptionKey,!1),n=function(){return new Bit(i)};return new Tit(n,n)}};ZA=new WeakMap,ec=new WeakSet,tc=function(e,t,i,n,s,r,a,o,l,A,c,u){if(t){const e=Math.min(127,t.length);t=t.subarray(0,e)}else t=[];const h=6===e?new Fit:new Dit;return h.checkUserPassword(t,o,a)?h.getUserKey(t,l,c):t.length&&h.checkOwnerPassword(t,n,r,i)?h.getOwnerKey(t,s,r,A):null},ic=function(e,t,i,n,s,r,a,o){const l=40+i.length+e.length,A=new Uint8Array(l);let c,u,h=0;if(t)for(u=Math.min(32,t.length);h<u;++h)A[h]=t[h];for(c=0;h<32;)A[h++]=Bc(Mit,ZA)[c++];for(c=0,u=i.length;c<u;++c)A[h++]=i[c];for(A[h++]=255&s,A[h++]=s>>8&255,A[h++]=s>>16&255,A[h++]=s>>>24&255,c=0,u=e.length;c<u;++c)A[h++]=e[c];r>=4&&!o&&(A[h++]=255,A[h++]=255,A[h++]=255,A[h++]=255);let d=yit(A,0,h);const g=a>>3;if(r>=3)for(c=0;c<50;++c)d=yit(d,0,g);const p=d.subarray(0,g);let f,m;if(r>=3){for(h=0;h<32;++h)A[h]=Bc(Mit,ZA)[h];for(c=0,u=e.length;c<u;++c)A[h++]=e[c];f=new Bit(p),m=f.encryptBlock(yit(A,0,h)),u=p.length;const t=new Uint8Array(u);for(c=1;c<=19;++c){for(let e=0;e<u;++e)t[e]=p[e]^c;f=new Bit(t),m=f.encryptBlock(m)}for(c=0,u=m.length;c<u;++c)if(n[c]!==m[c])return null}else for(f=new Bit(p),m=f.encryptBlock(Bc(Mit,ZA)),c=0,u=m.length;c<u;++c)if(n[c]!==m[c])return null;return p},nc=function(e,t,i,n){const s=new Uint8Array(32);let r=0;const a=Math.min(32,e.length);for(;r<a;++r)s[r]=e[r];let o=0;for(;r<32;)s[r++]=Bc(Mit,ZA)[o++];let l=yit(s,0,r);const A=n>>3;if(i>=3)for(o=0;o<50;++o)l=yit(l,0,l.length);let c,u;if(i>=3){u=t;const e=new Uint8Array(A);for(o=19;o>=0;o--){for(let t=0;t<A;++t)e[t]=l[t]^o;c=new Bit(e),u=c.encryptBlock(u)}}else c=new Bit(l.subarray(0,A)),u=c.encryptBlock(t);return u},sc=function(e,t,i,n=!1){const s=new Uint8Array(i.length+9),r=i.length;let a;for(a=0;a<r;++a)s[a]=i[a];s[a++]=255&e,s[a++]=e>>8&255,s[a++]=e>>16&255,s[a++]=255&t,s[a++]=t>>8&255,n&&(s[a++]=115,s[a++]=65,s[a++]=108,s[a++]=84);return yit(s,0,a).subarray(0,Math.min(i.length+5,16))},rc=function(e,t,i,n,s){if(!(t instanceof iWe))throw new EVe("Invalid crypt filter name.");const r=this,a=e.get(t.name),o=null==a?void 0:a.get("CFM");if(!o||"None"===o.name)return function(){return new _it};if("V2"===o.name)return function(){var e;return new Bit(Ec(e=r,ec,sc).call(e,i,n,s,!1))};if("AESV2"===o.name)return function(){var e;return new xit(Ec(e=r,ec,sc).call(e,i,n,s,!0))};if("AESV3"===o.name)return function(){return new kit(s)};throw new EVe("Unknown crypto method")},yc(Mit,ZA,new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]));let Rit=Mit;function Nit(e){try{return RVe(e)}catch(t){return e}}class Lit extends Z1e{constructor(e){super(e),this.node=null}onEndElement(e){const t=super.onEndElement(e);if(t&&"xfa:datasets"===e)throw this.node=t,new Error("Aborting DatasetXMLParser.")}}class Uit{constructor(e){if(e.datasets)this.node=new Z1e({hasAttributes:!0}).parseFromString(e.datasets).documentElement;else{const t=new Lit({hasAttributes:!0});try{t.parseFromString(e["xdp:xdp"])}catch{}this.node=t.node}}getValue(e){if(!this.node||!e)return"";const t=this.node.searchNode(TWe(e),0);if(!t)return"";const i=t.firstChild;return"value"===(null==i?void 0:i.nodeName)?t.children.map((e=>Nit(e.textContent))):Nit(t.textContent)}}class Hit{constructor(e,t){yc(this,ac,null),this.stream=e,this.pdfManager=t,this.entries=[],this._xrefStms=new Set,this._cacheMap=new Map,this._pendingRefs=new oWe,this._newPersistentRefNum=null,this._newTemporaryRefNum=null,this._persistentRefsCache=null}getNewPersistentRef(e){null===this._newPersistentRefNum&&(this._newPersistentRefNum=this.entries.length||1);const t=this._newPersistentRefNum++;return this._cacheMap.set(t,e),aWe.get(t,0)}getNewTemporaryRef(){if(null===this._newTemporaryRefNum&&(this._newTemporaryRefNum=this.entries.length||1,this._newPersistentRefNum)){this._persistentRefsCache=new Map;for(let e=this._newTemporaryRefNum;e<this._newPersistentRefNum;e++)this._persistentRefsCache.set(e,this._cacheMap.get(e)),this._cacheMap.delete(e)}return aWe.get(this._newTemporaryRefNum++,0)}resetNewTemporaryRef(){if(this._newTemporaryRefNum=null,this._persistentRefsCache)for(const[e,t]of this._persistentRefsCache)this._cacheMap.set(e,t);this._persistentRefsCache=null}setStartXRef(e){this.startXRefQueue=[e]}parse(e=!1){let t,i,n;t=e?this.indexObjects():this.readXRef(),t.assignXref(this),this.trailer=t;try{i=t.get("Encrypt")}catch(s){if(s instanceof fWe)throw s}if(i instanceof rWe){const e=t.get("ID"),n=(null==e?void 0:e.length)?e[0]:"";i.suppressEncryption=!0,this.encrypt=new Rit(i,n,this.pdfManager.password)}try{n=t.get("Root")}catch(s){if(s instanceof fWe)throw s}if(n instanceof rWe)try{if(n.get("Pages")instanceof rWe)return void(this.root=n)}catch(s){if(s instanceof fWe)throw s}if(!e)throw new IWe;throw new BVe("Invalid Root reference.")}processXRefTable(e){"tableState"in this||(this.tableState={entryNum:0,streamPos:e.lexer.stream.pos,parserBuf1:e.buf1,parserBuf2:e.buf2});if(!cWe(this.readXRefTable(e),"trailer"))throw new EVe("Invalid XRef table: could not find trailer dictionary");let t=e.getObj();if(t instanceof rWe||!t.dict||(t=t.dict),!(t instanceof rWe))throw new EVe("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,t}readXRefTable(e){const t=e.lexer.stream,i=this.tableState;let n;for(t.pos=i.streamPos,e.buf1=i.parserBuf1,e.buf2=i.parserBuf2;;){if(!("firstEntryNum"in i)||!("entryCount"in i)){if(cWe(n=e.getObj(),"trailer"))break;i.firstEntryNum=n,i.entryCount=e.getObj()}let s=i.firstEntryNum;const r=i.entryCount;if(!Number.isInteger(s)||!Number.isInteger(r))throw new EVe("Invalid XRef table: wrong types in subsection header");for(let n=i.entryNum;n<r;n++){i.streamPos=t.pos,i.entryNum=n,i.parserBuf1=e.buf1,i.parserBuf2=e.buf2;const a={};a.offset=e.getObj(),a.gen=e.getObj();const o=e.getObj();if(o instanceof nWe)switch(o.cmd){case"f":a.free=!0;break;case"n":a.uncompressed=!0}if(!Number.isInteger(a.offset)||!Number.isInteger(a.gen)||!a.free&&!a.uncompressed)throw new EVe(`Invalid entry in XRef subsection: ${s}, ${r}`);0===n&&a.free&&1===s&&(s=0),this.entries[n+s]||(this.entries[n+s]=a)}i.entryNum=0,i.streamPos=t.pos,i.parserBuf1=e.buf1,i.parserBuf2=e.buf2,delete i.firstEntryNum,delete i.entryCount}if(this.entries[0]&&!this.entries[0].free)throw new EVe("Invalid XRef table: unexpected first object");return n}processXRefStream(e){if(!("streamState"in this)){const t=e.dict,i=t.get("W");let n=t.get("Index");n||(n=[0,t.get("Size")]),this.streamState={entryRanges:n,byteWidths:i,entryNum:0,streamPos:e.pos}}return this.readXRefStream(e),delete this.streamState,e.dict}readXRefStream(e){const t=this.streamState;e.pos=t.streamPos;const[i,n,s]=t.byteWidths,r=t.entryRanges;for(;r.length>0;){const[a,o]=r;if(!Number.isInteger(a)||!Number.isInteger(o))throw new EVe(`Invalid XRef range fields: ${a}, ${o}`);if(!Number.isInteger(i)||!Number.isInteger(n)||!Number.isInteger(s))throw new EVe(`Invalid XRef entry fields length: ${a}, ${o}`);for(let r=t.entryNum;r<o;++r){t.entryNum=r,t.streamPos=e.pos;let o=0,l=0,A=0;for(let t=0;t<i;++t){const t=e.getByte();if(-1===t)throw new EVe("Invalid XRef byteWidths 'type'.");o=o<<8|t}0===i&&(o=1);for(let t=0;t<n;++t){const t=e.getByte();if(-1===t)throw new EVe("Invalid XRef byteWidths 'offset'.");l=l<<8|t}for(let t=0;t<s;++t){const t=e.getByte();if(-1===t)throw new EVe("Invalid XRef byteWidths 'generation'.");A=A<<8|t}const c={};switch(c.offset=l,c.gen=A,o){case 0:c.free=!0;break;case 1:c.uncompressed=!0;break;case 2:break;default:throw new EVe(`Invalid XRef entry type: ${o}`)}this.entries[a+r]||(this.entries[a+r]=c)}t.entryNum=0,t.streamPos=e.pos,r.splice(0,2)}}indexObjects(){function e(e,t){let i="",n=e[t];for(;10!==n&&13!==n&&60!==n&&!(++t>=e.length);)i+=String.fromCharCode(n),n=e[t];return i}function t(e,t,i){const n=i.length,s=e.length;let r=0;for(;t<s;){let s=0;for(;s<n&&e[t+s]===i[s];)++s;if(s>=n)break;t++,r++}return r}const i=/\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g,n=/\b(startxref|\d+\s+\d+\s+obj)\b/g,s=/^(\d+)\s+(\d+)\s+obj\b/,r=new Uint8Array([116,114,97,105,108,101,114]),a=new Uint8Array([115,116,97,114,116,120,114,101,102]),o=new Uint8Array([47,88,82,101,102]);this.entries.length=0,this._cacheMap.clear();const l=this.stream;l.pos=0;const A=l.getBytes(),c=QVe(A),u=A.length;let h=l.start;const d=[],g=[];for(;h<u;){let p=A[h];if(9===p||10===p||13===p||32===p){++h;continue}if(37===p){do{if(++h,h>=u)break;p=A[h]}while(10!==p&&13!==p);continue}const f=e(A,h);let m;if(f.startsWith("xref")&&(4===f.length||/\s/.test(f[4])))h+=t(A,h,r),d.push(h),h+=t(A,h,a);else if(m=s.exec(f)){const e=0|m[1],n=0|m[2],s=h+f.length;let r,a=!1;if(this.entries[e]){if(this.entries[e].gen===n)try{new tze({lexer:new sze(l.makeSubStream(s))}).getObj(),a=!0}catch(I){I instanceof mWe||(a=!0)}}else a=!0;a&&(this.entries[e]={offset:h-l.start,gen:n,uncompressed:!0}),i.lastIndex=s;const d=i.exec(c);if(d){r=i.lastIndex+1-h,"endobj"!==d[1]&&(d[1],r-=d[1].length+1)}else r=u-h;const p=A.subarray(h,h+r),C=t(p,0,o);C<r&&p[C+5]<64&&(g.push(h-l.start),this._xrefStms.add(h-l.start)),h+=r}else if(f.startsWith("trailer")&&(7===f.length||/\s/.test(f[7]))){d.push(h);const e=h+f.length;let t;n.lastIndex=e;const i=n.exec(c);if(i){t=n.lastIndex+1-h,"startxref"!==i[1]&&(i[1],t-=i[1].length+1)}else t=u-h;h+=t}else h+=f.length+1}for(const v of g)this.startXRefQueue.push(v),this.readXRef(!0);const p=[];let f,m,C=!1;for(const v of d){l.pos=v;const e=new tze({lexer:new sze(l),xref:this,allowStreams:!0,recoveryMode:!0});if(!cWe(e.getObj(),"trailer"))continue;const t=e.getObj();t instanceof rWe&&(p.push(t),t.has("Encrypt")&&(C=!0))}for(const v of[...p,"genFallback",...p]){if("genFallback"===v){if(!m)break;this._generationFallback=!0;continue}let e=!1;try{const t=v.get("Root");if(!(t instanceof rWe))continue;const i=t.get("Pages");if(!(i instanceof rWe))continue;const n=i.get("Count");Number.isInteger(n)&&(e=!0)}catch(I){m=I;continue}if(e&&(!C||v.has("Encrypt"))&&v.has("ID"))return v;f=v}if(f)return f;if(this.topDict)return this.topDict;if(!p.length)for(const[v,B]of this.entries.entries()){if(!B)continue;const e=aWe.get(v,B.gen);let t;try{t=this.fetch(e)}catch{continue}if(t instanceof dWe&&(t=t.dict),t instanceof rWe&&t.has("Root"))return t}throw new BVe("Invalid PDF structure.")}readXRef(e=!1){const t=this.stream,i=new Set;for(;this.startXRefQueue.length;){try{const e=this.startXRefQueue[0];if(i.has(e)){this.startXRefQueue.shift();continue}i.add(e),t.pos=e+t.start;const n=new tze({lexer:new sze(t),xref:this,allowStreams:!0});let s,r=n.getObj();if(cWe(r,"xref"))s=this.processXRefTable(n),this.topDict||(this.topDict=s),r=s.get("XRefStm"),Number.isInteger(r)&&!this._xrefStms.has(r)&&(this._xrefStms.add(r),this.startXRefQueue.push(r),Bc(this,ac)??bc(this,ac,r));else{if(!Number.isInteger(r))throw new EVe("Invalid XRef stream header");if(!(Number.isInteger(n.getObj())&&cWe(n.getObj(),"obj")&&(r=n.getObj())instanceof dWe))throw new EVe("Invalid XRef stream");if(s=this.processXRefStream(r),this.topDict||(this.topDict=s),!s)throw new EVe("Failed to read XRef stream")}r=s.get("Prev"),Number.isInteger(r)?this.startXRefQueue.push(r):r instanceof aWe&&this.startXRefQueue.push(r.num)}catch(I2){if(I2 instanceof fWe)throw I2}this.startXRefQueue.shift()}if(this.topDict)return this.topDict;if(!e)throw new IWe}get lastXRefStreamPos(){return Bc(this,ac)??(this._xrefStms.size>0?Math.max(...this._xrefStms):null)}getEntry(e){const t=this.entries[e];return t&&!t.free&&t.offset?t:null}fetchIfRef(e,t=!1){return e instanceof aWe?this.fetch(e,t):e}fetch(e,t=!1){if(!(e instanceof aWe))throw new Error("ref object is not a reference");const i=e.num,n=this._cacheMap.get(i);if(void 0!==n)return n instanceof rWe&&!n.objId&&(n.objId=e.toString()),n;let s=this.getEntry(i);if(null===s)return this._cacheMap.set(i,s),s;if(this._pendingRefs.has(e))return this._pendingRefs.remove(e),XVe;this._pendingRefs.put(e);try{s=s.uncompressed?this.fetchUncompressed(e,s,t):this.fetchCompressed(e,s,t),this._pendingRefs.remove(e)}catch(r){throw this._pendingRefs.remove(e),r}return s instanceof rWe?s.objId=e.toString():s instanceof dWe&&(s.dict.objId=e.toString()),s}fetchUncompressed(e,t,i=!1){const n=e.gen;let s=e.num;if(t.gen!==n){const r=`Inconsistent generation in XRef: ${e}`;if(this._generationFallback&&t.gen<n)return this.fetchUncompressed(aWe.get(s,t.gen),t,i);throw new CWe(r)}const r=this.stream.makeSubStream(t.offset+this.stream.start),a=new tze({lexer:new sze(r),xref:this,allowStreams:!0}),o=a.getObj(),l=a.getObj(),A=a.getObj();if(o!==s||l!==n||!(A instanceof nWe))throw new CWe(`Bad (uncompressed) XRef entry: ${e}`);if("obj"!==A.cmd){if(A.cmd.startsWith("obj")&&(s=parseInt(A.cmd.substring(3),10),!Number.isNaN(s)))return s;throw new CWe(`Bad (uncompressed) XRef entry: ${e}`)}return(t=this.encrypt&&!i?a.getObj(this.encrypt.createCipherTransform(s,n)):a.getObj())instanceof dWe||this._cacheMap.set(s,t),t}fetchCompressed(e,t,i=!1){const n=t.offset,s=this.fetch(aWe.get(n,0));if(!(s instanceof dWe))throw new EVe("bad ObjStm stream");const r=s.dict.get("First"),a=s.dict.get("N");if(!Number.isInteger(r)||!Number.isInteger(a))throw new EVe("invalid first and n parameters for ObjStm stream");let o=new tze({lexer:new sze(s),xref:this,allowStreams:!0});const l=new Array(a),A=new Array(a);for(let h=0;h<a;++h){const e=o.getObj();if(!Number.isInteger(e))throw new EVe(`invalid object number in the ObjStm stream: ${e}`);const t=o.getObj();if(!Number.isInteger(t))throw new EVe(`invalid object offset in the ObjStm stream: ${t}`);l[h]=e,A[h]=t}const c=(s.start||0)+r,u=new Array(a);for(let h=0;h<a;++h){const e=h<a-1?A[h+1]-A[h]:void 0;if(e<0)throw new EVe("Invalid offset in the ObjStm stream.");o=new tze({lexer:new sze(s.makeSubStream(c+A[h],e,s.dict)),xref:this,allowStreams:!0});const t=o.getObj();if(u[h]=t,t instanceof dWe)continue;const i=l[h],r=this.entries[i];r&&r.offset===n&&r.gen===h&&this._cacheMap.set(i,t)}if(void 0===(t=u[t.gen]))throw new CWe(`Bad (compressed) XRef entry: ${e}`);return t}async fetchIfRefAsync(e,t){return e instanceof aWe?this.fetchAsync(e,t):e}async fetchAsync(e,t){try{return this.fetch(e,t)}catch(i){if(!(i instanceof fWe))throw i;return await this.pdfManager.requestRange(i.begin,i.end),this.fetchAsync(e,t)}}getCatalogObj(){return this.root}}ac=new WeakMap;const Pit=[0,0,612,792];class Oit{constructor({pdfManager:e,xref:t,pageIndex:i,pageDict:n,ref:s,globalIdFactory:r,fontCache:a,builtInCMapCache:o,standardFontDataCache:l,globalImageCache:A,systemFontCache:c,nonBlendModesSet:u,xfaFactory:h}){yc(this,oc),this.pdfManager=e,this.pageIndex=i,this.pageDict=n,this.xref=t,this.ref=s,this.fontCache=a,this.builtInCMapCache=o,this.standardFontDataCache=l,this.globalImageCache=A,this.systemFontCache=c,this.nonBlendModesSet=u,this.evaluatorOptions=e.evaluatorOptions,this.resourcesPromise=null,this.xfaFactory=h;const d={obj:0};this._localIdFactory=class extends r{static createObjId(){return`p${i}_${++d.obj}`}static getPageObjId(){return`p${s.toString()}`}}}_getInheritableProperty(e,t=!1){const i=BWe({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(i)?1!==i.length&&i[0]instanceof rWe?rWe.merge({xref:this.xref,dictArray:i}):i[0]:i}get content(){return this.pageDict.getArray("Contents")}get resources(){const e=this._getInheritableProperty("Resources");return mVe(this,"resources",e instanceof rWe?e:rWe.empty)}_getBoundingBox(e){if(this.xfaData)return this.xfaData.bbox;const t=FWe(this._getInheritableProperty(e,!0),null);return t&&t[2]-t[0]>0&&t[3]-t[1]>0?t:null}get mediaBox(){return mVe(this,"mediaBox",this._getBoundingBox("MediaBox")||Pit)}get cropBox(){return mVe(this,"cropBox",this._getBoundingBox("CropBox")||this.mediaBox)}get userUnit(){const e=this.pageDict.get("UserUnit");return mVe(this,"userUnit","number"==typeof e&&e>0?e:1)}get view(){const{cropBox:e,mediaBox:t}=this;if(e!==t&&!LVe(e,t)){const i=FVe.intersect(e,t);if(i&&i[2]-i[0]>0&&i[3]-i[1]>0)return mVe(this,"view",i)}return mVe(this,"view",t)}get rotate(){let e=this._getInheritableProperty("Rotate")||0;return e%90!=0?e=0:e>=360?e%=360:e<0&&(e=(e%360+360)%360),mVe(this,"rotate",e)}_onSubStreamError(e,t){if(!this.evaluatorOptions.ignoreErrors)throw e}getContentStream(){return this.pdfManager.ensure(this,"content").then((e=>e instanceof dWe?e:Array.isArray(e)?new bje(e,this._onSubStreamError.bind(this)):new ZWe))}get xfaData(){return mVe(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}async saveNewAnnotations(e,t,i,n,s){if(this.xfaFactory)throw new Error("XFA: Cannot save new annotations.");const r=new w1e({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),a=new lWe,o=new oWe;await Ec(this,oc,lc).call(this,i,a,o);const l=this.pageDict,A=this.annotations.filter((e=>!(e instanceof aWe&&a.has(e)))),c=await qtt.saveNewAnnotations(r,t,i,n,s);for(const{ref:h}of c.annotations)h instanceof aWe&&!o.has(h)&&A.push(h);const u=l.clone();u.set("Annots",A),s.put(this.ref,{data:u});for(const h of a)s.put(h,{data:null})}save(e,t,i,n){const s=new w1e({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions});return this._parsedAnnotations.then((function(e){const r=[];for(const a of e)r.push(a.save(s,t,i,n).catch((function(e){return t.name,null})));return Promise.all(r)}))}loadResources(e){return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then((()=>new f2e(this.resources,e,this.xref).load()))}getOperatorList({handler:e,sink:t,task:i,intent:n,cacheKey:s,annotationStorage:r=null,modifiedIds:a=null}){const o=this.getContentStream(),l=this.loadResources(["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"]),A=new w1e({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),c=this.xfaFactory?null:YWe(r),u=null==c?void 0:c.get(this.pageIndex);let h=Promise.resolve(null),d=null;if(u){const e=this.pdfManager.ensureDoc("annotationGlobals");let t;const n=new Set;for(const{bitmapId:i,bitmap:r}of u)!i||r||n.has(i)||n.add(i);const{isOffscreenCanvasSupported:s}=this.evaluatorOptions;if(n.size>0){const e=u.slice();for(const[t,i]of r)t.startsWith(bKe)&&i.bitmap&&n.has(i.bitmapId)&&e.push(i);t=qtt.generateImages(e,this.xref,s)}else t=qtt.generateImages(u,this.xref,s);d=new oWe,h=Promise.all([e,Ec(this,oc,lc).call(this,u,d,null)]).then((([e])=>e?qtt.printNewAnnotations(e,A,i,u,t):null))}const g=Promise.all([o,l]).then((([r])=>{const a=new d1e(n,t);return e.send("StartRenderPage",{transparency:A.hasBlendModes(this.resources,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:s}),A.getOperatorList({stream:r,task:i,resources:this.resources,operatorList:a}).then((function(){return a}))}));return Promise.all([g,this._parsedAnnotations,h]).then((function([e,t,s]){if(s){t=t.filter((e=>!(e.ref&&d.has(e.ref))));for(let e=0,i=s.length;e<i;e++){const n=s[e];if(n.refToReplace){const r=t.findIndex((e=>e.ref&&hWe(e.ref,n.refToReplace)));r>=0&&(t.splice(r,1,n),s.splice(e--,1),i--)}}t=t.concat(s)}if(0===t.length||n&vKe)return e.flush(!0),{length:e.totalLength};const o=!!(n&IKe),l=!!(n&BKe),c=!!(n&pKe),u=!!(n&fKe),h=!!(n&mKe),g=[];for(const d of t)(c||u&&d.mustBeViewed(r,o)&&d.mustBeViewedWhenEditing(l,a)||h&&d.mustBePrinted(r))&&g.push(d.getOperatorList(A,i,n,r).catch((function(e){return i.name,{opList:null,separateForm:!1,separateCanvas:!1}})));return Promise.all(g).then((function(t){let i=!1,n=!1;for(const{opList:s,separateForm:r,separateCanvas:a}of t)e.addOpList(s),i||(i=r),n||(n=a);return e.flush(!0,{form:i,canvas:n}),{length:e.totalLength}}))}))}async extractTextContent({handler:e,task:t,includeMarkedContent:i,disableNormalization:n,sink:s}){const r=this.getContentStream(),a=this.loadResources(["ExtGState","Font","Properties","XObject"]),o=this.pdfManager.ensureCatalog("lang"),[l,,A]=await Promise.all([r,a,o]);return new w1e({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}).getTextContent({stream:l,task:t,resources:this.resources,includeMarkedContent:i,disableNormalization:n,sink:s,viewBox:this.view,lang:A})}async getStructTree(){const e=await this.pdfManager.ensureCatalog("structTreeRoot");if(!e)return null;await this._parsedAnnotations;const t=await this.pdfManager.ensure(this,"_parseStructTree",[e]);return this.pdfManager.ensure(t,"serializable")}_parseStructTree(e){const t=new c2e(e,this.pageDict);return t.parse(this.ref),t}async getAnnotationsData(e,t,i){const n=await this._parsedAnnotations;if(0===n.length)return n;const s=[],r=[];let a;const o=!!(i&pKe),l=!!(i&fKe),A=!!(i&mKe);for(const c of n){const i=o||l&&c.viewable;(i||A&&c.printable)&&s.push(c.data),c.hasTextContent&&i&&(a||(a=new w1e({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions})),r.push(c.extractTextContent(a,t,[-1/0,-1/0,1/0,1/0]).catch((function(e){t.name}))))}return await Promise.all(r),s}get annotations(){const e=this._getInheritableProperty("Annots");return mVe(this,"annotations",Array.isArray(e)?e:[])}get _parsedAnnotations(){return mVe(this,"_parsedAnnotations",this.pdfManager.ensure(this,"annotations").then((async e=>{if(0===e.length)return e;const[t,i]=await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"),this.pdfManager.ensureDoc("fieldObjects")]);if(!t)return[];const n=null==i?void 0:i.orphanFields,s=[];for(const l of e)s.push(qtt.create(this.xref,l,t,this._localIdFactory,!1,n,this.ref).catch((function(e){return null})));const r=[];let a,o;for(const l of await Promise.all(s))l&&(l instanceof $tt?(o||(o=[])).push(l):l instanceof rit?(a||(a=[])).push(l):r.push(l));return o&&r.push(...o),a&&r.push(...a),r})))}get jsActions(){return mVe(this,"jsActions",LWe(this.xref,this.pageDict,wqe))}}oc=new WeakSet,lc=async function(e,t,i){const n=[];for(const s of e)if(s.id){const e=aWe.fromString(s.id);if(!e){s.id;continue}if(s.deleted){if(t.put(e,e),s.popupRef){const e=aWe.fromString(s.popupRef);e&&t.put(e,e)}continue}null==i||i.put(e),s.ref=e,n.push(this.xref.fetchAsync(e).then((e=>{e instanceof rWe&&(s.oldAnnotation=e.clone())}),(()=>{}))),delete s.id}await Promise.all(n)};const Git=new Uint8Array([37,80,68,70,45]),Kit=new Uint8Array([115,116,97,114,116,120,114,101,102]),qit=new Uint8Array([101,110,100,111,98,106]);function Yit(e,t,i=1024,n=!1){const s=t.length,r=e.peekBytes(i),a=r.length-s;if(a<=0)return!1;if(n){const i=s-1;let n=r.length-1;for(;n>=i;){let a=0;for(;a<s&&r[n-a]===t[i-a];)a++;if(a>=s)return e.pos+=n-i,!0;n--}}else{let i=0;for(;i<=a;){let n=0;for(;n<s&&r[i+n]===t[n];)n++;if(n>=s)return e.pos+=i,!0;i++}}return!1}class Vit{constructor(e,t){if(yc(this,Ac),t.length<=0)throw new BVe("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=e,this.stream=t,this.xref=new Hit(t,e),this._pagePromises=new Map,this._version=null;const i={font:0};this._globalIdFactory=class{static getDocId(){return`g_${e.docId}`}static createFontId(){return"f"+ ++i.font}static createObjId(){gVe("Abstract method `createObjId` called.")}static getPageObjId(){gVe("Abstract method `getPageObjId` called.")}}}parse(e){this.xref.parse(e),this.catalog=new g2e(this.pdfManager,this.xref)}get linearization(){let e=null;try{e=rze.create(this.stream)}catch(t){if(t instanceof fWe)throw t}return mVe(this,"linearization",e)}get startXRef(){const e=this.stream;let t=0;if(this.linearization){if(e.reset(),Yit(e,qit)){e.skip(6);let i=e.peekByte();for(;SWe(i);)e.pos++,i=e.peekByte();t=e.pos-e.start}}else{const i=1024,n=Kit.length;let s=!1,r=e.end;for(;!s&&r>0;)r-=i-n,r<0&&(r=0),e.pos=r,s=Yit(e,Kit,i,!0);if(s){let i;e.skip(9);do{i=e.getByte()}while(SWe(i));let n="";for(;i>=32&&i<=57;)n+=String.fromCharCode(i),i=e.getByte();t=parseInt(n,10),isNaN(t)&&(t=0)}}return mVe(this,"startXRef",t)}checkHeader(){const e=this.stream;if(e.reset(),!Yit(e,Git))return;e.moveStart(),e.skip(Git.length);let t,i="";for(;(t=e.getByte())>32&&i.length<7;)i+=String.fromCharCode(t);gWe.test(i)&&(this._version=i)}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){let e=0;return e=this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFactory.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages,mVe(this,"numPages",e)}_hasOnlyDocumentSignatures(e,t=0){return!!Array.isArray(e)&&e.every((e=>{if(!((e=this.xref.fetchIfRef(e))instanceof rWe))return!1;if(e.has("Kids"))return!(++t>10)&&this._hasOnlyDocumentSignatures(e.get("Kids"),t);const i=AWe(e.get("FT"),"Sig"),n=e.get("Rect"),s=Array.isArray(n)&&n.every((e=>0===e));return i&&s}))}get _xfaStreams(){const e=this.catalog.acroForm;if(!e)return null;const t=e.get("XFA"),i={"xdp:xdp":"",template:"",datasets:"",config:"",connectionSet:"",localeSet:"",stylesheet:"","/xdp:xdp":""};if(t instanceof dWe&&!t.isEmpty)return i["xdp:xdp"]=t,i;if(!Array.isArray(t)||0===t.length)return null;for(let n=0,s=t.length;n<s;n+=2){let e;if(e=0===n?"xdp:xdp":n===s-2?"/xdp:xdp":t[n],!i.hasOwnProperty(e))continue;const r=this.xref.fetchIfRef(t[n+1]);r instanceof dWe&&!r.isEmpty&&(i[e]=r)}return i}get xfaDatasets(){const e=this._xfaStreams;if(!e)return mVe(this,"xfaDatasets",null);for(const t of["datasets","xdp:xdp"]){const i=e[t];if(i)try{const e=RVe(i.getString());return mVe(this,"xfaDatasets",new Uit({[t]:e}))}catch{break}}return mVe(this,"xfaDatasets",null)}get xfaData(){const e=this._xfaStreams;if(!e)return null;const t=Object.create(null);for(const[i,n]of Object.entries(e))if(n)try{t[i]=RVe(n.getString())}catch{return null}return t}get xfaFactory(){let e;return this.pdfManager.enableXfa&&this.catalog.needsRendering&&this.formInfo.hasXfa&&!this.formInfo.hasAcroForm&&(e=this.xfaData),mVe(this,"xfaFactory",e?new Ktt(e):null)}get isPureXfa(){return!!this.xfaFactory&&this.xfaFactory.isValid()}get htmlForXfa(){return this.xfaFactory?this.xfaFactory.getPages():null}async loadXfaImages(){const e=await this.pdfManager.ensureCatalog("xfaImages");if(!e)return;const t=e.getKeys(),i=new f2e(e,t,this.xref);await i.load();const n=new Map;for(const s of t){const t=e.get(s);t instanceof dWe&&n.set(s,t.getBytes())}this.xfaFactory.setImages(n)}async loadXfaFonts(e,t){const i=await this.pdfManager.ensureCatalog("acroForm");if(!i)return;const n=await i.getAsync("DR");if(!(n instanceof rWe))return;const s=new f2e(n,["Font"],this.xref);await s.load();const r=n.get("Font");if(!(r instanceof rWe))return;const a=Object.assign(Object.create(null),this.pdfManager.evaluatorOptions);a.useSystemFonts=!1;const o=new w1e({xref:this.xref,handler:e,pageIndex:-1,idFactory:this._globalIdFactory,fontCache:this.catalog.fontCache,builtInCMapCache:this.catalog.builtInCMapCache,standardFontDataCache:this.catalog.standardFontDataCache,options:a}),l=new d1e,A=[],c={get font(){return A.at(-1)},set font(e){A.push(e)},clone(){return this}},u=[];for(const[g,p]of r){const e=p.get("FontDescriptor");if(!(e instanceof rWe))continue;let i=e.get("FontFamily");i=i.replaceAll(/[ ]+(\d)/g,"$1");const s={fontFamily:i,fontWeight:e.get("FontWeight"),italicAngle:-e.get("ItalicAngle")};GWe(s)&&u.push(o.handleSetFont(n,[iWe.get(g),1],null,l,t,c,null,s).catch((function(e){return null})))}await Promise.all(u);const h=this.xfaFactory.setFonts(A);if(!h)return;a.ignoreErrors=!0,u.length=0,A.length=0;const d=new Set;for(const g of h)t0e(`${g}-Regular`)||d.add(g);d.size&&h.push("PdfJS-Fallback");for(const g of h)if(!d.has(g))for(const e of[{name:"Regular",fontWeight:400,italicAngle:0},{name:"Bold",fontWeight:700,italicAngle:0},{name:"Italic",fontWeight:400,italicAngle:12},{name:"BoldItalic",fontWeight:700,italicAngle:12}]){const i=`${g}-${e.name}`,s=i0e(i);u.push(o.handleSetFont(n,[iWe.get(i),1],null,l,t,c,s,{fontFamily:g,fontWeight:e.fontWeight,italicAngle:e.italicAngle}).catch((function(e){return null})))}await Promise.all(u),this.xfaFactory.appendFonts(A,d)}async serializeXfaData(e){return this.xfaFactory?this.xfaFactory.serializeData(e):null}get version(){return this.catalog.version||this._version}get formInfo(){const e={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},t=this.catalog.acroForm;if(!t)return mVe(this,"formInfo",e);try{const i=t.get("Fields"),n=Array.isArray(i)&&i.length>0;e.hasFields=n;const s=t.get("XFA");e.hasXfa=Array.isArray(s)&&s.length>0||s instanceof dWe&&!s.isEmpty;const r=!!(1&t.get("SigFlags")),a=r&&this._hasOnlyDocumentSignatures(i);e.hasAcroForm=n&&!a,e.hasSignatures=r}catch(i){if(i instanceof fWe)throw i}return mVe(this,"formInfo",e)}get documentInfo(){const e={PDFFormatVersion:this.version,Language:this.catalog.lang,EncryptFilterName:this.xref.encrypt?this.xref.encrypt.filterName:null,IsLinearized:!!this.linearization,IsAcroFormPresent:this.formInfo.hasAcroForm,IsXFAPresent:this.formInfo.hasXfa,IsCollectionPresent:!!this.catalog.collection,IsSignaturesPresent:this.formInfo.hasSignatures};let t;try{t=this.xref.trailer.get("Info")}catch(i){if(i instanceof fWe)throw i}if(!(t instanceof rWe))return mVe(this,"documentInfo",e);for(const n of t.getKeys()){const i=t.get(n);switch(n){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if("string"==typeof i){e[n]=MVe(i);continue}break;case"Trapped":if(i instanceof iWe){e[n]=i;continue}break;default:let t;switch(typeof i){case"string":t=MVe(i);break;case"number":case"boolean":t=i;break;default:i instanceof iWe&&(t=i)}if(void 0===t)continue;e.Custom||(e.Custom=Object.create(null)),e.Custom[n]=t;continue}}return mVe(this,"documentInfo",e)}get fingerprints(){const e="\0".repeat(16);function t(t){return"string"==typeof t&&16===t.length&&t!==e}const i=this.xref.trailer.get("ID");let n,s;return Array.isArray(i)&&t(i[0])?(n=_Ve(i[0]),i[1]!==i[0]&&t(i[1])&&(s=_Ve(i[1]))):n=yit(this.stream.getByteRange(0,1024),0,1024),mVe(this,"fingerprints",[zVe(n),s?zVe(s):null])}async _getLinearizationPage(e){const{catalog:t,linearization:i,xref:n}=this,s=aWe.get(i.objectNumberFirst,0);try{const e=await n.fetchAsync(s);if(e instanceof rWe){let i=e.getRaw("Type");if(i instanceof aWe&&(i=await n.fetchAsync(i)),AWe(i,"Page")||!e.has("Type")&&!e.has("Kids")&&e.has("Contents"))return t.pageKidsCountCache.has(s)||t.pageKidsCountCache.put(s,1),t.pageIndexCache.has(s)||t.pageIndexCache.put(s,0),[e,s]}throw new EVe("The Linearization dictionary doesn't point to a valid Page dictionary.")}catch(r){return r.message,t.getPageDict(e)}}getPage(e){const t=this._pagePromises.get(e);if(t)return t;const{catalog:i,linearization:n,xfaFactory:s}=this;let r;return r=s?Promise.resolve([rWe.empty,null]):(null==n?void 0:n.pageFirst)===e?this._getLinearizationPage(e):i.getPageDict(e),r=r.then((([t,n])=>new Oit({pdfManager:this.pdfManager,xref:this.xref,pageIndex:e,pageDict:t,ref:n,globalIdFactory:this._globalIdFactory,fontCache:i.fontCache,builtInCMapCache:i.builtInCMapCache,standardFontDataCache:i.standardFontDataCache,globalImageCache:i.globalImageCache,systemFontCache:i.systemFontCache,nonBlendModesSet:i.nonBlendModesSet,xfaFactory:s}))),this._pagePromises.set(e,r),r}async checkFirstPage(e=!1){if(!e)try{await this.getPage(0)}catch(t){if(t instanceof CWe)throw this._pagePromises.delete(0),await this.cleanup(),new IWe}}async checkLastPage(e=!1){const{catalog:t,pdfManager:i}=this;let n;t.setActualNumPages();try{if(await Promise.all([i.ensureDoc("xfaFactory"),i.ensureDoc("linearization"),i.ensureCatalog("numPages")]),this.xfaFactory)return;if(n=this.linearization?this.linearization.numPages:t.numPages,!Number.isInteger(n))throw new EVe("Page count is not an integer.");if(n<=1)return;await this.getPage(n-1)}catch(s){if(this._pagePromises.delete(n-1),await this.cleanup(),s instanceof CWe&&!e)throw new IWe;let a;try{a=await t.getAllPageDicts(e)}catch(r){if(r instanceof CWe&&!e)throw new IWe;return void t.setActualNumPages(1)}for(const[e,[n,r]]of a){let s;n instanceof Error?(s=Promise.reject(n),s.catch((()=>{}))):s=Promise.resolve(new Oit({pdfManager:i,xref:this.xref,pageIndex:e,pageDict:n,ref:r,globalIdFactory:this._globalIdFactory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,standardFontDataCache:t.standardFontDataCache,globalImageCache:t.globalImageCache,systemFontCache:t.systemFontCache,nonBlendModesSet:t.nonBlendModesSet,xfaFactory:null})),this._pagePromises.set(e,s)}t.setActualNumPages(a.size)}}fontFallback(e,t){return this.catalog.fontFallback(e,t)}async cleanup(e=!1){return this.catalog?this.catalog.cleanup(e):P1e()}get fieldObjects(){const e=this.pdfManager.ensureDoc("formInfo").then((async e=>{if(!e.hasFields)return null;const[t,i]=await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"),this.pdfManager.ensureCatalog("acroForm")]);if(!t)return null;const n=new oWe,s=Object.create(null),r=new Map,a=new lWe;for(const l of await i.getAsync("Fields"))await Ec(this,Ac,cc).call(this,"",null,l,r,t,n,a);const o=[];for(const[l,A]of r)o.push(Promise.all(A).then((e=>{(e=e.filter((e=>!!e))).length>0&&(s[l]=e)})));return await Promise.all(o),{allFields:s,orphanFields:a}}));return mVe(this,"fieldObjects",e)}get hasJSActions(){return mVe(this,"hasJSActions",this.pdfManager.ensureDoc("_parseHasJSActions"))}async _parseHasJSActions(){const[e,t]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);return!!e||!!t&&Object.values(t.allFields).some((e=>e.some((e=>null!==e.actions))))}get calculationOrderIds(){var e;const t=null==(e=this.catalog.acroForm)?void 0:e.get("CO");if(!Array.isArray(t)||0===t.length)return mVe(this,"calculationOrderIds",null);const i=[];for(const n of t)n instanceof aWe&&i.push(n.toString());return mVe(this,"calculationOrderIds",i.length?i:null)}get annotationGlobals(){return mVe(this,"annotationGlobals",qtt.createGlobals(this.pdfManager))}}Ac=new WeakSet,cc=async function(e,t,i,n,s,r,a){const{xref:o}=this;if(!(i instanceof aWe)||r.has(i))return;r.put(i);const l=await o.fetchAsync(i);if(!(l instanceof rWe))return;if(l.has("T")){const t=MVe(await l.getAsync("T"));e=""===e?t:`${e}.${t}`}else{let i=l;for(;;){if(i=i.getRaw("Parent")||t,i instanceof aWe){if(r.has(i))break;i=await o.fetchAsync(i)}if(!(i instanceof rWe))break;if(i.has("T")){const t=MVe(await i.getAsync("T"));e=""===e?t:`${e}.${t}`;break}}}if(t&&!l.has("Parent")&&AWe(l.get("Subtype"),"Widget")&&a.put(i,t),n.has(e)||n.set(e,[]),n.get(e).push(qtt.create(o,i,s,null,!0,a,null).then((e=>null==e?void 0:e.getFieldObject())).catch((function(e){return null}))),!l.has("Kids"))return;const A=await l.getAsync("Kids");if(Array.isArray(A))for(const c of A)await Ec(this,Ac,cc).call(this,e,i,c,n,s,r,a)};class Wit{constructor(e){var t,i;this._docBaseUrl=function(e){if(e){const t=fVe(e);if(t)return t.href}return null}(e.docBaseUrl),this._docId=e.docId,this._password=e.password,this.enableXfa=e.enableXfa,(t=e.evaluatorOptions).isOffscreenCanvasSupported&&(t.isOffscreenCanvasSupported=kVe.isOffscreenCanvasSupported),(i=e.evaluatorOptions).isImageDecoderSupported&&(i.isImageDecoderSupported=kVe.isImageDecoderSupported),this.evaluatorOptions=Object.freeze(e.evaluatorOptions)}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return this._docBaseUrl}get catalog(){return this.pdfDocument.catalog}ensureDoc(e,t){return this.ensure(this.pdfDocument,e,t)}ensureXRef(e,t){return this.ensure(this.pdfDocument.xref,e,t)}ensureCatalog(e,t){return this.ensure(this.pdfDocument.catalog,e,t)}getPage(e){return this.pdfDocument.getPage(e)}fontFallback(e,t){return this.pdfDocument.fontFallback(e,t)}loadXfaFonts(e,t){return this.pdfDocument.loadXfaFonts(e,t)}loadXfaImages(){return this.pdfDocument.loadXfaImages()}serializeXfaData(e){return this.pdfDocument.serializeXfaData(e)}cleanup(e=!1){return this.pdfDocument.cleanup(e)}async ensure(e,t,i){gVe("Abstract method `ensure` called")}requestRange(e,t){gVe("Abstract method `requestRange` called")}requestLoadedStream(e=!1){gVe("Abstract method `requestLoadedStream` called")}sendProgressiveData(e){gVe("Abstract method `sendProgressiveData` called")}updatePassword(e){this._password=e}terminate(e){gVe("Abstract method `terminate` called")}}class jit extends Wit{constructor(e){super(e);const t=new XWe(e.source);this.pdfDocument=new Vit(this,t),this._loadedStreamPromise=Promise.resolve(t)}async ensure(e,t,i){const n=e[t];return"function"==typeof n?n.apply(e,i):n}requestRange(e,t){return Promise.resolve()}requestLoadedStream(e=!1){return this._loadedStreamPromise}terminate(e){}}class Jit extends Wit{constructor(e){super(e),this.streamManager=new tje(e.source,{msgHandler:e.handler,length:e.length,disableAutoFetch:e.disableAutoFetch,rangeChunkSize:e.rangeChunkSize}),this.pdfDocument=new Vit(this,this.streamManager.getStream())}async ensure(e,t,i){try{const n=e[t];return"function"==typeof n?n.apply(e,i):n}catch(n){if(!(n instanceof fWe))throw n;return await this.requestRange(n.begin,n.end),this.ensure(e,t,i)}}requestRange(e,t){return this.streamManager.requestRange(e,t)}requestLoadedStream(e=!1){return this.streamManager.requestAllChunks(e)}sendProgressiveData(e){this.streamManager.onReceiveData({chunk:e})}terminate(e){this.streamManager.abort(e)}}async function zit(e,t,i,{encrypt:n=null}){const s=null==n?void 0:n.createCipherTransform(e.num,e.gen);i.push(`${e.num} ${e.gen} obj\n`),t instanceof rWe?await Xit(t,i,s):t instanceof dWe?await $it(t,i,s):(Array.isArray(t)||ArrayBuffer.isView(t))&&await Zit(t,i,s),i.push("\nendobj\n")}async function Xit(e,t,i){t.push("<<");for(const n of e.getKeys())t.push(` /${MWe(n)} `),await ent(e.getRaw(n),t,i);t.push(">>")}async function $it(e,t,i){let n=e.getBytes();const{dict:s}=e,[r,a]=await Promise.all([s.getAsync("Filter"),s.getAsync("DecodeParms")]),o=AWe(Array.isArray(r)?await s.xref.fetchIfRefAsync(r[0]):r,"FlateDecode");if(n.length>=256||o)try{const e=new CompressionStream("deflate"),t=e.writable.getWriter();await t.ready,t.write(n).then((async()=>{await t.ready,await t.close()})).catch((()=>{}));const i=await new Response(e.readable).arrayBuffer();let l,A;n=new Uint8Array(i),r?o||(l=Array.isArray(r)?[iWe.get("FlateDecode"),...r]:[iWe.get("FlateDecode"),r],a&&(A=Array.isArray(a)?[null,...a]:[null,a])):l=iWe.get("FlateDecode"),l&&s.set("Filter",l),A&&s.set("DecodeParms",A)}catch(A){}let l=QVe(n);i&&(l=i.encryptString(l)),s.set("Length",l.length),await Xit(s,t,i),t.push(" stream\n",l,"\nendstream")}async function Zit(e,t,i){t.push("[");let n=!0;for(const s of e)n?n=!1:t.push(" "),await ent(s,t,i);t.push("]")}async function ent(e,t,i){e instanceof iWe?t.push(`/${MWe(e.name)}`):e instanceof aWe?t.push(`${e.num} ${e.gen} R`):Array.isArray(e)||ArrayBuffer.isView(e)?await Zit(e,t,i):"string"==typeof e?(i&&(e=i.encryptString(e)),t.push(`(${RWe(e)})`)):"number"==typeof e?t.push(qWe(e)):"boolean"==typeof e?t.push(e.toString()):e instanceof rWe?await Xit(e,t,i):e instanceof dWe?await $it(e,t,i):null===e&&t.push("null")}function tnt(e,t,i,n){for(let s=t+i-1;s>i-1;s--)n[s]=255&e,e>>=8;return i+t}function int(e,t,i){for(let n=0,s=e.length;n<s;n++)i[t+n]=255&e.charCodeAt(n)}function nnt({xfaData:e,xfaDatasetsRef:t,changes:i,xref:n}){if(null===e){e=function(e,t){const i=new Z1e({hasAttributes:!0}).parseFromString(e);for(const{xfa:s}of t){if(!s)continue;const{path:e,value:t}=s;if(!e)continue;const n=TWe(e);let r=i.documentElement.searchNode(n,0);!r&&n.length>1&&(r=i.documentElement.searchNode([n.at(-1)],0)),r&&(r.childNodes=Array.isArray(t)?t.map((e=>new $1e("value",e))):[new $1e("#text",t)])}const n=[];return i.documentElement.dump(n),n.join("")}(n.fetchIfRef(t).getString(),i)}const s=new $We(e);s.dict=new rWe(n),s.dict.set("Type",iWe.get("EmbeddedFile")),i.put(t,{data:s})}function snt(e){const t=[];for(const{ref:i}of e)i.num===t.at(-2)+t.at(-1)?t[t.length-1]+=1:t.push(i.num,1);return t}function rnt(e,t,i){if(Array.isArray(t.fileIds)&&t.fileIds.length>0){const n=function(e,t){const i=Math.floor(Date.now()/1e3),n=t.filename||"",s=[i.toString(),n,e.toString()];let r=s.reduce(((e,t)=>e+t.length),0);for(const l of Object.values(t.info))s.push(l),r+=l.length;const a=new Uint8Array(r);let o=0;for(const l of s)int(l,o,a),o+=l.length;return QVe(yit(a))}(e,t);i.set("ID",[t.fileIds[0],n])}}async function ant({originalData:e,xrefInfo:t,changes:i,xref:n=null,hasXfa:s=!1,xfaDatasetsRef:r=null,hasXfaDatasetsEntry:a=!1,needAppearances:o,acroFormRef:l=null,acroForm:A=null,xfaData:c=null,useXrefStream:u=!1}){await async function({xref:e,acroForm:t,acroFormRef:i,hasXfa:n,hasXfaDatasetsEntry:s,xfaDatasetsRef:r,needAppearances:a,changes:o}){if(!a&&(!n||!r||s))return;const l=t.clone();if(n&&!s){const e=t.get("XFA").slice();e.splice(2,0,"datasets"),e.splice(3,0,r),l.set("XFA",e)}a&&l.set("NeedAppearances",!0),o.put(i,{data:l})}({xref:n,acroForm:A,acroFormRef:l,hasXfa:s,hasXfaDatasetsEntry:a,xfaDatasetsRef:r,needAppearances:o,changes:i}),s&&nnt({xfaData:c,xfaDatasetsRef:r,changes:i,xref:n});const h=function(e,t,i){const n=new rWe(null);n.set("Prev",e.startXRef);const s=e.newRef;return i?(t.put(s,{data:""}),n.set("Size",s.num+1),n.set("Type",iWe.get("XRef"))):n.set("Size",s.num),null!==e.rootRef&&n.set("Root",e.rootRef),null!==e.infoRef&&n.set("Info",e.infoRef),null!==e.encryptRef&&n.set("Encrypt",e.encryptRef),n}(t,i,u),d=[],g=await async function(e,t,i=[]){const n=[];for(const[s,{data:r}]of e.items())null!==r&&"string"!=typeof r?(await zit(s,r,i,t),n.push({ref:s,data:i.join("")}),i.length=0):n.push({ref:s,data:r});return n.sort(((e,t)=>e.ref.num-t.ref.num))}(i,n,d);let p=e.length;const f=e.at(-1);10!==f&&13!==f&&(d.push("\n"),p+=1);for(const{data:v}of g)null!==v&&d.push(v);await(u?async function(e,t,i,n,s){const r=[];let a=0,o=0;for(const{ref:d,data:g}of i){let e;a=Math.max(a,t),null!==g?(e=Math.min(d.gen,65535),r.push([1,t,e]),t+=g.length):(e=Math.min(d.gen+1,65535),r.push([0,0,e])),o=Math.max(o,e)}n.set("Index",snt(i));const l=[1,zWe(a),zWe(o)];n.set("W",l),rnt(t,e,n);const A=l.reduce(((e,t)=>e+t),0),c=new Uint8Array(A*r.length),u=new XWe(c);u.dict=n;let h=0;for(const[d,g,p]of r)h=tnt(d,l[0],h,c),h=tnt(g,l[1],h,c),h=tnt(p,l[2],h,c);await zit(e.newRef,u,s,{}),s.push("startxref\n",t.toString(),"\n%%EOF\n")}(t,p,g,h,d):async function(e,t,i,n,s){s.push("xref\n");const r=snt(i);let a=0;for(const{ref:o,data:l}of i)o.num===r[a]&&(s.push(`${r[a]} ${r[a+1]}\n`),a+=2),null!==l?(s.push(`${t.toString().padStart(10,"0")} ${Math.min(o.gen,65535).toString().padStart(5,"0")} n\r\n`),t+=l.length):s.push(`0000000000 ${Math.min(o.gen+1,65535).toString().padStart(5,"0")} f\r\n`);rnt(t,e,n),s.push("trailer\n"),await Xit(n,s),s.push("\nstartxref\n",t.toString(),"\n%%EOF\n")}(t,p,g,h,d));const m=d.reduce(((e,t)=>e+t.length),e.length),C=new Uint8Array(m);C.set(e);let I=e.length;for(const v of d)int(v,I,C),I+=v.length;return C}const ont=1,lnt=2,Ant=1,cnt=2,unt=3,hnt=4,dnt=5,gnt=6,pnt=7,fnt=8;function mnt(e){switch(e instanceof Error||"object"==typeof e&&null!==e||gVe('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new wVe(e.message);case"MissingPDFException":return new yVe(e.message);case"PasswordException":return new IVe(e.message,e.code);case"UnexpectedResponseException":return new bVe(e.message,e.status);case"UnknownErrorException":return new vVe(e.message,e.details);default:return new vVe(e.message,e.toString())}}class Cnt{constructor(e,t,i){yc(this,hc),yc(this,uc,new AbortController),this.sourceName=e,this.targetName=t,this.comObj=i,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),i.addEventListener("message",Ec(this,hc,dc).bind(this),{signal:Bc(this,uc).signal})}on(e,t){const i=this.actionHandler;if(i[e])throw new Error(`There is already an actionName called "${e}"`);i[e]=t}send(e,t,i){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},i)}sendWithPromise(e,t,i){const n=this.callbackId++,s=Promise.withResolvers();this.callbackCapabilities[n]=s;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},i)}catch(r){s.reject(r)}return s.promise}sendWithStream(e,t,i,n){const s=this.streamId++,r=this.sourceName,a=this.targetName,o=this.comObj;return new ReadableStream({start:i=>{const l=Promise.withResolvers();return this.streamControllers[s]={controller:i,startCall:l,pullCall:null,cancelCall:null,isClosed:!1},o.postMessage({sourceName:r,targetName:a,action:e,streamId:s,data:t,desiredSize:i.desiredSize},n),l.promise},pull:e=>{const t=Promise.withResolvers();return this.streamControllers[s].pullCall=t,o.postMessage({sourceName:r,targetName:a,stream:gnt,streamId:s,desiredSize:e.desiredSize}),t.promise},cancel:e=>{pVe(e instanceof Error,"cancel must have a valid reason");const t=Promise.withResolvers();return this.streamControllers[s].cancelCall=t,this.streamControllers[s].isClosed=!0,o.postMessage({sourceName:r,targetName:a,stream:Ant,streamId:s,reason:mnt(e)}),t.promise}},i)}destroy(){var e;null==(e=Bc(this,uc))||e.abort(),bc(this,uc,null)}}uc=new WeakMap,hc=new WeakSet,dc=function({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream)return void Ec(this,hc,pc).call(this,e);if(e.callback){const t=e.callbackId,i=this.callbackCapabilities[t];if(!i)throw new Error(`Cannot resolve callback ${t}`);if(delete this.callbackCapabilities[t],e.callback===ont)i.resolve(e.data);else{if(e.callback!==lnt)throw new Error("Unexpected callback case");i.reject(mnt(e.reason))}return}const t=this.actionHandler[e.action];if(!t)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const i=this.sourceName,n=e.sourceName,s=this.comObj;new Promise((function(i){i(t(e.data))})).then((function(t){s.postMessage({sourceName:i,targetName:n,callback:ont,callbackId:e.callbackId,data:t})}),(function(t){s.postMessage({sourceName:i,targetName:n,callback:lnt,callbackId:e.callbackId,reason:mnt(t)})}))}else e.streamId?Ec(this,hc,gc).call(this,e):t(e.data)},gc=function(e){const t=e.streamId,i=this.sourceName,n=e.sourceName,s=this.comObj,r=this,a=this.actionHandler[e.action],o={enqueue(e,r=1,a){if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=r,o>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),s.postMessage({sourceName:i,targetName:n,stream:hnt,streamId:t,chunk:e},a)},close(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:n,stream:unt,streamId:t}),delete r.streamSinks[t])},error(e){pVe(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:n,stream:dnt,streamId:t,reason:mnt(e)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};o.sinkCapability.resolve(),o.ready=o.sinkCapability.promise,this.streamSinks[t]=o,new Promise((function(t){t(a(e.data,o))})).then((function(){s.postMessage({sourceName:i,targetName:n,stream:fnt,streamId:t,success:!0})}),(function(e){s.postMessage({sourceName:i,targetName:n,stream:fnt,streamId:t,reason:mnt(e)})}))},pc=function(e){const t=e.streamId,i=this.sourceName,n=e.sourceName,s=this.comObj,r=this.streamControllers[t],a=this.streamSinks[t];switch(e.stream){case fnt:e.success?r.startCall.resolve():r.startCall.reject(mnt(e.reason));break;case pnt:e.success?r.pullCall.resolve():r.pullCall.reject(mnt(e.reason));break;case gnt:if(!a){s.postMessage({sourceName:i,targetName:n,stream:pnt,streamId:t,success:!0});break}a.desiredSize<=0&&e.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=e.desiredSize,new Promise((function(e){var t;e(null==(t=a.onPull)?void 0:t.call(a))})).then((function(){s.postMessage({sourceName:i,targetName:n,stream:pnt,streamId:t,success:!0})}),(function(e){s.postMessage({sourceName:i,targetName:n,stream:pnt,streamId:t,reason:mnt(e)})}));break;case hnt:if(pVe(r,"enqueue should have stream controller"),r.isClosed)break;r.controller.enqueue(e.chunk);break;case unt:if(pVe(r,"close should have stream controller"),r.isClosed)break;r.isClosed=!0,r.controller.close(),Ec(this,hc,fc).call(this,r,t);break;case dnt:pVe(r,"error should have stream controller"),r.controller.error(mnt(e.reason)),Ec(this,hc,fc).call(this,r,t);break;case cnt:e.success?r.cancelCall.resolve():r.cancelCall.reject(mnt(e.reason)),Ec(this,hc,fc).call(this,r,t);break;case Ant:if(!a)break;new Promise((function(t){var i;t(null==(i=a.onCancel)?void 0:i.call(a,mnt(e.reason)))})).then((function(){s.postMessage({sourceName:i,targetName:n,stream:cnt,streamId:t,success:!0})}),(function(e){s.postMessage({sourceName:i,targetName:n,stream:cnt,streamId:t,reason:mnt(e)})})),a.sinkCapability.reject(mnt(e.reason)),a.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}},fc=async function(e,t){var i,n,s;await Promise.allSettled([null==(i=e.startCall)?void 0:i.promise,null==(n=e.pullCall)?void 0:n.promise,null==(s=e.cancelCall)?void 0:s.promise]),delete this.streamControllers[t]};class Int{constructor(e){this._msgHandler=e,this._contentLength=null,this._fullRequestReader=null,this._rangeRequestReaders=[]}getFullReader(){return pVe(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once."),this._fullRequestReader=new vnt(this._msgHandler),this._fullRequestReader}getRangeReader(e,t){const i=new Bnt(e,t,this._msgHandler);return this._rangeRequestReaders.push(i),i}cancelAllRequests(e){var t;null==(t=this._fullRequestReader)||t.cancel(e);for(const i of this._rangeRequestReaders.slice(0))i.cancel(e)}}class vnt{constructor(e){this._msgHandler=e,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;const t=this._msgHandler.sendWithStream("GetReader");this._reader=t.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then((e=>{this._isStreamingSupported=e.isStreamingSupported,this._isRangeSupported=e.isRangeSupported,this._contentLength=e.contentLength}))}get headersReady(){return this._headersReady}get contentLength(){return this._contentLength}get isStreamingSupported(){return this._isStreamingSupported}get isRangeSupported(){return this._isRangeSupported}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}class Bnt{constructor(e,t,i){this._msgHandler=i,this.onProgress=null;const n=this._msgHandler.sendWithStream("GetRangeReader",{begin:e,end:t});this._reader=n.getReader()}get isStreamingSupported(){return!1}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}class ynt{constructor(e){this.name=e,this.terminated=!1,this._capability=Promise.withResolvers()}get finished(){return this._capability.promise}finish(){this._capability.resolve()}terminate(){this.terminated=!0}ensureNotTerminated(){if(this.terminated)throw new Error("Worker task was terminated")}}class bnt{static setup(e,t){let i=!1;e.on("test",(function(t){i||(i=!0,e.send("test",t instanceof Uint8Array))})),e.on("configure",(function(e){var t;t=e.verbosity,Number.isInteger(t)&&(hVe=t)})),e.on("GetDocRequest",(function(e){return bnt.createDocumentHandler(e,t)}))}static createDocumentHandler(e,t){let i,n=!1,s=null;const r=new Set,a=hVe,{docId:o,apiVersion:l}=e,A="4.9.72";if(l!==A)throw new Error(`The API version "${l}" does not match the Worker version "${A}".`);const c=[];for(const C in[])c.push(C);if(c.length)throw new Error("The `Array.prototype` contains unexpected enumerable properties: "+c.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.");const u=o+"_worker";let h=new Cnt(u,o,t);function d(){if(n)throw new Error("Worker was terminated")}function g(e){r.add(e)}function p(e){e.finish(),r.delete(e)}async function f(e){await i.ensureDoc("checkHeader"),await i.ensureDoc("parseStartXRef"),await i.ensureDoc("parse",[e]),await i.ensureDoc("checkFirstPage",[e]),await i.ensureDoc("checkLastPage",[e]);const t=await i.ensureDoc("isPureXfa");if(t){const e=new ynt("loadXfaFonts");g(e),await Promise.all([i.loadXfaFonts(h,e).catch((e=>{})).then((()=>p(e))),i.loadXfaImages()])}const[n,s]=await Promise.all([i.ensureDoc("numPages"),i.ensureDoc("fingerprints")]);return{numPages:n,fingerprints:s,htmlForXfa:t?await i.ensureDoc("htmlForXfa"):null}}function m(e){function t(e){d(),h.send("GetDoc",{pdfInfo:e})}function r(e){if(d(),e instanceof IVe){const t=new ynt(`PasswordException: response ${e.code}`);g(t),h.sendWithPromise("PasswordRequest",e).then((function({password:e}){p(t),i.updatePassword(e),a()})).catch((function(){p(t),h.send("DocException",e)}))}else e instanceof BVe||e instanceof yVe||e instanceof bVe||e instanceof vVe?h.send("DocException",e):h.send("DocException",new vVe(e.message,e.toString()))}function a(){d(),f(!1).then(t,(function(e){d(),e instanceof IWe?i.requestLoadedStream().then((function(){d(),f(!0).then(t,r)})):r(e)}))}d(),function({data:e,password:t,disableAutoFetch:i,rangeChunkSize:n,length:r,docBaseUrl:a,enableXfa:l,evaluatorOptions:A}){const c={source:null,disableAutoFetch:i,docBaseUrl:a,docId:o,enableXfa:l,evaluatorOptions:A,handler:h,length:r,password:t,rangeChunkSize:n},u=Promise.withResolvers();let g;if(e){try{c.source=e,g=new jit(c),u.resolve(g)}catch(I){u.reject(I)}return u.promise}let p,f=[],m=0;try{p=new Int(h)}catch(I){return u.reject(I),u.promise}const C=p.getFullReader();return C.headersReady.then((function(){if(C.isRangeSupported){c.source=p,c.length=C.contentLength,c.disableAutoFetch||(c.disableAutoFetch=C.isStreamingSupported),g=new Jit(c);for(const e of f)g.sendProgressiveData(e);f=[],u.resolve(g),s=null}})).catch((function(e){u.reject(e),s=null})),new Promise((function(e,t){const i=function({value:e,done:n}){try{if(d(),n){if(!g){const e=vWe(f);f=[],r&&e.length,c.source=e,g=new jit(c),u.resolve(g)}return void(s=null)}m+=e.byteLength,C.isStreamingSupported||h.send("DocProgress",{loaded:m,total:Math.max(m,C.contentLength||0)}),g?g.sendProgressiveData(e):f.push(e),C.read().then(i,t)}catch(I2){t(I2)}};C.read().then(i,t)})).catch((function(e){u.reject(e),s=null})),s=function(e){p.cancelAllRequests(e)},u.promise}(e).then((function(e){if(n)throw e.terminate(new wVe("Worker was terminated.")),new Error("Worker was terminated");i=e,i.requestLoadedStream(!0).then((e=>{h.send("DataLoaded",{length:e.bytes.byteLength})}))})).then(a,r)}return h.on("GetPage",(function(e){return i.getPage(e.pageIndex).then((function(e){return Promise.all([i.ensure(e,"rotate"),i.ensure(e,"ref"),i.ensure(e,"userUnit"),i.ensure(e,"view")]).then((function([e,t,i,n]){return{rotate:e,ref:t,refStr:(null==t?void 0:t.toString())??null,userUnit:i,view:n}}))}))})),h.on("GetPageIndex",(function(e){const t=aWe.get(e.num,e.gen);return i.ensureCatalog("getPageIndex",[t])})),h.on("GetDestinations",(function(e){return i.ensureCatalog("destinations")})),h.on("GetDestination",(function(e){return i.ensureCatalog("getDestination",[e.id])})),h.on("GetPageLabels",(function(e){return i.ensureCatalog("pageLabels")})),h.on("GetPageLayout",(function(e){return i.ensureCatalog("pageLayout")})),h.on("GetPageMode",(function(e){return i.ensureCatalog("pageMode")})),h.on("GetViewerPreferences",(function(e){return i.ensureCatalog("viewerPreferences")})),h.on("GetOpenAction",(function(e){return i.ensureCatalog("openAction")})),h.on("GetAttachments",(function(e){return i.ensureCatalog("attachments")})),h.on("GetDocJSActions",(function(e){return i.ensureCatalog("jsActions")})),h.on("GetPageJSActions",(function({pageIndex:e}){return i.getPage(e).then((function(e){return i.ensure(e,"jsActions")}))})),h.on("GetOutline",(function(e){return i.ensureCatalog("documentOutline")})),h.on("GetOptionalContentConfig",(function(e){return i.ensureCatalog("optionalContentConfig")})),h.on("GetPermissions",(function(e){return i.ensureCatalog("permissions")})),h.on("GetMetadata",(function(e){return Promise.all([i.ensureDoc("documentInfo"),i.ensureCatalog("metadata")])})),h.on("GetMarkInfo",(function(e){return i.ensureCatalog("markInfo")})),h.on("GetData",(function(e){return i.requestLoadedStream().then((function(e){return e.bytes}))})),h.on("GetAnnotations",(function({pageIndex:e,intent:t}){return i.getPage(e).then((function(i){const n=new ynt(`GetAnnotations: page ${e}`);return g(n),i.getAnnotationsData(h,n,t).then((e=>(p(n),e)),(e=>{throw p(n),e}))}))})),h.on("GetFieldObjects",(function(e){return i.ensureDoc("fieldObjects").then((e=>(null==e?void 0:e.allFields)||null))})),h.on("HasJSActions",(function(e){return i.ensureDoc("hasJSActions")})),h.on("GetCalculationOrderIds",(function(e){return i.ensureDoc("calculationOrderIds")})),h.on("SaveDocument",(async function({isPureXfa:e,numPages:t,annotationStorage:n,filename:s}){const r=[i.requestLoadedStream(),i.ensureCatalog("acroForm"),i.ensureCatalog("acroFormRef"),i.ensureDoc("startXRef"),i.ensureDoc("xref"),i.ensureDoc("linearization"),i.ensureCatalog("structTreeRoot")],a=new lWe,o=[],l=e?null:YWe(n),[A,c,u,d,g,f,m]=await Promise.all(r),C=g.trailer.getRaw("Root")||null;let I;if(l){m?await m.canUpdateStructTree({pdfManager:i,xref:g,newAnnotationsByPage:l})&&(I=m):await o2e.canCreateStructureTree({catalogRef:C,pdfManager:i,newAnnotationsByPage:l})&&(I=null);const e=qtt.generateImages(n.values(),g,i.evaluatorOptions.isOffscreenCanvasSupported),t=void 0===I?o:[];for(const[n,s]of l)t.push(i.getPage(n).then((t=>{const i=new ynt(`Save (editor): page ${n}`);return t.saveNewAnnotations(h,i,s,e,a).finally((function(){p(i)}))})));null===I?o.push(Promise.all(t).then((async()=>{await o2e.createStructureTree({newAnnotationsByPage:l,xref:g,catalogRef:C,pdfManager:i,changes:a})}))):I&&o.push(Promise.all(t).then((async()=>{await I.updateStructureTree({newAnnotationsByPage:l,pdfManager:i,changes:a})})))}if(e)o.push(i.serializeXfaData(n));else for(let _=0;_<t;_++)o.push(i.getPage(_).then((function(e){const t=new ynt(`Save: page ${_}`);return e.save(h,t,n,a).finally((function(){p(t)}))})));const v=await Promise.all(o);let B=null;if(e){if(B=v[0],!B)return A.bytes}else if(0===a.size)return A.bytes;const y=u&&c instanceof rWe&&a.values().some((e=>e.needAppearances)),b=c instanceof rWe&&c.get("XFA")||null;let E=null,w=!1;if(Array.isArray(b)){for(let e=0,t=b.length;e<t;e+=2)"datasets"===b[e]&&(E=b[e+1],w=!0);null===E&&(E=g.getNewTemporaryRef())}let Q=Object.create(null);if(g.trailer){const e=Object.create(null),t=g.trailer.get("Info")||null;if(t instanceof rWe)for(const[i,n]of t)"string"==typeof n&&(e[i]=MVe(n));Q={rootRef:C,encryptRef:g.trailer.getRaw("Encrypt")||null,newRef:g.getNewTemporaryRef(),infoRef:g.trailer.getRaw("Info")||null,info:e,fileIds:g.trailer.get("ID")||null,startXRef:f?d:g.lastXRefStreamPos??d,filename:s}}return ant({originalData:A.bytes,xrefInfo:Q,changes:a,xref:g,hasXfa:!!b,xfaDatasetsRef:E,hasXfaDatasetsEntry:w,needAppearances:y,acroFormRef:u,acroForm:c,xfaData:B,useXrefStream:uWe(g.topDict,"XRef")}).finally((()=>{g.resetNewTemporaryRef()}))})),h.on("GetOperatorList",(function(e,t){const n=e.pageIndex;i.getPage(n).then((function(i){const s=new ynt(`GetOperatorList: page ${n}`);g(s);const r=a>=_qe?Date.now():0;i.getOperatorList({handler:h,sink:t,task:s,intent:e.intent,cacheKey:e.cacheKey,annotationStorage:e.annotationStorage,modifiedIds:e.modifiedIds}).then((function(e){p(s),r&&(Date.now(),e.length),t.close()}),(function(e){p(s),s.terminated||t.error(e)}))}))})),h.on("GetTextContent",(function(e,t){const{pageIndex:n,includeMarkedContent:s,disableNormalization:r}=e;i.getPage(n).then((function(e){const i=new ynt("GetTextContent: page "+n);g(i);const o=a>=_qe?Date.now():0;e.extractTextContent({handler:h,task:i,sink:t,includeMarkedContent:s,disableNormalization:r}).then((function(){p(i),o&&Date.now(),t.close()}),(function(e){p(i),i.terminated||t.error(e)}))}))})),h.on("GetStructTree",(function(e){return i.getPage(e.pageIndex).then((function(e){return i.ensure(e,"getStructTree")}))})),h.on("FontFallback",(function(e){return i.fontFallback(e.id,h)})),h.on("Cleanup",(function(e){return i.cleanup(!0)})),h.on("Terminate",(function(e){n=!0;const t=[];if(i){i.terminate(new wVe("Worker was terminated."));const e=i.cleanup();t.push(e),i=null}else P1e();null==s||s(new wVe("Worker was terminated."));for(const i of r)t.push(i.finished),i.terminate();return Promise.all(t).then((function(){h.destroy(),h=null}))})),h.on("Ready",(function(t){m(e),e=null})),u}static initializeFromPort(e){const t=new Cnt("worker","main",e);bnt.setup(t,e),t.send("ready",null)}}var Ent;"undefined"==typeof window&&!AKe&&"undefined"!=typeof self&&("function"==typeof(Ent=self).postMessage&&"onmessage"in Ent)&&bnt.initializeFromPort(self),window.CSS_UNITS=96/72,window.DEFAULT_SCALE_VALUE="auto",window.DEFAULT_SCALE=1,window.MIN_SCALE=.25,window.MAX_SCALE=10,window.UNKNOWN_SCALE=0,window.MAX_AUTO_SCALE=1.25,window.SCROLLBAR_PADDING=40,window.VERTICAL_PADDING=5,window.CLEANUP_TIMEOUT=3e4,window.RenderingStates={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3,ERROR:4},window.PresentationModeState={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3},window.RendererType={CANVAS:"canvas",SVG:"svg"},window.TextLayerMode={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2},window.WaitOnType={EVENT:"event",TIMEOUT:"timeout"},window.animationStarted=new Promise((function(e){window.requestAnimationFrame(e)})),window.localized=Promise.resolve(),window.compatibilityParams=Object.create(null);var wnt="undefined"!=typeof navigator&&navigator.userAgent||"",Qnt="undefined"!=typeof navigator&&navigator.platform||"",_nt="undefined"!=typeof navigator&&navigator.maxTouchPoints||1,Snt=/Android/.test(wnt);function xnt(e,t,i){return i&&function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e,i),e}(/\b(iPad|iPhone|iPod)(?=;)/.test(wnt)||"MacIntel"===Qnt&&_nt>1||Snt)&&(compatibilityParams.maxCanvasPixels=5242880),window.viewerCompatibilityParams=Object.freeze(compatibilityParams),window.OptionKind={VIEWER:2,API:4,WORKER:8,PREFERENCE:128},window.defaultOptions={cursorToolOnLoad:{value:0,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},defaultUrl:{value:"compressed.tracemonkey-pldi-09.pdf",kind:OptionKind.VIEWER},defaultZoomValue:{value:"",kind:OptionKind.VIEWER+OptionKind.PREFERENCE},disableHistory:{value:!1,kind:OptionKind.VIEWER},disablePageLabels:{value:!1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},enablePrintAutoRotate:{value:!1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},enableWebGL:{value:!1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},eventBusDispatchToDOM:{value:!1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:OptionKind.VIEWER},externalLinkTarget:{value:0,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},historyUpdateUrl:{value:!1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},imageResourcesPath:{value:"./images/",kind:OptionKind.VIEWER},maxCanvasPixels:{value:16777216,compatibility:viewerCompatibilityParams.maxCanvasPixels,kind:OptionKind.VIEWER},pdfBugEnabled:{value:!1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},renderer:{value:"canvas",kind:OptionKind.VIEWER+OptionKind.PREFERENCE},renderInteractiveForms:{value:!1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},sidebarViewOnLoad:{value:-1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},scrollModeOnLoad:{value:-1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},spreadModeOnLoad:{value:-1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},textLayerMode:{value:1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},useOnlyCssZoom:{value:!1,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},viewOnLoad:{value:0,kind:OptionKind.VIEWER+OptionKind.PREFERENCE},cMapPacked:{value:!0,kind:OptionKind.API},cMapUrl:{value:"../web/cmaps/",kind:OptionKind.API},disableAutoFetch:{value:!1,kind:OptionKind.API+OptionKind.PREFERENCE},
// disableCreateObjectURL: {
//   value: false,
//   compatibility: pdfjsLib.apiCompatibilityParams.disableCreateObjectURL,
//   kind: OptionKind.API
// },
disableFontFace:{value:!1,kind:OptionKind.API+OptionKind.PREFERENCE},disableRange:{value:!1,kind:OptionKind.API+OptionKind.PREFERENCE},disableStream:{value:!1,kind:OptionKind.API+OptionKind.PREFERENCE},docBaseUrl:{value:"",kind:OptionKind.API},isEvalSupported:{value:!0,kind:OptionKind.API},maxImageSize:{value:-1,kind:OptionKind.API},pdfBug:{value:!1,kind:OptionKind.API},verbosity:{value:1,kind:OptionKind.API},workerPort:{value:null,kind:OptionKind.WORKER},workerSrc:{value:"../build/pdf.worker.js",kind:OptionKind.WORKER}},window.userOptions=Object.create(null),window.AppOptions=function(){function e(){throw _classCallCheck(this,e),new Error("Cannot initialize AppOptions.")}return xnt(e,0,[{key:"get",value:function(e){var t=userOptions[e];if(void 0!==t)return t;var i=defaultOptions[e];return void 0!==i?i.compatibility||i.value:void 0}},{key:"getAll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=Object.create(null);for(var i in defaultOptions){var n=defaultOptions[i];if(e){if(!(e&n.kind))continue;if(e===OptionKind.PREFERENCE){var s=n.value,r=_typeof(s);if("boolean"===r||"string"===r||"number"===r&&Number.isInteger(s)){t[i]=s;continue}throw new Error("Invalid type for preference: ".concat(i))}}var a=userOptions[i];t[i]=void 0!==a?a:n.compatibility||n.value}return t}},{key:"set",value:function(e,t){userOptions[e]=t}},{key:"remove",value:function(e){delete userOptions[e]}}]),e}(),
/*! jQuery UI - v1.13.3 - 2024-04-26
* https://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright OpenJS Foundation and other contributors; Licensed MIT */
function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(PC)}((function(e){e.ui=e.ui||{},e.ui.version="1.13.3";
/*!
   * jQuery UI Widget 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
var t,i=0,n=Array.prototype.hasOwnProperty,s=Array.prototype.slice;e.cleanData=function(t){return function(i){var n,s,r;for(r=0;null!=(s=i[r]);r++)(n=e._data(s,"events"))&&n.remove&&e(s).triggerHandler("remove");t(i)}}(e.cleanData),e.widget=function(t,i,n){var s,r,a,o={},l=t.split(".")[0],A=l+"-"+(t=t.split(".")[1]);return n||(n=i,i=e.Widget),Array.isArray(n)&&(n=e.extend.apply(null,[{}].concat(n))),e.expr.pseudos[A.toLowerCase()]=function(t){return!!e.data(t,A)},e[l]=e[l]||{},s=e[l][t],r=e[l][t]=function(e,t){if(!this||!this._createWidget)return new r(e,t);arguments.length&&this._createWidget(e,t)},e.extend(r,s,{version:n.version,
// Copy the object used to create the prototype in case we need to
// redefine the widget later
_proto:e.extend({},n),
// Track widgets that inherit from this widget in case this widget is
// redefined after a widget inherits from it
_childConstructors:[]}),(a=new i).options=e.widget.extend({},a.options),e.each(n,(function(e,t){o[e]="function"==typeof t?function(){function n(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,r=this._superApply;return this._super=n,this._superApply=s,e=t.apply(this,arguments),this._super=i,this._superApply=r,e}}():t})),r.prototype=e.widget.extend(a,{
// TODO: remove support for widgetEventPrefix
// always use the name + a colon as the prefix, e.g., draggable:start
// don't prefix for widgets that aren't DOM-based
widgetEventPrefix:s&&a.widgetEventPrefix||t},o,{constructor:r,namespace:l,widgetName:t,widgetFullName:A}),s?(e.each(s._childConstructors,(function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,r,i._proto)})),delete s._childConstructors):i._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var i,r,a=s.call(arguments,1),o=0,l=a.length;o<l;o++)for(i in a[o])r=a[o][i],n.call(a[o],i)&&void 0!==r&&(e.isPlainObject(r)?t[i]=e.isPlainObject(t[i])?e.widget.extend({},t[i],r):
// Don't extend strings, arrays, etc. with objects
e.widget.extend({},r):t[i]=r);return t},e.widget.bridge=function(t,i){var n=i.prototype.widgetFullName||t;e.fn[t]=function(r){var a="string"==typeof r,o=s.call(arguments,1),l=this;return a?this.length||"instance"!==r?this.each((function(){var i,s=e.data(this,n);return"instance"===r?(l=s,!1):s?"function"!=typeof s[r]||"_"===r.charAt(0)?e.error("no such method '"+r+"' for "+t+" widget instance"):(i=s[r].apply(s,o))!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0:e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+r+"'")})):l=void 0:(o.length&&(r=e.widget.extend.apply(null,[r].concat(o))),this.each((function(){var t=e.data(this,n);t?(t.option(r||{}),t._init&&t._init()):e.data(this,n,new i(r,this))}))),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,
// Callbacks
create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?
// Element within the document
n.ownerDocument:
// Element is window or document
n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,(function(e,i){t._removeClass(i,e)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var n,s,r,a=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(a={},n=t.split("."),t=n.shift(),n.length){for(s=a[t]=e.widget.extend({},this.options[t]),r=0;r<n.length-1;r++)s[n[r]]=s[n[r]]||{},s=s[n[r]];if(t=n.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=i}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var i,n,s;for(i in t)s=this.classesElementLookup[i],t[i]!==this.options.classes[i]&&s&&s.length&&(n=e(s.get()),this._removeClass(s,i),n.addClass(this._classes({element:n,keys:i,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){var i=[],n=this;function s(){var i=[];t.element.each((function(t,s){e.map(n.classesElementLookup,(function(e){return e})).some((function(e){return e.is(s)}))||i.push(s)})),n._on(e(i),{remove:"_untrackClassesElement"})}function r(r,a){var o,l;for(l=0;l<r.length;l++)o=n.classesElementLookup[r[l]]||e(),t.add?(s(),o=e(e.uniqueSort(o.get().concat(t.element.get())))):o=e(o.not(t.element).get()),n.classesElementLookup[r[l]]=o,i.push(r[l]),a&&t.classes[r[l]]&&i.push(t.classes[r[l]])}return(t=e.extend({element:this.element,classes:this.options.classes||{}},t)).keys&&r(t.keys.match(/\S+/g)||[],!0),t.extra&&r(t.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(t){var i=this;e.each(i.classesElementLookup,(function(n,s){-1!==e.inArray(t.target,s)&&(i.classesElementLookup[n]=e(s.not(t.target).get()))})),this._off(e(t.target))},_removeClass:function(e,t,i){return this._toggleClass(e,t,i,!1)},_addClass:function(e,t,i){return this._toggleClass(e,t,i,!0)},_toggleClass:function(e,t,i,n){n="boolean"==typeof n?n:i;var s="string"==typeof e||null===e,r={extra:s?t:i,keys:s?e:t,element:s?this.element:e,add:n};return r.element.toggleClass(this._classes(r),n),this},_on:function(t,i,n){var s,r=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=s=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),e.each(n,(function(n,a){function o(){if(t||!0!==r.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof a?r[a]:a).apply(r,arguments)}"string"!=typeof a&&(o.guid=a.guid=a.guid||o.guid||e.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),A=l[1]+r.eventNamespace,c=l[2];c?s.on(A,c,o):i.on(A,o)}))},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){var i=this;return setTimeout((function(){return("string"==typeof e?i[e]:e).apply(i,arguments)}),t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,i,n){var s,r,a=this.options[t];if(n=n||{},(i=e.Event(i)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],r=i.originalEvent)for(s in r)s in i||(i[s]=r[s]);return this.element.trigger(i,n),!("function"==typeof a&&!1===a.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},(function(t,i){e.Widget.prototype["_"+t]=function(n,s,r){var a;"string"==typeof s&&(s={effect:s});var o=s?!0===s||"number"==typeof s?i:s.effect||i:t;"number"==typeof(s=s||{})?s={duration:s}:!0===s&&(s={}),a=!e.isEmptyObject(s),s.complete=r,s.delay&&n.delay(s.delay),a&&e.effects&&e.effects.effect[o]?n[t](s):o!==t&&n[o]?n[o](s.duration,s.easing,r):n.queue((function(i){e(this)[t](),r&&r.call(n[0]),i()}))}})),e.widget,
/*!
   * jQuery UI Position 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   *
   * https://api.jqueryui.com/position/
   */
function(){var t,i=Math.max,n=Math.abs,s=/left|center|right/,r=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,o=/^\w+/,l=/%$/,A=e.fn.position;function c(e,t,i){return[parseFloat(e[0])*(l.test(e[0])?t/100:1),parseFloat(e[1])*(l.test(e[1])?i/100:1)]}function u(t,i){return parseInt(e.css(t,i),10)||0}function h(e){return null!=e&&e===e.window}e.position={scrollbarWidth:function(){if(void 0!==t)return t;var i,n,s=e("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),r=s.children()[0];return e("body").append(s),i=r.offsetWidth,s.css("overflow","scroll"),i===(n=r.offsetWidth)&&(n=s[0].clientWidth),s.remove(),t=i-n},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),n=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=h(i[0]),s=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:s,offset:!n&&!s?e(t).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return A.apply(this,arguments);var l,d,g,p,f,m,C,I,v="string"==typeof(t=e.extend({},t)).of?e(document).find(t.of):e(t.of),B=e.position.getWithinInfo(t.within),y=e.position.getScrollInfo(B),b=(t.collision||"flip").split(" "),E={};return m=9===(I=(C=v)[0]).nodeType?{width:C.width(),height:C.height(),offset:{top:0,left:0}}:h(I)?{width:C.width(),height:C.height(),offset:{top:C.scrollTop(),left:C.scrollLeft()}}:I.preventDefault?{width:0,height:0,offset:{top:I.pageY,left:I.pageX}}:{width:C.outerWidth(),height:C.outerHeight(),offset:C.offset()},v[0].preventDefault&&(t.at="left top"),d=m.width,g=m.height,p=m.offset,f=e.extend({},p),e.each(["my","at"],(function(){var e,i,n=(t[this]||"").split(" ");1===n.length&&(n=s.test(n[0])?n.concat(["center"]):r.test(n[0])?["center"].concat(n):["center","center"]),n[0]=s.test(n[0])?n[0]:"center",n[1]=r.test(n[1])?n[1]:"center",e=a.exec(n[0]),i=a.exec(n[1]),E[this]=[e?e[0]:0,i?i[0]:0],t[this]=[o.exec(n[0])[0],o.exec(n[1])[0]]})),1===b.length&&(b[1]=b[0]),"right"===t.at[0]?f.left+=d:"center"===t.at[0]&&(f.left+=d/2),"bottom"===t.at[1]?f.top+=g:"center"===t.at[1]&&(f.top+=g/2),l=c(E.at,d,g),f.left+=l[0],f.top+=l[1],this.each((function(){var s,r,a=e(this),o=a.outerWidth(),A=a.outerHeight(),h=u(this,"marginLeft"),m=u(this,"marginTop"),C=o+h+u(this,"marginRight")+y.width,I=A+m+u(this,"marginBottom")+y.height,w=e.extend({},f),Q=c(E.my,a.outerWidth(),a.outerHeight());"right"===t.my[0]?w.left-=o:"center"===t.my[0]&&(w.left-=o/2),"bottom"===t.my[1]?w.top-=A:"center"===t.my[1]&&(w.top-=A/2),w.left+=Q[0],w.top+=Q[1],s={marginLeft:h,marginTop:m},e.each(["left","top"],(function(i,n){e.ui.position[b[i]]&&e.ui.position[b[i]][n](w,{targetWidth:d,targetHeight:g,elemWidth:o,elemHeight:A,collisionPosition:s,collisionWidth:C,collisionHeight:I,offset:[l[0]+Q[0],l[1]+Q[1]],my:t.my,at:t.at,within:B,elem:a})})),t.using&&(r=function(e){var s=p.left-w.left,r=s+d-o,l=p.top-w.top,c=l+g-A,u={target:{element:v,left:p.left,top:p.top,width:d,height:g},element:{element:a,left:w.left,top:w.top,width:o,height:A},horizontal:r<0?"left":s>0?"right":"center",vertical:c<0?"top":l>0?"bottom":"middle"};d<o&&n(s+r)<d&&(u.horizontal="center"),g<A&&n(l+c)<g&&(u.vertical="middle"),i(n(s),n(r))>i(n(l),n(c))?u.important="horizontal":u.important="vertical",t.using.call(this,e,u)}),a.offset(e.extend(w,{using:r}))}))},e.ui.position={fit:{left:function(e,t){var n,s=t.within,r=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,o=e.left-t.collisionPosition.marginLeft,l=r-o,A=o+t.collisionWidth-a-r;t.collisionWidth>a?l>0&&A<=0?(n=e.left+l+t.collisionWidth-a-r,e.left+=l-n):e.left=A>0&&l<=0?r:l>A?r+a-t.collisionWidth:r:l>0?e.left+=l:A>0?e.left-=A:e.left=i(e.left-o,e.left)},top:function(e,t){var n,s=t.within,r=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,o=e.top-t.collisionPosition.marginTop,l=r-o,A=o+t.collisionHeight-a-r;t.collisionHeight>a?l>0&&A<=0?(n=e.top+l+t.collisionHeight-a-r,e.top+=l-n):e.top=A>0&&l<=0?r:l>A?r+a-t.collisionHeight:r:l>0?e.top+=l:A>0?e.top-=A:e.top=i(e.top-o,e.top)}},flip:{left:function(e,t){var i,s,r=t.within,a=r.offset.left+r.scrollLeft,o=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,A=e.left-t.collisionPosition.marginLeft,c=A-l,u=A+t.collisionWidth-o-l,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,d="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,g=-2*t.offset[0];c<0?((i=e.left+h+d+g+t.collisionWidth-o-a)<0||i<n(c))&&(e.left+=h+d+g):u>0&&((s=e.left-t.collisionPosition.marginLeft+h+d+g-l)>0||n(s)<u)&&(e.left+=h+d+g)},top:function(e,t){var i,s,r=t.within,a=r.offset.top+r.scrollTop,o=r.height,l=r.isWindow?r.scrollTop:r.offset.top,A=e.top-t.collisionPosition.marginTop,c=A-l,u=A+t.collisionHeight-o-l,h="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,d="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,g=-2*t.offset[1];c<0?((s=e.top+h+d+g+t.collisionHeight-o-a)<0||s<n(c))&&(e.top+=h+d+g):u>0&&((i=e.top-t.collisionPosition.marginTop+h+d+g-l)>0||n(i)<u)&&(e.top+=h+d+g)}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}}}(),e.ui.position,
/*!
   * jQuery UI :data 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.extend(e.expr.pseudos,{data:e.expr.createPseudo?e.expr.createPseudo((function(t){return function(i){return!!e.data(i,t)}})):
// Support: jQuery <1.8
function(t,i,n){return!!e.data(t,n[3])}}),
/*!
   * jQuery UI Disable Selection 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",(function(e){e.preventDefault()}))}),enableSelection:function(){return this.off(".ui-disableSelection")}});var r,a=e,o={},l=o.toString,A=/^([\-+])=\s*(\d+\.?\d*)/,c=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{
// this regex ignores A-F because it's compared against an already lowercased string
re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),e[4]?(parseInt(e[4],16)/255).toFixed(2):1]}},{
// this regex ignores A-F because it's compared against an already lowercased string
re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),e[4]?(parseInt(e[4]+e[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],u=a.Color=function(e,t,i,n){return new a.Color.fn.parse(e,t,i,n)},h={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},g=u.support={},p=a("<p>")[0],f=a.each;
/*!
   * jQuery Color Animations v2.2.0
   * https://github.com/jquery/jquery-color
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   *
   * Date: Sun May 10 09:02:36 2020 +0200
   */function m(e){return null==e?e+"":"object"==typeof e?o[l.call(e)]||"object":typeof e}function C(e,t,i){var n=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=n.floor?~~e:parseFloat(e),isNaN(e)?t.def:n.mod?(e+n.mod)%n.mod:Math.min(n.max,Math.max(0,e)))}function I(e){var t=u(),i=t._rgba=[];return e=e.toLowerCase(),f(c,(function(n,s){var r,a=s.re.exec(e),o=a&&s.parse(a),l=s.space||"rgba";if(o)return r=t[l](o),t[h[l].cache]=r[h[l].cache],i=t._rgba=r._rgba,!1})),i.length?("0,0,0,0"===i.join()&&a.extend(i,r.transparent),t):r[e]}function v(e,t,i){return 6*(i=(i+1)%1)<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}p.style.cssText="background-color:rgba(1,1,1,.5)",g.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(h,(function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}})),a.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){o["[object "+t+"]"]=t.toLowerCase()})),u.fn=a.extend(u.prototype,{parse:function(e,t,i,n){if(void 0===e)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=a(e).css(t),t=void 0);var s=this,o=m(e),l=this._rgba=[];return void 0!==t&&(e=[e,t,i,n],o="array"),"string"===o?this.parse(I(e)||r._default):"array"===o?(f(h.rgba.props,(function(t,i){l[i.idx]=C(e[i.idx],i)})),this):"object"===o?(f(h,e instanceof u?function(t,i){e[i.cache]&&(s[i.cache]=e[i.cache].slice())}:function(t,i){var n=i.cache;f(i.props,(function(t,r){if(!s[n]&&i.to){if("alpha"===t||null==e[t])return;s[n]=i.to(s._rgba)}s[n][r.idx]=C(e[t],r,!0)})),s[n]&&a.inArray(null,s[n].slice(0,3))<0&&(null==s[n][3]&&(s[n][3]=1),i.from&&(s._rgba=i.from(s[n])))}),this):void 0},is:function(e){var t=u(e),i=!0,n=this;return f(h,(function(e,s){var r,a=t[s.cache];return a&&(r=n[s.cache]||s.to&&s.to(n._rgba)||[],f(s.props,(function(e,t){if(null!=a[t.idx])return i=a[t.idx]===r[t.idx]}))),i})),i},_space:function(){var e=[],t=this;return f(h,(function(i,n){t[n.cache]&&e.push(i)})),e.pop()},transition:function(e,t){var i=u(e),n=i._space(),s=h[n],r=0===this.alpha()?u("transparent"):this,a=r[s.cache]||s.to(r._rgba),o=a.slice();return i=i[s.cache],f(s.props,(function(e,n){var s=n.idx,r=a[s],l=i[s],A=d[n.type]||{};null!==l&&(null===r?o[s]=l:(A.mod&&(l-r>A.mod/2?r+=A.mod:r-l>A.mod/2&&(r-=A.mod)),o[s]=C((l-r)*t+r,n)))})),this[n](o)},blend:function(e){if(1===this._rgba[3])return this;var t=this._rgba.slice(),i=t.pop(),n=u(e)._rgba;return u(a.map(t,(function(e,t){return(1-i)*n[t]+i*e})))},toRgbaString:function(){var e="rgba(",t=a.map(this._rgba,(function(e,t){return null!=e?e:t>2?1:0}));return 1===t[3]&&(t.pop(),e="rgb("),e+t.join()+")"},toHslaString:function(){var e="hsla(",t=a.map(this.hsla(),(function(e,t){return null==e&&(e=t>2?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e}));return 1===t[3]&&(t.pop(),e="hsl("),e+t.join()+")"},toHexString:function(e){var t=this._rgba.slice(),i=t.pop();return e&&t.push(~~(255*i)),"#"+a.map(t,(function(e){return 1===(e=(e||0).toString(16)).length?"0"+e:e})).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),u.fn.parse.prototype=u.fn,h.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,n=e[0]/255,s=e[1]/255,r=e[2]/255,a=e[3],o=Math.max(n,s,r),l=Math.min(n,s,r),A=o-l,c=o+l,u=.5*c;return t=l===o?0:n===o?60*(s-r)/A+360:s===o?60*(r-n)/A+120:60*(n-s)/A+240,i=0===A?0:u<=.5?A/c:A/(2-c),[Math.round(t)%360,i,u,null==a?1:a]},h.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],n=e[2],s=e[3],r=n<=.5?n*(1+i):n+i-n*i,a=2*n-r;return[Math.round(255*v(a,r,t+1/3)),Math.round(255*v(a,r,t)),Math.round(255*v(a,r,t-1/3)),s]},f(h,(function(e,t){var i=t.props,n=t.cache,s=t.to,r=t.from;u.fn[e]=function(e){if(s&&!this[n]&&(this[n]=s(this._rgba)),void 0===e)return this[n].slice();var t,a=m(e),o="array"===a||"object"===a?e:arguments,l=this[n].slice();return f(i,(function(e,t){var i=o["object"===a?e:t.idx];null==i&&(i=l[t.idx]),l[t.idx]=C(i,t)})),r?((t=u(r(l)))[n]=l,t):u(l)},f(i,(function(t,i){u.fn[t]||(u.fn[t]=function(n){var s,r,a,o,l=m(n);return r=(s=this[o="alpha"===t?this._hsla?"hsla":"rgba":e]())[i.idx],"undefined"===l?r:("function"===l&&(l=m(n=n.call(this,r))),null==n&&i.empty?this:("string"===l&&(a=A.exec(n))&&(n=r+parseFloat(a[2])*("+"===a[1]?1:-1)),s[i.idx]=n,this[o](s)))})}))})),u.hook=function(e){var t=e.split(" ");f(t,(function(e,t){a.cssHooks[t]={set:function(e,i){var n,s,r="";if("transparent"!==i&&("string"!==m(i)||(n=I(i)))){if(i=u(n||i),!g.rgba&&1!==i._rgba[3]){for(s="backgroundColor"===t?e.parentNode:e;(""===r||"transparent"===r)&&s&&s.style;)try{r=a.css(s,"backgroundColor"),s=s.parentNode}catch(I2){}i=i.blend(r&&"transparent"!==r?r:"_default")}i=i.toRgbaString()}try{e.style[t]=i}catch(I2){}}},a.fx.step[t]=function(e){e.colorInit||(e.start=u(e.elem,t),e.end=u(e.end),e.colorInit=!0),a.cssHooks[t].set(e.elem,e.start.transition(e.end,e.pos))}}))},u.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),a.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],(function(i,n){t["border"+n+"Color"]=e})),t}},r=a.Color.names={
// 4.1. Basic color keywords
aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",
// 4.2.3. "transparent" color keyword
transparent:[null,null,null,0],_default:"#ffffff"};
/*!
   * jQuery UI Effects 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
var B,y="ui-effects-",b="ui-effects-style",E="ui-effects-animated";if(e.effects={effect:{}},function(){var t=["add","remove","toggle"],i={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function n(e){var t,i,n,s=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,r={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[t=s[i]]&&(r[(n=t,n.replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})))]=s[t]);else for(t in s)"string"==typeof s[t]&&(r[t]=s[t]);return r}e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(a.style(e.elem,i,e.end),e.setAttr=!0)}})),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(s,r,a,o){var l=e.speed(r,a,o);return this.queue((function(){var r,a=e(this),o=a.attr("class")||"",A=l.children?a.find("*").addBack():a;A=A.map((function(){return{el:e(this),start:n(this)}})),(r=function(){e.each(t,(function(e,t){s[t]&&a[t+"Class"](s[t])}))})(),A=A.map((function(){return this.end=n(this.el[0]),this.diff=function(t,n){var s,r,a={};for(s in n)r=n[s],t[s]!==r&&(i[s]||!e.fx.step[s]&&isNaN(parseFloat(r))||(a[s]=r));return a}(this.start,this.end),this})),a.attr("class",o),A=A.map((function(){var t=this,i=e.Deferred(),n=e.extend({},l,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,n),i.promise()})),e.when.apply(e,A.get()).done((function(){r(),e.each(arguments,(function(){var t=this.el;e.each(this.diff,(function(e){t.css(e,"")}))})),l.complete.call(a[0])}))}))},e.fn.extend({addClass:function(t){return function(i,n,s,r){return n?e.effects.animateClass.call(this,{add:i},n,s,r):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,n,s,r){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},n,s,r):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,n,s,r,a){return"boolean"==typeof n||void 0===n?s?e.effects.animateClass.call(this,n?{add:i}:{remove:i},s,r,a):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},n,s,r)}}(e.fn.toggleClass),switchClass:function(t,i,n,s,r){return e.effects.animateClass.call(this,{add:i,remove:t},n,s,r)}})}(),function(){function t(t,i,n,s){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),"function"==typeof i&&(s=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(s=n,n=i,i={}),"function"==typeof n&&(s=n,n=null),i&&e.extend(t,i),n=n||i.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=s||i.complete,t}function i(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function n(e,t){var i=t.outerWidth(),n=t.outerHeight(),s=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,i,n,0];return{top:parseFloat(s[1])||0,right:"auto"===s[2]?i:parseFloat(s[2]),bottom:"auto"===s[3]?n:parseFloat(s[3]),left:parseFloat(s[4])||0}}e.expr&&e.expr.pseudos&&e.expr.pseudos.animated&&(e.expr.pseudos.animated=function(t){return function(i){return!!e(i).data(E)||t(i)}}(e.expr.pseudos.animated)),!1!==e.uiBackCompat&&e.extend(e.effects,{
// Saves a set of properties in a data storage
save:function(e,t){for(var i=0,n=t.length;i<n;i++)null!==t[i]&&e.data(y+t[i],e[0].style[t[i]])},
// Restores a set of previously saved properties from a data storage
restore:function(e,t){for(var i,n=0,s=t.length;n<s;n++)null!==t[n]&&(i=e.data(y+t[n]),e.css(t[n],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},
// Wraps the element around a wrapper that copies position properties
createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),s={width:t.width(),height:t.height()},r=document.activeElement;try{r.id}catch(I2){r=document.body}return t.wrap(n),(t[0]===r||e.contains(t[0],r))&&e(r).trigger("focus"),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],(function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")})),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(s),n.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).trigger("focus")),t}}),e.extend(e.effects,{version:"1.13.3",define:function(t,i,n){return n||(n=i,i="effect"),e.effects.effect[t]=n,e.effects.effect[t].mode=i,n},scaledDimensions:function(e,t,i){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(t||100)/100:1,s="vertical"!==i?(t||100)/100:1;return{height:e.height()*s,width:e.width()*n,outerHeight:e.outerHeight()*s,outerWidth:e.outerWidth()*n}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},
// Injects recently queued functions to be first in line (after "inprogress")
unshift:function(e,t,i){var n=e.queue();t>1&&n.splice.apply(n,[1,0].concat(n.splice(t,i))),e.dequeue()},saveStyle:function(e){e.data(b,e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data(b)||"",e.removeData(b)},mode:function(e,t){var i=e.is(":hidden");return"toggle"===t&&(t=i?"show":"hide"),(i?"hide"===t:"show"===t)&&(t="none"),t},
// Translates a [top,left] array into a baseline value
getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},
// Creates a placeholder element so that the original element can be made absolute
createPlaceholder:function(t){var i,n=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=e("<"+t[0].nodeName+">").insertAfter(t).css({
// Convert inline to inline block to account for inline elements
// that turn to inline block based on content (like img)
display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",
// Margins need to be set to account for margin collapse
marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(y+"placeholder",i)),t.css({position:n,left:s.left,top:s.top}),i},removePlaceholder:function(e){var t=y+"placeholder",i=e.data(t);i&&(i.remove(),e.removeData(t))},
// Removes a placeholder if it exists and restores
// properties that were modified during placeholder creation
cleanUp:function(t){e.effects.restoreStyle(t),e.effects.removePlaceholder(t)},setTransition:function(t,i,n,s){return s=s||{},e.each(i,(function(e,i){var r=t.cssUnit(i);r[0]>0&&(s[i]=r[0]*n+r[1])})),s}}),e.fn.extend({effect:function(){var i=t.apply(this,arguments),n=e.effects.effect[i.effect],s=n.mode,r=i.queue,a=r||"fx",o=i.complete,l=i.mode,A=[],c=function(t){var i=e(this),n=e.effects.mode(i,l)||s;i.data(E,!0),A.push(n),s&&("show"===n||n===s&&"hide"===n)&&i.show(),s&&"none"===n||e.effects.saveStyle(i),"function"==typeof t&&t()};if(e.fx.off||!n)return l?this[l](i.duration,o):this.each((function(){o&&o.call(this)}));function u(t){var r=e(this);function a(){"function"==typeof o&&o.call(r[0]),"function"==typeof t&&t()}i.mode=A.shift(),!1===e.uiBackCompat||s?"none"===i.mode?(r[l](),a()):n.call(r[0],i,(function(){r.removeData(E),e.effects.cleanUp(r),"hide"===i.mode&&r.hide(),a()})):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],i,a)}return!1===r?this.each(c).each(u):this.queue(a,c).queue(a,u)},show:function(e){return function(n){if(i(n))return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="show",this.effect.call(this,s)}}(e.fn.show),hide:function(e){return function(n){if(i(n))return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="hide",this.effect.call(this,s)}}(e.fn.hide),toggle:function(e){return function(n){if(i(n)||"boolean"==typeof n)return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="toggle",this.effect.call(this,s)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],(function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])})),n},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):n(this.css("clip"),this)},transfer:function(t,i){var n=e(this),s=e(t.to),r="fixed"===s.css("position"),a=e("body"),o=r?a.scrollTop():0,l=r?a.scrollLeft():0,A=s.offset(),c={top:A.top-o,left:A.left-l,height:s.innerHeight(),width:s.innerWidth()},u=n.offset(),h=e("<div class='ui-effects-transfer'></div>");h.appendTo("body").addClass(t.className).css({top:u.top-o,left:u.left-l,height:n.innerHeight(),width:n.innerWidth(),position:r?"fixed":"absolute"}).animate(c,t.duration,t.easing,(function(){h.remove(),"function"==typeof i&&i()}))}}),e.fx.step.clip=function(t){t.clipInit||(t.start=e(t.elem).cssClip(),"string"==typeof t.end&&(t.end=n(t.end,t.elem)),t.clipInit=!0),e(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),B={},e.each(["Quad","Cubic","Quart","Quint","Expo"],(function(e,t){B[t]=function(t){return Math.pow(t,e+2)}})),e.extend(B,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(B,(function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?i(2*e)/2:1-i(-2*e+2)/2}})),e.effects,
/*!
   * jQuery UI Effects Blind 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("blind","hide",(function(t,i){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=e(this),r=t.direction||"up",a=s.cssClip(),o={clip:e.extend({},a)},l=e.effects.createPlaceholder(s);o.clip[n[r][0]]=o.clip[n[r][1]],"show"===t.mode&&(s.cssClip(o.clip),l&&l.css(e.effects.clipToBox(o)),o.clip=a),l&&l.animate(e.effects.clipToBox(o),t.duration,t.easing),s.animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:i})})),
/*!
   * jQuery UI Effects Bounce 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("bounce",(function(t,i){var n,s,r,a=e(this),o=t.mode,l="hide"===o,A="show"===o,c=t.direction||"up",u=t.distance,h=t.times||5,d=2*h+(A||l?1:0),g=t.duration/d,p=t.easing,f="up"===c||"down"===c?"top":"left",m="up"===c||"left"===c,C=0,I=a.queue().length;for(e.effects.createPlaceholder(a),r=a.css(f),u||(u=a["top"===f?"outerHeight":"outerWidth"]()/3),A&&((s={opacity:1})[f]=r,a.css("opacity",0).css(f,m?2*-u:2*u).animate(s,g,p)),l&&(u/=Math.pow(2,h-1)),(s={})[f]=r;C<h;C++)(n={})[f]=(m?"-=":"+=")+u,a.animate(n,g,p).animate(s,g,p),u=l?2*u:u/2;l&&((n={opacity:0})[f]=(m?"-=":"+=")+u,a.animate(n,g,p)),a.queue(i),e.effects.unshift(a,I,d+1)})),
/*!
   * jQuery UI Effects Clip 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("clip","hide",(function(t,i){var n,s={},r=e(this),a=t.direction||"vertical",o="both"===a,l=o||"horizontal"===a,A=o||"vertical"===a;n=r.cssClip(),s.clip={top:A?(n.bottom-n.top)/2:n.top,right:l?(n.right-n.left)/2:n.right,bottom:A?(n.bottom-n.top)/2:n.bottom,left:l?(n.right-n.left)/2:n.left},e.effects.createPlaceholder(r),"show"===t.mode&&(r.cssClip(s.clip),s.clip=n),r.animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:i})})),
/*!
   * jQuery UI Effects Drop 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("drop","hide",(function(t,i){var n,s=e(this),r="show"===t.mode,a=t.direction||"left",o="up"===a||"down"===a?"top":"left",l="up"===a||"left"===a?"-=":"+=",A="+="===l?"-=":"+=",c={opacity:0};e.effects.createPlaceholder(s),n=t.distance||s["top"===o?"outerHeight":"outerWidth"](!0)/2,c[o]=l+n,r&&(s.css(c),c[o]=A+n,c.opacity=1),s.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:i})})),
/*!
   * jQuery UI Effects Explode 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("explode","hide",(function(t,i){var n,s,r,a,o,l,A=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=A,u=e(this),h="show"===t.mode,d=u.show().css("visibility","hidden").offset(),g=Math.ceil(u.outerWidth()/c),p=Math.ceil(u.outerHeight()/A),f=[];function m(){f.push(this),f.length===A*c&&(u.css({visibility:"visible"}),e(f).remove(),i())}for(n=0;n<A;n++)for(a=d.top+n*p,l=n-(A-1)/2,s=0;s<c;s++)r=d.left+s*g,o=s-(c-1)/2,u.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*g,top:-n*p}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g,height:p,left:r+(h?o*g:0),top:a+(h?l*p:0),opacity:h?0:1}).animate({left:r+(h?0:o*g),top:a+(h?0:l*p),opacity:h?1:0},t.duration||500,t.easing,m)})),
/*!
   * jQuery UI Effects Fade 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("fade","toggle",(function(t,i){var n="show"===t.mode;e(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:i})})),
/*!
   * jQuery UI Effects Fold 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("fold","hide",(function(t,i){var n=e(this),s=t.mode,r="show"===s,a="hide"===s,o=t.size||15,l=/([0-9]+)%/.exec(o),A=!!t.horizFirst?["right","bottom"]:["bottom","right"],c=t.duration/2,u=e.effects.createPlaceholder(n),h=n.cssClip(),d={clip:e.extend({},h)},g={clip:e.extend({},h)},p=[h[A[0]],h[A[1]]],f=n.queue().length;l&&(o=parseInt(l[1],10)/100*p[a?0:1]),d.clip[A[0]]=o,g.clip[A[0]]=o,g.clip[A[1]]=0,r&&(n.cssClip(g.clip),u&&u.css(e.effects.clipToBox(g)),g.clip=h),n.queue((function(i){u&&u.animate(e.effects.clipToBox(d),c,t.easing).animate(e.effects.clipToBox(g),c,t.easing),i()})).animate(d,c,t.easing).animate(g,c,t.easing).queue(i),e.effects.unshift(n,f,4)})),
/*!
   * jQuery UI Effects Highlight 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("highlight","show",(function(t,i){var n=e(this),s={backgroundColor:n.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),e.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:i})})),
/*!
   * jQuery UI Effects Size 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("size",(function(t,i){var n,s,r,a=e(this),o=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],A=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=t.mode,u="effect"!==c,h=t.scale||"both",d=t.origin||["middle","center"],g=a.css("position"),p=a.position(),f=e.effects.scaledDimensions(a),m=t.from||f,C=t.to||e.effects.scaledDimensions(a,0);e.effects.createPlaceholder(a),"show"===c&&(r=m,m=C,C=r),s={from:{y:m.height/f.height,x:m.width/f.width},to:{y:C.height/f.height,x:C.width/f.width}},"box"!==h&&"both"!==h||(s.from.y!==s.to.y&&(m=e.effects.setTransition(a,l,s.from.y,m),C=e.effects.setTransition(a,l,s.to.y,C)),s.from.x!==s.to.x&&(m=e.effects.setTransition(a,A,s.from.x,m),C=e.effects.setTransition(a,A,s.to.x,C))),"content"!==h&&"both"!==h||s.from.y!==s.to.y&&(m=e.effects.setTransition(a,o,s.from.y,m),C=e.effects.setTransition(a,o,s.to.y,C)),d&&(n=e.effects.getBaseline(d,f),m.top=(f.outerHeight-m.outerHeight)*n.y+p.top,m.left=(f.outerWidth-m.outerWidth)*n.x+p.left,C.top=(f.outerHeight-C.outerHeight)*n.y+p.top,C.left=(f.outerWidth-C.outerWidth)*n.x+p.left),delete m.outerHeight,delete m.outerWidth,a.css(m),"content"!==h&&"both"!==h||(l=l.concat(["marginTop","marginBottom"]).concat(o),A=A.concat(["marginLeft","marginRight"]),a.find("*[width]").each((function(){var i=e(this),n=e.effects.scaledDimensions(i),r={height:n.height*s.from.y,width:n.width*s.from.x,outerHeight:n.outerHeight*s.from.y,outerWidth:n.outerWidth*s.from.x},a={height:n.height*s.to.y,width:n.width*s.to.x,outerHeight:n.height*s.to.y,outerWidth:n.width*s.to.x};s.from.y!==s.to.y&&(r=e.effects.setTransition(i,l,s.from.y,r),a=e.effects.setTransition(i,l,s.to.y,a)),s.from.x!==s.to.x&&(r=e.effects.setTransition(i,A,s.from.x,r),a=e.effects.setTransition(i,A,s.to.x,a)),u&&e.effects.saveStyle(i),i.css(r),i.animate(a,t.duration,t.easing,(function(){u&&e.effects.restoreStyle(i)}))}))),a.animate(C,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){var t=a.offset();0===C.opacity&&a.css("opacity",m.opacity),u||(a.css("position","static"===g?"relative":g).offset(t),e.effects.saveStyle(a)),i()}})})),
/*!
   * jQuery UI Effects Scale 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("scale",(function(t,i){var n=e(this),s=t.mode,r=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),a=e.extend(!0,{from:e.effects.scaledDimensions(n),to:e.effects.scaledDimensions(n,r,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(a.from.opacity=1,a.to.opacity=0),e.effects.effect.size.call(this,a,i)})),
/*!
   * jQuery UI Effects Puff 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("puff","hide",(function(t,i){var n=e.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});e.effects.effect.scale.call(this,n,i)})),
/*!
   * jQuery UI Effects Pulsate 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("pulsate","show",(function(t,i){var n=e(this),s=t.mode,r="show"===s,a=r||"hide"===s,o=2*(t.times||5)+(a?1:0),l=t.duration/o,A=0,c=1,u=n.queue().length;for(!r&&n.is(":visible")||(n.css("opacity",0).show(),A=1);c<o;c++)n.animate({opacity:A},l,t.easing),A=1-A;n.animate({opacity:A},l,t.easing),n.queue(i),e.effects.unshift(n,u,o+1)})),
/*!
   * jQuery UI Effects Shake 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("shake",(function(t,i){var n=1,s=e(this),r=t.direction||"left",a=t.distance||20,o=t.times||3,l=2*o+1,A=Math.round(t.duration/l),c="up"===r||"down"===r?"top":"left",u="up"===r||"left"===r,h={},d={},g={},p=s.queue().length;for(e.effects.createPlaceholder(s),h[c]=(u?"-=":"+=")+a,d[c]=(u?"+=":"-=")+2*a,g[c]=(u?"-=":"+=")+2*a,s.animate(h,A,t.easing);n<o;n++)s.animate(d,A,t.easing).animate(g,A,t.easing);s.animate(d,A,t.easing).animate(h,A/2,t.easing).queue(i),e.effects.unshift(s,p,l+1)})),
/*!
   * jQuery UI Effects Slide 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.effects.define("slide","show",(function(t,i){var n,s,r=e(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},o=t.mode,l=t.direction||"left",A="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u=t.distance||r["top"===A?"outerHeight":"outerWidth"](!0),h={};e.effects.createPlaceholder(r),n=r.cssClip(),s=r.position()[A],h[A]=(c?-1:1)*u+s,h.clip=r.cssClip(),h.clip[a[l][1]]=h.clip[a[l][0]],"show"===o&&(r.cssClip(h.clip),r.css(A,h[A]),h.clip=n,h[A]=s),r.animate(h,{queue:!1,duration:t.duration,easing:t.easing,complete:i})})),!1!==e.uiBackCompat&&e.effects.define("transfer",(function(t,i){e(this).transfer(t,i)}))
/*!
   * jQuery UI Focusable 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */,e.ui.focusable=function(t,i){var n,s,r,a,o,l=t.nodeName.toLowerCase();return"area"===l?(s=(n=t.parentNode).name,!(!t.href||!s||"map"!==n.nodeName.toLowerCase())&&((r=e("img[usemap='#"+s+"']")).length>0&&r.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(l)?(a=!t.disabled)&&(o=e(t).closest("fieldset")[0])&&(a=!o.disabled):a="a"===l&&t.href||i,a&&e(t).is(":visible")&&function(e){var t=e.css("visibility");for(;"inherit"===t;)t=(e=e.parent()).css("visibility");return"visible"===t}(e(t)))},e.extend(e.expr.pseudos,{focusable:function(t){return e.ui.focusable(t,null!=e.attr(t,"tabindex"))}}),e.ui.focusable,e.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):e(this[0].form)},
/*!
   * jQuery UI Form Reset Mixin 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.ui.formResetMixin={_formResetHandler:function(){var t=e(this);setTimeout((function(){var i=t.data("ui-form-reset-instances");e.each(i,(function(){this.refresh()}))}))},_bindFormResetHandler:function(){if(this.form=this.element._form(),this.form.length){var e=this.form.data("ui-form-reset-instances")||[];e.length||this.form.on("reset.ui-form-reset",this._formResetHandler),e.push(this),this.form.data("ui-form-reset-instances",e)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(e.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},
/*!
   * jQuery UI Support for jQuery core 1.8.x and newer 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   *
   */
e.expr.pseudos||(e.expr.pseudos=e.expr[":"]),e.uniqueSort||(e.uniqueSort=e.unique),!e.escapeSelector){var w=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,Q=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e};e.escapeSelector=function(e){return(e+"").replace(w,Q)}}e.fn.even&&e.fn.odd||e.fn.extend({even:function(){return this.filter((function(e){return e%2==0}))},odd:function(){return this.filter((function(e){return e%2==1}))}})
/*!
   * jQuery UI Keycode 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */,e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
/*!
   * jQuery UI Labels 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.fn.labels=function(){var t,i,n,s,r;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(s=this.eq(0).parents("label"),(n=this.attr("id"))&&(r=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),i="label[for='"+e.escapeSelector(n)+"']",s=s.add(r.find(i).addBack(i))),this.pushStack(s)):this.pushStack([])},
/*!
   * jQuery UI Scroll Parent 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.fn.scrollParent=function(t){var i=this.css("position"),n="absolute"===i,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter((function(){var t=e(this);return(!n||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))})).eq(0);return"fixed"!==i&&r.length?r:e(this[0].ownerDocument||document)},
/*!
   * jQuery UI Tabbable 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.extend(e.expr.pseudos,{tabbable:function(t){var i=e.attr(t,"tabindex"),n=null!=i;return(!n||i>=0)&&e.ui.focusable(t,n)}}),
/*!
   * jQuery UI Unique ID 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.fn.extend({uniqueId:function(){var e=0;return function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++e)}))}}(),removeUniqueId:function(){return this.each((function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")}))}}),
/*!
   * jQuery UI Accordion 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.accordion",{version:"1.13.3",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(e){return e.find("> li > :first-child").add(e.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},
// Callbacks
activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t,i,n=this.options.icons;n&&(t=e("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+n.header),t.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,n.header)._addClass(i,null,n.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons())):this._activate(t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!e)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,n=this.headers.length,s=this.headers.index(t.target),r=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:r=this.headers[(s+1)%n];break;case i.LEFT:case i.UP:r=this.headers[(s-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:r=this.headers[0];break;case i.END:r=this.headers[n-1]}r&&(e(t.target).attr("tabIndex",-1),e(r).attr("tabIndex",0),e(r).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=e()):!1===t.active?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,i=this.options,n=i.heightStyle,s=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each((function(){var t=e(this),i=t.uniqueId().attr("id"),n=t.next(),s=n.uniqueId().attr("id");t.attr("aria-controls",s),n.attr("aria-labelledby",i)})).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===n?(t=s.height(),this.element.siblings(":visible").each((function(){var i=e(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(t-=i.outerHeight(!0))})),this.headers.each((function(){t-=e(this).outerHeight(!0)})),this.headers.next().each((function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))})).css("overflow","auto")):"auto"===n&&(t=0,this.headers.next().each((function(){var i=e(this).is(":visible");i||e(this).show(),t=Math.max(t,e(this).css("height","").height()),i||e(this).hide()})).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),(function(e,t){i[t]="_eventHandler"})),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i,n,s=this.options,r=this.active,a=e(t.currentTarget),o=a[0]===r[0],l=o&&s.collapsible,A=l?e():a.next(),c=r.next(),u={oldHeader:r,oldPanel:c,newHeader:l?e():a,newPanel:A};t.preventDefault(),
// click on active header, but not collapsible
o&&!s.collapsible||// allow canceling activation
!1===this._trigger("beforeActivate",t,u)||(s.active=!l&&this.headers.index(a),this.active=o?e():a,this._toggle(u),this._removeClass(r,"ui-accordion-header-active","ui-state-active"),s.icons&&(i=r.children(".ui-accordion-header-icon"),this._removeClass(i,null,s.icons.activeHeader)._addClass(i,null,s.icons.header)),o||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),s.icons&&(n=a.children(".ui-accordion-header-icon"),this._removeClass(n,null,s.icons.header)._addClass(n,null,s.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,n=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,t):(n.hide(),i.show(),this._toggleComplete(t)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter((function(){return 0===parseInt(e(this).attr("tabIndex"),10)})).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,i){var n,s,r,a=this,o=0,l=e.css("box-sizing"),A=e.length&&(!t.length||e.index()<t.index()),c=this.options.animate||{},u=A&&c.down||c,h=function(){a._toggleComplete(i)};return"number"==typeof u&&(r=u),"string"==typeof u&&(s=u),s=s||u.easing||c.easing,r=r||u.duration||c.duration,t.length?e.length?(n=e.show().outerHeight(),t.animate(this.hideProps,{duration:r,easing:s,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:r,easing:s,complete:h,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?"content-box"===l&&(o+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(n-t.outerHeight()-o),o=0)}})):t.animate(this.hideProps,r,s,h):e.animate(this.showProps,r,s,h)},_toggleComplete:function(e){var t=e.oldPanel,i=t.prev();this._removeClass(t,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.ui.safeActiveElement=function(e){var t;try{t=e.activeElement}catch(i){t=e.body}return t||(t=e.body),t.nodeName||(t=e.body),t},
/*!
   * jQuery UI Menu 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.menu",{version:"1.13.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",
// Callbacks
blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({
// Prevent focus from sticking to links inside menu after clicking
// them (focus should always stay on UL during navigation).
"mousedown .ui-menu-item":function(e){e.preventDefault(),this._activateItem(e)},"click .ui-menu-item":function(t){var i=e(t.target),n=e(e.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this._menuItems().first();t||this.focus(e,i)},blur:function(t){this._delay((function(){!e.contains(this.element[0],e.ui.safeActiveElement(this.document[0]))&&this.collapseAll(t)}))},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e,!0),this.mouseHandled=!1}})},_activateItem:function(t){if(!this.previousFilter&&(t.clientX!==this.lastMousePosition.x||t.clientY!==this.lastMousePosition.y)){this.lastMousePosition={x:t.clientX,y:t.clientY};var i=e(t.target).closest(".ui-menu-item"),n=e(t.currentTarget);i[0]===n[0]&&(n.is(".ui-state-active")||(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,n)))}},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each((function(){var t=e(this);t.data("ui-menu-submenu-caret")&&t.remove()}))},_keydown:function(t){var i,n,s,r,a=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:a=!1,n=this.previousFilter||"",r=!1,s=t.keyCode>=96&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),s===n?r=!0:s=n+s,i=this._filterMenuItems(s),(i=r&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length||(s=String.fromCharCode(t.keyCode),i=this._filterMenuItems(s)),i.length?(this.focus(t,i),this.previousFilter=s,this.filterTimer=this._delay((function(){delete this.previousFilter}),1e3)):delete this.previousFilter}a&&t.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,i,n,s,r=this,a=this.options.icons.submenu,o=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=o.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each((function(){var t=e(this),i=t.prev(),n=e("<span>").data("ui-menu-submenu-caret",!0);r._addClass(n,"ui-menu-icon","ui-icon "+a),i.attr("aria-haspopup","true").prepend(n),t.attr("aria-labelledby",i.attr("id"))})),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),(t=o.add(this.element).find(this.options.items)).not(".ui-menu-item").each((function(){var t=e(this);r._isDivider(t)&&r._addClass(t,"ui-menu-divider","ui-widget-content")})),s=(n=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(s,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){if("icons"===e){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,t.submenu)}this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var i,n,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),s=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay((function(){this._close()}),this.delay),(i=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,n,s,r,a,o;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,s=t.offset().top-this.activeMenu.offset().top-i-n,r=this.activeMenu.scrollTop(),a=this.activeMenu.height(),o=t.outerHeight(),s<0?this.activeMenu.scrollTop(r+s):s+o>a&&this.activeMenu.scrollTop(r+s-a+o))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay((function(){this._close(),this._open(e)}),this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay((function(){var n=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(t),this._removeClass(n.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=n}),i?0:this.delay)},
// With no arguments, closes the currently active menu - if nothing is active
// it closes all menus.  If passed an argument, it will search for menus BELOW
_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this._menuItems(this.active.children(".ui-menu")).first();t&&t.length&&(this._open(t.parent()),this._delay((function(){this.focus(e,t)})))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(e){return(e||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(e,t,i){var n;this.active&&(n="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").last():this.active[e+"All"](".ui-menu-item").first()),n&&n.length&&this.active||(n=this._menuItems(this.activeMenu)[t]()),this.focus(i,n)},nextPage:function(t){var i,n,s;this.active?this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.innerHeight(),0===e.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each((function(){return(i=e(this)).offset().top-n-s<0})),this.focus(t,i)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var i,n,s;this.active?this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.innerHeight(),0===e.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each((function(){return(i=e(this)).offset().top-n+s>0})),this.focus(t,i)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter((function(){return n.test(String.prototype.trim.call(e(this).children(".ui-menu-item-wrapper").text()))}))}}),
/*!
   * jQuery UI Autocomplete 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.autocomplete",{version:"1.13.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,
// Callbacks
change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var t,i,n,s=this.element[0].nodeName.toLowerCase(),r="textarea"===s,a="input"===s;this.isMultiLine=r||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[r||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return t=!0,n=!0,void(i=!0);t=!1,n=!1,i=!1;var r=e.ui.keyCode;switch(s.keyCode){case r.PAGE_UP:t=!0,this._move("previousPage",s);break;case r.PAGE_DOWN:t=!0,this._move("nextPage",s);break;case r.UP:t=!0,this._keyEvent("previous",s);break;case r.DOWN:t=!0,this._keyEvent("next",s);break;case r.ENTER:this.menu.active&&(t=!0,s.preventDefault(),this.menu.select(s));break;case r.TAB:this.menu.active&&this.menu.select(s);break;case r.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var s=e.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(e){if(n)return n=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){clearTimeout(this.searching),this.close(e),this._change(e)}}),this._initSource(),this.menu=e("<ul>").appendTo(this._appendTo()).menu({
// disable ARIA support, the live region takes care of that
role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault()},menufocus:function(t,i){var n,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",(function(){e(t.target).trigger(t.originalEvent)}));s=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(n=i.item.attr("aria-label")||s.value)&&String.prototype.trim.call(n).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay((function(){this.liveRegion.html(e("<div>").text(n))}),100))},menuselect:function(t,i){var n=i.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==e.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay((function(){this.previous=s,this.selectedItem=n}))),!1!==this._trigger("select",t,{item:n})&&this._value(n.value),this.term=this._value(),this.close(t),this.selectedItem=n}}),this.liveRegion=e("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var i=this.menu.element[0];return t.target===this.element[0]||t.target===i||e.contains(i,t.target)},_closeOnClickOutside:function(e){this._isEventTargetInWidget(e)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,n=this;Array.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,s){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){s(e)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay((function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),n=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;t&&(!t||i||n)||(this.selectedItem=null,this.search(null,e))}),this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var e=++this.requestIndex;return function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,(function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})}))},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(
// Firefox wraps long text (possibly a rounding bug)
// so we add 1px to avoid the wrapping (#7513)
e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var n=this;e.each(i,(function(e,i){n._renderItemData(t,i)}))},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<div>").text(i.label)).appendTo(t)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())},
// Support: Chrome <=50
// We should be able to just use this.element.prop( "isContentEditable" )
// but hidden elements always report false in Chrome.
// https://code.google.com/p/chromium/issues/detail?id=313082
_isContentEditable:function(e){if(!e.length)return!1;var t=e.prop("contentEditable");return"inherit"===t?this._isContentEditable(e.parent()):"true"===t}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,(function(e){return n.test(e.label||e.value||e)}))}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay((function(){this.liveRegion.html(e("<div>").text(i))}),100))}}),e.ui.autocomplete;
/*!
   * jQuery UI Controlgroup 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
var _,S=/ui-corner-([a-z]){2,6}/g;function x(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={
// Default regional settings
closeText:"Done",
// Display text for close link
prevText:"Prev",
// Display text for previous month link
nextText:"Next",
// Display text for next month link
currentText:"Today",
// Display text for current month link
monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],
// Names of months for drop-down and formatting
monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],
// For formatting
dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
// For formatting
dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],
// For formatting
dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],
// Column headings for days starting at Sunday
weekHeader:"Wk",
// Column header for week of the year
dateFormat:"mm/dd/yy",
// See format options on parseDate
firstDay:0,
// The first day of the week, Sun = 0, Mon = 1, ...
isRTL:!1,
// True if right-to-left language, false if left-to-right
showMonthAfterYear:!1,
// True if the year select precedes month, false for month then year
yearSuffix:"",
// Additional text to append to the year in the month headers,
selectMonthLabel:"Select month",
// Invisible label for month selector
selectYearLabel:"Select year"},this._defaults={
// Global defaults for all the date picker instances
showOn:"focus",
// "focus" for popup on focus,
// "button" for trigger button, or "both" for either
showAnim:"fadeIn",
// Name of jQuery animation for popup
showOptions:{},
// Options for enhanced animations
defaultDate:null,
// Used when field is blank: actual date,
// +/-number for offset from today, null for today
appendText:"",
// Display text following the input box, e.g. showing the format
buttonText:"...",
// Text for trigger button
buttonImage:"",
// URL for trigger button image
buttonImageOnly:!1,
// True if the image appears alone, false if it appears on a button
hideIfNoPrevNext:!1,
// True to hide next/previous month links
// if not applicable, false to just disable them
navigationAsDateFormat:!1,
// True if date formatting applied to prev/today/next links
gotoCurrent:!1,
// True if today link goes back to current selection instead
changeMonth:!1,
// True if month can be selected directly, false if only prev/next
changeYear:!1,
// True if year can be selected directly, false if only prev/next
yearRange:"c-10:c+10",
// Range of years to display in drop-down,
// either relative to today's year (-nn:+nn), relative to currently displayed year
// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
showOtherMonths:!1,
// True to show dates in other months, false to leave blank
selectOtherMonths:!1,
// True to allow selection of dates in other months, false for unselectable
showWeek:!1,
// True to show week of the year, false to not show it
calculateWeek:this.iso8601Week,
// How to calculate the week of the year,
// takes a Date and returns the number of the week for it
shortYearCutoff:"+10",
// Short year values < this are in the current century,
// > this are in the previous century,
// string value starting with "+" for current year + value
minDate:null,
// The earliest selectable date, or null for no limit
maxDate:null,
// The latest selectable date, or null for no limit
duration:"fast",
// Duration of display/closure
beforeShowDay:null,
// Function that takes a date and returns an array with
// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
// [2] = cell title (optional), e.g. $.datepicker.noWeekends
beforeShow:null,
// Function that takes an input field and
// returns a set of custom settings for the date picker
onSelect:null,
// Define a callback function when a date is selected
onChangeMonthYear:null,
// Define a callback function when the month or year is changed
onClose:null,
// Define a callback function when the datepicker is closed
onUpdateDatepicker:null,
// Define a callback function when the datepicker is updated
numberOfMonths:1,
// Number of months to show at a time
showCurrentAtPos:0,
// The position in multipe months at which to show the current month (starting at 0)
stepMonths:1,
// Number of months to step back/forward
stepBigMonths:12,
// Number of months to step back/forward for the big links
altField:"",
// Selector for an alternate field to store selected dates into
altFormat:"",
// The date format to use for the alternate field
constrainInput:!0,
// The input is constrained by the current date format
showButtonPanel:!1,
// True to show button panel, false to not show it
autoSize:!1,
// True to size the input for the date format, false to leave as is
disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=k(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function k(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",i,(function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")})).on("mouseover",i,D)}function D(){e.datepicker._isDisabledDatepicker(_.inline?_.dpDiv.parent()[0]:_.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function F(t,i){for(var n in e.extend(t,i),i)null==i[n]&&(t[n]=i[n]);return t}e.widget("ui.controlgroup",{version:"1.13.3",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},
// To support the enhanced option in jQuery Mobile, we isolate DOM manipulation
_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var t=this,i=[];e.each(this.options.items,(function(n,s){var r,a={};if(s)return"controlgroupLabel"===n?((r=t.element.find(s)).each((function(){var t=e(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")})),t._addClass(r,null,"ui-widget ui-widget-content ui-state-default"),void(i=i.concat(r.get()))):void(e.fn[n]&&(a=t["_"+n+"Options"]?t["_"+n+"Options"]("middle"):{classes:{}},t.element.find(s).each((function(){var s=e(this),r=s[n]("instance"),o=e.widget.extend({},a);if("button"!==n||!s.parent(".ui-spinner").length){r||(r=s[n]()[n]("instance")),r&&(o.classes=t._resolveClassesValues(o.classes,r)),s[n](o);var l=s[n]("widget");e.data(l[0],"ui-controlgroup-data",r||s[n]("instance")),i.push(l[0])}}))))})),this.childWidgets=e(e.uniqueSort(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(t){this.childWidgets.each((function(){var i=e(this).data("ui-controlgroup-data");i&&i[t]&&i[t]()}))},_updateCornerClass:function(e,t){var i=this._buildSimpleOptions(t,"label").classes.label;this._removeClass(e,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(e,null,i)},_buildSimpleOptions:function(e,t){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[t]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[e],n},_spinnerOptions:function(e){var t=this._buildSimpleOptions(e,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(e){return this._buildSimpleOptions(e,"ui-button")},_checkboxradioOptions:function(e){return this._buildSimpleOptions(e,"ui-checkboxradio-label")},_selectmenuOptions:function(e){var t="vertical"===this.options.direction;return{width:!!t&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(t?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(t?"top":"left")},last:{"ui-selectmenu-button-open":t?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(t?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[e]}},_resolveClassesValues:function(t,i){var n={};return e.each(t,(function(e){var s=i.options.classes[e]||"";s=String.prototype.trim.call(s.replace(S,"")),n[e]=(s+" "+t[e]).replace(/\s+/g," ")})),n},_setOption:function(e,t){"direction"===e&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(e,t),"disabled"!==e?this.refresh():this._callChildMethod(t?"disable":"enable")},refresh:function(){var t,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),t=this.childWidgets,this.options.onlyVisible&&(t=t.filter(":visible")),t.length&&(e.each(["first","last"],(function(e,n){var s=t[n]().data("ui-controlgroup-data");if(s&&i["_"+s.widgetName+"Options"]){var r=i["_"+s.widgetName+"Options"](1===t.length?"only":n);r.classes=i._resolveClassesValues(r.classes,s),s.element[s.widgetName](r)}else i._updateCornerClass(t[n](),n)})),this._callChildMethod("refresh"))}}),
/*!
   * jQuery UI Checkboxradio 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.checkboxradio",[e.ui.formResetMixin,{version:"1.13.3",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,i,n,s=this._super()||{};return this._readType(),i=this.element.labels(),this.label=e(i[i.length-1]),this.label.length||e.error("No label found for checkboxradio widget"),this.originalLabel="",(n=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=n.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(s.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(s.disabled=t),s},_create:function(){var e=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),e&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||e.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},
// Support jQuery Mobile enhanced option
_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,i="input[name='"+e.escapeSelector(t)+"']";return t?(this.form.length?e(this.form[0].elements).filter(i):e(i).filter((function(){return 0===e(this)._form().length}))).not(this.element):e([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each((function(){var t=e(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")}))},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(e,t){if("label"!==e||t){if(this._super(e,t),"disabled"===e)return this._toggleClass(this.label,null,"ui-state-disabled",t),void(this.element[0].disabled=t);this.refresh()}},_updateIcon:function(t){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=e("<span>"),this.iconSpace=e("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var e=this.label.contents().not(this.element[0]);this.icon&&(e=e.not(this.icon[0])),this.iconSpace&&(e=e.not(this.iconSpace[0])),e.remove(),this.label.append(this.options.label)},refresh:function(){var e=this.element[0].checked,t=this.element[0].disabled;this._updateIcon(e),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),null!==this.options.label&&this._updateLabel(),t!==this.options.disabled&&this._setOptions({disabled:t})}}]),e.ui.checkboxradio,
/*!
   * jQuery UI Button 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.button",{version:"1.13.3",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var e,t=this._super()||{};return this.isInput=this.element.is("input"),null!=(e=this.element[0].disabled)&&(t.disabled=e),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(t.label=this.originalLabel),t},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===e.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,i){var n="iconPosition"!==t,s=n?this.options.iconPosition:i,r="top"===s||"bottom"===s;this.icon?n&&this._removeClass(this.icon,null,this.options.icon):(this.icon=e("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),n&&this._addClass(this.icon,null,i),this._attachIcon(s),r?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=e("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(s))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(e){this.icon[/^(?:end|bottom)/.test(e)?"before":"after"](this.iconSpace)},_attachIcon:function(e){this.element[/^(?:end|bottom)/.test(e)?"append":"prepend"](this.icon)},_setOptions:function(e){var t=void 0===e.showLabel?this.options.showLabel:e.showLabel,i=void 0===e.icon?this.options.icon:e.icon;t||i||(e.showLabel=!0),this._super(e)},_setOption:function(e,t){"icon"===e&&(t?this._updateIcon(e,t):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===e&&this._updateIcon(e,t),"showLabel"===e&&(this._toggleClass("ui-button-icon-only",null,!t),this._updateTooltip()),"label"===e&&(this.isInput?this.element.val(t):(this.element.html(t),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(e,t),"disabled"===e&&(this._toggleClass(null,"ui-state-disabled",t),this.element[0].disabled=t,t&&this.element.trigger("blur"))},refresh:function(){var e=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOptions({disabled:e}),this._updateTooltip()}}),!1!==e.uiBackCompat&&(e.widget("ui.button",e.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(e,t){"text"!==e?("showLabel"===e&&(this.options.text=t),"icon"===e&&(this.options.icons.primary=t),"icons"===e&&(t.primary?(this._super("icon",t.primary),this._super("iconPosition","beginning")):t.secondary&&(this._super("icon",t.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",t)}}),e.fn.button=function(t){return function(i){var n="string"==typeof i,s=Array.prototype.slice.call(arguments,1),r=this;return n?this.length||"instance"!==i?this.each((function(){var t,n=e(this).attr("type"),a="checkbox"!==n&&"radio"!==n?"button":"checkboxradio",o=e.data(this,"ui-"+a);return"instance"===i?(r=o,!1):o?"function"!=typeof o[i]||"_"===i.charAt(0)?e.error("no such method '"+i+"' for button widget instance"):(t=o[i].apply(o,s))!==o&&void 0!==t?(r=t&&t.jquery?r.pushStack(t.get()):t,!1):void 0:e.error("cannot call methods on button prior to initialization; attempted to call method '"+i+"'")})):r=void 0:(s.length&&(i=e.widget.extend.apply(null,[i].concat(s))),this.each((function(){var n=e(this).attr("type"),s="checkbox"!==n&&"radio"!==n?"button":"checkboxradio",r=e.data(this,"ui-"+s);if(r)r.option(i||{}),r._init&&r._init();else{if("button"===s)return void t.call(e(this),i);e(this).checkboxradio(e.extend({icon:!1},i))}}))),r}}(e.fn.button),e.fn.buttonset=function(){return e.ui.controlgroup||e.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),e.ui.button,
/*!
   * jQuery UI Datepicker 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.extend(e.ui,{datepicker:{version:"1.13.3"}}),e.extend(x.prototype,{
/* Class name added to elements to indicate already configured with a date picker. */
markerClassName:"hasDatepicker",
//Keep track of the maximum number of rows displayed (see #7043)
maxRows:4,
// TODO rename to "widget" when switching to widget factory
_widgetDatepicker:function(){return this.dpDiv},
/* Override the default settings for all instances of the date picker.
     * @param  settings  object - the new settings to use as defaults (anonymous object)
     * @return the manager object
     */
setDefaults:function(e){return F(this._defaults,e||{}),this},
/* Attach the date picker to a jQuery selection.
     * @param  target	element - the target input field or division or span
     * @param  settings  object - the new settings to use for this date picker instance (anonymous)
     */
_attachDatepicker:function(t,i){var n,s,r;s="div"===(n=t.nodeName.toLowerCase())||"span"===n,t.id||(this.uuid+=1,t.id="dp"+this.uuid),(r=this._newInst(e(t),s)).settings=e.extend({},i||{}),"input"===n?this._connectDatepicker(t,r):s&&this._inlineDatepicker(t,r)},
/* Create a new instance object. */
_newInst:function(t,i){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,
// associated target
selectedDay:0,selectedMonth:0,selectedYear:0,
// current selection
drawMonth:0,drawYear:0,
// month being drawn
inline:i,
// is datepicker inline or not
dpDiv:i?
// presentation div
k(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},
/* Attach the date picker to an input field. */
_connectDatepicker:function(t,i){var n=e(t);i.append=e([]),i.trigger=e([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},
/* Make attachments based on settings. */
_attachments:function(t,i){var n,s,r,a=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=e("<span>").addClass(this._appendClass).text(a),t[o?"before":"after"](i.append)),t.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),"focus"!==(n=this._get(i,"showOn"))&&"both"!==n||t.on("focus",this._showDatepicker),"button"!==n&&"both"!==n||(s=this._get(i,"buttonText"),r=this._get(i,"buttonImage"),this._get(i,"buttonImageOnly")?i.trigger=e("<img>").addClass(this._triggerClass).attr({src:r,alt:s,title:s}):(i.trigger=e("<button type='button'>").addClass(this._triggerClass),r?i.trigger.html(e("<img>").attr({src:r,alt:s,title:s})):i.trigger.text(s)),t[o?"before":"after"](i.trigger),i.trigger.on("click",(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1})))},
/* Apply the maximum length for the date format. */
_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,n,s,r=new Date(2009,11,20),a=this._get(e,"dateFormat");a.match(/[DM]/)&&(t=function(e){for(i=0,n=0,s=0;s<e.length;s++)e[s].length>i&&(i=e[s].length,n=s);return n},r.setMonth(t(this._get(e,a.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length)}},
/* Attach an inline date picker to a div. */
_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},
/* Pop-up the date picker in a "dialog" box.
     * @param  input element - ignored
     * @param  date	string or Date - the initial date to display
     * @param  onSelect  function - the function to call when a date is selected
     * @param  settings  object - update the dialog date picker instance's settings (anonymous object)
     * @param  pos int[2] - coordinates for the dialog's position within the screen or
     *					event - with x/y coordinates or
     *					leave empty for default (screen centre)
     * @return the manager object
     */
_dialogDatepicker:function(t,i,n,s,r){var a,o,l,A,c,u=this._dialogInst;return u||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),e("body").append(this._dialogInput),(u=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},e.data(this._dialogInput[0],"datepicker",u)),F(u.settings,s||{}),i=i&&i.constructor===Date?this._formatDate(u,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(o=document.documentElement.clientWidth,l=document.documentElement.clientHeight,A=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=// should use actual width/height below
[o/2-100+A,l/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),u.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",u),this},
/* Detach a datepicker from its control.
     * @param  target	element - the target input field or division or span
     */
_destroyDatepicker:function(t){var i,n=e(t),s=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(s.append.remove(),s.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||n.removeClass(this.markerClassName).empty(),_===s&&(_=null,this._curInst=null))},
/* Enable the date picker to a jQuery selection.
     * @param  target	element - the target input field or division or span
     */
_enableDatepicker:function(t){var i,n,s=e(t),r=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&("input"===(i=t.nodeName.toLowerCase())?(t.disabled=!1,r.trigger.filter("button").each((function(){this.disabled=!1})).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||((n=s.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,(
// Delete entry
function(e){return e===t?null:e})))},
/* Disable the date picker to a jQuery selection.
     * @param  target	element - the target input field or division or span
     */
_disableDatepicker:function(t){var i,n,s=e(t),r=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&("input"===(i=t.nodeName.toLowerCase())?(t.disabled=!0,r.trigger.filter("button").each((function(){this.disabled=!0})).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||((n=s.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,(
// Delete entry
function(e){return e===t?null:e})),this._disabledInputs[this._disabledInputs.length]=t)},
/* Is the first field in a jQuery collection disabled as a datepicker?
     * @param  target	element - the target input field or division or span
     * @return boolean - true if disabled, false if enabled
     */
_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},
/* Retrieve the instance data for the target control.
     * @param  target  element - the target input field or division or span
     * @return  object - the associated instance data
     * @throws  error if a jQuery problem getting data
     */
_getInst:function(t){try{return e.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},
/* Update or retrieve the settings for a date picker attached to an input field or division.
     * @param  target  element - the target input field or division or span
     * @param  name	object - the new settings to update or
     *				string - the name of the setting to change or retrieve,
     *				when retrieving also "all" for all instance settings or
     *				"defaults" for all global defaults
     * @param  value   any - the new value for the setting
     *				(omit if above is an object or to retrieve a value)
     */
_optionDatepicker:function(t,i,n){var s,r,a,o,l=this._getInst(t);if(2===arguments.length&&"string"==typeof i)return"defaults"===i?e.extend({},e.datepicker._defaults):l?"all"===i?e.extend({},l.settings):this._get(l,i):null;s=i||{},"string"==typeof i&&((s={})[i]=n),l&&(this._curInst===l&&this._hideDatepicker(),r=this._getDateDatepicker(t,!0),a=this._getMinMaxDate(l,"min"),o=this._getMinMaxDate(l,"max"),F(l.settings,s),null!==a&&void 0!==s.dateFormat&&void 0===s.minDate&&(l.settings.minDate=this._formatDate(l,a)),null!==o&&void 0!==s.dateFormat&&void 0===s.maxDate&&(l.settings.maxDate=this._formatDate(l,o)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,r),this._updateAlternate(l),this._updateDatepicker(l))},
// Change method deprecated
_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},
/* Redraw the date picker attached to an input field or division.
     * @param  target  element - the target input field or division or span
     */
_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},
/* Set the dates for a jQuery selection.
     * @param  target element - the target input field or division or span
     * @param  date	Date - the new date
     */
_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},
/* Get the date(s) for the first entry in a jQuery selection.
     * @param  target element - the target input field or division or span
     * @param  noDefault boolean - true if no default date is to be used
     * @return Date - the current date
     */
_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},
/* Handle keystrokes. */
_doKeyDown:function(t){var i,n,s,r=e.datepicker._getInst(t.target),a=!0,o=r.dpDiv.is(".ui-datepicker-rtl");if(r._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),a=!1;break;case 13:return(s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",r.dpDiv))[0]&&e.datepicker._selectDay(t.target,r.selectedMonth,r.selectedYear,s[0]),(i=e.datepicker._get(r,"onSelect"))?(n=e.datepicker._formatDate(r),i.apply(r.input?r.input[0]:null,[n,r])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,"stepBigMonths"):-e.datepicker._get(r,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,"stepBigMonths"):+e.datepicker._get(r,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),a=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),a=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,"stepBigMonths"):-e.datepicker._get(r,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),a=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,"stepBigMonths"):+e.datepicker._get(r,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),a=t.ctrlKey||t.metaKey;break;default:a=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):a=!1;a&&(t.preventDefault(),t.stopPropagation())},
/* Filter entered characters - based on date format. */
_doKeyPress:function(t){var i,n,s=e.datepicker._getInst(t.target);if(e.datepicker._get(s,"constrainInput"))return i=e.datepicker._possibleChars(e.datepicker._get(s,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||n<" "||!i||i.indexOf(n)>-1},
/* Synchronise manual entry and field/alternate field. */
_doKeyUp:function(t){var i=e.datepicker._getInst(t.target);if(i.input.val()!==i.lastVal)try{e.datepicker.parseDate(e.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,e.datepicker._getFormatConfig(i))&&(e.datepicker._setDateFromField(i),e.datepicker._updateAlternate(i),e.datepicker._updateDatepicker(i))}catch(n){}return!0},
/* Pop-up the date picker for a given input field.
     * If false returned from beforeShow event handler do not show.
     * @param  input  element - the input field attached to the date picker or
     *					event - if triggered by focus
     */
_showDatepicker:function(t){var i,n,s,r,a,o,l;("input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),e.datepicker._isDisabledDatepicker(t)||e.datepicker._lastInput===t)||(i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),!1!==(s=(n=e.datepicker._get(i,"beforeShow"))?n.apply(t,[t,i]):{})&&(F(i.settings,s),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each((function(){return!(r|="fixed"===e(this).css("position"))})),a={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),a=e.datepicker._checkOffset(i,a,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),i.inline||(o=e.datepicker._get(i,"showAnim"),l=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",function(e){for(var t,i;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[o]?i.dpDiv.show(o,e.datepicker._get(i,"showOptions"),l):i.dpDiv[o||"show"](o?l:null),e.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),e.datepicker._curInst=i)))},
/* Generate the date picker content. */
_updateDatepicker:function(t){this.maxRows=4,_=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,n=this._getNumberOfMonths(t),s=n[1],r=t.dpDiv.find("."+this._dayOverClass+" a"),a=e.datepicker._get(t,"onUpdateDatepicker");r.length>0&&D.apply(r.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(i=t.yearshtml,setTimeout((function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year").first().replaceWith(t.yearshtml),i=t.yearshtml=null}),0)),a&&a.apply(t.input?t.input[0]:null,[t])},
// #6694 - don't focus the input if it's already focused
// this breaks the change event in IE
// Support: IE and jQuery <1.9
_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},
/* Check positioning to remain on screen. */
_checkOffset:function(t,i,n){var s=t.dpDiv.outerWidth(),r=t.dpDiv.outerHeight(),a=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),A=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-a:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+r>A&&A>r?Math.abs(r+o):0),i},
/* Find an object's position on the screen. */
_findPos:function(t){for(var i,n=this._getInst(t),s=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.pseudos.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return[(i=e(t).offset()).left,i.top]},
/* Hide the date picker from view.
     * @param  input  element - the input field attached to the date picker
     */
_hideDatepicker:function(t){var i,n,s,r,a=this._curInst;!a||t&&a!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),s=function(){e.datepicker._tidyDialog(a)},e.effects&&(e.effects.effect[i]||e.effects[i])?a.dpDiv.hide(i,e.datepicker._get(a,"showOptions"),n,s):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),this._datepickerShowing=!1,(r=this._get(a,"onClose"))&&r.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},
/* Tidy up after a dialog display. */
_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},
/* Close date picker if clicked elsewhere. */
_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(i[0].id===e.datepicker._mainDivId||0!==i.parents("#"+e.datepicker._mainDivId).length||i.hasClass(e.datepicker.markerClassName)||i.closest("."+e.datepicker._triggerClass).length||!e.datepicker._datepickerShowing||e.datepicker._inDialog&&e.blockUI)&&(!i.hasClass(e.datepicker.markerClassName)||e.datepicker._curInst===n)||e.datepicker._hideDatepicker()}},
/* Adjust one of the date sub-fields. */
_adjustDate:function(t,i,n){var s=e(t),r=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(r,i,n),this._updateDatepicker(r))},
/* Action for current link. */
_gotoToday:function(t){var i,n=e(t),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},
/* Action for selecting a new month/year. */
_selectMonthYear:function(t,i,n){var s=e(t),r=this._getInst(s[0]);r["selected"+("M"===n?"Month":"Year")]=r["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(s)},
/* Action for selecting a day. */
_selectDay:function(t,i,n,s){var r,a=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||((r=this._getInst(a[0])).selectedDay=r.currentDay=parseInt(e("a",s).attr("data-date")),r.selectedMonth=r.currentMonth=i,r.selectedYear=r.currentYear=n,this._selectDate(t,this._formatDate(r,r.currentDay,r.currentMonth,r.currentYear)))},
/* Erase the input field and hide the date picker. */
_clearDate:function(t){var i=e(t);this._selectDate(i,"")},
/* Update the input field with the selected date. */
_selectDate:function(t,i){var n,s=e(t),r=this._getInst(s[0]);i=null!=i?i:this._formatDate(r),r.input&&r.input.val(i),this._updateAlternate(r),(n=this._get(r,"onSelect"))?n.apply(r.input?r.input[0]:null,[i,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.trigger("focus"),this._lastInput=null)},
/* Update any alternate field to synchronise with the main field. */
_updateAlternate:function(t){var i,n,s,r=this._get(t,"altField");r&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),s=this.formatDate(i,n,this._getFormatConfig(t)),e(document).find(r).val(s))},
/* Set as beforeShowDay function to prevent selection of weekends.
     * @param  date  Date - the date to customise
     * @return [boolean, string] - is this date selectable?, what is its CSS class?
     */
noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},
/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
     * @param  date  Date - the date to get the week for
     * @return  number - the number of the week within the year that contains this date
     */
iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},
/* Parse a string value into a date object.
     * See formatDate below for the possible formats.
     *
     * @param  format string - the expected format of the date
     * @param  value string - the date in the above format
     * @param  settings Object - attributes include:
     *					shortYearCutoff  number - the cutoff year for determining the century (optional)
     *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
     *					dayNames		string[7] - names of the days from Sunday (optional)
     *					monthNamesShort string[12] - abbreviated names of the months (optional)
     *					monthNames		string[12] - names of the months (optional)
     * @return  Date - the extracted date value or null if value is blank
     */
parseDate:function(t,i,n){if(null==t||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?i.toString():i+""))return null;var s,r,a,o,l=0,A=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof A?A:(new Date).getFullYear()%100+parseInt(A,10),u=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,h=(n?n.dayNames:null)||this._defaults.dayNames,d=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,g=(n?n.monthNames:null)||this._defaults.monthNames,p=-1,f=-1,m=-1,C=-1,I=!1,v=function(e){var i=s+1<t.length&&t.charAt(s+1)===e;return i&&s++,i},B=function(e){var t=v(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s=new RegExp("^\\d{"+("y"===e?n:1)+","+n+"}"),r=i.substring(l).match(s);if(!r)throw"Missing number at position "+l;return l+=r[0].length,parseInt(r[0],10)},y=function(t,n,s){var r=-1,a=e.map(v(t)?s:n,(function(e,t){return[[t,e]]})).sort((function(e,t){return-(e[1].length-t[1].length)}));if(e.each(a,(function(e,t){var n=t[1];if(i.substr(l,n.length).toLowerCase()===n.toLowerCase())return r=t[0],l+=n.length,!1})),-1!==r)return r+1;throw"Unknown name at position "+l},b=function(){if(i.charAt(l)!==t.charAt(s))throw"Unexpected literal at position "+l;l++};for(s=0;s<t.length;s++)if(I)"'"!==t.charAt(s)||v("'")?b():I=!1;else switch(t.charAt(s)){case"d":m=B("d");break;case"D":y("D",u,h);break;case"o":C=B("o");break;case"m":f=B("m");break;case"M":f=y("M",d,g);break;case"y":p=B("y");break;case"@":p=(o=new Date(B("@"))).getFullYear(),f=o.getMonth()+1,m=o.getDate();break;case"!":p=(o=new Date((B("!")-this._ticksTo1970)/1e4)).getFullYear(),f=o.getMonth()+1,m=o.getDate();break;case"'":v("'")?b():I=!0;break;default:b()}if(l<i.length&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===p?p=(new Date).getFullYear():p<100&&(p+=(new Date).getFullYear()-(new Date).getFullYear()%100+(p<=c?0:-100)),C>-1)for(f=1,m=C;;){if(m<=(r=this._getDaysInMonth(p,f-1)))break;f++,m-=r}if((o=this._daylightSavingAdjust(new Date(p,f-1,m))).getFullYear()!==p||o.getMonth()+1!==f||o.getDate()!==m)throw"Invalid date";return o},
/* Standard date formats. */
ATOM:"yy-mm-dd",
// RFC 3339 (ISO 8601)
COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",
// RFC 822
TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",
// ISO 8601
_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,
/* Format a date object into a string value.
     * The format can be combinations of the following:
     * d  - day of month (no leading zero)
     * dd - day of month (two digit)
     * o  - day of year (no leading zeros)
     * oo - day of year (three digit)
     * D  - day name short
     * DD - day name long
     * m  - month of year (no leading zero)
     * mm - month of year (two digit)
     * M  - month name short
     * MM - month name long
     * y  - year (two digit)
     * yy - year (four digit)
     * @ - Unix timestamp (ms since 01/01/1970)
     * ! - Windows ticks (100ns since 01/01/0001)
     * "..." - literal text
     * '' - single quote
     *
     * @param  format string - the desired format of the date
     * @param  date Date - the date value to format
     * @param  settings Object - attributes include:
     *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
     *					dayNames		string[7] - names of the days from Sunday (optional)
     *					monthNamesShort string[12] - abbreviated names of the months (optional)
     *					monthNames		string[12] - names of the months (optional)
     * @return  string - the date in the above format
     */
formatDate:function(e,t,i){if(!t)return"";var n,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,l=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},A=function(e,t,i){var n=""+t;if(l(e))for(;n.length<i;)n="0"+n;return n},c=function(e,t,i,n){return l(e)?n[t]:i[t]},u="",h=!1;if(t)for(n=0;n<e.length;n++)if(h)"'"!==e.charAt(n)||l("'")?u+=e.charAt(n):h=!1;else switch(e.charAt(n)){case"d":u+=A("d",t.getDate(),2);break;case"D":u+=c("D",t.getDay(),s,r);break;case"o":u+=A("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=A("m",t.getMonth()+1,2);break;case"M":u+=c("M",t.getMonth(),a,o);break;case"y":u+=l("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":h=!0;break;default:u+=e.charAt(n)}return u},
/* Extract all possible characters from the date format. */
_possibleChars:function(e){var t,i="",n=!1,s=function(i){var n=t+1<e.length&&e.charAt(t+1)===i;return n&&t++,n};for(t=0;t<e.length;t++)if(n)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):n=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":n=!0;break;default:i+=e.charAt(t)}return i},
/* Get a setting value, defaulting if necessary. */
_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},
/* Parse existing date and initialise date picker. */
_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),r=s,a=this._getFormatConfig(e);try{r=this.parseDate(i,n,a)||s}catch(o){n=t?"":n}e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),e.currentDay=n?r.getDate():0,e.currentMonth=n?r.getMonth():0,e.currentYear=n?r.getFullYear():0,this._adjustInstDate(e)}},
/* Retrieve the default date shown on opening. */
_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},
/* A date may be specified as an exact value or a relative one. */
_determineDate:function(t,i,n){var s,r,a=null==i||""===i?n:"string"==typeof i?function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(I2){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,s=n.getFullYear(),r=n.getMonth(),a=n.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=o.exec(i);l;){switch(l[2]||"d"){case"d":case"D":a+=parseInt(l[1],10);break;case"w":case"W":a+=7*parseInt(l[1],10);break;case"m":case"M":r+=parseInt(l[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(s,r));break;case"y":case"Y":s+=parseInt(l[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(s,r))}l=o.exec(i)}return new Date(s,r,a)}(i):"number"==typeof i?isNaN(i)?n:(s=i,(r=new Date).setDate(r.getDate()+s),r):new Date(i.getTime());return(a=a&&"Invalid Date"===a.toString()?n:a)&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},
/* Handle switch to/from daylight saving.
     * Hours may be non-zero on daylight saving cut-over:
     * > 12 when midnight changeover, but then cannot generate
     * midnight datetime, so jump to 1AM, otherwise reset.
     * @param  date  (Date) the date to check
     * @return  (Date) the corrected date
     */
_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},
/* Set the date(s) directly. */
_setDate:function(e,t,i){var n=!t,s=e.selectedMonth,r=e.selectedYear,a=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=a.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=a.getMonth(),e.drawYear=e.selectedYear=e.currentYear=a.getFullYear(),s===e.selectedMonth&&r===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},
/* Retrieve the date(s) directly. */
_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},
/* Attach the onxxx handlers.  These are declared statically so
     * they work with static code transformers like Caja.
     */
_attachHandlers:function(t){var i=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map((function(){var t={prev:function(){e.datepicker._adjustDate(n,-i,"M")},next:function(){e.datepicker._adjustDate(n,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,"Y"),!1}};e(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])}))},
/* Generate the HTML for the current state of the date picker. */
_generateHTML:function(t){var i,n,s,r,a,o,l,A,c,u,h,d,g,p,f,m,C,I,v,B,y,b,E,w,Q,_,S,x,k,D,F,T,M,R,N,L,U,H,P,O=new Date,G=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),K=this._get(t,"isRTL"),q=this._get(t,"showButtonPanel"),Y=this._get(t,"hideIfNoPrevNext"),V=this._get(t,"navigationAsDateFormat"),W=this._getNumberOfMonths(t),j=this._get(t,"showCurrentAtPos"),J=this._get(t,"stepMonths"),z=1!==W[0]||1!==W[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),$=this._getMinMaxDate(t,"min"),Z=this._getMinMaxDate(t,"max"),ee=t.drawMonth-j,te=t.drawYear;if(ee<0&&(ee+=12,te--),Z)for(i=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-W[0]*W[1]+1,Z.getDate())),i=$&&i<$?$:i;this._daylightSavingAdjust(new Date(te,ee,1))>i;)--ee<0&&(ee=11,te--);for(t.drawMonth=ee,t.drawYear=te,n=this._get(t,"prevText"),n=V?this.formatDate(n,this._daylightSavingAdjust(new Date(te,ee-J,1)),this._getFormatConfig(t)):n,s=this._canAdjustMonth(t,-1,te,ee)?e("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:n}).append(e("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(K?"e":"w")).text(n))[0].outerHTML:Y?"":e("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:n}).append(e("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(K?"e":"w")).text(n))[0].outerHTML,r=this._get(t,"nextText"),r=V?this.formatDate(r,this._daylightSavingAdjust(new Date(te,ee+J,1)),this._getFormatConfig(t)):r,a=this._canAdjustMonth(t,1,te,ee)?e("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:r}).append(e("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(K?"w":"e")).text(r))[0].outerHTML:Y?"":e("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:r}).append(e("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(K?"w":"e")).text(r))[0].outerHTML,o=this._get(t,"currentText"),l=this._get(t,"gotoCurrent")&&t.currentDay?X:G,o=V?this.formatDate(o,l,this._getFormatConfig(t)):o,A="",t.inline||(A=e("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),c="",q&&(c=e("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(K?A:"").append(this._isInRange(t,l)?e("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(o):"").append(K?"":A)[0].outerHTML),u=parseInt(this._get(t,"firstDay"),10),u=isNaN(u)?0:u,h=this._get(t,"showWeek"),d=this._get(t,"dayNames"),g=this._get(t,"dayNamesMin"),p=this._get(t,"monthNames"),f=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),C=this._get(t,"showOtherMonths"),I=this._get(t,"selectOtherMonths"),v=this._getDefaultDate(t),B="",b=0;b<W[0];b++){for(E="",this.maxRows=4,w=0;w<W[1];w++){if(Q=this._daylightSavingAdjust(new Date(te,ee,t.selectedDay)),_=" ui-corner-all",S="",z){if(S+="<div class='ui-datepicker-group",W[1]>1)switch(w){case 0:S+=" ui-datepicker-group-first",_=" ui-corner-"+(K?"right":"left");break;case W[1]-1:S+=" ui-datepicker-group-last",_=" ui-corner-"+(K?"left":"right");break;default:S+=" ui-datepicker-group-middle",_=""}S+="'>"}for(S+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+_+"'>"+(/all|left/.test(_)&&0===b?K?a:s:"")+(/all|right/.test(_)&&0===b?K?s:a:"")+this._generateMonthYearHeader(t,ee,te,$,Z,b>0||w>0,p,f)+// draw month headers
"</div><table class='ui-datepicker-calendar'><thead><tr>",x=h?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",y=0;y<7;y++)x+="<th scope='col'"+((y+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[k=(y+u)%7]+"'>"+g[k]+"</span></th>";for(S+=x+"</tr></thead><tbody>",D=this._getDaysInMonth(te,ee),te===t.selectedYear&&ee===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,D)),F=(this._getFirstDayOfMonth(te,ee)-u+7)%7,T=Math.ceil((F+D)/7),M=z&&this.maxRows>T?this.maxRows:T,this.maxRows=M,R=this._daylightSavingAdjust(new Date(te,ee,1-F)),N=0;N<M;N++){for(S+="<tr>",L=h?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(R)+"</td>":"",y=0;y<7;y++)U=m?m.apply(t.input?t.input[0]:null,[R]):[!0,""],P=(H=R.getMonth()!==ee)&&!I||!U[0]||$&&R<$||Z&&R>Z,L+="<td class='"+((y+u+6)%7>=5?" ui-datepicker-week-end":"")+(// highlight weekends
H?" ui-datepicker-other-month":"")+(// highlight days from other months
R.getTime()===Q.getTime()&&ee===t.selectedMonth&&t._keyEvent||// user pressed key
v.getTime()===R.getTime()&&v.getTime()===Q.getTime()?
// or defaultDate is current printedDate and defaultDate is selectedDate
" "+this._dayOverClass:"")+(// highlight selected day
P?" "+this._unselectableClass+" ui-state-disabled":"")+(// highlight unselectable days
H&&!C?"":" "+U[1]+(// highlight custom dates
R.getTime()===X.getTime()?" "+this._currentClass:"")+(// highlight selected day
R.getTime()===G.getTime()?" ui-datepicker-today":""))+"'"+(// highlight today (if different)
H&&!C||!U[2]?"":" title='"+U[2].replace(/'/g,"&#39;")+"'")+(// cell title
P?"":" data-handler='selectDay' data-event='click' data-month='"+R.getMonth()+"' data-year='"+R.getFullYear()+"'")+">"+(// actions
H&&!C?"&#xa0;":
// display for other months
P?"<span class='ui-state-default'>"+R.getDate()+"</span>":"<a class='ui-state-default"+(R.getTime()===G.getTime()?" ui-state-highlight":"")+(R.getTime()===X.getTime()?" ui-state-active":"")+(// highlight selected day
H?" ui-priority-secondary":"")+// distinguish dates from other months
"' href='#' aria-current='"+(R.getTime()===X.getTime()?"true":"false")+// mark date as selected for screen reader
"' data-date='"+R.getDate()+// store date as data
"'>"+R.getDate()+"</a>")+"</td>",R.setDate(R.getDate()+1),R=this._daylightSavingAdjust(R);S+=L+"</tr>"}++ee>11&&(ee=0,te++),E+=S+="</tbody></table>"+(z?"</div>"+(W[0]>0&&w===W[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}B+=E}return B+=c,t._keyEvent=!1,B},
/* Generate the month and year header. */
_generateMonthYearHeader:function(e,t,i,n,s,r,a,o){var l,A,c,u,h,d,g,p,f=this._get(e,"changeMonth"),m=this._get(e,"changeYear"),C=this._get(e,"showMonthAfterYear"),I=this._get(e,"selectMonthLabel"),v=this._get(e,"selectYearLabel"),B="<div class='ui-datepicker-title'>",y="";if(r||!f)y+="<span class='ui-datepicker-month'>"+a[t]+"</span>";else{for(l=n&&n.getFullYear()===i,A=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' aria-label='"+I+"' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=n.getMonth())&&(!A||c<=s.getMonth())&&(y+="<option value='"+c+"'"+(c===t?" selected='selected'":"")+">"+o[c]+"</option>");y+="</select>"}if(C||(B+=y+(!r&&f&&m?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",r||!m)B+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),g=(d=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t})(u[0]),p=Math.max(g,d(u[1]||"")),g=n?Math.max(g,n.getFullYear()):g,p=s?Math.min(p,s.getFullYear()):p,e.yearshtml+="<select class='ui-datepicker-year' aria-label='"+v+"' data-handler='selectYear' data-event='change'>";g<=p;g++)e.yearshtml+="<option value='"+g+"'"+(g===i?" selected='selected'":"")+">"+g+"</option>";e.yearshtml+="</select>",B+=e.yearshtml,e.yearshtml=null}return B+=this._get(e,"yearSuffix"),C&&(B+=(!r&&f&&m?"":"&#xa0;")+y),B+="</div>"},
/* Adjust one of the date sub-fields. */
_adjustInstDate:function(e,t,i){var n=e.selectedYear+("Y"===i?t:0),s=e.selectedMonth+("M"===i?t:0),r=Math.min(e.selectedDay,this._getDaysInMonth(n,s))+("D"===i?t:0),a=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,s,r)));e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(e)},
/* Ensure a date is within any min/max bounds. */
_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),s=i&&t<i?i:t;return n&&s>n?n:s},
/* Notify change of month/year. */
_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},
/* Determine the number of months to show. */
_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},
/* Determine the current maximum date - ensure no time components are set. */
_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},
/* Find the number of days in a given month. */
_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},
/* Find the day of the week of the first of a month. */
_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},
/* Determines if we should allow a "next/prev" month display change. */
_canAdjustMonth:function(e,t,i,n){var s=this._getNumberOfMonths(e),r=this._daylightSavingAdjust(new Date(i,n+(t<0?t:s[0]*s[1]),1));return t<0&&r.setDate(this._getDaysInMonth(r.getFullYear(),r.getMonth())),this._isInRange(e,r)},
/* Is the given date in the accepted range? */
_isInRange:function(e,t){var i,n,s=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),a=null,o=null,l=this._get(e,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),a=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=n),i[1].match(/[+\-].*/)&&(o+=n)),(!s||t.getTime()>=s.getTime())&&(!r||t.getTime()<=r.getTime())&&(!a||t.getFullYear()>=a)&&(!o||t.getFullYear()<=o)},
/* Provide the configuration settings for formatting/parsing. */
_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},
/* Format the given date for display. */
_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).on("mousedown",e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each((function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)})):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new x,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.13.3",e.datepicker,e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());
/*!
   * jQuery UI Mouse 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
var T=!1;
/*!
   * jQuery UI Spinner 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
function M(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e(document).on("mouseup",(function(){T=!1})),e.widget("ui.mouse",{version:"1.13.3",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,(function(e){return t._mouseDown(e)})).on("click."+this.widgetName,(function(i){if(!0===e.data(i.target,t.widgetName+".preventClickEvent"))return e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1})),this.started=!1},
// TODO: make sure destroying one instance of mouse doesn't mess with
// other instances of mouse
_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!T){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,n=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;return!(n&&!s&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){i.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),T=!0,!0))}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,T=!1,t.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},
// These are placeholder methods, to be overriden by extending plugin
_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),e.ui.plugin={add:function(t,i,n){var s,r=e.ui[t].prototype;for(s in n)r.plugins[s]=r.plugins[s]||[],r.plugins[s].push([i,n[s]])},call:function(e,t,i,n){var s,r=e.plugins[t];if(r&&(n||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(s=0;s<r.length;s++)e.options[r[s][0]]&&r[s][1].apply(e.element,i)}},e.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&e(t).trigger("blur")},
/*!
   * jQuery UI Draggable 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.draggable",e.ui.mouse,{version:"1.13.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,
// Callbacks
drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var i=this.options;return!(this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map((function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=e.ui.safeActiveElement(this.document[0]);e(t.target).closest(i).length||e.ui.safeBlur(i)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===e(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(!1===this._trigger("drag",t,n))return this._mouseUp(new e.Event("mouseup",t)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,n=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,n)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==i._trigger("stop",t)&&i._clear()})):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new e.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!e(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var i=this.options,n="function"==typeof i.helper,s=n?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),Array.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,n,s=this.options,r=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(n=(i=e(s.containment))[0])&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=s.containment:this.containment=[0,0,e(r).width()-this.helperProportions.width-this.margins.left,(e(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:
// The absolute mouse position
t.top+// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.relative.top*i+// The offsetParent's offset without borders (offset + border)
this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:
// The absolute mouse position
t.left+// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.relative.left*i+// The offsetParent's offset without borders (offset + border)
this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,n,s,r,a=this.options,o=this._isRootNode(this.scrollParent[0]),l=e.pageX,A=e.pageY;return o&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(A=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(A=i[3]+this.offset.click.top)),a.grid&&(s=a.grid[1]?this.originalPageY+Math.round((A-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,A=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-a.grid[1]:s+a.grid[1]:s,r=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?r-this.offset.click.left>=i[0]||r-this.offset.click.left>i[2]?r:r-this.offset.click.left>=i[0]?r-a.grid[0]:r+a.grid[0]:r),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(A=this.originalPageY)),{top:
// The absolute mouse position
A-// Click offset (relative to the element)
this.offset.click.top-// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.relative.top-// The offsetParent's offset without borders (offset + border)
this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:o?0:this.offset.scroll.top),left:
// The absolute mouse position
l-// Click offset (relative to the element)
this.offset.click.left-// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.relative.left-// The offsetParent's offset without borders (offset + border)
this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:o?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},
// From now on bulk stuff - mainly helpers
_trigger:function(t,i,n){return n=n||this._uiHash(),e.ui.plugin.call(this,t,[i,n,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,n){var s=e.extend({},i,{item:n.element});n.sortables=[],e(n.options.connectToSortable).each((function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,s))}))},stop:function(t,i,n){var s=e.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,e.each(n.sortables,(function(){var e=this;e.isOver?(e.isOver=0,n.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,s))}))},drag:function(t,i,n){e.each(n.sortables,(function(){var s=!1,r=this;r.positionAbs=n.positionAbs,r.helperProportions=n.helperProportions,r.offset.click=n.offset.click,r._intersectsWith(r.containerCache)&&(s=!0,e.each(n.sortables,(function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==r&&this._intersectsWith(this.containerCache)&&e.contains(r.element[0],this.element[0])&&(s=!1),s}))),s?(r.isOver||(r.isOver=1,n._parent=i.helper.parent(),r.currentItem=i.helper.appendTo(r.element).data("ui-sortable-item",!0),r.options._helper=r.options.helper,r.options.helper=function(){return i.helper[0]},t.target=r.currentItem[0],r._mouseCapture(t,!0),r._mouseStart(t,!0,!0),r.offset.click.top=n.offset.click.top,r.offset.click.left=n.offset.click.left,r.offset.parent.left-=n.offset.parent.left-r.offset.parent.left,r.offset.parent.top-=n.offset.parent.top-r.offset.parent.top,n._trigger("toSortable",t),n.dropped=r.element,e.each(n.sortables,(function(){this.refreshPositions()})),n.currentItem=n.element,r.fromOutside=n),r.currentItem&&(r._mouseDrag(t),i.position=r.position)):r.isOver&&(r.isOver=0,r.cancelHelperRemoval=!0,r.options._revert=r.options.revert,r.options.revert=!1,r._trigger("out",t,r._uiHash(r)),r._mouseStop(t,!0),r.options.revert=r.options._revert,r.options.helper=r.options._helper,r.placeholder&&r.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(t),i.position=n._generatePosition(t,!0),n._trigger("fromSortable",t),n.dropped=!1,e.each(n.sortables,(function(){this.refreshPositions()})))}))}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,n){var s=e("body"),r=n.options;s.css("cursor")&&(r._cursor=s.css("cursor")),s.css("cursor",r.cursor)},stop:function(t,i,n){var s=n.options;s._cursor&&e("body").css("cursor",s._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,n){var s=e(i.helper),r=n.options;s.css("opacity")&&(r._opacity=s.css("opacity")),s.css("opacity",r.opacity)},stop:function(t,i,n){var s=n.options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,n){var s=n.options,r=!1,a=n.scrollParentNotHidden[0],o=n.document[0];a!==o&&"HTML"!==a.tagName?(s.axis&&"x"===s.axis||(n.overflowOffset.top+a.offsetHeight-t.pageY<s.scrollSensitivity?a.scrollTop=r=a.scrollTop+s.scrollSpeed:t.pageY-n.overflowOffset.top<s.scrollSensitivity&&(a.scrollTop=r=a.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(n.overflowOffset.left+a.offsetWidth-t.pageX<s.scrollSensitivity?a.scrollLeft=r=a.scrollLeft+s.scrollSpeed:t.pageX-n.overflowOffset.left<s.scrollSensitivity&&(a.scrollLeft=r=a.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-e(o).scrollTop()<s.scrollSensitivity?r=e(o).scrollTop(e(o).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(o).scrollTop())<s.scrollSensitivity&&(r=e(o).scrollTop(e(o).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-e(o).scrollLeft()<s.scrollSensitivity?r=e(o).scrollLeft(e(o).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(o).scrollLeft())<s.scrollSensitivity&&(r=e(o).scrollLeft(e(o).scrollLeft()+s.scrollSpeed)))),!1!==r&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(n,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,i,n){var s=n.options;n.snapElements=[],e(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each((function(){var t=e(this),i=t.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})}))},drag:function(t,i,n){var s,r,a,o,l,A,c,u,h,d,g=n.options,p=g.snapTolerance,f=i.offset.left,m=f+n.helperProportions.width,C=i.offset.top,I=C+n.helperProportions.height;for(h=n.snapElements.length-1;h>=0;h--)A=(l=n.snapElements[h].left-n.margins.left)+n.snapElements[h].width,u=(c=n.snapElements[h].top-n.margins.top)+n.snapElements[h].height,m<l-p||f>A+p||I<c-p||C>u+p||!e.contains(n.snapElements[h].item.ownerDocument,n.snapElements[h].item)?(n.snapElements[h].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,t,e.extend(n._uiHash(),{snapItem:n.snapElements[h].item})),n.snapElements[h].snapping=!1):("inner"!==g.snapMode&&(s=Math.abs(c-I)<=p,r=Math.abs(u-C)<=p,a=Math.abs(l-m)<=p,o=Math.abs(A-f)<=p,s&&(i.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),r&&(i.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),o&&(i.position.left=n._convertPositionTo("relative",{top:0,left:A}).left)),d=s||r||a||o,"outer"!==g.snapMode&&(s=Math.abs(c-C)<=p,r=Math.abs(u-I)<=p,a=Math.abs(l-f)<=p,o=Math.abs(A-m)<=p,s&&(i.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),r&&(i.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),o&&(i.position.left=n._convertPositionTo("relative",{top:0,left:A-n.helperProportions.width}).left)),!n.snapElements[h].snapping&&(s||r||a||o||d)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,t,e.extend(n._uiHash(),{snapItem:n.snapElements[h].item})),n.snapElements[h].snapping=s||r||a||o||d)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,n){var s,r=n.options,a=e.makeArray(e(r.stack)).sort((function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)}));a.length&&(s=parseInt(e(a[0]).css("zIndex"),10)||0,e(a).each((function(t){e(this).css("zIndex",s+t)})),this.css("zIndex",s+a.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,n){var s=e(i.helper),r=n.options;s.css("zIndex")&&(r._zIndex=s.css("zIndex")),s.css("zIndex",r.zIndex)},stop:function(t,i,n){var s=n.options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}}),e.ui.draggable,
/*!
   * jQuery UI Resizable 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.resizable",e.ui.mouse,{version:"1.13.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,
// See #7960
zIndex:90,
// Callbacks
resize:null,start:null,stop:null},_num:function(e){return parseFloat(e)||0},_isNumber:function(e){return!isNaN(parseFloat(e))},_hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;if(t[n]>0)return!0;try{t[n]=1,s=t[n]>0,t[n]=0}catch(I2){}return s},_create:function(){var t,i=this.options,n=this;this._addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),i.autoHide&&e(this.element).on("mouseenter",(function(){i.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())})).on("mouseleave",(function(){i.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();var t,i=function(t){e(t).removeData("resizable").removeData("ui-resizable").off(".resizable")};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(e,t){switch(this._super(e,t),e){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!t}},_setupHandles:function(){var t,i,n,s,r,a=this.options,o=this;if(this.handles=a.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=e(),this._addedHandles=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},i=0;i<n.length;i++)s="ui-resizable-"+(t=String.prototype.trim.call(n[i])),r=e("<div>"),this._addClass(r,"ui-resizable-handle "+s),r.css({zIndex:a.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(r),this._addedHandles=this._addedHandles.add(r));this._renderAxis=function(t){var i,n,s,r;for(i in t=t||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=e(this.handles[i]),this._on(this.handles[i],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=e(this.handles[i],this.element),r=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(s,r),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",(function(){o.resizing||(this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=r&&r[1]?r[1]:"se")})),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var i,n,s=!1;for(i in this.handles)((n=e(this.handles[i])[0])===t.target||e.contains(n,t.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var i,n,s,r=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),r.containment&&(i+=e(r.containment).scrollLeft()||0,n+=e(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:n},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,n,s=this.originalMousePosition,r=this.axis,a=t.pageX-s.left||0,o=t.pageY-s.top||0,l=this._change[r];return this._updatePrevProperties(),!!l&&(i=l.apply(this,[t,a,o]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1)},_mouseStop:function(t){this.resizing=!1;var i,n,s,r,a,o,l,A=this.options,c=this;return this._helper&&(s=(n=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,r=n?0:c.sizeDiff.width,a={width:c.helper.width()-r,height:c.helper.height()-s},o=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,l=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,A.animate||this.element.css(e.extend(a,{top:l,left:o})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!A.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.helper.css(e),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px",this.helper.width(e.width)),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px",this.helper.height(e.height)),e},_updateVirtualBoundaries:function(e){var t,i,n,s,r,a=this.options;r={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||e)&&(t=r.minHeight*this.aspectRatio,n=r.minWidth/this.aspectRatio,i=r.maxHeight*this.aspectRatio,s=r.maxWidth/this.aspectRatio,t>r.minWidth&&(r.minWidth=t),n>r.minHeight&&(r.minHeight=n),i<r.maxWidth&&(r.maxWidth=i),s<r.maxHeight&&(r.maxHeight=s)),this._vBoundaries=r},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,n=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,n=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,s=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,r=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,a=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,o=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,A=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return r&&(e.width=t.minWidth),a&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),s&&(e.height=t.maxHeight),r&&A&&(e.left=o-t.minWidth),n&&A&&(e.left=o-t.maxWidth),a&&c&&(e.top=l-t.minHeight),s&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],n=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],s=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)i[t]=parseFloat(n[t])||0,i[t]+=parseFloat(s[t])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;t<this._proportionallyResizeElements.length;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize;return{left:this.originalPosition.left+t,width:i.width-t}},n:function(e,t,i){var n=this.originalSize;return{top:this.originalPosition.top+i,height:n.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},sw:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,n]))},ne:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},nw:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,n]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),n=i.options,s=i._proportionallyResizeElements,r=s.length&&/textarea/i.test(s[0].nodeName),a=r&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,o=r?0:i.sizeDiff.width,l={width:i.size.width-o,height:i.size.height-a},A=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(l,c&&A?{top:c,left:A}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,i,n,s,r,a,o,l=e(this).resizable("instance"),A=l.options,c=l.element,u=A.containment,h=u instanceof e?u.get(0):/parent/.test(u)?c.parent().get(0):u;h&&(l.containerElement=e(h),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(h),i=[],e(["Top","Right","Left","Bottom"]).each((function(e,n){i[e]=l._num(t.css("padding"+n))})),l.containerOffset=t.offset(),l.containerPosition=t.position(),l.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},n=l.containerOffset,s=l.containerSize.height,r=l.containerSize.width,a=l._hasScroll(h,"left")?h.scrollWidth:r,o=l._hasScroll(h)?h.scrollHeight:s,l.parentData={element:h,left:n.left,top:n.top,width:a,height:o}))},resize:function(t){var i,n,s,r,a=e(this).resizable("instance"),o=a.options,l=a.containerOffset,A=a.position,c=a._aspectRatio||t.shiftKey,u={top:0,left:0},h=a.containerElement,d=!0;h[0]!==document&&/static/.test(h.css("position"))&&(u=l),A.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,d=!1),a.position.left=o.helper?l.left:0),A.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,d=!1),a.position.top=a._helper?l.top:0),s=a.containerElement.get(0)===a.element.parent().get(0),r=/relative|absolute/.test(a.containerElement.css("position")),s&&r?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-l.left)),n=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-l.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,d=!1)),n+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-n,c&&(a.size.width=a.size.height*a.aspectRatio,d=!1)),d||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),i=t.options,n=t.containerOffset,s=t.containerPosition,r=t.containerElement,a=e(t.helper),o=a.offset(),l=a.outerWidth()-t.sizeDiff.width,A=a.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(r.css("position"))&&e(this).css({left:o.left-s.left-n.left,width:l,height:A}),t._helper&&!i.animate&&/static/.test(r.css("position"))&&e(this).css({left:o.left-s.left-n.left,width:l,height:A})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance").options;e(t.alsoResize).each((function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.css("width")),height:parseFloat(t.css("height")),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})}))},resize:function(t,i){var n=e(this).resizable("instance"),s=n.options,r=n.originalSize,a=n.originalPosition,o={height:n.size.height-r.height||0,width:n.size.width-r.width||0,top:n.position.top-a.top||0,left:n.position.left-a.left||0};e(s.alsoResize).each((function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),s={},r=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,(function(e,t){var i=(n[t]||0)+(o[t]||0);i&&i>=0&&(s[t]=i||null)})),t.css(s)}))},stop:function(){e(this).removeData("ui-resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==e.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),n=i.options,s=i.size,r=i.originalSize,a=i.originalPosition,o=i.axis,l="number"==typeof n.grid?[n.grid,n.grid]:n.grid,A=l[0]||1,c=l[1]||1,u=Math.round((s.width-r.width)/A)*A,h=Math.round((s.height-r.height)/c)*c,d=r.width+u,g=r.height+h,p=n.maxWidth&&n.maxWidth<d,f=n.maxHeight&&n.maxHeight<g,m=n.minWidth&&n.minWidth>d,C=n.minHeight&&n.minHeight>g;n.grid=l,m&&(d+=A),C&&(g+=c),p&&(d-=A),f&&(g-=c),/^(se|s|e)$/.test(o)?(i.size.width=d,i.size.height=g):/^(ne)$/.test(o)?(i.size.width=d,i.size.height=g,i.position.top=a.top-h):/^(sw)$/.test(o)?(i.size.width=d,i.size.height=g,i.position.left=a.left-u):((g-c<=0||d-A<=0)&&(t=i._getPaddingPlusBorderDimensions(this)),g-c>0?(i.size.height=g,i.position.top=a.top-h):(g=c-t.height,i.size.height=g,i.position.top=a.top+r.height-g),d-A>0?(i.size.width=d,i.position.left=a.left-u):(d=A-t.width,i.size.width=d,i.position.left=a.left+r.width-d))}}),e.ui.resizable,
/*!
   * jQuery UI Dialog 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.dialog",{version:"1.13.3",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",
// Ensure the titlebar is always visible
using:function(t){var i=e(this).css(t).offset().top;i<0&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,
// Callbacks
beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(e=t.parent.children().eq(t.index)).length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||e.ui.safeBlur(e.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,(function(){i._trigger("close",t)})))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var n=!1,s=this.uiDialog.siblings(".ui-front:visible").map((function(){return+e(this).css("z-index")})).get(),r=Math.max.apply(null,s);return r>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",r+1),n=!0),n&&!i&&this._trigger("focus",t),n},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=e(e.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,(function(){t._focusTabbable(),t._trigger("focus")})),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=e.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||e.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(e){e.preventDefault(),this._restoreTabbableFocus(),this._delay(this._restoreTabbableFocus)},_createWrapper:function(){this.uiDialog=e("<div>").hide().attr({
// Setting tabIndex makes the div focusable
tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),n=i.first(),s=i.last();t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==n[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay((function(){s.trigger("focus")})),t.preventDefault()):(this._delay((function(){n.trigger("focus")})),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:e("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title?e.text(this.options.title):e.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||Array.isArray(i)&&!i.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(e.each(i,(function(i,n){var s,r;n="function"==typeof n?{click:n,text:i}:n,n=e.extend({type:"button"},n),s=n.click,r={icon:n.icon,iconPosition:n.iconPosition,showLabel:n.showLabel,
// Deprecated options
icons:n.icons,text:n.text},delete n.click,delete n.icon,delete n.iconPosition,delete n.showLabel,delete n.icons,"boolean"==typeof n.text&&delete n.text,e("<button></button>",n).button(r).appendTo(t.uiButtonSet).on("click",(function(){s.apply(t.element[0],arguments)}))})),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var t=this,i=this.options;function n(e){return{position:e.position,offset:e.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,s){t._addClass(e(this),"ui-dialog-dragging"),t._blockFrames(),t._trigger("dragStart",i,n(s))},drag:function(e,i){t._trigger("drag",e,n(i))},stop:function(s,r){var a=r.offset.left-t.document.scrollLeft(),o=r.offset.top-t.document.scrollTop();i.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(o>=0?"+":"")+o,of:t.window},t._removeClass(e(this),"ui-dialog-dragging"),t._unblockFrames(),t._trigger("dragStop",s,n(r))}})},_makeResizable:function(){var t=this,i=this.options,n=i.resizable,s=this.uiDialog.css("position"),r="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";function a(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:r,start:function(i,n){t._addClass(e(this),"ui-dialog-resizing"),t._blockFrames(),t._trigger("resizeStart",i,a(n))},resize:function(e,i){t._trigger("resize",e,a(i))},stop:function(n,s){var r=t.uiDialog.offset(),o=r.left-t.document.scrollLeft(),l=r.top-t.document.scrollTop();i.height=t.uiDialog.height(),i.width=t.uiDialog.width(),i.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" top"+(l>=0?"+":"")+l,of:t.window},t._removeClass(e(this),"ui-dialog-resizing"),t._unblockFrames(),t._trigger("resizeStop",n,a(s))}}).css("position",s)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,n=!1,s={};e.each(t,(function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(n=!0),e in i.resizableRelatedOptions&&(s[e]=t)})),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(t,i){var n,s,r=this.uiDialog;"disabled"!==t&&(this._super(t,i),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({
// Ensure that we always pass a string
label:e("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((n=r.is(":data(ui-draggable)"))&&!i&&r.draggable("destroy"),!n&&i&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((s=r.is(":data(ui-resizable)"))&&!i&&r.resizable("destroy"),s&&"string"==typeof i&&r.resizable("option","handles",i),s||!1===i||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),e=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),t=Math.max(0,n.minHeight-e),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-e):"none","auto"===n.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map((function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!e(t.target).closest(".ui-dialog").length||!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=e.fn.jquery.substring(0,4),i=!0;this._delay((function(){i=!1})),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(e){if(!i){var n=this._trackingInstances()[0];n._allowInteraction(e)||(e.preventDefault(),n._focusTabbable(),"3.4."!==t&&"3.5."!==t&&"3.6."!==t||n._delay(n._restoreTabbableFocus))}}.bind(this)),this.overlay=e("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==e.uiBackCompat&&e.widget("ui.dialog",e.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(e,t){"dialogClass"===e&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t),this._superApply(arguments)}}),e.ui.dialog,
/*!
   * jQuery UI Droppable 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.droppable",{version:"1.13.3",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",
// Callbacks
activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof i?i:function(e){return e.is(i)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(t.scope),t.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,i){if("accept"===t)this.accept="function"==typeof i?i:function(e){return e.is(i)};else if("scope"===t){var n=e.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var n=i||e.ui.ddmanager.current,s=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var i=e(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===n.options.scope&&i.accept.call(i.element[0],n.currentItem||n.element)&&e.ui.intersect(n,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t))return s=!0,!1})),!s&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(n)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},
// Extension points just to make backcompat sane and avoid duplicating logic
// TODO: Remove in 1.14 along with call to it below
_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&e<t+i}return function(t,i,n,s){if(!i.offset)return!1;var r=(t.positionAbs||t.position.absolute).left+t.margins.left,a=(t.positionAbs||t.position.absolute).top+t.margins.top,o=r+t.helperProportions.width,l=a+t.helperProportions.height,A=i.offset.left,c=i.offset.top,u=A+i.proportions().width,h=c+i.proportions().height;switch(n){case"fit":return A<=r&&o<=u&&c<=a&&l<=h;case"intersect":return A<r+t.helperProportions.width/2&&// Right Half
o-t.helperProportions.width/2<u&&// Left Half
c<a+t.helperProportions.height/2&&// Bottom Half
l-t.helperProportions.height/2<h;case"pointer":return e(s.pageY,c,i.proportions().height)&&e(s.pageX,A,i.proportions().width);case"touch":return(a>=c&&a<=h||// Top edge touching
l>=c&&l<=h||// Bottom edge touching
a<c&&l>h)&&(r>=A&&r<=u||// Left edge touching
o>=A&&o<=u||// Right edge touching
r<A&&o>u);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,i){var n,s,r=e.ui.ddmanager.droppables[t.options.scope]||[],a=i?i.type:null,o=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(n=0;n<r.length;n++)if(!(r[n].options.disabled||t&&!r[n].accept.call(r[n].element[0],t.currentItem||t.element))){for(s=0;s<o.length;s++)if(o[s]===r[n].element[0]){r[n].proportions().height=0;continue e}r[n].visible="none"!==r[n].element.css("display"),r[n].visible&&("mousedown"===a&&r[n]._activate.call(r[n],i),r[n].offset=r[n].element.offset(),r[n].proportions({width:r[n].element[0].offsetWidth,height:r[n].element[0].offsetHeight}))}},drop:function(t,i){var n=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))})),n},dragStart:function(t,i){t.element.parentsUntil("body").on("scroll.droppable",(function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}))},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,s,r,a=e.ui.intersect(t,this,this.options.tolerance,i),o=!a&&this.isover?"isout":a&&!this.isover?"isover":null;o&&(this.options.greedy&&(s=this.options.scope,(r=this.element.parents(":data(ui-droppable)").filter((function(){return e(this).droppable("instance").options.scope===s}))).length&&((n=e(r[0]).droppable("instance")).greedyChild="isover"===o)),n&&"isover"===o&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[o]=!0,this["isout"===o?"isover":"isout"]=!1,this["isover"===o?"_over":"_out"].call(this,i),n&&"isout"===o&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}}))},dragStop:function(t,i){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},!1!==e.uiBackCompat&&e.widget("ui.droppable",e.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),e.ui.droppable,
/*!
   * jQuery UI Progressbar 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.progressbar",{version:"1.13.3",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({
// Only set static values; aria-valuenow and aria-valuemax are
// set inside _refreshValue()
role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=e("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(e){if(void 0===e)return this.options.value;this.options.value=this._constrainedValue(e),this._refreshValue()},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=!1===e,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),
/*!
   * jQuery UI Selectable 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.selectable",e.ui.mouse,{version:"1.13.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",
// Callbacks
selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t.elementPos=e(t.element[0]).offset(),t.selectees=e(t.options.filter,t.element[0]),t._addClass(t.selectees,"ui-selectee"),t.selectees.each((function(){var i=e(this),n=i.offset(),s={left:n.left-t.elementPos.left,top:n.top-t.elementPos.top};e.data(this,"selectable-item",{element:this,$element:i,left:s.left,top:s.top,right:s.left+i.outerWidth(),bottom:s.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})}))},this.refresh(),this._mouseInit(),this.helper=e("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(t){var i=this,n=this.options;this.opos=[t.pageX,t.pageY],this.elementPos=e(this.element[0]).offset(),this.options.disabled||(this.selectees=e(n.filter,this.element[0]),this._trigger("start",t),e(n.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each((function(){var n=e.data(this,"selectable-item");n.startselected=!0,t.metaKey||t.ctrlKey||(i._removeClass(n.$element,"ui-selected"),n.selected=!1,i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",t,{unselecting:n.element}))})),e(t.target).parents().addBack().each((function(){var n,s=e.data(this,"selectable-item");if(s)return n=!t.metaKey&&!t.ctrlKey||!s.$element.hasClass("ui-selected"),i._removeClass(s.$element,n?"ui-unselecting":"ui-selected")._addClass(s.$element,n?"ui-selecting":"ui-unselecting"),s.unselecting=!n,s.selecting=n,s.selected=n,n?i._trigger("selecting",t,{selecting:s.element}):i._trigger("unselecting",t,{unselecting:s.element}),!1})))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,n=this,s=this.options,r=this.opos[0],a=this.opos[1],o=t.pageX,l=t.pageY;return r>o&&(i=o,o=r,r=i),a>l&&(i=l,l=a,a=i),this.helper.css({left:r,top:a,width:o-r,height:l-a}),this.selectees.each((function(){var i=e.data(this,"selectable-item"),A=!1,c={};i&&i.element!==n.element[0]&&(c.left=i.left+n.elementPos.left,c.right=i.right+n.elementPos.left,c.top=i.top+n.elementPos.top,c.bottom=i.bottom+n.elementPos.top,"touch"===s.tolerance?A=!(c.left>o||c.right<r||c.top>l||c.bottom<a):"fit"===s.tolerance&&(A=c.left>r&&c.right<o&&c.top>a&&c.bottom<l),A?(i.selected&&(n._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(n._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(n._addClass(i.$element,"ui-selecting"),i.selecting=!0,n._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,n._addClass(i.$element,"ui-selected"),i.selected=!0):(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element})))))})),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each((function(){var n=e.data(this,"selectable-item");i._removeClass(n.$element,"ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",t,{unselected:n.element})})),e(".ui-selecting",this.element[0]).each((function(){var n=e.data(this,"selectable-item");i._removeClass(n.$element,"ui-selecting")._addClass(n.$element,"ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",t,{selected:n.element})})),this._trigger("stop",t),this.helper.remove(),!1}}),
/*!
   * jQuery UI Selectmenu 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.selectmenu",[e.ui.formResetMixin,{version:"1.13.3",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,
// Callbacks
change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=e()},_drawButton:function(){var t,i=this,n=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(e){this.button.trigger("focus"),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=e("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(n).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",(function(){i._rendered||i._refreshMenu()}))},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(e,i){e.preventDefault(),t._setSelection(),t._select(i.item.data("ui-selectmenu-item"),e)},focus:function(e,i){var n=i.item.data("ui-selectmenu-item");null!=t.focusIndex&&n.index!==t.focusIndex&&(t._trigger("focus",e,{item:n}),t.isOpen||t._select(n,e)),t.focusIndex=n.index,t.button.attr("aria-activedescendant",t.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(
// Fall back to an empty object in case there are no options
this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var e,t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e)))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var i=e("<span>");return this._setText(i,t.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(t,i){var n=this,s="";e.each(i,(function(i,r){var a;r.optgroup!==s&&(a=e("<li>",{text:r.optgroup}),n._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(r.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(t),s=r.optgroup),n._renderItemData(t,r)}))},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,i){var n=e("<li>"),s=e("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(n,null,"ui-state-disabled"),i.hidden?n.prop("hidden",!0):this._setText(s,i.label),n.append(s).appendTo(t)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var i,n,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),(n="first"===e||"last"===e?i["first"===e?"prevAll":"nextAll"](s).eq(-1):i[e+"All"](s).eq(0)).length&&this.menuInstance.focus(t,n)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?((e=window.getSelection()).removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.trigger("focus"))},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+e.escapeSelector(this.ids.button)).length||this.close(t))}},_buttonEvents:{
// Prevent text selection from being reset when interacting with the selectmenu (#10144)
mousedown:function(){var e;window.getSelection?(e=window.getSelection()).rangeCount&&(this.range=e.getRangeAt(0)):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var i=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),i=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),i=!1}i&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex).parent("li");t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(e)),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==i&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){if("icons"===e){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,t.button)}this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"width"===e&&this._resizeButton()},_setOptionDisabled:function(e){this._super(e),this.menuInstance.option("disabled",e),this.button.attr("aria-disabled",e),this._toggleClass(this.button,null,"ui-state-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;!1!==e?(null===e&&(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),
// Support: IE10
// IE10 wraps long text (possibly a rounding bug)
// so we add 1px to avoid the wrapping
this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var e=this._super();return e.disabled=this.element.prop("disabled"),e},_parseOptions:function(t){var i=this,n=[];t.each((function(t,s){n.push(i._parseOption(e(s),t))})),this.items=n},_parseOption:function(e,t){var i=e.parent("optgroup");return{element:e,index:t,value:e.val(),label:e.text(),hidden:i.prop("hidden")||e.prop("hidden"),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||e.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),
/*!
   * jQuery UI Slider 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.slider",e.ui.mouse,{version:"1.13.3",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all",
// Note: ui-widget-header isn't the most fittingly semantic framework class for this
// element, but worked best visually with a variety of themes
"ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,
// Callbacks
change:null,slide:null,start:null,stop:null},
// Number of pages in a slider
// (how many times can you page up/down to go through the whole range)
numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,n=this.options,s=this.element.find(".ui-slider-handle"),r=[];for(i=n.values&&n.values.length||1,s.length>i&&(s.slice(i).remove(),s=s.slice(0,i)),t=s.length;t<i;t++)r.push("<span tabindex='0'></span>");this.handles=s.add(e(r.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each((function(t){e(this).data("ui-slider-handle-index",t).attr("tabIndex",0)}))},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=e("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var i,n,s,r,a,o,l,A=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(i),s=this._valueMax()-this._valueMin()+1,this.handles.each((function(t){var i=Math.abs(n-A.values(t));(s>i||s===i&&(t===A._lastChangedValue||A.values(t)===c.min))&&(s=i,r=e(this),a=t)})),!1!==this._start(t,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(r,null,"ui-state-active"),r.trigger("focus"),o=r.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-o.left-r.width()/2,top:t.pageY-o.top-r.height()/2-(parseInt(r.css("borderTopWidth"),10)||0)-(parseInt(r.css("borderBottomWidth"),10)||0)+(parseInt(r.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,a,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,n,s,r;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(n=i/t)>1&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),s=this._valueMax()-this._valueMin(),r=this._valueMin()+n*s,this._trimAlignValue(r)},_uiHash:function(e,t,i){var n={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(n.value=void 0!==t?t:this.values(e),n.values=i||this.values()),n},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,i){var n,s=this.value(),r=this.values();this._hasMultipleValues()&&(n=this.values(t?0:1),s=this.values(t),2===this.options.values.length&&!0===this.options.range&&(i=0===t?Math.min(n,i):Math.max(n,i)),r[t]=i),i!==s&&!1!==this._trigger("slide",e,this._uiHash(t,i,r))&&(this._hasMultipleValues()?this.values(t,i):this.value(i))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,t){var i,n,s;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!Array.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(i=this.options.values,n=arguments[0],s=0;s<i.length;s+=1)i[s]=this._trimAlignValue(n[s]),this._change(null,s);this._refreshValue()},_setOption:function(e,t){var i,n=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,t),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(t),this.handles.css("horizontal"===t?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=n-1;i>=0;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},
//internal value getter
// _value() returns value trimmed by min and max, aligned by step
_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},
//internal values getter
// _values() returns array of values trimmed by min and max, aligned by step
// _values( index ) returns single value trimmed by min and max, aligned by step
_values:function(e){var t,i,n;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this._hasMultipleValues()){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},
// Returns the step-aligned value that val is closest to, between (inclusive) min and max
_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,n=e-i;return 2*Math.abs(i)>=t&&(n+=i>0?t:-t),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step;(e=Math.round((e-t)/i)*i+t)>this.options.max&&(e-=i),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),i=t.indexOf(".");return-1===i?0:t.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,i,n,s,r,a=this.options.range,o=this.options,l=this,A=!this._animateOff&&o.animate,c={};this._hasMultipleValues()?this.handles.each((function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[A?"animate":"css"](c,o.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[A?"animate":"css"]({left:i+"%"},o.animate),1===n&&l.range[A?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:o.animate})):(0===n&&l.range.stop(1,1)[A?"animate":"css"]({bottom:i+"%"},o.animate),1===n&&l.range[A?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:o.animate}))),t=i})):(n=this.value(),s=this._valueMin(),r=this._valueMax(),i=r!==s?(n-s)/(r-s)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[A?"animate":"css"](c,o.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[A?"animate":"css"]({width:i+"%"},o.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[A?"animate":"css"]({width:100-i+"%"},o.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[A?"animate":"css"]({height:i+"%"},o.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[A?"animate":"css"]({height:100-i+"%"},o.animate))},_handleEvents:{keydown:function(t){var i,n,s,r=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(e(t.target),null,"ui-state-active"),!1===this._start(t,r)))return}switch(s=this.options.step,i=n=this._hasMultipleValues()?this.values(r):this.value(),t.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(i===this._valueMax())return;n=this._trimAlignValue(i+s);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i===this._valueMin())return;n=this._trimAlignValue(i-s)}this._slide(t,r,n)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),this._removeClass(e(t.target),null,"ui-state-active"))}}}),
/*!
   * jQuery UI Sortable 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.sortable",e.ui.mouse,{version:"1.13.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,
// Callbacks
activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&e<t+i},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),e.each(this.items,(function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")}))},_destroy:function(){this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var n=null,s=!1,r=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),e(t.target).parents().each((function(){if(e.data(this,r.widgetName+"-item")===r)return n=e(this),!1})),e.data(t.target,r.widgetName+"-item")===r&&(n=e(t.target)),!!n&&(!(this.options.handle&&!i&&(e(this.options.handle,n).find("*").addBack().each((function(){this===t.target&&(s=!0)})),!s))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,i,n){var s,r,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.appendTo=e("parent"!==a.appendTo?a.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{
//Where the click happened, relative to the element
left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},
// This is a relative to absolute position minus the actual position calculation -
// only used for relative positioned helper
relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),e.extend(this.offset,{parent:this._getParentOffset()}),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",a.cursor),this.storedStylesheet=e("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(r)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(e){var t=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<t.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+t.scrollSpeed:e.pageY-this.overflowOffset.top<t.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-t.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<t.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+t.scrollSpeed:e.pageX-this.overflowOffset.left<t.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-t.scrollSpeed)):(e.pageY-this.document.scrollTop()<t.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-t.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<t.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+t.scrollSpeed)),e.pageX-this.document.scrollLeft()<t.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-t.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<t.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+t.scrollSpeed))),i},_mouseDrag:function(t){var i,n,s,r,a=this.options;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),a.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},i=this.items.length-1;i>=0;i--)if(s=(n=this.items[i]).item[0],(r=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===r?"next":"prev"]()[0]===s||e.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],s))){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(t,n),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var n=this,s=this.placeholder.offset(),r=this.options.axis,a={};r&&"x"!==r||(a.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(a.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(a,parseInt(this.options.revert,10)||500,(function(){n._clear(t)}))}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new e.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},e(i).each((function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&n.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))})),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},i.each((function(){n.push(e(t.item||this).attr(t.attribute||"id")||"")})),n},
/* Be careful with the following core functions */
_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,n=this.positionAbs.top,s=n+this.helperProportions.height,r=e.left,a=r+e.width,o=e.top,l=o+e.height,A=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||n+A>o&&n+A<l,h="y"===this.options.axis||t+c>r&&t+c<a,d=u&&h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?d:r<t+this.helperProportions.width/2&&// Right Half
i-this.helperProportions.width/2<a&&// Left Half
o<n+this.helperProportions.height/2&&// Bottom Half
s-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t,i,n="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),s="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);return!(!n||!s)&&(t=this.dragDirection.vertical,i=this.dragDirection.horizontal,this.floating?"right"===i||"down"===t?2:1:t&&("down"===t?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),n=this.dragDirection.vertical,s=this.dragDirection.horizontal;return this.floating&&s?"right"===s&&i||"left"===s&&!i:n&&("down"===n&&t||"up"===n&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var i,n,s,r,a=[],o=[],l=this._connectWith();if(l&&t)for(i=l.length-1;i>=0;i--)for(n=(s=e(l[i],this.document[0])).length-1;n>=0;n--)(r=e.data(s[n],this.widgetFullName))&&r!==this&&!r.options.disabled&&o.push(["function"==typeof r.options.items?r.options.items.call(r.element):e(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);function A(){a.push(this)}for(o.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=o.length-1;i>=0;i--)o[i][0].each(A);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,(function(e){for(var i=0;i<t.length;i++)if(t[i]===e.item[0])return!1;return!0}))},_refreshItems:function(t){this.items=[],this.containers=[this];var i,n,s,r,a,o,l,A,c=this.items,u=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(i=h.length-1;i>=0;i--)for(n=(s=e(h[i],this.document[0])).length-1;n>=0;n--)(r=e.data(s[n],this.widgetFullName))&&r!==this&&!r.options.disabled&&(u.push(["function"==typeof r.options.items?r.options.items.call(r.element[0],t,{item:this.currentItem}):e(r.options.items,r.element),r]),this.containers.push(r));for(i=u.length-1;i>=0;i--)for(a=u[i][1],n=0,A=(o=u[i][0]).length;n<A;n++)(l=e(o[n])).data(this.widgetName+"-item",a),c.push({item:l,instance:a,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){var i,n,s,r;for(i=this.items.length-1;i>=0;i--)n=this.items[i],this.currentContainer&&n.instance!==this.currentContainer&&n.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?e(this.options.toleranceElement,n.item):n.item,t||(n.width=s.outerWidth(),n.height=s.outerHeight()),r=s.offset(),n.left=r.left,n.top=r.top)},refreshPositions:function(e){var t,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(e),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(t=this.containers.length-1;t>=0;t--)i=this.containers[t].element.offset(),this.containers[t].containerCache.left=i.left,this.containers[t].containerCache.top=i.top,this.containers[t].containerCache.width=this.containers[t].element.outerWidth(),this.containers[t].containerCache.height=this.containers[t].element.outerHeight();return this},_createPlaceholder:function(t){var i,n,s=(t=t||this).options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,n=t.currentItem[0].nodeName.toLowerCase(),s.placeholder={element:function(){var s=e("<"+n+">",t.document[0]);return t._addClass(s,"ui-sortable-placeholder",i||t.currentItem[0].className)._removeClass(s,"ui-sortable-helper"),"tbody"===n?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(s)):"tr"===n?t._createTrPlaceholder(t.currentItem,s):"img"===n&&s.attr("src",t.currentItem.attr("src")),i||s.css("visibility","hidden"),s},update:function(e,r){i&&!s.forcePlaceholderSize||(r.height()&&(!s.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||r.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var n=this;t.children().each((function(){e("<td>&#160;</td>",n.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(t){var i,n,s,r,a,o,l,A,c,u,h=null,d=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(h&&e.contains(this.containers[i].element[0],h.element[0]))continue;h=this.containers[i],d=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[d].containerCache.over||(this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1);else{for(s=1e4,r=null,a=(c=h.floating||this._isFloating(this.currentItem))?"left":"top",o=c?"width":"height",u=c?"pageX":"pageY",n=this.items.length-1;n>=0;n--)e.contains(this.containers[d].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(l=this.items[n].item.offset()[a],A=!1,t[u]-l>this.items[n][o]/2&&(A=!0),Math.abs(t[u]-l)<s&&(s=Math.abs(t[u]-l),r=this.items[n],this.direction=A?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[d])return void(this.currentContainer.containerCache.over||(this.containers[d]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));r?this._rearrange(t,r,null,!0):this._rearrange(t,null,this.containers[d].element,!0),this._trigger("change",t,this._uiHash()),this.containers[d]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[d],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(t){var i=this.options,n="function"==typeof i.helper?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||this.appendTo[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!i.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!i.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),Array.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,n,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),"document"!==s.containment&&"window"!==s.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===s.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===s.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(t=e(s.containment)[0],i=e(s.containment).offset(),n="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(s[0].tagName);return{top:
// The absolute mouse position
i.top+// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.relative.top*n+// The offsetParent's offset without borders (offset + border)
this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:s.scrollTop())*n,left:
// The absolute mouse position
i.left+// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.relative.left*n+// The offsetParent's offset without borders (offset + border)
this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:s.scrollLeft())*n}},_generatePosition:function(t){var i,n,s=this.options,r=t.pageX,a=t.pageY,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(o[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(r=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(r=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),s.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-s.grid[1]:i+s.grid[1]:i,n=this.originalPageX+Math.round((r-this.originalPageX)/s.grid[0])*s.grid[0],r=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-s.grid[0]:n+s.grid[0]:n)),{top:
// The absolute mouse position
a-// Click offset (relative to the element)
this.offset.click.top-// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.relative.top-// The offsetParent's offset without borders (offset + border)
this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:o.scrollTop()),left:
// The absolute mouse position
r-// Click offset (relative to the element)
this.offset.click.left-// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.relative.left-// The offsetParent's offset without borders (offset + border)
this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:o.scrollLeft())}},_rearrange:function(e,t,i,n){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var s=this.counter;this._delay((function(){s===this.counter&&this.refreshPositions(!n)}))},_clear:function(e,t){this.reverting=!1;var i,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function s(e,t,i){return function(n){i._trigger(e,n,t._uiHash(t))}}for(this.fromOutside&&!t&&n.push((function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push((function(e){this._trigger("update",e,this._uiHash())})),this!==this.currentContainer&&(t||(n.push((function(e){this._trigger("remove",e,this._uiHash())})),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)t||n.push(s("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(s("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;i<n.length;i++)n[i].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===e.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget("ui.spinner",{version:"1.13.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t=this._super(),i=this.element;return e.each(["min","max","step"],(function(e,n){var s=i.attr(n);null!=s&&s.length&&(t[n]=s)})),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e))},mousewheel:function(t,i){var n=e.ui.safeActiveElement(this.document[0]);if(this.element[0]===n&&i){if(!this.spinning&&!this._start(t))return!1;this._spin((i>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay((function(){this.spinning&&this._stop(t)}),100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var i;function n(){this.element[0]===e.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=i,this._delay((function(){this.previous=i})))}i=this.element[0]===e.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay((function(){delete this.cancelBlur,n.call(this)})),!1!==this._start(t)&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(e(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},
// TODO: do we really want to consider this a stop?
// shouldn't we just stop the repeater and wait until mouseup before
// we trigger the stop event?
"mouseleave .ui-spinner-button":"_stop"},
// Support mobile enhanced option and make backcompat more sane
_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var i=this.options,n=e.ui.keyCode;switch(t.keyCode){case n.UP:return this._repeat(null,1,t),!0;case n.DOWN:return this._repeat(null,-1,t),!0;case n.PAGE_UP:return this._repeat(null,i.page,t),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_start:function(e){return!(!this.spinning&&!1===this._trigger("start",e))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay((function(){this._repeat(40,t,i)}),e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",t,{value:i})||(this._value(i),this.counter++)},_increment:function(e){var t=this.options.incremental;return t?"function"==typeof t?t(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,n=this.options;return i=e-(t=null!==n.min?n.min:0),e=t+(i=Math.round(i/n.step)*n.step),e=parseFloat(e.toFixed(this._precision())),null!==n.max&&e>n.max?n.max:null!==n.min&&e<n.min?n.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){var i,n,s;if("culture"===e||"numberFormat"===e)return i=this._parse(this.element.val()),this.options[e]=t,void this.element.val(this._format(i));"max"!==e&&"min"!==e&&"step"!==e||"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(n=this.buttons.first().find(".ui-icon"),this._removeClass(n,null,this.options.icons.up),this._addClass(n,null,t.up),s=this.buttons.last().find(".ui-icon"),this._removeClass(s,null,this.options.icons.down),this._addClass(s,null,t.down)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable")},_setOptions:M((function(e){this._super(e)})),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,
// TODO: what should we do with values that can't be parsed?
"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null!==e&&e===this._adjustValue(e)},
// Update the value without triggering change
_value:function(e,t){var i;""!==e&&null!==(i=this._parse(e))&&(t||(i=this._adjustValue(i)),e=this._format(i)),this.element.val(e),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:M((function(e){this._stepUp(e)})),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:M((function(e){this._stepDown(e)})),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:M((function(e){this._stepUp((e||1)*this.options.page)})),pageDown:M((function(e){this._stepDown((e||1)*this.options.page)})),value:function(e){if(!arguments.length)return this._parse(this.element.val());M(this._value).call(this,e)},widget:function(){return this.uiSpinner}}),!1!==e.uiBackCompat&&e.widget("ui.spinner",e.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),e.ui.spinner,
/*!
   * jQuery UI Tabs 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.tabs",{version:"1.13.3",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,
// Callbacks
activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,n;i=t.href.replace(e,""),n=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(s){}try{n=decodeURIComponent(n)}catch(s){}return t.hash.length>1&&i===n}}(),_create:function(){var t=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),Array.isArray(i.disabled)&&(i.disabled=e.uniqueSort(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),(function(e){return t.tabs.index(e)})))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(i.active):this.active=e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===t&&(n&&this.tabs.each((function(i,s){if(e(s).attr("aria-controls")===n)return t=i,!1})),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==t&&-1!==t||(t=!!this.tabs.length&&0)),!1!==t&&-1===(t=this.tabs.index(this.tabs.eq(t)))&&(t=!i&&0),!i&&!1===t&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(e.ui.safeActiveElement(this.document[0])).closest("li"),n=this.tabs.index(i),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:n++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:s=!1,n--;break;case e.ui.keyCode.END:n=this.anchors.length-1;break;case e.ui.keyCode.HOME:n=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n);case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}t.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,s),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay((function(){this.option("active",n)}),this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},
// Alt+page up/down moves focus to the previous/next tab (and activates)
_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){var n=this.tabs.length-1;for(;-1!==e.inArray((t>n&&(t=0),t<0&&(t=n),t),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).trigger("focus"),e},_setOption:function(e,t){"active"!==e?(this._super(e,t),"collapsible"===e&&(this._toggleClass("ui-tabs-collapsible",null,t),t||!1!==this.options.active||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t)):this._activate(t)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),(function(e){return i.index(e)})),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,n=this.anchors,s=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",(function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()})).on("focus"+this.eventNamespace,".ui-tabs-anchor",(function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()})),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map((function(){return e("a",this)[0]})).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=e(),this.anchors.each((function(i,n){var s,r,a,o=e(n).uniqueId().attr("id"),l=e(n).closest("li"),A=l.attr("aria-controls");t._isLocal(n)?(a=(s=n.hash).substring(1),r=t.element.find(t._sanitizeSelector(s))):(s="#"+(a=l.attr("aria-controls")||e({}).uniqueId()[0].id),(r=t.element.find(s)).length||(r=t._createPanel(a)).insertAfter(t.panels[i-1]||t.tablist),r.attr("aria-live","polite")),r.length&&(t.panels=t.panels.add(r)),A&&l.data("ui-tabs-aria-controls",A),l.attr({"aria-controls":a,"aria-labelledby":o}),r.attr("aria-labelledby",o)})),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(n.not(this.anchors)),this._off(s.not(this.panels)))},
// Allow overriding how to find the list for rare usage scenarios (#7715)
_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var i,n,s;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),s=0;n=this.tabs[s];s++)i=e(n),!0===t||-1!==e.inArray(s,t)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),(function(e,t){i[t]="_eventHandler"})),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,n=this.element.parent();"fill"===t?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each((function(){var t=e(this),n=t.css("position");"absolute"!==n&&"fixed"!==n&&(i-=t.outerHeight(!0))})),this.element.children().not(this.panels).each((function(){i-=e(this).outerHeight(!0)})),this.panels.each((function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))})).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each((function(){i=Math.max(i,e(this).height("").height())})).height(i))},_eventHandler:function(t){var i=this.options,n=this.active,s=e(t.currentTarget).closest("li"),r=s[0]===n[0],a=r&&i.collapsible,o=a?e():this._getPanelForTab(s),l=n.length?this._getPanelForTab(n):e(),A={oldTab:n,oldPanel:l,newTab:a?e():s,newPanel:o};t.preventDefault(),s.hasClass("ui-state-disabled")||// tab is already loading
s.hasClass("ui-tabs-loading")||// can't switch durning an animation
this.running||// click on active header, but not collapsible
r&&!i.collapsible||// allow canceling activation
!1===this._trigger("beforeActivate",t,A)||(i.active=!a&&this.tabs.index(s),this.active=r?e():s,this.xhr&&this.xhr.abort(),l.length||o.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),o.length&&this.load(this.tabs.index(s),t),this._toggle(t,A))},
// Handles show/hide for selecting tabs
_toggle:function(t,i){var n=this,s=i.newPanel,r=i.oldPanel;function a(){n.running=!1,n._trigger("activate",t,i)}function o(){n._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&n.options.show?n._show(s,n.options.show,a):(s.show(),a())}this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,(function(){n._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o()})):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),o()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&r.length?i.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter((function(){return 0===e(this).attr("tabIndex")})).attr("tabIndex",-1),s.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,n=this._findActive(t);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return!1===t?e():this.tabs.eq(t)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+e.escapeSelector(t)+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each((function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")})),this.tabs.each((function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")})),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;!1!==i&&(void 0===t?i=!1:(t=this._getIndex(t),i=Array.isArray(i)?e.map(i,(function(e){return e!==t?e:null})):e.map(this.tabs,(function(e,i){return i!==t?i:null}))),this._setOptionDisabled(i))},disable:function(t){var i=this.options.disabled;if(!0!==i){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=Array.isArray(i)?e.merge([t],i).sort():[t]}this._setOptionDisabled(i)}},load:function(t,i){t=this._getIndex(t);var n=this,s=this.tabs.eq(t),r=s.find(".ui-tabs-anchor"),a=this._getPanelForTab(s),o={tab:s,panel:a},l=function(e,t){"abort"===t&&n.panels.stop(!1,!0),n._removeClass(s,"ui-tabs-loading"),a.removeAttr("aria-busy"),e===n.xhr&&delete n.xhr};this._isLocal(r[0])||(this.xhr=e.ajax(this._ajaxSettings(r,i,o)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(s,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done((function(e,t,s){setTimeout((function(){a.html(e),n._trigger("load",i,o),l(s,t)}),1)})).fail((function(e,t){setTimeout((function(){l(e,t)}),1)}))))},_ajaxSettings:function(t,i,n){var s=this;return{
// Support: IE <11 only
// Strip any hash that exists to prevent errors with the Ajax request
url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,r){return s._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:r},n))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),!1!==e.uiBackCompat&&e.widget("ui.tabs",e.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),e.ui.tabs,
/*!
   * jQuery UI Tooltip 1.13.3
   * https://jqueryui.com
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license.
   * https://jquery.org/license
   */
e.widget("ui.tooltip",{version:"1.13.3",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=e(this).attr("title");return e("<a>").text(t).html()},hide:!0,
// Disabled elements have inconsistent behavior across browsers (#8661)
items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,
// Callbacks
close:null,open:null},_addDescribedBy:function(e,t){var i=(e.attr("aria-describedby")||"").split(/\s+/);i.push(t),e.data("ui-tooltip-id",t).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),n=(t.attr("aria-describedby")||"").split(/\s+/),s=e.inArray(i,n);-1!==s&&n.splice(s,1),t.removeData("ui-tooltip-id"),(n=String.prototype.trim.call(n.join(" ")))?t.attr("aria-describedby",n):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=e([])},_setOption:function(t,i){var n=this;this._super(t,i),"content"===t&&e.each(this.tooltips,(function(e,t){n._updateContent(t.element)}))},_setOptionDisabled:function(e){this[e?"_disable":"_enable"]()},_disable:function(){var t=this;e.each(this.tooltips,(function(i,n){var s=e.Event("blur");s.target=s.currentTarget=n.element[0],t.close(s,!0)})),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter((function(){var t=e(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})))},_enable:function(){this.disabledTitles.each((function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})),this.disabledTitles=e([])},open:function(t){var i=this,n=e(t?t.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&n.parents().each((function(){var t,n=e(this);n.data("ui-tooltip-open")&&((t=e.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))})),this._registerCloseHandlers(t,n),this._updateContent(n,t))},_updateContent:function(e,t){var i,n=this.options.content,s=this,r=t?t.type:null;if("string"==typeof n||n.nodeType||n.jquery)return this._open(t,e,n);(i=n.call(e[0],(function(i){s._delay((function(){e.data("ui-tooltip-open")&&(t&&(t.type=r),this._open(t,e,i))}))})))&&this._open(t,e,i)},_open:function(t,i,n){var s,r,a,o,l=e.extend({},this.options.position);function A(e){l.of=e,r.is(":hidden")||r.position(l)}n&&((s=this._find(i))?s.tooltip.find(".ui-tooltip-content").html(n):(i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),s=this._tooltip(i),r=s.tooltip,this._addDescribedBy(i,r.attr("id")),r.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),(o=e("<div>").html(r.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),o.removeAttr("id").find("[id]").removeAttr("id"),o.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:A}),A(t)):r.position(e.extend({of:i},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval((function(){r.is(":visible")&&(A(l.of),clearInterval(a))}),13)),this._trigger("open",t,{tooltip:r})))},_registerCloseHandlers:function(t,i){var n={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var n=e.Event(t);n.currentTarget=i[0],this.close(n,!0)}}};i[0]!==this.element[0]&&(n.remove=function(){var e=this._find(i);e&&this._removeTooltip(e.tooltip)}),t&&"mouseover"!==t.type||(n.mouseleave="close"),t&&"focusin"!==t.type||(n.focusout="close"),this._on(!0,i,n)},close:function(t){var i,n=this,s=e(t?t.currentTarget:this.element),r=this._find(s);r?(i=r.tooltip,r.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),r.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,(function(){n._removeTooltip(e(this))})),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,(function(t,i){e(i.element).attr("title",i.title),delete n.parents[t]})),r.closing=!0,this._trigger("close",t,{tooltip:i}),r.hiding||(r.closing=!1))):s.removeData("ui-tooltip-open")},_tooltip:function(t){var i=e("<div>").attr("role","tooltip"),n=e("<div>").appendTo(i),s=i.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(t)),this.tooltips[s]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){clearInterval(this.delayedShow),e.remove(),delete this.tooltips[e.attr("id")]},_appendTo:function(e){var t=e.closest(".ui-front, dialog");return t.length||(t=this.document[0].body),t},_destroy:function(){var t=this;e.each(this.tooltips,(function(i,n){var s=e.Event("blur"),r=n.element;s.target=s.currentTarget=r[0],t.close(s,!0),e("#"+i).remove(),r.data("ui-tooltip-title")&&(r.attr("title")||r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})),this.liveRegion.remove()}}),!1!==e.uiBackCompat&&e.widget("ui.tooltip",e.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var e=this._superApply(arguments);return this.options.tooltipClass&&e.tooltip.addClass(this.options.tooltipClass),e}}),e.ui.tooltip})),
/*!
 * jQuery UI Touch Punch 0.2.3
 *
 * Copyright 2011–2014, Dave Furfero
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Depends:
 *  jquery.ui.widget.js
 *  jquery.ui.mouse.js
 */
function(e){if(e.support.touch="ontouchend"in document,e.support.touch){var t,i=e.ui.mouse.prototype,n=i._mouseInit,s=i._mouseDestroy;i._touchStart=function(e){!t&&this._mouseCapture(e.originalEvent.changedTouches[0])&&(t=!0,this._touchMoved=!1,r(e,"mouseover"),r(e,"mousemove"),r(e,"mousedown"))},i._touchMove=function(e){t&&(this._touchMoved=!0,r(e,"mousemove"))},i._touchEnd=function(e){t&&(r(e,"mouseup"),r(e,"mouseout"),this._touchMoved||r(e,"click"),t=!1)},i._mouseInit=function(){var t=this;t.element.bind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),n.call(t)},i._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),s.call(t)}}function r(e,t){if(!(e.originalEvent.touches.length>1)){e.preventDefault();var i=e.originalEvent.changedTouches[0],n=document.createEvent("MouseEvents");n.initMouseEvent(t,
// type
!0,
// bubbles                    
!0,
// cancelable                 
window,
// view                       
1,
// detail                     
i.screenX,
// screenX                    
i.screenY,
// screenY                    
i.clientX,
// clientX                    
i.clientY,
// clientY                    
!1,
// ctrlKey                    
!1,
// altKey                     
!1,
// shiftKey                   
!1,
// metaKey                    
0,
// button                     
null),e.target.dispatchEvent(n)}}}(PC);const knt={mounted(e,t){const i=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting?t.value(!0,e.target):t.value(!1,e.target)}))}));i.observe(e),e._observer=i},componentUpdated(e,t,i){Array.from(i.childNodes).filter((e=>e.tagName)).forEach((e=>{new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&"function"==typeof t.value&&t.value(e.target)}))})).observe(e)}))},unmounted(e){e._observer&&(e._observer.disconnect(),delete e._observer)}};
/*!
 * jQuery Mousewheel 3.1.13
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 */var Dnt,Fnt;!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(PC)}((function(e){var t,i,n=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],r=Array.prototype.slice;if(e.event.fixHooks)for(var a=n.length;a;)e.event.fixHooks[n[--a]]=e.event.mouseHooks;var o=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=s.length;t;)this.addEventListener(s[--t],l,!1);else this.onmousewheel=l;e.data(this,"mousewheel-line-height",o.getLineHeight(this)),e.data(this,"mousewheel-page-height",o.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=s.length;t;)this.removeEventListener(s[--t],l,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var i=e(t),n=i["offsetParent"in e.fn?"offsetParent":"parent"]();return n.length||(n=e("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,
// see shouldAdjustOldDeltas() below
normalizeOffset:!0}};function l(n){var s,a=n||window.event,l=r.call(arguments,1),u=0,h=0,d=0,g=0,p=0;if((n=e.event.fix(a)).type="mousewheel","detail"in a&&(d=-1*a.detail),"wheelDelta"in a&&(d=a.wheelDelta),"wheelDeltaY"in a&&(d=a.wheelDeltaY),"wheelDeltaX"in a&&(h=-1*a.wheelDeltaX),"axis"in a&&a.axis===a.HORIZONTAL_AXIS&&(h=-1*d,d=0),u=0===d?h:d,"deltaY"in a&&(u=d=-1*a.deltaY),"deltaX"in a&&(h=a.deltaX,0===d&&(u=-1*h)),0!==d||0!==h){if(1===a.deltaMode){var f=e.data(this,"mousewheel-line-height");u*=f,d*=f,h*=f}else if(2===a.deltaMode){var m=e.data(this,"mousewheel-page-height");u*=m,d*=m,h*=m}if(s=Math.max(Math.abs(d),Math.abs(h)),(!i||s<i)&&(i=s,c(a,s)&&(i/=40)),c(a,s)&&(u/=40,h/=40,d/=40),u=Math[u>=1?"floor":"ceil"](u/i),h=Math[h>=1?"floor":"ceil"](h/i),d=Math[d>=1?"floor":"ceil"](d/i),o.settings.normalizeOffset&&this.getBoundingClientRect){var C=this.getBoundingClientRect();g=n.clientX-C.left,p=n.clientY-C.top}return n.deltaX=h,n.deltaY=d,n.deltaFactor=i,n.offsetX=g,n.offsetY=p,n.deltaMode=0,l.unshift(n,u,h,d),t&&clearTimeout(t),t=setTimeout(A,200),(e.event.dispatch||e.event.handle).apply(this,l)}}function A(){i=null}function c(e,t){return o.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})})),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(PC,window,document)}((function(e){var t,i,n,s,r,a,o,l,A,c,u,h,d,g,p,f,m,C,I,v,B,y,b,E,w,Q,_,S,x,k,D,F,T,M,R,N,L,U,H,P,O,G,K,q,Y,V,W,j,J,z,X,$,Z,ee,te,ie,ne,se,re,ae,oe;re="function"==typeof define&&define.amd,ae="undefined"!=typeof module&&module.exports,oe="https:"==document.location.protocol?"https:":"http:",re||(ae?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+oe+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E"))),i="mCustomScrollbar",n="mCS",s=".mCustomScrollbar",r={
/*
      set element/content width/height programmatically 
      values: boolean, pixels, percentage 
      	option						default
      	-------------------------------------
      	setWidth					false
      	setHeight					false
      */
/*
      set the initial css top property of content  
      values: string (e.g. "-100px", "10%" etc.)
      */
setTop:0,
/*
      set the initial css left property of content  
      values: string (e.g. "-100px", "10%" etc.)
      */
setLeft:0,
/* 
      scrollbar axis (vertical and/or horizontal scrollbars) 
      values (string): "y", "x", "yx"
      */
axis:"y",
/*
      position of scrollbar relative to content  
      values (string): "inside", "outside" ("outside" requires elements with position:relative)
      */
scrollbarPosition:"inside",
/*
      scrolling inertia
      values: integer (milliseconds)
      */
scrollInertia:950,
/* 
      auto-adjust scrollbar dragger length
      values: boolean
      */
autoDraggerLength:!0,
/*
      auto-hide scrollbar when idle 
      values: boolean
      	option						default
      	-------------------------------------
      	autoHideScrollbar			false
      */
/*
      auto-expands scrollbar on mouse-over and dragging
      values: boolean
      	option						default
      	-------------------------------------
      	autoExpandScrollbar			false
      */
/*
      always show scrollbar, even when there's nothing to scroll 
      values: integer (0=disable, 1=always show dragger rail and buttons, 2=always show dragger rail, dragger and buttons), boolean
      */
alwaysShowScrollbar:0,
/*
      scrolling always snaps to a multiple of this number in pixels
      values: integer, array ([y,x])
      	option						default
      	-------------------------------------
      	snapAmount					null
      */
/*
      when snapping, snap with this number in pixels as an offset 
      values: integer
      */
snapOffset:0,
/* 
      mouse-wheel scrolling
      */
mouseWheel:{
/* 
        enable mouse-wheel scrolling
        values: boolean
        */
enable:!0,
/* 
        scrolling amount in pixels
        values: "auto", integer 
        */
scrollAmount:"auto",
/* 
        mouse-wheel scrolling axis 
        the default scrolling direction when both vertical and horizontal scrollbars are present 
        values (string): "y", "x" 
        */
axis:"y",
/* 
        prevent the default behaviour which automatically scrolls the parent element(s) when end of scrolling is reached 
        values: boolean
        	option						default
        	-------------------------------------
        	preventDefault				null
        */
/*
        the reported mouse-wheel delta value. The number of lines (translated to pixels) one wheel notch scrolls.  
        values: "auto", integer 
        "auto" uses the default OS/browser value 
        */
deltaFactor:"auto",
/*
        normalize mouse-wheel delta to -1 or 1 (disables mouse-wheel acceleration) 
        values: boolean
        	option						default
        	-------------------------------------
        	normalizeDelta				null
        */
/*
        invert mouse-wheel scrolling direction 
        values: boolean
        	option						default
        	-------------------------------------
        	invert						null
        */
/*
        the tags that disable mouse-wheel when cursor is over them
        */
disableOver:["select","option","keygen","datalist","textarea"]},
/* 
      scrollbar buttons
      */
scrollButtons:{
/*
        enable scrollbar buttons
        values: boolean
        	option						default
        	-------------------------------------
        	enable						null
        */
/*
        scrollbar buttons scrolling type 
        values (string): "stepless", "stepped"
        */
scrollType:"stepless",
/*
        scrolling amount in pixels
        values: "auto", integer 
        */
scrollAmount:"auto"
/*
        tabindex of the scrollbar buttons
        values: false, integer
        	option						default
        	-------------------------------------
        	tabindex					null
        */},
/* 
      keyboard scrolling
      */
keyboard:{
/*
        enable scrolling via keyboard
        values: boolean
        */
enable:!0,
/*
        keyboard scrolling type 
        values (string): "stepless", "stepped"
        */
scrollType:"stepless",
/*
        scrolling amount in pixels
        values: "auto", integer 
        */
scrollAmount:"auto"},
/*
      enable content touch-swipe scrolling 
      values: boolean, integer, string (number)
      integer values define the axis-specific minimum amount required for scrolling momentum
      */
contentTouchScroll:25,
/*
      enable/disable document (default) touch-swipe scrolling 
      */
documentTouchScroll:!0,
/*
      advanced option parameters
      */
advanced:{
/*
        auto-expand content horizontally (for "x" or "yx" axis) 
        values: boolean, integer (the value 2 forces the non scrollHeight/scrollWidth method, the value 3 forces the scrollHeight/scrollWidth method)
        	option						default
        	-------------------------------------
        	autoExpandHorizontalScroll	null
        */
/*
        auto-scroll to elements with focus
        */
autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",
/*
        auto-update scrollbars on content, element or viewport resize 
        should be true for fluid layouts/elements, adding/removing content dynamically, hiding/showing elements, content with images etc. 
        values: boolean
        */
updateOnContentResize:!0,
/*
        auto-update scrollbars each time each image inside the element is fully loaded 
        values: "auto", boolean
        */
updateOnImageLoad:"auto",
/*
        auto-update scrollbars based on the amount and size changes of specific selectors 
        useful when you need to update the scrollbar(s) automatically, each time a type of element is added, removed or changes its size 
        values: boolean, string (e.g. "ul li" will auto-update scrollbars each time list-items inside the element are changed) 
        a value of true (boolean) will auto-update scrollbars each time any element is changed
        	option						default
        	-------------------------------------
        	updateOnSelectorChange		null
        */
/*
        extra selectors that'll allow scrollbar dragging upon mousemove/up, pointermove/up, touchend etc. (e.g. "selector-1, selector-2")
        	option						default
        	-------------------------------------
        	extraDraggableSelectors		null
        */
/*
        extra selectors that'll release scrollbar dragging upon mouseup, pointerup, touchend etc. (e.g. "selector-1, selector-2")
        	option						default
        	-------------------------------------
        	releaseDraggableSelectors	null
        */
/*
        auto-update timeout 
        values: integer (milliseconds)
        */
autoUpdateTimeout:60},
/* 
      scrollbar theme 
      values: string (see CSS/plugin URI for a list of ready-to-use themes)
      */
theme:"light",
/*
      user defined callback functions
      */
callbacks:{
/*
        Available callbacks: 
        	callback					default
        	-------------------------------------
        	onCreate					null
        	onInit						null
        	onScrollStart				null
        	onScroll					null
        	onTotalScroll				null
        	onTotalScrollBack			null
        	whileScrolling				null
        	onOverflowY					null
        	onOverflowX					null
        	onOverflowYNone				null
        	onOverflowXNone				null
        	onImageLoad					null
        	onSelectorChange			null
        	onBeforeUpdate				null
        	onUpdate					null
        */
onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}
/*
      add scrollbar(s) on all elements matching the current selector, now and in the future 
      values: boolean, string 
      string values: "on" (enable), "once" (disable after first invocation), "off" (disable)
      liveSelector values: string (selector)
      	option						default
      	-------------------------------------
      	live						false
      	liveSelector				null
      */},a=0,o={},l=window.attachEvent&&!window.addEventListener?1:0,A=!1,c=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={
/* 
      plugin initialization method 
      creates the scrollbar(s), plugin data object and options
      ----------------------------------------
      */
init:function(t){t=e.extend(!0,{},r,t);var i=h.call(this);if(t.live){var l=t.liveSelector||this.selector||s,A=e(l);if("off"===t.live)return void g(l);o[l]=setTimeout((function(){A.mCustomScrollbar(t),"once"===t.live&&A.length&&g(l)}),500)}else g(l);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=f(t.scrollButtons.scrollType),d(t),e(i).each((function(){var i=e(this);if(!i.data(n)){i.data(n,{idx:++a,
/* instance index */
opt:t,
/* options */
scrollRatio:{y:null,x:null},
/* scrollbar to content ratio */
overflowed:null,
/* overflowed axis */
contentReset:{y:null,x:null},
/* object to check when content resets */
bindEvents:!1,
/* object to check if events are bound */
tweenRunning:!1,
/* object to check if tween is running */
sequential:{},
/* sequential scrolling object */
langDir:i.css("direction"),
/* detect/store direction (ltr or rtl) */
cbOffsets:null,
/* object to check whether callback offsets always trigger */
/* 
              object to check how scrolling events where last triggered 
              "internal" (default - triggered by this script), "external" (triggered by other scripts, e.g. via scrollTo method) 
              usage: object.data("mCS").trigger
              */
trigger:null,
/* 
              object to check for changes in elements in order to call the update method automatically 
              */
poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var s=i.data(n),r=s.opt,o=i.data("mcs-axis"),l=i.data("mcs-scrollbar-position"),A=i.data("mcs-theme");o&&(r.axis=o),l&&(r.scrollbarPosition=l),A&&(r.theme=A,d(r)),m.call(this),s&&r.callbacks.onCreate&&"function"==typeof r.callbacks.onCreate&&r.callbacks.onCreate.call(this),e("#mCSB_"+s.idx+"_container img:not(."+c[2]+")").addClass(c[2]),u.update.call(null,i)}}))},
/* ---------------------------------------- */
/* 
      plugin update method 
      updates content and scrollbar(s) values, events and status 
      ----------------------------------------
      usage: $(selector).mCustomScrollbar("update");
      */
update:function(t,i){var s=t||h.call(this);return e(s).each((function(){var t=e(this);if(t.data(n)){var s=t.data(n),r=s.opt,a=e("#mCSB_"+s.idx+"_container"),o=e("#mCSB_"+s.idx),l=[e("#mCSB_"+s.idx+"_dragger_vertical"),e("#mCSB_"+s.idx+"_dragger_horizontal")];if(!a.length)return;s.tweenRunning&&j(t),i&&s&&r.callbacks.onBeforeUpdate&&"function"==typeof r.callbacks.onBeforeUpdate&&r.callbacks.onBeforeUpdate.call(this),t.hasClass(c[3])&&t.removeClass(c[3]),t.hasClass(c[4])&&t.removeClass(c[4]),o.css("max-height","none"),o.height()!==t.height()&&o.css("max-height",t.height()),I.call(this),"y"===r.axis||r.advanced.autoExpandHorizontalScroll||a.css("width",C(a)),s.overflowed=E.call(this),S.call(this),r.autoDraggerLength&&B.call(this),y.call(this),Q.call(this);var A=[Math.abs(a[0].offsetTop),Math.abs(a[0].offsetLeft)];"x"!==r.axis&&(s.overflowed[0]?l[0].height()>l[0].parent().height()?w.call(this):(J(t,A[0].toString(),{dir:"y",dur:0,overwrite:"none"}),s.contentReset.y=null):(w.call(this),"y"===r.axis?_.call(this):"yx"===r.axis&&s.overflowed[1]&&J(t,A[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==r.axis&&(s.overflowed[1]?l[1].width()>l[1].parent().width()?w.call(this):(J(t,A[1].toString(),{dir:"x",dur:0,overwrite:"none"}),s.contentReset.x=null):(w.call(this),"x"===r.axis?_.call(this):"yx"===r.axis&&s.overflowed[0]&&J(t,A[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),i&&s&&(2===i&&r.callbacks.onImageLoad&&"function"==typeof r.callbacks.onImageLoad?r.callbacks.onImageLoad.call(this):3===i&&r.callbacks.onSelectorChange&&"function"==typeof r.callbacks.onSelectorChange?r.callbacks.onSelectorChange.call(this):r.callbacks.onUpdate&&"function"==typeof r.callbacks.onUpdate&&r.callbacks.onUpdate.call(this)),V.call(this)}}))},
/* ---------------------------------------- */
/* 
      plugin scrollTo method 
      triggers a scrolling event to a specific value
      ----------------------------------------
      usage: $(selector).mCustomScrollbar("scrollTo",value,options);
      */
scrollTo:function(t,i){if(void 0!==t&&null!=t){var s=h.call(this);return e(s).each((function(){var s=e(this);if(s.data(n)){var r=s.data(n),a=r.opt,o={trigger:"external",
/* method is by default triggered externally (e.g. from other scripts) */
scrollInertia:a.scrollInertia,
/* scrolling inertia (animation duration) */
scrollEasing:"mcsEaseInOut",
/* animation easing */
moveDragger:!1,
/* move dragger instead of content */
timeout:60,
/* scroll-to delay */
callbacks:!0,
/* enable/disable callbacks */
onStart:!0,onUpdate:!0,onComplete:!0},l=e.extend(!0,{},o,i),A=q.call(this,t),c=l.scrollInertia>0&&l.scrollInertia<17?17:l.scrollInertia;A[0]=Y.call(this,A[0],"y"),A[1]=Y.call(this,A[1],"x"),l.moveDragger&&(A[0]*=r.scrollRatio.y,A[1]*=r.scrollRatio.x),l.dur=se()?0:c,setTimeout((function(){null!==A[0]&&void 0!==A[0]&&"x"!==a.axis&&r.overflowed[0]&&(l.dir="y",l.overwrite="all",J(s,A[0].toString(),l)),null!==A[1]&&void 0!==A[1]&&"y"!==a.axis&&r.overflowed[1]&&(l.dir="x",l.overwrite="none",J(s,A[1].toString(),l))}),l.timeout)}}))}},
/* ---------------------------------------- */
/*
      plugin stop method 
      stops scrolling animation
      ----------------------------------------
      usage: $(selector).mCustomScrollbar("stop");
      */
stop:function(){var t=h.call(this);return e(t).each((function(){var t=e(this);t.data(n)&&j(t)}))},
/* ---------------------------------------- */
/*
      plugin disable method 
      temporarily disables the scrollbar(s) 
      ----------------------------------------
      usage: $(selector).mCustomScrollbar("disable",reset); 
      reset (boolean): resets content position to 0 
      */
disable:function(t){var i=h.call(this);return e(i).each((function(){var i=e(this);i.data(n)&&(i.data(n),V.call(this,"remove"),_.call(this),t&&w.call(this),S.call(this,!0),i.addClass(c[3]))}))},
/* ---------------------------------------- */
/*
      plugin destroy method 
      completely removes the scrollbar(s) and returns the element to its original state
      ----------------------------------------
      usage: $(selector).mCustomScrollbar("destroy"); 
      */
destroy:function(){var t=h.call(this);return e(t).each((function(){var s=e(this);if(s.data(n)){var r=s.data(n),a=r.opt,o=e("#mCSB_"+r.idx),l=e("#mCSB_"+r.idx+"_container"),A=e(".mCSB_"+r.idx+"_scrollbar");a.live&&g(a.liveSelector||e(t).selector),V.call(this,"remove"),_.call(this),w.call(this),s.removeData(n),Z(this,"mcs"),A.remove(),l.find("img."+c[2]).removeClass(c[2]),o.replaceWith(l.contents()),s.removeClass(i+" _"+n+"_"+r.idx+" "+c[6]+" "+c[7]+" "+c[5]+" "+c[3]).addClass(c[4])}}))}
/* ---------------------------------------- */},h=function(){return"object"!=typeof e(this)||e(this).length<1?s:this},d=function(t){var i=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],n=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],s=["minimal","minimal-dark"],r=["minimal","minimal-dark"],a=["minimal","minimal-dark"];t.autoDraggerLength=!(e.inArray(t.theme,i)>-1)&&t.autoDraggerLength,t.autoExpandScrollbar=!(e.inArray(t.theme,n)>-1)&&t.autoExpandScrollbar,t.scrollButtons.enable=!(e.inArray(t.theme,s)>-1)&&t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,r)>-1||t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,a)>-1?"outside":t.scrollbarPosition},g=function(e){o[e]&&(clearTimeout(o[e]),Z(o,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},f=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},m=function(){var t=e(this),s=t.data(n),r=s.opt,a=r.autoExpandScrollbar?" "+c[1]+"_expand":"",o=["<div id='mCSB_"+s.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+s.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_vertical"+a+"'><div class='"+c[12]+"'><div id='mCSB_"+s.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' ></div></div><div class='mCSB_draggerRail' ></div></div></div>","<div id='mCSB_"+s.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+s.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_horizontal"+a+"'><div class='"+c[12]+"'><div id='mCSB_"+s.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' ></div></div><div class='mCSB_draggerRail' ></div></div></div>"],l="yx"===r.axis?"mCSB_vertical_horizontal":"x"===r.axis?"mCSB_horizontal":"mCSB_vertical",A="yx"===r.axis?o[0]+o[1]:"x"===r.axis?o[1]:o[0],u="yx"===r.axis?"<div id='mCSB_"+s.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",h=r.autoHideScrollbar?" "+c[6]:"",d="x"!==r.axis&&"rtl"===s.langDir?" "+c[7]:"";r.setWidth&&t.css("width",r.setWidth),r.setHeight&&t.css("height",r.setHeight),r.setLeft="y"!==r.axis&&"rtl"===s.langDir?"989999px":r.setLeft,t.addClass(i+" _"+n+"_"+s.idx+h+d).wrapInner("<div id='mCSB_"+s.idx+"' class='mCustomScrollBox mCS-"+r.theme+" "+l+"'><div id='mCSB_"+s.idx+"_container' class='mCSB_container' style='position:relative; top:"+r.setTop+"; left:"+r.setLeft+";' dir='"+s.langDir+"' ></div></div>");var g=e("#mCSB_"+s.idx),p=e("#mCSB_"+s.idx+"_container");"y"===r.axis||r.advanced.autoExpandHorizontalScroll||p.css("width",C(p)),"outside"===r.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),g.addClass("mCSB_outside").after(A)):(g.addClass("mCSB_inside").append(A),p.wrap(u)),v.call(this);var f=[e("#mCSB_"+s.idx+"_dragger_vertical"),e("#mCSB_"+s.idx+"_dragger_horizontal")];f[0].css("min-height",f[0].height()),f[1].css("min-width",f[1].width())},C=function(t){var i=[t[0].scrollWidth,Math.max.apply(Math,t.children().map((function(){return e(this).outerWidth(!0)})).get())],n=t.parent().width();return i[0]>n?i[0]:i[1]>n?i[1]:"100%"},I=function(){var t=e(this).data(n),i=t.opt,s=e("#mCSB_"+t.idx+"_container");if(i.advanced.autoExpandHorizontalScroll&&"y"!==i.axis){s.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(s[0].scrollWidth);3===i.advanced.autoExpandHorizontalScroll||2!==i.advanced.autoExpandHorizontalScroll&&r>s.parent().width()?s.css({width:r,"min-width":"100%","overflow-x":"inherit"}):s.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({
/* set actual width, original position and un-wrap */
/* 
            get the exact width (with decimals) and then round-up. 
            Using jquery outerWidth() will round the width value which will mess up with inner elements that have non-integer width
            */
width:Math.ceil(s[0].getBoundingClientRect().right+.4)-Math.floor(s[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},v=function(){var t=e(this).data(n),i=t.opt,s=e(".mCSB_"+t.idx+"_scrollbar:first"),r=ie(i.scrollButtons.tabindex)?"tabindex='"+i.scrollButtons.tabindex+"'":"",a=["<a href='#' class='"+c[13]+"' "+r+" />","<a href='#' class='"+c[14]+"' "+r+" />","<a href='#' class='"+c[15]+"' "+r+" />","<a href='#' class='"+c[16]+"' "+r+" />"],o=["x"===i.axis?a[2]:a[0],"x"===i.axis?a[3]:a[1],a[2],a[3]];i.scrollButtons.enable&&s.prepend(o[0]).append(o[1]).next(".mCSB_scrollTools").prepend(o[2]).append(o[3])},B=function(){var t=e(this).data(n),i=e("#mCSB_"+t.idx),s=e("#mCSB_"+t.idx+"_container"),r=[e("#mCSB_"+t.idx+"_dragger_vertical"),e("#mCSB_"+t.idx+"_dragger_horizontal")],a=[i.height()/s.outerHeight(!1),i.width()/s.outerWidth(!1)],o=[parseInt(r[0].css("min-height")),Math.round(a[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(a[1]*r[1].parent().width())],A=l&&o[1]<o[0]?o[0]:o[1],c=l&&o[3]<o[2]?o[2]:o[3];r[0].css({height:A,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":o[0]+"px"}),r[1].css({width:c,"max-width":r[1].parent().width()-10})},y=function(){var t=e(this).data(n),i=e("#mCSB_"+t.idx),s=e("#mCSB_"+t.idx+"_container"),r=[e("#mCSB_"+t.idx+"_dragger_vertical"),e("#mCSB_"+t.idx+"_dragger_horizontal")],a=[s.outerHeight(!1)-i.height(),s.outerWidth(!1)-i.width()],o=[a[0]/(r[0].parent().height()-r[0].height()),a[1]/(r[1].parent().width()-r[1].width())];t.scrollRatio={y:o[0],x:o[1]}},b=function(e,t,i){var n=i?c[0]+"_expanded":"",s=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(c[0]+" "+n),s.toggleClass(c[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(c[0]),s.removeClass(c[1])):(e.addClass(c[0]),s.addClass(c[1])))},E=function(){var t=e(this).data(n),i=e("#mCSB_"+t.idx),s=e("#mCSB_"+t.idx+"_container"),r=null==t.overflowed?s.height():s.outerHeight(!1),a=null==t.overflowed?s.width():s.outerWidth(!1),o=s[0].scrollHeight,l=s[0].scrollWidth;return o>r&&(r=o),l>a&&(a=l),[r>i.height(),a>i.width()]},w=function(){var t=e(this),i=t.data(n),s=i.opt,r=e("#mCSB_"+i.idx),a=e("#mCSB_"+i.idx+"_container"),o=[e("#mCSB_"+i.idx+"_dragger_vertical"),e("#mCSB_"+i.idx+"_dragger_horizontal")];if(j(t),("x"!==s.axis&&!i.overflowed[0]||"y"===s.axis&&i.overflowed[0])&&(o[0].add(a).css("top",0),J(t,"_resetY")),"y"!==s.axis&&!i.overflowed[1]||"x"===s.axis&&i.overflowed[1]){var l=dx=0;"rtl"===i.langDir&&(l=r.width()-a.outerWidth(!1),dx=Math.abs(l/i.scrollRatio.x)),a.css("left",l),o[1].css("left",dx),J(t,"_resetX")}},Q=function(){var t=e(this),i=t.data(n),s=i.opt;if(!i.bindEvents){if(k.call(this),s.contentTouchScroll&&D.call(this),F.call(this),s.mouseWheel.enable){let i=function(){r=setTimeout((function(){e.event.special.mousewheel?(clearTimeout(r),T.call(t[0])):i()}),100)};var r;i()}U.call(this),P.call(this),s.advanced.autoScrollOnFocus&&H.call(this),s.scrollButtons.enable&&O.call(this),s.keyboard.enable&&G.call(this),i.bindEvents=!0}},_=function(){var t=e(this),i=t.data(n),s=i.opt,r=n+"_"+i.idx,a=".mCSB_"+i.idx+"_scrollbar",o=e("#mCSB_"+i.idx+",#mCSB_"+i.idx+"_container,#mCSB_"+i.idx+"_container_wrapper,"+a+" ."+c[12]+",#mCSB_"+i.idx+"_dragger_vertical,#mCSB_"+i.idx+"_dragger_horizontal,"+a+">a"),l=e("#mCSB_"+i.idx+"_container");s.advanced.releaseDraggableSelectors&&o.add(e(s.advanced.releaseDraggableSelectors)),s.advanced.extraDraggableSelectors&&o.add(e(s.advanced.extraDraggableSelectors)),i.bindEvents&&(e(document).add(e(!R()||top.document)).unbind("."+r),o.each((function(){e(this).unbind("."+r)})),clearTimeout(t[0]._focusTimeout),Z(t[0],"_focusTimeout"),clearTimeout(i.sequential.step),Z(i.sequential,"step"),clearTimeout(l[0].onCompleteTimeout),Z(l[0],"onCompleteTimeout"),i.bindEvents=!1)},S=function(t){var i=e(this),s=i.data(n),r=s.opt,a=e("#mCSB_"+s.idx+"_container_wrapper"),o=a.length?a:e("#mCSB_"+s.idx+"_container"),l=[e("#mCSB_"+s.idx+"_scrollbar_vertical"),e("#mCSB_"+s.idx+"_scrollbar_horizontal")],A=[l[0].find(".mCSB_dragger"),l[1].find(".mCSB_dragger")];"x"!==r.axis&&(s.overflowed[0]&&!t?(l[0].add(A[0]).add(l[0].children("a")).css("display","block"),o.removeClass(c[8]+" "+c[10])):(r.alwaysShowScrollbar?(2!==r.alwaysShowScrollbar&&A[0].css("display","none"),o.removeClass(c[10])):(l[0].css("display","none"),o.addClass(c[10])),o.addClass(c[8]))),"y"!==r.axis&&(s.overflowed[1]&&!t?(l[1].add(A[1]).add(l[1].children("a")).css("display","block"),o.removeClass(c[9]+" "+c[11])):(r.alwaysShowScrollbar?(2!==r.alwaysShowScrollbar&&A[1].css("display","none"),o.removeClass(c[11])):(l[1].css("display","none"),o.addClass(c[11])),o.addClass(c[9]))),s.overflowed[0]||s.overflowed[1]?i.removeClass(c[5]):i.addClass(c[5])},x=function(t){var i=t.type,n=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,s=R()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(i){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return n?[t.originalEvent.pageY-n[0]+s[0],t.originalEvent.pageX-n[1]+s[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var r=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],a=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[r.screenY,r.screenX,a>1]:[r.pageY,r.pageX,a>1];default:return n?[t.pageY-n[0]+s[0],t.pageX-n[1]+s[1],!1]:[t.pageY,t.pageX,!1]}},k=function(){var t,i,s,r=e(this),a=r.data(n),o=a.opt,c=n+"_"+a.idx,u=["mCSB_"+a.idx+"_dragger_vertical","mCSB_"+a.idx+"_dragger_horizontal"],h=e("#mCSB_"+a.idx+"_container"),d=e("#"+u[0]+",#"+u[1]),g=o.advanced.releaseDraggableSelectors?d.add(e(o.advanced.releaseDraggableSelectors)):d,p=o.advanced.extraDraggableSelectors?e(!R()||top.document).add(e(o.advanced.extraDraggableSelectors)):e(!R()||top.document);function f(e,i,n,s){if(h[0].idleTimer=o.scrollInertia<233?250:0,t.attr("id")===u[1])var l="x",A=(t[0].offsetLeft-i+s)*a.scrollRatio.x;else l="y",A=(t[0].offsetTop-e+n)*a.scrollRatio.y;J(r,A.toString(),{dir:l,drag:!0})}p&&1==p[0]&&(p=e(null)),d.bind("contextmenu."+c,(function(e){e.preventDefault()})).bind("mousedown."+c+" touchstart."+c+" pointerdown."+c+" MSPointerDown."+c,(function(n){if(n.stopImmediatePropagation(),n.preventDefault(),ee(n)){A=!0,l&&(document.onselectstart=function(){return!1}),N.call(h,!1),j(r);var a=(t=e(this)).offset(),c=x(n)[0]-a.top,u=x(n)[1]-a.left,d=t.height()+a.top,g=t.width()+a.left;c<d&&c>0&&u<g&&u>0&&(i=c,s=u),b(t,"active",o.autoExpandScrollbar)}})).bind("touchmove."+c,(function(e){e.stopImmediatePropagation(),e.preventDefault();var n=t.offset(),r=x(e)[0]-n.top,a=x(e)[1]-n.left;f(i,s,r,a)})),e(document).add(p).bind("mousemove."+c+" pointermove."+c+" MSPointerMove."+c,(function(e){if(t){var n=t.offset(),r=x(e)[0]-n.top,a=x(e)[1]-n.left;if(i===r&&s===a)return;f(i,s,r,a)}})).add(g).bind("mouseup."+c+" touchend."+c+" pointerup."+c+" MSPointerUp."+c,(function(e){t&&(b(t,"active",o.autoExpandScrollbar),t=null),A=!1,l&&(document.onselectstart=null),N.call(h,!0)}))},D=function(){var i,s,r,a,o,l,c,u,h,d,g,p,f,m,C=e(this),I=C.data(n),v=I.opt,B=n+"_"+I.idx,y=e("#mCSB_"+I.idx),b=e("#mCSB_"+I.idx+"_container"),E=[e("#mCSB_"+I.idx+"_dragger_vertical"),e("#mCSB_"+I.idx+"_dragger_horizontal")],w=[],Q=[],_=0,S="yx"===v.axis?"none":"all",k=[],D=b.find("iframe"),F=["touchstart."+B+" pointerdown."+B+" MSPointerDown."+B,
//start
"touchmove."+B+" pointermove."+B+" MSPointerMove."+B,
//move
"touchend."+B+" pointerup."+B+" MSPointerUp."+B],T=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;function M(e){if(!te(e)||A||x(e)[2])t=0;else{t=1,f=0,m=0,i=1,C.removeClass("mCS_touch_action");var n=b.offset();s=x(e)[0]-n.top,r=x(e)[1]-n.left,k=[x(e)[0],x(e)[1]]}}function N(e){if(te(e)&&!A&&!x(e)[2]&&(v.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!m||f)&&i)){c=X();var t=y.offset(),n=x(e)[0]-t.top,a=x(e)[1]-t.left,o="mcsLinearOut";if(w.push(n),Q.push(a),k[2]=Math.abs(x(e)[0]-k[0]),k[3]=Math.abs(x(e)[1]-k[1]),I.overflowed[0])var l=E[0].parent().height()-E[0].height(),u=s-n>0&&n-s>-l*I.scrollRatio.y&&(2*k[3]<k[2]||"yx"===v.axis);if(I.overflowed[1])var h=E[1].parent().width()-E[1].width(),d=r-a>0&&a-r>-h*I.scrollRatio.x&&(2*k[2]<k[3]||"yx"===v.axis);u||d?(T||e.preventDefault(),f=1):(m=1,C.addClass("mCS_touch_action")),T&&e.preventDefault(),g="yx"===v.axis?[s-n,r-a]:"x"===v.axis?[null,r-a]:[s-n,null],b[0].idleTimer=250,I.overflowed[0]&&P(g[0],_,o,"y","all",!0),I.overflowed[1]&&P(g[1],_,o,"x",S,!0)}}function L(e){if(!te(e)||A||x(e)[2])t=0;else{t=1,e.stopImmediatePropagation(),j(C),l=X();var i=y.offset();a=x(e)[0]-i.top,o=x(e)[1]-i.left,w=[],Q=[]}}function U(e){if(te(e)&&!A&&!x(e)[2]){i=0,e.stopImmediatePropagation(),f=0,m=0,u=X();var t=y.offset(),n=x(e)[0]-t.top,s=x(e)[1]-t.left;if(!(u-c>30)){var r="mcsEaseOut",C=(d=1e3/(u-l))<2.5,B=C?[w[w.length-2],Q[Q.length-2]]:[0,0];h=C?[n-B[0],s-B[1]]:[n-a,s-o];var E=[Math.abs(h[0]),Math.abs(h[1])];d=C?[Math.abs(h[0]/4),Math.abs(h[1]/4)]:[d,d];var _=[Math.abs(b[0].offsetTop)-h[0]*H(E[0]/d[0],d[0]),Math.abs(b[0].offsetLeft)-h[1]*H(E[1]/d[1],d[1])];g="yx"===v.axis?[_[0],_[1]]:"x"===v.axis?[null,_[1]]:[_[0],null],p=[4*E[0]+v.scrollInertia,4*E[1]+v.scrollInertia];var k=parseInt(v.contentTouchScroll)||0;g[0]=E[0]>k?g[0]:0,g[1]=E[1]>k?g[1]:0,I.overflowed[0]&&P(g[0],p[0],r,"y",S,!1),I.overflowed[1]&&P(g[1],p[1],r,"x",S,!1)}}}function H(e,t){var i=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?i[0]:i[3]:e>60?t>3?i[3]:i[2]:e>30?t>8?i[1]:t>6?i[0]:t>4?t:i[2]:t>8?t:i[3]}function P(e,t,i,n,s,r){e&&J(C,e.toString(),{dur:t,scrollEasing:i,dir:n,overwrite:s,drag:r})}b.bind(F[0],(function(e){M(e)})).bind(F[1],(function(e){N(e)})),y.bind(F[0],(function(e){L(e)})).bind(F[2],(function(e){U(e)})),D.length&&D.each((function(){e(this).bind("load",(function(){R(this)&&e(this.contentDocument||this.contentWindow.document).bind(F[0],(function(e){M(e),L(e)})).bind(F[1],(function(e){N(e)})).bind(F[2],(function(e){U(e)}))}))}))},F=function(){var i,s=e(this),r=s.data(n),a=r.opt,o=r.sequential,l=n+"_"+r.idx,c=e("#mCSB_"+r.idx+"_container"),u=c.parent();function h(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function d(e,t,n){o.type=n&&i?"stepped":"stepless",o.scrollAmount=10,K(s,e,t,"mcsLinearOut",n?60:null)}c.bind("mousedown."+l,(function(e){t||i||(i=1,A=!0)})).add(document).bind("mousemove."+l,(function(e){if(!t&&i&&h()){var n=c.offset(),s=x(e)[0]-n.top+c[0].offsetTop,l=x(e)[1]-n.left+c[0].offsetLeft;s>0&&s<u.height()&&l>0&&l<u.width()?o.step&&d("off",null,"stepped"):("x"!==a.axis&&r.overflowed[0]&&(s<0?d("on",38):s>u.height()&&d("on",40)),"y"!==a.axis&&r.overflowed[1]&&(l<0?d("on",37):l>u.width()&&d("on",39)))}})).bind("mouseup."+l+" dragend."+l,(function(e){t||(i&&(i=0,d("off",null)),A=!1)}))},T=function(){if(e(this).data(n)){var t=e(this),i=t.data(n),s=i.opt,r=n+"_"+i.idx,a=e("#mCSB_"+i.idx),o=[e("#mCSB_"+i.idx+"_dragger_vertical"),e("#mCSB_"+i.idx+"_dragger_horizontal")],A=e("#mCSB_"+i.idx+"_container").find("iframe");A.length&&A.each((function(){e(this).bind("load",(function(){R(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,(function(e,t){c(e,t)}))}))})),a.bind("mousewheel."+r,(function(e,t){c(e,t)}))}function c(n,r){if(j(t),!L(t,n.target)){var A="auto"!==s.mouseWheel.deltaFactor?parseInt(s.mouseWheel.deltaFactor):l&&n.deltaFactor<100?100:n.deltaFactor||100,c=s.scrollInertia;if("x"===s.axis||"x"===s.mouseWheel.axis)var u="x",h=[Math.round(A*i.scrollRatio.x),parseInt(s.mouseWheel.scrollAmount)],d="auto"!==s.mouseWheel.scrollAmount?h[1]:h[0]>=a.width()?.9*a.width():h[0],g=Math.abs(e("#mCSB_"+i.idx+"_container")[0].offsetLeft),p=o[1][0].offsetLeft,f=o[1].parent().width()-o[1].width(),m="y"===s.mouseWheel.axis?n.deltaY||r:n.deltaX;else u="y",h=[Math.round(A*i.scrollRatio.y),parseInt(s.mouseWheel.scrollAmount)],d="auto"!==s.mouseWheel.scrollAmount?h[1]:h[0]>=a.height()?.9*a.height():h[0],g=Math.abs(e("#mCSB_"+i.idx+"_container")[0].offsetTop),p=o[0][0].offsetTop,f=o[0].parent().height()-o[0].height(),m=n.deltaY||r;"y"===u&&!i.overflowed[0]||"x"===u&&!i.overflowed[1]||((s.mouseWheel.invert||n.webkitDirectionInvertedFromDevice)&&(m=-m),s.mouseWheel.normalizeDelta&&(m=m<0?-1:1),(m>0&&0!==p||m<0&&p!==f||s.mouseWheel.preventDefault)&&(n.stopImmediatePropagation(),n.preventDefault()),n.deltaFactor<5&&!s.mouseWheel.normalizeDelta&&(d=n.deltaFactor,c=17),J(t,(g-m*d).toString(),{dir:u,dur:c}))}}},M=new Object,R=function(t){var i=!1,n=!1,s=null;if(void 0===t?n="#empty":void 0!==e(t).attr("id")&&(n=e(t).attr("id")),!1!==n&&void 0!==M[n])return M[n];if(t){try{s=(t.contentDocument||t.contentWindow.document).body.innerHTML}catch(r){}i=null!==s}else{try{s=top.document.body.innerHTML}catch(r){}i=null!==s}return!1!==n&&(M[n]=i),i},N=function(e){var t=this.find("iframe");if(t.length){var i=e?"auto":"none";t.css("pointer-events",i)}},L=function(t,i){var s=i.nodeName.toLowerCase(),r=t.data(n).opt.mouseWheel.disableOver,a=["select","textarea"];return e.inArray(s,r)>-1&&!(e.inArray(s,a)>-1&&!e(i).is(":focus"))},U=function(){var t,i=e(this),s=i.data(n),r=n+"_"+s.idx,a=e("#mCSB_"+s.idx+"_container"),o=a.parent();e(".mCSB_"+s.idx+"_scrollbar ."+c[12]).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r,(function(i){A=!0,e(i.target).hasClass("mCSB_dragger")||(t=1)})).bind("touchend."+r+" pointerup."+r+" MSPointerUp."+r,(function(e){A=!1})).bind("click."+r,(function(n){if(t&&(t=0,e(n.target).hasClass(c[12])||e(n.target).hasClass("mCSB_draggerRail"))){j(i);var r=e(this),l=r.find(".mCSB_dragger");if(r.parent(".mCSB_scrollTools_horizontal").length>0){if(!s.overflowed[1])return;var A="x",u=n.pageX>l.offset().left?-1:1,h=Math.abs(a[0].offsetLeft)-u*(.9*o.width())}else{if(!s.overflowed[0])return;A="y",u=n.pageY>l.offset().top?-1:1,h=Math.abs(a[0].offsetTop)-u*(.9*o.height())}J(i,h.toString(),{dir:A,scrollEasing:"mcsEaseInOut"})}}))},H=function(){var t=e(this),i=t.data(n),s=i.opt,r=n+"_"+i.idx,a=e("#mCSB_"+i.idx+"_container"),o=a.parent();a.bind("focusin."+r,(function(i){var n=e(document.activeElement),r=a.find(".mCustomScrollBox").length,l=0;n.is(s.advanced.autoScrollOnFocus)&&(j(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=r?(l+17)*r:0,t[0]._focusTimeout=setTimeout((function(){var e=[ne(n)[0],ne(n)[1]],i=[a[0].offsetTop,a[0].offsetLeft],r=[i[0]+e[0]>=0&&i[0]+e[0]<o.height()-n.outerHeight(!1),i[1]+e[1]>=0&&i[0]+e[1]<o.width()-n.outerWidth(!1)],A="yx"!==s.axis||r[0]||r[1]?"all":"none";"x"===s.axis||r[0]||J(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:A,dur:l}),"y"===s.axis||r[1]||J(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:A,dur:l})}),t[0]._focusTimer))}))},P=function(){var t=e(this).data(n),i=n+"_"+t.idx,s=e("#mCSB_"+t.idx+"_container").parent();s.bind("scroll."+i,(function(i){0===s.scrollTop()&&0===s.scrollLeft()||e(".mCSB_"+t.idx+"_scrollbar").css("visibility","hidden")}))},O=function(){var t=e(this),i=t.data(n),s=i.opt,r=i.sequential,a=n+"_"+i.idx,o=".mCSB_"+i.idx+"_scrollbar";e(o+">a").bind("contextmenu."+a,(function(e){e.preventDefault()})).bind("mousedown."+a+" touchstart."+a+" pointerdown."+a+" MSPointerDown."+a+" mouseup."+a+" touchend."+a+" pointerup."+a+" MSPointerUp."+a+" mouseout."+a+" pointerout."+a+" MSPointerOut."+a+" click."+a,(function(n){if(n.preventDefault(),ee(n)){var a=e(this).attr("class");switch(r.type=s.scrollButtons.scrollType,n.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===r.type)return;A=!0,i.tweenRunning=!1,o("on",a);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===r.type)return;A=!1,r.dir&&o("off",a);break;case"click":if("stepped"!==r.type||i.tweenRunning)return;o("on",a)}}function o(e,i){r.scrollAmount=s.scrollButtons.scrollAmount,K(t,e,i)}}))},G=function(){var t=e(this),i=t.data(n),s=i.opt,r=i.sequential,a=n+"_"+i.idx,o=e("#mCSB_"+i.idx),l=e("#mCSB_"+i.idx+"_container"),A=l.parent(),c="input,textarea,select,datalist,keygen,[contenteditable='true']",u=l.find("iframe"),h=["blur."+a+" keydown."+a+" keyup."+a];function d(n){switch(n.type){case"blur":i.tweenRunning&&r.dir&&g("off",null);break;case"keydown":case"keyup":var a=n.keyCode?n.keyCode:n.which,o="on";if("x"!==s.axis&&(38===a||40===a)||"y"!==s.axis&&(37===a||39===a)){if((38===a||40===a)&&!i.overflowed[0]||(37===a||39===a)&&!i.overflowed[1])return;"keyup"===n.type&&(o="off"),e(document.activeElement).is(c)||(n.preventDefault(),n.stopImmediatePropagation(),g(o,a))}else if(33===a||34===a){if((i.overflowed[0]||i.overflowed[1])&&(n.preventDefault(),n.stopImmediatePropagation()),"keyup"===n.type){j(t);var u=34===a?-1:1;if("x"===s.axis||"yx"===s.axis&&i.overflowed[1]&&!i.overflowed[0])var h="x",d=Math.abs(l[0].offsetLeft)-u*(.9*A.width());else h="y",d=Math.abs(l[0].offsetTop)-u*(.9*A.height());J(t,d.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else 35!==a&&36!==a||e(document.activeElement).is(c)||((i.overflowed[0]||i.overflowed[1])&&(n.preventDefault(),n.stopImmediatePropagation()),"keyup"!==n.type)||("x"===s.axis||"yx"===s.axis&&i.overflowed[1]&&!i.overflowed[0]?(h="x",d=35===a?Math.abs(A.width()-l.outerWidth(!1)):0):(h="y",d=35===a?Math.abs(A.height()-l.outerHeight(!1)):0),J(t,d.toString(),{dir:h,scrollEasing:"mcsEaseInOut"}))}function g(e,n){r.type=s.keyboard.scrollType,r.scrollAmount=s.keyboard.scrollAmount,"stepped"===r.type&&i.tweenRunning||K(t,e,n)}}u.length&&u.each((function(){e(this).bind("load",(function(){R(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],(function(e){d(e)}))}))})),o.attr("tabindex","0").bind(h[0],(function(e){d(e)}))},K=function(t,i,s,r,a){var o=t.data(n),l=o.opt,A=o.sequential,u=e("#mCSB_"+o.idx+"_container"),h="stepped"===A.type,d=l.scrollInertia<26?26:l.scrollInertia,g=l.scrollInertia<1?17:l.scrollInertia;switch(i){case"on":if(A.dir=[s===c[16]||s===c[15]||39===s||37===s?"x":"y",s===c[13]||s===c[15]||38===s||37===s?-1:1],j(t),ie(s)&&"stepped"===A.type)return;p(h);break;case"off":f(),(h||o.tweenRunning&&A.dir)&&p(!0)}function p(e){l.snapAmount&&(A.scrollAmount=l.snapAmount instanceof Array?"x"===A.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var i="stepped"!==A.type,n=a||(e?i?d/1.5:g:1e3/60),s=e?i?7.5:40:2.5,c=[Math.abs(u[0].offsetTop),Math.abs(u[0].offsetLeft)],h=[o.scrollRatio.y>10?10:o.scrollRatio.y,o.scrollRatio.x>10?10:o.scrollRatio.x],f="x"===A.dir[0]?c[1]+A.dir[1]*(h[1]*s):c[0]+A.dir[1]*(h[0]*s),m="x"===A.dir[0]?c[1]+A.dir[1]*parseInt(A.scrollAmount):c[0]+A.dir[1]*parseInt(A.scrollAmount),C="auto"!==A.scrollAmount?m:f,I=r||(e?i?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),v=!!e;e&&n<17&&(C="x"===A.dir[0]?c[1]:c[0]),J(t,C.toString(),{dir:A.dir[0],scrollEasing:I,dur:n,onComplete:v}),e?A.dir=!1:(clearTimeout(A.step),A.step=setTimeout((function(){p()}),n))}function f(){clearTimeout(A.step),Z(A,"step"),j(t)}},q=function(t){var i=e(this).data(n).opt,s=[];return"function"==typeof t&&(t=t()),t instanceof Array?s=t.length>1?[t[0],t[1]]:"x"===i.axis?[null,t[0]]:[t[0],null]:(s[0]=t.y?t.y:t.x||"x"===i.axis?null:t,s[1]=t.x?t.x:t.y||"y"===i.axis?null:t),"function"==typeof s[0]&&(s[0]=s[0]()),"function"==typeof s[1]&&(s[1]=s[1]()),s},Y=function(t,i){if(null!=t&&void 0!==t){var s=e(this),r=s.data(n),a=r.opt,o=e("#mCSB_"+r.idx+"_container"),l=o.parent(),A=typeof t;i||(i="x"===a.axis?"x":"y");var c="x"===i?o.outerWidth(!1)-l.width():o.outerHeight(!1)-l.height(),h="x"===i?o[0].offsetLeft:o[0].offsetTop,d="x"===i?"left":"top";switch(A){case"function":return t();case"object":if(!(p=t.jquery?t:e(t)).length)return;return"x"===i?ne(p)[1]:ne(p)[0];case"string":case"number":if(ie(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(c*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(h-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var g=h+parseInt(t.split("+=")[1]);return g>=0?0:Math.abs(g)}if(-1!==t.indexOf("px")&&ie(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(l.height()-o.outerHeight(!1));if("right"===t)return Math.abs(l.width()-o.outerWidth(!1));if("first"===t||"last"===t){var p=o.find(":"+t);return"x"===i?ne(p)[1]:ne(p)[0]}return e(t).length?"x"===i?ne(e(t))[1]:ne(e(t))[0]:(o.css(d,t),void u.update.call(null,s[0]))}}},V=function(t){var i=e(this),s=i.data(n),r=s.opt,a=e("#mCSB_"+s.idx+"_container");if(t)return clearTimeout(a[0].autoUpdate),void Z(a[0],"autoUpdate");function o(){clearTimeout(a[0].autoUpdate),0!==i.parents("html").length?a[0].autoUpdate=setTimeout((function(){return r.advanced.updateOnSelectorChange&&(s.poll.change.n=A(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void h(3)):r.advanced.updateOnContentResize&&(s.poll.size.n=i[0].scrollHeight+i[0].scrollWidth+a[0].offsetHeight+i[0].offsetHeight+i[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void h(1)):!r.advanced.updateOnImageLoad||"auto"===r.advanced.updateOnImageLoad&&"y"===r.axis||(s.poll.img.n=a.find("img").length,s.poll.img.n===s.poll.img.o)?void((r.advanced.updateOnSelectorChange||r.advanced.updateOnContentResize||r.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void a.find("img").each((function(){l(this)})))}),r.advanced.autoUpdateTimeout):i=null}function l(t){if(e(t).hasClass(c[2]))h();else{var i=new Image;i.onload=n(i,s),i.src=t.src}function n(e,t){return function(){return t.apply(e,arguments)}}function s(){this.onload=null,e(t).addClass(c[2]),h(2)}}function A(){!0===r.advanced.updateOnSelectorChange&&(r.advanced.updateOnSelectorChange="*");var e=0,t=a.find(r.advanced.updateOnSelectorChange);return r.advanced.updateOnSelectorChange&&t.length>0&&t.each((function(){e+=this.offsetHeight+this.offsetWidth})),e}function h(e){clearTimeout(a[0].autoUpdate),u.update.call(null,i[0],e)}o()},W=function(e,t,i){return Math.round(e/t)*t-i},j=function(t){var i=t.data(n);e("#mCSB_"+i.idx+"_container,#mCSB_"+i.idx+"_container_wrapper,#mCSB_"+i.idx+"_dragger_vertical,#mCSB_"+i.idx+"_dragger_horizontal").each((function(){$.call(this)}))},J=function(t,i,s){var r=t.data(n),a=r.opt,o={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:a.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},l=[(s=e.extend(o,s)).dur,s.drag?0:s.dur],A=e("#mCSB_"+r.idx),c=e("#mCSB_"+r.idx+"_container"),u=c.parent(),h=a.callbacks.onTotalScrollOffset?q.call(t,a.callbacks.onTotalScrollOffset):[0,0],d=a.callbacks.onTotalScrollBackOffset?q.call(t,a.callbacks.onTotalScrollBackOffset):[0,0];if(r.trigger=s.trigger,0===u.scrollTop()&&0===u.scrollLeft()||(e(".mCSB_"+r.idx+"_scrollbar").css("visibility","visible"),u.scrollTop(0).scrollLeft(0)),"_resetY"!==i||r.contentReset.y||(w("onOverflowYNone")&&a.callbacks.onOverflowYNone.call(t[0]),r.contentReset.y=1),"_resetX"!==i||r.contentReset.x||(w("onOverflowXNone")&&a.callbacks.onOverflowXNone.call(t[0]),r.contentReset.x=1),"_resetY"!==i&&"_resetX"!==i){if(!r.contentReset.y&&t[0].mcs||!r.overflowed[0]||(w("onOverflowY")&&a.callbacks.onOverflowY.call(t[0]),r.contentReset.x=null),!r.contentReset.x&&t[0].mcs||!r.overflowed[1]||(w("onOverflowX")&&a.callbacks.onOverflowX.call(t[0]),r.contentReset.x=null),a.snapAmount){var g=a.snapAmount instanceof Array?"x"===s.dir?a.snapAmount[1]:a.snapAmount[0]:a.snapAmount;i=W(i,g,a.snapOffset)}switch(s.dir){case"x":var p=e("#mCSB_"+r.idx+"_dragger_horizontal"),f="left",m=c[0].offsetLeft,C=[A.width()-c.outerWidth(!1),p.parent().width()-p.width()],I=[i,0===i?0:i/r.scrollRatio.x],v=h[1],B=d[1],y=v>0?v/r.scrollRatio.x:0,E=B>0?B/r.scrollRatio.x:0;break;case"y":p=e("#mCSB_"+r.idx+"_dragger_vertical"),f="top",m=c[0].offsetTop,C=[A.height()-c.outerHeight(!1),p.parent().height()-p.height()],I=[i,0===i?0:i/r.scrollRatio.y],v=h[0],B=d[0],y=v>0?v/r.scrollRatio.y:0,E=B>0?B/r.scrollRatio.y:0}I[1]<0||0===I[0]&&0===I[1]?I=[0,0]:I[1]>=C[1]?I=[C[0],C[1]]:I[0]=-I[0],t[0].mcs||(_(),w("onInit")&&a.callbacks.onInit.call(t[0])),clearTimeout(c[0].onCompleteTimeout),z(p[0],f,Math.round(I[1]),l[1],s.scrollEasing),!r.tweenRunning&&(0===m&&I[0]>=0||m===C[0]&&I[0]<=C[0])||z(c[0],f,Math.round(I[0]),l[0],s.scrollEasing,s.overwrite,{onStart:function(){s.callbacks&&s.onStart&&!r.tweenRunning&&(w("onScrollStart")&&(_(),a.callbacks.onScrollStart.call(t[0])),r.tweenRunning=!0,b(p),r.cbOffsets=Q())},onUpdate:function(){s.callbacks&&s.onUpdate&&w("whileScrolling")&&(_(),a.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(s.callbacks&&s.onComplete){"yx"===a.axis&&clearTimeout(c[0].onCompleteTimeout);var e=c[0].idleTimer||0;c[0].onCompleteTimeout=setTimeout((function(){w("onScroll")&&(_(),a.callbacks.onScroll.call(t[0])),w("onTotalScroll")&&I[1]>=C[1]-y&&r.cbOffsets[0]&&(_(),a.callbacks.onTotalScroll.call(t[0])),w("onTotalScrollBack")&&I[1]<=E&&r.cbOffsets[1]&&(_(),a.callbacks.onTotalScrollBack.call(t[0])),r.tweenRunning=!1,c[0].idleTimer=0,b(p,"hide")}),e)}}})}function w(e){return r&&a.callbacks[e]&&"function"==typeof a.callbacks[e]}function Q(){return[a.callbacks.alwaysTriggerOffsets||m>=C[0]+v,a.callbacks.alwaysTriggerOffsets||m<=-B]}function _(){var e=[c[0].offsetTop,c[0].offsetLeft],i=[p[0].offsetTop,p[0].offsetLeft],n=[c.outerHeight(!1),c.outerWidth(!1)],r=[A.height(),A.width()];t[0].mcs={content:c,
/* original content wrapper as jquery object */
top:e[0],left:e[1],draggerTop:i[0],draggerLeft:i[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(n[0])-r[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(n[1])-r[1])),direction:s.dir}}},z=function(e,t,i,n,s,r,a){e._mTween||(e._mTween={top:{},left:{}});var o,l,A=(a=a||{}).onStart||function(){},c=a.onUpdate||function(){},u=a.onComplete||function(){},h=X(),d=0,g=e.offsetTop,p=e.style,f=e._mTween[t];"left"===t&&(g=e.offsetLeft);var m=i-g;function C(){f.stop||(d||A.call(),d=X()-h,I(),d>=f.time&&(f.time=d>f.time?d+o-(d-f.time):d+o-1,f.time<d+1&&(f.time=d+1)),f.time<n?f.id=l(C):u.call())}function I(){n>0?(f.currVal=y(f.time,g,m,n,s),p[t]=Math.round(f.currVal)+"px"):p[t]=i+"px",c.call()}function v(){o=1e3/60,f.time=d+o,l=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return I(),setTimeout(e,.01)},f.id=l(C)}function B(){null!=f.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(f.id):clearTimeout(f.id),f.id=null)}function y(e,t,i,n,s){switch(s){case"linear":case"mcsLinear":return i*e/n+t;case"mcsLinearOut":return e/=n,e--,i*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return(e/=n/2)<1?i/2*e*e+t:-i/2*(--e*(e-2)-1)+t;case"easeInOutStrong":return(e/=n/2)<1?i/2*Math.pow(2,10*(e-1))+t:(e--,i/2*(2-Math.pow(2,-10*e))+t);case"easeInOut":case"mcsEaseInOut":return(e/=n/2)<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t;case"easeOutSmooth":return e/=n,-i*(--e*e*e*e-1)+t;case"easeOutStrong":return i*(1-Math.pow(2,-10*e/n))+t;default:var r=(e/=n)*e,a=r*e;return t+i*(.499999999999997*a*r+-2.5*r*r+5.5*a+-6.5*r+4*e)}}f.stop=0,"none"!==r&&B(),v()},X=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},$=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],i=0;i<t.length;i++){var n=t[i];e._mTween[n].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[n].id):clearTimeout(e._mTween[n].id),e._mTween[n].id=null,e._mTween[n].stop=1)}},Z=function(e,t){try{delete e[t]}catch(I2){e[t]=null}},ee=function(e){return!(e.which&&1!==e.which)},te=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},ie=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ne=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},se=function(){var e=t();return!!e&&document[e];function t(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}},e.fn[i]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[i]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[i].defaults=r,window[i]=!0,e(window).bind("load",(function(){e(s)[i](),e.extend(e.expr[":"],{
/* checks if element is within scrollable viewport */
mcsInView:e.expr[":"].mcsInView||function(t){var i,n,s=e(t),r=s.parents(".mCSB_container");if(r.length)return i=r.parent(),(n=[r[0].offsetTop,r[0].offsetLeft])[0]+ne(s)[0]>=0&&n[0]+ne(s)[0]<i.height()-s.outerHeight(!1)&&n[1]+ne(s)[1]>=0&&n[1]+ne(s)[1]<i.width()-s.outerWidth(!1)},
/* checks if element or part of element is in view of scrollable viewport */
mcsInSight:e.expr[":"].mcsInSight||function(t,i,n){var s,r,a,o,l=e(t),A=l.parents(".mCSB_container"),c="exact"===n[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(A.length)return s=[l.outerHeight(!1),l.outerWidth(!1)],a=[A[0].offsetTop+ne(l)[0],A[0].offsetLeft+ne(l)[1]],r=[A.parent()[0].offsetHeight,A.parent()[0].offsetWidth],o=[s[0]<r[0]?c[0]:c[1],s[1]<r[1]?c[0]:c[1]],a[0]-r[0]*o[0][0]<0&&a[0]+s[0]-r[0]*o[0][1]>=0&&a[1]-r[1]*o[1][0]<0&&a[1]+s[1]-r[1]*o[1][1]>=0},
/* checks if element is overflowed having visible scrollbar(s) */
mcsOverflow:e.expr[":"].mcsOverflow||function(t){var i=e(t).data(n);if(i)return i.overflowed[0]||i.overflowed[1]}})}))})),Dnt=void 0,Fnt=function(){var e="1.13.6",t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},i=Array.prototype,n=Object.prototype,s="undefined"!=typeof Symbol?Symbol.prototype:null,r=i.push,a=i.slice,o=n.toString,l=n.hasOwnProperty,A="undefined"!=typeof ArrayBuffer,c="undefined"!=typeof DataView,u=Array.isArray,h=Object.keys,d=Object.create,g=A&&ArrayBuffer.isView,p=isNaN,f=isFinite,m=!{toString:null}.propertyIsEnumerable("toString"),C=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],I=Math.pow(2,53)-1;function v(e,t){return t=null==t?e.length-1:+t,function(){for(var i=Math.max(arguments.length-t,0),n=Array(i),s=0;s<i;s++)n[s]=arguments[s+t];switch(t){case 0:return e.call(this,n);case 1:return e.call(this,arguments[0],n);case 2:return e.call(this,arguments[0],arguments[1],n)}var r=Array(t+1);for(s=0;s<t;s++)r[s]=arguments[s];return r[t]=n,e.apply(this,r)}}function B(e){var t=typeof e;return"function"===t||"object"===t&&!!e}function y(e){return void 0===e}function b(e){return!0===e||!1===e||"[object Boolean]"===o.call(e)}function E(e){var t="[object "+e+"]";return function(e){return o.call(e)===t}}var w=E("String"),Q=E("Number"),_=E("Date"),S=E("RegExp"),x=E("Error"),k=E("Symbol"),D=E("ArrayBuffer"),F=E("Function"),T=t.document&&t.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof T&&(F=function(e){return"function"==typeof e||!1});var M=F,R=E("Object"),N=c&&R(new DataView(new ArrayBuffer(8))),L="undefined"!=typeof Map&&R(new Map),U=E("DataView"),H=N?function(e){return null!=e&&M(e.getInt8)&&D(e.buffer)}:U,P=u||E("Array");function O(e,t){return null!=e&&l.call(e,t)}var G=E("Arguments");!function(){G(arguments)||(G=function(e){return O(e,"callee")})}();var K=G;function q(e){return Q(e)&&p(e)}function Y(e){return function(){return e}}function V(e){return function(t){var i=e(t);return"number"==typeof i&&i>=0&&i<=I}}function W(e){return function(t){return null==t?void 0:t[e]}}var j=W("byteLength"),J=V(j),z=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,X=A?function(e){return g?g(e)&&!H(e):J(e)&&z.test(o.call(e))}:Y(!1),$=W("length");function Z(e,t){t=function(e){for(var t={},i=e.length,n=0;n<i;++n)t[e[n]]=!0;return{contains:function(e){return!0===t[e]},push:function(i){return t[i]=!0,e.push(i)}}}(t);var i=C.length,s=e.constructor,r=M(s)&&s.prototype||n,a="constructor";for(O(e,a)&&!t.contains(a)&&t.push(a);i--;)(a=C[i])in e&&e[a]!==r[a]&&!t.contains(a)&&t.push(a)}function ee(e){if(!B(e))return[];if(h)return h(e);var t=[];for(var i in e)O(e,i)&&t.push(i);return m&&Z(e,t),t}function te(e,t){var i=ee(t),n=i.length;if(null==e)return!n;for(var s=Object(e),r=0;r<n;r++){var a=i[r];if(t[a]!==s[a]||!(a in s))return!1}return!0}function ie(e){return e instanceof ie?e:this instanceof ie?void(this._wrapped=e):new ie(e)}function ne(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,j(e))}ie.VERSION=e,ie.prototype.value=function(){return this._wrapped},ie.prototype.valueOf=ie.prototype.toJSON=ie.prototype.value,ie.prototype.toString=function(){return String(this._wrapped)};var se="[object DataView]";function re(e,t,i,n){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var r=typeof e;return("function"===r||"object"===r||"object"==typeof t)&&function e(t,i,n,r){t instanceof ie&&(t=t._wrapped),i instanceof ie&&(i=i._wrapped);var a=o.call(t);if(a!==o.call(i))return!1;if(N&&"[object Object]"==a&&H(t)){if(!H(i))return!1;a=se}switch(a){case"[object RegExp]":case"[object String]":return""+t==""+i;case"[object Number]":return+t!=+t?+i!=+i:0==+t?1/+t==1/i:+t==+i;case"[object Date]":case"[object Boolean]":return+t==+i;case"[object Symbol]":return s.valueOf.call(t)===s.valueOf.call(i);case"[object ArrayBuffer]":case se:return e(ne(t),ne(i),n,r)}var l="[object Array]"===a;if(!l&&X(t)){if(j(t)!==j(i))return!1;if(t.buffer===i.buffer&&t.byteOffset===i.byteOffset)return!0;l=!0}if(!l){if("object"!=typeof t||"object"!=typeof i)return!1;var A=t.constructor,c=i.constructor;if(A!==c&&!(M(A)&&A instanceof A&&M(c)&&c instanceof c)&&"constructor"in t&&"constructor"in i)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===t)return r[u]===i;if(n.push(t),r.push(i),l){if((u=t.length)!==i.length)return!1;for(;u--;)if(!re(t[u],i[u],n,r))return!1}else{var h,d=ee(t);if(u=d.length,ee(i).length!==u)return!1;for(;u--;)if(!O(i,h=d[u])||!re(t[h],i[h],n,r))return!1}return n.pop(),r.pop(),!0}(e,t,i,n)}function ae(e){if(!B(e))return[];var t=[];for(var i in e)t.push(i);return m&&Z(e,t),t}function oe(e){var t=$(e);return function(i){if(null==i)return!1;var n=ae(i);if($(n))return!1;for(var s=0;s<t;s++)if(!M(i[e[s]]))return!1;return e!==he||!M(i[le])}}var le="forEach",Ae=["clear","delete"],ce=["get","has","set"],ue=Ae.concat(le,ce),he=Ae.concat(ce),de=["add"].concat(Ae,le,"has"),ge=L?oe(ue):E("Map"),pe=L?oe(he):E("WeakMap"),fe=L?oe(de):E("Set"),me=E("WeakSet");function Ce(e){for(var t=ee(e),i=t.length,n=Array(i),s=0;s<i;s++)n[s]=e[t[s]];return n}function Ie(e){for(var t={},i=ee(e),n=0,s=i.length;n<s;n++)t[e[i[n]]]=i[n];return t}function ve(e){var t=[];for(var i in e)M(e[i])&&t.push(i);return t.sort()}function Be(e,t){return function(i){var n=arguments.length;if(t&&(i=Object(i)),n<2||null==i)return i;for(var s=1;s<n;s++)for(var r=arguments[s],a=e(r),o=a.length,l=0;l<o;l++){var A=a[l];t&&void 0!==i[A]||(i[A]=r[A])}return i}}var ye=Be(ae),be=Be(ee),Ee=Be(ae,!0);function we(e){if(!B(e))return{};if(d)return d(e);var t=function(){};t.prototype=e;var i=new t;return t.prototype=null,i}function Qe(e){return P(e)?e:[e]}function _e(e){return ie.toPath(e)}function Se(e,t){for(var i=t.length,n=0;n<i;n++){if(null==e)return;e=e[t[n]]}return i?e:void 0}function xe(e,t,i){var n=Se(e,_e(t));return y(n)?i:n}function ke(e){return e}function De(e){return e=be({},e),function(t){return te(t,e)}}function Fe(e){return e=_e(e),function(t){return Se(t,e)}}function Te(e,t,i){if(void 0===t)return e;switch(null==i?3:i){case 1:return function(i){return e.call(t,i)};case 3:return function(i,n,s){return e.call(t,i,n,s)};case 4:return function(i,n,s,r){return e.call(t,i,n,s,r)}}return function(){return e.apply(t,arguments)}}function Me(e,t,i){return null==e?ke:M(e)?Te(e,t,i):B(e)&&!P(e)?De(e):Fe(e)}function Re(e,t){return Me(e,t,1/0)}function Ne(e,t,i){return ie.iteratee!==Re?ie.iteratee(e,t):Me(e,t,i)}function Le(){}function Ue(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}ie.toPath=Qe,ie.iteratee=Re;var He=Date.now||function(){
return(new Date).getTime()};function Pe(e){var t=function(t){return e[t]},i="(?:"+ee(e).join("|")+")",n=RegExp(i),s=RegExp(i,"g");return function(e){return e=null==e?"":""+e,n.test(e)?e.replace(s,t):e}}var Oe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Ge=Pe(Oe),Ke=Pe(Ie(Oe)),qe=ie.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Ye=/(.)^/,Ve={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},We=/\\|'|\r|\n|\u2028|\u2029/g;function je(e){return"\\"+Ve[e]}var Je=/^\s*(\w|\$)+\s*$/,ze=0;function Xe(e,t,i,n,s){if(!(n instanceof t))return e.apply(i,s);var r=we(e.prototype),a=e.apply(r,s);return B(a)?a:r}var $e=v((function(e,t){var i=$e.placeholder,n=function(){for(var s=0,r=t.length,a=Array(r),o=0;o<r;o++)a[o]=t[o]===i?arguments[s++]:t[o];for(;s<arguments.length;)a.push(arguments[s++]);return Xe(e,n,this,this,a)};return n}));$e.placeholder=ie;var Ze=v((function(e,t,i){if(!M(e))throw new TypeError("Bind must be called on a function");var n=v((function(s){return Xe(e,n,t,this,i.concat(s))}));return n})),et=V($);function tt(e,t,i,n){if(n=n||[],t||0===t){if(t<=0)return n.concat(e)}else t=1/0;for(var s=n.length,r=0,a=$(e);r<a;r++){var o=e[r];if(et(o)&&(P(o)||K(o)))if(t>1)tt(o,t-1,i,n),s=n.length;else for(var l=0,A=o.length;l<A;)n[s++]=o[l++];else i||(n[s++]=o)}return n}var it=v((function(e,t){var i=(t=tt(t,!1,!1)).length;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;){var n=t[i];e[n]=Ze(e[n],e)}return e})),nt=v((function(e,t,i){return setTimeout((function(){return e.apply(null,i)}),t)})),st=$e(nt,ie,1);function rt(e){return function(){return!e.apply(this,arguments)}}function at(e,t){var i;return function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=null),i}}var ot=$e(at,2);function lt(e,t,i){t=Ne(t,i);for(var n,s=ee(e),r=0,a=s.length;r<a;r++)if(t(e[n=s[r]],n,e))return n}function At(e){return function(t,i,n){i=Ne(i,n);for(var s=$(t),r=e>0?0:s-1;r>=0&&r<s;r+=e)if(i(t[r],r,t))return r;return-1}}var ct=At(1),ut=At(-1);function ht(e,t,i,n){for(var s=(i=Ne(i,n,1))(t),r=0,a=$(e);r<a;){var o=Math.floor((r+a)/2);i(e[o])<s?r=o+1:a=o}return r}function dt(e,t,i){return function(n,s,r){var o=0,l=$(n);if("number"==typeof r)e>0?o=r>=0?r:Math.max(r+l,o):l=r>=0?Math.min(r+1,l):r+l+1;else if(i&&r&&l)return n[r=i(n,s)]===s?r:-1;if(s!=s)return(r=t(a.call(n,o,l),q))>=0?r+o:-1;for(r=e>0?o:l-1;r>=0&&r<l;r+=e)if(n[r]===s)return r;return-1}}var gt=dt(1,ct,ht),pt=dt(-1,ut);function ft(e,t,i){var n=(et(e)?ct:lt)(e,t,i);if(void 0!==n&&-1!==n)return e[n]}function mt(e,t,i){var n,s;if(t=Te(t,i),et(e))for(n=0,s=e.length;n<s;n++)t(e[n],n,e);else{var r=ee(e);for(n=0,s=r.length;n<s;n++)t(e[r[n]],r[n],e)}return e}function Ct(e,t,i){t=Ne(t,i);for(var n=!et(e)&&ee(e),s=(n||e).length,r=Array(s),a=0;a<s;a++){var o=n?n[a]:a;r[a]=t(e[o],o,e)}return r}function It(e){return function(t,i,n,s){var r=arguments.length>=3;return function(t,i,n,s){var r=!et(t)&&ee(t),a=(r||t).length,o=e>0?0:a-1;for(s||(n=t[r?r[o]:o],o+=e);o>=0&&o<a;o+=e){var l=r?r[o]:o;n=i(n,t[l],l,t)}return n}(t,Te(i,s,4),n,r)}}var vt=It(1),Bt=It(-1);function yt(e,t,i){var n=[];return t=Ne(t,i),mt(e,(function(e,i,s){t(e,i,s)&&n.push(e)})),n}function bt(e,t,i){t=Ne(t,i);for(var n=!et(e)&&ee(e),s=(n||e).length,r=0;r<s;r++){var a=n?n[r]:r;if(!t(e[a],a,e))return!1}return!0}function Et(e,t,i){t=Ne(t,i);for(var n=!et(e)&&ee(e),s=(n||e).length,r=0;r<s;r++){var a=n?n[r]:r;if(t(e[a],a,e))return!0}return!1}function wt(e,t,i,n){return et(e)||(e=Ce(e)),("number"!=typeof i||n)&&(i=0),gt(e,t,i)>=0}var Qt=v((function(e,t,i){var n,s;return M(t)?s=t:(t=_e(t),n=t.slice(0,-1),t=t[t.length-1]),Ct(e,(function(e){var r=s;if(!r){if(n&&n.length&&(e=Se(e,n)),null==e)return;r=e[t]}return null==r?r:r.apply(e,i)}))}));function _t(e,t){return Ct(e,Fe(t))}function St(e,t,i){var n,s,r=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var o=0,l=(e=et(e)?e:Ce(e)).length;o<l;o++)null!=(n=e[o])&&n>r&&(r=n);else t=Ne(t,i),mt(e,(function(e,i,n){((s=t(e,i,n))>a||s===-1/0&&r===-1/0)&&(r=e,a=s)}));return r}var xt=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function kt(e){return e?P(e)?a.call(e):w(e)?e.match(xt):et(e)?Ct(e,ke):Ce(e):[]}function Dt(e,t,i){if(null==t||i)return et(e)||(e=Ce(e)),e[Ue(e.length-1)];var n=kt(e),s=$(n);t=Math.max(Math.min(t,s),0);for(var r=s-1,a=0;a<t;a++){var o=Ue(a,r),l=n[a];n[a]=n[o],n[o]=l}return n.slice(0,t)}function Ft(e,t){return function(i,n,s){var r=t?[[],[]]:{};return n=Ne(n,s),mt(i,(function(t,s){var a=n(t,s,i);e(r,t,a)})),r}}var Tt=Ft((function(e,t,i){O(e,i)?e[i].push(t):e[i]=[t]})),Mt=Ft((function(e,t,i){e[i]=t})),Rt=Ft((function(e,t,i){O(e,i)?e[i]++:e[i]=1})),Nt=Ft((function(e,t,i){e[i?0:1].push(t)}),!0);function Lt(e,t,i){return t in i}var Ut=v((function(e,t){var i={},n=t[0];if(null==e)return i;M(n)?(t.length>1&&(n=Te(n,t[1])),t=ae(e)):(n=Lt,t=tt(t,!1,!1),e=Object(e));for(var s=0,r=t.length;s<r;s++){var a=t[s],o=e[a];n(o,a,e)&&(i[a]=o)}return i})),Ht=v((function(e,t){var i,n=t[0];return M(n)?(n=rt(n),t.length>1&&(i=t[1])):(t=Ct(tt(t,!1,!1),String),n=function(e,i){return!wt(t,i)}),Ut(e,n,i)}));function Pt(e,t,i){return a.call(e,0,Math.max(0,e.length-(null==t||i?1:t)))}function Ot(e,t,i){return null==e||e.length<1?null==t||i?void 0:[]:null==t||i?e[0]:Pt(e,e.length-t)}function Gt(e,t,i){return a.call(e,null==t||i?1:t)}var Kt=v((function(e,t){return t=tt(t,!0,!0),yt(e,(function(e){return!wt(t,e)}))})),qt=v((function(e,t){return Kt(e,t)}));function Yt(e,t,i,n){b(t)||(n=i,i=t,t=!1),null!=i&&(i=Ne(i,n));for(var s=[],r=[],a=0,o=$(e);a<o;a++){var l=e[a],A=i?i(l,a,e):l;t&&!i?(a&&r===A||s.push(l),r=A):i?wt(r,A)||(r.push(A),s.push(l)):wt(s,l)||s.push(l)}return s}var Vt=v((function(e){return Yt(tt(e,!0,!0))}));function Wt(e){for(var t=e&&St(e,$).length||0,i=Array(t),n=0;n<t;n++)i[n]=_t(e,n);return i}var jt=v(Wt);function Jt(e,t){return e._chain?ie(t).chain():t}function zt(e){return mt(ve(e),(function(t){var i=ie[t]=e[t];ie.prototype[t]=function(){var e=[this._wrapped];return r.apply(e,arguments),Jt(this,i.apply(ie,e))}})),ie}mt(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=i[e];ie.prototype[e]=function(){var i=this._wrapped;return null!=i&&(t.apply(i,arguments),"shift"!==e&&"splice"!==e||0!==i.length||delete i[0]),Jt(this,i)}})),mt(["concat","join","slice"],(function(e){var t=i[e];ie.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),Jt(this,e)}}));var Xt=zt({__proto__:null,VERSION:e,restArguments:v,isObject:B,isNull:function(e){return null===e},isUndefined:y,isBoolean:b,isElement:function(e){return!(!e||1!==e.nodeType)},isString:w,isNumber:Q,isDate:_,isRegExp:S,isError:x,isSymbol:k,isArrayBuffer:D,isDataView:H,isArray:P,isFunction:M,isArguments:K,isFinite:function(e){return!k(e)&&f(e)&&!isNaN(parseFloat(e))},isNaN:q,isTypedArray:X,isEmpty:function(e){if(null==e)return!0;var t=$(e);return"number"==typeof t&&(P(e)||w(e)||K(e))?0===t:0===$(ee(e))},isMatch:te,isEqual:function(e,t){return re(e,t)},isMap:ge,isWeakMap:pe,isSet:fe,isWeakSet:me,keys:ee,allKeys:ae,values:Ce,pairs:function(e){for(var t=ee(e),i=t.length,n=Array(i),s=0;s<i;s++)n[s]=[t[s],e[t[s]]];return n},invert:Ie,functions:ve,methods:ve,extend:ye,extendOwn:be,assign:be,defaults:Ee,create:function(e,t){var i=we(e);return t&&be(i,t),i},clone:function(e){return B(e)?P(e)?e.slice():ye({},e):e},tap:function(e,t){return t(e),e},get:xe,has:function(e,t){for(var i=(t=_e(t)).length,n=0;n<i;n++){var s=t[n];if(!O(e,s))return!1;e=e[s]}return!!i},mapObject:function(e,t,i){t=Ne(t,i);for(var n=ee(e),s=n.length,r={},a=0;a<s;a++){var o=n[a];r[o]=t(e[o],o,e)}return r},identity:ke,constant:Y,noop:Le,toPath:Qe,property:Fe,propertyOf:function(e){return null==e?Le:function(t){return xe(e,t)}},matcher:De,matches:De,times:function(e,t,i){var n=Array(Math.max(0,e));t=Te(t,i,1);for(var s=0;s<e;s++)n[s]=t(s);return n},random:Ue,now:He,escape:Ge,unescape:Ke,templateSettings:qe,template:function(e,t,i){!t&&i&&(t=i),t=Ee({},t,ie.templateSettings);var n=RegExp([(t.escape||Ye).source,(t.interpolate||Ye).source,(t.evaluate||Ye).source].join("|")+"|$","g"),s=0,r="__p+='";e.replace(n,(function(t,i,n,a,o){return r+=e.slice(s,o).replace(We,je),s=o+t.length,i?r+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":n?r+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(r+="';\n"+a+"\n__p+='"),t})),r+="';\n";var a,o=t.variable;if(o){if(!Je.test(o))throw new Error("variable is not a bare identifier: "+o)}else r="with(obj||{}){\n"+r+"}\n",o="obj";r="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+r+"return __p;\n";try{a=new Function(o,"_",r)}catch(A){throw A.source=r,A}var l=function(e){return a.call(this,e,ie)};return l.source="function("+o+"){\n"+r+"}",l},result:function(e,t,i){var n=(t=_e(t)).length;if(!n)return M(i)?i.call(e):i;for(var s=0;s<n;s++){var r=null==e?void 0:e[t[s]];void 0===r&&(r=i,s=n),e=M(r)?r.call(e):r}return e},uniqueId:function(e){var t=++ze+"";return e?e+t:t},chain:function(e){var t=ie(e);return t._chain=!0,t},iteratee:Re,partial:$e,bind:Ze,bindAll:it,memoize:function(e,t){var i=function(n){var s=i.cache,r=""+(t?t.apply(this,arguments):n);return O(s,r)||(s[r]=e.apply(this,arguments)),s[r]};return i.cache={},i},delay:nt,defer:st,throttle:function(e,t,i){var n,s,r,a,o=0;i||(i={});var l=function(){o=!1===i.leading?0:He(),n=null,a=e.apply(s,r),n||(s=r=null)},A=function(){var A=He();o||!1!==i.leading||(o=A);var c=t-(A-o);return s=this,r=arguments,c<=0||c>t?(n&&(clearTimeout(n),n=null),o=A,a=e.apply(s,r),n||(s=r=null)):n||!1===i.trailing||(n=setTimeout(l,c)),a};return A.cancel=function(){clearTimeout(n),o=0,n=s=r=null},A},debounce:function(e,t,i){var n,s,r,a,o,l=function(){var A=He()-s;t>A?n=setTimeout(l,t-A):(n=null,i||(a=e.apply(o,r)),n||(r=o=null))},A=v((function(A){return o=this,r=A,s=He(),n||(n=setTimeout(l,t),i&&(a=e.apply(o,r))),a}));return A.cancel=function(){clearTimeout(n),n=r=o=null},A},wrap:function(e,t){return $e(t,e)},negate:rt,compose:function(){var e=arguments,t=e.length-1;return function(){for(var i=t,n=e[t].apply(this,arguments);i--;)n=e[i].call(this,n);return n}},after:function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},before:at,once:ot,findKey:lt,findIndex:ct,findLastIndex:ut,sortedIndex:ht,indexOf:gt,lastIndexOf:pt,find:ft,detect:ft,findWhere:function(e,t){return ft(e,De(t))},each:mt,forEach:mt,map:Ct,collect:Ct,reduce:vt,foldl:vt,inject:vt,reduceRight:Bt,foldr:Bt,filter:yt,select:yt,reject:function(e,t,i){return yt(e,rt(Ne(t)),i)},every:bt,all:bt,some:Et,any:Et,contains:wt,includes:wt,include:wt,invoke:Qt,pluck:_t,where:function(e,t){return yt(e,De(t))},max:St,min:function(e,t,i){var n,s,r=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var o=0,l=(e=et(e)?e:Ce(e)).length;o<l;o++)null!=(n=e[o])&&n<r&&(r=n);else t=Ne(t,i),mt(e,(function(e,i,n){((s=t(e,i,n))<a||s===1/0&&r===1/0)&&(r=e,a=s)}));return r},shuffle:function(e){return Dt(e,1/0)},sample:Dt,sortBy:function(e,t,i){var n=0;return t=Ne(t,i),_t(Ct(e,(function(e,i,s){return{value:e,index:n++,criteria:t(e,i,s)}})).sort((function(e,t){var i=e.criteria,n=t.criteria;if(i!==n){if(i>n||void 0===i)return 1;if(i<n||void 0===n)return-1}return e.index-t.index})),"value")},groupBy:Tt,indexBy:Mt,countBy:Rt,partition:Nt,toArray:kt,size:function(e){return null==e?0:et(e)?e.length:ee(e).length},pick:Ut,omit:Ht,first:Ot,head:Ot,take:Ot,initial:Pt,last:function(e,t,i){return null==e||e.length<1?null==t||i?void 0:[]:null==t||i?e[e.length-1]:Gt(e,Math.max(0,e.length-t))},rest:Gt,tail:Gt,drop:Gt,compact:function(e){return yt(e,Boolean)},flatten:function(e,t){return tt(e,t,!1)},without:qt,uniq:Yt,unique:Yt,union:Vt,intersection:function(e){for(var t=[],i=arguments.length,n=0,s=$(e);n<s;n++){var r=e[n];if(!wt(t,r)){var a;for(a=1;a<i&&wt(arguments[a],r);a++);a===i&&t.push(r)}}return t},difference:Kt,unzip:Wt,transpose:Wt,zip:jt,object:function(e,t){for(var i={},n=0,s=$(e);n<s;n++)t?i[e[n]]=t[n]:i[e[n][0]]=e[n][1];return i},range:function(e,t,i){null==t&&(t=e||0,e=0),i||(i=t<e?-1:1);for(var n=Math.max(Math.ceil((t-e)/i),0),s=Array(n),r=0;r<n;r++,e+=i)s[r]=e;return s},chunk:function(e,t){if(null==t||t<1)return[];for(var i=[],n=0,s=e.length;n<s;)i.push(a.call(e,n,n+=t));return i},mixin:zt,default:ie});return Xt._=Xt,Xt},"object"==typeof exports&&"undefined"!=typeof module?module.exports=Fnt():"function"==typeof define&&define.amd?define("underscore",Fnt):(Dnt="undefined"!=typeof globalThis?globalThis:Dnt||self,function(){var e=Dnt._,t=Dnt._=Fnt();t.noConflict=function(){return Dnt._=e,t}}()),function(e){var t,i,n="",s=Math.PI,r=s/2,a="ontouchstart"in window,o=a?{down:"touchstart",move:"touchmove",up:"touchend",over:"touchstart",out:"touchend"}:{down:"mousedown",move:"mousemove",up:"mouseup",over:"mouseover",out:"mouseout"},l={backward:["bl","tl"],forward:["br","tr"],all:["tl","bl","tr","br","l","r"]},A=["single","double"],c=["ltr","rtl"],u={
// Enables hardware acceleration
acceleration:!0,
// Display
display:"double",
// Duration of transition in milliseconds
duration:600,
// First page
page:1,
// Enables gradients
gradients:!0,
// Corners used when turning the page
turnCorners:"bl,br",
// flipbook has cover page
cover:!0,
// Events
when:null},h={
// Size of the active zone of each corner
cornerSize:100},d={
// Singleton constructor
// $('#selector').turn([options]);
init:function(s){var r;t="WebKitCSSMatrix"in window||"MozPerspective"in document.body.style,i=!(r=/AppleWebkit\/([0-9\.]+)/i.exec(navigator.userAgent))||parseFloat(r[1])>534.3,n=y();var l,A=0,c=this.data(),h=this.children();if((s=e.extend({width:this.width(),height:this.height(),direction:this.attr("dir")||this.css("direction")||"ltr"},u,s)).page,c.opts=s,c.pageObjs={},c.pages={},c.pageWrap={},c.pageZoom={},c.pagePlace={},c.pageMv=[],c.zoom=1,c.totalPages=s.pages||0,c.eventHandlers={touchStart:e.proxy(d._touchStart,this),touchMove:e.proxy(d._touchMove,this),touchEnd:e.proxy(d._touchEnd,this),start:e.proxy(d._eventStart,this)},s.when)for(l in s.when)B(l,s.when)&&this.bind(l,s.when[l]);for(this.css({position:"relative",width:s.width,height:s.height}),this.turn("display",s.display),""!==s.direction&&this.turn("direction",s.direction),t&&!a&&s.acceleration&&this.transform(I(0,0,!0)),l=0;l<h.length;l++)"1"!=e(h[l]).attr("ignore")&&this.turn("addPage",h[l],++A);return e(this).bind(o.down,c.eventHandlers.touchStart).bind("end",d._eventEnd).bind("pressed",d._eventPressed).bind("released",d._eventReleased).bind("flip",d._flip),e(this).parent().bind("start",c.eventHandlers.start),e(document).bind(o.move,c.eventHandlers.touchMove).bind(o.up,c.eventHandlers.touchEnd),this.turn("page",s.page),c.done=!0,this},
// Adds a page from external data
addPage:function(t,i){var n,s,r=!1,a=this.data(),o=a.totalPages+1;if(a.destroying)return!1;if((n=/\bp([0-9]+)\b/.exec(e(t).attr("class")))&&(i=parseInt(n[1],10)),i){if(i==o)r=!0;else if(i>o)throw w('Page "'+i+'" cannot be inserted')}else i=o,r=!0;return i>=1&&i<=o&&(s="double"==a.display?i%2?" odd":" even":"",a.done&&this.turn("stop"),i in a.pageObjs&&d._movePages.call(this,i,1),r&&(a.totalPages=o),a.pageObjs[i]=e(t).css({float:"left"}).addClass("page p"+i+s),-1!=navigator.userAgent.indexOf("MSIE 9.0")&&a.pageObjs[i].hasClass("hard")&&a.pageObjs[i].removeClass("hard"),d._addPage.call(this,i),d._removeFromDOM.call(this)),this},
// Adds a page
_addPage:function(t){var i=this.data(),n=i.pageObjs[t];if(n)if(d._necessPage.call(this,t)){if(!i.pageWrap[t]){i.pageWrap[t]=e("<div/>",{class:"page-wrapper",page:t,css:{position:"absolute",overflow:"hidden"}}),this.append(i.pageWrap[t]),i.pagePlace[t]||(i.pagePlace[t]=t,i.pageObjs[t].appendTo(i.pageWrap[t]));var s=d._pageSize.call(this,t,!0);n.css({width:s.width,height:s.height}),i.pageWrap[t].css(s)}i.pagePlace[t]==t&&d._makeFlip.call(this,t)}else i.pagePlace[t]=0,i.pageObjs[t]&&i.pageObjs[t].remove()},
// Checks if a page is in memory
hasPage:function(e){return B(e,this.data().pageObjs)},
// Centers the flipbook
center:function(t){var i=this.data(),n=e(this).turn("size"),s=0;if(!i.noCenter){if("double"==i.display){var r=this.turn("view",t||i.tpage||i.page);"ltr"==i.direction?r[0]?r[1]||(s+=n.width/4):s-=n.width/4:r[0]?r[1]||(s-=n.width/4):s+=n.width/4}e(this).css({marginLeft:s})}return this},
// Destroys the flipbook
destroy:function(){var t=this,i=this.data();if("prevented"!=E("destroying",this)){for(i.destroying=!0,e.each(["end","first","flip","last","pressed","released","start","turning","turned","zooming","missing"],(function(e,i){t.unbind(i)})),this.parent().unbind("start",i.eventHandlers.start),e(document).unbind(o.move,i.eventHandlers.touchMove).unbind(o.up,i.eventHandlers.touchEnd);0!==i.totalPages;)this.turn("removePage",i.totalPages);return i.fparent&&i.fparent.remove(),i.shadow&&i.shadow.remove(),this.removeData(),i=null,this}},
// Checks if this element is a flipbook
is:function(){return"object"==typeof this.data().pages},
// Sets and gets the zoom value
zoom:function(t){var i=this.data();if("number"==typeof t){if(t<.001||t>100)throw w(t+" is not a value for zoom");if("prevented"==E("zooming",this,[t,i.zoom]))return this;var n=this.turn("size"),s=this.turn("view"),r=1/i.zoom,a=Math.round(n.width*r*t),o=Math.round(n.height*r*t);i.zoom=t,e(this).turn("stop").turn("size",a,o),i.opts.autoCenter&&this.turn("center"),d._updateShadow.call(this);for(var l=0;l<s.length;l++)s[l]&&i.pageZoom[s[l]]!=i.zoom&&(this.trigger("zoomed",[s[l],s,i.pageZoom[s[l]],i.zoom]),i.pageZoom[s[l]]=i.zoom);return this}return i.zoom},
// Gets the size of a page
_pageSize:function(e,t){var i=this.data(),n={};if("single"==i.display)n.width=this.width(),n.height=this.height(),t&&(n.top=0,n.left=0,n.right="auto");else{var s=this.width()/2,r=this.height();if(i.pageObjs[e].hasClass("own-size")?(n.width=i.pageObjs[e].width(),n.height=i.pageObjs[e].height()):(n.width=s,n.height=r),t){var a=i.opts.cover?e%2:e%2==0;n.top=(r-n.height)/2,"ltr"==i.direction?(n[a?"right":"left"]=s-n.width,n[a?"left":"right"]="auto"):(n[a?"left":"right"]=s-n.width,n[a?"right":"left"]="auto")}}return n},
// Prepares the flip effect for a page
_makeFlip:function(e){var t=this.data();if(!t.pages[e]&&t.pagePlace[e]==e){var i="single"==t.display,n=t.opts.cover?e%2:e%2==0;t.pages[e]=t.pageObjs[e].css(d._pageSize.call(this,e)).flip({page:e,next:n||i?e+1:e-1,turn:this}).flip("disable",t.disabled),d._setPageLoc.call(this,e),t.pageZoom[e]=t.zoom}return t.pages[e]},
// Makes pages within a range
_makeRange:function(){var e,t;if(!(this.data().totalPages<1))for(e=(t=this.turn("range"))[0];e<=t[1];e++)d._addPage.call(this,e)},
// Returns a range of pages that should be in the DOM
// Example:
// - page in the current view, return true
// * page is in the range, return true
// Otherwise, return false
// 1 2-3 4-5 6-7 8-9 10-11 12-13
//   **  **  --   **  **
range:function(e){var t,i,n,s,r=this.data();if(e=e||r.tpage||r.page||1,s=d._view.call(this,e),e<1||e>r.totalPages)throw w('"'+e+'" is not a valid page');return s[1]=s[1]||s[0],s[0]>=1&&s[1]<=r.totalPages?(t=Math.floor(2),r.totalPages-s[1]>s[0]?n=2*t-(i=Math.min(s[0]-1,t)):i=2*t-(n=Math.min(r.totalPages-s[1],t))):(i=5,n=5),[Math.max(1,s[0]-i),Math.min(r.totalPages,s[1]+n)]},
// Detects if a page is within the range of `pagesInDOM` from the current view
_necessPage:function(e){if(0===e)return!0;var t=this.turn("range");return this.data().pageObjs[e].hasClass("fixed")||e>=t[0]&&e<=t[1]},
// Releases memory by removing pages from the DOM
_removeFromDOM:function(){var e,t=this.data();for(e in t.pageWrap)B(e,t.pageWrap)&&!d._necessPage.call(this,e)&&d._removePageFromDOM.call(this,e)},
// Removes a page from DOM and its internal references
_removePageFromDOM:function(e){var t=this.data();if(t.pages[e]){var i=t.pages[e].data();g._moveFoldingPage.call(t.pages[e],!1),i.f&&i.f.fwrapper&&i.f.fwrapper.remove(),t.pages[e].removeData(),t.pages[e].remove(),delete t.pages[e]}t.pageObjs[e]&&t.pageObjs[e].remove(),t.pageWrap[e]&&(t.pageWrap[e].remove(),delete t.pageWrap[e]),d._removeMv.call(this,e),delete t.pagePlace[e],delete t.pageZoom[e]},
// Removes a page
removePage:function(e){var t=this.data();if("*"==e)for(;0!==t.totalPages;)this.turn("removePage",t.totalPages);else{if(e<1||e>t.totalPages)throw w("The page "+e+" doesn't exist");t.pageObjs[e]&&(this.turn("stop"),d._removePageFromDOM.call(this,e),delete t.pageObjs[e]),d._movePages.call(this,e,-1),t.totalPages=t.totalPages-1,t.page>t.totalPages?(t.page=null,d._fitPage.call(this,t.totalPages)):(d._makeRange.call(this),this.turn("update"))}return this},
// Moves pages
_movePages:function(e,t){var i,n=this,s=this.data(),r="single"==s.display,a=function(e){var i=e+t,a=s.opts.cover?i%2:i%2==0,o=a?" odd ":" even ";s.pageObjs[e]&&(s.pageObjs[i]=s.pageObjs[e].removeClass("p"+e+" odd even").addClass("p"+i+o)),s.pagePlace[e]&&s.pageWrap[e]&&(s.pagePlace[i]=i,s.pageObjs[i].hasClass("fixed")?s.pageWrap[i]=s.pageWrap[e].attr("page",i):s.pageWrap[i]=s.pageWrap[e].css(d._pageSize.call(n,i,!0)).attr("page",i),s.pages[e]&&(s.pages[i]=s.pages[e].flip("options",{page:i,next:r||a?i+1:i-1})),t&&(delete s.pages[e],delete s.pagePlace[e],delete s.pageZoom[e],delete s.pageObjs[e],delete s.pageWrap[e]))};if(t>0)for(i=s.totalPages;i>=e;i--)a(i);else for(i=e;i<=s.totalPages;i++)a(i)},
// Sets or Gets the display mode
display:function(t){var i=this.data(),n=i.display;if(void 0===t)return n;if(-1==e.inArray(t,A))throw w('"'+t+'" is not a value for display');switch(t){case"single":if(!i.pageObjs[0]){this.turn("stop").css({overflow:"hidden"}),i.pageObjs[0]=e("<div />",{class:"page p-temporal"}).css({width:this.width(),height:this.height()}).appendTo(this);var s=e("<div></div>");e(".p-temporal").append(s)}this.addClass("shadow");break;case"double":i.pageObjs[0]&&(this.turn("stop").css({overflow:""}),i.pageObjs[0].remove(),delete i.pageObjs[0]),this.removeClass("shadow")}if(i.display=t,n){var r=this.turn("size");d._movePages.call(this,1,0),this.turn("size",r.width,r.height).turn("update")}return this},
// Gets and sets the direction of the flipbook
direction:function(t){var i=this.data();if(void 0===t)return i.direction;if(t=t.toLowerCase(),-1==e.inArray(t,c))throw w('"'+t+'" is not a value for direction');return"rtl"==t&&e(this).attr("dir","ltr").css({direction:"ltr"}),i.direction=t,i.done&&this.turn("size",e(this).width(),e(this).height()),this},
// Detects animation
animating:function(){return this.data().pageMv.length>0},
// Gets the current activated corner
corner:function(){var e,t,i=this.data();for(t in i.pages)if(B(t,i.pages)&&(e=i.pages[t].flip("corner")))return e;return!1},
// Gets the data stored in the flipbook
data:function(){return this.data()},
// Disables and enables the effect
disable:function(t){var i,n=this.data(),s=this.turn("view");for(i in n.disabled=void 0===t||!0===t,n.pages)B(i,n.pages)&&n.pages[i].flip("disable",!!n.disabled||-1==e.inArray(parseInt(i,10),s));return this},
// Disables and enables the effect
disabled:function(e){return void 0===e?!0===this.data().disabled:this.turn("disable",e)},
// Gets and sets the size
size:function(e,t){if(void 0===e||void 0===t)return{width:this.width(),height:this.height()};this.turn("stop");var i,n,s=this.data(),r="double"==s.display?e/2:e;for(i in this.css({width:e,height:t}),s.pageObjs[0]&&s.pageObjs[0].css({width:r,height:t}),s.pageWrap)B(i,s.pageWrap)&&(n=d._pageSize.call(this,i,!0),s.pageObjs[i].css({width:n.width,height:n.height}),s.pageWrap[i].css(n),s.pages[i]&&s.pages[i].css({width:n.width,height:n.height}));return this.turn("resize"),this},
// Resizes each page
resize:function(){var e,t=this.data();for(t.pages[0]&&(t.pageWrap[0].css({left:-this.width()}),t.pages[0].flip("resize",!0)),e=1;e<=t.totalPages;e++)t.pages[e]&&t.pages[e].flip("resize",!0);d._updateShadow.call(this),t.opts.autoCenter&&this.turn("center")},
// Removes an animation from the cache
_removeMv:function(e){var t,i=this.data();for(t=0;t<i.pageMv.length;t++)if(i.pageMv[t]==e)return i.pageMv.splice(t,1),!0;return!1},
// Adds an animation to the cache
_addMv:function(e){var t=this.data();d._removeMv.call(this,e),t.pageMv.push(e)},
// Gets indexes for a view
_view:function(e){var t=this.data();return e=e||t.page,"double"==t.display?t.opts.cover?e%2?[e-1,e]:[e,e+1]:e%2?[e,e+1]:[e-1,e]:[e]},
// Gets a view
view:function(e){var t=this.data(),i=d._view.call(this,e);return"double"==t.display?[i[0]>0?i[0]:0,i[1]<=t.totalPages?i[1]:0]:[i[0]>0&&i[0]<=t.totalPages?i[0]:0]},
// Stops animations
stop:function(e,t){if(this.turn("animating")){var i,n,s,r=this.data();for(r.tpage&&(r.page=r.tpage,delete r.tpage),i=0;i<r.pageMv.length;i++)r.pageMv[i]&&r.pageMv[i]!==e&&(n=(s=r.pages[r.pageMv[i]]).data().f.opts,s.flip("hideFoldedPage",t),t||g._moveFoldingPage.call(s,!1),n.force&&(r.opts.cover?n.next=n.page%2==0?n.page-1:n.page+1:n.next=n.page%2==0?n.page+1:n.page-1,delete n.force))}return this.turn("update"),this},
// Gets and sets the number of pages
pages:function(e){var t=this.data();if(e){if(e<t.totalPages)for(var i=t.totalPages;i>e;i--)this.turn("removePage",i);return t.totalPages=e,d._fitPage.call(this,t.page),this}return t.totalPages},
// Checks missing pages
_missing:function(e){var t=this.data();if(!(t.totalPages<1)){var i,n=this.turn("range",e),s=[];for(i=n[0];i<=n[1];i++)t.pageObjs[i]||s.push(i);s.length>0&&this.trigger("missing",[s])}},
// Sets a page without effect
_fitPage:function(e){var t=this.data(),i=this.turn("view",e);if(d._missing.call(this,e),t.pageObjs[e]){t.page=e,this.turn("stop");for(var n=0;n<i.length;n++)i[n]&&t.pageZoom[i[n]]!=t.zoom&&(this.trigger("zoomed",[i[n],i,t.pageZoom[i[n]],t.zoom]),t.pageZoom[i[n]]=t.zoom);d._removeFromDOM.call(this),d._makeRange.call(this),d._updateShadow.call(this),this.trigger("turned",[e,i]),this.turn("update"),t.opts.autoCenter&&this.turn("center")}},
// Turns the page
_turnPage:function(t){var i,n,s=this.data(),r=s.pagePlace[t],a=this.turn("view"),o=this.turn("view",t);if(s.page!=t){var l=s.page;if("prevented"==E("turning",this,[t,o]))return void(l==s.page&&-1!=e.inArray(r,s.pageMv)&&s.pages[r].flip("hideFoldedPage",!0));-1!=e.inArray(1,o)&&this.trigger("first"),-1!=e.inArray(s.totalPages,o)&&this.trigger("last")}"single"==s.display?(i=a[0],n=o[0]):a[1]&&t>a[1]?(i=a[1],n=o[0]):a[0]&&t<a[0]&&(i=a[0],n=o[1]);var A=s.opts.turnCorners.split(","),c=s.pages[i].data().f,u=c.opts,h=c.point;d._missing.call(this,t),s.pageObjs[t]&&(this.turn("stop"),s.page=t,d._makeRange.call(this),s.tpage=n,u.next!=n&&(u.next=n,u.force=!0),this.turn("update"),c.point=h,"hard"==c.effect?"ltr"==s.direction?s.pages[i].flip("turnPage",t>i?"r":"l"):s.pages[i].flip("turnPage",t>i?"l":"r"):"ltr"==s.direction?s.pages[i].flip("turnPage",A[t>i?1:0]):s.pages[i].flip("turnPage",A[t>i?0:1]))},
// Gets and sets a page
page:function(t){var i=this.data();if(void 0===t)return i.page;if(!i.disabled&&!i.destroying){if((t=parseInt(t,10))>0&&t<=i.totalPages)return t!=i.page&&(i.done&&-1==e.inArray(t,this.turn("view"))?d._turnPage.call(this,t):d._fitPage.call(this,t)),this;throw w("The page "+t+" does not exist")}},
// Turns to the next view
next:function(){return this.turn("page",Math.min(this.data().totalPages,d._view.call(this,this.data().page).pop()+1))},
// Turns to the previous view
previous:function(){return this.turn("page",Math.max(1,d._view.call(this,this.data().page).shift()-1))},
// Shows a peeling corner
peel:function(e,t){var i,n=this.data(),s=this.turn("view");(t=void 0===t||!0===t,!1===e)?this.turn("stop",null,t):"single"==n.display?n.pages[n.page].flip("peel",e,t):(i="ltr"==n.direction?-1!=e.indexOf("l")?s[0]:s[1]:-1!=e.indexOf("l")?s[1]:s[0],n.pages[i]&&n.pages[i].flip("peel",e,t));return this},
// Adds a motion to the internal list
// This event is called in context of flip
_addMotionPage:function(){var t=e(this).data().f.opts,i=t.turn;i.data(),d._addMv.call(i,t.page)},
// This event is called in context of flip
_eventStart:function(e,t,i){var n=t.turn.data(),s=n.pageZoom[t.page];e.isDefaultPrevented()||(s&&s!=n.zoom&&(t.turn.trigger("zoomed",[t.page,t.turn.turn("view",t.page),s,n.zoom]),n.pageZoom[t.page]=n.zoom),"single"==n.display&&i&&("l"==i.charAt(1)&&"ltr"==n.direction||"r"==i.charAt(1)&&"rtl"==n.direction?(t.next=t.next<t.page?t.next:t.page-1,t.force=!0):t.next=t.next>t.page?t.next:t.page+1),d._addMotionPage.call(e.target)),d._updateShadow.call(t.turn)},
// This event is called in context of flip
_eventEnd:function(t,i,n){e(t.target).data().f;var s=i.turn,r=s.data();if(n){var a=r.tpage||r.page;a!=i.next&&a!=i.page||(delete r.tpage,d._fitPage.call(s,a||i.next,!0))}else d._removeMv.call(s,i.page),d._updateShadow.call(s),s.turn("update")},
// This event is called in context of flip
_eventPressed:function(t){var i=e(t.target).data().f,n=i.opts.turn,s=n.data();return s.pages,s.mouseAction=!0,n.turn("update"),i.time=(new Date).getTime()},
// This event is called in context of flip
_eventReleased:function(t,i){var n,s=e(t.target),r=s.data().f,a=r.opts.turn,o=a.data();n="single"==o.display?"br"==i.corner||"tr"==i.corner?i.x<s.width()/2:i.x>s.width()/2:i.x<0||i.x>s.width(),((new Date).getTime()-r.time<200||n)&&(t.preventDefault(),d._turnPage.call(a,r.opts.next)),o.mouseAction=!1},
// This event is called in context of flip
_flip:function(t){t.stopPropagation();var i=e(t.target).data().f.opts;i.turn.trigger("turn",[i.next]),i.turn.data().opts.autoCenter&&i.turn.turn("center",i.next)},
_touchStart:function(){var e=this.data();for(var t in e.pages)if(B(t,e.pages)&&!1===g._eventStart.apply(e.pages[t],arguments))return!1},
_touchMove:function(){if(!window.page_pressed)return!0;var e=this.data();for(var t in e.pages)B(t,e.pages)&&g._eventMove.apply(e.pages[t],arguments)},
_touchEnd:function(){var e=this.data();for(var t in e.pages)B(t,e.pages)&&g._eventEnd.apply(e.pages[t],arguments)},
// Calculate the z-index value for pages during the animation
calculateZ:function(e){var t,i,n,s,r,a=this,o=this.data(),l=this.turn("view"),A=l[0]||l[1],c=e.length-1,u={pageZ:{},partZ:{},pageV:{}},h=function(e){var t=a.turn("view",e);t[0]&&(u.pageV[t[0]]=!0),t[1]&&(u.pageV[t[1]]=!0)};for(t=0;t<=c;t++)i=e[t],n=o.pages[i].data().f.opts.next,s=o.pagePlace[i],h(i),h(n),r=o.pagePlace[n]==n?n:i,u.pageZ[r]=o.totalPages-Math.abs(A-r),u.partZ[s]=2*o.totalPages-c+t;return u},
// Updates the z-index and display property of every page
update:function(){var t,i=this.data();if(this.turn("animating")&&0!==i.pageMv[0]){var n,s,r=this.turn("calculateZ",i.pageMv),a=this.turn("corner"),o=this.turn("view"),l=this.turn("view",i.tpage);for(t in i.pageWrap)B(t,i.pageWrap)&&(s=i.pageObjs[t].hasClass("fixed"),i.pageWrap[t].css({display:r.pageV[t]||s?"":"none",zIndex:(i.pageObjs[t].hasClass("hard")?r.partZ[t]:r.pageZ[t])||(s?-1:0)}),(n=i.pages[t])&&(n.flip("z",r.partZ[t]||null),r.pageV[t]&&n.flip("resize"),i.tpage?(n.flip("hover",!1).flip("disable",-1==e.inArray(parseInt(t,10),i.pageMv)&&t!=l[0]&&t!=l[1]),_.chain(l).compact().min().value()):n.flip("hover",!1===a).flip("disable",t!=o[0]&&t!=o[1])))}else for(t in i.pageWrap)if(B(t,i.pageWrap)){var A=d._setPageLoc.call(this,t);i.pages[t]&&i.pages[t].flip("disable",i.disabled||1!=A).flip("hover",!0).flip("z",null)}return this},
// Updates the position and size of the flipbook's shadow
_updateShadow:function(){var t,i,n=this.data(),s=this.width(),r=this.height(),a="single"==n.display?s:s/2;t=this.turn("view"),n.shadow||(n.shadow=e("<div />",{class:"shadow",css:f(0,0,0).css}).appendTo(this));for(var o=0;o<n.pageMv.length&&(t[0]&&t[1]);o++)t=this.turn("view",n.pages[n.pageMv[o]].data().f.opts.next),i=this.turn("view",n.pageMv[o]),t[0]=t[0]&&i[0],t[1]=t[1]&&i[1];switch(t[0]?t[1]?3:"ltr"==n.direction?2:1:"ltr"==n.direction?1:2){case 1:n.shadow.css({width:a,height:r,top:0,left:a});break;case 2:n.shadow.css({width:a,height:r,top:0,left:0});break;case 3:n.shadow.css({width:s,height:r,top:0,left:0})}},
// Sets the z-index and display property of a page
// It depends on the current view
_setPageLoc:function(e){var t=this.data(),i=this.turn("view"),n=0;if(e==i[0]||e==i[1]?n=1:("single"==t.display&&e==i[0]+1||"double"==t.display&&e==i[0]-2||e==i[1]+2&&i[1])&&(n=2),!this.turn("animating"))switch(n){case 1:t.pageWrap[e].css({zIndex:t.totalPages,display:""});break;case 2:t.pageWrap[e].css({zIndex:t.totalPages-1,display:""});break;case 0:t.pageWrap[e].css({zIndex:0,display:t.pageObjs[e].hasClass("fixed")?"":"none"})}return n},
// Gets and sets the options
options:function(t){if(void 0===t)return this.data().opts;var i=this.data();if(e.extend(i.opts,t),t.pages&&this.turn("pages",t.pages),t.page&&this.turn("page",t.page),t.display&&this.turn("display",t.display),t.direction&&this.turn("direction",t.direction),t.width&&t.height&&this.turn("size",t.width,t.height),t.when)for(var n in t.when)B(n,t.when)&&this.unbind(n).bind(n,t.when[n]);return this},
// Gets the current version
version:function(){return"4.1.0"}},g={
// Constructor
init:function(e){return this.data({f:{disabled:!1,hover:!1,effect:this.hasClass("hard")?"hard":"sheet"}}),this.flip("options",e),g._addPageWrapper.call(this),this},setData:function(t){var i=this.data();return i.f=e.extend(i.f,t),this},options:function(t){var i=this.data().f;return t?(g.setData.call(this,{opts:e.extend({},i.opts||h,t)}),this):i.opts},z:function(e){var t=this.data().f;return t.opts["z-index"]=e,t.fwrapper&&t.fwrapper.css({zIndex:e||parseInt(t.parent.css("z-index"),10)||0}),this},_cAllowed:function(){var e=this.data().f,t=e.opts.page,i=e.opts.turn.data(),n=i.opts.cover?t%2:t%2==0;return"hard"==e.effect?"ltr"==i.direction?[n?"r":"l"]:[n?"l":"r"]:"single"==i.display?1==t?"ltr"==i.direction?l.forward:l.backward:t==i.totalPages?"ltr"==i.direction?l.backward:l.forward:l.all:"ltr"==i.direction?l[n?"forward":"backward"]:l[n?"backward":"forward"]},_cornerActivated:function(t){var i=this.data().f,n=this.width(),s=this.height(),r=.2*n,a=.5*s,o={x:t.x,y:t.y,corner:""},l=i.opts.cornerSize;if(o.x<=0||o.y<=0||o.x>=n||o.y>=s)return!1;var A=g._cAllowed.call(this);switch(i.effect){case"hard":if(o.x>n-l)o.corner="r";else{if(!(o.x<l))return!1;o.corner="l"}break;case"sheet":if(o.y<a)o.corner+="t";else{if(!(o.y>=a))return!1;o.corner+="b"}if(o.x<=r)o.corner+="l";else{if(!(o.x>=n-r))return!1;o.corner+="r"}}return!(!o.corner||-1==e.inArray(o.corner,A))&&o},_isIArea:function(t){var i=this.data().f.parent.offset();return(!(t=a&&t.originalEvent?t.originalEvent.touches[0]:t).target||!(e(t.target).hasClass("linkBlockArea")||e(t.target).parents(".linkBlockArea:first").length>0))&&((!t.target||!(e(t.target).hasClass("jsPanel")||e(t.target).parents(".jsPanel:first").length>0))&&((!t.target||!(e(t.target).hasClass("painter-layer")||e(t.target).parents(".painter-layer:first").length>0))&&g._cornerActivated.call(this,{x:t.pageX-i.left,y:t.pageY-i.top})))},_c:function(e,t){switch(t=t||0,e){case"tl":return C(t,t);case"tr":return C(this.width()-t,t);case"bl":return C(t,this.height()-t);case"br":return C(this.width()-t,this.height()-t);case"l":return C(t,0);case"r":return C(this.width()-t,0)}},_c2:function(e){switch(e){case"tl":case"l":return C(2*this.width(),0);case"tr":case"r":return C(-this.width(),0);case"bl":return C(2*this.width(),this.height());case"br":return C(-this.width(),this.height())}},_foldingPage:function(){var e=this.data().f;if(e){var t=e.opts;return t.turn?"single"==(e=t.turn.data()).display?t.next>1||t.page>1?e.pageObjs[0]:null:e.pageObjs[t.next]:void 0}},_backGradient:function(){var t=this.data().f,i=t.opts.turn.data(),n=i.opts.gradients&&("single"==i.display||2!=t.opts.page&&t.opts.page!=i.totalPages-1);return n&&!t.bshadow&&(t.bshadow=e("<div/>",f(0,0,1)).css({position:"",width:this.width(),height:this.height()}).appendTo(t.parent)),n},type:function(){return this.data().f.effect},resize:function(e){var t=this.data().f,i=t.opts.turn.data(),n=this.width(),s=this.height();switch(t.effect){case"hard":e&&(t.wrapper.css({width:n,height:s}),t.fpage.css({width:n,height:s}),i.opts.gradients&&(t.ashadow.css({width:n,height:s}),t.bshadow.css({width:n,height:s})));break;case"sheet":if(e){var r=Math.round(Math.sqrt(Math.pow(n,2)+Math.pow(s,2)));t.wrapper.css({width:r,height:r}),t.fwrapper.css({width:r,height:r}).children(":first-child").css({width:n,height:s}),t.fpage.css({width:n,height:s}),i.opts.gradients&&t.ashadow.css({width:n,height:s}),g._backGradient.call(this)&&t.bshadow.css({width:n,height:s})}if(t.parent.is(":visible")){var a=Q(t.parent[0]);t.fwrapper.css({top:a.top,left:a.left}),a=Q(t.opts.turn[0]),t.fparent.css({top:-a.top,left:-a.left})}this.flip("z",t.opts["z-index"])}},
// Prepares the page by adding a general wrapper and another objects
_addPageWrapper:function(){var t=this.data().f,i=t.opts.turn.data(),s=this.parent();if(t.parent=s,!t.wrapper)switch(t.effect){case"hard":var r={};r[n+"transform-style"]="preserve-3d",r[n+"backface-visibility"]="hidden",t.wrapper=e("<div/>",f(0,0,2)).css(r).appendTo(s).prepend(this),t.fpage=e("<div/>",f(0,0,1)).css(r).appendTo(s),i.opts.gradients&&(t.ashadow=e("<div/>",f(0,0,0)).hide().appendTo(s),t.bshadow=e("<div/>",f(0,0,0)));break;case"sheet":if(this.width(),this.height(),t.fparent=t.opts.turn.data().fparent,!t.fparent){var a=e("<div/>",{css:{"pointer-events":"none"}}).hide();a.data().flips=0,a.css(f(0,0,"auto","visible").css).appendTo(t.opts.turn),t.opts.turn.data().fparent=a,t.fparent=a}this.css({position:"absolute",top:0,left:0,bottom:"auto",right:"auto"}),t.wrapper=e("<div/>",f(0,0,this.css("z-index"))).appendTo(s).prepend(this),t.fwrapper=e("<div/>",f(s.offset().top,s.offset().left)).hide().appendTo(t.fparent),t.fpage=e("<div/>",f(0,0,0,"visible")).css({cursor:"default"}).appendTo(t.fwrapper),i.opts.gradients&&(t.ashadow=e("<div/>",f(0,0,1)).appendTo(t.fpage)),g.setData.call(this,t)}g.resize.call(this,!0)},
// Takes a 2P point from the screen and applies the transformation
_fold:function(e){var t=this.data().f,a=t.opts.turn.data(),o=g._c.call(this,e.corner),l=this.width(),A=this.height();switch(t.effect){case"hard":"l"==e.corner?e.x=Math.min(Math.max(e.x,0),2*l):e.x=Math.max(Math.min(e.x,l),-l);var c,u,h,d,p,f=a.totalPages,m=t.opts["z-index"]||f,B={overflow:"visible"},y=o.x?(o.x-e.x)/l:e.x/l,E=90*y,w=E<90;switch(e.corner){case"l":d="0% 50%",p="100% 50%",w?(c=0,u=t.opts.next-1>0,h=1):(c="100%",u=t.opts.page+1<f,h=0);break;case"r":d="100% 50%",p="0% 50%",E=-E,l=-l,w?(c=0,u=t.opts.next+1<f,h=0):(c="-100%",u=1!=t.opts.page,h=1)}B[n+"perspective-origin"]=p,t.wrapper.transform("rotateY("+E+"deg)translate3d(0px, 0px, "+(this.attr("depth")||0)+"px)",p),t.fpage.transform("translateX("+l+"px) rotateY("+(180+E)+"deg)",d),t.parent.css(B),w?(y=1-y,t.wrapper.css({zIndex:m+1}),t.fpage.css({zIndex:m})):(y-=1,t.wrapper.css({zIndex:m}),t.fpage.css({zIndex:m+1})),a.opts.gradients&&(u?t.ashadow.css({display:"",left:c,backgroundColor:"rgba(0,0,0,"+.5*y+")"}).transform("rotateY(0deg)"):t.ashadow.hide(),t.bshadow.css({opacity:1-y}),w?t.bshadow.parent()[0]!=t.wrapper[0]&&t.bshadow.appendTo(t.wrapper):t.bshadow.parent()[0]!=t.fpage[0]&&t.bshadow.appendTo(t.fpage),b(t.bshadow,C(100*h,0),C(100*(1-h),0),[[0,"rgba(0,0,0,0.3)"],[1,"rgba(0,0,0,0)"]],2));break;case"sheet":var Q,_,S,x,k,D,F,T=this,M=0,R=C(0,0),N=C(0,0),L=C(0,0),U=g._foldingPage.call(this),H=a.opts.acceleration,P=t.wrapper.height(),O="t"==e.corner.substr(0,1),G="l"==e.corner.substr(1,1),K=function(){var t=C(0,0),n=C(0,0);t.x=o.x?o.x-e.x:e.x,t.y=i?o.y?o.y-e.y:e.y:0,n.x=G?l-t.x/2:e.x+t.x/2,n.y=t.y/2;var c=r-Math.atan2(t.y,t.x),u=c-Math.atan2(n.y,n.x),h=Math.max(0,Math.sin(u)*Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2)));if(M=c/s*180,L=C(h*Math.sin(c),h*Math.cos(c)),c>r&&(L.x=L.x+Math.abs(L.y*t.y/t.x),L.y=0,Math.round(L.x*Math.tan(s-c))<A))return e.y=Math.sqrt(Math.pow(A,2)+2*n.x*t.x),O&&(e.y=A-e.y),K();if(c>r){var d=s-c,p=P-A/Math.sin(d);R=C(Math.round(p*Math.cos(d)),Math.round(p*Math.sin(d))),G&&(R.x=-R.x),O&&(R.y=-R.y)}Q=Math.round(L.y/Math.tan(c)+L.x);var f=l-Q,m=f*Math.cos(2*c),I=f*Math.sin(2*c);if(N=C(Math.round(G?f-m:Q+m),Math.round(O?I:A-I)),a.opts.gradients){k=f*Math.sin(c);var v=g._c2.call(T,e.corner),B=Math.sqrt(Math.pow(v.x-e.x,2)+Math.pow(v.y-e.y,2))/l;F=Math.sin(r*(B>1?2-B:B)),D=Math.min(B,1),x=k>100?(k-100)/k:0,_=C(k*Math.sin(c)/l*100,k*Math.cos(c)/A*100),g._backGradient.call(T)&&(S=C(1.2*k*Math.sin(c)/l*100,1.2*k*Math.cos(c)/A*100),G||(S.x=100-S.x),O||(S.y=100-S.y))}return L.x=Math.round(L.x),L.y=Math.round(L.y),!0},q=function(e,i,n,s){var r=["0","auto"],o=(l-P)*n[0]/100,c=(A-P)*n[1]/100,u={left:r[i[0]],top:r[i[1]],right:r[i[2]],bottom:r[i[3]]},h={},d=90!=s&&-90!=s?G?-1:1:0,p=n[0]+"% "+n[1]+"%";T.css(u).transform(v(s)+I(e.x+d,e.y,H),p),t.fpage.css(u).transform(v(s)+I(e.x+N.x-R.x-l*n[0]/100,e.y+N.y-R.y-A*n[1]/100,H)+v((180/s-2)*s),p),t.wrapper.transform(I(-e.x+o-d,-e.y+c,H)+v(-s),p),t.fwrapper.transform(I(-e.x+R.x+o,-e.y+R.y+c,H)+v(-s),p),a.opts.gradients&&(n[0]&&(_.x=100-_.x),n[1]&&(_.y=100-_.y),h["box-shadow"]="0 0 20px rgba(0,0,0,"+.5*F+")",U.css(h),b(t.ashadow,C(G?100:0,O?0:100),C(_.x,_.y),[[x,"rgba(0,0,0,0)"],[.8*(1-x)+x,"rgba(0,0,0,"+.2*D+")"],[1,"rgba(255,255,255,"+.2*D+")"]],3),g._backGradient.call(T)&&b(t.bshadow,C(G?0:100,O?0:100),C(S.x,S.y),[[.6,"rgba(0,0,0,0)"],[.8,"rgba(0,0,0,"+.3*D+")"],[1,"rgba(0,0,0,0)"]],3))};switch(e.corner){case"l":case"r":break;case"tl":e.x=Math.max(e.x,1),K(),q(L,[1,0,0,1],[100,0],M);break;case"tr":e.x=Math.min(e.x,l-1),K(),q(C(-L.x,L.y),[0,0,0,1],[0,0],-M);break;case"bl":e.x=Math.max(e.x,1),K(),q(C(L.x,-L.y),[1,1,0,0],[100,100],-M);break;case"br":e.x=Math.min(e.x,l-1),K(),q(C(-L.x,-L.y),[0,1,1,0],[0,100],M)}}t.point=e},_moveFoldingPage:function(e){var t=this.data().f;if(t){var i=t.opts.turn,n=i.data(),s=n.pagePlace;if(e){var r=t.opts.next;if(s[r]!=t.opts.page)t.folding&&g._moveFoldingPage.call(this,!1),g._foldingPage.call(this).appendTo(t.fpage),s[r]=t.opts.page,t.folding=r;i.turn("update")}else if(t.folding){if(n.pages[t.folding]){var a=n.pages[t.folding].data().f;n.pageObjs[t.folding].appendTo(a.wrapper)}else n.pageWrap[t.folding]&&n.pageObjs[t.folding].appendTo(n.pageWrap[t.folding]);t.folding in s&&(s[t.folding]=t.folding),delete t.folding}}},_showFoldedPage:function(t,i){e("#book_main").css("cursor","pointer");var n=g._foldingPage.call(this),s=this.data(),r=s.f,a=r.visible;if(n){if(!a||!r.point||r.point.corner!=t.corner){var o="hover"==r.status||"peel"==r.status||r.opts.turn.data().mouseAction?t.corner:null;if(a=!1,"prevented"==E("start",this,[r.opts,o]))return!1}if(i){var l=this,A=r.point&&r.point.corner==t.corner?r.point:g._c.call(this,t.corner,1);this.animatef({from:[A.x,A.y],to:[t.x,t.y],duration:500,frame:function(e){t.x=Math.round(e[0]),t.y=Math.round(e[1]),g._fold.call(l,t)}})}else g._fold.call(this,t),s.effect&&!s.effect.turning&&this.animatef(!1);if(!a)switch(r.effect){case"hard":r.visible=!0,g._moveFoldingPage.call(this,!0),r.fpage.show(),r.opts.shadows&&r.bshadow.show();break;case"sheet":r.visible=!0,r.fparent.show().data().flips++,g._moveFoldingPage.call(this,!0),r.fwrapper.show(),r.bshadow&&r.bshadow.show()}return!0}return!1},hide:function(){var e=this.data().f,t=e.opts.turn.data(),i=g._foldingPage.call(this);switch(e.effect){case"hard":t.opts.gradients&&(e.bshadowLoc=0,e.bshadow.remove(),e.ashadow.hide()),e.wrapper.transform(""),e.fpage.hide();break;case"sheet":0==--e.fparent.data().flips&&e.fparent.hide(),this.css({left:0,top:0,right:"auto",bottom:"auto"}).transform(""),e.wrapper.transform(""),e.fwrapper.hide(),e.bshadow&&e.bshadow.hide(),i.transform("")}return e.visible=!1,this},hideFoldedPage:function(t){e("#book_main").css("cursor","initial");var i=this.data().f;if(i.point){var n=this,s=i.point,r=function(){i.point=null,i.status="",n.flip("hide"),n.trigger("end",[i.opts,!1])};if(t){var a=g._c.call(this,s.corner),o="t"==s.corner.substr(0,1)?Math.min(0,s.y-a.y)/2:Math.max(0,s.y-a.y)/2,l=C(s.x,s.y+o),A=C(a.x,a.y-o);this.animatef({from:0,to:1,frame:function(e){var t=m(s,l,A,a,e);s.x=t.x,s.y=t.y,g._fold.call(n,s)},complete:r,duration:800,hiding:!0})}else this.animatef(!1),r()}},turnPage:function(e){var t=this,i=this.data().f,n=i.opts.turn.data();e={corner:i.corner?i.corner.corner:e||g._cAllowed.call(this)[0]};var s=i.point||g._c.call(this,e.corner,i.opts.turn?n.opts.elevation:0),r=g._c2.call(this,e.corner);this.trigger("flip").animatef({from:0,to:1,frame:function(i){var n=m(s,s,r,r,i);e.x=n.x,e.y=n.y,g._showFoldedPage.call(t,e)},complete:function(){t.trigger("end",[i.opts,!0])},duration:n.opts.duration,turning:!0}),i.corner=null},moving:function(){return"effect"in this.data()},isTurning:function(){return this.flip("moving")&&this.data().effect.turning},corner:function(){return this.data().f.corner},_eventStart:function(e){var t=this.data().f,i=t.opts.turn;if(!t.corner&&!t.disabled&&!this.flip("isTurning")&&(t.opts.page==i.data().pagePlace[t.opts.page]||i.data("single_fast_pageing"))){if(t.corner=g._isIArea.call(this,e),t.corner&&g._foldingPage.call(this))return this.trigger("pressed",[t.point]),g._showFoldedPage.call(this,t.corner),!1;t.corner=null}},_eventMove:function(e){var t=this.data().f;if(!t.disabled)if(e=a?e.originalEvent.touches:[e],t.corner){var i=t.parent.offset();t.corner.x=e[0].pageX-i.left,t.corner.y=e[0].pageY-i.top,g._showFoldedPage.call(this,t.corner)}else if(t.hover&&!this.data().effect&&this.is(":visible")){var n=g._isIArea.call(this,e[0]);if(n){if("sheet"==t.effect&&2==n.corner.length||"hard"==t.effect){t.status="hover";var s=g._c.call(this,n.corner,t.opts.cornerSize/2);n.x=s.x,n.y=s.y,g._showFoldedPage.call(this,n,!0)}}else"hover"==t.status&&(t.status="",g.hideFoldedPage.call(this,!0))}},_eventEnd:function(){var e=this.data().f,t=e.corner;!e.disabled&&t&&"prevented"!=E("released",this,[e.point||t])&&g.hideFoldedPage.call(this,!0),e.corner=null},disable:function(e){return g.setData.call(this,{disabled:e}),this},hover:function(e){return g.setData.call(this,{hover:e}),this},peel:function(t,i){var n=this.data().f;if(t){if(-1==e.inArray(t,l.all))throw w("Corner "+t+" is not permitted");if(-1!=e.inArray(t,g._cAllowed.call(this))){var s=g._c.call(this,t,n.opts.cornerSize/2);n.status="peel",g._showFoldedPage.call(this,{corner:t,x:s.x,y:s.y},i)}}else n.status="",g.hideFoldedPage.call(this,i);return this}};function p(e,t,i){if(i[0]&&"object"!=typeof i[0]){if(t[i[0]])return t[i[0]].apply(e,Array.prototype.slice.call(i,1));throw w(i[0]+" is not a method or property")}return t.init.apply(e,i)}function f(e,t,i,n){return{css:{position:"absolute",top:e,left:t,overflow:n||"hidden",zIndex:i||"auto"}}}function m(e,t,i,n,s){var r=1-s,a=r*r*r,o=s*s*s;return C(Math.round(a*e.x+3*s*r*r*t.x+3*s*s*r*i.x+o*n.x),Math.round(a*e.y+3*s*r*r*t.y+3*s*s*r*i.y+o*n.y))}function C(e,t){return{x:e,y:t}}function I(e,i,n){return t&&n?" translate3d("+e+"px,"+i+"px, 0px) ":" translate("+e+"px, "+i+"px) "}function v(e){return" rotate("+e+"deg) "}function B(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function y(){for(var e=["Moz","Webkit","Khtml","O","ms"],t=e.length,i="";t--;)e[t]+"Transform"in document.body.style&&(i="-"+e[t].toLowerCase()+"-");return i}function b(e,t,i,s,r){var a,o=[];if("-webkit-"==n){for(a=0;a<r;a++)o.push("color-stop("+s[a][0]+", "+s[a][1]+")");e.css({"background-image":"-webkit-gradient(linear, "+t.x+"% "+t.y+"%,"+i.x+"% "+i.y+"%, "+o.join(",")+" )"})}else{t={x:t.x/100*e.width(),y:t.y/100*e.height()};var l=(i={x:i.x/100*e.width(),y:i.y/100*e.height()}).x-t.x,A=i.y-t.y,c=Math.atan2(A,l),u=c-Math.PI/2,h=Math.abs(e.width()*Math.sin(u))+Math.abs(e.height()*Math.cos(u)),d=Math.sqrt(A*A+l*l),g=C(i.x<t.x?e.width():0,i.y<t.y?e.height():0),p=Math.tan(c),f=-1/p,m=(f*g.x-g.y-p*t.x+t.y)/(f-p),I={x:m,y:f*m-f*g.x+g.y},v=Math.sqrt(Math.pow(I.x-t.x,2)+Math.pow(I.y-t.y,2));for(a=0;a<r;a++)o.push(" "+s[a][1]+" "+100*(v+d*s[a][0])/h+"%");e.css({"background-image":n+"linear-gradient("+-c+"rad,"+o.join(",")+")"})}}function E(t,i,n){var s=e.Event(t);return i.trigger(s,n),s.isDefaultPrevented()?"prevented":s.isPropagationStopped()?"stopped":""}function w(e){function t(e){this.name="TurnJsError",this.message=e}return t.prototype=new Error,t.prototype.constructor=t,new t(e)}function Q(e){var t={top:0,left:0};do{t.left+=e.offsetLeft,t.top+=e.offsetTop}while(e=e.offsetParent);return t}window.requestAnim=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},e.extend(e.fn,{flip:function(){return p(e(this[0]),g,arguments)},turn:function(){return p(e(this[0]),d,arguments)},transform:function(e,t){var i={};return t&&(i[n+"transform-origin"]=t),i[n+"transform"]=e,this.css(i)},animatef:function(t){var i=this.data();if(i.effect&&i.effect.stop(),t){t.to.length||(t.to=[t.to]),t.from.length||(t.from=[t.from]);for(var n=[],s=t.to.length,r=!0,a=this,o=(new Date).getTime(),l=function(){if(i.effect&&r){for(var e=[],A=Math.min(t.duration,(new Date).getTime()-o),c=0;c<s;c++)e.push(i.effect.easing(1,A,t.from[c],n[c],t.duration));t.frame(1==s?e[0]:e),A==t.duration?(delete i.effect,a.data(i),t.complete&&t.complete()):window.requestAnim(l)}},A=0;A<s;A++)n.push(t.to[A]-t.from[A]);i.effect=e.extend({stop:function(){r=!1},easing:function(e,t,i,n,s){return n*Math.sqrt(1-(t=t/s-1)*t)+i}},t),this.data(i),l()}else delete i.effect}}),e.isTouch=a,e.mouseEvents=o,e.cssPrefix=y,e.cssTransitionEnd=function(){var e,t=document.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MSTransition:"transitionend",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in i)if(void 0!==t.style[e])return i[e]},e.findPos=Q,window.page_pressed=!0}(PC),function(){function e(e,t){var i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function t(t,i,n,s,r,a){return e((o=e(e(i,t),e(s,a)))<<(l=r)|o>>>32-l,n);var o,l}function i(e,i,n,s,r,a,o){return t(i&n|~i&s,e,i,r,a,o)}function n(e,i,n,s,r,a,o){return t(i&s|n&~s,e,i,r,a,o)}function s(e,i,n,s,r,a,o){return t(i^n^s,e,i,r,a,o)}function r(e,i,n,s,r,a,o){return t(n^(i|~s),e,i,r,a,o)}function a(t,a){var o,l,A,c,u;t[a>>5]|=128<<a%32,t[14+(a+64>>>9<<4)]=a;var h=1732584193,d=-271733879,g=-1732584194,p=271733878;for(o=0;o<t.length;o+=16)l=h,A=d,c=g,u=p,h=i(h,d,g,p,t[o],7,-680876936),p=i(p,h,d,g,t[o+1],12,-389564586),g=i(g,p,h,d,t[o+2],17,606105819),d=i(d,g,p,h,t[o+3],22,-1044525330),h=i(h,d,g,p,t[o+4],7,-176418897),p=i(p,h,d,g,t[o+5],12,1200080426),g=i(g,p,h,d,t[o+6],17,-1473231341),d=i(d,g,p,h,t[o+7],22,-45705983),h=i(h,d,g,p,t[o+8],7,1770035416),p=i(p,h,d,g,t[o+9],12,-1958414417),g=i(g,p,h,d,t[o+10],17,-42063),d=i(d,g,p,h,t[o+11],22,-1990404162),h=i(h,d,g,p,t[o+12],7,1804603682),p=i(p,h,d,g,t[o+13],12,-40341101),g=i(g,p,h,d,t[o+14],17,-1502002290),h=n(h,d=i(d,g,p,h,t[o+15],22,1236535329),g,p,t[o+1],5,-165796510),p=n(p,h,d,g,t[o+6],9,-1069501632),g=n(g,p,h,d,t[o+11],14,643717713),d=n(d,g,p,h,t[o],20,-373897302),h=n(h,d,g,p,t[o+5],5,-701558691),p=n(p,h,d,g,t[o+10],9,38016083),g=n(g,p,h,d,t[o+15],14,-660478335),d=n(d,g,p,h,t[o+4],20,-405537848),h=n(h,d,g,p,t[o+9],5,568446438),p=n(p,h,d,g,t[o+14],9,-1019803690),g=n(g,p,h,d,t[o+3],14,-187363961),d=n(d,g,p,h,t[o+8],20,1163531501),h=n(h,d,g,p,t[o+13],5,-1444681467),p=n(p,h,d,g,t[o+2],9,-51403784),g=n(g,p,h,d,t[o+7],14,1735328473),h=s(h,d=n(d,g,p,h,t[o+12],20,-1926607734),g,p,t[o+5],4,-378558),p=s(p,h,d,g,t[o+8],11,-2022574463),g=s(g,p,h,d,t[o+11],16,1839030562),d=s(d,g,p,h,t[o+14],23,-35309556),h=s(h,d,g,p,t[o+1],4,-1530992060),p=s(p,h,d,g,t[o+4],11,1272893353),g=s(g,p,h,d,t[o+7],16,-155497632),d=s(d,g,p,h,t[o+10],23,-1094730640),h=s(h,d,g,p,t[o+13],4,681279174),p=s(p,h,d,g,t[o],11,-358537222),g=s(g,p,h,d,t[o+3],16,-722521979),d=s(d,g,p,h,t[o+6],23,76029189),h=s(h,d,g,p,t[o+9],4,-640364487),p=s(p,h,d,g,t[o+12],11,-421815835),g=s(g,p,h,d,t[o+15],16,530742520),h=r(h,d=s(d,g,p,h,t[o+2],23,-995338651),g,p,t[o],6,-198630844),p=r(p,h,d,g,t[o+7],10,1126891415),g=r(g,p,h,d,t[o+14],15,-1416354905),d=r(d,g,p,h,t[o+5],21,-57434055),h=r(h,d,g,p,t[o+12],6,1700485571),p=r(p,h,d,g,t[o+3],10,-1894986606),g=r(g,p,h,d,t[o+10],15,-1051523),d=r(d,g,p,h,t[o+1],21,-2054922799),h=r(h,d,g,p,t[o+8],6,1873313359),p=r(p,h,d,g,t[o+15],10,-30611744),g=r(g,p,h,d,t[o+6],15,-1560198380),d=r(d,g,p,h,t[o+13],21,1309151649),h=r(h,d,g,p,t[o+4],6,-145523070),p=r(p,h,d,g,t[o+11],10,-1120210379),g=r(g,p,h,d,t[o+2],15,718787259),d=r(d,g,p,h,t[o+9],21,-343485551),h=e(h,l),d=e(d,A),g=e(g,c),p=e(p,u);return[h,d,g,p]}function o(e){var t,i="",n=32*e.length;for(t=0;t<n;t+=8)i+=String.fromCharCode(e[t>>5]>>>t%32&255);return i}function l(e){var t,i=[];for(i[(e.length>>2)-1]=void 0,t=0;t<i.length;t+=1)i[t]=0;var n=8*e.length;for(t=0;t<n;t+=8)i[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return i}function A(e){var t,i,n="0123456789abcdef",s="";for(i=0;i<e.length;i+=1)t=e.charCodeAt(i),s+=n.charAt(t>>>4&15)+n.charAt(15&t);return s}function c(e){return unescape(encodeURIComponent(e))}function u(e){return function(e){return o(a(l(e),8*e.length))}(c(e))}function h(e,t){return function(e,t){var i,n,s=l(e),r=[],A=[];for(r[15]=A[15]=void 0,s.length>16&&(s=a(s,8*e.length)),i=0;i<16;i+=1)r[i]=909522486^s[i],A[i]=1549556828^s[i];return n=a(r.concat(l(t)),512+8*t.length),o(a(A.concat(n),640))}(c(e),c(t))}function d(e,t,i){return t?i?h(t,e):A(h(t,e)):i?u(e):A(u(e))}"function"==typeof define&&define.amd?define((function(){return d})):"object"==typeof module&&module.exports?module.exports=d:window.md5=d}();const Tnt={install(e){!function(e){e.use(CTe)}(e)}},Mnt=fC(NLe);for(const[_,dx]of Object.entries(pj))Mnt.component(_,dx);Mnt.use(Tnt),Mnt.use(AAe,{zIndex:5e3}),Mnt.directive("visibility",knt),Mnt.mount("#app");
