@hatiolab/things-scene 3.2.16 → 3.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/things-scene.mjs CHANGED
@@ -1,2 +1,2 @@
1
- var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=function(t){return t&&t.Math==Math&&t},r=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),n={},i=function(t){try{return!!t()}catch(t){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),s=o,c=Function.prototype.call,u=s?c.bind(c):function(){return c.apply(c,arguments)},l={},h={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,d=f&&!h.call({1:2},1);l.f=d?function(t){var e=f(this,t);return!!e&&e.enumerable}:h;var p,g,v=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},m=o,y=Function.prototype,b=y.call,x=m&&y.bind.bind(b,b),w=m?x:function(t){return function(){return b.apply(t,arguments)}},A=w,_=A({}.toString),k=A("".slice),E=function(t){return k(_(t),8,-1)},S=i,M=E,T=Object,P=w("".split),O=S((function(){return!T("z").propertyIsEnumerable(0)}))?function(t){return"String"==M(t)?P(t,""):T(t)}:T,I=function(t){return null==t},R=I,C=TypeError,j=function(t){if(R(t))throw C("Can't call method on "+t);return t},D=O,L=j,z=function(t){return D(L(t))},F="object"==typeof document&&document.all,B={all:F,IS_HTMLDDA:void 0===F&&void 0!==F},N=B.all,U=B.IS_HTMLDDA?function(t){return"function"==typeof t||t===N}:function(t){return"function"==typeof t},Y=U,G=B.all,H=B.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:Y(t)||t===G}:function(t){return"object"==typeof t?null!==t:Y(t)},W=r,q=U,X=function(t){return q(t)?t:void 0},V=function(t,e){return arguments.length<2?X(W[t]):W[t]&&W[t][e]},Q=w({}.isPrototypeOf),K="undefined"!=typeof navigator&&String(navigator.userAgent)||"",J=r,Z=K,$=J.process,tt=J.Deno,et=$&&$.versions||tt&&tt.version,rt=et&&et.v8;rt&&(g=(p=rt.split("."))[0]>0&&p[0]<4?1:+(p[0]+p[1])),!g&&Z&&(!(p=Z.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=Z.match(/Chrome\/(\d+)/))&&(g=+p[1]);var nt=g,it=nt,at=i,ot=!!Object.getOwnPropertySymbols&&!at((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&it&&it<41})),st=ot&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ct=V,ut=U,lt=Q,ht=Object,ft=st?function(t){return"symbol"==typeof t}:function(t){var e=ct("Symbol");return ut(e)&&lt(e.prototype,ht(t))},dt=String,pt=function(t){try{return dt(t)}catch(t){return"Object"}},gt=U,vt=pt,mt=TypeError,yt=function(t){if(gt(t))return t;throw mt(vt(t)+" is not a function")},bt=yt,xt=I,wt=function(t,e){var r=t[e];return xt(r)?void 0:bt(r)},At=u,_t=U,kt=H,Et=TypeError,St=function(t,e){var r,n;if("string"===e&&_t(r=t.toString)&&!kt(n=At(r,t)))return n;if(_t(r=t.valueOf)&&!kt(n=At(r,t)))return n;if("string"!==e&&_t(r=t.toString)&&!kt(n=At(r,t)))return n;throw Et("Can't convert object to primitive value")},Mt={exports:{}},Tt=r,Pt=Object.defineProperty,Ot=function(t,e){try{Pt(Tt,t,{value:e,configurable:!0,writable:!0})}catch(r){Tt[t]=e}return e},It=Ot,Rt="__core-js_shared__",Ct=r[Rt]||It(Rt,{}),jt=Ct;(Mt.exports=function(t,e){return jt[t]||(jt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.28.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.28.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Dt=j,Lt=Object,zt=function(t){return Lt(Dt(t))},Ft=zt,Bt=w({}.hasOwnProperty),Nt=Object.hasOwn||function(t,e){return Bt(Ft(t),e)},Ut=w,Yt=0,Gt=Math.random(),Ht=Ut(1..toString),Wt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Ht(++Yt+Gt,36)},qt=r,Xt=Mt.exports,Vt=Nt,Qt=Wt,Kt=ot,Jt=st,Zt=qt.Symbol,$t=Xt("wks"),te=Jt?Zt.for||Zt:Zt&&Zt.withoutSetter||Qt,ee=function(t){return Vt($t,t)||($t[t]=Kt&&Vt(Zt,t)?Zt[t]:te("Symbol."+t)),$t[t]},re=u,ne=H,ie=ft,ae=wt,oe=St,se=TypeError,ce=ee("toPrimitive"),ue=function(t,e){if(!ne(t)||ie(t))return t;var r,n=ae(t,ce);if(n){if(void 0===e&&(e="default"),r=re(n,t,e),!ne(r)||ie(r))return r;throw se("Can't convert object to primitive value")}return void 0===e&&(e="number"),oe(t,e)},le=ue,he=ft,fe=function(t){var e=le(t,"string");return he(e)?e:e+""},de=H,pe=r.document,ge=de(pe)&&de(pe.createElement),ve=function(t){return ge?pe.createElement(t):{}},me=ve,ye=!a&&!i((function(){return 7!=Object.defineProperty(me("div"),"a",{get:function(){return 7}}).a})),be=a,xe=u,we=l,Ae=v,_e=z,ke=fe,Ee=Nt,Se=ye,Me=Object.getOwnPropertyDescriptor;n.f=be?Me:function(t,e){if(t=_e(t),e=ke(e),Se)try{return Me(t,e)}catch(t){}if(Ee(t,e))return Ae(!xe(we.f,t,e),t[e])};var Te={},Pe=a&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe=H,Ie=String,Re=TypeError,Ce=function(t){if(Oe(t))return t;throw Re(Ie(t)+" is not an object")},je=a,De=ye,Le=Pe,ze=Ce,Fe=fe,Be=TypeError,Ne=Object.defineProperty,Ue=Object.getOwnPropertyDescriptor,Ye="enumerable",Ge="configurable",He="writable";Te.f=je?Le?function(t,e,r){if(ze(t),e=Fe(e),ze(r),"function"==typeof t&&"prototype"===e&&"value"in r&&He in r&&!r[He]){var n=Ue(t,e);n&&n[He]&&(t[e]=r.value,r={configurable:Ge in r?r[Ge]:n[Ge],enumerable:Ye in r?r[Ye]:n[Ye],writable:!1})}return Ne(t,e,r)}:Ne:function(t,e,r){if(ze(t),e=Fe(e),ze(r),De)try{return Ne(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Be("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var We=Te,qe=v,Xe=a?function(t,e,r){return We.f(t,e,qe(1,r))}:function(t,e,r){return t[e]=r,t},Ve={exports:{}},Qe=a,Ke=Nt,Je=Function.prototype,Ze=Qe&&Object.getOwnPropertyDescriptor,$e=Ke(Je,"name"),tr={EXISTS:$e,PROPER:$e&&"something"===function(){}.name,CONFIGURABLE:$e&&(!Qe||Qe&&Ze(Je,"name").configurable)},er=U,rr=Ct,nr=w(Function.toString);er(rr.inspectSource)||(rr.inspectSource=function(t){return nr(t)});var ir,ar,or,sr=rr.inspectSource,cr=U,ur=r.WeakMap,lr=cr(ur)&&/native code/.test(String(ur)),hr=Mt.exports,fr=Wt,dr=hr("keys"),pr=function(t){return dr[t]||(dr[t]=fr(t))},gr={},vr=lr,mr=r,yr=H,br=Xe,xr=Nt,wr=Ct,Ar=pr,_r=gr,kr="Object already initialized",Er=mr.TypeError,Sr=mr.WeakMap;if(vr||wr.state){var Mr=wr.state||(wr.state=new Sr);Mr.get=Mr.get,Mr.has=Mr.has,Mr.set=Mr.set,ir=function(t,e){if(Mr.has(t))throw Er(kr);return e.facade=t,Mr.set(t,e),e},ar=function(t){return Mr.get(t)||{}},or=function(t){return Mr.has(t)}}else{var Tr=Ar("state");_r[Tr]=!0,ir=function(t,e){if(xr(t,Tr))throw Er(kr);return e.facade=t,br(t,Tr,e),e},ar=function(t){return xr(t,Tr)?t[Tr]:{}},or=function(t){return xr(t,Tr)}}var Pr={set:ir,get:ar,has:or,enforce:function(t){return or(t)?ar(t):ir(t,{})},getterFor:function(t){return function(e){var r;if(!yr(e)||(r=ar(e)).type!==t)throw Er("Incompatible receiver, "+t+" required");return r}}},Or=w,Ir=i,Rr=U,Cr=Nt,jr=a,Dr=tr.CONFIGURABLE,Lr=sr,zr=Pr.enforce,Fr=Pr.get,Br=String,Nr=Object.defineProperty,Ur=Or("".slice),Yr=Or("".replace),Gr=Or([].join),Hr=jr&&!Ir((function(){return 8!==Nr((function(){}),"length",{value:8}).length})),Wr=String(String).split("String"),qr=Ve.exports=function(t,e,r){"Symbol("===Ur(Br(e),0,7)&&(e="["+Yr(Br(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Cr(t,"name")||Dr&&t.name!==e)&&(jr?Nr(t,"name",{value:e,configurable:!0}):t.name=e),Hr&&r&&Cr(r,"arity")&&t.length!==r.arity&&Nr(t,"length",{value:r.arity});try{r&&Cr(r,"constructor")&&r.constructor?jr&&Nr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=zr(t);return Cr(n,"source")||(n.source=Gr(Wr,"string"==typeof e?e:"")),t};Function.prototype.toString=qr((function(){return Rr(this)&&Fr(this).source||Lr(this)}),"toString");var Xr=U,Vr=Te,Qr=Ve.exports,Kr=Ot,Jr=function(t,e,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:e;if(Xr(r)&&Qr(r,a,n),n.global)i?t[e]=r:Kr(e,r);else{try{n.unsafe?t[e]&&(i=!0):delete t[e]}catch(t){}i?t[e]=r:Vr.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},Zr={},$r=Math.ceil,tn=Math.floor,en=Math.trunc||function(t){var e=+t;return(e>0?tn:$r)(e)},rn=en,nn=function(t){var e=+t;return e!=e||0===e?0:rn(e)},an=nn,on=Math.max,sn=Math.min,cn=function(t,e){var r=an(t);return r<0?on(r+e,0):sn(r,e)},un=nn,ln=Math.min,hn=function(t){return t>0?ln(un(t),9007199254740991):0},fn=hn,dn=function(t){return fn(t.length)},pn=z,gn=cn,vn=dn,mn=function(t){return function(e,r,n){var i,a=pn(e),o=vn(a),s=gn(n,o);if(t&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((t||s in a)&&a[s]===r)return t||s||0;return!t&&-1}},yn={includes:mn(!0),indexOf:mn(!1)},bn=Nt,xn=z,wn=yn.indexOf,An=gr,_n=w([].push),kn=function(t,e){var r,n=xn(t),i=0,a=[];for(r in n)!bn(An,r)&&bn(n,r)&&_n(a,r);for(;e.length>i;)bn(n,r=e[i++])&&(~wn(a,r)||_n(a,r));return a},En=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Sn=kn,Mn=En.concat("length","prototype");Zr.f=Object.getOwnPropertyNames||function(t){return Sn(t,Mn)};var Tn={};Tn.f=Object.getOwnPropertySymbols;var Pn=V,On=Zr,In=Tn,Rn=Ce,Cn=w([].concat),jn=Pn("Reflect","ownKeys")||function(t){var e=On.f(Rn(t)),r=In.f;return r?Cn(e,r(t)):e},Dn=Nt,Ln=jn,zn=n,Fn=Te,Bn=function(t,e,r){for(var n=Ln(e),i=Fn.f,a=zn.f,o=0;o<n.length;o++){var s=n[o];Dn(t,s)||r&&Dn(r,s)||i(t,s,a(e,s))}},Nn=i,Un=U,Yn=/#|\.prototype\./,Gn=function(t,e){var r=Wn[Hn(t)];return r==Xn||r!=qn&&(Un(e)?Nn(e):!!e)},Hn=Gn.normalize=function(t){return String(t).replace(Yn,".").toLowerCase()},Wn=Gn.data={},qn=Gn.NATIVE="N",Xn=Gn.POLYFILL="P",Vn=Gn,Qn=r,Kn=n.f,Jn=Xe,Zn=Jr,$n=Ot,ti=Bn,ei=Vn,ri=function(t,e){var r,n,i,a,o,s=t.target,c=t.global,u=t.stat;if(r=c?Qn:u?Qn[s]||$n(s,{}):(Qn[s]||{}).prototype)for(n in e){if(a=e[n],i=t.dontCallGetSet?(o=Kn(r,n))&&o.value:r[n],!ei(c?n:s+(u?".":"#")+n,t.forced)&&void 0!==i){if(typeof a==typeof i)continue;ti(a,i)}(t.sham||i&&i.sham)&&Jn(a,"sham",!0),Zn(r,n,a,t)}},ni={};ni[ee("toStringTag")]="z";var ii="[object z]"===String(ni),ai=ii,oi=U,si=E,ci=ee("toStringTag"),ui=Object,li="Arguments"==si(function(){return arguments}()),hi=ai?si:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=ui(t),ci))?r:li?si(e):"Object"==(n=si(e))&&oi(e.callee)?"Arguments":n},fi=hi,di=String,pi=function(t){if("Symbol"===fi(t))throw TypeError("Cannot convert a Symbol value to a string");return di(t)},gi={},vi=kn,mi=En,yi=Object.keys||function(t){return vi(t,mi)},bi=a,xi=Pe,wi=Te,Ai=Ce,_i=z,ki=yi;gi.f=bi&&!xi?Object.defineProperties:function(t,e){Ai(t);for(var r,n=_i(e),i=ki(e),a=i.length,o=0;a>o;)wi.f(t,r=i[o++],n[r]);return t};var Ei,Si=V("document","documentElement"),Mi=Ce,Ti=gi,Pi=En,Oi=gr,Ii=Si,Ri=ve,Ci="prototype",ji="script",Di=pr("IE_PROTO"),Li=function(){},zi=function(t){return"<"+ji+">"+t+"</"+ji+">"},Fi=function(t){t.write(zi("")),t.close();var e=t.parentWindow.Object;return t=null,e},Bi=function(){try{Ei=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;Bi="undefined"!=typeof document?document.domain&&Ei?Fi(Ei):(e=Ri("iframe"),r="java"+ji+":",e.style.display="none",Ii.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(zi("document.F=Object")),t.close(),t.F):Fi(Ei);for(var n=Pi.length;n--;)delete Bi[Ci][Pi[n]];return Bi()};Oi[Di]=!0;var Ni=Object.create||function(t,e){var r;return null!==t?(Li[Ci]=Mi(t),r=new Li,Li[Ci]=null,r[Di]=t):r=Bi(),void 0===e?r:Ti.f(r,e)},Ui={},Yi=fe,Gi=Te,Hi=v,Wi=function(t,e,r){var n=Yi(e);n in t?Gi.f(t,n,Hi(0,r)):t[n]=r},qi=cn,Xi=dn,Vi=Wi,Qi=Array,Ki=Math.max,Ji=function(t,e,r){for(var n=Xi(t),i=qi(e,n),a=qi(void 0===r?n:r,n),o=Qi(Ki(a-i,0)),s=0;i<a;i++,s++)Vi(o,s,t[i]);return o.length=s,o},Zi=E,$i=z,ta=Zr.f,ea=Ji,ra="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ui.f=function(t){return ra&&"Window"==Zi(t)?function(t){try{return ta(t)}catch(t){return ea(ra)}}(t):ta($i(t))};var na=Ve.exports,ia=Te,aa=function(t,e,r){return r.get&&na(r.get,e,{getter:!0}),r.set&&na(r.set,e,{setter:!0}),ia.f(t,e,r)},oa={},sa=ee;oa.f=sa;var ca=r,ua=ca,la=Nt,ha=oa,fa=Te.f,da=function(t){var e=ua.Symbol||(ua.Symbol={});la(e,t)||fa(e,t,{value:ha.f(t)})},pa=u,ga=V,va=ee,ma=Jr,ya=function(){var t=ga("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=va("toPrimitive");e&&!e[n]&&ma(e,n,(function(t){return pa(r,this)}),{arity:1})},ba=Te.f,xa=Nt,wa=ee("toStringTag"),Aa=function(t,e,r){t&&!r&&(t=t.prototype),t&&!xa(t,wa)&&ba(t,wa,{configurable:!0,value:e})},_a=E,ka=w,Ea=function(t){if("Function"===_a(t))return ka(t)},Sa=yt,Ma=o,Ta=Ea(Ea.bind),Pa=function(t,e){return Sa(t),void 0===e?t:Ma?Ta(t,e):function(){return t.apply(e,arguments)}},Oa=E,Ia=Array.isArray||function(t){return"Array"==Oa(t)},Ra=w,Ca=i,ja=U,Da=hi,La=sr,za=function(){},Fa=[],Ba=V("Reflect","construct"),Na=/^\s*(?:class|function)\b/,Ua=Ra(Na.exec),Ya=!Na.exec(za),Ga=function(t){if(!ja(t))return!1;try{return Ba(za,Fa,t),!0}catch(t){return!1}},Ha=function(t){if(!ja(t))return!1;switch(Da(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ya||!!Ua(Na,La(t))}catch(t){return!0}};Ha.sham=!0;var Wa=!Ba||Ca((function(){var t;return Ga(Ga.call)||!Ga(Object)||!Ga((function(){t=!0}))||t}))?Ha:Ga,qa=Ia,Xa=Wa,Va=H,Qa=ee("species"),Ka=Array,Ja=function(t){var e;return qa(t)&&(e=t.constructor,(Xa(e)&&(e===Ka||qa(e.prototype))||Va(e)&&null===(e=e[Qa]))&&(e=void 0)),void 0===e?Ka:e},Za=function(t,e){return new(Ja(t))(0===e?0:e)},$a=Pa,to=O,eo=zt,ro=dn,no=Za,io=w([].push),ao=function(t){var e=1==t,r=2==t,n=3==t,i=4==t,a=6==t,o=7==t,s=5==t||a;return function(c,u,l,h){for(var f,d,p=eo(c),g=to(p),v=$a(u,l),m=ro(g),y=0,b=h||no,x=e?b(c,m):r||o?b(c,0):void 0;m>y;y++)if((s||y in g)&&(d=v(f=g[y],y,p),t))if(e)x[y]=d;else if(d)switch(t){case 3:return!0;case 5:return f;case 6:return y;case 2:io(x,f)}else switch(t){case 4:return!1;case 7:io(x,f)}return a?-1:n||i?i:x}},oo={forEach:ao(0),map:ao(1),filter:ao(2),some:ao(3),every:ao(4),find:ao(5),findIndex:ao(6),filterReject:ao(7)},so=ri,co=r,uo=u,lo=w,ho=a,fo=ot,po=i,go=Nt,vo=Q,mo=Ce,yo=z,bo=fe,xo=pi,wo=v,Ao=Ni,_o=yi,ko=Zr,Eo=Ui,So=Tn,Mo=n,To=Te,Po=gi,Oo=l,Io=Jr,Ro=aa,Co=Mt.exports,jo=gr,Do=Wt,Lo=ee,zo=oa,Fo=da,Bo=ya,No=Aa,Uo=Pr,Yo=oo.forEach,Go=pr("hidden"),Ho="Symbol",Wo="prototype",qo=Uo.set,Xo=Uo.getterFor(Ho),Vo=Object[Wo],Qo=co.Symbol,Ko=Qo&&Qo[Wo],Jo=co.TypeError,Zo=co.QObject,$o=Mo.f,ts=To.f,es=Eo.f,rs=Oo.f,ns=lo([].push),is=Co("symbols"),as=Co("op-symbols"),os=Co("wks"),ss=!Zo||!Zo[Wo]||!Zo[Wo].findChild,cs=ho&&po((function(){return 7!=Ao(ts({},"a",{get:function(){return ts(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=$o(Vo,e);n&&delete Vo[e],ts(t,e,r),n&&t!==Vo&&ts(Vo,e,n)}:ts,us=function(t,e){var r=is[t]=Ao(Ko);return qo(r,{type:Ho,tag:t,description:e}),ho||(r.description=e),r},ls=function(t,e,r){t===Vo&&ls(as,e,r),mo(t);var n=bo(e);return mo(r),go(is,n)?(r.enumerable?(go(t,Go)&&t[Go][n]&&(t[Go][n]=!1),r=Ao(r,{enumerable:wo(0,!1)})):(go(t,Go)||ts(t,Go,wo(1,{})),t[Go][n]=!0),cs(t,n,r)):ts(t,n,r)},hs=function(t,e){mo(t);var r=yo(e),n=_o(r).concat(gs(r));return Yo(n,(function(e){ho&&!uo(fs,r,e)||ls(t,e,r[e])})),t},fs=function(t){var e=bo(t),r=uo(rs,this,e);return!(this===Vo&&go(is,e)&&!go(as,e))&&(!(r||!go(this,e)||!go(is,e)||go(this,Go)&&this[Go][e])||r)},ds=function(t,e){var r=yo(t),n=bo(e);if(r!==Vo||!go(is,n)||go(as,n)){var i=$o(r,n);return!i||!go(is,n)||go(r,Go)&&r[Go][n]||(i.enumerable=!0),i}},ps=function(t){var e=es(yo(t)),r=[];return Yo(e,(function(t){go(is,t)||go(jo,t)||ns(r,t)})),r},gs=function(t){var e=t===Vo,r=es(e?as:yo(t)),n=[];return Yo(r,(function(t){!go(is,t)||e&&!go(Vo,t)||ns(n,is[t])})),n};fo||(Qo=function(){if(vo(Ko,this))throw Jo("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?xo(arguments[0]):void 0,e=Do(t),r=function(t){this===Vo&&uo(r,as,t),go(this,Go)&&go(this[Go],e)&&(this[Go][e]=!1),cs(this,e,wo(1,t))};return ho&&ss&&cs(Vo,e,{configurable:!0,set:r}),us(e,t)},Io(Ko=Qo[Wo],"toString",(function(){return Xo(this).tag})),Io(Qo,"withoutSetter",(function(t){return us(Do(t),t)})),Oo.f=fs,To.f=ls,Po.f=hs,Mo.f=ds,ko.f=Eo.f=ps,So.f=gs,zo.f=function(t){return us(Lo(t),t)},ho&&(Ro(Ko,"description",{configurable:!0,get:function(){return Xo(this).description}}),Io(Vo,"propertyIsEnumerable",fs,{unsafe:!0}))),so({global:!0,constructor:!0,wrap:!0,forced:!fo,sham:!fo},{Symbol:Qo}),Yo(_o(os),(function(t){Fo(t)})),so({target:Ho,stat:!0,forced:!fo},{useSetter:function(){ss=!0},useSimple:function(){ss=!1}}),so({target:"Object",stat:!0,forced:!fo,sham:!ho},{create:function(t,e){return void 0===e?Ao(t):hs(Ao(t),e)},defineProperty:ls,defineProperties:hs,getOwnPropertyDescriptor:ds}),so({target:"Object",stat:!0,forced:!fo},{getOwnPropertyNames:ps}),Bo(),No(Qo,Ho),jo[Go]=!0;var vs=ot&&!!Symbol.for&&!!Symbol.keyFor,ms=ri,ys=V,bs=Nt,xs=pi,ws=Mt.exports,As=vs,_s=ws("string-to-symbol-registry"),ks=ws("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!As},{for:function(t){var e=xs(t);if(bs(_s,e))return _s[e];var r=ys("Symbol")(e);return _s[e]=r,ks[r]=e,r}});var Es=ri,Ss=Nt,Ms=ft,Ts=pt,Ps=vs,Os=(0,Mt.exports)("symbol-to-string-registry");Es({target:"Symbol",stat:!0,forced:!Ps},{keyFor:function(t){if(!Ms(t))throw TypeError(Ts(t)+" is not a symbol");if(Ss(Os,t))return Os[t]}});var Is=o,Rs=Function.prototype,Cs=Rs.apply,js=Rs.call,Ds="object"==typeof Reflect&&Reflect.apply||(Is?js.bind(Cs):function(){return js.apply(Cs,arguments)}),Ls=w([].slice),zs=Ia,Fs=U,Bs=E,Ns=pi,Us=w([].push),Ys=ri,Gs=V,Hs=Ds,Ws=u,qs=w,Xs=i,Vs=U,Qs=ft,Ks=Ls,Js=function(t){if(Fs(t))return t;if(zs(t)){for(var e=t.length,r=[],n=0;n<e;n++){var i=t[n];"string"==typeof i?Us(r,i):"number"!=typeof i&&"Number"!=Bs(i)&&"String"!=Bs(i)||Us(r,Ns(i))}var a=r.length,o=!0;return function(t,e){if(o)return o=!1,e;if(zs(this))return e;for(var n=0;n<a;n++)if(r[n]===t)return e}}},Zs=ot,$s=String,tc=Gs("JSON","stringify"),ec=qs(/./.exec),rc=qs("".charAt),nc=qs("".charCodeAt),ic=qs("".replace),ac=qs(1..toString),oc=/[\uD800-\uDFFF]/g,sc=/^[\uD800-\uDBFF]$/,cc=/^[\uDC00-\uDFFF]$/,uc=!Zs||Xs((function(){var t=Gs("Symbol")();return"[null]"!=tc([t])||"{}"!=tc({a:t})||"{}"!=tc(Object(t))})),lc=Xs((function(){return'"\\udf06\\ud834"'!==tc("\udf06\ud834")||'"\\udead"'!==tc("\udead")})),hc=function(t,e){var r=Ks(arguments),n=Js(e);if(Vs(n)||void 0!==t&&!Qs(t))return r[1]=function(t,e){if(Vs(n)&&(e=Ws(n,this,$s(t),e)),!Qs(e))return e},Hs(tc,null,r)},fc=function(t,e,r){var n=rc(r,e-1),i=rc(r,e+1);return ec(sc,t)&&!ec(cc,i)||ec(cc,t)&&!ec(sc,n)?"\\u"+ac(nc(t,0),16):t};tc&&Ys({target:"JSON",stat:!0,arity:3,forced:uc||lc},{stringify:function(t,e,r){var n=Ks(arguments),i=Hs(uc?hc:tc,null,n);return lc&&"string"==typeof i?ic(i,oc,fc):i}});var dc=Tn,pc=zt;ri({target:"Object",stat:!0,forced:!ot||i((function(){dc.f(1)}))},{getOwnPropertySymbols:function(t){var e=dc.f;return e?e(pc(t)):[]}});var gc=ri,vc=a,mc=w,yc=Nt,bc=U,xc=Q,wc=pi,Ac=aa,_c=Bn,kc=r.Symbol,Ec=kc&&kc.prototype;if(vc&&bc(kc)&&(!("description"in Ec)||void 0!==kc().description)){var Sc={},Mc=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:wc(arguments[0]),e=xc(Ec,this)?new kc(t):void 0===t?kc():kc(t);return""===t&&(Sc[e]=!0),e};_c(Mc,kc),Mc.prototype=Ec,Ec.constructor=Mc;var Tc="Symbol(test)"==String(kc("test")),Pc=mc(Ec.valueOf),Oc=mc(Ec.toString),Ic=/^Symbol\((.*)\)[^)]+$/,Rc=mc("".replace),Cc=mc("".slice);Ac(Ec,"description",{configurable:!0,get:function(){var t=Pc(this);if(yc(Sc,t))return"";var e=Oc(t),r=Tc?Cc(e,7,-1):Rc(e,Ic,"$1");return""===r?void 0:r}}),gc({global:!0,constructor:!0,forced:!0},{Symbol:Mc})}da("asyncIterator"),da("hasInstance"),da("isConcatSpreadable"),da("iterator"),da("match"),da("matchAll"),da("replace"),da("search"),da("species"),da("split");var jc=ya;da("toPrimitive"),jc();var Dc=V,Lc=Aa;da("toStringTag"),Lc(Dc("Symbol"),"Symbol"),da("unscopables");var zc=w,Fc=yt,Bc=U,Nc=String,Uc=TypeError,Yc=function(t){if("object"==typeof t||Bc(t))return t;throw Uc("Can't set "+Nc(t)+" as a prototype")},Gc=function(t,e,r){try{return zc(Fc(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},Hc=Ce,Wc=Yc,qc=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Gc(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Hc(r),Wc(n),e?t(r,n):r.__proto__=n,r}}():void 0),Xc=Te.f,Vc=function(t,e,r){r in t||Xc(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})},Qc=U,Kc=H,Jc=qc,Zc=function(t,e,r){var n,i;return Jc&&Qc(n=e.constructor)&&n!==r&&Kc(i=n.prototype)&&i!==r.prototype&&Jc(t,i),t},$c=pi,tu=function(t,e){return void 0===t?arguments.length<2?"":e:$c(t)},eu=H,ru=Xe,nu=function(t,e){eu(e)&&"cause"in e&&ru(t,"cause",e.cause)},iu=Error,au=w("".replace),ou=String(iu("zxcasd").stack),su=/\n\s*at [^:]*:[^\n]*/,cu=su.test(ou),uu=function(t,e){if(cu&&"string"==typeof t&&!iu.prepareStackTrace)for(;e--;)t=au(t,su,"");return t},lu=v,hu=!i((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",lu(1,7)),7!==t.stack)})),fu=Xe,du=uu,pu=hu,gu=Error.captureStackTrace,vu=function(t,e,r,n){pu&&(gu?gu(t,e):fu(t,"stack",du(r,n)))},mu=V,yu=Nt,bu=Xe,xu=Q,wu=qc,Au=Bn,_u=Vc,ku=Zc,Eu=tu,Su=nu,Mu=vu,Tu=a,Pu=function(t,e,r,n){var i="stackTraceLimit",a=n?2:1,o=t.split("."),s=o[o.length-1],c=mu.apply(null,o);if(c){var u=c.prototype;if(yu(u,"cause")&&delete u.cause,!r)return c;var l=mu("Error"),h=e((function(t,e){var r=Eu(n?e:t,void 0),i=n?new c(t):new c;return void 0!==r&&bu(i,"message",r),Mu(i,h,i.stack,2),this&&xu(u,this)&&ku(i,this,h),arguments.length>a&&Su(i,arguments[a]),i}));h.prototype=u,"Error"!==s?wu?wu(h,l):Au(h,l,{name:!0}):Tu&&i in c&&(_u(h,c,i),_u(h,c,"prepareStackTrace")),Au(h,c);try{u.name!==s&&bu(u,"name",s),u.constructor=h}catch(t){}return h}},Ou=ri,Iu=Ds,Ru=Pu,Cu="WebAssembly",ju=r[Cu],Du=7!==Error("e",{cause:7}).cause,Lu=function(t,e){var r={};r[t]=Ru(t,e,Du),Ou({global:!0,constructor:!0,arity:1,forced:Du},r)},zu=function(t,e){if(ju&&ju[t]){var r={};r[t]=Ru(Cu+"."+t,e,Du),Ou({target:Cu,stat:!0,constructor:!0,arity:1,forced:Du},r)}};Lu("Error",(function(t){return function(e){return Iu(t,this,arguments)}})),Lu("EvalError",(function(t){return function(e){return Iu(t,this,arguments)}})),Lu("RangeError",(function(t){return function(e){return Iu(t,this,arguments)}})),Lu("ReferenceError",(function(t){return function(e){return Iu(t,this,arguments)}})),Lu("SyntaxError",(function(t){return function(e){return Iu(t,this,arguments)}})),Lu("TypeError",(function(t){return function(e){return Iu(t,this,arguments)}})),Lu("URIError",(function(t){return function(e){return Iu(t,this,arguments)}})),zu("CompileError",(function(t){return function(e){return Iu(t,this,arguments)}})),zu("LinkError",(function(t){return function(e){return Iu(t,this,arguments)}})),zu("RuntimeError",(function(t){return function(e){return Iu(t,this,arguments)}}));var Fu=a,Bu=i,Nu=Ce,Uu=Ni,Yu=tu,Gu=Error.prototype.toString,Hu=Bu((function(){if(Fu){var t=Uu(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==Gu.call(t))return!0}return"2: 1"!==Gu.call({message:1,name:2})||"Error"!==Gu.call({})}))?function(){var t=Nu(this),e=Yu(t.name,"Error"),r=Yu(t.message);return e?r?e+": "+r:e:r}:Gu,Wu=Jr,qu=Hu,Xu=Error.prototype;Xu.toString!==qu&&Wu(Xu,"toString",qu);var Vu=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Qu=Nt,Ku=U,Ju=zt,Zu=Vu,$u=pr("IE_PROTO"),tl=Object,el=tl.prototype,rl=Zu?tl.getPrototypeOf:function(t){var e=Ju(t);if(Qu(e,$u))return e[$u];var r=e.constructor;return Ku(r)&&e instanceof r?r.prototype:e instanceof tl?el:null},nl={},il=nl,al=ee("iterator"),ol=Array.prototype,sl=function(t){return void 0!==t&&(il.Array===t||ol[al]===t)},cl=hi,ul=wt,ll=I,hl=nl,fl=ee("iterator"),dl=function(t){if(!ll(t))return ul(t,fl)||ul(t,"@@iterator")||hl[cl(t)]},pl=u,gl=yt,vl=Ce,ml=pt,yl=dl,bl=TypeError,xl=function(t,e){var r=arguments.length<2?yl(t):e;if(gl(r))return vl(pl(r,t));throw bl(ml(t)+" is not iterable")},wl=u,Al=Ce,_l=wt,kl=function(t,e,r){var n,i;Al(t);try{if(!(n=_l(t,"return"))){if("throw"===e)throw r;return r}n=wl(n,t)}catch(t){i=!0,n=t}if("throw"===e)throw r;if(i)throw n;return Al(n),r},El=Pa,Sl=u,Ml=Ce,Tl=pt,Pl=sl,Ol=dn,Il=Q,Rl=xl,Cl=dl,jl=kl,Dl=TypeError,Ll=function(t,e){this.stopped=t,this.result=e},zl=Ll.prototype,Fl=function(t,e,r){var n,i,a,o,s,c,u,l=r&&r.that,h=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),g=El(e,l),v=function(t){return n&&jl(n,"normal",t),new Ll(!0,t)},m=function(t){return h?(Ml(t),p?g(t[0],t[1],v):g(t[0],t[1])):p?g(t,v):g(t)};if(f)n=t.iterator;else if(d)n=t;else{if(!(i=Cl(t)))throw Dl(Tl(t)+" is not iterable");if(Pl(i)){for(a=0,o=Ol(t);o>a;a++)if((s=m(t[a]))&&Il(zl,s))return s;return new Ll(!1)}n=Rl(t,i)}for(c=f?t.next:n.next;!(u=Sl(c,n)).done;){try{s=m(u.value)}catch(t){jl(n,"throw",t)}if("object"==typeof s&&s&&Il(zl,s))return s}return new Ll(!1)},Bl=ri,Nl=Q,Ul=rl,Yl=qc,Gl=Bn,Hl=Ni,Wl=Xe,ql=v,Xl=nu,Vl=vu,Ql=Fl,Kl=tu,Jl=ee("toStringTag"),Zl=Error,$l=[].push,th=function(t,e){var r,n=Nl(eh,this);Yl?r=Yl(Zl(),n?Ul(this):eh):(r=n?this:Hl(eh),Wl(r,Jl,"Error")),void 0!==e&&Wl(r,"message",Kl(e)),Vl(r,th,r.stack,1),arguments.length>2&&Xl(r,arguments[2]);var i=[];return Ql(t,$l,{that:i}),Wl(r,"errors",i),r};Yl?Yl(th,Zl):Gl(th,Zl,{name:!0});var eh=th.prototype=Hl(Zl.prototype,{constructor:ql(1,th),message:ql(1,""),name:ql(1,"AggregateError")});Bl({global:!0,constructor:!0,arity:2},{AggregateError:th});var rh=ri,nh=Ds,ih=i,ah=Pu,oh="AggregateError",sh=V(oh),ch=!ih((function(){return 1!==sh([1]).errors[0]}))&&ih((function(){return 7!==sh([1],oh,{cause:7}).cause}));rh({global:!0,constructor:!0,arity:2,forced:ch},{AggregateError:ah(oh,(function(t){return function(e,r){return nh(t,this,arguments)}}),ch,!0)});var uh=ee,lh=Ni,hh=Te.f,fh=uh("unscopables"),dh=Array.prototype;null==dh[fh]&&hh(dh,fh,{configurable:!0,value:lh(null)});var ph=function(t){dh[fh][t]=!0},gh=zt,vh=dn,mh=nn,yh=ph;ri({target:"Array",proto:!0},{at:function(t){var e=gh(this),r=vh(e),n=mh(t),i=n>=0?n:r+n;return i<0||i>=r?void 0:e[i]}}),yh("at");var bh=TypeError,xh=function(t){if(t>9007199254740991)throw bh("Maximum allowed index exceeded");return t},wh=i,Ah=nt,_h=ee("species"),kh=function(t){return Ah>=51||!wh((function(){var e=[];return(e.constructor={})[_h]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Eh=ri,Sh=i,Mh=Ia,Th=H,Ph=zt,Oh=dn,Ih=xh,Rh=Wi,Ch=Za,jh=kh,Dh=nt,Lh=ee("isConcatSpreadable"),zh=Dh>=51||!Sh((function(){var t=[];return t[Lh]=!1,t.concat()[0]!==t})),Fh=function(t){if(!Th(t))return!1;var e=t[Lh];return void 0!==e?!!e:Mh(t)};Eh({target:"Array",proto:!0,arity:1,forced:!zh||!jh("concat")},{concat:function(t){var e,r,n,i,a,o=Ph(this),s=Ch(o,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(Fh(a=-1===e?o:arguments[e]))for(i=Oh(a),Ih(c+i),r=0;r<i;r++,c++)r in a&&Rh(s,c,a[r]);else Ih(c+1),Rh(s,c++,a);return s.length=c,s}});var Bh=pt,Nh=TypeError,Uh=function(t,e){if(!delete t[e])throw Nh("Cannot delete property "+Bh(e)+" of "+Bh(t))},Yh=zt,Gh=cn,Hh=dn,Wh=Uh,qh=Math.min,Xh=[].copyWithin||function(t,e){var r=Yh(this),n=Hh(r),i=Gh(t,n),a=Gh(e,n),o=arguments.length>2?arguments[2]:void 0,s=qh((void 0===o?n:Gh(o,n))-a,n-i),c=1;for(a<i&&i<a+s&&(c=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:Wh(r,i),i+=c,a+=c;return r},Vh=ph;ri({target:"Array",proto:!0},{copyWithin:Xh}),Vh("copyWithin");var Qh=i,Kh=function(t,e){var r=[][t];return!!r&&Qh((function(){r.call(null,e||function(){return 1},1)}))},Jh=oo.every;ri({target:"Array",proto:!0,forced:!Kh("every")},{every:function(t){return Jh(this,t,arguments.length>1?arguments[1]:void 0)}});var Zh=zt,$h=cn,tf=dn,ef=function(t){for(var e=Zh(this),r=tf(e),n=arguments.length,i=$h(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:$h(a,r);o>i;)e[i++]=t;return e},rf=ph;ri({target:"Array",proto:!0},{fill:ef}),rf("fill");var nf=oo.filter;ri({target:"Array",proto:!0,forced:!kh("filter")},{filter:function(t){return nf(this,t,arguments.length>1?arguments[1]:void 0)}});var af=ri,of=oo.find,sf=ph,cf="find",uf=!0;cf in[]&&Array(1)[cf]((function(){uf=!1})),af({target:"Array",proto:!0,forced:uf},{find:function(t){return of(this,t,arguments.length>1?arguments[1]:void 0)}}),sf(cf);var lf=ri,hf=oo.findIndex,ff=ph,df="findIndex",pf=!0;df in[]&&Array(1)[df]((function(){pf=!1})),lf({target:"Array",proto:!0,forced:pf},{findIndex:function(t){return hf(this,t,arguments.length>1?arguments[1]:void 0)}}),ff(df);var gf=Pa,vf=O,mf=zt,yf=dn,bf=function(t){var e=1==t;return function(r,n,i){for(var a,o=mf(r),s=vf(o),c=gf(n,i),u=yf(s);u-- >0;)if(c(a=s[u],u,o))switch(t){case 0:return a;case 1:return u}return e?-1:void 0}},xf={findLast:bf(0),findLastIndex:bf(1)},wf=xf.findLast,Af=ph;ri({target:"Array",proto:!0},{findLast:function(t){return wf(this,t,arguments.length>1?arguments[1]:void 0)}}),Af("findLast");var _f=xf.findLastIndex,kf=ph;ri({target:"Array",proto:!0},{findLastIndex:function(t){return _f(this,t,arguments.length>1?arguments[1]:void 0)}}),kf("findLastIndex");var Ef=Ia,Sf=dn,Mf=xh,Tf=Pa,Pf=function(t,e,r,n,i,a,o,s){for(var c,u,l=i,h=0,f=!!o&&Tf(o,s);h<n;)h in r&&(c=f?f(r[h],h,e):r[h],a>0&&Ef(c)?(u=Sf(c),l=Pf(t,e,c,u,l,a-1)-1):(Mf(l+1),t[l]=c),l++),h++;return l},Of=Pf,If=Of,Rf=zt,Cf=dn,jf=nn,Df=Za;ri({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=Rf(this),r=Cf(e),n=Df(e,0);return n.length=If(n,e,e,r,0,void 0===t?1:jf(t)),n}});var Lf=Of,zf=yt,Ff=zt,Bf=dn,Nf=Za;ri({target:"Array",proto:!0},{flatMap:function(t){var e,r=Ff(this),n=Bf(r);return zf(t),(e=Nf(r,0)).length=Lf(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}});var Uf=oo.forEach,Yf=Kh("forEach")?[].forEach:function(t){return Uf(this,t,arguments.length>1?arguments[1]:void 0)};ri({target:"Array",proto:!0,forced:[].forEach!=Yf},{forEach:Yf});var Gf=Ce,Hf=kl,Wf=Pa,qf=u,Xf=zt,Vf=function(t,e,r,n){try{return n?e(Gf(r)[0],r[1]):e(r)}catch(e){Hf(t,"throw",e)}},Qf=sl,Kf=Wa,Jf=dn,Zf=Wi,$f=xl,td=dl,ed=Array,rd=function(t){var e=Xf(t),r=Kf(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Wf(i,n>2?arguments[2]:void 0));var o,s,c,u,l,h,f=td(e),d=0;if(!f||this===ed&&Qf(f))for(o=Jf(e),s=r?new this(o):ed(o);o>d;d++)h=a?i(e[d],d):e[d],Zf(s,d,h);else for(l=(u=$f(e,f)).next,s=r?new this:[];!(c=qf(l,u)).done;d++)h=a?Vf(u,i,[c.value,d],!0):c.value,Zf(s,d,h);return s.length=d,s},nd=ee("iterator"),id=!1;try{var ad=0,od={next:function(){return{done:!!ad++}},return:function(){id=!0}};od[nd]=function(){return this},Array.from(od,(function(){throw 2}))}catch(t){}var sd=function(t,e){if(!e&&!id)return!1;var r=!1;try{var n={};n[nd]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},cd=rd;ri({target:"Array",stat:!0,forced:!sd((function(t){Array.from(t)}))},{from:cd});var ud=yn.includes,ld=ph;ri({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return ud(this,t,arguments.length>1?arguments[1]:void 0)}}),ld("includes");var hd=ri,fd=yn.indexOf,dd=Kh,pd=Ea([].indexOf),gd=!!pd&&1/pd([1],1,-0)<0;hd({target:"Array",proto:!0,forced:gd||!dd("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return gd?pd(this,t,e)||0:fd(this,t,e)}}),ri({target:"Array",stat:!0},{isArray:Ia});var vd,md,yd,bd=i,xd=U,wd=H,Ad=rl,_d=Jr,kd=ee("iterator"),Ed=!1;[].keys&&("next"in(yd=[].keys())?(md=Ad(Ad(yd)))!==Object.prototype&&(vd=md):Ed=!0);var Sd=!wd(vd)||bd((function(){var t={};return vd[kd].call(t)!==t}));Sd&&(vd={}),xd(vd[kd])||_d(vd,kd,(function(){return this}));var Md={IteratorPrototype:vd,BUGGY_SAFARI_ITERATORS:Ed},Td=Md.IteratorPrototype,Pd=Ni,Od=v,Id=Aa,Rd=nl,Cd=function(){return this},jd=function(t,e,r,n){var i=e+" Iterator";return t.prototype=Pd(Td,{next:Od(+!n,r)}),Id(t,i,!1),Rd[i]=Cd,t},Dd=ri,Ld=u,zd=U,Fd=jd,Bd=rl,Nd=qc,Ud=Aa,Yd=Xe,Gd=Jr,Hd=nl,Wd=tr.PROPER,qd=tr.CONFIGURABLE,Xd=Md.IteratorPrototype,Vd=Md.BUGGY_SAFARI_ITERATORS,Qd=ee("iterator"),Kd="keys",Jd="values",Zd="entries",$d=function(){return this},tp=function(t,e,r,n,i,a,o){Fd(r,e,n);var s,c,u,l=function(t){if(t===i&&g)return g;if(!Vd&&t in d)return d[t];switch(t){case Kd:case Jd:case Zd:return function(){return new r(this,t)}}return function(){return new r(this)}},h=e+" Iterator",f=!1,d=t.prototype,p=d[Qd]||d["@@iterator"]||i&&d[i],g=!Vd&&p||l(i),v="Array"==e&&d.entries||p;if(v&&(s=Bd(v.call(new t)))!==Object.prototype&&s.next&&(Bd(s)!==Xd&&(Nd?Nd(s,Xd):zd(s[Qd])||Gd(s,Qd,$d)),Ud(s,h,!0)),Wd&&i==Jd&&p&&p.name!==Jd&&(qd?Yd(d,"name",Jd):(f=!0,g=function(){return Ld(p,this)})),i)if(c={values:l(Jd),keys:a?g:l(Kd),entries:l(Zd)},o)for(u in c)(Vd||f||!(u in d))&&Gd(d,u,c[u]);else Dd({target:e,proto:!0,forced:Vd||f},c);return d[Qd]!==g&&Gd(d,Qd,g,{name:i}),Hd[e]=g,c},ep=function(t,e){return{value:t,done:e}},rp=z,np=ph,ip=nl,ap=Pr,op=Te.f,sp=tp,cp=ep,up=a,lp="Array Iterator",hp=ap.set,fp=ap.getterFor(lp),dp=sp(Array,"Array",(function(t,e){hp(this,{type:lp,target:rp(t),index:0,kind:e})}),(function(){var t=fp(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,cp(void 0,!0)):cp("keys"==r?n:"values"==r?e[n]:[n,e[n]],!1)}),"values"),pp=ip.Arguments=ip.Array;if(np("keys"),np("values"),np("entries"),up&&"values"!==pp.name)try{op(pp,"name",{value:"values"})}catch(t){}var gp=ri,vp=O,mp=z,yp=Kh,bp=w([].join);gp({target:"Array",proto:!0,forced:vp!=Object||!yp("join",",")},{join:function(t){return bp(mp(this),void 0===t?",":t)}});var xp=Ds,wp=z,Ap=nn,_p=dn,kp=Kh,Ep=Math.min,Sp=[].lastIndexOf,Mp=!!Sp&&1/[1].lastIndexOf(1,-0)<0,Tp=kp("lastIndexOf"),Pp=Mp||!Tp?function(t){if(Mp)return xp(Sp,this,arguments)||0;var e=wp(this),r=_p(e),n=r-1;for(arguments.length>1&&(n=Ep(n,Ap(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in e&&e[n]===t)return n||0;return-1}:Sp;ri({target:"Array",proto:!0,forced:Pp!==[].lastIndexOf},{lastIndexOf:Pp});var Op=oo.map;ri({target:"Array",proto:!0,forced:!kh("map")},{map:function(t){return Op(this,t,arguments.length>1?arguments[1]:void 0)}});var Ip=Wa,Rp=Wi,Cp=Array;ri({target:"Array",stat:!0,forced:i((function(){function t(){}return!(Cp.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,r=new(Ip(this)?this:Cp)(e);e>t;)Rp(r,t,arguments[t++]);return r.length=e,r}});var jp=a,Dp=Ia,Lp=TypeError,zp=Object.getOwnPropertyDescriptor,Fp=jp&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}()?function(t,e){if(Dp(t)&&!zp(t,"length").writable)throw Lp("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Bp=zt,Np=dn,Up=Fp,Yp=xh;ri({target:"Array",proto:!0,arity:1,forced:i((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=Bp(this),r=Np(e),n=arguments.length;Yp(r+n);for(var i=0;i<n;i++)e[r]=arguments[i],r++;return Up(e,r),r}});var Gp=yt,Hp=zt,Wp=O,qp=dn,Xp=TypeError,Vp=function(t){return function(e,r,n,i){Gp(r);var a=Hp(e),o=Wp(a),s=qp(a),c=t?s-1:0,u=t?-1:1;if(n<2)for(;;){if(c in o){i=o[c],c+=u;break}if(c+=u,t?c<0:s<=c)throw Xp("Reduce of empty array with no initial value")}for(;t?c>=0:s>c;c+=u)c in o&&(i=r(i,o[c],c,a));return i}},Qp={left:Vp(!1),right:Vp(!0)},Kp="undefined"!=typeof process&&"process"==E(process),Jp=Qp.left;ri({target:"Array",proto:!0,forced:!Kp&&nt>79&&nt<83||!Kh("reduce")},{reduce:function(t){var e=arguments.length;return Jp(this,t,e,e>1?arguments[1]:void 0)}});var Zp=Qp.right;ri({target:"Array",proto:!0,forced:!Kp&&nt>79&&nt<83||!Kh("reduceRight")},{reduceRight:function(t){return Zp(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var $p=ri,tg=Ia,eg=w([].reverse),rg=[1,2];$p({target:"Array",proto:!0,forced:String(rg)===String(rg.reverse())},{reverse:function(){return tg(this)&&(this.length=this.length),eg(this)}});var ng=ri,ig=Ia,ag=Wa,og=H,sg=cn,cg=dn,ug=z,lg=Wi,hg=ee,fg=Ls,dg=kh("slice"),pg=hg("species"),gg=Array,vg=Math.max;ng({target:"Array",proto:!0,forced:!dg},{slice:function(t,e){var r,n,i,a=ug(this),o=cg(a),s=sg(t,o),c=sg(void 0===e?o:e,o);if(ig(a)&&(r=a.constructor,(ag(r)&&(r===gg||ig(r.prototype))||og(r)&&null===(r=r[pg]))&&(r=void 0),r===gg||void 0===r))return fg(a,s,c);for(n=new(void 0===r?gg:r)(vg(c-s,0)),i=0;s<c;s++,i++)s in a&&lg(n,i,a[s]);return n.length=i,n}});var mg=oo.some;ri({target:"Array",proto:!0,forced:!Kh("some")},{some:function(t){return mg(this,t,arguments.length>1?arguments[1]:void 0)}});var yg=Ji,bg=Math.floor,xg=function(t,e){var r=t.length,n=bg(r/2);return r<8?wg(t,e):Ag(t,xg(yg(t,0,n),e),xg(yg(t,n),e),e)},wg=function(t,e){for(var r,n,i=t.length,a=1;a<i;){for(n=a,r=t[a];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==a++&&(t[n]=r)}return t},Ag=function(t,e,r,n){for(var i=e.length,a=r.length,o=0,s=0;o<i||s<a;)t[o+s]=o<i&&s<a?n(e[o],r[s])<=0?e[o++]:r[s++]:o<i?e[o++]:r[s++];return t},_g=xg,kg=K.match(/firefox\/(\d+)/i),Eg=!!kg&&+kg[1],Sg=/MSIE|Trident/.test(K),Mg=K.match(/AppleWebKit\/(\d+)\./),Tg=!!Mg&&+Mg[1],Pg=ri,Og=w,Ig=yt,Rg=zt,Cg=dn,jg=Uh,Dg=pi,Lg=i,zg=_g,Fg=Kh,Bg=Eg,Ng=Sg,Ug=nt,Yg=Tg,Gg=[],Hg=Og(Gg.sort),Wg=Og(Gg.push),qg=Lg((function(){Gg.sort(void 0)})),Xg=Lg((function(){Gg.sort(null)})),Vg=Fg("sort"),Qg=!Lg((function(){if(Ug)return Ug<70;if(!(Bg&&Bg>3)){if(Ng)return!0;if(Yg)return Yg<603;var t,e,r,n,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Gg.push({k:e+n,v:r})}for(Gg.sort((function(t,e){return e.v-t.v})),n=0;n<Gg.length;n++)e=Gg[n].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));Pg({target:"Array",proto:!0,forced:qg||!Xg||!Vg||!Qg},{sort:function(t){void 0!==t&&Ig(t);var e=Rg(this);if(Qg)return void 0===t?Hg(e):Hg(e,t);var r,n,i=[],a=Cg(e);for(n=0;n<a;n++)n in e&&Wg(i,e[n]);for(zg(i,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:Dg(e)>Dg(r)?1:-1}}(t)),r=Cg(i),n=0;n<r;)e[n]=i[n++];for(;n<a;)jg(e,n++);return e}});var Kg=V,Jg=aa,Zg=a,$g=ee("species"),tv=function(t){var e=Kg(t);Zg&&e&&!e[$g]&&Jg(e,$g,{configurable:!0,get:function(){return this}})};tv("Array");var ev=ri,rv=zt,nv=cn,iv=nn,av=dn,ov=Fp,sv=xh,cv=Za,uv=Wi,lv=Uh,hv=kh("splice"),fv=Math.max,dv=Math.min;ev({target:"Array",proto:!0,forced:!hv},{splice:function(t,e){var r,n,i,a,o,s,c=rv(this),u=av(c),l=nv(t,u),h=arguments.length;for(0===h?r=n=0:1===h?(r=0,n=u-l):(r=h-2,n=dv(fv(iv(e),0),u-l)),sv(u+r-n),i=cv(c,n),a=0;a<n;a++)(o=l+a)in c&&uv(i,a,c[o]);if(i.length=n,r<n){for(a=l;a<u-n;a++)s=a+r,(o=a+n)in c?c[s]=c[o]:lv(c,s);for(a=u;a>u-n+r;a--)lv(c,a-1)}else if(r>n)for(a=u-n;a>l;a--)s=a+r-1,(o=a+n-1)in c?c[s]=c[o]:lv(c,s);for(a=0;a<r;a++)c[a+l]=arguments[a+2];return ov(c,u-n+r),i}});var pv=dn,gv=function(t,e){for(var r=pv(t),n=new e(r),i=0;i<r;i++)n[i]=t[r-i-1];return n},vv=gv,mv=z,yv=ph,bv=Array;ri({target:"Array",proto:!0},{toReversed:function(){return vv(mv(this),bv)}}),yv("toReversed");var xv=dn,wv=function(t,e){for(var r=0,n=xv(e),i=new t(n);n>r;)i[r]=e[r++];return i},Av=r,_v=ri,kv=yt,Ev=z,Sv=wv,Mv=ph,Tv=Array,Pv=w(function(t){return Av[t].prototype}("Array").sort);_v({target:"Array",proto:!0},{toSorted:function(t){void 0!==t&&kv(t);var e=Ev(this),r=Sv(Tv,e);return Pv(r,t)}}),Mv("toSorted");var Ov=ri,Iv=ph,Rv=xh,Cv=dn,jv=cn,Dv=z,Lv=nn,zv=Array,Fv=Math.max,Bv=Math.min;Ov({target:"Array",proto:!0},{toSpliced:function(t,e){var r,n,i,a,o=Dv(this),s=Cv(o),c=jv(t,s),u=arguments.length,l=0;for(0===u?r=n=0:1===u?(r=0,n=s-c):(r=u-2,n=Bv(Fv(Lv(e),0),s-c)),i=Rv(s+r-n),a=zv(i);l<c;l++)a[l]=o[l];for(;l<c+r;l++)a[l]=arguments[l-c+2];for(;l<i;l++)a[l]=o[l+n-r];return a}}),Iv("toSpliced"),ph("flat"),ph("flatMap");var Nv=zt,Uv=dn,Yv=Fp,Gv=Uh,Hv=xh;ri({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(t){return t instanceof TypeError}}()},{unshift:function(t){var e=Nv(this),r=Uv(e),n=arguments.length;if(n){Hv(r+n);for(var i=r;i--;){var a=i+n;i in e?e[a]=e[i]:Gv(e,a)}for(var o=0;o<n;o++)e[o]=arguments[o]}return Yv(e,r+n)}});var Wv=dn,qv=nn,Xv=RangeError,Vv=function(t,e,r,n){var i=Wv(t),a=qv(r),o=a<0?i+a:a;if(o>=i||o<0)throw Xv("Incorrect index");for(var s=new e(i),c=0;c<i;c++)s[c]=c===o?n:t[c];return s},Qv=Vv,Kv=z,Jv=Array;ri({target:"Array",proto:!0},{with:function(t,e){return Qv(Kv(this),Jv,t,e)}});var Zv="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,$v=Jr,tm=function(t,e,r){for(var n in e)$v(t,n,e[n],r);return t},em=Q,rm=TypeError,nm=function(t,e){if(em(e,t))return t;throw rm("Incorrect invocation")},im=nn,am=hn,om=RangeError,sm=function(t){if(void 0===t)return 0;var e=im(t),r=am(e);if(e!==r)throw om("Wrong length or index");return r},cm=Array,um=Math.abs,lm=Math.pow,hm=Math.floor,fm=Math.log,dm=Math.LN2,pm={pack:function(t,e,r){var n,i,a,o=cm(r),s=8*r-e-1,c=(1<<s)-1,u=c>>1,l=23===e?lm(2,-24)-lm(2,-77):0,h=t<0||0===t&&1/t<0?1:0,f=0;for((t=um(t))!=t||t===1/0?(i=t!=t?1:0,n=c):(n=hm(fm(t)/dm),t*(a=lm(2,-n))<1&&(n--,a*=2),(t+=n+u>=1?l/a:l*lm(2,1-u))*a>=2&&(n++,a/=2),n+u>=c?(i=0,n=c):n+u>=1?(i=(t*a-1)*lm(2,e),n+=u):(i=t*lm(2,u-1)*lm(2,e),n=0));e>=8;)o[f++]=255&i,i/=256,e-=8;for(n=n<<e|i,s+=e;s>0;)o[f++]=255&n,n/=256,s-=8;return o[--f]|=128*h,o},unpack:function(t,e){var r,n=t.length,i=8*n-e-1,a=(1<<i)-1,o=a>>1,s=i-7,c=n-1,u=t[c--],l=127&u;for(u>>=7;s>0;)l=256*l+t[c--],s-=8;for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;)r=256*r+t[c--],s-=8;if(0===l)l=1-o;else{if(l===a)return r?NaN:u?-1/0:1/0;r+=lm(2,e),l-=o}return(u?-1:1)*r*lm(2,l-e)}},gm=r,vm=w,mm=a,ym=Zv,bm=tr,xm=Xe,wm=aa,Am=tm,_m=i,km=nm,Em=nn,Sm=hn,Mm=sm,Tm=pm,Pm=rl,Om=qc,Im=Zr.f,Rm=ef,Cm=Ji,jm=Aa,Dm=Pr,Lm=bm.PROPER,zm=bm.CONFIGURABLE,Fm="ArrayBuffer",Bm="DataView",Nm="prototype",Um="Wrong index",Ym=Dm.getterFor(Fm),Gm=Dm.getterFor(Bm),Hm=Dm.set,Wm=gm[Fm],qm=Wm,Xm=qm&&qm[Nm],Vm=gm[Bm],Qm=Vm&&Vm[Nm],Km=Object.prototype,Jm=gm.Array,Zm=gm.RangeError,$m=vm(Rm),ty=vm([].reverse),ey=Tm.pack,ry=Tm.unpack,ny=function(t){return[255&t]},iy=function(t){return[255&t,t>>8&255]},ay=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},oy=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},sy=function(t){return ey(t,23,4)},cy=function(t){return ey(t,52,8)},uy=function(t,e,r){wm(t[Nm],e,{configurable:!0,get:function(){return r(this)[e]}})},ly=function(t,e,r,n){var i=Mm(r),a=Gm(t);if(i+e>a.byteLength)throw Zm(Um);var o=a.bytes,s=i+a.byteOffset,c=Cm(o,s,s+e);return n?c:ty(c)},hy=function(t,e,r,n,i,a){var o=Mm(r),s=Gm(t);if(o+e>s.byteLength)throw Zm(Um);for(var c=s.bytes,u=o+s.byteOffset,l=n(+i),h=0;h<e;h++)c[u+h]=l[a?h:e-h-1]};if(ym){var fy=Lm&&Wm.name!==Fm;if(_m((function(){Wm(1)}))&&_m((function(){new Wm(-1)}))&&!_m((function(){return new Wm,new Wm(1.5),new Wm(NaN),1!=Wm.length||fy&&!zm})))fy&&zm&&xm(Wm,"name",Fm);else{(qm=function(t){return km(this,Xm),new Wm(Mm(t))})[Nm]=Xm;for(var dy,py=Im(Wm),gy=0;py.length>gy;)(dy=py[gy++])in qm||xm(qm,dy,Wm[dy]);Xm.constructor=qm}Om&&Pm(Qm)!==Km&&Om(Qm,Km);var vy=new Vm(new qm(2)),my=vm(Qm.setInt8);vy.setInt8(0,2147483648),vy.setInt8(1,2147483649),!vy.getInt8(0)&&vy.getInt8(1)||Am(Qm,{setInt8:function(t,e){my(this,t,e<<24>>24)},setUint8:function(t,e){my(this,t,e<<24>>24)}},{unsafe:!0})}else Xm=(qm=function(t){km(this,Xm);var e=Mm(t);Hm(this,{type:Fm,bytes:$m(Jm(e),0),byteLength:e}),mm||(this.byteLength=e,this.detached=!1)})[Nm],Qm=(Vm=function(t,e,r){km(this,Qm),km(t,Xm);var n=Ym(t),i=n.byteLength,a=Em(e);if(a<0||a>i)throw Zm("Wrong offset");if(a+(r=void 0===r?i-a:Sm(r))>i)throw Zm("Wrong length");Hm(this,{type:Bm,buffer:t,byteLength:r,byteOffset:a,bytes:n.bytes}),mm||(this.buffer=t,this.byteLength=r,this.byteOffset=a)})[Nm],mm&&(uy(qm,"byteLength",Ym),uy(Vm,"buffer",Gm),uy(Vm,"byteLength",Gm),uy(Vm,"byteOffset",Gm)),Am(Qm,{getInt8:function(t){return ly(this,1,t)[0]<<24>>24},getUint8:function(t){return ly(this,1,t)[0]},getInt16:function(t){var e=ly(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=ly(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return oy(ly(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return oy(ly(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return ry(ly(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return ry(ly(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){hy(this,1,t,ny,e)},setUint8:function(t,e){hy(this,1,t,ny,e)},setInt16:function(t,e){hy(this,2,t,iy,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){hy(this,2,t,iy,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){hy(this,4,t,ay,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){hy(this,4,t,ay,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){hy(this,4,t,sy,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){hy(this,8,t,cy,e,arguments.length>2?arguments[2]:void 0)}});jm(qm,Fm),jm(Vm,Bm);var yy={ArrayBuffer:qm,DataView:Vm},by=tv,xy="ArrayBuffer",wy=yy[xy];ri({global:!0,constructor:!0,forced:r[xy]!==wy},{ArrayBuffer:wy}),by(xy);var Ay,_y,ky,Ey=Zv,Sy=a,My=r,Ty=U,Py=H,Oy=Nt,Iy=hi,Ry=pt,Cy=Xe,jy=Jr,Dy=aa,Ly=Q,zy=rl,Fy=qc,By=ee,Ny=Wt,Uy=Pr.enforce,Yy=Pr.get,Gy=My.Int8Array,Hy=Gy&&Gy.prototype,Wy=My.Uint8ClampedArray,qy=Wy&&Wy.prototype,Xy=Gy&&zy(Gy),Vy=Hy&&zy(Hy),Qy=Object.prototype,Ky=My.TypeError,Jy=By("toStringTag"),Zy=Ny("TYPED_ARRAY_TAG"),$y="TypedArrayConstructor",tb=Ey&&!!Fy&&"Opera"!==Iy(My.opera),eb=!1,rb={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},nb={BigInt64Array:8,BigUint64Array:8},ib=function(t){var e=zy(t);if(Py(e)){var r=Yy(e);return r&&Oy(r,$y)?r[$y]:ib(e)}},ab=function(t){if(!Py(t))return!1;var e=Iy(t);return Oy(rb,e)||Oy(nb,e)};for(Ay in rb)(ky=(_y=My[Ay])&&_y.prototype)?Uy(ky)[$y]=_y:tb=!1;for(Ay in nb)(ky=(_y=My[Ay])&&_y.prototype)&&(Uy(ky)[$y]=_y);if((!tb||!Ty(Xy)||Xy===Function.prototype)&&(Xy=function(){throw Ky("Incorrect invocation")},tb))for(Ay in rb)My[Ay]&&Fy(My[Ay],Xy);if((!tb||!Vy||Vy===Qy)&&(Vy=Xy.prototype,tb))for(Ay in rb)My[Ay]&&Fy(My[Ay].prototype,Vy);if(tb&&zy(qy)!==Vy&&Fy(qy,Vy),Sy&&!Oy(Vy,Jy))for(Ay in eb=!0,Dy(Vy,Jy,{configurable:!0,get:function(){return Py(this)?this[Zy]:void 0}}),rb)My[Ay]&&Cy(My[Ay],Zy,Ay);var ob={NATIVE_ARRAY_BUFFER_VIEWS:tb,TYPED_ARRAY_TAG:eb&&Zy,aTypedArray:function(t){if(ab(t))return t;throw Ky("Target is not a typed array")},aTypedArrayConstructor:function(t){if(Ty(t)&&(!Fy||Ly(Xy,t)))return t;throw Ky(Ry(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(Sy){if(r)for(var i in rb){var a=My[i];if(a&&Oy(a.prototype,t))try{delete a.prototype[t]}catch(r){try{a.prototype[t]=e}catch(t){}}}Vy[t]&&!r||jy(Vy,t,r?e:tb&&Hy[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,i;if(Sy){if(Fy){if(r)for(n in rb)if((i=My[n])&&Oy(i,t))try{delete i[t]}catch(t){}if(Xy[t]&&!r)return;try{return jy(Xy,t,r?e:tb&&Xy[t]||e)}catch(t){}}for(n in rb)!(i=My[n])||i[t]&&!r||jy(i,t,e)}},getTypedArrayConstructor:ib,isView:function(t){if(!Py(t))return!1;var e=Iy(t);return"DataView"===e||Oy(rb,e)||Oy(nb,e)},isTypedArray:ab,TypedArray:Xy,TypedArrayPrototype:Vy};ri({target:"ArrayBuffer",stat:!0,forced:!ob.NATIVE_ARRAY_BUFFER_VIEWS},{isView:ob.isView});var sb=Wa,cb=pt,ub=TypeError,lb=function(t){if(sb(t))return t;throw ub(cb(t)+" is not a constructor")},hb=Ce,fb=lb,db=I,pb=ee("species"),gb=function(t,e){var r,n=hb(t).constructor;return void 0===n||db(r=hb(n)[pb])?e:fb(r)},vb=ri,mb=Ea,yb=i,bb=Ce,xb=cn,wb=hn,Ab=gb,_b=yy.ArrayBuffer,kb=yy.DataView,Eb=kb.prototype,Sb=mb(_b.prototype.slice),Mb=mb(Eb.getUint8),Tb=mb(Eb.setUint8);vb({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:yb((function(){return!new _b(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(Sb&&void 0===e)return Sb(bb(this),t);for(var r=bb(this).byteLength,n=xb(t,r),i=xb(void 0===e?r:e,r),a=new(Ab(this,_b))(wb(i-n)),o=new kb(this),s=new kb(a),c=0;n<i;)Tb(s,c++,Mb(o,n++));return a}}),ri({global:!0,constructor:!0,forced:!Zv},{DataView:yy.DataView});var Pb=ri,Ob=w,Ib=i((function(){return 120!==new Date(16e11).getYear()})),Rb=Ob(Date.prototype.getFullYear);Pb({target:"Date",proto:!0,forced:Ib},{getYear:function(){return Rb(this)-1900}});var Cb=ri,jb=Date,Db=w(jb.prototype.getTime);Cb({target:"Date",stat:!0},{now:function(){return Db(new jb)}});var Lb=ri,zb=w,Fb=nn,Bb=Date.prototype,Nb=zb(Bb.getTime),Ub=zb(Bb.setFullYear);Lb({target:"Date",proto:!0},{setYear:function(t){Nb(this);var e=Fb(t);return Ub(this,0<=e&&e<=99?e+1900:e)}}),ri({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString});var Yb=nn,Gb=pi,Hb=j,Wb=RangeError,qb=function(t){var e=Gb(Hb(this)),r="",n=Yb(t);if(n<0||n==1/0)throw Wb("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r},Xb=w,Vb=hn,Qb=pi,Kb=j,Jb=Xb(qb),Zb=Xb("".slice),$b=Math.ceil,tx=function(t){return function(e,r,n){var i,a,o=Qb(Kb(e)),s=Vb(r),c=o.length,u=void 0===n?" ":Qb(n);return s<=c||""==u?o:((a=Jb(u,$b((i=s-c)/u.length))).length>i&&(a=Zb(a,0,i)),t?o+a:a+o)}},ex={start:tx(!1),end:tx(!0)},rx=w,nx=i,ix=ex.start,ax=RangeError,ox=isFinite,sx=Math.abs,cx=Date.prototype,ux=cx.toISOString,lx=rx(cx.getTime),hx=rx(cx.getUTCDate),fx=rx(cx.getUTCFullYear),dx=rx(cx.getUTCHours),px=rx(cx.getUTCMilliseconds),gx=rx(cx.getUTCMinutes),vx=rx(cx.getUTCMonth),mx=rx(cx.getUTCSeconds),yx=nx((function(){return"0385-07-25T07:06:39.999Z"!=ux.call(new Date(-50000000000001))}))||!nx((function(){ux.call(new Date(NaN))}))?function(){if(!ox(lx(this)))throw ax("Invalid time value");var t=this,e=fx(t),r=px(t),n=e<0?"-":e>9999?"+":"";return n+ix(sx(e),n?6:4,0)+"-"+ix(vx(t)+1,2,0)+"-"+ix(hx(t),2,0)+"T"+ix(dx(t),2,0)+":"+ix(gx(t),2,0)+":"+ix(mx(t),2,0)+"."+ix(r,3,0)+"Z"}:ux,bx=yx;ri({target:"Date",proto:!0,forced:Date.prototype.toISOString!==bx},{toISOString:bx});var xx=zt,wx=ue;ri({target:"Date",proto:!0,arity:1,forced:i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=xx(this),r=wx(e,"number");return"number"!=typeof r||isFinite(r)?e.toISOString():null}});var Ax=Ce,_x=St,kx=TypeError,Ex=Nt,Sx=Jr,Mx=function(t){if(Ax(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw kx("Incorrect hint");return _x(this,t)},Tx=ee("toPrimitive"),Px=Date.prototype;Ex(Px,Tx)||Sx(Px,Tx,Mx);var Ox=w,Ix=Jr,Rx=Date.prototype,Cx="Invalid Date",jx="toString",Dx=Ox(Rx[jx]),Lx=Ox(Rx.getTime);String(new Date(NaN))!=Cx&&Ix(Rx,jx,(function(){var t=Lx(this);return t==t?Dx(this):Cx}));var zx=ri,Fx=w,Bx=pi,Nx=Fx("".charAt),Ux=Fx("".charCodeAt),Yx=Fx(/./.exec),Gx=Fx(1..toString),Hx=Fx("".toUpperCase),Wx=/[\w*+\-./@]/,qx=function(t,e){for(var r=Gx(t,16);r.length<e;)r="0"+r;return r};zx({global:!0},{escape:function(t){for(var e,r,n=Bx(t),i="",a=n.length,o=0;o<a;)e=Nx(n,o++),Yx(Wx,e)?i+=e:i+=(r=Ux(e,0))<256?"%"+qx(r,2):"%u"+Hx(qx(r,4));return i}});var Xx=w,Vx=yt,Qx=H,Kx=Nt,Jx=Ls,Zx=o,$x=Function,tw=Xx([].concat),ew=Xx([].join),rw={},nw=function(t,e,r){if(!Kx(rw,e)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";rw[e]=$x("C,a","return new C("+ew(n,",")+")")}return rw[e](t,r)},iw=Zx?$x.bind:function(t){var e=Vx(this),r=e.prototype,n=Jx(arguments,1),i=function(){var r=tw(n,Jx(arguments));return this instanceof i?nw(e,r.length,r):e.apply(t,r)};return Qx(r)&&(i.prototype=r),i},aw=iw;ri({target:"Function",proto:!0,forced:Function.bind!==aw},{bind:aw});var ow=U,sw=H,cw=Te,uw=rl,lw=ee,hw=Ve.exports,fw=lw("hasInstance"),dw=Function.prototype;fw in dw||cw.f(dw,fw,{value:hw((function(t){if(!ow(this)||!sw(t))return!1;var e=this.prototype;if(!sw(e))return t instanceof this;for(;t=uw(t);)if(e===t)return!0;return!1}),fw)});var pw=a,gw=tr.EXISTS,vw=w,mw=aa,yw=Function.prototype,bw=vw(yw.toString),xw=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,ww=vw(xw.exec);pw&&!gw&&mw(yw,"name",{configurable:!0,get:function(){try{return ww(xw,bw(this))[1]}catch(t){return""}}});var Aw=r;ri({global:!0,forced:Aw.globalThis!==Aw},{globalThis:Aw}),Aa(r.JSON,"JSON",!0);var _w={exports:{}},kw=i((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Ew=i,Sw=H,Mw=E,Tw=kw,Pw=Object.isExtensible,Ow=Ew((function(){Pw(1)}))||Tw?function(t){return!!Sw(t)&&((!Tw||"ArrayBuffer"!=Mw(t))&&(!Pw||Pw(t)))}:Pw,Iw=!i((function(){return Object.isExtensible(Object.preventExtensions({}))})),Rw=ri,Cw=w,jw=gr,Dw=H,Lw=Nt,zw=Te.f,Fw=Zr,Bw=Ui,Nw=Ow,Uw=Iw,Yw=!1,Gw=Wt("meta"),Hw=0,Ww=function(t){zw(t,Gw,{value:{objectID:"O"+Hw++,weakData:{}}})},qw=_w.exports={enable:function(){qw.enable=function(){},Yw=!0;var t=Fw.f,e=Cw([].splice),r={};r[Gw]=1,t(r).length&&(Fw.f=function(r){for(var n=t(r),i=0,a=n.length;i<a;i++)if(n[i]===Gw){e(n,i,1);break}return n},Rw({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Bw.f}))},fastKey:function(t,e){if(!Dw(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Lw(t,Gw)){if(!Nw(t))return"F";if(!e)return"E";Ww(t)}return t[Gw].objectID},getWeakData:function(t,e){if(!Lw(t,Gw)){if(!Nw(t))return!0;if(!e)return!1;Ww(t)}return t[Gw].weakData},onFreeze:function(t){return Uw&&Yw&&Nw(t)&&!Lw(t,Gw)&&Ww(t),t}};jw[Gw]=!0;var Xw=ri,Vw=r,Qw=w,Kw=Vn,Jw=Jr,Zw=_w.exports,$w=Fl,tA=nm,eA=U,rA=I,nA=H,iA=i,aA=sd,oA=Aa,sA=Zc,cA=function(t,e,r){var n=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),a=n?"set":"add",o=Vw[t],s=o&&o.prototype,c=o,u={},l=function(t){var e=Qw(s[t]);Jw(s,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(i&&!nA(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return i&&!nA(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(i&&!nA(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(Kw(t,!eA(o)||!(i||s.forEach&&!iA((function(){(new o).entries().next()})))))c=r.getConstructor(e,t,n,a),Zw.enable();else if(Kw(t,!0)){var h=new c,f=h[a](i?{}:-0,1)!=h,d=iA((function(){h.has(1)})),p=aA((function(t){new o(t)})),g=!i&&iA((function(){for(var t=new o,e=5;e--;)t[a](e,e);return!t.has(-0)}));p||((c=e((function(t,e){tA(t,s);var r=sA(new o,t,c);return rA(e)||$w(e,r[a],{that:r,AS_ENTRIES:n}),r}))).prototype=s,s.constructor=c),(d||g)&&(l("delete"),l("has"),n&&l("get")),(g||f)&&l(a),i&&s.clear&&delete s.clear}return u[t]=c,Xw({global:!0,constructor:!0,forced:c!=o},u),oA(c,t),i||r.setStrong(c,t,n),c},uA=Ni,lA=aa,hA=tm,fA=Pa,dA=nm,pA=I,gA=Fl,vA=tp,mA=ep,yA=tv,bA=a,xA=_w.exports.fastKey,wA=Pr.set,AA=Pr.getterFor,_A={getConstructor:function(t,e,r,n){var i=t((function(t,i){dA(t,a),wA(t,{type:e,index:uA(null),first:void 0,last:void 0,size:0}),bA||(t.size=0),pA(i)||gA(i,t[n],{that:t,AS_ENTRIES:r})})),a=i.prototype,o=AA(e),s=function(t,e,r){var n,i,a=o(t),s=c(t,e);return s?s.value=r:(a.last=s={index:i=xA(e,!0),key:e,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=s),n&&(n.next=s),bA?a.size++:t.size++,"F"!==i&&(a.index[i]=s)),t},c=function(t,e){var r,n=o(t),i=xA(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==e)return r};return hA(a,{clear:function(){for(var t=o(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,bA?t.size=0:this.size=0},delete:function(t){var e=this,r=o(e),n=c(e,t);if(n){var i=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first==n&&(r.first=i),r.last==n&&(r.last=a),bA?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=o(this),n=fA(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!c(this,t)}}),hA(a,r?{get:function(t){var e=c(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),bA&&lA(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,e,r){var n=e+" Iterator",i=AA(e),a=AA(n);vA(t,e,(function(t,e){wA(this,{type:n,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=a(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?mA("keys"==e?r.key:"values"==e?r.value:[r.key,r.value],!1):(t.target=void 0,mA(void 0,!0))}),r?"entries":"values",!r,!0),yA(e)}};cA("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),_A);var kA=Math.log,EA=Math.log1p||function(t){var e=+t;return e>-1e-8&&e<1e-8?e-e*e/2:kA(1+e)},SA=ri,MA=EA,TA=Math.acosh,PA=Math.log,OA=Math.sqrt,IA=Math.LN2;SA({target:"Math",stat:!0,forced:!TA||710!=Math.floor(TA(Number.MAX_VALUE))||TA(1/0)!=1/0},{acosh:function(t){var e=+t;return e<1?NaN:e>94906265.62425156?PA(e)+IA:MA(e-1+OA(e-1)*OA(e+1))}});var RA=ri,CA=Math.asinh,jA=Math.log,DA=Math.sqrt;RA({target:"Math",stat:!0,forced:!(CA&&1/CA(0)>0)},{asinh:function t(e){var r=+e;return isFinite(r)&&0!=r?r<0?-t(-r):jA(r+DA(r*r+1)):r}});var LA=ri,zA=Math.atanh,FA=Math.log;LA({target:"Math",stat:!0,forced:!(zA&&1/zA(-0)<0)},{atanh:function(t){var e=+t;return 0==e?e:FA((1+e)/(1-e))/2}});var BA=Math.sign||function(t){var e=+t;return 0==e||e!=e?e:e<0?-1:1},NA=ri,UA=BA,YA=Math.abs,GA=Math.pow;NA({target:"Math",stat:!0},{cbrt:function(t){var e=+t;return UA(e)*GA(YA(e),1/3)}});var HA=ri,WA=Math.floor,qA=Math.log,XA=Math.LOG2E;HA({target:"Math",stat:!0},{clz32:function(t){var e=t>>>0;return e?31-WA(qA(e+.5)*XA):32}});var VA=Math.expm1,QA=Math.exp,KA=!VA||VA(10)>22025.465794806718||VA(10)<22025.465794806718||-2e-17!=VA(-2e-17)?function(t){var e=+t;return 0==e?e:e>-1e-6&&e<1e-6?e+e*e/2:QA(e)-1}:VA,JA=ri,ZA=KA,$A=Math.cosh,t_=Math.abs,e_=Math.E;JA({target:"Math",stat:!0,forced:!$A||$A(710)===1/0},{cosh:function(t){var e=ZA(t_(t)-1)+1;return(e+1/(e*e_*e_))*(e_/2)}});var r_=KA;ri({target:"Math",stat:!0,forced:r_!=Math.expm1},{expm1:r_});var n_=BA,i_=Math.abs,a_=Math.pow,o_=a_(2,-52),s_=a_(2,-23),c_=a_(2,127)*(2-s_),u_=a_(2,-126);ri({target:"Math",stat:!0},{fround:Math.fround||function(t){var e,r,n=+t,i=i_(n),a=n_(n);return i<u_?a*function(t){return t+1/o_-1/o_}(i/u_/s_)*u_*s_:(r=(e=(1+s_/o_)*i)-(e-i))>c_||r!=r?a*(1/0):a*r}});var l_=ri,h_=Math.hypot,f_=Math.abs,d_=Math.sqrt;l_({target:"Math",stat:!0,arity:2,forced:!!h_&&h_(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,i=0,a=0,o=arguments.length,s=0;a<o;)s<(r=f_(arguments[a++]))?(i=i*(n=s/r)*n+1,s=r):i+=r>0?(n=r/s)*n:r;return s===1/0?1/0:s*d_(i)}});var p_=ri,g_=i,v_=Math.imul;p_({target:"Math",stat:!0,forced:g_((function(){return-5!=v_(4294967295,5)||2!=v_.length}))},{imul:function(t,e){var r=65535,n=+t,i=+e,a=r&n,o=r&i;return 0|a*o+((r&n>>>16)*o+a*(r&i>>>16)<<16>>>0)}});var m_=Math.log,y_=Math.LOG10E,b_=Math.log10||function(t){return m_(t)*y_};ri({target:"Math",stat:!0},{log10:b_}),ri({target:"Math",stat:!0},{log1p:EA});var x_=ri,w_=Math.log,A_=Math.LN2;x_({target:"Math",stat:!0},{log2:function(t){return w_(t)/A_}}),ri({target:"Math",stat:!0},{sign:BA});var __=ri,k_=i,E_=KA,S_=Math.abs,M_=Math.exp,T_=Math.E;__({target:"Math",stat:!0,forced:k_((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(t){var e=+t;return S_(e)<1?(E_(e)-E_(-e))/2:(M_(e-1)-M_(-e-1))*(T_/2)}});var P_=ri,O_=KA,I_=Math.exp;P_({target:"Math",stat:!0},{tanh:function(t){var e=+t,r=O_(e),n=O_(-e);return r==1/0?1:n==1/0?-1:(r-n)/(I_(e)+I_(-e))}}),Aa(Math,"Math",!0),ri({target:"Math",stat:!0},{trunc:en});var R_=w(1..valueOf),C_="\t\n\v\f\r                 \u2028\u2029\ufeff",j_=j,D_=pi,L_=C_,z_=w("".replace),F_=RegExp("^["+L_+"]+"),B_=RegExp("(^|[^"+L_+"])["+L_+"]+$"),N_=function(t){return function(e){var r=D_(j_(e));return 1&t&&(r=z_(r,F_,"")),2&t&&(r=z_(r,B_,"$1")),r}},U_={start:N_(1),end:N_(2),trim:N_(3)},Y_=ri,G_=a,H_=r,W_=ca,q_=w,X_=Vn,V_=Nt,Q_=Zc,K_=Q,J_=ft,Z_=ue,$_=i,tk=Zr.f,ek=n.f,rk=Te.f,nk=R_,ik=U_.trim,ak="Number",ok=H_[ak];W_[ak];var sk=ok.prototype,ck=H_.TypeError,uk=q_("".slice),lk=q_("".charCodeAt),hk=function(t){var e=Z_(t,"number");return"bigint"==typeof e?e:fk(e)},fk=function(t){var e,r,n,i,a,o,s,c,u=Z_(t,"number");if(J_(u))throw ck("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=ik(u),43===(e=lk(u,0))||45===e){if(88===(r=lk(u,2))||120===r)return NaN}else if(48===e){switch(lk(u,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+u}for(o=(a=uk(u,2)).length,s=0;s<o;s++)if((c=lk(a,s))<48||c>i)return NaN;return parseInt(a,n)}return+u},dk=X_(ak,!ok(" 0o1")||!ok("0b1")||ok("+0x1")),pk=function(t){return K_(sk,t)&&$_((function(){nk(t)}))},gk=function(t){var e=arguments.length<1?0:ok(hk(t));return pk(this)?Q_(Object(e),this,gk):e};gk.prototype=sk,dk&&(sk.constructor=gk),Y_({global:!0,constructor:!0,wrap:!0,forced:dk},{Number:gk});dk&&function(t,e){for(var r,n=G_?tk(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;n.length>i;i++)V_(e,r=n[i])&&!V_(t,r)&&rk(t,r,ek(e,r))}(W_[ak],ok),ri({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)});var vk=r.isFinite;ri({target:"Number",stat:!0},{isFinite:Number.isFinite||function(t){return"number"==typeof t&&vk(t)}});var mk=H,yk=Math.floor,bk=Number.isInteger||function(t){return!mk(t)&&isFinite(t)&&yk(t)===t};ri({target:"Number",stat:!0},{isInteger:bk}),ri({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var xk=ri,wk=bk,Ak=Math.abs;xk({target:"Number",stat:!0},{isSafeInteger:function(t){return wk(t)&&Ak(t)<=9007199254740991}}),ri({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991}),ri({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991});var _k=r,kk=i,Ek=pi,Sk=U_.trim,Mk=C_,Tk=w("".charAt),Pk=_k.parseFloat,Ok=_k.Symbol,Ik=Ok&&Ok.iterator,Rk=1/Pk(Mk+"-0")!=-1/0||Ik&&!kk((function(){Pk(Object(Ik))}))?function(t){var e=Sk(Ek(t)),r=Pk(e);return 0===r&&"-"==Tk(e,0)?-0:r}:Pk,Ck=Rk;ri({target:"Number",stat:!0,forced:Number.parseFloat!=Ck},{parseFloat:Ck});var jk=r,Dk=i,Lk=w,zk=pi,Fk=U_.trim,Bk=C_,Nk=jk.parseInt,Uk=jk.Symbol,Yk=Uk&&Uk.iterator,Gk=/^[+-]?0x/i,Hk=Lk(Gk.exec),Wk=8!==Nk(Bk+"08")||22!==Nk(Bk+"0x16")||Yk&&!Dk((function(){Nk(Object(Yk))}))?function(t,e){var r=Fk(zk(t));return Nk(r,e>>>0||(Hk(Gk,r)?16:10))}:Nk,qk=Wk;ri({target:"Number",stat:!0,forced:Number.parseInt!=qk},{parseInt:qk});var Xk=ri,Vk=w,Qk=nn,Kk=R_,Jk=qb,Zk=b_,$k=i,tE=RangeError,eE=String,rE=isFinite,nE=Math.abs,iE=Math.floor,aE=Math.pow,oE=Math.round,sE=Vk(1..toExponential),cE=Vk(Jk),uE=Vk("".slice),lE="-6.9000e-11"===sE(-69e-12,4)&&"1.25e+0"===sE(1.255,2)&&"1.235e+4"===sE(12345,3)&&"3e+1"===sE(25,0);Xk({target:"Number",proto:!0,forced:!lE||!($k((function(){sE(1,1/0)}))&&$k((function(){sE(1,-1/0)})))||!!$k((function(){sE(1/0,1/0),sE(NaN,1/0)}))},{toExponential:function(t){var e=Kk(this);if(void 0===t)return sE(e);var r=Qk(t);if(!rE(e))return String(e);if(r<0||r>20)throw tE("Incorrect fraction digits");if(lE)return sE(e,r);var n="",i="",a=0,o="",s="";if(e<0&&(n="-",e=-e),0===e)a=0,i=cE("0",r+1);else{var c=Zk(e);a=iE(c);var u=0,l=aE(10,a-r);2*e>=(2*(u=oE(e/l))+1)*l&&(u+=1),u>=aE(10,r+1)&&(u/=10,a+=1),i=eE(u)}return 0!==r&&(i=uE(i,0,1)+"."+uE(i,1)),0===a?(o="+",s="0"):(o=a>0?"+":"-",s=eE(nE(a))),n+(i+="e"+o+s)}});var hE=ri,fE=w,dE=nn,pE=R_,gE=qb,vE=i,mE=RangeError,yE=String,bE=Math.floor,xE=fE(gE),wE=fE("".slice),AE=fE(1..toFixed),_E=function(t,e,r){return 0===e?r:e%2==1?_E(t,e-1,r*t):_E(t*t,e/2,r)},kE=function(t,e,r){for(var n=-1,i=r;++n<6;)i+=e*t[n],t[n]=i%1e7,i=bE(i/1e7)},EE=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=bE(n/e),n=n%e*1e7},SE=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=yE(t[e]);r=""===r?n:r+xE("0",7-n.length)+n}return r};hE({target:"Number",proto:!0,forced:vE((function(){return"0.000"!==AE(8e-5,3)||"1"!==AE(.9,0)||"1.25"!==AE(1.255,2)||"1000000000000000128"!==AE(0xde0b6b3a7640080,0)}))||!vE((function(){AE({})}))},{toFixed:function(t){var e,r,n,i,a=pE(this),o=dE(t),s=[0,0,0,0,0,0],c="",u="0";if(o<0||o>20)throw mE("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return yE(a);if(a<0&&(c="-",a=-a),a>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(a*_E(2,69,1))-69)<0?a*_E(2,-e,1):a/_E(2,e,1),r*=4503599627370496,(e=52-e)>0){for(kE(s,0,r),n=o;n>=7;)kE(s,1e7,0),n-=7;for(kE(s,_E(10,n,1),0),n=e-1;n>=23;)EE(s,1<<23),n-=23;EE(s,1<<n),kE(s,1,1),EE(s,2),u=SE(s)}else kE(s,0,r),kE(s,1<<-e,0),u=SE(s)+xE("0",o);return u=o>0?c+((i=u.length)<=o?"0."+xE("0",o-i)+u:wE(u,0,i-o)+"."+wE(u,i-o)):c+u}});var ME=ri,TE=i,PE=R_,OE=w(1..toPrecision);ME({target:"Number",proto:!0,forced:TE((function(){return"1"!==OE(1,void 0)}))||!TE((function(){OE({})}))},{toPrecision:function(t){return void 0===t?OE(PE(this)):OE(PE(this),t)}});var IE=a,RE=w,CE=u,jE=i,DE=yi,LE=Tn,zE=l,FE=zt,BE=O,NE=Object.assign,UE=Object.defineProperty,YE=RE([].concat),GE=!NE||jE((function(){if(IE&&1!==NE({b:1},NE(UE({},"a",{enumerable:!0,get:function(){UE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=NE({},t)[r]||DE(NE({},e)).join("")!=n}))?function(t,e){for(var r=FE(t),n=arguments.length,i=1,a=LE.f,o=zE.f;n>i;)for(var s,c=BE(arguments[i++]),u=a?YE(DE(c),a(c)):DE(c),l=u.length,h=0;l>h;)s=u[h++],IE&&!CE(o,c,s)||(r[s]=c[s]);return r}:NE,HE=GE;ri({target:"Object",stat:!0,arity:2,forced:Object.assign!==HE},{assign:HE}),ri({target:"Object",stat:!0,sham:!a},{create:Ni});var WE=r,qE=Tg,XE=!i((function(){if(!(qE&&qE<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete WE[t]}})),VE=yt,QE=zt,KE=Te;a&&ri({target:"Object",proto:!0,forced:XE},{__defineGetter__:function(t,e){KE.f(QE(this),t,{get:VE(e),enumerable:!0,configurable:!0})}});var JE=ri,ZE=a,$E=gi.f;JE({target:"Object",stat:!0,forced:Object.defineProperties!==$E,sham:!ZE},{defineProperties:$E});var tS=ri,eS=a,rS=Te.f;tS({target:"Object",stat:!0,forced:Object.defineProperty!==rS,sham:!eS},{defineProperty:rS});var nS=yt,iS=zt,aS=Te;a&&ri({target:"Object",proto:!0,forced:XE},{__defineSetter__:function(t,e){aS.f(iS(this),t,{set:nS(e),enumerable:!0,configurable:!0})}});var oS=a,sS=w,cS=yi,uS=z,lS=sS(l.f),hS=sS([].push),fS=function(t){return function(e){for(var r,n=uS(e),i=cS(n),a=i.length,o=0,s=[];a>o;)r=i[o++],oS&&!lS(n,r)||hS(s,t?[r,n[r]]:n[r]);return s}},dS={entries:fS(!0),values:fS(!1)},pS=dS.entries;ri({target:"Object",stat:!0},{entries:function(t){return pS(t)}});var gS=ri,vS=Iw,mS=i,yS=H,bS=_w.exports.onFreeze,xS=Object.freeze;gS({target:"Object",stat:!0,forced:mS((function(){xS(1)})),sham:!vS},{freeze:function(t){return xS&&yS(t)?xS(bS(t)):t}});var wS=Fl,AS=Wi;ri({target:"Object",stat:!0},{fromEntries:function(t){var e={};return wS(t,(function(t,r){AS(e,t,r)}),{AS_ENTRIES:!0}),e}});var _S=ri,kS=i,ES=z,SS=n.f,MS=a;_S({target:"Object",stat:!0,forced:!MS||kS((function(){SS(1)})),sham:!MS},{getOwnPropertyDescriptor:function(t,e){return SS(ES(t),e)}});var TS=jn,PS=z,OS=n,IS=Wi;ri({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(t){for(var e,r,n=PS(t),i=OS.f,a=TS(n),o={},s=0;a.length>s;)void 0!==(r=i(n,e=a[s++]))&&IS(o,e,r);return o}});var RS=ri,CS=i,jS=Ui.f;RS({target:"Object",stat:!0,forced:CS((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:jS});var DS=zt,LS=rl,zS=Vu;ri({target:"Object",stat:!0,forced:i((function(){LS(1)})),sham:!zS},{getPrototypeOf:function(t){return LS(DS(t))}}),ri({target:"Object",stat:!0},{hasOwn:Nt});var FS=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};ri({target:"Object",stat:!0},{is:FS});var BS=Ow;ri({target:"Object",stat:!0,forced:Object.isExtensible!==BS},{isExtensible:BS});var NS=ri,US=i,YS=H,GS=E,HS=kw,WS=Object.isFrozen;NS({target:"Object",stat:!0,forced:HS||US((function(){WS(1)}))},{isFrozen:function(t){return!YS(t)||(!(!HS||"ArrayBuffer"!=GS(t))||!!WS&&WS(t))}});var qS=ri,XS=i,VS=H,QS=E,KS=kw,JS=Object.isSealed;qS({target:"Object",stat:!0,forced:KS||XS((function(){JS(1)}))},{isSealed:function(t){return!VS(t)||(!(!KS||"ArrayBuffer"!=QS(t))||!!JS&&JS(t))}});var ZS=zt,$S=yi;ri({target:"Object",stat:!0,forced:i((function(){$S(1)}))},{keys:function(t){return $S(ZS(t))}});var tM=ri,eM=a,rM=XE,nM=zt,iM=fe,aM=rl,oM=n.f;eM&&tM({target:"Object",proto:!0,forced:rM},{__lookupGetter__:function(t){var e,r=nM(this),n=iM(t);do{if(e=oM(r,n))return e.get}while(r=aM(r))}});var sM=ri,cM=a,uM=XE,lM=zt,hM=fe,fM=rl,dM=n.f;cM&&sM({target:"Object",proto:!0,forced:uM},{__lookupSetter__:function(t){var e,r=lM(this),n=hM(t);do{if(e=dM(r,n))return e.set}while(r=fM(r))}});var pM=ri,gM=H,vM=_w.exports.onFreeze,mM=Iw,yM=i,bM=Object.preventExtensions;pM({target:"Object",stat:!0,forced:yM((function(){bM(1)})),sham:!mM},{preventExtensions:function(t){return bM&&gM(t)?bM(vM(t)):t}});var xM=a,wM=aa,AM=H,_M=zt,kM=j,EM=Object.getPrototypeOf,SM=Object.setPrototypeOf,MM=Object.prototype,TM="__proto__";if(xM&&EM&&SM&&!(TM in MM))try{wM(MM,TM,{configurable:!0,get:function(){return EM(_M(this))},set:function(t){var e=kM(this);(AM(t)||null===t)&&AM(e)&&SM(e,t)}})}catch(t){}var PM=ri,OM=H,IM=_w.exports.onFreeze,RM=Iw,CM=i,jM=Object.seal;PM({target:"Object",stat:!0,forced:CM((function(){jM(1)})),sham:!RM},{seal:function(t){return jM&&OM(t)?jM(IM(t)):t}}),ri({target:"Object",stat:!0},{setPrototypeOf:qc});var DM=hi,LM=ii?{}.toString:function(){return"[object "+DM(this)+"]"};ii||Jr(Object.prototype,"toString",LM,{unsafe:!0});var zM=dS.values;ri({target:"Object",stat:!0},{values:function(t){return zM(t)}});ri({global:!0,forced:parseFloat!=Rk},{parseFloat:Rk});ri({global:!0,forced:parseInt!=Wk},{parseInt:Wk});var FM,BM,NM,UM,YM=TypeError,GM=function(t,e){if(t<e)throw YM("Not enough arguments");return t},HM=/(?:ipad|iphone|ipod).*applewebkit/i.test(K),WM=r,qM=Ds,XM=Pa,VM=U,QM=Nt,KM=i,JM=Si,ZM=Ls,$M=ve,tT=GM,eT=HM,rT=Kp,nT=WM.setImmediate,iT=WM.clearImmediate,aT=WM.process,oT=WM.Dispatch,sT=WM.Function,cT=WM.MessageChannel,uT=WM.String,lT=0,hT={},fT="onreadystatechange";KM((function(){FM=WM.location}));var dT=function(t){if(QM(hT,t)){var e=hT[t];delete hT[t],e()}},pT=function(t){return function(){dT(t)}},gT=function(t){dT(t.data)},vT=function(t){WM.postMessage(uT(t),FM.protocol+"//"+FM.host)};nT&&iT||(nT=function(t){tT(arguments.length,1);var e=VM(t)?t:sT(t),r=ZM(arguments,1);return hT[++lT]=function(){qM(e,void 0,r)},BM(lT),lT},iT=function(t){delete hT[t]},rT?BM=function(t){aT.nextTick(pT(t))}:oT&&oT.now?BM=function(t){oT.now(pT(t))}:cT&&!eT?(UM=(NM=new cT).port2,NM.port1.onmessage=gT,BM=XM(UM.postMessage,UM)):WM.addEventListener&&VM(WM.postMessage)&&!WM.importScripts&&FM&&"file:"!==FM.protocol&&!KM(vT)?(BM=vT,WM.addEventListener("message",gT,!1)):BM=fT in $M("script")?function(t){JM.appendChild($M("script"))[fT]=function(){JM.removeChild(this),dT(t)}}:function(t){setTimeout(pT(t),0)});var mT={set:nT,clear:iT},yT=function(){this.head=null,this.tail=null};yT.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var bT,xT,wT,AT,_T,kT=yT,ET=/ipad|iphone|ipod/i.test(K)&&"undefined"!=typeof Pebble,ST=/web0s(?!.*chrome)/i.test(K),MT=r,TT=Pa,PT=n.f,OT=mT.set,IT=kT,RT=HM,CT=ET,jT=ST,DT=Kp,LT=MT.MutationObserver||MT.WebKitMutationObserver,zT=MT.document,FT=MT.process,BT=MT.Promise,NT=PT(MT,"queueMicrotask"),UT=NT&&NT.value;if(!UT){var YT=new IT,GT=function(){var t,e;for(DT&&(t=FT.domain)&&t.exit();e=YT.get();)try{e()}catch(t){throw YT.head&&bT(),t}t&&t.enter()};RT||DT||jT||!LT||!zT?!CT&&BT&&BT.resolve?((AT=BT.resolve(void 0)).constructor=BT,_T=TT(AT.then,AT),bT=function(){_T(GT)}):DT?bT=function(){FT.nextTick(GT)}:(OT=TT(OT,MT),bT=function(){OT(GT)}):(xT=!0,wT=zT.createTextNode(""),new LT(GT).observe(wT,{characterData:!0}),bT=function(){wT.data=xT=!xT}),UT=function(t){YT.head||bT(),YT.add(t)}}var HT=UT,WT=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},qT=r.Promise,XT="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,VT=!XT&&!Kp&&"object"==typeof window&&"object"==typeof document,QT=r,KT=qT,JT=U,ZT=Vn,$T=sr,tP=ee,eP=VT,rP=XT,nP=nt;KT&&KT.prototype;var iP=tP("species"),aP=!1,oP=JT(QT.PromiseRejectionEvent),sP=ZT("Promise",(function(){var t=$T(KT),e=t!==String(KT);if(!e&&66===nP)return!0;if(!nP||nP<51||!/native code/.test(t)){var r=new KT((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[iP]=n,!(aP=r.then((function(){}))instanceof n))return!0}return!e&&(eP||rP)&&!oP})),cP={CONSTRUCTOR:sP,REJECTION_EVENT:oP,SUBCLASSING:aP},uP={},lP=yt,hP=TypeError,fP=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw hP("Bad Promise constructor");e=t,r=n})),this.resolve=lP(e),this.reject=lP(r)};uP.f=function(t){return new fP(t)};var dP,pP,gP,vP=ri,mP=Kp,yP=r,bP=u,xP=Jr,wP=qc,AP=Aa,_P=tv,kP=yt,EP=U,SP=H,MP=nm,TP=gb,PP=mT.set,OP=HT,IP=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(t){}},RP=WT,CP=kT,jP=Pr,DP=qT,LP=uP,zP="Promise",FP=cP.CONSTRUCTOR,BP=cP.REJECTION_EVENT,NP=cP.SUBCLASSING,UP=jP.getterFor(zP),YP=jP.set,GP=DP&&DP.prototype,HP=DP,WP=GP,qP=yP.TypeError,XP=yP.document,VP=yP.process,QP=LP.f,KP=QP,JP=!!(XP&&XP.createEvent&&yP.dispatchEvent),ZP="unhandledrejection",$P=function(t){var e;return!(!SP(t)||!EP(e=t.then))&&e},tO=function(t,e){var r,n,i,a=e.value,o=1==e.state,s=o?t.ok:t.fail,c=t.resolve,u=t.reject,l=t.domain;try{s?(o||(2===e.rejection&&aO(e),e.rejection=1),!0===s?r=a:(l&&l.enter(),r=s(a),l&&(l.exit(),i=!0)),r===t.promise?u(qP("Promise-chain cycle")):(n=$P(r))?bP(n,r,c,u):c(r)):u(a)}catch(t){l&&!i&&l.exit(),u(t)}},eO=function(t,e){t.notified||(t.notified=!0,OP((function(){for(var r,n=t.reactions;r=n.get();)tO(r,t);t.notified=!1,e&&!t.rejection&&nO(t)})))},rO=function(t,e,r){var n,i;JP?((n=XP.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),yP.dispatchEvent(n)):n={promise:e,reason:r},!BP&&(i=yP["on"+t])?i(n):t===ZP&&IP("Unhandled promise rejection",r)},nO=function(t){bP(PP,yP,(function(){var e,r=t.facade,n=t.value;if(iO(t)&&(e=RP((function(){mP?VP.emit("unhandledRejection",n,r):rO(ZP,r,n)})),t.rejection=mP||iO(t)?2:1,e.error))throw e.value}))},iO=function(t){return 1!==t.rejection&&!t.parent},aO=function(t){bP(PP,yP,(function(){var e=t.facade;mP?VP.emit("rejectionHandled",e):rO("rejectionhandled",e,t.value)}))},oO=function(t,e,r){return function(n){t(e,n,r)}},sO=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,eO(t,!0))},cO=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw qP("Promise can't be resolved itself");var n=$P(e);n?OP((function(){var r={done:!1};try{bP(n,e,oO(cO,r,t),oO(sO,r,t))}catch(e){sO(r,e,t)}})):(t.value=e,t.state=1,eO(t,!1))}catch(e){sO({done:!1},e,t)}}};if(FP&&(WP=(HP=function(t){MP(this,WP),kP(t),bP(dP,this);var e=UP(this);try{t(oO(cO,e),oO(sO,e))}catch(t){sO(e,t)}}).prototype,(dP=function(t){YP(this,{type:zP,done:!1,notified:!1,parent:!1,reactions:new CP,rejection:!1,state:0,value:void 0})}).prototype=xP(WP,"then",(function(t,e){var r=UP(this),n=QP(TP(this,HP));return r.parent=!0,n.ok=!EP(t)||t,n.fail=EP(e)&&e,n.domain=mP?VP.domain:void 0,0==r.state?r.reactions.add(n):OP((function(){tO(n,r)})),n.promise})),pP=function(){var t=new dP,e=UP(t);this.promise=t,this.resolve=oO(cO,e),this.reject=oO(sO,e)},LP.f=QP=function(t){return t===HP||undefined===t?new pP(t):KP(t)},EP(DP)&&GP!==Object.prototype)){gP=GP.then,NP||xP(GP,"then",(function(t,e){var r=this;return new HP((function(t,e){bP(gP,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete GP.constructor}catch(t){}wP&&wP(GP,WP)}vP({global:!0,constructor:!0,wrap:!0,forced:FP},{Promise:HP}),AP(HP,zP,!1),_P(zP);var uO=qT,lO=cP.CONSTRUCTOR||!sd((function(t){uO.all(t).then(void 0,(function(){}))})),hO=u,fO=yt,dO=uP,pO=WT,gO=Fl;ri({target:"Promise",stat:!0,forced:lO},{all:function(t){var e=this,r=dO.f(e),n=r.resolve,i=r.reject,a=pO((function(){var r=fO(e.resolve),a=[],o=0,s=1;gO(t,(function(t){var c=o++,u=!1;s++,hO(r,e,t).then((function(t){u||(u=!0,a[c]=t,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var vO=ri,mO=cP.CONSTRUCTOR,yO=qT,bO=V,xO=U,wO=Jr,AO=yO&&yO.prototype;if(vO({target:"Promise",proto:!0,forced:mO,real:!0},{catch:function(t){return this.then(void 0,t)}}),xO(yO)){var _O=bO("Promise").prototype.catch;AO.catch!==_O&&wO(AO,"catch",_O,{unsafe:!0})}var kO=u,EO=yt,SO=uP,MO=WT,TO=Fl;ri({target:"Promise",stat:!0,forced:lO},{race:function(t){var e=this,r=SO.f(e),n=r.reject,i=MO((function(){var i=EO(e.resolve);TO(t,(function(t){kO(i,e,t).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var PO=u,OO=uP;ri({target:"Promise",stat:!0,forced:cP.CONSTRUCTOR},{reject:function(t){var e=OO.f(this);return PO(e.reject,void 0,t),e.promise}});var IO=Ce,RO=H,CO=uP,jO=function(t,e){if(IO(t),RO(e)&&e.constructor===t)return e;var r=CO.f(t);return(0,r.resolve)(e),r.promise},DO=ri,LO=cP.CONSTRUCTOR,zO=jO;V("Promise"),DO({target:"Promise",stat:!0,forced:LO},{resolve:function(t){return zO(this,t)}});var FO=u,BO=yt,NO=uP,UO=WT,YO=Fl;ri({target:"Promise",stat:!0,forced:lO},{allSettled:function(t){var e=this,r=NO.f(e),n=r.resolve,i=r.reject,a=UO((function(){var r=BO(e.resolve),i=[],a=0,o=1;YO(t,(function(t){var s=a++,c=!1;o++,FO(r,e,t).then((function(t){c||(c=!0,i[s]={status:"fulfilled",value:t},--o||n(i))}),(function(t){c||(c=!0,i[s]={status:"rejected",reason:t},--o||n(i))}))})),--o||n(i)}));return a.error&&i(a.value),r.promise}});var GO=u,HO=yt,WO=V,qO=uP,XO=WT,VO=Fl,QO="No one promise resolved";ri({target:"Promise",stat:!0,forced:lO},{any:function(t){var e=this,r=WO("AggregateError"),n=qO.f(e),i=n.resolve,a=n.reject,o=XO((function(){var n=HO(e.resolve),o=[],s=0,c=1,u=!1;VO(t,(function(t){var l=s++,h=!1;c++,GO(n,e,t).then((function(t){h||u||(u=!0,i(t))}),(function(t){h||u||(h=!0,o[l]=t,--c||a(new r(o,QO)))}))})),--c||a(new r(o,QO))}));return o.error&&a(o.value),n.promise}});var KO=ri,JO=qT,ZO=i,$O=V,tI=U,eI=gb,rI=jO,nI=Jr,iI=JO&&JO.prototype;if(KO({target:"Promise",proto:!0,real:!0,forced:!!JO&&ZO((function(){iI.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=eI(this,$O("Promise")),r=tI(t);return this.then(r?function(r){return rI(e,t()).then((function(){return r}))}:t,r?function(r){return rI(e,t()).then((function(){throw r}))}:t)}}),tI(JO)){var aI=$O("Promise").prototype.finally;iI.finally!==aI&&nI(iI,"finally",aI,{unsafe:!0})}var oI=Ds,sI=yt,cI=Ce;ri({target:"Reflect",stat:!0,forced:!i((function(){Reflect.apply((function(){}))}))},{apply:function(t,e,r){return oI(sI(t),e,cI(r))}});var uI=ri,lI=Ds,hI=iw,fI=lb,dI=Ce,pI=H,gI=Ni,vI=i,mI=V("Reflect","construct"),yI=Object.prototype,bI=[].push,xI=vI((function(){function t(){}return!(mI((function(){}),[],t)instanceof t)})),wI=!vI((function(){mI((function(){}))})),AI=xI||wI;uI({target:"Reflect",stat:!0,forced:AI,sham:AI},{construct:function(t,e){fI(t),dI(e);var r=arguments.length<3?t:fI(arguments[2]);if(wI&&!xI)return mI(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return lI(bI,n,e),new(lI(hI,t,n))}var i=r.prototype,a=gI(pI(i)?i:yI),o=lI(t,a,e);return pI(o)?o:a}});var _I=a,kI=Ce,EI=fe,SI=Te;ri({target:"Reflect",stat:!0,forced:i((function(){Reflect.defineProperty(SI.f({},1,{value:1}),1,{value:2})})),sham:!_I},{defineProperty:function(t,e,r){kI(t);var n=EI(e);kI(r);try{return SI.f(t,n,r),!0}catch(t){return!1}}});var MI=ri,TI=Ce,PI=n.f;MI({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var r=PI(TI(t),e);return!(r&&!r.configurable)&&delete t[e]}});var OI=Nt,II=function(t){return void 0!==t&&(OI(t,"value")||OI(t,"writable"))},RI=u,CI=H,jI=Ce,DI=II,LI=n,zI=rl;ri({target:"Reflect",stat:!0},{get:function t(e,r){var n,i,a=arguments.length<3?e:arguments[2];return jI(e)===a?e[r]:(n=LI.f(e,r))?DI(n)?n.value:void 0===n.get?void 0:RI(n.get,a):CI(i=zI(e))?t(i,r,a):void 0}});var FI=Ce,BI=n;ri({target:"Reflect",stat:!0,sham:!a},{getOwnPropertyDescriptor:function(t,e){return BI.f(FI(t),e)}});var NI=Ce,UI=rl;ri({target:"Reflect",stat:!0,sham:!Vu},{getPrototypeOf:function(t){return UI(NI(t))}}),ri({target:"Reflect",stat:!0},{has:function(t,e){return e in t}});var YI=Ce,GI=Ow;ri({target:"Reflect",stat:!0},{isExtensible:function(t){return YI(t),GI(t)}}),ri({target:"Reflect",stat:!0},{ownKeys:jn});var HI=V,WI=Ce;ri({target:"Reflect",stat:!0,sham:!Iw},{preventExtensions:function(t){WI(t);try{var e=HI("Object","preventExtensions");return e&&e(t),!0}catch(t){return!1}}});var qI=ri,XI=u,VI=Ce,QI=H,KI=II,JI=Te,ZI=n,$I=rl,tR=v;var eR=i((function(){var t=function(){},e=JI.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,e)}));qI({target:"Reflect",stat:!0,forced:eR},{set:function t(e,r,n){var i,a,o,s=arguments.length<4?e:arguments[3],c=ZI.f(VI(e),r);if(!c){if(QI(a=$I(e)))return t(a,r,n,s);c=tR(0)}if(KI(c)){if(!1===c.writable||!QI(s))return!1;if(i=ZI.f(s,r)){if(i.get||i.set||!1===i.writable)return!1;i.value=n,JI.f(s,r,i)}else JI.f(s,r,tR(0,n))}else{if(void 0===(o=c.set))return!1;XI(o,s,n)}return!0}});var rR=Ce,nR=Yc,iR=qc;iR&&ri({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){rR(t),nR(e);try{return iR(t,e),!0}catch(t){return!1}}});var aR=r,oR=Aa;ri({global:!0},{Reflect:{}}),oR(aR.Reflect,"Reflect",!0);var sR=H,cR=E,uR=ee("match"),lR=function(t){var e;return sR(t)&&(void 0!==(e=t[uR])?!!e:"RegExp"==cR(t))},hR=Ce,fR=function(){var t=hR(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},dR=u,pR=Nt,gR=Q,vR=fR,mR=RegExp.prototype,yR=function(t){var e=t.flags;return void 0!==e||"flags"in mR||pR(t,"flags")||!gR(mR,t)?e:dR(vR,t)},bR=i,xR=r.RegExp,wR=bR((function(){var t=xR("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),AR=wR||bR((function(){return!xR("a","y").sticky})),_R=wR||bR((function(){var t=xR("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),kR={BROKEN_CARET:_R,MISSED_STICKY:AR,UNSUPPORTED_Y:wR},ER=i,SR=r.RegExp,MR=ER((function(){var t=SR(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),TR=i,PR=r.RegExp,OR=TR((function(){var t=PR("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),IR=a,RR=r,CR=w,jR=Vn,DR=Zc,LR=Xe,zR=Zr.f,FR=Q,BR=lR,NR=pi,UR=yR,YR=kR,GR=Vc,HR=Jr,WR=i,qR=Nt,XR=Pr.enforce,VR=tv,QR=MR,KR=OR,JR=ee("match"),ZR=RR.RegExp,$R=ZR.prototype,tC=RR.SyntaxError,eC=CR($R.exec),rC=CR("".charAt),nC=CR("".replace),iC=CR("".indexOf),aC=CR("".slice),oC=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,sC=/a/g,cC=/a/g,uC=new ZR(sC)!==sC,lC=YR.MISSED_STICKY,hC=YR.UNSUPPORTED_Y,fC=IR&&(!uC||lC||QR||KR||WR((function(){return cC[JR]=!1,ZR(sC)!=sC||ZR(cC)==cC||"/a/i"!=ZR(sC,"i")})));if(jR("RegExp",fC)){for(var dC=function(t,e){var r,n,i,a,o,s,c=FR($R,this),u=BR(t),l=void 0===e,h=[],f=t;if(!c&&u&&l&&t.constructor===dC)return t;if((u||FR($R,t))&&(t=t.source,l&&(e=UR(f))),t=void 0===t?"":NR(t),e=void 0===e?"":NR(e),f=t,QR&&"dotAll"in sC&&(n=!!e&&iC(e,"s")>-1)&&(e=nC(e,/s/g,"")),r=e,lC&&"sticky"in sC&&(i=!!e&&iC(e,"y")>-1)&&hC&&(e=nC(e,/y/g,"")),KR&&(a=function(t){for(var e,r=t.length,n=0,i="",a=[],o={},s=!1,c=!1,u=0,l="";n<=r;n++){if("\\"===(e=rC(t,n)))e+=rC(t,++n);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:eC(oC,aC(t,n+1))&&(n+=2,c=!0),i+=e,u++;continue;case">"===e&&c:if(""===l||qR(o,l))throw new tC("Invalid capture group name");o[l]=!0,a[a.length]=[l,u],c=!1,l="";continue}c?l+=e:i+=e}return[i,a]}(t),t=a[0],h=a[1]),o=DR(ZR(t,e),c?this:$R,dC),(n||i||h.length)&&(s=XR(o),n&&(s.dotAll=!0,s.raw=dC(function(t){for(var e,r=t.length,n=0,i="",a=!1;n<=r;n++)"\\"!==(e=rC(t,n))?a||"."!==e?("["===e?a=!0:"]"===e&&(a=!1),i+=e):i+="[\\s\\S]":i+=e+rC(t,++n);return i}(t),r)),i&&(s.sticky=!0),h.length&&(s.groups=h)),t!==f)try{LR(o,"source",""===f?"(?:)":f)}catch(t){}return o},pC=zR(ZR),gC=0;pC.length>gC;)GR(dC,ZR,pC[gC++]);$R.constructor=dC,dC.prototype=$R,HR(RR,"RegExp",dC,{constructor:!0})}VR("RegExp");var vC=a,mC=MR,yC=E,bC=aa,xC=Pr.get,wC=RegExp.prototype,AC=TypeError;vC&&mC&&bC(wC,"dotAll",{configurable:!0,get:function(){if(this!==wC){if("RegExp"===yC(this))return!!xC(this).dotAll;throw AC("Incompatible receiver, RegExp required")}}});var _C=u,kC=w,EC=pi,SC=fR,MC=kR,TC=Mt.exports,PC=Ni,OC=Pr.get,IC=MR,RC=OR,CC=TC("native-string-replace",String.prototype.replace),jC=RegExp.prototype.exec,DC=jC,LC=kC("".charAt),zC=kC("".indexOf),FC=kC("".replace),BC=kC("".slice),NC=function(){var t=/a/,e=/b*/g;return _C(jC,t,"a"),_C(jC,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),UC=MC.BROKEN_CARET,YC=void 0!==/()??/.exec("")[1];(NC||YC||UC||IC||RC)&&(DC=function(t){var e,r,n,i,a,o,s,c=this,u=OC(c),l=EC(t),h=u.raw;if(h)return h.lastIndex=c.lastIndex,e=_C(DC,h,l),c.lastIndex=h.lastIndex,e;var f=u.groups,d=UC&&c.sticky,p=_C(SC,c),g=c.source,v=0,m=l;if(d&&(p=FC(p,"y",""),-1===zC(p,"g")&&(p+="g"),m=BC(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==LC(l,c.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,v++),r=new RegExp("^(?:"+g+")",p)),YC&&(r=new RegExp("^"+g+"$(?!\\s)",p)),NC&&(n=c.lastIndex),i=_C(jC,d?r:c,m),d?i?(i.input=BC(i.input,v),i[0]=BC(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:NC&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),YC&&i&&i.length>1&&_C(CC,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&f)for(i.groups=o=PC(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var GC=DC;ri({target:"RegExp",proto:!0,forced:/./.exec!==GC},{exec:GC});var HC=a,WC=aa,qC=fR,XC=i,VC=r.RegExp,QC=VC.prototype,KC=HC&&XC((function(){var t=!0;try{VC(".","d")}catch(e){t=!1}var e={},r="",n=t?"dgimsy":"gimsy",i=function(t,n){Object.defineProperty(e,t,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var o in t&&(a.hasIndices="d"),a)i(o,a[o]);return Object.getOwnPropertyDescriptor(QC,"flags").get.call(e)!==n||r!==n}));KC&&WC(QC,"flags",{configurable:!0,get:qC});var JC=a,ZC=kR.MISSED_STICKY,$C=E,tj=aa,ej=Pr.get,rj=RegExp.prototype,nj=TypeError;JC&&ZC&&tj(rj,"sticky",{configurable:!0,get:function(){if(this!==rj){if("RegExp"===$C(this))return!!ej(this).sticky;throw nj("Incompatible receiver, RegExp required")}}});var ij,aj,oj=ri,sj=u,cj=U,uj=Ce,lj=pi,hj=(ij=!1,(aj=/[ac]/).exec=function(){return ij=!0,/./.exec.apply(this,arguments)},!0===aj.test("abc")&&ij),fj=/./.test;oj({target:"RegExp",proto:!0,forced:!hj},{test:function(t){var e=uj(this),r=lj(t),n=e.exec;if(!cj(n))return sj(fj,e,r);var i=sj(n,e,r);return null!==i&&(uj(i),!0)}});var dj=tr.PROPER,pj=Jr,gj=Ce,vj=pi,mj=i,yj=yR,bj="toString",xj=RegExp.prototype[bj],wj=mj((function(){return"/a/b"!=xj.call({source:"a",flags:"b"})})),Aj=dj&&xj.name!=bj;(wj||Aj)&&pj(RegExp.prototype,bj,(function(){var t=gj(this);return"/"+vj(t.source)+"/"+vj(yj(t))}),{unsafe:!0}),cA("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),_A);var _j=ri,kj=j,Ej=nn,Sj=pi,Mj=i,Tj=w("".charAt);_j({target:"String",proto:!0,forced:Mj((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(t){var e=Sj(kj(this)),r=e.length,n=Ej(t),i=n>=0?n:r+n;return i<0||i>=r?void 0:Tj(e,i)}});var Pj=w,Oj=nn,Ij=pi,Rj=j,Cj=Pj("".charAt),jj=Pj("".charCodeAt),Dj=Pj("".slice),Lj=function(t){return function(e,r){var n,i,a=Ij(Rj(e)),o=Oj(r),s=a.length;return o<0||o>=s?t?"":void 0:(n=jj(a,o))<55296||n>56319||o+1===s||(i=jj(a,o+1))<56320||i>57343?t?Cj(a,o):n:t?Dj(a,o,o+2):i-56320+(n-55296<<10)+65536}},zj={codeAt:Lj(!1),charAt:Lj(!0)},Fj=zj.codeAt;ri({target:"String",proto:!0},{codePointAt:function(t){return Fj(this,t)}});var Bj=lR,Nj=TypeError,Uj=function(t){if(Bj(t))throw Nj("The method doesn't accept regular expressions");return t},Yj=ee("match"),Gj=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Yj]=!1,"/./"[t](e)}catch(t){}}return!1},Hj=ri,Wj=Ea,qj=n.f,Xj=hn,Vj=pi,Qj=Uj,Kj=j,Jj=Gj,Zj=Wj("".endsWith),$j=Wj("".slice),tD=Math.min,eD=Jj("endsWith"),rD=!eD&&!!function(){var t=qj(String.prototype,"endsWith");return t&&!t.writable}();Hj({target:"String",proto:!0,forced:!rD&&!eD},{endsWith:function(t){var e=Vj(Kj(this));Qj(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,i=void 0===r?n:tD(Xj(r),n),a=Vj(t);return Zj?Zj(e,a,i):$j(e,i-a.length,i)===a}});var nD=ri,iD=w,aD=cn,oD=RangeError,sD=String.fromCharCode,cD=String.fromCodePoint,uD=iD([].join);nD({target:"String",stat:!0,arity:1,forced:!!cD&&1!=cD.length},{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,i=0;n>i;){if(e=+arguments[i++],aD(e,1114111)!==e)throw oD(e+" is not a valid code point");r[i]=e<65536?sD(e):sD(55296+((e-=65536)>>10),e%1024+56320)}return uD(r,"")}});var lD=ri,hD=Uj,fD=j,dD=pi,pD=Gj,gD=w("".indexOf);lD({target:"String",proto:!0,forced:!pD("includes")},{includes:function(t){return!!~gD(dD(fD(this)),dD(hD(t)),arguments.length>1?arguments[1]:void 0)}});var vD=zj.charAt,mD=pi,yD=Pr,bD=tp,xD=ep,wD="String Iterator",AD=yD.set,_D=yD.getterFor(wD);bD(String,"String",(function(t){AD(this,{type:wD,string:mD(t),index:0})}),(function(){var t,e=_D(this),r=e.string,n=e.index;return n>=r.length?xD(void 0,!0):(t=vD(r,n),e.index+=t.length,xD(t,!1))}));var kD=Ea,ED=Jr,SD=GC,MD=i,TD=ee,PD=Xe,OD=TD("species"),ID=RegExp.prototype,RD=function(t,e,r,n){var i=TD(t),a=!MD((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),o=a&&!MD((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[OD]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return e=!0,null},r[i](""),!e}));if(!a||!o||r){var s=kD(/./[i]),c=e(i,""[t],(function(t,e,r,n,i){var o=kD(t),c=e.exec;return c===SD||c===ID.exec?a&&!i?{done:!0,value:s(e,r,n)}:{done:!0,value:o(r,e,n)}:{done:!1}}));ED(String.prototype,t,c[0]),ED(ID,i,c[1])}n&&PD(ID[i],"sham",!0)},CD=zj.charAt,jD=function(t,e,r){return e+(r?CD(t,e).length:1)},DD=u,LD=Ce,zD=U,FD=E,BD=GC,ND=TypeError,UD=function(t,e){var r=t.exec;if(zD(r)){var n=DD(r,t,e);return null!==n&&LD(n),n}if("RegExp"===FD(t))return DD(BD,t,e);throw ND("RegExp#exec called on incompatible receiver")},YD=u,GD=Ce,HD=I,WD=hn,qD=pi,XD=j,VD=wt,QD=jD,KD=UD;RD("match",(function(t,e,r){return[function(e){var r=XD(this),n=HD(e)?void 0:VD(e,t);return n?YD(n,e,r):new RegExp(e)[t](qD(r))},function(t){var n=GD(this),i=qD(t),a=r(e,n,i);if(a.done)return a.value;if(!n.global)return KD(n,i);var o=n.unicode;n.lastIndex=0;for(var s,c=[],u=0;null!==(s=KD(n,i));){var l=qD(s[0]);c[u]=l,""===l&&(n.lastIndex=QD(i,WD(n.lastIndex),o)),u++}return 0===u?null:c}]}));var JD=ri,ZD=u,$D=Ea,tL=jd,eL=ep,rL=j,nL=hn,iL=pi,aL=Ce,oL=I,sL=lR,cL=yR,uL=wt,lL=Jr,hL=i,fL=gb,dL=jD,pL=UD,gL=Pr,vL=ee("matchAll"),mL="RegExp String",yL=mL+" Iterator",bL=gL.set,xL=gL.getterFor(yL),wL=RegExp.prototype,AL=TypeError,_L=$D("".indexOf),kL=$D("".matchAll),EL=!!kL&&!hL((function(){kL("a",/./)})),SL=tL((function(t,e,r,n){bL(this,{type:yL,regexp:t,string:e,global:r,unicode:n,done:!1})}),mL,(function(){var t=xL(this);if(t.done)return eL(void 0,!0);var e=t.regexp,r=t.string,n=pL(e,r);return null===n?(t.done=!0,eL(void 0,!0)):t.global?(""===iL(n[0])&&(e.lastIndex=dL(r,nL(e.lastIndex),t.unicode)),eL(n,!1)):(t.done=!0,eL(n,!1))})),ML=function(t){var e,r,n,i=aL(this),a=iL(t),o=fL(i,RegExp),s=iL(cL(i));return e=new o(o===RegExp?i.source:i,s),r=!!~_L(s,"g"),n=!!~_L(s,"u"),e.lastIndex=nL(i.lastIndex),new SL(e,a,r,n)};JD({target:"String",proto:!0,forced:EL},{matchAll:function(t){var e,r,n,i=rL(this);if(oL(t)){if(EL)return kL(i,t)}else{if(sL(t)&&(e=iL(rL(cL(t))),!~_L(e,"g")))throw AL("`.matchAll` does not allow non-global regexes");if(EL)return kL(i,t);if(n=uL(t,vL))return ZD(n,t,i)}return r=iL(i),new RegExp(t,"g")[vL](r)}}),vL in wL||lL(wL,vL,ML);var TL=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(K),PL=ex.end;ri({target:"String",proto:!0,forced:TL},{padEnd:function(t){return PL(this,t,arguments.length>1?arguments[1]:void 0)}});var OL=ex.start;ri({target:"String",proto:!0,forced:TL},{padStart:function(t){return OL(this,t,arguments.length>1?arguments[1]:void 0)}});var IL=ri,RL=w,CL=z,jL=zt,DL=pi,LL=dn,zL=RL([].push),FL=RL([].join);IL({target:"String",stat:!0},{raw:function(t){var e=CL(jL(t).raw),r=LL(e);if(!r)return"";for(var n=arguments.length,i=[],a=0;;){if(zL(i,DL(e[a++])),a===r)return FL(i,"");a<n&&zL(i,DL(arguments[a]))}}}),ri({target:"String",proto:!0},{repeat:qb});var BL=w,NL=zt,UL=Math.floor,YL=BL("".charAt),GL=BL("".replace),HL=BL("".slice),WL=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,qL=/\$([$&'`]|\d{1,2})/g,XL=function(t,e,r,n,i,a){var o=r+t.length,s=n.length,c=qL;return void 0!==i&&(i=NL(i),c=WL),GL(a,c,(function(a,c){var u;switch(YL(c,0)){case"$":return"$";case"&":return t;case"`":return HL(e,0,r);case"'":return HL(e,o);case"<":u=i[HL(c,1,-1)];break;default:var l=+c;if(0===l)return a;if(l>s){var h=UL(l/10);return 0===h?a:h<=s?void 0===n[h-1]?YL(c,1):n[h-1]+YL(c,1):a}u=n[l-1]}return void 0===u?"":u}))},VL=Ds,QL=u,KL=w,JL=RD,ZL=i,$L=Ce,tz=U,ez=I,rz=nn,nz=hn,iz=pi,az=j,oz=jD,sz=wt,cz=XL,uz=UD,lz=ee("replace"),hz=Math.max,fz=Math.min,dz=KL([].concat),pz=KL([].push),gz=KL("".indexOf),vz=KL("".slice),mz="$0"==="a".replace(/./,"$0"),yz=!!/./[lz]&&""===/./[lz]("a","$0"),bz=!ZL((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}));JL("replace",(function(t,e,r){var n=yz?"$":"$0";return[function(t,r){var n=az(this),i=ez(t)?void 0:sz(t,lz);return i?QL(i,t,n,r):QL(e,iz(n),t,r)},function(t,i){var a=$L(this),o=iz(t);if("string"==typeof i&&-1===gz(i,n)&&-1===gz(i,"$<")){var s=r(e,a,o,i);if(s.done)return s.value}var c=tz(i);c||(i=iz(i));var u=a.global;if(u){var l=a.unicode;a.lastIndex=0}for(var h=[];;){var f=uz(a,o);if(null===f)break;if(pz(h,f),!u)break;""===iz(f[0])&&(a.lastIndex=oz(o,nz(a.lastIndex),l))}for(var d,p="",g=0,v=0;v<h.length;v++){for(var m=iz((f=h[v])[0]),y=hz(fz(rz(f.index),o.length),0),b=[],x=1;x<f.length;x++)pz(b,void 0===(d=f[x])?d:String(d));var w=f.groups;if(c){var A=dz([m],b,y,o);void 0!==w&&pz(A,w);var _=iz(VL(i,void 0,A))}else _=cz(m,o,y,b,w,i);y>=g&&(p+=vz(o,g,y)+_,g=y+m.length)}return p+vz(o,g)}]}),!bz||!mz||yz);var xz=ri,wz=u,Az=w,_z=j,kz=U,Ez=I,Sz=lR,Mz=pi,Tz=wt,Pz=yR,Oz=XL,Iz=ee("replace"),Rz=TypeError,Cz=Az("".indexOf);Az("".replace);var jz=Az("".slice),Dz=Math.max,Lz=function(t,e,r){return r>t.length?-1:""===e?r:Cz(t,e,r)};xz({target:"String",proto:!0},{replaceAll:function(t,e){var r,n,i,a,o,s,c,u,l=_z(this),h=0,f=0,d="";if(!Ez(t)){if(Sz(t)&&(r=Mz(_z(Pz(t))),!~Cz(r,"g")))throw Rz("`.replaceAll` does not allow non-global regexes");if(n=Tz(t,Iz))return wz(n,t,l,e)}for(i=Mz(l),a=Mz(t),(o=kz(e))||(e=Mz(e)),s=a.length,c=Dz(1,s),h=Lz(i,a,0);-1!==h;)u=o?Mz(e(a,h,i)):Oz(a,i,h,[],void 0,e),d+=jz(i,f,h)+u,f=h+s,h=Lz(i,a,h+c);return f<i.length&&(d+=jz(i,f)),d}});var zz=u,Fz=Ce,Bz=I,Nz=j,Uz=FS,Yz=pi,Gz=wt,Hz=UD;RD("search",(function(t,e,r){return[function(e){var r=Nz(this),n=Bz(e)?void 0:Gz(e,t);return n?zz(n,e,r):new RegExp(e)[t](Yz(r))},function(t){var n=Fz(this),i=Yz(t),a=r(e,n,i);if(a.done)return a.value;var o=n.lastIndex;Uz(o,0)||(n.lastIndex=0);var s=Hz(n,i);return Uz(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var Wz=Ds,qz=u,Xz=w,Vz=RD,Qz=Ce,Kz=I,Jz=lR,Zz=j,$z=gb,tF=jD,eF=hn,rF=pi,nF=wt,iF=Ji,aF=UD,oF=GC,sF=i,cF=kR.UNSUPPORTED_Y,uF=4294967295,lF=Math.min,hF=[].push,fF=Xz(/./.exec),dF=Xz(hF),pF=Xz("".slice),gF=!sF((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));Vz("split",(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=rF(Zz(this)),i=void 0===r?uF:r>>>0;if(0===i)return[];if(void 0===t)return[n];if(!Jz(t))return qz(e,n,t,i);for(var a,o,s,c=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,h=new RegExp(t.source,u+"g");(a=qz(oF,h,n))&&!((o=h.lastIndex)>l&&(dF(c,pF(n,l,a.index)),a.length>1&&a.index<n.length&&Wz(hF,c,iF(a,1)),s=a[0].length,l=o,c.length>=i));)h.lastIndex===a.index&&h.lastIndex++;return l===n.length?!s&&fF(h,"")||dF(c,""):dF(c,pF(n,l)),c.length>i?iF(c,0,i):c}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:qz(e,this,t,r)}:e,[function(e,r){var i=Zz(this),a=Kz(e)?void 0:nF(e,t);return a?qz(a,e,i,r):qz(n,rF(i),e,r)},function(t,i){var a=Qz(this),o=rF(t),s=r(n,a,o,i,n!==e);if(s.done)return s.value;var c=$z(a,RegExp),u=a.unicode,l=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(cF?"g":"y"),h=new c(cF?"^(?:"+a.source+")":a,l),f=void 0===i?uF:i>>>0;if(0===f)return[];if(0===o.length)return null===aF(h,o)?[o]:[];for(var d=0,p=0,g=[];p<o.length;){h.lastIndex=cF?0:p;var v,m=aF(h,cF?pF(o,p):o);if(null===m||(v=lF(eF(h.lastIndex+(cF?p:0)),o.length))===d)p=tF(o,p,u);else{if(dF(g,pF(o,d,p)),g.length===f)return g;for(var y=1;y<=m.length-1;y++)if(dF(g,m[y]),g.length===f)return g;p=d=v}}return dF(g,pF(o,d)),g}]}),!gF,cF);var vF=ri,mF=Ea,yF=n.f,bF=hn,xF=pi,wF=Uj,AF=j,_F=Gj,kF=mF("".startsWith),EF=mF("".slice),SF=Math.min,MF=_F("startsWith"),TF=!MF&&!!function(){var t=yF(String.prototype,"startsWith");return t&&!t.writable}();vF({target:"String",proto:!0,forced:!TF&&!MF},{startsWith:function(t){var e=xF(AF(this));wF(t);var r=bF(SF(arguments.length>1?arguments[1]:void 0,e.length)),n=xF(t);return kF?kF(e,n,r):EF(e,r,r+n.length)===n}});var PF=ri,OF=j,IF=nn,RF=pi,CF=w("".slice),jF=Math.max,DF=Math.min;PF({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(t,e){var r,n,i=RF(OF(this)),a=i.length,o=IF(t);return o===1/0&&(o=0),o<0&&(o=jF(a+o,0)),(r=void 0===e?a:IF(e))<=0||r===1/0||o>=(n=DF(o+r,a))?"":CF(i,o,n)}});var LF=tr.PROPER,zF=i,FF=C_,BF=function(t){return zF((function(){return!!FF[t]()||"​…᠎"!=="​…᠎"[t]()||LF&&FF[t].name!==t}))},NF=U_.trim;ri({target:"String",proto:!0,forced:BF("trim")},{trim:function(){return NF(this)}});var UF=U_.end,YF=BF("trimEnd")?function(){return UF(this)}:"".trimEnd;ri({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==YF},{trimRight:YF});ri({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==YF},{trimEnd:YF});var GF=U_.start,HF=BF("trimStart")?function(){return GF(this)}:"".trimStart;ri({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==HF},{trimLeft:HF});ri({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==HF},{trimStart:HF});var WF=j,qF=pi,XF=/"/g,VF=w("".replace),QF=function(t,e,r,n){var i=qF(WF(t)),a="<"+e;return""!==r&&(a+=" "+r+'="'+VF(qF(n),XF,"&quot;")+'"'),a+">"+i+"</"+e+">"},KF=i,JF=function(t){return KF((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))},ZF=QF;ri({target:"String",proto:!0,forced:JF("anchor")},{anchor:function(t){return ZF(this,"a","name",t)}});var $F=QF;ri({target:"String",proto:!0,forced:JF("big")},{big:function(){return $F(this,"big","","")}});var tB=QF;ri({target:"String",proto:!0,forced:JF("blink")},{blink:function(){return tB(this,"blink","","")}});var eB=QF;ri({target:"String",proto:!0,forced:JF("bold")},{bold:function(){return eB(this,"b","","")}});var rB=QF;ri({target:"String",proto:!0,forced:JF("fixed")},{fixed:function(){return rB(this,"tt","","")}});var nB=QF;ri({target:"String",proto:!0,forced:JF("fontcolor")},{fontcolor:function(t){return nB(this,"font","color",t)}});var iB=QF;ri({target:"String",proto:!0,forced:JF("fontsize")},{fontsize:function(t){return iB(this,"font","size",t)}});var aB=QF;ri({target:"String",proto:!0,forced:JF("italics")},{italics:function(){return aB(this,"i","","")}});var oB=QF;ri({target:"String",proto:!0,forced:JF("link")},{link:function(t){return oB(this,"a","href",t)}});var sB=QF;ri({target:"String",proto:!0,forced:JF("small")},{small:function(){return sB(this,"small","","")}});var cB=QF;ri({target:"String",proto:!0,forced:JF("strike")},{strike:function(){return cB(this,"strike","","")}});var uB=QF;ri({target:"String",proto:!0,forced:JF("sub")},{sub:function(){return uB(this,"sub","","")}});var lB=QF;ri({target:"String",proto:!0,forced:JF("sup")},{sup:function(){return lB(this,"sup","","")}});var hB={exports:{}},fB=r,dB=i,pB=sd,gB=ob.NATIVE_ARRAY_BUFFER_VIEWS,vB=fB.ArrayBuffer,mB=fB.Int8Array,yB=!gB||!dB((function(){mB(1)}))||!dB((function(){new mB(-1)}))||!pB((function(t){new mB,new mB(null),new mB(1.5),new mB(t)}),!0)||dB((function(){return 1!==new mB(new vB(2),1,void 0).length})),bB=nn,xB=RangeError,wB=function(t){var e=bB(t);if(e<0)throw xB("The argument can't be less than 0");return e},AB=RangeError,_B=function(t,e){var r=wB(t);if(r%e)throw AB("Wrong offset");return r},kB=hi,EB=function(t){var e=kB(t);return"BigInt64Array"==e||"BigUint64Array"==e},SB=ue,MB=TypeError,TB=function(t){var e=SB(t,"number");if("number"==typeof e)throw MB("Can't convert number to bigint");return BigInt(e)},PB=Pa,OB=u,IB=lb,RB=zt,CB=dn,jB=xl,DB=dl,LB=sl,zB=EB,FB=ob.aTypedArrayConstructor,BB=TB,NB=function(t){var e,r,n,i,a,o,s,c,u=IB(this),l=RB(t),h=arguments.length,f=h>1?arguments[1]:void 0,d=void 0!==f,p=DB(l);if(p&&!LB(p))for(c=(s=jB(l,p)).next,l=[];!(o=OB(c,s)).done;)l.push(o.value);for(d&&h>2&&(f=PB(f,arguments[2])),r=CB(l),n=new(FB(u))(r),i=zB(n),e=0;r>e;e++)a=d?f(l[e],e):l[e],n[e]=i?BB(a):+a;return n},UB=ri,YB=r,GB=u,HB=a,WB=yB,qB=ob,XB=yy,VB=nm,QB=v,KB=Xe,JB=bk,ZB=hn,$B=sm,tN=_B,eN=fe,rN=Nt,nN=hi,iN=H,aN=ft,oN=Ni,sN=Q,cN=qc,uN=Zr.f,lN=NB,hN=oo.forEach,fN=tv,dN=aa,pN=Te,gN=n,vN=Zc,mN=Pr.get,yN=Pr.set,bN=Pr.enforce,xN=pN.f,wN=gN.f,AN=Math.round,_N=YB.RangeError,kN=XB.ArrayBuffer,EN=kN.prototype,SN=XB.DataView,MN=qB.NATIVE_ARRAY_BUFFER_VIEWS,TN=qB.TYPED_ARRAY_TAG,PN=qB.TypedArray,ON=qB.TypedArrayPrototype,IN=qB.aTypedArrayConstructor,RN=qB.isTypedArray,CN="BYTES_PER_ELEMENT",jN="Wrong length",DN=function(t,e){IN(t);for(var r=0,n=e.length,i=new t(n);n>r;)i[r]=e[r++];return i},LN=function(t,e){dN(t,e,{configurable:!0,get:function(){return mN(this)[e]}})},zN=function(t){var e;return sN(EN,t)||"ArrayBuffer"==(e=nN(t))||"SharedArrayBuffer"==e},FN=function(t,e){return RN(t)&&!aN(e)&&e in t&&JB(+e)&&e>=0},BN=function(t,e){return e=eN(e),FN(t,e)?QB(2,t[e]):wN(t,e)},NN=function(t,e,r){return e=eN(e),!(FN(t,e)&&iN(r)&&rN(r,"value"))||rN(r,"get")||rN(r,"set")||r.configurable||rN(r,"writable")&&!r.writable||rN(r,"enumerable")&&!r.enumerable?xN(t,e,r):(t[e]=r.value,t)};HB?(MN||(gN.f=BN,pN.f=NN,LN(ON,"buffer"),LN(ON,"byteOffset"),LN(ON,"byteLength"),LN(ON,"length")),UB({target:"Object",stat:!0,forced:!MN},{getOwnPropertyDescriptor:BN,defineProperty:NN}),hB.exports=function(t,e,r){var n=t.match(/\d+/)[0]/8,i=t+(r?"Clamped":"")+"Array",a="get"+t,o="set"+t,s=YB[i],c=s,u=c&&c.prototype,l={},h=function(t,e){xN(t,e,{get:function(){return function(t,e){var r=mN(t);return r.view[a](e*n+r.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,i){var a=mN(t);r&&(i=(i=AN(i))<0?0:i>255?255:255&i),a.view[o](e*n+a.byteOffset,i,!0)}(this,e,t)},enumerable:!0})};MN?WB&&(c=e((function(t,e,r,i){return VB(t,u),vN(iN(e)?zN(e)?void 0!==i?new s(e,tN(r,n),i):void 0!==r?new s(e,tN(r,n)):new s(e):RN(e)?DN(c,e):GB(lN,c,e):new s($B(e)),t,c)})),cN&&cN(c,PN),hN(uN(s),(function(t){t in c||KB(c,t,s[t])})),c.prototype=u):(c=e((function(t,e,r,i){VB(t,u);var a,o,s,l=0,f=0;if(iN(e)){if(!zN(e))return RN(e)?DN(c,e):GB(lN,c,e);a=e,f=tN(r,n);var d=e.byteLength;if(void 0===i){if(d%n)throw _N(jN);if((o=d-f)<0)throw _N(jN)}else if((o=ZB(i)*n)+f>d)throw _N(jN);s=o/n}else s=$B(e),a=new kN(o=s*n);for(yN(t,{buffer:a,byteOffset:f,byteLength:o,length:s,view:new SN(a)});l<s;)h(t,l++)})),cN&&cN(c,PN),u=c.prototype=oN(ON)),u.constructor!==c&&KB(u,"constructor",c),bN(u).TypedArrayConstructor=c,TN&&KB(u,TN,i);var f=c!=s;l[i]=c,UB({global:!0,constructor:!0,forced:f,sham:!MN},l),CN in c||KB(c,CN,n),CN in u||KB(u,CN,n),fN(i)}):hB.exports=function(){},(0,hB.exports)("Float32",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,hB.exports)("Float64",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,hB.exports)("Int8",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,hB.exports)("Int16",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,hB.exports)("Int32",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,hB.exports)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,hB.exports)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}),!0),(0,hB.exports)("Uint16",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,hB.exports)("Uint32",(function(t){return function(e,r,n){return t(this,e,r,n)}}));var UN=dn,YN=nn,GN=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("at",(function(t){var e=GN(this),r=UN(e),n=YN(t),i=n>=0?n:r+n;return i<0||i>=r?void 0:e[i]}));var HN=ob,WN=w(Xh),qN=HN.aTypedArray;(0,HN.exportTypedArrayMethod)("copyWithin",(function(t,e){return WN(qN(this),t,e,arguments.length>2?arguments[2]:void 0)}));var XN=oo.every,VN=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("every",(function(t){return XN(VN(this),t,arguments.length>1?arguments[1]:void 0)}));var QN=ef,KN=TB,JN=hi,ZN=u,$N=i,tU=ob.aTypedArray,eU=ob.exportTypedArrayMethod,rU=w("".slice),nU=$N((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t}));eU("fill",(function(t){var e=arguments.length;tU(this);var r="Big"===rU(JN(this),0,3)?KN(t):+t;return ZN(QN,this,r,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),nU);var iU=gb,aU=ob.aTypedArrayConstructor,oU=ob.getTypedArrayConstructor,sU=function(t){return aU(iU(t,oU(t)))},cU=wv,uU=sU,lU=oo.filter,hU=function(t,e){return cU(uU(t),e)},fU=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("filter",(function(t){var e=lU(fU(this),t,arguments.length>1?arguments[1]:void 0);return hU(this,e)}));var dU=oo.find,pU=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("find",(function(t){return dU(pU(this),t,arguments.length>1?arguments[1]:void 0)}));var gU=oo.findIndex,vU=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("findIndex",(function(t){return gU(vU(this),t,arguments.length>1?arguments[1]:void 0)}));var mU=xf.findLast,yU=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("findLast",(function(t){return mU(yU(this),t,arguments.length>1?arguments[1]:void 0)}));var bU=xf.findLastIndex,xU=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("findLastIndex",(function(t){return bU(xU(this),t,arguments.length>1?arguments[1]:void 0)}));var wU=oo.forEach,AU=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("forEach",(function(t){wU(AU(this),t,arguments.length>1?arguments[1]:void 0)})),(0,ob.exportTypedArrayStaticMethod)("from",NB,yB);var _U=yn.includes,kU=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("includes",(function(t){return _U(kU(this),t,arguments.length>1?arguments[1]:void 0)}));var EU=yn.indexOf,SU=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("indexOf",(function(t){return EU(SU(this),t,arguments.length>1?arguments[1]:void 0)}));var MU=r,TU=i,PU=w,OU=ob,IU=dp,RU=ee("iterator"),CU=MU.Uint8Array,jU=PU(IU.values),DU=PU(IU.keys),LU=PU(IU.entries),zU=OU.aTypedArray,FU=OU.exportTypedArrayMethod,BU=CU&&CU.prototype,NU=!TU((function(){BU[RU].call([1])})),UU=!!BU&&BU.values&&BU[RU]===BU.values&&"values"===BU.values.name,YU=function(){return jU(zU(this))};FU("entries",(function(){return LU(zU(this))}),NU),FU("keys",(function(){return DU(zU(this))}),NU),FU("values",YU,NU||!UU,{name:"values"}),FU(RU,YU,NU||!UU,{name:"values"});var GU=ob.aTypedArray,HU=ob.exportTypedArrayMethod,WU=w([].join);HU("join",(function(t){return WU(GU(this),t)}));var qU=Ds,XU=Pp,VU=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return qU(XU,VU(this),e>1?[t,arguments[1]]:[t])}));var QU=oo.map,KU=sU,JU=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("map",(function(t){return QU(JU(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(KU(t))(e)}))}));var ZU=ob.aTypedArrayConstructor;(0,ob.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,r=new(ZU(this))(e);e>t;)r[t]=arguments[t++];return r}),yB);var $U=Qp.left,tY=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return $U(tY(this),t,e,e>1?arguments[1]:void 0)}));var eY=Qp.right,rY=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return eY(rY(this),t,e,e>1?arguments[1]:void 0)}));var nY=ob.aTypedArray,iY=ob.exportTypedArrayMethod,aY=Math.floor;iY("reverse",(function(){for(var t,e=this,r=nY(e).length,n=aY(r/2),i=0;i<n;)t=e[i],e[i++]=e[--r],e[r]=t;return e}));var oY=r,sY=u,cY=ob,uY=dn,lY=_B,hY=zt,fY=i,dY=oY.RangeError,pY=oY.Int8Array,gY=pY&&pY.prototype,vY=gY&&gY.set,mY=cY.aTypedArray,yY=cY.exportTypedArrayMethod,bY=!fY((function(){var t=new Uint8ClampedArray(2);return sY(vY,t,{length:1,0:3},1),3!==t[1]})),xY=bY&&cY.NATIVE_ARRAY_BUFFER_VIEWS&&fY((function(){var t=new pY(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));yY("set",(function(t){mY(this);var e=lY(arguments.length>1?arguments[1]:void 0,1),r=hY(t);if(bY)return sY(vY,this,r,e);var n=this.length,i=uY(r),a=0;if(i+e>n)throw dY("Wrong length");for(;a<i;)this[e+a]=r[a++]}),!bY||xY);var wY=sU,AY=Ls,_Y=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("slice",(function(t,e){for(var r=AY(_Y(this),t,e),n=wY(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),i((function(){new Int8Array(1).slice()})));var kY=oo.some,EY=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("some",(function(t){return kY(EY(this),t,arguments.length>1?arguments[1]:void 0)}));var SY=Ea,MY=i,TY=yt,PY=_g,OY=Eg,IY=Sg,RY=nt,CY=Tg,jY=ob.aTypedArray,DY=ob.exportTypedArrayMethod,LY=r.Uint16Array,zY=LY&&SY(LY.prototype.sort),FY=!(!zY||MY((function(){zY(new LY(2),null)}))&&MY((function(){zY(new LY(2),{})}))),BY=!!zY&&!MY((function(){if(RY)return RY<74;if(OY)return OY<67;if(IY)return!0;if(CY)return CY<602;var t,e,r=new LY(516),n=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,n[t]=t-2*e+3;for(zY(r,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==n[t])return!0}));DY("sort",(function(t){return void 0!==t&&TY(t),BY?zY(this,t):PY(jY(this),function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!=r?-1:e!=e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}}(t))}),!BY||FY);var NY=hn,UY=cn,YY=sU,GY=ob.aTypedArray;(0,ob.exportTypedArrayMethod)("subarray",(function(t,e){var r=GY(this),n=r.length,i=UY(t,n);return new(YY(r))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,NY((void 0===e?n:UY(e,n))-i))}));var HY=Ds,WY=ob,qY=i,XY=Ls,VY=r.Int8Array,QY=WY.aTypedArray,KY=WY.exportTypedArrayMethod,JY=[].toLocaleString,ZY=!!VY&&qY((function(){JY.call(new VY(1))}));KY("toLocaleString",(function(){return HY(JY,ZY?XY(QY(this)):QY(this),XY(arguments))}),qY((function(){return[1,2].toLocaleString()!=new VY([1,2]).toLocaleString()}))||!qY((function(){VY.prototype.toLocaleString.call([1,2])})));var $Y=gv,tG=ob.aTypedArray,eG=ob.getTypedArrayConstructor;(0,ob.exportTypedArrayMethod)("toReversed",(function(){return $Y(tG(this),eG(this))}));var rG=yt,nG=wv,iG=ob.aTypedArray,aG=ob.getTypedArrayConstructor,oG=ob.exportTypedArrayMethod,sG=w(ob.TypedArrayPrototype.sort);oG("toSorted",(function(t){void 0!==t&&rG(t);var e=iG(this),r=nG(aG(e),e);return sG(r,t)}));var cG=ob.exportTypedArrayMethod,uG=i,lG=w,hG=r.Uint8Array,fG=hG&&hG.prototype||{},dG=[].toString,pG=lG([].join);uG((function(){dG.call({})}))&&(dG=function(){return pG(this)});var gG=fG.toString!=dG;cG("toString",dG,gG);var vG=Vv,mG=EB,yG=nn,bG=TB,xG=ob.aTypedArray,wG=ob.getTypedArrayConstructor,AG=ob.exportTypedArrayMethod,_G=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();AG("with",{with:function(t,e){var r=xG(this),n=yG(t),i=mG(r)?bG(e):+e;return vG(r,wG(r),n,i)}}.with,!_G);var kG=ri,EG=w,SG=pi,MG=String.fromCharCode,TG=EG("".charAt),PG=EG(/./.exec),OG=EG("".slice),IG=/^[\da-f]{2}$/i,RG=/^[\da-f]{4}$/i;kG({global:!0},{unescape:function(t){for(var e,r,n=SG(t),i="",a=n.length,o=0;o<a;){if("%"===(e=TG(n,o++)))if("u"===TG(n,o)){if(r=OG(n,o+1,o+5),PG(RG,r)){i+=MG(parseInt(r,16)),o+=5;continue}}else if(r=OG(n,o,o+2),PG(IG,r)){i+=MG(parseInt(r,16)),o+=2;continue}i+=e}return i}});var CG=w,jG=tm,DG=_w.exports.getWeakData,LG=nm,zG=Ce,FG=I,BG=H,NG=Fl,UG=Nt,YG=Pr.set,GG=Pr.getterFor,HG=oo.find,WG=oo.findIndex,qG=CG([].splice),XG=0,VG=function(t){return t.frozen||(t.frozen=new QG)},QG=function(){this.entries=[]},KG=function(t,e){return HG(t.entries,(function(t){return t[0]===e}))};QG.prototype={get:function(t){var e=KG(this,t);if(e)return e[1]},has:function(t){return!!KG(this,t)},set:function(t,e){var r=KG(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=WG(this.entries,(function(e){return e[0]===t}));return~e&&qG(this.entries,e,1),!!~e}};var JG,ZG={getConstructor:function(t,e,r,n){var i=t((function(t,i){LG(t,a),YG(t,{type:e,id:XG++,frozen:void 0}),FG(i)||NG(i,t[n],{that:t,AS_ENTRIES:r})})),a=i.prototype,o=GG(e),s=function(t,e,r){var n=o(t),i=DG(zG(e),!0);return!0===i?VG(n).set(e,r):i[n.id]=r,t};return jG(a,{delete:function(t){var e=o(this);if(!BG(t))return!1;var r=DG(t);return!0===r?VG(e).delete(t):r&&UG(r,e.id)&&delete r[e.id]},has:function(t){var e=o(this);if(!BG(t))return!1;var r=DG(t);return!0===r?VG(e).has(t):r&&UG(r,e.id)}}),jG(a,r?{get:function(t){var e=o(this);if(BG(t)){var r=DG(t);return!0===r?VG(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),i}},$G=Iw,tH=r,eH=w,rH=tm,nH=_w.exports,iH=cA,aH=ZG,oH=H,sH=Pr.enforce,cH=i,uH=lr,lH=Object,hH=Array.isArray,fH=lH.isExtensible,dH=lH.isFrozen,pH=lH.isSealed,gH=lH.freeze,vH=lH.seal,mH={},yH={},bH=!tH.ActiveXObject&&"ActiveXObject"in tH,xH=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},wH=iH("WeakMap",xH,aH),AH=wH.prototype,_H=eH(AH.set);if(uH)if(bH){JG=aH.getConstructor(xH,"WeakMap",!0),nH.enable();var kH=eH(AH.delete),EH=eH(AH.has),SH=eH(AH.get);rH(AH,{delete:function(t){if(oH(t)&&!fH(t)){var e=sH(this);return e.frozen||(e.frozen=new JG),kH(this,t)||e.frozen.delete(t)}return kH(this,t)},has:function(t){if(oH(t)&&!fH(t)){var e=sH(this);return e.frozen||(e.frozen=new JG),EH(this,t)||e.frozen.has(t)}return EH(this,t)},get:function(t){if(oH(t)&&!fH(t)){var e=sH(this);return e.frozen||(e.frozen=new JG),EH(this,t)?SH(this,t):e.frozen.get(t)}return SH(this,t)},set:function(t,e){if(oH(t)&&!fH(t)){var r=sH(this);r.frozen||(r.frozen=new JG),EH(this,t)?_H(this,t,e):r.frozen.set(t,e)}else _H(this,t,e);return this}})}else $G&&cH((function(){var t=gH([]);return _H(new wH,t,1),!dH(t)}))&&rH(AH,{set:function(t,e){var r;return hH(t)&&(dH(t)?r=mH:pH(t)&&(r=yH)),_H(this,t,e),r==mH&&gH(t),r==yH&&vH(t),this}});cA("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),ZG);for(var MH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",TH={},PH=0;PH<66;PH++)TH[MH.charAt(PH)]=PH;var OH={itoc:MH,ctoi:TH},IH=ri,RH=r,CH=V,jH=w,DH=u,LH=i,zH=pi,FH=Nt,BH=GM,NH=OH.ctoi,UH=/[^\d+/a-z]/i,YH=/[\t\n\f\r ]+/g,GH=/[=]{1,2}$/,HH=CH("atob"),WH=String.fromCharCode,qH=jH("".charAt),XH=jH("".replace),VH=jH(UH.exec),QH=LH((function(){return""!==HH(" ")})),KH=!LH((function(){HH("a")})),JH=!QH&&!KH&&!LH((function(){HH()})),ZH=!QH&&!KH&&1!==HH.length;IH({global:!0,bind:!0,enumerable:!0,forced:QH||KH||JH||ZH},{atob:function(t){if(BH(arguments.length,1),JH||ZH)return DH(HH,RH,t);var e,r,n=XH(zH(t),YH,""),i="",a=0,o=0;if(n.length%4==0&&(n=XH(n,GH,"")),n.length%4==1||VH(UH,n))throw new(CH("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;e=qH(n,a++);)FH(NH,e)&&(r=o%4?64*r+NH[e]:NH[e],o++%4&&(i+=WH(255&r>>(-2*o&6))));return i}});var $H=ri,tW=r,eW=V,rW=w,nW=u,iW=i,aW=pi,oW=GM,sW=OH.itoc,cW=eW("btoa"),uW=rW("".charAt),lW=rW("".charCodeAt),hW=!!cW&&!iW((function(){cW()})),fW=!!cW&&iW((function(){return"bnVsbA=="!==cW(null)})),dW=!!cW&&1!==cW.length;$H({global:!0,bind:!0,enumerable:!0,forced:hW||fW||dW},{btoa:function(t){if(oW(arguments.length,1),hW||fW||dW)return nW(cW,tW,aW(t));for(var e,r,n=aW(t),i="",a=0,o=sW;uW(n,a)||(o="=",a%1);){if((r=lW(n,a+=3/4))>255)throw new(eW("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");i+=uW(o,63&(e=e<<8|r)>>8-a%1*8)}return i}});var pW={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},gW=ve("span").classList,vW=gW&&gW.constructor&&gW.constructor.prototype,mW=vW===Object.prototype?void 0:vW,yW=r,bW=pW,xW=mW,wW=Yf,AW=Xe,_W=function(t){if(t&&t.forEach!==wW)try{AW(t,"forEach",wW)}catch(e){t.forEach=wW}};for(var kW in bW)bW[kW]&&_W(yW[kW]&&yW[kW].prototype);_W(xW);var EW=r,SW=pW,MW=mW,TW=dp,PW=Xe,OW=ee,IW=OW("iterator"),RW=OW("toStringTag"),CW=TW.values,jW=function(t,e){if(t){if(t[IW]!==CW)try{PW(t,IW,CW)}catch(e){t[IW]=CW}if(t[RW]||PW(t,RW,e),SW[e])for(var r in TW)if(t[r]!==TW[r])try{PW(t,r,TW[r])}catch(e){t[r]=TW[r]}}};for(var DW in SW)jW(EW[DW]&&EW[DW].prototype,DW);jW(MW,"DOMTokenList");var LW=Kp,zW={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}},FW=ri,BW=function(t){try{if(LW)return Function('return require("'+t+'")')()}catch(t){}},NW=V,UW=i,YW=Ni,GW=v,HW=Te.f,WW=Jr,qW=aa,XW=Nt,VW=nm,QW=Ce,KW=Hu,JW=tu,ZW=zW,$W=uu,tq=Pr,eq=a,rq="DOMException",nq="DATA_CLONE_ERR",iq=NW("Error"),aq=NW(rq)||function(){try{(new(NW("MessageChannel")||BW("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name==nq&&25==t.code)return t.constructor}}(),oq=aq&&aq.prototype,sq=iq.prototype,cq=tq.set,uq=tq.getterFor(rq),lq="stack"in iq(rq),hq=function(t){return XW(ZW,t)&&ZW[t].m?ZW[t].c:0},fq=function(){VW(this,dq);var t=arguments.length,e=JW(t<1?void 0:arguments[0]),r=JW(t<2?void 0:arguments[1],"Error"),n=hq(r);if(cq(this,{type:rq,name:r,message:e,code:n}),eq||(this.name=r,this.message=e,this.code=n),lq){var i=iq(e);i.name=rq,HW(this,"stack",GW(1,$W(i.stack,1)))}},dq=fq.prototype=YW(sq),pq=function(t){return{enumerable:!0,configurable:!0,get:t}},gq=function(t){return pq((function(){return uq(this)[t]}))};eq&&(qW(dq,"code",gq("code")),qW(dq,"message",gq("message")),qW(dq,"name",gq("name"))),HW(dq,"constructor",GW(1,fq));var vq=UW((function(){return!(new aq instanceof iq)})),mq=vq||UW((function(){return sq.toString!==KW||"2: 1"!==String(new aq(1,2))})),yq=vq||UW((function(){return 25!==new aq(1,"DataCloneError").code}));vq||25!==aq[nq]||oq[nq];FW({global:!0,constructor:!0,forced:vq},{DOMException:vq?fq:aq});var bq=NW(rq),xq=bq.prototype;for(var wq in mq&&aq===bq&&WW(xq,"toString",KW),yq&&eq&&aq===bq&&qW(xq,"code",pq((function(){return hq(QW(this).name)}))),ZW)if(XW(ZW,wq)){var Aq=ZW[wq],_q=Aq.s,kq=GW(6,Aq.c);XW(bq,_q)||HW(bq,_q,kq),XW(xq,_q)||HW(xq,_q,kq)}var Eq=ri,Sq=r,Mq=V,Tq=v,Pq=Te.f,Oq=Nt,Iq=nm,Rq=Zc,Cq=tu,jq=zW,Dq=uu,Lq=a,zq="DOMException",Fq=Mq("Error"),Bq=Mq(zq),Nq=function(){Iq(this,Uq);var t=arguments.length,e=Cq(t<1?void 0:arguments[0]),r=Cq(t<2?void 0:arguments[1],"Error"),n=new Bq(e,r),i=Fq(e);return i.name=zq,Pq(n,"stack",Tq(1,Dq(i.stack,1))),Rq(n,this,Nq),n},Uq=Nq.prototype=Bq.prototype,Yq="stack"in Fq(zq),Gq="stack"in new Bq(1,2),Hq=Bq&&Lq&&Object.getOwnPropertyDescriptor(Sq,zq),Wq=!(!Hq||Hq.writable&&Hq.configurable),qq=Yq&&!Wq&&!Gq;Eq({global:!0,constructor:!0,forced:qq},{DOMException:qq?Nq:Bq});var Xq=Mq(zq),Vq=Xq.prototype;if(Vq.constructor!==Xq)for(var Qq in Pq(Vq,"constructor",Tq(1,Xq)),jq)if(Oq(jq,Qq)){var Kq=jq[Qq],Jq=Kq.s;Oq(Xq,Jq)||Pq(Xq,Jq,Tq(6,Kq.c))}var Zq="DOMException";Aa(V(Zq),Zq);var $q=mT.clear;ri({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==$q},{clearImmediate:$q});var tX="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,eX=r,rX=Ds,nX=U,iX=tX,aX=K,oX=Ls,sX=GM,cX=eX.Function,uX=/MSIE .\./.test(aX)||iX&&function(){var t=eX.Bun.version.split(".");return t.length<3||0==t[0]&&(t[1]<3||3==t[1]&&0==t[2])}(),lX=function(t,e){var r=e?2:1;return uX?function(n,i){var a=sX(arguments.length,1)>r,o=nX(n)?n:cX(n),s=a?oX(arguments,r):[],c=a?function(){rX(o,this,s)}:o;return e?t(c,i):t(c)}:t},hX=ri,fX=r,dX=mT.set,pX=lX,gX=fX.setImmediate?pX(dX,!1):dX;hX({global:!0,bind:!0,enumerable:!0,forced:fX.setImmediate!==gX},{setImmediate:gX});var vX=ri,mX=HT,yX=yt,bX=GM,xX=Kp,wX=r.process;vX({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(t){bX(arguments.length,1),yX(t);var e=xX&&wX.domain;mX(e?e.bind(t):t)}});var AX=ri,_X=r,kX=aa,EX=a,SX=TypeError,MX=Object.defineProperty,TX=_X.self!==_X;try{if(EX){var PX=Object.getOwnPropertyDescriptor(_X,"self");!TX&&PX&&PX.get&&PX.enumerable||kX(_X,"self",{get:function(){return _X},set:function(t){if(this!==_X)throw SX("Illegal invocation");MX(_X,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else AX({global:!0,simple:!0,forced:TX},{self:_X})}catch(t){}var OX,IX=w,RX=Map.prototype,CX={Map:Map,set:IX(RX.set),get:IX(RX.get),has:IX(RX.has),remove:IX(RX.delete),proto:RX},jX=w,DX=Set.prototype,LX={Set:Set,add:jX(DX.add),has:jX(DX.has),remove:jX(DX.delete),proto:DX,$has:DX.has,$keys:DX.keys},zX=i,FX=nt,BX=VT,NX=XT,UX=Kp,YX=r.structuredClone,GX=!!YX&&!zX((function(){if(NX&&FX>92||UX&&FX>94||BX&&FX>97)return!1;var t=new ArrayBuffer(8),e=YX(t,{transfer:[t]});return 0!=t.byteLength||8!=e.byteLength})),HX=ri,WX=r,qX=V,XX=w,VX=i,QX=Wt,KX=U,JX=Wa,ZX=I,$X=H,tV=ft,eV=Fl,rV=Ce,nV=hi,iV=Nt,aV=Wi,oV=Xe,sV=dn,cV=GM,uV=yR,lV=CX,hV=LX,fV=hu,dV=GX,pV=WX.Object,gV=WX.Array,vV=WX.Date,mV=WX.Error,yV=WX.EvalError,bV=WX.RangeError,xV=WX.ReferenceError,wV=WX.SyntaxError,AV=WX.TypeError,_V=WX.URIError,kV=WX.PerformanceMark,EV=WX.WebAssembly,SV=EV&&EV.CompileError||mV,MV=EV&&EV.LinkError||mV,TV=EV&&EV.RuntimeError||mV,PV=qX("DOMException"),OV=lV.Map,IV=lV.has,RV=lV.get,CV=lV.set,jV=hV.Set,DV=hV.add,LV=qX("Object","keys"),zV=XX([].push),FV=XX((!0).valueOf),BV=XX(1..valueOf),NV=XX("".valueOf),UV=XX(vV.prototype.getTime),YV=QX("structuredClone"),GV="DataCloneError",HV="Transferring",WV=function(t){return!VX((function(){var e=new WX.Set([7]),r=t(e),n=t(pV(7));return r==e||!r.has(7)||"object"!=typeof n||7!=n}))&&t},qV=function(t,e){return!VX((function(){var r=new e,n=t({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof e&&n.a.stack===r.stack)}))},XV=WX.structuredClone,VV=!qV(XV,mV)||!qV(XV,PV)||(OX=XV,!!VX((function(){var t=OX(new WX.AggregateError([1],YV,{cause:3}));return"AggregateError"!=t.name||1!=t.errors[0]||t.message!=YV||3!=t.cause}))),QV=!XV&&WV((function(t){return new kV(YV,{detail:t}).detail})),KV=WV(XV)||QV,JV=function(t){throw new PV("Uncloneable type: "+t,GV)},ZV=function(t,e){throw new PV((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",GV)},$V=function(t,e){if(tV(t)&&JV("Symbol"),!$X(t))return t;if(e){if(IV(e,t))return RV(e,t)}else e=new OV;var r,n,i,a,o,s,c,u,l,h,f=nV(t),d=!1;switch(f){case"Array":i=gV(sV(t)),d=!0;break;case"Object":i={},d=!0;break;case"Map":i=new OV,d=!0;break;case"Set":i=new jV,d=!0;break;case"RegExp":i=new RegExp(t.source,uV(t));break;case"Error":switch(n=t.name){case"AggregateError":i=qX("AggregateError")([]);break;case"EvalError":i=yV();break;case"RangeError":i=bV();break;case"ReferenceError":i=xV();break;case"SyntaxError":i=wV();break;case"TypeError":i=AV();break;case"URIError":i=_V();break;case"CompileError":i=SV();break;case"LinkError":i=MV();break;case"RuntimeError":i=TV();break;default:i=mV()}d=!0;break;case"DOMException":i=new PV(t.message,t.name),d=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":r=WX[f],$X(r)||ZV(f),i=new r($V(t.buffer,e),t.byteOffset,"DataView"===f?t.byteLength:t.length);break;case"DOMQuad":try{i=new DOMQuad($V(t.p1,e),$V(t.p2,e),$V(t.p3,e),$V(t.p4,e))}catch(e){KV?i=KV(t):ZV(f)}break;case"FileList":if(a=function(){var t;try{t=new WX.DataTransfer}catch(e){try{t=new WX.ClipboardEvent("").clipboardData}catch(t){}}return t&&t.items&&t.files?t:null}()){for(o=0,s=sV(t);o<s;o++)a.items.add($V(t[o],e));i=a.files}else KV?i=KV(t):ZV(f);break;case"ImageData":try{i=new ImageData($V(t.data,e),t.width,t.height,{colorSpace:t.colorSpace})}catch(e){KV?i=KV(t):ZV(f)}break;default:if(KV)i=KV(t);else switch(f){case"BigInt":i=pV(t.valueOf());break;case"Boolean":i=pV(FV(t));break;case"Number":i=pV(BV(t));break;case"String":i=pV(NV(t));break;case"Date":i=new vV(UV(t));break;case"ArrayBuffer":(r=WX.DataView)||"function"==typeof t.slice||ZV(f);try{if("function"==typeof t.slice)i=t.slice(0);else for(s=t.byteLength,i=new ArrayBuffer(s),l=new r(t),h=new r(i),o=0;o<s;o++)h.setUint8(o,l.getUint8(o))}catch(t){throw new PV("ArrayBuffer is detached",GV)}break;case"SharedArrayBuffer":i=t;break;case"Blob":try{i=t.slice(0,t.size,t.type)}catch(t){ZV(f)}break;case"DOMPoint":case"DOMPointReadOnly":r=WX[f];try{i=r.fromPoint?r.fromPoint(t):new r(t.x,t.y,t.z,t.w)}catch(t){ZV(f)}break;case"DOMRect":case"DOMRectReadOnly":r=WX[f];try{i=r.fromRect?r.fromRect(t):new r(t.x,t.y,t.width,t.height)}catch(t){ZV(f)}break;case"DOMMatrix":case"DOMMatrixReadOnly":r=WX[f];try{i=r.fromMatrix?r.fromMatrix(t):new r(t)}catch(t){ZV(f)}break;case"AudioData":case"VideoFrame":KX(t.clone)||ZV(f);try{i=t.clone()}catch(t){JV(f)}break;case"File":try{i=new File([t],t.name,t)}catch(t){ZV(f)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":ZV(f);default:JV(f)}}if(CV(e,t,i),d)switch(f){case"Array":case"Object":for(c=LV(t),o=0,s=sV(c);o<s;o++)u=c[o],aV(i,u,$V(t[u],e));break;case"Map":t.forEach((function(t,r){CV(i,$V(r,e),$V(t,e))}));break;case"Set":t.forEach((function(t){DV(i,$V(t,e))}));break;case"Error":oV(i,"message",$V(t.message,e)),iV(t,"cause")&&oV(i,"cause",$V(t.cause,e)),"AggregateError"==n&&(i.errors=$V(t.errors,e));case"DOMException":fV&&oV(i,"stack",$V(t.stack,e))}return i},tQ=function(t,e){if(!$X(t))throw AV("Transfer option cannot be converted to a sequence");var r=[];eV(t,(function(t){zV(r,rV(t))}));var n,i,a,o,s,c,u=0,l=sV(r);if(dV)for(o=XV(r,{transfer:r});u<l;)CV(e,r[u],o[u++]);else for(;u<l;){if(n=r[u++],IV(e,n))throw new PV("Duplicate transferable",GV);switch(i=nV(n)){case"ImageBitmap":a=WX.OffscreenCanvas,JX(a)||ZV(i,HV);try{(c=new a(n.width,n.height)).getContext("bitmaprenderer").transferFromImageBitmap(n),s=c.transferToImageBitmap()}catch(t){}break;case"AudioData":case"VideoFrame":KX(n.clone)&&KX(n.close)||ZV(i,HV);try{s=n.clone(),n.close()}catch(t){}break;case"ArrayBuffer":KX(n.transfer)||ZV(i,HV),s=n.transfer();break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":ZV(i,HV)}if(void 0===s)throw new PV("This object cannot be transferred: "+i,GV);CV(e,n,s)}};HX({global:!0,enumerable:!0,sham:!dV,forced:VV},{structuredClone:function(t){var e,r=cV(arguments.length,1)>1&&!ZX(arguments[1])?rV(arguments[1]):void 0,n=r?r.transfer:void 0;return void 0!==n&&(e=new OV,tQ(n,e)),$V(t,e)}});var eQ=ri,rQ=r,nQ=lX(rQ.setInterval,!0);eQ({global:!0,bind:!0,forced:rQ.setInterval!==nQ},{setInterval:nQ});var iQ=ri,aQ=r,oQ=lX(aQ.setTimeout,!0);iQ({global:!0,bind:!0,forced:aQ.setTimeout!==oQ},{setTimeout:oQ});var sQ=i,cQ=ee("iterator"),uQ=!sQ((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[cQ]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),lQ=w,hQ=2147483647,fQ=/[^\0-\u007E]/,dQ=/[.\u3002\uFF0E\uFF61]/g,pQ="Overflow: input needs wider integers to process",gQ=RangeError,vQ=lQ(dQ.exec),mQ=Math.floor,yQ=String.fromCharCode,bQ=lQ("".charCodeAt),xQ=lQ([].join),wQ=lQ([].push),AQ=lQ("".replace),_Q=lQ("".split),kQ=lQ("".toLowerCase),EQ=function(t){return t+22+75*(t<26)},SQ=function(t,e,r){var n=0;for(t=r?mQ(t/700):t>>1,t+=mQ(t/e);t>455;)t=mQ(t/35),n+=36;return mQ(n+36*t/(t+38))},MQ=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r<n;){var i=bQ(t,r++);if(i>=55296&&i<=56319&&r<n){var a=bQ(t,r++);56320==(64512&a)?wQ(e,((1023&i)<<10)+(1023&a)+65536):(wQ(e,i),r--)}else wQ(e,i)}return e}(t);var r,n,i=t.length,a=128,o=0,s=72;for(r=0;r<t.length;r++)(n=t[r])<128&&wQ(e,yQ(n));var c=e.length,u=c;for(c&&wQ(e,"-");u<i;){var l=hQ;for(r=0;r<t.length;r++)(n=t[r])>=a&&n<l&&(l=n);var h=u+1;if(l-a>mQ((hQ-o)/h))throw gQ(pQ);for(o+=(l-a)*h,a=l,r=0;r<t.length;r++){if((n=t[r])<a&&++o>hQ)throw gQ(pQ);if(n==a){for(var f=o,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(f<p)break;var g=f-p,v=36-p;wQ(e,yQ(EQ(p+g%v))),f=mQ(g/v),d+=36}wQ(e,yQ(EQ(f))),s=SQ(o,h,u==c),o=0,u++}}o++,a++}return xQ(e,"")},TQ=ri,PQ=r,OQ=u,IQ=w,RQ=a,CQ=uQ,jQ=Jr,DQ=tm,LQ=Aa,zQ=jd,FQ=Pr,BQ=nm,NQ=U,UQ=Nt,YQ=Pa,GQ=hi,HQ=Ce,WQ=H,qQ=pi,XQ=Ni,VQ=v,QQ=xl,KQ=dl,JQ=GM,ZQ=_g,$Q=ee("iterator"),tK="URLSearchParams",eK=tK+"Iterator",rK=FQ.set,nK=FQ.getterFor(tK),iK=FQ.getterFor(eK),aK=Object.getOwnPropertyDescriptor,oK=function(t){if(!RQ)return PQ[t];var e=aK(PQ,t);return e&&e.value},sK=oK("fetch"),cK=oK("Request"),uK=oK("Headers"),lK=cK&&cK.prototype,hK=uK&&uK.prototype,fK=PQ.RegExp,dK=PQ.TypeError,pK=PQ.decodeURIComponent,gK=PQ.encodeURIComponent,vK=IQ("".charAt),mK=IQ([].join),yK=IQ([].push),bK=IQ("".replace),xK=IQ([].shift),wK=IQ([].splice),AK=IQ("".split),_K=IQ("".slice),kK=/\+/g,EK=Array(4),SK=function(t){return EK[t-1]||(EK[t-1]=fK("((?:%[\\da-f]{2}){"+t+"})","gi"))},MK=function(t){try{return pK(t)}catch(e){return t}},TK=function(t){var e=bK(t,kK," "),r=4;try{return pK(e)}catch(t){for(;r;)e=bK(e,SK(r--),MK);return e}},PK=/[!'()~]|%20/g,OK={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},IK=function(t){return OK[t]},RK=function(t){return bK(gK(t),PK,IK)},CK=zQ((function(t,e){rK(this,{type:eK,iterator:QQ(nK(t).entries),kind:e})}),"Iterator",(function(){var t=iK(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r}),!0),jK=function(t){this.entries=[],this.url=null,void 0!==t&&(WQ(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===vK(t,0)?_K(t,1):t:qQ(t)))};jK.prototype={type:tK,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,i,a,o,s,c=KQ(t);if(c)for(r=(e=QQ(t,c)).next;!(n=OQ(r,e)).done;){if(a=(i=QQ(HQ(n.value))).next,(o=OQ(a,i)).done||(s=OQ(a,i)).done||!OQ(a,i).done)throw dK("Expected sequence with length 2");yK(this.entries,{key:qQ(o.value),value:qQ(s.value)})}else for(var u in t)UQ(t,u)&&yK(this.entries,{key:u,value:qQ(t[u])})},parseQuery:function(t){if(t)for(var e,r,n=AK(t,"&"),i=0;i<n.length;)(e=n[i++]).length&&(r=AK(e,"="),yK(this.entries,{key:TK(xK(r)),value:TK(mK(r,"="))}))},serialize:function(){for(var t,e=this.entries,r=[],n=0;n<e.length;)t=e[n++],yK(r,RK(t.key)+"="+RK(t.value));return mK(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var DK=function(){BQ(this,LK),rK(this,new jK(arguments.length>0?arguments[0]:void 0))},LK=DK.prototype;if(DQ(LK,{append:function(t,e){JQ(arguments.length,2);var r=nK(this);yK(r.entries,{key:qQ(t),value:qQ(e)}),r.updateURL()},delete:function(t){JQ(arguments.length,1);for(var e=nK(this),r=e.entries,n=qQ(t),i=0;i<r.length;)r[i].key===n?wK(r,i,1):i++;e.updateURL()},get:function(t){JQ(arguments.length,1);for(var e=nK(this).entries,r=qQ(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){JQ(arguments.length,1);for(var e=nK(this).entries,r=qQ(t),n=[],i=0;i<e.length;i++)e[i].key===r&&yK(n,e[i].value);return n},has:function(t){JQ(arguments.length,1);for(var e=nK(this).entries,r=qQ(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){JQ(arguments.length,1);for(var r,n=nK(this),i=n.entries,a=!1,o=qQ(t),s=qQ(e),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?wK(i,c--,1):(a=!0,r.value=s));a||yK(i,{key:o,value:s}),n.updateURL()},sort:function(){var t=nK(this);ZQ(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=nK(this).entries,n=YQ(t,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((e=r[i++]).value,e.key,this)},keys:function(){return new CK(this,"keys")},values:function(){return new CK(this,"values")},entries:function(){return new CK(this,"entries")}},{enumerable:!0}),jQ(LK,$Q,LK.entries,{name:"entries"}),jQ(LK,"toString",(function(){return nK(this).serialize()}),{enumerable:!0}),LQ(DK,tK),TQ({global:!0,constructor:!0,forced:!CQ},{URLSearchParams:DK}),!CQ&&NQ(uK)){var zK=IQ(hK.has),FK=IQ(hK.set),BK=function(t){if(WQ(t)){var e,r=t.body;if(GQ(r)===tK)return e=t.headers?new uK(t.headers):new uK,zK(e,"content-type")||FK(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),XQ(t,{body:VQ(0,qQ(r)),headers:VQ(0,e)})}return t};if(NQ(sK)&&TQ({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return sK(t,arguments.length>1?BK(arguments[1]):{})}}),NQ(cK)){var NK=function(t){return BQ(this,lK),new cK(t,arguments.length>1?BK(arguments[1]):{})};lK.constructor=NK,NK.prototype=lK,TQ({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:NK})}}var UK,YK=ri,GK=a,HK=uQ,WK=r,qK=Pa,XK=w,VK=Jr,QK=aa,KK=nm,JK=Nt,ZK=GE,$K=rd,tJ=Ji,eJ=zj.codeAt,rJ=function(t){var e,r,n=[],i=_Q(AQ(kQ(t),dQ,"."),".");for(e=0;e<i.length;e++)r=i[e],wQ(n,vQ(fQ,r)?"xn--"+MQ(r):r);return xQ(n,".")},nJ=pi,iJ=Aa,aJ=GM,oJ={URLSearchParams:DK,getState:nK},sJ=Pr,cJ=sJ.set,uJ=sJ.getterFor("URL"),lJ=oJ.URLSearchParams,hJ=oJ.getState,fJ=WK.URL,dJ=WK.TypeError,pJ=WK.parseInt,gJ=Math.floor,vJ=Math.pow,mJ=XK("".charAt),yJ=XK(/./.exec),bJ=XK([].join),xJ=XK(1..toString),wJ=XK([].pop),AJ=XK([].push),_J=XK("".replace),kJ=XK([].shift),EJ=XK("".split),SJ=XK("".slice),MJ=XK("".toLowerCase),TJ=XK([].unshift),PJ="Invalid scheme",OJ="Invalid host",IJ="Invalid port",RJ=/[a-z]/i,CJ=/[\d+-.a-z]/i,jJ=/\d/,DJ=/^0x/i,LJ=/^[0-7]+$/,zJ=/^\d+$/,FJ=/^[\da-f]+$/i,BJ=/[\0\t\n\r #%/:<>?@[\\\]^|]/,NJ=/[\0\t\n\r #/:<>?@[\\\]^|]/,UJ=/^[\u0000-\u0020]+/,YJ=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,GJ=/[\t\n\r]/g,HJ=function(t){var e,r,n,i;if("number"==typeof t){for(e=[],r=0;r<4;r++)TJ(e,t%256),t=gJ(t/256);return bJ(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,i=0,a=0;a<8;a++)0!==t[a]?(i>r&&(e=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(e=n,r=i),e}(t),r=0;r<8;r++)i&&0===t[r]||(i&&(i=!1),n===r?(e+=r?":":"::",i=!0):(e+=xJ(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},WJ={},qJ=ZK({},WJ,{" ":1,'"':1,"<":1,">":1,"`":1}),XJ=ZK({},qJ,{"#":1,"?":1,"{":1,"}":1}),VJ=ZK({},XJ,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),QJ=function(t,e){var r=eJ(t,0);return r>32&&r<127&&!JK(e,t)?t:encodeURIComponent(t)},KJ={ftp:21,file:null,http:80,https:443,ws:80,wss:443},JJ=function(t,e){var r;return 2==t.length&&yJ(RJ,mJ(t,0))&&(":"==(r=mJ(t,1))||!e&&"|"==r)},ZJ=function(t){var e;return t.length>1&&JJ(SJ(t,0,2))&&(2==t.length||"/"===(e=mJ(t,2))||"\\"===e||"?"===e||"#"===e)},$J=function(t){return"."===t||"%2e"===MJ(t)},tZ={},eZ={},rZ={},nZ={},iZ={},aZ={},oZ={},sZ={},cZ={},uZ={},lZ={},hZ={},fZ={},dZ={},pZ={},gZ={},vZ={},mZ={},yZ={},bZ={},xZ={},wZ=function(t,e,r){var n,i,a,o=nJ(t);if(e){if(i=this.parse(o))throw dJ(i);this.searchParams=null}else{if(void 0!==r&&(n=new wZ(r,!0)),i=this.parse(o,null,n))throw dJ(i);(a=hJ(new lJ)).bindURL(this),this.searchParams=a}};wZ.prototype={type:"URL",parse:function(t,e,r){var n,i,a,o,s,c=this,u=e||tZ,l=0,h="",f=!1,d=!1,p=!1;for(t=nJ(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=_J(t,UJ,""),t=_J(t,YJ,"$1")),t=_J(t,GJ,""),n=$K(t);l<=n.length;){switch(i=n[l],u){case tZ:if(!i||!yJ(RJ,i)){if(e)return PJ;u=rZ;continue}h+=MJ(i),u=eZ;break;case eZ:if(i&&(yJ(CJ,i)||"+"==i||"-"==i||"."==i))h+=MJ(i);else{if(":"!=i){if(e)return PJ;h="",u=rZ,l=0;continue}if(e&&(c.isSpecial()!=JK(KJ,h)||"file"==h&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=h,e)return void(c.isSpecial()&&KJ[c.scheme]==c.port&&(c.port=null));h="","file"==c.scheme?u=dZ:c.isSpecial()&&r&&r.scheme==c.scheme?u=nZ:c.isSpecial()?u=sZ:"/"==n[l+1]?(u=iZ,l++):(c.cannotBeABaseURL=!0,AJ(c.path,""),u=yZ)}break;case rZ:if(!r||r.cannotBeABaseURL&&"#"!=i)return PJ;if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=tJ(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,u=xZ;break}u="file"==r.scheme?dZ:aZ;continue;case nZ:if("/"!=i||"/"!=n[l+1]){u=aZ;continue}u=cZ,l++;break;case iZ:if("/"==i){u=uZ;break}u=mZ;continue;case aZ:if(c.scheme=r.scheme,i==UK)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=tJ(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())u=oZ;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=tJ(r.path),c.query="",u=bZ;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=tJ(r.path),c.path.length--,u=mZ;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=tJ(r.path),c.query=r.query,c.fragment="",u=xZ}break;case oZ:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,u=mZ;continue}u=uZ}else u=cZ;break;case sZ:if(u=cZ,"/"!=i||"/"!=mJ(h,l+1))continue;l++;break;case cZ:if("/"!=i&&"\\"!=i){u=uZ;continue}break;case uZ:if("@"==i){f&&(h="%40"+h),f=!0,a=$K(h);for(var g=0;g<a.length;g++){var v=a[g];if(":"!=v||p){var m=QJ(v,VJ);p?c.password+=m:c.username+=m}else p=!0}h=""}else if(i==UK||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(f&&""==h)return"Invalid authority";l-=$K(h).length+1,h="",u=lZ}else h+=i;break;case lZ:case hZ:if(e&&"file"==c.scheme){u=gZ;continue}if(":"!=i||d){if(i==UK||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==h)return OJ;if(e&&""==h&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(h))return o;if(h="",u=vZ,e)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return OJ;if(o=c.parseHost(h))return o;if(h="",u=fZ,e==hZ)return}break;case fZ:if(!yJ(jJ,i)){if(i==UK||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||e){if(""!=h){var y=pJ(h,10);if(y>65535)return IJ;c.port=c.isSpecial()&&y===KJ[c.scheme]?null:y,h=""}if(e)return;u=vZ;continue}return IJ}h+=i;break;case dZ:if(c.scheme="file","/"==i||"\\"==i)u=pZ;else{if(!r||"file"!=r.scheme){u=mZ;continue}if(i==UK)c.host=r.host,c.path=tJ(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=tJ(r.path),c.query="",u=bZ;else{if("#"!=i){ZJ(bJ(tJ(n,l),""))||(c.host=r.host,c.path=tJ(r.path),c.shortenPath()),u=mZ;continue}c.host=r.host,c.path=tJ(r.path),c.query=r.query,c.fragment="",u=xZ}}break;case pZ:if("/"==i||"\\"==i){u=gZ;break}r&&"file"==r.scheme&&!ZJ(bJ(tJ(n,l),""))&&(JJ(r.path[0],!0)?AJ(c.path,r.path[0]):c.host=r.host),u=mZ;continue;case gZ:if(i==UK||"/"==i||"\\"==i||"?"==i||"#"==i){if(!e&&JJ(h))u=mZ;else if(""==h){if(c.host="",e)return;u=vZ}else{if(o=c.parseHost(h))return o;if("localhost"==c.host&&(c.host=""),e)return;h="",u=vZ}continue}h+=i;break;case vZ:if(c.isSpecial()){if(u=mZ,"/"!=i&&"\\"!=i)continue}else if(e||"?"!=i)if(e||"#"!=i){if(i!=UK&&(u=mZ,"/"!=i))continue}else c.fragment="",u=xZ;else c.query="",u=bZ;break;case mZ:if(i==UK||"/"==i||"\\"==i&&c.isSpecial()||!e&&("?"==i||"#"==i)){if(".."===(s=MJ(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||AJ(c.path,"")):$J(h)?"/"==i||"\\"==i&&c.isSpecial()||AJ(c.path,""):("file"==c.scheme&&!c.path.length&&JJ(h)&&(c.host&&(c.host=""),h=mJ(h,0)+":"),AJ(c.path,h)),h="","file"==c.scheme&&(i==UK||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)kJ(c.path);"?"==i?(c.query="",u=bZ):"#"==i&&(c.fragment="",u=xZ)}else h+=QJ(i,XJ);break;case yZ:"?"==i?(c.query="",u=bZ):"#"==i?(c.fragment="",u=xZ):i!=UK&&(c.path[0]+=QJ(i,WJ));break;case bZ:e||"#"!=i?i!=UK&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":QJ(i,WJ)):(c.fragment="",u=xZ);break;case xZ:i!=UK&&(c.fragment+=QJ(i,qJ))}l++}},parseHost:function(t){var e,r,n;if("["==mJ(t,0)){if("]"!=mJ(t,t.length-1))return OJ;if(e=function(t){var e,r,n,i,a,o,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,h=0,f=function(){return mJ(t,h)};if(":"==f()){if(":"!=mJ(t,1))return;h+=2,l=++u}for(;f();){if(8==u)return;if(":"!=f()){for(e=r=0;r<4&&yJ(FJ,f());)e=16*e+pJ(f(),16),h++,r++;if("."==f()){if(0==r)return;if(h-=r,u>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;h++}if(!yJ(jJ,f()))return;for(;yJ(jJ,f());){if(a=pJ(f(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;h++}c[u]=256*c[u]+i,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[u++]=e}else{if(null!==l)return;h++,l=++u}}if(null!==l)for(o=u-l,u=7;0!=u&&o>0;)s=c[u],c[u--]=c[l+o-1],c[l+--o]=s;else if(8!=u)return;return c}(SJ(t,1,-1)),!e)return OJ;this.host=e}else if(this.isSpecial()){if(t=rJ(t),yJ(BJ,t))return OJ;if(e=function(t){var e,r,n,i,a,o,s,c=EJ(t,".");if(c.length&&""==c[c.length-1]&&c.length--,(e=c.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(i=c[n]))return t;if(a=10,i.length>1&&"0"==mJ(i,0)&&(a=yJ(DJ,i)?16:8,i=SJ(i,8==a?1:2)),""===i)o=0;else{if(!yJ(10==a?zJ:8==a?LJ:FJ,i))return t;o=pJ(i,a)}AJ(r,o)}for(n=0;n<e;n++)if(o=r[n],n==e-1){if(o>=vJ(256,5-e))return null}else if(o>255)return null;for(s=wJ(r),n=0;n<r.length;n++)s+=r[n]*vJ(256,3-n);return s}(t),null===e)return OJ;this.host=e}else{if(yJ(NJ,t))return OJ;for(e="",r=$K(t),n=0;n<r.length;n++)e+=QJ(r[n],WJ);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return JK(KJ,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&JJ(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,r=t.username,n=t.password,i=t.host,a=t.port,o=t.path,s=t.query,c=t.fragment,u=e+":";return null!==i?(u+="//",t.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=HJ(i),null!==a&&(u+=":"+a)):"file"==e&&(u+="//"),u+=t.cannotBeABaseURL?o[0]:o.length?"/"+bJ(o,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(t){var e=this.parse(t);if(e)throw dJ(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new AZ(t.path[0]).origin}catch(t){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+HJ(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(nJ(t)+":",tZ)},getUsername:function(){return this.username},setUsername:function(t){var e=$K(nJ(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<e.length;r++)this.username+=QJ(e[r],VJ)}},getPassword:function(){return this.password},setPassword:function(t){var e=$K(nJ(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<e.length;r++)this.password+=QJ(e[r],VJ)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?HJ(t):HJ(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,lZ)},getHostname:function(){var t=this.host;return null===t?"":HJ(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,hZ)},getPort:function(){var t=this.port;return null===t?"":nJ(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=nJ(t))?this.port=null:this.parse(t,fZ))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+bJ(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,vZ))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=nJ(t))?this.query=null:("?"==mJ(t,0)&&(t=SJ(t,1)),this.query="",this.parse(t,bZ)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=nJ(t))?("#"==mJ(t,0)&&(t=SJ(t,1)),this.fragment="",this.parse(t,xZ)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var AZ=function(t){var e=KK(this,_Z),r=aJ(arguments.length,1)>1?arguments[1]:void 0,n=cJ(e,new wZ(t,!1,r));GK||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},_Z=AZ.prototype,kZ=function(t,e){return{get:function(){return uJ(this)[t]()},set:e&&function(t){return uJ(this)[e](t)},configurable:!0,enumerable:!0}};if(GK&&(QK(_Z,"href",kZ("serialize","setHref")),QK(_Z,"origin",kZ("getOrigin")),QK(_Z,"protocol",kZ("getProtocol","setProtocol")),QK(_Z,"username",kZ("getUsername","setUsername")),QK(_Z,"password",kZ("getPassword","setPassword")),QK(_Z,"host",kZ("getHost","setHost")),QK(_Z,"hostname",kZ("getHostname","setHostname")),QK(_Z,"port",kZ("getPort","setPort")),QK(_Z,"pathname",kZ("getPathname","setPathname")),QK(_Z,"search",kZ("getSearch","setSearch")),QK(_Z,"searchParams",kZ("getSearchParams")),QK(_Z,"hash",kZ("getHash","setHash"))),VK(_Z,"toJSON",(function(){return uJ(this).serialize()}),{enumerable:!0}),VK(_Z,"toString",(function(){return uJ(this).serialize()}),{enumerable:!0}),fJ){var EZ=fJ.createObjectURL,SZ=fJ.revokeObjectURL;EZ&&VK(AZ,"createObjectURL",qK(EZ,fJ)),SZ&&VK(AZ,"revokeObjectURL",qK(SZ,fJ))}iJ(AZ,"URL"),YK({global:!0,constructor:!0,forced:!HK,sham:!GK},{URL:AZ});var MZ=u;ri({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return MZ(URL.prototype.toString,this)}});!function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,o=Object.create(a.prototype),s=new O(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",g="completed",v={};function m(){}function y(){}function b(){}var x={};u(x,o,(function(){return this}));var w=Object.getPrototypeOf,A=w&&w(w(I([])));A&&A!==r&&n.call(A,o)&&(x=A);var _=b.prototype=m.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var c=h(t[i],t,a);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(t,e,r){var n=f;return function(i,a){if(n===p)throw new Error("Generator is already running");if(n===g){if("throw"===i)throw a;return R()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=M(o,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=h(t,e,r);if("normal"===c.type){if(n=r.done?g:d,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=g,r.method="throw",r.arg=c.arg)}}}function M(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,M(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=h(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function I(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:R}}function R(){return{value:e,done:!0}}return y.prototype=b,i(_,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},k(E.prototype),u(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(l(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},k(_),u(_,c,"Generator"),u(_,o,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=I,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}({exports:{}});var TZ="done";"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1;r<arguments.length;r++){var n=arguments[r];if(null!=n)for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])}return e}),"function"!=typeof Object.values&&(Object.values=function(t){let e=[];for(let r in t)e.push(t[r]);return e}),"function"!=typeof Object.keys&&(Object.values=function(t){let e=[];for(let r in t)e.push(r);return e}),"undefined"!=typeof CanvasRenderingContext2D&&null==CanvasRenderingContext2D.prototype.ellipse&&(CanvasRenderingContext2D.prototype.ellipse=function(t,e,r,n,i,a,o,s){this.save(),this.translate(t,e),this.rotate(i),this.translate(-r,-n),this.scale(r,n),this.arc(1,1,1,a,o,s),this.restore()}),function(){for(var t=0,e=["ms","moz","webkit","o"],r=0;r<e.length&&!window.requestAnimationFrame;++r)window.requestAnimationFrame=window[e[r]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[r]+"CancelAnimationFrame"]||window[e[r]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(console.warn("requestAnimationFrame not supported"),window.requestAnimationFrame=function(e,r){var n=performance.now(),i=Math.max(0,33-(n-t)),a=window.setTimeout((function(){e(n+i)}),i);return t=n+i,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}(),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t});var PZ=function(){this.__data__=[],this.size=0};var OZ=function(t,e){return t===e||t!=t&&e!=e},IZ=OZ;var RZ=function(t,e){for(var r=t.length;r--;)if(IZ(t[r][0],e))return r;return-1},CZ=RZ,jZ=Array.prototype.splice;var DZ=function(t){var e=this.__data__,r=CZ(e,t);return!(r<0)&&(r==e.length-1?e.pop():jZ.call(e,r,1),--this.size,!0)},LZ=RZ;var zZ=function(t){var e=this.__data__,r=LZ(e,t);return r<0?void 0:e[r][1]},FZ=RZ;var BZ=function(t){return FZ(this.__data__,t)>-1},NZ=RZ;var UZ=function(t,e){var r=this.__data__,n=NZ(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},YZ=PZ,GZ=DZ,HZ=zZ,WZ=BZ,qZ=UZ;function XZ(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}XZ.prototype.clear=YZ,XZ.prototype.delete=GZ,XZ.prototype.get=HZ,XZ.prototype.has=WZ,XZ.prototype.set=qZ;var VZ=XZ,QZ=VZ;var KZ=function(){this.__data__=new QZ,this.size=0};var JZ=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var ZZ=function(t){return this.__data__.get(t)};var $Z=function(t){return this.__data__.has(t)},t$="object"==typeof t&&t&&t.Object===Object&&t,e$=t$,r$="object"==typeof self&&self&&self.Object===Object&&self,n$=e$||r$||Function("return this")(),i$=n$.Symbol,a$=i$,o$=Object.prototype,s$=o$.hasOwnProperty,c$=o$.toString,u$=a$?a$.toStringTag:void 0;var l$=function(t){var e=s$.call(t,u$),r=t[u$];try{t[u$]=void 0;var n=!0}catch(t){}var i=c$.call(t);return n&&(e?t[u$]=r:delete t[u$]),i},h$=Object.prototype.toString;var f$=function(t){return h$.call(t)},d$=l$,p$=f$,g$="[object Null]",v$="[object Undefined]",m$=i$?i$.toStringTag:void 0;var y$=function(t){return null==t?void 0===t?v$:g$:m$&&m$ in Object(t)?d$(t):p$(t)};var b$=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},x$=y$,w$=b$,A$="[object AsyncFunction]",_$="[object Function]",k$="[object GeneratorFunction]",E$="[object Proxy]";var S$=function(t){if(!w$(t))return!1;var e=x$(t);return e==_$||e==k$||e==A$||e==E$},M$=n$["__core-js_shared__"],T$=function(){var t=/[^.]+$/.exec(M$&&M$.keys&&M$.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var P$=function(t){return!!T$&&T$ in t},O$=Function.prototype.toString;var I$=function(t){if(null!=t){try{return O$.call(t)}catch(t){}try{return t+""}catch(t){}}return""},R$=S$,C$=P$,j$=b$,D$=I$,L$=/^\[object .+?Constructor\]$/,z$=Function.prototype,F$=Object.prototype,B$=z$.toString,N$=F$.hasOwnProperty,U$=RegExp("^"+B$.call(N$).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Y$=function(t){return!(!j$(t)||C$(t))&&(R$(t)?U$:L$).test(D$(t))};var G$=function(t,e){return null==t?void 0:t[e]},H$=Y$,W$=G$;var q$=function(t,e){var r=W$(t,e);return H$(r)?r:void 0},X$=q$(n$,"Map"),V$=q$(Object,"create"),Q$=V$;var K$=function(){this.__data__=Q$?Q$(null):{},this.size=0};var J$=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Z$=V$,$$="__lodash_hash_undefined__",t0=Object.prototype.hasOwnProperty;var e0=function(t){var e=this.__data__;if(Z$){var r=e[t];return r===$$?void 0:r}return t0.call(e,t)?e[t]:void 0},r0=V$,n0=Object.prototype.hasOwnProperty;var i0=function(t){var e=this.__data__;return r0?void 0!==e[t]:n0.call(e,t)},a0=V$,o0="__lodash_hash_undefined__";var s0=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=a0&&void 0===e?o0:e,this},c0=K$,u0=J$,l0=e0,h0=i0,f0=s0;function d0(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}d0.prototype.clear=c0,d0.prototype.delete=u0,d0.prototype.get=l0,d0.prototype.has=h0,d0.prototype.set=f0;var p0=d0,g0=VZ,v0=X$;var m0=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},y0=m0;var b0=function(t,e){var r=t.__data__;return y0(e)?r["string"==typeof e?"string":"hash"]:r.map},x0=b0;var w0=function(t){var e=x0(this,t).delete(t);return this.size-=e?1:0,e},A0=b0;var _0=function(t){return A0(this,t).get(t)},k0=b0;var E0=function(t){return k0(this,t).has(t)},S0=b0;var M0=function(t,e){var r=S0(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},T0=function(){this.size=0,this.__data__={hash:new p0,map:new(v0||g0),string:new p0}},P0=w0,O0=_0,I0=E0,R0=M0;function C0(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}C0.prototype.clear=T0,C0.prototype.delete=P0,C0.prototype.get=O0,C0.prototype.has=I0,C0.prototype.set=R0;var j0=C0,D0=VZ,L0=X$,z0=j0,F0=200;var B0=function(t,e){var r=this.__data__;if(r instanceof D0){var n=r.__data__;if(!L0||n.length<F0-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new z0(n)}return r.set(t,e),this.size=r.size,this},N0=VZ,U0=KZ,Y0=JZ,G0=ZZ,H0=$Z,W0=B0;function q0(t){var e=this.__data__=new N0(t);this.size=e.size}q0.prototype.clear=U0,q0.prototype.delete=Y0,q0.prototype.get=G0,q0.prototype.has=H0,q0.prototype.set=W0;var X0=q0,V0="__lodash_hash_undefined__";var Q0=function(t){return this.__data__.set(t,V0),this};var K0=function(t){return this.__data__.has(t)},J0=j0,Z0=Q0,$0=K0;function t1(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new J0;++e<r;)this.add(t[e])}t1.prototype.add=t1.prototype.push=Z0,t1.prototype.has=$0;var e1=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var r1=function(t,e){return t.has(e)},n1=t1,i1=e1,a1=r1,o1=1,s1=2;var c1=function(t,e,r,n,i,a){var o=r&o1,s=t.length,c=e.length;if(s!=c&&!(o&&c>s))return!1;var u=a.get(t),l=a.get(e);if(u&&l)return u==e&&l==t;var h=-1,f=!0,d=r&s1?new n1:void 0;for(a.set(t,e),a.set(e,t);++h<s;){var p=t[h],g=e[h];if(n)var v=o?n(g,p,h,e,t,a):n(p,g,h,t,e,a);if(void 0!==v){if(v)continue;f=!1;break}if(d){if(!i1(e,(function(t,e){if(!a1(d,e)&&(p===t||i(p,t,r,n,a)))return d.push(e)}))){f=!1;break}}else if(p!==g&&!i(p,g,r,n,a)){f=!1;break}}return a.delete(t),a.delete(e),f},u1=n$.Uint8Array;var l1=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var h1=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},f1=u1,d1=OZ,p1=c1,g1=l1,v1=h1,m1=1,y1=2,b1="[object Boolean]",x1="[object Date]",w1="[object Error]",A1="[object Map]",_1="[object Number]",k1="[object RegExp]",E1="[object Set]",S1="[object String]",M1="[object Symbol]",T1="[object ArrayBuffer]",P1="[object DataView]",O1=i$?i$.prototype:void 0,I1=O1?O1.valueOf:void 0;var R1=function(t,e,r,n,i,a,o){switch(r){case P1:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case T1:return!(t.byteLength!=e.byteLength||!a(new f1(t),new f1(e)));case b1:case x1:case _1:return d1(+t,+e);case w1:return t.name==e.name&&t.message==e.message;case k1:case S1:return t==e+"";case A1:var s=g1;case E1:var c=n&m1;if(s||(s=v1),t.size!=e.size&&!c)return!1;var u=o.get(t);if(u)return u==e;n|=y1,o.set(t,e);var l=p1(s(t),s(e),n,i,a,o);return o.delete(t),l;case M1:if(I1)return I1.call(t)==I1.call(e)}return!1};var C1=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t},j1=Array.isArray,D1=C1,L1=j1;var z1=function(t,e,r){var n=e(t);return L1(t)?n:D1(n,r(t))};var F1=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a};var B1=function(){return[]},N1=F1,U1=B1,Y1=Object.prototype.propertyIsEnumerable,G1=Object.getOwnPropertySymbols,H1=G1?function(t){return null==t?[]:(t=Object(t),N1(G1(t),(function(e){return Y1.call(t,e)})))}:U1;var W1=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var q1=function(t){return null!=t&&"object"==typeof t},X1=y$,V1=q1,Q1="[object Arguments]";var K1=function(t){return V1(t)&&X1(t)==Q1},J1=K1,Z1=q1,$1=Object.prototype,t2=$1.hasOwnProperty,e2=$1.propertyIsEnumerable,r2=J1(function(){return arguments}())?J1:function(t){return Z1(t)&&t2.call(t,"callee")&&!e2.call(t,"callee")},n2=r2,i2={exports:{}};var a2=function(){return!1};!function(t,e){var r=n$,n=a2,i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=(o?o.isBuffer:void 0)||n;t.exports=s}(i2,i2.exports);var o2=9007199254740991,s2=/^(?:0|[1-9]\d*)$/;var c2=function(t,e){var r=typeof t;return!!(e=null==e?o2:e)&&("number"==r||"symbol"!=r&&s2.test(t))&&t>-1&&t%1==0&&t<e},u2=9007199254740991;var l2=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=u2},h2=y$,f2=l2,d2=q1,p2={};p2["[object Float32Array]"]=p2["[object Float64Array]"]=p2["[object Int8Array]"]=p2["[object Int16Array]"]=p2["[object Int32Array]"]=p2["[object Uint8Array]"]=p2["[object Uint8ClampedArray]"]=p2["[object Uint16Array]"]=p2["[object Uint32Array]"]=!0,p2["[object Arguments]"]=p2["[object Array]"]=p2["[object ArrayBuffer]"]=p2["[object Boolean]"]=p2["[object DataView]"]=p2["[object Date]"]=p2["[object Error]"]=p2["[object Function]"]=p2["[object Map]"]=p2["[object Number]"]=p2["[object Object]"]=p2["[object RegExp]"]=p2["[object Set]"]=p2["[object String]"]=p2["[object WeakMap]"]=!1;var g2=function(t){return d2(t)&&f2(t.length)&&!!p2[h2(t)]};var v2=function(t){return function(e){return t(e)}},m2={exports:{}};!function(t,e){var r=t$,n=e&&!e.nodeType&&e,i=n&&t&&!t.nodeType&&t,a=i&&i.exports===n&&r.process,o=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=o}(m2,m2.exports);var y2=g2,b2=v2,x2=m2.exports,w2=x2&&x2.isTypedArray,A2=w2?b2(w2):y2,_2=W1,k2=n2,E2=j1,S2=i2.exports,M2=c2,T2=A2,P2=Object.prototype.hasOwnProperty;var O2=function(t,e){var r=E2(t),n=!r&&k2(t),i=!r&&!n&&S2(t),a=!r&&!n&&!i&&T2(t),o=r||n||i||a,s=o?_2(t.length,String):[],c=s.length;for(var u in t)!e&&!P2.call(t,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||M2(u,c))||s.push(u);return s},I2=Object.prototype;var R2=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||I2)};var C2=function(t,e){return function(r){return t(e(r))}},j2=C2(Object.keys,Object),D2=R2,L2=j2,z2=Object.prototype.hasOwnProperty;var F2=function(t){if(!D2(t))return L2(t);var e=[];for(var r in Object(t))z2.call(t,r)&&"constructor"!=r&&e.push(r);return e},B2=S$,N2=l2;var U2=function(t){return null!=t&&N2(t.length)&&!B2(t)},Y2=O2,G2=F2,H2=U2;var W2=function(t){return H2(t)?Y2(t):G2(t)},q2=z1,X2=H1,V2=W2;var Q2=function(t){return q2(t,V2,X2)},K2=Q2,J2=1,Z2=Object.prototype.hasOwnProperty;var $2=function(t,e,r,n,i,a){var o=r&J2,s=K2(t),c=s.length;if(c!=K2(e).length&&!o)return!1;for(var u=c;u--;){var l=s[u];if(!(o?l in e:Z2.call(e,l)))return!1}var h=a.get(t),f=a.get(e);if(h&&f)return h==e&&f==t;var d=!0;a.set(t,e),a.set(e,t);for(var p=o;++u<c;){var g=t[l=s[u]],v=e[l];if(n)var m=o?n(v,g,l,e,t,a):n(g,v,l,t,e,a);if(!(void 0===m?g===v||i(g,v,r,n,a):m)){d=!1;break}p||(p="constructor"==l)}if(d&&!p){var y=t.constructor,b=e.constructor;y==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(d=!1)}return a.delete(t),a.delete(e),d},t3=q$(n$,"DataView"),e3=X$,r3=q$(n$,"Promise"),n3=q$(n$,"Set"),i3=q$(n$,"WeakMap"),a3=y$,o3=I$,s3="[object Map]",c3="[object Promise]",u3="[object Set]",l3="[object WeakMap]",h3="[object DataView]",f3=o3(t3),d3=o3(e3),p3=o3(r3),g3=o3(n3),v3=o3(i3),m3=a3;(t3&&m3(new t3(new ArrayBuffer(1)))!=h3||e3&&m3(new e3)!=s3||r3&&m3(r3.resolve())!=c3||n3&&m3(new n3)!=u3||i3&&m3(new i3)!=l3)&&(m3=function(t){var e=a3(t),r="[object Object]"==e?t.constructor:void 0,n=r?o3(r):"";if(n)switch(n){case f3:return h3;case d3:return s3;case p3:return c3;case g3:return u3;case v3:return l3}return e});var y3=m3,b3=X0,x3=c1,w3=R1,A3=$2,_3=y3,k3=j1,E3=i2.exports,S3=A2,M3=1,T3="[object Arguments]",P3="[object Array]",O3="[object Object]",I3=Object.prototype.hasOwnProperty;var R3=function(t,e,r,n,i,a){var o=k3(t),s=k3(e),c=o?P3:_3(t),u=s?P3:_3(e),l=(c=c==T3?O3:c)==O3,h=(u=u==T3?O3:u)==O3,f=c==u;if(f&&E3(t)){if(!E3(e))return!1;o=!0,l=!1}if(f&&!l)return a||(a=new b3),o||S3(t)?x3(t,e,r,n,i,a):w3(t,e,c,r,n,i,a);if(!(r&M3)){var d=l&&I3.call(t,"__wrapped__"),p=h&&I3.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return a||(a=new b3),i(g,v,r,n,a)}}return!!f&&(a||(a=new b3),A3(t,e,r,n,i,a))},C3=q1;var j3=function t(e,r,n,i,a){return e===r||(null==e||null==r||!C3(e)&&!C3(r)?e!=e&&r!=r:R3(e,r,n,i,t,a))},D3=j3;var L3=function(t,e){return D3(t,e)},z3=q$,F3=function(){try{var t=z3(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),B3=F3;var N3=function(t,e,r){"__proto__"==e&&B3?B3(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},U3=N3,Y3=OZ,G3=Object.prototype.hasOwnProperty;var H3=function(t,e,r){var n=t[e];G3.call(t,e)&&Y3(n,r)&&(void 0!==r||e in t)||U3(t,e,r)},W3=H3,q3=N3;var X3=function(t,e,r,n){var i=!r;r||(r={});for(var a=-1,o=e.length;++a<o;){var s=e[a],c=n?n(r[s],t[s],s,r,t):void 0;void 0===c&&(c=t[s]),i?q3(r,s,c):W3(r,s,c)}return r};var V3=function(t){return t};var Q3=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},K3=Q3,J3=Math.max;var Z3=function(t,e,r){return e=J3(void 0===e?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=J3(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=r(o),K3(t,this,s)}};var $3=function(t){return function(){return t}},t4=$3,e4=F3,r4=e4?function(t,e){return e4(t,"toString",{configurable:!0,enumerable:!1,value:t4(e),writable:!0})}:V3,n4=800,i4=16,a4=Date.now;var o4=function(t){var e=0,r=0;return function(){var n=a4(),i=i4-(n-r);if(r=n,i>0){if(++e>=n4)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},s4=o4(r4),c4=V3,u4=Z3,l4=s4;var h4=function(t,e){return l4(u4(t,e,c4),t+"")},f4=OZ,d4=U2,p4=c2,g4=b$;var v4=function(t,e,r){if(!g4(r))return!1;var n=typeof e;return!!("number"==n?d4(r)&&p4(e,r.length):"string"==n&&e in r)&&f4(r[e],t)},m4=h4,y4=v4;var b4=function(t){return m4((function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,o&&y4(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var s=r[n];s&&t(e,s,n,a)}return e}))};var x4=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},w4=b$,A4=R2,_4=x4,k4=Object.prototype.hasOwnProperty;var E4=function(t){if(!w4(t))return _4(t);var e=A4(t),r=[];for(var n in t)("constructor"!=n||!e&&k4.call(t,n))&&r.push(n);return r},S4=O2,M4=E4,T4=U2;var P4=function(t){return T4(t)?S4(t,!0):M4(t)},O4=X3,I4=P4,R4=b4((function(t,e,r,n){O4(e,I4(e),t,n)})),C4=C2(Object.getPrototypeOf,Object),j4=y$,D4=C4,L4=q1,z4="[object Object]",F4=Function.prototype,B4=Object.prototype,N4=F4.toString,U4=B4.hasOwnProperty,Y4=N4.call(Object);var G4=function(t){if(!L4(t)||j4(t)!=z4)return!1;var e=D4(t);if(null===e)return!0;var r=U4.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&N4.call(r)==Y4},H4=y$,W4=q1,q4=G4,X4="[object DOMException]",V4="[object Error]";var Q4=function(t){if(!W4(t))return!1;var e=H4(t);return e==V4||e==X4||"string"==typeof t.message&&"string"==typeof t.name&&!q4(t)},K4=Q3,J4=Q4,Z4=h4((function(t,e){try{return K4(t,void 0,e)}catch(t){return J4(t)?t:new Error(t)}}));var $4=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i},t5=$4;var e5=function(t,e){return t5(e,(function(e){return t[e]}))},r5=OZ,n5=Object.prototype,i5=n5.hasOwnProperty;var a5=function(t,e,r,n){return void 0===t||r5(t,n5[r])&&!i5.call(n,r)?e:t},o5={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var s5=function(t){return"\\"+o5[t]},c5=/<%=([\s\S]+?)%>/g;var u5=function(t){return function(e){return null==t?void 0:t[e]}},l5=u5({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),h5=y$,f5=q1,d5="[object Symbol]";var p5=function(t){return"symbol"==typeof t||f5(t)&&h5(t)==d5},g5=$4,v5=j1,m5=p5,y5=1/0,b5=i$?i$.prototype:void 0,x5=b5?b5.toString:void 0;var w5=function t(e){if("string"==typeof e)return e;if(v5(e))return g5(e,t)+"";if(m5(e))return x5?x5.call(e):"";var r=e+"";return"0"==r&&1/e==-y5?"-0":r},A5=w5;var _5=function(t){return null==t?"":A5(t)},k5=l5,E5=_5,S5=/[&<>"']/g,M5=RegExp(S5.source);var T5=R4,P5=Z4,O5=e5,I5=a5,R5=s5,C5=Q4,j5=v4,D5=W2,L5=c5,z5={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:c5,variable:"",imports:{_:{escape:function(t){return(t=E5(t))&&M5.test(t)?t.replace(S5,k5):t}}}},F5=_5,B5="Invalid `variable` option passed into `_.template`",N5=/\b__p \+= '';/g,U5=/\b(__p \+=) '' \+/g,Y5=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G5=/[()=,{}\[\]\/\s]/,H5=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,W5=/($^)/,q5=/['\n\r\u2028\u2029\\]/g,X5=Object.prototype.hasOwnProperty;var V5=function(t,e,r){var n=z5.imports._.templateSettings||z5;r&&j5(t,e,r)&&(e=void 0),t=F5(t),e=T5({},e,n,I5);var i,a,o=T5({},e.imports,n.imports,I5),s=D5(o),c=O5(o,s),u=0,l=e.interpolate||W5,h="__p += '",f=RegExp((e.escape||W5).source+"|"+l.source+"|"+(l===L5?H5:W5).source+"|"+(e.evaluate||W5).source+"|$","g"),d=X5.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(f,(function(e,r,n,o,s,c){return n||(n=o),h+=t.slice(u,c).replace(q5,R5),r&&(i=!0,h+="' +\n__e("+r+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=c+e.length,e})),h+="';\n";var p=X5.call(e,"variable")&&e.variable;if(p){if(G5.test(p))throw new Error(B5)}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(N5,""):h).replace(U5,"$1").replace(Y5,"$1;"),h="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=P5((function(){return Function(s,d+"return "+h).apply(void 0,c)}));if(g.source=h,C5(g))throw g;return g};var Q5={linear:function(t){return t},quad:function(t){return Math.pow(t,2)},circ:function(t){return 1-Math.sin(Math.acos(t))},back:function(t,e={x:1.5}){return Math.pow(t,2)*((e.x+1)*t-e.x)},bounce:function(t){for(let e=0,r=1;;e+=r,r/=2)if(t>=(7-4*e)/11)return-Math.pow((11-6*e-11*t)/4,2)+Math.pow(r,2)},elastic:function(t,e={x:1.5}){return Math.pow(2,10*(t-1))*Math.cos(20*Math.PI*e.x/3*t)}};class K5{constructor(t,e){this.client=t,this.config=e,this._started=!1;var{delta:r="linear",options:n,ease:i}=this.config;"string"==typeof r&&(r=Q5[r]),this.delta="out"==i?function(t,e){return function(r){return 1-t(1-r,e)}}(r,n):"inout"==i?function(t,e){return function(r){return r<.5?t(2*r,e)/2:(2-t(2*(1-r),e))/2}}(r,n):r,this.init()}dispose(){this.stop(),delete this.client}init(){}start(){if(!this._started){var{duration:t=2e3,delay:e=0,repeat:r=!1}=this.config;this._started=!0;var n=0,i=t+e,a=()=>{if(!this._started)return;0==n&&(n=performance.now(),this.client.touch());let o=performance.now()-n,s=Math.max(o%i-e,0)/t;this.step(this.delta(s)),this.client&&this.client.invalidate(),!(o>=i)||r&&this._started||(this.step(1),this.stop(),n=0),this._started&&(this._raf=requestAnimationFrame(a))};this._raf=requestAnimationFrame(a)}}stop(){this._raf&&cancelAnimationFrame(this._raf),this._raf=null,this._started=!1}get started(){return this._started}set started(t){this.started!=!!t&&(t?this.start():this.stop())}}var J5={rotation:class extends K5{step(t){var{theta:e=6.28}=this.config;this.client.delta("theta",t*e)}},vibration:class extends K5{step(t){var{theta:e=.2617993877991494}=this.config,r=4*e,n=t*r;t<1/4?n*=-1:t<3/4?n-=2*e:n=r-n,this.client.delta("theta",n)}},heartbeat:class extends K5{step(t){var e,{scale:r=1.3}=this.config,n=2*(r-1);e=t<.5?1+n*t:1+(1-t)*n,this.client.delta("sx",e),this.client.delta("sy",e)}},moving:class extends K5{step(t){var{x:e=0,y:r=0}=this.config;this.client.delta("tx",t*e),this.client.delta("ty",t*r)}},outline:class extends K5{step(t){const{rideOn:e}=this.config,r=this.client;if(!e||!r||!r.root)return;const n=r.root.findById(e);if(!n)return;const{tx:i,ty:a}=r.delta(),o=n.outline(t),s=r.center,c=r.transcoordS2T(s.x,s.y);n&&(r.delta("tx",o.x-c.x+i),r.delta("ty",o.y-c.y+a))}},fade:class extends K5{step(t){var e,{startAlpha:r=1,endAlpha:n=0}=this.config,i=Math.max(Math.min(r,n,1),0),a=2*(Math.min(Math.max(r,n,1),1)-i);e=t<.5?a*t:(1-t)*a,this.client.delta("fade",e)}}};function Z5(t){var{duration:e=1e3,delay:r=30,step:n,delta:i,ease:a,options:o,repeat:s=!1}=t;"string"==typeof i&&(i=Q5[i]),"out"==a?i=function(t,e){return function(r){return 1-t(1-r,e)}}(i,o):"inout"==a&&(i=function(t,e){return function(r){return r<.5?t(2*r,e)/2:(2-t(2*(1-r),e))/2}}(i,o));var c=!1;return{start:function(){if(c)return this;c=!0;var t=0,r=()=>{if(c){0==t&&(t=performance.now());var a=(performance.now()-t)/e,u=s?a%1:Math.min(a,1);n(i(u,o)),!(a>=1)||s&&c||(this.stop(),t=0),c&&requestAnimationFrame(r)}};return requestAnimationFrame(r),this},stop:function(){return c=!1,this}}}var $5=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t},t6=X3,e6=W2;var r6=function(t,e){return t&&t6(e,e6(e),t)},n6=X3,i6=P4;var a6=function(t,e){return t&&n6(e,i6(e),t)},o6={exports:{}};!function(t,e){var r=n$,n=e&&!e.nodeType&&e,i=n&&t&&!t.nodeType&&t,a=i&&i.exports===n?r.Buffer:void 0,o=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=o?o(r):new t.constructor(r);return t.copy(n),n}}(o6,o6.exports);var s6=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e},c6=X3,u6=H1;var l6=function(t,e){return c6(t,u6(t),e)},h6=C1,f6=C4,d6=H1,p6=B1,g6=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)h6(e,d6(t)),t=f6(t);return e}:p6,v6=X3,m6=g6;var y6=function(t,e){return v6(t,m6(t),e)},b6=z1,x6=g6,w6=P4;var A6=function(t){return b6(t,w6,x6)},_6=Object.prototype.hasOwnProperty;var k6=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&_6.call(t,"index")&&(r.index=t.index,r.input=t.input),r},E6=u1;var S6=function(t){var e=new t.constructor(t.byteLength);return new E6(e).set(new E6(t)),e},M6=S6;var T6=function(t,e){var r=e?M6(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},P6=/\w*$/;var O6=function(t){var e=new t.constructor(t.source,P6.exec(t));return e.lastIndex=t.lastIndex,e},I6=i$?i$.prototype:void 0,R6=I6?I6.valueOf:void 0;var C6=S6;var j6=S6,D6=T6,L6=O6,z6=function(t){return R6?Object(R6.call(t)):{}},F6=function(t,e){var r=e?C6(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)},B6="[object Boolean]",N6="[object Date]",U6="[object Map]",Y6="[object Number]",G6="[object RegExp]",H6="[object Set]",W6="[object String]",q6="[object Symbol]",X6="[object ArrayBuffer]",V6="[object DataView]",Q6="[object Float32Array]",K6="[object Float64Array]",J6="[object Int8Array]",Z6="[object Int16Array]",$6="[object Int32Array]",t8="[object Uint8Array]",e8="[object Uint8ClampedArray]",r8="[object Uint16Array]",n8="[object Uint32Array]";var i8=function(t,e,r){var n=t.constructor;switch(e){case X6:return j6(t);case B6:case N6:return new n(+t);case V6:return D6(t,r);case Q6:case K6:case J6:case Z6:case $6:case t8:case e8:case r8:case n8:return F6(t,r);case U6:return new n;case Y6:case W6:return new n(t);case G6:return L6(t);case H6:return new n;case q6:return z6(t)}},a8=b$,o8=Object.create,s8=function(){function t(){}return function(e){if(!a8(e))return{};if(o8)return o8(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),c8=C4,u8=R2;var l8=function(t){return"function"!=typeof t.constructor||u8(t)?{}:s8(c8(t))},h8=y3,f8=q1,d8="[object Map]";var p8=function(t){return f8(t)&&h8(t)==d8},g8=p8,v8=v2,m8=m2.exports,y8=m8&&m8.isMap,b8=y8?v8(y8):g8,x8=y3,w8=q1,A8="[object Set]";var _8=function(t){return w8(t)&&x8(t)==A8},k8=_8,E8=v2,S8=m2.exports,M8=S8&&S8.isSet,T8=M8?E8(M8):k8,P8=X0,O8=$5,I8=H3,R8=r6,C8=a6,j8=o6.exports,D8=s6,L8=l6,z8=y6,F8=Q2,B8=A6,N8=y3,U8=k6,Y8=i8,G8=l8,H8=j1,W8=i2.exports,q8=b8,X8=b$,V8=T8,Q8=W2,K8=P4,J8=1,Z8=2,$8=4,t7="[object Arguments]",e7="[object Function]",r7="[object GeneratorFunction]",n7="[object Object]",i7={};i7[t7]=i7["[object Array]"]=i7["[object ArrayBuffer]"]=i7["[object DataView]"]=i7["[object Boolean]"]=i7["[object Date]"]=i7["[object Float32Array]"]=i7["[object Float64Array]"]=i7["[object Int8Array]"]=i7["[object Int16Array]"]=i7["[object Int32Array]"]=i7["[object Map]"]=i7["[object Number]"]=i7[n7]=i7["[object RegExp]"]=i7["[object Set]"]=i7["[object String]"]=i7["[object Symbol]"]=i7["[object Uint8Array]"]=i7["[object Uint8ClampedArray]"]=i7["[object Uint16Array]"]=i7["[object Uint32Array]"]=!0,i7["[object Error]"]=i7[e7]=i7["[object WeakMap]"]=!1;var a7=function t(e,r,n,i,a,o){var s,c=r&J8,u=r&Z8,l=r&$8;if(n&&(s=a?n(e,i,a,o):n(e)),void 0!==s)return s;if(!X8(e))return e;var h=H8(e);if(h){if(s=U8(e),!c)return D8(e,s)}else{var f=N8(e),d=f==e7||f==r7;if(W8(e))return j8(e,c);if(f==n7||f==t7||d&&!a){if(s=u||d?{}:G8(e),!c)return u?z8(e,C8(s,e)):L8(e,R8(s,e))}else{if(!i7[f])return a?e:{};s=Y8(e,f,c)}}o||(o=new P8);var p=o.get(e);if(p)return p;o.set(e,s),V8(e)?e.forEach((function(i){s.add(t(i,r,n,i,e,o))})):q8(e)&&e.forEach((function(i,a){s.set(a,t(i,r,n,a,e,o))}));var g=h?void 0:(l?u?B8:F8:u?K8:Q8)(e);return O8(g||e,(function(i,a){g&&(i=e[a=i]),I8(s,a,t(i,r,n,a,e,o))})),s},o7=a7,s7=4;var c7=function(t){return o7(t,s7)},u7=n$,l7=/\s/;var h7=function(t){for(var e=t.length;e--&&l7.test(t.charAt(e)););return e},f7=h7,d7=/^\s+/;var p7=function(t){return t?t.slice(0,f7(t)+1).replace(d7,""):t},g7=b$,v7=p5,m7=NaN,y7=/^[-+]0x[0-9a-f]+$/i,b7=/^0b[01]+$/i,x7=/^0o[0-7]+$/i,w7=parseInt;var A7=function(t){if("number"==typeof t)return t;if(v7(t))return m7;if(g7(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=g7(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=p7(t);var r=b7.test(t);return r||x7.test(t)?w7(t.slice(2),r?2:8):y7.test(t)?m7:+t},_7=b$,k7=function(){return u7.Date.now()},E7=A7,S7="Expected a function",M7=Math.max,T7=Math.min;var P7=function(t,e,r){var n,i,a,o,s,c,u=0,l=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError(S7);function d(e){var r=n,a=i;return n=i=void 0,u=e,o=t.apply(a,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||h&&t-u>=a}function g(){var t=k7();if(p(t))return v(t);s=setTimeout(g,function(t){var r=e-(t-c);return h?T7(r,a-(t-u)):r}(t))}function v(t){return s=void 0,f&&n?d(t):(n=i=void 0,o)}function m(){var t=k7(),r=p(t);if(n=arguments,i=this,c=t,r){if(void 0===s)return function(t){return u=t,s=setTimeout(g,e),l?d(t):o}(c);if(h)return clearTimeout(s),s=setTimeout(g,e),d(c)}return void 0===s&&(s=setTimeout(g,e)),o}return e=E7(e)||0,_7(r)&&(l=!!r.leading,a=(h="maxWait"in r)?M7(E7(r.maxWait)||0,e):a,f="trailing"in r?!!r.trailing:f),m.cancel=function(){void 0!==s&&clearTimeout(s),u=0,n=c=i=s=void 0},m.flush=function(){return void 0===s?o:v(k7())},m},O7=P7,I7=b$,R7="Expected a function";var C7=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new TypeError(R7);return I7(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),O7(t,e,{leading:n,maxWait:e,trailing:i})},j7=A7,D7=1/0,L7=17976931348623157e292;var z7=function(t){return t?(t=j7(t))===D7||t===-D7?(t<0?-1:1)*L7:t==t?t:0:0===t?t:0},F7=z7;var B7=function(t){var e=F7(t),r=e%1;return e==e?r?e-r:e:0},N7=B7,U7="Expected a function";var Y7=function(t,e){var r;if("function"!=typeof e)throw new TypeError(U7);return t=N7(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}};var G7=function(t){return Y7(2,t)},H7=F2,W7=y3,q7=n2,X7=j1,V7=U2,Q7=i2.exports,K7=R2,J7=A2,Z7="[object Map]",$7="[object Set]",t9=Object.prototype.hasOwnProperty;var e9=function(t){if(null==t)return!0;if(V7(t)&&(X7(t)||"string"==typeof t||"function"==typeof t.splice||Q7(t)||J7(t)||q7(t)))return!t.length;var e=W7(t);if(e==Z7||e==$7)return!t.size;if(K7(t))return!H7(t).length;for(var r in t)if(t9.call(t,r))return!1;return!0},r9=0;function n9(t={},...e){return"object"!=typeof t&&(t={}),e.forEach((e=>{for(let r in e)"object"!=typeof e[r]?t[r]=e[r]:e[r].length>0?t[r]=e[r].map((t=>{let n;return n="object"!=typeof e[r]?t:n9({},t),n})):t[r]=n9(t[r],e[r])})),t}function i9(t){for(;t&&"object"==typeof t;){let e=t;for(let e in t){t=t[e];break}if(t===e){t=void 0;break}}return t}var a9=Object.freeze({__proto__:null,insertAt:function(t,e){return this.__collection__?(-1==(t=this.__collection__.indexOf(e))&&this.__collection__.splice(t,0,e),this):this},append:function(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.push(t),this},prepend:function(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.unshift(t),this},remove:function(t){if(!this.__collection__)return this;var e=this.__collection__.indexOf(t);return e>=0&&this.__collection__.splice(e,1),this},getAt:function(t){if(this.__collection__)return this.__collection__[t]},forEach:function(t,e){this.__collection__&&this.__collection__.forEach(t,e)},indexOf:function(t){if(this.__collection__)return this.__collection__.indexOf(t)},size:function(){return this.__collection__?this.__collection__.length:0},clear:function(){this.__collection__=[]},moveForward:function(t){var e=this.indexOf(t);-1!=e&&0!=e&&(this.__collection__[e]=this.__collection__[e-1],this.__collection__[e-1]=t)},moveBackward:function(t){var e=this.indexOf(t);-1!=e&&e!=this.size()-1&&(this.__collection__[e]=this.__collection__[e+1],this.__collection__[e+1]=t)},moveToHead:function(t){var e=this.indexOf(t);if(-1!=e&&0!=e){var r=this.__collection__.splice(0,e),n=this.__collection__.splice(1);this.__collection__=this.__collection__.concat(r,n)}},moveToTail:function(t){var e=this.indexOf(t);if(-1!=e&&e!=this.size()-1){var r=this.__collection__.splice(0,e),n=this.__collection__.splice(1);this.__collection__=r.concat(n,this.__collection__)}}});function o9(){}o9.prototype=a9;var s9=/\s+/;function c9(t,e,r,n){if(!r)return!0;if("object"==typeof r){for(let n in r){let i=r[n];t[e].apply(t,[n,i])}return!1}return!s9.test(r)||(r.split(s9).forEach((r=>t[e].apply(t,[r].concat(n)))),!1)}const u9=["on","off","once","delegate_on","delegate_off","trigger","listenTo"];var l9={withEvent(){u9.forEach((t=>this[t]=l9[t]))},on(t,e,r){return c9(this,"on",t,[e,r])&&e?(this._listeners||(this._listeners={}),(this._listeners[t]||(this._listeners[t]=[])).push({callback:e,context:r,ctx:r||this}),this):this},once(t,e,r){if(!c9(this,"once",t,[e,r])||!e)return this;var n=this,i=G7((function(){n.off(t,i),e.apply(n,arguments)}));i._callback=e,this.on(t,i,r)},off(t,e,r){if(!this._listeners||!c9(this,"off",t,[e,r]))return this;if(!t&&!e&&!r)return this._listeners=void 0,this;var n;n=t?[t]:Object.keys(this._listeners);for(let t=0;t<n.length;t++){let i=n[t],a=this._listeners[i];if(a){let t=[];if(this._listeners[i]=t,e||r)for(let n=0;n<a.length;n++){let i=a[n];(e&&e!==i.callback&&e!==i.callback._callback||r&&r!==i.context)&&t.push(i)}t.length||delete this._listeners[i]}}return this},delegate_on(t){return this._delegators||(this._delegators=new o9),this._delegators.append(t),this},delegate_off(t){return this._delegators?(this._delegators.remove(t),this):this},delegate(){if(this._delegators&&this._delegators.size()>0&&f9(this._delegators,arguments),!this._listeners)return this;var t=arguments.length-1,e=arguments[t];arguments[t]={origin:e.origin,name:e.name,deliverer:this};var r=this._listeners[e.name],n=this._listeners["(all)"];return r&&h9(r,arguments),n&&h9(n,arguments),this},trigger(t){var e=[].slice.call(arguments,1);if(e.push({origin:this,name:t,deliverer:this}),this._delegators&&this._delegators.size()>0&&f9(this._delegators,e),!this._listeners)return this;if(!c9(this,"trigger",t,e))return this;var r=this._listeners[t],n=this._listeners["(all)"];return r&&h9(r,e),n&&h9(n,e),this},stopListening(t,e,r){var n=this._listeningTo;if(!n)return this;var i=!e&&!r;r||"object"!=typeof e||(r=this),t&&((n={})[t._listenId]=t);for(let t in n){let a=n[t];a.off(e,r,this),(i||e9(a._events))&&delete this._listeningTo[t]}return this}};function h9(t,e){t.forEach((t=>t.callback.apply(t.ctx,e)))}function f9(t,e){t.forEach((t=>l9.delegate.apply(t,e)))}var d9={listenTo:"on",listenToOnce:"once"};for(let t in d9){var p9=d9[t];l9[t]=function(t,e,r){this._listeningTo||(this._listeningTo={});var n=this._listeningTo;return t._listenId||(t._listenId=`${"l"||""}${++r9}`),n[t._listenId]=t,r||"object"!=typeof e||(r=this),t[p9](e,r,this),this}}function g9(t,e){if(e instanceof Array)e.forEach((e=>g9(t,e)));else{if(t.mixedIn=t.hasOwnProperty("mixedIn")?t.mixedIn:[],t.mixingIn=t.hasOwnProperty("mixingIn")?t.mixingIn:[],t.mixedIn.indexOf(e)>=0)return t;if(t.mixingIn.indexOf(e)>=0)throw new Error(`found cyclic dependencies between ${t.mixingIn}`);t.mixingIn.push(e),e.call(t),t.mixingIn.pop(),t.mixedIn.push(e)}return t}var v9=(...t)=>{var e=[];t.forEach((t=>t&&t.stack&&e.push(t.stack))),console.error("[ERROR]",...t,e.join(" "))},m9=(...t)=>{var e=[];t.forEach((t=>t&&t.stack&&e.push(t.stack))),console.warn("[WARN]",...t,e.join(" "))},y9=(...t)=>console.log("[DEBUG]",...t);function b9(t,e,r){var n=t.__lookupGetter__(e);n?r?t.__defineGetter__(e,(function(){return void 0===this.__cache__[e]&&(this.__cache__[e]=n.call(this)),c7(this.__cache__[e])})):t.__defineGetter__(e,(function(){return void 0===this.__cache__[e]&&(this.__cache__[e]=n.call(this)),this.__cache__[e]})):v9(`${e} is not defined in ${t.constructor.name}`)}const x9={},w9=0,A9=1,_9=2,k9=3,E9={VIEW:0,EDIT:1,SHIFT:2,ADD:3},S9=30,M9="undefined"==typeof window?1:window.devicePixelRatio||(window.matchMedia&&window.matchMedia("(min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 1.5),(-moz-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5)").matches?2:1)||1,T9=["mousemove","mouseup","mousedown","mouseout","wheel","touchstart","touchmove","touchend","dblclick"],P9=["keydown","keyup"],O9={ALPHA:1,FONT_SIZE:15,FONT_FAMILY:"serif",FONT_COLOR:"black",TEXT_ALIGN:"center",TEXT_BASELINE:"middle",TEXT_WRAP:!1,BOLD:!1,ITALIC:!1,STROKE_STYLE:"#999",LINE_DASH:"solid"},I9={x:1,y:1};function R9(t,e,r){var{left:n=0,top:i=0,blurSize:a=0,color:o="transparent"}=e,s=r.rootModel.get("scale")||I9;t.shadowOffsetX=n*s.x*M9,t.shadowOffsetY=i*s.y*M9,t.shadowBlur=a*s.x*M9,t.shadowColor=o}var C9={gradation:function(t,e,r){var{type:n,subType:i,from:a,to:o,colors:s}=r;switch(i){case"linear":var c=e.createLinearGradient(a.x,a.y,o.x,o.y);break;case"radial":c=e.createRadialGradient(a.x,a.y,a.r,o.x,o.y,o.r);break;default:c=e.createLinearGradient(a.x,a.y,o.x,o.y)}s&&(s.forEach((function(t){c.addColorStop(t.endPoint,t.color)})),e.fillStyle=c,e.fill())},shadow:R9};function j9(t,e,r,n){var i=e.get("class");return!!i&&(i.split(" ")||[]).indexOf(t.substr(1))>=0}function D9(t,e,r,n){return t==e.get("type")}function L9(t,e,r,n){if("(all)"==t)return!0;switch(t.charAt(0)){case"#":return function(t,e,r,n){return t.substr(1)==e.get("id")}(t,e);case".":return j9(t,e);case"(":return function(t,e,r,n){switch(t){case"(all)":return!0;case"(self)":return n===e;case"(root)":return!n.parent&&n===e;case"(descendant)":return n!==e;case"(child)":return n===e.parent;default:return!1}}(t,e,0,n);default:return D9(t,e)}}function z9(t,e,r,n,i,a){return t(e,r,n,i)&&a.push(r),r.components&&r.components.forEach((r=>{z9(t,e,r,n,i,a)})),a}function F9(t,e,r,n){switch(t){case"(all)":return!0;case"(parent)":return r&&r.parent===e;case"(child)":case"(children)":return r&&r===e.parent;case"(sibling)":case"(siblings)":return r&&r.parent===e.parent&&r!==e;default:return!1}}function B9(t,e,r){if("(root)"==t)return[e];if("(self)"==t)return r?[r]:[];var n;switch(t.charAt(0)){case"#":let r=e.root.findById(t.substr(1));return r?[r]:[];case".":n=j9;break;case"(":n=F9;break;default:n=D9}return z9(n,t,e,r,e,[])}function N9(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var U9={exports:{}};!function(e,r){var n=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),o=new T(n||[]);return a._invoke=function(t,e,r){var n=h;return function(i,a){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw a;return O()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=E(o,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=l(t,e,r);if("normal"===c.type){if(n=r.done?p:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}(t,r,o),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h="suspendedStart",f="suspendedYield",d="executing",p="completed",g={};function v(){}function m(){}function y(){}var b={};c(b,a,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(P([])));w&&w!==r&&n.call(w,a)&&(b=w);var A=y.prototype=v.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(i,a,o,s){var c=l(t[i],t,a);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(h).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var i;this._invoke=function(t,n){function a(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(a,a):a()}}function E(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:O}}function O(){return{value:e,done:!0}}return m.prototype=y,c(A,"constructor",y),c(y,"constructor",m),m.displayName=c(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,s,"GeneratorFunction")),t.prototype=Object.create(A),t},t.awrap=function(t){return{__await:t}},_(k.prototype),c(k.prototype,o,(function(){return this})),t.AsyncIterator=k,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new k(u(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},_(A),c(A,s,"Generator"),c(A,a,(function(){return this})),c(A,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),M(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;M(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(e.exports);try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},String.fromCodePoint||function(t){var e=function(e){for(var r=[],n=0,i="",a=0,o=arguments.length;a!==o;++a){var s=+arguments[a];if(!(s<1114111&&s>>>0===s))throw RangeError("Invalid code point: "+s);s<=65535?n=r.push(s):(s-=65536,n=r.push(55296+(s>>10),s%1024+56320)),n>=16383&&(i+=t.apply(null,r),r.length=0)}return i+t.apply(null,r)};try{Object.defineProperty(String,"fromCodePoint",{value:e,configurable:!0,writable:!0})}catch(t){String.fromCodePoint=e}}(String.fromCharCode),Object.is||(Object.is=function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e})
2
- /*! https://mths.be/codepointat v0.2.0 by @mathias */,String.prototype.codePointAt||function(){var t=function(){try{var t={},e=Object.defineProperty,r=e(t,t,t)&&e}catch(t){}return r}(),e=function(t){if(null==this)throw TypeError();var e=String(this),r=e.length,n=t?Number(t):0;if(n!=n&&(n=0),!(n<0||n>=r)){var i,a=e.charCodeAt(n);return a>=55296&&a<=56319&&r>n+1&&(i=e.charCodeAt(n+1))>=56320&&i<=57343?1024*(a-55296)+i-56320+65536:a}};t?t(String.prototype,"codePointAt",{value:e,configurable:!0,writable:!0}):String.prototype.codePointAt=e}(),Math.log10=Math.log10||function(t){return Math.log(t)*Math.LOG10E},e.exports=function(){function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){if(!s&&N9)return N9(o);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,(function(t){return i(e[o][1][t]||t)}),u,u.exports,t,e,r,n)}return r[o].exports}for(var a=N9,o=0;o<n.length;o++)i(n[o]);return i}return t}()({1:[function(t,e,r){var n=t("./utils"),i=function(){var t=n.stringToArray,e=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],r=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],i=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],a=["Thousand","Million","Billion","Trillion"];function o(t,n){var o=function t(n,o,s){var c="";if(n<=19)c=(o?" and ":"")+(s?r[n]:e[n]);else if(n<100){var u=Math.floor(n/10),l=n%10;c=(o?" and ":"")+i[u-2],l>0?c+="-"+t(l,!1,s):s&&(c=c.substring(0,c.length-1)+"ieth")}else if(n<1e3){var h=Math.floor(n/100),f=n%100;c=(o?", ":"")+e[h]+" Hundred",f>0?c+=t(f,!0,s):s&&(c+="th")}else{var d=Math.floor(Math.log10(n)/3);d>a.length&&(d=a.length);var p=Math.pow(10,3*d),g=Math.floor(n/p),v=n-g*p;c=(o?", ":"")+t(g,!1,!1)+" "+a[d-1],v>0?c+=t(v,!0,s):s&&(c+="th")}return c};return o(t,!1,n)}var s={};function c(t){var e=t.split(/,\s|\sand\s|[\s\\-]/).map((function(t){return s[t]})),r=[0];return e.forEach((function(t){if(t<100){var e=r.pop();e>=1e3&&(r.push(e),e=0),r.push(e+t)}else r.push(r.pop()*t)})),r.reduce((function(t,e){return t+e}),0)}e.forEach((function(t,e){s[t.toLowerCase()]=e})),r.forEach((function(t,e){s[t.toLowerCase()]=e})),i.forEach((function(t,e){var r=t.toLowerCase();s[r]=10*(e+2),s[r.substring(0,t.length-1)+"ieth"]=s[r]})),s.hundredth=100,a.forEach((function(t,e){var r=t.toLowerCase(),n=Math.pow(10,3*(e+1));s[r]=n,s[r+"th"]=n}));var u=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],l={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function h(t){for(var e=0;e<u.length;e++){var r=u[e];if(t>=r[0])return r[1]+h(t-r[0])}return""}function f(t){for(var e=0,r=1,n=t.length-1;n>=0;n--){var i=t[n],a=l[i];a<r?e-=a:(r=a,e+=a)}return e}function d(t,e){for(var r=[],n=e.charCodeAt(0);t>0;)r.unshift(String.fromCharCode((t-1)%26+n)),t=Math.floor((t-1)/26);return r.join("")}function p(t,e){for(var r=e.charCodeAt(0),n=0,i=0;i<t.length;i++)n+=(t.charCodeAt(t.length-i-1)-r+1)*Math.pow(26,i);return n}function g(t,e){if(void 0!==t)return y(t=Math.floor(t),x(e))}var v={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},m={UPPER:"upper",LOWER:"lower",TITLE:"title"};function y(e,r){var n,i=e<0;switch(e=Math.abs(e),r.primary){case v.LETTERS:n=d(e,r.case===m.UPPER?"A":"a");break;case v.ROMAN:n=h(e),r.case===m.UPPER&&(n=n.toUpperCase());break;case v.WORDS:n=o(e,r.ordinal),r.case===m.UPPER?n=n.toUpperCase():r.case===m.LOWER&&(n=n.toLowerCase());break;case v.DECIMAL:n=""+e;var a=r.mandatoryDigits-n.length;if(a>0){var s=new Array(a+1).join("0");n=s+n}if(48!==r.zeroCode&&(n=t(n).map((function(t){return String.fromCodePoint(t.codePointAt(0)+r.zeroCode-48)})).join("")),r.regular)for(var c=Math.floor((n.length-1)/r.groupingSeparators.position);c>0;c--){var u=n.length-c*r.groupingSeparators.position;n=n.substr(0,u)+r.groupingSeparators.character+n.substr(u)}else r.groupingSeparators.reverse().forEach((function(t){var e=n.length-t.position;n=n.substr(0,e)+t.character+n.substr(e)}));if(r.ordinal){var l={1:"st",2:"nd",3:"rd"}[n[n.length-1]];(!l||n.length>1&&"1"===n[n.length-2])&&(l="th"),n+=l}break;case v.SEQUENCE:throw{code:"D3130",value:r.token}}return i&&(n="-"+n),n}var b=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function x(e){var r,n={type:"integer",primary:v.DECIMAL,case:m.LOWER,ordinal:!1},i=e.lastIndexOf(";");switch(-1===i?r=e:(r=e.substring(0,i),"o"===e.substring(i+1)[0]&&(n.ordinal=!0)),r){case"A":n.case=m.UPPER;case"a":n.primary=v.LETTERS;break;case"I":n.case=m.UPPER;case"i":n.primary=v.ROMAN;break;case"W":n.case=m.UPPER,n.primary=v.WORDS;break;case"Ww":n.case=m.TITLE,n.primary=v.WORDS;break;case"w":n.primary=v.WORDS;break;default:var a=null,o=0,s=0,c=[],u=0;if(t(r).map((function(t){return t.codePointAt(0)})).reverse().forEach((function(t){for(var e=!1,r=0;r<b.length;r++){var n=b[r];if(t>=n&&t<=n+9){if(e=!0,o++,u++,null===a)a=n;else if(n!==a)throw{code:"D3131"};break}}e||(35===t?(u++,s++):c.push({position:u,character:String.fromCodePoint(t)}))})),o>0){n.primary=v.DECIMAL,n.zeroCode=a,n.mandatoryDigits=o,n.optionalDigits=s;var l=function(t){if(0===t.length)return 0;for(var e=t[0].character,r=1;r<t.length;r++)if(t[r].character!==e)return 0;for(var n=t.map((function(t){return t.position})),i=function t(e,r){return 0===r?e:t(r,e%r)},a=n.reduce(i),o=1;o<=n.length;o++)if(-1===n.indexOf(o*a))return 0;return a},h=l(c);h>0?(n.regular=!0,n.groupingSeparators={position:h,character:c[0].character}):(n.regular=!1,n.groupingSeparators=c)}else n.primary=v.SEQUENCE,n.token=r}return n}var w={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function A(t){for(var e=[],r={type:"datetime",parts:e},n=function(r,n){if(n>r){var i=t.substring(r,n);i=i.split("]]").join("]"),e.push({type:"literal",value:i})}},i=0,a=0;a<t.length;){if("["===t.charAt(a)){if("["===t.charAt(a+1)){n(i,a),e.push({type:"literal",value:"["}),i=a+=2;continue}if(n(i,a),i=a,-1===(a=t.indexOf("]",i)))throw{code:"D3135"};var o,s=t.substring(i+1,a),c={type:"marker",component:(s=s.split(/\s+/).join("")).charAt(0)},u=s.lastIndexOf(",");if(-1!==u){var l=s.substring(u+1),h=l.indexOf("-"),f=void 0,d=void 0,p=function(t){return void 0===t||"*"===t?void 0:parseInt(t)};-1===h?f=l:(f=l.substring(0,h),d=l.substring(h+1));var g={min:p(f),max:p(d)};c.width=g,o=s.substring(1,u)}else o=s.substring(1);if(1===o.length)c.presentation1=o;else if(o.length>1){var v=o.charAt(o.length-1);-1!=="atco".indexOf(v)?(c.presentation2=v,"o"===v&&(c.ordinal=!0),c.presentation1=o.substring(0,o.length-1)):c.presentation1=o}else c.presentation1=w[c.component];if(void 0===c.presentation1)throw{code:"D3132",value:c.component};if("n"===c.presentation1[0])c.names=m.LOWER;else if("N"===c.presentation1[0])"n"===c.presentation1[1]?c.names=m.TITLE:c.names=m.UPPER;else if(-1!=="YMDdFWwXxHhmsf".indexOf(c.component)){var y=c.presentation1;if(c.presentation2&&(y+=";"+c.presentation2),c.integerFormat=x(y),c.width&&void 0!==c.width.min&&c.integerFormat.mandatoryDigits<c.width.min&&(c.integerFormat.mandatoryDigits=c.width.min),-1!=="YMD".indexOf(c.component))if(c.n=-1,c.width&&void 0!==c.width.max)c.n=c.width.max,c.integerFormat.mandatoryDigits=c.n;else{var b=c.integerFormat.mandatoryDigits+c.integerFormat.optionalDigits;b>=2&&(c.n=b)}}"Z"!==c.component&&"z"!==c.component||(c.integerFormat=x(c.presentation1)),e.push(c),i=a+1}a++}return n(i,a),r}var _=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],k=["January","February","March","April","May","June","July","August","September","October","November","December"],E=864e5,S=function(t){var e=Date.UTC(t.year,t.month),r=new Date(e).getUTCDay();return 0===r&&(r=7),r>4?e+(8-r)*E:e-(r-1)*E},M=function t(e,r){return{year:e,month:r,nextMonth:function(){return 11===r?t(e+1,0):t(e,r+1)},previousMonth:function(){return 0===r?t(e-1,11):t(e,r-1)},nextYear:function(){return t(e+1,r)},previousYear:function(){return t(e-1,r)}}},T=function(t,e){return(e-t)/(7*E)+1},P=function(t,e){var r;switch(e){case"Y":r=t.getUTCFullYear();break;case"M":r=t.getUTCMonth()+1;break;case"D":r=t.getUTCDate();break;case"d":r=(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())-Date.UTC(t.getUTCFullYear(),0))/E+1;break;case"F":0===(r=t.getUTCDay())&&(r=7);break;case"W":var n=M(t.getUTCFullYear(),0),i=S(n),a=Date.UTC(n.year,t.getUTCMonth(),t.getUTCDate()),o=T(i,a);if(o>52)a>=S(n.nextYear())&&(o=1);else if(o<1){var s=S(n.previousYear());o=T(s,a)}r=Math.floor(o);break;case"w":var c=M(t.getUTCFullYear(),t.getUTCMonth()),u=S(c),l=Date.UTC(c.year,c.month,t.getUTCDate()),h=T(u,l);if(h>4)l>=S(c.nextMonth())&&(h=1);else if(h<1){var f=S(c.previousMonth());h=T(f,l)}r=Math.floor(h);break;case"X":var d=M(t.getUTCFullYear(),0),p=S(d),g=S(d.nextYear()),v=t.getTime();r=v<p?d.year-1:v>=g?d.year+1:d.year;break;case"x":var m=M(t.getUTCFullYear(),t.getUTCMonth()),y=S(m),b=m.nextMonth(),x=S(b),w=t.getTime();r=w<y?m.previousMonth().month+1:w>=x?b.month+1:m.month+1;break;case"H":r=t.getUTCHours();break;case"h":r=t.getUTCHours(),0==(r%=12)&&(r=12);break;case"P":r=t.getUTCHours()>=12?"pm":"am";break;case"m":r=t.getUTCMinutes();break;case"s":r=t.getUTCSeconds();break;case"f":r=t.getUTCMilliseconds();break;case"Z":case"z":break;case"C":case"E":r="ISO"}return r},O=null;function I(t,e,r){var n=0,i=0;if(void 0!==r){var a=parseInt(r);n=Math.floor(a/100),i=a%100}var o,s=function(t,e){var r=P(t,e.component);if(-1!=="YMDdFWwXxHhms".indexOf(e.component))if("Y"===e.component&&-1!==e.n&&(r%=Math.pow(10,e.n)),e.names){if("M"===e.component||"x"===e.component)r=k[r-1];else{if("F"!==e.component)throw{code:"D3133",value:e.component};r=_[r]}e.names===m.UPPER?r=r.toUpperCase():e.names===m.LOWER&&(r=r.toLowerCase()),e.width&&r.length>e.width.max&&(r=r.substring(0,e.width.max))}else r=y(r,e.integerFormat);else if("f"===e.component)r=y(r,e.integerFormat);else if("Z"===e.component||"z"===e.component){var a=100*n+i;if(e.integerFormat.regular)r=y(a,e.integerFormat);else{var o=e.integerFormat.mandatoryDigits;if(1===o||2===o)r=y(n,e.integerFormat),0!==i&&(r+=":"+g(i,"00"));else{if(3!==o&&4!==o)throw{code:"D3134",value:o};r=y(a,e.integerFormat)}}a>=0&&(r="+"+r),"z"===e.component&&(r="GMT"+r),0===a&&"t"===e.presentation2&&(r="Z")}return r};void 0===e?(null===O&&(O=A("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),o=O):o=A(e);var c=new Date(t+60*(60*n+i)*1e3),u="";return o.parts.forEach((function(t){"literal"===t.type?u+=t.value:u+=s(c,t)})),u}function R(t){var e={};if("datetime"===t.type)e.type="datetime",e.parts=t.parts.map((function(t){var e={};if("literal"===t.type)e.regex=t.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if("Z"===t.component||"z"===t.component){var r;Array.isArray(t.integerFormat.groupingSeparators)||(r=t.integerFormat.groupingSeparators),e.regex="","z"===t.component&&(e.regex="GMT"),e.regex+="[-+][0-9]+",r&&(e.regex+=r.character+"[0-9]+"),e.parse=function(e){"z"===t.component&&(e=e.substring(3));var n=0,i=0;return r?(n=Number.parseInt(e.substring(0,e.indexOf(r.character))),i=Number.parseInt(e.substring(e.indexOf(r.character)+1))):e.length-1<=2?n=Number.parseInt(e):(n=Number.parseInt(e.substring(0,3)),i=Number.parseInt(e.substring(3))),60*n+i}}else if(t.integerFormat)t.integerFormat.n=t.n,e=R(t.integerFormat);else{e.regex="[a-zA-Z]+";var n={};if("M"===t.component||"x"===t.component)k.forEach((function(e,r){t.width&&t.width.max?n[e.substring(0,t.width.max)]=r+1:n[e]=r+1}));else if("F"===t.component)_.forEach((function(e,r){r>0&&(t.width&&t.width.max?n[e.substring(0,t.width.max)]=r:n[e]=r)}));else{if("P"!==t.component)throw{code:"D3133",value:t.component};n={am:0,AM:0,pm:1,PM:1}}e.parse=function(t){return n[t]}}return e.component=t.component,e}));else{e.type="integer";var r,n=t.case===m.UPPER;switch(r=t.n&&t.n>0?0===t.optionalDigits?"{".concat(t.n,"}"):"{".concat(t.n-t.optionalDigits,",").concat(t.n,"}"):"+",t.primary){case v.LETTERS:e.regex=n?"[A-Z]+":"[a-z]+",e.parse=function(t){return p(t,n?"A":"a")};break;case v.ROMAN:e.regex=n?"[MDCLXVI]+":"[mdclxvi]+",e.parse=function(t){return f(n?t:t.toUpperCase())};break;case v.WORDS:e.regex="(?:"+Object.keys(s).concat("and","[\\-, ]").join("|")+")+",e.parse=function(t){return c(t.toLowerCase())};break;case v.DECIMAL:e.regex="[0-9]".concat(r),t.ordinal&&(e.regex+="(?:th|st|nd|rd)"),e.parse=function(e){var r=e;return t.ordinal&&(r=e.substring(0,e.length-2)),t.regular?r=r.split(",").join(""):t.groupingSeparators.forEach((function(t){r=r.split(t.character).join("")})),48!==t.zeroCode&&(r=r.split("").map((function(e){return String.fromCodePoint(e.codePointAt(0)-t.zeroCode+48)})).join("")),parseInt(r)};break;case v.SEQUENCE:throw{code:"D3130",value:t.token}}}return e}function C(t,e){if(void 0!==t)return R(x(e)).parse(t)}function j(t,e){var r=R(A(e)),n="^"+r.parts.map((function(t){return"("+t.regex+")"})).join("")+"$",i=new RegExp(n,"i").exec(t);if(null!==i){for(var a=161,o=130,s=84,c=72,u=23,l=47,h={},f=1;f<i.length;f++){var d=r.parts[f-1];d.parse&&(h[d.component]=d.parse(i[f]))}if(0===Object.getOwnPropertyNames(h).length)return;var p=0,g=function(t){p<<=1,p+=t?1:0},v=function(t){return!(~t&p||!(t&p))};"YXMxWwdD".split("").forEach((function(t){return g(h[t])}));var m=!v(a)&&v(o),y=v(s),b=!y&&v(c);p=0,"PHhmsf".split("").forEach((function(t){return g(h[t])}));var x=!v(u)&&v(l),w=(m?"YD":y?"XxwF":b?"XWF":"YMD")+(x?"Phmsf":"Hmsf"),_=this.environment.timestamp,k=!1,E=!1;if(w.split("").forEach((function(t){if(void 0===h[t])k?(h[t]=-1!=="MDd".indexOf(t)?1:0,E=!0):h[t]=P(_,t);else if(k=!0,E)throw{code:"D3136"}})),h.M>0?h.M-=1:h.M=0,m){var S=Date.UTC(h.Y,0),M=1e3*(h.d-1)*60*60*24,T=new Date(S+M);h.M=T.getUTCMonth(),h.D=T.getUTCDate()}if(y)throw{code:"D3136"};if(b)throw{code:"D3136"};x&&(h.H=12===h.h?0:h.h,1===h.P&&(h.H+=12));var O=Date.UTC(h.Y,h.M,h.D,h.H,h.m,h.s,h.f);return(h.Z||h.z)&&(O-=60*(h.Z||h.z)*1e3),O}}var D=new RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function L(t,e){if(void 0!==t){if(void 0===e){if(!D.test(t))throw{stack:(new Error).stack,code:"D3110",value:t};return Date.parse(t)}return j.call(this,t,e)}}function z(t,e,r){if(void 0!==t)return I.call(this,t,e,r)}return{formatInteger:g,parseInteger:C,fromMillis:z,toMillis:L}}();e.exports=i},{"./utils":6}],2:[function(e,r,n){(function(t){(function(){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=e("./utils"),a=function(){var e=regeneratorRuntime.mark(N),r=regeneratorRuntime.mark(U),a=regeneratorRuntime.mark(Y),o=regeneratorRuntime.mark(G),s=regeneratorRuntime.mark(K),c=regeneratorRuntime.mark(ht),u=regeneratorRuntime.mark(ft),l=regeneratorRuntime.mark(dt),h=regeneratorRuntime.mark(gt),f=regeneratorRuntime.mark(_t),d=regeneratorRuntime.mark(Mt),p=regeneratorRuntime.mark(Ot),g=i.isNumeric,v=i.isArrayOfStrings,m=i.isArrayOfNumbers,y=i.createSequence,b=i.isSequence,x=i.isFunction,w=i.isLambda,A=i.isIterable,_=i.getFunctionArity,k=i.isDeepEqual,E=i.stringToArray;function S(t){if(void 0!==t){var e=0;return t.forEach((function(t){e+=t})),e}}function M(t){return void 0===t?0:t.length}function T(t){if(void 0!==t&&0!==t.length)return Math.max.apply(Math,t)}function P(t){if(void 0!==t&&0!==t.length)return Math.min.apply(Math,t)}function O(t){if(void 0!==t&&0!==t.length){var e=0;return t.forEach((function(t){e+=t})),e/t.length}}function I(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0!==t){var r;if("string"==typeof t)r=t;else if(x(t))r="";else{if("number"==typeof t&&!isFinite(t))throw{code:"D3001",value:t,stack:(new Error).stack};var n=e?2:0;Array.isArray(t)&&t.outerWrapper&&(t=t[0]),r=JSON.stringify(t,(function(t,e){return null!=e&&e.toPrecision&&g(e)?Number(e.toPrecision(15)):e&&x(e)?"":e}),n)}return r}}function R(t,e,r){if(void 0!==t){var n=E(t),i=n.length;if(i+e<0&&(e=0),void 0!==r){if(r<=0)return"";var a=e>=0?e+r:i+e+r;return n.slice(e,a).join("")}return n.slice(e).join("")}}function C(t,e){if(void 0!==t){var r=t.indexOf(e);return r>-1?t.substr(0,r):t}}function j(t,e){if(void 0!==t){var r=t.indexOf(e);return r>-1?t.substr(r+e.length):t}}function D(t){if(void 0!==t)return t.toLowerCase()}function L(t){if(void 0!==t)return t.toUpperCase()}function z(t){if(void 0!==t)return E(t).length}function F(t){if(void 0!==t){var e=t.replace(/[ \t\n\r]+/gm," ");return" "===e.charAt(0)&&(e=e.substring(1))," "===e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e}}function B(t,e,r){if(void 0!==t){var n;void 0!==r&&0!==r.length||(r=" ");var i=Math.abs(e)-z(t);if(i>0){var a=new Array(i+1).join(r);r.length>1&&(a=R(a,0,i)),n=e>0?t+a:a+t}else n=t;return n}}function N(t,r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.apply(this,[r]),!A(n)){e.next=4;break}return e.delegateYield(n,"t0",3);case 3:n=e.t0;case 4:if(!n||"number"==typeof n.start||"number"===n.end||Array.isArray(n.groups)||x(n.next)){e.next=6;break}throw{code:"T1010",stack:(new Error).stack};case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)}function U(t,e){var n,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0!==t){r.next=2;break}return r.abrupt("return",void 0);case 2:if("string"!=typeof e){r.next=6;break}n=-1!==t.indexOf(e),r.next=9;break;case 6:return r.delegateYield(N(e,t),"t0",7);case 7:i=r.t0,n=void 0!==i;case 9:return r.abrupt("return",n);case 10:case"end":return r.stop()}}),r)}function Y(t,e,r){var n,i,o;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(void 0!==t){a.next=2;break}return a.abrupt("return",void 0);case 2:if(!(r<0)){a.next=4;break}throw{stack:(new Error).stack,value:r,code:"D3040",index:3};case 4:if(n=y(),!(void 0===r||r>0)){a.next=17;break}return i=0,a.delegateYield(N(e,t),"t0",8);case 8:if(void 0===(o=a.t0)){a.next=17;break}case 10:if(void 0===o||!(void 0===r||i<r)){a.next=17;break}return n.push({match:o.match,index:o.start,groups:o.groups}),a.delegateYield(N(o.next),"t1",13);case 13:o=a.t1,i++,a.next=10;break;case 17:return a.abrupt("return",n);case 18:case"end":return a.stop()}}),a)}function G(t,e,r,n){var i,a,s,c,u,l,h,f;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(void 0!==t){o.next=2;break}return o.abrupt("return",void 0);case 2:if(i=this,""!==e){o.next=5;break}throw{code:"D3010",stack:(new Error).stack,value:e,index:2};case 5:if(!(n<0)){o.next=7;break}throw{code:"D3011",stack:(new Error).stack,value:n,index:4};case 7:if(a="string"==typeof r?function(t){for(var e="",n=0,i=r.indexOf("$",n);-1!==i&&n<r.length;){e+=r.substring(n,i),n=i+1;var a=r.charAt(n);if("$"===a)e+="$",n++;else if("0"===a)e+=t.match,n++;else{var o;if(o=0===t.groups.length?1:Math.floor(Math.log(t.groups.length)*Math.LOG10E)+1,i=parseInt(r.substring(n,n+o),10),o>1&&i>t.groups.length&&(i=parseInt(r.substring(n,n+o-1),10)),isNaN(i))e+="$";else{if(t.groups.length>0){var s=t.groups[i-1];void 0!==s&&(e+=s)}n+=i.toString().length}}i=r.indexOf("$",n)}return e+=r.substring(n)}:r,s="",c=0,!(void 0===n||n>0)){o.next=44;break}if(u=0,"string"!=typeof e){o.next=18;break}for(l=t.indexOf(e,c);-1!==l&&(void 0===n||u<n);)s+=t.substring(c,l),s+=r,c=l+e.length,u++,l=t.indexOf(e,c);s+=t.substring(c),o.next=42;break;case 18:return o.delegateYield(N(e,t),"t0",19);case 19:if(void 0===(h=o.t0)){o.next=41;break}case 21:if(void 0===h||!(void 0===n||u<n)){o.next=38;break}if(s+=t.substring(c,h.start),f=a.apply(i,[h]),!A(f)){o.next=27;break}return o.delegateYield(f,"t1",26);case 26:f=o.t1;case 27:if("string"!=typeof f){o.next=31;break}s+=f,o.next=32;break;case 31:throw{code:"D3012",stack:(new Error).stack,value:f};case 32:return c=h.start+h.match.length,u++,o.delegateYield(N(h.next),"t2",35);case 35:h=o.t2,o.next=21;break;case 38:s+=t.substring(c),o.next=42;break;case 41:s=t;case 42:o.next=45;break;case 44:s=t;case 45:return o.abrupt("return",s);case 46:case"end":return o.stop()}}),o,this)}function H(e){if(void 0!==e){var r="undefined"!=typeof window?window.btoa:function(e){return new t.Buffer.from(e,"binary").toString("base64")};return r(e)}}function W(e){if(void 0!==e){var r="undefined"!=typeof window?window.atob:function(e){return new t.Buffer.from(e,"base64").toString("binary")};return r(e)}}function q(t){if(void 0!==t){var e;try{e=encodeURIComponent(t)}catch(e){throw{code:"D3140",stack:(new Error).stack,value:t,functionName:"encodeUrlComponent"}}return e}}function X(t){if(void 0!==t){var e;try{e=encodeURI(t)}catch(e){throw{code:"D3140",stack:(new Error).stack,value:t,functionName:"encodeUrl"}}return e}}function V(t){if(void 0!==t){var e;try{e=decodeURIComponent(t)}catch(e){throw{code:"D3140",stack:(new Error).stack,value:t,functionName:"decodeUrlComponent"}}return e}}function Q(t){if(void 0!==t){var e;try{e=decodeURI(t)}catch(e){throw{code:"D3140",stack:(new Error).stack,value:t,functionName:"decodeUrl"}}return e}}function K(t,e,r){var n,i,a,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(void 0!==t){s.next=2;break}return s.abrupt("return",void 0);case 2:if(!(r<0)){s.next=4;break}throw{code:"D3020",stack:(new Error).stack,value:r,index:3};case 4:if(n=[],!(void 0===r||r>0)){s.next=27;break}if("string"!=typeof e){s.next=10;break}n=t.split(e,r),s.next=27;break;case 10:return i=0,s.delegateYield(N(e,t),"t0",12);case 12:if(void 0===(a=s.t0)){s.next=26;break}o=0;case 15:if(void 0===a||!(void 0===r||i<r)){s.next=23;break}return n.push(t.substring(o,a.start)),o=a.end,s.delegateYield(N(a.next),"t1",19);case 19:a=s.t1,i++,s.next=15;break;case 23:(void 0===r||i<r)&&n.push(t.substring(o)),s.next=27;break;case 26:n.push(t);case 27:return s.abrupt("return",n);case 28:case"end":return s.stop()}}),s)}function J(t,e){if(void 0!==t)return void 0===e&&(e=""),t.join(e)}function Z(t,e,r){if(void 0!==t){var n={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"};void 0!==r&&Object.keys(r).forEach((function(t){n[t]=r[t]}));for(var i=[],a=n["zero-digit"].charCodeAt(0),o=a;o<a+10;o++)i.push(String.fromCharCode(o));var s=i.concat([n["decimal-separator"],n["exponent-separator"],n["grouping-separator"],n.digit,n["pattern-separator"]]),c=e.split(n["pattern-separator"]);if(c.length>2)throw{code:"D3080",stack:(new Error).stack};var u=function(t){var e,r,i,a,o=function(){for(var e,r=0;r<t.length;r++)if(e=t.charAt(r),-1!==s.indexOf(e)&&e!==n["exponent-separator"])return t.substring(0,r)}(),c=function(){for(var e,r=t.length-1;r>=0;r--)if(e=t.charAt(r),-1!==s.indexOf(e)&&e!==n["exponent-separator"])return t.substring(r+1)}(),u=t.substring(o.length,t.length-c.length),l=t.indexOf(n["exponent-separator"],o.length);-1===l||l>t.length-c.length?(e=u,r=void 0):(e=u.substring(0,l),r=u.substring(l+1));var h=e.indexOf(n["decimal-separator"]);return-1===h?(i=e,a=c):(i=e.substring(0,h),a=e.substring(h+1)),{prefix:o,suffix:c,activePart:u,mantissaPart:e,exponentPart:r,integerPart:i,fractionalPart:a,subpicture:t}},l=function(t){var e,r,a=t.subpicture,o=a.indexOf(n["decimal-separator"]);o!==a.lastIndexOf(n["decimal-separator"])&&(e="D3081"),a.indexOf(n.percent)!==a.lastIndexOf(n.percent)&&(e="D3082"),a.indexOf(n["per-mille"])!==a.lastIndexOf(n["per-mille"])&&(e="D3083"),-1!==a.indexOf(n.percent)&&-1!==a.indexOf(n["per-mille"])&&(e="D3084");var c=!1;for(r=0;r<t.mantissaPart.length;r++){var u=t.mantissaPart.charAt(r);if(-1!==i.indexOf(u)||u===n.digit){c=!0;break}}c||(e="D3085"),-1!==t.activePart.split("").map((function(t){return-1===s.indexOf(t)?"p":"a"})).join("").indexOf("p")&&(e="D3086"),-1!==o?a.charAt(o-1)!==n["grouping-separator"]&&a.charAt(o+1)!==n["grouping-separator"]||(e="D3087"):t.integerPart.charAt(t.integerPart.length-1)===n["grouping-separator"]&&(e="D3088"),-1!==a.indexOf(n["grouping-separator"]+n["grouping-separator"])&&(e="D3089");var l=t.integerPart.indexOf(n.digit);-1!==l&&t.integerPart.substring(0,l).split("").filter((function(t){return i.indexOf(t)>-1})).length>0&&(e="D3090"),-1!==(l=t.fractionalPart.lastIndexOf(n.digit))&&t.fractionalPart.substring(l).split("").filter((function(t){return i.indexOf(t)>-1})).length>0&&(e="D3091");var h="string"==typeof t.exponentPart;if(h&&t.exponentPart.length>0&&(-1!==a.indexOf(n.percent)||-1!==a.indexOf(n["per-mille"]))&&(e="D3092"),h&&(0===t.exponentPart.length||t.exponentPart.split("").filter((function(t){return-1===i.indexOf(t)})).length>0)&&(e="D3093"),e)throw{code:e,stack:(new Error).stack}},h=function(t){var e=function(e,r){for(var a=[],o=e.indexOf(n["grouping-separator"]);-1!==o;){var s=(r?e.substring(0,o):e.substring(o)).split("").filter((function(t){return-1!==i.indexOf(t)||t===n.digit})).length;a.push(s),o=t.integerPart.indexOf(n["grouping-separator"],o+1)}return a},r=e(t.integerPart),a=function(t){if(0===t.length)return 0;for(var e=function t(e,r){return 0===r?e:t(r,e%r)},r=t.reduce(e),n=1;n<=t.length;n++)if(-1===t.indexOf(n*r))return 0;return r},o=a(r),s=e(t.fractionalPart,!0),c=t.integerPart.split("").filter((function(t){return-1!==i.indexOf(t)})).length,u=c,l=t.fractionalPart.split(""),h=l.filter((function(t){return-1!==i.indexOf(t)})).length,f=l.filter((function(t){return-1!==i.indexOf(t)||t===n.digit})).length,d="string"==typeof t.exponentPart;0===c&&0===f&&(d?(h=1,f=1):c=1),d&&0===c&&-1!==t.integerPart.indexOf(n.digit)&&(c=1),0===c&&0===h&&(h=1);var p=0;return d&&(p=t.exponentPart.split("").filter((function(t){return-1!==i.indexOf(t)})).length),{integerPartGroupingPositions:r,regularGrouping:o,minimumIntegerPartSize:c,scalingFactor:u,prefix:t.prefix,fractionalPartGroupingPositions:s,minimumFactionalPartSize:h,maximumFactionalPartSize:f,minimumExponentSize:p,suffix:t.suffix,picture:t.subpicture}},f=c.map(u);f.forEach(l);var d,p,g,v,m=f.map(h),y=n["minus-sign"],b=n["zero-digit"],x=n["decimal-separator"],w=n["grouping-separator"];if(1===m.length&&(m.push(JSON.parse(JSON.stringify(m[0]))),m[1].prefix=y+m[1].prefix),p=-1!==(d=t>=0?m[0]:m[1]).picture.indexOf(n.percent)?100*t:-1!==d.picture.indexOf(n["per-mille"])?1e3*t:t,0===d.minimumExponentSize)g=p;else{var A=Math.pow(10,d.scalingFactor),_=Math.pow(10,d.scalingFactor-1);for(g=p,v=0;g<_;)g*=10,v-=1;for(;g>A;)g/=10,v+=1}var k=function(t,e){var r=Math.abs(t).toFixed(e);return"0"!==b&&(r=r.split("").map((function(t){return t>="0"&&t<="9"?i[t.charCodeAt(0)-48]:t})).join("")),r},E=k(it(g,d.maximumFactionalPartSize),d.maximumFactionalPartSize),S=E.indexOf(".");for(-1===S?E+=x:E=E.replace(".",x);E.charAt(0)===b;)E=E.substring(1);for(;E.charAt(E.length-1)===b;)E=E.substring(0,E.length-1);S=E.indexOf(x);var M=d.minimumIntegerPartSize-S,T=d.minimumFactionalPartSize-(E.length-S-1);if(E=(M>0?new Array(M+1).join(b):"")+E,E+=T>0?new Array(T+1).join(b):"",S=E.indexOf(x),d.regularGrouping>0)for(var P=Math.floor((S-1)/d.regularGrouping),O=1;O<=P;O++)E=[E.slice(0,S-O*d.regularGrouping),w,E.slice(S-O*d.regularGrouping)].join("");else d.integerPartGroupingPositions.forEach((function(t){E=[E.slice(0,S-t),w,E.slice(S-t)].join(""),S++}));if(S=E.indexOf(x),d.fractionalPartGroupingPositions.forEach((function(t){E=[E.slice(0,t+S+1),w,E.slice(t+S+1)].join("")})),S=E.indexOf(x),-1!==d.picture.indexOf(x)&&S!==E.length-1||(E=E.substring(0,E.length-1)),void 0!==v){var I=k(v,0);(M=d.minimumExponentSize-I.length)>0&&(I=new Array(M+1).join(b)+I),E=E+n["exponent-separator"]+(v<0?y:"")+I}return E=d.prefix+E+d.suffix}}function $(t,e){if(void 0!==t){if(t=it(t),(e=void 0===e?10:it(e))<2||e>36)throw{code:"D3100",stack:(new Error).stack,value:e};return t.toString(e)}}function tt(t){var e;if(void 0!==t){if("number"==typeof t)e=t;else if("string"==typeof t&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(t)&&!isNaN(parseFloat(t))&&isFinite(t))e=parseFloat(t);else if(!0===t)e=1;else{if(!1!==t)throw{code:"D3030",value:t,stack:(new Error).stack,index:1};e=0}return e}}function et(t){if(void 0!==t)return Math.abs(t)}function rt(t){if(void 0!==t)return Math.floor(t)}function nt(t){if(void 0!==t)return Math.ceil(t)}function it(t,e){var r;if(void 0!==t){if(e){var n=t.toString().split("e");t=+(n[0]+"e"+(n[1]?+n[1]+e:e))}var i=(r=Math.round(t))-t;return.5===Math.abs(i)&&1===Math.abs(r%2)&&(r-=1),e&&(n=r.toString().split("e"),r=+(n[0]+"e"+(n[1]?+n[1]-e:-e))),Object.is(r,-0)&&(r=0),r}}function at(t){if(void 0!==t){if(t<0)throw{stack:(new Error).stack,code:"D3060",index:1,value:t};return Math.sqrt(t)}}function ot(t,e){var r;if(void 0!==t){if(r=Math.pow(t,e),!isFinite(r))throw{stack:(new Error).stack,code:"D3061",index:1,value:t,exp:e};return r}}function st(){return Math.random()}function ct(t){if(void 0!==t){var e=!1;return Array.isArray(t)?1===t.length?e=ct(t[0]):t.length>1&&(e=t.filter((function(t){return ct(t)})).length>0):"string"==typeof t?t.length>0&&(e=!0):g(t)?0!==t&&(e=!0):null!==t&&"object"===n(t)?Object.keys(t).length>0&&(e=!0):"boolean"==typeof t&&!0===t&&(e=!0),e}}function ut(t){if(void 0!==t)return!ct(t)}function lt(t,e,r,n){var i=[e],a=_(t);return a>=2&&i.push(r),a>=3&&i.push(n),i}function ht(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(void 0!==t){o.next=2;break}return o.abrupt("return",void 0);case 2:r=y(),n=0;case 4:if(!(n<t.length)){o.next=12;break}return i=lt(e,t[n],n,t),o.delegateYield(e.apply(this,i),"t0",7);case 7:void 0!==(a=o.t0)&&r.push(a);case 9:n++,o.next=4;break;case 12:return o.abrupt("return",r);case 13:case"end":return o.stop()}}),c,this)}function ft(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(void 0!==t){o.next=2;break}return o.abrupt("return",void 0);case 2:r=y(),n=0;case 4:if(!(n<t.length)){o.next=13;break}return i=t[n],a=lt(e,i,n,t),o.delegateYield(e.apply(this,a),"t0",8);case 8:ct(o.t0)&&r.push(i);case 10:n++,o.next=4;break;case 13:return o.abrupt("return",r);case 14:case"end":return o.stop()}}),u,this)}function dt(t,e){var r,n,i,a,o,s,c;return regeneratorRuntime.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(void 0!==t){u.next=2;break}return u.abrupt("return",void 0);case 2:r=!1,i=0;case 4:if(!(i<t.length)){u.next=22;break}if(a=t[i],o=!0,void 0===e){u.next=12;break}return s=lt(e,a,i,t),u.delegateYield(e.apply(this,s),"t0",10);case 10:c=u.t0,o=ct(c);case 12:if(!o){u.next=19;break}if(r){u.next=18;break}n=a,r=!0,u.next=19;break;case 18:throw{stack:(new Error).stack,code:"D3138",index:i};case 19:i++,u.next=4;break;case 22:if(r){u.next=24;break}throw{stack:(new Error).stack,code:"D3139"};case 24:return u.abrupt("return",n);case 25:case"end":return u.stop()}}),l,this)}function pt(){for(var t=[],e=Array.prototype.slice.call(arguments),r=Math.min.apply(Math,e.map((function(t){return Array.isArray(t)?t.length:0}))),n=0;n<r;n++){var i=e.map((function(t){return t[n]}));t.push(i)}return t}function gt(t,e,r){var n,i,a,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(void 0!==t){s.next=2;break}return s.abrupt("return",void 0);case 2:if(!((i=_(e))<2)){s.next=5;break}throw{stack:(new Error).stack,code:"D3050",index:1};case 5:void 0===r&&t.length>0?(n=t[0],a=1):(n=r,a=0);case 6:if(!(a<t.length)){s.next=15;break}return o=[n,t[a]],i>=3&&o.push(a),i>=4&&o.push(t),s.delegateYield(e.apply(this,o),"t0",11);case 11:n=s.t0,a++,s.next=6;break;case 15:return s.abrupt("return",n);case 16:case"end":return s.stop()}}),h,this)}function vt(t){var e=y();if(Array.isArray(t)){var r={};t.forEach((function(t){vt(t).forEach((function(t){r[t]=!0}))})),e=vt(r)}else null===t||"object"!==n(t)||w(t)||Object.keys(t).forEach((function(t){return e.push(t)}));return e}function mt(t,e){var r;if(Array.isArray(t)){r=y();for(var i=0;i<t.length;i++){var a=mt(t[i],e);void 0!==a&&(Array.isArray(a)?a.forEach((function(t){return r.push(t)})):r.push(a))}}else null!==t&&"object"===n(t)&&(r=t[e]);return r}function yt(t,e){return void 0===t?e:void 0===e?t:(Array.isArray(t)||(t=y(t)),Array.isArray(e)||(e=[e]),t.concat(e))}function bt(t){return void 0!==t}function xt(t){var e=y();if(Array.isArray(t))t.forEach((function(t){e=yt(e,xt(t))}));else if(null===t||"object"!==n(t)||w(t))e=t;else for(var r in t){var i={};i[r]=t[r],e.push(i)}return e}function wt(t){if(void 0!==t){var e={};return t.forEach((function(t){for(var r in t)e[r]=t[r]})),e}}function At(t){if(void 0!==t){if(t.length<=1)return t;for(var e=t.length,r=new Array(e),n=0;n<e;n++)r[e-n-1]=t[n];return r}}function _t(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:r=y(),o.t0=regeneratorRuntime.keys(t);case 2:if((o.t1=o.t0()).done){o.next=10;break}return n=o.t1.value,i=lt(e,t[n],n,t),o.delegateYield(e.apply(this,i),"t2",6);case 6:void 0!==(a=o.t2)&&r.push(a),o.next=2;break;case 10:return o.abrupt("return",r);case 11:case"end":return o.stop()}}),f,this)}function kt(t){throw{code:"D3137",stack:(new Error).stack,message:t||"$error() function evaluated"}}function Et(t,e){if(!t)throw{code:"D3141",stack:(new Error).stack,message:e||"$assert() statement failed"}}function St(t){if(void 0!==t)return null===t?"null":g(t)?"number":"string"==typeof t?"string":"boolean"==typeof t?"boolean":Array.isArray(t)?"array":x(t)?"function":"object"}function Mt(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(void 0!==t){o.next=2;break}return o.abrupt("return",void 0);case 2:if(!(t.length<=1)){o.next=4;break}return o.abrupt("return",t);case 4:if(void 0!==e){o.next=10;break}if(m(t)||v(t)){o.next=7;break}throw{stack:(new Error).stack,code:"D3070",index:1};case 7:r=regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e>r);case 1:case"end":return t.stop()}}),t)})),o.next=11;break;case 10:r=e;case 11:return n=regeneratorRuntime.mark((function t(e,n){var i,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=regeneratorRuntime.mark((function t(e,n,i){return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(0!==n.length){a.next=4;break}Array.prototype.push.apply(e,i),a.next=16;break;case 4:if(0!==i.length){a.next=8;break}Array.prototype.push.apply(e,n),a.next=16;break;case 8:return a.delegateYield(r(n[0],i[0]),"t0",9);case 9:if(!a.t0){a.next=14;break}return e.push(i[0]),a.delegateYield(t(e,n,i.slice(1)),"t1",12);case 12:a.next=16;break;case 14:return e.push(n[0]),a.delegateYield(t(e,n.slice(1),i),"t2",16);case 16:case"end":return a.stop()}}),t)})),a=[],t.delegateYield(i(a,e,n),"t0",3);case 3:return t.abrupt("return",a);case 4:case"end":return t.stop()}}),t)})),i=regeneratorRuntime.mark((function t(e){var r,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(Array.isArray(e)&&!(e.length<=1)){o.next=4;break}return o.abrupt("return",e);case 4:return r=Math.floor(e.length/2),i=e.slice(0,r),a=e.slice(r),o.delegateYield(t(i),"t0",8);case 8:return i=o.t0,o.delegateYield(t(a),"t1",10);case 10:return a=o.t1,o.delegateYield(n(i,a),"t2",12);case 12:return o.abrupt("return",o.t2);case 13:case"end":return o.stop()}}),t)})),o.delegateYield(i(t),"t0",14);case 14:return a=o.t0,o.abrupt("return",a);case 16:case"end":return o.stop()}}),d)}function Tt(t){if(void 0!==t){if(t.length<=1)return t;for(var e=new Array(t.length),r=0;r<t.length;r++){var n=Math.floor(Math.random()*(r+1));r!==n&&(e[r]=e[n]),e[n]=t[r]}return e}}function Pt(t){if(void 0!==t){if(!Array.isArray(t)||t.length<=1)return t;for(var e=b(t)?y():[],r=0;r<t.length;r++){for(var n=t[r],i=!1,a=0;a<e.length;a++)if(k(n,e[a])){i=!0;break}i||e.push(n)}return e}}function Ot(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:r={},o.t0=regeneratorRuntime.keys(t);case 2:if((o.t1=o.t0()).done){o.next=11;break}return n=o.t1.value,i=t[n],a=lt(e,i,n,t),o.delegateYield(e.apply(this,a),"t2",7);case 7:ct(o.t2)&&(r[n]=i),o.next=2;break;case 11:return 0===Object.keys(r).length&&(r=void 0),o.abrupt("return",r);case 13:case"end":return o.stop()}}),p,this)}return{sum:S,count:M,max:T,min:P,average:O,string:I,substring:R,substringBefore:C,substringAfter:j,lowercase:D,uppercase:L,length:z,trim:F,pad:B,match:Y,contains:U,replace:G,split:K,join:J,formatNumber:Z,formatBase:$,number:tt,floor:rt,ceil:nt,round:it,abs:et,sqrt:at,power:ot,random:st,boolean:ct,not:ut,map:ht,zip:pt,filter:ft,single:dt,foldLeft:gt,sift:Ot,keys:vt,lookup:mt,append:yt,exists:bt,spread:xt,merge:wt,reverse:At,each:_t,error:kt,assert:Et,type:St,sort:Mt,shuffle:Tt,distinct:Pt,base64encode:H,base64decode:W,encodeUrlComponent:q,encodeUrl:X,decodeUrlComponent:V,decodeUrl:Q}}();r.exports=a}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./utils":6}],3:[function(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=t("./datetime"),a=t("./functions"),o=t("./utils"),s=t("./parser"),c=t("./signature"),u=function(){var t=regeneratorRuntime.mark(B),e=regeneratorRuntime.mark(N),r=regeneratorRuntime.mark(Y),u=regeneratorRuntime.mark(G),l=regeneratorRuntime.mark(H),h=regeneratorRuntime.mark(W),f=regeneratorRuntime.mark(q),d=regeneratorRuntime.mark(X),p=regeneratorRuntime.mark(it),g=regeneratorRuntime.mark(st),v=regeneratorRuntime.mark(lt),m=regeneratorRuntime.mark(ht),y=regeneratorRuntime.mark(ft),b=regeneratorRuntime.mark(gt),x=regeneratorRuntime.mark(yt),w=regeneratorRuntime.mark(bt),A=regeneratorRuntime.mark(xt),_=regeneratorRuntime.mark(wt),k=regeneratorRuntime.mark(_t),E=regeneratorRuntime.mark(Et),S=regeneratorRuntime.mark(Tt),M=regeneratorRuntime.mark(It),T=o.isNumeric,P=o.isArrayOfStrings,O=o.isArrayOfNumbers,I=o.createSequence,R=o.isSequence,C=o.isFunction,j=o.isLambda,D=o.isIterable,L=o.getFunctionArity,z=o.isDeepEqual,F=Ct(null);function B(e,r,n){var i,a,o,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(a=n.lookup("__evaluate_entry"))&&a(e,r,n),t.t0=e.type,t.next="path"===t.t0?5:"binary"===t.t0?8:"unary"===t.t0?11:"name"===t.t0?14:"string"===t.t0||"number"===t.t0||"value"===t.t0?16:"wildcard"===t.t0?18:"descendant"===t.t0?20:"parent"===t.t0?22:"condition"===t.t0?24:"block"===t.t0?27:"bind"===t.t0?30:"regex"===t.t0?33:"function"===t.t0?35:"variable"===t.t0?38:"lambda"===t.t0?40:"partial"===t.t0?42:"apply"===t.t0?45:"transform"===t.t0?48:50;break;case 5:return t.delegateYield(N(e,r,n),"t1",6);case 6:return i=t.t1,t.abrupt("break",50);case 8:return t.delegateYield(q(e,r,n),"t2",9);case 9:return i=t.t2,t.abrupt("break",50);case 11:return t.delegateYield(X(e,r,n),"t3",12);case 12:return i=t.t3,t.abrupt("break",50);case 14:return i=V(e,r),t.abrupt("break",50);case 16:return i=Q(e),t.abrupt("break",50);case 18:return i=K(e,r),t.abrupt("break",50);case 20:return i=Z(e,r),t.abrupt("break",50);case 22:return i=n.lookup(e.slot.label),t.abrupt("break",50);case 24:return t.delegateYield(ht(e,r,n),"t4",25);case 25:return i=t.t4,t.abrupt("break",50);case 27:return t.delegateYield(ft(e,r,n),"t5",28);case 28:return i=t.t5,t.abrupt("break",50);case 30:return t.delegateYield(lt(e,r,n),"t6",31);case 31:return i=t.t6,t.abrupt("break",50);case 33:return i=dt(e),t.abrupt("break",50);case 35:return t.delegateYield(bt(e,r,n),"t7",36);case 36:return i=t.t7,t.abrupt("break",50);case 38:return i=pt(e,r,n),t.abrupt("break",50);case 40:return i=At(e,r,n),t.abrupt("break",50);case 42:return t.delegateYield(_t(e,r,n),"t8",43);case 43:return i=t.t8,t.abrupt("break",50);case 45:return t.delegateYield(yt(e,r,n),"t9",46);case 46:return i=t.t9,t.abrupt("break",50);case 48:return i=vt(e,r,n),t.abrupt("break",50);case 50:if(!n.async||null!=i&&"function"==typeof i.then||(i=Promise.resolve(i)),!n.async||"function"!=typeof i.then||!e.nextFunction||"function"!=typeof i[e.nextFunction]){t.next=54;break}t.next=57;break;case 54:return t.next=56,i;case 56:i=t.sent;case 57:if(!Object.prototype.hasOwnProperty.call(e,"predicate")){t.next=65;break}o=0;case 59:if(!(o<e.predicate.length)){t.next=65;break}return t.delegateYield(W(e.predicate[o].expr,i,n),"t10",61);case 61:i=t.t10;case 62:o++,t.next=59;break;case 65:if("path"===e.type||!Object.prototype.hasOwnProperty.call(e,"group")){t.next=68;break}return t.delegateYield(st(e.group,i,n),"t11",67);case 67:i=t.t11;case 68:return(s=n.lookup("__evaluate_exit"))&&s(e,r,n,i),i&&R(i)&&!i.tupleStream&&(e.keepArray&&(i.keepSingleton=!0),0===i.length?i=void 0:1===i.length&&(i=i.keepSingleton?i:i[0])),t.abrupt("return",i);case 72:case"end":return t.stop()}}),t)}function N(t,r,n){var i,a,o,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=Array.isArray(r)&&"variable"!==t.steps[0].type?r:I(r),o=!1,s=void 0,c=0;case 4:if(!(c<t.steps.length)){e.next=25;break}if((u=t.steps[c]).tuple&&(o=!0),0!==c||!u.consarray){e.next=12;break}return e.delegateYield(B(u,i,n),"t0",9);case 9:a=e.t0,e.next=19;break;case 12:if(!o){e.next=17;break}return e.delegateYield(H(u,i,s,n),"t1",14);case 14:s=e.t1,e.next=19;break;case 17:return e.delegateYield(Y(u,i,n,c===t.steps.length-1),"t2",18);case 18:a=e.t2;case 19:if(o||void 0!==a&&0!==a.length){e.next=21;break}return e.abrupt("break",25);case 21:void 0===u.focus&&(i=a);case 22:c++,e.next=4;break;case 25:if(o)if(t.tuple)a=s;else for(a=I(),c=0;c<s.length;c++)a.push(s[c]["@"]);if(t.keepSingletonArray&&(Array.isArray(a)&&a.cons&&!a.sequence&&(a=I(a)),a.keepSingleton=!0),!t.hasOwnProperty("group")){e.next=30;break}return e.delegateYield(st(t.group,o?s:a,n),"t3",29);case 29:a=e.t3;case 30:return e.abrupt("return",a);case 31:case"end":return e.stop()}}),e)}function U(t,e){var r=Ct(t);for(var n in e)r.bind(n,e[n]);return r}function Y(t,e,n,i){var a,o,s,c,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("sort"!==t.type){r.next=7;break}return r.delegateYield(gt(t,e,n),"t0",2);case 2:if(a=r.t0,!t.stages){r.next=6;break}return r.delegateYield(G(t.stages,a,n),"t1",5);case 5:a=r.t1;case 6:return r.abrupt("return",a);case 7:a=I(),o=0;case 9:if(!(o<e.length)){r.next=24;break}return r.delegateYield(B(t,e[o],n),"t2",11);case 11:if(s=r.t2,!t.stages){r.next=20;break}c=0;case 14:if(!(c<t.stages.length)){r.next=20;break}return r.delegateYield(W(t.stages[c].expr,s,n),"t3",16);case 16:s=r.t3;case 17:c++,r.next=14;break;case 20:void 0!==s&&a.push(s);case 21:o++,r.next=9;break;case 24:return u=I(),i&&1===a.length&&Array.isArray(a[0])&&!R(a[0])?u=a[0]:a.forEach((function(t){!Array.isArray(t)||t.cons?u.push(t):t.forEach((function(t){return u.push(t)}))})),r.abrupt("return",u);case 27:case"end":return r.stop()}}),r)}function G(t,e,r){var n,i,a,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:n=e,i=0;case 2:if(!(i<t.length)){s.next=15;break}a=t[i],s.t0=a.type,s.next="filter"===s.t0?7:"index"===s.t0?10:12;break;case 7:return s.delegateYield(W(a.expr,n,r),"t1",8);case 8:return n=s.t1,s.abrupt("break",12);case 10:for(o=0;o<n.length;o++)n[o][a.value]=o;return s.abrupt("break",12);case 12:i++,s.next=2;break;case 15:return s.abrupt("return",n);case 16:case"end":return s.stop()}}),u)}function H(t,e,r,n){var i,a,o,s,c,u,h,f;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if("sort"!==t.type){l.next=15;break}if(!r){l.next=6;break}return l.delegateYield(gt(t,r,n),"t0",3);case 3:i=l.t0,l.next=11;break;case 6:return l.delegateYield(gt(t,e,n),"t1",7);case 7:for(a=l.t1,(i=I()).tupleStream=!0,o=0;o<a.length;o++)(s={"@":a[o]})[t.index]=o,i.push(s);case 11:if(!t.stages){l.next=14;break}return l.delegateYield(G(t.stages,i,n),"t2",13);case 13:i=l.t2;case 14:return l.abrupt("return",i);case 15:(i=I()).tupleStream=!0,c=n,void 0===r&&(r=e.map((function(t){return{"@":t}}))),u=0;case 20:if(!(u<r.length)){l.next=28;break}return c=U(n,r[u]),l.delegateYield(B(t,r[u]["@"],c),"t3",23);case 23:if(void 0!==(h=l.t3))for(Array.isArray(h)||(h=[h]),f=0;f<h.length;f++)s={},Object.assign(s,r[u]),h.tupleStream?Object.assign(s,h[f]):(t.focus?(s[t.focus]=h[f],s["@"]=r[u]["@"]):s["@"]=h[f],t.index&&(s[t.index]=f),t.ancestor&&(s[t.ancestor.label]=r[u]["@"])),i.push(s);case 25:u++,l.next=20;break;case 28:if(!t.stages){l.next=31;break}return l.delegateYield(G(t.stages,i,n),"t4",30);case 30:i=l.t4;case 31:return l.abrupt("return",i);case 32:case"end":return l.stop()}}),l)}function W(t,e,r){var n,i,o,s,c,u;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(n=I(),e&&e.tupleStream&&(n.tupleStream=!0),Array.isArray(e)||(e=I(e)),"number"!==t.type){l.next=10;break}(i=Math.floor(t.value))<0&&(i=e.length+i),void 0!==(o=e[i])&&(Array.isArray(o)?n=o:n.push(o)),l.next=23;break;case 10:i=0;case 11:if(!(i<e.length)){l.next=23;break}return o=e[i],s=o,c=r,e.tupleStream&&(s=o["@"],c=U(r,o)),l.delegateYield(B(t,s,c),"t0",17);case 17:u=l.t0,T(u)&&(u=[u]),O(u)?u.forEach((function(t){var r=Math.floor(t);r<0&&(r=e.length+r),r===i&&n.push(o)})):a.boolean(u)&&n.push(o);case 20:i++,l.next=11;break;case 23:return l.abrupt("return",n);case 24:case"end":return l.stop()}}),h)}function q(t,e,r){var n,i,a,o,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.delegateYield(B(t.lhs,e,r),"t0",1);case 1:if(i=c.t0,a=t.value,o=regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.delegateYield(B(t.rhs,e,r),"t0",1);case 1:return n.abrupt("return",n.t0);case 2:case"end":return n.stop()}}),n)})),"and"!==a&&"or"!==a){c.next=15;break}return c.prev=5,c.delegateYield(it(i,o,a),"t1",7);case 7:return c.abrupt("return",c.t1);case 10:throw c.prev=10,c.t2=c.catch(5),c.t2.position=t.position,c.t2.token=a,c.t2;case 15:return c.delegateYield(o(),"t3",16);case 16:s=c.t3,c.prev=17,c.t4=a,c.next="+"===c.t4||"-"===c.t4||"*"===c.t4||"/"===c.t4||"%"===c.t4?21:"="===c.t4||"!="===c.t4?23:"<"===c.t4||"<="===c.t4||">"===c.t4||">="===c.t4?25:"&"===c.t4?27:".."===c.t4?29:"in"===c.t4?31:33;break;case 21:return n=tt(i,s,a),c.abrupt("break",33);case 23:return n=et(i,s,a),c.abrupt("break",33);case 25:return n=rt(i,s,a),c.abrupt("break",33);case 27:return n=ot(i,s),c.abrupt("break",33);case 29:return n=ut(i,s),c.abrupt("break",33);case 31:return n=nt(i,s),c.abrupt("break",33);case 33:c.next=40;break;case 35:throw c.prev=35,c.t5=c.catch(17),c.t5.position=t.position,c.t5.token=a,c.t5;case 40:return c.abrupt("return",n);case 41:case"end":return c.stop()}}),f,null,[[5,10],[17,35]])}function X(t,e,r){var n,i,o,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:c.t0=t.value,c.next="-"===c.t0?3:"["===c.t0?15:"{"===c.t0?27:30;break;case 3:return c.delegateYield(B(t.expression,e,r),"t1",4);case 4:if(void 0!==(n=c.t1)){c.next=9;break}n=void 0,c.next=14;break;case 9:if(!T(n)){c.next=13;break}n=-n,c.next=14;break;case 13:throw{code:"D1002",stack:(new Error).stack,position:t.position,token:t.value,value:n};case 14:return c.abrupt("break",30);case 15:n=[],i=0;case 17:if(!(i<t.expressions.length)){c.next=25;break}return o=t.expressions[i],c.delegateYield(B(o,e,r),"t2",20);case 20:void 0!==(s=c.t2)&&("["===o.value?n.push(s):n=a.append(n,s));case 22:i++,c.next=17;break;case 25:return t.consarray&&Object.defineProperty(n,"cons",{enumerable:!1,configurable:!1,value:!0}),c.abrupt("break",30);case 27:return c.delegateYield(st(t,e,r),"t3",28);case 28:return n=c.t3,c.abrupt("break",30);case 30:return c.abrupt("return",n);case 31:case"end":return c.stop()}}),d)}function V(t,e,r){return a.lookup(e,t.value)}function Q(t){return t.value}function K(t,e){var r=I();return Array.isArray(e)&&e.outerWrapper&&e.length>0&&(e=e[0]),null!==e&&"object"===n(e)&&Object.keys(e).forEach((function(t){var n=e[t];Array.isArray(n)?(n=J(n),r=a.append(r,n)):r.push(n)})),r}function J(t,e){return void 0===e&&(e=[]),Array.isArray(t)?t.forEach((function(t){J(t,e)})):e.push(t),e}function Z(t,e){var r,n=I();return void 0!==e&&($(e,n),r=1===n.length?n[0]:n),r}function $(t,e){Array.isArray(t)||e.push(t),Array.isArray(t)?t.forEach((function(t){$(t,e)})):null!==t&&"object"===n(t)&&Object.keys(t).forEach((function(r){$(t[r],e)}))}function tt(t,e,r){var n;if(void 0!==t&&!T(t))throw{code:"T2001",stack:(new Error).stack,value:t};if(void 0!==e&&!T(e))throw{code:"T2002",stack:(new Error).stack,value:e};if(void 0===t||void 0===e)return n;switch(r){case"+":n=t+e;break;case"-":n=t-e;break;case"*":n=t*e;break;case"/":n=t/e;break;case"%":n=t%e}return n}function et(t,e,r){var i,a=n(t),o=n(e);if("undefined"===a||"undefined"===o)return!1;switch(r){case"=":i=z(t,e);break;case"!=":i=!z(t,e)}return i}function rt(t,e,r){var i,a=n(t),o=n(e);if("undefined"!==a&&"string"!==a&&"number"!==a||"undefined"!==o&&"string"!==o&&"number"!==o)throw{code:"T2010",stack:(new Error).stack,value:"string"!==a&&"number"!==a?t:e};if("undefined"!==a&&"undefined"!==o){if(a!==o)throw{code:"T2009",stack:(new Error).stack,value:t,value2:e};switch(r){case"<":i=t<e;break;case"<=":i=t<=e;break;case">":i=t>e;break;case">=":i=t>=e}return i}}function nt(t,e){var r=!1;if(void 0===t||void 0===e)return!1;Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++)if(e[n]===t){r=!0;break}return r}function it(t,e,r){var n,i;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:i=at(t),a.t0=r,a.next="and"===a.t0?4:"or"===a.t0?12:20;break;case 4:if(a.t1=i,!a.t1){a.next=10;break}return a.t2=at,a.delegateYield(e(),"t3",8);case 8:a.t4=a.t3,a.t1=(0,a.t2)(a.t4);case 10:return n=a.t1,a.abrupt("break",20);case 12:if(a.t5=i,a.t5){a.next=18;break}return a.t6=at,a.delegateYield(e(),"t7",16);case 16:a.t8=a.t7,a.t5=(0,a.t6)(a.t8);case 18:return n=a.t5,a.abrupt("break",20);case 20:return a.abrupt("return",n);case 21:case"end":return a.stop()}}),p)}function at(t){var e=a.boolean(t);return void 0!==e&&e}function ot(t,e){var r="",n="";return void 0!==t&&(r=a.string(t)),void 0!==e&&(n=a.string(e)),r.concat(n)}function st(t,e,r){var n,i,o,s,c,u,l,h,f,d,p,v,m;return regeneratorRuntime.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:n={},i={},o=!(!e||!e.tupleStream),Array.isArray(e)||(e=I(e)),0===e.length&&e.push(void 0),s=0;case 6:if(!(s<e.length)){g.next=31;break}c=e[s],u=o?U(r,c):r,l=0;case 10:if(!(l<t.lhs.length)){g.next=28;break}return h=t.lhs[l],g.delegateYield(B(h[0],o?c["@"]:c,u),"t0",13);case 13:if("string"==typeof(f=g.t0)||void 0===f){g.next=16;break}throw{code:"T1003",stack:(new Error).stack,position:t.position,value:f};case 16:if(void 0===f){g.next=25;break}if(d={data:c,exprIndex:l},!i.hasOwnProperty(f)){g.next=24;break}if(i[f].exprIndex===l){g.next=21;break}throw{code:"D1009",stack:(new Error).stack,position:t.position,value:f};case 21:i[f].data=a.append(i[f].data,c),g.next=25;break;case 24:i[f]=d;case 25:l++,g.next=10;break;case 28:s++,g.next=6;break;case 31:g.t1=regeneratorRuntime.keys(i);case 32:if((g.t2=g.t1()).done){g.next=43;break}return f=g.t2.value,d=i[f],p=d.data,u=r,o&&(v=ct(d.data),p=v["@"],delete v["@"],u=U(r,v)),g.delegateYield(B(t.lhs[d.exprIndex][1],p,u),"t3",39);case 39:void 0!==(m=g.t3)&&(n[f]=m),g.next=32;break;case 43:return g.abrupt("return",n);case 44:case"end":return g.stop()}}),g)}function ct(t){if(!Array.isArray(t))return t;var e={};Object.assign(e,t[0]);for(var r=1;r<t.length;r++)for(var n in t[r])e[n]=a.append(e[n],t[r][n]);return e}function ut(t,e){var r;if(void 0!==t&&!Number.isInteger(t))throw{code:"T2003",stack:(new Error).stack,value:t};if(void 0!==e&&!Number.isInteger(e))throw{code:"T2004",stack:(new Error).stack,value:e};if(void 0===t||void 0===e)return r;if(t>e)return r;var n=e-t+1;if(n>1e7)throw{code:"D2014",stack:(new Error).stack,value:n};r=new Array(n);for(var i=t,a=0;i<=e;i++,a++)r[a]=i;return r.sequence=!0,r}function lt(t,e,r){var n;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.delegateYield(B(t.rhs,e,r),"t0",1);case 1:return n=i.t0,r.bind(t.lhs.value,n),i.abrupt("return",n);case 4:case"end":return i.stop()}}),v)}function ht(t,e,r){var n,i;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.delegateYield(B(t.condition,e,r),"t0",1);case 1:if(i=o.t0,!a.boolean(i)){o.next=7;break}return o.delegateYield(B(t.then,e,r),"t1",4);case 4:n=o.t1,o.next=10;break;case 7:if(void 0===t.else){o.next=10;break}return o.delegateYield(B(t.else,e,r),"t2",9);case 9:n=o.t2;case 10:return o.abrupt("return",n);case 11:case"end":return o.stop()}}),m)}function ft(t,e,r){var n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:i=Ct(r),a=0;case 2:if(!(a<t.expressions.length)){o.next=8;break}return o.delegateYield(B(t.expressions[a],e,i),"t0",4);case 4:n=o.t0;case 5:a++,o.next=2;break;case 8:return o.abrupt("return",n);case 9:case"end":return o.stop()}}),y)}function dt(t){var e=new Lt.RegexEngine(t.value),r=function r(n,i){var a;e.lastIndex=i||0;var o=e.exec(n);if(null!==o){if(a={match:o[0],start:o.index,end:o.index+o[0].length,groups:[]},o.length>1)for(var s=1;s<o.length;s++)a.groups.push(o[s]);a.next=function(){if(!(e.lastIndex>=n.length)){var i=r(n,e.lastIndex);if(i&&""===i.match)throw{code:"D1004",stack:(new Error).stack,position:t.position,value:t.value.source};return i}}}return a};return r}function pt(t,e,r){return""===t.value?e&&e.outerWrapper?e[0]:e:r.lookup(t.value)}function gt(t,e,r){var i,o,s,c,u;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return o=e,s=!!e.tupleStream,c=regeneratorRuntime.mark((function e(i,a){var o,c,u,l,h,f,d,p,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=0,c=0;case 2:if(!(0===o&&c<t.terms.length)){e.next=35;break}return u=t.terms[c],l=i,h=r,s&&(l=i["@"],h=U(r,i)),e.delegateYield(B(u.expression,l,h),"t0",8);case 8:return f=e.t0,l=a,h=r,s&&(l=a["@"],h=U(r,a)),e.delegateYield(B(u.expression,l,h),"t1",13);case 13:if(d=e.t1,p=n(f),g=n(d),"undefined"!==p){e.next=19;break}return o="undefined"===g?0:1,e.abrupt("continue",32);case 19:if("undefined"!==g){e.next=22;break}return o=-1,e.abrupt("continue",32);case 22:if(!("string"!==p&&"number"!==p||"string"!==g&&"number"!==g)){e.next=24;break}throw{code:"T2008",stack:(new Error).stack,position:t.position,value:"string"!==p&&"number"!==p?f:d};case 24:if(p===g){e.next=26;break}throw{code:"T2007",stack:(new Error).stack,position:t.position,value:f,value2:d};case 26:if(f!==d){e.next=30;break}return e.abrupt("continue",32);case 30:o=f<d?-1:1;case 31:!0===u.descending&&(o=-o);case 32:c++,e.next=2;break;case 35:return e.abrupt("return",1===o);case 36:case"end":return e.stop()}}),e)})),u={environment:r,input:e},l.delegateYield(a.sort.apply(u,[o,c]),"t0",5);case 5:return i=l.t0,l.abrupt("return",i);case 7:case"end":return l.stop()}}),b)}function vt(t,e,r){var i=regeneratorRuntime.mark((function e(i){var a,o,s,c,u,l,h,f,d,p,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==i){e.next=2;break}return e.abrupt("return",void 0);case 2:if(a=r.lookup("clone"),C(a)){e.next=5;break}throw{code:"T2013",stack:(new Error).stack,position:t.position};case 5:return e.delegateYield(xt(a,[i],null,r),"t0",6);case 6:return o=e.t0,e.delegateYield(B(t.pattern,o,r),"t1",8);case 8:if(void 0===(s=e.t1)){e.next=33;break}Array.isArray(s)||(s=[s]),c=0;case 12:if(!(c<s.length)){e.next=33;break}return u=s[c],e.delegateYield(B(t.update,u,r),"t2",15);case 15:if(l=e.t2,"undefined"===(h=n(l))){e.next=21;break}if("object"===h&&null!==l&&!Array.isArray(l)){e.next=20;break}throw{code:"T2011",stack:(new Error).stack,position:t.update.position,value:l};case 20:for(f in l)u[f]=l[f];case 21:if(void 0===t.delete){e.next=30;break}return e.delegateYield(B(t.delete,u,r),"t3",23);case 23:if(void 0===(d=e.t3)){e.next=30;break}if(p=d,Array.isArray(d)||(d=[d]),P(d)){e.next=29;break}throw{code:"T2012",stack:(new Error).stack,position:t.delete.position,value:p};case 29:for(g=0;g<d.length;g++)"object"===n(u)&&null!==u&&delete u[d[g]];case 30:c++,e.next=12;break;case 33:return e.abrupt("return",o);case 34:case"end":return e.stop()}}),e)}));return Ot(i,"<(oa):o>")}var mt=s("function($f, $g) { function($x){ $g($f($x)) } }");function yt(t,e,r){var n,i,a,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.delegateYield(B(t.lhs,e,r),"t0",1);case 1:if(i=s.t0,"function"!==t.rhs.type){s.next=7;break}return s.delegateYield(bt(t.rhs,e,r,{context:i}),"t1",4);case 4:n=s.t1,s.next=20;break;case 7:return s.delegateYield(B(t.rhs,e,r),"t2",8);case 8:if(a=s.t2,C(a)){s.next=11;break}throw{code:"T2006",stack:(new Error).stack,position:t.position,value:a};case 11:if(!C(i)){s.next=18;break}return s.delegateYield(B(mt,null,r),"t3",13);case 13:return o=s.t3,s.delegateYield(xt(o,[i,a],null,r),"t4",15);case 15:n=s.t4,s.next=20;break;case 18:return s.delegateYield(xt(a,[i],null,r),"t5",19);case 19:n=s.t5;case 20:return s.abrupt("return",n);case 21:case"end":return s.stop()}}),x)}function bt(t,e,r,i){var a,o,s,c,u,l;return regeneratorRuntime.wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return h.delegateYield(B(t.procedure,e,r),"t0",1);case 1:if(void 0!==(o=h.t0)||"path"!==t.procedure.type||!r.lookup(t.procedure.steps[0].value)){h.next=4;break}throw{code:"T1005",stack:(new Error).stack,position:t.position,token:t.procedure.steps[0].value};case 4:s=[],void 0!==i&&s.push(i.context),c=regeneratorRuntime.mark((function n(){var i,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.delegateYield(B(t.arguments[u],e,r),"t0",1);case 1:i=n.t0,C(i)?(a=regeneratorRuntime.mark((function t(){var e,n,a,o=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=o.length,n=new Array(e),a=0;a<e;a++)n[a]=o[a];return t.delegateYield(xt(i,n,null,r),"t0",2);case 2:return t.abrupt("return",t.t0);case 3:case"end":return t.stop()}}),t)})),a.arity=L(i),s.push(a)):s.push(i);case 3:case"end":return n.stop()}}),n)})),u=0;case 8:if(!(u<t.arguments.length)){h.next=13;break}return h.delegateYield(c(),"t1",10);case 10:u++,h.next=8;break;case 13:return l="path"===t.procedure.type?t.procedure.steps[0].value:t.procedure.value,h.prev=14,"object"===n(o)&&(o.token=l,o.position=t.position),h.delegateYield(xt(o,s,e,r),"t2",17);case 17:a=h.t2,h.next=25;break;case 20:throw h.prev=20,h.t3=h.catch(14),h.t3.position||(h.t3.position=t.position),h.t3.token||(h.t3.token=l),h.t3;case 25:return h.abrupt("return",a);case 26:case"end":return h.stop()}}),w,null,[[14,20]])}function xt(t,e,r,n){var i,a,o,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.delegateYield(wt(t,e,r,n),"t0",1);case 1:i=c.t0;case 2:if(!j(i)||!0!==i.thunk){c.next=21;break}return c.delegateYield(B(i.body.procedure,i.input,i.environment),"t1",4);case 4:a=c.t1,"variable"===i.body.procedure.type&&(a.token=i.body.procedure.value),a.position=i.body.procedure.position,o=[],s=0;case 9:if(!(s<i.body.arguments.length)){c.next=17;break}return c.t2=o,c.delegateYield(B(i.body.arguments[s],i.input,i.environment),"t3",12);case 12:c.t4=c.t3,c.t2.push.call(c.t2,c.t4);case 14:s++,c.next=9;break;case 17:return c.delegateYield(wt(a,o,r,n),"t5",18);case 18:i=c.t5,c.next=2;break;case 21:return c.abrupt("return",i);case 22:case"end":return c.stop()}}),A)}function wt(t,e,r,n){var i,a,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(s.prev=0,a=e,t&&(a=kt(t.signature,e,r)),!j(t)){s.next=8;break}return s.delegateYield(Et(t,a),"t0",5);case 5:i=s.t0,s.next=24;break;case 8:if(!t||!0!==t._jsonata_function){s.next=16;break}if(o={environment:n,input:r},i=t.implementation.apply(o,a),!D(i)){s.next=14;break}return s.delegateYield(i,"t1",13);case 13:i=s.t1;case 14:s.next=24;break;case 16:if("function"!=typeof t){s.next=23;break}if(i=t.apply(r,a),!D(i)){s.next=21;break}return s.delegateYield(i,"t2",20);case 20:i=s.t2;case 21:s.next=24;break;case 23:throw{code:"T1006",stack:(new Error).stack};case 24:s.next=30;break;case 26:throw s.prev=26,s.t3=s.catch(0),t&&(void 0===s.t3.token&&void 0!==t.token&&(s.t3.token=t.token),s.t3.position=t.position),s.t3;case 30:return s.abrupt("return",i);case 31:case"end":return s.stop()}}),_,null,[[0,26]])}function At(t,e,r){var n={_jsonata_lambda:!0,input:e,environment:r,arguments:t.arguments,signature:t.signature,body:t.body};return!0===t.thunk&&(n.thunk=!0),n.apply=regeneratorRuntime.mark((function t(r,i){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(xt(n,i,e,r.environment),"t0",1);case 1:return t.abrupt("return",t.t0);case 2:case"end":return t.stop()}}),t)})),n}function _t(t,e,r){var n,i,a,o,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:i=[],a=0;case 2:if(!(a<t.arguments.length)){c.next=15;break}if("operator"!==(o=t.arguments[a]).type||"?"!==o.value){c.next=8;break}i.push(o),c.next=12;break;case 8:return c.t0=i,c.delegateYield(B(o,e,r),"t1",10);case 10:c.t2=c.t1,c.t0.push.call(c.t0,c.t2);case 12:a++,c.next=2;break;case 15:return c.delegateYield(B(t.procedure,e,r),"t3",16);case 16:if(void 0!==(s=c.t3)||"path"!==t.procedure.type||!r.lookup(t.procedure.steps[0].value)){c.next=19;break}throw{code:"T1007",stack:(new Error).stack,position:t.position,token:t.procedure.steps[0].value};case 19:if(!j(s)){c.next=23;break}n=St(s,i),c.next=32;break;case 23:if(!s||!0!==s._jsonata_function){c.next=27;break}n=Mt(s.implementation,i),c.next=32;break;case 27:if("function"!=typeof s){c.next=31;break}n=Mt(s,i),c.next=32;break;case 31:throw{code:"T1008",stack:(new Error).stack,position:t.position,token:"path"===t.procedure.type?t.procedure.steps[0].value:t.procedure.value};case 32:return c.abrupt("return",n);case 33:case"end":return c.stop()}}),k)}function kt(t,e,r){return void 0===t?e:t.validate(e,r)}function Et(t,e){var r,n;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(n=Ct(t.environment),t.arguments.forEach((function(t,r){n.bind(t.value,e[r])})),"function"!=typeof t.body){i.next=7;break}return i.delegateYield(Tt(t.body,n),"t0",4);case 4:r=i.t0,i.next=9;break;case 7:return i.delegateYield(B(t.body,t.input,n),"t1",8);case 8:r=i.t1;case 9:return i.abrupt("return",r);case 10:case"end":return i.stop()}}),E)}function St(t,e){var r=Ct(t.environment),n=[];return t.arguments.forEach((function(t,i){var a=e[i];a&&"operator"===a.type&&"?"===a.value?n.push(t):r.bind(t.value,a)})),{_jsonata_lambda:!0,input:t.input,environment:r,arguments:n,body:t.body}}function Mt(t,e){var r=Pt(t),n="function("+(r=r.map((function(t){return"$"+t.trim()}))).join(", ")+"){ _ }",i=s(n);return i.body=t,St(i,e)}function Tt(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(r=Pt(t),n=r.map((function(t){return e.lookup(t.trim())})),i={environment:e},a=t.apply(i,n),!D(a)){o.next=7;break}return o.delegateYield(a,"t0",6);case 6:a=o.t0;case 7:return o.abrupt("return",a);case 8:case"end":return o.stop()}}),S)}function Pt(t){var e=t.toString();return/\(([^)]*)\)/.exec(e)[1].split(",")}function Ot(t,e){var r={_jsonata_function:!0,implementation:t};return void 0!==e&&(r.signature=c(e)),r}function It(t,e){var r,n,i;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(void 0!==t){a.next=2;break}return a.abrupt("return",void 0);case 2:r=this.input,void 0!==e&&(r=e,Array.isArray(r)&&!R(r)&&((r=I(r)).outerWrapper=!0)),a.prev=4,n=s(t,!1),a.next=12;break;case 8:throw a.prev=8,a.t0=a.catch(4),Dt(a.t0),{stack:(new Error).stack,code:"D3120",value:a.t0.message,error:a.t0};case 12:return a.prev=12,a.delegateYield(B(n,r,this.environment),"t1",14);case 14:i=a.t1,a.next=21;break;case 17:throw a.prev=17,a.t2=a.catch(12),Dt(a.t2),{stack:(new Error).stack,code:"D3121",value:a.t2.message,error:a.t2};case 21:return a.abrupt("return",i);case 22:case"end":return a.stop()}}),M,this,[[4,8],[12,17]])}function Rt(t){if(void 0!==t)return JSON.parse(a.string(t))}function Ct(t){var e={};return{bind:function(t,r){e[t]=r},lookup:function(r){var n;return e.hasOwnProperty(r)?n=e[r]:t&&(n=t.lookup(r)),n},timestamp:t?t.timestamp:null,async:!!t&&t.async,global:t?t.global:{ancestry:[null]}}}F.bind("sum",Ot(a.sum,"<a<n>:n>")),F.bind("count",Ot(a.count,"<a:n>")),F.bind("max",Ot(a.max,"<a<n>:n>")),F.bind("min",Ot(a.min,"<a<n>:n>")),F.bind("average",Ot(a.average,"<a<n>:n>")),F.bind("string",Ot(a.string,"<x-b?:s>")),F.bind("substring",Ot(a.substring,"<s-nn?:s>")),F.bind("substringBefore",Ot(a.substringBefore,"<s-s:s>")),F.bind("substringAfter",Ot(a.substringAfter,"<s-s:s>")),F.bind("lowercase",Ot(a.lowercase,"<s-:s>")),F.bind("uppercase",Ot(a.uppercase,"<s-:s>")),F.bind("length",Ot(a.length,"<s-:n>")),F.bind("trim",Ot(a.trim,"<s-:s>")),F.bind("pad",Ot(a.pad,"<s-ns?:s>")),F.bind("match",Ot(a.match,"<s-f<s:o>n?:a<o>>")),F.bind("contains",Ot(a.contains,"<s-(sf):b>")),F.bind("replace",Ot(a.replace,"<s-(sf)(sf)n?:s>")),F.bind("split",Ot(a.split,"<s-(sf)n?:a<s>>")),F.bind("join",Ot(a.join,"<a<s>s?:s>")),F.bind("formatNumber",Ot(a.formatNumber,"<n-so?:s>")),F.bind("formatBase",Ot(a.formatBase,"<n-n?:s>")),F.bind("formatInteger",Ot(i.formatInteger,"<n-s:s>")),F.bind("parseInteger",Ot(i.parseInteger,"<s-s:n>")),F.bind("number",Ot(a.number,"<(nsb)-:n>")),F.bind("floor",Ot(a.floor,"<n-:n>")),F.bind("ceil",Ot(a.ceil,"<n-:n>")),F.bind("round",Ot(a.round,"<n-n?:n>")),F.bind("abs",Ot(a.abs,"<n-:n>")),F.bind("sqrt",Ot(a.sqrt,"<n-:n>")),F.bind("power",Ot(a.power,"<n-n:n>")),F.bind("random",Ot(a.random,"<:n>")),F.bind("boolean",Ot(a.boolean,"<x-:b>")),F.bind("not",Ot(a.not,"<x-:b>")),F.bind("map",Ot(a.map,"<af>")),F.bind("zip",Ot(a.zip,"<a+>")),F.bind("filter",Ot(a.filter,"<af>")),F.bind("single",Ot(a.single,"<af?>")),F.bind("reduce",Ot(a.foldLeft,"<afj?:j>")),F.bind("sift",Ot(a.sift,"<o-f?:o>")),F.bind("keys",Ot(a.keys,"<x-:a<s>>")),F.bind("lookup",Ot(a.lookup,"<x-s:x>")),F.bind("append",Ot(a.append,"<xx:a>")),F.bind("exists",Ot(a.exists,"<x:b>")),F.bind("spread",Ot(a.spread,"<x-:a<o>>")),F.bind("merge",Ot(a.merge,"<a<o>:o>")),F.bind("reverse",Ot(a.reverse,"<a:a>")),F.bind("each",Ot(a.each,"<o-f:a>")),F.bind("error",Ot(a.error,"<s?:x>")),F.bind("assert",Ot(a.assert,"<bs?:x>")),F.bind("type",Ot(a.type,"<x:s>")),F.bind("sort",Ot(a.sort,"<af?:a>")),F.bind("shuffle",Ot(a.shuffle,"<a:a>")),F.bind("distinct",Ot(a.distinct,"<x:x>")),F.bind("base64encode",Ot(a.base64encode,"<s-:s>")),F.bind("base64decode",Ot(a.base64decode,"<s-:s>")),F.bind("encodeUrlComponent",Ot(a.encodeUrlComponent,"<s-:s>")),F.bind("encodeUrl",Ot(a.encodeUrl,"<s-:s>")),F.bind("decodeUrlComponent",Ot(a.decodeUrlComponent,"<s-:s>")),F.bind("decodeUrl",Ot(a.decodeUrl,"<s-:s>")),F.bind("eval",Ot(It,"<sx?:x>")),F.bind("toMillis",Ot(i.toMillis,"<s-s?:n>")),F.bind("fromMillis",Ot(i.fromMillis,"<n-s?s?:s>")),F.bind("clone",Ot(Rt,"<(oa)-:o>"));var jt={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e6. Attempted to allocate {{value}}.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function Dt(t){var e=jt[t.code];if(void 0!==e){var r=e.replace(/\{\{\{([^}]+)}}}/g,(function(){return t[arguments[1]]}));r=r.replace(/\{\{([^}]+)}}/g,(function(){return JSON.stringify(t[arguments[1]])})),t.message=r}}function Lt(t,e){var r,n;try{r=s(t,e&&e.recover),n=r.errors,delete r.errors}catch(t){throw Dt(t),t}var a=Ct(F),o=new Date;return a.bind("now",Ot((function(t,e){return i.fromMillis(o.getTime(),t,e)}),"<s?s?:s>")),a.bind("millis",Ot((function(){return o.getTime()}),"<:n>")),e&&e.RegexEngine?Lt.RegexEngine=e.RegexEngine:Lt.RegexEngine=RegExp,{evaluate:function(t,e,i){if(void 0!==n){var s={code:"S0500",position:0};throw Dt(s),s}var c,u,l;if(void 0!==e)for(var h in c=Ct(a),e)c.bind(h,e[h]);else c=a;if(c.bind("$",t),o=new Date,c.timestamp=o,Array.isArray(t)&&!R(t)&&((t=I(t)).outerWrapper=!0),"function"==typeof i){c.async=!0;var f=function(t){Dt(t),i(t,null)},d=function t(e){(u=l.next(e)).done?i(null,u.value):u.value.then(t).catch(f)};l=B(r,t,c),(u=l.next()).value.then(d).catch(f)}else try{for(l=B(r,t,c),u=l.next();!u.done;)u=l.next(u.value);return u.value}catch(s){throw Dt(s),s}},assign:function(t,e){a.bind(t,e)},registerFunction:function(t,e,r){var n=Ot(e,r);a.bind(t,n)},ast:function(){return r},errors:function(){return n}}}return Lt.parser=s,Lt}();e.exports=u},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,e,r){var n=t("./signature"),i=function(){var t={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},e={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},r=function(r){var n=0,i=r.length,a=function(t,e){return{type:t,value:e,position:n}},o=function(){for(var t,e,a=n,o=0;n<i;){var s=r.charAt(n);if("/"===s&&"\\"!==r.charAt(n-1)&&0===o){if(""===(t=r.substring(a,n)))throw{code:"S0301",stack:(new Error).stack,position:n};for(n++,s=r.charAt(n),a=n;"i"===s||"m"===s;)n++,s=r.charAt(n);return e=r.substring(a,n)+"g",new RegExp(t,e)}"("!==s&&"["!==s&&"{"!==s||"\\"===r.charAt(n-1)||o++,")"!==s&&"]"!==s&&"}"!==s||"\\"===r.charAt(n-1)||o--,n++}throw{code:"S0302",stack:(new Error).stack,position:n}},s=function s(c){if(n>=i)return null;for(var u=r.charAt(n);n<i&&" \t\n\r\v".indexOf(u)>-1;)n++,u=r.charAt(n);if("/"===u&&"*"===r.charAt(n+1)){var l=n;for(n+=2,u=r.charAt(n);"*"!==u||"/"!==r.charAt(n+1);)if(u=r.charAt(++n),n>=i)throw{code:"S0106",stack:(new Error).stack,position:l};return n+=2,u=r.charAt(n),s(c)}if(!0!==c&&"/"===u)return n++,a("regex",o());if("."===u&&"."===r.charAt(n+1))return n+=2,a("operator","..");if(":"===u&&"="===r.charAt(n+1))return n+=2,a("operator",":=");if("!"===u&&"="===r.charAt(n+1))return n+=2,a("operator","!=");if(">"===u&&"="===r.charAt(n+1))return n+=2,a("operator",">=");if("<"===u&&"="===r.charAt(n+1))return n+=2,a("operator","<=");if("*"===u&&"*"===r.charAt(n+1))return n+=2,a("operator","**");if("~"===u&&">"===r.charAt(n+1))return n+=2,a("operator","~>");if(Object.prototype.hasOwnProperty.call(t,u))return n++,a("operator",u);if('"'===u||"'"===u){var h=u;n++;for(var f="";n<i;){if("\\"===(u=r.charAt(n)))if(n++,u=r.charAt(n),Object.prototype.hasOwnProperty.call(e,u))f+=e[u];else{if("u"!==u)throw{code:"S0103",stack:(new Error).stack,position:n,token:u};var d=r.substr(n+1,4);if(!/^[0-9a-fA-F]+$/.test(d))throw{code:"S0104",stack:(new Error).stack,position:n};var p=parseInt(d,16);f+=String.fromCharCode(p),n+=4}else{if(u===h)return n++,a("string",f);f+=u}n++}throw{code:"S0101",stack:(new Error).stack,position:n}}var g,v=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/.exec(r.substring(n));if(null!==v){var m=parseFloat(v[0]);if(!isNaN(m)&&isFinite(m))return n+=v[0].length,a("number",m);throw{code:"S0102",stack:(new Error).stack,position:n,token:v[0]}}if("`"===u){n++;var y=r.indexOf("`",n);if(-1!==y)return g=r.substring(n,y),n=y+1,a("name",g);throw n=i,{code:"S0105",stack:(new Error).stack,position:n}}for(var b,x=n;;)if(b=r.charAt(x),x===i||" \t\n\r\v".indexOf(b)>-1||Object.prototype.hasOwnProperty.call(t,b)){if("$"===r.charAt(n))return g=r.substring(n+1,x),n=x,a("variable",g);switch(g=r.substring(n,x),n=x,g){case"or":case"in":case"and":return a("operator",g);case"true":return a("value",!0);case"false":return a("value",!1);case"null":return a("value",null);default:return n===i&&""===g?null:a("name",g)}}else x++};return s},i=function(e,i){var a,o,s={},c=[],u=function(){var t=[];"(end)"!==a.id&&t.push({type:a.type,value:a.value,position:a.position});for(var e=o();null!==e;)t.push(e),e=o();return t},l={nud:function(){var t={code:"S0211",token:this.value,position:this.position};if(i)return t.remaining=u(),t.type="error",c.push(t),t;throw t.stack=(new Error).stack,t}},h=function(t,e){var r=s[t];return e=e||0,r?e>=r.lbp&&(r.lbp=e):((r=Object.create(l)).id=r.value=t,r.lbp=e,s[t]=r),r},f=function(t){if(i){t.remaining=u(),c.push(t);var e=s["(error)"];return(a=Object.create(e)).error=t,a.type="(error)",a}throw t.stack=(new Error).stack,t},d=function(t,r){if(t&&a.id!==t){var n={code:"(end)"===a.id?"S0203":"S0202",position:a.position,token:a.value,value:t};return f(n)}var i=o(r);if(null===i)return(a=s["(end)"]).position=e.length,a;var c,u=i.value,l=i.type;switch(l){case"name":case"variable":c=s["(name)"];break;case"operator":if(!(c=s[u]))return f({code:"S0204",stack:(new Error).stack,position:i.position,token:u});break;case"string":case"number":case"value":c=s["(literal)"];break;case"regex":l="regex",c=s["(regex)"];break;default:return f({code:"S0205",stack:(new Error).stack,position:i.position,token:u})}return(a=Object.create(c)).value=u,a.type=l,a.position=i.position,a},p=function(t){var e,r=a;for(d(null,!0),e=r.nud();t<a.lbp;)r=a,d(),e=r.led(e);return e},g=function(t){h(t,0).nud=function(){return this}},v=function(e,r,n){var i=r||t[e],a=h(e,i);return a.led=n||function(t){return this.lhs=t,this.rhs=p(i),this.type="binary",this},a},m=function(t,e,r){var n=h(t,e);return n.led=r,n},y=function(t,e){var r=h(t);return r.nud=e||function(){return this.expression=p(70),this.type="unary",this},r};g("(end)"),g("(name)"),g("(literal)"),g("(regex)"),h(":"),h(";"),h(","),h(")"),h("]"),h("}"),h(".."),v("."),v("+"),v("-"),v("*"),v("/"),v("%"),v("="),v("<"),v(">"),v("!="),v("<="),v(">="),v("&"),v("and"),v("or"),v("in"),g("and"),g("or"),g("in"),y("-"),v("~>"),m("(error)",10,(function(t){return this.lhs=t,this.error=a.error,this.remaining=u(),this.type="error",this})),y("*",(function(){return this.type="wildcard",this})),y("**",(function(){return this.type="descendant",this})),y("%",(function(){return this.type="parent",this})),v("(",t["("],(function(t){if(this.procedure=t,this.type="function",this.arguments=[],")"!==a.id)for(;"operator"===a.type&&"?"===a.id?(this.type="partial",this.arguments.push(a),d("?")):this.arguments.push(p(0)),","===a.id;)d(",");if(d(")",!0),"name"===t.type&&("function"===t.value||"λ"===t.value)){if(this.arguments.forEach((function(t,e){if("variable"!==t.type)return f({code:"S0208",stack:(new Error).stack,position:t.position,token:t.value,value:e+1})})),this.type="lambda","<"===a.id){for(var e=a.position,r=1,i="<";r>0&&"{"!==a.id&&"(end)"!==a.id;){var o=d();">"===o.id?r--:"<"===o.id&&r++,i+=o.value}d(">");try{this.signature=n(i)}catch(t){return t.position=e+t.offset,f(t)}}d("{"),this.body=p(0),d("}")}return this})),y("(",(function(){for(var t=[];")"!==a.id&&(t.push(p(0)),";"===a.id);)d(";");return d(")",!0),this.type="block",this.expressions=t,this})),y("[",(function(){var t=[];if("]"!==a.id)for(;;){var e=p(0);if(".."===a.id){var r={type:"binary",value:"..",position:a.position,lhs:e};d(".."),r.rhs=p(0),e=r}if(t.push(e),","!==a.id)break;d(",")}return d("]",!0),this.expressions=t,this.type="unary",this})),v("[",t["["],(function(e){if("]"===a.id){for(var r=e;r&&"binary"===r.type&&"["===r.value;)r=r.lhs;return r.keepArray=!0,d("]"),e}return this.lhs=e,this.rhs=p(t["]"]),this.type="binary",d("]",!0),this})),v("^",t["^"],(function(t){d("(");for(var e=[];;){var r={descending:!1};if("<"===a.id?d("<"):">"===a.id&&(r.descending=!0,d(">")),r.expression=p(0),e.push(r),","!==a.id)break;d(",")}return d(")"),this.lhs=t,this.rhs=e,this.type="binary",this}));var b=function(t){var e=[];if("}"!==a.id)for(;;){var r=p(0);d(":");var n=p(0);if(e.push([r,n]),","!==a.id)break;d(",")}return d("}",!0),void 0===t?(this.lhs=e,this.type="unary"):(this.lhs=t,this.rhs=e,this.type="binary"),this};y("{",b),v("{",t["{"],b),m(":=",t[":="],(function(e){return"variable"!==e.type?f({code:"S0212",stack:(new Error).stack,position:e.position,token:e.value}):(this.lhs=e,this.rhs=p(t[":="]-1),this.type="binary",this)})),v("@",t["@"],(function(e){return this.lhs=e,this.rhs=p(t["@"]),"variable"!==this.rhs.type?f({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)})),v("#",t["#"],(function(e){return this.lhs=e,this.rhs=p(t["#"]),"variable"!==this.rhs.type?f({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)})),v("?",t["?"],(function(t){return this.type="condition",this.condition=t,this.then=p(0),":"===a.id&&(d(":"),this.else=p(0)),this})),y("|",(function(){return this.type="transform",this.pattern=p(0),d("|"),this.update=p(0),","===a.id&&(d(","),this.delete=p(0)),d("|"),this}));var x=function t(e){var r;if("function"!==e.type||e.predicate)if("condition"===e.type)e.then=t(e.then),void 0!==e.else&&(e.else=t(e.else)),r=e;else if("block"===e.type){var n=e.expressions.length;n>0&&(e.expressions[n-1]=t(e.expressions[n-1])),r=e}else r=e;else{var i={type:"lambda",thunk:!0,arguments:[],position:e.position};i.body=e,r=i}return r},w=0,A=0,_=[],k=function t(e,r){switch(e.type){case"name":case"wildcard":r.level--,0===r.level&&(void 0===e.ancestor||(_[r.index].slot.label=e.ancestor.label),e.ancestor=r,e.tuple=!0);break;case"parent":r.level++;break;case"block":e.expressions.length>0&&(e.tuple=!0,r=t(e.expressions[e.expressions.length-1],r));break;case"path":e.tuple=!0;var n=e.steps.length-1;for(r=t(e.steps[n--],r);r.level>0&&n>=0;)r=t(e.steps[n--],r);break;default:throw{code:"S0217",token:e.type,position:e.position}}return r},E=function(t,e){if(void 0!==e.seekingParent||"parent"===e.type){var r=void 0!==e.seekingParent?e.seekingParent:[];"parent"===e.type&&r.push(e.slot),void 0===t.seekingParent?t.seekingParent=r:Array.prototype.push.apply(t.seekingParent,r)}},S=function(t){var e=t.steps.length-1,r=t.steps[e],n=void 0!==r.seekingParent?r.seekingParent:[];"parent"===r.type&&n.push(r.slot);for(var i=0;i<n.length;i++){var a=n[i];for(e=t.steps.length-2;a.level>0;){if(e<0){void 0===t.seekingParent?t.seekingParent=[a]:t.seekingParent.push(a);break}for(var o=t.steps[e--];e>=0&&o.focus&&t.steps[e].focus;)o=t.steps[e--];a=k(o,a)}}},M=function t(e){var r;switch(e.type){case"binary":switch(e.value){case".":var n=t(e.lhs);r="path"===n.type?n:{type:"path",steps:[n]},"parent"===n.type&&(r.seekingParent=[n.slot]);var a=t(e.rhs);"function"===a.type&&"path"===a.procedure.type&&1===a.procedure.steps.length&&"name"===a.procedure.steps[0].type&&"function"===r.steps[r.steps.length-1].type&&(r.steps[r.steps.length-1].nextFunction=a.procedure.steps[0].value),"path"===a.type?Array.prototype.push.apply(r.steps,a.steps):(void 0!==a.predicate&&(a.stages=a.predicate,delete a.predicate),r.steps.push(a)),r.steps.filter((function(t){if("number"===t.type||"value"===t.type)throw{code:"S0213",stack:(new Error).stack,position:t.position,value:t.value};return"string"===t.type})).forEach((function(t){t.type="name"})),r.steps.filter((function(t){return!0===t.keepArray})).length>0&&(r.keepSingletonArray=!0);var o=r.steps[0];"unary"===o.type&&"["===o.value&&(o.consarray=!0);var s=r.steps[r.steps.length-1];"unary"===s.type&&"["===s.value&&(s.consarray=!0),S(r);break;case"[":var u=r=t(e.lhs),l="predicate";if("path"===r.type&&(u=r.steps[r.steps.length-1],l="stages"),void 0!==u.group)throw{code:"S0209",stack:(new Error).stack,position:e.position};void 0===u[l]&&(u[l]=[]);var h=t(e.rhs);void 0!==h.seekingParent&&(h.seekingParent.forEach((function(t){1===t.level?k(u,t):t.level--})),E(u,h)),u[l].push({type:"filter",expr:h,position:e.position});break;case"{":if(void 0!==(r=t(e.lhs)).group)throw{code:"S0210",stack:(new Error).stack,position:e.position};r.group={lhs:e.rhs.map((function(e){return[t(e[0]),t(e[1])]})),position:e.position};break;case"^":"path"!==(r=t(e.lhs)).type&&(r={type:"path",steps:[r]});var f={type:"sort",position:e.position};f.terms=e.rhs.map((function(e){var r=t(e.expression);return E(f,r),{descending:e.descending,expression:r}})),r.steps.push(f),S(r);break;case":=":(r={type:"bind",value:e.value,position:e.position}).lhs=t(e.lhs),r.rhs=t(e.rhs),E(r,r.rhs);break;case"@":if(r=t(e.lhs),u=r,"path"===r.type&&(u=r.steps[r.steps.length-1]),void 0!==u.stages||void 0!==u.predicate)throw{code:"S0215",stack:(new Error).stack,position:e.position};if("sort"===u.type)throw{code:"S0216",stack:(new Error).stack,position:e.position};e.keepArray&&(u.keepArray=!0),u.focus=e.rhs.value,u.tuple=!0;break;case"#":r=t(e.lhs),u=r,"path"===r.type?u=r.steps[r.steps.length-1]:(r={type:"path",steps:[r]},void 0!==u.predicate&&(u.stages=u.predicate,delete u.predicate)),void 0===u.stages?u.index=e.rhs.value:u.stages.push({type:"index",value:e.rhs.value,position:e.position}),u.tuple=!0;break;case"~>":(r={type:"apply",value:e.value,position:e.position}).lhs=t(e.lhs),r.rhs=t(e.rhs);break;default:(r={type:e.type,value:e.value,position:e.position}).lhs=t(e.lhs),r.rhs=t(e.rhs),E(r,r.lhs),E(r,r.rhs)}break;case"unary":r={type:e.type,value:e.value,position:e.position},"["===e.value?r.expressions=e.expressions.map((function(e){var n=t(e);return E(r,n),n})):"{"===e.value?r.lhs=e.lhs.map((function(e){var n=t(e[0]);E(r,n);var i=t(e[1]);return E(r,i),[n,i]})):(r.expression=t(e.expression),"-"===e.value&&"number"===r.expression.type?(r=r.expression).value=-r.value:E(r,r.expression));break;case"function":case"partial":(r={type:e.type,name:e.name,value:e.value,position:e.position}).arguments=e.arguments.map((function(e){var n=t(e);return E(r,n),n})),r.procedure=t(e.procedure);break;case"lambda":r={type:e.type,arguments:e.arguments,signature:e.signature,position:e.position};var d=t(e.body);r.body=x(d);break;case"condition":(r={type:e.type,position:e.position}).condition=t(e.condition),E(r,r.condition),r.then=t(e.then),E(r,r.then),void 0!==e.else&&(r.else=t(e.else),E(r,r.else));break;case"transform":(r={type:e.type,position:e.position}).pattern=t(e.pattern),r.update=t(e.update),void 0!==e.delete&&(r.delete=t(e.delete));break;case"block":(r={type:e.type,position:e.position}).expressions=e.expressions.map((function(e){var n=t(e);return E(r,n),(n.consarray||"path"===n.type&&n.steps[0].consarray)&&(r.consarray=!0),n}));break;case"name":r={type:"path",steps:[e]},e.keepArray&&(r.keepSingletonArray=!0);break;case"parent":r={type:"parent",slot:{label:"!"+w++,level:1,index:A++}},_.push(r);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":r=e;break;case"operator":if("and"===e.value||"or"===e.value||"in"===e.value)e.type="name",r=t(e);else{if("?"!==e.value)throw{code:"S0201",stack:(new Error).stack,position:e.position,token:e.value};r=e}break;case"error":r=e,e.lhs&&(r=t(e.lhs));break;default:var p="S0206";"(end)"===e.id&&(p="S0207");var g={code:p,position:e.position,token:e.value};if(i)return c.push(g),{type:"error",error:g};throw g.stack=(new Error).stack,g}return e.keepArray&&(r.keepArray=!0),r};o=r(e),d();var T=p(0);if("(end)"!==a.id){var P={code:"S0201",position:a.position,token:a.value};f(P)}if("parent"===(T=M(T)).type||void 0!==T.seekingParent)throw{code:"S0217",token:T.type,position:T.position};return c.length>0&&(T.errors=c),T};return i}();e.exports=i},{"./signature":5}],5:[function(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=t("./utils"),a=function(){var t={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function e(e){for(var r=1,a=[],o={},s=o;r<e.length;){var c=e.charAt(r);if(":"===c)break;var u=function(){a.push(o),s=o,o={}},l=function(t,e,r,n){for(var i=1,a=e;a<t.length;)if(a++,(c=t.charAt(a))===n){if(0==--i)break}else c===r&&i++;return a};switch(c){case"s":case"n":case"b":case"l":case"o":o.regex="["+c+"m]",o.type=c,u();break;case"a":o.regex="[asnblfom]",o.type=c,o.array=!0,u();break;case"f":o.regex="f",o.type=c,u();break;case"j":o.regex="[asnblom]",o.type=c,u();break;case"x":o.regex="[asnblfom]",o.type=c,u();break;case"-":s.context=!0,s.contextRegex=new RegExp(s.regex),s.regex+="?";break;case"?":case"+":s.regex+=c;break;case"(":var h=l(e,r,"(",")"),f=e.substring(r+1,h);if(-1!==f.indexOf("<"))throw{code:"S0402",stack:(new Error).stack,value:f,offset:r};o.regex="["+f+"m]",o.type="("+f+")",r=h,u();break;case"<":if("a"!==s.type&&"f"!==s.type)throw{code:"S0401",stack:(new Error).stack,value:s.type,offset:r};var d=l(e,r,"<",">");s.subtype=e.substring(r+1,d),r=d}r++}var p="^"+a.map((function(t){return"("+t.regex+")"})).join("")+"$",g=new RegExp(p),v=function(t){var e;if(i.isFunction(t))e="f";else switch(n(t)){case"string":e="s";break;case"number":e="n";break;case"boolean":e="b";break;case"object":e=null===t?"l":Array.isArray(t)?"a":"o";break;default:e="m"}return e},m=function(t,e){for(var r="^",n=0,i=0;i<a.length;i++){r+=a[i].regex;var o=e.match(r);if(null===o)throw{code:"T0410",stack:(new Error).stack,value:t[n],index:n+1};n=o[0].length}throw{code:"T0410",stack:(new Error).stack,value:t[n],index:n+1}};return{definition:e,validate:function(e,r){var n="";e.forEach((function(t){n+=v(t)}));var i=g.exec(n);if(i){var o=[],s=0;return a.forEach((function(n,a){var c=e[s],u=i[a+1];if(""===u)if(n.context&&n.contextRegex){var l=v(r);if(!n.contextRegex.test(l))throw{code:"T0411",stack:(new Error).stack,value:r,index:s+1};o.push(r)}else o.push(c),s++;else u.split("").forEach((function(r){if("a"===n.type){if("m"===r)c=void 0;else{c=e[s];var i=!0;if(void 0!==n.subtype)if("a"!==r&&u!==n.subtype)i=!1;else if("a"===r&&c.length>0){var a=v(c[0]);i=a===n.subtype.charAt(0)&&0===c.filter((function(t){return v(t)!==a})).length}if(!i)throw{code:"T0412",stack:(new Error).stack,value:c,index:s+1,type:t[n.subtype]};"a"!==r&&(c=[c])}o.push(c),s++}else o.push(c),s++}))})),o}m(e,n)}}}return e}();e.exports=a},{"./utils":6}],6:[function(t,e,r){function n(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=function(){function t(t){var e=!1;if("number"==typeof t&&(e=!isNaN(t))&&!isFinite(t))throw{code:"D1001",value:t,stack:(new Error).stack};return e}function e(t){var e=!1;return Array.isArray(t)&&(e=0===t.filter((function(t){return"string"!=typeof t})).length),e}function r(e){var r=!1;return Array.isArray(e)&&(r=0===e.filter((function(e){return!t(e)})).length),r}function i(){var t=[];return t.sequence=!0,1===arguments.length&&t.push(arguments[0]),t}function a(t){return!0===t.sequence&&Array.isArray(t)}function s(t){return t&&(!0===t._jsonata_function||!0===t._jsonata_lambda)||"function"==typeof t}function c(t){return"number"==typeof t.arity?t.arity:"function"==typeof t.implementation?t.implementation.length:"number"==typeof t.length?t.length:t.arguments.length}function u(t){return t&&!0===t._jsonata_lambda}var l=("function"==typeof Symbol?Symbol:{}).iterator||"@@iterator";function h(t){return"object"===o(t)&&null!==t&&l in t&&"next"in t&&"function"==typeof t.next}function f(t,e){if(t===e)return!0;if("object"===o(t)&&"object"===o(e)&&null!==t&&null!==e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!f(t[r],e[r]))return!1;return!0}var n=Object.getOwnPropertyNames(t),i=Object.getOwnPropertyNames(e);if(n.length!==i.length)return!1;for(n=n.sort(),i=i.sort(),r=0;r<n.length;r++)if(n[r]!==i[r])return!1;for(r=0;r<n.length;r++){var a=n[r];if(!f(t[a],e[a]))return!1}return!0}return!1}function d(t){var e,r=[],i=n(t);try{for(i.s();!(e=i.n()).done;){var a=e.value;r.push(a)}}catch(t){i.e(t)}finally{i.f()}return r}return{isNumeric:t,isArrayOfStrings:e,isArrayOfNumbers:r,createSequence:i,isSequence:a,isFunction:s,isLambda:u,isIterable:h,getFunctionArity:c,isDeepEqual:f,stringToArray:d}}();e.exports=s},{}]},{},[3])(3)}(U9);var Y9=U9.exports;const G9=function(t){return t};function H9(t){if(!t)return G9;try{var e=Y9(t);return function(t){return e.evaluate(t)}}catch(t){return console.error(t),G9}}function W9(t){var e=i9(t);return null==e?"":String(e)}function q9(t){return Number(i9(t))}function X9(t){return t}function V9(t){return W9(t)}function Q9(t){return q9(t)}function K9(t){if(this.param)return t=W9(t),this.param.hasOwnProperty(t)?this.param[t]:this.param.default}function J9(t){var{param:e}=this;if(e){for(let r in e){let[n,i]=r.split("~"),a=!!n,o=!!i;if(n=parseFloat(n),i=parseFloat(i),t=q9(t),a&&!o&&t>=n)return e[r];if(!a&&o&&t<n)return e[r];if(t>=n&&t<i)return e[r]}return e.default}}function Z9(t){return q9(t)*Math.PI/180}function $9(){}function ttt(t,e,r,n,i){switch(r){case"value":return"text"===i||"string"===i?V9.bind(t):"number"===i?Q9.bind(t):X9.bind(e);case"map":return K9.bind(t);case"range":return J9.bind(t);case"radian":return Z9.bind(t);case"eval":return function(t){try{return new Function("value","targets",t)}catch(t){return v9(t),$9}}(n).bind(e);default:return X9.bind(e)}}class ett{constructor(t,e){this.owner=e,this.model=t}dispose(){delete this._model,delete this.owner,delete this.evaluator,delete this.accessor}get model(){return this._model}set model(t){var{target:e,property:r,rule:n,param:i,accessor:a}=t;this._model=t,this.evaluator=ttt(this,this.owner,n,i,function(t){switch(t){case"ref":case"fillStyle":case"strokeStyle":return"string";default:return}}(r)),this.accessor=H9(a);const o=e.match(/\[(.*?)\]/);if(o){var[s,c]=o[1].split(":");this.propAccessor=H9(s),this.partAccessor=H9(c)}}get target(){return this.model.target}get property(){return this.model.property}get param(){return this.model.param}get ndnsp(){return!!this.model.ndnsp}}function rtt(t=!1){(t||void 0!==this.data)&&this.mappings&&this.mappings.forEach((t=>{try{var{target:e,property:r,accessor:n,propAccessor:i,partAccessor:a}=t,o=n(this.data);if("(root)"==(e=e.trim())||"(key)"==e){if(null==o)return;let e=Object.keys(o||{}).map((t=>this.root.findOrCreate(t))).filter(Boolean);e.length>0&&e.forEach((e=>{let n=t.evaluator(o[e.get("id")],[e]);!r||"(action)"===r||t.ndnsp&&!n&&0!==n&&!1!==n||(e[r]=n)}))}else if(e.startsWith("[")){if(null==o)return;if(o instanceof Array)o.forEach((e=>{let n=i(e);if(n){let i=this.root.findOrCreate(n);if(i){let n=t.evaluator(a(e),[i]);!r||"(action)"===r||t.ndnsp&&!n&&0!==n&&!1!==n||(i[r]=n)}}}));else{if(!(o instanceof Object))throw String("mapping data should be an object to target property-id.("+o+")");{let e=i(o);if(e){let n=this.root.findOrCreate(e);if(n){let e=t.evaluator(a(o),[n]);!r||"(action)"===r||t.ndnsp&&!e&&0!==e&&!1!==e||(n[r]=e)}}}}}else{let n=this.root.findAll(e,this);if(n.length>0){let e=t.evaluator(o,n);!r||"(action)"===r||t.ndnsp&&!e&&0!==e&&!1!==e||n.forEach((t=>t[r]=e))}}}catch(e){v9(e,this,t)}}))}var ntt;function itt(t,e,r,n,i){var{alpha:a=1}=n,o=i.fillStyle;if(t.globalAlpha*=a,o)if("string"==typeof o)t.fillStyle=o,t.fill();else if("object"==typeof o)if("gradient"==o.type){t.translate(r.x,r.y);let n,{width:i,height:a}=e;if("linear"==o.gradientType){let e=3.141592653589793,r=o.rotation;if(r>=.436332&&r<=1.13446||r>=2.00713&&r<=2.70526||r>=3.57792&&r<=4.27606||r>=5.14872&&r<=5.84685){let o=Math.sqrt(Math.pow((i-4)/2,2)+Math.pow((a-4)/2,2));o-=o-(i+a)/3,n=t.createLinearGradient(o*Math.cos(r+e),o*Math.sin(r+e),o*Math.cos(r),o*Math.sin(r))}else n=t.createLinearGradient((i-4)/2*Math.cos(r+e),(a-4)/2*Math.sin(r+e),(i-4)/2*Math.cos(r),(a-4)/2*Math.sin(r))}else if("radial"==o.gradientType){let e=.95*Math.sqrt(Math.pow((i-4)/2,2)+Math.pow((a-4)/2,2));switch(o.center){case"center":default:n=t.createRadialGradient(0,0,0,0,0,e);break;case"left-top":n=t.createRadialGradient(-i/2,-a/2,0,-i/2,-a/2,2*e);break;case"right-top":n=t.createRadialGradient(i/2,-a/2,0,i/2,-a/2,2*e);break;case"left-bottom":n=t.createRadialGradient(-i/2,a/2,0,-i/2,a/2,2*e);break;case"right-bottom":n=t.createRadialGradient(i/2,a/2,0,i/2,a/2,2*e)}}o.colorStops.forEach((t=>{if(t.position>=0&&t.position<=1)try{n.addColorStop(t.position,t.color)}catch(e){m9("Invalid Color for colorstop : ",t.color),n.addColorStop(t.position,"#fff")}})),t.fillStyle=n,t.fill(),t.translate(-r.x,-r.y)}else if("pattern"==o.type&&o.image){i.prepareFillIf(!i._pattern_image_origin);var s=i._pattern_image;if(!s)return;let r=0,n=0,a=0,c=0,u=e.left,l=e.top;if(!o.fitPattern){r=o.offsetX,n=o.offsetY;const t=o.width?o.width:s.width,i=o.height?o.height:s.height;switch(o.align){case"center":a=e.width/2-t/2,c=e.height/2-i/2;break;case"left-top":a=0,c=0;break;case"left-bottom":a=0,c=e.height-i;break;case"right-top":a=e.width-t,c=0;break;case"right-bottom":a=e.width-t,c=e.height-i;break;case"left":a=0,c=e.height/2-i/2;break;case"right":a=e.width-t,c=e.height/2-i/2;break;case"top":a=e.width/2-t/2,c=0;break;case"bottom":a=e.width/2-t/2,c=e.height-i}u+=r+a,l+=n+c}t.translate(u,l),o.color&&(t.fillStyle=o.color,t.fill()),o.fitPattern?Math.abs((s.width-e.width)*(s.height-e.height))>1?(delete i._pattern_image,delete i._pattern_image_origin):t.fillStyle=t.createPattern(s,"no-repeat"):t.fillStyle=t.createPattern(s,o.noRepeat?"no-repeat":"repeat"),t.fill(),t.translate(-u,-l)}}function att(t,e,r){var{strokeStyle:n,lineDash:i,lineWidth:a,lineCap:o,lineJoin:s,alpha:c}=e;if(n&&0!=a){if(o&&(t.lineCap=o),i){var u="round"==o;switch(i){case"solid":i=[0,0];break;case"round-dot":i=u?[0,2*a]:[a,a];break;case"square-dot":i=u?[a,2*a]:[2*a,a];break;case"dash":i=u?[3*a,2.5*a]:[4*a,1.5*a];break;case"dash-dot":i=u?[3*a,3*a,0,3*a]:[4*a,2*a,a,2*a];break;case"long-dash":i=u?[5*a,4*a]:[6*a,3*a];break;case"long-dash-dot":i=u?[5*a,3*a,0,3*a]:[6*a,2*a,a,2*a];break;case"long-dash-dot-dot":i=u?[5*a,2*a,0,2*a,0,2*a]:[6*a,a,a,a,a,a]}t.setLineDash(i)}t.globalAlpha*=c,t.strokeStyle=n,t.lineWidth=a,t.lineJoin=s,t.stroke()}}function ott(t,e,r){if(e.length<2)return e;for(var n=2;n<e.length;n++){var i=e.substring(0,n);if(!(t.measureText(i).width<r))break}return e.substring(0,n-1)}function stt(t,e,r,n){var i=String(e).split("\n");return n?[].concat.apply([],i.map((e=>function(t,e,r){var n,i,a=e.split(" "),o=[],s=[];for(n=0,i=1;i<=a.length;i++)if(s=a.slice(n,i),t.measureText(s.join(" ")).width>r){if(i-n==1){let e=ott(t,s[0],r);o.push([e]),a.splice(n,1,e,s[0].substring(e.length))}else{for(;""==a[i-1];)i++;o.push(a.slice(n,--i))}n=i}return i-n>1&&o.push(s),0==o.length&&o.push([""]),o}(t,e,r)))):i.map((t=>t.split(" ")))}function ctt(t,e,r,n,i,a=0,o=!1,s=!0){a="number"==typeof a?{tl:a,tr:a,br:a,bl:a}:{tl:0,tr:0,br:0,bl:0,...a},t.beginPath(),t.moveTo(e+a.tl,r),t.lineTo(e+n-a.tr,r),t.quadraticCurveTo(e+n,r,e+n,r+a.tr),t.lineTo(e+n,r+i-a.br),t.quadraticCurveTo(e+n,r+i,e+n-a.br,r+i),t.lineTo(e+a.bl,r+i),t.quadraticCurveTo(e,r+i,e,r+i-a.bl),t.lineTo(e,r+a.tl),t.quadraticCurveTo(e,r,e+a.tl,r),t.closePath(),o&&t.fill(),s&&t.stroke()}function utt(t,e,r,n,i){if(!n)return[];t.save(),t.font=r;var a=stt(t,n,e,!!i);return t.restore(),a}function ltt(t){var{fontFamily:e=O9.FONT_FAMILY,bold:r=O9.BOLD,italic:n=O9.ITALIC,fontSize:i=O9.FONT_SIZE}=t,a=[];return r&&a.push("bold"),n&&a.push("italic"),a.push(i+"px"),a.push(e),a.join(" ")}function htt(t,e,r,n){var{alpha:i,fontColor:a=O9.FONT_COLOR,textAlign:o=O9.TEXT_ALIGN,textBaseline:s=O9.TEXT_BASELINE,textBackgroundStyle:c,fontSize:u,lineHeight:l}=n;i||=O9.FONT_COLOR,u||=O9.FONT_SIZE,l||=1.2*u,t.save(),t.beginPath();var{left:h,top:f,width:d,height:p}=e;t.font=ltt(n);var g,v,m=r.length*l;switch(s){case"top":g=f,t.textBaseline="top";break;case"bottom":g=f+p-m+l,t.textBaseline="bottom";break;default:g=f+p/2-m/2+l/2,t.textBaseline="middle"}switch(o){case"left":case"justify":v=h,t.textAlign="left";break;case"right":v=h+d,t.textAlign="right";break;default:v=h+d/2,t.textAlign="center"}t.globalAlpha*=i,t.fillStyle=a,"justify"!=o?r.forEach(((e,r)=>{if(c){t.fillStyle=c;let r=t.measureText(e.join(" "));ctt(t,v-r.actualBoundingBoxLeft-4,g-r.actualBoundingBoxAscent-4,r.actualBoundingBoxLeft+r.actualBoundingBoxRight+8,r.actualBoundingBoxAscent+r.actualBoundingBoxDescent+8,4,!0,!1),t.fillStyle=a}t.fillText(e.join(" "),v,g+r*l)})):r.forEach(((e,r)=>{let n=g+r*l;if(1==e.length){if(c){t.fillStyle=c;let r=t.measureText(e[0]);ctt(t,v-r.actualBoundingBoxLeft-4,n-r.actualBoundingBoxAscent-4,r.actualBoundingBoxLeft+r.actualBoundingBoxRight+8,r.actualBoundingBoxAscent+r.actualBoundingBoxDescent+8,4,!0,!1),t.fillStyle=a}t.fillText(e[0],v,n)}else{let r=e.map((e=>t.measureText(e).width)),i=r.map((t=>t.width)),o=i.reduce(((t,e)=>t+e),0),s=(d-o)/(e.length-1),u=v;e.forEach(((e,o)=>{c&&(t.fillStyle=c,ctt(t,u-r[o].actualBoundingBoxLeft-4,n-r[o].actualBoundingBoxAscent-4,r[o].actualBoundingBoxLeft+r[o].actualBoundingBoxRight+8,r[o].actualBoundingBoxAscent+r[o].actualBoundingBoxDescent+8,4,!0,!1),t.fillStyle=a),t.fillText(e,u,n),u+=i[o]+s}))}})),t.restore()}function ftt(t,e,r={x:0,y:0},n=0,i={x:1,y:1}){return t-=r.x,e-=r.y,{x:(t*Math.cos(-n)-e*Math.sin(-n)+r.x)/i.x,y:(t*Math.sin(-n)+e*Math.cos(-n)+r.y)/i.y}}function dtt(t,e,r={x:0,y:0},n=0,i={x:1,y:1}){return t-=r.x,e-=r.y,{x:(t*Math.cos(n)-e*Math.sin(n)+r.x)*i.x,y:(t*Math.sin(n)+e*Math.cos(n)+r.y)*i.y}}function ptt(t){var e=t.element,r=t.fillStyle,n=e.style;if(r)if("string"==typeof r)n.backgroundColor=r;else switch(r.type){case"pattern":if(n.backgroundImage="url("+r.image+")",n.backgroundColor="transparent",r.fitPattern?n.backgroundSize="100% 100%":r.width||r.height?n.backgroundSize=`${r.width?r.width+"px":"auto"} ${r.height?r.height+"px":"auto"}`:n.backgroundSize="contain",r.fitPattern)n.backgroundRepeat="no-repeat";else{const{offsetX:t,offsetY:e,noRepeat:i,align:a,color:o}=r;if(i&&(n.backgroundRepeat="no-repeat"),o&&(n.backgroundColor=o),a)switch(a){case"center":n.backgroundPosition="center center";break;case"left-top":n.backgroundPosition="left top";break;case"left-bottom":n.backgroundPosition="left bottom";break;case"right-top":n.backgroundPosition="right top";break;case"right-bottom":n.backgroundPosition="right bottom";break;case"left":n.backgroundPosition="left center";break;case"right":n.backgroundPosition="right center";break;case"top":n.backgroundPosition="center top";break;case"bottom":n.backgroundPosition="center bottom"}else t||e?n.backgroundPosition=`${Number(t)||0}px ${Number(e)||0}px`:delete n.backgroundPosition}break;case"gradient":n.background=function(t,e){var r=e.colorStops,n=e.gradientType;if(r instanceof Array&&r.length>0)switch(n){case"radial":return"radial-gradient(farthest-corner at "+function(t,e){var{width:r,height:n}=t.bounds;switch(e){case"center":return[r/2,n/2];case"left-top":return[0,0];case"right-top":return[r,0];case"left-bottom":return[0,n];default:return[r,n]}}(t,e.center||"center").map((t=>t+"px")).join(" ")+","+r.map((t=>`${t.color} ${100*t.position}%`)).join(",")+")";case"linear":return"linear-gradient("+(180*(e.rotation||0)/3.141592653589793+90+"deg")+", "+r.map((t=>`${t.color} ${100*t.position}%`)).join(",")+")"}return""}(t,r)}else n.background="transparent"}ntt="undefined"==typeof document?function(t,e){return new Canvas(t,e)}:function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r};const gtt={x:1,y:1},vtt={x:0,y:0},mtt={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"};function ytt(t){var{id:e,scale:r=gtt,translate:n=vtt,bold:i,italic:a,fontFamily:o="",textAlign:s,textBaseline:c,paddingTop:u,paddingBottom:l,paddingLeft:h,paddingRight:f,fontSize:d=O9.FONT_SIZE,lineWidth:p=0,lineDash:g}=t.state;l||=0,u||=0,h||=0,f||=0;var v=t.state.class;t.text;var{strokeStyle:m,fillStyle:y,rotation:b=0,fontColor:x,hidden:w}=t,{left:A,top:_,width:k,height:E}=t.bounds,S=t.element;S.hidden=w,e&&(S.id=e),v&&(S.className=v),Object.assign(S.style,mtt,{fontFamily:o,fontSize:d+"px",left:A+"px",top:_+"px",width:k+"px",height:E+"px",paddingTop:u+"px",paddingRight:f+"px",paddingBottom:l+"px",paddingLeft:h+"px",border:p+"px",borderColor:m,borderStyle:p>0?g||O9.LINE_DASH:"",color:x,fontWeight:i?"bold":"",fontStyle:a?"italic":"",textAlign:"end"==s?"right":"start"==s?"left":s,verticalAlign:c}),ptt(t),function(t){if(t.isShadowable()&&t.state.shadow){var e=t.element,{left:r=0,top:n=0,blurSize:i=0,color:a="transparent"}=t.state.shadow;e.style.boxShadow=`${r}px ${n}px ${i}px ${a}`}}(t);var M=t.delta(),T=(r&&r.x||1)*M.sx,P=(r&&r.y||1)*M.sy,O=(b||0)+M.theta,I=M.tx||0,R=M.ty||0;["-webkit-","-moz-","-ms-","-o-",""].forEach((t=>{S.style[t+"transform"]=`rotate(${O}rad) translate(${I}px, ${R}px) scale(${T}, ${P}) perspective(1px)`}))}var btt,xtt=[];function wtt(){btt=null;var t=performance.now(),e=(xtt=xtt.filter((t=>Att(t)))).reduce(((e,r)=>{let n=t-r.updatedAt;return n>=r.retention?e.kills.push(r):e.next=0==e.next?r.retention-n:Math.min(e.next,r.retention-n),e}),{next:0,kills:[]});e.kills.forEach((t=>{let e=xtt.indexOf(t);-1!=e?(xtt.splice(e,1),t.removeSelf(!0)):v9("Should not be here. Maybe reentrance problem.")})),e.next>0&&(btt=setTimeout(_tt,Math.max(e.next,500)))}function Att(t){return!t.disposed&&t.retention>0&&!t.isTemplate()&&t.app&&t.app.isViewMode}var _tt=C7((function(){requestAnimationFrame(wtt)}),500);var ktt=new class{add(t){Att(t)&&-1==xtt.indexOf(t)&&(xtt.push(t),t.touch()),this.touch()}remove(t){var e=xtt.indexOf(t);e>0&&xtt.splice(e,1),this.touch()}touch(){null!==btt&&(clearTimeout(btt),btt=null),_tt()}get length(){return xtt.length}};const Ett=function(t){return t};function Stt(t){var e=t.indexOf("||"),r="",n="";-1!=e&&(r=t,n=t.substring(e+2,t.length-1).trim(),t=t.replace(t.substring(e,t.length-1),"").trim());var i=t.substr(2,t.length-3).trim().replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".").filter((t=>!!t.trim())),a=i.slice(1);return{defaultValue:n,match:t,originText:r||t,target:i[0],accessor:a.length>0?function(t){return a.reduce(((t,e)=>t?t[e]:void 0),t)}:Ett}}function Mtt(t,e,r){if(t){var n=r||i9,i=String(t),a=(i.match(/#{[^}]*}/gi)||[]).map((t=>Stt(t))),o=(i.match(/\${[^}]*}/gi)||[]).map((t=>Stt(t)));if(0!=a.length||0!=o.length)return function(){var t=i;return a.forEach((r=>{let i=n(r.accessor(e.getState(r.target)));t=t.replace(r.originText,void 0===i?r.defaultValue||"":i)})),o.forEach((r=>{let i=e.root.findById(r.target),a=n(r.accessor(i&&i.data));t=t.replace(r.originText,void 0===a?r.defaultValue||"":a)})),t}}}const Ttt=210*Math.PI/180,Ptt=150*Math.PI/180;var Ott={"data-spread":function(t,e){var r=!1;e.lineWidth=2,e.strokeStyle="orange";const n=t.root;return t.mappings&&t.mappings.forEach((i=>{let a=n.findAll(i.target,t);a&&a.forEach((n=>{let i=t.center,a=n.center;i=t.transcoordS2C(i.x,i.y,t.rootModel),a=n.transcoordS2C(a.x,a.y,n.rootModel),function(t,e,r,n=10){var i=r.x-e.x,a=r.y-e.y,o=Math.atan2(a,i),s=r.x+n*Math.cos(o+Ttt),c=r.y+n*Math.sin(o+Ttt),u=r.x+n*Math.cos(o+Ptt),l=r.y+n*Math.sin(o+Ptt);t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(r.x,r.y),t.moveTo(r.x,r.y),t.lineTo(s,c),t.moveTo(r.x,r.y),t.lineTo(u,l),t.stroke()}(e,i,a),r=!0}))})),r},decotag:function(t,e){const r=t.decotag;if(r){let{left:n,top:i}=t.bounds,{x:a,y:o}=t.transcoordS2C(n,i,t.rootModel);a=Math.max(a+3,5),o=Math.max(o-8,15),e.font="12px Arial";let s=e.measureText(r);return e.fillStyle="#FF0000",ctt(e,a-s.actualBoundingBoxLeft-3,o-s.actualBoundingBoxAscent-3,s.actualBoundingBoxLeft+s.actualBoundingBoxRight+6,s.actualBoundingBoxAscent+s.actualBoundingBoxDescent+6,3,!0,!1),e.fillStyle="white",e.fillText(r,a,o),!0}return!1},anchors:function(t,e){var r=!1;return t.anchors&&t.anchors.forEach((n=>{const{name:i,position:a}=n;var{x:o,y:s}=a||{};if(!i)return;var{x:o,y:s}=t.transcoordS2C(o,s,t.rootModel);o+=4,s+=4,e.font="12px Arial";let c=e.measureText(i);e.fillStyle="#FF0000",ctt(e,o,s,c.width+6,16,3,!0,!1),e.fillStyle="white",e.fillText(i,o+3,s+13),r=!0})),r},link:function(t,e){var r=!1;if(!t.isLine())return;const{fromEnd:n,toEnd:i}=t;return[n,i].filter(Boolean).forEach((t=>{const{component:n,anchor:i}=t;if(!i)return;const{name:a,position:o}=i||{};if(!a||!o)return;var{x:s,y:c}=o||{},{x:s,y:c}=n.transcoordS2C(s,c,n.rootModel);s+=8,c+=20,e.font="12px Arial";let u=e.measureText(a);e.fillStyle="#FF0000",ctt(e,s-u.actualBoundingBoxLeft-4,c-u.actualBoundingBoxAscent-4,u.actualBoundingBoxLeft+u.actualBoundingBoxRight+8,u.actualBoundingBoxAscent+u.actualBoundingBoxDescent+8,4,!0,!1),e.fillStyle="white",e.fillText(a,s,c),r=!0})),r}};var Itt={};const Rtt={mutable:!1,resizable:!0,rotatable:!0,properties:[],"value-property":"text"},Ctt=[],jtt={theta:0,tx:0,ty:0,sx:1,sy:1,fade:0},Dtt=new WeakMap;var Ltt=0;class ztt{static get nature(){return Rtt}static register(t,e){if(!e)return Itt[t];Itt[t]=e}static get residents(){return Dtt}static registerDecorator(t,e){!function(t,e){Ott[t]=e}(t,e)}constructor(t,e){this._app=e,this._model=t||{},this._state={},this._delta=c7(jtt),e&&this.animation&&(this.animation.started=!0),this.clearCache(),ktt.add(this),Dtt.set(this,Ltt++)}created(){}added(t){}removed(t){}async ready(){if(this.state.persistent){const{isViewMode:t,dataStorage:e}=this.app;t&&(this.data=await e.load(this))}}touch(){this.updatedAt=performance.now()}clearCache(...t){!function(t,...e){0==e.length?t.__cache__={}:e.forEach((e=>delete t.__cache__[e]))}(this,...t)}removeSelf(t){t?this.dispose():this.parent&&this.parent.removeComponent(this)}dispose(){this._animation&&(this._animation.dispose(),delete this._animation),this.disposeMappings(),this.parent&&this.parent.removeComponent(this),delete this._text_substitutor,delete this._value_substitutor,this._disposed=!0,this.retention&&ktt.touch(),this.clearCache(),delete this._app}get nature(){return this.constructor.nature}get disposed(){return!!this._disposed}isLayer(){return!1}isGroup(){return!1}isContainer(){return!1}isLine(){return!1}isRoot(){return!1}isRootModel(){return!1}is3dish(){return!1}isTemplate(){return!!this.get("templatePrefix")}isHTMLElement(){return!1}isConnectable(){return!1}replaceRefids(t){}get retention(){return Number(this.get("retention"))||0}get hasTextProperty(){return!0}get app(){return!this._app&&this.parent&&(this._app=this.parent.app),this._app}get model(){return this._model}get state(){return Object.assign({},this._model,this._state)}get hierarchy(){var t=c7(this._model);return this.volatile.forEach((e=>{delete t[e]})),t}get volatile(){return Ctt}get textHidden(){return!!this._textHidden}set textHidden(t){this._textHidden=!!t,this.invalidate()}get(t){return this._model[t]}set(t,e){if("string"==typeof t)return this.set({[t]:e});var r={},n={},i=!1,a=(t=c7(t),this);return Object.getOwnPropertyNames(t).forEach((function(e){let o=a._model[e],s=t[e];L3(o,s)||(n[e]=o,r[e]=s,a._model[e]=s,delete a._state[e],i=!0)})),i&&(this.clearCache(),r.hasOwnProperty("text")&&delete this._text_substitutor,r.hasOwnProperty("retention")&&ktt.add(this),r.hasOwnProperty("fillStyle")&&this.onchangeFill(r,n),r.hasOwnProperty("mappings")&&this.onchangeMappings(r,n),r.hasOwnProperty("data")&&this.onchangeData(r,n),this.onchange&&this.onchange(r,n),this.trigger("change",r,n)),this}getState(t){return this._state.hasOwnProperty(t)?this._state[t]:this.get(t)}setState(t,e){if("string"==typeof t)return this.setState({[t]:e});var r={},n={},i=!1,a=(t=c7(t),this),o=this.getState("sensitive");return Object.getOwnPropertyNames(t).forEach((function(e){let s=a.getState(e),c=t[e];!o&&L3(s,c)||(n[e]=s,r[e]=c,a._state[e]=c,i=!0)})),i&&(this.clearCache(),r.hasOwnProperty("text")&&delete this._text_substitutor,r.hasOwnProperty("fillStyle")&&this.onchangeFill(r,n),r.hasOwnProperty("data")&&this.onchangeData(r,n),this.onchange&&this.onchange(r,n),this.trigger("change",r,n)),this}get root(){return this.isRoot()?this:this.parent&&this.parent.root}get rootModel(){return this.isRootModel()?this:this.parent&&this.parent.rootModel}get parent(){return this._parent}set parent(t){this._parent=t}get anchors(){return this.nature.anchors||[]}findAnchor(t){return this.anchors.find((e=>e.name===t))}isDescendible(t){return!0}getContext(){return this._parent.getContext()}get center(){var t=this.bounds;return{x:t.left+t.width/2,y:t.top+t.height/2}}set center(t){if(t&&!isNaN(t.x)&&!isNaN(t.y)){var e=this.center;if(Math.round(100*t.x)/100!=Math.round(100*e.x)/100||Math.round(100*t.y)/100!=Math.round(100*e.y)/100){var r=t.x-e.x,n=t.y-e.y;this.path=this.path.map((t=>({x:t.x+r,y:t.y+n})))}}}get location(){return this.center}set location(t){this.center=t}get rotate(){const{rotationX:t,rotationY:e,rotation:r}=this.state;return{x:t,y:e,z:-r}}set rotate(t){const{x:e,y:r,z:n}=t;this.setState({rotationX:e,rotationY:r,rotation:-n})}get dimension(){const{width:t,height:e}=this.bounds,{depth:r}=this.state;return{width:t,height:e,depth:r}}set dimension(t){const{width:e,height:r,depth:n}=t,{top:i,left:a}=this.bounds;this.bounds={top:i,left:a,width:e,height:r},this.setState("depth",n)}get bounds(){var t,e,r,n,i=this.path;t=e=i[0].x,r=n=i[0].y;for(let a=1;a<i.length;a++){let o=i[a];o.x<t?t=o.x:o.x>e&&(e=o.x),o.y<r?r=o.y:o.y>n&&(n=o.y)}return{left:t,top:r,width:e-t,height:n-r}}set bounds(t){var e=this.bounds;if(Math.round(100*t.width)/100!=Math.round(100*e.width)/100||Math.round(100*t.height)/100!=Math.round(100*e.height)/100||Math.round(100*t.left)/100!=Math.round(100*e.left)/100||Math.round(100*t.top)/100!=Math.round(100*e.top)/100){var r=0==e.width?1:t.width/e.width,n=0==e.height?1:t.height/e.height;this.path=this.path.map((i=>({x:t.left+(i.x-e.left)*r,y:t.top+(i.y-e.top)*n})))}}get path(){return v9("이 컴포넌트에 get path 가 구현되어있지 않음.",this),[]}set path(t){v9("이 컴포넌트에 get path 가 구현되어있지 않음.",this)}get drawPath(){return this.path}outline(t){return function(t,e){var r=t.path.slice();if(r&&r.length){var n=1,i=[];if(t.isLine()||r.push(r[0]),e<=0)return t.transcoordS2T(r[0].x,r[0].y);if(e>=1)return t.transcoordS2T(r[r.length-1].x,r[r.length-1].y);for(;r[n];){let t=r[n-1],e=r[n],a=e.x-t.x,o=e.y-t.y;i.push(Math.sqrt(a*a+o*o)),n++}var a=i.reduce((function(t,e){return t+e}),0);n=0;var o=0;do{o+=i[n++]}while(o/a<e);e=(e-(o-=i[--n])/a)*(a/i[n]);var s=r[n%r.length],c=r[(n+1)%r.length],u=s.x+Math.round((c.x-s.x)*e),l=s.y+Math.round((c.y-s.y)*e);return t.transcoordS2T(u,l)}v9("path should not be empty")}(this,t||0)}get strokeStyle(){return this.get("strokeStyle")}set strokeStyle(t){this.set("strokeStyle",t)}get fillStyle(){return this.getState("fillStyle")}set fillStyle(t){this.setState("fillStyle",t)}get fontColor(){return this.get("fontColor")}set fontColor(t){this.set("fontColor",String(i9(t)))}get rotation(){return this.getState("rotation")}set rotation(t){this.setState("rotation",Number(i9(t)))}contains(t,e){return!1}get mutable(){return this.nature.mutable}get resizable(){return this.nature.resizable&&!this.stuck}adjustResize(t,e,r){if(r){let e=this.bounds,r=e.height/e.width,n=t.width-e.width,i=t.height-e.height;n*r>i?i=n*r:n=i/r;let a=t.left-e.left,o=t.top-e.top;return 0!=a&&0!=o?(o=-i,a=-n):0!=a?a=-n:0!=o&&(o=-i),{left:e.left+a,top:e.top+o,width:e.width+n,height:e.height+i}}return t}get rotatable(){return this.nature.rotatable&&!this.stuck}adjustRotation(t,e){if(e||this.app.rotateStepForced){let e=this.app.rotateStep;return Math.floor((t+e/2)/e)*e}return t}get capturable(){return!1!==this.get("capturable")&&(this.app.isEditMode||!this.hidden)}get stuck(){return!!(this.parent&&this.parent.layout.isStuck(this)||this.get("locked"))}findFirst(t,...e){if(t(this,...e))return this}findAll(t,...e){return"string"==typeof t?B9(t,this,e[0]||this):"function"==typeof t&&t(this,...e)?[this]:void 0}capture(t,e,r){if(!this.capturable||r?.(this))return!1;var n=this.transcoordP2S(t,e);return this.contains(n.x,n.y)?this:void 0}prepare(t,e){t(this)}prepareIf(t){t&&this.prepare&&this.prepare((t=>{this.invalidate()}),(t=>{v9(t)}))}get decotag(){const{id:t,tag:e}=this.state;return(t?`#${t}`:"")+(e?`@${e}`:"")}get decorators(){return["decotag","data-spread"]}get hidden(){return this.getState("hidden")||!this.data&&0!==this.data&&this.getState("ndns")||this.isTemplate()}set hidden(t){this.setState("hidden",t)}draw(t){t.save(),this.__proto__.hasOwnProperty("_pre_draw")?this._pre_draw(t):this.prerender(t),this.__proto__.hasOwnProperty("_draw")?this._draw(t):this.render(t),this.__proto__.hasOwnProperty("_post_draw")?this._post_draw(t):this.postrender(t),t.restore()}delta(t,e){if(void 0===e)return t?this._delta[t]:this._delta;this._delta[t]=e}prerender(t){var e=this.rotatePoint,{scale:r,rotation:n,shadow:i,alpha:a}=this.state,o=(r&&r.x||1)*this._delta.sx,s=(r&&r.y||1)*this._delta.sy,c=(n||0)+this._delta.theta,{tx:u=0,ty:l=0}=this._delta,h=(a||1)-this._delta.fade;(u||l)&&t.translate(u,l),(1!=o||1!=s||c)&&(t.translate(e.x,e.y),1==o&&1==s||t.scale(o,s),c&&t.rotate(c),t.translate(-e.x,-e.y)),h&&(t.globalAlpha=h),i&&R9(t,i,this),this.app.isEditMode&&this.hidden&&(t.globalAlpha*=.5)}render(t){}postrender(t){this.drawText(t)}drawText(t){!this.textHidden&&this.text&&this.hasTextProperty&&htt(t,this.textBounds,this.textLines(t),this.state)}drawStroke(t,e){att(t,e?{...this.state,...e}:this.state)}drawFill(t,e){this.fillStyle&&"transparent"!=this.fillStyle&&(itt(t,this.bounds,this.center,e?{...this.state,...e}:this.state,this),function(t){t.shadowColor="transparent"}(t))}animate(t){return this._animate&&this._animate.stop(),this._animate=Z5(t),this._animate}move({x:t,y:e}){var r=this.path,n=t,i=e;this.path=r.map((t=>({x:t.x+n,y:t.y+i})))}symmetryX(t){"number"!=typeof t&&(t=this.center.x);var{rotation:e}=this.state,r=this.fillStyle;if(this.set("rotation",2*Math.PI-e),r&&"gradient"===r.type&&"linear"===r.gradientType){var n=c7(r);n.rotation=(Math.PI-parseFloat(r.rotation||0))%(2*Math.PI),this.set("fillStyle",n)}this.path=this.path.map((e=>({x:2*t-e.x,y:e.y})))}symmetryY(t){this.symmetryX(),this.set("rotation",(Math.PI+this.model.rotation)%(2*Math.PI)),t&&this.move({x:0,y:2*(t-this.center.y)},!1)}get animation(){if(this.app.isViewMode&&!this.isTemplate()){if(!this._animation){var t=this.state.animation;t&&t.oncreate&&(this._animation=(e=this,r=t.oncreate,(n=J5[r.type])?new n(e,r):null))}var e,r,n;return this._animation}}effect(t,e){return function(t,e,r){var n=C9[r.type];n&&n(t,e,r)}(this,t,e)}set started(t){this.animation&&(this.animation.started=t)}invalidate(){this.parent&&this.parent.invalidate()}get font(){return ltt(this.model)}get lineHeight(){var t=this.get("lineHeight");return t||1.2*this.fontSize}defaultTextSubstitutor(){var t=this.getState("text");return null==t?"":String(t)}get textSubstitutor(){return this._text_substitutor||(this._text_substitutor=Mtt(this.getState("text"),this)||this.defaultTextSubstitutor),this._text_substitutor}get text(){var t=this.get("textFormat");return t?function(t,e){if(!t||isNaN(+e))return e;var r,n,i,a,o,s,c,u,l,h=t.length,f=t.search(/[0-9\-\+#]/),d=f>0?t.substring(0,f):"",p=t.split("").reverse().join(""),g=p.search(/[0-9\-\+#]/),v=h-g,m=t.substring(v,v+1),y=v+("."===m||","===m?1:0),b=g>0?t.substring(y,h):"";if(r=(e="-"===(t=t.substring(f,y)).charAt(0)?-e:+e)<0?e=-e:0,i=(n=t.match(/[^\d\-\+#]/g))&&n[1]&&n[0]||",",t=t.split("."),e=+(e=e.toFixed(t[1]&&t[1].length))+"",o=t[1]&&t[1].lastIndexOf("0"),(!(c=e.split("."))[1]||c[1]&&c[1].length<=o)&&(e=(+e).toFixed(o+1)),u=t[0].split(i),t[0]=u.join(""),(a=t[0]&&t[0].indexOf("0"))>-1)for(;c[0].length<t[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((e=e.split("."))[0]=c[0],s=u[1]&&u[u.length-1].length){for(p="",v=(l=e[0]).length%s,h=l.length,y=0;y<h;y++)p+=l.charAt(y),!((y-v+1)%s)&&y<h-s&&(p+=i);e[0]=p}return e[1]=t[1]&&e[1]?"."+e[1]:"","0"!==(n=e.join(""))&&""!==n||(r=!1),d+("+"==t[0].substring(0,1)?r?"-":"+":r?"-":"")+n+b}(t,this.textSubstitutor()):this.textSubstitutor()}set text(t){delete this._text_substitutor;var e=i9(t);this.setState("text",null==e?"":String(e))}textLines(t){return utt(t||this.getContext(),this.textBounds.width,this.font,this.text,this.get("textWrap"))}get textBounds(){var{paddingTop:t,paddingLeft:e,paddingRight:r,paddingBottom:n}=this.state;n||=0,t||=0,e||=0,r||=0;var{left:i,top:a,width:o,height:s}=this.bounds;return{left:i+e,top:a+t,width:Math.max(o-e-r,0),height:Math.max(s-t-n,0)}}get textRotation(){return 0}get rotatePoint(){return this.center}trim(){delete this._model[""],"chartjs"!==this._model.type&&delete this._model.chart}get value(){var t=this.nature["value-property"]||"text";return"value"==t?this.getState("value"):this[t]}set value(t){var e=this.nature["value-property"]||"text";"value"==e?this.setState("value",t):this[e]=t}get data(){return this.getState("data")}set data(t){this.setState("data",t),this.touch()}get mappings(){return!this._mappings&&this.parent&&this.buildMappings(),this._mappings}serialize(...t){return JSON.stringify(this.hierarchy,...t)}get controls(){}closeScene(t){this.rootModel.closeScene(t)}}ztt.union=function(t){var e,r,n,i;return t.forEach((t=>{void 0===e?(e=t.left,r=t.top,n=t.left+t.width,i=t.top+t.height):(e=Math.min(t.left,e),r=Math.min(t.top,r),n=Math.max(t.left+t.width,n),i=Math.max(t.top+t.height,i))})),{left:e,top:r,width:n-e,height:i-r}},ztt.transcoordR=ftt,ztt.transcoordRR=dtt,ztt.createCanvas=ntt,ztt.memoize=b9,ztt.mixin=g9,ztt.drawText=htt,ztt.font=ltt,ztt.textLines=utt,ztt.drawStroke=att,ztt.drawFill=itt,ztt.reposition=ytt,ztt.RetentionManager=ktt,ztt.template=V5,ztt.buildSubstitutor=Mtt,Object.assign(ztt.prototype,{drawEffect:function(t){const{effects:e}=this.state;(e||[]).forEach((e=>{this.effect(t,e)}))},prepareFill:function(t,e){var r=this.fillStyle;if(r&&"pattern"==r.type&&r.image){if("string"!=typeof r.image)return this._pattern_image_origin=this._pattern_image=r.image,void t(this);this._pattern_image=null,this._pattern_image_origin=new Image;var n=this;this._pattern_image_origin.onload=function(){if(!r.fitPattern&&!r.width&&!r.height)return n._pattern_image=n._pattern_image_origin,void t(this);let e=r.width||this.width,i=r.height||this.height;r.fitPattern&&(e=n.bounds.width,i=n.bounds.height);let a=ntt(e,i);a.getContext("2d").drawImage(this,0,0,this.width,this.height,0,0,e,i),n._pattern_image=a,t(this)},this._pattern_image_origin.onerror=function(t){e(t)};try{"data"!==String(r.image).substring(0,4)?this._pattern_image_origin.crossOrigin="use-credentials":this._pattern_image_origin.crossOrigin=null,this._pattern_image_origin.src=this.app.url(r.image)}catch(t){e(t)}}else t(this)},prepareFillIf:function(t){t&&this.prepareFill((t=>{this.invalidate()}),(t=>{v9(t)}))},onchangeFill:function(t,e){var r=this.fillStyle;r&&"pattern"!==r.type?this._pattern_image&&(this._pattern_image=null,this._pattern_image_origin=null):r?.image&&this.prepareFillIf(r.image)},drawImage:function(t,e,r,n,i,a){e.complete?t.drawImage(e,r,n,i,a):e.addEventListener("load",(()=>{this.invalidate()}))},mutateBounds:function(t,e){var r=this.bounds,n=this.rotatePoint,i=this.get("rotation"),a=this.get("scale");if(t){var o=t.call(e,r);o&&(r=o)}var{left:s,top:c,width:u,height:l}=r,h=[{x:s,y:c},{x:s+u,y:c+l}],f=(h=h.map((t=>dtt(t.x,t.y,n,i,a))))[0],d=h[1];n={x:(f.x+d.x)/2,y:(f.y+d.y)/2},f=(h=h.map((t=>ftt(t.x,t.y,n,i,a))))[0],d=h[1],this.bounds={left:f.x,top:f.y,width:d.x-f.x,height:d.y-f.y}},mutatePath:function(t,e,r){var n=this.path,i=this.rotatePoint;this.get("rotation"),this.get("scale"),t&&(n=t.call(r,n));var a=n.map((t=>this.transcoordS2P(t.x,t.y)));e&&(n=e.call(r,a))&&(a=n);var o,s,c,u,l={x:0,y:0};o=s=(n=a.map((t=>this.transcoordP2S(t.x,t.y,l))))[0].x,c=u=n[0].y;for(let t=1;t<n.length;t++){let e=n[t];e.x<o?o=e.x:e.x>s&&(s=e.x),e.y<c?c=e.y:e.y>u&&(u=e.y)}i={x:(o+s)/2,y:(c+u)/2},i=this.transcoordS2P(i.x,i.y,l),this.path=a.map((t=>this.transcoordP2S(t.x,t.y,i)))},access:function(t){if(t){var e=String(t),r=(e.match(/#{(\S*)}/)||[]).map((t=>Stt(t)))[0];if(r)return r.accessor(this.getState(r.target));var n=(e.match(/\${[^}]*}/)||[]).map((t=>Stt(t)))[0];if(n){let t=this.root.findById(n.target);return n.accessor(this.getState(t))}return t}},substitute:function(t,e){if(t){var r=String(t),n=e||i9,i=(r.match(/#{(\S*)}/gi)||[]).map((t=>Stt(t))),a=(r.match(/\${[^}]*}/gi)||[]).map((t=>Stt(t)));if(0==i.length&&0==a.length)return r;var o=r;return i.forEach((t=>{let e=n(t.accessor(this.getState(t.target)));o=o.replace(t.match,void 0===e?"":e)})),a.forEach((t=>{let e=this.root.findById(t.target),r=n(t.accessor(e&&e.data));o=o.replace(t.match,void 0===r?"":r)})),o}},onchangeMappings:function(t,e){this.disposeMappings(),rtt.call(this)},onchangeData:function(t,e){this.state.persistent&&this.app.isViewMode&&this.app.dataStorage.save(this,t.data),rtt.call(this,[!0])},buildMappings:function(){if(this._model.mappings)return!this._model.mappings instanceof Array?(v9("Mappings model is invalid (should be a Array) ..",this._model.mappings),void(this._mappings=[])):void(this._mappings=(this._model.mappings||[]).map((t=>new ett(t,this))));this._mappings=[]},executeMappings:rtt,disposeMappings:function(){this._mappings&&this._mappings.forEach((t=>t.dispose())),delete this._mappings},ondropfile:function(t,e){for(let r=0;r<t.length;r++)if(t[r].type.startsWith("image/"))return void this.set("fillStyle",{type:"pattern",image:e[r],fitPattern:!0})},transcoordS2P:function(t,e,r){if(!this.parent)return{x:t,y:e};var{rotation:n=0,scale:i={x:1,y:1}}=this.state;if(this.isLayer()){let r=this.state.translate,a=dtt(t,e,void 0,n+this._delta.theta,i);return r&&(a.x+=r.x,a.y+=r.y),a}r=r||this.rotatePoint;const{theta:a=0,tx:o=0,ty:s=0,sx:c=1,sy:u=1}=this._delta||{},l=dtt(t+o,e+s,r={x:r.x+o,y:r.y+s},n+a,i={x:i.x*c,y:i.y*u});return{x:l.x-(r.x*i.x-r.x),y:l.y-(r.y*i.y-r.y)}},transcoordP2S:function(t,e,r){if(!this.parent)return{x:t,y:e};var{rotation:n=0,scale:i={x:1,y:1}}=this.state;if(this.isLayer()){let r=this.state.translate,a=ftt(t,e,r,n,i);return r&&(a.x-=r.x/(i?i.x:1),a.y-=r.y/(i?i.y:1)),a}var a=ftt(t,e,r=r||this.rotatePoint,n,i);return{x:a.x+(r.x-r.x/i.x),y:a.y+(r.y-r.y/i.y)}},transcoordS2T:function(t,e,r){r=r||this.rootModel;var n=[];for(let t=this.parent;t&&t!==r;t=t.parent)n.push(t);var i=this.transcoordS2P(t,e);return n.forEach((t=>{let{scale:e}=t.model,r=t.bounds;if(e){let n=t.rotatePoint;i.x+=(n.x-r.left)*e.x,i.y+=(n.y-r.top)*e.y}else i.x+=r.left,i.y+=r.top;i=t.transcoordS2P(i.x,i.y)})),i},transcoordT2P:function(t,e,r){r=r||this.rootModel;var n=[];for(let t=this.parent;t&&t!==r;t=t.parent)n.splice(0,0,t);var i={x:t,y:e};return n.forEach((t=>{let{scale:e}=t.model;i=t.transcoordP2S(i.x,i.y);let r=t.bounds;if(e){let n=t.rotatePoint;i.x-=(n.x-r.left)/e.x,i.y-=(n.y-r.top)/e.y}else i.x-=r.left,i.y-=r.top})),i},transcoordT2S:function(t,e,r){var n=this.transcoordT2P(t,e,r);return this.transcoordP2S(n.x,n.y)},transcoordS2TR:function(t,e,r){r=r||this.rootModel;var n=this.transcoordS2T(t,e,r);return dtt(n.x,n.y,void 0,(r.get("rotation")||0)+r._delta.theta)},transcoordS2O:function(t,e,r){var n=this.rootModel,i=this.transcoordS2T(t,e,n);return r.transcoordT2S(i.x,i.y,n)},transcoordC2S:function(t,e,r){if(!r)for(r=this;r&&!r.isLayer();)r=r.parent;var{translate:n={x:0,y:0},scale:i={x:1,y:1},rotation:a=0}=r.model,o=ftt(t,e,n,a,i);return n&&(o.x-=n.x/(i?i.x:1),o.y-=n.y/(i?i.y:1)),r===this?o:this.transcoordT2S(o.x,o.y,r)},transcoordS2C:function(t,e,r){if(!r)for(r=this;r&&!r.isLayer();)r=r.parent;if(r!==this)var n=this.transcoordS2T(t,e,r);else n={x:t,y:e};var{translate:i={x:0,y:0},rotation:a=0,scale:o={x:1,y:1}}=r.model;return n=dtt(n.x,n.y,void 0,a+r._delta.theta,o),i&&(n.x+=i.x,n.y+=i.y),n},_pre_draw:ztt.prototype.prerender,_draw:ztt.prototype.render,_post_draw:ztt.prototype.postrender}),["rotatePoint","font","lineHeight","retention"].forEach((t=>ztt.memoize(ztt.prototype,t,!1))),["bounds","center","textBounds"].forEach((t=>ztt.memoize(ztt.prototype,t,!0))),ztt.mixin(ztt.prototype,l9.withEvent);class Ftt extends ztt{set rotationX(t){this.setState("rotationX",t)}get rotationX(){return this.getState("rotationX")}set rotationY(t){this.setState("rotationY",t)}get rotationY(){return this.getState("rotationY")}set rotationZ(t){this.setState("rotation",t)}get rotationZ(){return this.getState("rotation")}set zPos(t){this.setState("zPos",t)}get zPos(){return this.getState("zPos")}set depth(t){this.setState("depth",t)}get depth(){return this.getState("depth")}postrender(t){this.drawFill(t),this.drawStroke(t),super.postrender(t)}render(t){var e=this.drawPath,{round:r=0}=this.state;if(!(e.length<=1)){t.beginPath();for(var n=0;n<e.length;n++){const c=e[(n-1+e.length)%e.length],u=e[(n+e.length)%e.length],l=e[(n+1)%e.length];if(c.x===u.x&&c.y===u.y)continue;var i=0!==(s=Math.sqrt((c.x-u.x)*(c.x-u.x)+(c.y-u.y)*(c.y-u.y)))?Math.atan2(c.x-u.x,c.y-u.y):0,a=Math.sin(i)*Math.min(r,s/2)+u.x,o=Math.cos(i)*Math.min(r,s/2)+u.y;const h=r>0||0!==s?{x:a,y:o}:u;var s;i=0!==(s=Math.sqrt((l.x-u.x)*(l.x-u.x)+(l.y-u.y)*(l.y-u.y)))?Math.atan2(l.x-u.x,l.y-u.y):0,a=Math.sin(i)*Math.min(r,s/2)+u.x,o=Math.cos(i)*Math.min(r,s/2)+u.y;const f=r>0||0!==s?{x:a,y:o}:u;0==n?t.moveTo(h.x,h.y):t.lineTo(h.x,h.y),r>0&&t.quadraticCurveTo(u.x,u.y,f.x,f.y)}t.closePath()}}}var Btt=t=>{var e=class extends t{contains(t,e){var{left:r,top:n,width:i,height:a,lineWidth:o=0}=this.state,s=o/2;return t<Math.max(r+i,r)+s&&t>Math.min(r+i,r)-s&&e<Math.max(n+a,n)+s&&e>Math.min(n+a,n)-s}set path(t){var e=t[0],r=t[2];this.set({left:e.x,top:e.y,width:r.x-e.x,height:r.y-e.y})}get path(){var{left:t=0,top:e=0,width:r=0,height:n=0}=this.state;return[{x:t,y:e},{x:t+r,y:e},{x:t+r,y:e+n},{x:t,y:e+n}]}get anchors(){return function(t){var{left:e,top:r,width:n,height:i}=t.bounds,a=e+n/2,o=r+i/2;return[{name:"TOP",position:{x:a,y:r}},{name:"RIGHT",position:{x:e+n,y:o}},{name:"BOTTOM",position:{x:a,y:r+i}},{name:"LEFT",position:{x:e,y:o}}]}(this)}};return b9(e.prototype,"path",!1),e};const Ntt={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"textarea",label:"front-side-template",name:"frontSideTemplate",property:{language:"html"}},{type:"textarea",label:"back-side-template",name:"backSideTemplate",property:{language:"html"}},{type:"textarea",label:"style",name:"style",property:{language:"css"}}],help:"scene/component/info-window"};const Utt=20;function Ytt(t,e){var r=t.split(/\s+/),n=r.indexOf(e);return-1!=n?r.splice(n,1):r.splice(-1,0,e),r.join(" ")}class Gtt extends(Btt(Ftt)){static get image(){return Gtt._image||(Gtt._image=new Image,Gtt._image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAY1BMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADIAbxiAAAAIHRSTlMA+gPshCwwWFzYCeLRm7QRG6rLeDZI9JOJJDtjb1HAf1sAT80AAAQQSURBVHhe7MCBAAAAAMKw/KkzOMG2BAAAAKeu3lUohIEggO7jQi5qHqpgwML5/6+0F0y02z31FlvMMLKt86QMQ1ined2Evih1hFFjLfRWjgzDOGZ6JSiM00B9EuHALtQxJLiQBmqSBCeSUEuEGzs1BDjSaHxWOKK5Eyz/4SoMV/hp4+vtcPkdwZD/udwevNg7t1xXYRiKmkB7C+ENlPLq8fxHeX+RGjWQ1D45ldcIulBIvCvYJGBEadyTzxAcfY57NBjpLScOO/bzugcTHe7IMwiSLMcdHZhocMcMgTLjjgZM7F1bCJZ2v27ARGzYDwIk2Z+JYGJ/iiwQLMv+JAEThjkmRG64Q0Q+gIiIiIiIiIiIyFy0KRFt0bOJZAWSUigmkQaJaXhENiRnYBEpkZySRSRGcmIWEaQnYhHRSI5mESmQnIJFZIqQmGhiEYEbEnPjGlEGjYTogW/WUkOXENENSqZfEXmDiIiIiIiIiIiIiIiIiIiImq5ETIpRpBpjJCMeKy6Ri0ZS9MQjkmkkJs1YRDokp2MRyZGclkUkQnIiEQltaX3Lzb6yiGTpl2y/avqSAxGgelCOKI+Kc2isL0TUSsZ4EREREREREREREREREREREfnIQzXrNWSRTeNxnlOwIgueIr6AAyE+CpiqMEUK71IDO4E+LluEKYKnKcMUifEsTZgiJZ5lDVNkwJPcqzBFoPF/HplfxL/w6b4EPGv1h18Weya1TL8iIiIeiIiIiIiIiEjkPefxV+5YA9PPHylB+u5aqgZ39H+jKOxrqtu+pkzvr9YbzoZ6w2OFkzcrA3yE4WZlSSyFk54VoA/wR43+FaD+r9w32QdWvgvjp2ty2xq8qHPHmtyPFxfrK3hw1ejERlAlfR/Ame2OTow05d4rOLLSlHtDVhI0uRO01JeZ405op6zgNNXT+bIRfpIgn+AkU4pOxBscohojdCHu4RRzjC5EYwVHqRONDkSnEvK/CB3QSU32IRW3ZPnj9iEVoGCNTLVrh8ia1x+6wq8xvB5mz8pxu7oPwIn9lcR0AiuX1+1KX+BXqdvXzWsAC0NsGjzZsS/2Bd6yRA5RgIHkXNhSD3whASZ8rrB9mItuEAizac0fDlHxDMEwpQfD1tW4y3Hjfy5s9nOHH3uwWA+EqEJBWCjoTL/S5toBB/7hu6zer74NgqSP39zJU+qQX3ix763mHTqvIVRUVprCljlElRkEjBqNYevH8veBJ2xhiyhE8YctmhDFH7ZoQhR/2KIJUfxhiyRE8YctmhDFH7ZoQhR/2OIJUfxhC9Ppf/t1jgJACERRsHGyYRZB0Ujvf0xD8w6kP7y6RZmgf/oTFTtbbzJVxZWo2Nlqw6TVy5GowNl6ssm7v50obamfSxQAAAAAAAsKLM15fb3vpQAAAABJRU5ErkJggg=="),Gtt._image}static toggle(t,e,r,n){if(e){var i=t.root.findById(e);i?i._findInfoWindowByComponent(t)?Gtt.hide(t,e):Gtt.show(t,e,r,n):console.warn("InfoWindow Not Found.",e)}else console.warn("InfoWindow not defined.")}static hide(t,e){if(e){var r=t.root.findById(e);r?r._removeInfoWindow(t):console.warn("InfoWindow Not Found.",e)}}static show(t,e,r,n){if(e){var i=t.root.findById(e);if(i){if(!i._findInfoWindowByComponent(t)){var{frontSideTemplate:a="",backSideTemplate:o=""}=i.model,s=[a,o].filter((t=>String(t).trim()));if(s=s.map((t=>ztt.template(function(t,e,r){return(e||r?['<div class="info-window-btns">',e?'<button class="closable">&#88</button>':"",r?'<button class="flipable">&#8652</button>':"","</div>"]:[]).concat(['<div class="info-window-content">',t,"</div>"]).join("")}(t,!r,2==s.length)))),0!=s.length){var c='\n.flip {\n backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n -ms-backface-visibility: hidden;\n -o-backface-visibility: hidden;\n -webkit-backface-visibility: hidden;\n border-radius: 7px;\n height: auto;\n font: normal 14px helvetica, arial, san serif;\n position: absolute;\n opacity:.9;\n transform-origin: 50% 50% 0px;\n -moz-transform-origin: 50% 50% 0px;\n -ms-transform-origin: 50% 50% 0px;\n -o-transform-origin: 50% 50% 0px;\n -webkit-transform-origin: 50% 50% 0px;\n transition: all 2s;\n -moz-transition: all 2s;\n -ms-transition: all 2s;\n -o-transition: all 2s;\n -webkit-transition: all 2s;\n min-width: 100px;min-height:50px;\n background-color:#3e424e;\n box-shadow: 2px 3px 2px 0px rgba(0,0,0,0.15);\n}\n\n#side-1 {\n transform: rotateY( 0deg );\n -moz-transform: rotateY( 0deg );\n -ms-transform: rotateY( 0deg );\n -o-transform: rotateY( 0deg );\n -webkit-transform: rotateY( 0deg );\n}\n.flip:after{\n content:"";\n display:block;\n position: absolute;\n opacity:.9;\n width: 0;\n height: 0;\n}\n.flip.arrow-top:after{\n left:45%;\n top:-17px;\n border-left:10px solid transparent;\n border-bottom:18px solid #323b44;\n border-right:10px solid transparent;\n}\n.flip.arrow-right:after{\n left:100%;\n top:48%;\n border-top:10px solid transparent;\n border-left:18px solid #323b44;\n border-bottom:10px solid transparent;\n}\n.flip.arrow-bottom:after{\n left:45%;\n top:100%;\n border-left:10px solid transparent;\n border-top:18px solid #323b44;\n border-right:10px solid transparent;\n}\n.flip.arrow-left:after{\n right:100%;\n top:48%;\n border-top:10px solid transparent;\n border-right:18px solid #323b44;\n border-bottom:10px solid transparent;\n}\n\n#side-2 {\n transform: rotateY( 180deg );\n -moz-transform: rotateY( 180deg );\n -ms-transform: rotateY( 180deg );\n -o-transform: rotateY( 180deg );\n -webkit-transform: rotateY( 180deg );\n}\n\n.flip-side-1 {\n transform: rotateY( 0deg ) !important;\n -moz-transform: rotateY( 0deg ) !important;\n -ms-transform: rotateY( 0deg ) !important;\n -o-transform: rotateY( 0deg ) !important;\n -webkit-transform: rotateY( 0deg ) !important;\n}\n\n.flip-side-2 {\n transform: rotateY( 180deg ) !important;\n -moz-transform: rotateY( 180deg ) !important;\n -ms-transform: rotateY( 180deg ) !important;\n -o-transform: rotateY( 180deg ) !important;\n -webkit-transform: rotateY( 180deg ) !important;\n}\n\n.info-window-btns{\n position:absolute;\n top:-18px;\n right:5px;\n overflow:hidden;\n}\n.info-window-content{\n padding:10px;\n color:#efefef;\n font-size:13px;\n line-height:1.4;\n}\n.info-window-btns button{\n width:40px;height:40px;\n float:right;\n border:0;\n border-radius:50%;\n background-color:#2a7da1;\n margin-right:3px;\n text-align:center;\n cursor:pointer;\n font-size:35px;\n color:#fff;\n line-height:0;\n}\n.info-window-btns button:hover{\n background-color:#60bb23;\n}\n'+i.get("style"),{left:u,top:l}=t.bounds,{x:h,y:f}=n?t.rootModel.transcoordC2S(n.x,n.y):t.transcoordS2T(u,l);u=h,l=f;var d=document.createElement("span");d.style.position="absolute";var p=document.createElement("style");if(p.type="text/css",p.appendChild(document.createTextNode(c)),d.appendChild(p),s[0]){var g=document.createElement("div");g.id="side-1",g.className="flip",g.style.display="inline-block",g.innerHTML=s[0](t)}if(s[1]){var v=document.createElement("div");v.id="side-2",v.className="flip",v.style.display="inline-block",v.innerHTML=s[1](t)}T9.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))})),P9.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))}));var m=t.root.model_layer.overlay;if(g&&d.appendChild(g),v&&d.appendChild(v),m.appendChild(d),i._addInfoWindow(t,d,p),g){let r=g.querySelector(".info-window-btns > .flipable");r&&r.addEventListener("click",(function(t){t.preventDefault(),v.className=Ytt(v.className,"flip-side-1"),g.className=Ytt(g.className,"flip-side-2")}),!1);let n=g.querySelector(".info-window-btns > .closable");n&&n.addEventListener("click",(function(r){r.preventDefault(),Gtt.hide(t,e)}),!1)}if(v){let r=v.querySelector(".info-window-btns > .flipable");r&&r.addEventListener("click",(function(t){t.preventDefault(),v.className=Ytt(v.className,"flip-side-1"),g.className=Ytt(g.className,"flip-side-2")}),!1);let n=v.querySelector(".info-window-btns > .closable");n&&n.addEventListener("click",(function(r){r.preventDefault(),Gtt.hide(t,e)}),!1)}var y=g.offsetWidth,b=g.offsetHeight;window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var x=t.rootModel.target.getBoundingClientRect(),w=[];g&&w.push(g),v&&w.push(v);var A={x:u,y:l},_=t.transcoordS2C(A.x,A.y);if(_.x+y/2+x.left<x.right&&_.x-y/2>x.left){if(b+Utt<_.y)return d.style.marginLeft=A.x-y/2+"px",d.style.marginTop=A.y-b-Utt+"px",void w.forEach((t=>t.className+=" arrow-bottom"));if(_=t.transcoordS2C(A.x,A.y+b+Utt),x.bottom>_.y+x.top)return d.style.marginLeft=A.x-y/2+"px",d.style.marginTop=A.y+Utt+"px",void w.forEach((t=>t.className+=" arrow-top"))}if((_=t.transcoordS2C(A.x,A.y)).x-(y+Utt)>x.left)return d.style.marginLeft=A.x-y-Utt+"px",d.style.marginTop=A.y-b/2+"px",void w.forEach((t=>t.className+=" arrow-right"));d.style.marginLeft=A.x+Utt+"px",d.style.marginTop=A.y-b/2+"px",w.forEach((t=>t.className+=" arrow-left"))}}}else console.warn("InfoWindow Not Found.",e)}else console.warn("InfoWindow not defined.")}dispose(){this.infoWindows.map((t=>t.component)).forEach((t=>this._removeInfoWindow(t))),super.dispose()}get infoWindows(){return this._windows||(this._windows=[]),this._windows}_findInfoWindowByComponent(t){return this.infoWindows.find((e=>e.component===t))}_addInfoWindow(t,e,r){this._findInfoWindowByComponent(t)||this._windows.push({component:t,window:e,styleElement:r})}_removeInfoWindow(t){var e=this._findInfoWindowByComponent(t);if(!e)return;let r=e.window;r&&r.parentNode.removeChild(r);var n=this.infoWindows.lastIndexOf(e);this.infoWindows.splice(n,1)}render(t){var{left:e,top:r,width:n,height:i}=this.bounds;t.beginPath(),this.drawImage(t,Gtt.image,e,r,n,i)}get hasTextProperty(){return!1}get nature(){return Ntt}}ztt.register("info-window",Gtt);var Htt={};var Wtt={list:function(){return{...Htt}},register:function(t,e){Htt[t]=e},unregister:function(t){delete Htt[t]},get:function(t){if(t){var e=Htt[t];return e||v9("Layout Not Found - ",t),e}}},qtt={reflow:function(t,e){this.drawables(t).filter((t=>t.isHTMLElement())).forEach((t=>t.reposition()))},capturables:function(t){return t.components},drawables:function(t){return t.app&&!t.app.isViewMode?t.components:t.components.filter((t=>!t.hidden))},isStuck:function(t){return!1},ABSOLUTE:!0};Wtt.register("html-absolute",qtt);const Xtt="center",Vtt="left-top",Qtt="right-top",Ktt="left-bottom",Jtt="right-bottom",Ztt="auto",$tt=20,tet=new WeakMap;function eet(t){const e=t.root;var r=tet.get(e);if(!r)return;if(e===t){for(var n in r)eet(n[0]);return void tet.delete(e)}const i=r.findIndex((e=>e[0]===t));if(-1===i)return;const a=r[i][1];var o=a.div.parentNode;o&&o.removeChild(a.div);var s=a.scene;s.target=null,s.release&&s.release(),r.splice(i,1)}class ret{static hideAll(t){(tet.get(t)||[]).forEach((([t,e])=>eet(t)))}static hide(t){eet(t)}static show(t,e,r={}){var{data:n,location:i=Xtt,modal:a=!1,closable:o=!0,output:s=!0}=r,c=t.app.refProvider;c&&c.get(e,!0).then((e=>{var r=document.createElement("div"),c=r.style;if(a){var{width:u,height:l}=t.rootModel.bounds;c.position="fixed",c.zIndex=1,c.left=0,c.top=0,c.width=u+"px",c.height=l+"px",c.overflow="auto",c.backgroundColor="rgba(0,0,0,0.3)"}else c.position="absolute",c.display="inline-block";r.innerHTML=!a&&o?'\n<div class="popup-content">\n</div>\n<button class="closable-1945">&#88</button>\n':'\n<div class="popup-content">\n</div>\n';var h=r.querySelector(".popup-content"),{width:u,height:l}=e.root.model;h.style.width=u+"px",h.style.height=l+"px";var f=document.createElement("style");f.type="text/css",f.appendChild(document.createTextNode("\nbutton.closable-1945 {\n width: 20px;\n height: 20px;\n right: 0px;\n top: 0px;\n padding: 0;\n margin: 0;\n border: 0px;\n text-align: center;\n cursor: pointer;\n font-size: 12px;\n color: black;\n position: absolute;\n background-color: transparent;\n}\n\nbutton.closable-1945:hover {\n background-color:#60bb23;\n}\n")),r.appendChild(f);var d=r.querySelector(".popup-content");T9.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))})),P9.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))})),r.addEventListener("click",(e=>{e.target===r&&o&&ret.hide(t)})),T9.forEach((function(t){r.addEventListener(t,(function(t){t.stopPropagation()}))})),P9.forEach((function(t){r.addEventListener(t,(function(t){t.stopPropagation()}))})),t.root.model_layer.overlay.appendChild(r),function(t,e,r){const n=t.root;if(n!==t){eet(t);var i=tet.get(n)||[];i=[...i,[t,{div:e,scene:r}]],tet.set(n,i)}}(t,r,e),r.querySelector(".closable-1945")?.addEventListener("click",(function(e){e.preventDefault(),ret.hide(t)}),!1),r.addEventListener("close-scene",(e=>{e.preventDefault(),e.stopPropagation(),ret.hide(t),s&&(t.data=e.detail)}),!1),e.target=h,e.data=n||t.data,e.fit("both");var p=function(t,e,r,n=Xtt){var i=t.bounds,a=e.bounds,o=Math.max(i.width/4-a.width/2,$tt),s=Math.min(3*i.width/4+a.width/2,i.width-$tt)-a.width,c=Math.max(i.height/4-a.height/2,$tt),u=Math.min(3*i.height/4+a.height/2,i.height-$tt)-a.height;switch(n){case Ztt:return{x:r.x<i.width/2?s:o,y:r.y<i.height/2?u:c};case Vtt:return{x:o,y:c};case Qtt:return{x:s,y:c};case Ktt:return{x:o,y:u};case Jtt:return{x:s,y:u};default:return{x:(i.width-a.width)/2,y:(i.height-a.height)/2}}}(t.rootModel,e.root,t.center,i);a?(h.style.left=p.x+"px",h.style.top=p.y+"px",h.style.width=u+"px",h.style.height=l+"px"):(r.style.left=p.x+"px",r.style.top=p.y+"px",r.style.width=u+"px",r.style.height=l+"px")}),(function(t){console.error("cannot fetch board: "+e,t)}))}}var net={reflow:function(t,e){},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((t=>!t.hidden)):t.components},isStuck:function(t){return!1},ABSOLUTE:!0};function iet(t){var e=t.components.filter((t=>!t.hidden)),r=t.get("layoutConfig")||{},n=e[r&&r.activeIndex||0];return n&&[n]||[]}Wtt.register("absolute",net);var aet={reflow:function(t){var e=t.bounds,r=t.get("layoutConfig")||{},n={left:0,top:0,width:e.width,height:e.height};t.forEach(((t,e)=>{let i=e!=r.activeIndex;t.bounds=n,t.set("rotation",0),t.element&&(t.element.style.display=i?"none":"block")}))},capturables:function(t){return iet(t)},drawables:function(t){return iet(t)},isStuck:function(t){return!0}};function oet(t){var e=t.get("layoutConfig");return e&&e.weight||1}Wtt.register("card",aet);var set={reflow:function(t){var e=this.drawables(t),r=t.get("padding")||{},n=e.reduce(((t,e)=>t+oet(e)),0),i=t.bounds,a=n>0?(i.width-((r.left||0)+(r.right||0)))/n:i.width,o=i.height-((r.top||0)+(r.bottom||0)),s=0;e.forEach((t=>{let e=oet(t),n=t.get("margin")||{};t.bounds={left:a*s+(r.left||0)+(n.left||0),top:0+(r.top||0)+(n.top||0),width:e*a-((n.left||0)+(n.right||0)),height:o-((n.top||0)+(n.bottom||0))},t.set("rotation",0),s+=e}))},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((t=>!t.hidden)):t.components},isStuck:function(t){return!0}};function cet(t){var e=t.get("layoutConfig");return e&&e.weight||1}Wtt.register("linear-horizontal",set);var uet={reflow:function(t){var e=this.drawables(t),r=t.get("padding")||{},n=e.reduce(((t,e)=>t+cet(e)),0),i=t.bounds,a=n>0?(i.height-((r.top||0)+(r.bottom||0)))/n:i.height,o=i.width-((r.left||0)+(r.right||0)),s=0;e.forEach((t=>{let e=cet(t),n=t.get("margin")||{};t.bounds={left:0+(r.left||0)+(n.left||0),top:a*s+(r.top||0)+(n.top||0),width:o-((n.left||0)+(n.right||0)),height:e*a-((n.top||0)+(n.bottom||0))},t.set("rotation",0),s+=e}))},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((t=>!t.hidden)):t.components},isStuck:function(t){return!0}};Wtt.register("linear-vertical",uet);var het={reflow:function(t){var e=t.get("layoutConfig"),r=e&&e.columns||t.get("columns"),n=e&&e.rows||t.get("rows"),i=e&&e.widths||t.get("widths"),a=e&&e.heights||t.get("heights"),o=i?i.filter(((t,e)=>e<r)).reduce(((t,e)=>t+e),0):r,s=a?a.filter(((t,e)=>e<n)).reduce(((t,e)=>t+e),0):n,c=t.textBounds,u=t.get("paddingLeft")||0,l=t.get("paddingTop")||0,h=c.width/o,f=c.height/s,d=0,p=0;t.components.forEach(((t,e)=>{let n=i?i[e%r]:1,o=a?a[Math.floor(e/r)]:1,s=t.colspan||1,c=0;for(;--s>0;)c+=i?i[(e+s)%r]:1;let g=t.rowspan||1,v=0;for(;--g>0;)v+=a?a[Math.floor(e/r)+g]:1;t.bounds={left:u+d,top:l+p,width:h*(n+c),height:f*(o+v)},t.set("rotation",0),e%r==r-1?(d=0,p+=o*f):d+=n*h}))},capturables:function(t){return t.components.filter((t=>!t.merged))},drawables:function(t){return t.components.filter((t=>!t.merged&&!t.hidden))},isStuck:function(t){return!0},keyNavigate:function(t,e,r){var n=t.get("layoutConfig"),i=n&&n.columns||t.get("columns"),a=n&&n.rows||t.get("rows"),{row:o,column:s}=t.getRowColumn(e);switch(r.code){case"ArrowUp":if(o>0)return t.getAt((o-1)*i+s);break;case"ArrowDown":if(o<a-1)return t.getAt((o+1)*i+s);break;case"ArrowRight":if(s<i-1)return t.getAt(o*i+s+1);break;case"ArrowLeft":if(s>0)return t.getAt(o*i+s-1);break;default:return e}},joinType:!0};Wtt.register("table",het);const fet=new Image;fet.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAclBMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0BbqFAAAAJXRSTlMAgAP3VSI6/g9fBk5FavJsMrariSjzPnO1enRRL5SMhmOOWB9keFTE0wAAANxJREFUOMutk9kWgyAMRLFuiLjUtdp9yf//YglVsQXz1HniMPcEMgHGvpX2O0Ypi+EgCL+IAShC+wB7QfubRDT7AFcnUPoLMLiP4PyJbsb55i05AgnR5iaQDsICgtH0cotBWoAP1c7kC6kFxEseCfZfB6gEgbNeBrira2QmH1uVYCXlA3is8UmgUCPIyQJKEmu8QtQJN0e9DPXVpzG2G216c1CqRmcBOdxXk07sWUSPv07zo0amCNQycv+NzmR6cRcwmfbuI7p2nZ/z4be0P83Foz6vIkhfZXr82XgDlZsspIq4peUAAAAASUVORK5CYII=";var det=t=>class extends t{postrender(t){super.postrender(t),this.app.isEditMode&&this._focused&&this.showMoveHandle&&this._draw_move_handle(t)}_draw_move_handle(t){var{left:e,top:r,width:n}=this.bounds;t.save(),t.beginPath(),t.rect(e+n,r,25,25);t.fillStyle="rgba(235, 235, 235, 1)",t.fill(),t.drawImage(fet,e+n+3.75,r+3.75,17.5,17.5),t.closePath(),t.restore()}contains(t,e){var r=super.contains(t,e);if(this.app.isViewMode)return r;if(!r){var{left:n,top:i,width:a,height:o}=this.bounds,s=n+a;this.showMoveHandle&&(r=t<Math.max(s+25,s)&&t>Math.min(s+25,s)&&e<Math.max(i+25,i)&&e>Math.min(i+25,i))}return this._focustd!==r&&(this._focused=r,this.invalidate()),r}};const pet=[];class get extends(det(Btt(ztt))){constructor(t,e){super(t,e),this._components=[]}replaceRefids(t){this.components.forEach((e=>e.replaceRefids(t)))}get showMoveHandle(){return!0}get showOverflow(){return!1}dispose(){this.components.slice().forEach((t=>t.dispose())),super.dispose()}isContainer(){return!0}containable(t){return t.isDescendible(this)}get hasTextProperty(){return!1}get components(){return this._components}get focusible(){return!0}get layout(){return Wtt.get(this.get("layout"))||net}reflow(){this.layout.reflow(this),this.components&&this.components.forEach((t=>{t.isContainer()&&t.reflow()}))}get hierarchy(){var t=super.hierarchy;return this.components&&(t.components=this.components.map((t=>t.hierarchy))),t}addComponent(t,e=!1){var r=t.parent;if(r){if(this===r)return;r.removeComponent(t,e)}var n=this._components.push(t)-1;t.parent=this,t.added(this),e||this.trigger("add",this,t,n),t.delegate_on(this),e||t.trigger("added",this,t,n),this.root&&this.root.isReady&&t.ready()}removeComponent(t,e=!1){var r=this._components.indexOf(t);-1!=r&&(this._components.splice(r,1),t.parent=null,t.removed(this),e||(this.trigger("remove",this,t),t.trigger("removed",this,t)),t.delegate_off(this))}insertComponentAt(t,e,r=!1){var n=t.parent;n&&n.removeComponent(t,r);var i=this._components.splice(0,e);this._components=i.concat(t,this._components),e=this._components.indexOf(t),t.parent=this,t.added(this),r||this.trigger("add",this,t,e),t.delegate_on(this),r||t.trigger("added",this,t,e)}add(t,e=!1){return t instanceof Array?(t.forEach((t=>{-1==this._components.indexOf(t)&&this.addComponent(t,e)})),this):this.add.call(this,[t],e)}remove(t,e=!1){return t instanceof Array?this._components?(t.forEach((t=>{this.removeComponent(t,e)})),this):this:this.remove.call(this,[t],e)}getAt(t){if(this._components)return this._components[t]}forEach(t,e){this._components&&this._components.forEach(t,e)}traverse(t,e){t.call(e,this),this._components&&this._components.forEach((r=>{r.isContainer()?r.traverse(t,e):t.call(e,r)}))}indexOf(t){return(this._components||pet).indexOf(t)}size(){return(this._components||pet).length}moveChildAt(t,e){var r=this.indexOf(e);if(-1!=r){var n=this._components.splice(0,r),i=this._components.splice(1);this._components=n.concat(i),t=Math.max(0,t),t=Math.min(t,this._components.length),n=this._components.splice(0,t),this._components=n.concat(e,this._components)}}moveChildForward(t){var e=this.indexOf(t);-1!=e&&e!=this.size()-1&&(this._components[e]=this._components[e+1],this._components[e+1]=t)}moveChildBackward(t){var e=this.indexOf(t);-1!=e&&0!=e&&(this._components[e]=this._components[e-1],this._components[e-1]=t)}moveChildToFront(t){var e=this.indexOf(t);if(-1!=e&&e!=this.size()-1){var r=this._components.splice(0,e),n=this._components.splice(1);this._components=r.concat(n,this._components)}}moveChildToBack(t){var e=this.indexOf(t);if(-1!=e&&0!=e){var r=this._components.splice(0,e),n=this._components.splice(0);this._components=this._components.concat(r,n)}}symmetryX(t){super.symmetryX(t),this.components.map((t=>{t.symmetryX(0)}))}findAll(t,...e){if("string"==typeof t)return B9(t,this,e[0]||this);if("function"==typeof t){var r=[];for(let n=this.components.length-1;n>=0;n--){let i=this.components[n].findAll(t,...e);i&&(r=r.concat(i))}return t(this,...e)&&r.push(this),r}}findFirst(t,...e){if("string"==typeof t)return B9(t,this,e[0])[0];if("function"==typeof t){for(let n=this.components.length-1;n>=0;n--){var r=this.components[n].findFirst(t,...e);if(null!=r)return r}return t(this,...e)?this:null}}findById(t){return this.root.findById(t)}findByRefid(t){return this.root.findByRefid(t)}contains(t,e){var r=super.contains(t,e);if(!r){var{left:n,top:i,width:a,height:o,lineWidth:s=0}=this.state,c=this.stuck?0:10+s/2;r=t<Math.max(n+a,n)+c&&t>Math.min(n+a,n)-c&&e<Math.max(i+o,i)+c&&e>Math.min(i+o,i)-c}return r}capture(t,e,r){var n=this.transcoordP2S(t,e);if(!this.contains(n.x,n.y))return!1;var i=this.bounds;n.x-=i.left,n.y-=i.top;var a=this.layout.capturables(this);for(let t=a.length-1;t>=0;t--){var o=a[t].capture(n.x,n.y,r);if(o)return o}return this.capturable&&!r?.(this)&&this}capturePath(t,e){if(e){if(e.indexOf(this)>-1)return!1;for(let t=0;t<e.length;t++)if(!this.containable(e[t]))return!1}var r=[],{left:n,top:i,width:a,height:o}=this.bounds;for(let e=0;e<t.length;e++){let s=this.transcoordP2S(t[e].x,t[e].y);if(s.x<n||s.x>n+a||s.y<i||s.y>i+o)return!1;s.x-=n,s.y-=i,r.push(s)}let s=this.layout.capturables(this);for(let t=s.length-1;t>=0;t--){let n=s[t];if(!n.isContainer())continue;let i=n.capturePath(r,e);if(i)return i}return this.focusible&&this}render(t){var{left:e=0,top:r=0,width:n,height:i}=this.bounds;t.beginPath(),t.rect(e,r,n,i),t.closePath(),this.drawFill(t),this.drawStroke(t)}postrender(t){super.postrender(t);var{left:e=0,top:r=0,width:n,height:i}=this.bounds;this.showOverflow||(t.beginPath(),t.rect(e,r,n,i),t.clip(),t.closePath());var{top:r,left:e,scale:a}=this.state;t.translate(e,r),this.layout.drawables(this).forEach((e=>{e.draw(t)})),t.translate(-e,-r),this.drawText(t)}trim(){this.components.forEach((t=>{t.trim()})),super.trim()}}["layout"].forEach((t=>ztt.memoize(get.prototype,t,!1)));class vet extends get{constructor(t,e){super(t,e),t.translate=t.translate||{x:0,y:0},this._draw_reserved=!1,this.__draw__=()=>{this._draw_reserved=!1,this.trigger("redraw"),this.reflow(),this.draw()},this.throttle_render=()=>{this._draw_reserved||requestAnimationFrame(this.__draw__),this._draw_reserved=!0}}fitSize(t,e,r,n){if(this.target){if(e){let t=getComputedStyle(this.target);r=r||(t?parseFloat(t.getPropertyValue("width")):this.target.clientWidth),n=n||(t?parseFloat(t.getPropertyValue("height")):this.target.clientHeight)}else r=this.model.width,n=this.model.height;"CANVAS"==t.tagName&&(t.setAttribute("width",r*M9),t.setAttribute("height",n*M9)),t.style.width=r+"px",t.style.height=n+"px"}}resize(){this.fitSize(this.element,!0)}isLayer(){return!0}get showOverflow(){return this.app.isEditMode}get anchors(){}createElement(){var t=ztt.createCanvas(1,1);return t.style.position="absolute",t}get target(){return this._target}set target(t){this._target&&this.element&&this._target.removeChild(this.element),this._target=t,t&&(this.element||(this.element=this.createElement()),this.resize(),t.appendChild(this.element))}get canvas(){return this.element}dispose(){super.dispose(),this.target=null,this.element=null}get selected(){return this.root.selected}set selected(t){this.root.selected=t}get focused(){return this.root.focused}set focused(t){this.root.focused=t}getContext(){return this._context2D||(this._context2D=this.canvas&&this.canvas.getContext("2d")),this._context2D}draw(t){this.canvas&&(t=t||this.getContext())&&super.draw(t)}prerender(t){var{translate:e,scale:r={x:1,y:1},rotation:n}=this.model;t.clearRect(0,0,t.canvas.width,t.canvas.height),e&&t.translate(e.x*M9,e.y*M9),t.scale(r.x*M9,r.y*M9),n&&t.rotate(n)}get rotatePoint(){return{x:0,y:0}}contains(t,e){return!1}invalidate(){this.throttle_render()}move(t){var e=this.get("translate")||{x:0,y:0};this.set({translate:{x:e.x+t.x,y:e.y+t.y}})}}const met={x:1,y:1},yet={x:0,y:0};class bet extends vet{constructor(t,e){super(t,e)}dispose(){super.dispose(),delete this._canvas,delete this._overlay}contains(t,e){return!0}isRootModel(){return!0}get stuck(){return!0}get layout(){return qtt}get overlay(){if(!this._overlay){var t=document.createElement("div");t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="initial",t.style["user-select"]="none",t.style["transform-origin"]="top left",this.element&&this.element.appendChild(t),this._overlay=t,this._repositionOverlay()}return this._overlay}createElement(){var t=document.createElement("div");return t.style.position="absolute",t.style["user-select"]="none",t.style.overflow="hidden",this._canvas=ztt.createCanvas(1,1),this._canvas.style.position="absolute",t.appendChild(this._canvas),this._overlay&&t.appendChild(this._overlay),t}resize(){if(this.target){var{width:t,height:e,fitMode:r}=this.model;this.root.fitMode?r=this.root.fitMode:r||(r="ratio");try{var n=getComputedStyle(this.target)}catch(t){return void console.error(t,this.target)}var i=n?parseFloat(n.getPropertyValue("width")):this.target.clientWidth,a=n?parseFloat(n.getPropertyValue("height")):this.target.clientHeight;switch(r){case"both":case"ratio":break;case"width":a=e*i/t;break;case"height":i=t*a/e;break;default:i=Math.max(t,i),a=Math.max(e,a)}switch(this.fitSize(this.canvas,!0,i,a),r){case"ratio":case"both":break;case"width":this.element.style.overflowX="hidden",this.element.style.overflowY="auto";break;case"height":this.element.style.overflowX="auto",this.element.style.overflowY="hidden";break;default:this.element.style.overflowX=i>t?"hidden":"auto",this.element.style.overflowY=a>e?"hidden":"auto"}this.fitSize(this.element,!0)}}get canvas(){return this._canvas}get MPP(){var{scale:t={x:1,y:1},unit:e}=this.model;switch(e){case"mm":case"cm":return 1/this.app.PPM/t.x;case"in":return 1/this.app.PPI/t.x;default:return 1/t.x}}capturePath(t,e){var r=this.layout.capturables(this);for(let n=r.length-1;n>=0;n--){let i=r[n];if(!i.isContainer())continue;let a=i.capturePath(t,e);if(a)return a}return!1}get eventMap(){return{"(self)":{"(all)":{change:this._onchanged_all,mouseenter:this._onmouseenter_all,mouseleave:this._onmouseleave_all,click:this._onclick,mousedown:this._onmousedownup,mouseup:this._onmousedownup,touchstart:this._onmousedownup,touchend:this._onmousedownup}}}}closeScene(t){requestAnimationFrame((()=>this.overlay.dispatchEvent(new CustomEvent("close-scene",{bubbles:!0,composed:!0,detail:t}))))}_repositionOverlay(){var t=this._overlay;if(t){var{translate:e=yet,scale:r=met,rotation:n=0}=this.model,{left:i,top:a,width:o,height:s}=this.bounds;t.style.left=i+"px",t.style.top=a+"px";var c=`rotate(${n}rad) scale(${r.x}, ${r.y}) perspective(1px)`;t.style["margin-left"]=e.x+"px",t.style["margin-top"]=e.y+"px",["-webkit-","-moz-","-ms-","-o-",""].forEach((e=>{t.style[e+"transform"]=c}))}}onchange(t){var e=this._model;delete e.id,delete e.text,delete e.class,this._repositionOverlay()}_onchanged_all(t,e,r){this.invalidate()}_onmouseenter_all(t,e){if(t.stopPropagation(),this.app&&!this.app.isEditMode&&e){var r=e.origin;if(!(r instanceof bet)&&r.model.event&&r.model.event.hover&&!r.hidden){var n=r.model.event.hover;n&&this._doEventAction(n,r,!0,t)}}}_onmouseleave_all(t,e){if(t.stopPropagation(),e){var r=e.origin;if(this.app&&!this.app.isEditMode){var n=r.model.event&&r.model.event.hover;n&&this._doEventAction(n,r,!1,t)}}}_onclick(t,e){if(t.stopPropagation(),!this.app.isEditMode&&e){var r=e.origin,n=r.model.event&&r.model.event.tap;n&&this._doEventAction(n,r,!0,t)}}_onmousedownup(t,e){if(t.stopPropagation(),!this.app.isEditMode&&e){var r=e.origin,n=r.model.event&&r.model.event.tap;n&&n.pressed&&this._doMouseDownUpEventAction(n,r,"mousedown"==t.type||"touchstart"==t.type,t)}}_doMouseDownUpEventAction(t,e,r,n){var{pressed:i=!1}=t;i&&(r?function(t){if(!t.hasOwnProperty("_backupShadow")){var e=t.get("shadow");t._backupShadow=e;var{left:r=0,top:n=0}=e||{};t.delta("tx",r),t.delta("ty",n),t.set("shadow",{})}}(e):function(t){t.hasOwnProperty("_backupShadow")&&(t.delta("tx",0),t.delta("ty",0),t.set("shadow",t._backupShadow),delete t._backupShadow)}(e))}_doEventAction(t,e,r,n){var{action:i,target:a,value:o,emphasize:s=!1,restore:c=!1,pressed:u=!1,options:l}=t;if(a&&(a=e.access(a)),o&&(o=e.access(o)),s&&(r?function(t){t.hasOwnProperty("_backupStrokeStyle")||(t._backupStrokeStyle=t.model.strokeStyle,t.set("strokeStyle","#f26522"),t.hasOwnProperty("_backupLineWidth")||(t._backupLineWidth=t.model.lineWidth,t.set("lineWidth",t.model.lineWidth+5)))}(e):c&&function(t){t.hasOwnProperty("_backupStrokeStyle")&&(t.set("strokeStyle",t._backupStrokeStyle),delete t._backupStrokeStyle,t.hasOwnProperty("_backupLineWidth")&&(t.set("lineWidth",t._backupLineWidth),delete t._backupLineWidth))}(e)),i)switch(i){case"data-toggle":if(!a)return;(r||c)&&this.root.findAll(a,e).forEach((t=>{t.data=!t.data}));break;case"data-tristate":if(!a)return;(r||c)&&this.root.findAll(a,e).forEach((t=>{let e=Math.round(Math.max(Number(t.data)||0,0));t.data=(e+(r?1:2))%3}));break;case"data-set":if(!a)return;if(r){var h=o;this.root.findAll(a,e).forEach((t=>{t.data=h}))}break;case"value-set":if(!a)return;if(r){h=o;this.root.findAll(a,e).forEach((t=>{t.value=h}))}break;case"infoWindow":case"info-window":if(!a)return;"click"==n.type||r?Gtt.show(e,a,c,{x:n.offsetX,y:n.offsetY}):c&&Gtt.hide(e,a);break;case"toggle-info-window":if(!a)return;Gtt.toggle(e,a,!1,{x:n.offsetX,y:n.offsetY});break;case"popup":case"modal-popup":if(!a)return;let t=l&&"input"in l?l.input:"(self)",s=!l||(!("output"in l)||l.output);ret.show(e,a,{data:t&&this.root.findFirst(t,e)?.data,output:s,modal:"modal-popup"===i});break;case"close-scene":this.closeScene(e.data);break;case"goto":this.trigger(i,a,l,e);break;default:this.trigger(i,a,o,e)}}}function xet(t,e){const r=t.state.refid;return t.root.findAll((t=>t.isLine()&&t.from.component===r&&(!e||t.from.anchor===e)))}function wet(t,e){const r=t.state.refid;return t.root.findAll((t=>t.isLine()&&t.to.component===r&&(!e||t.to.anchor===e)))}bet.Popup=ret,ztt.register("model-layer",bet);var Aet=t=>class extends t{isConnectable(){return!0}postrender(t){super.postrender(t),this._draw_anchors(t)}_draw_anchors(t){var e=this.anchors||[];t.save(),e.forEach((e=>{var{position:{x:r,y:n},draw:i}=e;if(i){t.beginPath();try{i.call(e,t,this)}catch(t){console.error(t)}t.closePath()}})),t.restore()}contains(t,e){if(n=super.contains(t,e))return n;var r=this.anchors||[];for(let i of r){const r=i.bounds;if(!r)continue;const{left:a,top:o,width:s,height:c}=r;var n;if(n=t<Math.max(a+s,a)&&t>Math.min(a+s,a)&&e<Math.max(o+c,o)&&e>Math.min(o+c,o))return n}return!1}findInOutLines(t){return function(t,e){const r=t.state.refid;return t.root.findAll((t=>!(!t.isLine()||(t.from.component!==r||e&&t.from.anchor!==e)&&(t.to.component!==r||e&&t.to.anchor!==e))))}(this,t)}findOutletLines(t){return xet(this,t)}findOutletEnds(t){return function(t,e){return xet(t,e).map((t=>t.toEnd?.component)).filter(Boolean)}(this,t)}findInletLines(t){return wet(this,t)}findInletEnds(t){return function(t,e){return wet(t,e).map((t=>t.fromEnd?.component)).filter(Boolean)}(this,t)}};const _et={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"round",name:"round",property:{min:0}}],help:"scene/component/rect"};var ket={ondragmove:function(t,e,r){var{left:n,top:i,width:a,height:o}=r.model,s=(r.transcoordP2S(t.x,t.y).x-n)/(a/2)*100;s=Eet(s,a,o),r.set({round:s})}};function Eet(t,e,r){var n=e>r?r/e*100:100;return t>=n?t=n:t<=0&&(t=0),t}class Met extends(Aet(Btt(Ftt))){is3dish(){return!0}get controls(){var{left:t,top:e,width:r,round:n,height:i}=this.state;return[{x:t+r/2*((n=null==n?0:Eet(n,r,i))/100),y:e,handler:ket}]}get nature(){return _et}}ztt.register("rect",Met);const Tet=[1,2,10,20,50,50,50,50,50,50];class Pet extends(Btt(Ftt)){render(t){const{lineWidth:e=1,fillStyle:r="lightgray",font:n="15px Arial",left:i,top:a,rotation:o,origin:s,margin:c,width:u,height:l,side:h="bottom",strokeStyle:f="#000000",scale:d=1}=this.state;t.translate(i,a),t.beginPath();const p=Math.round(e/2);t.rect(-p,-p,u+2*p,l+2*p),t.clip(),t.beginPath(),t.rect(0,0,u,l),r&&(t.fillStyle=r,t.fill()),t.lineWidth=e,t.strokeStyle=f,t.stroke(),t.beginPath(),t.font=n;var g="bottom"!==h,v=g?0:l,m=4*l/5,y=2*l/3,b=1*l/2,x=3*l/5;g&&(m=l-m,y=l-y,b=l-b,x=l-1.5*l/5);var w=d*this.app.PPM/this.root.unitScale,A=Math.ceil(s/w),_=this.app.PPM/w,k=_<=1.1?1:Tet[Math.round(_)]||100;1!=k&&(A+=(k-A%k)%k);var E=Math.ceil(A*w),S=s+u;for(t.fillStyle=f;E<S;){if(A%10==0){t.moveTo(E-s,b),t.lineTo(E-s,v);let e=(A/10).toString(),r=t.measureText(e);t.fillText(e,E-s-r.width-6,x)}else A%5==0?(t.moveTo(E-s,y),t.lineTo(E-s,v)):(t.moveTo(E-s,m),t.lineTo(E-s,v));A+=k,E=Math.ceil(A*w)}}}ztt.register("ruler",Pet);const Oet=20,Iet=0,Ret=20,Cet=0,jet=20,Det=20,Let=90*Math.PI/180,zet="9px Verdana",Fet=20,Bet="#f4f4f4",Net="#999";function Uet(t,e,r){return{left:-t.x,top:-t.y,width:Oet,height:Fet}}function Yet(t,e,r,n){return{left:Oet-t.x,top:Iet-t.y,origin:Ret-t.x,width:e-Oet,height:Fet}}function Get(t,e,r,n){var i={x:-t.x+Cet+Fet/2,y:-t.y+jet+(r-jet)/2},a=ztt.transcoordRR(-t.x+Cet,-t.y+jet,i,Let);return{left:a.x-(r-jet),top:a.y,origin:Det-t.y,width:r-jet,height:Fet}}function Het(t){var e=t.get("translate");return{left:-e.x,top:-e.y,width:t.canvas.width/M9,height:t.canvas.height/M9}}ztt.register("guide-layer",class extends vet{constructor(t,e){super(t,e),this.appScale={x:1,y:1},"disabled"!==t.ruler&&(this.hruler=new Pet({left:Oet,top:Iet,origin:Ret,margin:0,height:Fet,unit:"m",rotation:0,font:zet,fillStyle:Bet,strokeStyle:Net,capturable:!1}),this.vruler=new Pet({left:0,top:0,origin:Det,margin:0,height:Fet,unit:"m",rotation:Let,font:zet,side:"top",fillStyle:Bet,strokeStyle:Net,capturable:!1}),this.origin_rect=new Met({left:-Ret,top:-Det,width:Ret,height:Det,fillStyle:Bet,strokeStyle:Net,lineWidth:1}),this.addComponent(this.hruler),this.addComponent(this.vruler),this.addComponent(this.origin_rect)),this.invalidate()}get capturable(){return!1}ready(){if(super.ready(),this.hruler){var t=this.rootModel,e=Object.assign({},t.get("translate"));e.x<Oet&&(e.x+=Oet),e.y<jet&&(e.y+=jet);var r=t.get("scale")||{x:1,y:1};this.appScale=r,this.hruler.set("scale",r.x),this.vruler.set("scale",r.y),t.set("translate",e),this.set("translate",e),this.screen_coord=Het(this);var{width:n,height:i}=this.screen_coord;this.hruler.set(Yet(e,n,0,this.hruler)),this.vruler.set(Get(e,0,i,this.vruler)),this.origin_rect.set(Uet(e))}else this.screen_coord=Het(this)}resize(){super.resize(),this.screen_coord=Het(this);var{width:t,height:e}=this.screen_coord;this.hruler&&(this.hruler.set(Yet(this.model.translate,t,0,this.hruler)),this.vruler.set(Get(this.model.translate,0,e,this.vruler)),this.origin_rect.set(Uet(this.model.translate)))}render(t){if(this.guide){t.save();var{x:e,y:r}=this.guide,{top:n,left:i,width:a,height:o}=this.screen_coord;t.beginPath(),t.moveTo(e,n),t.lineTo(e,n+o),t.moveTo(i,r),t.lineTo(i+a,r),t.lineWidth=1,t.strokeStyle="tomato",t.setLineDash([2,3]),t.font="10px tahoma",t.fillStyle="#333";var s=this.transcoordS2C(e,r,this.rootModel);t.textBaseline=s.y>200?"bottom":"top",t.textAlign=s.x>200?"right":"left";var c=s.y>200?-5:5,u=s.x>200?-5:5,l=Math.round(e/this.appScale.x),h=Math.round(r/this.appScale.y);t.fillText(` ${l}, ${h} `,e+u,r+c),t.stroke(),t.restore()}}get guide(){return this._guide}set guide(t){this._guide=t,this.invalidate()}contains(t,e){return!0}get eventMap(){return{"(root)":{"(descendant)":{mousemove:this.onmousemove_child,mouseout:this.onmouseout_child,dragmove:this.onmousemove_child},"model-layer":{change:this.onchange_root_model}},"(self)":{"(descendant)":{mousedown:this.onmousedown_origin}}}}onmousedown_origin(t,e){this.rootModel.set("translate",{x:Ret,y:Det})}onchange_root_model(t,e,r){if(t.scale&&(this.appScale=t.scale,this.hruler&&(this.hruler.set("scale",t.scale.x),this.vruler.set("scale",t.scale.y))),t.translate&&this.set({translate:{x:t.translate.x,y:t.translate.y}}),t.scale||t.translate){if(this.screen_coord=Het(this),this.hruler){var{translate:n}=this.model,{width:i,height:a}=this.screen_coord;this.hruler.set(Yet(n,i,0,this.hruler)),this.vruler.set(Get(n,0,a,this.vruler)),this.origin_rect.set(Uet(n))}this._guide=null}this.invalidate()}onmouseout_child(t){this._guide=null,this.invalidate()}onmousemove_child(t,e){t.target&&"CANVAS"!==t.target.tagName?this.guide=null:this.guide=this.transcoordC2S(t.offsetX,t.offsetY)}});ztt.register("shift-layer",class extends vet{ready(){super.ready();var t=this.rootModel.get("translate");this.set("translate",t)}render(t){}contains(t,e){return!(2!=this.app.mode)}get eventMap(){return{"(root)":{"(self)":{keydown:this.onkeydown,keyup:this.onkeyup}}}}onkeydown(t){"Space"===t.code&&void 0===this.before_mode&&(this.before_mode=this.app.mode,this.app.mode=2)}onkeyup(t){"Space"===t.code&&(void 0!==this.before_mode&&(this.app.mode=this.before_mode),delete this.before_mode)}ondragstart(t){this.last_position=this.transcoordC2S(t.offsetX,t.offsetY)}ondragmove(t){var{x:e,y:r}=this.transcoordC2S(t.offsetX,t.offsetY);this.rootModel.move({x:e-this.last_position.x,y:r-this.last_position.y},!1),this.last_position=this.transcoordC2S(t.offsetX,t.offsetY)}});class Wet{constructor(t){this.params=Object.assign({},t)}excute(){}}class qet extends Wet{execute(){this.params.changes.forEach((t=>t.component.set(t.after)))}static before(t){return t.map((t=>({component:t})))}static after(t,e){e.execute(null,!1)}static around(t,e,r){e.call(r),t.execute(null,!1)}}const Xet="left",Vet="right",Qet="center",Ket="top",Jet="bottom",Zet="middle",$et=[Xet,Vet,Qet,Ket,Zet,Jet];function trt(t){if(-1!=$et.indexOf(t)){var e=this.selected.filter((t=>!t.stuck));if(!(e.length<=1)){var r=this.app.commander;qet.around(r,(function(){!function(t,e){var r=JSON.parse(JSON.stringify(e[0].bounds)),n=r.left+r.width,i=r.top+r.height;for(let t=0;t<e.length;t++){let a=e[t].bounds;r.left=a.left>r.left?r.left:a.left,r.top=a.top>r.top?r.top:a.top,n=a.left+a.width>n?a.left+a.width:n,i=a.top+a.height>i?a.top+a.height:i}switch(r.width=n-r.left,r.height=i-r.top,t){case Xet:for(let t=0;t<e.length;t++){let n=e[t].bounds;e[t].bounds={left:r.left,top:n.top,width:n.width,height:n.height}}break;case Qet:for(let t=0;t<e.length;t++){let n=e[t].bounds;e[t].bounds={left:r.left+r.width/2-n.width/2,top:n.top,width:n.width,height:n.height}}break;case Vet:for(let t=0;t<e.length;t++){let r=e[t].bounds;e[t].bounds={left:n-r.width,top:r.top,width:r.width,height:r.height}}break;case Ket:for(let t=0;t<e.length;t++){let n=e[t].bounds;e[t].bounds={left:n.left,top:r.top,width:n.width,height:n.height}}break;case Zet:for(let t=0;t<e.length;t++){let n=e[t].bounds;e[t].bounds={left:n.left,top:r.top+r.height/2-n.height/2,width:n.width,height:n.height}}break;case Jet:for(let t=0;t<e.length;t++){let r=e[t].bounds;e[t].bounds={left:r.left,top:i-r.height,width:r.width,height:r.height}}break;default:;}}(t,e)}))}}}const ert="VERTICAL",rrt=[ert,"HORIZONTAL"];function nrt(t){if(-1!=rrt.indexOf(t)){var e=this.selected;if(!(e.length<=1)){var r=this.app.commander;qet.around(r,(function(){!function(t,e){var r=e.filter((t=>!t.stuck)).slice(0);r.sort((function(e,r){let n=e.center,i=r.center;return t===ert?n.y-i.y:n.x-i.x}));var n=r.reduce(((e,r)=>e+(t===ert?r.bounds.height:r.bounds.width)),0),i=r[0].bounds,a=r[r.length-1].bounds,o=((t===ert?a.top+a.height-i.top:a.left+a.width-i.left)-n)/(r.length-1),s=t===ert?i.top+i.height:i.left+i.width;for(let e=1;e<r.length-1;e++){let n=r[e],i=n.bounds;s+=o,t===ert?(i.top=s,s+=i.height):(i.left=s,s+=i.width),n.bounds=i}}(t,e)}))}}}function irt(t){for(var e=0;t&&!t.isRootModel();)e+=t.get("rotation")||0,t=t.parent;return e%(2*Math.PI)}class art extends Wet{execute(){this.params.changes.forEach((t=>{let{component:e,to_container:r,to_index:n,to_left:i,to_top:a,hint:o}=t,s=function(t){if(t.isRootModel())return t.bounds;var{bounds:e,rotatePoint:r}=t,n=r;return{left:(n=t.transcoordS2T(n.x,n.y)).x-(r.x-e.left),top:n.y-(r.y-e.top),width:e.width,height:e.height}}(e),c=irt(e);if(e.removeSelf(!r),e.bounds=s,e.set("rotation",c),r){e.set("rotation",function(t,e){return((t.get("rotation")||0)-irt(e))%(2*Math.PI)}(e,r));let o=function(t,e){if(e.isRootModel())return t.bounds;var{bounds:r,rotatePoint:n}=t,i=e.transcoordT2S(n.x,n.y),a=e.bounds;return{left:i.x-(n.x-r.left)-a.left,top:i.y-(n.y-r.top)-a.top,width:r.width,height:r.height}}(e,r);t.to_left=void 0!==i?i:o.left,t.to_top=void 0!==a?a:o.top,e.bounds={left:t.to_left,top:t.to_top,width:o.width,height:o.height},void 0===n?r.addComponent(e):r.insertComponentAt(e,n)}}))}}function ort(t,e,r){this.app.commander.execute(new art({changes:[{component:t,to_container:e,to_index:r}]}))}function srt(t){var e=this.selected.filter((t=>!t.stuck));if(!(0==e.length||e[0].isRootModel()||e.length>1&&("forward"==t||"backward"==t))){var r,n=e[0].parent;if("forward"==t){let t=n.indexOf(e[0]);r=[{component:e[0],from_container:n,to_container:n,from_index:t,to_index:t+1}]}else if("backward"==t){let t=n.indexOf(e[0]);r=[{component:e[0],from_container:n,to_container:n,from_index:t,to_index:t-1}]}else r=e.filter((t=>t.parent===n)).sort(((e,r)=>{let i=n.indexOf(e)<n.indexOf(r);return"front"==t?i:!i})).map(((e,r)=>(n.indexOf(e),{component:e,to_container:n,to_index:"front"==t?n.components.length-r-1:r})));var i=new art({changes:r});this.app.commander.execute(i)}}function crt(t,e,r){var n=ztt.register(t.type);if(!n)return m9("Class not found",t.type),null;r&&(t.refid=r(t.refid));var i=new n(t,e);return t.components&&i.isContainer()&&(t.components.forEach((t=>{var n=crt(t,e,r);n&&i.addComponent(n)})),delete t.components),i.created(),i}function urt(t,e){var r=c7(t.hierarchy);return delete r.id,crt(r,t.app,e)}var lrt=Object.freeze({__proto__:null,compile:crt,duplicate:urt,select:B9,match:L9});function hrt(t,e,r){t instanceof Array||(t=[t]),r||(r=this.model_layer);var n=[],i=new Map;this.selected=t.map((t=>{try{return delete t.id,crt(t,r.app,(t=>{const e=this.getNewRefid();return void 0!==t&&i.set(t,e),e}))}catch(t){return console.warn(t),!1}})).filter(Boolean).map((t=>{let{left:a,top:o,width:s,height:c,x:u,y:l,cx:h,cy:f}=e;return t.replaceRefids(i),isNaN(a)||isNaN(o)||isNaN(s)||isNaN(c)||(t.bounds={left:a,top:o,width:s,height:c}),isNaN(u)||isNaN(l)||t.move({x:u,y:l},!1),isNaN(h)||isNaN(f)||(t.center={x:h,y:f}),n.push({component:t,to_container:r}),t})),this.app.commander.execute(new art({changes:n}))}function frt(t){t instanceof Array||(t=[t]),this.trigger("addstart",t)}function drt(){var t=[],e=new Map;if(this.selected=this.selected.filter((t=>!t.isRootModel())).map((r=>{let n=urt(r,(t=>{const r=this.getNewRefid();return void 0!==t&&e.set(t,r),r}));return n.move({x:20,y:20},!1),t.push({component:n,to_container:r.parent}),n})).map((t=>(t.replaceRefids(e),t))),0!=t.length){var r=new art({changes:t});this.app.commander.execute(r)}}function prt(){var t=this.selected;this.selected=[];for(var e=null,r=t.filter((t=>!t.isRootModel()&&(t.parent.focusible||t.parent.isGroup()))).map((t=>(e||(e=t.parent),{component:t,to_container:null})));e&&e.isGroup();){let t=[];if(e.components.filter((t=>!r.find((e=>e.component===t)))).forEach((e=>t.push(e))),t.length>1)break;let n=e.parent;t.forEach((t=>r.push({component:t,to_container:n}))),r.push({component:e,to_container:null}),e=n}r.length>0&&this.app.commander.execute(new art({changes:r})),e&&e.calculateBounds&&e.calculateBounds()}function grt(t,e,r){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app?.commander.on(t,e,r);break;case"mode":this.app?.on(t,e,r);break;default:this.on(t,e,r)}}function vrt(t,e,r){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app?.commander.once(t,e,r);break;case"mode":this.app.once(t,e,r);break;default:this.once(t,e,r)}}function mrt(t,e,r){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app?.commander.off(t,e,r);break;case"mode":this.app?.off(t,e,r);break;default:this.off(t,e,r)}}function yrt(t){var e=this.target_element,r=t||this.fitMode,n=this;function i(t){n.fit(r),document.fullscreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement||["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"].forEach((t=>document.removeEventListener(t,i)))}["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"].forEach((t=>document.addEventListener(t,i))),e.requestFullScreen?e.requestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}var brt=0;function xrt(){var t=this.selected.filter((t=>!t.isRootModel())).map((t=>t.hierarchy));if(0!=t.length)return brt=0,JSON.stringify(t,null,2)}function wrt(){brt=0;var t=xrt.call(this);return prt.call(this),t}function Art(t){if(t)try{JSON.parse(t);brt++,hrt.call(this,JSON.parse(t),{x:15*brt,y:15*brt})}catch(e){v9(e,t)}}var _rt=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var r=t(e).toLowerCase();return(n="application/font-woff",i="image/jpeg",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i,jpeg:i,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[r]||"";var n,i},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var r=window.atob(t.toDataURL().split(",")[1]),n=r.length,i=new Uint8Array(n),a=0;a<n;a++)i[a]=r.charCodeAt(a);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var r=document.implementation.createHTMLDocument(),n=r.createElement("base");r.head.appendChild(n);var i=r.createElement("a");return r.body.appendChild(i),n.href=e,i.href=t,i.href},getAndEncode:function(t){var e=3e4;Rrt.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(r){var n,i=new XMLHttpRequest;if(i.onreadystatechange=o,i.ontimeout=s,i.responseType="blob",i.timeout=e,i.open("GET",t,!0),i.send(),Rrt.impl.options.imagePlaceholder){var a=Rrt.impl.options.imagePlaceholder.split(/,/);a&&a[1]&&(n=a[1])}function o(){if(4===i.readyState)if(200===i.status){var e=new FileReader;e.onloadend=function(){var t=e.result.split(/,/)[1];r(t)},e.readAsDataURL(i.response)}else n?r(n):c("cannot fetch resource: "+t+", status: "+i.status)}function s(){n?r(n):c("timeout of "+e+"ms occured while fetching resource: "+t)}function c(t){console.error(t),r("")}}))},uid:function(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}(),delay:function(t){return function(e){return new Promise((function(r){setTimeout((function(){r(e)}),t)}))}},asArray:function(t){for(var e=[],r=t.length,n=0;n<r;n++)e.push(t[n]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,r){var n=new Image;n.onload=function(){e(n)},n.onerror=r,n.src=t}))},width:function(t){var r=e(t,"border-left-width"),n=e(t,"border-right-width");return t.scrollWidth+r+n},height:function(t){var r=e(t,"border-top-width"),n=e(t,"border-bottom-width");return t.scrollHeight+r+n}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var r=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(r.replace("px",""))}}(),krt=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,i,a){return o()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return n(e,t,i,a)}))})),r}));function o(){return!e(t)}},shouldProcess:e,impl:{readUrls:r,inline:n}};function e(e){return-1!==e.search(t)}function r(e){for(var r,n=[];null!==(r=t.exec(e));)n.push(r[1]);return n.filter((function(t){return!_rt.isDataUrl(t)}))}function n(t,e,r,n){return Promise.resolve(e).then((function(t){return r?_rt.resolveUrl(t,r):t})).then(n||_rt.getAndEncode).then((function(t){return _rt.dataAsUrl(t,_rt.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+_rt.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),Ert=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(_rt.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{_rt.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return krt.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return krt.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),Srt=function(){return{inlineAll:function e(r){return r instanceof Element?n(r).then((function(){return r instanceof HTMLImageElement?t(r).inline():Promise.all(_rt.asArray(r.childNodes).map((function(t){return e(t)})))})):Promise.resolve(r);function n(t){var e=t.style.getPropertyValue("background");return e?krt.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}},impl:{newImage:t}};function t(t){return{inline:function(e){return _rt.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||_rt.getAndEncode).then((function(e){return _rt.dataAsUrl(e,_rt.mimeType(t.src))})).then((function(e){return new Promise((function(r,n){t.onload=r,t.onerror=n,t.src=e}))}))}}}}(),Mrt={imagePlaceholder:void 0,cacheBust:!1};function Trt(t,e){return function(t){void 0===t.imagePlaceholder?Rrt.impl.options.imagePlaceholder=Mrt.imagePlaceholder:Rrt.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?Rrt.impl.options.cacheBust=Mrt.cacheBust:Rrt.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return Ort(t,e.filter,!0)})).then(Irt).then((function(t){var{bgcolor:r,width:n,height:i,style:a,sx:o=1,sy:s=1}=e,c=t.style;r&&(c.backgroundColor=r);n&&(c.width=n+"px");i&&(c.height=i+"px");c["margin-left"]="0px",c["margin-top"]="0px",["-webkit-","-moz-","-ms-","-o-",""].forEach((t=>{c[t+"transform"]=`rotate(0rad) translate(0px, 0px) scale(${o}, ${s}) perspective(1px)`})),a&&Object.keys(a).forEach((function(t){c[t]=a[t]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(_rt.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||_rt.width(t),e.height||_rt.height(t))}))}function Prt(t,e){return Trt(t,e).then(_rt.makeImage).then(_rt.delay(100)).then((function(r){var n=function(t){var r=document.createElement("canvas");if(r.width=e.width||_rt.width(t),r.height=e.height||_rt.height(t),e.bgcolor){var n=r.getContext("2d");n.fillStyle=e.bgcolor,n.fillRect(0,0,r.width,r.height)}return r}(t);return n.getContext("2d").drawImage(r,0,0),n}))}function Ort(t,e,r){return r||!e||e(t)?Promise.resolve(t).then((function(t){if(t instanceof HTMLCanvasElement)try{return _rt.makeImage(t.toDataURL())}catch(t){m9(t)}return t.cloneNode(!1)})).then((function(r){return function(t,e,r){var n=t.childNodes;return 0===n.length?Promise.resolve(e):i(e,_rt.asArray(n),r).then((function(){return e}));function i(t,e,r){var n=Promise.resolve();return e.forEach((function(e){n=n.then((function(){return Ort(e,r)})).then((function(e){e&&t.appendChild(e)}))})),n}}(t,r,e)})).then((function(e){return function(t,e){return e instanceof Element?Promise.resolve().then(r).then(n).then(i).then(a).then((function(){return e})):e;function r(){function r(t,e){function r(t,e){_rt.asArray(t).forEach((function(r){e.setProperty(r,t.getPropertyValue(r),t.getPropertyPriority(r))}))}t.cssText?e.cssText=t.cssText:r(t,e)}r(window.getComputedStyle(t),e.style)}function n(){function r(r){var n=window.getComputedStyle(t,r),i=n.getPropertyValue("content");if(""!==i&&"none"!==i){var a=_rt.uid();e.className=e.className+" "+a;var o=document.createElement("style");o.appendChild(s(a,r,n)),e.appendChild(o)}function s(t,e,r){var n="."+t+":"+e,i=r.cssText?a(r):o(r);return document.createTextNode(n+"{"+i+"}");function a(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function o(t){return _rt.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){r(t)}))}function i(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function a(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var r=e.getAttribute(t);r&&e.style.setProperty(t,r)})))}}(t,e)})):Promise.resolve()}function Irt(t){return Srt.inlineAll(t).then((function(){return t}))}var Rrt={toSvg:Trt,toPng:function(t,e){return Prt(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return Prt(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return Prt(t,e||{}).then(_rt.canvasToBlob)},toPixelData:function(t,e){return Prt(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,_rt.width(t),_rt.height(t)).data}))},impl:{fontFaces:Ert,images:Srt,util:_rt,inliner:krt,options:{}}};function Crt(t,e,r,n){var i=this.model_layer,a=i._overlay;return new Promise((function(o,s){if(i){var c=i.get("width"),u=i.get("height");r=r||c,n=n||u;var l=i.get("translate"),h=i.get("scale"),f=Math.min(r/c,n/u);r=c*f,n=u*f,i.set("translate",{x:0,y:0}),i.set("scale",{x:f/M9,y:f/M9});var d=ztt.createCanvas(r,n),p=d.getContext("2d");if(i.draw(p),i.set("translate",l),i.set("scale",h),!a)return o(d.toDataURL(t,e)),void(d=null);Rrt.toPng(a,{sx:f,sy:f,width:r,height:n}).then((function(i){var a=new Image;a.onload=function(){p.drawImage(a,0,0,r,n),o(d.toDataURL(t,e)),d=null},a.src=i}),(function(r){v9(r),o(d.toDataURL(t,e)),d=null}))}else s("No target model")}))}function jrt(){var t=this.selected.filter((t=>!!t.parent&&!t.stuck));if(!(t.length<2)){var e=t[0].parent,r=[],n=t.sort(((t,r)=>e.components.indexOf(t)-e.components.indexOf(r)));n.forEach((t=>{r.push(t.bounds)}));var i=ztt.union(r),a=t[0].transcoordP2S(i.left,i.top);a=t[0].transcoordS2T(a.x,a.y);var o=new Map,s=crt({type:"group",left:a.x,top:a.y,width:i.width,height:i.height},e.app,(t=>{const e=this.getNewRefid();return void 0!==t&&o.set(t,e),e}));s.replaceRefids(o);var c=[{component:s,to_container:e}];n.forEach((t=>{c.push({component:t,to_container:s})})),this.app.commander.execute(new art({changes:c})),this.selected=[s]}}function Drt(){if(0!==this.selected.length){var t=[],e=[];this.selected.forEach((r=>{if(r.isGroup()){var n=r.parent;r.components.forEach((r=>{t.push(r),e.push({component:r,to_container:n})})),e.push({component:r,to_container:null})}})),this.app.commander.execute(new art({changes:e})),this.selected=t}}function Lrt(){var t=this.selected;if(0!=t.length){var e=t.map((t=>t.bounds)),r=ztt.union(e),n=r.left+r.width/2;t.map((t=>{t.symmetryX(n)}))}}function zrt(){var t=this.selected;if(0!=t.length){var e=t.map((t=>t.bounds)),r=ztt.union(e),n=r.top+r.height/2;t.map((t=>{t.symmetryY(n)}))}}function Frt(){qet.around(this.app.commander,Lrt,this)}function Brt(){qet.around(this.app.commander,zrt,this)}function Nrt(t,e,r){var n=this.findAll(t,r);return n.forEach((t=>{t.set(e)})),n}function Urt(t){qet.around(this.app.commander,t)}function Yrt(){return Object.values(this.indexMap).map((t=>{let{id:e,data:r}=t.model;return{key:e,value:r}})).sort(((t,e)=>t.key>e.key?1:-1))}function Grt(t,e,r,n){var i=t.selected,a=n?i.slice(0):[];n&&a.length>0?e=a[0].parent:e.isContainer()||(e=e.parent);var o=e.layout.capturables(e),s=!!e.layout.joinType;if(n&&r.selected.forEach((t=>{a.splice(a.indexOf(t),1)})),r.selected=[],o.forEach((t=>{t.capturable&&function(t,e,r){var n,i,a,o,{sx:s,sy:c,ex:u,ey:l}=e;if(s>u?(n=u,i=s):(n=s,i=u),c>l?(a=l,o=c):(a=c,o=l),r){var h=t.bounds,f=t.transcoordS2TR(h.left,h.top),d=t.transcoordS2TR(h.left+h.width,h.top+h.height),p=f.x,g=d.x,v=f.y,m=d.y,y=Math.min(n,p,i,g),b=Math.max(n,p,i,g),x=Math.min(a,v,o,m),w=Math.max(a,v,o,m);return!(b-y>Math.abs(i-n)+Math.abs(g-p)||w-x>Math.abs(o-a)+Math.abs(m-v))}var A=t.path;if(!A)return error("컴포넌트에 get path가 잘못 구현되어있음.",t),!1;for(let e=0;e<A.length;e++){let r=t.transcoordS2TR(A[e].x,A[e].y);if(n>r.x||i<r.x||a>r.y||o<r.y)return!1}return!0}(t,r,s)&&-1==a.indexOf(t)&&r.selected.push(t)})),a=a.concat(r.selected),i.length!==a.length)t.selected=a;else for(let e=0;e<a.length;e++)if(i[e]!=a[e]){t.selected=a;break}}function Hrt(t,e,r,n,i){i||Grt(t,e,r,n)}ztt.register("add-layer",class extends vet{ready(){super.ready();var t=this.rootModel,e=t.get("translate"),r=t.get("scale");this.set("translate",e),this.set("scale",r)}render(t){var e=this.addbox;if(e){let{sx:r,sy:n,ex:i,ey:a}=e,o=this.get("scale")||{x:1,y:1};t.beginPath(),t.rect(r,n,i-r,a-n),t.setLineDash([2/o.x,4/o.y]),t.lineWidth=1/o.x,t.strokeStyle="black",t.stroke()}}contains(t,e){return!(3!=this.app.mode)}get eventMap(){return{"(root)":{"(self)":{addstart:this.onaddstart,addstop:this.onaddstop,keydown:this.onkeydown,dragstart:this.ondragstart,dragmove:this.ondragmove,dragend:this.ondragend,mousedown:this.onmousedown,mouseup:this.onmouseup}},"model-layer":{"(self)":{change:this.onchange_root_model}}}}onchange_root_model(t,e,r){t.translate&&this.set("translate",t.translate),t.scale&&this.set("scale",t.scale)}onaddstart(t,e){void 0===this.before_mode&&(this.before_mode=this.app.mode,this.models=t,this.app.mode=3)}onaddstop(){void 0!==this.before_mode&&(this.app.mode=this.before_mode),delete this.before_mode,delete this.addbox,this.invalidate()}onkeydown(t){3===this.app.mode&&"Esc"===t.code&&this.root.trigger("addstop")}ondragstart(t){var{x:e,y:r}=this.transcoordC2S(t.offsetX,t.offsetY);this.addbox={sx:e,sy:r}}ondragmove(t){if(3===this.app.mode){var{x:e,y:r}=this.transcoordC2S(t.offsetX,t.offsetY);this.addbox&&(this.addbox.ex=e,this.addbox.ey=r,this.invalidate())}}ondragend(t,e){if(3!==this.app.mode)return;const{sx:r,sy:n,ex:i,ey:a}=this.addbox;hrt.call(this.root,this.models,{left:Math.min(r,i),top:Math.min(n,a),width:Math.abs(i-r),height:Math.abs(a-n)}),this.root.trigger("addstop")}onmousedown(t,e){3===this.app.mode&&(this.downpoint={x:t.offsetX,y:t.offsetY})}onmouseup(t,e){if(this.downpoint.x===t.offsetX&&this.downpoint.y===t.offsetY){var{x:r,y:n}=this.transcoordC2S(t.offsetX,t.offsetY);hrt.call(this.root,this.models,{cx:r,cy:n}),this.root.trigger("addstop")}}});ztt.register("selection-layer",class extends vet{ready(){super.ready();var t=this.rootModel,e=t.get("translate"),r=t.get("scale");this.set("translate",e),this.set("scale",r)}contains(t,e){return!1}render(t){var e=this.selbox;if(e){let{sx:r,sy:n,ex:i,ey:a}=e,o=this.get("scale")||{x:1,y:1};t.beginPath(),t.rect(r,n,i-r,a-n),t.setLineDash([2/o.x,4/o.y]),t.lineWidth=1/o.x,t.strokeStyle="black",t.stroke()}}get eventMap(){return{"(root)":{"(self)":{keydown:this.onkeydown}},"model-layer":{"(self)":{change:this.onchange_root_model},"(all)":{dragstart:this.ondragstart_selbox,dragmove:this.ondragmove_selbox,dragend:this.ondragend_selbox,mousedown:this.onmousedown_comp,mouseup:this.onmouseup_comp}}}}onkeydown(t,e){var{origin:r,deliverer:n}=e,i=n.selected;if(1!==i.length)return!1;var a=i[0],o=a.parent;if(!o||o===n)return!1;if("Tab"===t.code){var s=o.layout.capturables(o),c=s.indexOf(a);if(-1==c){if(!o.indexOf(a))return m9("Container not contains [",a,"] as a component"),!1;c=0}var u=s.length;t.shiftKey?c--:c++,a=s[(c+u)%u]}else{if(!o.layout.keyNavigate)return!1;a=o.layout.keyNavigate(o,a,t)||a}n.selected=[a],t.preventDefault()}onchange_root_model(t,e,r){t.translate&&this.set("translate",t.translate),t.scale&&this.set("scale",t.scale)}_pendingDecision(t){this.downpoint={x:t.offsetX,y:t.offsetY}}_selectGroupItem(t,e){var r=this.selected.indexOf(t);let n=t.parent;for(;n.parent.isGroup();)n=n.parent;let i=[],a=!1,o=!1;if(this.selected.forEach((t=>{let e=t.parent;if(t!==n){for(;e.parent&&e.parent.isGroup();)e=e.parent;e===n&&(i.push(t),a=!0)}else o=!0})),a)if(e.shiftKey){if(-1!=r)return void this._pendingDecision(e);i.push(t)}else{if(-1!=r)return void this._pendingDecision(e);i=[t]}else{if(o)return void this._pendingDecision(e);if(e.shiftKey)if(this.selected.length>0){if(-1!=this.selected.indexOf(n)||this.selected[0].parent!==n.parent)return;i=[...this.selected,n]}else i=[n];else i=[n]}this.selected=i}onmousedown_comp(t,e){var{origin:r}=e;if(this.downpoint=null,t.shiftKey){if(r.parent.isGroup())return void this._selectGroupItem(r,t);if(-1!=this.selected.indexOf(r))return void this._pendingDecision(t);{let e=this.selected.filter((t=>!t.isRootModel()&&!!t.parent)),n=e.length>0&&e[0].parent;if(n&&n!==r.parent)return void(r.parent.isGroup()&&this._pendingDecision(t));e.push(r),this.selected=e}}else{if(r.parent.isGroup())return void this._selectGroupItem(r,t);if(-1!=this.selected.indexOf(r))return;this.selected=[r]}}onmouseup_comp(t,e){if(!this.downpoint)return;if(this.downpoint.x!==t.offsetX||this.downpoint.y!==t.offsetY)return;var{origin:r}=e;let n=this.selected.indexOf(r);if(-1==n&&r.parent.isGroup()&&(n=this.selected.indexOf(r.parent)),-1!==n&&t.shiftKey){let t=this.selected.slice();return n>-1&&t.splice(n,1),void(this.selected=t)}r.parent.isGroup()&&(this.selected=[r])}ondragstart_selbox(t,e){var{origin:r}=e;if(r.stuck){var{x:n,y:i}=this.transcoordC2S(t.offsetX,t.offsetY);this.selbox={sx:n,sy:i,selected:[]}}}ondragmove_selbox(t,e){var{origin:r}=e;if(r.stuck){var{x:n,y:i}=this.transcoordC2S(t.offsetX,t.offsetY);this.selbox&&(this.selbox.ex=n,this.selbox.ey=i,Hrt(this,r,this.selbox,t.shiftKey),this.invalidate())}}ondragend_selbox(t,e){var{origin:r}=e;r.stuck&&(this.last_pos=null,this.selbox=null,Hrt(this,null,null,!1,!0),this.invalidate())}});class Wrt{constructor(t){this.layer=t}draw(t,e,r){var{left:n,top:i,width:a,height:o}=e.bounds;0!=a&&0!=o&&(t.beginPath(),t.rect(n,i,a,o),t.clip(),t.beginPath(),t.strokeStyle="#f26522",t.lineWidth=4,t.shadowBlur=10,t.shadowColor="black",t.shadowOffsetX=0,t.shadowOffsetY=0,t.rect(n,i,a,o),t.stroke(),t.closePath())}}class qrt{constructor(t){this.layer=t}draw(t,e,r){var n=e.bounds;t.beginPath(),t.rect(n.left-4/r.x,n.top-4/r.y,n.width+8/r.x,n.height+8/r.y),t.setLineDash([3/r.x,4/r.y]),t.lineWidth=1/r.x,t.strokeStyle="black",t.stroke(),t.setLineDash([]),t.closePath()}}class Xrt{constructor(t){this.layer=t}reset(){this.active=null}get selected(){return this.layer.selected}contains(t,e,r,n){let i=r.controls;return!!i&&(i.every(((i,a)=>(Math.abs(t-i.x)<=4/n.x&&Math.abs(e-i.y)<=4/n.y&&(this.active={component:r,index:a,handler:i.handler}),!this.active))),!!this.active)}draw(t,e,r){var n=e.controls;n&&n.forEach(((e,n)=>{t.beginPath(),t.lineWidth=1/r.x,t.ellipse(e.x,e.y,4/r.x,4/r.y,0,0,2*Math.PI,!0),t.fillStyle="#ff5d72",t.fill(),t.strokeStyle="#fff",t.stroke()}))}onevent(t,e){var{handler:r,component:n,index:i}=this.active,a=n.transcoordC2S(e.offsetX,e.offsetY);a=n.transcoordS2P(a.x,a.y),r&&"function"==typeof r[t]&&r[t](a,i,n)}onmousedown(t){this.onevent("onmousedown",t)}ondragstart(t){var e=this.active;e.changes=qet.before([e.component]),this.onevent("ondragstart",t)}ondragmove(t){this.onevent("ondragmove",t)}ondragend(t){this.onevent("ondragend",t);var{component:e,changes:r}=this.active;qet.after(r,e.app.commander),e.parent&&e.parent.calculateBounds&&e.parent.calculateBounds()}}function Vrt(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}const Qrt=15*Math.PI/180;class Krt{constructor(t){this.layer=t}reset(){this.active=null,this.created=null}get selected(){return this.layer.selected}contains(t,e,r,n){return!!r.mutable&&(r.path.every(((i,a)=>(Math.abs(t-i.x)<=4/n.x&&Math.abs(e-i.y)<=4/n.y&&(this.active={component:r,index:a}),!this.active))),!!this.active)}startLinkProcess(t,e,r){try{var n=crt(e,t.app);return t.rootModel.addComponent(n),this.layer.selected=[n],this.active={component:n,index:1},this.ondragstart(r),n}catch(t){console.warn(r)}}draw(t,e,r){if(e.mutable&&!e.stuck){var n=e.path,i=this.active;n.forEach(((n,a)=>{t.beginPath(),t.ellipse(n.x,n.y,4/r.x,4/r.y,0,0,2*Math.PI,!0),t.lineWidth=1/r.x,t.strokeStyle="#656565",t.fillStyle="#fff",i&&i.component===e&&i.index===a&&(t.strokeStyle="#fa7703",i.toFill&&(t.fillStyle="#ffb80c")),t.fill(),t.stroke()}))}}ondblclick(t){var e=this.active.component;if(e.pathExtendable){var r=e.path.slice();r.length<3||(r.splice(this.active.index,1),e.path=r)}}onmousedown(t){this.active.toFill=!0}ondragstart(t){var{index:e,component:r}=this.active;this.created||(this.active.changes=qet.before([r])),0!==e&&e!==r.path.length-1||(this.layer.counterEnd=0===e?r.toEnd||{fromto:"to"}:r.fromEnd||{fromto:"from"})}ondragmove(t){var{component:e,index:r}=this.active||{};const{offsetX:n,offsetY:i}=t;var a,o,s=e.transcoordC2S(n,i);if(s=e.transcoordS2P(s.x,s.y),t.shiftKey){var c=e.path.length,u=e.isLine()&&0==r?e.path[1]:e.path[(r-1+c)%c];u=e.transcoordS2P(u.x,u.y);var l,h=0;if(c>2)e.isLine()?0==r?l=e.path[2]:1!=r&&(l=e.path[r-2]):l=e.path[(r-2+c)%c],l&&(h=Vrt(l=e.transcoordS2P(l.x,l.y),u));var f=Math.round((Vrt(u,s)-h)/Qrt)*Qrt+h;s=function(t,e,r){return{x:Math.cos(e)*r+t.x,y:Math.sin(e)*r+t.y}}(u,f,(a=u,o=s,Math.sqrt((o.x-a.x)*(o.x-a.x)+(o.y-a.y)*(o.y-a.y))))}if(0===r||r===e.path.length-1){const t=this.layer.anchorTarget=e.rootModel.capture(n,i,(t=>!t.isConnectable()));if(t){const{x:a,y:o}=t.transcoordC2S(n,i),c=this.layer.get("scale")||{x:1,y:1},u=this.layer.counterEnd,l=(t.anchors||[]).find((r=>{const{name:n,inout:i,multiplicity:s=1/0,position:l,filter:h}=r;if(u){const{anchor:t,fromto:e}=u;if(t&&("out"===t.inout&&"out"===i||"in"===t.inout&&"in"===i))return!1;if("from"===e&&"out"===i||"to"===e&&"in"===i)return!1}else console.error("should not be here.");if(Math.abs(a-l.x)>8/c.x||Math.abs(o-l.y)>8/c.y)return!1;const f=t.findInOutLines(n);return!!f.includes(e)||!(s!==1/0&&f.length>=s)&&(!u||!h||!!h.call(r,u))}));l?0==r?e.from={component:t.get("refid"),anchor:l.name,position:s}:e.to={component:t.get("refid"),anchor:l.name,position:s}:0==r?e.from={position:s}:e.to={position:s}}}e.mutatePath(null,(function(t){t[r]=s}))}ondragend(t){var{component:e,index:r,changes:n}=this.active;if(0===r||r===e.path.length-1){const{offsetX:n,offsetY:i}=t,a=e.rootModel.capture(n,i,(t=>t===e||t.isLine())),{x:o,y:s}=a.transcoordC2S(n,i),c=this.layer.get("scale")||{x:1,y:1},u=(a.anchors||[]).find((t=>t&&Math.abs(o-t.position.x)<=8/c.x&&Math.abs(s-t.position.y)<=8/c.y));u&&(0==r?e.from={component:a.get("refid"),anchor:u.name}:e.to={component:a.get("refid"),anchor:u.name}),this.layer.endLinkProcess()}if(this.created){let t=new art({changes:[{component:this.created,to_container:this.created.parent}]});created.app.commander.execute(t)}else qet.after(n,e.app.commander);e.parent&&e.parent.calculateBounds&&e.parent.calculateBounds()}}class Jrt{constructor(t){this.layer=t}get active(){return this._active?.component.disposed&&(this._active=null),this._active}set active(t){this._active=t}reset(){this.active=null}contains(t,e,r,n){const i=this.active?.component===r&&this.active?.anchor;this.active=null;const a=this.layer.counterEnd;return(r.isConnectable()&&!r.disposed&&r.anchors||[]).filter((t=>{const{name:e,inout:n,multiplicity:i=1/0,filter:o}=t;if(a){const{anchor:t,fromto:e}=a;if(t&&("out"===t.inout&&"out"===n||"in"===t.inout&&"in"===n))return!1;if("from"===e&&"out"===n||"to"===e&&"in"===n)return!1}else if("in"===n)return!1;return!(i!==1/0&&r.findInOutLines(e).length>=i)&&(!o||!a||!!o.call(t,a))})).every((a=>{const o=i===a.name?2:1;return a&&a.position&&Math.abs(t-a.position.x)<=4*o/n.x&&Math.abs(e-a.position.y)<=4*o/n.y&&(this.active={component:r,anchor:a.name,template:a.template}),!this.active})),!!this.active}draw(t,e,r){if(!e.get("refid")||e.isLine())return;var n=this.active;const i=this.active?.component===e&&this.active?.anchor,a=this.layer.counterEnd;(e.isConnectable()&&!e.disposed&&e.anchors||[]).filter((t=>{const{name:r,inout:n,multiplicity:i=1/0,filter:o}=t;if(a){const{anchor:t,fromto:e}=a;if(t&&("out"===t.inout&&"out"===n||"in"===t.inout&&"in"===n))return!1;if("from"===e&&"out"===n||"to"===e&&"in"===n)return!1}else if("in"===n)return!1;return!(i!==1/0&&e.findInOutLines(r).length>=i)&&(!a||!o||!!o.call(t,a))})).forEach((a=>{const{name:o,position:s}=a,c=i===o?2:1;s&&(t.beginPath(),t.ellipse(s.x,s.y,4*c/r.x,4*c/r.y,0,0,2*Math.PI),t.setLineDash([0,0]),t.lineWidth=1/r.x,t.strokeStyle="#656565",t.stroke(),t.fillStyle="#fff",n&&n.component===e&&n.anchor===o&&(t.strokeStyle="#fa7703",n.focus&&(t.fillStyle="#ffb80c")),t.fill(),t.stroke())}))}onmousedown(t){this.active.focus=!0}ondragstart(t){const{component:e,anchor:r,template:n}=this.active,i=this.layer.transcoordC2S(t.offsetX,t.offsetY);this.layer.startLinkProcess(e,{type:"ortholine",lineWidth:1,strokeStyle:"black",begin:"oval",beginSize:"size9",end:"arrow",endSize:"size9",lineDash:"solid",lineCap:"butt",round:10,...n,from:{component:e.get("refid"),anchor:r,position:i},to:{position:i}},t)}ondragmove(t){}ondragend(t){}}const Zrt=50,$rt=0,tnt=1,ent=2,rnt=3,nnt=4,int=5,ant=6,ont=7;function snt(t,e,r){var n,i,{left:a,top:o,width:s,height:c}=t.bounds;switch(e){case $rt:n=a,i=o;break;case tnt:n=a+s/2,i=o;break;case ent:n=a+s,i=o;break;case rnt:n=a+s,i=o+c/2;break;case nnt:n=a+s,i=o+c;break;case int:n=a+s/2,i=o+c;break;case ant:n=a,i=o+c;break;case ont:n=a,i=o+c/2}var u=n,l=i,h=t.transcoordT2S(r.x,r.y);return{dx:h.x-u,dy:h.y-l}}function cnt(t,e,r,n,i,a){var{left:o,top:s,width:c,height:u}=t.bounds,l={left:o,top:s,width:c,height:u};switch(e){case $rt:o+=n,s+=i,c-=n,u-=i;break;case tnt:s+=i,u-=i;break;case ent:s+=i,c+=n,u-=i;break;case rnt:c+=n;break;case nnt:c+=n,u+=i;break;case int:u+=i;break;case ant:o+=n,c-=n,u+=i;break;case ont:o+=n,c-=n}if(t.mutateBounds((function(e){return Math.abs(c)<=.001&&(c=.001),Math.abs(u)<=.001&&(u=.001),t.adjustResize({left:o,top:s,width:c,height:u},l,r)}),this),t.isContainer()&&t.layout.ABSOLUTE&&!t.isGroup()){var h=l.left-o,f=l.top-s;a?t.components.forEach((t=>{t.delta("tx",0),t.delta("ty",0),t.move({x:h,y:f},!1)})):t.components.forEach((t=>{t.delta("tx",h),t.delta("ty",f)}))}else{var d=a&&t.parent;d&&d.isGroup()&&d.calculateBounds()}}function unt(t,e){var{left:r,top:n,width:i,height:a}=t,o=r+i/2,s=n+a/2,c=r+i,u=n+a;const l=i*e.x>Zrt,h=a*e.y>Zrt;return[{x:r,y:n},l?{x:o,y:n}:null,{x:c,y:n},h?{x:c,y:s}:null,{x:c,y:u},l?{x:o,y:u}:null,{x:r,y:u},h?{x:r,y:s}:null]}class lnt{constructor(t){this.layer=t}reset(){this.active=null}get selected(){return this.layer.selected}contains(t,e,r,n){return!!r.resizable&&(unt(r.bounds,n).every(((i,a)=>(i&&Math.abs(t-i.x)<=4/n.x&&Math.abs(e-i.y)<=4/n.y&&(this.active={component:r,index:a}),!this.active))),!!this.active)}draw(t,e,r){if(!e.isLine()){var{left:n,top:i,width:a,height:o}=e.bounds;if(t.beginPath(),t.rect(n-4/r.x,i-4/r.y,a+8/r.x,o+8/r.y),t.setLineDash([3/r.x,4/r.y]),t.lineWidth=1/r.x,t.strokeStyle="black",t.stroke(),t.setLineDash([]),e.resizable){var s=this.active;unt(e.bounds,r).forEach(((n,i)=>{n&&(t.beginPath(),t.rect(n.x-4/r.x,n.y-4/r.y,8/r.x,8/r.y),t.setLineDash([0,0]),t.strokeStyle="#656565",t.stroke(),t.fillStyle="#fff",s&&s.component===e&&s.index===i&&(t.strokeStyle="#fa7703",s.focus&&(t.fillStyle="#ffb80c")),t.fill(),t.stroke())}))}}}onmousedown(t){this.active.focus=!0}ondragstart(t){var{component:e}=this.active;this.active.bounds=e.bounds,this.active.boundsList=this.layer.selected.filter((t=>t.resizable)).map((t=>t.bounds))}ondragmove(t){var{component:e,index:r,boundsList:n,bounds:i}=this.active,a=this.layer.transcoordC2S(t.offsetX,t.offsetY);e.bounds=i;var o=snt(e,r,a);this.layer.selected.filter((t=>t.resizable)).forEach(((e,i)=>{e.bounds=n[i],cnt(e,r,t.shiftKey,o.dx,o.dy,!1)}))}ondragend(t){var{component:e,index:r,boundsList:n,bounds:i}=this.active,a=this.layer.transcoordC2S(t.offsetX,t.offsetY);e.bounds=i;var o=snt(e,r,a);this.layer.selected.filter((t=>t.resizable)).forEach(((e,i)=>{e.bounds=n[i],cnt(e,r,t.shiftKey,o.dx,o.dy,!0)})),this.active.component.app.commander.execute(null,!1)}}const hnt=20,fnt=2*Math.PI,dnt=Math.PI/2;function pnt(t,e){var r=t.bounds;return{x:r.left+r.width/2,y:r.top-hnt/e.y}}class gnt{constructor(t){this.layer=t}reset(){this.active=null}get selected(){return this.layer.selected}contains(t,e,r,n){if(!r.rotatable)return!1;var i=pnt(r,n);return Math.abs(t-i.x)<=4/n.x&&Math.abs(e-i.y)<=4/n.y&&(this.active={component:r},!0)}draw(t,e,r){if(e.rotatable){t.beginPath();var n=pnt(e,r);t.lineWidth=1.5/r.x,t.moveTo(n.x,n.y+hnt/r.y),t.lineTo(n.x,n.y),t.strokeStyle="#656565",t.stroke(),t.beginPath(),t.ellipse(n.x,n.y,4/r.x,4/r.y,0,0,fnt,!0),t.stroke(),t.fillStyle="#fff",t.fill();var i=this.active;i&&i.component===e&&(t.strokeStyle="#fa7703",t.stroke(),i.toFill&&(t.fillStyle="#ffb80c",t.fill()))}}onmousedown(t){this.active.toFill=!0}ondragstart(t){var e=this.active;e.component,e.start_rotation=e.component.get("rotation"),e.rotations=this.layer.selected.filter((t=>t.rotatable)).map((t=>t.get("rotation")))}ondragmove(t){var{component:e}=this.active,r=e.transcoordC2S(t.offsetX,t.offsetY);r=e.transcoordS2P(r.x,r.y);var n=e.rotatePoint,i=e.get("rotation")||0,a=Math.atan((n.y-r.y)/(n.x-r.x)),o=(a=n.x>=r.x?a-dnt:dnt+a)-i;this.layer.selected.filter((t=>t.rotatable)).forEach(((e,r)=>{let n=((e.get("rotation")||0)+o)%fnt;e.set("rotation",e.adjustRotation(n,t.shiftKey))}))}ondragend(t){var{component:e,rotations:r}=this.active;e.app.commander.execute(null,!1)}}ztt.register("modeling-layer",class extends vet{constructor(t,e){super(t,e),this.pathHandler=new Krt(this);var r=this.pathHandler,n=new Xrt(this),i=new lnt(this),a=new gnt(this);this._modelers=[r,n,i,a],this._control_mode_modelers=[n,r,i,a],this.focusOutline=new Wrt(this),this.groupOutline=new qrt(this),this.anchorHandler=new Jrt(this),this._reversed_modelers=this._modelers.slice().reverse(),this._control_mode_reverse_modelers=this._control_mode_modelers.slice().reverse(),this.hovered=null,this.hoveredDest=null}get modelers(){return this._control_mode?this._control_mode_modelers:this._modelers}get reversedModelers(){return this._control_mode?this._control_mode_reverse_modelers:this._reversed_modelers}ready(){super.ready();var t=this.rootModel,e=t.get("translate"),r=t.get("scale");this.set("translate",e),this.set("scale",r)}contains(t,e){var r=this.selected.filter((t=>!!t.parent)),n=this.get("scale")||{x:1,y:1};if(this._state_dragging){if(this._counter_end){let r=this.anchorTarget.transcoordT2S(t,e);if(this.anchorHandler.contains(r.x,r.y,this.anchorTarget,n))return!0}return!0}this.modelers.forEach((t=>t.reset()));r=this.selected.filter((t=>!!t.parent));for(let i=0;i<r.length;i++){let a=r[i],o=a.transcoordT2S(t,e);for(let t=0;t<this.modelers.length;t++){let e=this.modelers[t];if(e.contains(o.x,o.y,a,n))return this.currentModeler=e,!0}}if(this.anchorTarget){let r=this.anchorTarget.transcoordT2S(t,e);if(this.anchorHandler.contains(r.x,r.y,this.anchorTarget,n))return this.currentModeler=this.anchorHandler,!0}else this.anchorHandler.reset();return this.currentModeler=null,!1}_componentDrawer(t,e,r,n){let i=[],a=e.parent;if(e.isRootModel())return t.save(),n(t,e,r),void t.restore();for(;a&&!a.isRootModel();)i.push(a),a=a.parent;t.save(),i.reverse().forEach((function(e){let r=e.rotatePoint;t.translate(r.x,r.y);let n=e.get("scale");n&&t.scale(n.x,n.y),t.rotate(e.get("rotation")),t.translate(-r.x,-r.y);let i=e.bounds;t.translate(i.left,i.top)}));let o=e.rotatePoint;t.translate(o.x,o.y);let s=e.get("scale");s&&t.scale(s.x,s.y),t.rotate(e.get("rotation")),t.translate(-o.x,-o.y),n(t,e,r),t.restore()}prerender(t){var{translate:e,scale:r={x:1,y:1},rotation:n}=this.model;t.save(),t.beginPath(),t.clearRect(0,0,t.canvas.width,t.canvas.height),t.rect(0,0,t.canvas.width,t.canvas.height),t.fillStyle="black",t.globalAlpha=.5,t.fill(),t.restore(),e&&t.translate(e.x*M9,e.y*M9),t.scale(r.x*M9,r.y*M9),n&&t.rotate(n),t.clearRect(0,0,this.rootModel.get("width"),this.rootModel.get("height"))}render(t){t.beginPath();var e=this.get("scale")||{x:1,y:1},r=this.selected.filter((t=>!!t.parent));if(this.focused&&this._componentDrawer(t,this.focused,e,((t,e,r)=>{this.focusOutline.draw(t,e,r)})),r.length>0&&r[0].parent.isGroup()){let n=r[0].parent;for(;n.parent.isGroup();)n=n.parent;this._componentDrawer(t,n,e,((t,e,r)=>{this.groupOutline.draw(t,e,r)}))}r.forEach((r=>{this._componentDrawer(t,r,e,((t,e,r)=>{this.reversedModelers.forEach((n=>n.draw(t,e,r)))}))})),this.anchorTarget&&this._componentDrawer(t,this.anchorTarget,e,((t,e,r)=>{this.anchorHandler.draw(t,e,r)}))}get anchorTarget(){return this.currentModeler===this.anchorHandler||this.currentModeler===this.pathHandler||this.hovered?.isLine()||(this._anchorTarget=this.hovered),this._anchorTarget}set anchorTarget(t){this._anchorTarget=t}get hovered(){return this._hovered}set hovered(t){this._hovered=t,this.invalidate()}startLinkProcess(t,e,r){this.currentModeler=this.pathHandler,this.processingLink=this.pathHandler.startLinkProcess(t,e,r),this.counterEnd=this.processingLink.fromEnd,this.processingLink.trigger("tag")}set counterEnd(t){this.currentModeler=this.pathHandler,this._counter_end=t}get counterEnd(){return this._counter_end}endLinkProcess(){this.processingLink?.trigger("tagreset"),this.processingLink=null,this._counter_end=null}get eventMap(){return{"model-layer":{"(all)":{change:this.onchange_model,wheel:this.onwheel_scale,drop:this.ondrop},"(descendant)":{mouseenter:this.onmouseenter,mouseleave:this.onmouseleave}},"(root)":{"(self)":{selected:this.onselected,keydown:this.onkeydown,keyup:this.onkeyup}}}}onmouseenter(t,e){this.hovered=e?.origin}onmouseleave(t,e){this.hovered=null}onkeydown(t){"Alt"==t.key&&(this._control_mode=!0,this.invalidate())}onkeyup(t){"Alt"==t.key&&(this._control_mode=!1,this.invalidate())}onselected(t,e){this.invalidate()}onchange_model(t,e,r){var{origin:n,deliverer:i}=r;n===i&&(t.translate&&this.set("translate",t.translate),void 0!==t.rotation&&this.set("rotation",t.rotation),t.scale&&this.set("scale",t.scale)),this.invalidate()}ondblclick(t){"function"==typeof this.currentModeler.ondblclick&&this.currentModeler.ondblclick(t),this.invalidate()}onmousedown(t){this.currentModeler.onmousedown(t),this.invalidate()}onmouseup(t){"function"==typeof this.currentModeler.onmouseup&&this.currentModeler.onmouseup(t),this.invalidate()}ondragstart(t){this.currentModeler.ondragstart(t),this._state_dragging=!0}ondragmove(t){this.currentModeler.ondragmove(t),this.invalidate()}ondragend(t){this._state_dragging=!1,this.currentModeler.ondragend(t),this.invalidate()}ondrop(t,e){var{origin:r}=e,n=t.dataTransfer.files;if(n.length<1)return;let i=this.rootModel.transcoordC2S(t.offsetX,t.offsetY),a=this.rootModel;Promise.all(Array.from(n).map((t=>new Promise(((e,r)=>{let n=new FileReader;n.addEventListener("loadend",(t=>{e(n.result)})),["error","abort"].forEach((t=>n.addEventListener(t,(t=>{r(t)})))),n.readAsDataURL(t)}))))).then((e=>{if(t.altKey)return qet.around(this.app.commander,(()=>{r.ondropfile(n,e)})),void(this.selected=[r]);let o=[],s=e.map(((t,e)=>{let r,s=n[e].type,c=n[e].name;return s.startsWith("image/")?(r=crt({type:s.startsWith("image/gif")?"gif-view":"image-view",top:0,left:0,width:200,height:200,src:t},a.app),o.push(new Promise(((e,n)=>{let i=new Image;i.src=t,i.onload=()=>{r.set({width:i.width,height:i.height}),e()},i.onerror=t=>{n(t)}})))):s.startsWith("audio/")?r=crt({type:"audio",top:0,left:0,width:100,height:100,src:t},a.app):s.startsWith("vnd.ms-excel/")||/\.xlsx?$/.test(c)?r=crt({type:"excel",top:0,left:0,width:100,height:100,src:t},a.app):console.log("droped file",n[e]),r&&(r.center=i,i.x+=50,i.y+=50),r})).filter(Boolean).map((t=>({component:t,to_container:a})));s.length>0&&Promise.all(o).then((()=>{this.app.commander.execute(new art({changes:s})),this.selected=s.map((t=>t.component))}),(t=>{console.error(t)}))}),(t=>{console.error(t)}))}onwheel_scale(t,e){if(0!=t.deltaY||0!=t.deltaX){var r=e.deliverer;if(t.shiftKey){if(-1!=navigator.userAgent.indexOf("Win"))var n=t.deltaY<0?1:-1;else n=t.deltaX<0?1:-1;qet.around(this.app.commander,(()=>{r.selected.forEach((t=>{let e=t.get("fontSize")||O9.FONT_SIZE;e<1&&(e=1),e+=n,t.set("fontSize",e)}))}))}else{n=t.deltaY<0?1:-1;let e=r.get("scale")||{x:1,y:1},i=r.get("translate"),a=t.offsetX,o=t.offsetY,s=r.transcoordC2S(a,o),c=.1*n,u={x:e.x+c,y:e.y+c};if(n<0&&e.x<.2||n>0&&e.x>10)return;r.set("scale",u);let l=r.transcoordC2S(a,o);r.set("translate",{x:i.x+(l.x-s.x)*u.x,y:i.y+(l.y-s.y)*u.y})}}}});class vnt extends vet{constructor(t,e){super(t,e),this._anim_alpha=1}animOnTargetChange(t){t!==this._lastTargets&&(this._lastTargets=t,this._anim_alpha=1,this.animate({step:t=>{this._anim_alpha=1-t*t,this.invalidate()},duration:5e3,delta:"linear",options:{x:1},ease:"out"}).start())}render(t){var e=this.targets&&this.targets.filter((t=>t.rootModel));if(!e||0==e.length)return this._animate&&this._animate.stop(),void delete this._animate;t.globalAlpha*=this._anim_alpha;var r=!1;e.forEach((e=>{(function(t,e){const r=t.decorators;var n=!1;return r.map((t=>"string"==typeof t?Ott[t]:t)).filter((t=>t&&"function"==typeof t)).map((r=>{const i=r(t,e);n||=i})),n})(e,t)&&(r=!0)})),r&&this.animOnTargetChange(this.targets)}get targets(){return this._targets}set targets(t){this._targets=t&&t.filter((t=>!t.isLayer())),this.invalidate()}onmouseenter(t,e){this._decotagreset(),this._ondecotag(e.origin)}onmouseleave(t,e){this._decotagreset()}get eventMap(){return{"model-layer":{"(descendant)":{tag:this.ondecotag,tagreset:this.ondecotagreset,mouseenter:this.onmouseenter,mouseleave:this.onmouseleave}}}}ondecotagreset(t){this._decotagreset()}ondecotag(t){this._ondecotag(t.origin)}offdecotag(t,e){this._offdecotag(e.origin)}_ondecotag(t){this.targets&&-1!==this.targets.lastIndexOf(t)||(this.targets=(this.targets||[]).concat(t))}_offdecotag(t){if(this.targets){var e=this.targets.slice();e.splice(this.targets.lastIndexOf(t),1),this.targets=e}}_decotagreset(){this.targets=[]}}function mnt(){var t=arguments,e=t[t.length-1],r=this.event_pump;r.listeners.forEach((n=>{!function(t,e,r,n,i){for(let a in r){let o=r[a];if(L9(a,n.origin,0,t))for(let t in o){let r=o[t];t==n.name&&(n.listener=e,r.apply(e,i))}}}(r.deliverer,n.listener,n.cloned_handlers,e,t)}))}ztt.register("decotag-layer",vnt),ztt.register("tag-layer",vnt);class ynt{constructor(t){if(void 0===t.on)throw new Error("Deliverer should be a event handlable object.");this.deliverer=t,this.listeners=[]}start(){this.deliverer.on("(all)",mnt,{event_pump:this})}stop(){this.deliverer.off("(all)",mnt)}on(t,e){var r=Object.assign({},e);Object.keys(r).forEach((e=>{if(0==e.indexOf("?")){let n=r[e],i=e.substr(1),a=t.get(i);delete r[e],a?r[a]=n:m9("EventPump#on","variable #{selector} is not evaluated on listener")}})),this.listeners.push({listener:t,handlers:e,cloned_handlers:r})}off(t,e){for(let r=0;r<this.listeners.length;r++){let n=this.listeners[r];n.listener!==t||e&&n.handlers!==e||this.listeners.splice(r,1)}}clear(){this.listeners=[]}dispose(){this.stop(),this.clear()}}class bnt{constructor(t){this.eventMaps=[],this.root=t,t.eventMap&&this.add(t,t.eventMap)}set root(t){this._root=t}get root(){return this._root}stop(){this.eventMaps.forEach((t=>t.eventPump.stop()))}add(t,e){if(this.root)for(let r in e){let n=e[r];if("(self)"===r&&void 0===t.on)throw new Error("(self) selector not available when deliverer is not a event handlable object.");B9(r,this.root,t).forEach((r=>{var i=new ynt(r);i.on(t,n),i.start(),this.eventMaps.push({eventPump:i,listener:t,handlerMap:e,deliverer:r})}))}}remove(t,e){var r=this.eventMaps.slice(0);for(let n=0;n<r.length;n++){let i=r[n];i.listener!==t||e&&i.handlerMap!==e||(this.eventMaps.splice(n,1),i.eventPump.dispose())}}clear(){this.eventMaps.slice(0).forEach((t=>t.eventPump.dispose())),this.eventMaps=[]}dispose(){this.stop(),this.clear()}}const xnt=0,wnt=1,Ant=2,_nt=0,knt=1,Ent=2;var Snt={},Mnt=0;class Tnt{constructor(t,e){this._type=e||t.type,this._ctrlKey=t.ctrlKey,this._altKey=t.altKey,this._shiftKey=t.shiftKey,this._metaKey=t.metaKey;var r=function(t){if(t.touches){let e=t.touches[0];if(!e)return Snt;let r=e.target.getBoundingClientRect();return Snt={x:t.offsetX||e.clientX-(r.x||r.left),y:t.offsetY||e.clientY-(r.y||r.top)}}return{x:t.offsetX,y:t.offsetY}}(t);if(this._offsetX=r.x,this._offsetY=r.y,"wheel"==t.type)this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ;else if("drop"==t.type)this.dataTransfer=t.dataTransfer;else if(t.type.match(/^touch/)&&(this._scale=t.scale,this._touches=t.touches,this._changedTouches=t.changedTouches,null==this._scale)){var n=function(t){var e,r,n=0,i=0,a=0;if(1===t.touches.length)return a;Array.from(t.touches).forEach((t=>{e=null!=e?Math.min(t.screenX,e):t.screenX,n=Math.max(t.screenX,n),r=null!=r?Math.min(t.screenY,r):t.screenY,i=Math.max(t.screenY,i)}));var o=n-e||0,s=i-r||0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))||0}(t);Mnt>0&&(this._scale=n/Mnt),Mnt=n}}get type(){return this._type}set type(t){this._type=t}get offsetX(){return this._offsetX}get offsetY(){return this._offsetY}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get shiftKey(){return this._shiftKey}get metaKey(){return this._metaKey}get touches(){return this._touches}get changedTouches(){return this._changedTouches}get scale(){return this._scale}stopPropagation(){this._stop_=!0}isPropagationStopped(){return this._stop_}}function Pnt(t,e){return t.capture(e.offsetX,e.offsetY)}function Ont(t,e,r){if(t&&t.app&&(!t.app.isViewMode||!t.hidden)){r instanceof Tnt&&e===r.type||(r=new Tnt(r,e));var n="on"+e;t[n]&&t[n](r),r.isPropagationStopped()||t.trigger(e,r)}}class Int{constructor(t,e){this.container=t,this.html_element=e,this.status=xnt,this.last_target=null,this.gesture_handlers=T9.map((t=>this.gestureHandlerBuilder(t))),this.keyevent_handlers=P9.map((t=>this.keyeventHandlerBuilder(t))),T9.forEach(((t,r)=>e.addEventListener(t,this.gesture_handlers[r]))),P9.forEach(((t,r)=>e.addEventListener(t,this.keyevent_handlers[r]))),e.ondragover=this.gestureHandlerBuilder("dragover"),e.ondrop=this.gestureHandlerBuilder("drop"),e.tabIndex=1}dispose(){this.last_enter_target&&Ont(this.last_enter_target,"mouseleave",new CustomEvent("mouseleave")),T9.forEach(((t,e)=>this.html_element.removeEventListener(t,this.gesture_handlers[e]))),P9.forEach(((t,e)=>this.html_element.removeEventListener(t,this.keyevent_handlers[e]))),delete this.gesture_handlers,delete this.keyevent_handlers,delete this.last_target}gestureHandlerBuilder(t){var e=this[`on${t}`].bind(this);return t=>(e(new Tnt(t))&&t.preventDefault(),!1)}keyeventHandlerBuilder(t){return this[`on${t}`].bind(this)}ondragover(t){return Ont(Pnt(this.container,t),t.type,t),!1}ondrop(t){return Ont(Pnt(this.container,t),t.type,t),!1}ondblclick(t){return Ont(Pnt(this.container,t),t.type,t),this.last_target=null,!1}onkeydown(t){return this.container.trigger(t.type,t),!1}onkeyup(t){return this.container.trigger(t.type,t),!1}onmousemove(t){switch(this.status){case wnt:let r=t.offsetX-this.__dragstart_e.offsetX,n=t.offsetY-this.__dragstart_e.offsetY;if(r*r+n*n<16)break;this.status=Ant,Ont(this.last_target,"dragstart",this.__dragstart_e),this.__dragmove_e=t,Ont(this.last_target,"dragmove",t);break;case Ant:this.__dragmove_e=t,Ont(this.last_target,"dragmove",t);break;default:var e=Pnt(this.container,t);this.last_enter_target!==e&&(this.last_enter_target&&Ont(this.last_enter_target,"mouseleave",t),e&&Ont(e,"mouseenter",t),this.last_enter_target=e),Ont(e,t.type,t),this.last_target=e}return!1}onmousedown(t){if(this.status===Ant)Ont(this.last_target,"dragend",t),this.last_target=null,this.status=xnt;else{var e=Pnt(this.container,t);this.last_target=e,this.status=wnt,this.__dragstart_e=t,Ont(e,t.type,t)}return!1}onmouseup(t){if(this.status===Ant)Ont(this.last_target,"dragend",t);else{var e=Pnt(this.container,t);Ont(e,t.type,t),this.last_target===e&&Ont(e,"click",t)}return this.last_target=null,this.status=xnt,!1}onmouseout(t){var e=Pnt(this.container,t);if(this.status===Ant)Ont(this.last_target,"dragend",t);else{if(this.last_target&&this.last_target===e)return;this.last_enter_target&&(Ont(this.last_enter_target,"mouseleave",t),delete this.last_enter_target)}return this.last_target=null,this.status=xnt,!1}ontouchstart(t){var e=Pnt(this.container,t);return this.last_target=e,this.status=knt,this.touchPoints||(this.touchPoints=[]),this.touchPoints.push(t.changedTouches[0]),this.holdTimer=setTimeout((()=>{this.status=_nt,Ont(this.last_target,"hold",t),delete this.holdTimer}),500),Ont(e,t.type,t),!1}ontouchmove(t){if(!t.touches||!t.changedTouches)return Ont(this.last_target,"dragstart",t),Ont(this.last_target,"dragmove",t),!1;var e=Pnt(this.container,t);switch(this.status){case knt:Array.from(t.changedTouches).forEach((t=>{var e=this.touchPoints.find((e=>e.identifier===t.identifier));if(e){var r=e.clientX-t.clientX,n=e.clientY-t.clientY;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2))>=16?(this.status=Ent,void(this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer))):void 0}}));break;case Ent:if(this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer),2===t.changedTouches.length&&null!=t.scale&&1!==t.scale&&(t.scale<.9||t.scale>1.1))return Ont(this.last_target,"pinch",t),!1;Ont(this.last_target,"pan",t),e=this.last_target;break;default:this.last_enter_target!==e&&(this.last_enter_target&&Ont(this.last_enter_target,"mouseleave",t),e&&Ont(e,"mouseenter",t),this.last_enter_target=e),this.last_target=e}return Ont(e,"touchmove",t),!1}ontouchend(t){var e=Pnt(this.container,t);switch(this.status){case Ent:e=this.last_target;break;case knt:var r=performance.now(),n=r-this.touchedAt;this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer,Ont(e,n<500?"doubletap":"tap",t),this.touchedAt=r)}Ont(e,"touchend",t);var i=this.touchPoints.findIndex((e=>e.identifier===t.changedTouches[0].identifier));return this.touchPoints.splice(i,1),this.last_target=null,this.status=_nt,!1}onwheel(t){return Ont(Pnt(this.container,t),t.type,t),!1}}var Rnt={};var Cnt={register:function(t,e){Rnt[t]=e},unregister:function(t){delete Rnt[t]},get:function(t){return Rnt[t]}};function jnt(t){if(!t.hasTextProperty||t.textHidden)return;var{text:e="",bold:r=O9.BOLD,italic:n=O9.ITALIC,textWrap:i=O9.TEXT_WRAP,fontFamily:a=O9.FONT_FAMILY,fontColor:o=O9.FONT_COLOR,textAlign:s=O9.TEXT_ALIGN,textBaseline:c=O9.TEXT_BASELINE,fontSize:u=O9.FONT_SIZE,lineHeight:l=1.2*u}=t.model,{left:h,top:f,width:d,height:p}=t.textBounds;u||=O9.FONT_SIZE,l||=1.2*u,t.textHidden=!0;var g=document.createElement("textarea");T9.forEach((function(t){g.addEventListener(t,(function(t){t.stopPropagation()}),!0)}));const v=t.transcoordS2C(h,f),{rotation:m,scale:y}=function(t){for(var e=0,r=1,n=t;n;){e+=n.get("rotation")||0;let{x:t,y:i}=n.get("scale")||{x:1,y:1};r*=Math.max(t,i)||1,n=n.parent}return{rotation:e,scale:r}}(t);switch(g.style.position="absolute",g.style.width=d+"px",g.style.height=p+"px",g.value=e,g.style.fontFamily=a,g.style.fontSize=u+"px",g.style.lineHeight=l+"px",g.style.overflow="hidden",g.style.resize="none",g.style.outline="none",g.style.border=0,g.style.backgroundColor="transparent",g.style.display="inline-block",g.style.color=o,r&&(g.style.fontWeight="bold"),n&&(g.style.fontStyle="italic"),s){case"right":case"end":g.style.textAlign="right";break;case"justify":g.style.textAlign="justify";break;case"left":case"start":g.style.textAlign="left";break;default:g.style.textAlign="center"}var b=[r,n,u+"px",a].filter(Boolean).join(" ");function x(e){var r={left:0,top:0},n=l*function(t,e,r,n){var i,a=t.getContext();return a.save(),a.font=r,i=stt(a,e,n,t.get("textWrap")).length,a.restore(),i}(t,e,b,d);switch(g.style.height=n+"px",c){case"top":case"hanging":break;case"bottom":case"alphabetic":r.top=p-n;break;default:r.top=p/2-n/2}if(!i){var a=function(t,e,r,n){var i=e.split("\n"),a=n;let o=t.getContext();return o.save(),o.font=r,i.forEach((t=>{let e=o.measureText(t).width;e>a&&(a=e)})),o.restore(),a}(t,e,b,d);switch(g.style.width=a+"px",s){case"right":case"end":r.left=d-a;break;case"left":case"start":break;default:r.left=(d-a)/2}}g.style.marginLeft=r.left+"px",g.style.marginTop=r.top+"px";var o=`translate(${v.x}px, ${v.y}px) scale(${y}) rotate(${m}rad)`;["-webkit-","-moz-","-ms-","-o-",""].forEach((t=>{g.style[t+"transform"]=o,g.style[t+"transform-origin"]=`${-r.left}px ${-r.top}px`}))}x(e);var w=t.root.target_element;w.appendChild(g),g.select();var A,_=!1;g.addEventListener("keydown",(function(t){t.stopPropagation(),"Escape"!=t.code&&(t.shiftKey||"Enter"!=t.code&&"NumpadEnter"!=t.code)?setTimeout((()=>{x(g.value)})):(_=A.skipUpdate="Escape"==t.code,document.createEvent?g.dispatchEvent(A):g.fireEvent(A.eventType,A))})),document.createEvent?(A=document.createEvent("HTMLEvents")).initEvent("blur",!0,!1):(A=document.createEventObject()).eventType="blur";var k=t.root.selected,E=function(r){t.root.selected=k,t.textHidden=!1,g.removeEventListener("blur",E,!1),g.parentElement&&g.parentElement.removeChild(g),w.focus(),r.skipUpdate||_||t.app.commander.execute(new qet({changes:[{component:t,before:{text:e},after:{text:g.value}}]}))};g.addEventListener("blur",E,!1)}Cnt.register("text-editor",{"(root)":{"(self)":{keydown:function(t,e){var{origin:r,deliverer:n}=e,i=n.selected;return!(1!==i.length||!i[0].hasTextProperty)&&(("Enter"==t.code||"NumpadEnter"==t.code)&&(jnt(i[0]),t.preventDefault(),!0))}}},"model-layer":{"(descendant)":{dblclick:function(t,e){jnt(e.origin)}}}});const Dnt=0,Lnt=2,znt=3,Fnt=4;var Bnt=P7((function(t,e,r){if(r)t.focused=null;else{var n=[];e[0].parent.isGroup()?t.focused=e[0].parent:(e.forEach((t=>{t.path.forEach((e=>{n.push(t.transcoordS2T(e.x,e.y))}))})),t.focused=t.capturePath(n,e))}}),300);Cnt.register("move-handler",{"model-layer":{"(descendant)":{dragstart:function(t,e){var{origin:r,deliverer:n}=e;if(!r.stuck){var i=n.selected,a=n.selected.filter((t=>!t.stuck));if(i.length!==a.length&&(i=n.selected=a),0!=i.length){var o=i[0].transcoordC2S(t.offsetX,t.offsetY);if(o=i[0].transcoordS2P(o.x,o.y),this.last_pos=o,this.direction=Dnt,n.focused=i[0].parent,t.altKey){var s=[],c=new Map;n.selected=n.selected.filter((t=>!t.isRootModel())).map((t=>{let e=urt(t,(t=>{const e=n.root.getNewRefid();return void 0!==t&&c.set(t,e),e}));return s.push({component:e,to_container:t.parent}),e})).map((t=>(t.replaceRefids(c),t))),s.forEach((({component:t,to_container:e})=>{e.addComponent(t)})),this.duplicates=n.selected.map((t=>({component:t})))}else this.changes=qet.before(i)}}},dragmove:function(t,e){var{origin:r,deliverer:n}=e;if(!r.stuck){var i=n.selected;if(0!=i.length){var{x:a,y:o}=i[0].transcoordC2S(t.offsetX,t.offsetY),s=i[0].transcoordS2P(a,o);t.shiftKey?this.direction==Lnt&&(this.direction=Dnt):this.direction=Lnt;var c=s.x-this.last_pos.x,u=s.y-this.last_pos.y;if(this.direction==Dnt){if(c*c+u*u<25)return;Math.abs(c)>Math.abs(u)?this.direction=znt:this.direction=Fnt}this.direction==znt?u=0:this.direction==Fnt&&(c=0),i.forEach((t=>{t.move({x:c,y:u},1===i.length)})),this.last_pos=s,Bnt(n,i)}}},dragend:function(t,e){var{origin:r,deliverer:n}=e;if(!r.stuck){var i=n.selected;if(0!=i.length){var a=i[0].parent,o=n.focused||e.deliverer;if(this.changes&&!o.isGroup())if(o&&o!==a){var s=this.changes.map((t=>{let{component:e,before:r}=t;return{component:e,to_container:o}}));n.app.commander.execute(new art({changes:s}))}else qet.after(this.changes,n.app.commander);else if(this.duplicates){this.duplicates=this.duplicates.map((t=>(t.to_container=o,t)));let t=new art({changes:this.duplicates});n.app.commander.execute(t)}i.forEach((t=>{t.parent&&t.parent.calculateBounds&&t.parent.calculateBounds()})),this.last_pos=null,this.changes=null,this.duplicates=null,Bnt(n,i,!0)}}}}},"(root)":{"(self)":{keydown:function(t,e){var{origin:r,deliverer:n}=e,i={},a=t.shiftKey?r.rootModel.MPP:1;switch(t.which){case 37:i.x=-a,i.y=0;break;case 38:i.x=0,i.y=-a;break;case 39:i.x=a,i.y=0;break;case 40:i.x=0,i.y=a;break;default:return}var o=n.selected;qet.around(n.app.commander,(function(){o.forEach((t=>{!t.stuck&&t.move(i,!1)}))}))}}}});var Nnt=[];"undefined"!=typeof window&&window.addEventListener("resize",(()=>{Nnt.forEach((t=>{t.resize()}))}));class Unt extends get{constructor(t,e){super(Object.assign({type:"root",scale:{x:1,y:1}},t||{}),e),this._maxRefid=0,t=t||{},this.fitMode=t.model&&t.model.fitMode,this._app=e,this.target_element=t.target_element,this.rebuildContentModel(this.model.model),Nnt.push(this)}dispose(){ret.hideAll(this),this._app&&this._app.dispose(),super.dispose(),this._disposeAllResources(),this.target_element=null,delete this._refresh_mapping_debouncer;var t=Nnt.indexOf(this);t>=0&&Nnt.splice(t,1),this.refidIndexMap.clear(),this._maxRefid=0}isRoot(){return!0}get app(){return this._app}get target_element(){return this._target_element}set target_element(t){this._ua_event_handler&&(this._ua_event_handler.dispose(),delete this._ua_event_handler),t&&(t.style.position="absolute",t.style.cursor="default",t.style.overflow="hidden",this._ua_event_handler=new Int(this,t)),this.forEach((e=>e.target=t)),this._target_element=t}get unitScale(){switch(this.model_layer&&this.model_layer.get("unit")){case"mm":case"cm":case"in":return this.app.PPM/10;default:return 1}}addTemplate(t,e){var r=this.templateMap[t];r&&v9("Template replaced (duplicated)",t,e,r),this.templateMap[t]=e,delete this.templatePrefixes}removeTemplate(t,e){var r=this.templateMap[t];r!==e?m9("Removing template failed (different)",t,e,r):delete this.templateMap[t],delete this.templatePrefixes}findTemplateFor(t){this.templatePrefixes||(this.templatePrefixes=Object.keys(this.templateMap).sort().reverse());var e=this.templatePrefixes.find((e=>t.startsWith(e)));if(e)return this.templateMap[e]}addIndex(t,e){var r=this.indexMap[t];r&&v9("Index replaced (duplicated)",t,e,r),this.indexMap[t]=e}removeIndex(t,e){var r=this.indexMap[t];r!==e?m9("Removing index failed (different)",t,e,r):delete this.indexMap[t]}addRefidIndex(t,e){void 0===t&&(t=this.getNewRefid(),e.set("refid",t)),this._maxRefid=Math.max(t,this._maxRefid);var r=this.refidIndexMap.get(t);r&&v9("Refid Index replaced (has not to be)",t,e,r),this.refidIndexMap.set(t,e)}removeRefidIndex(t,e){if(null!=t){var r=this.refidIndexMap.get(t);r!==e?v9("Refid Removing index failed (has not to be)",t,e,r):this.refidIndexMap.delete(t)}}getNewRefid(){return this._maxRefid=(this._maxRefid||0)+1,this._maxRefid}async subscribe(t,e){this._app.isViewMode&&t&&this._app&&(e._subscription=await this._app.subscribe(t,e))}async unsubscribe(t,e){e._subscription&&(await e._subscription.unsubscribe(),delete e._subscription)}findById(t){return this.indexMap[t.replace(/^#/,"")]}findByRefid(t){return this.refidIndexMap.get(t)}findOrCreate(t){var e=this.indexMap[t];if(!e){let r=this.findTemplateFor(t);if(r){e=crt(Object.assign(c7(r.hierarchy),{id:t,templatePrefix:""}),this.app),this.model_layer.addComponent(e)}}return e}resize(){this.components.forEach((t=>{t.resize&&t.resize()})),this.invalidate()}_disposeAllResources(){this.selected=[],this._focused=null,this._ready=!1,this.eventEngine&&(this.assist_handlers&&this.assist_handlers.forEach((t=>{this.eventEngine.remove(t)})),this.eventEngine.dispose(),delete this.eventEngine),this.assist_layers&&this.assist_layers.forEach((t=>{t.dispose(),this.removeComponent(t)})),delete this.assist_layers,this.model_layer&&this.model_layer.dispose(),this.model_layer&&this.removeComponent(this.model_layer),delete this.model_layer,this.indexMap={},this.refidIndexMap=new Map,this.templateMap={}}rebuildContentModel(t){this._disposeAllResources(),this.eventEngine=new bnt(this),(t=t||{}).type="model-layer",this.model_layer=crt(t,this.app),this.addComponent(this.model_layer),this.model_layer.target=this.target_element,this.assist_layers=(this.model.layers||[]).map((t=>{var e=crt(t,this.app);return this.addComponent(e),e.target=this.target_element,e})),this.assist_handlers=(this.model.handlers||[]).map((t=>{var e={};return this.eventEngine.add(e,Cnt.get(t)),e})),this._ready=!0,this.traverse((t=>t.ready()))}get root(){return this}get anchors(){}get isReady(){return this._ready}get rootModel(){return this.model_layer}get stuck(){return!0}get data(){return Object.values(this.indexMap).reduce(((t,e)=>(t[e.model.id]=e.data,t)),{})}set data(t){for(var e in t){var r=this.findOrCreate(e);r&&(r.data=t[e])}}get dataByRefid(){var t={};for(let[e,r]of this.refidIndexMap.entries())t[e]=r.data;return t}set dataByRefid(t){for(var e in t){var r=this.findByRefid(Number(e));r&&(r.data=t[e])}}get values(){return Object.values(this.indexMap).reduce(((t,e)=>(t[e.model.id]=e.value,t)),{})}set values(t){for(var e in t){var r=this.findOrCreate(e);r&&(r.value=t[e])}}get valuesByRefid(){var t={};for(let[e,r]of this.refidIndexMap.entries())t[e]=r.value;return t}set valuesByRefid(t){for(var e in t){var r=this.findByRefid(Number(e));r&&(r.value=t[e])}}get selected(){return(this._selected||[]).filter((t=>t.parent))}set selected(t){var e=this._selected;this._selected=t,this.trigger("selected",t,e)}get focused(){return this._focused}set focused(t){this._focused!==t&&(this._focused=t,this.invalidate())}get style(){return this._style}set style(t){this._style=t,this._compiled_style=t}get hasTextProperty(){return!1}render(){this.components.forEach((t=>t.draw()))}contains(t,e){return!0}capturePath(t,e){return this.model_layer.capturePath(t,e)}invalidate(){this.components.forEach((t=>t.invalidate()))}get eventMap(){return{"(root)":{"(descendant)":{added:this.onadded,removed:this.onremoved,change:this.onchanged}}}}refreshMappings(){if(!this._refresh_mapping_debouncer){if(this.disposed)return;this._refresh_mapping_debouncer=P7((function t(e){e.executeMappings(),e.components&&e.components.forEach((e=>t(e)))}),1e3)}this._refresh_mapping_debouncer(this.model_layer)}_addTraverse(t){t.components&&t.components.forEach((t=>this._addTraverse(t)));var{id:e,refid:r,tag:n,templatePrefix:i}=t.model;this.addRefidIndex(r,t),e&&this.addIndex(e,t),n&&this.subscribe(n,t),i&&this.addTemplate(i,t);var a=n9({},t.eventMap,t.model.eventMap);this.eventEngine.add(t,a)}_removeTraverse(t){t.components&&t.components.forEach((t=>this._removeTraverse(t)));var{id:e,refid:r,tag:n,templatePrefix:i}=t.model;this.removeRefidIndex(r,t),e&&this.removeIndex(e,t),n&&this.unsubscribe(n,t),i&&this.removeTemplate(i,t),this.eventEngine.remove(t)}onadded(t,e){this._addTraverse(e),this.refreshMappings(),this.invalidate()}onremoved(t,e){this._removeTraverse(e),this.invalidate()}onchanged(t,e,r){e.templatePrefix&&this.removeTemplate(e.templatePrefix,r.origin),t.templatePrefix&&this.addTemplate(t.templatePrefix,r.origin),e.id&&this.removeIndex(e.id,r.origin),t.id&&this.addIndex(t.id,r.origin),e.tag&&this.unsubscribe(e.tag,r.origin),t.tag&&this.subscribe(t.tag,r.origin),e.id==t.id&&e.class==t.class||this.refreshMappings()}}Object.assign(Unt.prototype,{fit:function(t){var{width:e,height:r,fitMode:n}=this.model_layer.model,i=this.target_element,a=this.model_layer;if(this.fitMode=t||this.fitMode||n||"ratio",e&&r&&i&&i.clientWidth&&i.clientHeight){switch(this.fitMode){case"center":!function(t,e,r){var n=t.unitScale,{width:i,height:a}=e.model;e.set("scale",{x:n,y:n}),e.set("translate",{x:Math.max((r.clientWidth-i*n)/2,0),y:Math.max((r.clientHeight-a*n)/2,0)})}(this,a,i);break;case"both":!function(t,e,r){var{width:n,height:i}=e.model,a=r.clientWidth,o=r.clientHeight;e.set("scale",{x:a/n,y:o/i}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"width":!function(t,e,r){var n=r.clientWidth/e.get("width");e.set("scale",{x:n,y:n}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"height":!function(t,e,r){var n=r.clientHeight/e.get("height");e.set("scale",{x:n,y:n}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"ratio":!function(t,e,r){var{width:n,height:i}=e.model,a=r.clientWidth,o=r.clientHeight,s=a/n,c=o/i,u=Math.min(s,c);e.set("scale",{x:u,y:u}),e.set("translate",{x:(a-n*u)/2,y:(o-i*u)/2})}(0,a,i);break;default:!function(t,e,r){var n=t.unitScale;e.set("scale",{x:n,y:n}),e.set("translate",{x:0,y:0})}(this,a)}this.resize()}}}),ztt.memoize(Unt.prototype,"unitScale",!1);var Ynt=13.3,Gnt=function(t){return void 0!==t&&(Ynt=t),Ynt};const Hnt="$base_url";const Wnt=Math.PI/12;class qnt{constructor(t,e){this._mode=t,this.screen=Gnt(),this._baseUrl="undefined"!=typeof window?window.location.origin:null,this._refProvider=e,this.isEditMode&&(this._rotateStep=Wnt,this._rotateStepForced=!1)}dispose(){this._dataSubscriptionProvider&&this._dataSubscriptionProvider.dispose(),delete this._dataStorage}_calcScreen(){var t={width:screen.width,height:screen.height};this._PPI=function(t,e,r,n){t>0||(t=1),e>0||(e=1),n||(n="d");var i=("d"==n?Math.sqrt(t*t+e*e):"w"==n?t:e)/r;return i>0?Math.round(i):0}(t.width,t.height,this.screen),this._PPM=this._PPI/25.4}subscribe(t,e){return this._dataSubscriptionProvider?.subscribe(t,e)}get refProvider(){return this._refProvider}set dataSubscriptionProvider(t){this._dataSubscriptionProvider=t}get dataSubscriptionProvider(){return this._dataSubscriptionProvider}set commander(t){this._commander=t}get commander(){return this._commander}get screen(){return this._screen}set screen(t){this._screen=t,this._calcScreen()}get DPPX(){return M9}get PPI(){return this._PPI}get PPM(){return this._PPM}get mode(){return this._mode}set mode(t){var e=this._mode;e!==t&&(this._mode=t,this.trigger("mode",t,e))}get isViewMode(){return this._mode==w9}get isEditMode(){return 1==this._mode}get baseUrl(){return this._baseUrl}set baseUrl(t){t&&this._baseUrl!=t&&(this._baseUrl=t)}url(t){try{return(t.includes(Hnt)?new URL(t.replace(Hnt,this.baseUrl),this.baseUrl):new URL(t,location.origin)).href}catch(e){m9(e,t)}}get rotateStep(){return this._rotateStep}set rotateStep(t){this._rotateStep=Number(t)||Wnt}get rotateStepForced(){return this._rotateStepForced}set rotateStepForced(t){this._rotateStepForced=!!t}get dataStorage(){return this._dataStorage}set dataStorage(t){this._dataStorage=t}}g9(qnt.prototype,l9.withEvent);class Xnt{constructor(t,e){!(t=Number(t))||t<=0?(v9("TimeCapsule maxsize should be greater than 0.",t),this.maxsize=10):this.maxsize=t,this.reset(),e&&this.snapshot(e)}dispose(){this.reset()}snapshot(t){this.q.splice(this.pos+1,this.q.length-(this.pos+1),t),this.q.length>this.maxsize&&this.q.splice(0,this.q.length-this.maxsize),this.pos=this.q.length-1}forward(){if(this.snapshot_taker&&this.snapshot_taker.take(),this.forwardable)return this.q[++this.pos];m9("Not forwardable.")}backward(){if(this.snapshot_taker&&this.snapshot_taker.take(),this.backwardable)return this.q[--this.pos];m9("Not backwardable.")}get current(){if(-1!==this.pos)return this.q[this.pos];m9("Non state has been recorded.")}get length(){return this.q.length}get forwardable(){return this.pos<this.q.length-1}get backwardable(){return this.pos>0}get snapshot_taker(){return this._snapshot_taker}set snapshot_taker(t){this._snapshot_taker=t}reset(){this.q=[],this.pos=-1}}var Vnt=P7((t=>{t.brake||t.take()}),1e3,{leading:!0,trailing:!1});function Qnt(t){!t.brake&&t.dirty&&Vnt(t)}class Knt{constructor(t,e){this.brake=!1,this.dirty=!1,this.state_holder=t,this.timecapsule=e,this.timecapsule.snapshot_taker=this}dispose(){delete this.state_holder,delete this.timecapsule}touch(){this.dirty=!0,Qnt(this)}take(t){(this.dirty||t)&&(this.timecapsule.snapshot(this.state_holder.state),this.dirty=!1)}get brake(){return this._brake}set brake(t){this._brake=!!t,Qnt(this)}}function Jnt(t,e){var r=e.model_layer.get("scale"),n=e.model_layer.get("translate");if(t){let i=JSON.parse(t);i.scale=r,i.translate=n,e.rebuildContentModel(i)}}class Znt{constructor(t){this.container=t,this.timecapsule=new Xnt(20);var e=this;this.snapshot_taker=new Knt({get state(){let t=e.container.model_layer.hierarchy;return JSON.stringify(t)}},this.timecapsule),this.snapshot_taker.take(!0)}dispose(){this.reset(),this.timecapsule&&this.timecapsule.dispose(),this.snapshot_taker&&this.snapshot_taker.dispose(),delete this.container,delete this.timecapsule,delete this.snapshot_taker}execute(t,e){!1!==e&&t&&t.execute(),this.snapshot_taker.touch(),this.trigger("execute",t,!0,!1)}undo(){this.timecapsule.backwardable&&(Jnt(this.timecapsule.backward(),this.container),this.trigger("undo",this.undoable(),this.redoable()))}redo(){this.timecapsule.forwardable&&(Jnt(this.timecapsule.forward(),this.container),this.trigger("redo",this.undoable(),this.redoable()))}undoable(){return this.timecapsule.backwardable}redoable(){return this.timecapsule.forwardable}reset(){this.timecapsule&&this.timecapsule.reset(),this.trigger("command-reset")}}g9(Znt.prototype,l9.withEvent);var $nt=new WeakSet;class tit{static get residents(){return $nt}constructor(t){this._container=t,this.app=t.app,this._commander=new Znt(this._container),this.app.commander=this._commander,$nt.add(this)}add(){return hrt.apply(this._container,arguments)}duplicate(){return drt.apply(this._container,arguments)}remove(){return prt.apply(this._container,arguments)}animate(){return Z5.apply(this,arguments)}fullscreen(){return yrt.apply(this._container,arguments)}get target(){return this._container.target_element}set target(t){var e;if("string"==typeof t){if(!(e=document.getElementById(t)))throw`target element '${t}' is not exist`;if(e.firstChild)throw`target element '${t}' already has children`}else e=t;e&&e.style&&(e.style.cursor="default"),this._container.target_element=e,this._container.invalidate()}get scale(){return this.root.get("scale")}set scale(t){this.root.set("scale",t)}get translate(){return this.root.get("translate")}set translate(t){this.root.set("translate",t)}get unit(){return this.root.get("unit")||"px"}get PPM(){return this.app.PPM}get PPI(){return this.app.PPI}get DPPX(){return this.app.DPPX}get unitScale(){return this._container.unitScale}get screen(){return this.app.screen}set screen(t){this.app.screen=t,this._container.resize()}resize(){this._container.resize()}dispose(){this._commander&&this._commander.dispose(),this._container&&this._container.dispose()}get selected(){return this._container.selected.slice()}set selected(t){this._container.selected=t}select(t,...e){return this._container.selected=this.root?.findAll(t,...e),this.selected}get commander(){return this._commander}undo(){this.commander.undo()}redo(){this.commander.redo()}cut(){return wrt.apply(this._container,arguments)}copy(){return xrt.apply(this._container,arguments)}paste(){return Art.apply(this._container,arguments)}undoableChange(){return Urt.apply(this._container,arguments)}change(){return Nrt.apply(this.root,arguments)}get model(){return this.root.hierarchy}set model(t){this._container.rebuildContentModel(t)}get root(){return this._container?.model_layer}findAll(){return this.root.findAll.apply(this.root,arguments)}findFirst(){return this.root.findFirst.apply(this.root,arguments)}findById(){return this._container.findById.apply(this._container,arguments)}serialize(){return this.root.trim(),this.root.serialize.apply(this.root,arguments)}align(){return trt.apply(this._container,arguments)}distribute(){return nrt.apply(this._container,arguments)}move(){return ort.apply(this._container,arguments)}zorder(){return srt.apply(this._container,arguments)}symmetryX(){return Frt.apply(this._container,arguments)}symmetryY(){return Brt.apply(this._container,arguments)}on(){return grt.apply(this._container,arguments)}once(){return vrt.apply(this._container,arguments)}off(){return this._container&&mrt.apply(this._container,arguments)}get mode(){return this.app.mode}set mode(t){void 0!==t&&(this.app.mode=t)}toDataURL(){return Crt.apply(this._container,arguments)}group(){return jrt.apply(this._container,arguments)}ungroup(){return Drt.apply(this._container,arguments)}fit(t){this._container.once("redraw",(()=>this._container.fit(t))),this._container.invalidate()}get fitMode(){return this._container.fitMode}get ids(){return Yrt.apply(this._container)}get data(){return this._container.data}set data(t){this._container.data=t}get dataByRefid(){return this._container.dataByRefid}set dataByRefid(t){this._container.dataByRefid=t}get values(){return this._container.values}set values(t){this._container.values=t}get valuesByRefid(){return this._container.valuesByRefid}set valuesByRefid(t){this._container.valuesByRefid=t}get baseUrl(){return this.app.baseUrl}set baseUrl(t){this.app.baseUrl=t}startAddMode(){return frt.apply(this._container,arguments)}}const eit=new class{load(t){}save(t,e){}clear(t){}};function rit({target:t,model:e,style:r,layers:n=[],handlers:i=[],mode:a=w9,refProvider:o,dataSubscriptionProvider:s,dataStorage:c=eit,baseUrl:u,fitMode:l}){var h=null;if("string"==typeof t){if(!(h=document.getElementById(t)))throw`target element '${t}' is not exist`;if(h.firstChild)throw`target element '${t}' is not empty`}else h=t;h&&h.style&&(h.style.position="absolute",h.style.cursor="default",h.style.overflow="hidden");var f=new qnt(a,o);return f.baseUrl=u,f.dataSubscriptionProvider=s,f.dataStorage=c,new tit(new Unt({target_element:h,model:e,style:r,layers:n,handlers:i,fitMode:l},f))}const nit=["mousemove","mouseup","mousedown","mouseout","wheel","tap","click","touchstart","touchmove","touchend","mouseenter","mouseleave","dragstart","dragmove","dragend","dblclick"];var iit=t=>class extends t{isHTMLElement(){return!0}isShadowable(){return!0}get element(){return this._element}set element(t){this._element=t}get tagName(){return this.get("type")}setElementProperties(t){throw new Error("Not Implemented Yet")}createElement(){this.element=document.createElement(this.tagName),this.element&&(this.parent.isHTMLElement()?this.parent.element.appendChild(this.element):this.root.model_layer.overlay.appendChild(this.element),nit.forEach((t=>{this.element.addEventListener(t,this.userInputEventHandler.bind(this))})),P9.forEach((t=>{this.element.addEventListener(t,this.userInputEventHandler.bind(this))})),this.oncreate_element&&this.oncreate_element(this.element))}userInputEventHandler(t){Ont(this,t.type,t),t.stopPropagation()}reposition(){this.element&&ytt(this)}disposeElement(){var t=this.element;t&&t.parentElement&&t.parentElement.removeChild(t),delete this.element}ready(){super.ready(),!this.element&&this.createElement(),this.parent.isHTMLElement()?this.parent.element.appendChild(this.element):this.root.model_layer.overlay.appendChild(this.element),this.setElementProperties(this.element),this.reposition()}dispose(){this.disposeElement(this),super.dispose()}get hasTextProperty(){return!0}get textHidden(){return!0}onchange(t,e){this.element&&this.setElementProperties(this.element),this.reposition()}isDescendible(t){return t.isHTMLElement()}};const ait={x:1,y:1},oit={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"},sit={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"layout",label:"layout",name:"layoutOption"}],help:"scene/component/container"};class cit extends(iit(get)){get tagName(){return"div"}get nature(){return sit}setElementProperties(t){}get layout(){return Wtt.get(this.get("layout"))||qtt}reposition(){if(this.element){var t=this,{id:e,class:r,scale:n=ait}=t.state,{rotation:i=0,hidden:a}=t,{left:o,top:s,width:c,height:u}=t.bounds,l=c/2,h=u/2,f=t.element;f.hidden=a,e&&(f.id=e),r&&(f.className=r),Object.assign(f.style,oit,{left:o+"px",top:s+"px",width:"0px",height:"0px",backgroundColor:"transparent"});var d=t.delta(),p=(n&&n.x||1)*d.sx,g=(n&&n.y||1)*d.sy,v=(i||0)+d.theta,m=d.tx||0,y=d.ty||0;["-webkit-","-moz-","-ms-","-o-",""].forEach((t=>{f.style[t+"transform"]=`translate(${m+l}px, ${y+h}px) rotate(${v}rad) translate(${-l}px, ${-h}px) scale(${p}, ${g}) perspective(1px)`}))}}}ztt.register("container",cit);const uit=5,lit=Math.sqrt(3),hit=2;function fit(t,e,r,n,i){var a,o,s,c,u=uit+i,l=r.x,h=r.y,f=n.x,d=n.y;if(Math.abs(l-f)>u&&Math.abs(h-d)>u){var p=(d-h)/(f-l),g=h-p*l;if(Math.abs(e-(p*t+g))>u)return!1}return l>f?(o=l,a=f):(o=f,a=l),h>d?(c=h,s=d):(c=d,s=h),!(o+uit<t)&&(!(a-uit>t)&&(!(c+uit<e)&&!(s-uit>e)))}function dit(t,e,r,n=2){for(let i=0;i<r.length-1;i++)if(fit(t,e,r[i],r[i+1],n))return!0;return!1}function pit(t,e,r,n){if("arrow"!=t.slice(-5))return r;var i=Math.atan2(n.y-r.y,n.x-r.x),a=1.5*e;return{x:r.x+Math.cos(i)*a,y:r.y+Math.sin(i)*a}}function git(t,e,r){var{lineWidth:n=hit,strokeStyle:i="#000000",lineCap:a=!1,alpha:o=1,begin:s="none",end:c="none",beginSize:u="size5",endSize:l="size5"}=r;if(("none"!=s||"none"!=c)&&(n=Number(n)||hit,t.lineCap=a,t.lineWidth=n,t.strokeStyle=i,t.fillStyle=i,t.globalAlpha*=o,"none"!=s&&vit(t,e[0],e[1],n,s,mit(u,n)),"none"!=c)){let r=e.length;vit(t,e[r-1],e[r-2],n,c,mit(l,n))}}function vit(t,e,r,n,i,a){var{x:o,y:s}=e,c=Math.atan2(r.y-s,r.x-o);switch(t.beginPath(),t.translate(o,s),t.rotate(c),i){case"oval":t.ellipse(0,0,a.X,a.Y,0,0,2*Math.PI),t.fill();break;case"diamond":t.moveTo(-a.X,0),t.lineTo(0,-a.Y),t.lineTo(a.X,0),t.lineTo(0,a.Y),t.fill();break;case"arrow":t.moveTo(0,0),t.lineTo(lit*a.X,-a.Y),t.lineTo(lit*a.X,a.Y),t.fill();break;case"sharp-arrow":t.moveTo(0,0),t.lineTo(lit*a.X,-a.Y),t.lineTo(-a.X/1.5+lit*a.X,0),t.lineTo(lit*a.X,a.Y),t.fill();break;case"open-arrow":t.moveTo(lit*a.X+n,-a.Y),t.lineTo(n,0),t.lineTo(lit*a.X+n,a.Y),t.stroke()}t.rotate(-c),t.translate(-o,-s),t.closePath()}function mit(t,e){let r={};switch(e*=1.2,t){case"size1":r.X=e,r.Y=e;break;case"size2":r.X=1.5*e,r.Y=e;break;case"size3":r.X=2*e,r.Y=e;break;case"size4":r.X=e,r.Y=1.5*e;break;case"size5":default:r.X=1.5*e,r.Y=1.5*e;break;case"size6":r.X=2*e,r.Y=1.5*e;break;case"size7":r.X=e,r.Y=2*e;break;case"size8":r.X=1.5*e,r.Y=2*e;break;case"size9":r.X=2*e,r.Y=2*e}return r}const yit="N",bit="S",xit="E",wit="W";class Ait{constructor({component:t,anchor:e,position:r,self:n}){this.component=t,this._anchorName=e,this._position=r,this.self=n}get position(){const t=this.anchor;if(t){var{position:e}=t;const r=this.component.transcoordS2T(e.x,e.y);return this.self.transcoordT2P(r.x,r.y)}return this._position}set position({x:t,y:e}){this._position={x:t,y:e}}get anchor(){return this.component?.findAnchor(this._anchorName)}get direction(){const t=this.component.bounds,e=this.anchor;if(!e)return xit;const r=e.position;return r.y<=t.top?yit:r.y>=t.top+t.height?bit:r.x<=t.left?wit:xit}get boundaryPosition(){const t=this.anchor;if(t){var{position:e}=t,r=0,n=0;switch(this.direction){case bit:n=20;break;case yit:n=-20;break;case wit:r=-20;break;default:r=20}e={x:e.x+r,y:e.y+n};const i=this.component.transcoordS2T(e.x,e.y);return this.self.transcoordT2P(i.x,i.y)}}}class _it extends ztt{isLine(){return!0}replaceRefids(t){["from","to"].forEach((e=>{const r=this.get(e);if(r?.component){const n=t.get(r.component)||r.component;this.set(e,{...r,component:n})}}))}get fromEnd(){if(this.parent&&!this._fromEnd){const{component:t,anchor:e,position:r}=this.getState("from")||{};if(!t)return;const n=this.root?.findByRefid(t);if(!n)return;this._fromEnd=new Ait({component:n,fromto:"from",anchor:e,position:r,self:this})}return this._fromEnd}get from(){return this.getState("from")}set from(t){delete this._fromEnd,this.set("from",t)}get toEnd(){if(this.parent&&!this._toEnd){const{component:t,anchor:e,position:r}=this.getState("to")||{};if(!t)return;const n=this.root?.findByRefid(t);if(!n)return;this._toEnd=new Ait({component:n,fromto:"to",anchor:e,position:r,self:this})}return this._toEnd}get to(){return this.getState("to")}set to(t){delete this._toEnd,this.set("to",t)}move({x:t,y:e},r){r&&(this.from={position:this._fromEnd?.position||this.getState("from")?.position||{x:0,y:0}},this.to={position:this._toEnd?.position||this.getState("to")?.position||{x:0,y:0}}),super.move({x:t,y:e},r)}render(t){var{begin:e="none",end:r="none",lineWidth:n,round:i=0}=this.state,a=this.drawPath;git(t,a,this.state),t.beginPath();var o=pit(e,n,a[0],a[1]),s=pit(r,n,a[a.length-1],a[a.length-2]);a=[o,...a.slice(1,-1),s];var c={x:o.x,y:o.y};t.moveTo(o.x,o.y);for(var u=1;u<a.length;u++){const e=c;c=a[u];const r=a[u+1];if(e.x===c.x&&e.y===c.y)continue;if(!r){t.lineTo(c.x,c.y);break}var l=0!==(d=Math.sqrt((e.x-c.x)*(e.x-c.x)+(e.y-c.y)*(e.y-c.y)))?Math.atan2(e.x-c.x,e.y-c.y):0,h=Math.sin(l)*Math.min(i,d/2)+c.x,f=Math.cos(l)*Math.min(i,d/2)+c.y;const n=i>0||0!==d?{x:h,y:f}:c;var d;l=0!==(d=Math.sqrt((r.x-c.x)*(r.x-c.x)+(r.y-c.y)*(r.y-c.y)))?Math.atan2(r.x-c.x,r.y-c.y):0,h=Math.sin(l)*Math.min(i,d/2)+c.x,f=Math.cos(l)*Math.min(i,d/2)+c.y;const o=i>0||0!==d?{x:h,y:f}:c;t.lineTo(n.x,n.y),i>0&&t.quadraticCurveTo(c.x,c.y,o.x,o.y)}this.drawStroke(t)}contains(t,e){var{lineWidth:r}=this.state;return dit(t,e,this.drawPath,r)}get resizable(){return!1}get mutable(){return!0}get rotatable(){return!1}get path(){const{from:t,to:e}=this.state;var{x1:r,y1:n,x2:i,y2:a}=this.state;return[this.fromEnd?.position||t?.position||{x:r,y:n},this.toEnd?.position||e?.position||{x:i,y:a}]}set path(t){const[e,r]=t,{from:n,to:i}=this.state;delete this._fromEnd,delete this._toEnd,this.set({from:{...n,position:e},to:{...i,position:r}})}get textBounds(){var t,e,r=this.drawPath,n=0;for(let s=1;s<r.length;s++){var i=r[s-1],a=r[s],o=(i.x-a.x)*(i.x-a.x)+(i.y-a.y)*(i.y-a.y);o>n&&(n=Math.ceil(o),t=i,e=a)}var{paddingTop:s,paddingLeft:c,paddingRight:u,paddingBottom:l}=this.state;return l||=0,s||=0,c||=0,u||=0,{left:Math.min(t.x,e.x)+c,top:Math.min(t.y,e.y)+s,width:Math.max(Math.abs(t.x-e.x)-c-u,0),height:Math.max(Math.abs(t.y-e.y)-s-l,0)}}get decorators(){return["decotag"]}}_it.getTipNeckPos=pit,_it.containedInPath=dit,_it.drawEndTips=git,ztt.register("line",_it);const kit={mutable:!1,resizable:!0,rotatable:!0,properties:[],"value-property":"text"};class Eit extends(Aet(Ftt)){is3dish(){return!0}render(t){var{cx:e,cy:r,rx:n,ry:i,startAngle:a,endAngle:o,anticlockwise:s}=this.state;t.beginPath(),t.ellipse(e,r,Math.abs(n),Math.abs(i),0,a||0,o||2*Math.PI,s)}get path(){var{cx:t,cy:e,rx:r,ry:n}=this.state;return[{x:t-r,y:e-n},{x:t+r,y:e-n},{x:t+r,y:e+n},{x:t-r,y:e+n}]}set path(t){var e=t[0],r=t[2];this.set({cx:e.x+(r.x-e.x)/2,cy:e.y+(r.y-e.y)/2,rx:(r.x-e.x)/2,ry:(r.y-e.y)/2})}contains(t,e){var{cx:r,cy:n,rx:i,ry:a}=this.state,o=(t-r)/(2*i-.5),s=(e-n)/(2*a-.5);return o*o+s*s<.25}outline(t){return function(t,e){var{cx:r,cy:n,rx:i,ry:a}=t.model,o=2*Math.PI*e,s=r+i*Math.cos(o),c=n+a*Math.sin(o);return t.transcoordS2T(s,c)}(this,t)}get anchors(){return function(t){var{left:e,top:r,width:n,height:i}=t.bounds,a=e+n/2,o=r+i/2;return[{name:"TOP",position:{x:a,y:r}},{name:"RIGHT",position:{x:e+n,y:o}},{name:"BOTTOM",position:{x:a,y:r+i}},{name:"LEFT",position:{x:e,y:o}}]}(this)}get nature(){return kit}}ztt.memoize(Eit.prototype,"path",!1),ztt.register("ellipse",Eit);var Sit={ondragstart:function(t,e,r){r.mutatePath(null,(function(r){r.splice(e+1,0,t)}))},ondragmove:function(t,e,r){r.mutatePath(null,(function(r){r[e+1]=t}))},ondragend:function(t,e,r){}};const Mit={mutable:!0,resizable:!1,rotatable:!0,properties:[{type:"number",label:"round",name:"round",property:{min:0,max:100,step:1}}],help:"scene/component/polygon"};class Tit extends Ftt{is3dish(){return!0}get mutable(){return!0}get pathExtendable(){return!0}get path(){return this.state.path}set path(t){this.set("path",t)}contains(t,e){var r=this.state.path,n=!1;return r.forEach(((i,a)=>{let o=(a+r.length+1)%r.length,s=i.x,c=i.y,u=r[o].x,l=r[o].y;c>e!=l>e&&t<(u-s)*(e-c)/(l-c)+s&&(n=!n)})),n}get controls(){var t=this.path;return t.map(((e,r)=>{let n=t[r+1>=t.length?0:r+1];return{x:(e.x+n.x)/2,y:(e.y+n.y)/2,handler:Sit}}))}get nature(){return Mit}}ztt.memoize(Tit.prototype,"controls",!1),ztt.register("polygon",Tit);var Pit={ondragstart:function(t,e,r){r.mutatePath(null,(function(r){r.splice(e,0,t)}))},ondragmove:function(t,e,r){r.mutatePath(null,(function(r){r[e]=t}))},ondragend:function(t,e,r){}};const Oit={mutable:!1,resizable:!1,rotatable:!1,properties:[{type:"number",label:"round",name:"round",property:{min:0,max:100,step:1}}],help:"scene/component/polyline"};class Iit extends _it{get pathExtendable(){return!0}get path(){const{from:t,to:e}=this.state,{path:r}=this.state;return[this.fromEnd?.position||t?.position||r[0],...r.slice(1,-1),this.toEnd?.position||e?.position||r[r.length-1]]}set path(t){const{from:e,to:r}=this.state;delete this._fromEnd,delete this._toEnd,this.set({from:{...e,position:t[0]},to:{...r,position:t[t.length-1]},path:t})}get controls(){var t=this.path,e=[];for(let r=0;r<t.length-1;r++){let n=t[r],i=t[r+1];0==r&&e.push({x:n.x,y:n.y,handler:Pit}),e.push({x:(n.x+i.x)/2,y:(n.y+i.y)/2,handler:Pit}),r==t.length-2&&e.push({x:i.x,y:i.y,handler:Pit})}return e}get nature(){return Oit}}ztt.register("polyline",Iit);const Rit={mutable:!1,resizable:!1,rotatable:!1,properties:[{type:"number",label:"round",name:"round",property:{min:0,max:100,step:1}}],help:"scene/component/ortholine"};class Cit extends _it{get pathExtendable(){return!1}get drawPath(){const t=this.path[0],e=this.path[1],{component:r,direction:n,boundaryPosition:i=t}=this.fromEnd||{},{component:a,direction:o,boundaryPosition:s=e}=this.toEnd||{};var c=[i,s],u=[];i&&u.push(i);var l=r?.bounds;if(l){var h=r.transcoordS2T(l.left,l.top);h=this.transcoordT2P(h.x,h.y),l={...l,left:h.x,top:h.y}}var f=l?{left:l.left-20,top:l.top-20,width:l.width+40,height:l.height+40}:{left:i.x,top:i.y,width:0,height:0};l=l||f;var d=a?.bounds;if(d){h=a.transcoordS2T(d.left,d.top);h=this.transcoordT2P(h.x,h.y),d={...d,left:h.x,top:h.y}}var p=d?{left:d.left-20,top:d.top-20,width:d.width+40,height:d.height+40}:{left:s.x,top:s.y,width:0,height:0};d=d||p;var g=[f,p];const v=f.left>p.left?p.left:f.left,m=f.top>p.top?p.top:f.top;var y,b,x,w,A,_,k,E,S,M,T={left:v,top:m,width:f.left+f.width>p.left+p.width?f.left+f.width-v:p.left+p.width-v,height:f.top+f.height>p.top+p.height?f.top+f.height-m:p.top+p.height-m},P=0,O=0;l.left+l.width<d.left?(w=0,A=1,S=n,M=o,y=(l.left+l.width+d.left)/2,P=d.left-y):d.left+d.width<l.left&&(w=1,A=0,S=o,M=n,y=(l.left+d.width+d.left)/2,P=l.left-y),l.top+l.height<d.top?(x=0,_=1,k=n,E=o,b=(l.top+l.height+d.top)/2,O=d.top-b):d.top+d.height<l.top&&(x=1,_=0,k=o,E=n,b=(l.top+d.height+d.top)/2,O=l.top-b);var I=[];if(y&&P>O){switch(M){case wit:switch(S){case xit:I.push({x:y,y:c[w].y}),I.push({x:y,y:c[A].y});break;case wit:var R=g[w].top+g[w].height/2>c[A].y?Math.min(g[w].top,c[A].y):Math.max(g[w].top+g[w].height,c[A].y);I.push({x:c[w].x,y:R}),I.push({x:y,y:R}),I.push({x:y,y:c[A].y});break;case yit:case bit:R=S===bit?Math.max(c[w].y,c[A].y):Math.min(c[w].y,c[A].y);I.push({x:c[w].x,y:R}),I.push({x:y,y:R}),I.push({x:y,y:c[A].y});break;default:return this.path}break;case xit:switch(S){case xit:var C=R=c[w].y<c[A].y?Math.min(g[A].top,c[w].y):Math.max(g[A].top+g[A].height,c[w].y);break;case wit:C=R=void 0!==b?b:c[w].y<c[A].y?T.top-.5*P:T.top+T.height+.5*P;break;case bit:C=R=void 0!==b?Math.max(b,c[w].y):T.top+T.height;break;case yit:C=R=b?Math.min(b,g[w].top):T.top;break;default:return this.path}I.push({x:c[w].x,y:R}),I.push({x:y,y:R}),I.push({x:y,y:C}),I.push({x:c[A].x,y:C});break;case bit:switch(S){case xit:R=c[w].y,C=c[w].y>c[A].y?c[w].y:g[A].top+g[A].height;break;case wit:C=R=b?Math.max(b,g[A].top+g[A].height):T.top+T.height;break;case bit:C=R=T.top+T.height;break;case yit:R=b?Math.min(b,g[w].top):g[w].top,C=b?Math.max(b,g[A].top+g[A].height):g[A].top+g[A].height;break;default:return this.path}I.push({x:c[w].x,y:R}),I.push({x:y,y:R}),I.push({x:y,y:C}),I.push({x:c[A].x,y:C});break;case yit:switch(S){case xit:R=c[w].y,C=c[w].y<c[A].y?c[w].y:g[A].top;break;case wit:C=R=b?Math.min(b,g[A].top):T.top;break;case bit:R=void 0!==b?Math.max(b,c[w].y):c[w].y,C=void 0!==b?Math.min(b,c[A].y):c[A].y;break;case yit:C=R=T.top;break;default:return this.path}I.push({x:c[w].x,y:R}),I.push({x:y,y:R}),I.push({x:y,y:C}),I.push({x:c[A].x,y:C});break;default:return this.path}u.push(...0===w?I:I.reverse())}else if(b){switch(E){case yit:switch(k){case bit:I.push({x:c[x].x,y:b}),I.push({x:c[_].x,y:b});break;case yit:var j=g[x].left+g[x].width/2>c[_].x?Math.min(g[x].left,c[_].x):Math.max(g[x].left+g[x].width,c[_].x);I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:c[_].x,y:b});break;case wit:j=Math.min(c[x].x,c[_].x);I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:c[_].x,y:b});break;case xit:j=Math.max(c[x].x,c[_].x);I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:c[_].x,y:b});break;default:return this.path}break;case bit:switch(k){case wit:var D=j=T.left;break;case xit:D=j=void 0!==y?Math.max(y,c[x].x):T.left+T.width;break;case yit:D=j=void 0!==y?y:c[x].x<c[_].x?T.left-.5*O:T.left+T.width+.5*O;break;case bit:j=c[x].x,D=c[x].x<c[_].x?Math.min(g[_].left,c[x].x):Math.max(g[_].left+g[_].width,c[x].x);break;default:return this.path}I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:D,y:b}),I.push({x:D,y:c[_].y});break;case xit:switch(k){case wit:j=void 0!==y?Math.min(y,c[x].x):c[x].x,D=void 0!==y?Math.max(y,c[_].x):c[_].x;break;case xit:D=j=T.left+T.width;break;case yit:D=j=void 0!==y?Math.max(y,c[_].x):T.left+T.width;break;case bit:j=c[x].x,D=Math.max(g[_].left+g[_].width,c[x].x);break;default:return this.path}I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:D,y:b}),I.push({x:D,y:c[_].y});break;case wit:switch(k){case wit:D=j=T.left;break;case xit:j=void 0!==y?Math.max(y,c[x].x):c[x].x,D=void 0!==y?Math.min(y,c[_].x):c[_].x;break;case yit:D=j=T.left;break;case bit:j=c[x].x<c[_].x?Math.min(g[_].left,c[x].x):c[x].x,D=Math.min(j,c[_].x);break;default:return this.path}I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:D,y:b}),I.push({x:D,y:c[_].y});break;default:return this.path}u.push(...0===x?I:I.reverse())}else switch(n){case yit:switch(o){case yit:var L=T.top;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case bit:var z=T.left+T.width;u.push({x:z,y:c[0].y}),u.push({x:z,y:T.top+T.height}),u.push({x:c[1].x,y:T.top+T.height});break;case xit:z=c[1].y<c[0].y&&c[1].x<c[0].x?c[0].x:T.left+T.width;u.push({x:z,y:c[0].y}),u.push({x:z,y:c[1].y});break;case wit:z=T.left;u.push({x:z,y:c[0].y}),u.push({x:z,y:c[1].y});break;default:return this.path}break;case bit:switch(o){case yit:z=T.left+T.width;u.push({x:z,y:c[0].y}),u.push({x:z,y:T.top}),u.push({x:c[1].x,y:T.top});break;case bit:L=T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case xit:L=T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case wit:L=T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;default:return this.path}break;case wit:switch(o){case yit:z=c[0].x>c[1].x&&c[0].y<c[1].y?c[1].x:T.left,L=c[0].x>c[1].x&&c[0].y<c[1].y?c[1].y:Math.min(T.top,c[0].y);u.push({x:z,y:c[0].y}),u.push({x:z,y:L}),u.push({x:c[1].x,y:L});break;case bit:z=T.left,L=Math.max(T.top+T.height,c[0].y);u.push({x:z,y:c[0].y}),u.push({x:z,y:L}),u.push({x:c[1].x,y:L});break;case xit:z=T.left+T.width;u.push({x:c[0].x,y:T.top}),u.push({x:z,y:T.top}),u.push({x:z,y:c[1].y});break;case wit:z=T.left;u.push({x:z,y:c[0].y}),u.push({x:z,y:c[1].y});break;default:return this.path}break;case xit:switch(o){case yit:L=c[0].y<c[1].y&&c[0].x<c[1].x?c[0].y:T.top;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case bit:L=c[0].y>c[1].y&&c[0].x<c[1].x?c[0].y:T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case xit:L=T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case wit:L=T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;default:return this.path}break;default:return this.path}return s&&u.push(s),[t,...u,e].filter(((t,e,r)=>{if(0===e)return!0;const n=r[e-1];return t.x!==n.x||t.y!==n.y})).filter(((t,e,r)=>{if(0===e||e>=r.length-1)return!0;const n=r[e-1],i=r[e+1];return!(t.x===n.x&&t.x===i.x||t.y===n.y&&t.y===i.y)}))}get nature(){return Rit}}ztt.register("ortholine",Cit);const jit={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"image-selector",label:"image-src",name:"src",property:{displayField:"id",displayFullUrl:!0,baseUrlAlias:"$base_url",defaultStorage:"scene-image",storageFilters:{type:Array,value:[{name:"category",value:"image"}]},useUpload:!0}},{type:"select",label:"cross-origin",name:"crossOrigin",property:{options:["","anonymous","use-credentials"]}}],"value-property":"src",help:"scene/component/image-view"};class Dit extends(Btt(Ftt)){static get noimage(){return Dit.NOIMAGE||(Dit.NOIMAGE=new Image,Dit.NOIMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABIBAMAAAD7Se1QAAAAIVBMVEUAAABHcEwBAQEREREBAQEEBAQGBgYLCwsDAwMDAwMICAi6HF9tAAAAC3RSTlNNAEAERiMYCS41Eac10lYAAAEgSURBVHhe7dY9asQwEAXgh7DNertNiJy48pIitY3SB7bYdk0ukL1BDDmA9gZecoH4pmFQ3MQayUMguPBrNPD4wD9TCMvJmt3M/AtYwXOlXiWgqADVCUBD46MAnGhMBaCiUQmAm8VA/Eh/eWl9Fn5WcxD+OLuRrUYJDKLluwH2InACUgkoACSdADxQc50Bytadb9RkM0CT13TcvlCT1HFg8UTHvasuUVACCa3El6u2UdD8LFTlKhUFFgA+d3dj10aABkUN72N3jAADCrJq7PIIsPidcxBoTHIIAjMFmyCwmGYIAA1P9gFgfCANAOsDSccCDW+uLDB+kLGg94OkZoAGkwsDDAe2DOg5oPxAg03rBR88OHpBz4N8UVeHFSwma74BTW6Ge4rIRa4AAAAASUVORK5CYII="),Dit.NOIMAGE}dispose(){super.dispose(),this._offcanvas=null,this._image=null}render(t){var{left:e,top:r,width:n,height:i,isGray:a=!1,alpha:o=1,src:s}=this.state;if(this.prepareIf(!this._image&&s),t.beginPath(),t.globalAlpha*=o,this._image&&this._image.complete)if(a&&this._offcanvas)t.drawImage(this._offcanvas,e,r,n,i);else try{t.drawImage(this._image,e,r,n,i)}catch(a){t.drawImage(Dit.noimage,e,r,n,i)}else!this.app.isViewMode&&t.drawImage(Dit.noimage,e,r,n,i)}get nature(){return jit}get hasTextProperty(){return!1}ready(){super.ready(),this.prepareIf(!this._image&&this.state.src)}prepare(t,e){var{src:r,crossOrigin:n}=this.state;if(r){this._image=new Image;try{n&&(this._image.crossOrigin=n),this._image.src=this.app.url(r)||""}catch(t){return void e(t)}this._image.onload=()=>{if(this.get("isGray")){let t=this._image.width,e=this._image.height;this._offcanvas=ztt.createCanvas(t,e);let r=this._offcanvas.getContext("2d");r.drawImage(this._image,0,0);let n=function(t,e,r){try{var n=t.getImageData(0,0,e,r)}catch(t){return v9("Get Image Data Error: "+t.message),null}var i=n.data;for(let t=0;t<e*r*4;t+=4){let e=i[t],r=i[t+1],a=i[t+2],o=parseInt((e+r+a)/3);n.data[t]=o,n.data[t+1]=o,n.data[t+2]=o}return n}(r,t,e);r.putImageData(n,0,0)}t(this)},this._image.onerror=t=>{this._image&&!this._image.currentSrc&&(this._image=null),e(t)}}else t(this)}get src(){return this.get("src")}set src(t){this.set("src",t)}onchange(t,e){(t.hasOwnProperty("src")||t.hasOwnProperty("isGray"))&&(this._offcanvas=null,this._image=null,this.prepareIf(t.src))}ondropfile(t,e){for(let r=0;r<t.length;r++)if(t[r].type.startsWith("image/"))return void(this.src=e[r])}}ztt.register("image-view",Dit);class Lit extends(iit(Btt(ztt))){}var zit={},Fit={},Bit={};Object.defineProperty(Bit,"__esModule",{value:!0});var Nit=function(){function t(){}return t.bitsToNum=function(t){return t.reduce((function(t,e){return 2*t+e}),0)},t.byteToBitArr=function(t){for(var e=[],r=7;r>=0;r--)e.push(!!(t&1<<r));return e},t.lzwDecode=function(t,e){for(var r,n,i=0,a=function(t){for(var r=0,n=0;n<t;n++)e.charCodeAt(i>>3)&1<<(7&i)&&(r|=1<<n),i++;return r},o=[],s=1<<t,c=s+1,u=t+1,l=[],h=function(){l=[],u=t+1;for(var e=0;e<s;e++)l[e]=[e];l[s]=[],l[c]=null};;)if(n=r,(r=a(u))!==s){if(r===c)break;if(r<l.length)n!==s&&l.push(l[n].concat(l[r][0]));else{if(r!==l.length)throw new Error("Invalid LZW code.");l.push(l[n].concat(l[n][0]))}o.push.apply(o,l[r]),l.length===1<<u&&u<12&&u++}else h();return o},t}();Bit.SuperGifUtils=Nit,Object.defineProperty(Fit,"__esModule",{value:!0});var Uit=Bit,Yit=function(){function t(t,e){this.stream=t,this.handler=e}return t.prototype.parseCT=function(t){for(var e=[],r=0;r<t;r++)e.push(this.stream.readBytes(3));return e},t.prototype.readSubBlocks=function(){var t,e;e="";do{t=this.stream.readByte(),e+=this.stream.read(t)}while(0!==t);return e},t.prototype.parseHeader=function(){var t={};if(t.sig=this.stream.read(3),t.ver=this.stream.read(3),"GIF"!==t.sig)throw new Error("Not a GIF file.");t.width=this.stream.readUnsigned(),t.height=this.stream.readUnsigned();var e=Uit.SuperGifUtils.byteToBitArr(this.stream.readByte());t.gctFlag=e.shift(),t.colorRes=Uit.SuperGifUtils.bitsToNum(e.splice(0,3)),t.sorted=e.shift(),t.gctSize=Uit.SuperGifUtils.bitsToNum(e.splice(0,3)),t.bgColor=this.stream.readByte(),t.pixelAspectRatio=this.stream.readByte(),t.gctFlag&&(t.gct=this.parseCT(1<<t.gctSize+1)),this.handler.hdr&&this.handler.hdr(t)},t.prototype.parseExt=function(t){var e=this;switch(t.label=this.stream.readByte(),t.label){case 249:t.extType="gce",function(t){e.stream.readByte();var r=Uit.SuperGifUtils.byteToBitArr(e.stream.readByte());t.reserved=r.splice(0,3),t.disposalMethod=Uit.SuperGifUtils.bitsToNum(r.splice(0,3)),t.userInput=r.shift(),t.transparencyGiven=r.shift(),t.delayTime=e.stream.readUnsigned(),t.transparencyIndex=e.stream.readByte(),t.terminator=e.stream.readByte(),e.handler.gce&&e.handler.gce(t)}(t);break;case 254:t.extType="com",function(t){t.comment=e.readSubBlocks(),e.handler.com&&e.handler.com(t)}(t);break;case 1:t.extType="pte",function(t){e.stream.readByte(),t.ptHeader=e.stream.readBytes(12),t.ptData=e.readSubBlocks(),e.handler.pte&&e.handler.pte(t)}(t);break;case 255:t.extType="app",function(t){e.stream.readByte(),t.identifier=e.stream.read(8),t.authCode=e.stream.read(3),"NETSCAPE"===t.identifier?function(t){e.stream.readByte(),t.unknown=e.stream.readByte(),t.iterations=e.stream.readUnsigned(),t.terminator=e.stream.readByte(),e.handler.app&&e.handler.app.NETSCAPE&&e.handler.app.NETSCAPE(t)}(t):function(t){t.appData=e.readSubBlocks(),e.handler.app&&e.handler.app[t.identifier]&&e.handler.app[t.identifier](t)}(t)}(t);break;default:t.extType="unknown",function(t){t.data=e.readSubBlocks(),e.handler.unknown&&e.handler.unknown(t)}(t)}},t.prototype.parseImg=function(t){t.leftPos=this.stream.readUnsigned(),t.topPos=this.stream.readUnsigned(),t.width=this.stream.readUnsigned(),t.height=this.stream.readUnsigned();var e=Uit.SuperGifUtils.byteToBitArr(this.stream.readByte());t.lctFlag=e.shift(),t.interlaced=e.shift(),t.sorted=e.shift(),t.reserved=e.splice(0,2),t.lctSize=Uit.SuperGifUtils.bitsToNum(e.splice(0,3)),t.lctFlag&&(t.lct=this.parseCT(1<<t.lctSize+1)),t.lzwMinCodeSize=this.stream.readByte();var r=this.readSubBlocks();t.pixels=Uit.SuperGifUtils.lzwDecode(t.lzwMinCodeSize,r),t.interlaced&&(t.pixels=function(t,e){for(var r=new Array(t.length),n=t.length/e,i=function(n,i){var a=t.slice(i*e,(i+1)*e);r.splice.apply(r,[n*e,e].concat(a))},a=[0,4,2,1],o=[8,8,4,2],s=0,c=0;c<4;c++)for(var u=a[c];u<n;u+=o[c])i(u,s),s++;return r}(t.pixels,t.width)),this.handler.img&&this.handler.img(t)},t.prototype.parseBlock=function(){var t={};switch(t.sentinel=this.stream.readByte(),String.fromCharCode(t.sentinel)){case"!":t.type="ext",this.parseExt(t);break;case",":t.type="img",this.parseImg(t);break;case";":t.type="eof",this.handler.eof&&this.handler.eof(t);break;default:throw new Error("Unknown block: 0x"+t.sentinel.toString(16))}"eof"!==t.type&&setTimeout(this.parseBlock.bind(this),0)},t.prototype.parse=function(){this.parseHeader(),setTimeout(this.parseBlock.bind(this),0)},t}();Fit.SuperGifParser=Yit;var Git={};Object.defineProperty(Git,"__esModule",{value:!0});var Hit=function(){function t(t){this.data=t,this.position=0}return t.prototype.readByte=function(){if(this.position>=this.data.length)throw new Error("Attempted to read past end of stream.");return this.data instanceof Uint8Array?this.data[this.position++]:255&this.data.charCodeAt(this.position++)},t.prototype.readBytes=function(t){for(var e=[],r=0;r<t;r++)e.push(this.readByte());return e},t.prototype.read=function(t){for(var e="",r=0;r<t;r++)e+=String.fromCharCode(this.readByte());return e},t.prototype.readUnsigned=function(){var t=this.readBytes(2);return(t[1]<<8)+t[0]},t}();Git.SuperGifStream=Hit,Object.defineProperty(zit,"__esModule",{value:!0});var Wit=Fit,qit=Git,Xit=function(){function t(t,e){var r=this;for(var n in this.gifImgElement=t,this.options={autoPlay:!0},this.loading=!1,this.ready=!1,this.transparency=null,this.delay=null,this.disposalMethod=null,this.disposalRestoreFromIdx=null,this.lastDisposalMethod=null,this.frame=null,this.lastImg=null,this.playing=!0,this.forward=!0,this.ctxScaled=!1,this.frames=[],this.frameOffsets=[],this.initialized=!1,this.currentFrameIndex=-1,this.iterationCount=0,this.stepping=!1,this.handler={hdr:this.withProgress(this.doHdr.bind(this)),gce:this.withProgress(this.doGCE.bind(this)),com:this.withProgress(this.doNothing.bind(this)),app:{NETSCAPE:this.withProgress(this.doNothing.bind(this))},img:this.withProgress(this.doImg.bind(this)),eof:function(){r.pushFrame(),r.canvas.width=r.hdr.width*r.getCanvasScale(),r.canvas.height=r.hdr.height*r.getCanvasScale(),r.playerInit(),r.loading=!1,r.ready=!0,r.loadCallback&&r.loadCallback(r.gifImgElement)}},e)this.options[n]=e[n];this.onEndListener=e.onEnd,this.loopDelay=e.loopDelay||0,this.overrideLoopMode=null!=e.loopMode?e.loopMode:"auto",this.drawWhileLoading=null==e.drawWhileLoading||e.drawWhileLoading}return t.prototype.init=function(){var t=this.gifImgElement.parentNode,e=document.createElement("div");this.canvas=document.createElement("canvas"),this.canvasContext=this.canvas.getContext("2d"),this.tmpCanvas=document.createElement("canvas"),e.className=this.options.enclosingClass||"super-gif",e.appendChild(this.canvas),t&&(t.insertBefore(e,this.gifImgElement),t.removeChild(this.gifImgElement)),this.initialized=!0},t.prototype.loadSetup=function(t){return!this.loading&&(t&&(this.loadCallback=t),this.loading=!0,this.frames=[],this.clear(),this.disposalRestoreFromIdx=null,this.lastDisposalMethod=null,this.frame=null,this.lastImg=null,!0)},t.prototype.completeLoop=function(){this.onEndListener&&this.onEndListener(this.gifImgElement),this.iterationCount++,!1!==this.overrideLoopMode||this.iterationCount<0?this.doStep():(this.stepping=!1,this.playing=!1)},t.prototype.doStep=function(){if(this.stepping=this.playing,this.stepping){this.stepFrame(1);var t=10*this.frames[this.currentFrameIndex].delay;t||(t=100),0===this.getNextFrameNo()?(t+=this.loopDelay,setTimeout(this.completeLoop.bind(this),t)):setTimeout(this.doStep.bind(this),t)}},t.prototype.step=function(){this.stepping||setTimeout(this.doStep.bind(this),0)},t.prototype.putFrame=function(){var t;this.currentFrameIndex=parseInt(this.currentFrameIndex.toString(),10),this.currentFrameIndex>this.frames.length-1&&(this.currentFrameIndex=0),this.currentFrameIndex<0&&(this.currentFrameIndex=0),t=this.frameOffsets[this.currentFrameIndex],this.tmpCanvas.getContext("2d").putImageData(this.frames[this.currentFrameIndex].data,t.x,t.y),this.canvasContext.globalCompositeOperation="copy",this.canvasContext.drawImage(this.tmpCanvas,0,0)},t.prototype.playerInit=function(){this.loadErrorCause||(this.canvasContext.scale(this.getCanvasScale(),this.getCanvasScale()),this.options.autoPlay?this.step():(this.currentFrameIndex=0,this.putFrame()))},t.prototype.clear=function(){this.transparency=null,this.delay=null,this.lastDisposalMethod=this.disposalMethod,this.disposalMethod=null,this.frame=null},t.prototype.parseStream=function(t){try{new Wit.SuperGifParser(t,this.handler).parse()}catch(t){this.handleError("parse")}},t.prototype.setSizes=function(t,e){this.canvas.width=t*this.getCanvasScale(),this.canvas.height=e*this.getCanvasScale(),this.tmpCanvas.width=t,this.tmpCanvas.height=e,this.tmpCanvas.style.width=t+"px",this.tmpCanvas.style.height=e+"px",this.tmpCanvas.getContext("2d").setTransform(1,0,0,1,0,0)},t.prototype.drawError=function(){this.canvasContext.fillStyle="black",this.canvasContext.fillRect(0,0,this.hdr.width,this.hdr.height),this.canvasContext.strokeStyle="red",this.canvasContext.lineWidth=3,this.canvasContext.moveTo(0,0),this.canvasContext.lineTo(this.hdr.width,this.hdr.height),this.canvasContext.moveTo(0,this.hdr.height),this.canvasContext.lineTo(this.hdr.width,0),this.canvasContext.stroke()},t.prototype.handleError=function(t){this.loadErrorCause=t,this.hdr={width:this.gifImgElement.width,height:this.gifImgElement.height},this.frames=[],this.drawError()},t.prototype.doHdr=function(t){this.hdr=t,this.setSizes(this.hdr.width,this.hdr.height)},t.prototype.doGCE=function(t){this.pushFrame(),this.clear(),this.transparency=t.transparencyGiven?t.transparencyIndex:null,this.delay=t.delayTime,this.disposalMethod=t.disposalMethod},t.prototype.pushFrame=function(){this.frame&&(this.frames.push({data:this.frame.getImageData(0,0,this.hdr.width,this.hdr.height),delay:this.delay}),this.frameOffsets.push({x:0,y:0}))},t.prototype.doImg=function(t){var e=this;this.frame||(this.frame=this.tmpCanvas.getContext("2d"));var r=this.frames.length,n=t.lctFlag?t.lct:this.hdr.gct;r>0&&(3===this.lastDisposalMethod?null!==this.disposalRestoreFromIdx?this.frame.putImageData(frames[this.disposalRestoreFromIdx].data,0,0):this.frame.clearRect(this.lastImg.leftPos,this.lastImg.topPos,this.lastImg.width,this.lastImg.height):this.disposalRestoreFromIdx=r-1,2===this.lastDisposalMethod&&this.frame.clearRect(this.lastImg.leftPos,this.lastImg.topPos,this.lastImg.width,this.lastImg.height));var i=this.frame.getImageData(t.leftPos,t.topPos,t.width,t.height);t.pixels.forEach((function(t,r){t!==e.transparency&&(i.data[4*r+0]=n[t][0],i.data[4*r+1]=n[t][1],i.data[4*r+2]=n[t][2],i.data[4*r+3]=255)})),this.frame.putImageData(i,t.leftPos,t.topPos),this.ctxScaled||(this.canvasContext.scale(this.getCanvasScale(),this.getCanvasScale()),this.ctxScaled=!0),this.drawWhileLoading&&(this.canvasContext.drawImage(this.tmpCanvas,0,0),this.drawWhileLoading=this.options.autoPlay),this.lastImg=t},t.prototype.doNothing=function(){},t.prototype.withProgress=function(t){return function(e){t(e)}},t.prototype.getNextFrameNo=function(){var t=this.forward?1:-1;return(this.currentFrameIndex+t+this.frames.length)%this.frames.length},t.prototype.stepFrame=function(t){this.currentFrameIndex=this.currentFrameIndex+t,this.putFrame()},t.prototype.getCanvasScale=function(){return this.options.maxWidth&&this.hdr&&this.hdr.width>this.options.maxWidth?this.options.maxWidth/this.hdr.width:window.devicePixelRatio||1},t.prototype.play=function(){this.playing=!0,this.step()},t.prototype.pause=function(){this.playing=!1},t.prototype.isPlaying=function(){return this.playing},t.prototype.getCanvas=function(){return this.canvas},t.prototype.isLoading=function(){return this.loading},t.prototype.isReady=function(){return this.ready},t.prototype.isAutoPlay=function(){return this.options.autoPlay},t.prototype.getLength=function(){return this.frames.length},t.prototype.getCurrentFrame=function(){return this.currentFrameIndex},t.prototype.moveTo=function(t){this.currentFrameIndex=t,this.putFrame()},t.prototype.loadURL=function(t,e){var r=this;if(this.loadSetup(e)){var n=new XMLHttpRequest;n.open("GET",t,!0),"overrideMimeType"in n?n.overrideMimeType("text/plain; charset=x-user-defined"):"responseType"in n?n.responseType="arraybuffer":n.setRequestHeader("Accept-Charset","x-user-defined"),n.onloadstart=function(){r.initialized||r.init()},n.onload=function(){if(200===n.status){var t=n.response;t.toString().indexOf("ArrayBuffer")>0&&(t=new Uint8Array(t));var e=new qit.SuperGifStream(t);setTimeout((function(){r.parseStream(e)}),0)}else r.handleError("xhr - response")},n.onerror=function(){r.handleError("xhr")},n.send()}},t.prototype.load=function(t){this.loadURL(this.gifImgElement.src,t)},t}(),Vit=zit.SuperGif=Xit;const Qit={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"string",label:"src",name:"src"},{type:"checkbox",label:"play",name:"play"}],"value-property":"src",help:"scene/component/gif-view"};class Kit extends Lit{async oncreate_element(t){var{src:e,play:r}=this.state;this.onchangesrc(e),this.onchangeplay(r)}buildImg(){var t=this.element;t.innerHTML="";var e=document.createElement("img");return e.style.width="100%",e.style.height="100%",t.appendChild(e),e}onchange(t,e){super.onchange(t,e),"src"in t&&this.onchangesrc(t.src),"play"in t&&this.onchangeplay(t.play)}setElementProperties(t){}onchangeplay(t){var e=this._superGif;e&&e.isReady()&&(t?e.play():e.pause())}onchangesrc(t){var e=this.buildImg();t||(t="data:image/gif;base64,R0lGODlhYABIAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEhISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdHR0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpaWltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1tbW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CAgIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKio+Pj5iYmKCgoKampqurq66urrCwsLGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrOzs7S0tLa2tre3t7m5ubu7u7+/v8DAwMHBwcPDw8XFxcfHx8vLy8/Pz9LS0tXV1dfX193d3eTk5Onp6fj4+Pz8/P7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v///////////////////////////////////////////////////////////////////////////////yH5BAkAAPUAIf47R2VuZXJhdGVkIGJ5IGpzZ2lmIChodHRwczovL2dpdGh1Yi5jb20vYW50aW1hdHRlcjE1L2pzZ2lmLykALAAAAABgAEgAAAj+AGcJHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmR9VKqXMmypcuXMGPKnJkSIs2bOHPqZGlzp8+fQOv1DEq0KMyhRpMmRaq0KVCmTqPmhCq1qkyqLrFRSyYwGTVsVo1iZXmNa8Fk18ISHasSm1mDycCq/ck2JTWF1ObSfTjz7cFken3WFbow8M7BDA3rHOwXruKpfGXeTZg3qDVrUge7RRg3KLZjx+Q2HVyvLNy0QaMJjBaVdD2tZr2K/mmNIObRkR+n9AsYt0Pddg1WXppb8bWDx1CLLW74GcJnSl3TtDY8Zu2Et4tKl7n52eyWnxXvhl7+26jqrspbnlfIWjtz2gWPZV95neH8veU9NxZYfbfD3kFt99J6Bnmn0mQO9XfYezrVxxlmx0GUXIAM4hSeffsxBN1TFd5E4Ef3QZbfTg6CNJ5gHXJ3TEntLThiTh+KFCJNAqZU4kgAitjQTheepOBMNcZI0oQ6JpbTjSZtiNN2PZ400IxHpdiSc07G911M0iFZZYtAStnWilUeBGVLrlEZpmM0elmPlmfO8iOZXl4DZpsGEYmll2bSWWCXLwJXVY1+urhjoGEBSuiSah6K36CKtpZoo4s9CimielZq6aWYZqrpppx26umnoIZ6UkAAOw=="),e.src=t,e.setAttribute("rel:animated_src",t),e.setAttribute("rel:auto_play",0),this._superGif=new Vit(e,{autoPlay:!1}),this._superGif.init();for(const t of this.element.children)t.style.width="100%",t.style.height="100%";var r=this._superGif.getCanvas();r.style.width="100%",r.style.height="100%",this._superGif.load((()=>{setTimeout((()=>{this._superGif.moveTo(0),this.play&&this._superGif.play()}),100)}))}ondropfile(t,e){for(let r=0;r<t.length;r++)if(/\.gif$/.test(t[r].name))return void(this.src=e[r])}get src(){return this.getState("src")}set src(t){this.set("src",t)}get play(){return this.getState("play")}set play(t){this.setState("play",t)}get nature(){return Qit}get tagName(){return"div"}}ztt.register("gif-view",Kit);const Jit={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"string",label:"src",name:"src"},{type:"checkbox",label:"started",name:"started"},{type:"checkbox",label:"loop",name:"loop"}],"value-property":"src",help:"scene/component/audio"};class Zit extends(Btt(Ftt)){static get image(){return Zit.IMAGE||(Zit.IMAGE=new Image,Zit.IMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAP1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACzJYIvAAAAFHRSTlMA8BAwgNBgQKB/wCBwUJDg37CvXyUlBK8AABFYSURBVHja7NsBkqIwFIThTiAQgyBq3/+sm6p1tnamZkaTMhJJf1f4S/JeEIiIiIiIiIiIiIiIiEhD7Hg4BH84TpAKjJ4f3NFCtjVd+InXz2RTs+FXlxGylYHfcVfIJmb+YFWSLUyGVJKKBJJKUo+Rd6w63l/qzLuCkryO5fe0l2xk5mMWbe+v0fNBRqf7S3je6CipQ2ACr+dWcYEpzBFS1plpguatsnomMgdIQSOTuQ5SjmE6/UgK8szgdJIUM/FG41YlFmYJ2kkKsY5ZzAwBurHDk3WGeRY0bvYrGa1+rqNI22f7dS32ZnUK1GMr0eSK3mEc9dhKMxp+ZTo8kT2emOXS5LQ1kCxbJBocSd2k5PaIjMVzjWcdJPk9ooBnmzx1t5XbIxqBKpJ4NGTgzwKiGpK4do72gb+ZUMIYtCPm9WCPMsYTE5k2hq2ZvzujlCE1iRmwf3dvmRyKsT0T7b9I7HEPCpqCiqT2IIqaT1pI0noQZdlFC8l/PbYPAnRORT56VBEE6FXkb49agmByKhJ71BME6FsvEntUFQTdqekisUdlQWCXhovEHtUFAWbTapHYo8YgmFybO3vsUWcQYGmxSOxRbRAMprkisUfFQVKmrX18sxt7VB0ENjT1xir2qDxIwkFi3v89e+xRfxAMzfzzIfZ4hyAYDR9zwVuLPd4jCDrTwoLYGb5LEFi3/+E3rweR6urX20c/Fvls2Pvwm9mDSGIPhv8YPyGf3/eo9Ye7O8B2FIShAAooakEttex/rbODad5/yTHIAjqn505IQPv+Xz06dz+4VXORHEZcgAcB8updM8F6e25jBzwIkE07l+x8amMnPDp6nsNJ+BoZ7Q6F8egqAda9VEuRNlZjBzwYkMskdXR73okd8GBAJiKYjBcZKKqG9OiKDbgdfxJ5VhsBPDiQZhaouD3p4hfw4EAmwxisz3MSHwAPEmQ1TB1N+SmXWoAHC7JbZsWl/IxLLcCDBplNo3lrfMLsmwAPGmShAxX5/1vOEzjEz3iyfQ/hI36W4TctsUesOAifPdrQg8M++KYl95iCBkjI1r8634betBAPHZDTPFAmD3zLiHgogVTziMsahz0eIh5aIGHGRSJ2mFtHPR4iHhQIP2UvWGMf8wk74qEIEib7rLjPiBfxiAcCwp8V+Nae3uMdRhAPDIR/J5f/Q2DTcC+hIB7qIGEq3Ti9bx+sryMeAAgS70OK8G2kBD8L8QBAoLWU3g3vUVIc6D0txAMAsY+4jBWowXHO64gHBGKfYJ2T5qY1BxcL98BB+PQ+XiS9xxh9EQ8ChA6C5UXWIUoE9MBB8LVHQoS7ib8/dRn3sAcJ6bQRSdH96RDxIEH4QEX+AHF4LxHEAwUh12xyr1V8lwjiQYDYF8kuf1jluUQQDwrEvkhW8Wc6LhHUgwfhi4QPlHm7LRHawx4kpE191Dq8lgjhAYDQa1cftYrPEiE8OJDb40uqyzdQCA8WhAzL4G/PT4c3WrgHD2IfllGl53V37zsgHg5ApPNvVvq4Fn4spx4oiH1W3CwtEV+PDhEPJyBSkVX4aa7emkM83ICEKWpGM7wdvYCCeDgCEYpcwhLxczhEPFyBCEUWnRL5T6X59SBASBF+9l28TL5F7uEORCZyCUvEx+S7yT0cgoRVb9JaXLR1qUdfgksQ0fTbgmhFB20d8HAKEha14+F8f1sHPNyCiL6EqK+n20/rgIdjkFC0Ho1s6Gndvcc9ICkr/ey8/rHO6vp9KawL8DAFOV6l9Fyub7IbflsCag1qRfVsXWvxHjxIejU+BHZV6uvHD1XiEb++Bw8i+dNd+Wv0eCQmhcPhRPwUUt2DB5G1sfa1aeyzAuyJj9x2HjyIdKzIKw5SI14ieFtvo3kIQERj3lVhkUOnRD7AnjV5369QkAOJZeCH+Jh41xOLs73dQwAifY6dpxCCbjTDzLf1Bm1Y93tAIDOWXcLPvrHyr2hVoEAceEAgDQzB4jetk0/c2OXRHB48EJCpa4dgpYh2ETxtrshz7zx4ICCzfuTSDn8p/EOS9OTjwgMB+cABP3yWYuOPIofs33LigYCULlpZNXJppVU30Vf14kGAUCLijf1D71lN9FW9eFiA9KgZ8FPpPUsSnufGA+8hvAg2Kpz0nrX//qp+PIgpC3i6xJRITOye9fn1VT15ICCrVlQG5rywo0H8x965bVkNwmCYQ2kR6Gmb939WXV65dFnI/tPdjPBfO7XMN4EkTUJtqZp4sCJ1+8jwkhMu0KpMxFXFA8hlVfQSMxGH5mDK1VKV8QCyvTVtUiYyo7V358VStfGoAEFMhGYhEwloxZy9WKo2Hjwg5iSOvFDXeUYd33+PuVfHgwnEBWLocDJp+IIa2fyvperjwQRiXCKGosyXqoA+YfsIELuYu4HAt+msMknfDK4jfQJIzOZ2IPAQWJtFOhQKivR2IDZ6Awis7V0iLxqBI7uEZo19dakTogLSwKvf8yk8Jq6CGK0GKvWlatG7b7kkUU/Lo1gdXWn7/4E0j0qeJDpqN/ABqQcgJgdqURb4chjQktIugDS6wFFiz3JgaJj7AGJmholAe9YKhoZLJ0Ca6smjwJ4VwVN96gVIE5GM71kHaGKxGyAtRDaB2NBhLVmpHyANRKzDO28W7FS3HQFpaIWa8TrfCXQwegJSL5k+8M9UJ+pm9QTEnCIZrR0MDQeQ9ua0iCcYQaBTV0CqNXQW/yiyYG7W1heQanPaCkciBXuH1BkQJzHcDQxmpgGkPatl4WkbCXO/bW9AqlNg4H0PPMi6A1IxkQmOZ8D0ousNSMVEEuyreTAQ6Q7IRJeCX2YZQHhv6SrBOmpkM+YUzN0BqSRQCupmTeCP9wdkhiOREwtEzgGEsWcF9BhK9R8fQDiN7A8DiR0CKXQlj/q9IM8OgXjIzcKBlAHkD6FulgNzJwPIHwpo8mQAkX3LiPq9dKUMAQk9AqmcqmjuBAJCPQIpA4guIAsKJA0gnwNy3A4kDyBIHCEPxAwgf8gPILqA5AFEF5CxZX0lIHYc6rqADLf380BmFMgxgIzUyf8MJKLTRelKHgKy9wgkjfS7LiA0gKgC8vQn3HUA4RQ5LKPIAQciWbqIEg0YkLNDIHYUyqkCsmKN5vg3+W0AYTRATaPY+uu1IwS6UMGAlO6AFPjSCQMStaNh53cdcPG7Hx1Uupo+rx+Bltn1BuTAj5BptEV/bHAAwbnJMICwRmtUDOSEA8s4Rmtw3nITGD6TwUNoG0Ca7xi2YKSPj2eKXQFxQWKA2QbGMWEMMGseOb7C7T47uJS1JyAzVbTjqZdU3zbHzMXWS+qp4Fgn8Ahy/QCRGqQcwU1vGnN7fylboWn8Bzg//hyjxltvdcl45bwFfYKzFyBy11UU9BnjuoqfWizVlQXulpzBTNbaB5Aid+VRrkBFB630AMS9BC8FK2ggE7u/FGy1kvfcB9TKQufX5uUXNWl3EjvWCi4k/u9A3Ddq1CpTIQGe6VN1qd8ArcvDQNw3S41Kn6qQmOq5e7pRr+8fAYLiIJtFrrvYRMYL0q06vj8EZLXUriJzRY8H1xEagOCK7gkghRg6RQYO0I6aWPwIEAru80AiMWSdzAeuDXUKyr+WqpAID8hMHC1Ct8F4mUsQ6W8pJMICki0JHCBczAFdBl38G3VE6ErQhhWlih4LWrCSLpaqjggHiGe9mVjRY0YPoelyqcqIcIDEe97rqJFFH7FcLlUZEQ6Qg5plvZiBFNhtri1VFREGEC/Eg4nZoU5vqi1VFREGkIXDQ8xAIhzoT/WlKiLCAFIYPOQMxOPdjfWlKiLCADJRm3YGj+pDE2xktmmpaogwgMz8d8GrumZ4xzpbvinqISJ+hiTWm7wEqoJdI9JEV9JChAEkS3xCZzKecLcgN6YwlRBhAGmweTsblg6qKMM7Vmh321UQ4QAp1VfwhqVJIh+Wm03W0qV0EOEAybXtivkCmWrKeH2EZ/xBaSBCV2L9Re+LYSqJJIxDu1ew07U0EGEBcTtmHty4JuPtQhvLh1BAhK7Uvvq0GK484QZST0GvvFDqeSJ1IA0r2mfDljvqBoJ//rVsq7yZCA6kXgVkJ2f4ijIGMjOfMVsCBBORB2Jy+sM6ijNvaBUqmw/cStZ8EiKciHwp6Rp++88qmxXQeTUxDiJWJ9wSISvBicgXW+dypn1PqWTznlwgwdZdfiLHr5OELEAEASKvJFRE5JCPKbh8OxHdQKJU0crEzRXrJ/IEkFms6tGyrUw9kQeALFRXvK2iSzsRAAi6BLxM+60xdsqJAEBuXMAMxDLVp+gmAgC57/UT4qvVj3TVRCAgSAYL91aXtyNLzUQAIFhAiP8m0/NHOp+ILiBtPFKrs6bgSOcT0QTEB8nO3QR1yKslggKRf+m11UB0HOl8IlqAeCvauXuo8HnfIqIDyCw6G8XMcGiplMingMzCnbuHFp/3LSLPA4nUpqm5YkWNzwsQeQxIDsKjH5wVSU5qJPIJIIt4jjpqNBAekQeBfJOeHWS81FQoo4/I7UDcS3wUh0liTzLqiEgDqddx4ZHDrNZAACIAEMw88HPYWb0GAhABgEDmgf9Vb5oNBCByOxD3uqWYbCHVBgIQuRlIsbfwMEG5gQBE7gSyHMDsOayrxJvHBRC5B0hOxJH1nK4SlUE6QOR+IG6ju3iYQEqDdIDIzUDyZu/jMRHpS/OiRG4FkiPRfTw8kbrvIAJEACAIDpyHC1/GQHhEbgKSXwTyqIeEur6kixEBgABHOTr7YSX1MSFAhA0E307wUU76Y0KACAsI/tvCRzkF+iIuL0AEAYLbR2QOfvhKJ/obRESBxNt5rPSFXN4f7dyNdqMgEIbhAXWwJErT/e7/Wreb5HTT07QVgWSAeW5g7b4n8qOSUCRPEId4HP93SXp5dDNGRJFcQTxihSH+NW1Bb1cXKpIryJAwnG/zhl8ZcSP6jiKZghwRaaWLnP/AkcSKKJIniEcUs8QfjFLdEmRvkSxB4lfn0QN6DY+lshQpHiT96Dlr6r5hxRUpHST9ZEY71X7DOmOZQVZLsd5Q8wzrPxYYJDiKNqOBG1ZCkZKzrNXu6lHvkjChSFqQsdTPg45ApXtYaUXKr9TNuPcvqO2pVMkitFXAL2a79/qr3HQvVSTXUtofCl79RDXh5CDpw3pwu6+9kRlvtiI5VtPhmHLltT4EKVQkfb8pcOHrXqk6nBAksUjgpKtuYsskaxGKYT0+84uYgziE4YQgMdx0m8PRfis2MbL33PMXoVjD6PEunI4HSjDjStiJP08vQk9hZzQ7oH/geoLYCUBDW4rf4FqCDFt7THUO6B+4jiDn2XNTW7zf4hqCMND4BOsGyw+yAmh0x+QeFh7EeqD5Ce8nLDrI8NpbDyIWHIQNruo4GyAPlhrEzuixBxHLDDJMnfYgYolBricHNfjIdgMWF+Qyu+pkgX4HCwuymL57ELGkIHZG7z2IWE6Q5VV7vGMhQewbtMcZiwhyHj26ne9+xs8PcvDQHnFFqCD7Au0RW4TK+fOKqw4eoOcqYqgU53HR3/5uShFPCfKey9hFDyJO/vAi7RDZnp7X5igyUH72xSDW1E2Pn4tMRCQgR8vLwbgii4gcmLvqQcSPGtIPX3M08wn6I4qYQ94cM/Yw9Xxhmw+X/59wHrtMlX1AmIkzdyaaAnLg1Nnw8WGYSk40X/BOh4+El6LMSBnN2Cd0tPq4w/LJXGrMbCX06PZ2dcM65yzlNertShSHf3SzRAyPM332IcSAHUKPi8EHmXU0l8Uglmni0yipDoi16s+jJKejhywLooz68yiMEcHr2qM4h81CJ++VPJfTu5UwBpv4Pp9DJSi6MJx0bvUwiw4ewgT8zNR0LHUL+OccOpY/3ElzyGKD5pBlMJpDlsOkMythRoNbXh95PJsdA67MrMtAEYbjeDqNo+7oKqWUUkoppZRSSimllFJKFfMXp4vmSjB8n6sAAAAASUVORK5CYII="),Zit.IMAGE}dispose(){super.dispose(),this.started=!1,delete this._audio}ready(){super.ready(),this._audio=new Audio,this._audio.addEventListener("canplay",(()=>{this.started&&this._audio.play()}));var{src:t="",loop:e=!1,started:r=!1}=this.state;this.onchangeSrc(t),this.onchangeLoop(e),this.onchangeStarted(r)}render(t){var{left:e,top:r,width:n,height:i,src:a}=this.state;t.beginPath(),this.drawImage(t,Zit.image,e,r,n,i)}get nature(){return Jit}get hasTextProperty(){return!1}get src(){return this.get("src")}set src(t){this.set("src",t)}get started(){return!!this.get("started")}set started(t){this.set("started",t)}start(){this._audio&&(this._audio.classList.add("active"),this._audio.play())}pause(){this._audio&&(this._audio.classList.remove("active"),this._audio.pause())}onchangeSrc(t){try{"data"!==String(t).substring(0,4)?this._audio.crossOrigin="use-credentials":this._audio.crossOrigin=null,this._audio.src="string"==typeof t?this.app.url(t):t}catch(t){return void console.error(t)}}onchangeStarted(t){const e=this._audio;t?4==e.readyState&&e.play():e.pause()}onchangeLoop(t){this._audio.loop=t}onchange(t,e){"src"in t&&this.onchangeSrc(t.src),"started"in t&&this.onchangeStarted(t.started),"loop"in t&&this.onchangeLoop(t.loop)}ondblclick(t){this.started=!this.started}ondropfile(t,e){for(let r=0;r<t.length;r++)if(t[r].type.startsWith("audio/"))return void(this.src=e[r])}}ztt.register("audio",Zit);class $it extends(Btt(ztt)){is3dish(){return!0}}ztt.register("text",$it);const tat=["refid","left","top","width","height","rotation","animation"];class eat extends cit{isGroup(){return!0}get(t){return this._model[t]}set(t,e){if("string"==typeof t)return this.set({[t]:e});var r=tat.reduce(((e,r)=>(t.hasOwnProperty(r)&&(e[r]=t[r]),e)),{});return super.set(r)}capture(t,e,r){var n=super.capture(t,e,r);if(n!==this)return n}set bounds(t){if(this.__MUTATING__)super.bounds=t;else{var e=this.bounds,r=t.width/e.width,n=t.height/e.height;this.path=this.path.map((i=>({x:t.left+(i.x-e.left)*r,y:t.top+(i.y-e.top)*n}))),this.components&&this.components.forEach((t=>{if(t.mutable)t.mutatePath(null,(function(t){return t.map((function(t){return{x:t.x*r,y:t.y*n}}))}));else{let e=t.bounds,i=t.center,a={x:i.x*(1-r),y:i.y*(1-n)},o=e.width*(1-r),s=e.height*(1-n),c=-(a.x-o/2),u=-(a.y-s/2);t.bounds={left:e.left+c,top:e.top+u,width:e.width*r,height:e.height*n}}}))}}get focusible(){return!1}get bounds(){return super.bounds}get hasTextProperty(){return!1}calculateBounds(){this.clearCache(),this.__MUTATING__=!0,this.mutateBounds((function(t){var e=ztt.union(this.components.map((t=>t.bounds)));return this.components.forEach((t=>{let r=t.bounds;t.bounds={left:r.left-e.left,top:r.top-e.top,width:r.width,height:r.height}})),{left:t.left+e.left,top:t.top+e.top,width:e.width,height:e.height}}),this),this.__MUTATING__=!1,this.parent.isGroup()&&this.parent.calculateBounds()}render(t){}postrender(t){var{top:e,left:r,scale:n}=this.state;t.translate(r,e),this.layout.drawables(this).forEach((e=>{e.draw(t)})),t.translate(-r,-e)}}ztt.register("group",eat);const rat={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"id-input",label:"ref",name:"ref"},{type:"select",label:"fit",name:"fit",property:{options:["both","ratio"]}}],"value-property":"ref",help:"scene/component/local-ref"};class nat extends(Btt(Ftt)){get ref(){var t=this.getState("ref");return t&&"string"==typeof t?this.root.findById(t):null}set ref(t){this.setState("ref",t)}get refScale(){let t=this.ref.bounds,e=this.bounds,r=e.width/t.width,n=e.height/t.height;return"both"===this.model.fit?{x:r,y:n}:{x:Math.min(r,n),y:Math.min(r,n)}}draw(t){this._drawing||(this._drawing=!0,super.draw(t),this._drawing=!1)}prerender(t){if(super.prerender(t),this.ref){let e=this.ref.center,r=this.center,n=this.refScale;t.translate(r.x,r.y),t.scale(n.x,n.y),t.translate(-e.x,-e.y)}}postrender(t){if(this.ref)return this.ref.postrender(t);super.postrender(t)}render(t){if(this.ref)return this.ref.render(t);this.state;var{left:e,top:r,width:n,height:i}=this.bounds;t.beginPath(),t.rect(e,r,n,i)}get nature(){return rat}get hasTextProperty(){return!1}}ztt.memoize(nat.prototype,"ref",!1),ztt.memoize(nat.prototype,"refScale",!1),ztt.register("local-ref",nat);class iat extends(iit(get)){render(t){}get layout(){return Wtt.get(this.get("layout"))||qtt}}const aat={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"board-selector",label:"scene-number",name:"ref",placeholder:"SCENE-1"},{type:"select",label:"fit",name:"fit",property:{options:["both","ratio"]}},{type:"select",label:"mode",name:"mode",property:{options:["view","interaction"]}}],"value-property":"ref",help:"scene/component/global-ref"};class oat extends iat{dispose(){this._releaseRef(),super.dispose()}get nature(){return aat}get hasTextProperty(){return!1}get tagName(){return"div"}setElementProperties(t){var{mode:e="view"}=this.state;t.style.pointerEvents="view"==e?"none":"inherit"}ready(){super.ready(),this.fetchRef()}reposition(){if(!this.element)return;super.reposition();let t=this._element_bounds,{offsetWidth:e,offsetHeight:r}=this.element;if(this._element_bounds={offsetWidth:e,offsetHeight:r},(!t||t.offsetWidth!=e||t.offsetHeight!=r)&&this.ref&&this.root.target_element){let{fit:t="ratio"}=this.state;this.ref.fit(t)}}async fetchRef(){this._releaseRef();var{ref:t,fit:e="ratio"}=this.state;if(t){var r=this.app.refProvider;if(r&&t)try{this.__ref=await r.get(t,!0),this.__ref.target=this.element,this.__ref.fit(e),this.__ref.data=this.data}catch(t){v9(t)}}}get ref(){return this.__ref}set ref(t){this.setState("ref",t)}_releaseRef(){this.__ref&&this.__ref.release&&this.__ref.release(),delete this.__ref}onchange(t,e,r){super.onchange(t,e,r),"ref"in t&&this.fetchRef(),"fit"in t&&this.ref&&requestAnimationFrame((()=>{let{fit:t}=this.state;this.ref.fit(t)})),"data"in t&&this.ref&&requestAnimationFrame((()=>{this.ref.data=t.data}))}}ztt.register("global-ref",oat);const sat={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"board-selector",label:"board",name:"board"},{type:"checkbox",label:"modal",name:"modal"},{type:"checkbox",label:"closable",name:"closable"},{type:"checkbox",label:"show",name:"show"},{type:"select",label:"location",name:"location",property:{options:["center","left-top","right-top","left-bottom","right-bottom","auto"]}},{type:"data",label:"value",name:"value"}],help:"scene/component/popup"};class cat extends(Btt(Ftt)){static get image(){return cat._image||(cat._image=new Image,cat._image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAMAAABG8BK2AAADJmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4xLWMwMDAgNzkuZGFiYWNiYiwgMjAyMS8wNC8xNC0wMDozOTo0NCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIzLjAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RkM4QzQxNUMzMzBEMTFFQ0JEMzZDMDUwQUI4MEI3QTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RkM4QzQxNUQzMzBEMTFFQ0JEMzZDMDUwQUI4MEI3QTAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpENjlENTQ3RjMzMDkxMUVDQkQzNkMwNTBBQjgwQjdBMCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpENjlENTQ4MDMzMDkxMUVDQkQzNkMwNTBBQjgwQjdBMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsiUYSQAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA51BMVEVHcEwzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzOguTm2AAAATHRSTlMARhB73r9B7YLrsqdE+0cq9Avzeg31eQx4aQ+Ks6aUd5DsYKixEX1w8vyT2VjoZ3YezY/cCEDvl+QTvRwJ0ifwK/5T/aw6+IuFuCImAcS6MQAAAeJJREFUWMPt2FlX2zAQhuHJYmOSFhIggbC0QNn3rS1dKXSH9///Hi58CJLxKIpEWi6YO8c5z4lG/nxGEXmu/1OVLGnhrFaSVQYg1SZetTTvUibqeFZ9QlfmvRWoV1VmCaCRzroXPpsuAjTV7gLUfPahBqD1OQMW/fazAWTKvQRI/ZgUSJR7U8CM/dHZ+/2VcatWdvdEZAaYUhiAwkerJXt0rnzXwdRKmHfDM0fHD5kxjTFyVLzVfvvirn7+cDJWjhy7c7XlYuwc6Urvu2tRhRypyhwAf1sKY+TIxfQA+H39q5wxc+RgVrcBduTmZTlj5khnDgH4IzKpMGaOVCbvyyvRGTNHGtPrKypjXirM5jb910I4k69oQeKY+77EMAcALEsck/+W6f71tyCma/ZFROTrJVwMy7wmf3bv6/MX+Dgkkysblvxps/dhOKZb6IvrTakzXXuPApnpYneDGOeKvJlaSXcDmA7AicQyW84VeTOnY+NdiWcG1uiZksFEHdyAlsJEjEkmkwGNsKHNZCJGSKtVTYC1tO022mnjwUBrMdXg8dreuOBhv7D/62/8lGZ1wLxXyZKOm+iUHIQintyny0TkaATHjYgcjeAoFpEje9R/nGPqIx2aw3NU9odCQI6e6x/VLY32cKQXVBnkAAAAAElFTkSuQmCC"),cat._image}ready(){super.ready(),this.show&&this.onchangeShow(!0)}render(t){var{left:e,top:r,width:n,height:i}=this.bounds;t.beginPath(),this.drawImage(t,cat.image,e,r,n,i)}onchange(t,e){"value"in t?this.show?this.onchangeShow(!0):this.show=!0:"show"in t&&this.onchangeShow(this.show)}onchangeShow(t){!this.app.isEditMode&&this.getState("board")&&(t?ret.show(this,this.board,{location:this.getState("location"),modal:this.getState("modal"),closable:this.getState("closable")||!1,data:this.value}):ret.hide(this))}get board(){return this.getState("board")}set board(t){this.set("board",t)}get show(){return this.getState("show")}set show(t){this.setState("show",t)}get started(){return this.getState("show")}set started(t){this.setState("show",t)}get value(){return this.getState("value")}set value(t){this.setState("value",t)}get hasTextProperty(){return!1}get nature(){return sat}}ztt.register("popup",cat);class uat extends ztt{render(t){var{path:e=[]}=this.state;if(!(e.length<=1)){t.beginPath(),t.moveTo(e[0].x,e[0].y);for(let r=1;r<e.length;r++)t.lineTo(e[r].x,e[r].y);t.closePath(),this.drawStroke(t)}}get path(){return this.model.path}set path(t){this.set("path",t)}contains(t,e){var r=this.state.path,n=!1;return r.forEach(((i,a)=>{let o=(a+r.length+1)%r.length,s=i.x,c=i.y,u=r[o].x,l=r[o].y;c>e!=l>e&&t<(u-s)*(e-c)/(l-c)+s&&(n=!n)})),n}}ztt.register("path",uat);const lat={mutable:!0,resizable:!1,rotatable:!0,properties:[{type:"number",label:"round",name:"round",property:{min:0,max:100,step:1}}],help:"scene/component/triangle"};class hat extends Ftt{contains(t,e){var{x1:r,y1:n,x2:i,y2:a,x3:o,y3:s}=this.state,c=[r,n,i,a,o,s],u=!1;for(let r=0;r<c.length;r+=2){let n=(r+2)%c.length,i=c[r],a=c[r+1],o=c[n+1];a>e!=o>e&&t<(c[n]-i)*(e-a)/(o-a)+i&&(u=!u)}return u}get mutable(){return!0}get path(){var{x1:t,y1:e,x2:r,y2:n,x3:i,y3:a}=this.state;return[{x:t,y:e},{x:r,y:n},{x:i,y:a}]}set path(t){this.set({x1:t[0].x,y1:t[0].y,x2:t[1].x,y2:t[1].y,x3:t[2].x,y3:t[2].y})}get nature(){return lat}}ztt.memoize(hat.prototype,"path",!1),ztt.register("triangle",hat);const fat={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"ratio",name:"ratio",property:"ratio"}],help:"scene/component/donut"};var dat={ondragmove:function(t,e,r){r.controls;var{cx:n,rx:i}=r.model;i=Math.abs(i);var a=(r.transcoordP2S(t.x,t.y).x-n)/i*100;a=a>=100||a<=-100?100:Math.abs(a),r.set({ratio:a})}};class pat extends Eit{is3dish(){return!1}render(t){var{ratio:e=50,cx:r,cy:n,rx:i,ry:a,startAngle:o,endAngle:s,anticlockwise:c}=this.state;i=Math.abs(i),a=Math.abs(a),t.beginPath(),t.ellipse(r,n,i,a,0,o||0,s||2*Math.PI,c),t.moveTo(r+i/100*e,n),t.ellipse(r,n,i/100*e,a/100*e,0,o||0,s||2*Math.PI,!0)}contains(t,e){var{cx:r,cy:n,rx:i,ry:a,ratio:o}=this.state,s=(t-r)/(2*(i=Math.abs(i))-.5),c=(e-n)/(2*(a=Math.abs(a))-.5),u=(t-r)/(i/100*o*2-.5),l=(e-n)/(a/100*o*2-.5),h=!1;return s*s+c*c<.25&&u*u+l*l>.25&&(h=!h),h}get controls(){var{cx:t,cy:e,rx:r,ratio:n}=this.state;return[{x:t+(r=Math.abs(r))/100*n,y:e,handler:dat}]}get nature(){return fat}}ztt.memoize(pat.prototype,"controls",!1),ztt.register("donut",pat);const gat={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"ratio",name:"ratio",property:"ratio"},{type:"number",label:"wing",name:"wing",property:"wing"}],help:"scene/component/star"};var vat={ondragmove:function(t,e,r){r.controls;var{cy:n,ry:i}=r.model,a=(r.transcoordP2S(t.x,t.y).y-n)/i*100+100;a>=100?a=100:a<=0&&(a=0),r.set({ratio:a})}};class mat extends Eit{is3dish(){return!1}render(t){var{ratio:e=30,wing:r=5,cx:n,cy:i,rx:a,ry:o,startAngle:s,endAngle:c,anticlockwise:u}=this.state;if(r<3)return;const l=1.5707963267948966;var h=2*Math.PI/r,f=a-e/100*a,d=o-e/100*o;t.save(),t.beginPath(),t.translate(n,i),t.moveTo(a*Math.cos(-l),o*Math.sin(-l)),t.lineTo((a-f)*(Math.cos(h-l)+Math.cos(0-l))/2,(o-d)*(Math.sin(h-l)+Math.sin(0-l))/2);for(var p=1;p<r;p++)t.lineTo(a*Math.cos(h*p-l),o*Math.sin(h*p-l)),t.lineTo((a-f)*(Math.cos(h*(p+1)-l)+Math.cos(h*p-l))/2,(o-d)*(Math.sin(h*(p+1)-l)+Math.sin(h*p-l))/2);t.closePath(),t.restore()}get controls(){var{cx:t,cy:e,ry:r,ratio:n}=this.state;return[{x:t,y:e-r+r*(n/100),handler:vat}]}get nature(){return gat}}ztt.memoize(mat.prototype,"controls",!1),ztt.register("star",mat);var yat=t=>class extends t{animOnValueChange(t,e=!1,r){if(t!=this._lastValue){if(e)var n=t-(Number(r)||0);else n=t-(this._lastValue||0);this._lastValue=t,this._anim_alpha=-n,this.animate({step:t=>{this._anim_alpha=n*(t-1),this.invalidate()},duration:1e3,delta:"circ",options:{x:1},ease:"out"}).start()}}dispose(){super.dispose(),delete this._value_substitutor}onchange(t,e){t.hasOwnProperty("value")&&delete this._value_substitutor}get animAlpha(){return this._anim_alpha||0}get animValue(){return(this._lastValue||0)+(this._anim_alpha||0)}defaultValueSubstitutor(){return this.getState("value")}get valueSubstitutor(){return this._value_substitutor||(this._value_substitutor=Mtt(this.getState("value"),this)||this.defaultValueSubstitutor),this._value_substitutor}get value(){return Number(this.valueSubstitutor())||0}set value(t){delete this._value_substitutor,this.setState("value",Number(i9(t)))}},bat=t=>class extends t{_convertDataFormat(t,e){var r;if("json"===e)r=JSON.parse(t);else r=t;return r}isDataSource(){return!0}},xat=new WeakSet;class wat{static get residents(){return xat}constructor(t,e){this.counters={},this.references={},this.creator=t,this.disposer=e,xat.add(this)}dispose(){if(this.disposer)for(let t in this.references)this.disposer.call(null,t,this.references[t]);delete this.references,delete this.counters}get ids(){return Object.keys(this.references)}add(t,e){var r=this,n=new Promise((function(n,i){var a=r.references[t];if(a)a===e?i(Error("Reference ID and target duplicate")):e?i(Error("Reference ID duplicate")):n(a);else{function o(e){e.release=function(){r.release(this)},r.references[t]=e,r.counters[t]=1,n(e)}if(e)o(e);else{if(!r.creator)return void i(Error("Reference id("+t+") is not allowed. Reference creator should be defined."));r.creator.call(null,t,(function(t){o(t)}),(function(t){i(t)}))}}}));return this.references[t]||(this.references[t]=n),n}async get(t,e){var r=this.references[t];if(r){if(!(r instanceof Promise)){if(!(t in this.counters))throw new Error("No Reference Count");return this.counters[t]++,r}if(e)return r=await r,this.counters[t]++,r}if(e)return await this.add(t);throw new Error("No References for "+t)}_id(t){for(let e in this.references){if(this.references[e]===t)return e}return-1}release(t){var e=this._id(t),r=this.references[e];r?(this.counters[e]--,0==this.counters[e]&&(this.disposer&&this.disposer.call(null,e,r),delete this.references[e],delete this.counters[e],delete t.release,y9("RELEASED",e))):v9("No Referenced ID")}}var Aat={},_at={},kat=[];function Eat(t){var e="SCRIPT"==t.target.tagName?Aat:_at,r=t.target.src||t.target.href;e[r]=!0,kat.forEach(((t,n)=>{let{resolve:i,scripts:a,styles:o}=t;if(e==Aat){let t=a.indexOf(r);t>-1&&t<a.length-1&&Mat(a[t+1])}for(let t=0;t<a.length;t++)if(!Aat[a[t]])return;if(o)for(let t=0;t<o.length;t++)if(!_at[o[t]])return;i(),kat[n]=null})),kat=kat.filter(Boolean)}function Sat(t){var e=t.target.src,r="SCRIPT"==t.target.tagName?Aat:_at;kat.forEach(((n,i)=>{let{reject:a,scripts:o,styles:s}=n,c=!1;if(r===Aat){for(let t=0;t<o.length;t++)if(o[t]==e){c=!0;break}}else if(s)for(let t=0;t<s.length;t++)if(s[t]==e){c=!0;break}c&&(a(t),kat[i]=null)})),kat=kat.filter(Boolean),delete r[e],document.head.removeChild(t.target)}function Mat(t){Aat[t]=!1;var e=document.createElement("script");e.onload=Eat,e.onerror=Sat,e.type="text/javascript",e.src=t,document.head.appendChild(e)}class Tat{static load(t,e){return"string"==typeof t&&(t=[t]),"string"==typeof e&&(e=[e]),new Promise((function(r,n){if((!t||t instanceof Array)&&(!e||e instanceof Array)){var i,a=!0;if(e&&e.forEach((t=>{_at.hasOwnProperty(t)||function(t){_at[t]=!1;var e=document.createElement("link");e.onload=Eat,e.onerror=Sat,e.type="text/css",e.rel="stylesheet",e.media="screen,print",e.href=t,document.head.appendChild(e)}(t),_at[t]||(a=!1)})),t&&t.length>0&&t.forEach((t=>{Aat.hasOwnProperty(t)?Aat[t]||(a=!1):i=i||t})),i)Mat(i);else if(a)return void r();kat.push({resolve:r,reject:n,scripts:t,styles:e})}else n("invalid sources for load")}))}}const Pat="0.0.0";var Oat=0,Iat=performance.now(),Rat=0;function Cat(){return Oat}requestAnimationFrame((function t(){requestAnimationFrame(t),Rat++;var e=performance.now(),r=e-Iat;r<1e3||(Oat=Math.round(1e3*Rat/r),Iat=e,Rat=0)}));var jat=lrt;function Dat(){}export{net as AbsoluteLayout,Zit as AudioPlayer,aet as CardLayout,ztt as Component,Aet as Connectable,cit as Container,get as ContainerAbstract,O9 as DEFAULT,M9 as DPPX,bat as DataSource,pat as Donut,Eit as Ellipse,Cnt as EventMap,Cat as FPS,T9 as GESTURES,Kit as GifView,oat as GlobalRef,eat as Group,qtt as HTMLAbsoluteLayout,iat as HTMLOverlayContainer,Lit as HTMLOverlayElement,Dit as ImageView,Gtt as InfoWindow,P9 as KEYEVENTS,vet as Layer,Wtt as Layout,_it as Line,set as LinearHorizontalLayout,uet as LinearVerticalLayout,nat as LocalRef,S9 as MAX_UNDO_SIZE,k9 as MODE_ADD,A9 as MODE_EDIT,_9 as MODE_SHIFT,w9 as MODE_VIEW,jat as Model,det as MoveHandle,x9 as NOTHING,Cit as OrthoLine,uat as Path,Tit as Polygon,Iit as Polyline,cat as Popup,Met as Rect,Btt as RectPath,wat as ReferenceMap,Unt as RootContainer,Pet as Ruler,E9 as SCENE_MODE,tit as Scene,ret as ScenePopup,Tat as ScriptLoader,Ftt as Shape,mat as Star,het as TableLayout,$it as Text,hat as Triangle,yat as ValueHolder,rit as create,y9 as debug,v9 as error,Dat as license,TZ as polyfill,Pat as version,m9 as warn};console.log("@hatiolab/things-scene@3.2.16 is loaded");
1
+ var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=function(t){return t&&t.Math==Math&&t},r=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),n={},i=function(t){try{return!!t()}catch(t){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),s=o,c=Function.prototype.call,u=s?c.bind(c):function(){return c.apply(c,arguments)},l={},h={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,d=f&&!h.call({1:2},1);l.f=d?function(t){var e=f(this,t);return!!e&&e.enumerable}:h;var p,g,v=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},m=o,y=Function.prototype,b=y.call,x=m&&y.bind.bind(b,b),w=m?x:function(t){return function(){return b.apply(t,arguments)}},A=w,_=A({}.toString),k=A("".slice),E=function(t){return k(_(t),8,-1)},S=i,M=E,T=Object,P=w("".split),O=S((function(){return!T("z").propertyIsEnumerable(0)}))?function(t){return"String"==M(t)?P(t,""):T(t)}:T,I=function(t){return null==t},R=I,C=TypeError,j=function(t){if(R(t))throw C("Can't call method on "+t);return t},D=O,L=j,z=function(t){return D(L(t))},F="object"==typeof document&&document.all,B={all:F,IS_HTMLDDA:void 0===F&&void 0!==F},N=B.all,U=B.IS_HTMLDDA?function(t){return"function"==typeof t||t===N}:function(t){return"function"==typeof t},Y=U,G=B.all,H=B.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:Y(t)||t===G}:function(t){return"object"==typeof t?null!==t:Y(t)},W=r,q=U,X=function(t,e){return arguments.length<2?(r=W[t],q(r)?r:void 0):W[t]&&W[t][e];var r},V=w({}.isPrototypeOf),Q="undefined"!=typeof navigator&&String(navigator.userAgent)||"",K=r,J=Q,Z=K.process,$=K.Deno,tt=Z&&Z.versions||$&&$.version,et=tt&&tt.v8;et&&(g=(p=et.split("."))[0]>0&&p[0]<4?1:+(p[0]+p[1])),!g&&J&&(!(p=J.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=J.match(/Chrome\/(\d+)/))&&(g=+p[1]);var rt=g,nt=rt,it=i,at=!!Object.getOwnPropertySymbols&&!it((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&nt&&nt<41})),ot=at&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,st=X,ct=U,ut=V,lt=Object,ht=ot?function(t){return"symbol"==typeof t}:function(t){var e=st("Symbol");return ct(e)&&ut(e.prototype,lt(t))},ft=String,dt=function(t){try{return ft(t)}catch(t){return"Object"}},pt=U,gt=dt,vt=TypeError,mt=function(t){if(pt(t))return t;throw vt(gt(t)+" is not a function")},yt=mt,bt=I,xt=function(t,e){var r=t[e];return bt(r)?void 0:yt(r)},wt=u,At=U,_t=H,kt=TypeError,Et=function(t,e){var r,n;if("string"===e&&At(r=t.toString)&&!_t(n=wt(r,t)))return n;if(At(r=t.valueOf)&&!_t(n=wt(r,t)))return n;if("string"!==e&&At(r=t.toString)&&!_t(n=wt(r,t)))return n;throw kt("Can't convert object to primitive value")},St={exports:{}},Mt=r,Tt=Object.defineProperty,Pt=function(t,e){try{Tt(Mt,t,{value:e,configurable:!0,writable:!0})}catch(r){Mt[t]=e}return e},Ot=Pt,It="__core-js_shared__",Rt=r[It]||Ot(It,{}),Ct=Rt;(St.exports=function(t,e){return Ct[t]||(Ct[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.29.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var jt=j,Dt=Object,Lt=function(t){return Dt(jt(t))},zt=Lt,Ft=w({}.hasOwnProperty),Bt=Object.hasOwn||function(t,e){return Ft(zt(t),e)},Nt=w,Ut=0,Yt=Math.random(),Gt=Nt(1..toString),Ht=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Gt(++Ut+Yt,36)},Wt=r,qt=St.exports,Xt=Bt,Vt=Ht,Qt=at,Kt=ot,Jt=Wt.Symbol,Zt=qt("wks"),$t=Kt?Jt.for||Jt:Jt&&Jt.withoutSetter||Vt,te=function(t){return Xt(Zt,t)||(Zt[t]=Qt&&Xt(Jt,t)?Jt[t]:$t("Symbol."+t)),Zt[t]},ee=u,re=H,ne=ht,ie=xt,ae=Et,oe=TypeError,se=te("toPrimitive"),ce=function(t,e){if(!re(t)||ne(t))return t;var r,n=ie(t,se);if(n){if(void 0===e&&(e="default"),r=ee(n,t,e),!re(r)||ne(r))return r;throw oe("Can't convert object to primitive value")}return void 0===e&&(e="number"),ae(t,e)},ue=ce,le=ht,he=function(t){var e=ue(t,"string");return le(e)?e:e+""},fe=H,de=r.document,pe=fe(de)&&fe(de.createElement),ge=function(t){return pe?de.createElement(t):{}},ve=ge,me=!a&&!i((function(){return 7!=Object.defineProperty(ve("div"),"a",{get:function(){return 7}}).a})),ye=a,be=u,xe=l,we=v,Ae=z,_e=he,ke=Bt,Ee=me,Se=Object.getOwnPropertyDescriptor;n.f=ye?Se:function(t,e){if(t=Ae(t),e=_e(e),Ee)try{return Se(t,e)}catch(t){}if(ke(t,e))return we(!be(xe.f,t,e),t[e])};var Me={},Te=a&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pe=H,Oe=String,Ie=TypeError,Re=function(t){if(Pe(t))return t;throw Ie(Oe(t)+" is not an object")},Ce=a,je=me,De=Te,Le=Re,ze=he,Fe=TypeError,Be=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Ue="enumerable",Ye="configurable",Ge="writable";Me.f=Ce?De?function(t,e,r){if(Le(t),e=ze(e),Le(r),"function"==typeof t&&"prototype"===e&&"value"in r&&Ge in r&&!r[Ge]){var n=Ne(t,e);n&&n[Ge]&&(t[e]=r.value,r={configurable:Ye in r?r[Ye]:n[Ye],enumerable:Ue in r?r[Ue]:n[Ue],writable:!1})}return Be(t,e,r)}:Be:function(t,e,r){if(Le(t),e=ze(e),Le(r),je)try{return Be(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Fe("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var He=Me,We=v,qe=a?function(t,e,r){return He.f(t,e,We(1,r))}:function(t,e,r){return t[e]=r,t},Xe={exports:{}},Ve=a,Qe=Bt,Ke=Function.prototype,Je=Ve&&Object.getOwnPropertyDescriptor,Ze=Qe(Ke,"name"),$e={EXISTS:Ze,PROPER:Ze&&"something"===function(){}.name,CONFIGURABLE:Ze&&(!Ve||Ve&&Je(Ke,"name").configurable)},tr=U,er=Rt,rr=w(Function.toString);tr(er.inspectSource)||(er.inspectSource=function(t){return rr(t)});var nr,ir,ar,or=er.inspectSource,sr=U,cr=r.WeakMap,ur=sr(cr)&&/native code/.test(String(cr)),lr=St.exports,hr=Ht,fr=lr("keys"),dr=function(t){return fr[t]||(fr[t]=hr(t))},pr={},gr=ur,vr=r,mr=H,yr=qe,br=Bt,xr=Rt,wr=dr,Ar=pr,_r="Object already initialized",kr=vr.TypeError,Er=vr.WeakMap;if(gr||xr.state){var Sr=xr.state||(xr.state=new Er);Sr.get=Sr.get,Sr.has=Sr.has,Sr.set=Sr.set,nr=function(t,e){if(Sr.has(t))throw kr(_r);return e.facade=t,Sr.set(t,e),e},ir=function(t){return Sr.get(t)||{}},ar=function(t){return Sr.has(t)}}else{var Mr=wr("state");Ar[Mr]=!0,nr=function(t,e){if(br(t,Mr))throw kr(_r);return e.facade=t,yr(t,Mr,e),e},ir=function(t){return br(t,Mr)?t[Mr]:{}},ar=function(t){return br(t,Mr)}}var Tr={set:nr,get:ir,has:ar,enforce:function(t){return ar(t)?ir(t):nr(t,{})},getterFor:function(t){return function(e){var r;if(!mr(e)||(r=ir(e)).type!==t)throw kr("Incompatible receiver, "+t+" required");return r}}},Pr=w,Or=i,Ir=U,Rr=Bt,Cr=a,jr=$e.CONFIGURABLE,Dr=or,Lr=Tr.enforce,zr=Tr.get,Fr=String,Br=Object.defineProperty,Nr=Pr("".slice),Ur=Pr("".replace),Yr=Pr([].join),Gr=Cr&&!Or((function(){return 8!==Br((function(){}),"length",{value:8}).length})),Hr=String(String).split("String"),Wr=Xe.exports=function(t,e,r){"Symbol("===Nr(Fr(e),0,7)&&(e="["+Ur(Fr(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Rr(t,"name")||jr&&t.name!==e)&&(Cr?Br(t,"name",{value:e,configurable:!0}):t.name=e),Gr&&r&&Rr(r,"arity")&&t.length!==r.arity&&Br(t,"length",{value:r.arity});try{r&&Rr(r,"constructor")&&r.constructor?Cr&&Br(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=Lr(t);return Rr(n,"source")||(n.source=Yr(Hr,"string"==typeof e?e:"")),t};Function.prototype.toString=Wr((function(){return Ir(this)&&zr(this).source||Dr(this)}),"toString");var qr=U,Xr=Me,Vr=Xe.exports,Qr=Pt,Kr=function(t,e,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:e;if(qr(r)&&Vr(r,a,n),n.global)i?t[e]=r:Qr(e,r);else{try{n.unsafe?t[e]&&(i=!0):delete t[e]}catch(t){}i?t[e]=r:Xr.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},Jr={},Zr=Math.ceil,$r=Math.floor,tn=Math.trunc||function(t){var e=+t;return(e>0?$r:Zr)(e)},en=tn,rn=function(t){var e=+t;return e!=e||0===e?0:en(e)},nn=rn,an=Math.max,on=Math.min,sn=function(t,e){var r=nn(t);return r<0?an(r+e,0):on(r,e)},cn=rn,un=Math.min,ln=function(t){return t>0?un(cn(t),9007199254740991):0},hn=ln,fn=function(t){return hn(t.length)},dn=z,pn=sn,gn=fn,vn=function(t){return function(e,r,n){var i,a=dn(e),o=gn(a),s=pn(n,o);if(t&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((t||s in a)&&a[s]===r)return t||s||0;return!t&&-1}},mn={includes:vn(!0),indexOf:vn(!1)},yn=Bt,bn=z,xn=mn.indexOf,wn=pr,An=w([].push),_n=function(t,e){var r,n=bn(t),i=0,a=[];for(r in n)!yn(wn,r)&&yn(n,r)&&An(a,r);for(;e.length>i;)yn(n,r=e[i++])&&(~xn(a,r)||An(a,r));return a},kn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],En=_n,Sn=kn.concat("length","prototype");Jr.f=Object.getOwnPropertyNames||function(t){return En(t,Sn)};var Mn={};Mn.f=Object.getOwnPropertySymbols;var Tn=X,Pn=Jr,On=Mn,In=Re,Rn=w([].concat),Cn=Tn("Reflect","ownKeys")||function(t){var e=Pn.f(In(t)),r=On.f;return r?Rn(e,r(t)):e},jn=Bt,Dn=Cn,Ln=n,zn=Me,Fn=function(t,e,r){for(var n=Dn(e),i=zn.f,a=Ln.f,o=0;o<n.length;o++){var s=n[o];jn(t,s)||r&&jn(r,s)||i(t,s,a(e,s))}},Bn=i,Nn=U,Un=/#|\.prototype\./,Yn=function(t,e){var r=Hn[Gn(t)];return r==qn||r!=Wn&&(Nn(e)?Bn(e):!!e)},Gn=Yn.normalize=function(t){return String(t).replace(Un,".").toLowerCase()},Hn=Yn.data={},Wn=Yn.NATIVE="N",qn=Yn.POLYFILL="P",Xn=Yn,Vn=r,Qn=n.f,Kn=qe,Jn=Kr,Zn=Pt,$n=Fn,ti=Xn,ei=function(t,e){var r,n,i,a,o,s=t.target,c=t.global,u=t.stat;if(r=c?Vn:u?Vn[s]||Zn(s,{}):(Vn[s]||{}).prototype)for(n in e){if(a=e[n],i=t.dontCallGetSet?(o=Qn(r,n))&&o.value:r[n],!ti(c?n:s+(u?".":"#")+n,t.forced)&&void 0!==i){if(typeof a==typeof i)continue;$n(a,i)}(t.sham||i&&i.sham)&&Kn(a,"sham",!0),Jn(r,n,a,t)}},ri={};ri[te("toStringTag")]="z";var ni="[object z]"===String(ri),ii=ni,ai=U,oi=E,si=te("toStringTag"),ci=Object,ui="Arguments"==oi(function(){return arguments}()),li=ii?oi:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=ci(t),si))?r:ui?oi(e):"Object"==(n=oi(e))&&ai(e.callee)?"Arguments":n},hi=li,fi=String,di=function(t){if("Symbol"===hi(t))throw TypeError("Cannot convert a Symbol value to a string");return fi(t)},pi={},gi=_n,vi=kn,mi=Object.keys||function(t){return gi(t,vi)},yi=a,bi=Te,xi=Me,wi=Re,Ai=z,_i=mi;pi.f=yi&&!bi?Object.defineProperties:function(t,e){wi(t);for(var r,n=Ai(e),i=_i(e),a=i.length,o=0;a>o;)xi.f(t,r=i[o++],n[r]);return t};var ki,Ei=X("document","documentElement"),Si=Re,Mi=pi,Ti=kn,Pi=pr,Oi=Ei,Ii=ge,Ri="prototype",Ci="script",ji=dr("IE_PROTO"),Di=function(){},Li=function(t){return"<"+Ci+">"+t+"</"+Ci+">"},zi=function(t){t.write(Li("")),t.close();var e=t.parentWindow.Object;return t=null,e},Fi=function(){try{ki=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;Fi="undefined"!=typeof document?document.domain&&ki?zi(ki):(e=Ii("iframe"),r="java"+Ci+":",e.style.display="none",Oi.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(Li("document.F=Object")),t.close(),t.F):zi(ki);for(var n=Ti.length;n--;)delete Fi[Ri][Ti[n]];return Fi()};Pi[ji]=!0;var Bi=Object.create||function(t,e){var r;return null!==t?(Di[Ri]=Si(t),r=new Di,Di[Ri]=null,r[ji]=t):r=Fi(),void 0===e?r:Mi.f(r,e)},Ni={},Ui=he,Yi=Me,Gi=v,Hi=function(t,e,r){var n=Ui(e);n in t?Yi.f(t,n,Gi(0,r)):t[n]=r},Wi=sn,qi=fn,Xi=Hi,Vi=Array,Qi=Math.max,Ki=function(t,e,r){for(var n=qi(t),i=Wi(e,n),a=Wi(void 0===r?n:r,n),o=Vi(Qi(a-i,0)),s=0;i<a;i++,s++)Xi(o,s,t[i]);return o.length=s,o},Ji=E,Zi=z,$i=Jr.f,ta=Ki,ea="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ni.f=function(t){return ea&&"Window"==Ji(t)?function(t){try{return $i(t)}catch(t){return ta(ea)}}(t):$i(Zi(t))};var ra=Xe.exports,na=Me,ia=function(t,e,r){return r.get&&ra(r.get,e,{getter:!0}),r.set&&ra(r.set,e,{setter:!0}),na.f(t,e,r)},aa={},oa=te;aa.f=oa;var sa=r,ca=sa,ua=Bt,la=aa,ha=Me.f,fa=function(t){var e=ca.Symbol||(ca.Symbol={});ua(e,t)||ha(e,t,{value:la.f(t)})},da=u,pa=X,ga=te,va=Kr,ma=function(){var t=pa("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=ga("toPrimitive");e&&!e[n]&&va(e,n,(function(t){return da(r,this)}),{arity:1})},ya=Me.f,ba=Bt,xa=te("toStringTag"),wa=function(t,e,r){t&&!r&&(t=t.prototype),t&&!ba(t,xa)&&ya(t,xa,{configurable:!0,value:e})},Aa=E,_a=w,ka=function(t){if("Function"===Aa(t))return _a(t)},Ea=mt,Sa=o,Ma=ka(ka.bind),Ta=function(t,e){return Ea(t),void 0===e?t:Sa?Ma(t,e):function(){return t.apply(e,arguments)}},Pa=E,Oa=Array.isArray||function(t){return"Array"==Pa(t)},Ia=w,Ra=i,Ca=U,ja=li,Da=or,La=function(){},za=[],Fa=X("Reflect","construct"),Ba=/^\s*(?:class|function)\b/,Na=Ia(Ba.exec),Ua=!Ba.exec(La),Ya=function(t){if(!Ca(t))return!1;try{return Fa(La,za,t),!0}catch(t){return!1}},Ga=function(t){if(!Ca(t))return!1;switch(ja(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ua||!!Na(Ba,Da(t))}catch(t){return!0}};Ga.sham=!0;var Ha=!Fa||Ra((function(){var t;return Ya(Ya.call)||!Ya(Object)||!Ya((function(){t=!0}))||t}))?Ga:Ya,Wa=Oa,qa=Ha,Xa=H,Va=te("species"),Qa=Array,Ka=function(t){var e;return Wa(t)&&(e=t.constructor,(qa(e)&&(e===Qa||Wa(e.prototype))||Xa(e)&&null===(e=e[Va]))&&(e=void 0)),void 0===e?Qa:e},Ja=function(t,e){return new(Ka(t))(0===e?0:e)},Za=Ta,$a=O,to=Lt,eo=fn,ro=Ja,no=w([].push),io=function(t){var e=1==t,r=2==t,n=3==t,i=4==t,a=6==t,o=7==t,s=5==t||a;return function(c,u,l,h){for(var f,d,p=to(c),g=$a(p),v=Za(u,l),m=eo(g),y=0,b=h||ro,x=e?b(c,m):r||o?b(c,0):void 0;m>y;y++)if((s||y in g)&&(d=v(f=g[y],y,p),t))if(e)x[y]=d;else if(d)switch(t){case 3:return!0;case 5:return f;case 6:return y;case 2:no(x,f)}else switch(t){case 4:return!1;case 7:no(x,f)}return a?-1:n||i?i:x}},ao={forEach:io(0),map:io(1),filter:io(2),some:io(3),every:io(4),find:io(5),findIndex:io(6),filterReject:io(7)},oo=ei,so=r,co=u,uo=w,lo=a,ho=at,fo=i,po=Bt,go=V,vo=Re,mo=z,yo=he,bo=di,xo=v,wo=Bi,Ao=mi,_o=Jr,ko=Ni,Eo=Mn,So=n,Mo=Me,To=pi,Po=l,Oo=Kr,Io=ia,Ro=St.exports,Co=pr,jo=Ht,Do=te,Lo=aa,zo=fa,Fo=ma,Bo=wa,No=Tr,Uo=ao.forEach,Yo=dr("hidden"),Go="Symbol",Ho="prototype",Wo=No.set,qo=No.getterFor(Go),Xo=Object[Ho],Vo=so.Symbol,Qo=Vo&&Vo[Ho],Ko=so.TypeError,Jo=so.QObject,Zo=So.f,$o=Mo.f,ts=ko.f,es=Po.f,rs=uo([].push),ns=Ro("symbols"),is=Ro("op-symbols"),as=Ro("wks"),os=!Jo||!Jo[Ho]||!Jo[Ho].findChild,ss=lo&&fo((function(){return 7!=wo($o({},"a",{get:function(){return $o(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Zo(Xo,e);n&&delete Xo[e],$o(t,e,r),n&&t!==Xo&&$o(Xo,e,n)}:$o,cs=function(t,e){var r=ns[t]=wo(Qo);return Wo(r,{type:Go,tag:t,description:e}),lo||(r.description=e),r},us=function(t,e,r){t===Xo&&us(is,e,r),vo(t);var n=yo(e);return vo(r),po(ns,n)?(r.enumerable?(po(t,Yo)&&t[Yo][n]&&(t[Yo][n]=!1),r=wo(r,{enumerable:xo(0,!1)})):(po(t,Yo)||$o(t,Yo,xo(1,{})),t[Yo][n]=!0),ss(t,n,r)):$o(t,n,r)},ls=function(t,e){vo(t);var r=mo(e),n=Ao(r).concat(ps(r));return Uo(n,(function(e){lo&&!co(hs,r,e)||us(t,e,r[e])})),t},hs=function(t){var e=yo(t),r=co(es,this,e);return!(this===Xo&&po(ns,e)&&!po(is,e))&&(!(r||!po(this,e)||!po(ns,e)||po(this,Yo)&&this[Yo][e])||r)},fs=function(t,e){var r=mo(t),n=yo(e);if(r!==Xo||!po(ns,n)||po(is,n)){var i=Zo(r,n);return!i||!po(ns,n)||po(r,Yo)&&r[Yo][n]||(i.enumerable=!0),i}},ds=function(t){var e=ts(mo(t)),r=[];return Uo(e,(function(t){po(ns,t)||po(Co,t)||rs(r,t)})),r},ps=function(t){var e=t===Xo,r=ts(e?is:mo(t)),n=[];return Uo(r,(function(t){!po(ns,t)||e&&!po(Xo,t)||rs(n,ns[t])})),n};ho||(Vo=function(){if(go(Qo,this))throw Ko("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?bo(arguments[0]):void 0,e=jo(t),r=function(t){this===Xo&&co(r,is,t),po(this,Yo)&&po(this[Yo],e)&&(this[Yo][e]=!1),ss(this,e,xo(1,t))};return lo&&os&&ss(Xo,e,{configurable:!0,set:r}),cs(e,t)},Oo(Qo=Vo[Ho],"toString",(function(){return qo(this).tag})),Oo(Vo,"withoutSetter",(function(t){return cs(jo(t),t)})),Po.f=hs,Mo.f=us,To.f=ls,So.f=fs,_o.f=ko.f=ds,Eo.f=ps,Lo.f=function(t){return cs(Do(t),t)},lo&&(Io(Qo,"description",{configurable:!0,get:function(){return qo(this).description}}),Oo(Xo,"propertyIsEnumerable",hs,{unsafe:!0}))),oo({global:!0,constructor:!0,wrap:!0,forced:!ho,sham:!ho},{Symbol:Vo}),Uo(Ao(as),(function(t){zo(t)})),oo({target:Go,stat:!0,forced:!ho},{useSetter:function(){os=!0},useSimple:function(){os=!1}}),oo({target:"Object",stat:!0,forced:!ho,sham:!lo},{create:function(t,e){return void 0===e?wo(t):ls(wo(t),e)},defineProperty:us,defineProperties:ls,getOwnPropertyDescriptor:fs}),oo({target:"Object",stat:!0,forced:!ho},{getOwnPropertyNames:ds}),Fo(),Bo(Vo,Go),Co[Yo]=!0;var gs=at&&!!Symbol.for&&!!Symbol.keyFor,vs=ei,ms=X,ys=Bt,bs=di,xs=St.exports,ws=gs,As=xs("string-to-symbol-registry"),_s=xs("symbol-to-string-registry");vs({target:"Symbol",stat:!0,forced:!ws},{for:function(t){var e=bs(t);if(ys(As,e))return As[e];var r=ms("Symbol")(e);return As[e]=r,_s[r]=e,r}});var ks=ei,Es=Bt,Ss=ht,Ms=dt,Ts=gs,Ps=(0,St.exports)("symbol-to-string-registry");ks({target:"Symbol",stat:!0,forced:!Ts},{keyFor:function(t){if(!Ss(t))throw TypeError(Ms(t)+" is not a symbol");if(Es(Ps,t))return Ps[t]}});var Os=o,Is=Function.prototype,Rs=Is.apply,Cs=Is.call,js="object"==typeof Reflect&&Reflect.apply||(Os?Cs.bind(Rs):function(){return Cs.apply(Rs,arguments)}),Ds=w([].slice),Ls=Oa,zs=U,Fs=E,Bs=di,Ns=w([].push),Us=ei,Ys=X,Gs=js,Hs=u,Ws=w,qs=i,Xs=U,Vs=ht,Qs=Ds,Ks=function(t){if(zs(t))return t;if(Ls(t)){for(var e=t.length,r=[],n=0;n<e;n++){var i=t[n];"string"==typeof i?Ns(r,i):"number"!=typeof i&&"Number"!=Fs(i)&&"String"!=Fs(i)||Ns(r,Bs(i))}var a=r.length,o=!0;return function(t,e){if(o)return o=!1,e;if(Ls(this))return e;for(var n=0;n<a;n++)if(r[n]===t)return e}}},Js=at,Zs=String,$s=Ys("JSON","stringify"),tc=Ws(/./.exec),ec=Ws("".charAt),rc=Ws("".charCodeAt),nc=Ws("".replace),ic=Ws(1..toString),ac=/[\uD800-\uDFFF]/g,oc=/^[\uD800-\uDBFF]$/,sc=/^[\uDC00-\uDFFF]$/,cc=!Js||qs((function(){var t=Ys("Symbol")();return"[null]"!=$s([t])||"{}"!=$s({a:t})||"{}"!=$s(Object(t))})),uc=qs((function(){return'"\\udf06\\ud834"'!==$s("\udf06\ud834")||'"\\udead"'!==$s("\udead")})),lc=function(t,e){var r=Qs(arguments),n=Ks(e);if(Xs(n)||void 0!==t&&!Vs(t))return r[1]=function(t,e){if(Xs(n)&&(e=Hs(n,this,Zs(t),e)),!Vs(e))return e},Gs($s,null,r)},hc=function(t,e,r){var n=ec(r,e-1),i=ec(r,e+1);return tc(oc,t)&&!tc(sc,i)||tc(sc,t)&&!tc(oc,n)?"\\u"+ic(rc(t,0),16):t};$s&&Us({target:"JSON",stat:!0,arity:3,forced:cc||uc},{stringify:function(t,e,r){var n=Qs(arguments),i=Gs(cc?lc:$s,null,n);return uc&&"string"==typeof i?nc(i,ac,hc):i}});var fc=Mn,dc=Lt;ei({target:"Object",stat:!0,forced:!at||i((function(){fc.f(1)}))},{getOwnPropertySymbols:function(t){var e=fc.f;return e?e(dc(t)):[]}});var pc=ei,gc=a,vc=w,mc=Bt,yc=U,bc=V,xc=di,wc=ia,Ac=Fn,_c=r.Symbol,kc=_c&&_c.prototype;if(gc&&yc(_c)&&(!("description"in kc)||void 0!==_c().description)){var Ec={},Sc=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:xc(arguments[0]),e=bc(kc,this)?new _c(t):void 0===t?_c():_c(t);return""===t&&(Ec[e]=!0),e};Ac(Sc,_c),Sc.prototype=kc,kc.constructor=Sc;var Mc="Symbol(test)"==String(_c("test")),Tc=vc(kc.valueOf),Pc=vc(kc.toString),Oc=/^Symbol\((.*)\)[^)]+$/,Ic=vc("".replace),Rc=vc("".slice);wc(kc,"description",{configurable:!0,get:function(){var t=Tc(this);if(mc(Ec,t))return"";var e=Pc(t),r=Mc?Rc(e,7,-1):Ic(e,Oc,"$1");return""===r?void 0:r}}),pc({global:!0,constructor:!0,forced:!0},{Symbol:Sc})}fa("asyncIterator"),fa("hasInstance"),fa("isConcatSpreadable"),fa("iterator"),fa("match"),fa("matchAll"),fa("replace"),fa("search"),fa("species"),fa("split");var Cc=ma;fa("toPrimitive"),Cc();var jc=X,Dc=wa;fa("toStringTag"),Dc(jc("Symbol"),"Symbol"),fa("unscopables");var Lc=w,zc=mt,Fc=U,Bc=String,Nc=TypeError,Uc=function(t){if("object"==typeof t||Fc(t))return t;throw Nc("Can't set "+Bc(t)+" as a prototype")},Yc=function(t,e,r){try{return Lc(zc(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},Gc=Re,Hc=Uc,Wc=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Yc(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Gc(r),Hc(n),e?t(r,n):r.__proto__=n,r}}():void 0),qc=Me.f,Xc=function(t,e,r){r in t||qc(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})},Vc=U,Qc=H,Kc=Wc,Jc=function(t,e,r){var n,i;return Kc&&Vc(n=e.constructor)&&n!==r&&Qc(i=n.prototype)&&i!==r.prototype&&Kc(t,i),t},Zc=di,$c=function(t,e){return void 0===t?arguments.length<2?"":e:Zc(t)},tu=H,eu=qe,ru=function(t,e){tu(e)&&"cause"in e&&eu(t,"cause",e.cause)},nu=Error,iu=w("".replace),au=String(nu("zxcasd").stack),ou=/\n\s*at [^:]*:[^\n]*/,su=ou.test(au),cu=function(t,e){if(su&&"string"==typeof t&&!nu.prepareStackTrace)for(;e--;)t=iu(t,ou,"");return t},uu=v,lu=!i((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",uu(1,7)),7!==t.stack)})),hu=qe,fu=cu,du=lu,pu=Error.captureStackTrace,gu=function(t,e,r,n){du&&(pu?pu(t,e):hu(t,"stack",fu(r,n)))},vu=X,mu=Bt,yu=qe,bu=V,xu=Wc,wu=Fn,Au=Xc,_u=Jc,ku=$c,Eu=ru,Su=gu,Mu=a,Tu=function(t,e,r,n){var i="stackTraceLimit",a=n?2:1,o=t.split("."),s=o[o.length-1],c=vu.apply(null,o);if(c){var u=c.prototype;if(mu(u,"cause")&&delete u.cause,!r)return c;var l=vu("Error"),h=e((function(t,e){var r=ku(n?e:t,void 0),i=n?new c(t):new c;return void 0!==r&&yu(i,"message",r),Su(i,h,i.stack,2),this&&bu(u,this)&&_u(i,this,h),arguments.length>a&&Eu(i,arguments[a]),i}));h.prototype=u,"Error"!==s?xu?xu(h,l):wu(h,l,{name:!0}):Mu&&i in c&&(Au(h,c,i),Au(h,c,"prepareStackTrace")),wu(h,c);try{u.name!==s&&yu(u,"name",s),u.constructor=h}catch(t){}return h}},Pu=ei,Ou=js,Iu=Tu,Ru="WebAssembly",Cu=r[Ru],ju=7!==Error("e",{cause:7}).cause,Du=function(t,e){var r={};r[t]=Iu(t,e,ju),Pu({global:!0,constructor:!0,arity:1,forced:ju},r)},Lu=function(t,e){if(Cu&&Cu[t]){var r={};r[t]=Iu(Ru+"."+t,e,ju),Pu({target:Ru,stat:!0,constructor:!0,arity:1,forced:ju},r)}};Du("Error",(function(t){return function(e){return Ou(t,this,arguments)}})),Du("EvalError",(function(t){return function(e){return Ou(t,this,arguments)}})),Du("RangeError",(function(t){return function(e){return Ou(t,this,arguments)}})),Du("ReferenceError",(function(t){return function(e){return Ou(t,this,arguments)}})),Du("SyntaxError",(function(t){return function(e){return Ou(t,this,arguments)}})),Du("TypeError",(function(t){return function(e){return Ou(t,this,arguments)}})),Du("URIError",(function(t){return function(e){return Ou(t,this,arguments)}})),Lu("CompileError",(function(t){return function(e){return Ou(t,this,arguments)}})),Lu("LinkError",(function(t){return function(e){return Ou(t,this,arguments)}})),Lu("RuntimeError",(function(t){return function(e){return Ou(t,this,arguments)}}));var zu=a,Fu=i,Bu=Re,Nu=Bi,Uu=$c,Yu=Error.prototype.toString,Gu=Fu((function(){if(zu){var t=Nu(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==Yu.call(t))return!0}return"2: 1"!==Yu.call({message:1,name:2})||"Error"!==Yu.call({})}))?function(){var t=Bu(this),e=Uu(t.name,"Error"),r=Uu(t.message);return e?r?e+": "+r:e:r}:Yu,Hu=Kr,Wu=Gu,qu=Error.prototype;qu.toString!==Wu&&Hu(qu,"toString",Wu);var Xu=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Vu=Bt,Qu=U,Ku=Lt,Ju=Xu,Zu=dr("IE_PROTO"),$u=Object,tl=$u.prototype,el=Ju?$u.getPrototypeOf:function(t){var e=Ku(t);if(Vu(e,Zu))return e[Zu];var r=e.constructor;return Qu(r)&&e instanceof r?r.prototype:e instanceof $u?tl:null},rl={},nl=rl,il=te("iterator"),al=Array.prototype,ol=function(t){return void 0!==t&&(nl.Array===t||al[il]===t)},sl=li,cl=xt,ul=I,ll=rl,hl=te("iterator"),fl=function(t){if(!ul(t))return cl(t,hl)||cl(t,"@@iterator")||ll[sl(t)]},dl=u,pl=mt,gl=Re,vl=dt,ml=fl,yl=TypeError,bl=function(t,e){var r=arguments.length<2?ml(t):e;if(pl(r))return gl(dl(r,t));throw yl(vl(t)+" is not iterable")},xl=u,wl=Re,Al=xt,_l=function(t,e,r){var n,i;wl(t);try{if(!(n=Al(t,"return"))){if("throw"===e)throw r;return r}n=xl(n,t)}catch(t){i=!0,n=t}if("throw"===e)throw r;if(i)throw n;return wl(n),r},kl=Ta,El=u,Sl=Re,Ml=dt,Tl=ol,Pl=fn,Ol=V,Il=bl,Rl=fl,Cl=_l,jl=TypeError,Dl=function(t,e){this.stopped=t,this.result=e},Ll=Dl.prototype,zl=function(t,e,r){var n,i,a,o,s,c,u,l=r&&r.that,h=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),g=kl(e,l),v=function(t){return n&&Cl(n,"normal",t),new Dl(!0,t)},m=function(t){return h?(Sl(t),p?g(t[0],t[1],v):g(t[0],t[1])):p?g(t,v):g(t)};if(f)n=t.iterator;else if(d)n=t;else{if(!(i=Rl(t)))throw jl(Ml(t)+" is not iterable");if(Tl(i)){for(a=0,o=Pl(t);o>a;a++)if((s=m(t[a]))&&Ol(Ll,s))return s;return new Dl(!1)}n=Il(t,i)}for(c=f?t.next:n.next;!(u=El(c,n)).done;){try{s=m(u.value)}catch(t){Cl(n,"throw",t)}if("object"==typeof s&&s&&Ol(Ll,s))return s}return new Dl(!1)},Fl=ei,Bl=V,Nl=el,Ul=Wc,Yl=Fn,Gl=Bi,Hl=qe,Wl=v,ql=ru,Xl=gu,Vl=zl,Ql=$c,Kl=te("toStringTag"),Jl=Error,Zl=[].push,$l=function(t,e){var r,n=Bl(th,this);Ul?r=Ul(Jl(),n?Nl(this):th):(r=n?this:Gl(th),Hl(r,Kl,"Error")),void 0!==e&&Hl(r,"message",Ql(e)),Xl(r,$l,r.stack,1),arguments.length>2&&ql(r,arguments[2]);var i=[];return Vl(t,Zl,{that:i}),Hl(r,"errors",i),r};Ul?Ul($l,Jl):Yl($l,Jl,{name:!0});var th=$l.prototype=Gl(Jl.prototype,{constructor:Wl(1,$l),message:Wl(1,""),name:Wl(1,"AggregateError")});Fl({global:!0,constructor:!0,arity:2},{AggregateError:$l});var eh=ei,rh=js,nh=i,ih=Tu,ah="AggregateError",oh=X(ah),sh=!nh((function(){return 1!==oh([1]).errors[0]}))&&nh((function(){return 7!==oh([1],ah,{cause:7}).cause}));eh({global:!0,constructor:!0,arity:2,forced:sh},{AggregateError:ih(ah,(function(t){return function(e,r){return rh(t,this,arguments)}}),sh,!0)});var ch=te,uh=Bi,lh=Me.f,hh=ch("unscopables"),fh=Array.prototype;null==fh[hh]&&lh(fh,hh,{configurable:!0,value:uh(null)});var dh=function(t){fh[hh][t]=!0},ph=Lt,gh=fn,vh=rn,mh=dh;ei({target:"Array",proto:!0},{at:function(t){var e=ph(this),r=gh(e),n=vh(t),i=n>=0?n:r+n;return i<0||i>=r?void 0:e[i]}}),mh("at");var yh=TypeError,bh=function(t){if(t>9007199254740991)throw yh("Maximum allowed index exceeded");return t},xh=i,wh=rt,Ah=te("species"),_h=function(t){return wh>=51||!xh((function(){var e=[];return(e.constructor={})[Ah]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},kh=ei,Eh=i,Sh=Oa,Mh=H,Th=Lt,Ph=fn,Oh=bh,Ih=Hi,Rh=Ja,Ch=_h,jh=rt,Dh=te("isConcatSpreadable"),Lh=jh>=51||!Eh((function(){var t=[];return t[Dh]=!1,t.concat()[0]!==t})),zh=function(t){if(!Mh(t))return!1;var e=t[Dh];return void 0!==e?!!e:Sh(t)};kh({target:"Array",proto:!0,arity:1,forced:!Lh||!Ch("concat")},{concat:function(t){var e,r,n,i,a,o=Th(this),s=Rh(o,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(zh(a=-1===e?o:arguments[e]))for(i=Ph(a),Oh(c+i),r=0;r<i;r++,c++)r in a&&Ih(s,c,a[r]);else Oh(c+1),Ih(s,c++,a);return s.length=c,s}});var Fh=dt,Bh=TypeError,Nh=function(t,e){if(!delete t[e])throw Bh("Cannot delete property "+Fh(e)+" of "+Fh(t))},Uh=Lt,Yh=sn,Gh=fn,Hh=Nh,Wh=Math.min,qh=[].copyWithin||function(t,e){var r=Uh(this),n=Gh(r),i=Yh(t,n),a=Yh(e,n),o=arguments.length>2?arguments[2]:void 0,s=Wh((void 0===o?n:Yh(o,n))-a,n-i),c=1;for(a<i&&i<a+s&&(c=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:Hh(r,i),i+=c,a+=c;return r},Xh=dh;ei({target:"Array",proto:!0},{copyWithin:qh}),Xh("copyWithin");var Vh=i,Qh=function(t,e){var r=[][t];return!!r&&Vh((function(){r.call(null,e||function(){return 1},1)}))},Kh=ao.every;ei({target:"Array",proto:!0,forced:!Qh("every")},{every:function(t){return Kh(this,t,arguments.length>1?arguments[1]:void 0)}});var Jh=Lt,Zh=sn,$h=fn,tf=function(t){for(var e=Jh(this),r=$h(e),n=arguments.length,i=Zh(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:Zh(a,r);o>i;)e[i++]=t;return e},ef=dh;ei({target:"Array",proto:!0},{fill:tf}),ef("fill");var rf=ao.filter;ei({target:"Array",proto:!0,forced:!_h("filter")},{filter:function(t){return rf(this,t,arguments.length>1?arguments[1]:void 0)}});var nf=ei,af=ao.find,of=dh,sf="find",cf=!0;sf in[]&&Array(1)[sf]((function(){cf=!1})),nf({target:"Array",proto:!0,forced:cf},{find:function(t){return af(this,t,arguments.length>1?arguments[1]:void 0)}}),of(sf);var uf=ei,lf=ao.findIndex,hf=dh,ff="findIndex",df=!0;ff in[]&&Array(1)[ff]((function(){df=!1})),uf({target:"Array",proto:!0,forced:df},{findIndex:function(t){return lf(this,t,arguments.length>1?arguments[1]:void 0)}}),hf(ff);var pf=Ta,gf=O,vf=Lt,mf=fn,yf=function(t){var e=1==t;return function(r,n,i){for(var a,o=vf(r),s=gf(o),c=pf(n,i),u=mf(s);u-- >0;)if(c(a=s[u],u,o))switch(t){case 0:return a;case 1:return u}return e?-1:void 0}},bf={findLast:yf(0),findLastIndex:yf(1)},xf=bf.findLast,wf=dh;ei({target:"Array",proto:!0},{findLast:function(t){return xf(this,t,arguments.length>1?arguments[1]:void 0)}}),wf("findLast");var Af=bf.findLastIndex,_f=dh;ei({target:"Array",proto:!0},{findLastIndex:function(t){return Af(this,t,arguments.length>1?arguments[1]:void 0)}}),_f("findLastIndex");var kf=Oa,Ef=fn,Sf=bh,Mf=Ta,Tf=function(t,e,r,n,i,a,o,s){for(var c,u,l=i,h=0,f=!!o&&Mf(o,s);h<n;)h in r&&(c=f?f(r[h],h,e):r[h],a>0&&kf(c)?(u=Ef(c),l=Tf(t,e,c,u,l,a-1)-1):(Sf(l+1),t[l]=c),l++),h++;return l},Pf=Tf,Of=Pf,If=Lt,Rf=fn,Cf=rn,jf=Ja;ei({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=If(this),r=Rf(e),n=jf(e,0);return n.length=Of(n,e,e,r,0,void 0===t?1:Cf(t)),n}});var Df=Pf,Lf=mt,zf=Lt,Ff=fn,Bf=Ja;ei({target:"Array",proto:!0},{flatMap:function(t){var e,r=zf(this),n=Ff(r);return Lf(t),(e=Bf(r,0)).length=Df(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}});var Nf=ao.forEach,Uf=Qh("forEach")?[].forEach:function(t){return Nf(this,t,arguments.length>1?arguments[1]:void 0)};ei({target:"Array",proto:!0,forced:[].forEach!=Uf},{forEach:Uf});var Yf=Re,Gf=_l,Hf=Ta,Wf=u,qf=Lt,Xf=function(t,e,r,n){try{return n?e(Yf(r)[0],r[1]):e(r)}catch(e){Gf(t,"throw",e)}},Vf=ol,Qf=Ha,Kf=fn,Jf=Hi,Zf=bl,$f=fl,td=Array,ed=function(t){var e=qf(t),r=Qf(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Hf(i,n>2?arguments[2]:void 0));var o,s,c,u,l,h,f=$f(e),d=0;if(!f||this===td&&Vf(f))for(o=Kf(e),s=r?new this(o):td(o);o>d;d++)h=a?i(e[d],d):e[d],Jf(s,d,h);else for(l=(u=Zf(e,f)).next,s=r?new this:[];!(c=Wf(l,u)).done;d++)h=a?Xf(u,i,[c.value,d],!0):c.value,Jf(s,d,h);return s.length=d,s},rd=te("iterator"),nd=!1;try{var id=0,ad={next:function(){return{done:!!id++}},return:function(){nd=!0}};ad[rd]=function(){return this},Array.from(ad,(function(){throw 2}))}catch(t){}var od=function(t,e){if(!e&&!nd)return!1;var r=!1;try{var n={};n[rd]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},sd=ed;ei({target:"Array",stat:!0,forced:!od((function(t){Array.from(t)}))},{from:sd});var cd=mn.includes,ud=dh;ei({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return cd(this,t,arguments.length>1?arguments[1]:void 0)}}),ud("includes");var ld=ei,hd=mn.indexOf,fd=Qh,dd=ka([].indexOf),pd=!!dd&&1/dd([1],1,-0)<0;ld({target:"Array",proto:!0,forced:pd||!fd("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return pd?dd(this,t,e)||0:hd(this,t,e)}}),ei({target:"Array",stat:!0},{isArray:Oa});var gd,vd,md,yd=i,bd=U,xd=H,wd=el,Ad=Kr,_d=te("iterator"),kd=!1;[].keys&&("next"in(md=[].keys())?(vd=wd(wd(md)))!==Object.prototype&&(gd=vd):kd=!0);var Ed=!xd(gd)||yd((function(){var t={};return gd[_d].call(t)!==t}));Ed&&(gd={}),bd(gd[_d])||Ad(gd,_d,(function(){return this}));var Sd={IteratorPrototype:gd,BUGGY_SAFARI_ITERATORS:kd},Md=Sd.IteratorPrototype,Td=Bi,Pd=v,Od=wa,Id=rl,Rd=function(){return this},Cd=function(t,e,r,n){var i=e+" Iterator";return t.prototype=Td(Md,{next:Pd(+!n,r)}),Od(t,i,!1),Id[i]=Rd,t},jd=ei,Dd=u,Ld=U,zd=Cd,Fd=el,Bd=Wc,Nd=wa,Ud=qe,Yd=Kr,Gd=rl,Hd=$e.PROPER,Wd=$e.CONFIGURABLE,qd=Sd.IteratorPrototype,Xd=Sd.BUGGY_SAFARI_ITERATORS,Vd=te("iterator"),Qd="keys",Kd="values",Jd="entries",Zd=function(){return this},$d=function(t,e,r,n,i,a,o){zd(r,e,n);var s,c,u,l=function(t){if(t===i&&g)return g;if(!Xd&&t in d)return d[t];switch(t){case Qd:case Kd:case Jd:return function(){return new r(this,t)}}return function(){return new r(this)}},h=e+" Iterator",f=!1,d=t.prototype,p=d[Vd]||d["@@iterator"]||i&&d[i],g=!Xd&&p||l(i),v="Array"==e&&d.entries||p;if(v&&(s=Fd(v.call(new t)))!==Object.prototype&&s.next&&(Fd(s)!==qd&&(Bd?Bd(s,qd):Ld(s[Vd])||Yd(s,Vd,Zd)),Nd(s,h,!0)),Hd&&i==Kd&&p&&p.name!==Kd&&(Wd?Ud(d,"name",Kd):(f=!0,g=function(){return Dd(p,this)})),i)if(c={values:l(Kd),keys:a?g:l(Qd),entries:l(Jd)},o)for(u in c)(Xd||f||!(u in d))&&Yd(d,u,c[u]);else jd({target:e,proto:!0,forced:Xd||f},c);return d[Vd]!==g&&Yd(d,Vd,g,{name:i}),Gd[e]=g,c},tp=function(t,e){return{value:t,done:e}},ep=z,rp=dh,np=rl,ip=Tr,ap=Me.f,op=$d,sp=tp,cp=a,up="Array Iterator",lp=ip.set,hp=ip.getterFor(up),fp=op(Array,"Array",(function(t,e){lp(this,{type:up,target:ep(t),index:0,kind:e})}),(function(){var t=hp(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,sp(void 0,!0)):sp("keys"==r?n:"values"==r?e[n]:[n,e[n]],!1)}),"values"),dp=np.Arguments=np.Array;if(rp("keys"),rp("values"),rp("entries"),cp&&"values"!==dp.name)try{ap(dp,"name",{value:"values"})}catch(t){}var pp=ei,gp=O,vp=z,mp=Qh,yp=w([].join);pp({target:"Array",proto:!0,forced:gp!=Object||!mp("join",",")},{join:function(t){return yp(vp(this),void 0===t?",":t)}});var bp=js,xp=z,wp=rn,Ap=fn,_p=Qh,kp=Math.min,Ep=[].lastIndexOf,Sp=!!Ep&&1/[1].lastIndexOf(1,-0)<0,Mp=_p("lastIndexOf"),Tp=Sp||!Mp?function(t){if(Sp)return bp(Ep,this,arguments)||0;var e=xp(this),r=Ap(e),n=r-1;for(arguments.length>1&&(n=kp(n,wp(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in e&&e[n]===t)return n||0;return-1}:Ep;ei({target:"Array",proto:!0,forced:Tp!==[].lastIndexOf},{lastIndexOf:Tp});var Pp=ao.map;ei({target:"Array",proto:!0,forced:!_h("map")},{map:function(t){return Pp(this,t,arguments.length>1?arguments[1]:void 0)}});var Op=Ha,Ip=Hi,Rp=Array;ei({target:"Array",stat:!0,forced:i((function(){function t(){}return!(Rp.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,r=new(Op(this)?this:Rp)(e);e>t;)Ip(r,t,arguments[t++]);return r.length=e,r}});var Cp=a,jp=Oa,Dp=TypeError,Lp=Object.getOwnPropertyDescriptor,zp=Cp&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}()?function(t,e){if(jp(t)&&!Lp(t,"length").writable)throw Dp("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Fp=Lt,Bp=fn,Np=zp,Up=bh;ei({target:"Array",proto:!0,arity:1,forced:i((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=Fp(this),r=Bp(e),n=arguments.length;Up(r+n);for(var i=0;i<n;i++)e[r]=arguments[i],r++;return Np(e,r),r}});var Yp=mt,Gp=Lt,Hp=O,Wp=fn,qp=TypeError,Xp=function(t){return function(e,r,n,i){Yp(r);var a=Gp(e),o=Hp(a),s=Wp(a),c=t?s-1:0,u=t?-1:1;if(n<2)for(;;){if(c in o){i=o[c],c+=u;break}if(c+=u,t?c<0:s<=c)throw qp("Reduce of empty array with no initial value")}for(;t?c>=0:s>c;c+=u)c in o&&(i=r(i,o[c],c,a));return i}},Vp={left:Xp(!1),right:Xp(!0)},Qp="undefined"!=typeof process&&"process"==E(process),Kp=Vp.left;ei({target:"Array",proto:!0,forced:!Qp&&rt>79&&rt<83||!Qh("reduce")},{reduce:function(t){var e=arguments.length;return Kp(this,t,e,e>1?arguments[1]:void 0)}});var Jp=Vp.right;ei({target:"Array",proto:!0,forced:!Qp&&rt>79&&rt<83||!Qh("reduceRight")},{reduceRight:function(t){return Jp(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Zp=ei,$p=Oa,tg=w([].reverse),eg=[1,2];Zp({target:"Array",proto:!0,forced:String(eg)===String(eg.reverse())},{reverse:function(){return $p(this)&&(this.length=this.length),tg(this)}});var rg=ei,ng=Oa,ig=Ha,ag=H,og=sn,sg=fn,cg=z,ug=Hi,lg=te,hg=Ds,fg=_h("slice"),dg=lg("species"),pg=Array,gg=Math.max;rg({target:"Array",proto:!0,forced:!fg},{slice:function(t,e){var r,n,i,a=cg(this),o=sg(a),s=og(t,o),c=og(void 0===e?o:e,o);if(ng(a)&&(r=a.constructor,(ig(r)&&(r===pg||ng(r.prototype))||ag(r)&&null===(r=r[dg]))&&(r=void 0),r===pg||void 0===r))return hg(a,s,c);for(n=new(void 0===r?pg:r)(gg(c-s,0)),i=0;s<c;s++,i++)s in a&&ug(n,i,a[s]);return n.length=i,n}});var vg=ao.some;ei({target:"Array",proto:!0,forced:!Qh("some")},{some:function(t){return vg(this,t,arguments.length>1?arguments[1]:void 0)}});var mg=Ki,yg=Math.floor,bg=function(t,e){var r=t.length,n=yg(r/2);return r<8?xg(t,e):wg(t,bg(mg(t,0,n),e),bg(mg(t,n),e),e)},xg=function(t,e){for(var r,n,i=t.length,a=1;a<i;){for(n=a,r=t[a];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==a++&&(t[n]=r)}return t},wg=function(t,e,r,n){for(var i=e.length,a=r.length,o=0,s=0;o<i||s<a;)t[o+s]=o<i&&s<a?n(e[o],r[s])<=0?e[o++]:r[s++]:o<i?e[o++]:r[s++];return t},Ag=bg,_g=Q.match(/firefox\/(\d+)/i),kg=!!_g&&+_g[1],Eg=/MSIE|Trident/.test(Q),Sg=Q.match(/AppleWebKit\/(\d+)\./),Mg=!!Sg&&+Sg[1],Tg=ei,Pg=w,Og=mt,Ig=Lt,Rg=fn,Cg=Nh,jg=di,Dg=i,Lg=Ag,zg=Qh,Fg=kg,Bg=Eg,Ng=rt,Ug=Mg,Yg=[],Gg=Pg(Yg.sort),Hg=Pg(Yg.push),Wg=Dg((function(){Yg.sort(void 0)})),qg=Dg((function(){Yg.sort(null)})),Xg=zg("sort"),Vg=!Dg((function(){if(Ng)return Ng<70;if(!(Fg&&Fg>3)){if(Bg)return!0;if(Ug)return Ug<603;var t,e,r,n,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Yg.push({k:e+n,v:r})}for(Yg.sort((function(t,e){return e.v-t.v})),n=0;n<Yg.length;n++)e=Yg[n].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));Tg({target:"Array",proto:!0,forced:Wg||!qg||!Xg||!Vg},{sort:function(t){void 0!==t&&Og(t);var e=Ig(this);if(Vg)return void 0===t?Gg(e):Gg(e,t);var r,n,i=[],a=Rg(e);for(n=0;n<a;n++)n in e&&Hg(i,e[n]);for(Lg(i,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:jg(e)>jg(r)?1:-1}}(t)),r=Rg(i),n=0;n<r;)e[n]=i[n++];for(;n<a;)Cg(e,n++);return e}});var Qg=X,Kg=ia,Jg=a,Zg=te("species"),$g=function(t){var e=Qg(t);Jg&&e&&!e[Zg]&&Kg(e,Zg,{configurable:!0,get:function(){return this}})};$g("Array");var tv=ei,ev=Lt,rv=sn,nv=rn,iv=fn,av=zp,ov=bh,sv=Ja,cv=Hi,uv=Nh,lv=_h("splice"),hv=Math.max,fv=Math.min;tv({target:"Array",proto:!0,forced:!lv},{splice:function(t,e){var r,n,i,a,o,s,c=ev(this),u=iv(c),l=rv(t,u),h=arguments.length;for(0===h?r=n=0:1===h?(r=0,n=u-l):(r=h-2,n=fv(hv(nv(e),0),u-l)),ov(u+r-n),i=sv(c,n),a=0;a<n;a++)(o=l+a)in c&&cv(i,a,c[o]);if(i.length=n,r<n){for(a=l;a<u-n;a++)s=a+r,(o=a+n)in c?c[s]=c[o]:uv(c,s);for(a=u;a>u-n+r;a--)uv(c,a-1)}else if(r>n)for(a=u-n;a>l;a--)s=a+r-1,(o=a+n-1)in c?c[s]=c[o]:uv(c,s);for(a=0;a<r;a++)c[a+l]=arguments[a+2];return av(c,u-n+r),i}});var dv=fn,pv=function(t,e){for(var r=dv(t),n=new e(r),i=0;i<r;i++)n[i]=t[r-i-1];return n},gv=pv,vv=z,mv=dh,yv=Array;ei({target:"Array",proto:!0},{toReversed:function(){return gv(vv(this),yv)}}),mv("toReversed");var bv=fn,xv=function(t,e){for(var r=0,n=bv(e),i=new t(n);n>r;)i[r]=e[r++];return i},wv=r,Av=ei,_v=mt,kv=z,Ev=xv,Sv=dh,Mv=Array,Tv=w(function(t){return wv[t].prototype}("Array").sort);Av({target:"Array",proto:!0},{toSorted:function(t){void 0!==t&&_v(t);var e=kv(this),r=Ev(Mv,e);return Tv(r,t)}}),Sv("toSorted");var Pv=ei,Ov=dh,Iv=bh,Rv=fn,Cv=sn,jv=z,Dv=rn,Lv=Array,zv=Math.max,Fv=Math.min;Pv({target:"Array",proto:!0},{toSpliced:function(t,e){var r,n,i,a,o=jv(this),s=Rv(o),c=Cv(t,s),u=arguments.length,l=0;for(0===u?r=n=0:1===u?(r=0,n=s-c):(r=u-2,n=Fv(zv(Dv(e),0),s-c)),i=Iv(s+r-n),a=Lv(i);l<c;l++)a[l]=o[l];for(;l<c+r;l++)a[l]=arguments[l-c+2];for(;l<i;l++)a[l]=o[l+n-r];return a}}),Ov("toSpliced"),dh("flat"),dh("flatMap");var Bv=Lt,Nv=fn,Uv=zp,Yv=Nh,Gv=bh;ei({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(t){return t instanceof TypeError}}()},{unshift:function(t){var e=Bv(this),r=Nv(e),n=arguments.length;if(n){Gv(r+n);for(var i=r;i--;){var a=i+n;i in e?e[a]=e[i]:Yv(e,a)}for(var o=0;o<n;o++)e[o]=arguments[o]}return Uv(e,r+n)}});var Hv=fn,Wv=rn,qv=RangeError,Xv=function(t,e,r,n){var i=Hv(t),a=Wv(r),o=a<0?i+a:a;if(o>=i||o<0)throw qv("Incorrect index");for(var s=new e(i),c=0;c<i;c++)s[c]=c===o?n:t[c];return s},Vv=Xv,Qv=z,Kv=Array;ei({target:"Array",proto:!0},{with:function(t,e){return Vv(Qv(this),Kv,t,e)}});var Jv="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Zv=Kr,$v=function(t,e,r){for(var n in e)Zv(t,n,e[n],r);return t},tm=V,em=TypeError,rm=function(t,e){if(tm(e,t))return t;throw em("Incorrect invocation")},nm=rn,im=ln,am=RangeError,om=function(t){if(void 0===t)return 0;var e=nm(t),r=im(e);if(e!==r)throw am("Wrong length or index");return r},sm=Array,cm=Math.abs,um=Math.pow,lm=Math.floor,hm=Math.log,fm=Math.LN2,dm={pack:function(t,e,r){var n,i,a,o=sm(r),s=8*r-e-1,c=(1<<s)-1,u=c>>1,l=23===e?um(2,-24)-um(2,-77):0,h=t<0||0===t&&1/t<0?1:0,f=0;for((t=cm(t))!=t||t===1/0?(i=t!=t?1:0,n=c):(n=lm(hm(t)/fm),t*(a=um(2,-n))<1&&(n--,a*=2),(t+=n+u>=1?l/a:l*um(2,1-u))*a>=2&&(n++,a/=2),n+u>=c?(i=0,n=c):n+u>=1?(i=(t*a-1)*um(2,e),n+=u):(i=t*um(2,u-1)*um(2,e),n=0));e>=8;)o[f++]=255&i,i/=256,e-=8;for(n=n<<e|i,s+=e;s>0;)o[f++]=255&n,n/=256,s-=8;return o[--f]|=128*h,o},unpack:function(t,e){var r,n=t.length,i=8*n-e-1,a=(1<<i)-1,o=a>>1,s=i-7,c=n-1,u=t[c--],l=127&u;for(u>>=7;s>0;)l=256*l+t[c--],s-=8;for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;)r=256*r+t[c--],s-=8;if(0===l)l=1-o;else{if(l===a)return r?NaN:u?-1/0:1/0;r+=um(2,e),l-=o}return(u?-1:1)*r*um(2,l-e)}},pm=r,gm=w,vm=a,mm=Jv,ym=$e,bm=qe,xm=ia,wm=$v,Am=i,_m=rm,km=rn,Em=ln,Sm=om,Mm=dm,Tm=el,Pm=Wc,Om=Jr.f,Im=tf,Rm=Ki,Cm=wa,jm=Tr,Dm=ym.PROPER,Lm=ym.CONFIGURABLE,zm="ArrayBuffer",Fm="DataView",Bm="prototype",Nm="Wrong index",Um=jm.getterFor(zm),Ym=jm.getterFor(Fm),Gm=jm.set,Hm=pm[zm],Wm=Hm,qm=Wm&&Wm[Bm],Xm=pm[Fm],Vm=Xm&&Xm[Bm],Qm=Object.prototype,Km=pm.Array,Jm=pm.RangeError,Zm=gm(Im),$m=gm([].reverse),ty=Mm.pack,ey=Mm.unpack,ry=function(t){return[255&t]},ny=function(t){return[255&t,t>>8&255]},iy=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},ay=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},oy=function(t){return ty(t,23,4)},sy=function(t){return ty(t,52,8)},cy=function(t,e,r){xm(t[Bm],e,{configurable:!0,get:function(){return r(this)[e]}})},uy=function(t,e,r,n){var i=Sm(r),a=Ym(t);if(i+e>a.byteLength)throw Jm(Nm);var o=a.bytes,s=i+a.byteOffset,c=Rm(o,s,s+e);return n?c:$m(c)},ly=function(t,e,r,n,i,a){var o=Sm(r),s=Ym(t);if(o+e>s.byteLength)throw Jm(Nm);for(var c=s.bytes,u=o+s.byteOffset,l=n(+i),h=0;h<e;h++)c[u+h]=l[a?h:e-h-1]};if(mm){var hy=Dm&&Hm.name!==zm;if(Am((function(){Hm(1)}))&&Am((function(){new Hm(-1)}))&&!Am((function(){return new Hm,new Hm(1.5),new Hm(NaN),1!=Hm.length||hy&&!Lm})))hy&&Lm&&bm(Hm,"name",zm);else{(Wm=function(t){return _m(this,qm),new Hm(Sm(t))})[Bm]=qm;for(var fy,dy=Om(Hm),py=0;dy.length>py;)(fy=dy[py++])in Wm||bm(Wm,fy,Hm[fy]);qm.constructor=Wm}Pm&&Tm(Vm)!==Qm&&Pm(Vm,Qm);var gy=new Xm(new Wm(2)),vy=gm(Vm.setInt8);gy.setInt8(0,2147483648),gy.setInt8(1,2147483649),!gy.getInt8(0)&&gy.getInt8(1)||wm(Vm,{setInt8:function(t,e){vy(this,t,e<<24>>24)},setUint8:function(t,e){vy(this,t,e<<24>>24)}},{unsafe:!0})}else qm=(Wm=function(t){_m(this,qm);var e=Sm(t);Gm(this,{type:zm,bytes:Zm(Km(e),0),byteLength:e}),vm||(this.byteLength=e,this.detached=!1)})[Bm],Vm=(Xm=function(t,e,r){_m(this,Vm),_m(t,qm);var n=Um(t),i=n.byteLength,a=km(e);if(a<0||a>i)throw Jm("Wrong offset");if(a+(r=void 0===r?i-a:Em(r))>i)throw Jm("Wrong length");Gm(this,{type:Fm,buffer:t,byteLength:r,byteOffset:a,bytes:n.bytes}),vm||(this.buffer=t,this.byteLength=r,this.byteOffset=a)})[Bm],vm&&(cy(Wm,"byteLength",Um),cy(Xm,"buffer",Ym),cy(Xm,"byteLength",Ym),cy(Xm,"byteOffset",Ym)),wm(Vm,{getInt8:function(t){return uy(this,1,t)[0]<<24>>24},getUint8:function(t){return uy(this,1,t)[0]},getInt16:function(t){var e=uy(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=uy(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return ay(uy(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return ay(uy(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return ey(uy(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return ey(uy(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){ly(this,1,t,ry,e)},setUint8:function(t,e){ly(this,1,t,ry,e)},setInt16:function(t,e){ly(this,2,t,ny,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){ly(this,2,t,ny,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){ly(this,4,t,iy,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){ly(this,4,t,iy,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){ly(this,4,t,oy,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){ly(this,8,t,sy,e,arguments.length>2?arguments[2]:void 0)}});Cm(Wm,zm),Cm(Xm,Fm);var my={ArrayBuffer:Wm,DataView:Xm},yy=$g,by="ArrayBuffer",xy=my[by];ei({global:!0,constructor:!0,forced:r[by]!==xy},{ArrayBuffer:xy}),yy(by);var wy,Ay,_y,ky=Jv,Ey=a,Sy=r,My=U,Ty=H,Py=Bt,Oy=li,Iy=dt,Ry=qe,Cy=Kr,jy=ia,Dy=V,Ly=el,zy=Wc,Fy=te,By=Ht,Ny=Tr.enforce,Uy=Tr.get,Yy=Sy.Int8Array,Gy=Yy&&Yy.prototype,Hy=Sy.Uint8ClampedArray,Wy=Hy&&Hy.prototype,qy=Yy&&Ly(Yy),Xy=Gy&&Ly(Gy),Vy=Object.prototype,Qy=Sy.TypeError,Ky=Fy("toStringTag"),Jy=By("TYPED_ARRAY_TAG"),Zy="TypedArrayConstructor",$y=ky&&!!zy&&"Opera"!==Oy(Sy.opera),tb=!1,eb={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},rb={BigInt64Array:8,BigUint64Array:8},nb=function(t){var e=Ly(t);if(Ty(e)){var r=Uy(e);return r&&Py(r,Zy)?r[Zy]:nb(e)}},ib=function(t){if(!Ty(t))return!1;var e=Oy(t);return Py(eb,e)||Py(rb,e)};for(wy in eb)(_y=(Ay=Sy[wy])&&Ay.prototype)?Ny(_y)[Zy]=Ay:$y=!1;for(wy in rb)(_y=(Ay=Sy[wy])&&Ay.prototype)&&(Ny(_y)[Zy]=Ay);if((!$y||!My(qy)||qy===Function.prototype)&&(qy=function(){throw Qy("Incorrect invocation")},$y))for(wy in eb)Sy[wy]&&zy(Sy[wy],qy);if((!$y||!Xy||Xy===Vy)&&(Xy=qy.prototype,$y))for(wy in eb)Sy[wy]&&zy(Sy[wy].prototype,Xy);if($y&&Ly(Wy)!==Xy&&zy(Wy,Xy),Ey&&!Py(Xy,Ky))for(wy in tb=!0,jy(Xy,Ky,{configurable:!0,get:function(){return Ty(this)?this[Jy]:void 0}}),eb)Sy[wy]&&Ry(Sy[wy],Jy,wy);var ab={NATIVE_ARRAY_BUFFER_VIEWS:$y,TYPED_ARRAY_TAG:tb&&Jy,aTypedArray:function(t){if(ib(t))return t;throw Qy("Target is not a typed array")},aTypedArrayConstructor:function(t){if(My(t)&&(!zy||Dy(qy,t)))return t;throw Qy(Iy(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(Ey){if(r)for(var i in eb){var a=Sy[i];if(a&&Py(a.prototype,t))try{delete a.prototype[t]}catch(r){try{a.prototype[t]=e}catch(t){}}}Xy[t]&&!r||Cy(Xy,t,r?e:$y&&Gy[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,i;if(Ey){if(zy){if(r)for(n in eb)if((i=Sy[n])&&Py(i,t))try{delete i[t]}catch(t){}if(qy[t]&&!r)return;try{return Cy(qy,t,r?e:$y&&qy[t]||e)}catch(t){}}for(n in eb)!(i=Sy[n])||i[t]&&!r||Cy(i,t,e)}},getTypedArrayConstructor:nb,isView:function(t){if(!Ty(t))return!1;var e=Oy(t);return"DataView"===e||Py(eb,e)||Py(rb,e)},isTypedArray:ib,TypedArray:qy,TypedArrayPrototype:Xy};ei({target:"ArrayBuffer",stat:!0,forced:!ab.NATIVE_ARRAY_BUFFER_VIEWS},{isView:ab.isView});var ob=Ha,sb=dt,cb=TypeError,ub=function(t){if(ob(t))return t;throw cb(sb(t)+" is not a constructor")},lb=Re,hb=ub,fb=I,db=te("species"),pb=function(t,e){var r,n=lb(t).constructor;return void 0===n||fb(r=lb(n)[db])?e:hb(r)},gb=ei,vb=ka,mb=i,yb=Re,bb=sn,xb=ln,wb=pb,Ab=my.ArrayBuffer,_b=my.DataView,kb=_b.prototype,Eb=vb(Ab.prototype.slice),Sb=vb(kb.getUint8),Mb=vb(kb.setUint8);gb({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:mb((function(){return!new Ab(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(Eb&&void 0===e)return Eb(yb(this),t);for(var r=yb(this).byteLength,n=bb(t,r),i=bb(void 0===e?r:e,r),a=new(wb(this,Ab))(xb(i-n)),o=new _b(this),s=new _b(a),c=0;n<i;)Mb(s,c++,Sb(o,n++));return a}}),ei({global:!0,constructor:!0,forced:!Jv},{DataView:my.DataView});var Tb=ei,Pb=w,Ob=i((function(){return 120!==new Date(16e11).getYear()})),Ib=Pb(Date.prototype.getFullYear);Tb({target:"Date",proto:!0,forced:Ob},{getYear:function(){return Ib(this)-1900}});var Rb=ei,Cb=Date,jb=w(Cb.prototype.getTime);Rb({target:"Date",stat:!0},{now:function(){return jb(new Cb)}});var Db=ei,Lb=w,zb=rn,Fb=Date.prototype,Bb=Lb(Fb.getTime),Nb=Lb(Fb.setFullYear);Db({target:"Date",proto:!0},{setYear:function(t){Bb(this);var e=zb(t);return Nb(this,0<=e&&e<=99?e+1900:e)}}),ei({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString});var Ub=rn,Yb=di,Gb=j,Hb=RangeError,Wb=function(t){var e=Yb(Gb(this)),r="",n=Ub(t);if(n<0||n==1/0)throw Hb("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r},qb=w,Xb=ln,Vb=di,Qb=j,Kb=qb(Wb),Jb=qb("".slice),Zb=Math.ceil,$b=function(t){return function(e,r,n){var i,a,o=Vb(Qb(e)),s=Xb(r),c=o.length,u=void 0===n?" ":Vb(n);return s<=c||""==u?o:((a=Kb(u,Zb((i=s-c)/u.length))).length>i&&(a=Jb(a,0,i)),t?o+a:a+o)}},tx={start:$b(!1),end:$b(!0)},ex=w,rx=i,nx=tx.start,ix=RangeError,ax=isFinite,ox=Math.abs,sx=Date.prototype,cx=sx.toISOString,ux=ex(sx.getTime),lx=ex(sx.getUTCDate),hx=ex(sx.getUTCFullYear),fx=ex(sx.getUTCHours),dx=ex(sx.getUTCMilliseconds),px=ex(sx.getUTCMinutes),gx=ex(sx.getUTCMonth),vx=ex(sx.getUTCSeconds),mx=rx((function(){return"0385-07-25T07:06:39.999Z"!=cx.call(new Date(-50000000000001))}))||!rx((function(){cx.call(new Date(NaN))}))?function(){if(!ax(ux(this)))throw ix("Invalid time value");var t=this,e=hx(t),r=dx(t),n=e<0?"-":e>9999?"+":"";return n+nx(ox(e),n?6:4,0)+"-"+nx(gx(t)+1,2,0)+"-"+nx(lx(t),2,0)+"T"+nx(fx(t),2,0)+":"+nx(px(t),2,0)+":"+nx(vx(t),2,0)+"."+nx(r,3,0)+"Z"}:cx,yx=mx;ei({target:"Date",proto:!0,forced:Date.prototype.toISOString!==yx},{toISOString:yx});var bx=Lt,xx=ce;ei({target:"Date",proto:!0,arity:1,forced:i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=bx(this),r=xx(e,"number");return"number"!=typeof r||isFinite(r)?e.toISOString():null}});var wx=Re,Ax=Et,_x=TypeError,kx=Bt,Ex=Kr,Sx=function(t){if(wx(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw _x("Incorrect hint");return Ax(this,t)},Mx=te("toPrimitive"),Tx=Date.prototype;kx(Tx,Mx)||Ex(Tx,Mx,Sx);var Px=w,Ox=Kr,Ix=Date.prototype,Rx="Invalid Date",Cx="toString",jx=Px(Ix[Cx]),Dx=Px(Ix.getTime);String(new Date(NaN))!=Rx&&Ox(Ix,Cx,(function(){var t=Dx(this);return t==t?jx(this):Rx}));var Lx=ei,zx=w,Fx=di,Bx=zx("".charAt),Nx=zx("".charCodeAt),Ux=zx(/./.exec),Yx=zx(1..toString),Gx=zx("".toUpperCase),Hx=/[\w*+\-./@]/,Wx=function(t,e){for(var r=Yx(t,16);r.length<e;)r="0"+r;return r};Lx({global:!0},{escape:function(t){for(var e,r,n=Fx(t),i="",a=n.length,o=0;o<a;)e=Bx(n,o++),Ux(Hx,e)?i+=e:i+=(r=Nx(e,0))<256?"%"+Wx(r,2):"%u"+Gx(Wx(r,4));return i}});var qx=w,Xx=mt,Vx=H,Qx=Bt,Kx=Ds,Jx=o,Zx=Function,$x=qx([].concat),tw=qx([].join),ew={},rw=Jx?Zx.bind:function(t){var e=Xx(this),r=e.prototype,n=Kx(arguments,1),i=function(){var r=$x(n,Kx(arguments));return this instanceof i?function(t,e,r){if(!Qx(ew,e)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";ew[e]=Zx("C,a","return new C("+tw(n,",")+")")}return ew[e](t,r)}(e,r.length,r):e.apply(t,r)};return Vx(r)&&(i.prototype=r),i},nw=rw;ei({target:"Function",proto:!0,forced:Function.bind!==nw},{bind:nw});var iw=U,aw=H,ow=Me,sw=el,cw=te,uw=Xe.exports,lw=cw("hasInstance"),hw=Function.prototype;lw in hw||ow.f(hw,lw,{value:uw((function(t){if(!iw(this)||!aw(t))return!1;var e=this.prototype;if(!aw(e))return t instanceof this;for(;t=sw(t);)if(e===t)return!0;return!1}),lw)});var fw=a,dw=$e.EXISTS,pw=w,gw=ia,vw=Function.prototype,mw=pw(vw.toString),yw=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,bw=pw(yw.exec);fw&&!dw&&gw(vw,"name",{configurable:!0,get:function(){try{return bw(yw,mw(this))[1]}catch(t){return""}}});var xw=r;ei({global:!0,forced:xw.globalThis!==xw},{globalThis:xw}),wa(r.JSON,"JSON",!0);var ww={exports:{}},Aw=i((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),_w=i,kw=H,Ew=E,Sw=Aw,Mw=Object.isExtensible,Tw=_w((function(){Mw(1)}))||Sw?function(t){return!!kw(t)&&((!Sw||"ArrayBuffer"!=Ew(t))&&(!Mw||Mw(t)))}:Mw,Pw=!i((function(){return Object.isExtensible(Object.preventExtensions({}))})),Ow=ei,Iw=w,Rw=pr,Cw=H,jw=Bt,Dw=Me.f,Lw=Jr,zw=Ni,Fw=Tw,Bw=Pw,Nw=!1,Uw=Ht("meta"),Yw=0,Gw=function(t){Dw(t,Uw,{value:{objectID:"O"+Yw++,weakData:{}}})},Hw=ww.exports={enable:function(){Hw.enable=function(){},Nw=!0;var t=Lw.f,e=Iw([].splice),r={};r[Uw]=1,t(r).length&&(Lw.f=function(r){for(var n=t(r),i=0,a=n.length;i<a;i++)if(n[i]===Uw){e(n,i,1);break}return n},Ow({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:zw.f}))},fastKey:function(t,e){if(!Cw(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!jw(t,Uw)){if(!Fw(t))return"F";if(!e)return"E";Gw(t)}return t[Uw].objectID},getWeakData:function(t,e){if(!jw(t,Uw)){if(!Fw(t))return!0;if(!e)return!1;Gw(t)}return t[Uw].weakData},onFreeze:function(t){return Bw&&Nw&&Fw(t)&&!jw(t,Uw)&&Gw(t),t}};Rw[Uw]=!0;var Ww=ei,qw=r,Xw=w,Vw=Xn,Qw=Kr,Kw=ww.exports,Jw=zl,Zw=rm,$w=U,tA=I,eA=H,rA=i,nA=od,iA=wa,aA=Jc,oA=function(t,e,r){var n=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),a=n?"set":"add",o=qw[t],s=o&&o.prototype,c=o,u={},l=function(t){var e=Xw(s[t]);Qw(s,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(i&&!eA(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return i&&!eA(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(i&&!eA(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(Vw(t,!$w(o)||!(i||s.forEach&&!rA((function(){(new o).entries().next()})))))c=r.getConstructor(e,t,n,a),Kw.enable();else if(Vw(t,!0)){var h=new c,f=h[a](i?{}:-0,1)!=h,d=rA((function(){h.has(1)})),p=nA((function(t){new o(t)})),g=!i&&rA((function(){for(var t=new o,e=5;e--;)t[a](e,e);return!t.has(-0)}));p||((c=e((function(t,e){Zw(t,s);var r=aA(new o,t,c);return tA(e)||Jw(e,r[a],{that:r,AS_ENTRIES:n}),r}))).prototype=s,s.constructor=c),(d||g)&&(l("delete"),l("has"),n&&l("get")),(g||f)&&l(a),i&&s.clear&&delete s.clear}return u[t]=c,Ww({global:!0,constructor:!0,forced:c!=o},u),iA(c,t),i||r.setStrong(c,t,n),c},sA=Bi,cA=ia,uA=$v,lA=Ta,hA=rm,fA=I,dA=zl,pA=$d,gA=tp,vA=$g,mA=a,yA=ww.exports.fastKey,bA=Tr.set,xA=Tr.getterFor,wA={getConstructor:function(t,e,r,n){var i=t((function(t,i){hA(t,a),bA(t,{type:e,index:sA(null),first:void 0,last:void 0,size:0}),mA||(t.size=0),fA(i)||dA(i,t[n],{that:t,AS_ENTRIES:r})})),a=i.prototype,o=xA(e),s=function(t,e,r){var n,i,a=o(t),s=c(t,e);return s?s.value=r:(a.last=s={index:i=yA(e,!0),key:e,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=s),n&&(n.next=s),mA?a.size++:t.size++,"F"!==i&&(a.index[i]=s)),t},c=function(t,e){var r,n=o(t),i=yA(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==e)return r};return uA(a,{clear:function(){for(var t=o(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,mA?t.size=0:this.size=0},delete:function(t){var e=this,r=o(e),n=c(e,t);if(n){var i=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first==n&&(r.first=i),r.last==n&&(r.last=a),mA?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=o(this),n=lA(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!c(this,t)}}),uA(a,r?{get:function(t){var e=c(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),mA&&cA(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,e,r){var n=e+" Iterator",i=xA(e),a=xA(n);pA(t,e,(function(t,e){bA(this,{type:n,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=a(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?gA("keys"==e?r.key:"values"==e?r.value:[r.key,r.value],!1):(t.target=void 0,gA(void 0,!0))}),r?"entries":"values",!r,!0),vA(e)}};oA("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),wA);var AA=Math.log,_A=Math.log1p||function(t){var e=+t;return e>-1e-8&&e<1e-8?e-e*e/2:AA(1+e)},kA=ei,EA=_A,SA=Math.acosh,MA=Math.log,TA=Math.sqrt,PA=Math.LN2;kA({target:"Math",stat:!0,forced:!SA||710!=Math.floor(SA(Number.MAX_VALUE))||SA(1/0)!=1/0},{acosh:function(t){var e=+t;return e<1?NaN:e>94906265.62425156?MA(e)+PA:EA(e-1+TA(e-1)*TA(e+1))}});var OA=ei,IA=Math.asinh,RA=Math.log,CA=Math.sqrt;OA({target:"Math",stat:!0,forced:!(IA&&1/IA(0)>0)},{asinh:function t(e){var r=+e;return isFinite(r)&&0!=r?r<0?-t(-r):RA(r+CA(r*r+1)):r}});var jA=ei,DA=Math.atanh,LA=Math.log;jA({target:"Math",stat:!0,forced:!(DA&&1/DA(-0)<0)},{atanh:function(t){var e=+t;return 0==e?e:LA((1+e)/(1-e))/2}});var zA=Math.sign||function(t){var e=+t;return 0==e||e!=e?e:e<0?-1:1},FA=ei,BA=zA,NA=Math.abs,UA=Math.pow;FA({target:"Math",stat:!0},{cbrt:function(t){var e=+t;return BA(e)*UA(NA(e),1/3)}});var YA=ei,GA=Math.floor,HA=Math.log,WA=Math.LOG2E;YA({target:"Math",stat:!0},{clz32:function(t){var e=t>>>0;return e?31-GA(HA(e+.5)*WA):32}});var qA=Math.expm1,XA=Math.exp,VA=!qA||qA(10)>22025.465794806718||qA(10)<22025.465794806718||-2e-17!=qA(-2e-17)?function(t){var e=+t;return 0==e?e:e>-1e-6&&e<1e-6?e+e*e/2:XA(e)-1}:qA,QA=ei,KA=VA,JA=Math.cosh,ZA=Math.abs,$A=Math.E;QA({target:"Math",stat:!0,forced:!JA||JA(710)===1/0},{cosh:function(t){var e=KA(ZA(t)-1)+1;return(e+1/(e*$A*$A))*($A/2)}});var t_=VA;ei({target:"Math",stat:!0,forced:t_!=Math.expm1},{expm1:t_});var e_=zA,r_=Math.abs,n_=Math.pow,i_=n_(2,-52),a_=n_(2,-23),o_=n_(2,127)*(2-a_),s_=n_(2,-126);ei({target:"Math",stat:!0},{fround:Math.fround||function(t){var e,r,n=+t,i=r_(n),a=e_(n);return i<s_?a*function(t){return t+1/i_-1/i_}(i/s_/a_)*s_*a_:(r=(e=(1+a_/i_)*i)-(e-i))>o_||r!=r?a*(1/0):a*r}});var c_=ei,u_=Math.hypot,l_=Math.abs,h_=Math.sqrt;c_({target:"Math",stat:!0,arity:2,forced:!!u_&&u_(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,i=0,a=0,o=arguments.length,s=0;a<o;)s<(r=l_(arguments[a++]))?(i=i*(n=s/r)*n+1,s=r):i+=r>0?(n=r/s)*n:r;return s===1/0?1/0:s*h_(i)}});var f_=ei,d_=i,p_=Math.imul;f_({target:"Math",stat:!0,forced:d_((function(){return-5!=p_(4294967295,5)||2!=p_.length}))},{imul:function(t,e){var r=65535,n=+t,i=+e,a=r&n,o=r&i;return 0|a*o+((r&n>>>16)*o+a*(r&i>>>16)<<16>>>0)}});var g_=Math.log,v_=Math.LOG10E,m_=Math.log10||function(t){return g_(t)*v_};ei({target:"Math",stat:!0},{log10:m_}),ei({target:"Math",stat:!0},{log1p:_A});var y_=ei,b_=Math.log,x_=Math.LN2;y_({target:"Math",stat:!0},{log2:function(t){return b_(t)/x_}}),ei({target:"Math",stat:!0},{sign:zA});var w_=ei,A_=i,__=VA,k_=Math.abs,E_=Math.exp,S_=Math.E;w_({target:"Math",stat:!0,forced:A_((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(t){var e=+t;return k_(e)<1?(__(e)-__(-e))/2:(E_(e-1)-E_(-e-1))*(S_/2)}});var M_=ei,T_=VA,P_=Math.exp;M_({target:"Math",stat:!0},{tanh:function(t){var e=+t,r=T_(e),n=T_(-e);return r==1/0?1:n==1/0?-1:(r-n)/(P_(e)+P_(-e))}}),wa(Math,"Math",!0),ei({target:"Math",stat:!0},{trunc:tn});var O_=w(1..valueOf),I_="\t\n\v\f\r                 \u2028\u2029\ufeff",R_=j,C_=di,j_=I_,D_=w("".replace),L_=RegExp("^["+j_+"]+"),z_=RegExp("(^|[^"+j_+"])["+j_+"]+$"),F_=function(t){return function(e){var r=C_(R_(e));return 1&t&&(r=D_(r,L_,"")),2&t&&(r=D_(r,z_,"$1")),r}},B_={start:F_(1),end:F_(2),trim:F_(3)},N_=ei,U_=a,Y_=r,G_=sa,H_=w,W_=Xn,q_=Bt,X_=Jc,V_=V,Q_=ht,K_=ce,J_=i,Z_=Jr.f,$_=n.f,tk=Me.f,ek=O_,rk=B_.trim,nk="Number",ik=Y_[nk];G_[nk];var ak=ik.prototype,ok=Y_.TypeError,sk=H_("".slice),ck=H_("".charCodeAt),uk=function(t){var e,r,n,i,a,o,s,c,u=K_(t,"number");if(Q_(u))throw ok("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=rk(u),43===(e=ck(u,0))||45===e){if(88===(r=ck(u,2))||120===r)return NaN}else if(48===e){switch(ck(u,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+u}for(o=(a=sk(u,2)).length,s=0;s<o;s++)if((c=ck(a,s))<48||c>i)return NaN;return parseInt(a,n)}return+u},lk=W_(nk,!ik(" 0o1")||!ik("0b1")||ik("+0x1")),hk=function(t){var e,r=arguments.length<1?0:ik(function(t){var e=K_(t,"number");return"bigint"==typeof e?e:uk(e)}(t));return V_(ak,e=this)&&J_((function(){ek(e)}))?X_(Object(r),this,hk):r};hk.prototype=ak,lk&&(ak.constructor=hk),N_({global:!0,constructor:!0,wrap:!0,forced:lk},{Number:hk});lk&&function(t,e){for(var r,n=U_?Z_(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;n.length>i;i++)q_(e,r=n[i])&&!q_(t,r)&&tk(t,r,$_(e,r))}(G_[nk],ik),ei({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)});var fk=r.isFinite;ei({target:"Number",stat:!0},{isFinite:Number.isFinite||function(t){return"number"==typeof t&&fk(t)}});var dk=H,pk=Math.floor,gk=Number.isInteger||function(t){return!dk(t)&&isFinite(t)&&pk(t)===t};ei({target:"Number",stat:!0},{isInteger:gk}),ei({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var vk=ei,mk=gk,yk=Math.abs;vk({target:"Number",stat:!0},{isSafeInteger:function(t){return mk(t)&&yk(t)<=9007199254740991}}),ei({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991}),ei({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991});var bk=r,xk=i,wk=di,Ak=B_.trim,_k=I_,kk=w("".charAt),Ek=bk.parseFloat,Sk=bk.Symbol,Mk=Sk&&Sk.iterator,Tk=1/Ek(_k+"-0")!=-1/0||Mk&&!xk((function(){Ek(Object(Mk))}))?function(t){var e=Ak(wk(t)),r=Ek(e);return 0===r&&"-"==kk(e,0)?-0:r}:Ek,Pk=Tk;ei({target:"Number",stat:!0,forced:Number.parseFloat!=Pk},{parseFloat:Pk});var Ok=r,Ik=i,Rk=w,Ck=di,jk=B_.trim,Dk=I_,Lk=Ok.parseInt,zk=Ok.Symbol,Fk=zk&&zk.iterator,Bk=/^[+-]?0x/i,Nk=Rk(Bk.exec),Uk=8!==Lk(Dk+"08")||22!==Lk(Dk+"0x16")||Fk&&!Ik((function(){Lk(Object(Fk))}))?function(t,e){var r=jk(Ck(t));return Lk(r,e>>>0||(Nk(Bk,r)?16:10))}:Lk,Yk=Uk;ei({target:"Number",stat:!0,forced:Number.parseInt!=Yk},{parseInt:Yk});var Gk=ei,Hk=w,Wk=rn,qk=O_,Xk=Wb,Vk=m_,Qk=i,Kk=RangeError,Jk=String,Zk=isFinite,$k=Math.abs,tE=Math.floor,eE=Math.pow,rE=Math.round,nE=Hk(1..toExponential),iE=Hk(Xk),aE=Hk("".slice),oE="-6.9000e-11"===nE(-69e-12,4)&&"1.25e+0"===nE(1.255,2)&&"1.235e+4"===nE(12345,3)&&"3e+1"===nE(25,0);Gk({target:"Number",proto:!0,forced:!oE||!(Qk((function(){nE(1,1/0)}))&&Qk((function(){nE(1,-1/0)})))||!!Qk((function(){nE(1/0,1/0),nE(NaN,1/0)}))},{toExponential:function(t){var e=qk(this);if(void 0===t)return nE(e);var r=Wk(t);if(!Zk(e))return String(e);if(r<0||r>20)throw Kk("Incorrect fraction digits");if(oE)return nE(e,r);var n="",i="",a=0,o="",s="";if(e<0&&(n="-",e=-e),0===e)a=0,i=iE("0",r+1);else{var c=Vk(e);a=tE(c);var u=0,l=eE(10,a-r);2*e>=(2*(u=rE(e/l))+1)*l&&(u+=1),u>=eE(10,r+1)&&(u/=10,a+=1),i=Jk(u)}return 0!==r&&(i=aE(i,0,1)+"."+aE(i,1)),0===a?(o="+",s="0"):(o=a>0?"+":"-",s=Jk($k(a))),n+(i+="e"+o+s)}});var sE=ei,cE=w,uE=rn,lE=O_,hE=Wb,fE=i,dE=RangeError,pE=String,gE=Math.floor,vE=cE(hE),mE=cE("".slice),yE=cE(1..toFixed),bE=function(t,e,r){return 0===e?r:e%2==1?bE(t,e-1,r*t):bE(t*t,e/2,r)},xE=function(t,e,r){for(var n=-1,i=r;++n<6;)i+=e*t[n],t[n]=i%1e7,i=gE(i/1e7)},wE=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=gE(n/e),n=n%e*1e7},AE=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=pE(t[e]);r=""===r?n:r+vE("0",7-n.length)+n}return r};sE({target:"Number",proto:!0,forced:fE((function(){return"0.000"!==yE(8e-5,3)||"1"!==yE(.9,0)||"1.25"!==yE(1.255,2)||"1000000000000000128"!==yE(0xde0b6b3a7640080,0)}))||!fE((function(){yE({})}))},{toFixed:function(t){var e,r,n,i,a=lE(this),o=uE(t),s=[0,0,0,0,0,0],c="",u="0";if(o<0||o>20)throw dE("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return pE(a);if(a<0&&(c="-",a=-a),a>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(a*bE(2,69,1))-69)<0?a*bE(2,-e,1):a/bE(2,e,1),r*=4503599627370496,(e=52-e)>0){for(xE(s,0,r),n=o;n>=7;)xE(s,1e7,0),n-=7;for(xE(s,bE(10,n,1),0),n=e-1;n>=23;)wE(s,1<<23),n-=23;wE(s,1<<n),xE(s,1,1),wE(s,2),u=AE(s)}else xE(s,0,r),xE(s,1<<-e,0),u=AE(s)+vE("0",o);return u=o>0?c+((i=u.length)<=o?"0."+vE("0",o-i)+u:mE(u,0,i-o)+"."+mE(u,i-o)):c+u}});var _E=ei,kE=i,EE=O_,SE=w(1..toPrecision);_E({target:"Number",proto:!0,forced:kE((function(){return"1"!==SE(1,void 0)}))||!kE((function(){SE({})}))},{toPrecision:function(t){return void 0===t?SE(EE(this)):SE(EE(this),t)}});var ME=a,TE=w,PE=u,OE=i,IE=mi,RE=Mn,CE=l,jE=Lt,DE=O,LE=Object.assign,zE=Object.defineProperty,FE=TE([].concat),BE=!LE||OE((function(){if(ME&&1!==LE({b:1},LE(zE({},"a",{enumerable:!0,get:function(){zE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=LE({},t)[r]||IE(LE({},e)).join("")!=n}))?function(t,e){for(var r=jE(t),n=arguments.length,i=1,a=RE.f,o=CE.f;n>i;)for(var s,c=DE(arguments[i++]),u=a?FE(IE(c),a(c)):IE(c),l=u.length,h=0;l>h;)s=u[h++],ME&&!PE(o,c,s)||(r[s]=c[s]);return r}:LE,NE=BE;ei({target:"Object",stat:!0,arity:2,forced:Object.assign!==NE},{assign:NE}),ei({target:"Object",stat:!0,sham:!a},{create:Bi});var UE=r,YE=Mg,GE=!i((function(){if(!(YE&&YE<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete UE[t]}})),HE=mt,WE=Lt,qE=Me;a&&ei({target:"Object",proto:!0,forced:GE},{__defineGetter__:function(t,e){qE.f(WE(this),t,{get:HE(e),enumerable:!0,configurable:!0})}});var XE=ei,VE=a,QE=pi.f;XE({target:"Object",stat:!0,forced:Object.defineProperties!==QE,sham:!VE},{defineProperties:QE});var KE=ei,JE=a,ZE=Me.f;KE({target:"Object",stat:!0,forced:Object.defineProperty!==ZE,sham:!JE},{defineProperty:ZE});var $E=mt,tS=Lt,eS=Me;a&&ei({target:"Object",proto:!0,forced:GE},{__defineSetter__:function(t,e){eS.f(tS(this),t,{set:$E(e),enumerable:!0,configurable:!0})}});var rS=a,nS=w,iS=mi,aS=z,oS=nS(l.f),sS=nS([].push),cS=function(t){return function(e){for(var r,n=aS(e),i=iS(n),a=i.length,o=0,s=[];a>o;)r=i[o++],rS&&!oS(n,r)||sS(s,t?[r,n[r]]:n[r]);return s}},uS={entries:cS(!0),values:cS(!1)},lS=uS.entries;ei({target:"Object",stat:!0},{entries:function(t){return lS(t)}});var hS=ei,fS=Pw,dS=i,pS=H,gS=ww.exports.onFreeze,vS=Object.freeze;hS({target:"Object",stat:!0,forced:dS((function(){vS(1)})),sham:!fS},{freeze:function(t){return vS&&pS(t)?vS(gS(t)):t}});var mS=zl,yS=Hi;ei({target:"Object",stat:!0},{fromEntries:function(t){var e={};return mS(t,(function(t,r){yS(e,t,r)}),{AS_ENTRIES:!0}),e}});var bS=ei,xS=i,wS=z,AS=n.f,_S=a;bS({target:"Object",stat:!0,forced:!_S||xS((function(){AS(1)})),sham:!_S},{getOwnPropertyDescriptor:function(t,e){return AS(wS(t),e)}});var kS=Cn,ES=z,SS=n,MS=Hi;ei({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(t){for(var e,r,n=ES(t),i=SS.f,a=kS(n),o={},s=0;a.length>s;)void 0!==(r=i(n,e=a[s++]))&&MS(o,e,r);return o}});var TS=ei,PS=i,OS=Ni.f;TS({target:"Object",stat:!0,forced:PS((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:OS});var IS=Lt,RS=el,CS=Xu;ei({target:"Object",stat:!0,forced:i((function(){RS(1)})),sham:!CS},{getPrototypeOf:function(t){return RS(IS(t))}}),ei({target:"Object",stat:!0},{hasOwn:Bt});var jS=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};ei({target:"Object",stat:!0},{is:jS});var DS=Tw;ei({target:"Object",stat:!0,forced:Object.isExtensible!==DS},{isExtensible:DS});var LS=ei,zS=i,FS=H,BS=E,NS=Aw,US=Object.isFrozen;LS({target:"Object",stat:!0,forced:NS||zS((function(){US(1)}))},{isFrozen:function(t){return!FS(t)||(!(!NS||"ArrayBuffer"!=BS(t))||!!US&&US(t))}});var YS=ei,GS=i,HS=H,WS=E,qS=Aw,XS=Object.isSealed;YS({target:"Object",stat:!0,forced:qS||GS((function(){XS(1)}))},{isSealed:function(t){return!HS(t)||(!(!qS||"ArrayBuffer"!=WS(t))||!!XS&&XS(t))}});var VS=Lt,QS=mi;ei({target:"Object",stat:!0,forced:i((function(){QS(1)}))},{keys:function(t){return QS(VS(t))}});var KS=ei,JS=a,ZS=GE,$S=Lt,tM=he,eM=el,rM=n.f;JS&&KS({target:"Object",proto:!0,forced:ZS},{__lookupGetter__:function(t){var e,r=$S(this),n=tM(t);do{if(e=rM(r,n))return e.get}while(r=eM(r))}});var nM=ei,iM=a,aM=GE,oM=Lt,sM=he,cM=el,uM=n.f;iM&&nM({target:"Object",proto:!0,forced:aM},{__lookupSetter__:function(t){var e,r=oM(this),n=sM(t);do{if(e=uM(r,n))return e.set}while(r=cM(r))}});var lM=ei,hM=H,fM=ww.exports.onFreeze,dM=Pw,pM=i,gM=Object.preventExtensions;lM({target:"Object",stat:!0,forced:pM((function(){gM(1)})),sham:!dM},{preventExtensions:function(t){return gM&&hM(t)?gM(fM(t)):t}});var vM=a,mM=ia,yM=H,bM=Lt,xM=j,wM=Object.getPrototypeOf,AM=Object.setPrototypeOf,_M=Object.prototype,kM="__proto__";if(vM&&wM&&AM&&!(kM in _M))try{mM(_M,kM,{configurable:!0,get:function(){return wM(bM(this))},set:function(t){var e=xM(this);(yM(t)||null===t)&&yM(e)&&AM(e,t)}})}catch(t){}var EM=ei,SM=H,MM=ww.exports.onFreeze,TM=Pw,PM=i,OM=Object.seal;EM({target:"Object",stat:!0,forced:PM((function(){OM(1)})),sham:!TM},{seal:function(t){return OM&&SM(t)?OM(MM(t)):t}}),ei({target:"Object",stat:!0},{setPrototypeOf:Wc});var IM=li,RM=ni?{}.toString:function(){return"[object "+IM(this)+"]"};ni||Kr(Object.prototype,"toString",RM,{unsafe:!0});var CM=uS.values;ei({target:"Object",stat:!0},{values:function(t){return CM(t)}});ei({global:!0,forced:parseFloat!=Tk},{parseFloat:Tk});ei({global:!0,forced:parseInt!=Uk},{parseInt:Uk});var jM,DM,LM,zM,FM=TypeError,BM=function(t,e){if(t<e)throw FM("Not enough arguments");return t},NM=/(?:ipad|iphone|ipod).*applewebkit/i.test(Q),UM=r,YM=js,GM=Ta,HM=U,WM=Bt,qM=i,XM=Ei,VM=Ds,QM=ge,KM=BM,JM=NM,ZM=Qp,$M=UM.setImmediate,tT=UM.clearImmediate,eT=UM.process,rT=UM.Dispatch,nT=UM.Function,iT=UM.MessageChannel,aT=UM.String,oT=0,sT={},cT="onreadystatechange";qM((function(){jM=UM.location}));var uT=function(t){if(WM(sT,t)){var e=sT[t];delete sT[t],e()}},lT=function(t){return function(){uT(t)}},hT=function(t){uT(t.data)},fT=function(t){UM.postMessage(aT(t),jM.protocol+"//"+jM.host)};$M&&tT||($M=function(t){KM(arguments.length,1);var e=HM(t)?t:nT(t),r=VM(arguments,1);return sT[++oT]=function(){YM(e,void 0,r)},DM(oT),oT},tT=function(t){delete sT[t]},ZM?DM=function(t){eT.nextTick(lT(t))}:rT&&rT.now?DM=function(t){rT.now(lT(t))}:iT&&!JM?(zM=(LM=new iT).port2,LM.port1.onmessage=hT,DM=GM(zM.postMessage,zM)):UM.addEventListener&&HM(UM.postMessage)&&!UM.importScripts&&jM&&"file:"!==jM.protocol&&!qM(fT)?(DM=fT,UM.addEventListener("message",hT,!1)):DM=cT in QM("script")?function(t){XM.appendChild(QM("script"))[cT]=function(){XM.removeChild(this),uT(t)}}:function(t){setTimeout(lT(t),0)});var dT={set:$M,clear:tT},pT=function(){this.head=null,this.tail=null};pT.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var gT,vT,mT,yT,bT,xT=pT,wT=/ipad|iphone|ipod/i.test(Q)&&"undefined"!=typeof Pebble,AT=/web0s(?!.*chrome)/i.test(Q),_T=r,kT=Ta,ET=n.f,ST=dT.set,MT=xT,TT=NM,PT=wT,OT=AT,IT=Qp,RT=_T.MutationObserver||_T.WebKitMutationObserver,CT=_T.document,jT=_T.process,DT=_T.Promise,LT=ET(_T,"queueMicrotask"),zT=LT&&LT.value;if(!zT){var FT=new MT,BT=function(){var t,e;for(IT&&(t=jT.domain)&&t.exit();e=FT.get();)try{e()}catch(t){throw FT.head&&gT(),t}t&&t.enter()};TT||IT||OT||!RT||!CT?!PT&&DT&&DT.resolve?((yT=DT.resolve(void 0)).constructor=DT,bT=kT(yT.then,yT),gT=function(){bT(BT)}):IT?gT=function(){jT.nextTick(BT)}:(ST=kT(ST,_T),gT=function(){ST(BT)}):(vT=!0,mT=CT.createTextNode(""),new RT(BT).observe(mT,{characterData:!0}),gT=function(){mT.data=vT=!vT}),zT=function(t){FT.head||gT(),FT.add(t)}}var NT=zT,UT=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},YT=r.Promise,GT="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,HT=!GT&&!Qp&&"object"==typeof window&&"object"==typeof document,WT=r,qT=YT,XT=U,VT=Xn,QT=or,KT=te,JT=HT,ZT=GT,$T=rt;qT&&qT.prototype;var tP=KT("species"),eP=!1,rP=XT(WT.PromiseRejectionEvent),nP=VT("Promise",(function(){var t=QT(qT),e=t!==String(qT);if(!e&&66===$T)return!0;if(!$T||$T<51||!/native code/.test(t)){var r=new qT((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[tP]=n,!(eP=r.then((function(){}))instanceof n))return!0}return!e&&(JT||ZT)&&!rP})),iP={CONSTRUCTOR:nP,REJECTION_EVENT:rP,SUBCLASSING:eP},aP={},oP=mt,sP=TypeError,cP=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw sP("Bad Promise constructor");e=t,r=n})),this.resolve=oP(e),this.reject=oP(r)};aP.f=function(t){return new cP(t)};var uP,lP,hP,fP=ei,dP=Qp,pP=r,gP=u,vP=Kr,mP=Wc,yP=wa,bP=$g,xP=mt,wP=U,AP=H,_P=rm,kP=pb,EP=dT.set,SP=NT,MP=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(t){}},TP=UT,PP=xT,OP=Tr,IP=YT,RP=aP,CP="Promise",jP=iP.CONSTRUCTOR,DP=iP.REJECTION_EVENT,LP=iP.SUBCLASSING,zP=OP.getterFor(CP),FP=OP.set,BP=IP&&IP.prototype,NP=IP,UP=BP,YP=pP.TypeError,GP=pP.document,HP=pP.process,WP=RP.f,qP=WP,XP=!!(GP&&GP.createEvent&&pP.dispatchEvent),VP="unhandledrejection",QP=function(t){var e;return!(!AP(t)||!wP(e=t.then))&&e},KP=function(t,e){var r,n,i,a=e.value,o=1==e.state,s=o?t.ok:t.fail,c=t.resolve,u=t.reject,l=t.domain;try{s?(o||(2===e.rejection&&eO(e),e.rejection=1),!0===s?r=a:(l&&l.enter(),r=s(a),l&&(l.exit(),i=!0)),r===t.promise?u(YP("Promise-chain cycle")):(n=QP(r))?gP(n,r,c,u):c(r)):u(a)}catch(t){l&&!i&&l.exit(),u(t)}},JP=function(t,e){t.notified||(t.notified=!0,SP((function(){for(var r,n=t.reactions;r=n.get();)KP(r,t);t.notified=!1,e&&!t.rejection&&$P(t)})))},ZP=function(t,e,r){var n,i;XP?((n=GP.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),pP.dispatchEvent(n)):n={promise:e,reason:r},!DP&&(i=pP["on"+t])?i(n):t===VP&&MP("Unhandled promise rejection",r)},$P=function(t){gP(EP,pP,(function(){var e,r=t.facade,n=t.value;if(tO(t)&&(e=TP((function(){dP?HP.emit("unhandledRejection",n,r):ZP(VP,r,n)})),t.rejection=dP||tO(t)?2:1,e.error))throw e.value}))},tO=function(t){return 1!==t.rejection&&!t.parent},eO=function(t){gP(EP,pP,(function(){var e=t.facade;dP?HP.emit("rejectionHandled",e):ZP("rejectionhandled",e,t.value)}))},rO=function(t,e,r){return function(n){t(e,n,r)}},nO=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,JP(t,!0))},iO=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw YP("Promise can't be resolved itself");var n=QP(e);n?SP((function(){var r={done:!1};try{gP(n,e,rO(iO,r,t),rO(nO,r,t))}catch(e){nO(r,e,t)}})):(t.value=e,t.state=1,JP(t,!1))}catch(e){nO({done:!1},e,t)}}};if(jP&&(UP=(NP=function(t){_P(this,UP),xP(t),gP(uP,this);var e=zP(this);try{t(rO(iO,e),rO(nO,e))}catch(t){nO(e,t)}}).prototype,(uP=function(t){FP(this,{type:CP,done:!1,notified:!1,parent:!1,reactions:new PP,rejection:!1,state:0,value:void 0})}).prototype=vP(UP,"then",(function(t,e){var r=zP(this),n=WP(kP(this,NP));return r.parent=!0,n.ok=!wP(t)||t,n.fail=wP(e)&&e,n.domain=dP?HP.domain:void 0,0==r.state?r.reactions.add(n):SP((function(){KP(n,r)})),n.promise})),lP=function(){var t=new uP,e=zP(t);this.promise=t,this.resolve=rO(iO,e),this.reject=rO(nO,e)},RP.f=WP=function(t){return t===NP||undefined===t?new lP(t):qP(t)},wP(IP)&&BP!==Object.prototype)){hP=BP.then,LP||vP(BP,"then",(function(t,e){var r=this;return new NP((function(t,e){gP(hP,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete BP.constructor}catch(t){}mP&&mP(BP,UP)}fP({global:!0,constructor:!0,wrap:!0,forced:jP},{Promise:NP}),yP(NP,CP,!1),bP(CP);var aO=YT,oO=iP.CONSTRUCTOR||!od((function(t){aO.all(t).then(void 0,(function(){}))})),sO=u,cO=mt,uO=aP,lO=UT,hO=zl;ei({target:"Promise",stat:!0,forced:oO},{all:function(t){var e=this,r=uO.f(e),n=r.resolve,i=r.reject,a=lO((function(){var r=cO(e.resolve),a=[],o=0,s=1;hO(t,(function(t){var c=o++,u=!1;s++,sO(r,e,t).then((function(t){u||(u=!0,a[c]=t,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var fO=ei,dO=iP.CONSTRUCTOR,pO=YT,gO=X,vO=U,mO=Kr,yO=pO&&pO.prototype;if(fO({target:"Promise",proto:!0,forced:dO,real:!0},{catch:function(t){return this.then(void 0,t)}}),vO(pO)){var bO=gO("Promise").prototype.catch;yO.catch!==bO&&mO(yO,"catch",bO,{unsafe:!0})}var xO=u,wO=mt,AO=aP,_O=UT,kO=zl;ei({target:"Promise",stat:!0,forced:oO},{race:function(t){var e=this,r=AO.f(e),n=r.reject,i=_O((function(){var i=wO(e.resolve);kO(t,(function(t){xO(i,e,t).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var EO=u,SO=aP;ei({target:"Promise",stat:!0,forced:iP.CONSTRUCTOR},{reject:function(t){var e=SO.f(this);return EO(e.reject,void 0,t),e.promise}});var MO=Re,TO=H,PO=aP,OO=function(t,e){if(MO(t),TO(e)&&e.constructor===t)return e;var r=PO.f(t);return(0,r.resolve)(e),r.promise},IO=ei,RO=iP.CONSTRUCTOR,CO=OO;X("Promise"),IO({target:"Promise",stat:!0,forced:RO},{resolve:function(t){return CO(this,t)}});var jO=u,DO=mt,LO=aP,zO=UT,FO=zl;ei({target:"Promise",stat:!0,forced:oO},{allSettled:function(t){var e=this,r=LO.f(e),n=r.resolve,i=r.reject,a=zO((function(){var r=DO(e.resolve),i=[],a=0,o=1;FO(t,(function(t){var s=a++,c=!1;o++,jO(r,e,t).then((function(t){c||(c=!0,i[s]={status:"fulfilled",value:t},--o||n(i))}),(function(t){c||(c=!0,i[s]={status:"rejected",reason:t},--o||n(i))}))})),--o||n(i)}));return a.error&&i(a.value),r.promise}});var BO=u,NO=mt,UO=X,YO=aP,GO=UT,HO=zl,WO="No one promise resolved";ei({target:"Promise",stat:!0,forced:oO},{any:function(t){var e=this,r=UO("AggregateError"),n=YO.f(e),i=n.resolve,a=n.reject,o=GO((function(){var n=NO(e.resolve),o=[],s=0,c=1,u=!1;HO(t,(function(t){var l=s++,h=!1;c++,BO(n,e,t).then((function(t){h||u||(u=!0,i(t))}),(function(t){h||u||(h=!0,o[l]=t,--c||a(new r(o,WO)))}))})),--c||a(new r(o,WO))}));return o.error&&a(o.value),n.promise}});var qO=ei,XO=YT,VO=i,QO=X,KO=U,JO=pb,ZO=OO,$O=Kr,tI=XO&&XO.prototype;if(qO({target:"Promise",proto:!0,real:!0,forced:!!XO&&VO((function(){tI.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=JO(this,QO("Promise")),r=KO(t);return this.then(r?function(r){return ZO(e,t()).then((function(){return r}))}:t,r?function(r){return ZO(e,t()).then((function(){throw r}))}:t)}}),KO(XO)){var eI=QO("Promise").prototype.finally;tI.finally!==eI&&$O(tI,"finally",eI,{unsafe:!0})}var rI=js,nI=mt,iI=Re;ei({target:"Reflect",stat:!0,forced:!i((function(){Reflect.apply((function(){}))}))},{apply:function(t,e,r){return rI(nI(t),e,iI(r))}});var aI=ei,oI=js,sI=rw,cI=ub,uI=Re,lI=H,hI=Bi,fI=i,dI=X("Reflect","construct"),pI=Object.prototype,gI=[].push,vI=fI((function(){function t(){}return!(dI((function(){}),[],t)instanceof t)})),mI=!fI((function(){dI((function(){}))})),yI=vI||mI;aI({target:"Reflect",stat:!0,forced:yI,sham:yI},{construct:function(t,e){cI(t),uI(e);var r=arguments.length<3?t:cI(arguments[2]);if(mI&&!vI)return dI(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return oI(gI,n,e),new(oI(sI,t,n))}var i=r.prototype,a=hI(lI(i)?i:pI),o=oI(t,a,e);return lI(o)?o:a}});var bI=a,xI=Re,wI=he,AI=Me;ei({target:"Reflect",stat:!0,forced:i((function(){Reflect.defineProperty(AI.f({},1,{value:1}),1,{value:2})})),sham:!bI},{defineProperty:function(t,e,r){xI(t);var n=wI(e);xI(r);try{return AI.f(t,n,r),!0}catch(t){return!1}}});var _I=ei,kI=Re,EI=n.f;_I({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var r=EI(kI(t),e);return!(r&&!r.configurable)&&delete t[e]}});var SI=Bt,MI=function(t){return void 0!==t&&(SI(t,"value")||SI(t,"writable"))},TI=u,PI=H,OI=Re,II=MI,RI=n,CI=el;ei({target:"Reflect",stat:!0},{get:function t(e,r){var n,i,a=arguments.length<3?e:arguments[2];return OI(e)===a?e[r]:(n=RI.f(e,r))?II(n)?n.value:void 0===n.get?void 0:TI(n.get,a):PI(i=CI(e))?t(i,r,a):void 0}});var jI=Re,DI=n;ei({target:"Reflect",stat:!0,sham:!a},{getOwnPropertyDescriptor:function(t,e){return DI.f(jI(t),e)}});var LI=Re,zI=el;ei({target:"Reflect",stat:!0,sham:!Xu},{getPrototypeOf:function(t){return zI(LI(t))}}),ei({target:"Reflect",stat:!0},{has:function(t,e){return e in t}});var FI=Re,BI=Tw;ei({target:"Reflect",stat:!0},{isExtensible:function(t){return FI(t),BI(t)}}),ei({target:"Reflect",stat:!0},{ownKeys:Cn});var NI=X,UI=Re;ei({target:"Reflect",stat:!0,sham:!Pw},{preventExtensions:function(t){UI(t);try{var e=NI("Object","preventExtensions");return e&&e(t),!0}catch(t){return!1}}});var YI=ei,GI=u,HI=Re,WI=H,qI=MI,XI=Me,VI=n,QI=el,KI=v;var JI=i((function(){var t=function(){},e=XI.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,e)}));YI({target:"Reflect",stat:!0,forced:JI},{set:function t(e,r,n){var i,a,o,s=arguments.length<4?e:arguments[3],c=VI.f(HI(e),r);if(!c){if(WI(a=QI(e)))return t(a,r,n,s);c=KI(0)}if(qI(c)){if(!1===c.writable||!WI(s))return!1;if(i=VI.f(s,r)){if(i.get||i.set||!1===i.writable)return!1;i.value=n,XI.f(s,r,i)}else XI.f(s,r,KI(0,n))}else{if(void 0===(o=c.set))return!1;GI(o,s,n)}return!0}});var ZI=Re,$I=Uc,tR=Wc;tR&&ei({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){ZI(t),$I(e);try{return tR(t,e),!0}catch(t){return!1}}});var eR=r,rR=wa;ei({global:!0},{Reflect:{}}),rR(eR.Reflect,"Reflect",!0);var nR=H,iR=E,aR=te("match"),oR=function(t){var e;return nR(t)&&(void 0!==(e=t[aR])?!!e:"RegExp"==iR(t))},sR=Re,cR=function(){var t=sR(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},uR=u,lR=Bt,hR=V,fR=cR,dR=RegExp.prototype,pR=function(t){var e=t.flags;return void 0!==e||"flags"in dR||lR(t,"flags")||!hR(dR,t)?e:uR(fR,t)},gR=i,vR=r.RegExp,mR=gR((function(){var t=vR("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),yR=mR||gR((function(){return!vR("a","y").sticky})),bR=mR||gR((function(){var t=vR("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),xR={BROKEN_CARET:bR,MISSED_STICKY:yR,UNSUPPORTED_Y:mR},wR=i,AR=r.RegExp,_R=wR((function(){var t=AR(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),kR=i,ER=r.RegExp,SR=kR((function(){var t=ER("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),MR=a,TR=r,PR=w,OR=Xn,IR=Jc,RR=qe,CR=Jr.f,jR=V,DR=oR,LR=di,zR=pR,FR=xR,BR=Xc,NR=Kr,UR=i,YR=Bt,GR=Tr.enforce,HR=$g,WR=_R,qR=SR,XR=te("match"),VR=TR.RegExp,QR=VR.prototype,KR=TR.SyntaxError,JR=PR(QR.exec),ZR=PR("".charAt),$R=PR("".replace),tC=PR("".indexOf),eC=PR("".slice),rC=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,nC=/a/g,iC=/a/g,aC=new VR(nC)!==nC,oC=FR.MISSED_STICKY,sC=FR.UNSUPPORTED_Y,cC=MR&&(!aC||oC||WR||qR||UR((function(){return iC[XR]=!1,VR(nC)!=nC||VR(iC)==iC||"/a/i"!=VR(nC,"i")})));if(OR("RegExp",cC)){for(var uC=function(t,e){var r,n,i,a,o,s,c=jR(QR,this),u=DR(t),l=void 0===e,h=[],f=t;if(!c&&u&&l&&t.constructor===uC)return t;if((u||jR(QR,t))&&(t=t.source,l&&(e=zR(f))),t=void 0===t?"":LR(t),e=void 0===e?"":LR(e),f=t,WR&&"dotAll"in nC&&(n=!!e&&tC(e,"s")>-1)&&(e=$R(e,/s/g,"")),r=e,oC&&"sticky"in nC&&(i=!!e&&tC(e,"y")>-1)&&sC&&(e=$R(e,/y/g,"")),qR&&(a=function(t){for(var e,r=t.length,n=0,i="",a=[],o={},s=!1,c=!1,u=0,l="";n<=r;n++){if("\\"===(e=ZR(t,n)))e+=ZR(t,++n);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:JR(rC,eC(t,n+1))&&(n+=2,c=!0),i+=e,u++;continue;case">"===e&&c:if(""===l||YR(o,l))throw new KR("Invalid capture group name");o[l]=!0,a[a.length]=[l,u],c=!1,l="";continue}c?l+=e:i+=e}return[i,a]}(t),t=a[0],h=a[1]),o=IR(VR(t,e),c?this:QR,uC),(n||i||h.length)&&(s=GR(o),n&&(s.dotAll=!0,s.raw=uC(function(t){for(var e,r=t.length,n=0,i="",a=!1;n<=r;n++)"\\"!==(e=ZR(t,n))?a||"."!==e?("["===e?a=!0:"]"===e&&(a=!1),i+=e):i+="[\\s\\S]":i+=e+ZR(t,++n);return i}(t),r)),i&&(s.sticky=!0),h.length&&(s.groups=h)),t!==f)try{RR(o,"source",""===f?"(?:)":f)}catch(t){}return o},lC=CR(VR),hC=0;lC.length>hC;)BR(uC,VR,lC[hC++]);QR.constructor=uC,uC.prototype=QR,NR(TR,"RegExp",uC,{constructor:!0})}HR("RegExp");var fC=a,dC=_R,pC=E,gC=ia,vC=Tr.get,mC=RegExp.prototype,yC=TypeError;fC&&dC&&gC(mC,"dotAll",{configurable:!0,get:function(){if(this!==mC){if("RegExp"===pC(this))return!!vC(this).dotAll;throw yC("Incompatible receiver, RegExp required")}}});var bC=u,xC=w,wC=di,AC=cR,_C=xR,kC=St.exports,EC=Bi,SC=Tr.get,MC=_R,TC=SR,PC=kC("native-string-replace",String.prototype.replace),OC=RegExp.prototype.exec,IC=OC,RC=xC("".charAt),CC=xC("".indexOf),jC=xC("".replace),DC=xC("".slice),LC=function(){var t=/a/,e=/b*/g;return bC(OC,t,"a"),bC(OC,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),zC=_C.BROKEN_CARET,FC=void 0!==/()??/.exec("")[1];(LC||FC||zC||MC||TC)&&(IC=function(t){var e,r,n,i,a,o,s,c=this,u=SC(c),l=wC(t),h=u.raw;if(h)return h.lastIndex=c.lastIndex,e=bC(IC,h,l),c.lastIndex=h.lastIndex,e;var f=u.groups,d=zC&&c.sticky,p=bC(AC,c),g=c.source,v=0,m=l;if(d&&(p=jC(p,"y",""),-1===CC(p,"g")&&(p+="g"),m=DC(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==RC(l,c.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,v++),r=new RegExp("^(?:"+g+")",p)),FC&&(r=new RegExp("^"+g+"$(?!\\s)",p)),LC&&(n=c.lastIndex),i=bC(OC,d?r:c,m),d?i?(i.input=DC(i.input,v),i[0]=DC(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:LC&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),FC&&i&&i.length>1&&bC(PC,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&f)for(i.groups=o=EC(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var BC=IC;ei({target:"RegExp",proto:!0,forced:/./.exec!==BC},{exec:BC});var NC=a,UC=ia,YC=cR,GC=i,HC=r.RegExp,WC=HC.prototype,qC=NC&&GC((function(){var t=!0;try{HC(".","d")}catch(e){t=!1}var e={},r="",n=t?"dgimsy":"gimsy",i=function(t,n){Object.defineProperty(e,t,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var o in t&&(a.hasIndices="d"),a)i(o,a[o]);return Object.getOwnPropertyDescriptor(WC,"flags").get.call(e)!==n||r!==n}));qC&&UC(WC,"flags",{configurable:!0,get:YC});var XC=a,VC=xR.MISSED_STICKY,QC=E,KC=ia,JC=Tr.get,ZC=RegExp.prototype,$C=TypeError;XC&&VC&&KC(ZC,"sticky",{configurable:!0,get:function(){if(this!==ZC){if("RegExp"===QC(this))return!!JC(this).sticky;throw $C("Incompatible receiver, RegExp required")}}});var tj,ej,rj=ei,nj=u,ij=U,aj=Re,oj=di,sj=(tj=!1,(ej=/[ac]/).exec=function(){return tj=!0,/./.exec.apply(this,arguments)},!0===ej.test("abc")&&tj),cj=/./.test;rj({target:"RegExp",proto:!0,forced:!sj},{test:function(t){var e=aj(this),r=oj(t),n=e.exec;if(!ij(n))return nj(cj,e,r);var i=nj(n,e,r);return null!==i&&(aj(i),!0)}});var uj=$e.PROPER,lj=Kr,hj=Re,fj=di,dj=i,pj=pR,gj="toString",vj=RegExp.prototype[gj],mj=dj((function(){return"/a/b"!=vj.call({source:"a",flags:"b"})})),yj=uj&&vj.name!=gj;(mj||yj)&&lj(RegExp.prototype,gj,(function(){var t=hj(this);return"/"+fj(t.source)+"/"+fj(pj(t))}),{unsafe:!0}),oA("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),wA);var bj=ei,xj=j,wj=rn,Aj=di,_j=i,kj=w("".charAt);bj({target:"String",proto:!0,forced:_j((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(t){var e=Aj(xj(this)),r=e.length,n=wj(t),i=n>=0?n:r+n;return i<0||i>=r?void 0:kj(e,i)}});var Ej=w,Sj=rn,Mj=di,Tj=j,Pj=Ej("".charAt),Oj=Ej("".charCodeAt),Ij=Ej("".slice),Rj=function(t){return function(e,r){var n,i,a=Mj(Tj(e)),o=Sj(r),s=a.length;return o<0||o>=s?t?"":void 0:(n=Oj(a,o))<55296||n>56319||o+1===s||(i=Oj(a,o+1))<56320||i>57343?t?Pj(a,o):n:t?Ij(a,o,o+2):i-56320+(n-55296<<10)+65536}},Cj={codeAt:Rj(!1),charAt:Rj(!0)},jj=Cj.codeAt;ei({target:"String",proto:!0},{codePointAt:function(t){return jj(this,t)}});var Dj=oR,Lj=TypeError,zj=function(t){if(Dj(t))throw Lj("The method doesn't accept regular expressions");return t},Fj=te("match"),Bj=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Fj]=!1,"/./"[t](e)}catch(t){}}return!1},Nj=ei,Uj=ka,Yj=n.f,Gj=ln,Hj=di,Wj=zj,qj=j,Xj=Bj,Vj=Uj("".endsWith),Qj=Uj("".slice),Kj=Math.min,Jj=Xj("endsWith"),Zj=!Jj&&!!function(){var t=Yj(String.prototype,"endsWith");return t&&!t.writable}();Nj({target:"String",proto:!0,forced:!Zj&&!Jj},{endsWith:function(t){var e=Hj(qj(this));Wj(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,i=void 0===r?n:Kj(Gj(r),n),a=Hj(t);return Vj?Vj(e,a,i):Qj(e,i-a.length,i)===a}});var $j=ei,tD=w,eD=sn,rD=RangeError,nD=String.fromCharCode,iD=String.fromCodePoint,aD=tD([].join);$j({target:"String",stat:!0,arity:1,forced:!!iD&&1!=iD.length},{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,i=0;n>i;){if(e=+arguments[i++],eD(e,1114111)!==e)throw rD(e+" is not a valid code point");r[i]=e<65536?nD(e):nD(55296+((e-=65536)>>10),e%1024+56320)}return aD(r,"")}});var oD=ei,sD=zj,cD=j,uD=di,lD=Bj,hD=w("".indexOf);oD({target:"String",proto:!0,forced:!lD("includes")},{includes:function(t){return!!~hD(uD(cD(this)),uD(sD(t)),arguments.length>1?arguments[1]:void 0)}});var fD=Cj.charAt,dD=di,pD=Tr,gD=$d,vD=tp,mD="String Iterator",yD=pD.set,bD=pD.getterFor(mD);gD(String,"String",(function(t){yD(this,{type:mD,string:dD(t),index:0})}),(function(){var t,e=bD(this),r=e.string,n=e.index;return n>=r.length?vD(void 0,!0):(t=fD(r,n),e.index+=t.length,vD(t,!1))}));var xD=ka,wD=Kr,AD=BC,_D=i,kD=te,ED=qe,SD=kD("species"),MD=RegExp.prototype,TD=function(t,e,r,n){var i=kD(t),a=!_D((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),o=a&&!_D((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[SD]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return e=!0,null},r[i](""),!e}));if(!a||!o||r){var s=xD(/./[i]),c=e(i,""[t],(function(t,e,r,n,i){var o=xD(t),c=e.exec;return c===AD||c===MD.exec?a&&!i?{done:!0,value:s(e,r,n)}:{done:!0,value:o(r,e,n)}:{done:!1}}));wD(String.prototype,t,c[0]),wD(MD,i,c[1])}n&&ED(MD[i],"sham",!0)},PD=Cj.charAt,OD=function(t,e,r){return e+(r?PD(t,e).length:1)},ID=u,RD=Re,CD=U,jD=E,DD=BC,LD=TypeError,zD=function(t,e){var r=t.exec;if(CD(r)){var n=ID(r,t,e);return null!==n&&RD(n),n}if("RegExp"===jD(t))return ID(DD,t,e);throw LD("RegExp#exec called on incompatible receiver")},FD=u,BD=Re,ND=I,UD=ln,YD=di,GD=j,HD=xt,WD=OD,qD=zD;TD("match",(function(t,e,r){return[function(e){var r=GD(this),n=ND(e)?void 0:HD(e,t);return n?FD(n,e,r):new RegExp(e)[t](YD(r))},function(t){var n=BD(this),i=YD(t),a=r(e,n,i);if(a.done)return a.value;if(!n.global)return qD(n,i);var o=n.unicode;n.lastIndex=0;for(var s,c=[],u=0;null!==(s=qD(n,i));){var l=YD(s[0]);c[u]=l,""===l&&(n.lastIndex=WD(i,UD(n.lastIndex),o)),u++}return 0===u?null:c}]}));var XD=ei,VD=u,QD=ka,KD=Cd,JD=tp,ZD=j,$D=ln,tL=di,eL=Re,rL=I,nL=oR,iL=pR,aL=xt,oL=Kr,sL=i,cL=pb,uL=OD,lL=zD,hL=Tr,fL=te("matchAll"),dL="RegExp String",pL=dL+" Iterator",gL=hL.set,vL=hL.getterFor(pL),mL=RegExp.prototype,yL=TypeError,bL=QD("".indexOf),xL=QD("".matchAll),wL=!!xL&&!sL((function(){xL("a",/./)})),AL=KD((function(t,e,r,n){gL(this,{type:pL,regexp:t,string:e,global:r,unicode:n,done:!1})}),dL,(function(){var t=vL(this);if(t.done)return JD(void 0,!0);var e=t.regexp,r=t.string,n=lL(e,r);return null===n?(t.done=!0,JD(void 0,!0)):t.global?(""===tL(n[0])&&(e.lastIndex=uL(r,$D(e.lastIndex),t.unicode)),JD(n,!1)):(t.done=!0,JD(n,!1))})),_L=function(t){var e,r,n,i=eL(this),a=tL(t),o=cL(i,RegExp),s=tL(iL(i));return e=new o(o===RegExp?i.source:i,s),r=!!~bL(s,"g"),n=!!~bL(s,"u"),e.lastIndex=$D(i.lastIndex),new AL(e,a,r,n)};XD({target:"String",proto:!0,forced:wL},{matchAll:function(t){var e,r,n,i=ZD(this);if(rL(t)){if(wL)return xL(i,t)}else{if(nL(t)&&(e=tL(ZD(iL(t))),!~bL(e,"g")))throw yL("`.matchAll` does not allow non-global regexes");if(wL)return xL(i,t);if(n=aL(t,fL))return VD(n,t,i)}return r=tL(i),new RegExp(t,"g")[fL](r)}}),fL in mL||oL(mL,fL,_L);var kL=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Q),EL=tx.end;ei({target:"String",proto:!0,forced:kL},{padEnd:function(t){return EL(this,t,arguments.length>1?arguments[1]:void 0)}});var SL=tx.start;ei({target:"String",proto:!0,forced:kL},{padStart:function(t){return SL(this,t,arguments.length>1?arguments[1]:void 0)}});var ML=ei,TL=w,PL=z,OL=Lt,IL=di,RL=fn,CL=TL([].push),jL=TL([].join);ML({target:"String",stat:!0},{raw:function(t){var e=PL(OL(t).raw),r=RL(e);if(!r)return"";for(var n=arguments.length,i=[],a=0;;){if(CL(i,IL(e[a++])),a===r)return jL(i,"");a<n&&CL(i,IL(arguments[a]))}}}),ei({target:"String",proto:!0},{repeat:Wb});var DL=w,LL=Lt,zL=Math.floor,FL=DL("".charAt),BL=DL("".replace),NL=DL("".slice),UL=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,YL=/\$([$&'`]|\d{1,2})/g,GL=function(t,e,r,n,i,a){var o=r+t.length,s=n.length,c=YL;return void 0!==i&&(i=LL(i),c=UL),BL(a,c,(function(a,c){var u;switch(FL(c,0)){case"$":return"$";case"&":return t;case"`":return NL(e,0,r);case"'":return NL(e,o);case"<":u=i[NL(c,1,-1)];break;default:var l=+c;if(0===l)return a;if(l>s){var h=zL(l/10);return 0===h?a:h<=s?void 0===n[h-1]?FL(c,1):n[h-1]+FL(c,1):a}u=n[l-1]}return void 0===u?"":u}))},HL=js,WL=u,qL=w,XL=TD,VL=i,QL=Re,KL=U,JL=I,ZL=rn,$L=ln,tz=di,ez=j,rz=OD,nz=xt,iz=GL,az=zD,oz=te("replace"),sz=Math.max,cz=Math.min,uz=qL([].concat),lz=qL([].push),hz=qL("".indexOf),fz=qL("".slice),dz="$0"==="a".replace(/./,"$0"),pz=!!/./[oz]&&""===/./[oz]("a","$0"),gz=!VL((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}));XL("replace",(function(t,e,r){var n=pz?"$":"$0";return[function(t,r){var n=ez(this),i=JL(t)?void 0:nz(t,oz);return i?WL(i,t,n,r):WL(e,tz(n),t,r)},function(t,i){var a=QL(this),o=tz(t);if("string"==typeof i&&-1===hz(i,n)&&-1===hz(i,"$<")){var s=r(e,a,o,i);if(s.done)return s.value}var c=KL(i);c||(i=tz(i));var u=a.global;if(u){var l=a.unicode;a.lastIndex=0}for(var h=[];;){var f=az(a,o);if(null===f)break;if(lz(h,f),!u)break;""===tz(f[0])&&(a.lastIndex=rz(o,$L(a.lastIndex),l))}for(var d,p="",g=0,v=0;v<h.length;v++){for(var m=tz((f=h[v])[0]),y=sz(cz(ZL(f.index),o.length),0),b=[],x=1;x<f.length;x++)lz(b,void 0===(d=f[x])?d:String(d));var w=f.groups;if(c){var A=uz([m],b,y,o);void 0!==w&&lz(A,w);var _=tz(HL(i,void 0,A))}else _=iz(m,o,y,b,w,i);y>=g&&(p+=fz(o,g,y)+_,g=y+m.length)}return p+fz(o,g)}]}),!gz||!dz||pz);var vz=ei,mz=u,yz=w,bz=j,xz=U,wz=I,Az=oR,_z=di,kz=xt,Ez=pR,Sz=GL,Mz=te("replace"),Tz=TypeError,Pz=yz("".indexOf);yz("".replace);var Oz=yz("".slice),Iz=Math.max,Rz=function(t,e,r){return r>t.length?-1:""===e?r:Pz(t,e,r)};vz({target:"String",proto:!0},{replaceAll:function(t,e){var r,n,i,a,o,s,c,u,l=bz(this),h=0,f=0,d="";if(!wz(t)){if(Az(t)&&(r=_z(bz(Ez(t))),!~Pz(r,"g")))throw Tz("`.replaceAll` does not allow non-global regexes");if(n=kz(t,Mz))return mz(n,t,l,e)}for(i=_z(l),a=_z(t),(o=xz(e))||(e=_z(e)),s=a.length,c=Iz(1,s),h=Rz(i,a,0);-1!==h;)u=o?_z(e(a,h,i)):Sz(a,i,h,[],void 0,e),d+=Oz(i,f,h)+u,f=h+s,h=Rz(i,a,h+c);return f<i.length&&(d+=Oz(i,f)),d}});var Cz=u,jz=Re,Dz=I,Lz=j,zz=jS,Fz=di,Bz=xt,Nz=zD;TD("search",(function(t,e,r){return[function(e){var r=Lz(this),n=Dz(e)?void 0:Bz(e,t);return n?Cz(n,e,r):new RegExp(e)[t](Fz(r))},function(t){var n=jz(this),i=Fz(t),a=r(e,n,i);if(a.done)return a.value;var o=n.lastIndex;zz(o,0)||(n.lastIndex=0);var s=Nz(n,i);return zz(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var Uz=js,Yz=u,Gz=w,Hz=TD,Wz=Re,qz=I,Xz=oR,Vz=j,Qz=pb,Kz=OD,Jz=ln,Zz=di,$z=xt,tF=Ki,eF=zD,rF=BC,nF=i,iF=xR.UNSUPPORTED_Y,aF=4294967295,oF=Math.min,sF=[].push,cF=Gz(/./.exec),uF=Gz(sF),lF=Gz("".slice),hF=!nF((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));Hz("split",(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=Zz(Vz(this)),i=void 0===r?aF:r>>>0;if(0===i)return[];if(void 0===t)return[n];if(!Xz(t))return Yz(e,n,t,i);for(var a,o,s,c=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,h=new RegExp(t.source,u+"g");(a=Yz(rF,h,n))&&!((o=h.lastIndex)>l&&(uF(c,lF(n,l,a.index)),a.length>1&&a.index<n.length&&Uz(sF,c,tF(a,1)),s=a[0].length,l=o,c.length>=i));)h.lastIndex===a.index&&h.lastIndex++;return l===n.length?!s&&cF(h,"")||uF(c,""):uF(c,lF(n,l)),c.length>i?tF(c,0,i):c}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:Yz(e,this,t,r)}:e,[function(e,r){var i=Vz(this),a=qz(e)?void 0:$z(e,t);return a?Yz(a,e,i,r):Yz(n,Zz(i),e,r)},function(t,i){var a=Wz(this),o=Zz(t),s=r(n,a,o,i,n!==e);if(s.done)return s.value;var c=Qz(a,RegExp),u=a.unicode,l=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(iF?"g":"y"),h=new c(iF?"^(?:"+a.source+")":a,l),f=void 0===i?aF:i>>>0;if(0===f)return[];if(0===o.length)return null===eF(h,o)?[o]:[];for(var d=0,p=0,g=[];p<o.length;){h.lastIndex=iF?0:p;var v,m=eF(h,iF?lF(o,p):o);if(null===m||(v=oF(Jz(h.lastIndex+(iF?p:0)),o.length))===d)p=Kz(o,p,u);else{if(uF(g,lF(o,d,p)),g.length===f)return g;for(var y=1;y<=m.length-1;y++)if(uF(g,m[y]),g.length===f)return g;p=d=v}}return uF(g,lF(o,d)),g}]}),!hF,iF);var fF=ei,dF=ka,pF=n.f,gF=ln,vF=di,mF=zj,yF=j,bF=Bj,xF=dF("".startsWith),wF=dF("".slice),AF=Math.min,_F=bF("startsWith"),kF=!_F&&!!function(){var t=pF(String.prototype,"startsWith");return t&&!t.writable}();fF({target:"String",proto:!0,forced:!kF&&!_F},{startsWith:function(t){var e=vF(yF(this));mF(t);var r=gF(AF(arguments.length>1?arguments[1]:void 0,e.length)),n=vF(t);return xF?xF(e,n,r):wF(e,r,r+n.length)===n}});var EF=ei,SF=j,MF=rn,TF=di,PF=w("".slice),OF=Math.max,IF=Math.min;EF({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(t,e){var r,n,i=TF(SF(this)),a=i.length,o=MF(t);return o===1/0&&(o=0),o<0&&(o=OF(a+o,0)),(r=void 0===e?a:MF(e))<=0||r===1/0||o>=(n=IF(o+r,a))?"":PF(i,o,n)}});var RF=$e.PROPER,CF=i,jF=I_,DF=function(t){return CF((function(){return!!jF[t]()||"​…᠎"!=="​…᠎"[t]()||RF&&jF[t].name!==t}))},LF=B_.trim;ei({target:"String",proto:!0,forced:DF("trim")},{trim:function(){return LF(this)}});var zF=B_.end,FF=DF("trimEnd")?function(){return zF(this)}:"".trimEnd;ei({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==FF},{trimRight:FF});ei({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==FF},{trimEnd:FF});var BF=B_.start,NF=DF("trimStart")?function(){return BF(this)}:"".trimStart;ei({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==NF},{trimLeft:NF});ei({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==NF},{trimStart:NF});var UF=j,YF=di,GF=/"/g,HF=w("".replace),WF=function(t,e,r,n){var i=YF(UF(t)),a="<"+e;return""!==r&&(a+=" "+r+'="'+HF(YF(n),GF,"&quot;")+'"'),a+">"+i+"</"+e+">"},qF=i,XF=function(t){return qF((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))},VF=WF;ei({target:"String",proto:!0,forced:XF("anchor")},{anchor:function(t){return VF(this,"a","name",t)}});var QF=WF;ei({target:"String",proto:!0,forced:XF("big")},{big:function(){return QF(this,"big","","")}});var KF=WF;ei({target:"String",proto:!0,forced:XF("blink")},{blink:function(){return KF(this,"blink","","")}});var JF=WF;ei({target:"String",proto:!0,forced:XF("bold")},{bold:function(){return JF(this,"b","","")}});var ZF=WF;ei({target:"String",proto:!0,forced:XF("fixed")},{fixed:function(){return ZF(this,"tt","","")}});var $F=WF;ei({target:"String",proto:!0,forced:XF("fontcolor")},{fontcolor:function(t){return $F(this,"font","color",t)}});var tB=WF;ei({target:"String",proto:!0,forced:XF("fontsize")},{fontsize:function(t){return tB(this,"font","size",t)}});var eB=WF;ei({target:"String",proto:!0,forced:XF("italics")},{italics:function(){return eB(this,"i","","")}});var rB=WF;ei({target:"String",proto:!0,forced:XF("link")},{link:function(t){return rB(this,"a","href",t)}});var nB=WF;ei({target:"String",proto:!0,forced:XF("small")},{small:function(){return nB(this,"small","","")}});var iB=WF;ei({target:"String",proto:!0,forced:XF("strike")},{strike:function(){return iB(this,"strike","","")}});var aB=WF;ei({target:"String",proto:!0,forced:XF("sub")},{sub:function(){return aB(this,"sub","","")}});var oB=WF;ei({target:"String",proto:!0,forced:XF("sup")},{sup:function(){return oB(this,"sup","","")}});var sB={exports:{}},cB=r,uB=i,lB=od,hB=ab.NATIVE_ARRAY_BUFFER_VIEWS,fB=cB.ArrayBuffer,dB=cB.Int8Array,pB=!hB||!uB((function(){dB(1)}))||!uB((function(){new dB(-1)}))||!lB((function(t){new dB,new dB(null),new dB(1.5),new dB(t)}),!0)||uB((function(){return 1!==new dB(new fB(2),1,void 0).length})),gB=rn,vB=RangeError,mB=function(t){var e=gB(t);if(e<0)throw vB("The argument can't be less than 0");return e},yB=RangeError,bB=function(t,e){var r=mB(t);if(r%e)throw yB("Wrong offset");return r},xB=li,wB=function(t){var e=xB(t);return"BigInt64Array"==e||"BigUint64Array"==e},AB=ce,_B=TypeError,kB=function(t){var e=AB(t,"number");if("number"==typeof e)throw _B("Can't convert number to bigint");return BigInt(e)},EB=Ta,SB=u,MB=ub,TB=Lt,PB=fn,OB=bl,IB=fl,RB=ol,CB=wB,jB=ab.aTypedArrayConstructor,DB=kB,LB=function(t){var e,r,n,i,a,o,s,c,u=MB(this),l=TB(t),h=arguments.length,f=h>1?arguments[1]:void 0,d=void 0!==f,p=IB(l);if(p&&!RB(p))for(c=(s=OB(l,p)).next,l=[];!(o=SB(c,s)).done;)l.push(o.value);for(d&&h>2&&(f=EB(f,arguments[2])),r=PB(l),n=new(jB(u))(r),i=CB(n),e=0;r>e;e++)a=d?f(l[e],e):l[e],n[e]=i?DB(a):+a;return n},zB=ei,FB=r,BB=u,NB=a,UB=pB,YB=ab,GB=my,HB=rm,WB=v,qB=qe,XB=gk,VB=ln,QB=om,KB=bB,JB=he,ZB=Bt,$B=li,tN=H,eN=ht,rN=Bi,nN=V,iN=Wc,aN=Jr.f,oN=LB,sN=ao.forEach,cN=$g,uN=ia,lN=Me,hN=n,fN=Jc,dN=Tr.get,pN=Tr.set,gN=Tr.enforce,vN=lN.f,mN=hN.f,yN=Math.round,bN=FB.RangeError,xN=GB.ArrayBuffer,wN=xN.prototype,AN=GB.DataView,_N=YB.NATIVE_ARRAY_BUFFER_VIEWS,kN=YB.TYPED_ARRAY_TAG,EN=YB.TypedArray,SN=YB.TypedArrayPrototype,MN=YB.aTypedArrayConstructor,TN=YB.isTypedArray,PN="BYTES_PER_ELEMENT",ON="Wrong length",IN=function(t,e){MN(t);for(var r=0,n=e.length,i=new t(n);n>r;)i[r]=e[r++];return i},RN=function(t,e){uN(t,e,{configurable:!0,get:function(){return dN(this)[e]}})},CN=function(t){var e;return nN(wN,t)||"ArrayBuffer"==(e=$B(t))||"SharedArrayBuffer"==e},jN=function(t,e){return TN(t)&&!eN(e)&&e in t&&XB(+e)&&e>=0},DN=function(t,e){return e=JB(e),jN(t,e)?WB(2,t[e]):mN(t,e)},LN=function(t,e,r){return e=JB(e),!(jN(t,e)&&tN(r)&&ZB(r,"value"))||ZB(r,"get")||ZB(r,"set")||r.configurable||ZB(r,"writable")&&!r.writable||ZB(r,"enumerable")&&!r.enumerable?vN(t,e,r):(t[e]=r.value,t)};NB?(_N||(hN.f=DN,lN.f=LN,RN(SN,"buffer"),RN(SN,"byteOffset"),RN(SN,"byteLength"),RN(SN,"length")),zB({target:"Object",stat:!0,forced:!_N},{getOwnPropertyDescriptor:DN,defineProperty:LN}),sB.exports=function(t,e,r){var n=t.match(/\d+/)[0]/8,i=t+(r?"Clamped":"")+"Array",a="get"+t,o="set"+t,s=FB[i],c=s,u=c&&c.prototype,l={},h=function(t,e){vN(t,e,{get:function(){return function(t,e){var r=dN(t);return r.view[a](e*n+r.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,i){var a=dN(t);r&&(i=(i=yN(i))<0?0:i>255?255:255&i),a.view[o](e*n+a.byteOffset,i,!0)}(this,e,t)},enumerable:!0})};_N?UB&&(c=e((function(t,e,r,i){return HB(t,u),fN(tN(e)?CN(e)?void 0!==i?new s(e,KB(r,n),i):void 0!==r?new s(e,KB(r,n)):new s(e):TN(e)?IN(c,e):BB(oN,c,e):new s(QB(e)),t,c)})),iN&&iN(c,EN),sN(aN(s),(function(t){t in c||qB(c,t,s[t])})),c.prototype=u):(c=e((function(t,e,r,i){HB(t,u);var a,o,s,l=0,f=0;if(tN(e)){if(!CN(e))return TN(e)?IN(c,e):BB(oN,c,e);a=e,f=KB(r,n);var d=e.byteLength;if(void 0===i){if(d%n)throw bN(ON);if((o=d-f)<0)throw bN(ON)}else if((o=VB(i)*n)+f>d)throw bN(ON);s=o/n}else s=QB(e),a=new xN(o=s*n);for(pN(t,{buffer:a,byteOffset:f,byteLength:o,length:s,view:new AN(a)});l<s;)h(t,l++)})),iN&&iN(c,EN),u=c.prototype=rN(SN)),u.constructor!==c&&qB(u,"constructor",c),gN(u).TypedArrayConstructor=c,kN&&qB(u,kN,i);var f=c!=s;l[i]=c,zB({global:!0,constructor:!0,forced:f,sham:!_N},l),PN in c||qB(c,PN,n),PN in u||qB(u,PN,n),cN(i)}):sB.exports=function(){},(0,sB.exports)("Float32",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,sB.exports)("Float64",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,sB.exports)("Int8",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,sB.exports)("Int16",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,sB.exports)("Int32",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,sB.exports)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,sB.exports)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}),!0),(0,sB.exports)("Uint16",(function(t){return function(e,r,n){return t(this,e,r,n)}})),(0,sB.exports)("Uint32",(function(t){return function(e,r,n){return t(this,e,r,n)}}));var zN=fn,FN=rn,BN=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("at",(function(t){var e=BN(this),r=zN(e),n=FN(t),i=n>=0?n:r+n;return i<0||i>=r?void 0:e[i]}));var NN=ab,UN=w(qh),YN=NN.aTypedArray;(0,NN.exportTypedArrayMethod)("copyWithin",(function(t,e){return UN(YN(this),t,e,arguments.length>2?arguments[2]:void 0)}));var GN=ao.every,HN=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("every",(function(t){return GN(HN(this),t,arguments.length>1?arguments[1]:void 0)}));var WN=tf,qN=kB,XN=li,VN=u,QN=i,KN=ab.aTypedArray,JN=ab.exportTypedArrayMethod,ZN=w("".slice),$N=QN((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t}));JN("fill",(function(t){var e=arguments.length;KN(this);var r="Big"===ZN(XN(this),0,3)?qN(t):+t;return VN(WN,this,r,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),$N);var tU=pb,eU=ab.aTypedArrayConstructor,rU=ab.getTypedArrayConstructor,nU=function(t){return eU(tU(t,rU(t)))},iU=xv,aU=nU,oU=ao.filter,sU=function(t,e){return iU(aU(t),e)},cU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("filter",(function(t){var e=oU(cU(this),t,arguments.length>1?arguments[1]:void 0);return sU(this,e)}));var uU=ao.find,lU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("find",(function(t){return uU(lU(this),t,arguments.length>1?arguments[1]:void 0)}));var hU=ao.findIndex,fU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("findIndex",(function(t){return hU(fU(this),t,arguments.length>1?arguments[1]:void 0)}));var dU=bf.findLast,pU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("findLast",(function(t){return dU(pU(this),t,arguments.length>1?arguments[1]:void 0)}));var gU=bf.findLastIndex,vU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("findLastIndex",(function(t){return gU(vU(this),t,arguments.length>1?arguments[1]:void 0)}));var mU=ao.forEach,yU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("forEach",(function(t){mU(yU(this),t,arguments.length>1?arguments[1]:void 0)})),(0,ab.exportTypedArrayStaticMethod)("from",LB,pB);var bU=mn.includes,xU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("includes",(function(t){return bU(xU(this),t,arguments.length>1?arguments[1]:void 0)}));var wU=mn.indexOf,AU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("indexOf",(function(t){return wU(AU(this),t,arguments.length>1?arguments[1]:void 0)}));var _U=r,kU=i,EU=w,SU=ab,MU=fp,TU=te("iterator"),PU=_U.Uint8Array,OU=EU(MU.values),IU=EU(MU.keys),RU=EU(MU.entries),CU=SU.aTypedArray,jU=SU.exportTypedArrayMethod,DU=PU&&PU.prototype,LU=!kU((function(){DU[TU].call([1])})),zU=!!DU&&DU.values&&DU[TU]===DU.values&&"values"===DU.values.name,FU=function(){return OU(CU(this))};jU("entries",(function(){return RU(CU(this))}),LU),jU("keys",(function(){return IU(CU(this))}),LU),jU("values",FU,LU||!zU,{name:"values"}),jU(TU,FU,LU||!zU,{name:"values"});var BU=ab.aTypedArray,NU=ab.exportTypedArrayMethod,UU=w([].join);NU("join",(function(t){return UU(BU(this),t)}));var YU=js,GU=Tp,HU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return YU(GU,HU(this),e>1?[t,arguments[1]]:[t])}));var WU=ao.map,qU=nU,XU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("map",(function(t){return WU(XU(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(qU(t))(e)}))}));var VU=ab.aTypedArrayConstructor;(0,ab.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,r=new(VU(this))(e);e>t;)r[t]=arguments[t++];return r}),pB);var QU=Vp.left,KU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return QU(KU(this),t,e,e>1?arguments[1]:void 0)}));var JU=Vp.right,ZU=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return JU(ZU(this),t,e,e>1?arguments[1]:void 0)}));var $U=ab.aTypedArray,tY=ab.exportTypedArrayMethod,eY=Math.floor;tY("reverse",(function(){for(var t,e=this,r=$U(e).length,n=eY(r/2),i=0;i<n;)t=e[i],e[i++]=e[--r],e[r]=t;return e}));var rY=r,nY=u,iY=ab,aY=fn,oY=bB,sY=Lt,cY=i,uY=rY.RangeError,lY=rY.Int8Array,hY=lY&&lY.prototype,fY=hY&&hY.set,dY=iY.aTypedArray,pY=iY.exportTypedArrayMethod,gY=!cY((function(){var t=new Uint8ClampedArray(2);return nY(fY,t,{length:1,0:3},1),3!==t[1]})),vY=gY&&iY.NATIVE_ARRAY_BUFFER_VIEWS&&cY((function(){var t=new lY(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));pY("set",(function(t){dY(this);var e=oY(arguments.length>1?arguments[1]:void 0,1),r=sY(t);if(gY)return nY(fY,this,r,e);var n=this.length,i=aY(r),a=0;if(i+e>n)throw uY("Wrong length");for(;a<i;)this[e+a]=r[a++]}),!gY||vY);var mY=nU,yY=Ds,bY=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("slice",(function(t,e){for(var r=yY(bY(this),t,e),n=mY(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),i((function(){new Int8Array(1).slice()})));var xY=ao.some,wY=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("some",(function(t){return xY(wY(this),t,arguments.length>1?arguments[1]:void 0)}));var AY=ka,_Y=i,kY=mt,EY=Ag,SY=kg,MY=Eg,TY=rt,PY=Mg,OY=ab.aTypedArray,IY=ab.exportTypedArrayMethod,RY=r.Uint16Array,CY=RY&&AY(RY.prototype.sort),jY=!(!CY||_Y((function(){CY(new RY(2),null)}))&&_Y((function(){CY(new RY(2),{})}))),DY=!!CY&&!_Y((function(){if(TY)return TY<74;if(SY)return SY<67;if(MY)return!0;if(PY)return PY<602;var t,e,r=new RY(516),n=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,n[t]=t-2*e+3;for(CY(r,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==n[t])return!0}));IY("sort",(function(t){return void 0!==t&&kY(t),DY?CY(this,t):EY(OY(this),function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!=r?-1:e!=e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}}(t))}),!DY||jY);var LY=ln,zY=sn,FY=nU,BY=ab.aTypedArray;(0,ab.exportTypedArrayMethod)("subarray",(function(t,e){var r=BY(this),n=r.length,i=zY(t,n);return new(FY(r))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,LY((void 0===e?n:zY(e,n))-i))}));var NY=js,UY=ab,YY=i,GY=Ds,HY=r.Int8Array,WY=UY.aTypedArray,qY=UY.exportTypedArrayMethod,XY=[].toLocaleString,VY=!!HY&&YY((function(){XY.call(new HY(1))}));qY("toLocaleString",(function(){return NY(XY,VY?GY(WY(this)):WY(this),GY(arguments))}),YY((function(){return[1,2].toLocaleString()!=new HY([1,2]).toLocaleString()}))||!YY((function(){HY.prototype.toLocaleString.call([1,2])})));var QY=pv,KY=ab.aTypedArray,JY=ab.getTypedArrayConstructor;(0,ab.exportTypedArrayMethod)("toReversed",(function(){return QY(KY(this),JY(this))}));var ZY=mt,$Y=xv,tG=ab.aTypedArray,eG=ab.getTypedArrayConstructor,rG=ab.exportTypedArrayMethod,nG=w(ab.TypedArrayPrototype.sort);rG("toSorted",(function(t){void 0!==t&&ZY(t);var e=tG(this),r=$Y(eG(e),e);return nG(r,t)}));var iG=ab.exportTypedArrayMethod,aG=i,oG=w,sG=r.Uint8Array,cG=sG&&sG.prototype||{},uG=[].toString,lG=oG([].join);aG((function(){uG.call({})}))&&(uG=function(){return lG(this)});var hG=cG.toString!=uG;iG("toString",uG,hG);var fG=Xv,dG=wB,pG=rn,gG=kB,vG=ab.aTypedArray,mG=ab.getTypedArrayConstructor,yG=ab.exportTypedArrayMethod,bG=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();yG("with",{with:function(t,e){var r=vG(this),n=pG(t),i=dG(r)?gG(e):+e;return fG(r,mG(r),n,i)}}.with,!bG);var xG=ei,wG=w,AG=di,_G=String.fromCharCode,kG=wG("".charAt),EG=wG(/./.exec),SG=wG("".slice),MG=/^[\da-f]{2}$/i,TG=/^[\da-f]{4}$/i;xG({global:!0},{unescape:function(t){for(var e,r,n=AG(t),i="",a=n.length,o=0;o<a;){if("%"===(e=kG(n,o++)))if("u"===kG(n,o)){if(r=SG(n,o+1,o+5),EG(TG,r)){i+=_G(parseInt(r,16)),o+=5;continue}}else if(r=SG(n,o,o+2),EG(MG,r)){i+=_G(parseInt(r,16)),o+=2;continue}i+=e}return i}});var PG=w,OG=$v,IG=ww.exports.getWeakData,RG=rm,CG=Re,jG=I,DG=H,LG=zl,zG=Bt,FG=Tr.set,BG=Tr.getterFor,NG=ao.find,UG=ao.findIndex,YG=PG([].splice),GG=0,HG=function(t){return t.frozen||(t.frozen=new WG)},WG=function(){this.entries=[]},qG=function(t,e){return NG(t.entries,(function(t){return t[0]===e}))};WG.prototype={get:function(t){var e=qG(this,t);if(e)return e[1]},has:function(t){return!!qG(this,t)},set:function(t,e){var r=qG(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=UG(this.entries,(function(e){return e[0]===t}));return~e&&YG(this.entries,e,1),!!~e}};var XG,VG={getConstructor:function(t,e,r,n){var i=t((function(t,i){RG(t,a),FG(t,{type:e,id:GG++,frozen:void 0}),jG(i)||LG(i,t[n],{that:t,AS_ENTRIES:r})})),a=i.prototype,o=BG(e),s=function(t,e,r){var n=o(t),i=IG(CG(e),!0);return!0===i?HG(n).set(e,r):i[n.id]=r,t};return OG(a,{delete:function(t){var e=o(this);if(!DG(t))return!1;var r=IG(t);return!0===r?HG(e).delete(t):r&&zG(r,e.id)&&delete r[e.id]},has:function(t){var e=o(this);if(!DG(t))return!1;var r=IG(t);return!0===r?HG(e).has(t):r&&zG(r,e.id)}}),OG(a,r?{get:function(t){var e=o(this);if(DG(t)){var r=IG(t);return!0===r?HG(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),i}},QG=Pw,KG=r,JG=w,ZG=$v,$G=ww.exports,tH=oA,eH=VG,rH=H,nH=Tr.enforce,iH=i,aH=ur,oH=Object,sH=Array.isArray,cH=oH.isExtensible,uH=oH.isFrozen,lH=oH.isSealed,hH=oH.freeze,fH=oH.seal,dH={},pH={},gH=!KG.ActiveXObject&&"ActiveXObject"in KG,vH=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},mH=tH("WeakMap",vH,eH),yH=mH.prototype,bH=JG(yH.set);if(aH)if(gH){XG=eH.getConstructor(vH,"WeakMap",!0),$G.enable();var xH=JG(yH.delete),wH=JG(yH.has),AH=JG(yH.get);ZG(yH,{delete:function(t){if(rH(t)&&!cH(t)){var e=nH(this);return e.frozen||(e.frozen=new XG),xH(this,t)||e.frozen.delete(t)}return xH(this,t)},has:function(t){if(rH(t)&&!cH(t)){var e=nH(this);return e.frozen||(e.frozen=new XG),wH(this,t)||e.frozen.has(t)}return wH(this,t)},get:function(t){if(rH(t)&&!cH(t)){var e=nH(this);return e.frozen||(e.frozen=new XG),wH(this,t)?AH(this,t):e.frozen.get(t)}return AH(this,t)},set:function(t,e){if(rH(t)&&!cH(t)){var r=nH(this);r.frozen||(r.frozen=new XG),wH(this,t)?bH(this,t,e):r.frozen.set(t,e)}else bH(this,t,e);return this}})}else QG&&iH((function(){var t=hH([]);return bH(new mH,t,1),!uH(t)}))&&ZG(yH,{set:function(t,e){var r;return sH(t)&&(uH(t)?r=dH:lH(t)&&(r=pH)),bH(this,t,e),r==dH&&hH(t),r==pH&&fH(t),this}});oA("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),VG);for(var _H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",kH={},EH=0;EH<66;EH++)kH[_H.charAt(EH)]=EH;var SH={itoc:_H,ctoi:kH},MH=ei,TH=r,PH=X,OH=w,IH=u,RH=i,CH=di,jH=Bt,DH=BM,LH=SH.ctoi,zH=/[^\d+/a-z]/i,FH=/[\t\n\f\r ]+/g,BH=/[=]{1,2}$/,NH=PH("atob"),UH=String.fromCharCode,YH=OH("".charAt),GH=OH("".replace),HH=OH(zH.exec),WH=RH((function(){return""!==NH(" ")})),qH=!RH((function(){NH("a")})),XH=!WH&&!qH&&!RH((function(){NH()})),VH=!WH&&!qH&&1!==NH.length;MH({global:!0,bind:!0,enumerable:!0,forced:WH||qH||XH||VH},{atob:function(t){if(DH(arguments.length,1),XH||VH)return IH(NH,TH,t);var e,r,n=GH(CH(t),FH,""),i="",a=0,o=0;if(n.length%4==0&&(n=GH(n,BH,"")),n.length%4==1||HH(zH,n))throw new(PH("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;e=YH(n,a++);)jH(LH,e)&&(r=o%4?64*r+LH[e]:LH[e],o++%4&&(i+=UH(255&r>>(-2*o&6))));return i}});var QH=ei,KH=r,JH=X,ZH=w,$H=u,tW=i,eW=di,rW=BM,nW=SH.itoc,iW=JH("btoa"),aW=ZH("".charAt),oW=ZH("".charCodeAt),sW=!!iW&&!tW((function(){iW()})),cW=!!iW&&tW((function(){return"bnVsbA=="!==iW(null)})),uW=!!iW&&1!==iW.length;QH({global:!0,bind:!0,enumerable:!0,forced:sW||cW||uW},{btoa:function(t){if(rW(arguments.length,1),sW||cW||uW)return $H(iW,KH,eW(t));for(var e,r,n=eW(t),i="",a=0,o=nW;aW(n,a)||(o="=",a%1);){if((r=oW(n,a+=3/4))>255)throw new(JH("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");i+=aW(o,63&(e=e<<8|r)>>8-a%1*8)}return i}});var lW={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},hW=ge("span").classList,fW=hW&&hW.constructor&&hW.constructor.prototype,dW=fW===Object.prototype?void 0:fW,pW=r,gW=lW,vW=dW,mW=Uf,yW=qe,bW=function(t){if(t&&t.forEach!==mW)try{yW(t,"forEach",mW)}catch(e){t.forEach=mW}};for(var xW in gW)gW[xW]&&bW(pW[xW]&&pW[xW].prototype);bW(vW);var wW=r,AW=lW,_W=dW,kW=fp,EW=qe,SW=te,MW=SW("iterator"),TW=SW("toStringTag"),PW=kW.values,OW=function(t,e){if(t){if(t[MW]!==PW)try{EW(t,MW,PW)}catch(e){t[MW]=PW}if(t[TW]||EW(t,TW,e),AW[e])for(var r in kW)if(t[r]!==kW[r])try{EW(t,r,kW[r])}catch(e){t[r]=kW[r]}}};for(var IW in AW)OW(wW[IW]&&wW[IW].prototype,IW);OW(_W,"DOMTokenList");var RW=Qp,CW={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}},jW=ei,DW=function(t){try{if(RW)return Function('return require("'+t+'")')()}catch(t){}},LW=X,zW=i,FW=Bi,BW=v,NW=Me.f,UW=Kr,YW=ia,GW=Bt,HW=rm,WW=Re,qW=Gu,XW=$c,VW=CW,QW=cu,KW=Tr,JW=a,ZW="DOMException",$W="DATA_CLONE_ERR",tq=LW("Error"),eq=LW(ZW)||function(){try{(new(LW("MessageChannel")||DW("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name==$W&&25==t.code)return t.constructor}}(),rq=eq&&eq.prototype,nq=tq.prototype,iq=KW.set,aq=KW.getterFor(ZW),oq="stack"in tq(ZW),sq=function(t){return GW(VW,t)&&VW[t].m?VW[t].c:0},cq=function(){HW(this,uq);var t=arguments.length,e=XW(t<1?void 0:arguments[0]),r=XW(t<2?void 0:arguments[1],"Error"),n=sq(r);if(iq(this,{type:ZW,name:r,message:e,code:n}),JW||(this.name=r,this.message=e,this.code=n),oq){var i=tq(e);i.name=ZW,NW(this,"stack",BW(1,QW(i.stack,1)))}},uq=cq.prototype=FW(nq),lq=function(t){return{enumerable:!0,configurable:!0,get:t}},hq=function(t){return lq((function(){return aq(this)[t]}))};JW&&(YW(uq,"code",hq("code")),YW(uq,"message",hq("message")),YW(uq,"name",hq("name"))),NW(uq,"constructor",BW(1,cq));var fq=zW((function(){return!(new eq instanceof tq)})),dq=fq||zW((function(){return nq.toString!==qW||"2: 1"!==String(new eq(1,2))})),pq=fq||zW((function(){return 25!==new eq(1,"DataCloneError").code}));fq||25!==eq[$W]||rq[$W];jW({global:!0,constructor:!0,forced:fq},{DOMException:fq?cq:eq});var gq=LW(ZW),vq=gq.prototype;for(var mq in dq&&eq===gq&&UW(vq,"toString",qW),pq&&JW&&eq===gq&&YW(vq,"code",lq((function(){return sq(WW(this).name)}))),VW)if(GW(VW,mq)){var yq=VW[mq],bq=yq.s,xq=BW(6,yq.c);GW(gq,bq)||NW(gq,bq,xq),GW(vq,bq)||NW(vq,bq,xq)}var wq=ei,Aq=r,_q=X,kq=v,Eq=Me.f,Sq=Bt,Mq=rm,Tq=Jc,Pq=$c,Oq=CW,Iq=cu,Rq=a,Cq="DOMException",jq=_q("Error"),Dq=_q(Cq),Lq=function(){Mq(this,zq);var t=arguments.length,e=Pq(t<1?void 0:arguments[0]),r=Pq(t<2?void 0:arguments[1],"Error"),n=new Dq(e,r),i=jq(e);return i.name=Cq,Eq(n,"stack",kq(1,Iq(i.stack,1))),Tq(n,this,Lq),n},zq=Lq.prototype=Dq.prototype,Fq="stack"in jq(Cq),Bq="stack"in new Dq(1,2),Nq=Dq&&Rq&&Object.getOwnPropertyDescriptor(Aq,Cq),Uq=!(!Nq||Nq.writable&&Nq.configurable),Yq=Fq&&!Uq&&!Bq;wq({global:!0,constructor:!0,forced:Yq},{DOMException:Yq?Lq:Dq});var Gq=_q(Cq),Hq=Gq.prototype;if(Hq.constructor!==Gq)for(var Wq in Eq(Hq,"constructor",kq(1,Gq)),Oq)if(Sq(Oq,Wq)){var qq=Oq[Wq],Xq=qq.s;Sq(Gq,Xq)||Eq(Gq,Xq,kq(6,qq.c))}var Vq="DOMException";wa(X(Vq),Vq);var Qq=dT.clear;ei({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==Qq},{clearImmediate:Qq});var Kq="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Jq=r,Zq=js,$q=U,tX=Kq,eX=Q,rX=Ds,nX=BM,iX=Jq.Function,aX=/MSIE .\./.test(eX)||tX&&function(){var t=Jq.Bun.version.split(".");return t.length<3||0==t[0]&&(t[1]<3||3==t[1]&&0==t[2])}(),oX=function(t,e){var r=e?2:1;return aX?function(n,i){var a=nX(arguments.length,1)>r,o=$q(n)?n:iX(n),s=a?rX(arguments,r):[],c=a?function(){Zq(o,this,s)}:o;return e?t(c,i):t(c)}:t},sX=ei,cX=r,uX=dT.set,lX=oX,hX=cX.setImmediate?lX(uX,!1):uX;sX({global:!0,bind:!0,enumerable:!0,forced:cX.setImmediate!==hX},{setImmediate:hX});var fX=ei,dX=NT,pX=mt,gX=BM,vX=Qp,mX=r.process;fX({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(t){gX(arguments.length,1),pX(t);var e=vX&&mX.domain;dX(e?e.bind(t):t)}});var yX=ei,bX=r,xX=ia,wX=a,AX=TypeError,_X=Object.defineProperty,kX=bX.self!==bX;try{if(wX){var EX=Object.getOwnPropertyDescriptor(bX,"self");!kX&&EX&&EX.get&&EX.enumerable||xX(bX,"self",{get:function(){return bX},set:function(t){if(this!==bX)throw AX("Illegal invocation");_X(bX,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else yX({global:!0,simple:!0,forced:kX},{self:bX})}catch(t){}var SX,MX=w,TX=Map.prototype,PX={Map:Map,set:MX(TX.set),get:MX(TX.get),has:MX(TX.has),remove:MX(TX.delete),proto:TX},OX=w,IX=Set.prototype,RX={Set:Set,add:OX(IX.add),has:OX(IX.has),remove:OX(IX.delete),proto:IX,$has:IX.has,$keys:IX.keys},CX=i,jX=rt,DX=HT,LX=GT,zX=Qp,FX=r.structuredClone,BX=!!FX&&!CX((function(){if(LX&&jX>92||zX&&jX>94||DX&&jX>97)return!1;var t=new ArrayBuffer(8),e=FX(t,{transfer:[t]});return 0!=t.byteLength||8!=e.byteLength})),NX=ei,UX=r,YX=X,GX=w,HX=i,WX=Ht,qX=U,XX=Ha,VX=I,QX=H,KX=ht,JX=zl,ZX=Re,$X=li,tV=Bt,eV=Hi,rV=qe,nV=fn,iV=BM,aV=pR,oV=PX,sV=RX,cV=lu,uV=BX,lV=UX.Object,hV=UX.Array,fV=UX.Date,dV=UX.Error,pV=UX.EvalError,gV=UX.RangeError,vV=UX.ReferenceError,mV=UX.SyntaxError,yV=UX.TypeError,bV=UX.URIError,xV=UX.PerformanceMark,wV=UX.WebAssembly,AV=wV&&wV.CompileError||dV,_V=wV&&wV.LinkError||dV,kV=wV&&wV.RuntimeError||dV,EV=YX("DOMException"),SV=oV.Map,MV=oV.has,TV=oV.get,PV=oV.set,OV=sV.Set,IV=sV.add,RV=YX("Object","keys"),CV=GX([].push),jV=GX((!0).valueOf),DV=GX(1..valueOf),LV=GX("".valueOf),zV=GX(fV.prototype.getTime),FV=WX("structuredClone"),BV="DataCloneError",NV="Transferring",UV=function(t){return!HX((function(){var e=new UX.Set([7]),r=t(e),n=t(lV(7));return r==e||!r.has(7)||"object"!=typeof n||7!=n}))&&t},YV=function(t,e){return!HX((function(){var r=new e,n=t({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof e&&n.a.stack===r.stack)}))},GV=UX.structuredClone,HV=!YV(GV,dV)||!YV(GV,EV)||(SX=GV,!!HX((function(){var t=SX(new UX.AggregateError([1],FV,{cause:3}));return"AggregateError"!=t.name||1!=t.errors[0]||t.message!=FV||3!=t.cause}))),WV=!GV&&UV((function(t){return new xV(FV,{detail:t}).detail})),qV=UV(GV)||WV,XV=function(t){throw new EV("Uncloneable type: "+t,BV)},VV=function(t,e){throw new EV((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",BV)},QV=function(t,e){if(KX(t)&&XV("Symbol"),!QX(t))return t;if(e){if(MV(e,t))return TV(e,t)}else e=new SV;var r,n,i,a,o,s,c,u,l,h,f,d=$X(t),p=!1;switch(d){case"Array":i=hV(nV(t)),p=!0;break;case"Object":i={},p=!0;break;case"Map":i=new SV,p=!0;break;case"Set":i=new OV,p=!0;break;case"RegExp":i=new RegExp(t.source,aV(t));break;case"Error":switch(n=t.name){case"AggregateError":i=YX("AggregateError")([]);break;case"EvalError":i=pV();break;case"RangeError":i=gV();break;case"ReferenceError":i=vV();break;case"SyntaxError":i=mV();break;case"TypeError":i=yV();break;case"URIError":i=bV();break;case"CompileError":i=AV();break;case"LinkError":i=_V();break;case"RuntimeError":i=kV();break;default:i=dV()}p=!0;break;case"DOMException":i=new EV(t.message,t.name),p=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":r=UX[d],QX(r)||VV(d),i=new r(QV(t.buffer,e),t.byteOffset,"DataView"===d?t.byteLength:t.length);break;case"DOMQuad":try{i=new DOMQuad(QV(t.p1,e),QV(t.p2,e),QV(t.p3,e),QV(t.p4,e))}catch(e){qV?i=qV(t):VV(d)}break;case"FileList":if(a=function(){var t;try{t=new UX.DataTransfer}catch(e){try{t=new UX.ClipboardEvent("").clipboardData}catch(t){}}return t&&t.items&&t.files?t:null}()){for(o=0,s=nV(t);o<s;o++)a.items.add(QV(t[o],e));i=a.files}else qV?i=qV(t):VV(d);break;case"ImageData":try{i=new ImageData(QV(t.data,e),t.width,t.height,{colorSpace:t.colorSpace})}catch(e){qV?i=qV(t):VV(d)}break;default:if(qV)i=qV(t);else switch(d){case"BigInt":i=lV(t.valueOf());break;case"Boolean":i=lV(jV(t));break;case"Number":i=lV(DV(t));break;case"String":i=lV(LV(t));break;case"Date":i=new fV(zV(t));break;case"ArrayBuffer":(r=UX.DataView)||"function"==typeof t.slice||VV(d);try{if("function"!=typeof t.slice||t.resizable){s=t.byteLength,f="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0,i=new ArrayBuffer(s,f),l=new r(t),h=new r(i);for(o=0;o<s;o++)h.setUint8(o,l.getUint8(o))}else i=t.slice(0)}catch(t){throw new EV("ArrayBuffer is detached",BV)}break;case"SharedArrayBuffer":i=t;break;case"Blob":try{i=t.slice(0,t.size,t.type)}catch(t){VV(d)}break;case"DOMPoint":case"DOMPointReadOnly":r=UX[d];try{i=r.fromPoint?r.fromPoint(t):new r(t.x,t.y,t.z,t.w)}catch(t){VV(d)}break;case"DOMRect":case"DOMRectReadOnly":r=UX[d];try{i=r.fromRect?r.fromRect(t):new r(t.x,t.y,t.width,t.height)}catch(t){VV(d)}break;case"DOMMatrix":case"DOMMatrixReadOnly":r=UX[d];try{i=r.fromMatrix?r.fromMatrix(t):new r(t)}catch(t){VV(d)}break;case"AudioData":case"VideoFrame":qX(t.clone)||VV(d);try{i=t.clone()}catch(t){XV(d)}break;case"File":try{i=new File([t],t.name,t)}catch(t){VV(d)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":VV(d);default:XV(d)}}if(PV(e,t,i),p)switch(d){case"Array":case"Object":for(c=RV(t),o=0,s=nV(c);o<s;o++)u=c[o],eV(i,u,QV(t[u],e));break;case"Map":t.forEach((function(t,r){PV(i,QV(r,e),QV(t,e))}));break;case"Set":t.forEach((function(t){IV(i,QV(t,e))}));break;case"Error":rV(i,"message",QV(t.message,e)),tV(t,"cause")&&rV(i,"cause",QV(t.cause,e)),"AggregateError"==n&&(i.errors=QV(t.errors,e));case"DOMException":cV&&rV(i,"stack",QV(t.stack,e))}return i};NX({global:!0,enumerable:!0,sham:!uV,forced:HV},{structuredClone:function(t){var e,r=iV(arguments.length,1)>1&&!VX(arguments[1])?ZX(arguments[1]):void 0,n=r?r.transfer:void 0;return void 0!==n&&function(t,e){if(!QX(t))throw yV("Transfer option cannot be converted to a sequence");var r=[];JX(t,(function(t){CV(r,ZX(t))}));var n,i,a,o,s,c,u=0,l=nV(r);if(uV)for(o=GV(r,{transfer:r});u<l;)PV(e,r[u],o[u++]);else for(;u<l;){if(n=r[u++],MV(e,n))throw new EV("Duplicate transferable",BV);switch(i=$X(n)){case"ImageBitmap":a=UX.OffscreenCanvas,XX(a)||VV(i,NV);try{(c=new a(n.width,n.height)).getContext("bitmaprenderer").transferFromImageBitmap(n),s=c.transferToImageBitmap()}catch(t){}break;case"AudioData":case"VideoFrame":qX(n.clone)&&qX(n.close)||VV(i,NV);try{s=n.clone(),n.close()}catch(t){}break;case"ArrayBuffer":qX(n.transfer)||VV(i,NV),s=n.transfer();break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":VV(i,NV)}if(void 0===s)throw new EV("This object cannot be transferred: "+i,BV);PV(e,n,s)}}(n,e=new SV),QV(t,e)}});var KV=ei,JV=r,ZV=oX(JV.setInterval,!0);KV({global:!0,bind:!0,forced:JV.setInterval!==ZV},{setInterval:ZV});var $V=ei,tQ=r,eQ=oX(tQ.setTimeout,!0);$V({global:!0,bind:!0,forced:tQ.setTimeout!==eQ},{setTimeout:eQ});var rQ=i,nQ=a,iQ=te("iterator"),aQ=!rQ((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.size&&!nQ||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[iQ]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),oQ=w,sQ=2147483647,cQ=/[^\0-\u007E]/,uQ=/[.\u3002\uFF0E\uFF61]/g,lQ="Overflow: input needs wider integers to process",hQ=RangeError,fQ=oQ(uQ.exec),dQ=Math.floor,pQ=String.fromCharCode,gQ=oQ("".charCodeAt),vQ=oQ([].join),mQ=oQ([].push),yQ=oQ("".replace),bQ=oQ("".split),xQ=oQ("".toLowerCase),wQ=function(t){return t+22+75*(t<26)},AQ=function(t,e,r){var n=0;for(t=r?dQ(t/700):t>>1,t+=dQ(t/e);t>455;)t=dQ(t/35),n+=36;return dQ(n+36*t/(t+38))},_Q=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r<n;){var i=gQ(t,r++);if(i>=55296&&i<=56319&&r<n){var a=gQ(t,r++);56320==(64512&a)?mQ(e,((1023&i)<<10)+(1023&a)+65536):(mQ(e,i),r--)}else mQ(e,i)}return e}(t);var r,n,i=t.length,a=128,o=0,s=72;for(r=0;r<t.length;r++)(n=t[r])<128&&mQ(e,pQ(n));var c=e.length,u=c;for(c&&mQ(e,"-");u<i;){var l=sQ;for(r=0;r<t.length;r++)(n=t[r])>=a&&n<l&&(l=n);var h=u+1;if(l-a>dQ((sQ-o)/h))throw hQ(lQ);for(o+=(l-a)*h,a=l,r=0;r<t.length;r++){if((n=t[r])<a&&++o>sQ)throw hQ(lQ);if(n==a){for(var f=o,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(f<p)break;var g=f-p,v=36-p;mQ(e,pQ(wQ(p+g%v))),f=dQ(g/v),d+=36}mQ(e,pQ(wQ(f))),s=AQ(o,h,u==c),o=0,u++}}o++,a++}return vQ(e,"")},kQ=ei,EQ=r,SQ=u,MQ=w,TQ=a,PQ=aQ,OQ=Kr,IQ=ia,RQ=$v,CQ=wa,jQ=Cd,DQ=Tr,LQ=rm,zQ=U,FQ=Bt,BQ=Ta,NQ=li,UQ=Re,YQ=H,GQ=di,HQ=Bi,WQ=v,qQ=bl,XQ=fl,VQ=BM,QQ=Ag,KQ=te("iterator"),JQ="URLSearchParams",ZQ=JQ+"Iterator",$Q=DQ.set,tK=DQ.getterFor(JQ),eK=DQ.getterFor(ZQ),rK=Object.getOwnPropertyDescriptor,nK=function(t){if(!TQ)return EQ[t];var e=rK(EQ,t);return e&&e.value},iK=nK("fetch"),aK=nK("Request"),oK=nK("Headers"),sK=aK&&aK.prototype,cK=oK&&oK.prototype,uK=EQ.RegExp,lK=EQ.TypeError,hK=EQ.decodeURIComponent,fK=EQ.encodeURIComponent,dK=MQ("".charAt),pK=MQ([].join),gK=MQ([].push),vK=MQ("".replace),mK=MQ([].shift),yK=MQ([].splice),bK=MQ("".split),xK=MQ("".slice),wK=/\+/g,AK=Array(4),_K=function(t){return AK[t-1]||(AK[t-1]=uK("((?:%[\\da-f]{2}){"+t+"})","gi"))},kK=function(t){try{return hK(t)}catch(e){return t}},EK=function(t){var e=vK(t,wK," "),r=4;try{return hK(e)}catch(t){for(;r;)e=vK(e,_K(r--),kK);return e}},SK=/[!'()~]|%20/g,MK={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},TK=function(t){return MK[t]},PK=function(t){return vK(fK(t),SK,TK)},OK=jQ((function(t,e){$Q(this,{type:ZQ,iterator:qQ(tK(t).entries),kind:e})}),"Iterator",(function(){var t=eK(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r}),!0),IK=function(t){this.entries=[],this.url=null,void 0!==t&&(YQ(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===dK(t,0)?xK(t,1):t:GQ(t)))};IK.prototype={type:JQ,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,i,a,o,s,c=XQ(t);if(c)for(r=(e=qQ(t,c)).next;!(n=SQ(r,e)).done;){if(a=(i=qQ(UQ(n.value))).next,(o=SQ(a,i)).done||(s=SQ(a,i)).done||!SQ(a,i).done)throw lK("Expected sequence with length 2");gK(this.entries,{key:GQ(o.value),value:GQ(s.value)})}else for(var u in t)FQ(t,u)&&gK(this.entries,{key:u,value:GQ(t[u])})},parseQuery:function(t){if(t)for(var e,r,n=bK(t,"&"),i=0;i<n.length;)(e=n[i++]).length&&(r=bK(e,"="),gK(this.entries,{key:EK(mK(r)),value:EK(pK(r,"="))}))},serialize:function(){for(var t,e=this.entries,r=[],n=0;n<e.length;)t=e[n++],gK(r,PK(t.key)+"="+PK(t.value));return pK(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var RK=function(){LQ(this,CK);var t=$Q(this,new IK(arguments.length>0?arguments[0]:void 0));TQ||(this.length=t.entries.length)},CK=RK.prototype;if(RQ(CK,{append:function(t,e){VQ(arguments.length,2);var r=tK(this);gK(r.entries,{key:GQ(t),value:GQ(e)}),TQ||this.length++,r.updateURL()},delete:function(t){VQ(arguments.length,1);for(var e=tK(this),r=e.entries,n=GQ(t),i=0;i<r.length;)r[i].key===n?yK(r,i,1):i++;TQ||(this.length=r.length),e.updateURL()},get:function(t){VQ(arguments.length,1);for(var e=tK(this).entries,r=GQ(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){VQ(arguments.length,1);for(var e=tK(this).entries,r=GQ(t),n=[],i=0;i<e.length;i++)e[i].key===r&&gK(n,e[i].value);return n},has:function(t){VQ(arguments.length,1);for(var e=tK(this).entries,r=GQ(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){VQ(arguments.length,1);for(var r,n=tK(this),i=n.entries,a=!1,o=GQ(t),s=GQ(e),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?yK(i,c--,1):(a=!0,r.value=s));a||gK(i,{key:o,value:s}),TQ||(this.length=i.length),n.updateURL()},sort:function(){var t=tK(this);QQ(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=tK(this).entries,n=BQ(t,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((e=r[i++]).value,e.key,this)},keys:function(){return new OK(this,"keys")},values:function(){return new OK(this,"values")},entries:function(){return new OK(this,"entries")}},{enumerable:!0}),OQ(CK,KQ,CK.entries,{name:"entries"}),OQ(CK,"toString",(function(){return tK(this).serialize()}),{enumerable:!0}),TQ&&IQ(CK,"size",{get:function(){return tK(this).entries.length},configurable:!0,enumerable:!0}),CQ(RK,JQ),kQ({global:!0,constructor:!0,forced:!PQ},{URLSearchParams:RK}),!PQ&&zQ(oK)){var jK=MQ(cK.has),DK=MQ(cK.set),LK=function(t){if(YQ(t)){var e,r=t.body;if(NQ(r)===JQ)return e=t.headers?new oK(t.headers):new oK,jK(e,"content-type")||DK(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),HQ(t,{body:WQ(0,GQ(r)),headers:WQ(0,e)})}return t};if(zQ(iK)&&kQ({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return iK(t,arguments.length>1?LK(arguments[1]):{})}}),zQ(aK)){var zK=function(t){return LQ(this,sK),new aK(t,arguments.length>1?LK(arguments[1]):{})};sK.constructor=zK,zK.prototype=sK,kQ({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:zK})}}var FK,BK=ei,NK=a,UK=aQ,YK=r,GK=Ta,HK=w,WK=Kr,qK=ia,XK=rm,VK=Bt,QK=BE,KK=ed,JK=Ki,ZK=Cj.codeAt,$K=function(t){var e,r,n=[],i=bQ(yQ(xQ(t),uQ,"."),".");for(e=0;e<i.length;e++)r=i[e],mQ(n,fQ(cQ,r)?"xn--"+_Q(r):r);return vQ(n,".")},tJ=di,eJ=wa,rJ=BM,nJ={URLSearchParams:RK,getState:tK},iJ=Tr,aJ=iJ.set,oJ=iJ.getterFor("URL"),sJ=nJ.URLSearchParams,cJ=nJ.getState,uJ=YK.URL,lJ=YK.TypeError,hJ=YK.parseInt,fJ=Math.floor,dJ=Math.pow,pJ=HK("".charAt),gJ=HK(/./.exec),vJ=HK([].join),mJ=HK(1..toString),yJ=HK([].pop),bJ=HK([].push),xJ=HK("".replace),wJ=HK([].shift),AJ=HK("".split),_J=HK("".slice),kJ=HK("".toLowerCase),EJ=HK([].unshift),SJ="Invalid scheme",MJ="Invalid host",TJ="Invalid port",PJ=/[a-z]/i,OJ=/[\d+-.a-z]/i,IJ=/\d/,RJ=/^0x/i,CJ=/^[0-7]+$/,jJ=/^\d+$/,DJ=/^[\da-f]+$/i,LJ=/[\0\t\n\r #%/:<>?@[\\\]^|]/,zJ=/[\0\t\n\r #/:<>?@[\\\]^|]/,FJ=/^[\u0000-\u0020]+/,BJ=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,NJ=/[\t\n\r]/g,UJ=function(t){var e,r,n,i;if("number"==typeof t){for(e=[],r=0;r<4;r++)EJ(e,t%256),t=fJ(t/256);return vJ(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,i=0,a=0;a<8;a++)0!==t[a]?(i>r&&(e=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(e=n,r=i),e}(t),r=0;r<8;r++)i&&0===t[r]||(i&&(i=!1),n===r?(e+=r?":":"::",i=!0):(e+=mJ(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},YJ={},GJ=QK({},YJ,{" ":1,'"':1,"<":1,">":1,"`":1}),HJ=QK({},GJ,{"#":1,"?":1,"{":1,"}":1}),WJ=QK({},HJ,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),qJ=function(t,e){var r=ZK(t,0);return r>32&&r<127&&!VK(e,t)?t:encodeURIComponent(t)},XJ={ftp:21,file:null,http:80,https:443,ws:80,wss:443},VJ=function(t,e){var r;return 2==t.length&&gJ(PJ,pJ(t,0))&&(":"==(r=pJ(t,1))||!e&&"|"==r)},QJ=function(t){var e;return t.length>1&&VJ(_J(t,0,2))&&(2==t.length||"/"===(e=pJ(t,2))||"\\"===e||"?"===e||"#"===e)},KJ=function(t){return"."===t||"%2e"===kJ(t)},JJ={},ZJ={},$J={},tZ={},eZ={},rZ={},nZ={},iZ={},aZ={},oZ={},sZ={},cZ={},uZ={},lZ={},hZ={},fZ={},dZ={},pZ={},gZ={},vZ={},mZ={},yZ=function(t,e,r){var n,i,a,o=tJ(t);if(e){if(i=this.parse(o))throw lJ(i);this.searchParams=null}else{if(void 0!==r&&(n=new yZ(r,!0)),i=this.parse(o,null,n))throw lJ(i);(a=cJ(new sJ)).bindURL(this),this.searchParams=a}};yZ.prototype={type:"URL",parse:function(t,e,r){var n,i,a,o,s,c=this,u=e||JJ,l=0,h="",f=!1,d=!1,p=!1;for(t=tJ(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=xJ(t,FJ,""),t=xJ(t,BJ,"$1")),t=xJ(t,NJ,""),n=KK(t);l<=n.length;){switch(i=n[l],u){case JJ:if(!i||!gJ(PJ,i)){if(e)return SJ;u=$J;continue}h+=kJ(i),u=ZJ;break;case ZJ:if(i&&(gJ(OJ,i)||"+"==i||"-"==i||"."==i))h+=kJ(i);else{if(":"!=i){if(e)return SJ;h="",u=$J,l=0;continue}if(e&&(c.isSpecial()!=VK(XJ,h)||"file"==h&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=h,e)return void(c.isSpecial()&&XJ[c.scheme]==c.port&&(c.port=null));h="","file"==c.scheme?u=lZ:c.isSpecial()&&r&&r.scheme==c.scheme?u=tZ:c.isSpecial()?u=iZ:"/"==n[l+1]?(u=eZ,l++):(c.cannotBeABaseURL=!0,bJ(c.path,""),u=gZ)}break;case $J:if(!r||r.cannotBeABaseURL&&"#"!=i)return SJ;if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=JK(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,u=mZ;break}u="file"==r.scheme?lZ:rZ;continue;case tZ:if("/"!=i||"/"!=n[l+1]){u=rZ;continue}u=aZ,l++;break;case eZ:if("/"==i){u=oZ;break}u=pZ;continue;case rZ:if(c.scheme=r.scheme,i==FK)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=JK(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())u=nZ;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=JK(r.path),c.query="",u=vZ;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=JK(r.path),c.path.length--,u=pZ;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=JK(r.path),c.query=r.query,c.fragment="",u=mZ}break;case nZ:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,u=pZ;continue}u=oZ}else u=aZ;break;case iZ:if(u=aZ,"/"!=i||"/"!=pJ(h,l+1))continue;l++;break;case aZ:if("/"!=i&&"\\"!=i){u=oZ;continue}break;case oZ:if("@"==i){f&&(h="%40"+h),f=!0,a=KK(h);for(var g=0;g<a.length;g++){var v=a[g];if(":"!=v||p){var m=qJ(v,WJ);p?c.password+=m:c.username+=m}else p=!0}h=""}else if(i==FK||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(f&&""==h)return"Invalid authority";l-=KK(h).length+1,h="",u=sZ}else h+=i;break;case sZ:case cZ:if(e&&"file"==c.scheme){u=fZ;continue}if(":"!=i||d){if(i==FK||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==h)return MJ;if(e&&""==h&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(h))return o;if(h="",u=dZ,e)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return MJ;if(o=c.parseHost(h))return o;if(h="",u=uZ,e==cZ)return}break;case uZ:if(!gJ(IJ,i)){if(i==FK||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||e){if(""!=h){var y=hJ(h,10);if(y>65535)return TJ;c.port=c.isSpecial()&&y===XJ[c.scheme]?null:y,h=""}if(e)return;u=dZ;continue}return TJ}h+=i;break;case lZ:if(c.scheme="file","/"==i||"\\"==i)u=hZ;else{if(!r||"file"!=r.scheme){u=pZ;continue}if(i==FK)c.host=r.host,c.path=JK(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=JK(r.path),c.query="",u=vZ;else{if("#"!=i){QJ(vJ(JK(n,l),""))||(c.host=r.host,c.path=JK(r.path),c.shortenPath()),u=pZ;continue}c.host=r.host,c.path=JK(r.path),c.query=r.query,c.fragment="",u=mZ}}break;case hZ:if("/"==i||"\\"==i){u=fZ;break}r&&"file"==r.scheme&&!QJ(vJ(JK(n,l),""))&&(VJ(r.path[0],!0)?bJ(c.path,r.path[0]):c.host=r.host),u=pZ;continue;case fZ:if(i==FK||"/"==i||"\\"==i||"?"==i||"#"==i){if(!e&&VJ(h))u=pZ;else if(""==h){if(c.host="",e)return;u=dZ}else{if(o=c.parseHost(h))return o;if("localhost"==c.host&&(c.host=""),e)return;h="",u=dZ}continue}h+=i;break;case dZ:if(c.isSpecial()){if(u=pZ,"/"!=i&&"\\"!=i)continue}else if(e||"?"!=i)if(e||"#"!=i){if(i!=FK&&(u=pZ,"/"!=i))continue}else c.fragment="",u=mZ;else c.query="",u=vZ;break;case pZ:if(i==FK||"/"==i||"\\"==i&&c.isSpecial()||!e&&("?"==i||"#"==i)){if(".."===(s=kJ(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||bJ(c.path,"")):KJ(h)?"/"==i||"\\"==i&&c.isSpecial()||bJ(c.path,""):("file"==c.scheme&&!c.path.length&&VJ(h)&&(c.host&&(c.host=""),h=pJ(h,0)+":"),bJ(c.path,h)),h="","file"==c.scheme&&(i==FK||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)wJ(c.path);"?"==i?(c.query="",u=vZ):"#"==i&&(c.fragment="",u=mZ)}else h+=qJ(i,HJ);break;case gZ:"?"==i?(c.query="",u=vZ):"#"==i?(c.fragment="",u=mZ):i!=FK&&(c.path[0]+=qJ(i,YJ));break;case vZ:e||"#"!=i?i!=FK&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":qJ(i,YJ)):(c.fragment="",u=mZ);break;case mZ:i!=FK&&(c.fragment+=qJ(i,GJ))}l++}},parseHost:function(t){var e,r,n;if("["==pJ(t,0)){if("]"!=pJ(t,t.length-1))return MJ;if(e=function(t){var e,r,n,i,a,o,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,h=0,f=function(){return pJ(t,h)};if(":"==f()){if(":"!=pJ(t,1))return;h+=2,l=++u}for(;f();){if(8==u)return;if(":"!=f()){for(e=r=0;r<4&&gJ(DJ,f());)e=16*e+hJ(f(),16),h++,r++;if("."==f()){if(0==r)return;if(h-=r,u>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;h++}if(!gJ(IJ,f()))return;for(;gJ(IJ,f());){if(a=hJ(f(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;h++}c[u]=256*c[u]+i,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[u++]=e}else{if(null!==l)return;h++,l=++u}}if(null!==l)for(o=u-l,u=7;0!=u&&o>0;)s=c[u],c[u--]=c[l+o-1],c[l+--o]=s;else if(8!=u)return;return c}(_J(t,1,-1)),!e)return MJ;this.host=e}else if(this.isSpecial()){if(t=$K(t),gJ(LJ,t))return MJ;if(e=function(t){var e,r,n,i,a,o,s,c=AJ(t,".");if(c.length&&""==c[c.length-1]&&c.length--,(e=c.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(i=c[n]))return t;if(a=10,i.length>1&&"0"==pJ(i,0)&&(a=gJ(RJ,i)?16:8,i=_J(i,8==a?1:2)),""===i)o=0;else{if(!gJ(10==a?jJ:8==a?CJ:DJ,i))return t;o=hJ(i,a)}bJ(r,o)}for(n=0;n<e;n++)if(o=r[n],n==e-1){if(o>=dJ(256,5-e))return null}else if(o>255)return null;for(s=yJ(r),n=0;n<r.length;n++)s+=r[n]*dJ(256,3-n);return s}(t),null===e)return MJ;this.host=e}else{if(gJ(zJ,t))return MJ;for(e="",r=KK(t),n=0;n<r.length;n++)e+=qJ(r[n],YJ);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return VK(XJ,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&VJ(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,r=t.username,n=t.password,i=t.host,a=t.port,o=t.path,s=t.query,c=t.fragment,u=e+":";return null!==i?(u+="//",t.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=UJ(i),null!==a&&(u+=":"+a)):"file"==e&&(u+="//"),u+=t.cannotBeABaseURL?o[0]:o.length?"/"+vJ(o,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(t){var e=this.parse(t);if(e)throw lJ(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new bZ(t.path[0]).origin}catch(t){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+UJ(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(tJ(t)+":",JJ)},getUsername:function(){return this.username},setUsername:function(t){var e=KK(tJ(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<e.length;r++)this.username+=qJ(e[r],WJ)}},getPassword:function(){return this.password},setPassword:function(t){var e=KK(tJ(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<e.length;r++)this.password+=qJ(e[r],WJ)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?UJ(t):UJ(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,sZ)},getHostname:function(){var t=this.host;return null===t?"":UJ(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,cZ)},getPort:function(){var t=this.port;return null===t?"":tJ(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=tJ(t))?this.port=null:this.parse(t,uZ))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+vJ(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,dZ))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=tJ(t))?this.query=null:("?"==pJ(t,0)&&(t=_J(t,1)),this.query="",this.parse(t,vZ)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=tJ(t))?("#"==pJ(t,0)&&(t=_J(t,1)),this.fragment="",this.parse(t,mZ)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var bZ=function(t){var e=XK(this,xZ),r=rJ(arguments.length,1)>1?arguments[1]:void 0,n=aJ(e,new yZ(t,!1,r));NK||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},xZ=bZ.prototype,wZ=function(t,e){return{get:function(){return oJ(this)[t]()},set:e&&function(t){return oJ(this)[e](t)},configurable:!0,enumerable:!0}};if(NK&&(qK(xZ,"href",wZ("serialize","setHref")),qK(xZ,"origin",wZ("getOrigin")),qK(xZ,"protocol",wZ("getProtocol","setProtocol")),qK(xZ,"username",wZ("getUsername","setUsername")),qK(xZ,"password",wZ("getPassword","setPassword")),qK(xZ,"host",wZ("getHost","setHost")),qK(xZ,"hostname",wZ("getHostname","setHostname")),qK(xZ,"port",wZ("getPort","setPort")),qK(xZ,"pathname",wZ("getPathname","setPathname")),qK(xZ,"search",wZ("getSearch","setSearch")),qK(xZ,"searchParams",wZ("getSearchParams")),qK(xZ,"hash",wZ("getHash","setHash"))),WK(xZ,"toJSON",(function(){return oJ(this).serialize()}),{enumerable:!0}),WK(xZ,"toString",(function(){return oJ(this).serialize()}),{enumerable:!0}),uJ){var AZ=uJ.createObjectURL,_Z=uJ.revokeObjectURL;AZ&&WK(bZ,"createObjectURL",GK(AZ,uJ)),_Z&&WK(bZ,"revokeObjectURL",GK(_Z,uJ))}eJ(bZ,"URL"),BK({global:!0,constructor:!0,forced:!UK,sham:!NK},{URL:bZ});var kZ=u;ei({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return kZ(URL.prototype.toString,this)}});var EZ=a,SZ=w,MZ=ia,TZ=URLSearchParams.prototype,PZ=SZ(TZ.forEach);EZ&&!("size"in TZ)&&MZ(TZ,"size",{get:function(){var t=0;return PZ(this,(function(){t++})),t},configurable:!0,enumerable:!0});!function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,o=Object.create(a.prototype),s=new O(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",g="completed",v={};function m(){}function y(){}function b(){}var x={};u(x,o,(function(){return this}));var w=Object.getPrototypeOf,A=w&&w(w(I([])));A&&A!==r&&n.call(A,o)&&(x=A);var _=b.prototype=m.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var c=h(t[i],t,a);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(t,e,r){var n=f;return function(i,a){if(n===p)throw new Error("Generator is already running");if(n===g){if("throw"===i)throw a;return R()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=M(o,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=h(t,e,r);if("normal"===c.type){if(n=r.done?g:d,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=g,r.method="throw",r.arg=c.arg)}}}function M(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,M(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=h(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function I(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:R}}function R(){return{value:e,done:!0}}return y.prototype=b,i(_,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},k(E.prototype),u(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(l(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},k(_),u(_,c,"Generator"),u(_,o,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=I,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}({exports:{}});var OZ="done";"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1;r<arguments.length;r++){var n=arguments[r];if(null!=n)for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])}return e}),"function"!=typeof Object.values&&(Object.values=function(t){let e=[];for(let r in t)e.push(t[r]);return e}),"function"!=typeof Object.keys&&(Object.values=function(t){let e=[];for(let r in t)e.push(r);return e}),"undefined"!=typeof CanvasRenderingContext2D&&null==CanvasRenderingContext2D.prototype.ellipse&&(CanvasRenderingContext2D.prototype.ellipse=function(t,e,r,n,i,a,o,s){this.save(),this.translate(t,e),this.rotate(i),this.translate(-r,-n),this.scale(r,n),this.arc(1,1,1,a,o,s),this.restore()}),function(){for(var t=0,e=["ms","moz","webkit","o"],r=0;r<e.length&&!window.requestAnimationFrame;++r)window.requestAnimationFrame=window[e[r]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[r]+"CancelAnimationFrame"]||window[e[r]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(console.warn("requestAnimationFrame not supported"),window.requestAnimationFrame=function(e,r){var n=performance.now(),i=Math.max(0,33-(n-t)),a=window.setTimeout((function(){e(n+i)}),i);return t=n+i,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}(),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t});var IZ=function(){this.__data__=[],this.size=0};var RZ=function(t,e){return t===e||t!=t&&e!=e},CZ=RZ;var jZ=function(t,e){for(var r=t.length;r--;)if(CZ(t[r][0],e))return r;return-1},DZ=jZ,LZ=Array.prototype.splice;var zZ=function(t){var e=this.__data__,r=DZ(e,t);return!(r<0)&&(r==e.length-1?e.pop():LZ.call(e,r,1),--this.size,!0)},FZ=jZ;var BZ=function(t){var e=this.__data__,r=FZ(e,t);return r<0?void 0:e[r][1]},NZ=jZ;var UZ=function(t){return NZ(this.__data__,t)>-1},YZ=jZ;var GZ=function(t,e){var r=this.__data__,n=YZ(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},HZ=IZ,WZ=zZ,qZ=BZ,XZ=UZ,VZ=GZ;function QZ(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}QZ.prototype.clear=HZ,QZ.prototype.delete=WZ,QZ.prototype.get=qZ,QZ.prototype.has=XZ,QZ.prototype.set=VZ;var KZ=QZ,JZ=KZ;var ZZ=function(){this.__data__=new JZ,this.size=0};var $Z=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var t$=function(t){return this.__data__.get(t)};var e$=function(t){return this.__data__.has(t)},r$="object"==typeof t&&t&&t.Object===Object&&t,n$=r$,i$="object"==typeof self&&self&&self.Object===Object&&self,a$=n$||i$||Function("return this")(),o$=a$.Symbol,s$=o$,c$=Object.prototype,u$=c$.hasOwnProperty,l$=c$.toString,h$=s$?s$.toStringTag:void 0;var f$=function(t){var e=u$.call(t,h$),r=t[h$];try{t[h$]=void 0;var n=!0}catch(t){}var i=l$.call(t);return n&&(e?t[h$]=r:delete t[h$]),i},d$=Object.prototype.toString;var p$=function(t){return d$.call(t)},g$=f$,v$=p$,m$="[object Null]",y$="[object Undefined]",b$=o$?o$.toStringTag:void 0;var x$=function(t){return null==t?void 0===t?y$:m$:b$&&b$ in Object(t)?g$(t):v$(t)};var w$=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},A$=x$,_$=w$,k$="[object AsyncFunction]",E$="[object Function]",S$="[object GeneratorFunction]",M$="[object Proxy]";var T$=function(t){if(!_$(t))return!1;var e=A$(t);return e==E$||e==S$||e==k$||e==M$},P$=a$["__core-js_shared__"],O$=function(){var t=/[^.]+$/.exec(P$&&P$.keys&&P$.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var I$=function(t){return!!O$&&O$ in t},R$=Function.prototype.toString;var C$=function(t){if(null!=t){try{return R$.call(t)}catch(t){}try{return t+""}catch(t){}}return""},j$=T$,D$=I$,L$=w$,z$=C$,F$=/^\[object .+?Constructor\]$/,B$=Function.prototype,N$=Object.prototype,U$=B$.toString,Y$=N$.hasOwnProperty,G$=RegExp("^"+U$.call(Y$).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var H$=function(t){return!(!L$(t)||D$(t))&&(j$(t)?G$:F$).test(z$(t))};var W$=function(t,e){return null==t?void 0:t[e]},q$=H$,X$=W$;var V$=function(t,e){var r=X$(t,e);return q$(r)?r:void 0},Q$=V$(a$,"Map"),K$=V$(Object,"create"),J$=K$;var Z$=function(){this.__data__=J$?J$(null):{},this.size=0};var $$=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},t0=K$,e0="__lodash_hash_undefined__",r0=Object.prototype.hasOwnProperty;var n0=function(t){var e=this.__data__;if(t0){var r=e[t];return r===e0?void 0:r}return r0.call(e,t)?e[t]:void 0},i0=K$,a0=Object.prototype.hasOwnProperty;var o0=function(t){var e=this.__data__;return i0?void 0!==e[t]:a0.call(e,t)},s0=K$,c0="__lodash_hash_undefined__";var u0=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=s0&&void 0===e?c0:e,this},l0=Z$,h0=$$,f0=n0,d0=o0,p0=u0;function g0(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}g0.prototype.clear=l0,g0.prototype.delete=h0,g0.prototype.get=f0,g0.prototype.has=d0,g0.prototype.set=p0;var v0=g0,m0=KZ,y0=Q$;var b0=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},x0=b0;var w0=function(t,e){var r=t.__data__;return x0(e)?r["string"==typeof e?"string":"hash"]:r.map},A0=w0;var _0=function(t){var e=A0(this,t).delete(t);return this.size-=e?1:0,e},k0=w0;var E0=function(t){return k0(this,t).get(t)},S0=w0;var M0=function(t){return S0(this,t).has(t)},T0=w0;var P0=function(t,e){var r=T0(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},O0=function(){this.size=0,this.__data__={hash:new v0,map:new(y0||m0),string:new v0}},I0=_0,R0=E0,C0=M0,j0=P0;function D0(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}D0.prototype.clear=O0,D0.prototype.delete=I0,D0.prototype.get=R0,D0.prototype.has=C0,D0.prototype.set=j0;var L0=D0,z0=KZ,F0=Q$,B0=L0,N0=200;var U0=function(t,e){var r=this.__data__;if(r instanceof z0){var n=r.__data__;if(!F0||n.length<N0-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new B0(n)}return r.set(t,e),this.size=r.size,this},Y0=KZ,G0=ZZ,H0=$Z,W0=t$,q0=e$,X0=U0;function V0(t){var e=this.__data__=new Y0(t);this.size=e.size}V0.prototype.clear=G0,V0.prototype.delete=H0,V0.prototype.get=W0,V0.prototype.has=q0,V0.prototype.set=X0;var Q0=V0,K0="__lodash_hash_undefined__";var J0=function(t){return this.__data__.set(t,K0),this};var Z0=function(t){return this.__data__.has(t)},$0=L0,t1=J0,e1=Z0;function r1(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new $0;++e<r;)this.add(t[e])}r1.prototype.add=r1.prototype.push=t1,r1.prototype.has=e1;var n1=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var i1=function(t,e){return t.has(e)},a1=r1,o1=n1,s1=i1,c1=1,u1=2;var l1=function(t,e,r,n,i,a){var o=r&c1,s=t.length,c=e.length;if(s!=c&&!(o&&c>s))return!1;var u=a.get(t),l=a.get(e);if(u&&l)return u==e&&l==t;var h=-1,f=!0,d=r&u1?new a1:void 0;for(a.set(t,e),a.set(e,t);++h<s;){var p=t[h],g=e[h];if(n)var v=o?n(g,p,h,e,t,a):n(p,g,h,t,e,a);if(void 0!==v){if(v)continue;f=!1;break}if(d){if(!o1(e,(function(t,e){if(!s1(d,e)&&(p===t||i(p,t,r,n,a)))return d.push(e)}))){f=!1;break}}else if(p!==g&&!i(p,g,r,n,a)){f=!1;break}}return a.delete(t),a.delete(e),f},h1=a$.Uint8Array;var f1=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var d1=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},p1=h1,g1=RZ,v1=l1,m1=f1,y1=d1,b1=1,x1=2,w1="[object Boolean]",A1="[object Date]",_1="[object Error]",k1="[object Map]",E1="[object Number]",S1="[object RegExp]",M1="[object Set]",T1="[object String]",P1="[object Symbol]",O1="[object ArrayBuffer]",I1="[object DataView]",R1=o$?o$.prototype:void 0,C1=R1?R1.valueOf:void 0;var j1=function(t,e,r,n,i,a,o){switch(r){case I1:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case O1:return!(t.byteLength!=e.byteLength||!a(new p1(t),new p1(e)));case w1:case A1:case E1:return g1(+t,+e);case _1:return t.name==e.name&&t.message==e.message;case S1:case T1:return t==e+"";case k1:var s=m1;case M1:var c=n&b1;if(s||(s=y1),t.size!=e.size&&!c)return!1;var u=o.get(t);if(u)return u==e;n|=x1,o.set(t,e);var l=v1(s(t),s(e),n,i,a,o);return o.delete(t),l;case P1:if(C1)return C1.call(t)==C1.call(e)}return!1};var D1=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t},L1=Array.isArray,z1=D1,F1=L1;var B1=function(t,e,r){var n=e(t);return F1(t)?n:z1(n,r(t))};var N1=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a};var U1=function(){return[]},Y1=N1,G1=U1,H1=Object.prototype.propertyIsEnumerable,W1=Object.getOwnPropertySymbols,q1=W1?function(t){return null==t?[]:(t=Object(t),Y1(W1(t),(function(e){return H1.call(t,e)})))}:G1;var X1=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var V1=function(t){return null!=t&&"object"==typeof t},Q1=x$,K1=V1,J1="[object Arguments]";var Z1=function(t){return K1(t)&&Q1(t)==J1},$1=Z1,t2=V1,e2=Object.prototype,r2=e2.hasOwnProperty,n2=e2.propertyIsEnumerable,i2=$1(function(){return arguments}())?$1:function(t){return t2(t)&&r2.call(t,"callee")&&!n2.call(t,"callee")},a2=i2,o2={exports:{}};var s2=function(){return!1};!function(t,e){var r=a$,n=s2,i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=(o?o.isBuffer:void 0)||n;t.exports=s}(o2,o2.exports);var c2=9007199254740991,u2=/^(?:0|[1-9]\d*)$/;var l2=function(t,e){var r=typeof t;return!!(e=null==e?c2:e)&&("number"==r||"symbol"!=r&&u2.test(t))&&t>-1&&t%1==0&&t<e},h2=9007199254740991;var f2=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h2},d2=x$,p2=f2,g2=V1,v2={};v2["[object Float32Array]"]=v2["[object Float64Array]"]=v2["[object Int8Array]"]=v2["[object Int16Array]"]=v2["[object Int32Array]"]=v2["[object Uint8Array]"]=v2["[object Uint8ClampedArray]"]=v2["[object Uint16Array]"]=v2["[object Uint32Array]"]=!0,v2["[object Arguments]"]=v2["[object Array]"]=v2["[object ArrayBuffer]"]=v2["[object Boolean]"]=v2["[object DataView]"]=v2["[object Date]"]=v2["[object Error]"]=v2["[object Function]"]=v2["[object Map]"]=v2["[object Number]"]=v2["[object Object]"]=v2["[object RegExp]"]=v2["[object Set]"]=v2["[object String]"]=v2["[object WeakMap]"]=!1;var m2=function(t){return g2(t)&&p2(t.length)&&!!v2[d2(t)]};var y2=function(t){return function(e){return t(e)}},b2={exports:{}};!function(t,e){var r=r$,n=e&&!e.nodeType&&e,i=n&&t&&!t.nodeType&&t,a=i&&i.exports===n&&r.process,o=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=o}(b2,b2.exports);var x2=m2,w2=y2,A2=b2.exports,_2=A2&&A2.isTypedArray,k2=_2?w2(_2):x2,E2=X1,S2=a2,M2=L1,T2=o2.exports,P2=l2,O2=k2,I2=Object.prototype.hasOwnProperty;var R2=function(t,e){var r=M2(t),n=!r&&S2(t),i=!r&&!n&&T2(t),a=!r&&!n&&!i&&O2(t),o=r||n||i||a,s=o?E2(t.length,String):[],c=s.length;for(var u in t)!e&&!I2.call(t,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||P2(u,c))||s.push(u);return s},C2=Object.prototype;var j2=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||C2)};var D2=function(t,e){return function(r){return t(e(r))}},L2=D2(Object.keys,Object),z2=j2,F2=L2,B2=Object.prototype.hasOwnProperty;var N2=function(t){if(!z2(t))return F2(t);var e=[];for(var r in Object(t))B2.call(t,r)&&"constructor"!=r&&e.push(r);return e},U2=T$,Y2=f2;var G2=function(t){return null!=t&&Y2(t.length)&&!U2(t)},H2=R2,W2=N2,q2=G2;var X2=function(t){return q2(t)?H2(t):W2(t)},V2=B1,Q2=q1,K2=X2;var J2=function(t){return V2(t,K2,Q2)},Z2=J2,$2=1,t3=Object.prototype.hasOwnProperty;var e3=function(t,e,r,n,i,a){var o=r&$2,s=Z2(t),c=s.length;if(c!=Z2(e).length&&!o)return!1;for(var u=c;u--;){var l=s[u];if(!(o?l in e:t3.call(e,l)))return!1}var h=a.get(t),f=a.get(e);if(h&&f)return h==e&&f==t;var d=!0;a.set(t,e),a.set(e,t);for(var p=o;++u<c;){var g=t[l=s[u]],v=e[l];if(n)var m=o?n(v,g,l,e,t,a):n(g,v,l,t,e,a);if(!(void 0===m?g===v||i(g,v,r,n,a):m)){d=!1;break}p||(p="constructor"==l)}if(d&&!p){var y=t.constructor,b=e.constructor;y==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(d=!1)}return a.delete(t),a.delete(e),d},r3=V$(a$,"DataView"),n3=Q$,i3=V$(a$,"Promise"),a3=V$(a$,"Set"),o3=V$(a$,"WeakMap"),s3=x$,c3=C$,u3="[object Map]",l3="[object Promise]",h3="[object Set]",f3="[object WeakMap]",d3="[object DataView]",p3=c3(r3),g3=c3(n3),v3=c3(i3),m3=c3(a3),y3=c3(o3),b3=s3;(r3&&b3(new r3(new ArrayBuffer(1)))!=d3||n3&&b3(new n3)!=u3||i3&&b3(i3.resolve())!=l3||a3&&b3(new a3)!=h3||o3&&b3(new o3)!=f3)&&(b3=function(t){var e=s3(t),r="[object Object]"==e?t.constructor:void 0,n=r?c3(r):"";if(n)switch(n){case p3:return d3;case g3:return u3;case v3:return l3;case m3:return h3;case y3:return f3}return e});var x3=b3,w3=Q0,A3=l1,_3=j1,k3=e3,E3=x3,S3=L1,M3=o2.exports,T3=k2,P3=1,O3="[object Arguments]",I3="[object Array]",R3="[object Object]",C3=Object.prototype.hasOwnProperty;var j3=function(t,e,r,n,i,a){var o=S3(t),s=S3(e),c=o?I3:E3(t),u=s?I3:E3(e),l=(c=c==O3?R3:c)==R3,h=(u=u==O3?R3:u)==R3,f=c==u;if(f&&M3(t)){if(!M3(e))return!1;o=!0,l=!1}if(f&&!l)return a||(a=new w3),o||T3(t)?A3(t,e,r,n,i,a):_3(t,e,c,r,n,i,a);if(!(r&P3)){var d=l&&C3.call(t,"__wrapped__"),p=h&&C3.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return a||(a=new w3),i(g,v,r,n,a)}}return!!f&&(a||(a=new w3),k3(t,e,r,n,i,a))},D3=V1;var L3=function t(e,r,n,i,a){return e===r||(null==e||null==r||!D3(e)&&!D3(r)?e!=e&&r!=r:j3(e,r,n,i,t,a))},z3=L3;var F3=function(t,e){return z3(t,e)},B3=V$,N3=function(){try{var t=B3(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),U3=N3;var Y3=function(t,e,r){"__proto__"==e&&U3?U3(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},G3=Y3,H3=RZ,W3=Object.prototype.hasOwnProperty;var q3=function(t,e,r){var n=t[e];W3.call(t,e)&&H3(n,r)&&(void 0!==r||e in t)||G3(t,e,r)},X3=q3,V3=Y3;var Q3=function(t,e,r,n){var i=!r;r||(r={});for(var a=-1,o=e.length;++a<o;){var s=e[a],c=n?n(r[s],t[s],s,r,t):void 0;void 0===c&&(c=t[s]),i?V3(r,s,c):X3(r,s,c)}return r};var K3=function(t){return t};var J3=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},Z3=J3,$3=Math.max;var t4=function(t,e,r){return e=$3(void 0===e?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=$3(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=r(o),Z3(t,this,s)}};var e4=function(t){return function(){return t}},r4=e4,n4=N3,i4=n4?function(t,e){return n4(t,"toString",{configurable:!0,enumerable:!1,value:r4(e),writable:!0})}:K3,a4=800,o4=16,s4=Date.now;var c4=function(t){var e=0,r=0;return function(){var n=s4(),i=o4-(n-r);if(r=n,i>0){if(++e>=a4)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},u4=c4(i4),l4=K3,h4=t4,f4=u4;var d4=function(t,e){return f4(h4(t,e,l4),t+"")},p4=RZ,g4=G2,v4=l2,m4=w$;var y4=function(t,e,r){if(!m4(r))return!1;var n=typeof e;return!!("number"==n?g4(r)&&v4(e,r.length):"string"==n&&e in r)&&p4(r[e],t)},b4=d4,x4=y4;var w4=function(t){return b4((function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,o&&x4(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var s=r[n];s&&t(e,s,n,a)}return e}))};var A4=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},_4=w$,k4=j2,E4=A4,S4=Object.prototype.hasOwnProperty;var M4=function(t){if(!_4(t))return E4(t);var e=k4(t),r=[];for(var n in t)("constructor"!=n||!e&&S4.call(t,n))&&r.push(n);return r},T4=R2,P4=M4,O4=G2;var I4=function(t){return O4(t)?T4(t,!0):P4(t)},R4=Q3,C4=I4,j4=w4((function(t,e,r,n){R4(e,C4(e),t,n)})),D4=D2(Object.getPrototypeOf,Object),L4=x$,z4=D4,F4=V1,B4="[object Object]",N4=Function.prototype,U4=Object.prototype,Y4=N4.toString,G4=U4.hasOwnProperty,H4=Y4.call(Object);var W4=function(t){if(!F4(t)||L4(t)!=B4)return!1;var e=z4(t);if(null===e)return!0;var r=G4.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Y4.call(r)==H4},q4=x$,X4=V1,V4=W4,Q4="[object DOMException]",K4="[object Error]";var J4=function(t){if(!X4(t))return!1;var e=q4(t);return e==K4||e==Q4||"string"==typeof t.message&&"string"==typeof t.name&&!V4(t)},Z4=J3,$4=J4,t5=d4((function(t,e){try{return Z4(t,void 0,e)}catch(t){return $4(t)?t:new Error(t)}}));var e5=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i},r5=e5;var n5=function(t,e){return r5(e,(function(e){return t[e]}))},i5=RZ,a5=Object.prototype,o5=a5.hasOwnProperty;var s5=function(t,e,r,n){return void 0===t||i5(t,a5[r])&&!o5.call(n,r)?e:t},c5={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var u5=function(t){return"\\"+c5[t]},l5=/<%=([\s\S]+?)%>/g;var h5=function(t){return function(e){return null==t?void 0:t[e]}},f5=h5({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),d5=x$,p5=V1,g5="[object Symbol]";var v5=function(t){return"symbol"==typeof t||p5(t)&&d5(t)==g5},m5=e5,y5=L1,b5=v5,x5=1/0,w5=o$?o$.prototype:void 0,A5=w5?w5.toString:void 0;var _5=function t(e){if("string"==typeof e)return e;if(y5(e))return m5(e,t)+"";if(b5(e))return A5?A5.call(e):"";var r=e+"";return"0"==r&&1/e==-x5?"-0":r},k5=_5;var E5=function(t){return null==t?"":k5(t)},S5=f5,M5=E5,T5=/[&<>"']/g,P5=RegExp(T5.source);var O5=j4,I5=t5,R5=n5,C5=s5,j5=u5,D5=J4,L5=y4,z5=X2,F5=l5,B5={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:l5,variable:"",imports:{_:{escape:function(t){return(t=M5(t))&&P5.test(t)?t.replace(T5,S5):t}}}},N5=E5,U5="Invalid `variable` option passed into `_.template`",Y5=/\b__p \+= '';/g,G5=/\b(__p \+=) '' \+/g,H5=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W5=/[()=,{}\[\]\/\s]/,q5=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,X5=/($^)/,V5=/['\n\r\u2028\u2029\\]/g,Q5=Object.prototype.hasOwnProperty;var K5=function(t,e,r){var n=B5.imports._.templateSettings||B5;r&&L5(t,e,r)&&(e=void 0),t=N5(t),e=O5({},e,n,C5);var i,a,o=O5({},e.imports,n.imports,C5),s=z5(o),c=R5(o,s),u=0,l=e.interpolate||X5,h="__p += '",f=RegExp((e.escape||X5).source+"|"+l.source+"|"+(l===F5?q5:X5).source+"|"+(e.evaluate||X5).source+"|$","g"),d=Q5.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(f,(function(e,r,n,o,s,c){return n||(n=o),h+=t.slice(u,c).replace(V5,j5),r&&(i=!0,h+="' +\n__e("+r+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=c+e.length,e})),h+="';\n";var p=Q5.call(e,"variable")&&e.variable;if(p){if(W5.test(p))throw new Error(U5)}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(Y5,""):h).replace(G5,"$1").replace(H5,"$1;"),h="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=I5((function(){return Function(s,d+"return "+h).apply(void 0,c)}));if(g.source=h,D5(g))throw g;return g};var J5={linear:function(t){return t},quad:function(t){return Math.pow(t,2)},circ:function(t){return 1-Math.sin(Math.acos(t))},back:function(t,e={x:1.5}){return Math.pow(t,2)*((e.x+1)*t-e.x)},bounce:function(t){for(let e=0,r=1;;e+=r,r/=2)if(t>=(7-4*e)/11)return-Math.pow((11-6*e-11*t)/4,2)+Math.pow(r,2)},elastic:function(t,e={x:1.5}){return Math.pow(2,10*(t-1))*Math.cos(20*Math.PI*e.x/3*t)}};class Z5{constructor(t,e){this.client=t,this.config=e,this._started=!1;var{delta:r="linear",options:n,ease:i}=this.config;"string"==typeof r&&(r=J5[r]),this.delta="out"==i?function(t,e){return function(r){return 1-t(1-r,e)}}(r,n):"inout"==i?function(t,e){return function(r){return r<.5?t(2*r,e)/2:(2-t(2*(1-r),e))/2}}(r,n):r,this.init()}dispose(){this.stop(),delete this.client}init(){}start(){if(!this._started){var{duration:t=2e3,delay:e=0,repeat:r=!1}=this.config;this._started=!0;var n=0,i=t+e,a=()=>{if(!this._started)return;0==n&&(n=performance.now(),this.client.touch());let o=performance.now()-n,s=Math.max(o%i-e,0)/t;this.step(this.delta(s)),this.client&&this.client.invalidate(),!(o>=i)||r&&this._started||(this.step(1),this.stop(),n=0),this._started&&(this._raf=requestAnimationFrame(a))};this._raf=requestAnimationFrame(a)}}stop(){this._raf&&cancelAnimationFrame(this._raf),this._raf=null,this._started=!1}get started(){return this._started}set started(t){this.started!=!!t&&(t?this.start():this.stop())}}var $5={rotation:class extends Z5{step(t){var{theta:e=6.28}=this.config;this.client.delta("theta",t*e)}},vibration:class extends Z5{step(t){var{theta:e=.2617993877991494}=this.config,r=4*e,n=t*r;t<1/4?n*=-1:t<3/4?n-=2*e:n=r-n,this.client.delta("theta",n)}},heartbeat:class extends Z5{step(t){var e,{scale:r=1.3}=this.config,n=2*(r-1);e=t<.5?1+n*t:1+(1-t)*n,this.client.delta("sx",e),this.client.delta("sy",e)}},moving:class extends Z5{step(t){var{x:e=0,y:r=0}=this.config;this.client.delta("tx",t*e),this.client.delta("ty",t*r)}},outline:class extends Z5{step(t){const{rideOn:e}=this.config,r=this.client;if(!e||!r||!r.root)return;const n=r.root.findById(e);if(!n)return;const{tx:i,ty:a}=r.delta(),o=n.outline(t),s=r.center,c=r.transcoordS2T(s.x,s.y);n&&(r.delta("tx",o.x-c.x+i),r.delta("ty",o.y-c.y+a))}},fade:class extends Z5{step(t){var e,{startAlpha:r=1,endAlpha:n=0}=this.config,i=Math.max(Math.min(r,n,1),0),a=2*(Math.min(Math.max(r,n,1),1)-i);e=t<.5?a*t:(1-t)*a,this.client.delta("fade",e)}}};function t6(t){var{duration:e=1e3,delay:r=30,step:n,delta:i,ease:a,options:o,repeat:s=!1}=t;"string"==typeof i&&(i=J5[i]),"out"==a?i=function(t,e){return function(r){return 1-t(1-r,e)}}(i,o):"inout"==a&&(i=function(t,e){return function(r){return r<.5?t(2*r,e)/2:(2-t(2*(1-r),e))/2}}(i,o));var c=!1;return{start:function(){if(c)return this;c=!0;var t=0,r=()=>{if(c){0==t&&(t=performance.now());var a=(performance.now()-t)/e,u=s?a%1:Math.min(a,1);n(i(u,o)),!(a>=1)||s&&c||(this.stop(),t=0),c&&requestAnimationFrame(r)}};return requestAnimationFrame(r),this},stop:function(){return c=!1,this}}}var e6=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t},r6=Q3,n6=X2;var i6=function(t,e){return t&&r6(e,n6(e),t)},a6=Q3,o6=I4;var s6=function(t,e){return t&&a6(e,o6(e),t)},c6={exports:{}};!function(t,e){var r=a$,n=e&&!e.nodeType&&e,i=n&&t&&!t.nodeType&&t,a=i&&i.exports===n?r.Buffer:void 0,o=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=o?o(r):new t.constructor(r);return t.copy(n),n}}(c6,c6.exports);var u6=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e},l6=Q3,h6=q1;var f6=function(t,e){return l6(t,h6(t),e)},d6=D1,p6=D4,g6=q1,v6=U1,m6=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)d6(e,g6(t)),t=p6(t);return e}:v6,y6=Q3,b6=m6;var x6=function(t,e){return y6(t,b6(t),e)},w6=B1,A6=m6,_6=I4;var k6=function(t){return w6(t,_6,A6)},E6=Object.prototype.hasOwnProperty;var S6=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&E6.call(t,"index")&&(r.index=t.index,r.input=t.input),r},M6=h1;var T6=function(t){var e=new t.constructor(t.byteLength);return new M6(e).set(new M6(t)),e},P6=T6;var O6=function(t,e){var r=e?P6(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},I6=/\w*$/;var R6=function(t){var e=new t.constructor(t.source,I6.exec(t));return e.lastIndex=t.lastIndex,e},C6=o$?o$.prototype:void 0,j6=C6?C6.valueOf:void 0;var D6=T6;var L6=T6,z6=O6,F6=R6,B6=function(t){return j6?Object(j6.call(t)):{}},N6=function(t,e){var r=e?D6(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)},U6="[object Boolean]",Y6="[object Date]",G6="[object Map]",H6="[object Number]",W6="[object RegExp]",q6="[object Set]",X6="[object String]",V6="[object Symbol]",Q6="[object ArrayBuffer]",K6="[object DataView]",J6="[object Float32Array]",Z6="[object Float64Array]",$6="[object Int8Array]",t8="[object Int16Array]",e8="[object Int32Array]",r8="[object Uint8Array]",n8="[object Uint8ClampedArray]",i8="[object Uint16Array]",a8="[object Uint32Array]";var o8=function(t,e,r){var n=t.constructor;switch(e){case Q6:return L6(t);case U6:case Y6:return new n(+t);case K6:return z6(t,r);case J6:case Z6:case $6:case t8:case e8:case r8:case n8:case i8:case a8:return N6(t,r);case G6:return new n;case H6:case X6:return new n(t);case W6:return F6(t);case q6:return new n;case V6:return B6(t)}},s8=w$,c8=Object.create,u8=function(){function t(){}return function(e){if(!s8(e))return{};if(c8)return c8(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),l8=D4,h8=j2;var f8=function(t){return"function"!=typeof t.constructor||h8(t)?{}:u8(l8(t))},d8=x3,p8=V1,g8="[object Map]";var v8=function(t){return p8(t)&&d8(t)==g8},m8=v8,y8=y2,b8=b2.exports,x8=b8&&b8.isMap,w8=x8?y8(x8):m8,A8=x3,_8=V1,k8="[object Set]";var E8=function(t){return _8(t)&&A8(t)==k8},S8=E8,M8=y2,T8=b2.exports,P8=T8&&T8.isSet,O8=P8?M8(P8):S8,I8=Q0,R8=e6,C8=q3,j8=i6,D8=s6,L8=c6.exports,z8=u6,F8=f6,B8=x6,N8=J2,U8=k6,Y8=x3,G8=S6,H8=o8,W8=f8,q8=L1,X8=o2.exports,V8=w8,Q8=w$,K8=O8,J8=X2,Z8=I4,$8=1,t7=2,e7=4,r7="[object Arguments]",n7="[object Function]",i7="[object GeneratorFunction]",a7="[object Object]",o7={};o7[r7]=o7["[object Array]"]=o7["[object ArrayBuffer]"]=o7["[object DataView]"]=o7["[object Boolean]"]=o7["[object Date]"]=o7["[object Float32Array]"]=o7["[object Float64Array]"]=o7["[object Int8Array]"]=o7["[object Int16Array]"]=o7["[object Int32Array]"]=o7["[object Map]"]=o7["[object Number]"]=o7[a7]=o7["[object RegExp]"]=o7["[object Set]"]=o7["[object String]"]=o7["[object Symbol]"]=o7["[object Uint8Array]"]=o7["[object Uint8ClampedArray]"]=o7["[object Uint16Array]"]=o7["[object Uint32Array]"]=!0,o7["[object Error]"]=o7[n7]=o7["[object WeakMap]"]=!1;var s7=function t(e,r,n,i,a,o){var s,c=r&$8,u=r&t7,l=r&e7;if(n&&(s=a?n(e,i,a,o):n(e)),void 0!==s)return s;if(!Q8(e))return e;var h=q8(e);if(h){if(s=G8(e),!c)return z8(e,s)}else{var f=Y8(e),d=f==n7||f==i7;if(X8(e))return L8(e,c);if(f==a7||f==r7||d&&!a){if(s=u||d?{}:W8(e),!c)return u?B8(e,D8(s,e)):F8(e,j8(s,e))}else{if(!o7[f])return a?e:{};s=H8(e,f,c)}}o||(o=new I8);var p=o.get(e);if(p)return p;o.set(e,s),K8(e)?e.forEach((function(i){s.add(t(i,r,n,i,e,o))})):V8(e)&&e.forEach((function(i,a){s.set(a,t(i,r,n,a,e,o))}));var g=h?void 0:(l?u?U8:N8:u?Z8:J8)(e);return R8(g||e,(function(i,a){g&&(i=e[a=i]),C8(s,a,t(i,r,n,a,e,o))})),s},c7=s7,u7=4;var l7=function(t){return c7(t,u7)},h7=a$,f7=/\s/;var d7=function(t){for(var e=t.length;e--&&f7.test(t.charAt(e)););return e},p7=d7,g7=/^\s+/;var v7=function(t){return t?t.slice(0,p7(t)+1).replace(g7,""):t},m7=w$,y7=v5,b7=NaN,x7=/^[-+]0x[0-9a-f]+$/i,w7=/^0b[01]+$/i,A7=/^0o[0-7]+$/i,_7=parseInt;var k7=function(t){if("number"==typeof t)return t;if(y7(t))return b7;if(m7(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=m7(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=v7(t);var r=w7.test(t);return r||A7.test(t)?_7(t.slice(2),r?2:8):x7.test(t)?b7:+t},E7=w$,S7=function(){return h7.Date.now()},M7=k7,T7="Expected a function",P7=Math.max,O7=Math.min;var I7=function(t,e,r){var n,i,a,o,s,c,u=0,l=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError(T7);function d(e){var r=n,a=i;return n=i=void 0,u=e,o=t.apply(a,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||h&&t-u>=a}function g(){var t=S7();if(p(t))return v(t);s=setTimeout(g,function(t){var r=e-(t-c);return h?O7(r,a-(t-u)):r}(t))}function v(t){return s=void 0,f&&n?d(t):(n=i=void 0,o)}function m(){var t=S7(),r=p(t);if(n=arguments,i=this,c=t,r){if(void 0===s)return function(t){return u=t,s=setTimeout(g,e),l?d(t):o}(c);if(h)return clearTimeout(s),s=setTimeout(g,e),d(c)}return void 0===s&&(s=setTimeout(g,e)),o}return e=M7(e)||0,E7(r)&&(l=!!r.leading,a=(h="maxWait"in r)?P7(M7(r.maxWait)||0,e):a,f="trailing"in r?!!r.trailing:f),m.cancel=function(){void 0!==s&&clearTimeout(s),u=0,n=c=i=s=void 0},m.flush=function(){return void 0===s?o:v(S7())},m},R7=I7,C7=w$,j7="Expected a function";var D7=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new TypeError(j7);return C7(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),R7(t,e,{leading:n,maxWait:e,trailing:i})},L7=k7,z7=1/0,F7=17976931348623157e292;var B7=function(t){return t?(t=L7(t))===z7||t===-z7?(t<0?-1:1)*F7:t==t?t:0:0===t?t:0},N7=B7;var U7=function(t){var e=N7(t),r=e%1;return e==e?r?e-r:e:0},Y7=U7,G7="Expected a function";var H7=function(t,e){var r;if("function"!=typeof e)throw new TypeError(G7);return t=Y7(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}};var W7=function(t){return H7(2,t)},q7=N2,X7=x3,V7=a2,Q7=L1,K7=G2,J7=o2.exports,Z7=j2,$7=k2,t9="[object Map]",e9="[object Set]",r9=Object.prototype.hasOwnProperty;var n9=function(t){if(null==t)return!0;if(K7(t)&&(Q7(t)||"string"==typeof t||"function"==typeof t.splice||J7(t)||$7(t)||V7(t)))return!t.length;var e=X7(t);if(e==t9||e==e9)return!t.size;if(Z7(t))return!q7(t).length;for(var r in t)if(r9.call(t,r))return!1;return!0},i9=0;function a9(t={},...e){return"object"!=typeof t&&(t={}),e.forEach((e=>{for(let r in e)"object"!=typeof e[r]?t[r]=e[r]:e[r].length>0?t[r]=e[r].map((t=>{let n;return n="object"!=typeof e[r]?t:a9({},t),n})):t[r]=a9(t[r],e[r])})),t}function o9(t){for(;t&&"object"==typeof t;){let e=t;for(let e in t){t=t[e];break}if(t===e){t=void 0;break}}return t}var s9=Object.freeze({__proto__:null,insertAt:function(t,e){return this.__collection__?(-1==(t=this.__collection__.indexOf(e))&&this.__collection__.splice(t,0,e),this):this},append:function(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.push(t),this},prepend:function(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.unshift(t),this},remove:function(t){if(!this.__collection__)return this;var e=this.__collection__.indexOf(t);return e>=0&&this.__collection__.splice(e,1),this},getAt:function(t){if(this.__collection__)return this.__collection__[t]},forEach:function(t,e){this.__collection__&&this.__collection__.forEach(t,e)},indexOf:function(t){if(this.__collection__)return this.__collection__.indexOf(t)},size:function(){return this.__collection__?this.__collection__.length:0},clear:function(){this.__collection__=[]},moveForward:function(t){var e=this.indexOf(t);-1!=e&&0!=e&&(this.__collection__[e]=this.__collection__[e-1],this.__collection__[e-1]=t)},moveBackward:function(t){var e=this.indexOf(t);-1!=e&&e!=this.size()-1&&(this.__collection__[e]=this.__collection__[e+1],this.__collection__[e+1]=t)},moveToHead:function(t){var e=this.indexOf(t);if(-1!=e&&0!=e){var r=this.__collection__.splice(0,e),n=this.__collection__.splice(1);this.__collection__=this.__collection__.concat(r,n)}},moveToTail:function(t){var e=this.indexOf(t);if(-1!=e&&e!=this.size()-1){var r=this.__collection__.splice(0,e),n=this.__collection__.splice(1);this.__collection__=r.concat(n,this.__collection__)}}});function c9(){}c9.prototype=s9;var u9=/\s+/;function l9(t,e,r,n){if(!r)return!0;if("object"==typeof r){for(let n in r){let i=r[n];t[e].apply(t,[n,i])}return!1}return!u9.test(r)||(r.split(u9).forEach((r=>t[e].apply(t,[r].concat(n)))),!1)}const h9=["on","off","once","delegate_on","delegate_off","trigger","listenTo"];var f9={withEvent(){h9.forEach((t=>this[t]=f9[t]))},on(t,e,r){return l9(this,"on",t,[e,r])&&e?(this._listeners||(this._listeners={}),(this._listeners[t]||(this._listeners[t]=[])).push({callback:e,context:r,ctx:r||this}),this):this},once(t,e,r){if(!l9(this,"once",t,[e,r])||!e)return this;var n=this,i=W7((function(){n.off(t,i),e.apply(n,arguments)}));i._callback=e,this.on(t,i,r)},off(t,e,r){if(!this._listeners||!l9(this,"off",t,[e,r]))return this;if(!t&&!e&&!r)return this._listeners=void 0,this;var n;n=t?[t]:Object.keys(this._listeners);for(let t=0;t<n.length;t++){let i=n[t],a=this._listeners[i];if(a){let t=[];if(this._listeners[i]=t,e||r)for(let n=0;n<a.length;n++){let i=a[n];(e&&e!==i.callback&&e!==i.callback._callback||r&&r!==i.context)&&t.push(i)}t.length||delete this._listeners[i]}}return this},delegate_on(t){return this._delegators||(this._delegators=new c9),this._delegators.append(t),this},delegate_off(t){return this._delegators?(this._delegators.remove(t),this):this},delegate(){if(this._delegators&&this._delegators.size()>0&&p9(this._delegators,arguments),!this._listeners)return this;var t=arguments.length-1,e=arguments[t];arguments[t]={origin:e.origin,name:e.name,deliverer:this};var r=this._listeners[e.name],n=this._listeners["(all)"];return r&&d9(r,arguments),n&&d9(n,arguments),this},trigger(t){var e=[].slice.call(arguments,1);if(e.push({origin:this,name:t,deliverer:this}),this._delegators&&this._delegators.size()>0&&p9(this._delegators,e),!this._listeners)return this;if(!l9(this,"trigger",t,e))return this;var r=this._listeners[t],n=this._listeners["(all)"];return r&&d9(r,e),n&&d9(n,e),this},stopListening(t,e,r){var n=this._listeningTo;if(!n)return this;var i=!e&&!r;r||"object"!=typeof e||(r=this),t&&((n={})[t._listenId]=t);for(let t in n){let a=n[t];a.off(e,r,this),(i||n9(a._events))&&delete this._listeningTo[t]}return this}};function d9(t,e){t.forEach((t=>t.callback.apply(t.ctx,e)))}function p9(t,e){t.forEach((t=>f9.delegate.apply(t,e)))}var g9={listenTo:"on",listenToOnce:"once"};for(let t in g9){var v9=g9[t];f9[t]=function(t,e,r){this._listeningTo||(this._listeningTo={});var n=this._listeningTo;return t._listenId||(t._listenId=`${"l"||""}${++i9}`),n[t._listenId]=t,r||"object"!=typeof e||(r=this),t[v9](e,r,this),this}}function m9(t,e){if(e instanceof Array)e.forEach((e=>m9(t,e)));else{if(t.mixedIn=t.hasOwnProperty("mixedIn")?t.mixedIn:[],t.mixingIn=t.hasOwnProperty("mixingIn")?t.mixingIn:[],t.mixedIn.indexOf(e)>=0)return t;if(t.mixingIn.indexOf(e)>=0)throw new Error(`found cyclic dependencies between ${t.mixingIn}`);t.mixingIn.push(e),e.call(t),t.mixingIn.pop(),t.mixedIn.push(e)}return t}var y9=(...t)=>{var e=[];t.forEach((t=>t&&t.stack&&e.push(t.stack))),console.error("[ERROR]",...t,e.join(" "))},b9=(...t)=>{var e=[];t.forEach((t=>t&&t.stack&&e.push(t.stack))),console.warn("[WARN]",...t,e.join(" "))},x9=(...t)=>console.log("[DEBUG]",...t);function w9(t,e,r){var n=t.__lookupGetter__(e);n?r?t.__defineGetter__(e,(function(){return void 0===this.__cache__[e]&&(this.__cache__[e]=n.call(this)),l7(this.__cache__[e])})):t.__defineGetter__(e,(function(){return void 0===this.__cache__[e]&&(this.__cache__[e]=n.call(this)),this.__cache__[e]})):y9(`${e} is not defined in ${t.constructor.name}`)}const A9={},_9=0,k9=1,E9=2,S9=3,M9={VIEW:0,EDIT:1,SHIFT:2,ADD:3},T9=30,P9="undefined"==typeof window?1:window.devicePixelRatio||(window.matchMedia&&window.matchMedia("(min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 1.5),(-moz-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5)").matches?2:1)||1,O9=["mousemove","mouseup","mousedown","mouseout","wheel","touchstart","touchmove","touchend","dblclick"],I9=["keydown","keyup"],R9={ALPHA:1,FONT_SIZE:15,FONT_FAMILY:"serif",FONT_COLOR:"black",TEXT_ALIGN:"center",TEXT_BASELINE:"middle",TEXT_WRAP:!1,BOLD:!1,ITALIC:!1,STROKE_STYLE:"#999",LINE_DASH:"solid"},C9={x:1,y:1};function j9(t,e,r){var{left:n=0,top:i=0,blurSize:a=0,color:o="transparent"}=e,s=r.rootModel.get("scale")||C9;t.shadowOffsetX=n*s.x*P9,t.shadowOffsetY=i*s.y*P9,t.shadowBlur=a*s.x*P9,t.shadowColor=o}var D9={gradation:function(t,e,r){var{type:n,subType:i,from:a,to:o,colors:s}=r;switch(i){case"linear":var c=e.createLinearGradient(a.x,a.y,o.x,o.y);break;case"radial":c=e.createRadialGradient(a.x,a.y,a.r,o.x,o.y,o.r);break;default:c=e.createLinearGradient(a.x,a.y,o.x,o.y)}s&&(s.forEach((function(t){c.addColorStop(t.endPoint,t.color)})),e.fillStyle=c,e.fill())},shadow:j9};function L9(t,e,r,n){var i=e.get("class");return!!i&&(i.split(" ")||[]).indexOf(t.substr(1))>=0}function z9(t,e,r,n){return t==e.get("type")}function F9(t,e,r,n){if("(all)"==t)return!0;switch(t.charAt(0)){case"#":return function(t,e,r,n){return t.substr(1)==e.get("id")}(t,e);case".":return L9(t,e);case"(":return function(t,e,r,n){switch(t){case"(all)":return!0;case"(self)":return n===e;case"(root)":return!n.parent&&n===e;case"(descendant)":return n!==e;case"(child)":return n===e.parent;default:return!1}}(t,e,0,n);default:return z9(t,e)}}function B9(t,e,r,n,i,a){return t(e,r,n,i)&&a.push(r),r.components&&r.components.forEach((r=>{B9(t,e,r,n,i,a)})),a}function N9(t,e,r,n){switch(t){case"(all)":return!0;case"(parent)":return r&&r.parent===e;case"(child)":case"(children)":return r&&r===e.parent;case"(sibling)":case"(siblings)":return r&&r.parent===e.parent&&r!==e;default:return!1}}function U9(t,e,r){if("(root)"==t)return[e];if("(self)"==t)return r?[r]:[];var n;switch(t.charAt(0)){case"#":let r=e.root.findById(t.substr(1));return r?[r]:[];case".":n=L9;break;case"(":n=N9;break;default:n=z9}return B9(n,t,e,r,e,[])}function Y9(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var G9={exports:{}};!function(e,r){var n=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),o=new T(n||[]);return a._invoke=function(t,e,r){var n=h;return function(i,a){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw a;return O()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=E(o,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=l(t,e,r);if("normal"===c.type){if(n=r.done?p:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}(t,r,o),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h="suspendedStart",f="suspendedYield",d="executing",p="completed",g={};function v(){}function m(){}function y(){}var b={};c(b,a,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(P([])));w&&w!==r&&n.call(w,a)&&(b=w);var A=y.prototype=v.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(i,a,o,s){var c=l(t[i],t,a);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(h).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var i;this._invoke=function(t,n){function a(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(a,a):a()}}function E(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:O}}function O(){return{value:e,done:!0}}return m.prototype=y,c(A,"constructor",y),c(y,"constructor",m),m.displayName=c(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,s,"GeneratorFunction")),t.prototype=Object.create(A),t},t.awrap=function(t){return{__await:t}},_(k.prototype),c(k.prototype,o,(function(){return this})),t.AsyncIterator=k,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new k(u(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},_(A),c(A,s,"Generator"),c(A,a,(function(){return this})),c(A,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),M(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;M(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(e.exports);try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},String.fromCodePoint||function(t){var e=function(e){for(var r=[],n=0,i="",a=0,o=arguments.length;a!==o;++a){var s=+arguments[a];if(!(s<1114111&&s>>>0===s))throw RangeError("Invalid code point: "+s);s<=65535?n=r.push(s):(s-=65536,n=r.push(55296+(s>>10),s%1024+56320)),n>=16383&&(i+=t.apply(null,r),r.length=0)}return i+t.apply(null,r)};try{Object.defineProperty(String,"fromCodePoint",{value:e,configurable:!0,writable:!0})}catch(t){String.fromCodePoint=e}}(String.fromCharCode),Object.is||(Object.is=function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e})
2
+ /*! https://mths.be/codepointat v0.2.0 by @mathias */,String.prototype.codePointAt||function(){var t=function(){try{var t={},e=Object.defineProperty,r=e(t,t,t)&&e}catch(t){}return r}(),e=function(t){if(null==this)throw TypeError();var e=String(this),r=e.length,n=t?Number(t):0;if(n!=n&&(n=0),!(n<0||n>=r)){var i,a=e.charCodeAt(n);return a>=55296&&a<=56319&&r>n+1&&(i=e.charCodeAt(n+1))>=56320&&i<=57343?1024*(a-55296)+i-56320+65536:a}};t?t(String.prototype,"codePointAt",{value:e,configurable:!0,writable:!0}):String.prototype.codePointAt=e}(),Math.log10=Math.log10||function(t){return Math.log(t)*Math.LOG10E},e.exports=function(){function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){if(!s&&Y9)return Y9(o);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,(function(t){return i(e[o][1][t]||t)}),u,u.exports,t,e,r,n)}return r[o].exports}for(var a=Y9,o=0;o<n.length;o++)i(n[o]);return i}return t}()({1:[function(t,e,r){var n=t("./utils"),i=function(){var t=n.stringToArray,e=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],r=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],i=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],a=["Thousand","Million","Billion","Trillion"];function o(t,n){var o=function t(n,o,s){var c="";if(n<=19)c=(o?" and ":"")+(s?r[n]:e[n]);else if(n<100){var u=Math.floor(n/10),l=n%10;c=(o?" and ":"")+i[u-2],l>0?c+="-"+t(l,!1,s):s&&(c=c.substring(0,c.length-1)+"ieth")}else if(n<1e3){var h=Math.floor(n/100),f=n%100;c=(o?", ":"")+e[h]+" Hundred",f>0?c+=t(f,!0,s):s&&(c+="th")}else{var d=Math.floor(Math.log10(n)/3);d>a.length&&(d=a.length);var p=Math.pow(10,3*d),g=Math.floor(n/p),v=n-g*p;c=(o?", ":"")+t(g,!1,!1)+" "+a[d-1],v>0?c+=t(v,!0,s):s&&(c+="th")}return c};return o(t,!1,n)}var s={};function c(t){var e=t.split(/,\s|\sand\s|[\s\\-]/).map((function(t){return s[t]})),r=[0];return e.forEach((function(t){if(t<100){var e=r.pop();e>=1e3&&(r.push(e),e=0),r.push(e+t)}else r.push(r.pop()*t)})),r.reduce((function(t,e){return t+e}),0)}e.forEach((function(t,e){s[t.toLowerCase()]=e})),r.forEach((function(t,e){s[t.toLowerCase()]=e})),i.forEach((function(t,e){var r=t.toLowerCase();s[r]=10*(e+2),s[r.substring(0,t.length-1)+"ieth"]=s[r]})),s.hundredth=100,a.forEach((function(t,e){var r=t.toLowerCase(),n=Math.pow(10,3*(e+1));s[r]=n,s[r+"th"]=n}));var u=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],l={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function h(t){for(var e=0;e<u.length;e++){var r=u[e];if(t>=r[0])return r[1]+h(t-r[0])}return""}function f(t){for(var e=0,r=1,n=t.length-1;n>=0;n--){var i=t[n],a=l[i];a<r?e-=a:(r=a,e+=a)}return e}function d(t,e){for(var r=[],n=e.charCodeAt(0);t>0;)r.unshift(String.fromCharCode((t-1)%26+n)),t=Math.floor((t-1)/26);return r.join("")}function p(t,e){for(var r=e.charCodeAt(0),n=0,i=0;i<t.length;i++)n+=(t.charCodeAt(t.length-i-1)-r+1)*Math.pow(26,i);return n}function g(t,e){if(void 0!==t)return y(t=Math.floor(t),x(e))}var v={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},m={UPPER:"upper",LOWER:"lower",TITLE:"title"};function y(e,r){var n,i=e<0;switch(e=Math.abs(e),r.primary){case v.LETTERS:n=d(e,r.case===m.UPPER?"A":"a");break;case v.ROMAN:n=h(e),r.case===m.UPPER&&(n=n.toUpperCase());break;case v.WORDS:n=o(e,r.ordinal),r.case===m.UPPER?n=n.toUpperCase():r.case===m.LOWER&&(n=n.toLowerCase());break;case v.DECIMAL:n=""+e;var a=r.mandatoryDigits-n.length;if(a>0){var s=new Array(a+1).join("0");n=s+n}if(48!==r.zeroCode&&(n=t(n).map((function(t){return String.fromCodePoint(t.codePointAt(0)+r.zeroCode-48)})).join("")),r.regular)for(var c=Math.floor((n.length-1)/r.groupingSeparators.position);c>0;c--){var u=n.length-c*r.groupingSeparators.position;n=n.substr(0,u)+r.groupingSeparators.character+n.substr(u)}else r.groupingSeparators.reverse().forEach((function(t){var e=n.length-t.position;n=n.substr(0,e)+t.character+n.substr(e)}));if(r.ordinal){var l={1:"st",2:"nd",3:"rd"}[n[n.length-1]];(!l||n.length>1&&"1"===n[n.length-2])&&(l="th"),n+=l}break;case v.SEQUENCE:throw{code:"D3130",value:r.token}}return i&&(n="-"+n),n}var b=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function x(e){var r,n={type:"integer",primary:v.DECIMAL,case:m.LOWER,ordinal:!1},i=e.lastIndexOf(";");switch(-1===i?r=e:(r=e.substring(0,i),"o"===e.substring(i+1)[0]&&(n.ordinal=!0)),r){case"A":n.case=m.UPPER;case"a":n.primary=v.LETTERS;break;case"I":n.case=m.UPPER;case"i":n.primary=v.ROMAN;break;case"W":n.case=m.UPPER,n.primary=v.WORDS;break;case"Ww":n.case=m.TITLE,n.primary=v.WORDS;break;case"w":n.primary=v.WORDS;break;default:var a=null,o=0,s=0,c=[],u=0;if(t(r).map((function(t){return t.codePointAt(0)})).reverse().forEach((function(t){for(var e=!1,r=0;r<b.length;r++){var n=b[r];if(t>=n&&t<=n+9){if(e=!0,o++,u++,null===a)a=n;else if(n!==a)throw{code:"D3131"};break}}e||(35===t?(u++,s++):c.push({position:u,character:String.fromCodePoint(t)}))})),o>0){n.primary=v.DECIMAL,n.zeroCode=a,n.mandatoryDigits=o,n.optionalDigits=s;var l=function(t){if(0===t.length)return 0;for(var e=t[0].character,r=1;r<t.length;r++)if(t[r].character!==e)return 0;for(var n=t.map((function(t){return t.position})),i=function t(e,r){return 0===r?e:t(r,e%r)},a=n.reduce(i),o=1;o<=n.length;o++)if(-1===n.indexOf(o*a))return 0;return a},h=l(c);h>0?(n.regular=!0,n.groupingSeparators={position:h,character:c[0].character}):(n.regular=!1,n.groupingSeparators=c)}else n.primary=v.SEQUENCE,n.token=r}return n}var w={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function A(t){for(var e=[],r={type:"datetime",parts:e},n=function(r,n){if(n>r){var i=t.substring(r,n);i=i.split("]]").join("]"),e.push({type:"literal",value:i})}},i=0,a=0;a<t.length;){if("["===t.charAt(a)){if("["===t.charAt(a+1)){n(i,a),e.push({type:"literal",value:"["}),i=a+=2;continue}if(n(i,a),i=a,-1===(a=t.indexOf("]",i)))throw{code:"D3135"};var o,s=t.substring(i+1,a),c={type:"marker",component:(s=s.split(/\s+/).join("")).charAt(0)},u=s.lastIndexOf(",");if(-1!==u){var l=s.substring(u+1),h=l.indexOf("-"),f=void 0,d=void 0,p=function(t){return void 0===t||"*"===t?void 0:parseInt(t)};-1===h?f=l:(f=l.substring(0,h),d=l.substring(h+1));var g={min:p(f),max:p(d)};c.width=g,o=s.substring(1,u)}else o=s.substring(1);if(1===o.length)c.presentation1=o;else if(o.length>1){var v=o.charAt(o.length-1);-1!=="atco".indexOf(v)?(c.presentation2=v,"o"===v&&(c.ordinal=!0),c.presentation1=o.substring(0,o.length-1)):c.presentation1=o}else c.presentation1=w[c.component];if(void 0===c.presentation1)throw{code:"D3132",value:c.component};if("n"===c.presentation1[0])c.names=m.LOWER;else if("N"===c.presentation1[0])"n"===c.presentation1[1]?c.names=m.TITLE:c.names=m.UPPER;else if(-1!=="YMDdFWwXxHhmsf".indexOf(c.component)){var y=c.presentation1;if(c.presentation2&&(y+=";"+c.presentation2),c.integerFormat=x(y),c.width&&void 0!==c.width.min&&c.integerFormat.mandatoryDigits<c.width.min&&(c.integerFormat.mandatoryDigits=c.width.min),-1!=="YMD".indexOf(c.component))if(c.n=-1,c.width&&void 0!==c.width.max)c.n=c.width.max,c.integerFormat.mandatoryDigits=c.n;else{var b=c.integerFormat.mandatoryDigits+c.integerFormat.optionalDigits;b>=2&&(c.n=b)}}"Z"!==c.component&&"z"!==c.component||(c.integerFormat=x(c.presentation1)),e.push(c),i=a+1}a++}return n(i,a),r}var _=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],k=["January","February","March","April","May","June","July","August","September","October","November","December"],E=864e5,S=function(t){var e=Date.UTC(t.year,t.month),r=new Date(e).getUTCDay();return 0===r&&(r=7),r>4?e+(8-r)*E:e-(r-1)*E},M=function t(e,r){return{year:e,month:r,nextMonth:function(){return 11===r?t(e+1,0):t(e,r+1)},previousMonth:function(){return 0===r?t(e-1,11):t(e,r-1)},nextYear:function(){return t(e+1,r)},previousYear:function(){return t(e-1,r)}}},T=function(t,e){return(e-t)/(7*E)+1},P=function(t,e){var r;switch(e){case"Y":r=t.getUTCFullYear();break;case"M":r=t.getUTCMonth()+1;break;case"D":r=t.getUTCDate();break;case"d":r=(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())-Date.UTC(t.getUTCFullYear(),0))/E+1;break;case"F":0===(r=t.getUTCDay())&&(r=7);break;case"W":var n=M(t.getUTCFullYear(),0),i=S(n),a=Date.UTC(n.year,t.getUTCMonth(),t.getUTCDate()),o=T(i,a);if(o>52)a>=S(n.nextYear())&&(o=1);else if(o<1){var s=S(n.previousYear());o=T(s,a)}r=Math.floor(o);break;case"w":var c=M(t.getUTCFullYear(),t.getUTCMonth()),u=S(c),l=Date.UTC(c.year,c.month,t.getUTCDate()),h=T(u,l);if(h>4)l>=S(c.nextMonth())&&(h=1);else if(h<1){var f=S(c.previousMonth());h=T(f,l)}r=Math.floor(h);break;case"X":var d=M(t.getUTCFullYear(),0),p=S(d),g=S(d.nextYear()),v=t.getTime();r=v<p?d.year-1:v>=g?d.year+1:d.year;break;case"x":var m=M(t.getUTCFullYear(),t.getUTCMonth()),y=S(m),b=m.nextMonth(),x=S(b),w=t.getTime();r=w<y?m.previousMonth().month+1:w>=x?b.month+1:m.month+1;break;case"H":r=t.getUTCHours();break;case"h":r=t.getUTCHours(),0==(r%=12)&&(r=12);break;case"P":r=t.getUTCHours()>=12?"pm":"am";break;case"m":r=t.getUTCMinutes();break;case"s":r=t.getUTCSeconds();break;case"f":r=t.getUTCMilliseconds();break;case"Z":case"z":break;case"C":case"E":r="ISO"}return r},O=null;function I(t,e,r){var n=0,i=0;if(void 0!==r){var a=parseInt(r);n=Math.floor(a/100),i=a%100}var o,s=function(t,e){var r=P(t,e.component);if(-1!=="YMDdFWwXxHhms".indexOf(e.component))if("Y"===e.component&&-1!==e.n&&(r%=Math.pow(10,e.n)),e.names){if("M"===e.component||"x"===e.component)r=k[r-1];else{if("F"!==e.component)throw{code:"D3133",value:e.component};r=_[r]}e.names===m.UPPER?r=r.toUpperCase():e.names===m.LOWER&&(r=r.toLowerCase()),e.width&&r.length>e.width.max&&(r=r.substring(0,e.width.max))}else r=y(r,e.integerFormat);else if("f"===e.component)r=y(r,e.integerFormat);else if("Z"===e.component||"z"===e.component){var a=100*n+i;if(e.integerFormat.regular)r=y(a,e.integerFormat);else{var o=e.integerFormat.mandatoryDigits;if(1===o||2===o)r=y(n,e.integerFormat),0!==i&&(r+=":"+g(i,"00"));else{if(3!==o&&4!==o)throw{code:"D3134",value:o};r=y(a,e.integerFormat)}}a>=0&&(r="+"+r),"z"===e.component&&(r="GMT"+r),0===a&&"t"===e.presentation2&&(r="Z")}return r};void 0===e?(null===O&&(O=A("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),o=O):o=A(e);var c=new Date(t+60*(60*n+i)*1e3),u="";return o.parts.forEach((function(t){"literal"===t.type?u+=t.value:u+=s(c,t)})),u}function R(t){var e={};if("datetime"===t.type)e.type="datetime",e.parts=t.parts.map((function(t){var e={};if("literal"===t.type)e.regex=t.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if("Z"===t.component||"z"===t.component){var r;Array.isArray(t.integerFormat.groupingSeparators)||(r=t.integerFormat.groupingSeparators),e.regex="","z"===t.component&&(e.regex="GMT"),e.regex+="[-+][0-9]+",r&&(e.regex+=r.character+"[0-9]+"),e.parse=function(e){"z"===t.component&&(e=e.substring(3));var n=0,i=0;return r?(n=Number.parseInt(e.substring(0,e.indexOf(r.character))),i=Number.parseInt(e.substring(e.indexOf(r.character)+1))):e.length-1<=2?n=Number.parseInt(e):(n=Number.parseInt(e.substring(0,3)),i=Number.parseInt(e.substring(3))),60*n+i}}else if(t.integerFormat)t.integerFormat.n=t.n,e=R(t.integerFormat);else{e.regex="[a-zA-Z]+";var n={};if("M"===t.component||"x"===t.component)k.forEach((function(e,r){t.width&&t.width.max?n[e.substring(0,t.width.max)]=r+1:n[e]=r+1}));else if("F"===t.component)_.forEach((function(e,r){r>0&&(t.width&&t.width.max?n[e.substring(0,t.width.max)]=r:n[e]=r)}));else{if("P"!==t.component)throw{code:"D3133",value:t.component};n={am:0,AM:0,pm:1,PM:1}}e.parse=function(t){return n[t]}}return e.component=t.component,e}));else{e.type="integer";var r,n=t.case===m.UPPER;switch(r=t.n&&t.n>0?0===t.optionalDigits?"{".concat(t.n,"}"):"{".concat(t.n-t.optionalDigits,",").concat(t.n,"}"):"+",t.primary){case v.LETTERS:e.regex=n?"[A-Z]+":"[a-z]+",e.parse=function(t){return p(t,n?"A":"a")};break;case v.ROMAN:e.regex=n?"[MDCLXVI]+":"[mdclxvi]+",e.parse=function(t){return f(n?t:t.toUpperCase())};break;case v.WORDS:e.regex="(?:"+Object.keys(s).concat("and","[\\-, ]").join("|")+")+",e.parse=function(t){return c(t.toLowerCase())};break;case v.DECIMAL:e.regex="[0-9]".concat(r),t.ordinal&&(e.regex+="(?:th|st|nd|rd)"),e.parse=function(e){var r=e;return t.ordinal&&(r=e.substring(0,e.length-2)),t.regular?r=r.split(",").join(""):t.groupingSeparators.forEach((function(t){r=r.split(t.character).join("")})),48!==t.zeroCode&&(r=r.split("").map((function(e){return String.fromCodePoint(e.codePointAt(0)-t.zeroCode+48)})).join("")),parseInt(r)};break;case v.SEQUENCE:throw{code:"D3130",value:t.token}}}return e}function C(t,e){if(void 0!==t)return R(x(e)).parse(t)}function j(t,e){var r=R(A(e)),n="^"+r.parts.map((function(t){return"("+t.regex+")"})).join("")+"$",i=new RegExp(n,"i").exec(t);if(null!==i){for(var a=161,o=130,s=84,c=72,u=23,l=47,h={},f=1;f<i.length;f++){var d=r.parts[f-1];d.parse&&(h[d.component]=d.parse(i[f]))}if(0===Object.getOwnPropertyNames(h).length)return;var p=0,g=function(t){p<<=1,p+=t?1:0},v=function(t){return!(~t&p||!(t&p))};"YXMxWwdD".split("").forEach((function(t){return g(h[t])}));var m=!v(a)&&v(o),y=v(s),b=!y&&v(c);p=0,"PHhmsf".split("").forEach((function(t){return g(h[t])}));var x=!v(u)&&v(l),w=(m?"YD":y?"XxwF":b?"XWF":"YMD")+(x?"Phmsf":"Hmsf"),_=this.environment.timestamp,k=!1,E=!1;if(w.split("").forEach((function(t){if(void 0===h[t])k?(h[t]=-1!=="MDd".indexOf(t)?1:0,E=!0):h[t]=P(_,t);else if(k=!0,E)throw{code:"D3136"}})),h.M>0?h.M-=1:h.M=0,m){var S=Date.UTC(h.Y,0),M=1e3*(h.d-1)*60*60*24,T=new Date(S+M);h.M=T.getUTCMonth(),h.D=T.getUTCDate()}if(y)throw{code:"D3136"};if(b)throw{code:"D3136"};x&&(h.H=12===h.h?0:h.h,1===h.P&&(h.H+=12));var O=Date.UTC(h.Y,h.M,h.D,h.H,h.m,h.s,h.f);return(h.Z||h.z)&&(O-=60*(h.Z||h.z)*1e3),O}}var D=new RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function L(t,e){if(void 0!==t){if(void 0===e){if(!D.test(t))throw{stack:(new Error).stack,code:"D3110",value:t};return Date.parse(t)}return j.call(this,t,e)}}function z(t,e,r){if(void 0!==t)return I.call(this,t,e,r)}return{formatInteger:g,parseInteger:C,fromMillis:z,toMillis:L}}();e.exports=i},{"./utils":6}],2:[function(e,r,n){(function(t){(function(){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=e("./utils"),a=function(){var e=regeneratorRuntime.mark(N),r=regeneratorRuntime.mark(U),a=regeneratorRuntime.mark(Y),o=regeneratorRuntime.mark(G),s=regeneratorRuntime.mark(K),c=regeneratorRuntime.mark(ht),u=regeneratorRuntime.mark(ft),l=regeneratorRuntime.mark(dt),h=regeneratorRuntime.mark(gt),f=regeneratorRuntime.mark(_t),d=regeneratorRuntime.mark(Mt),p=regeneratorRuntime.mark(Ot),g=i.isNumeric,v=i.isArrayOfStrings,m=i.isArrayOfNumbers,y=i.createSequence,b=i.isSequence,x=i.isFunction,w=i.isLambda,A=i.isIterable,_=i.getFunctionArity,k=i.isDeepEqual,E=i.stringToArray;function S(t){if(void 0!==t){var e=0;return t.forEach((function(t){e+=t})),e}}function M(t){return void 0===t?0:t.length}function T(t){if(void 0!==t&&0!==t.length)return Math.max.apply(Math,t)}function P(t){if(void 0!==t&&0!==t.length)return Math.min.apply(Math,t)}function O(t){if(void 0!==t&&0!==t.length){var e=0;return t.forEach((function(t){e+=t})),e/t.length}}function I(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0!==t){var r;if("string"==typeof t)r=t;else if(x(t))r="";else{if("number"==typeof t&&!isFinite(t))throw{code:"D3001",value:t,stack:(new Error).stack};var n=e?2:0;Array.isArray(t)&&t.outerWrapper&&(t=t[0]),r=JSON.stringify(t,(function(t,e){return null!=e&&e.toPrecision&&g(e)?Number(e.toPrecision(15)):e&&x(e)?"":e}),n)}return r}}function R(t,e,r){if(void 0!==t){var n=E(t),i=n.length;if(i+e<0&&(e=0),void 0!==r){if(r<=0)return"";var a=e>=0?e+r:i+e+r;return n.slice(e,a).join("")}return n.slice(e).join("")}}function C(t,e){if(void 0!==t){var r=t.indexOf(e);return r>-1?t.substr(0,r):t}}function j(t,e){if(void 0!==t){var r=t.indexOf(e);return r>-1?t.substr(r+e.length):t}}function D(t){if(void 0!==t)return t.toLowerCase()}function L(t){if(void 0!==t)return t.toUpperCase()}function z(t){if(void 0!==t)return E(t).length}function F(t){if(void 0!==t){var e=t.replace(/[ \t\n\r]+/gm," ");return" "===e.charAt(0)&&(e=e.substring(1))," "===e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e}}function B(t,e,r){if(void 0!==t){var n;void 0!==r&&0!==r.length||(r=" ");var i=Math.abs(e)-z(t);if(i>0){var a=new Array(i+1).join(r);r.length>1&&(a=R(a,0,i)),n=e>0?t+a:a+t}else n=t;return n}}function N(t,r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.apply(this,[r]),!A(n)){e.next=4;break}return e.delegateYield(n,"t0",3);case 3:n=e.t0;case 4:if(!n||"number"==typeof n.start||"number"===n.end||Array.isArray(n.groups)||x(n.next)){e.next=6;break}throw{code:"T1010",stack:(new Error).stack};case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)}function U(t,e){var n,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0!==t){r.next=2;break}return r.abrupt("return",void 0);case 2:if("string"!=typeof e){r.next=6;break}n=-1!==t.indexOf(e),r.next=9;break;case 6:return r.delegateYield(N(e,t),"t0",7);case 7:i=r.t0,n=void 0!==i;case 9:return r.abrupt("return",n);case 10:case"end":return r.stop()}}),r)}function Y(t,e,r){var n,i,o;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(void 0!==t){a.next=2;break}return a.abrupt("return",void 0);case 2:if(!(r<0)){a.next=4;break}throw{stack:(new Error).stack,value:r,code:"D3040",index:3};case 4:if(n=y(),!(void 0===r||r>0)){a.next=17;break}return i=0,a.delegateYield(N(e,t),"t0",8);case 8:if(void 0===(o=a.t0)){a.next=17;break}case 10:if(void 0===o||!(void 0===r||i<r)){a.next=17;break}return n.push({match:o.match,index:o.start,groups:o.groups}),a.delegateYield(N(o.next),"t1",13);case 13:o=a.t1,i++,a.next=10;break;case 17:return a.abrupt("return",n);case 18:case"end":return a.stop()}}),a)}function G(t,e,r,n){var i,a,s,c,u,l,h,f;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(void 0!==t){o.next=2;break}return o.abrupt("return",void 0);case 2:if(i=this,""!==e){o.next=5;break}throw{code:"D3010",stack:(new Error).stack,value:e,index:2};case 5:if(!(n<0)){o.next=7;break}throw{code:"D3011",stack:(new Error).stack,value:n,index:4};case 7:if(a="string"==typeof r?function(t){for(var e="",n=0,i=r.indexOf("$",n);-1!==i&&n<r.length;){e+=r.substring(n,i),n=i+1;var a=r.charAt(n);if("$"===a)e+="$",n++;else if("0"===a)e+=t.match,n++;else{var o;if(o=0===t.groups.length?1:Math.floor(Math.log(t.groups.length)*Math.LOG10E)+1,i=parseInt(r.substring(n,n+o),10),o>1&&i>t.groups.length&&(i=parseInt(r.substring(n,n+o-1),10)),isNaN(i))e+="$";else{if(t.groups.length>0){var s=t.groups[i-1];void 0!==s&&(e+=s)}n+=i.toString().length}}i=r.indexOf("$",n)}return e+=r.substring(n)}:r,s="",c=0,!(void 0===n||n>0)){o.next=44;break}if(u=0,"string"!=typeof e){o.next=18;break}for(l=t.indexOf(e,c);-1!==l&&(void 0===n||u<n);)s+=t.substring(c,l),s+=r,c=l+e.length,u++,l=t.indexOf(e,c);s+=t.substring(c),o.next=42;break;case 18:return o.delegateYield(N(e,t),"t0",19);case 19:if(void 0===(h=o.t0)){o.next=41;break}case 21:if(void 0===h||!(void 0===n||u<n)){o.next=38;break}if(s+=t.substring(c,h.start),f=a.apply(i,[h]),!A(f)){o.next=27;break}return o.delegateYield(f,"t1",26);case 26:f=o.t1;case 27:if("string"!=typeof f){o.next=31;break}s+=f,o.next=32;break;case 31:throw{code:"D3012",stack:(new Error).stack,value:f};case 32:return c=h.start+h.match.length,u++,o.delegateYield(N(h.next),"t2",35);case 35:h=o.t2,o.next=21;break;case 38:s+=t.substring(c),o.next=42;break;case 41:s=t;case 42:o.next=45;break;case 44:s=t;case 45:return o.abrupt("return",s);case 46:case"end":return o.stop()}}),o,this)}function H(e){if(void 0!==e){var r="undefined"!=typeof window?window.btoa:function(e){return new t.Buffer.from(e,"binary").toString("base64")};return r(e)}}function W(e){if(void 0!==e){var r="undefined"!=typeof window?window.atob:function(e){return new t.Buffer.from(e,"base64").toString("binary")};return r(e)}}function q(t){if(void 0!==t){var e;try{e=encodeURIComponent(t)}catch(e){throw{code:"D3140",stack:(new Error).stack,value:t,functionName:"encodeUrlComponent"}}return e}}function X(t){if(void 0!==t){var e;try{e=encodeURI(t)}catch(e){throw{code:"D3140",stack:(new Error).stack,value:t,functionName:"encodeUrl"}}return e}}function V(t){if(void 0!==t){var e;try{e=decodeURIComponent(t)}catch(e){throw{code:"D3140",stack:(new Error).stack,value:t,functionName:"decodeUrlComponent"}}return e}}function Q(t){if(void 0!==t){var e;try{e=decodeURI(t)}catch(e){throw{code:"D3140",stack:(new Error).stack,value:t,functionName:"decodeUrl"}}return e}}function K(t,e,r){var n,i,a,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(void 0!==t){s.next=2;break}return s.abrupt("return",void 0);case 2:if(!(r<0)){s.next=4;break}throw{code:"D3020",stack:(new Error).stack,value:r,index:3};case 4:if(n=[],!(void 0===r||r>0)){s.next=27;break}if("string"!=typeof e){s.next=10;break}n=t.split(e,r),s.next=27;break;case 10:return i=0,s.delegateYield(N(e,t),"t0",12);case 12:if(void 0===(a=s.t0)){s.next=26;break}o=0;case 15:if(void 0===a||!(void 0===r||i<r)){s.next=23;break}return n.push(t.substring(o,a.start)),o=a.end,s.delegateYield(N(a.next),"t1",19);case 19:a=s.t1,i++,s.next=15;break;case 23:(void 0===r||i<r)&&n.push(t.substring(o)),s.next=27;break;case 26:n.push(t);case 27:return s.abrupt("return",n);case 28:case"end":return s.stop()}}),s)}function J(t,e){if(void 0!==t)return void 0===e&&(e=""),t.join(e)}function Z(t,e,r){if(void 0!==t){var n={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"};void 0!==r&&Object.keys(r).forEach((function(t){n[t]=r[t]}));for(var i=[],a=n["zero-digit"].charCodeAt(0),o=a;o<a+10;o++)i.push(String.fromCharCode(o));var s=i.concat([n["decimal-separator"],n["exponent-separator"],n["grouping-separator"],n.digit,n["pattern-separator"]]),c=e.split(n["pattern-separator"]);if(c.length>2)throw{code:"D3080",stack:(new Error).stack};var u=function(t){var e,r,i,a,o=function(){for(var e,r=0;r<t.length;r++)if(e=t.charAt(r),-1!==s.indexOf(e)&&e!==n["exponent-separator"])return t.substring(0,r)}(),c=function(){for(var e,r=t.length-1;r>=0;r--)if(e=t.charAt(r),-1!==s.indexOf(e)&&e!==n["exponent-separator"])return t.substring(r+1)}(),u=t.substring(o.length,t.length-c.length),l=t.indexOf(n["exponent-separator"],o.length);-1===l||l>t.length-c.length?(e=u,r=void 0):(e=u.substring(0,l),r=u.substring(l+1));var h=e.indexOf(n["decimal-separator"]);return-1===h?(i=e,a=c):(i=e.substring(0,h),a=e.substring(h+1)),{prefix:o,suffix:c,activePart:u,mantissaPart:e,exponentPart:r,integerPart:i,fractionalPart:a,subpicture:t}},l=function(t){var e,r,a=t.subpicture,o=a.indexOf(n["decimal-separator"]);o!==a.lastIndexOf(n["decimal-separator"])&&(e="D3081"),a.indexOf(n.percent)!==a.lastIndexOf(n.percent)&&(e="D3082"),a.indexOf(n["per-mille"])!==a.lastIndexOf(n["per-mille"])&&(e="D3083"),-1!==a.indexOf(n.percent)&&-1!==a.indexOf(n["per-mille"])&&(e="D3084");var c=!1;for(r=0;r<t.mantissaPart.length;r++){var u=t.mantissaPart.charAt(r);if(-1!==i.indexOf(u)||u===n.digit){c=!0;break}}c||(e="D3085"),-1!==t.activePart.split("").map((function(t){return-1===s.indexOf(t)?"p":"a"})).join("").indexOf("p")&&(e="D3086"),-1!==o?a.charAt(o-1)!==n["grouping-separator"]&&a.charAt(o+1)!==n["grouping-separator"]||(e="D3087"):t.integerPart.charAt(t.integerPart.length-1)===n["grouping-separator"]&&(e="D3088"),-1!==a.indexOf(n["grouping-separator"]+n["grouping-separator"])&&(e="D3089");var l=t.integerPart.indexOf(n.digit);-1!==l&&t.integerPart.substring(0,l).split("").filter((function(t){return i.indexOf(t)>-1})).length>0&&(e="D3090"),-1!==(l=t.fractionalPart.lastIndexOf(n.digit))&&t.fractionalPart.substring(l).split("").filter((function(t){return i.indexOf(t)>-1})).length>0&&(e="D3091");var h="string"==typeof t.exponentPart;if(h&&t.exponentPart.length>0&&(-1!==a.indexOf(n.percent)||-1!==a.indexOf(n["per-mille"]))&&(e="D3092"),h&&(0===t.exponentPart.length||t.exponentPart.split("").filter((function(t){return-1===i.indexOf(t)})).length>0)&&(e="D3093"),e)throw{code:e,stack:(new Error).stack}},h=function(t){var e=function(e,r){for(var a=[],o=e.indexOf(n["grouping-separator"]);-1!==o;){var s=(r?e.substring(0,o):e.substring(o)).split("").filter((function(t){return-1!==i.indexOf(t)||t===n.digit})).length;a.push(s),o=t.integerPart.indexOf(n["grouping-separator"],o+1)}return a},r=e(t.integerPart),a=function(t){if(0===t.length)return 0;for(var e=function t(e,r){return 0===r?e:t(r,e%r)},r=t.reduce(e),n=1;n<=t.length;n++)if(-1===t.indexOf(n*r))return 0;return r},o=a(r),s=e(t.fractionalPart,!0),c=t.integerPart.split("").filter((function(t){return-1!==i.indexOf(t)})).length,u=c,l=t.fractionalPart.split(""),h=l.filter((function(t){return-1!==i.indexOf(t)})).length,f=l.filter((function(t){return-1!==i.indexOf(t)||t===n.digit})).length,d="string"==typeof t.exponentPart;0===c&&0===f&&(d?(h=1,f=1):c=1),d&&0===c&&-1!==t.integerPart.indexOf(n.digit)&&(c=1),0===c&&0===h&&(h=1);var p=0;return d&&(p=t.exponentPart.split("").filter((function(t){return-1!==i.indexOf(t)})).length),{integerPartGroupingPositions:r,regularGrouping:o,minimumIntegerPartSize:c,scalingFactor:u,prefix:t.prefix,fractionalPartGroupingPositions:s,minimumFactionalPartSize:h,maximumFactionalPartSize:f,minimumExponentSize:p,suffix:t.suffix,picture:t.subpicture}},f=c.map(u);f.forEach(l);var d,p,g,v,m=f.map(h),y=n["minus-sign"],b=n["zero-digit"],x=n["decimal-separator"],w=n["grouping-separator"];if(1===m.length&&(m.push(JSON.parse(JSON.stringify(m[0]))),m[1].prefix=y+m[1].prefix),p=-1!==(d=t>=0?m[0]:m[1]).picture.indexOf(n.percent)?100*t:-1!==d.picture.indexOf(n["per-mille"])?1e3*t:t,0===d.minimumExponentSize)g=p;else{var A=Math.pow(10,d.scalingFactor),_=Math.pow(10,d.scalingFactor-1);for(g=p,v=0;g<_;)g*=10,v-=1;for(;g>A;)g/=10,v+=1}var k=function(t,e){var r=Math.abs(t).toFixed(e);return"0"!==b&&(r=r.split("").map((function(t){return t>="0"&&t<="9"?i[t.charCodeAt(0)-48]:t})).join("")),r},E=k(it(g,d.maximumFactionalPartSize),d.maximumFactionalPartSize),S=E.indexOf(".");for(-1===S?E+=x:E=E.replace(".",x);E.charAt(0)===b;)E=E.substring(1);for(;E.charAt(E.length-1)===b;)E=E.substring(0,E.length-1);S=E.indexOf(x);var M=d.minimumIntegerPartSize-S,T=d.minimumFactionalPartSize-(E.length-S-1);if(E=(M>0?new Array(M+1).join(b):"")+E,E+=T>0?new Array(T+1).join(b):"",S=E.indexOf(x),d.regularGrouping>0)for(var P=Math.floor((S-1)/d.regularGrouping),O=1;O<=P;O++)E=[E.slice(0,S-O*d.regularGrouping),w,E.slice(S-O*d.regularGrouping)].join("");else d.integerPartGroupingPositions.forEach((function(t){E=[E.slice(0,S-t),w,E.slice(S-t)].join(""),S++}));if(S=E.indexOf(x),d.fractionalPartGroupingPositions.forEach((function(t){E=[E.slice(0,t+S+1),w,E.slice(t+S+1)].join("")})),S=E.indexOf(x),-1!==d.picture.indexOf(x)&&S!==E.length-1||(E=E.substring(0,E.length-1)),void 0!==v){var I=k(v,0);(M=d.minimumExponentSize-I.length)>0&&(I=new Array(M+1).join(b)+I),E=E+n["exponent-separator"]+(v<0?y:"")+I}return E=d.prefix+E+d.suffix}}function $(t,e){if(void 0!==t){if(t=it(t),(e=void 0===e?10:it(e))<2||e>36)throw{code:"D3100",stack:(new Error).stack,value:e};return t.toString(e)}}function tt(t){var e;if(void 0!==t){if("number"==typeof t)e=t;else if("string"==typeof t&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(t)&&!isNaN(parseFloat(t))&&isFinite(t))e=parseFloat(t);else if(!0===t)e=1;else{if(!1!==t)throw{code:"D3030",value:t,stack:(new Error).stack,index:1};e=0}return e}}function et(t){if(void 0!==t)return Math.abs(t)}function rt(t){if(void 0!==t)return Math.floor(t)}function nt(t){if(void 0!==t)return Math.ceil(t)}function it(t,e){var r;if(void 0!==t){if(e){var n=t.toString().split("e");t=+(n[0]+"e"+(n[1]?+n[1]+e:e))}var i=(r=Math.round(t))-t;return.5===Math.abs(i)&&1===Math.abs(r%2)&&(r-=1),e&&(n=r.toString().split("e"),r=+(n[0]+"e"+(n[1]?+n[1]-e:-e))),Object.is(r,-0)&&(r=0),r}}function at(t){if(void 0!==t){if(t<0)throw{stack:(new Error).stack,code:"D3060",index:1,value:t};return Math.sqrt(t)}}function ot(t,e){var r;if(void 0!==t){if(r=Math.pow(t,e),!isFinite(r))throw{stack:(new Error).stack,code:"D3061",index:1,value:t,exp:e};return r}}function st(){return Math.random()}function ct(t){if(void 0!==t){var e=!1;return Array.isArray(t)?1===t.length?e=ct(t[0]):t.length>1&&(e=t.filter((function(t){return ct(t)})).length>0):"string"==typeof t?t.length>0&&(e=!0):g(t)?0!==t&&(e=!0):null!==t&&"object"===n(t)?Object.keys(t).length>0&&(e=!0):"boolean"==typeof t&&!0===t&&(e=!0),e}}function ut(t){if(void 0!==t)return!ct(t)}function lt(t,e,r,n){var i=[e],a=_(t);return a>=2&&i.push(r),a>=3&&i.push(n),i}function ht(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(void 0!==t){o.next=2;break}return o.abrupt("return",void 0);case 2:r=y(),n=0;case 4:if(!(n<t.length)){o.next=12;break}return i=lt(e,t[n],n,t),o.delegateYield(e.apply(this,i),"t0",7);case 7:void 0!==(a=o.t0)&&r.push(a);case 9:n++,o.next=4;break;case 12:return o.abrupt("return",r);case 13:case"end":return o.stop()}}),c,this)}function ft(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(void 0!==t){o.next=2;break}return o.abrupt("return",void 0);case 2:r=y(),n=0;case 4:if(!(n<t.length)){o.next=13;break}return i=t[n],a=lt(e,i,n,t),o.delegateYield(e.apply(this,a),"t0",8);case 8:ct(o.t0)&&r.push(i);case 10:n++,o.next=4;break;case 13:return o.abrupt("return",r);case 14:case"end":return o.stop()}}),u,this)}function dt(t,e){var r,n,i,a,o,s,c;return regeneratorRuntime.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(void 0!==t){u.next=2;break}return u.abrupt("return",void 0);case 2:r=!1,i=0;case 4:if(!(i<t.length)){u.next=22;break}if(a=t[i],o=!0,void 0===e){u.next=12;break}return s=lt(e,a,i,t),u.delegateYield(e.apply(this,s),"t0",10);case 10:c=u.t0,o=ct(c);case 12:if(!o){u.next=19;break}if(r){u.next=18;break}n=a,r=!0,u.next=19;break;case 18:throw{stack:(new Error).stack,code:"D3138",index:i};case 19:i++,u.next=4;break;case 22:if(r){u.next=24;break}throw{stack:(new Error).stack,code:"D3139"};case 24:return u.abrupt("return",n);case 25:case"end":return u.stop()}}),l,this)}function pt(){for(var t=[],e=Array.prototype.slice.call(arguments),r=Math.min.apply(Math,e.map((function(t){return Array.isArray(t)?t.length:0}))),n=0;n<r;n++){var i=e.map((function(t){return t[n]}));t.push(i)}return t}function gt(t,e,r){var n,i,a,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(void 0!==t){s.next=2;break}return s.abrupt("return",void 0);case 2:if(!((i=_(e))<2)){s.next=5;break}throw{stack:(new Error).stack,code:"D3050",index:1};case 5:void 0===r&&t.length>0?(n=t[0],a=1):(n=r,a=0);case 6:if(!(a<t.length)){s.next=15;break}return o=[n,t[a]],i>=3&&o.push(a),i>=4&&o.push(t),s.delegateYield(e.apply(this,o),"t0",11);case 11:n=s.t0,a++,s.next=6;break;case 15:return s.abrupt("return",n);case 16:case"end":return s.stop()}}),h,this)}function vt(t){var e=y();if(Array.isArray(t)){var r={};t.forEach((function(t){vt(t).forEach((function(t){r[t]=!0}))})),e=vt(r)}else null===t||"object"!==n(t)||w(t)||Object.keys(t).forEach((function(t){return e.push(t)}));return e}function mt(t,e){var r;if(Array.isArray(t)){r=y();for(var i=0;i<t.length;i++){var a=mt(t[i],e);void 0!==a&&(Array.isArray(a)?a.forEach((function(t){return r.push(t)})):r.push(a))}}else null!==t&&"object"===n(t)&&(r=t[e]);return r}function yt(t,e){return void 0===t?e:void 0===e?t:(Array.isArray(t)||(t=y(t)),Array.isArray(e)||(e=[e]),t.concat(e))}function bt(t){return void 0!==t}function xt(t){var e=y();if(Array.isArray(t))t.forEach((function(t){e=yt(e,xt(t))}));else if(null===t||"object"!==n(t)||w(t))e=t;else for(var r in t){var i={};i[r]=t[r],e.push(i)}return e}function wt(t){if(void 0!==t){var e={};return t.forEach((function(t){for(var r in t)e[r]=t[r]})),e}}function At(t){if(void 0!==t){if(t.length<=1)return t;for(var e=t.length,r=new Array(e),n=0;n<e;n++)r[e-n-1]=t[n];return r}}function _t(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:r=y(),o.t0=regeneratorRuntime.keys(t);case 2:if((o.t1=o.t0()).done){o.next=10;break}return n=o.t1.value,i=lt(e,t[n],n,t),o.delegateYield(e.apply(this,i),"t2",6);case 6:void 0!==(a=o.t2)&&r.push(a),o.next=2;break;case 10:return o.abrupt("return",r);case 11:case"end":return o.stop()}}),f,this)}function kt(t){throw{code:"D3137",stack:(new Error).stack,message:t||"$error() function evaluated"}}function Et(t,e){if(!t)throw{code:"D3141",stack:(new Error).stack,message:e||"$assert() statement failed"}}function St(t){if(void 0!==t)return null===t?"null":g(t)?"number":"string"==typeof t?"string":"boolean"==typeof t?"boolean":Array.isArray(t)?"array":x(t)?"function":"object"}function Mt(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(void 0!==t){o.next=2;break}return o.abrupt("return",void 0);case 2:if(!(t.length<=1)){o.next=4;break}return o.abrupt("return",t);case 4:if(void 0!==e){o.next=10;break}if(m(t)||v(t)){o.next=7;break}throw{stack:(new Error).stack,code:"D3070",index:1};case 7:r=regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e>r);case 1:case"end":return t.stop()}}),t)})),o.next=11;break;case 10:r=e;case 11:return n=regeneratorRuntime.mark((function t(e,n){var i,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=regeneratorRuntime.mark((function t(e,n,i){return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(0!==n.length){a.next=4;break}Array.prototype.push.apply(e,i),a.next=16;break;case 4:if(0!==i.length){a.next=8;break}Array.prototype.push.apply(e,n),a.next=16;break;case 8:return a.delegateYield(r(n[0],i[0]),"t0",9);case 9:if(!a.t0){a.next=14;break}return e.push(i[0]),a.delegateYield(t(e,n,i.slice(1)),"t1",12);case 12:a.next=16;break;case 14:return e.push(n[0]),a.delegateYield(t(e,n.slice(1),i),"t2",16);case 16:case"end":return a.stop()}}),t)})),a=[],t.delegateYield(i(a,e,n),"t0",3);case 3:return t.abrupt("return",a);case 4:case"end":return t.stop()}}),t)})),i=regeneratorRuntime.mark((function t(e){var r,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(Array.isArray(e)&&!(e.length<=1)){o.next=4;break}return o.abrupt("return",e);case 4:return r=Math.floor(e.length/2),i=e.slice(0,r),a=e.slice(r),o.delegateYield(t(i),"t0",8);case 8:return i=o.t0,o.delegateYield(t(a),"t1",10);case 10:return a=o.t1,o.delegateYield(n(i,a),"t2",12);case 12:return o.abrupt("return",o.t2);case 13:case"end":return o.stop()}}),t)})),o.delegateYield(i(t),"t0",14);case 14:return a=o.t0,o.abrupt("return",a);case 16:case"end":return o.stop()}}),d)}function Tt(t){if(void 0!==t){if(t.length<=1)return t;for(var e=new Array(t.length),r=0;r<t.length;r++){var n=Math.floor(Math.random()*(r+1));r!==n&&(e[r]=e[n]),e[n]=t[r]}return e}}function Pt(t){if(void 0!==t){if(!Array.isArray(t)||t.length<=1)return t;for(var e=b(t)?y():[],r=0;r<t.length;r++){for(var n=t[r],i=!1,a=0;a<e.length;a++)if(k(n,e[a])){i=!0;break}i||e.push(n)}return e}}function Ot(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:r={},o.t0=regeneratorRuntime.keys(t);case 2:if((o.t1=o.t0()).done){o.next=11;break}return n=o.t1.value,i=t[n],a=lt(e,i,n,t),o.delegateYield(e.apply(this,a),"t2",7);case 7:ct(o.t2)&&(r[n]=i),o.next=2;break;case 11:return 0===Object.keys(r).length&&(r=void 0),o.abrupt("return",r);case 13:case"end":return o.stop()}}),p,this)}return{sum:S,count:M,max:T,min:P,average:O,string:I,substring:R,substringBefore:C,substringAfter:j,lowercase:D,uppercase:L,length:z,trim:F,pad:B,match:Y,contains:U,replace:G,split:K,join:J,formatNumber:Z,formatBase:$,number:tt,floor:rt,ceil:nt,round:it,abs:et,sqrt:at,power:ot,random:st,boolean:ct,not:ut,map:ht,zip:pt,filter:ft,single:dt,foldLeft:gt,sift:Ot,keys:vt,lookup:mt,append:yt,exists:bt,spread:xt,merge:wt,reverse:At,each:_t,error:kt,assert:Et,type:St,sort:Mt,shuffle:Tt,distinct:Pt,base64encode:H,base64decode:W,encodeUrlComponent:q,encodeUrl:X,decodeUrlComponent:V,decodeUrl:Q}}();r.exports=a}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./utils":6}],3:[function(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=t("./datetime"),a=t("./functions"),o=t("./utils"),s=t("./parser"),c=t("./signature"),u=function(){var t=regeneratorRuntime.mark(B),e=regeneratorRuntime.mark(N),r=regeneratorRuntime.mark(Y),u=regeneratorRuntime.mark(G),l=regeneratorRuntime.mark(H),h=regeneratorRuntime.mark(W),f=regeneratorRuntime.mark(q),d=regeneratorRuntime.mark(X),p=regeneratorRuntime.mark(it),g=regeneratorRuntime.mark(st),v=regeneratorRuntime.mark(lt),m=regeneratorRuntime.mark(ht),y=regeneratorRuntime.mark(ft),b=regeneratorRuntime.mark(gt),x=regeneratorRuntime.mark(yt),w=regeneratorRuntime.mark(bt),A=regeneratorRuntime.mark(xt),_=regeneratorRuntime.mark(wt),k=regeneratorRuntime.mark(_t),E=regeneratorRuntime.mark(Et),S=regeneratorRuntime.mark(Tt),M=regeneratorRuntime.mark(It),T=o.isNumeric,P=o.isArrayOfStrings,O=o.isArrayOfNumbers,I=o.createSequence,R=o.isSequence,C=o.isFunction,j=o.isLambda,D=o.isIterable,L=o.getFunctionArity,z=o.isDeepEqual,F=Ct(null);function B(e,r,n){var i,a,o,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(a=n.lookup("__evaluate_entry"))&&a(e,r,n),t.t0=e.type,t.next="path"===t.t0?5:"binary"===t.t0?8:"unary"===t.t0?11:"name"===t.t0?14:"string"===t.t0||"number"===t.t0||"value"===t.t0?16:"wildcard"===t.t0?18:"descendant"===t.t0?20:"parent"===t.t0?22:"condition"===t.t0?24:"block"===t.t0?27:"bind"===t.t0?30:"regex"===t.t0?33:"function"===t.t0?35:"variable"===t.t0?38:"lambda"===t.t0?40:"partial"===t.t0?42:"apply"===t.t0?45:"transform"===t.t0?48:50;break;case 5:return t.delegateYield(N(e,r,n),"t1",6);case 6:return i=t.t1,t.abrupt("break",50);case 8:return t.delegateYield(q(e,r,n),"t2",9);case 9:return i=t.t2,t.abrupt("break",50);case 11:return t.delegateYield(X(e,r,n),"t3",12);case 12:return i=t.t3,t.abrupt("break",50);case 14:return i=V(e,r),t.abrupt("break",50);case 16:return i=Q(e),t.abrupt("break",50);case 18:return i=K(e,r),t.abrupt("break",50);case 20:return i=Z(e,r),t.abrupt("break",50);case 22:return i=n.lookup(e.slot.label),t.abrupt("break",50);case 24:return t.delegateYield(ht(e,r,n),"t4",25);case 25:return i=t.t4,t.abrupt("break",50);case 27:return t.delegateYield(ft(e,r,n),"t5",28);case 28:return i=t.t5,t.abrupt("break",50);case 30:return t.delegateYield(lt(e,r,n),"t6",31);case 31:return i=t.t6,t.abrupt("break",50);case 33:return i=dt(e),t.abrupt("break",50);case 35:return t.delegateYield(bt(e,r,n),"t7",36);case 36:return i=t.t7,t.abrupt("break",50);case 38:return i=pt(e,r,n),t.abrupt("break",50);case 40:return i=At(e,r,n),t.abrupt("break",50);case 42:return t.delegateYield(_t(e,r,n),"t8",43);case 43:return i=t.t8,t.abrupt("break",50);case 45:return t.delegateYield(yt(e,r,n),"t9",46);case 46:return i=t.t9,t.abrupt("break",50);case 48:return i=vt(e,r,n),t.abrupt("break",50);case 50:if(!n.async||null!=i&&"function"==typeof i.then||(i=Promise.resolve(i)),!n.async||"function"!=typeof i.then||!e.nextFunction||"function"!=typeof i[e.nextFunction]){t.next=54;break}t.next=57;break;case 54:return t.next=56,i;case 56:i=t.sent;case 57:if(!Object.prototype.hasOwnProperty.call(e,"predicate")){t.next=65;break}o=0;case 59:if(!(o<e.predicate.length)){t.next=65;break}return t.delegateYield(W(e.predicate[o].expr,i,n),"t10",61);case 61:i=t.t10;case 62:o++,t.next=59;break;case 65:if("path"===e.type||!Object.prototype.hasOwnProperty.call(e,"group")){t.next=68;break}return t.delegateYield(st(e.group,i,n),"t11",67);case 67:i=t.t11;case 68:return(s=n.lookup("__evaluate_exit"))&&s(e,r,n,i),i&&R(i)&&!i.tupleStream&&(e.keepArray&&(i.keepSingleton=!0),0===i.length?i=void 0:1===i.length&&(i=i.keepSingleton?i:i[0])),t.abrupt("return",i);case 72:case"end":return t.stop()}}),t)}function N(t,r,n){var i,a,o,s,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=Array.isArray(r)&&"variable"!==t.steps[0].type?r:I(r),o=!1,s=void 0,c=0;case 4:if(!(c<t.steps.length)){e.next=25;break}if((u=t.steps[c]).tuple&&(o=!0),0!==c||!u.consarray){e.next=12;break}return e.delegateYield(B(u,i,n),"t0",9);case 9:a=e.t0,e.next=19;break;case 12:if(!o){e.next=17;break}return e.delegateYield(H(u,i,s,n),"t1",14);case 14:s=e.t1,e.next=19;break;case 17:return e.delegateYield(Y(u,i,n,c===t.steps.length-1),"t2",18);case 18:a=e.t2;case 19:if(o||void 0!==a&&0!==a.length){e.next=21;break}return e.abrupt("break",25);case 21:void 0===u.focus&&(i=a);case 22:c++,e.next=4;break;case 25:if(o)if(t.tuple)a=s;else for(a=I(),c=0;c<s.length;c++)a.push(s[c]["@"]);if(t.keepSingletonArray&&(Array.isArray(a)&&a.cons&&!a.sequence&&(a=I(a)),a.keepSingleton=!0),!t.hasOwnProperty("group")){e.next=30;break}return e.delegateYield(st(t.group,o?s:a,n),"t3",29);case 29:a=e.t3;case 30:return e.abrupt("return",a);case 31:case"end":return e.stop()}}),e)}function U(t,e){var r=Ct(t);for(var n in e)r.bind(n,e[n]);return r}function Y(t,e,n,i){var a,o,s,c,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("sort"!==t.type){r.next=7;break}return r.delegateYield(gt(t,e,n),"t0",2);case 2:if(a=r.t0,!t.stages){r.next=6;break}return r.delegateYield(G(t.stages,a,n),"t1",5);case 5:a=r.t1;case 6:return r.abrupt("return",a);case 7:a=I(),o=0;case 9:if(!(o<e.length)){r.next=24;break}return r.delegateYield(B(t,e[o],n),"t2",11);case 11:if(s=r.t2,!t.stages){r.next=20;break}c=0;case 14:if(!(c<t.stages.length)){r.next=20;break}return r.delegateYield(W(t.stages[c].expr,s,n),"t3",16);case 16:s=r.t3;case 17:c++,r.next=14;break;case 20:void 0!==s&&a.push(s);case 21:o++,r.next=9;break;case 24:return u=I(),i&&1===a.length&&Array.isArray(a[0])&&!R(a[0])?u=a[0]:a.forEach((function(t){!Array.isArray(t)||t.cons?u.push(t):t.forEach((function(t){return u.push(t)}))})),r.abrupt("return",u);case 27:case"end":return r.stop()}}),r)}function G(t,e,r){var n,i,a,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:n=e,i=0;case 2:if(!(i<t.length)){s.next=15;break}a=t[i],s.t0=a.type,s.next="filter"===s.t0?7:"index"===s.t0?10:12;break;case 7:return s.delegateYield(W(a.expr,n,r),"t1",8);case 8:return n=s.t1,s.abrupt("break",12);case 10:for(o=0;o<n.length;o++)n[o][a.value]=o;return s.abrupt("break",12);case 12:i++,s.next=2;break;case 15:return s.abrupt("return",n);case 16:case"end":return s.stop()}}),u)}function H(t,e,r,n){var i,a,o,s,c,u,h,f;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if("sort"!==t.type){l.next=15;break}if(!r){l.next=6;break}return l.delegateYield(gt(t,r,n),"t0",3);case 3:i=l.t0,l.next=11;break;case 6:return l.delegateYield(gt(t,e,n),"t1",7);case 7:for(a=l.t1,(i=I()).tupleStream=!0,o=0;o<a.length;o++)(s={"@":a[o]})[t.index]=o,i.push(s);case 11:if(!t.stages){l.next=14;break}return l.delegateYield(G(t.stages,i,n),"t2",13);case 13:i=l.t2;case 14:return l.abrupt("return",i);case 15:(i=I()).tupleStream=!0,c=n,void 0===r&&(r=e.map((function(t){return{"@":t}}))),u=0;case 20:if(!(u<r.length)){l.next=28;break}return c=U(n,r[u]),l.delegateYield(B(t,r[u]["@"],c),"t3",23);case 23:if(void 0!==(h=l.t3))for(Array.isArray(h)||(h=[h]),f=0;f<h.length;f++)s={},Object.assign(s,r[u]),h.tupleStream?Object.assign(s,h[f]):(t.focus?(s[t.focus]=h[f],s["@"]=r[u]["@"]):s["@"]=h[f],t.index&&(s[t.index]=f),t.ancestor&&(s[t.ancestor.label]=r[u]["@"])),i.push(s);case 25:u++,l.next=20;break;case 28:if(!t.stages){l.next=31;break}return l.delegateYield(G(t.stages,i,n),"t4",30);case 30:i=l.t4;case 31:return l.abrupt("return",i);case 32:case"end":return l.stop()}}),l)}function W(t,e,r){var n,i,o,s,c,u;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(n=I(),e&&e.tupleStream&&(n.tupleStream=!0),Array.isArray(e)||(e=I(e)),"number"!==t.type){l.next=10;break}(i=Math.floor(t.value))<0&&(i=e.length+i),void 0!==(o=e[i])&&(Array.isArray(o)?n=o:n.push(o)),l.next=23;break;case 10:i=0;case 11:if(!(i<e.length)){l.next=23;break}return o=e[i],s=o,c=r,e.tupleStream&&(s=o["@"],c=U(r,o)),l.delegateYield(B(t,s,c),"t0",17);case 17:u=l.t0,T(u)&&(u=[u]),O(u)?u.forEach((function(t){var r=Math.floor(t);r<0&&(r=e.length+r),r===i&&n.push(o)})):a.boolean(u)&&n.push(o);case 20:i++,l.next=11;break;case 23:return l.abrupt("return",n);case 24:case"end":return l.stop()}}),h)}function q(t,e,r){var n,i,a,o,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.delegateYield(B(t.lhs,e,r),"t0",1);case 1:if(i=c.t0,a=t.value,o=regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.delegateYield(B(t.rhs,e,r),"t0",1);case 1:return n.abrupt("return",n.t0);case 2:case"end":return n.stop()}}),n)})),"and"!==a&&"or"!==a){c.next=15;break}return c.prev=5,c.delegateYield(it(i,o,a),"t1",7);case 7:return c.abrupt("return",c.t1);case 10:throw c.prev=10,c.t2=c.catch(5),c.t2.position=t.position,c.t2.token=a,c.t2;case 15:return c.delegateYield(o(),"t3",16);case 16:s=c.t3,c.prev=17,c.t4=a,c.next="+"===c.t4||"-"===c.t4||"*"===c.t4||"/"===c.t4||"%"===c.t4?21:"="===c.t4||"!="===c.t4?23:"<"===c.t4||"<="===c.t4||">"===c.t4||">="===c.t4?25:"&"===c.t4?27:".."===c.t4?29:"in"===c.t4?31:33;break;case 21:return n=tt(i,s,a),c.abrupt("break",33);case 23:return n=et(i,s,a),c.abrupt("break",33);case 25:return n=rt(i,s,a),c.abrupt("break",33);case 27:return n=ot(i,s),c.abrupt("break",33);case 29:return n=ut(i,s),c.abrupt("break",33);case 31:return n=nt(i,s),c.abrupt("break",33);case 33:c.next=40;break;case 35:throw c.prev=35,c.t5=c.catch(17),c.t5.position=t.position,c.t5.token=a,c.t5;case 40:return c.abrupt("return",n);case 41:case"end":return c.stop()}}),f,null,[[5,10],[17,35]])}function X(t,e,r){var n,i,o,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:c.t0=t.value,c.next="-"===c.t0?3:"["===c.t0?15:"{"===c.t0?27:30;break;case 3:return c.delegateYield(B(t.expression,e,r),"t1",4);case 4:if(void 0!==(n=c.t1)){c.next=9;break}n=void 0,c.next=14;break;case 9:if(!T(n)){c.next=13;break}n=-n,c.next=14;break;case 13:throw{code:"D1002",stack:(new Error).stack,position:t.position,token:t.value,value:n};case 14:return c.abrupt("break",30);case 15:n=[],i=0;case 17:if(!(i<t.expressions.length)){c.next=25;break}return o=t.expressions[i],c.delegateYield(B(o,e,r),"t2",20);case 20:void 0!==(s=c.t2)&&("["===o.value?n.push(s):n=a.append(n,s));case 22:i++,c.next=17;break;case 25:return t.consarray&&Object.defineProperty(n,"cons",{enumerable:!1,configurable:!1,value:!0}),c.abrupt("break",30);case 27:return c.delegateYield(st(t,e,r),"t3",28);case 28:return n=c.t3,c.abrupt("break",30);case 30:return c.abrupt("return",n);case 31:case"end":return c.stop()}}),d)}function V(t,e,r){return a.lookup(e,t.value)}function Q(t){return t.value}function K(t,e){var r=I();return Array.isArray(e)&&e.outerWrapper&&e.length>0&&(e=e[0]),null!==e&&"object"===n(e)&&Object.keys(e).forEach((function(t){var n=e[t];Array.isArray(n)?(n=J(n),r=a.append(r,n)):r.push(n)})),r}function J(t,e){return void 0===e&&(e=[]),Array.isArray(t)?t.forEach((function(t){J(t,e)})):e.push(t),e}function Z(t,e){var r,n=I();return void 0!==e&&($(e,n),r=1===n.length?n[0]:n),r}function $(t,e){Array.isArray(t)||e.push(t),Array.isArray(t)?t.forEach((function(t){$(t,e)})):null!==t&&"object"===n(t)&&Object.keys(t).forEach((function(r){$(t[r],e)}))}function tt(t,e,r){var n;if(void 0!==t&&!T(t))throw{code:"T2001",stack:(new Error).stack,value:t};if(void 0!==e&&!T(e))throw{code:"T2002",stack:(new Error).stack,value:e};if(void 0===t||void 0===e)return n;switch(r){case"+":n=t+e;break;case"-":n=t-e;break;case"*":n=t*e;break;case"/":n=t/e;break;case"%":n=t%e}return n}function et(t,e,r){var i,a=n(t),o=n(e);if("undefined"===a||"undefined"===o)return!1;switch(r){case"=":i=z(t,e);break;case"!=":i=!z(t,e)}return i}function rt(t,e,r){var i,a=n(t),o=n(e);if("undefined"!==a&&"string"!==a&&"number"!==a||"undefined"!==o&&"string"!==o&&"number"!==o)throw{code:"T2010",stack:(new Error).stack,value:"string"!==a&&"number"!==a?t:e};if("undefined"!==a&&"undefined"!==o){if(a!==o)throw{code:"T2009",stack:(new Error).stack,value:t,value2:e};switch(r){case"<":i=t<e;break;case"<=":i=t<=e;break;case">":i=t>e;break;case">=":i=t>=e}return i}}function nt(t,e){var r=!1;if(void 0===t||void 0===e)return!1;Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++)if(e[n]===t){r=!0;break}return r}function it(t,e,r){var n,i;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:i=at(t),a.t0=r,a.next="and"===a.t0?4:"or"===a.t0?12:20;break;case 4:if(a.t1=i,!a.t1){a.next=10;break}return a.t2=at,a.delegateYield(e(),"t3",8);case 8:a.t4=a.t3,a.t1=(0,a.t2)(a.t4);case 10:return n=a.t1,a.abrupt("break",20);case 12:if(a.t5=i,a.t5){a.next=18;break}return a.t6=at,a.delegateYield(e(),"t7",16);case 16:a.t8=a.t7,a.t5=(0,a.t6)(a.t8);case 18:return n=a.t5,a.abrupt("break",20);case 20:return a.abrupt("return",n);case 21:case"end":return a.stop()}}),p)}function at(t){var e=a.boolean(t);return void 0!==e&&e}function ot(t,e){var r="",n="";return void 0!==t&&(r=a.string(t)),void 0!==e&&(n=a.string(e)),r.concat(n)}function st(t,e,r){var n,i,o,s,c,u,l,h,f,d,p,v,m;return regeneratorRuntime.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:n={},i={},o=!(!e||!e.tupleStream),Array.isArray(e)||(e=I(e)),0===e.length&&e.push(void 0),s=0;case 6:if(!(s<e.length)){g.next=31;break}c=e[s],u=o?U(r,c):r,l=0;case 10:if(!(l<t.lhs.length)){g.next=28;break}return h=t.lhs[l],g.delegateYield(B(h[0],o?c["@"]:c,u),"t0",13);case 13:if("string"==typeof(f=g.t0)||void 0===f){g.next=16;break}throw{code:"T1003",stack:(new Error).stack,position:t.position,value:f};case 16:if(void 0===f){g.next=25;break}if(d={data:c,exprIndex:l},!i.hasOwnProperty(f)){g.next=24;break}if(i[f].exprIndex===l){g.next=21;break}throw{code:"D1009",stack:(new Error).stack,position:t.position,value:f};case 21:i[f].data=a.append(i[f].data,c),g.next=25;break;case 24:i[f]=d;case 25:l++,g.next=10;break;case 28:s++,g.next=6;break;case 31:g.t1=regeneratorRuntime.keys(i);case 32:if((g.t2=g.t1()).done){g.next=43;break}return f=g.t2.value,d=i[f],p=d.data,u=r,o&&(v=ct(d.data),p=v["@"],delete v["@"],u=U(r,v)),g.delegateYield(B(t.lhs[d.exprIndex][1],p,u),"t3",39);case 39:void 0!==(m=g.t3)&&(n[f]=m),g.next=32;break;case 43:return g.abrupt("return",n);case 44:case"end":return g.stop()}}),g)}function ct(t){if(!Array.isArray(t))return t;var e={};Object.assign(e,t[0]);for(var r=1;r<t.length;r++)for(var n in t[r])e[n]=a.append(e[n],t[r][n]);return e}function ut(t,e){var r;if(void 0!==t&&!Number.isInteger(t))throw{code:"T2003",stack:(new Error).stack,value:t};if(void 0!==e&&!Number.isInteger(e))throw{code:"T2004",stack:(new Error).stack,value:e};if(void 0===t||void 0===e)return r;if(t>e)return r;var n=e-t+1;if(n>1e7)throw{code:"D2014",stack:(new Error).stack,value:n};r=new Array(n);for(var i=t,a=0;i<=e;i++,a++)r[a]=i;return r.sequence=!0,r}function lt(t,e,r){var n;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.delegateYield(B(t.rhs,e,r),"t0",1);case 1:return n=i.t0,r.bind(t.lhs.value,n),i.abrupt("return",n);case 4:case"end":return i.stop()}}),v)}function ht(t,e,r){var n,i;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.delegateYield(B(t.condition,e,r),"t0",1);case 1:if(i=o.t0,!a.boolean(i)){o.next=7;break}return o.delegateYield(B(t.then,e,r),"t1",4);case 4:n=o.t1,o.next=10;break;case 7:if(void 0===t.else){o.next=10;break}return o.delegateYield(B(t.else,e,r),"t2",9);case 9:n=o.t2;case 10:return o.abrupt("return",n);case 11:case"end":return o.stop()}}),m)}function ft(t,e,r){var n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:i=Ct(r),a=0;case 2:if(!(a<t.expressions.length)){o.next=8;break}return o.delegateYield(B(t.expressions[a],e,i),"t0",4);case 4:n=o.t0;case 5:a++,o.next=2;break;case 8:return o.abrupt("return",n);case 9:case"end":return o.stop()}}),y)}function dt(t){var e=new Lt.RegexEngine(t.value),r=function r(n,i){var a;e.lastIndex=i||0;var o=e.exec(n);if(null!==o){if(a={match:o[0],start:o.index,end:o.index+o[0].length,groups:[]},o.length>1)for(var s=1;s<o.length;s++)a.groups.push(o[s]);a.next=function(){if(!(e.lastIndex>=n.length)){var i=r(n,e.lastIndex);if(i&&""===i.match)throw{code:"D1004",stack:(new Error).stack,position:t.position,value:t.value.source};return i}}}return a};return r}function pt(t,e,r){return""===t.value?e&&e.outerWrapper?e[0]:e:r.lookup(t.value)}function gt(t,e,r){var i,o,s,c,u;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return o=e,s=!!e.tupleStream,c=regeneratorRuntime.mark((function e(i,a){var o,c,u,l,h,f,d,p,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=0,c=0;case 2:if(!(0===o&&c<t.terms.length)){e.next=35;break}return u=t.terms[c],l=i,h=r,s&&(l=i["@"],h=U(r,i)),e.delegateYield(B(u.expression,l,h),"t0",8);case 8:return f=e.t0,l=a,h=r,s&&(l=a["@"],h=U(r,a)),e.delegateYield(B(u.expression,l,h),"t1",13);case 13:if(d=e.t1,p=n(f),g=n(d),"undefined"!==p){e.next=19;break}return o="undefined"===g?0:1,e.abrupt("continue",32);case 19:if("undefined"!==g){e.next=22;break}return o=-1,e.abrupt("continue",32);case 22:if(!("string"!==p&&"number"!==p||"string"!==g&&"number"!==g)){e.next=24;break}throw{code:"T2008",stack:(new Error).stack,position:t.position,value:"string"!==p&&"number"!==p?f:d};case 24:if(p===g){e.next=26;break}throw{code:"T2007",stack:(new Error).stack,position:t.position,value:f,value2:d};case 26:if(f!==d){e.next=30;break}return e.abrupt("continue",32);case 30:o=f<d?-1:1;case 31:!0===u.descending&&(o=-o);case 32:c++,e.next=2;break;case 35:return e.abrupt("return",1===o);case 36:case"end":return e.stop()}}),e)})),u={environment:r,input:e},l.delegateYield(a.sort.apply(u,[o,c]),"t0",5);case 5:return i=l.t0,l.abrupt("return",i);case 7:case"end":return l.stop()}}),b)}function vt(t,e,r){var i=regeneratorRuntime.mark((function e(i){var a,o,s,c,u,l,h,f,d,p,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==i){e.next=2;break}return e.abrupt("return",void 0);case 2:if(a=r.lookup("clone"),C(a)){e.next=5;break}throw{code:"T2013",stack:(new Error).stack,position:t.position};case 5:return e.delegateYield(xt(a,[i],null,r),"t0",6);case 6:return o=e.t0,e.delegateYield(B(t.pattern,o,r),"t1",8);case 8:if(void 0===(s=e.t1)){e.next=33;break}Array.isArray(s)||(s=[s]),c=0;case 12:if(!(c<s.length)){e.next=33;break}return u=s[c],e.delegateYield(B(t.update,u,r),"t2",15);case 15:if(l=e.t2,"undefined"===(h=n(l))){e.next=21;break}if("object"===h&&null!==l&&!Array.isArray(l)){e.next=20;break}throw{code:"T2011",stack:(new Error).stack,position:t.update.position,value:l};case 20:for(f in l)u[f]=l[f];case 21:if(void 0===t.delete){e.next=30;break}return e.delegateYield(B(t.delete,u,r),"t3",23);case 23:if(void 0===(d=e.t3)){e.next=30;break}if(p=d,Array.isArray(d)||(d=[d]),P(d)){e.next=29;break}throw{code:"T2012",stack:(new Error).stack,position:t.delete.position,value:p};case 29:for(g=0;g<d.length;g++)"object"===n(u)&&null!==u&&delete u[d[g]];case 30:c++,e.next=12;break;case 33:return e.abrupt("return",o);case 34:case"end":return e.stop()}}),e)}));return Ot(i,"<(oa):o>")}var mt=s("function($f, $g) { function($x){ $g($f($x)) } }");function yt(t,e,r){var n,i,a,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.delegateYield(B(t.lhs,e,r),"t0",1);case 1:if(i=s.t0,"function"!==t.rhs.type){s.next=7;break}return s.delegateYield(bt(t.rhs,e,r,{context:i}),"t1",4);case 4:n=s.t1,s.next=20;break;case 7:return s.delegateYield(B(t.rhs,e,r),"t2",8);case 8:if(a=s.t2,C(a)){s.next=11;break}throw{code:"T2006",stack:(new Error).stack,position:t.position,value:a};case 11:if(!C(i)){s.next=18;break}return s.delegateYield(B(mt,null,r),"t3",13);case 13:return o=s.t3,s.delegateYield(xt(o,[i,a],null,r),"t4",15);case 15:n=s.t4,s.next=20;break;case 18:return s.delegateYield(xt(a,[i],null,r),"t5",19);case 19:n=s.t5;case 20:return s.abrupt("return",n);case 21:case"end":return s.stop()}}),x)}function bt(t,e,r,i){var a,o,s,c,u,l;return regeneratorRuntime.wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return h.delegateYield(B(t.procedure,e,r),"t0",1);case 1:if(void 0!==(o=h.t0)||"path"!==t.procedure.type||!r.lookup(t.procedure.steps[0].value)){h.next=4;break}throw{code:"T1005",stack:(new Error).stack,position:t.position,token:t.procedure.steps[0].value};case 4:s=[],void 0!==i&&s.push(i.context),c=regeneratorRuntime.mark((function n(){var i,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.delegateYield(B(t.arguments[u],e,r),"t0",1);case 1:i=n.t0,C(i)?(a=regeneratorRuntime.mark((function t(){var e,n,a,o=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=o.length,n=new Array(e),a=0;a<e;a++)n[a]=o[a];return t.delegateYield(xt(i,n,null,r),"t0",2);case 2:return t.abrupt("return",t.t0);case 3:case"end":return t.stop()}}),t)})),a.arity=L(i),s.push(a)):s.push(i);case 3:case"end":return n.stop()}}),n)})),u=0;case 8:if(!(u<t.arguments.length)){h.next=13;break}return h.delegateYield(c(),"t1",10);case 10:u++,h.next=8;break;case 13:return l="path"===t.procedure.type?t.procedure.steps[0].value:t.procedure.value,h.prev=14,"object"===n(o)&&(o.token=l,o.position=t.position),h.delegateYield(xt(o,s,e,r),"t2",17);case 17:a=h.t2,h.next=25;break;case 20:throw h.prev=20,h.t3=h.catch(14),h.t3.position||(h.t3.position=t.position),h.t3.token||(h.t3.token=l),h.t3;case 25:return h.abrupt("return",a);case 26:case"end":return h.stop()}}),w,null,[[14,20]])}function xt(t,e,r,n){var i,a,o,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.delegateYield(wt(t,e,r,n),"t0",1);case 1:i=c.t0;case 2:if(!j(i)||!0!==i.thunk){c.next=21;break}return c.delegateYield(B(i.body.procedure,i.input,i.environment),"t1",4);case 4:a=c.t1,"variable"===i.body.procedure.type&&(a.token=i.body.procedure.value),a.position=i.body.procedure.position,o=[],s=0;case 9:if(!(s<i.body.arguments.length)){c.next=17;break}return c.t2=o,c.delegateYield(B(i.body.arguments[s],i.input,i.environment),"t3",12);case 12:c.t4=c.t3,c.t2.push.call(c.t2,c.t4);case 14:s++,c.next=9;break;case 17:return c.delegateYield(wt(a,o,r,n),"t5",18);case 18:i=c.t5,c.next=2;break;case 21:return c.abrupt("return",i);case 22:case"end":return c.stop()}}),A)}function wt(t,e,r,n){var i,a,o;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(s.prev=0,a=e,t&&(a=kt(t.signature,e,r)),!j(t)){s.next=8;break}return s.delegateYield(Et(t,a),"t0",5);case 5:i=s.t0,s.next=24;break;case 8:if(!t||!0!==t._jsonata_function){s.next=16;break}if(o={environment:n,input:r},i=t.implementation.apply(o,a),!D(i)){s.next=14;break}return s.delegateYield(i,"t1",13);case 13:i=s.t1;case 14:s.next=24;break;case 16:if("function"!=typeof t){s.next=23;break}if(i=t.apply(r,a),!D(i)){s.next=21;break}return s.delegateYield(i,"t2",20);case 20:i=s.t2;case 21:s.next=24;break;case 23:throw{code:"T1006",stack:(new Error).stack};case 24:s.next=30;break;case 26:throw s.prev=26,s.t3=s.catch(0),t&&(void 0===s.t3.token&&void 0!==t.token&&(s.t3.token=t.token),s.t3.position=t.position),s.t3;case 30:return s.abrupt("return",i);case 31:case"end":return s.stop()}}),_,null,[[0,26]])}function At(t,e,r){var n={_jsonata_lambda:!0,input:e,environment:r,arguments:t.arguments,signature:t.signature,body:t.body};return!0===t.thunk&&(n.thunk=!0),n.apply=regeneratorRuntime.mark((function t(r,i){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(xt(n,i,e,r.environment),"t0",1);case 1:return t.abrupt("return",t.t0);case 2:case"end":return t.stop()}}),t)})),n}function _t(t,e,r){var n,i,a,o,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:i=[],a=0;case 2:if(!(a<t.arguments.length)){c.next=15;break}if("operator"!==(o=t.arguments[a]).type||"?"!==o.value){c.next=8;break}i.push(o),c.next=12;break;case 8:return c.t0=i,c.delegateYield(B(o,e,r),"t1",10);case 10:c.t2=c.t1,c.t0.push.call(c.t0,c.t2);case 12:a++,c.next=2;break;case 15:return c.delegateYield(B(t.procedure,e,r),"t3",16);case 16:if(void 0!==(s=c.t3)||"path"!==t.procedure.type||!r.lookup(t.procedure.steps[0].value)){c.next=19;break}throw{code:"T1007",stack:(new Error).stack,position:t.position,token:t.procedure.steps[0].value};case 19:if(!j(s)){c.next=23;break}n=St(s,i),c.next=32;break;case 23:if(!s||!0!==s._jsonata_function){c.next=27;break}n=Mt(s.implementation,i),c.next=32;break;case 27:if("function"!=typeof s){c.next=31;break}n=Mt(s,i),c.next=32;break;case 31:throw{code:"T1008",stack:(new Error).stack,position:t.position,token:"path"===t.procedure.type?t.procedure.steps[0].value:t.procedure.value};case 32:return c.abrupt("return",n);case 33:case"end":return c.stop()}}),k)}function kt(t,e,r){return void 0===t?e:t.validate(e,r)}function Et(t,e){var r,n;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(n=Ct(t.environment),t.arguments.forEach((function(t,r){n.bind(t.value,e[r])})),"function"!=typeof t.body){i.next=7;break}return i.delegateYield(Tt(t.body,n),"t0",4);case 4:r=i.t0,i.next=9;break;case 7:return i.delegateYield(B(t.body,t.input,n),"t1",8);case 8:r=i.t1;case 9:return i.abrupt("return",r);case 10:case"end":return i.stop()}}),E)}function St(t,e){var r=Ct(t.environment),n=[];return t.arguments.forEach((function(t,i){var a=e[i];a&&"operator"===a.type&&"?"===a.value?n.push(t):r.bind(t.value,a)})),{_jsonata_lambda:!0,input:t.input,environment:r,arguments:n,body:t.body}}function Mt(t,e){var r=Pt(t),n="function("+(r=r.map((function(t){return"$"+t.trim()}))).join(", ")+"){ _ }",i=s(n);return i.body=t,St(i,e)}function Tt(t,e){var r,n,i,a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(r=Pt(t),n=r.map((function(t){return e.lookup(t.trim())})),i={environment:e},a=t.apply(i,n),!D(a)){o.next=7;break}return o.delegateYield(a,"t0",6);case 6:a=o.t0;case 7:return o.abrupt("return",a);case 8:case"end":return o.stop()}}),S)}function Pt(t){var e=t.toString();return/\(([^)]*)\)/.exec(e)[1].split(",")}function Ot(t,e){var r={_jsonata_function:!0,implementation:t};return void 0!==e&&(r.signature=c(e)),r}function It(t,e){var r,n,i;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(void 0!==t){a.next=2;break}return a.abrupt("return",void 0);case 2:r=this.input,void 0!==e&&(r=e,Array.isArray(r)&&!R(r)&&((r=I(r)).outerWrapper=!0)),a.prev=4,n=s(t,!1),a.next=12;break;case 8:throw a.prev=8,a.t0=a.catch(4),Dt(a.t0),{stack:(new Error).stack,code:"D3120",value:a.t0.message,error:a.t0};case 12:return a.prev=12,a.delegateYield(B(n,r,this.environment),"t1",14);case 14:i=a.t1,a.next=21;break;case 17:throw a.prev=17,a.t2=a.catch(12),Dt(a.t2),{stack:(new Error).stack,code:"D3121",value:a.t2.message,error:a.t2};case 21:return a.abrupt("return",i);case 22:case"end":return a.stop()}}),M,this,[[4,8],[12,17]])}function Rt(t){if(void 0!==t)return JSON.parse(a.string(t))}function Ct(t){var e={};return{bind:function(t,r){e[t]=r},lookup:function(r){var n;return e.hasOwnProperty(r)?n=e[r]:t&&(n=t.lookup(r)),n},timestamp:t?t.timestamp:null,async:!!t&&t.async,global:t?t.global:{ancestry:[null]}}}F.bind("sum",Ot(a.sum,"<a<n>:n>")),F.bind("count",Ot(a.count,"<a:n>")),F.bind("max",Ot(a.max,"<a<n>:n>")),F.bind("min",Ot(a.min,"<a<n>:n>")),F.bind("average",Ot(a.average,"<a<n>:n>")),F.bind("string",Ot(a.string,"<x-b?:s>")),F.bind("substring",Ot(a.substring,"<s-nn?:s>")),F.bind("substringBefore",Ot(a.substringBefore,"<s-s:s>")),F.bind("substringAfter",Ot(a.substringAfter,"<s-s:s>")),F.bind("lowercase",Ot(a.lowercase,"<s-:s>")),F.bind("uppercase",Ot(a.uppercase,"<s-:s>")),F.bind("length",Ot(a.length,"<s-:n>")),F.bind("trim",Ot(a.trim,"<s-:s>")),F.bind("pad",Ot(a.pad,"<s-ns?:s>")),F.bind("match",Ot(a.match,"<s-f<s:o>n?:a<o>>")),F.bind("contains",Ot(a.contains,"<s-(sf):b>")),F.bind("replace",Ot(a.replace,"<s-(sf)(sf)n?:s>")),F.bind("split",Ot(a.split,"<s-(sf)n?:a<s>>")),F.bind("join",Ot(a.join,"<a<s>s?:s>")),F.bind("formatNumber",Ot(a.formatNumber,"<n-so?:s>")),F.bind("formatBase",Ot(a.formatBase,"<n-n?:s>")),F.bind("formatInteger",Ot(i.formatInteger,"<n-s:s>")),F.bind("parseInteger",Ot(i.parseInteger,"<s-s:n>")),F.bind("number",Ot(a.number,"<(nsb)-:n>")),F.bind("floor",Ot(a.floor,"<n-:n>")),F.bind("ceil",Ot(a.ceil,"<n-:n>")),F.bind("round",Ot(a.round,"<n-n?:n>")),F.bind("abs",Ot(a.abs,"<n-:n>")),F.bind("sqrt",Ot(a.sqrt,"<n-:n>")),F.bind("power",Ot(a.power,"<n-n:n>")),F.bind("random",Ot(a.random,"<:n>")),F.bind("boolean",Ot(a.boolean,"<x-:b>")),F.bind("not",Ot(a.not,"<x-:b>")),F.bind("map",Ot(a.map,"<af>")),F.bind("zip",Ot(a.zip,"<a+>")),F.bind("filter",Ot(a.filter,"<af>")),F.bind("single",Ot(a.single,"<af?>")),F.bind("reduce",Ot(a.foldLeft,"<afj?:j>")),F.bind("sift",Ot(a.sift,"<o-f?:o>")),F.bind("keys",Ot(a.keys,"<x-:a<s>>")),F.bind("lookup",Ot(a.lookup,"<x-s:x>")),F.bind("append",Ot(a.append,"<xx:a>")),F.bind("exists",Ot(a.exists,"<x:b>")),F.bind("spread",Ot(a.spread,"<x-:a<o>>")),F.bind("merge",Ot(a.merge,"<a<o>:o>")),F.bind("reverse",Ot(a.reverse,"<a:a>")),F.bind("each",Ot(a.each,"<o-f:a>")),F.bind("error",Ot(a.error,"<s?:x>")),F.bind("assert",Ot(a.assert,"<bs?:x>")),F.bind("type",Ot(a.type,"<x:s>")),F.bind("sort",Ot(a.sort,"<af?:a>")),F.bind("shuffle",Ot(a.shuffle,"<a:a>")),F.bind("distinct",Ot(a.distinct,"<x:x>")),F.bind("base64encode",Ot(a.base64encode,"<s-:s>")),F.bind("base64decode",Ot(a.base64decode,"<s-:s>")),F.bind("encodeUrlComponent",Ot(a.encodeUrlComponent,"<s-:s>")),F.bind("encodeUrl",Ot(a.encodeUrl,"<s-:s>")),F.bind("decodeUrlComponent",Ot(a.decodeUrlComponent,"<s-:s>")),F.bind("decodeUrl",Ot(a.decodeUrl,"<s-:s>")),F.bind("eval",Ot(It,"<sx?:x>")),F.bind("toMillis",Ot(i.toMillis,"<s-s?:n>")),F.bind("fromMillis",Ot(i.fromMillis,"<n-s?s?:s>")),F.bind("clone",Ot(Rt,"<(oa)-:o>"));var jt={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e6. Attempted to allocate {{value}}.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function Dt(t){var e=jt[t.code];if(void 0!==e){var r=e.replace(/\{\{\{([^}]+)}}}/g,(function(){return t[arguments[1]]}));r=r.replace(/\{\{([^}]+)}}/g,(function(){return JSON.stringify(t[arguments[1]])})),t.message=r}}function Lt(t,e){var r,n;try{r=s(t,e&&e.recover),n=r.errors,delete r.errors}catch(t){throw Dt(t),t}var a=Ct(F),o=new Date;return a.bind("now",Ot((function(t,e){return i.fromMillis(o.getTime(),t,e)}),"<s?s?:s>")),a.bind("millis",Ot((function(){return o.getTime()}),"<:n>")),e&&e.RegexEngine?Lt.RegexEngine=e.RegexEngine:Lt.RegexEngine=RegExp,{evaluate:function(t,e,i){if(void 0!==n){var s={code:"S0500",position:0};throw Dt(s),s}var c,u,l;if(void 0!==e)for(var h in c=Ct(a),e)c.bind(h,e[h]);else c=a;if(c.bind("$",t),o=new Date,c.timestamp=o,Array.isArray(t)&&!R(t)&&((t=I(t)).outerWrapper=!0),"function"==typeof i){c.async=!0;var f=function(t){Dt(t),i(t,null)},d=function t(e){(u=l.next(e)).done?i(null,u.value):u.value.then(t).catch(f)};l=B(r,t,c),(u=l.next()).value.then(d).catch(f)}else try{for(l=B(r,t,c),u=l.next();!u.done;)u=l.next(u.value);return u.value}catch(s){throw Dt(s),s}},assign:function(t,e){a.bind(t,e)},registerFunction:function(t,e,r){var n=Ot(e,r);a.bind(t,n)},ast:function(){return r},errors:function(){return n}}}return Lt.parser=s,Lt}();e.exports=u},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,e,r){var n=t("./signature"),i=function(){var t={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},e={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},r=function(r){var n=0,i=r.length,a=function(t,e){return{type:t,value:e,position:n}},o=function(){for(var t,e,a=n,o=0;n<i;){var s=r.charAt(n);if("/"===s&&"\\"!==r.charAt(n-1)&&0===o){if(""===(t=r.substring(a,n)))throw{code:"S0301",stack:(new Error).stack,position:n};for(n++,s=r.charAt(n),a=n;"i"===s||"m"===s;)n++,s=r.charAt(n);return e=r.substring(a,n)+"g",new RegExp(t,e)}"("!==s&&"["!==s&&"{"!==s||"\\"===r.charAt(n-1)||o++,")"!==s&&"]"!==s&&"}"!==s||"\\"===r.charAt(n-1)||o--,n++}throw{code:"S0302",stack:(new Error).stack,position:n}},s=function s(c){if(n>=i)return null;for(var u=r.charAt(n);n<i&&" \t\n\r\v".indexOf(u)>-1;)n++,u=r.charAt(n);if("/"===u&&"*"===r.charAt(n+1)){var l=n;for(n+=2,u=r.charAt(n);"*"!==u||"/"!==r.charAt(n+1);)if(u=r.charAt(++n),n>=i)throw{code:"S0106",stack:(new Error).stack,position:l};return n+=2,u=r.charAt(n),s(c)}if(!0!==c&&"/"===u)return n++,a("regex",o());if("."===u&&"."===r.charAt(n+1))return n+=2,a("operator","..");if(":"===u&&"="===r.charAt(n+1))return n+=2,a("operator",":=");if("!"===u&&"="===r.charAt(n+1))return n+=2,a("operator","!=");if(">"===u&&"="===r.charAt(n+1))return n+=2,a("operator",">=");if("<"===u&&"="===r.charAt(n+1))return n+=2,a("operator","<=");if("*"===u&&"*"===r.charAt(n+1))return n+=2,a("operator","**");if("~"===u&&">"===r.charAt(n+1))return n+=2,a("operator","~>");if(Object.prototype.hasOwnProperty.call(t,u))return n++,a("operator",u);if('"'===u||"'"===u){var h=u;n++;for(var f="";n<i;){if("\\"===(u=r.charAt(n)))if(n++,u=r.charAt(n),Object.prototype.hasOwnProperty.call(e,u))f+=e[u];else{if("u"!==u)throw{code:"S0103",stack:(new Error).stack,position:n,token:u};var d=r.substr(n+1,4);if(!/^[0-9a-fA-F]+$/.test(d))throw{code:"S0104",stack:(new Error).stack,position:n};var p=parseInt(d,16);f+=String.fromCharCode(p),n+=4}else{if(u===h)return n++,a("string",f);f+=u}n++}throw{code:"S0101",stack:(new Error).stack,position:n}}var g,v=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/.exec(r.substring(n));if(null!==v){var m=parseFloat(v[0]);if(!isNaN(m)&&isFinite(m))return n+=v[0].length,a("number",m);throw{code:"S0102",stack:(new Error).stack,position:n,token:v[0]}}if("`"===u){n++;var y=r.indexOf("`",n);if(-1!==y)return g=r.substring(n,y),n=y+1,a("name",g);throw n=i,{code:"S0105",stack:(new Error).stack,position:n}}for(var b,x=n;;)if(b=r.charAt(x),x===i||" \t\n\r\v".indexOf(b)>-1||Object.prototype.hasOwnProperty.call(t,b)){if("$"===r.charAt(n))return g=r.substring(n+1,x),n=x,a("variable",g);switch(g=r.substring(n,x),n=x,g){case"or":case"in":case"and":return a("operator",g);case"true":return a("value",!0);case"false":return a("value",!1);case"null":return a("value",null);default:return n===i&&""===g?null:a("name",g)}}else x++};return s},i=function(e,i){var a,o,s={},c=[],u=function(){var t=[];"(end)"!==a.id&&t.push({type:a.type,value:a.value,position:a.position});for(var e=o();null!==e;)t.push(e),e=o();return t},l={nud:function(){var t={code:"S0211",token:this.value,position:this.position};if(i)return t.remaining=u(),t.type="error",c.push(t),t;throw t.stack=(new Error).stack,t}},h=function(t,e){var r=s[t];return e=e||0,r?e>=r.lbp&&(r.lbp=e):((r=Object.create(l)).id=r.value=t,r.lbp=e,s[t]=r),r},f=function(t){if(i){t.remaining=u(),c.push(t);var e=s["(error)"];return(a=Object.create(e)).error=t,a.type="(error)",a}throw t.stack=(new Error).stack,t},d=function(t,r){if(t&&a.id!==t){var n={code:"(end)"===a.id?"S0203":"S0202",position:a.position,token:a.value,value:t};return f(n)}var i=o(r);if(null===i)return(a=s["(end)"]).position=e.length,a;var c,u=i.value,l=i.type;switch(l){case"name":case"variable":c=s["(name)"];break;case"operator":if(!(c=s[u]))return f({code:"S0204",stack:(new Error).stack,position:i.position,token:u});break;case"string":case"number":case"value":c=s["(literal)"];break;case"regex":l="regex",c=s["(regex)"];break;default:return f({code:"S0205",stack:(new Error).stack,position:i.position,token:u})}return(a=Object.create(c)).value=u,a.type=l,a.position=i.position,a},p=function(t){var e,r=a;for(d(null,!0),e=r.nud();t<a.lbp;)r=a,d(),e=r.led(e);return e},g=function(t){h(t,0).nud=function(){return this}},v=function(e,r,n){var i=r||t[e],a=h(e,i);return a.led=n||function(t){return this.lhs=t,this.rhs=p(i),this.type="binary",this},a},m=function(t,e,r){var n=h(t,e);return n.led=r,n},y=function(t,e){var r=h(t);return r.nud=e||function(){return this.expression=p(70),this.type="unary",this},r};g("(end)"),g("(name)"),g("(literal)"),g("(regex)"),h(":"),h(";"),h(","),h(")"),h("]"),h("}"),h(".."),v("."),v("+"),v("-"),v("*"),v("/"),v("%"),v("="),v("<"),v(">"),v("!="),v("<="),v(">="),v("&"),v("and"),v("or"),v("in"),g("and"),g("or"),g("in"),y("-"),v("~>"),m("(error)",10,(function(t){return this.lhs=t,this.error=a.error,this.remaining=u(),this.type="error",this})),y("*",(function(){return this.type="wildcard",this})),y("**",(function(){return this.type="descendant",this})),y("%",(function(){return this.type="parent",this})),v("(",t["("],(function(t){if(this.procedure=t,this.type="function",this.arguments=[],")"!==a.id)for(;"operator"===a.type&&"?"===a.id?(this.type="partial",this.arguments.push(a),d("?")):this.arguments.push(p(0)),","===a.id;)d(",");if(d(")",!0),"name"===t.type&&("function"===t.value||"λ"===t.value)){if(this.arguments.forEach((function(t,e){if("variable"!==t.type)return f({code:"S0208",stack:(new Error).stack,position:t.position,token:t.value,value:e+1})})),this.type="lambda","<"===a.id){for(var e=a.position,r=1,i="<";r>0&&"{"!==a.id&&"(end)"!==a.id;){var o=d();">"===o.id?r--:"<"===o.id&&r++,i+=o.value}d(">");try{this.signature=n(i)}catch(t){return t.position=e+t.offset,f(t)}}d("{"),this.body=p(0),d("}")}return this})),y("(",(function(){for(var t=[];")"!==a.id&&(t.push(p(0)),";"===a.id);)d(";");return d(")",!0),this.type="block",this.expressions=t,this})),y("[",(function(){var t=[];if("]"!==a.id)for(;;){var e=p(0);if(".."===a.id){var r={type:"binary",value:"..",position:a.position,lhs:e};d(".."),r.rhs=p(0),e=r}if(t.push(e),","!==a.id)break;d(",")}return d("]",!0),this.expressions=t,this.type="unary",this})),v("[",t["["],(function(e){if("]"===a.id){for(var r=e;r&&"binary"===r.type&&"["===r.value;)r=r.lhs;return r.keepArray=!0,d("]"),e}return this.lhs=e,this.rhs=p(t["]"]),this.type="binary",d("]",!0),this})),v("^",t["^"],(function(t){d("(");for(var e=[];;){var r={descending:!1};if("<"===a.id?d("<"):">"===a.id&&(r.descending=!0,d(">")),r.expression=p(0),e.push(r),","!==a.id)break;d(",")}return d(")"),this.lhs=t,this.rhs=e,this.type="binary",this}));var b=function(t){var e=[];if("}"!==a.id)for(;;){var r=p(0);d(":");var n=p(0);if(e.push([r,n]),","!==a.id)break;d(",")}return d("}",!0),void 0===t?(this.lhs=e,this.type="unary"):(this.lhs=t,this.rhs=e,this.type="binary"),this};y("{",b),v("{",t["{"],b),m(":=",t[":="],(function(e){return"variable"!==e.type?f({code:"S0212",stack:(new Error).stack,position:e.position,token:e.value}):(this.lhs=e,this.rhs=p(t[":="]-1),this.type="binary",this)})),v("@",t["@"],(function(e){return this.lhs=e,this.rhs=p(t["@"]),"variable"!==this.rhs.type?f({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)})),v("#",t["#"],(function(e){return this.lhs=e,this.rhs=p(t["#"]),"variable"!==this.rhs.type?f({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)})),v("?",t["?"],(function(t){return this.type="condition",this.condition=t,this.then=p(0),":"===a.id&&(d(":"),this.else=p(0)),this})),y("|",(function(){return this.type="transform",this.pattern=p(0),d("|"),this.update=p(0),","===a.id&&(d(","),this.delete=p(0)),d("|"),this}));var x=function t(e){var r;if("function"!==e.type||e.predicate)if("condition"===e.type)e.then=t(e.then),void 0!==e.else&&(e.else=t(e.else)),r=e;else if("block"===e.type){var n=e.expressions.length;n>0&&(e.expressions[n-1]=t(e.expressions[n-1])),r=e}else r=e;else{var i={type:"lambda",thunk:!0,arguments:[],position:e.position};i.body=e,r=i}return r},w=0,A=0,_=[],k=function t(e,r){switch(e.type){case"name":case"wildcard":r.level--,0===r.level&&(void 0===e.ancestor||(_[r.index].slot.label=e.ancestor.label),e.ancestor=r,e.tuple=!0);break;case"parent":r.level++;break;case"block":e.expressions.length>0&&(e.tuple=!0,r=t(e.expressions[e.expressions.length-1],r));break;case"path":e.tuple=!0;var n=e.steps.length-1;for(r=t(e.steps[n--],r);r.level>0&&n>=0;)r=t(e.steps[n--],r);break;default:throw{code:"S0217",token:e.type,position:e.position}}return r},E=function(t,e){if(void 0!==e.seekingParent||"parent"===e.type){var r=void 0!==e.seekingParent?e.seekingParent:[];"parent"===e.type&&r.push(e.slot),void 0===t.seekingParent?t.seekingParent=r:Array.prototype.push.apply(t.seekingParent,r)}},S=function(t){var e=t.steps.length-1,r=t.steps[e],n=void 0!==r.seekingParent?r.seekingParent:[];"parent"===r.type&&n.push(r.slot);for(var i=0;i<n.length;i++){var a=n[i];for(e=t.steps.length-2;a.level>0;){if(e<0){void 0===t.seekingParent?t.seekingParent=[a]:t.seekingParent.push(a);break}for(var o=t.steps[e--];e>=0&&o.focus&&t.steps[e].focus;)o=t.steps[e--];a=k(o,a)}}},M=function t(e){var r;switch(e.type){case"binary":switch(e.value){case".":var n=t(e.lhs);r="path"===n.type?n:{type:"path",steps:[n]},"parent"===n.type&&(r.seekingParent=[n.slot]);var a=t(e.rhs);"function"===a.type&&"path"===a.procedure.type&&1===a.procedure.steps.length&&"name"===a.procedure.steps[0].type&&"function"===r.steps[r.steps.length-1].type&&(r.steps[r.steps.length-1].nextFunction=a.procedure.steps[0].value),"path"===a.type?Array.prototype.push.apply(r.steps,a.steps):(void 0!==a.predicate&&(a.stages=a.predicate,delete a.predicate),r.steps.push(a)),r.steps.filter((function(t){if("number"===t.type||"value"===t.type)throw{code:"S0213",stack:(new Error).stack,position:t.position,value:t.value};return"string"===t.type})).forEach((function(t){t.type="name"})),r.steps.filter((function(t){return!0===t.keepArray})).length>0&&(r.keepSingletonArray=!0);var o=r.steps[0];"unary"===o.type&&"["===o.value&&(o.consarray=!0);var s=r.steps[r.steps.length-1];"unary"===s.type&&"["===s.value&&(s.consarray=!0),S(r);break;case"[":var u=r=t(e.lhs),l="predicate";if("path"===r.type&&(u=r.steps[r.steps.length-1],l="stages"),void 0!==u.group)throw{code:"S0209",stack:(new Error).stack,position:e.position};void 0===u[l]&&(u[l]=[]);var h=t(e.rhs);void 0!==h.seekingParent&&(h.seekingParent.forEach((function(t){1===t.level?k(u,t):t.level--})),E(u,h)),u[l].push({type:"filter",expr:h,position:e.position});break;case"{":if(void 0!==(r=t(e.lhs)).group)throw{code:"S0210",stack:(new Error).stack,position:e.position};r.group={lhs:e.rhs.map((function(e){return[t(e[0]),t(e[1])]})),position:e.position};break;case"^":"path"!==(r=t(e.lhs)).type&&(r={type:"path",steps:[r]});var f={type:"sort",position:e.position};f.terms=e.rhs.map((function(e){var r=t(e.expression);return E(f,r),{descending:e.descending,expression:r}})),r.steps.push(f),S(r);break;case":=":(r={type:"bind",value:e.value,position:e.position}).lhs=t(e.lhs),r.rhs=t(e.rhs),E(r,r.rhs);break;case"@":if(r=t(e.lhs),u=r,"path"===r.type&&(u=r.steps[r.steps.length-1]),void 0!==u.stages||void 0!==u.predicate)throw{code:"S0215",stack:(new Error).stack,position:e.position};if("sort"===u.type)throw{code:"S0216",stack:(new Error).stack,position:e.position};e.keepArray&&(u.keepArray=!0),u.focus=e.rhs.value,u.tuple=!0;break;case"#":r=t(e.lhs),u=r,"path"===r.type?u=r.steps[r.steps.length-1]:(r={type:"path",steps:[r]},void 0!==u.predicate&&(u.stages=u.predicate,delete u.predicate)),void 0===u.stages?u.index=e.rhs.value:u.stages.push({type:"index",value:e.rhs.value,position:e.position}),u.tuple=!0;break;case"~>":(r={type:"apply",value:e.value,position:e.position}).lhs=t(e.lhs),r.rhs=t(e.rhs);break;default:(r={type:e.type,value:e.value,position:e.position}).lhs=t(e.lhs),r.rhs=t(e.rhs),E(r,r.lhs),E(r,r.rhs)}break;case"unary":r={type:e.type,value:e.value,position:e.position},"["===e.value?r.expressions=e.expressions.map((function(e){var n=t(e);return E(r,n),n})):"{"===e.value?r.lhs=e.lhs.map((function(e){var n=t(e[0]);E(r,n);var i=t(e[1]);return E(r,i),[n,i]})):(r.expression=t(e.expression),"-"===e.value&&"number"===r.expression.type?(r=r.expression).value=-r.value:E(r,r.expression));break;case"function":case"partial":(r={type:e.type,name:e.name,value:e.value,position:e.position}).arguments=e.arguments.map((function(e){var n=t(e);return E(r,n),n})),r.procedure=t(e.procedure);break;case"lambda":r={type:e.type,arguments:e.arguments,signature:e.signature,position:e.position};var d=t(e.body);r.body=x(d);break;case"condition":(r={type:e.type,position:e.position}).condition=t(e.condition),E(r,r.condition),r.then=t(e.then),E(r,r.then),void 0!==e.else&&(r.else=t(e.else),E(r,r.else));break;case"transform":(r={type:e.type,position:e.position}).pattern=t(e.pattern),r.update=t(e.update),void 0!==e.delete&&(r.delete=t(e.delete));break;case"block":(r={type:e.type,position:e.position}).expressions=e.expressions.map((function(e){var n=t(e);return E(r,n),(n.consarray||"path"===n.type&&n.steps[0].consarray)&&(r.consarray=!0),n}));break;case"name":r={type:"path",steps:[e]},e.keepArray&&(r.keepSingletonArray=!0);break;case"parent":r={type:"parent",slot:{label:"!"+w++,level:1,index:A++}},_.push(r);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":r=e;break;case"operator":if("and"===e.value||"or"===e.value||"in"===e.value)e.type="name",r=t(e);else{if("?"!==e.value)throw{code:"S0201",stack:(new Error).stack,position:e.position,token:e.value};r=e}break;case"error":r=e,e.lhs&&(r=t(e.lhs));break;default:var p="S0206";"(end)"===e.id&&(p="S0207");var g={code:p,position:e.position,token:e.value};if(i)return c.push(g),{type:"error",error:g};throw g.stack=(new Error).stack,g}return e.keepArray&&(r.keepArray=!0),r};o=r(e),d();var T=p(0);if("(end)"!==a.id){var P={code:"S0201",position:a.position,token:a.value};f(P)}if("parent"===(T=M(T)).type||void 0!==T.seekingParent)throw{code:"S0217",token:T.type,position:T.position};return c.length>0&&(T.errors=c),T};return i}();e.exports=i},{"./signature":5}],5:[function(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=t("./utils"),a=function(){var t={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function e(e){for(var r=1,a=[],o={},s=o;r<e.length;){var c=e.charAt(r);if(":"===c)break;var u=function(){a.push(o),s=o,o={}},l=function(t,e,r,n){for(var i=1,a=e;a<t.length;)if(a++,(c=t.charAt(a))===n){if(0==--i)break}else c===r&&i++;return a};switch(c){case"s":case"n":case"b":case"l":case"o":o.regex="["+c+"m]",o.type=c,u();break;case"a":o.regex="[asnblfom]",o.type=c,o.array=!0,u();break;case"f":o.regex="f",o.type=c,u();break;case"j":o.regex="[asnblom]",o.type=c,u();break;case"x":o.regex="[asnblfom]",o.type=c,u();break;case"-":s.context=!0,s.contextRegex=new RegExp(s.regex),s.regex+="?";break;case"?":case"+":s.regex+=c;break;case"(":var h=l(e,r,"(",")"),f=e.substring(r+1,h);if(-1!==f.indexOf("<"))throw{code:"S0402",stack:(new Error).stack,value:f,offset:r};o.regex="["+f+"m]",o.type="("+f+")",r=h,u();break;case"<":if("a"!==s.type&&"f"!==s.type)throw{code:"S0401",stack:(new Error).stack,value:s.type,offset:r};var d=l(e,r,"<",">");s.subtype=e.substring(r+1,d),r=d}r++}var p="^"+a.map((function(t){return"("+t.regex+")"})).join("")+"$",g=new RegExp(p),v=function(t){var e;if(i.isFunction(t))e="f";else switch(n(t)){case"string":e="s";break;case"number":e="n";break;case"boolean":e="b";break;case"object":e=null===t?"l":Array.isArray(t)?"a":"o";break;default:e="m"}return e},m=function(t,e){for(var r="^",n=0,i=0;i<a.length;i++){r+=a[i].regex;var o=e.match(r);if(null===o)throw{code:"T0410",stack:(new Error).stack,value:t[n],index:n+1};n=o[0].length}throw{code:"T0410",stack:(new Error).stack,value:t[n],index:n+1}};return{definition:e,validate:function(e,r){var n="";e.forEach((function(t){n+=v(t)}));var i=g.exec(n);if(i){var o=[],s=0;return a.forEach((function(n,a){var c=e[s],u=i[a+1];if(""===u)if(n.context&&n.contextRegex){var l=v(r);if(!n.contextRegex.test(l))throw{code:"T0411",stack:(new Error).stack,value:r,index:s+1};o.push(r)}else o.push(c),s++;else u.split("").forEach((function(r){if("a"===n.type){if("m"===r)c=void 0;else{c=e[s];var i=!0;if(void 0!==n.subtype)if("a"!==r&&u!==n.subtype)i=!1;else if("a"===r&&c.length>0){var a=v(c[0]);i=a===n.subtype.charAt(0)&&0===c.filter((function(t){return v(t)!==a})).length}if(!i)throw{code:"T0412",stack:(new Error).stack,value:c,index:s+1,type:t[n.subtype]};"a"!==r&&(c=[c])}o.push(c),s++}else o.push(c),s++}))})),o}m(e,n)}}}return e}();e.exports=a},{"./utils":6}],6:[function(t,e,r){function n(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw o}}}}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=function(){function t(t){var e=!1;if("number"==typeof t&&(e=!isNaN(t))&&!isFinite(t))throw{code:"D1001",value:t,stack:(new Error).stack};return e}function e(t){var e=!1;return Array.isArray(t)&&(e=0===t.filter((function(t){return"string"!=typeof t})).length),e}function r(e){var r=!1;return Array.isArray(e)&&(r=0===e.filter((function(e){return!t(e)})).length),r}function i(){var t=[];return t.sequence=!0,1===arguments.length&&t.push(arguments[0]),t}function a(t){return!0===t.sequence&&Array.isArray(t)}function s(t){return t&&(!0===t._jsonata_function||!0===t._jsonata_lambda)||"function"==typeof t}function c(t){return"number"==typeof t.arity?t.arity:"function"==typeof t.implementation?t.implementation.length:"number"==typeof t.length?t.length:t.arguments.length}function u(t){return t&&!0===t._jsonata_lambda}var l=("function"==typeof Symbol?Symbol:{}).iterator||"@@iterator";function h(t){return"object"===o(t)&&null!==t&&l in t&&"next"in t&&"function"==typeof t.next}function f(t,e){if(t===e)return!0;if("object"===o(t)&&"object"===o(e)&&null!==t&&null!==e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!f(t[r],e[r]))return!1;return!0}var n=Object.getOwnPropertyNames(t),i=Object.getOwnPropertyNames(e);if(n.length!==i.length)return!1;for(n=n.sort(),i=i.sort(),r=0;r<n.length;r++)if(n[r]!==i[r])return!1;for(r=0;r<n.length;r++){var a=n[r];if(!f(t[a],e[a]))return!1}return!0}return!1}function d(t){var e,r=[],i=n(t);try{for(i.s();!(e=i.n()).done;){var a=e.value;r.push(a)}}catch(t){i.e(t)}finally{i.f()}return r}return{isNumeric:t,isArrayOfStrings:e,isArrayOfNumbers:r,createSequence:i,isSequence:a,isFunction:s,isLambda:u,isIterable:h,getFunctionArity:c,isDeepEqual:f,stringToArray:d}}();e.exports=s},{}]},{},[3])(3)}(G9);var H9=G9.exports;const W9=function(t){return t};function q9(t){if(!t)return W9;try{var e=H9(t);return function(t){return e.evaluate(t)}}catch(t){return console.error(t),W9}}function X9(t){var e=o9(t);return null==e?"":String(e)}function V9(t){return Number(o9(t))}function Q9(t){return t}function K9(t){return X9(t)}function J9(t){return V9(t)}function Z9(t){if(this.param)return t=X9(t),this.param.hasOwnProperty(t)?this.param[t]:this.param.default}function $9(t){var{param:e}=this;if(e){for(let r in e){let[n,i]=r.split("~"),a=!!n,o=!!i;if(n=parseFloat(n),i=parseFloat(i),t=V9(t),a&&!o&&t>=n)return e[r];if(!a&&o&&t<n)return e[r];if(t>=n&&t<i)return e[r]}return e.default}}function ttt(t){return V9(t)*Math.PI/180}function ett(){}function rtt(t,e,r,n,i){switch(r){case"value":return"text"===i||"string"===i?K9.bind(t):"number"===i?J9.bind(t):Q9.bind(e);case"map":return Z9.bind(t);case"range":return $9.bind(t);case"radian":return ttt.bind(t);case"eval":return function(t){try{return new Function("value","targets",t)}catch(t){return y9(t),ett}}(n).bind(e);default:return Q9.bind(e)}}class ntt{constructor(t,e){this.owner=e,this.model=t}dispose(){delete this._model,delete this.owner,delete this.evaluator,delete this.accessor}get model(){return this._model}set model(t){var{target:e,property:r,rule:n,param:i,accessor:a}=t;this._model=t,this.evaluator=rtt(this,this.owner,n,i,function(t){switch(t){case"ref":case"fillStyle":case"strokeStyle":return"string";default:return}}(r)),this.accessor=q9(a);const o=e.match(/\[(.*?)\]/);if(o){var[s,c]=o[1].split(":");this.propAccessor=q9(s),this.partAccessor=q9(c)}}get target(){return this.model.target}get property(){return this.model.property}get param(){return this.model.param}get ndnsp(){return!!this.model.ndnsp}}function itt(t=!1){(t||void 0!==this.data)&&this.mappings&&this.mappings.forEach((t=>{try{var{target:e,property:r,accessor:n,propAccessor:i,partAccessor:a}=t,o=n(this.data);if("(root)"==(e=e.trim())||"(key)"==e){if(null==o)return;let e=Object.keys(o||{}).map((t=>this.root.findOrCreate(t))).filter(Boolean);e.length>0&&e.forEach((e=>{let n=t.evaluator(o[e.get("id")],[e]);!r||"(action)"===r||t.ndnsp&&!n&&0!==n&&!1!==n||(e[r]=n)}))}else if(e.startsWith("[")){if(null==o)return;if(o instanceof Array)o.forEach((e=>{let n=i(e);if(n){let i=this.root.findOrCreate(n);if(i){let n=t.evaluator(a(e),[i]);!r||"(action)"===r||t.ndnsp&&!n&&0!==n&&!1!==n||(i[r]=n)}}}));else{if(!(o instanceof Object))throw String("mapping data should be an object to target property-id.("+o+")");{let e=i(o);if(e){let n=this.root.findOrCreate(e);if(n){let e=t.evaluator(a(o),[n]);!r||"(action)"===r||t.ndnsp&&!e&&0!==e&&!1!==e||(n[r]=e)}}}}}else{let n=this.root.findAll(e,this);if(n.length>0){let e=t.evaluator(o,n);!r||"(action)"===r||t.ndnsp&&!e&&0!==e&&!1!==e||n.forEach((t=>t[r]=e))}}}catch(e){y9(e,this,t)}}))}var att;function ott(t,e,r,n,i){var{alpha:a=1}=n,o=i.fillStyle;if(t.globalAlpha*=a,o)if("string"==typeof o)t.fillStyle=o,t.fill();else if("object"==typeof o)if("gradient"==o.type){t.translate(r.x,r.y);let n,{width:i,height:a}=e;if("linear"==o.gradientType){let e=3.141592653589793,r=o.rotation;if(r>=.436332&&r<=1.13446||r>=2.00713&&r<=2.70526||r>=3.57792&&r<=4.27606||r>=5.14872&&r<=5.84685){let o=Math.sqrt(Math.pow((i-4)/2,2)+Math.pow((a-4)/2,2));o-=o-(i+a)/3,n=t.createLinearGradient(o*Math.cos(r+e),o*Math.sin(r+e),o*Math.cos(r),o*Math.sin(r))}else n=t.createLinearGradient((i-4)/2*Math.cos(r+e),(a-4)/2*Math.sin(r+e),(i-4)/2*Math.cos(r),(a-4)/2*Math.sin(r))}else if("radial"==o.gradientType){let e=.95*Math.sqrt(Math.pow((i-4)/2,2)+Math.pow((a-4)/2,2));switch(o.center){case"center":default:n=t.createRadialGradient(0,0,0,0,0,e);break;case"left-top":n=t.createRadialGradient(-i/2,-a/2,0,-i/2,-a/2,2*e);break;case"right-top":n=t.createRadialGradient(i/2,-a/2,0,i/2,-a/2,2*e);break;case"left-bottom":n=t.createRadialGradient(-i/2,a/2,0,-i/2,a/2,2*e);break;case"right-bottom":n=t.createRadialGradient(i/2,a/2,0,i/2,a/2,2*e)}}o.colorStops.forEach((t=>{if(t.position>=0&&t.position<=1)try{n.addColorStop(t.position,t.color)}catch(e){b9("Invalid Color for colorstop : ",t.color),n.addColorStop(t.position,"#fff")}})),t.fillStyle=n,t.fill(),t.translate(-r.x,-r.y)}else if("pattern"==o.type&&o.image){i.prepareFillIf(!i._pattern_image_origin);var s=i._pattern_image;if(!s)return;let r=0,n=0,a=0,c=0,u=e.left,l=e.top;if(!o.fitPattern){r=o.offsetX,n=o.offsetY;const t=o.width?o.width:s.width,i=o.height?o.height:s.height;switch(o.align){case"center":a=e.width/2-t/2,c=e.height/2-i/2;break;case"left-top":a=0,c=0;break;case"left-bottom":a=0,c=e.height-i;break;case"right-top":a=e.width-t,c=0;break;case"right-bottom":a=e.width-t,c=e.height-i;break;case"left":a=0,c=e.height/2-i/2;break;case"right":a=e.width-t,c=e.height/2-i/2;break;case"top":a=e.width/2-t/2,c=0;break;case"bottom":a=e.width/2-t/2,c=e.height-i}u+=r+a,l+=n+c}t.translate(u,l),o.color&&(t.fillStyle=o.color,t.fill()),o.fitPattern?Math.abs((s.width-e.width)*(s.height-e.height))>1?(delete i._pattern_image,delete i._pattern_image_origin):t.fillStyle=t.createPattern(s,"no-repeat"):t.fillStyle=t.createPattern(s,o.noRepeat?"no-repeat":"repeat"),t.fill(),t.translate(-u,-l)}}function stt(t,e,r){var{strokeStyle:n,lineDash:i,lineWidth:a,lineCap:o,lineJoin:s,alpha:c}=e;if(n&&0!=a){if(o&&(t.lineCap=o),i){var u="round"==o;switch(i){case"solid":i=[0,0];break;case"round-dot":i=u?[0,2*a]:[a,a];break;case"square-dot":i=u?[a,2*a]:[2*a,a];break;case"dash":i=u?[3*a,2.5*a]:[4*a,1.5*a];break;case"dash-dot":i=u?[3*a,3*a,0,3*a]:[4*a,2*a,a,2*a];break;case"long-dash":i=u?[5*a,4*a]:[6*a,3*a];break;case"long-dash-dot":i=u?[5*a,3*a,0,3*a]:[6*a,2*a,a,2*a];break;case"long-dash-dot-dot":i=u?[5*a,2*a,0,2*a,0,2*a]:[6*a,a,a,a,a,a]}t.setLineDash(i)}t.globalAlpha*=c,t.strokeStyle=n,t.lineWidth=a,t.lineJoin=s,t.stroke()}}function ctt(t,e,r){if(e.length<2)return e;for(var n=2;n<e.length;n++){var i=e.substring(0,n);if(!(t.measureText(i).width<r))break}return e.substring(0,n-1)}function utt(t,e,r,n){var i=String(e).split("\n");return n?[].concat.apply([],i.map((e=>function(t,e,r){var n,i,a=e.split(" "),o=[],s=[];for(n=0,i=1;i<=a.length;i++)if(s=a.slice(n,i),t.measureText(s.join(" ")).width>r){if(i-n==1){let e=ctt(t,s[0],r);o.push([e]),a.splice(n,1,e,s[0].substring(e.length))}else{for(;""==a[i-1];)i++;o.push(a.slice(n,--i))}n=i}return i-n>1&&o.push(s),0==o.length&&o.push([""]),o}(t,e,r)))):i.map((t=>t.split(" ")))}function ltt(t,e,r,n,i,a=0,o=!1,s=!0){a="number"==typeof a?{tl:a,tr:a,br:a,bl:a}:{tl:0,tr:0,br:0,bl:0,...a},t.beginPath(),t.moveTo(e+a.tl,r),t.lineTo(e+n-a.tr,r),t.quadraticCurveTo(e+n,r,e+n,r+a.tr),t.lineTo(e+n,r+i-a.br),t.quadraticCurveTo(e+n,r+i,e+n-a.br,r+i),t.lineTo(e+a.bl,r+i),t.quadraticCurveTo(e,r+i,e,r+i-a.bl),t.lineTo(e,r+a.tl),t.quadraticCurveTo(e,r,e+a.tl,r),t.closePath(),o&&t.fill(),s&&t.stroke()}function htt(t,e,r,n,i){if(!n)return[];t.save(),t.font=r;var a=utt(t,n,e,!!i);return t.restore(),a}function ftt(t){var{fontFamily:e=R9.FONT_FAMILY,bold:r=R9.BOLD,italic:n=R9.ITALIC,fontSize:i=R9.FONT_SIZE}=t,a=[];return r&&a.push("bold"),n&&a.push("italic"),a.push(i+"px"),a.push(e),a.join(" ")}function dtt(t,e,r,n){var{alpha:i,fontColor:a=R9.FONT_COLOR,textAlign:o=R9.TEXT_ALIGN,textBaseline:s=R9.TEXT_BASELINE,textBackgroundStyle:c,fontSize:u,lineHeight:l}=n;i||=R9.FONT_COLOR,u||=R9.FONT_SIZE,l||=1.2*u,t.save(),t.beginPath();var{left:h,top:f,width:d,height:p}=e;t.font=ftt(n);var g,v,m=r.length*l;switch(s){case"top":g=f,t.textBaseline="top";break;case"bottom":g=f+p-m+l,t.textBaseline="bottom";break;default:g=f+p/2-m/2+l/2,t.textBaseline="middle"}switch(o){case"left":case"justify":v=h,t.textAlign="left";break;case"right":v=h+d,t.textAlign="right";break;default:v=h+d/2,t.textAlign="center"}t.globalAlpha*=i,t.fillStyle=a,"justify"!=o?r.forEach(((e,r)=>{if(c){t.fillStyle=c;let r=t.measureText(e.join(" "));ltt(t,v-r.actualBoundingBoxLeft-4,g-r.actualBoundingBoxAscent-4,r.actualBoundingBoxLeft+r.actualBoundingBoxRight+8,r.actualBoundingBoxAscent+r.actualBoundingBoxDescent+8,4,!0,!1),t.fillStyle=a}t.fillText(e.join(" "),v,g+r*l)})):r.forEach(((e,r)=>{let n=g+r*l;if(1==e.length){if(c){t.fillStyle=c;let r=t.measureText(e[0]);ltt(t,v-r.actualBoundingBoxLeft-4,n-r.actualBoundingBoxAscent-4,r.actualBoundingBoxLeft+r.actualBoundingBoxRight+8,r.actualBoundingBoxAscent+r.actualBoundingBoxDescent+8,4,!0,!1),t.fillStyle=a}t.fillText(e[0],v,n)}else{let r=e.map((e=>t.measureText(e).width)),i=r.map((t=>t.width)),o=i.reduce(((t,e)=>t+e),0),s=(d-o)/(e.length-1),u=v;e.forEach(((e,o)=>{c&&(t.fillStyle=c,ltt(t,u-r[o].actualBoundingBoxLeft-4,n-r[o].actualBoundingBoxAscent-4,r[o].actualBoundingBoxLeft+r[o].actualBoundingBoxRight+8,r[o].actualBoundingBoxAscent+r[o].actualBoundingBoxDescent+8,4,!0,!1),t.fillStyle=a),t.fillText(e,u,n),u+=i[o]+s}))}})),t.restore()}function ptt(t,e,r={x:0,y:0},n=0,i={x:1,y:1}){return t-=r.x,e-=r.y,{x:(t*Math.cos(-n)-e*Math.sin(-n)+r.x)/i.x,y:(t*Math.sin(-n)+e*Math.cos(-n)+r.y)/i.y}}function gtt(t,e,r={x:0,y:0},n=0,i={x:1,y:1}){return t-=r.x,e-=r.y,{x:(t*Math.cos(n)-e*Math.sin(n)+r.x)*i.x,y:(t*Math.sin(n)+e*Math.cos(n)+r.y)*i.y}}function vtt(t){var e=t.element,r=t.fillStyle,n=e.style;if(r)if("string"==typeof r)n.backgroundColor=r;else switch(r.type){case"pattern":if(n.backgroundImage="url("+r.image+")",n.backgroundColor="transparent",r.fitPattern?n.backgroundSize="100% 100%":r.width||r.height?n.backgroundSize=`${r.width?r.width+"px":"auto"} ${r.height?r.height+"px":"auto"}`:n.backgroundSize="contain",r.fitPattern)n.backgroundRepeat="no-repeat";else{const{offsetX:t,offsetY:e,noRepeat:i,align:a,color:o}=r;if(i&&(n.backgroundRepeat="no-repeat"),o&&(n.backgroundColor=o),a)switch(a){case"center":n.backgroundPosition="center center";break;case"left-top":n.backgroundPosition="left top";break;case"left-bottom":n.backgroundPosition="left bottom";break;case"right-top":n.backgroundPosition="right top";break;case"right-bottom":n.backgroundPosition="right bottom";break;case"left":n.backgroundPosition="left center";break;case"right":n.backgroundPosition="right center";break;case"top":n.backgroundPosition="center top";break;case"bottom":n.backgroundPosition="center bottom"}else t||e?n.backgroundPosition=`${Number(t)||0}px ${Number(e)||0}px`:delete n.backgroundPosition}break;case"gradient":n.background=function(t,e){var r=e.colorStops,n=e.gradientType;if(r instanceof Array&&r.length>0)switch(n){case"radial":return"radial-gradient(farthest-corner at "+function(t,e){var{width:r,height:n}=t.bounds;switch(e){case"center":return[r/2,n/2];case"left-top":return[0,0];case"right-top":return[r,0];case"left-bottom":return[0,n];default:return[r,n]}}(t,e.center||"center").map((t=>t+"px")).join(" ")+","+r.map((t=>`${t.color} ${100*t.position}%`)).join(",")+")";case"linear":return"linear-gradient("+(180*(e.rotation||0)/3.141592653589793+90+"deg")+", "+r.map((t=>`${t.color} ${100*t.position}%`)).join(",")+")"}return""}(t,r)}else n.background="transparent"}att="undefined"==typeof document?function(t,e){return new Canvas(t,e)}:function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r};const mtt={x:1,y:1},ytt={x:0,y:0},btt={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"};function xtt(t){var{id:e,scale:r=mtt,translate:n=ytt,bold:i,italic:a,fontFamily:o="",textAlign:s,textBaseline:c,paddingTop:u,paddingBottom:l,paddingLeft:h,paddingRight:f,fontSize:d=R9.FONT_SIZE,lineWidth:p=0,lineDash:g}=t.state;l||=0,u||=0,h||=0,f||=0;var v=t.state.class;t.text;var{strokeStyle:m,fillStyle:y,rotation:b=0,fontColor:x,hidden:w}=t,{left:A,top:_,width:k,height:E}=t.bounds,S=t.element;S.hidden=w,e&&(S.id=e),v&&(S.className=v),Object.assign(S.style,btt,{fontFamily:o,fontSize:d+"px",left:A+"px",top:_+"px",width:k+"px",height:E+"px",paddingTop:u+"px",paddingRight:f+"px",paddingBottom:l+"px",paddingLeft:h+"px",border:p+"px",borderColor:m,borderStyle:p>0?g||R9.LINE_DASH:"",color:x,fontWeight:i?"bold":"",fontStyle:a?"italic":"",textAlign:"end"==s?"right":"start"==s?"left":s,verticalAlign:c}),vtt(t),function(t){if(t.isShadowable()&&t.state.shadow){var e=t.element,{left:r=0,top:n=0,blurSize:i=0,color:a="transparent"}=t.state.shadow;e.style.boxShadow=`${r}px ${n}px ${i}px ${a}`}}(t);var M=t.delta(),T=(r&&r.x||1)*M.sx,P=(r&&r.y||1)*M.sy,O=(b||0)+M.theta,I=M.tx||0,R=M.ty||0;["-webkit-","-moz-","-ms-","-o-",""].forEach((t=>{S.style[t+"transform"]=`rotate(${O}rad) translate(${I}px, ${R}px) scale(${T}, ${P}) perspective(1px)`}))}var wtt,Att=[];function _tt(){wtt=null;var t=performance.now(),e=(Att=Att.filter((t=>ktt(t)))).reduce(((e,r)=>{let n=t-r.updatedAt;return n>=r.retention?e.kills.push(r):e.next=0==e.next?r.retention-n:Math.min(e.next,r.retention-n),e}),{next:0,kills:[]});e.kills.forEach((t=>{let e=Att.indexOf(t);-1!=e?(Att.splice(e,1),t.removeSelf(!0)):y9("Should not be here. Maybe reentrance problem.")})),e.next>0&&(wtt=setTimeout(Ett,Math.max(e.next,500)))}function ktt(t){return!t.disposed&&t.retention>0&&!t.isTemplate()&&t.app&&t.app.isViewMode}var Ett=D7((function(){requestAnimationFrame(_tt)}),500);var Stt=new class{add(t){ktt(t)&&-1==Att.indexOf(t)&&(Att.push(t),t.touch()),this.touch()}remove(t){var e=Att.indexOf(t);e>0&&Att.splice(e,1),this.touch()}touch(){null!==wtt&&(clearTimeout(wtt),wtt=null),Ett()}get length(){return Att.length}};const Mtt=function(t){return t};function Ttt(t){var e=t.indexOf("||"),r="",n="";-1!=e&&(r=t,n=t.substring(e+2,t.length-1).trim(),t=t.replace(t.substring(e,t.length-1),"").trim());var i=t.substr(2,t.length-3).trim().replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".").filter((t=>!!t.trim())),a=i.slice(1);return{defaultValue:n,match:t,originText:r||t,target:i[0],accessor:a.length>0?function(t){return a.reduce(((t,e)=>t?t[e]:void 0),t)}:Mtt}}function Ptt(t,e,r){if(t){var n=r||o9,i=String(t),a=(i.match(/#{[^}]*}/gi)||[]).map((t=>Ttt(t))),o=(i.match(/\${[^}]*}/gi)||[]).map((t=>Ttt(t)));if(0!=a.length||0!=o.length)return function(){var t=i;return a.forEach((r=>{let i=n(r.accessor(e.getState(r.target)));t=t.replace(r.originText,void 0===i?r.defaultValue||"":i)})),o.forEach((r=>{let i=e.root.findById(r.target),a=n(r.accessor(i&&i.data));t=t.replace(r.originText,void 0===a?r.defaultValue||"":a)})),t}}}const Ott=210*Math.PI/180,Itt=150*Math.PI/180;var Rtt={"data-spread":function(t,e){var r=!1;e.lineWidth=2,e.strokeStyle="orange";const n=t.root;return t.mappings&&t.mappings.forEach((i=>{let a=n.findAll(i.target,t);a&&a.forEach((n=>{let i=t.center,a=n.center;i=t.transcoordS2C(i.x,i.y,t.rootModel),a=n.transcoordS2C(a.x,a.y,n.rootModel),function(t,e,r,n=10){var i=r.x-e.x,a=r.y-e.y,o=Math.atan2(a,i),s=r.x+n*Math.cos(o+Ott),c=r.y+n*Math.sin(o+Ott),u=r.x+n*Math.cos(o+Itt),l=r.y+n*Math.sin(o+Itt);t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(r.x,r.y),t.moveTo(r.x,r.y),t.lineTo(s,c),t.moveTo(r.x,r.y),t.lineTo(u,l),t.stroke()}(e,i,a),r=!0}))})),r},decotag:function(t,e){const r=t.decotag;if(r){let{left:n,top:i}=t.bounds,{x:a,y:o}=t.transcoordS2C(n,i,t.rootModel);a=Math.max(a+3,5),o=Math.max(o-8,15),e.font="12px Arial";let s=e.measureText(r);return e.fillStyle="#FF0000",ltt(e,a-s.actualBoundingBoxLeft-3,o-s.actualBoundingBoxAscent-3,s.actualBoundingBoxLeft+s.actualBoundingBoxRight+6,s.actualBoundingBoxAscent+s.actualBoundingBoxDescent+6,3,!0,!1),e.fillStyle="white",e.fillText(r,a,o),!0}return!1},anchors:function(t,e){var r=!1;return t.anchors&&t.anchors.forEach((n=>{const{name:i,position:a}=n;var{x:o,y:s}=a||{};if(!i)return;var{x:o,y:s}=t.transcoordS2C(o,s,t.rootModel);o+=4,s+=4,e.font="12px Arial";let c=e.measureText(i);e.fillStyle="#FF0000",ltt(e,o,s,c.width+6,16,3,!0,!1),e.fillStyle="white",e.fillText(i,o+3,s+13),r=!0})),r},link:function(t,e){var r=!1;if(!t.isLine())return;const{fromEnd:n,toEnd:i}=t;return[n,i].filter(Boolean).forEach((t=>{const{component:n,anchor:i}=t;if(!i)return;const{name:a,position:o}=i||{};if(!a||!o)return;var{x:s,y:c}=o||{},{x:s,y:c}=n.transcoordS2C(s,c,n.rootModel);s+=8,c+=20,e.font="12px Arial";let u=e.measureText(a);e.fillStyle="#FF0000",ltt(e,s-u.actualBoundingBoxLeft-4,c-u.actualBoundingBoxAscent-4,u.actualBoundingBoxLeft+u.actualBoundingBoxRight+8,u.actualBoundingBoxAscent+u.actualBoundingBoxDescent+8,4,!0,!1),e.fillStyle="white",e.fillText(a,s,c),r=!0})),r}};var Ctt={};const jtt={mutable:!1,resizable:!0,rotatable:!0,properties:[],"value-property":"text"},Dtt=[],Ltt={theta:0,tx:0,ty:0,sx:1,sy:1,fade:0},ztt=new WeakMap;var Ftt=0;class Btt{static get nature(){return jtt}static register(t,e){if(!e)return Ctt[t];Ctt[t]=e}static get residents(){return ztt}static registerDecorator(t,e){!function(t,e){Rtt[t]=e}(t,e)}constructor(t,e){this._app=e,this._model=t||{},this._state={},this._delta=l7(Ltt),e&&this.animation&&(this.animation.started=!0),this.clearCache(),Stt.add(this),ztt.set(this,Ftt++)}created(){}added(t){}removed(t){}async ready(){if(this.state.persistent){const{isViewMode:t,dataStorage:e}=this.app;t&&(this.data=await e.load(this))}}touch(){this.updatedAt=performance.now()}clearCache(...t){!function(t,...e){0==e.length?t.__cache__={}:e.forEach((e=>delete t.__cache__[e]))}(this,...t)}removeSelf(t){t?this.dispose():this.parent&&this.parent.removeComponent(this)}dispose(){this._animation&&(this._animation.dispose(),delete this._animation),this.disposeMappings(),this.parent&&this.parent.removeComponent(this),delete this._text_substitutor,delete this._value_substitutor,this._disposed=!0,this.retention&&Stt.touch(),this.clearCache(),delete this._app}get nature(){return this.constructor.nature}get disposed(){return!!this._disposed}isLayer(){return!1}isGroup(){return!1}isContainer(){return!1}isLine(){return!1}isRoot(){return!1}isRootModel(){return!1}is3dish(){return!1}isTemplate(){return!!this.get("templatePrefix")}isHTMLElement(){return!1}isConnectable(){return!1}replaceRefids(t){}get retention(){return Number(this.get("retention"))||0}get hasTextProperty(){return!0}get app(){return!this._app&&this.parent&&(this._app=this.parent.app),this._app}get model(){return this._model}get state(){return Object.assign({},this._model,this._state)}get hierarchy(){var t=l7(this._model);return this.volatile.forEach((e=>{delete t[e]})),t}get volatile(){return Dtt}get textHidden(){return!!this._textHidden}set textHidden(t){this._textHidden=!!t,this.invalidate()}get(t){return this._model[t]}set(t,e){if("string"==typeof t)return this.set({[t]:e});var r={},n={},i=!1,a=(t=l7(t),this);return Object.getOwnPropertyNames(t).forEach((function(e){let o=a._model[e],s=t[e];F3(o,s)||(n[e]=o,r[e]=s,a._model[e]=s,delete a._state[e],i=!0)})),i&&(this.clearCache(),r.hasOwnProperty("text")&&delete this._text_substitutor,r.hasOwnProperty("retention")&&Stt.add(this),r.hasOwnProperty("fillStyle")&&this.onchangeFill(r,n),r.hasOwnProperty("mappings")&&this.onchangeMappings(r,n),r.hasOwnProperty("data")&&this.onchangeData(r,n),this.onchange&&this.onchange(r,n),this.trigger("change",r,n)),this}getState(t){return this._state.hasOwnProperty(t)?this._state[t]:this.get(t)}setState(t,e){if("string"==typeof t)return this.setState({[t]:e});var r={},n={},i=!1,a=(t=l7(t),this),o=this.getState("sensitive");return Object.getOwnPropertyNames(t).forEach((function(e){let s=a.getState(e),c=t[e];!o&&F3(s,c)||(n[e]=s,r[e]=c,a._state[e]=c,i=!0)})),i&&(this.clearCache(),r.hasOwnProperty("text")&&delete this._text_substitutor,r.hasOwnProperty("fillStyle")&&this.onchangeFill(r,n),r.hasOwnProperty("data")&&this.onchangeData(r,n),this.onchange&&this.onchange(r,n),this.trigger("change",r,n)),this}get root(){return this.isRoot()?this:this.parent&&this.parent.root}get rootModel(){return this.isRootModel()?this:this.parent&&this.parent.rootModel}get parent(){return this._parent}set parent(t){this._parent=t}get anchors(){return this.nature.anchors||[]}findAnchor(t){return this.anchors.find((e=>e.name===t))}isDescendible(t){return!0}getContext(){return this._parent.getContext()}get center(){var t=this.bounds;return{x:t.left+t.width/2,y:t.top+t.height/2}}set center(t){if(t&&!isNaN(t.x)&&!isNaN(t.y)){var e=this.center;if(Math.round(100*t.x)/100!=Math.round(100*e.x)/100||Math.round(100*t.y)/100!=Math.round(100*e.y)/100){var r=t.x-e.x,n=t.y-e.y;this.path=this.path.map((t=>({x:t.x+r,y:t.y+n})))}}}get location(){return this.center}set location(t){this.center=t}get rotate(){const{rotationX:t,rotationY:e,rotation:r}=this.state;return{x:t,y:e,z:-r}}set rotate(t){const{x:e,y:r,z:n}=t;this.setState({rotationX:e,rotationY:r,rotation:-n})}get dimension(){const{width:t,height:e}=this.bounds,{depth:r}=this.state;return{width:t,height:e,depth:r}}set dimension(t){const{width:e,height:r,depth:n}=t,{top:i,left:a}=this.bounds;this.bounds={top:i,left:a,width:e,height:r},this.setState("depth",n)}get bounds(){var t,e,r,n,i=this.path;t=e=i[0].x,r=n=i[0].y;for(let a=1;a<i.length;a++){let o=i[a];o.x<t?t=o.x:o.x>e&&(e=o.x),o.y<r?r=o.y:o.y>n&&(n=o.y)}return{left:t,top:r,width:e-t,height:n-r}}set bounds(t){var e=this.bounds;if(Math.round(100*t.width)/100!=Math.round(100*e.width)/100||Math.round(100*t.height)/100!=Math.round(100*e.height)/100||Math.round(100*t.left)/100!=Math.round(100*e.left)/100||Math.round(100*t.top)/100!=Math.round(100*e.top)/100){var r=0==e.width?1:t.width/e.width,n=0==e.height?1:t.height/e.height;this.path=this.path.map((i=>({x:t.left+(i.x-e.left)*r,y:t.top+(i.y-e.top)*n})))}}get path(){return y9("이 컴포넌트에 get path 가 구현되어있지 않음.",this),[]}set path(t){y9("이 컴포넌트에 get path 가 구현되어있지 않음.",this)}get drawPath(){return this.path}outline(t){return function(t,e){var r=t.path.slice();if(r&&r.length){var n=1,i=[];if(t.isLine()||r.push(r[0]),e<=0)return t.transcoordS2T(r[0].x,r[0].y);if(e>=1)return t.transcoordS2T(r[r.length-1].x,r[r.length-1].y);for(;r[n];){let t=r[n-1],e=r[n],a=e.x-t.x,o=e.y-t.y;i.push(Math.sqrt(a*a+o*o)),n++}var a=i.reduce((function(t,e){return t+e}),0);n=0;var o=0;do{o+=i[n++]}while(o/a<e);e=(e-(o-=i[--n])/a)*(a/i[n]);var s=r[n%r.length],c=r[(n+1)%r.length],u=s.x+Math.round((c.x-s.x)*e),l=s.y+Math.round((c.y-s.y)*e);return t.transcoordS2T(u,l)}y9("path should not be empty")}(this,t||0)}get strokeStyle(){return this.get("strokeStyle")}set strokeStyle(t){this.set("strokeStyle",t)}get fillStyle(){return this.getState("fillStyle")}set fillStyle(t){this.setState("fillStyle",t)}get fontColor(){return this.get("fontColor")}set fontColor(t){this.set("fontColor",String(o9(t)))}get rotation(){return this.getState("rotation")}set rotation(t){this.setState("rotation",Number(o9(t)))}contains(t,e){return!1}get mutable(){return this.nature.mutable}get resizable(){return this.nature.resizable&&!this.stuck}adjustResize(t,e,r){if(r){let e=this.bounds,r=e.height/e.width,n=t.width-e.width,i=t.height-e.height;n*r>i?i=n*r:n=i/r;let a=t.left-e.left,o=t.top-e.top;return 0!=a&&0!=o?(o=-i,a=-n):0!=a?a=-n:0!=o&&(o=-i),{left:e.left+a,top:e.top+o,width:e.width+n,height:e.height+i}}return t}get rotatable(){return this.nature.rotatable&&!this.stuck}adjustRotation(t,e){if(e||this.app.rotateStepForced){let e=this.app.rotateStep;return Math.floor((t+e/2)/e)*e}return t}get capturable(){return!1!==this.get("capturable")&&(this.app.isEditMode||!this.hidden)}get stuck(){return!!(this.parent&&this.parent.layout.isStuck(this)||this.get("locked"))}findFirst(t,...e){if(t(this,...e))return this}findAll(t,...e){return"string"==typeof t?U9(t,this,e[0]||this):"function"==typeof t&&t(this,...e)?[this]:void 0}capture(t,e,r){if(!this.capturable||r?.(this))return!1;var n=this.transcoordP2S(t,e);return this.contains(n.x,n.y)?this:void 0}prepare(t,e){t(this)}prepareIf(t){t&&this.prepare&&this.prepare((t=>{this.invalidate()}),(t=>{y9(t)}))}get decotag(){const{id:t,tag:e}=this.state;return(t?`#${t}`:"")+(e?`@${e}`:"")}get decorators(){return["decotag","data-spread"]}get hidden(){return this.getState("hidden")||!this.data&&0!==this.data&&this.getState("ndns")||this.isTemplate()}set hidden(t){this.setState("hidden",t)}draw(t){t.save(),this.__proto__.hasOwnProperty("_pre_draw")?this._pre_draw(t):this.prerender(t),this.__proto__.hasOwnProperty("_draw")?this._draw(t):this.render(t),this.__proto__.hasOwnProperty("_post_draw")?this._post_draw(t):this.postrender(t),t.restore()}delta(t,e){if(void 0===e)return t?this._delta[t]:this._delta;this._delta[t]=e}prerender(t){var e=this.rotatePoint,{scale:r,rotation:n,shadow:i,alpha:a}=this.state,o=(r&&r.x||1)*this._delta.sx,s=(r&&r.y||1)*this._delta.sy,c=(n||0)+this._delta.theta,{tx:u=0,ty:l=0}=this._delta,h=(a||1)-this._delta.fade;(u||l)&&t.translate(u,l),(1!=o||1!=s||c)&&(t.translate(e.x,e.y),1==o&&1==s||t.scale(o,s),c&&t.rotate(c),t.translate(-e.x,-e.y)),h&&(t.globalAlpha=h),i&&j9(t,i,this),this.app.isEditMode&&this.hidden&&(t.globalAlpha*=.5)}render(t){}postrender(t){this.drawText(t)}drawText(t){!this.textHidden&&this.text&&this.hasTextProperty&&dtt(t,this.textBounds,this.textLines(t),this.state)}drawStroke(t,e){stt(t,e?{...this.state,...e}:this.state)}drawFill(t,e){this.fillStyle&&"transparent"!=this.fillStyle&&(ott(t,this.bounds,this.center,e?{...this.state,...e}:this.state,this),function(t){t.shadowColor="transparent"}(t))}animate(t){return this._animate&&this._animate.stop(),this._animate=t6(t),this._animate}move({x:t,y:e}){var r=this.path,n=t,i=e;this.path=r.map((t=>({x:t.x+n,y:t.y+i})))}symmetryX(t){"number"!=typeof t&&(t=this.center.x);var{rotation:e}=this.state,r=this.fillStyle;if(this.set("rotation",2*Math.PI-e),r&&"gradient"===r.type&&"linear"===r.gradientType){var n=l7(r);n.rotation=(Math.PI-parseFloat(r.rotation||0))%(2*Math.PI),this.set("fillStyle",n)}this.path=this.path.map((e=>({x:2*t-e.x,y:e.y})))}symmetryY(t){this.symmetryX(),this.set("rotation",(Math.PI+this.model.rotation)%(2*Math.PI)),t&&this.move({x:0,y:2*(t-this.center.y)},!1)}get animation(){if(this.app.isViewMode&&!this.isTemplate()){if(!this._animation){var t=this.state.animation;t&&t.oncreate&&(this._animation=(e=this,r=t.oncreate,(n=$5[r.type])?new n(e,r):null))}var e,r,n;return this._animation}}effect(t,e){return function(t,e,r){var n=D9[r.type];n&&n(t,e,r)}(this,t,e)}set started(t){this.animation&&(this.animation.started=t)}invalidate(){this.parent&&this.parent.invalidate()}get font(){return ftt(this.model)}get lineHeight(){var t=this.get("lineHeight");return t||1.2*this.fontSize}defaultTextSubstitutor(){var t=this.getState("text");return null==t?"":String(t)}get textSubstitutor(){return this._text_substitutor||(this._text_substitutor=Ptt(this.getState("text"),this)||this.defaultTextSubstitutor),this._text_substitutor}get text(){var t=this.get("textFormat");return t?function(t,e){if(!t||isNaN(+e))return e;var r,n,i,a,o,s,c,u,l,h=t.length,f=t.search(/[0-9\-\+#]/),d=f>0?t.substring(0,f):"",p=t.split("").reverse().join(""),g=p.search(/[0-9\-\+#]/),v=h-g,m=t.substring(v,v+1),y=v+("."===m||","===m?1:0),b=g>0?t.substring(y,h):"";if(r=(e="-"===(t=t.substring(f,y)).charAt(0)?-e:+e)<0?e=-e:0,i=(n=t.match(/[^\d\-\+#]/g))&&n[1]&&n[0]||",",t=t.split("."),e=+(e=e.toFixed(t[1]&&t[1].length))+"",o=t[1]&&t[1].lastIndexOf("0"),(!(c=e.split("."))[1]||c[1]&&c[1].length<=o)&&(e=(+e).toFixed(o+1)),u=t[0].split(i),t[0]=u.join(""),(a=t[0]&&t[0].indexOf("0"))>-1)for(;c[0].length<t[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((e=e.split("."))[0]=c[0],s=u[1]&&u[u.length-1].length){for(p="",v=(l=e[0]).length%s,h=l.length,y=0;y<h;y++)p+=l.charAt(y),!((y-v+1)%s)&&y<h-s&&(p+=i);e[0]=p}return e[1]=t[1]&&e[1]?"."+e[1]:"","0"!==(n=e.join(""))&&""!==n||(r=!1),d+("+"==t[0].substring(0,1)?r?"-":"+":r?"-":"")+n+b}(t,this.textSubstitutor()):this.textSubstitutor()}set text(t){delete this._text_substitutor;var e=o9(t);this.setState("text",null==e?"":String(e))}textLines(t){return htt(t||this.getContext(),this.textBounds.width,this.font,this.text,this.get("textWrap"))}get textBounds(){var{paddingTop:t,paddingLeft:e,paddingRight:r,paddingBottom:n}=this.state;n||=0,t||=0,e||=0,r||=0;var{left:i,top:a,width:o,height:s}=this.bounds;return{left:i+e,top:a+t,width:Math.max(o-e-r,0),height:Math.max(s-t-n,0)}}get textRotation(){return 0}get rotatePoint(){return this.center}trim(){delete this._model[""],"chartjs"!==this._model.type&&delete this._model.chart}get value(){var t=this.nature["value-property"]||"text";return"value"==t?this.getState("value"):this[t]}set value(t){var e=this.nature["value-property"]||"text";"value"==e?this.setState("value",t):this[e]=t}get data(){return this.getState("data")}set data(t){this.setState("data",t),this.touch()}get mappings(){return!this._mappings&&this.parent&&this.buildMappings(),this._mappings}serialize(...t){return JSON.stringify(this.hierarchy,...t)}get controls(){}closeScene(t){this.rootModel.closeScene(t)}}Btt.union=function(t){var e,r,n,i;return t.forEach((t=>{void 0===e?(e=t.left,r=t.top,n=t.left+t.width,i=t.top+t.height):(e=Math.min(t.left,e),r=Math.min(t.top,r),n=Math.max(t.left+t.width,n),i=Math.max(t.top+t.height,i))})),{left:e,top:r,width:n-e,height:i-r}},Btt.transcoordR=ptt,Btt.transcoordRR=gtt,Btt.createCanvas=att,Btt.memoize=w9,Btt.mixin=m9,Btt.drawText=dtt,Btt.font=ftt,Btt.textLines=htt,Btt.drawStroke=stt,Btt.drawFill=ott,Btt.reposition=xtt,Btt.RetentionManager=Stt,Btt.template=K5,Btt.buildSubstitutor=Ptt,Object.assign(Btt.prototype,{drawEffect:function(t){const{effects:e}=this.state;(e||[]).forEach((e=>{this.effect(t,e)}))},prepareFill:function(t,e){var r=this.fillStyle;if(r&&"pattern"==r.type&&r.image){if("string"!=typeof r.image)return this._pattern_image_origin=this._pattern_image=r.image,void t(this);this._pattern_image=null,this._pattern_image_origin=new Image;var n=this;this._pattern_image_origin.onload=function(){if(!r.fitPattern&&!r.width&&!r.height)return n._pattern_image=n._pattern_image_origin,void t(this);let e=r.width||this.width,i=r.height||this.height;r.fitPattern&&(e=n.bounds.width,i=n.bounds.height);let a=att(e,i);a.getContext("2d").drawImage(this,0,0,this.width,this.height,0,0,e,i),n._pattern_image=a,t(this)},this._pattern_image_origin.onerror=function(t){e(t)};try{"data"!==String(r.image).substring(0,4)?this._pattern_image_origin.crossOrigin="use-credentials":this._pattern_image_origin.crossOrigin=null,this._pattern_image_origin.src=this.app.url(r.image)}catch(t){e(t)}}else t(this)},prepareFillIf:function(t){t&&this.prepareFill((t=>{this.invalidate()}),(t=>{y9(t)}))},onchangeFill:function(t,e){var r=this.fillStyle;r&&"pattern"!==r.type?this._pattern_image&&(this._pattern_image=null,this._pattern_image_origin=null):r?.image&&this.prepareFillIf(r.image)},drawImage:function(t,e,r,n,i,a){e.complete?t.drawImage(e,r,n,i,a):e.addEventListener("load",(()=>{this.invalidate()}))},mutateBounds:function(t,e){var r=this.bounds,n=this.rotatePoint,i=this.get("rotation"),a=this.get("scale");if(t){var o=t.call(e,r);o&&(r=o)}var{left:s,top:c,width:u,height:l}=r,h=[{x:s,y:c},{x:s+u,y:c+l}],f=(h=h.map((t=>gtt(t.x,t.y,n,i,a))))[0],d=h[1];n={x:(f.x+d.x)/2,y:(f.y+d.y)/2},f=(h=h.map((t=>ptt(t.x,t.y,n,i,a))))[0],d=h[1],this.bounds={left:f.x,top:f.y,width:d.x-f.x,height:d.y-f.y}},mutatePath:function(t,e,r){var n=this.path,i=this.rotatePoint;this.get("rotation"),this.get("scale"),t&&(n=t.call(r,n));var a=n.map((t=>this.transcoordS2P(t.x,t.y)));e&&(n=e.call(r,a))&&(a=n);var o,s,c,u,l={x:0,y:0};o=s=(n=a.map((t=>this.transcoordP2S(t.x,t.y,l))))[0].x,c=u=n[0].y;for(let t=1;t<n.length;t++){let e=n[t];e.x<o?o=e.x:e.x>s&&(s=e.x),e.y<c?c=e.y:e.y>u&&(u=e.y)}i={x:(o+s)/2,y:(c+u)/2},i=this.transcoordS2P(i.x,i.y,l),this.path=a.map((t=>this.transcoordP2S(t.x,t.y,i)))},access:function(t){if(t){var e=String(t),r=(e.match(/#{(\S*)}/)||[]).map((t=>Ttt(t)))[0];if(r)return r.accessor(this.getState(r.target));var n=(e.match(/\${[^}]*}/)||[]).map((t=>Ttt(t)))[0];if(n){let t=this.root.findById(n.target);return n.accessor(this.getState(t))}return t}},substitute:function(t,e){if(t){var r=String(t),n=e||o9,i=(r.match(/#{(\S*)}/gi)||[]).map((t=>Ttt(t))),a=(r.match(/\${[^}]*}/gi)||[]).map((t=>Ttt(t)));if(0==i.length&&0==a.length)return r;var o=r;return i.forEach((t=>{let e=n(t.accessor(this.getState(t.target)));o=o.replace(t.match,void 0===e?"":e)})),a.forEach((t=>{let e=this.root.findById(t.target),r=n(t.accessor(e&&e.data));o=o.replace(t.match,void 0===r?"":r)})),o}},onchangeMappings:function(t,e){this.disposeMappings(),itt.call(this)},onchangeData:function(t,e){this.state.persistent&&this.app.isViewMode&&this.app.dataStorage.save(this,t.data),itt.call(this,[!0])},buildMappings:function(){if(this._model.mappings)return!this._model.mappings instanceof Array?(y9("Mappings model is invalid (should be a Array) ..",this._model.mappings),void(this._mappings=[])):void(this._mappings=(this._model.mappings||[]).map((t=>new ntt(t,this))));this._mappings=[]},executeMappings:itt,disposeMappings:function(){this._mappings&&this._mappings.forEach((t=>t.dispose())),delete this._mappings},ondropfile:function(t,e){for(let r=0;r<t.length;r++)if(t[r].type.startsWith("image/"))return void this.set("fillStyle",{type:"pattern",image:e[r],fitPattern:!0})},transcoordS2P:function(t,e,r){if(!this.parent)return{x:t,y:e};var{rotation:n=0,scale:i={x:1,y:1}}=this.state;if(this.isLayer()){let r=this.state.translate,a=gtt(t,e,void 0,n+this._delta.theta,i);return r&&(a.x+=r.x,a.y+=r.y),a}r=r||this.rotatePoint;const{theta:a=0,tx:o=0,ty:s=0,sx:c=1,sy:u=1}=this._delta||{},l=gtt(t+o,e+s,r={x:r.x+o,y:r.y+s},n+a,i={x:i.x*c,y:i.y*u});return{x:l.x-(r.x*i.x-r.x),y:l.y-(r.y*i.y-r.y)}},transcoordP2S:function(t,e,r){if(!this.parent)return{x:t,y:e};var{rotation:n=0,scale:i={x:1,y:1}}=this.state;if(this.isLayer()){let r=this.state.translate,a=ptt(t,e,r,n,i);return r&&(a.x-=r.x/(i?i.x:1),a.y-=r.y/(i?i.y:1)),a}var a=ptt(t,e,r=r||this.rotatePoint,n,i);return{x:a.x+(r.x-r.x/i.x),y:a.y+(r.y-r.y/i.y)}},transcoordS2T:function(t,e,r){r=r||this.rootModel;var n=[];for(let t=this.parent;t&&t!==r;t=t.parent)n.push(t);var i=this.transcoordS2P(t,e);return n.forEach((t=>{let{scale:e}=t.model,r=t.bounds;if(e){let n=t.rotatePoint;i.x+=(n.x-r.left)*e.x,i.y+=(n.y-r.top)*e.y}else i.x+=r.left,i.y+=r.top;i=t.transcoordS2P(i.x,i.y)})),i},transcoordT2P:function(t,e,r){r=r||this.rootModel;var n=[];for(let t=this.parent;t&&t!==r;t=t.parent)n.splice(0,0,t);var i={x:t,y:e};return n.forEach((t=>{let{scale:e}=t.model;i=t.transcoordP2S(i.x,i.y);let r=t.bounds;if(e){let n=t.rotatePoint;i.x-=(n.x-r.left)/e.x,i.y-=(n.y-r.top)/e.y}else i.x-=r.left,i.y-=r.top})),i},transcoordT2S:function(t,e,r){var n=this.transcoordT2P(t,e,r);return this.transcoordP2S(n.x,n.y)},transcoordS2TR:function(t,e,r){r=r||this.rootModel;var n=this.transcoordS2T(t,e,r);return gtt(n.x,n.y,void 0,(r.get("rotation")||0)+r._delta.theta)},transcoordS2O:function(t,e,r){var n=this.rootModel,i=this.transcoordS2T(t,e,n);return r.transcoordT2S(i.x,i.y,n)},transcoordC2S:function(t,e,r){if(!r)for(r=this;r&&!r.isLayer();)r=r.parent;var{translate:n={x:0,y:0},scale:i={x:1,y:1},rotation:a=0}=r.model,o=ptt(t,e,n,a,i);return n&&(o.x-=n.x/(i?i.x:1),o.y-=n.y/(i?i.y:1)),r===this?o:this.transcoordT2S(o.x,o.y,r)},transcoordS2C:function(t,e,r){if(!r)for(r=this;r&&!r.isLayer();)r=r.parent;if(r!==this)var n=this.transcoordS2T(t,e,r);else n={x:t,y:e};var{translate:i={x:0,y:0},rotation:a=0,scale:o={x:1,y:1}}=r.model;return n=gtt(n.x,n.y,void 0,a+r._delta.theta,o),i&&(n.x+=i.x,n.y+=i.y),n},_pre_draw:Btt.prototype.prerender,_draw:Btt.prototype.render,_post_draw:Btt.prototype.postrender}),["rotatePoint","font","lineHeight","retention"].forEach((t=>Btt.memoize(Btt.prototype,t,!1))),["bounds","center","textBounds"].forEach((t=>Btt.memoize(Btt.prototype,t,!0))),Btt.mixin(Btt.prototype,f9.withEvent);class Ntt extends Btt{set rotationX(t){this.setState("rotationX",t)}get rotationX(){return this.getState("rotationX")}set rotationY(t){this.setState("rotationY",t)}get rotationY(){return this.getState("rotationY")}set rotationZ(t){this.setState("rotation",t)}get rotationZ(){return this.getState("rotation")}set zPos(t){this.setState("zPos",t)}get zPos(){return this.getState("zPos")}set depth(t){this.setState("depth",t)}get depth(){return this.getState("depth")}postrender(t){this.drawFill(t),this.drawStroke(t),super.postrender(t)}render(t){var e=this.drawPath,{round:r=0}=this.state;if(!(e.length<=1)){t.beginPath();for(var n=0;n<e.length;n++){const c=e[(n-1+e.length)%e.length],u=e[(n+e.length)%e.length],l=e[(n+1)%e.length];if(c.x===u.x&&c.y===u.y)continue;var i=0!==(s=Math.sqrt((c.x-u.x)*(c.x-u.x)+(c.y-u.y)*(c.y-u.y)))?Math.atan2(c.x-u.x,c.y-u.y):0,a=Math.sin(i)*Math.min(r,s/2)+u.x,o=Math.cos(i)*Math.min(r,s/2)+u.y;const h=r>0||0!==s?{x:a,y:o}:u;var s;i=0!==(s=Math.sqrt((l.x-u.x)*(l.x-u.x)+(l.y-u.y)*(l.y-u.y)))?Math.atan2(l.x-u.x,l.y-u.y):0,a=Math.sin(i)*Math.min(r,s/2)+u.x,o=Math.cos(i)*Math.min(r,s/2)+u.y;const f=r>0||0!==s?{x:a,y:o}:u;0==n?t.moveTo(h.x,h.y):t.lineTo(h.x,h.y),r>0&&t.quadraticCurveTo(u.x,u.y,f.x,f.y)}t.closePath()}}}var Utt=t=>{var e=class extends t{contains(t,e){var{left:r,top:n,width:i,height:a,lineWidth:o=0}=this.state,s=o/2;return t<Math.max(r+i,r)+s&&t>Math.min(r+i,r)-s&&e<Math.max(n+a,n)+s&&e>Math.min(n+a,n)-s}set path(t){var e=t[0],r=t[2];this.set({left:e.x,top:e.y,width:r.x-e.x,height:r.y-e.y})}get path(){var{left:t=0,top:e=0,width:r=0,height:n=0}=this.state;return[{x:t,y:e},{x:t+r,y:e},{x:t+r,y:e+n},{x:t,y:e+n}]}get anchors(){return function(t){var{left:e,top:r,width:n,height:i}=t.bounds,a=e+n/2,o=r+i/2;return[{name:"TOP",position:{x:a,y:r}},{name:"RIGHT",position:{x:e+n,y:o}},{name:"BOTTOM",position:{x:a,y:r+i}},{name:"LEFT",position:{x:e,y:o}}]}(this)}};return w9(e.prototype,"path",!1),e};const Ytt={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"textarea",label:"front-side-template",name:"frontSideTemplate",property:{language:"html"}},{type:"textarea",label:"back-side-template",name:"backSideTemplate",property:{language:"html"}},{type:"textarea",label:"style",name:"style",property:{language:"css"}}],help:"scene/component/info-window"};const Gtt=20;function Htt(t,e){var r=t.split(/\s+/),n=r.indexOf(e);return-1!=n?r.splice(n,1):r.splice(-1,0,e),r.join(" ")}class Wtt extends(Utt(Ntt)){static get image(){return Wtt._image||(Wtt._image=new Image,Wtt._image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAY1BMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADIAbxiAAAAIHRSTlMA+gPshCwwWFzYCeLRm7QRG6rLeDZI9JOJJDtjb1HAf1sAT80AAAQQSURBVHhe7MCBAAAAAMKw/KkzOMG2BAAAAKeu3lUohIEggO7jQi5qHqpgwML5/6+0F0y02z31FlvMMLKt86QMQ1ined2Evih1hFFjLfRWjgzDOGZ6JSiM00B9EuHALtQxJLiQBmqSBCeSUEuEGzs1BDjSaHxWOKK5Eyz/4SoMV/hp4+vtcPkdwZD/udwevNg7t1xXYRiKmkB7C+ENlPLq8fxHeX+RGjWQ1D45ldcIulBIvCvYJGBEadyTzxAcfY57NBjpLScOO/bzugcTHe7IMwiSLMcdHZhocMcMgTLjjgZM7F1bCJZ2v27ARGzYDwIk2Z+JYGJ/iiwQLMv+JAEThjkmRG64Q0Q+gIiIiIiIiIiIyFy0KRFt0bOJZAWSUigmkQaJaXhENiRnYBEpkZySRSRGcmIWEaQnYhHRSI5mESmQnIJFZIqQmGhiEYEbEnPjGlEGjYTogW/WUkOXENENSqZfEXmDiIiIiIiIiIiIiIiIiIiImq5ETIpRpBpjJCMeKy6Ri0ZS9MQjkmkkJs1YRDokp2MRyZGclkUkQnIiEQltaX3Lzb6yiGTpl2y/avqSAxGgelCOKI+Kc2isL0TUSsZ4EREREREREREREREREREREfnIQzXrNWSRTeNxnlOwIgueIr6AAyE+CpiqMEUK71IDO4E+LluEKYKnKcMUifEsTZgiJZ5lDVNkwJPcqzBFoPF/HplfxL/w6b4EPGv1h18Weya1TL8iIiIeiIiIiIiIiEjkPefxV+5YA9PPHylB+u5aqgZ39H+jKOxrqtu+pkzvr9YbzoZ6w2OFkzcrA3yE4WZlSSyFk54VoA/wR43+FaD+r9w32QdWvgvjp2ty2xq8qHPHmtyPFxfrK3hw1ejERlAlfR/Ame2OTow05d4rOLLSlHtDVhI0uRO01JeZ405op6zgNNXT+bIRfpIgn+AkU4pOxBscohojdCHu4RRzjC5EYwVHqRONDkSnEvK/CB3QSU32IRW3ZPnj9iEVoGCNTLVrh8ia1x+6wq8xvB5mz8pxu7oPwIn9lcR0AiuX1+1KX+BXqdvXzWsAC0NsGjzZsS/2Bd6yRA5RgIHkXNhSD3whASZ8rrB9mItuEAizac0fDlHxDMEwpQfD1tW4y3Hjfy5s9nOHH3uwWA+EqEJBWCjoTL/S5toBB/7hu6zer74NgqSP39zJU+qQX3ix763mHTqvIVRUVprCljlElRkEjBqNYevH8veBJ2xhiyhE8YctmhDFH7ZoQhR/2KIJUfxhiyRE8YctmhDFH7ZoQhR/2OIJUfxhC9Ppf/t1jgJACERRsHGyYRZB0Ujvf0xD8w6kP7y6RZmgf/oTFTtbbzJVxZWo2Nlqw6TVy5GowNl6ssm7v50obamfSxQAAAAAAAsKLM15fb3vpQAAAABJRU5ErkJggg=="),Wtt._image}static toggle(t,e,r,n){if(e){var i=t.root.findById(e);i?i._findInfoWindowByComponent(t)?Wtt.hide(t,e):Wtt.show(t,e,r,n):console.warn("InfoWindow Not Found.",e)}else console.warn("InfoWindow not defined.")}static hide(t,e){if(e){var r=t.root.findById(e);r?r._removeInfoWindow(t):console.warn("InfoWindow Not Found.",e)}}static show(t,e,r,n){if(e){var i=t.root.findById(e);if(i){if(!i._findInfoWindowByComponent(t)){var{frontSideTemplate:a="",backSideTemplate:o=""}=i.model,s=[a,o].filter((t=>String(t).trim()));if(s=s.map((t=>Btt.template(function(t,e,r){return(e||r?['<div class="info-window-btns">',e?'<button class="closable">&#88</button>':"",r?'<button class="flipable">&#8652</button>':"","</div>"]:[]).concat(['<div class="info-window-content">',t,"</div>"]).join("")}(t,!r,2==s.length)))),0!=s.length){var c='\n.flip {\n backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n -ms-backface-visibility: hidden;\n -o-backface-visibility: hidden;\n -webkit-backface-visibility: hidden;\n border-radius: 7px;\n height: auto;\n font: normal 14px helvetica, arial, san serif;\n position: absolute;\n opacity:.9;\n transform-origin: 50% 50% 0px;\n -moz-transform-origin: 50% 50% 0px;\n -ms-transform-origin: 50% 50% 0px;\n -o-transform-origin: 50% 50% 0px;\n -webkit-transform-origin: 50% 50% 0px;\n transition: all 2s;\n -moz-transition: all 2s;\n -ms-transition: all 2s;\n -o-transition: all 2s;\n -webkit-transition: all 2s;\n min-width: 100px;min-height:50px;\n background-color:#3e424e;\n box-shadow: 2px 3px 2px 0px rgba(0,0,0,0.15);\n}\n\n#side-1 {\n transform: rotateY( 0deg );\n -moz-transform: rotateY( 0deg );\n -ms-transform: rotateY( 0deg );\n -o-transform: rotateY( 0deg );\n -webkit-transform: rotateY( 0deg );\n}\n.flip:after{\n content:"";\n display:block;\n position: absolute;\n opacity:.9;\n width: 0;\n height: 0;\n}\n.flip.arrow-top:after{\n left:45%;\n top:-17px;\n border-left:10px solid transparent;\n border-bottom:18px solid #323b44;\n border-right:10px solid transparent;\n}\n.flip.arrow-right:after{\n left:100%;\n top:48%;\n border-top:10px solid transparent;\n border-left:18px solid #323b44;\n border-bottom:10px solid transparent;\n}\n.flip.arrow-bottom:after{\n left:45%;\n top:100%;\n border-left:10px solid transparent;\n border-top:18px solid #323b44;\n border-right:10px solid transparent;\n}\n.flip.arrow-left:after{\n right:100%;\n top:48%;\n border-top:10px solid transparent;\n border-right:18px solid #323b44;\n border-bottom:10px solid transparent;\n}\n\n#side-2 {\n transform: rotateY( 180deg );\n -moz-transform: rotateY( 180deg );\n -ms-transform: rotateY( 180deg );\n -o-transform: rotateY( 180deg );\n -webkit-transform: rotateY( 180deg );\n}\n\n.flip-side-1 {\n transform: rotateY( 0deg ) !important;\n -moz-transform: rotateY( 0deg ) !important;\n -ms-transform: rotateY( 0deg ) !important;\n -o-transform: rotateY( 0deg ) !important;\n -webkit-transform: rotateY( 0deg ) !important;\n}\n\n.flip-side-2 {\n transform: rotateY( 180deg ) !important;\n -moz-transform: rotateY( 180deg ) !important;\n -ms-transform: rotateY( 180deg ) !important;\n -o-transform: rotateY( 180deg ) !important;\n -webkit-transform: rotateY( 180deg ) !important;\n}\n\n.info-window-btns{\n position:absolute;\n top:-18px;\n right:5px;\n overflow:hidden;\n}\n.info-window-content{\n padding:10px;\n color:#efefef;\n font-size:13px;\n line-height:1.4;\n}\n.info-window-btns button{\n width:40px;height:40px;\n float:right;\n border:0;\n border-radius:50%;\n background-color:#2a7da1;\n margin-right:3px;\n text-align:center;\n cursor:pointer;\n font-size:35px;\n color:#fff;\n line-height:0;\n}\n.info-window-btns button:hover{\n background-color:#60bb23;\n}\n'+i.get("style"),{left:u,top:l}=t.bounds,{x:h,y:f}=n?t.rootModel.transcoordC2S(n.x,n.y):t.transcoordS2T(u,l);u=h,l=f;var d=document.createElement("span");d.style.position="absolute";var p=document.createElement("style");if(p.type="text/css",p.appendChild(document.createTextNode(c)),d.appendChild(p),s[0]){var g=document.createElement("div");g.id="side-1",g.className="flip",g.style.display="inline-block",g.innerHTML=s[0](t)}if(s[1]){var v=document.createElement("div");v.id="side-2",v.className="flip",v.style.display="inline-block",v.innerHTML=s[1](t)}O9.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))})),I9.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))}));var m=t.root.model_layer.overlay;if(g&&d.appendChild(g),v&&d.appendChild(v),m.appendChild(d),i._addInfoWindow(t,d,p),g){let r=g.querySelector(".info-window-btns > .flipable");r&&r.addEventListener("click",(function(t){t.preventDefault(),v.className=Htt(v.className,"flip-side-1"),g.className=Htt(g.className,"flip-side-2")}),!1);let n=g.querySelector(".info-window-btns > .closable");n&&n.addEventListener("click",(function(r){r.preventDefault(),Wtt.hide(t,e)}),!1)}if(v){let r=v.querySelector(".info-window-btns > .flipable");r&&r.addEventListener("click",(function(t){t.preventDefault(),v.className=Htt(v.className,"flip-side-1"),g.className=Htt(g.className,"flip-side-2")}),!1);let n=v.querySelector(".info-window-btns > .closable");n&&n.addEventListener("click",(function(r){r.preventDefault(),Wtt.hide(t,e)}),!1)}var y=g.offsetWidth,b=g.offsetHeight;window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var x=t.rootModel.target.getBoundingClientRect(),w=[];g&&w.push(g),v&&w.push(v);var A={x:u,y:l},_=t.transcoordS2C(A.x,A.y);if(_.x+y/2+x.left<x.right&&_.x-y/2>x.left){if(b+Gtt<_.y)return d.style.marginLeft=A.x-y/2+"px",d.style.marginTop=A.y-b-Gtt+"px",void w.forEach((t=>t.className+=" arrow-bottom"));if(_=t.transcoordS2C(A.x,A.y+b+Gtt),x.bottom>_.y+x.top)return d.style.marginLeft=A.x-y/2+"px",d.style.marginTop=A.y+Gtt+"px",void w.forEach((t=>t.className+=" arrow-top"))}if((_=t.transcoordS2C(A.x,A.y)).x-(y+Gtt)>x.left)return d.style.marginLeft=A.x-y-Gtt+"px",d.style.marginTop=A.y-b/2+"px",void w.forEach((t=>t.className+=" arrow-right"));d.style.marginLeft=A.x+Gtt+"px",d.style.marginTop=A.y-b/2+"px",w.forEach((t=>t.className+=" arrow-left"))}}}else console.warn("InfoWindow Not Found.",e)}else console.warn("InfoWindow not defined.")}dispose(){this.infoWindows.map((t=>t.component)).forEach((t=>this._removeInfoWindow(t))),super.dispose()}get infoWindows(){return this._windows||(this._windows=[]),this._windows}_findInfoWindowByComponent(t){return this.infoWindows.find((e=>e.component===t))}_addInfoWindow(t,e,r){this._findInfoWindowByComponent(t)||this._windows.push({component:t,window:e,styleElement:r})}_removeInfoWindow(t){var e=this._findInfoWindowByComponent(t);if(!e)return;let r=e.window;r&&r.parentNode.removeChild(r);var n=this.infoWindows.lastIndexOf(e);this.infoWindows.splice(n,1)}render(t){var{left:e,top:r,width:n,height:i}=this.bounds;t.beginPath(),this.drawImage(t,Wtt.image,e,r,n,i)}get hasTextProperty(){return!1}get nature(){return Ytt}}Btt.register("info-window",Wtt);var qtt={};var Xtt={list:function(){return{...qtt}},register:function(t,e){qtt[t]=e},unregister:function(t){delete qtt[t]},get:function(t){if(t){var e=qtt[t];return e||y9("Layout Not Found - ",t),e}}},Vtt={reflow:function(t,e){this.drawables(t).filter((t=>t.isHTMLElement())).forEach((t=>t.reposition()))},capturables:function(t){return t.components},drawables:function(t){return t.app&&!t.app.isViewMode?t.components:t.components.filter((t=>!t.hidden))},isStuck:function(t){return!1},ABSOLUTE:!0};Xtt.register("html-absolute",Vtt);const Qtt="center",Ktt="left-top",Jtt="right-top",Ztt="left-bottom",$tt="right-bottom",tet="auto",eet=20,ret=new WeakMap;function net(t){const e=t.root;var r=ret.get(e);if(!r)return;if(e===t){for(var n in r)net(n[0]);return void ret.delete(e)}const i=r.findIndex((e=>e[0]===t));if(-1===i)return;const a=r[i][1];var o=a.div.parentNode;o&&o.removeChild(a.div);var s=a.scene;s.target=null,s.release&&s.release(),r.splice(i,1)}class iet{static hideAll(t){(ret.get(t)||[]).forEach((([t,e])=>net(t)))}static hide(t){net(t)}static show(t,e,r={}){var{data:n,location:i=Qtt,modal:a=!1,closable:o=!0,output:s=!0}=r,c=t.app.refProvider;c&&c.get(e,!0).then((e=>{var r=document.createElement("div"),c=r.style;if(a){var{width:u,height:l}=t.rootModel.bounds;c.position="fixed",c.zIndex=1,c.left=0,c.top=0,c.width=u+"px",c.height=l+"px",c.overflow="auto",c.backgroundColor="rgba(0,0,0,0.3)"}else c.position="absolute",c.display="inline-block";r.innerHTML=!a&&o?'\n<div class="popup-content">\n</div>\n<button class="closable-1945">&#88</button>\n':'\n<div class="popup-content">\n</div>\n';var h=r.querySelector(".popup-content"),{width:u,height:l}=e.root.model;h.style.width=u+"px",h.style.height=l+"px";var f=document.createElement("style");f.type="text/css",f.appendChild(document.createTextNode("\nbutton.closable-1945 {\n width: 20px;\n height: 20px;\n right: 0px;\n top: 0px;\n padding: 0;\n margin: 0;\n border: 0px;\n text-align: center;\n cursor: pointer;\n font-size: 12px;\n color: black;\n position: absolute;\n background-color: transparent;\n}\n\nbutton.closable-1945:hover {\n background-color:#60bb23;\n}\n")),r.appendChild(f);var d=r.querySelector(".popup-content");O9.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))})),I9.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))})),r.addEventListener("click",(e=>{e.target===r&&o&&iet.hide(t)})),O9.forEach((function(t){r.addEventListener(t,(function(t){t.stopPropagation()}))})),I9.forEach((function(t){r.addEventListener(t,(function(t){t.stopPropagation()}))})),t.root.model_layer.overlay.appendChild(r),function(t,e,r){const n=t.root;if(n!==t){net(t);var i=ret.get(n)||[];i=[...i,[t,{div:e,scene:r}]],ret.set(n,i)}}(t,r,e),r.querySelector(".closable-1945")?.addEventListener("click",(function(e){e.preventDefault(),iet.hide(t)}),!1),r.addEventListener("close-scene",(e=>{e.preventDefault(),e.stopPropagation(),iet.hide(t),s&&(t.data=e.detail)}),!1),e.target=h,e.data=n||t.data,e.fit("both");var p=function(t,e,r,n=Qtt){var i=t.bounds,a=e.bounds,o=Math.max(i.width/4-a.width/2,eet),s=Math.min(3*i.width/4+a.width/2,i.width-eet)-a.width,c=Math.max(i.height/4-a.height/2,eet),u=Math.min(3*i.height/4+a.height/2,i.height-eet)-a.height;switch(n){case tet:return{x:r.x<i.width/2?s:o,y:r.y<i.height/2?u:c};case Ktt:return{x:o,y:c};case Jtt:return{x:s,y:c};case Ztt:return{x:o,y:u};case $tt:return{x:s,y:u};default:return{x:(i.width-a.width)/2,y:(i.height-a.height)/2}}}(t.rootModel,e.root,t.center,i);a?(h.style.left=p.x+"px",h.style.top=p.y+"px",h.style.width=u+"px",h.style.height=l+"px"):(r.style.left=p.x+"px",r.style.top=p.y+"px",r.style.width=u+"px",r.style.height=l+"px")}),(function(t){console.error("cannot fetch board: "+e,t)}))}}var aet={reflow:function(t,e){},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((t=>!t.hidden)):t.components},isStuck:function(t){return!1},ABSOLUTE:!0};function oet(t){var e=t.components.filter((t=>!t.hidden)),r=t.get("layoutConfig")||{},n=e[r&&r.activeIndex||0];return n&&[n]||[]}Xtt.register("absolute",aet);var set={reflow:function(t){var e=t.bounds,r=t.get("layoutConfig")||{},n={left:0,top:0,width:e.width,height:e.height};t.forEach(((t,e)=>{let i=e!=r.activeIndex;t.bounds=n,t.set("rotation",0),t.element&&(t.element.style.display=i?"none":"block")}))},capturables:function(t){return oet(t)},drawables:function(t){return oet(t)},isStuck:function(t){return!0}};function cet(t){var e=t.get("layoutConfig");return e&&e.weight||1}Xtt.register("card",set);var uet={reflow:function(t){var e=this.drawables(t),r=t.get("padding")||{},n=e.reduce(((t,e)=>t+cet(e)),0),i=t.bounds,a=n>0?(i.width-((r.left||0)+(r.right||0)))/n:i.width,o=i.height-((r.top||0)+(r.bottom||0)),s=0;e.forEach((t=>{let e=cet(t),n=t.get("margin")||{};t.bounds={left:a*s+(r.left||0)+(n.left||0),top:0+(r.top||0)+(n.top||0),width:e*a-((n.left||0)+(n.right||0)),height:o-((n.top||0)+(n.bottom||0))},t.set("rotation",0),s+=e}))},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((t=>!t.hidden)):t.components},isStuck:function(t){return!0}};function het(t){var e=t.get("layoutConfig");return e&&e.weight||1}Xtt.register("linear-horizontal",uet);var fet={reflow:function(t){var e=this.drawables(t),r=t.get("padding")||{},n=e.reduce(((t,e)=>t+het(e)),0),i=t.bounds,a=n>0?(i.height-((r.top||0)+(r.bottom||0)))/n:i.height,o=i.width-((r.left||0)+(r.right||0)),s=0;e.forEach((t=>{let e=het(t),n=t.get("margin")||{};t.bounds={left:0+(r.left||0)+(n.left||0),top:a*s+(r.top||0)+(n.top||0),width:o-((n.left||0)+(n.right||0)),height:e*a-((n.top||0)+(n.bottom||0))},t.set("rotation",0),s+=e}))},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((t=>!t.hidden)):t.components},isStuck:function(t){return!0}};Xtt.register("linear-vertical",fet);var det={reflow:function(t){var e=t.get("layoutConfig"),r=e&&e.columns||t.get("columns"),n=e&&e.rows||t.get("rows"),i=e&&e.widths||t.get("widths"),a=e&&e.heights||t.get("heights"),o=i?i.filter(((t,e)=>e<r)).reduce(((t,e)=>t+e),0):r,s=a?a.filter(((t,e)=>e<n)).reduce(((t,e)=>t+e),0):n,c=t.textBounds,u=t.get("paddingLeft")||0,l=t.get("paddingTop")||0,h=c.width/o,f=c.height/s,d=0,p=0;t.components.forEach(((t,e)=>{let n=i?i[e%r]:1,o=a?a[Math.floor(e/r)]:1,s=t.colspan||1,c=0;for(;--s>0;)c+=i?i[(e+s)%r]:1;let g=t.rowspan||1,v=0;for(;--g>0;)v+=a?a[Math.floor(e/r)+g]:1;t.bounds={left:u+d,top:l+p,width:h*(n+c),height:f*(o+v)},t.set("rotation",0),e%r==r-1?(d=0,p+=o*f):d+=n*h}))},capturables:function(t){return t.components.filter((t=>!t.merged))},drawables:function(t){return t.components.filter((t=>!t.merged&&!t.hidden))},isStuck:function(t){return!0},keyNavigate:function(t,e,r){var n=t.get("layoutConfig"),i=n&&n.columns||t.get("columns"),a=n&&n.rows||t.get("rows"),{row:o,column:s}=t.getRowColumn(e);switch(r.code){case"ArrowUp":if(o>0)return t.getAt((o-1)*i+s);break;case"ArrowDown":if(o<a-1)return t.getAt((o+1)*i+s);break;case"ArrowRight":if(s<i-1)return t.getAt(o*i+s+1);break;case"ArrowLeft":if(s>0)return t.getAt(o*i+s-1);break;default:return e}},joinType:!0};Xtt.register("table",det);const pet=new Image;pet.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAclBMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0BbqFAAAAJXRSTlMAgAP3VSI6/g9fBk5FavJsMrariSjzPnO1enRRL5SMhmOOWB9keFTE0wAAANxJREFUOMutk9kWgyAMRLFuiLjUtdp9yf//YglVsQXz1HniMPcEMgHGvpX2O0Ypi+EgCL+IAShC+wB7QfubRDT7AFcnUPoLMLiP4PyJbsb55i05AgnR5iaQDsICgtH0cotBWoAP1c7kC6kFxEseCfZfB6gEgbNeBrira2QmH1uVYCXlA3is8UmgUCPIyQJKEmu8QtQJN0e9DPXVpzG2G216c1CqRmcBOdxXk07sWUSPv07zo0amCNQycv+NzmR6cRcwmfbuI7p2nZ/z4be0P83Foz6vIkhfZXr82XgDlZsspIq4peUAAAAASUVORK5CYII=";var get=t=>class extends t{postrender(t){super.postrender(t),this.app.isEditMode&&this._focused&&this.showMoveHandle&&this._draw_move_handle(t)}_draw_move_handle(t){var{left:e,top:r,width:n}=this.bounds;t.save(),t.beginPath(),t.rect(e+n,r,25,25);t.fillStyle="rgba(235, 235, 235, 1)",t.fill(),t.drawImage(pet,e+n+3.75,r+3.75,17.5,17.5),t.closePath(),t.restore()}contains(t,e){var r=super.contains(t,e);if(this.app.isViewMode)return r;if(!r){var{left:n,top:i,width:a,height:o}=this.bounds,s=n+a;this.showMoveHandle&&(r=t<Math.max(s+25,s)&&t>Math.min(s+25,s)&&e<Math.max(i+25,i)&&e>Math.min(i+25,i))}return this._focustd!==r&&(this._focused=r,this.invalidate()),r}};const vet=[];class met extends(get(Utt(Btt))){constructor(t,e){super(t,e),this._components=[]}replaceRefids(t){this.components.forEach((e=>e.replaceRefids(t)))}get showMoveHandle(){return!0}get showOverflow(){return!1}dispose(){this.components.slice().forEach((t=>t.dispose())),super.dispose()}isContainer(){return!0}containable(t){return t.isDescendible(this)}get hasTextProperty(){return!1}get components(){return this._components}get focusible(){return!0}get layout(){return Xtt.get(this.get("layout"))||aet}reflow(){this.layout.reflow(this),this.components&&this.components.forEach((t=>{t.isContainer()&&t.reflow()}))}get hierarchy(){var t=super.hierarchy;return this.components&&(t.components=this.components.map((t=>t.hierarchy))),t}addComponent(t,e=!1){var r=t.parent;if(r){if(this===r)return;r.removeComponent(t,e)}var n=this._components.push(t)-1;t.parent=this,t.added(this),e||this.trigger("add",this,t,n),t.delegate_on(this),e||t.trigger("added",this,t,n),this.root&&this.root.isReady&&t.ready()}removeComponent(t,e=!1){var r=this._components.indexOf(t);-1!=r&&(this._components.splice(r,1),t.parent=null,t.removed(this),e||(this.trigger("remove",this,t),t.trigger("removed",this,t)),t.delegate_off(this))}insertComponentAt(t,e,r=!1){var n=t.parent;n&&n.removeComponent(t,r);var i=this._components.splice(0,e);this._components=i.concat(t,this._components),e=this._components.indexOf(t),t.parent=this,t.added(this),r||this.trigger("add",this,t,e),t.delegate_on(this),r||t.trigger("added",this,t,e)}add(t,e=!1){return t instanceof Array?(t.forEach((t=>{-1==this._components.indexOf(t)&&this.addComponent(t,e)})),this):this.add.call(this,[t],e)}remove(t,e=!1){return t instanceof Array?this._components?(t.forEach((t=>{this.removeComponent(t,e)})),this):this:this.remove.call(this,[t],e)}getAt(t){if(this._components)return this._components[t]}forEach(t,e){this._components&&this._components.forEach(t,e)}traverse(t,e){t.call(e,this),this._components&&this._components.forEach((r=>{r.isContainer()?r.traverse(t,e):t.call(e,r)}))}indexOf(t){return(this._components||vet).indexOf(t)}size(){return(this._components||vet).length}moveChildAt(t,e){var r=this.indexOf(e);if(-1!=r){var n=this._components.splice(0,r),i=this._components.splice(1);this._components=n.concat(i),t=Math.max(0,t),t=Math.min(t,this._components.length),n=this._components.splice(0,t),this._components=n.concat(e,this._components)}}moveChildForward(t){var e=this.indexOf(t);-1!=e&&e!=this.size()-1&&(this._components[e]=this._components[e+1],this._components[e+1]=t)}moveChildBackward(t){var e=this.indexOf(t);-1!=e&&0!=e&&(this._components[e]=this._components[e-1],this._components[e-1]=t)}moveChildToFront(t){var e=this.indexOf(t);if(-1!=e&&e!=this.size()-1){var r=this._components.splice(0,e),n=this._components.splice(1);this._components=r.concat(n,this._components)}}moveChildToBack(t){var e=this.indexOf(t);if(-1!=e&&0!=e){var r=this._components.splice(0,e),n=this._components.splice(0);this._components=this._components.concat(r,n)}}symmetryX(t){super.symmetryX(t),this.components.map((t=>{t.symmetryX(0)}))}findAll(t,...e){if("string"==typeof t)return U9(t,this,e[0]||this);if("function"==typeof t){var r=[];for(let n=this.components.length-1;n>=0;n--){let i=this.components[n].findAll(t,...e);i&&(r=r.concat(i))}return t(this,...e)&&r.push(this),r}}findFirst(t,...e){if("string"==typeof t)return U9(t,this,e[0])[0];if("function"==typeof t){for(let n=this.components.length-1;n>=0;n--){var r=this.components[n].findFirst(t,...e);if(null!=r)return r}return t(this,...e)?this:null}}findById(t){return this.root.findById(t)}findByRefid(t){return this.root.findByRefid(t)}contains(t,e){var r=super.contains(t,e);if(!r){var{left:n,top:i,width:a,height:o,lineWidth:s=0}=this.state,c=this.stuck?0:10+s/2;r=t<Math.max(n+a,n)+c&&t>Math.min(n+a,n)-c&&e<Math.max(i+o,i)+c&&e>Math.min(i+o,i)-c}return r}capture(t,e,r){var n=this.transcoordP2S(t,e);if(!this.contains(n.x,n.y))return!1;var i=this.bounds;n.x-=i.left,n.y-=i.top;var a=this.layout.capturables(this);for(let t=a.length-1;t>=0;t--){var o=a[t].capture(n.x,n.y,r);if(o)return o}return this.capturable&&!r?.(this)&&this}capturePath(t,e){if(e){if(e.indexOf(this)>-1)return!1;for(let t=0;t<e.length;t++)if(!this.containable(e[t]))return!1}var r=[],{left:n,top:i,width:a,height:o}=this.bounds;for(let e=0;e<t.length;e++){let s=this.transcoordP2S(t[e].x,t[e].y);if(s.x<n||s.x>n+a||s.y<i||s.y>i+o)return!1;s.x-=n,s.y-=i,r.push(s)}let s=this.layout.capturables(this);for(let t=s.length-1;t>=0;t--){let n=s[t];if(!n.isContainer())continue;let i=n.capturePath(r,e);if(i)return i}return this.focusible&&this}render(t){var{left:e=0,top:r=0,width:n,height:i}=this.bounds;t.beginPath(),t.rect(e,r,n,i),t.closePath(),this.drawFill(t),this.drawStroke(t)}postrender(t){super.postrender(t);var{left:e=0,top:r=0,width:n,height:i}=this.bounds;this.showOverflow||(t.beginPath(),t.rect(e,r,n,i),t.clip(),t.closePath());var{top:r,left:e,scale:a}=this.state;t.translate(e,r),this.layout.drawables(this).forEach((e=>{e.draw(t)})),t.translate(-e,-r),this.drawText(t)}trim(){this.components.forEach((t=>{t.trim()})),super.trim()}}["layout"].forEach((t=>Btt.memoize(met.prototype,t,!1)));class yet extends met{constructor(t,e){super(t,e),t.translate=t.translate||{x:0,y:0},this._draw_reserved=!1,this.__draw__=()=>{this._draw_reserved=!1,this.trigger("redraw"),this.reflow(),this.draw()},this.throttle_render=()=>{this._draw_reserved||requestAnimationFrame(this.__draw__),this._draw_reserved=!0}}fitSize(t,e,r,n){if(this.target){if(e){let t=getComputedStyle(this.target);r=r||(t?parseFloat(t.getPropertyValue("width")):this.target.clientWidth),n=n||(t?parseFloat(t.getPropertyValue("height")):this.target.clientHeight)}else r=this.model.width,n=this.model.height;"CANVAS"==t.tagName&&(t.setAttribute("width",r*P9),t.setAttribute("height",n*P9)),t.style.width=r+"px",t.style.height=n+"px"}}resize(){this.fitSize(this.element,!0)}isLayer(){return!0}get showOverflow(){return this.app.isEditMode}get anchors(){}createElement(){var t=Btt.createCanvas(1,1);return t.style.position="absolute",t}get target(){return this._target}set target(t){this._target&&this.element&&this._target.removeChild(this.element),this._target=t,t&&(this.element||(this.element=this.createElement()),this.resize(),t.appendChild(this.element))}get canvas(){return this.element}dispose(){super.dispose(),this.target=null,this.element=null}get selected(){return this.root.selected}set selected(t){this.root.selected=t}get focused(){return this.root.focused}set focused(t){this.root.focused=t}getContext(){return this._context2D||(this._context2D=this.canvas&&this.canvas.getContext("2d")),this._context2D}draw(t){this.canvas&&(t=t||this.getContext())&&super.draw(t)}prerender(t){var{translate:e,scale:r={x:1,y:1},rotation:n}=this.model;t.clearRect(0,0,t.canvas.width,t.canvas.height),e&&t.translate(e.x*P9,e.y*P9),t.scale(r.x*P9,r.y*P9),n&&t.rotate(n)}get rotatePoint(){return{x:0,y:0}}contains(t,e){return!1}invalidate(){this.throttle_render()}move(t){var e=this.get("translate")||{x:0,y:0};this.set({translate:{x:e.x+t.x,y:e.y+t.y}})}}const bet={x:1,y:1},xet={x:0,y:0};class wet extends yet{constructor(t,e){super(t,e)}dispose(){super.dispose(),delete this._canvas,delete this._overlay}contains(t,e){return!0}isRootModel(){return!0}get stuck(){return!0}get layout(){return Vtt}get overlay(){if(!this._overlay){var t=document.createElement("div");t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="initial",t.style["user-select"]="none",t.style["transform-origin"]="top left",this.element&&this.element.appendChild(t),this._overlay=t,this._repositionOverlay()}return this._overlay}createElement(){var t=document.createElement("div");return t.style.position="absolute",t.style["user-select"]="none",t.style.overflow="hidden",this._canvas=Btt.createCanvas(1,1),this._canvas.style.position="absolute",t.appendChild(this._canvas),this._overlay&&t.appendChild(this._overlay),t}resize(){if(this.target){var{width:t,height:e,fitMode:r}=this.model;this.root.fitMode?r=this.root.fitMode:r||(r="ratio");try{var n=getComputedStyle(this.target)}catch(t){return void console.error(t,this.target)}var i=n?parseFloat(n.getPropertyValue("width")):this.target.clientWidth,a=n?parseFloat(n.getPropertyValue("height")):this.target.clientHeight;switch(r){case"both":case"ratio":break;case"width":a=e*i/t;break;case"height":i=t*a/e;break;default:i=Math.max(t,i),a=Math.max(e,a)}switch(this.fitSize(this.canvas,!0,i,a),r){case"ratio":case"both":break;case"width":this.element.style.overflowX="hidden",this.element.style.overflowY="auto";break;case"height":this.element.style.overflowX="auto",this.element.style.overflowY="hidden";break;default:this.element.style.overflowX=i>t?"hidden":"auto",this.element.style.overflowY=a>e?"hidden":"auto"}this.fitSize(this.element,!0)}}get canvas(){return this._canvas}get MPP(){var{scale:t={x:1,y:1},unit:e}=this.model;switch(e){case"mm":case"cm":return 1/this.app.PPM/t.x;case"in":return 1/this.app.PPI/t.x;default:return 1/t.x}}capturePath(t,e){var r=this.layout.capturables(this);for(let n=r.length-1;n>=0;n--){let i=r[n];if(!i.isContainer())continue;let a=i.capturePath(t,e);if(a)return a}return!1}get eventMap(){return{"(self)":{"(all)":{change:this._onchanged_all,mouseenter:this._onmouseenter_all,mouseleave:this._onmouseleave_all,click:this._onclick,mousedown:this._onmousedownup,mouseup:this._onmousedownup,touchstart:this._onmousedownup,touchend:this._onmousedownup}}}}closeScene(t){requestAnimationFrame((()=>this.overlay.dispatchEvent(new CustomEvent("close-scene",{bubbles:!0,composed:!0,detail:t}))))}_repositionOverlay(){var t=this._overlay;if(t){var{translate:e=xet,scale:r=bet,rotation:n=0}=this.model,{left:i,top:a,width:o,height:s}=this.bounds;t.style.left=i+"px",t.style.top=a+"px";var c=`rotate(${n}rad) scale(${r.x}, ${r.y}) perspective(1px)`;t.style["margin-left"]=e.x+"px",t.style["margin-top"]=e.y+"px",["-webkit-","-moz-","-ms-","-o-",""].forEach((e=>{t.style[e+"transform"]=c}))}}onchange(t){var e=this._model;delete e.id,delete e.text,delete e.class,this._repositionOverlay()}_onchanged_all(t,e,r){this.invalidate()}_onmouseenter_all(t,e){if(t.stopPropagation(),this.app&&!this.app.isEditMode&&e){var r=e.origin;if(!(r instanceof wet)&&r.model.event&&r.model.event.hover&&!r.hidden){var n=r.model.event.hover;n&&this._doEventAction(n,r,!0,t)}}}_onmouseleave_all(t,e){if(t.stopPropagation(),e){var r=e.origin;if(this.app&&!this.app.isEditMode){var n=r.model.event&&r.model.event.hover;n&&this._doEventAction(n,r,!1,t)}}}_onclick(t,e){if(t.stopPropagation(),!this.app.isEditMode&&e){var r=e.origin,n=r.model.event&&r.model.event.tap;n&&this._doEventAction(n,r,!0,t)}}_onmousedownup(t,e){if(t.stopPropagation(),!this.app.isEditMode&&e){var r=e.origin,n=r.model.event&&r.model.event.tap;n&&n.pressed&&this._doMouseDownUpEventAction(n,r,"mousedown"==t.type||"touchstart"==t.type,t)}}_doMouseDownUpEventAction(t,e,r,n){var{pressed:i=!1}=t;i&&(r?function(t){if(!t.hasOwnProperty("_backupShadow")){var e=t.get("shadow");t._backupShadow=e;var{left:r=0,top:n=0}=e||{};t.delta("tx",r),t.delta("ty",n),t.set("shadow",{})}}(e):function(t){t.hasOwnProperty("_backupShadow")&&(t.delta("tx",0),t.delta("ty",0),t.set("shadow",t._backupShadow),delete t._backupShadow)}(e))}_doEventAction(t,e,r,n){var{action:i,target:a,value:o,emphasize:s=!1,restore:c=!1,pressed:u=!1,options:l}=t;if(a&&(a=e.access(a)),o&&(o=e.access(o)),s&&(r?function(t){t.hasOwnProperty("_backupStrokeStyle")||(t._backupStrokeStyle=t.model.strokeStyle,t.set("strokeStyle","#f26522"),t.hasOwnProperty("_backupLineWidth")||(t._backupLineWidth=t.model.lineWidth,t.set("lineWidth",t.model.lineWidth+5)))}(e):c&&function(t){t.hasOwnProperty("_backupStrokeStyle")&&(t.set("strokeStyle",t._backupStrokeStyle),delete t._backupStrokeStyle,t.hasOwnProperty("_backupLineWidth")&&(t.set("lineWidth",t._backupLineWidth),delete t._backupLineWidth))}(e)),i)switch(i){case"data-toggle":if(!a)return;(r||c)&&this.root.findAll(a,e).forEach((t=>{t.data=!t.data}));break;case"data-tristate":if(!a)return;(r||c)&&this.root.findAll(a,e).forEach((t=>{let e=Math.round(Math.max(Number(t.data)||0,0));t.data=(e+(r?1:2))%3}));break;case"data-set":if(!a)return;if(r){var h=o;this.root.findAll(a,e).forEach((t=>{t.data=h}))}break;case"value-set":if(!a)return;if(r){h=o;this.root.findAll(a,e).forEach((t=>{t.value=h}))}break;case"infoWindow":case"info-window":if(!a)return;"click"==n.type||r?Wtt.show(e,a,c,{x:n.offsetX,y:n.offsetY}):c&&Wtt.hide(e,a);break;case"toggle-info-window":if(!a)return;Wtt.toggle(e,a,!1,{x:n.offsetX,y:n.offsetY});break;case"popup":case"modal-popup":if(!a)return;let t=l&&"input"in l?l.input:"(self)",s=!l||(!("output"in l)||l.output);iet.show(e,a,{data:t&&this.root.findFirst(t,e)?.data,output:s,modal:"modal-popup"===i});break;case"close-scene":this.closeScene(e.data);break;case"goto":this.trigger(i,a,l,e);break;default:this.trigger(i,a,o,e)}}}function Aet(t,e){const r=t.state.refid;return t.root.findAll((t=>t.isLine()&&t.from.component===r&&(!e||t.from.anchor===e)))}function _et(t,e){const r=t.state.refid;return t.root.findAll((t=>t.isLine()&&t.to.component===r&&(!e||t.to.anchor===e)))}wet.Popup=iet,Btt.register("model-layer",wet);var ket=t=>class extends t{isConnectable(){return!0}postrender(t){super.postrender(t),this._draw_anchors(t)}_draw_anchors(t){var e=this.anchors||[];t.save(),e.forEach((e=>{var{position:{x:r,y:n},draw:i}=e;if(i){t.beginPath();try{i.call(e,t,this)}catch(t){console.error(t)}t.closePath()}})),t.restore()}contains(t,e){if(n=super.contains(t,e))return n;var r=this.anchors||[];for(let i of r){const r=i.bounds;if(!r)continue;const{left:a,top:o,width:s,height:c}=r;var n;if(n=t<Math.max(a+s,a)&&t>Math.min(a+s,a)&&e<Math.max(o+c,o)&&e>Math.min(o+c,o))return n}return!1}findInOutLines(t){return function(t,e){const r=t.state.refid;return t.root.findAll((t=>!(!t.isLine()||(t.from.component!==r||e&&t.from.anchor!==e)&&(t.to.component!==r||e&&t.to.anchor!==e))))}(this,t)}findOutletLines(t){return Aet(this,t)}findOutletEnds(t){return function(t,e){return Aet(t,e).map((t=>t.toEnd?.component)).filter(Boolean)}(this,t)}findInletLines(t){return _et(this,t)}findInletEnds(t){return function(t,e){return _et(t,e).map((t=>t.fromEnd?.component)).filter(Boolean)}(this,t)}};const Eet={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"round",name:"round",property:{min:0}}],help:"scene/component/rect"};var Met={ondragmove:function(t,e,r){var{left:n,top:i,width:a,height:o}=r.model,s=(r.transcoordP2S(t.x,t.y).x-n)/(a/2)*100;s=Tet(s,a,o),r.set({round:s})}};function Tet(t,e,r){var n=e>r?r/e*100:100;return t>=n?t=n:t<=0&&(t=0),t}class Pet extends(ket(Utt(Ntt))){is3dish(){return!0}get controls(){var{left:t,top:e,width:r,round:n,height:i}=this.state;return[{x:t+r/2*((n=null==n?0:Tet(n,r,i))/100),y:e,handler:Met}]}get nature(){return Eet}}Btt.register("rect",Pet);const Oet=[1,2,10,20,50,50,50,50,50,50];class Iet extends(Utt(Ntt)){render(t){const{lineWidth:e=1,fillStyle:r="lightgray",font:n="15px Arial",left:i,top:a,rotation:o,origin:s,margin:c,width:u,height:l,side:h="bottom",strokeStyle:f="#000000",scale:d=1}=this.state;t.translate(i,a),t.beginPath();const p=Math.round(e/2);t.rect(-p,-p,u+2*p,l+2*p),t.clip(),t.beginPath(),t.rect(0,0,u,l),r&&(t.fillStyle=r,t.fill()),t.lineWidth=e,t.strokeStyle=f,t.stroke(),t.beginPath(),t.font=n;var g="bottom"!==h,v=g?0:l,m=4*l/5,y=2*l/3,b=1*l/2,x=3*l/5;g&&(m=l-m,y=l-y,b=l-b,x=l-1.5*l/5);var w=d*this.app.PPM/this.root.unitScale,A=Math.ceil(s/w),_=this.app.PPM/w,k=_<=1.1?1:Oet[Math.round(_)]||100;1!=k&&(A+=(k-A%k)%k);var E=Math.ceil(A*w),S=s+u;for(t.fillStyle=f;E<S;){if(A%10==0){t.moveTo(E-s,b),t.lineTo(E-s,v);let e=(A/10).toString(),r=t.measureText(e);t.fillText(e,E-s-r.width-6,x)}else A%5==0?(t.moveTo(E-s,y),t.lineTo(E-s,v)):(t.moveTo(E-s,m),t.lineTo(E-s,v));A+=k,E=Math.ceil(A*w)}}}Btt.register("ruler",Iet);const Ret=20,Cet=0,jet=20,Det=0,Let=20,zet=20,Fet=90*Math.PI/180,Bet="9px Verdana",Net=20,Uet="#f4f4f4",Yet="#999";function Get(t,e,r){return{left:-t.x,top:-t.y,width:Ret,height:Net}}function Het(t,e,r,n){return{left:Ret-t.x,top:Cet-t.y,origin:jet-t.x,width:e-Ret,height:Net}}function Wet(t,e,r,n){var i={x:-t.x+Det+Net/2,y:-t.y+Let+(r-Let)/2},a=Btt.transcoordRR(-t.x+Det,-t.y+Let,i,Fet);return{left:a.x-(r-Let),top:a.y,origin:zet-t.y,width:r-Let,height:Net}}function qet(t){var e=t.get("translate");return{left:-e.x,top:-e.y,width:t.canvas.width/P9,height:t.canvas.height/P9}}Btt.register("guide-layer",class extends yet{constructor(t,e){super(t,e),this.appScale={x:1,y:1},"disabled"!==t.ruler&&(this.hruler=new Iet({left:Ret,top:Cet,origin:jet,margin:0,height:Net,unit:"m",rotation:0,font:Bet,fillStyle:Uet,strokeStyle:Yet,capturable:!1}),this.vruler=new Iet({left:0,top:0,origin:zet,margin:0,height:Net,unit:"m",rotation:Fet,font:Bet,side:"top",fillStyle:Uet,strokeStyle:Yet,capturable:!1}),this.origin_rect=new Pet({left:-jet,top:-zet,width:jet,height:zet,fillStyle:Uet,strokeStyle:Yet,lineWidth:1}),this.addComponent(this.hruler),this.addComponent(this.vruler),this.addComponent(this.origin_rect)),this.invalidate()}get capturable(){return!1}ready(){if(super.ready(),this.hruler){var t=this.rootModel,e=Object.assign({},t.get("translate"));e.x<Ret&&(e.x+=Ret),e.y<Let&&(e.y+=Let);var r=t.get("scale")||{x:1,y:1};this.appScale=r,this.hruler.set("scale",r.x),this.vruler.set("scale",r.y),t.set("translate",e),this.set("translate",e),this.screen_coord=qet(this);var{width:n,height:i}=this.screen_coord;this.hruler.set(Het(e,n,0,this.hruler)),this.vruler.set(Wet(e,0,i,this.vruler)),this.origin_rect.set(Get(e))}else this.screen_coord=qet(this)}resize(){super.resize(),this.screen_coord=qet(this);var{width:t,height:e}=this.screen_coord;this.hruler&&(this.hruler.set(Het(this.model.translate,t,0,this.hruler)),this.vruler.set(Wet(this.model.translate,0,e,this.vruler)),this.origin_rect.set(Get(this.model.translate)))}render(t){if(this.guide){t.save();var{x:e,y:r}=this.guide,{top:n,left:i,width:a,height:o}=this.screen_coord;t.beginPath(),t.moveTo(e,n),t.lineTo(e,n+o),t.moveTo(i,r),t.lineTo(i+a,r),t.lineWidth=1,t.strokeStyle="tomato",t.setLineDash([2,3]),t.font="10px tahoma",t.fillStyle="#333";var s=this.transcoordS2C(e,r,this.rootModel);t.textBaseline=s.y>200?"bottom":"top",t.textAlign=s.x>200?"right":"left";var c=s.y>200?-5:5,u=s.x>200?-5:5,l=Math.round(e/this.appScale.x),h=Math.round(r/this.appScale.y);t.fillText(` ${l}, ${h} `,e+u,r+c),t.stroke(),t.restore()}}get guide(){return this._guide}set guide(t){this._guide=t,this.invalidate()}contains(t,e){return!0}get eventMap(){return{"(root)":{"(descendant)":{mousemove:this.onmousemove_child,mouseout:this.onmouseout_child,dragmove:this.onmousemove_child},"model-layer":{change:this.onchange_root_model}},"(self)":{"(descendant)":{mousedown:this.onmousedown_origin}}}}onmousedown_origin(t,e){this.rootModel.set("translate",{x:jet,y:zet})}onchange_root_model(t,e,r){if(t.scale&&(this.appScale=t.scale,this.hruler&&(this.hruler.set("scale",t.scale.x),this.vruler.set("scale",t.scale.y))),t.translate&&this.set({translate:{x:t.translate.x,y:t.translate.y}}),t.scale||t.translate){if(this.screen_coord=qet(this),this.hruler){var{translate:n}=this.model,{width:i,height:a}=this.screen_coord;this.hruler.set(Het(n,i,0,this.hruler)),this.vruler.set(Wet(n,0,a,this.vruler)),this.origin_rect.set(Get(n))}this._guide=null}this.invalidate()}onmouseout_child(t){this._guide=null,this.invalidate()}onmousemove_child(t,e){t.target&&"CANVAS"!==t.target.tagName?this.guide=null:this.guide=this.transcoordC2S(t.offsetX,t.offsetY)}});Btt.register("shift-layer",class extends yet{ready(){super.ready();var t=this.rootModel.get("translate");this.set("translate",t)}render(t){}contains(t,e){return!(2!=this.app.mode)}get eventMap(){return{"(root)":{"(self)":{keydown:this.onkeydown,keyup:this.onkeyup}}}}onkeydown(t){"Space"===t.code&&void 0===this.before_mode&&(this.before_mode=this.app.mode,this.app.mode=2)}onkeyup(t){"Space"===t.code&&(void 0!==this.before_mode&&(this.app.mode=this.before_mode),delete this.before_mode)}ondragstart(t){this.last_position=this.transcoordC2S(t.offsetX,t.offsetY)}ondragmove(t){var{x:e,y:r}=this.transcoordC2S(t.offsetX,t.offsetY);this.rootModel.move({x:e-this.last_position.x,y:r-this.last_position.y},!1),this.last_position=this.transcoordC2S(t.offsetX,t.offsetY)}});class Xet{constructor(t){this.params=Object.assign({},t)}excute(){}}class Vet extends Xet{execute(){this.params.changes.forEach((t=>t.component.set(t.after)))}static before(t){return t.map((t=>({component:t})))}static after(t,e){e.execute(null,!1)}static around(t,e,r){e.call(r),t.execute(null,!1)}}const Qet="left",Ket="right",Jet="center",Zet="top",$et="bottom",trt="middle",ert=[Qet,Ket,Jet,Zet,trt,$et];function rrt(t){if(-1!=ert.indexOf(t)){var e=this.selected.filter((t=>!t.stuck));if(!(e.length<=1)){var r=this.app.commander;Vet.around(r,(function(){!function(t,e){var r=JSON.parse(JSON.stringify(e[0].bounds)),n=r.left+r.width,i=r.top+r.height;for(let t=0;t<e.length;t++){let a=e[t].bounds;r.left=a.left>r.left?r.left:a.left,r.top=a.top>r.top?r.top:a.top,n=a.left+a.width>n?a.left+a.width:n,i=a.top+a.height>i?a.top+a.height:i}switch(r.width=n-r.left,r.height=i-r.top,t){case Qet:for(let t=0;t<e.length;t++){let n=e[t].bounds;e[t].bounds={left:r.left,top:n.top,width:n.width,height:n.height}}break;case Jet:for(let t=0;t<e.length;t++){let n=e[t].bounds;e[t].bounds={left:r.left+r.width/2-n.width/2,top:n.top,width:n.width,height:n.height}}break;case Ket:for(let t=0;t<e.length;t++){let r=e[t].bounds;e[t].bounds={left:n-r.width,top:r.top,width:r.width,height:r.height}}break;case Zet:for(let t=0;t<e.length;t++){let n=e[t].bounds;e[t].bounds={left:n.left,top:r.top,width:n.width,height:n.height}}break;case trt:for(let t=0;t<e.length;t++){let n=e[t].bounds;e[t].bounds={left:n.left,top:r.top+r.height/2-n.height/2,width:n.width,height:n.height}}break;case $et:for(let t=0;t<e.length;t++){let r=e[t].bounds;e[t].bounds={left:r.left,top:i-r.height,width:r.width,height:r.height}}break;default:;}}(t,e)}))}}}const nrt="VERTICAL",irt=[nrt,"HORIZONTAL"];function art(t){if(-1!=irt.indexOf(t)){var e=this.selected;if(!(e.length<=1)){var r=this.app.commander;Vet.around(r,(function(){!function(t,e){var r=e.filter((t=>!t.stuck)).slice(0);r.sort((function(e,r){let n=e.center,i=r.center;return t===nrt?n.y-i.y:n.x-i.x}));var n=r.reduce(((e,r)=>e+(t===nrt?r.bounds.height:r.bounds.width)),0),i=r[0].bounds,a=r[r.length-1].bounds,o=((t===nrt?a.top+a.height-i.top:a.left+a.width-i.left)-n)/(r.length-1),s=t===nrt?i.top+i.height:i.left+i.width;for(let e=1;e<r.length-1;e++){let n=r[e],i=n.bounds;s+=o,t===nrt?(i.top=s,s+=i.height):(i.left=s,s+=i.width),n.bounds=i}}(t,e)}))}}}function ort(t){for(var e=0;t&&!t.isRootModel();)e+=t.get("rotation")||0,t=t.parent;return e%(2*Math.PI)}class srt extends Xet{execute(){this.params.changes.forEach((t=>{let{component:e,to_container:r,to_index:n,to_left:i,to_top:a,hint:o}=t,s=function(t){if(t.isRootModel())return t.bounds;var{bounds:e,rotatePoint:r}=t,n=r;return{left:(n=t.transcoordS2T(n.x,n.y)).x-(r.x-e.left),top:n.y-(r.y-e.top),width:e.width,height:e.height}}(e),c=ort(e);if(e.removeSelf(!r),e.bounds=s,e.set("rotation",c),r){e.set("rotation",function(t,e){return((t.get("rotation")||0)-ort(e))%(2*Math.PI)}(e,r));let o=function(t,e){if(e.isRootModel())return t.bounds;var{bounds:r,rotatePoint:n}=t,i=e.transcoordT2S(n.x,n.y),a=e.bounds;return{left:i.x-(n.x-r.left)-a.left,top:i.y-(n.y-r.top)-a.top,width:r.width,height:r.height}}(e,r);t.to_left=void 0!==i?i:o.left,t.to_top=void 0!==a?a:o.top,e.bounds={left:t.to_left,top:t.to_top,width:o.width,height:o.height},void 0===n?r.addComponent(e):r.insertComponentAt(e,n)}}))}}function crt(t,e,r){this.app.commander.execute(new srt({changes:[{component:t,to_container:e,to_index:r}]}))}function urt(t){var e=this.selected.filter((t=>!t.stuck));if(!(0==e.length||e[0].isRootModel()||e.length>1&&("forward"==t||"backward"==t))){var r,n=e[0].parent;if("forward"==t){let t=n.indexOf(e[0]);r=[{component:e[0],from_container:n,to_container:n,from_index:t,to_index:t+1}]}else if("backward"==t){let t=n.indexOf(e[0]);r=[{component:e[0],from_container:n,to_container:n,from_index:t,to_index:t-1}]}else r=e.filter((t=>t.parent===n)).sort(((e,r)=>{let i=n.indexOf(e)<n.indexOf(r);return"front"==t?i:!i})).map(((e,r)=>(n.indexOf(e),{component:e,to_container:n,to_index:"front"==t?n.components.length-r-1:r})));var i=new srt({changes:r});this.app.commander.execute(i)}}function lrt(t,e,r,n){var i=Btt.register(t.type);if(!i)return b9("Class not found",t.type),null;r&&(t.refid=r(t.refid)),t.id&&n&&n(t.id)&&delete t.id;var a=new i(t,e);return t.components&&a.isContainer()&&(t.components.forEach((t=>{var i=lrt(t,e,r,n);i&&a.addComponent(i)})),delete t.components),a.created(),a}function hrt(t,e){var r=l7(t.hierarchy);return delete r.id,lrt(r,t.app,e)}var frt=Object.freeze({__proto__:null,compile:lrt,duplicate:hrt,select:U9,match:F9});function drt(t,e,r){t instanceof Array||(t=[t]),r||(r=this.model_layer);var n=[],i=new Map;this.selected=t.map((t=>{try{return lrt(t,r.app,(t=>{const e=this.getNewRefid();return void 0!==t&&i.set(t,e),e}),(t=>this.indexMap[t]))}catch(t){return console.warn(t),!1}})).filter(Boolean).map((t=>{let{left:a,top:o,width:s,height:c,x:u,y:l,cx:h,cy:f}=e;return t.replaceRefids(i),isNaN(a)||isNaN(o)||isNaN(s)||isNaN(c)||(t.bounds={left:a,top:o,width:s,height:c}),isNaN(u)||isNaN(l)||t.move({x:u,y:l},!1),isNaN(h)||isNaN(f)||(t.center={x:h,y:f}),n.push({component:t,to_container:r}),t})),this.app.commander.execute(new srt({changes:n}))}function prt(t){t instanceof Array||(t=[t]),this.trigger("addstart",t)}function grt(){var t=[],e=new Map;if(this.selected=this.selected.filter((t=>!t.isRootModel())).map((r=>{let n=hrt(r,(t=>{const r=this.getNewRefid();return void 0!==t&&e.set(t,r),r}));return n.move({x:20,y:20},!1),t.push({component:n,to_container:r.parent}),n})).map((t=>(t.replaceRefids(e),t))),0!=t.length){var r=new srt({changes:t});this.app.commander.execute(r)}}function vrt(){var t=this.selected;this.selected=[];for(var e=null,r=t.filter((t=>!t.isRootModel()&&(t.parent.focusible||t.parent.isGroup()))).map((t=>(e||(e=t.parent),{component:t,to_container:null})));e&&e.isGroup();){let t=[];if(e.components.filter((t=>!r.find((e=>e.component===t)))).forEach((e=>t.push(e))),t.length>1)break;let n=e.parent;t.forEach((t=>r.push({component:t,to_container:n}))),r.push({component:e,to_container:null}),e=n}r.length>0&&this.app.commander.execute(new srt({changes:r})),e&&e.calculateBounds&&e.calculateBounds()}function mrt(t,e,r){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app?.commander.on(t,e,r);break;case"mode":this.app?.on(t,e,r);break;default:this.on(t,e,r)}}function yrt(t,e,r){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app?.commander.once(t,e,r);break;case"mode":this.app.once(t,e,r);break;default:this.once(t,e,r)}}function brt(t,e,r){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app?.commander.off(t,e,r);break;case"mode":this.app?.off(t,e,r);break;default:this.off(t,e,r)}}function xrt(t){var e=this.target_element,r=t||this.fitMode,n=this;function i(t){n.fit(r),document.fullscreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement||["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"].forEach((t=>document.removeEventListener(t,i)))}["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"].forEach((t=>document.addEventListener(t,i))),e.requestFullScreen?e.requestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}var wrt=0;function Art(){var t=this.selected.filter((t=>!t.isRootModel())).map((t=>t.hierarchy));if(0!=t.length)return wrt=0,JSON.stringify(t,null,2)}function _rt(){wrt=0;var t=Art.call(this);return vrt.call(this),t}function krt(t){if(t)try{JSON.parse(t);wrt++,drt.call(this,JSON.parse(t),{x:15*wrt,y:15*wrt})}catch(e){y9(e,t)}}var Ert=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var r=t(e).toLowerCase();return(n="application/font-woff",i="image/jpeg",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i,jpeg:i,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[r]||"";var n,i},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var r=window.atob(t.toDataURL().split(",")[1]),n=r.length,i=new Uint8Array(n),a=0;a<n;a++)i[a]=r.charCodeAt(a);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var r=document.implementation.createHTMLDocument(),n=r.createElement("base");r.head.appendChild(n);var i=r.createElement("a");return r.body.appendChild(i),n.href=e,i.href=t,i.href},getAndEncode:function(t){var e=3e4;jrt.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(r){var n,i=new XMLHttpRequest;if(i.onreadystatechange=o,i.ontimeout=s,i.responseType="blob",i.timeout=e,i.open("GET",t,!0),i.send(),jrt.impl.options.imagePlaceholder){var a=jrt.impl.options.imagePlaceholder.split(/,/);a&&a[1]&&(n=a[1])}function o(){if(4===i.readyState)if(200===i.status){var e=new FileReader;e.onloadend=function(){var t=e.result.split(/,/)[1];r(t)},e.readAsDataURL(i.response)}else n?r(n):c("cannot fetch resource: "+t+", status: "+i.status)}function s(){n?r(n):c("timeout of "+e+"ms occured while fetching resource: "+t)}function c(t){console.error(t),r("")}}))},uid:function(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}(),delay:function(t){return function(e){return new Promise((function(r){setTimeout((function(){r(e)}),t)}))}},asArray:function(t){for(var e=[],r=t.length,n=0;n<r;n++)e.push(t[n]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,r){var n=new Image;n.onload=function(){e(n)},n.onerror=r,n.src=t}))},width:function(t){var r=e(t,"border-left-width"),n=e(t,"border-right-width");return t.scrollWidth+r+n},height:function(t){var r=e(t,"border-top-width"),n=e(t,"border-bottom-width");return t.scrollHeight+r+n}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var r=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(r.replace("px",""))}}(),Srt=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,i,a){return o()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return n(e,t,i,a)}))})),r}));function o(){return!e(t)}},shouldProcess:e,impl:{readUrls:r,inline:n}};function e(e){return-1!==e.search(t)}function r(e){for(var r,n=[];null!==(r=t.exec(e));)n.push(r[1]);return n.filter((function(t){return!Ert.isDataUrl(t)}))}function n(t,e,r,n){return Promise.resolve(e).then((function(t){return r?Ert.resolveUrl(t,r):t})).then(n||Ert.getAndEncode).then((function(t){return Ert.dataAsUrl(t,Ert.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+Ert.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),Mrt=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(Ert.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{Ert.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return Srt.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return Srt.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),Trt=function(){return{inlineAll:function e(r){return r instanceof Element?n(r).then((function(){return r instanceof HTMLImageElement?t(r).inline():Promise.all(Ert.asArray(r.childNodes).map((function(t){return e(t)})))})):Promise.resolve(r);function n(t){var e=t.style.getPropertyValue("background");return e?Srt.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}},impl:{newImage:t}};function t(t){return{inline:function(e){return Ert.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||Ert.getAndEncode).then((function(e){return Ert.dataAsUrl(e,Ert.mimeType(t.src))})).then((function(e){return new Promise((function(r,n){t.onload=r,t.onerror=n,t.src=e}))}))}}}}(),Prt={imagePlaceholder:void 0,cacheBust:!1};function Ort(t,e){return function(t){void 0===t.imagePlaceholder?jrt.impl.options.imagePlaceholder=Prt.imagePlaceholder:jrt.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?jrt.impl.options.cacheBust=Prt.cacheBust:jrt.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return Rrt(t,e.filter,!0)})).then(Crt).then((function(t){var{bgcolor:r,width:n,height:i,style:a,sx:o=1,sy:s=1}=e,c=t.style;r&&(c.backgroundColor=r);n&&(c.width=n+"px");i&&(c.height=i+"px");c["margin-left"]="0px",c["margin-top"]="0px",["-webkit-","-moz-","-ms-","-o-",""].forEach((t=>{c[t+"transform"]=`rotate(0rad) translate(0px, 0px) scale(${o}, ${s}) perspective(1px)`})),a&&Object.keys(a).forEach((function(t){c[t]=a[t]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(Ert.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||Ert.width(t),e.height||Ert.height(t))}))}function Irt(t,e){return Ort(t,e).then(Ert.makeImage).then(Ert.delay(100)).then((function(r){var n=function(t){var r=document.createElement("canvas");if(r.width=e.width||Ert.width(t),r.height=e.height||Ert.height(t),e.bgcolor){var n=r.getContext("2d");n.fillStyle=e.bgcolor,n.fillRect(0,0,r.width,r.height)}return r}(t);return n.getContext("2d").drawImage(r,0,0),n}))}function Rrt(t,e,r){return r||!e||e(t)?Promise.resolve(t).then((function(t){if(t instanceof HTMLCanvasElement)try{return Ert.makeImage(t.toDataURL())}catch(t){b9(t)}return t.cloneNode(!1)})).then((function(r){return function(t,e,r){var n=t.childNodes;return 0===n.length?Promise.resolve(e):i(e,Ert.asArray(n),r).then((function(){return e}));function i(t,e,r){var n=Promise.resolve();return e.forEach((function(e){n=n.then((function(){return Rrt(e,r)})).then((function(e){e&&t.appendChild(e)}))})),n}}(t,r,e)})).then((function(e){return function(t,e){return e instanceof Element?Promise.resolve().then(r).then(n).then(i).then(a).then((function(){return e})):e;function r(){function r(t,e){function r(t,e){Ert.asArray(t).forEach((function(r){e.setProperty(r,t.getPropertyValue(r),t.getPropertyPriority(r))}))}t.cssText?e.cssText=t.cssText:r(t,e)}r(window.getComputedStyle(t),e.style)}function n(){function r(r){var n=window.getComputedStyle(t,r),i=n.getPropertyValue("content");if(""!==i&&"none"!==i){var a=Ert.uid();e.className=e.className+" "+a;var o=document.createElement("style");o.appendChild(s(a,r,n)),e.appendChild(o)}function s(t,e,r){var n="."+t+":"+e,i=r.cssText?a(r):o(r);return document.createTextNode(n+"{"+i+"}");function a(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function o(t){return Ert.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){r(t)}))}function i(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function a(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var r=e.getAttribute(t);r&&e.style.setProperty(t,r)})))}}(t,e)})):Promise.resolve()}function Crt(t){return Trt.inlineAll(t).then((function(){return t}))}var jrt={toSvg:Ort,toPng:function(t,e){return Irt(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return Irt(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return Irt(t,e||{}).then(Ert.canvasToBlob)},toPixelData:function(t,e){return Irt(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,Ert.width(t),Ert.height(t)).data}))},impl:{fontFaces:Mrt,images:Trt,util:Ert,inliner:Srt,options:{}}};function Drt(t,e,r,n){var i=this.model_layer,a=i._overlay;return new Promise((function(o,s){if(i){var c=i.get("width"),u=i.get("height");r=r||c,n=n||u;var l=i.get("translate"),h=i.get("scale"),f=Math.min(r/c,n/u);r=c*f,n=u*f,i.set("translate",{x:0,y:0}),i.set("scale",{x:f/P9,y:f/P9});var d=Btt.createCanvas(r,n),p=d.getContext("2d");if(i.draw(p),i.set("translate",l),i.set("scale",h),!a)return o(d.toDataURL(t,e)),void(d=null);jrt.toPng(a,{sx:f,sy:f,width:r,height:n}).then((function(i){var a=new Image;a.onload=function(){p.drawImage(a,0,0,r,n),o(d.toDataURL(t,e)),d=null},a.src=i}),(function(r){y9(r),o(d.toDataURL(t,e)),d=null}))}else s("No target model")}))}function Lrt(){var t=this.selected.filter((t=>!!t.parent&&!t.stuck));if(!(t.length<2)){var e=t[0].parent,r=[],n=t.sort(((t,r)=>e.components.indexOf(t)-e.components.indexOf(r)));n.forEach((t=>{r.push(t.bounds)}));var i=Btt.union(r),a=t[0].transcoordP2S(i.left,i.top);a=t[0].transcoordS2T(a.x,a.y);var o=new Map,s=lrt({type:"group",left:a.x,top:a.y,width:i.width,height:i.height},e.app,(t=>{const e=this.getNewRefid();return void 0!==t&&o.set(t,e),e}));s.replaceRefids(o);var c=[{component:s,to_container:e}];n.forEach((t=>{c.push({component:t,to_container:s})})),this.app.commander.execute(new srt({changes:c})),this.selected=[s]}}function zrt(){if(0!==this.selected.length){var t=[],e=[];this.selected.forEach((r=>{if(r.isGroup()){var n=r.parent;r.components.forEach((r=>{t.push(r),e.push({component:r,to_container:n})})),e.push({component:r,to_container:null})}})),this.app.commander.execute(new srt({changes:e})),this.selected=t}}function Frt(){var t=this.selected;if(0!=t.length){var e=t.map((t=>t.bounds)),r=Btt.union(e),n=r.left+r.width/2;t.map((t=>{t.symmetryX(n)}))}}function Brt(){var t=this.selected;if(0!=t.length){var e=t.map((t=>t.bounds)),r=Btt.union(e),n=r.top+r.height/2;t.map((t=>{t.symmetryY(n)}))}}function Nrt(){Vet.around(this.app.commander,Frt,this)}function Urt(){Vet.around(this.app.commander,Brt,this)}function Yrt(t,e,r){var n=this.findAll(t,r);return n.forEach((t=>{t.set(e)})),n}function Grt(t){Vet.around(this.app.commander,t)}function Hrt(){return Object.values(this.indexMap).map((t=>{let{id:e,data:r}=t.model;return{key:e,value:r}})).sort(((t,e)=>t.key>e.key?1:-1))}function Wrt(t,e,r,n){var i=t.selected,a=n?i.slice(0):[];n&&a.length>0?e=a[0].parent:e.isContainer()||(e=e.parent);var o=e.layout.capturables(e),s=!!e.layout.joinType;if(n&&r.selected.forEach((t=>{a.splice(a.indexOf(t),1)})),r.selected=[],o.forEach((t=>{t.capturable&&function(t,e,r){var n,i,a,o,{sx:s,sy:c,ex:u,ey:l}=e;if(s>u?(n=u,i=s):(n=s,i=u),c>l?(a=l,o=c):(a=c,o=l),r){var h=t.bounds,f=t.transcoordS2TR(h.left,h.top),d=t.transcoordS2TR(h.left+h.width,h.top+h.height),p=f.x,g=d.x,v=f.y,m=d.y,y=Math.min(n,p,i,g),b=Math.max(n,p,i,g),x=Math.min(a,v,o,m),w=Math.max(a,v,o,m);return!(b-y>Math.abs(i-n)+Math.abs(g-p)||w-x>Math.abs(o-a)+Math.abs(m-v))}var A=t.path;if(!A)return error("컴포넌트에 get path가 잘못 구현되어있음.",t),!1;for(let e=0;e<A.length;e++){let r=t.transcoordS2TR(A[e].x,A[e].y);if(n>r.x||i<r.x||a>r.y||o<r.y)return!1}return!0}(t,r,s)&&-1==a.indexOf(t)&&r.selected.push(t)})),a=a.concat(r.selected),i.length!==a.length)t.selected=a;else for(let e=0;e<a.length;e++)if(i[e]!=a[e]){t.selected=a;break}}function qrt(t,e,r,n,i){i||Wrt(t,e,r,n)}Btt.register("add-layer",class extends yet{ready(){super.ready();var t=this.rootModel,e=t.get("translate"),r=t.get("scale");this.set("translate",e),this.set("scale",r)}render(t){var e=this.addbox;if(e){let{sx:r,sy:n,ex:i,ey:a}=e,o=this.get("scale")||{x:1,y:1};t.beginPath(),t.rect(r,n,i-r,a-n),t.setLineDash([2/o.x,4/o.y]),t.lineWidth=1/o.x,t.strokeStyle="black",t.stroke()}}contains(t,e){return!(3!=this.app.mode)}get eventMap(){return{"(root)":{"(self)":{addstart:this.onaddstart,addstop:this.onaddstop,keydown:this.onkeydown,dragstart:this.ondragstart,dragmove:this.ondragmove,dragend:this.ondragend,mousedown:this.onmousedown,mouseup:this.onmouseup}},"model-layer":{"(self)":{change:this.onchange_root_model}}}}onchange_root_model(t,e,r){t.translate&&this.set("translate",t.translate),t.scale&&this.set("scale",t.scale)}onaddstart(t,e){void 0===this.before_mode&&(this.before_mode=this.app.mode,this.models=t,this.app.mode=3)}onaddstop(){void 0!==this.before_mode&&(this.app.mode=this.before_mode),delete this.before_mode,delete this.addbox,this.invalidate()}onkeydown(t){3===this.app.mode&&"Esc"===t.code&&this.root.trigger("addstop")}ondragstart(t){var{x:e,y:r}=this.transcoordC2S(t.offsetX,t.offsetY);this.addbox={sx:e,sy:r}}ondragmove(t){if(3===this.app.mode){var{x:e,y:r}=this.transcoordC2S(t.offsetX,t.offsetY);this.addbox&&(this.addbox.ex=e,this.addbox.ey=r,this.invalidate())}}ondragend(t,e){if(3!==this.app.mode)return;const{sx:r,sy:n,ex:i,ey:a}=this.addbox;drt.call(this.root,this.models,{left:Math.min(r,i),top:Math.min(n,a),width:Math.abs(i-r),height:Math.abs(a-n)}),this.root.trigger("addstop")}onmousedown(t,e){3===this.app.mode&&(this.downpoint={x:t.offsetX,y:t.offsetY})}onmouseup(t,e){if(this.downpoint.x===t.offsetX&&this.downpoint.y===t.offsetY){var{x:r,y:n}=this.transcoordC2S(t.offsetX,t.offsetY);drt.call(this.root,this.models,{cx:r,cy:n}),this.root.trigger("addstop")}}});Btt.register("selection-layer",class extends yet{ready(){super.ready();var t=this.rootModel,e=t.get("translate"),r=t.get("scale");this.set("translate",e),this.set("scale",r)}contains(t,e){return!1}render(t){var e=this.selbox;if(e){let{sx:r,sy:n,ex:i,ey:a}=e,o=this.get("scale")||{x:1,y:1};t.beginPath(),t.rect(r,n,i-r,a-n),t.setLineDash([2/o.x,4/o.y]),t.lineWidth=1/o.x,t.strokeStyle="black",t.stroke()}}get eventMap(){return{"(root)":{"(self)":{keydown:this.onkeydown}},"model-layer":{"(self)":{change:this.onchange_root_model},"(all)":{dragstart:this.ondragstart_selbox,dragmove:this.ondragmove_selbox,dragend:this.ondragend_selbox,mousedown:this.onmousedown_comp,mouseup:this.onmouseup_comp}}}}onkeydown(t,e){var{origin:r,deliverer:n}=e,i=n.selected;if(1!==i.length)return!1;var a=i[0],o=a.parent;if(!o||o===n)return!1;if("Tab"===t.code){var s=o.layout.capturables(o),c=s.indexOf(a);if(-1==c){if(!o.indexOf(a))return b9("Container not contains [",a,"] as a component"),!1;c=0}var u=s.length;t.shiftKey?c--:c++,a=s[(c+u)%u]}else{if(!o.layout.keyNavigate)return!1;a=o.layout.keyNavigate(o,a,t)||a}n.selected=[a],t.preventDefault()}onchange_root_model(t,e,r){t.translate&&this.set("translate",t.translate),t.scale&&this.set("scale",t.scale)}_pendingDecision(t){this.downpoint={x:t.offsetX,y:t.offsetY}}_selectGroupItem(t,e){var r=this.selected.indexOf(t);let n=t.parent;for(;n.parent.isGroup();)n=n.parent;let i=[],a=!1,o=!1;if(this.selected.forEach((t=>{let e=t.parent;if(t!==n){for(;e.parent&&e.parent.isGroup();)e=e.parent;e===n&&(i.push(t),a=!0)}else o=!0})),a)if(e.shiftKey){if(-1!=r)return void this._pendingDecision(e);i.push(t)}else{if(-1!=r)return void this._pendingDecision(e);i=[t]}else{if(o)return void this._pendingDecision(e);if(e.shiftKey)if(this.selected.length>0){if(-1!=this.selected.indexOf(n)||this.selected[0].parent!==n.parent)return;i=[...this.selected,n]}else i=[n];else i=[n]}this.selected=i}onmousedown_comp(t,e){var{origin:r}=e;if(this.downpoint=null,t.shiftKey){if(r.parent.isGroup())return void this._selectGroupItem(r,t);if(-1!=this.selected.indexOf(r))return void this._pendingDecision(t);{let e=this.selected.filter((t=>!t.isRootModel()&&!!t.parent)),n=e.length>0&&e[0].parent;if(n&&n!==r.parent)return void(r.parent.isGroup()&&this._pendingDecision(t));e.push(r),this.selected=e}}else{if(r.parent.isGroup())return void this._selectGroupItem(r,t);if(-1!=this.selected.indexOf(r))return;this.selected=[r]}}onmouseup_comp(t,e){if(!this.downpoint)return;if(this.downpoint.x!==t.offsetX||this.downpoint.y!==t.offsetY)return;var{origin:r}=e;let n=this.selected.indexOf(r);if(-1==n&&r.parent.isGroup()&&(n=this.selected.indexOf(r.parent)),-1!==n&&t.shiftKey){let t=this.selected.slice();return n>-1&&t.splice(n,1),void(this.selected=t)}r.parent.isGroup()&&(this.selected=[r])}ondragstart_selbox(t,e){var{origin:r}=e;if(r.stuck){var{x:n,y:i}=this.transcoordC2S(t.offsetX,t.offsetY);this.selbox={sx:n,sy:i,selected:[]}}}ondragmove_selbox(t,e){var{origin:r}=e;if(r.stuck){var{x:n,y:i}=this.transcoordC2S(t.offsetX,t.offsetY);this.selbox&&(this.selbox.ex=n,this.selbox.ey=i,qrt(this,r,this.selbox,t.shiftKey),this.invalidate())}}ondragend_selbox(t,e){var{origin:r}=e;r.stuck&&(this.last_pos=null,this.selbox=null,qrt(this,null,null,!1,!0),this.invalidate())}});class Xrt{constructor(t){this.layer=t}draw(t,e,r){var{left:n,top:i,width:a,height:o}=e.bounds;0!=a&&0!=o&&(t.beginPath(),t.rect(n,i,a,o),t.clip(),t.beginPath(),t.strokeStyle="#f26522",t.lineWidth=4,t.shadowBlur=10,t.shadowColor="black",t.shadowOffsetX=0,t.shadowOffsetY=0,t.rect(n,i,a,o),t.stroke(),t.closePath())}}class Vrt{constructor(t){this.layer=t}draw(t,e,r){var n=e.bounds;t.beginPath(),t.rect(n.left-4/r.x,n.top-4/r.y,n.width+8/r.x,n.height+8/r.y),t.setLineDash([3/r.x,4/r.y]),t.lineWidth=1/r.x,t.strokeStyle="black",t.stroke(),t.setLineDash([]),t.closePath()}}class Qrt{constructor(t){this.layer=t}reset(){this.active=null}get selected(){return this.layer.selected}contains(t,e,r,n){let i=r.controls;return!!i&&(i.every(((i,a)=>(Math.abs(t-i.x)<=4/n.x&&Math.abs(e-i.y)<=4/n.y&&(this.active={component:r,index:a,handler:i.handler}),!this.active))),!!this.active)}draw(t,e,r){var n=e.controls;n&&n.forEach(((e,n)=>{t.beginPath(),t.lineWidth=1/r.x,t.ellipse(e.x,e.y,4/r.x,4/r.y,0,0,2*Math.PI,!0),t.fillStyle="#ff5d72",t.fill(),t.strokeStyle="#fff",t.stroke()}))}onevent(t,e){var{handler:r,component:n,index:i}=this.active,a=n.transcoordC2S(e.offsetX,e.offsetY);a=n.transcoordS2P(a.x,a.y),r&&"function"==typeof r[t]&&r[t](a,i,n)}onmousedown(t){this.onevent("onmousedown",t)}ondragstart(t){var e=this.active;e.changes=Vet.before([e.component]),this.onevent("ondragstart",t)}ondragmove(t){this.onevent("ondragmove",t)}ondragend(t){this.onevent("ondragend",t);var{component:e,changes:r}=this.active;Vet.after(r,e.app.commander),e.parent&&e.parent.calculateBounds&&e.parent.calculateBounds()}}function Krt(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}const Jrt=15*Math.PI/180;class Zrt{constructor(t){this.layer=t}reset(){this.active=null,this.created=null}get selected(){return this.layer.selected}contains(t,e,r,n){return!!r.mutable&&(r.path.every(((i,a)=>(Math.abs(t-i.x)<=4/n.x&&Math.abs(e-i.y)<=4/n.y&&(this.active={component:r,index:a}),!this.active))),!!this.active)}startLinkProcess(t,e,r){try{var n=lrt(e,t.app);return t.rootModel.addComponent(n),this.layer.selected=[n],this.active={component:n,index:1},this.ondragstart(r),n}catch(t){console.warn(r)}}draw(t,e,r){if(e.mutable&&!e.stuck){var n=e.path,i=this.active;n.forEach(((n,a)=>{t.beginPath(),t.ellipse(n.x,n.y,4/r.x,4/r.y,0,0,2*Math.PI,!0),t.lineWidth=1/r.x,t.strokeStyle="#656565",t.fillStyle="#fff",i&&i.component===e&&i.index===a&&(t.strokeStyle="#fa7703",i.toFill&&(t.fillStyle="#ffb80c")),t.fill(),t.stroke()}))}}ondblclick(t){var e=this.active.component;if(e.pathExtendable){var r=e.path.slice();r.length<3||(r.splice(this.active.index,1),e.path=r)}}onmousedown(t){this.active.toFill=!0}ondragstart(t){var{index:e,component:r}=this.active;this.created||(this.active.changes=Vet.before([r])),0!==e&&e!==r.path.length-1||(this.layer.counterEnd=0===e?r.toEnd||{fromto:"to"}:r.fromEnd||{fromto:"from"})}ondragmove(t){var{component:e,index:r}=this.active||{};const{offsetX:n,offsetY:i}=t;var a,o,s=e.transcoordC2S(n,i);if(s=e.transcoordS2P(s.x,s.y),t.shiftKey){var c=e.path.length,u=e.isLine()&&0==r?e.path[1]:e.path[(r-1+c)%c];u=e.transcoordS2P(u.x,u.y);var l,h=0;if(c>2)e.isLine()?0==r?l=e.path[2]:1!=r&&(l=e.path[r-2]):l=e.path[(r-2+c)%c],l&&(h=Krt(l=e.transcoordS2P(l.x,l.y),u));var f=Math.round((Krt(u,s)-h)/Jrt)*Jrt+h;s=function(t,e,r){return{x:Math.cos(e)*r+t.x,y:Math.sin(e)*r+t.y}}(u,f,(a=u,o=s,Math.sqrt((o.x-a.x)*(o.x-a.x)+(o.y-a.y)*(o.y-a.y))))}if(0===r||r===e.path.length-1){const t=this.layer.anchorTarget=e.rootModel.capture(n,i,(t=>!t.isConnectable()));if(t){const{x:a,y:o}=t.transcoordC2S(n,i),c=this.layer.get("scale")||{x:1,y:1},u=this.layer.counterEnd,l=(t.anchors||[]).find((r=>{const{name:n,inout:i,multiplicity:s=1/0,position:l,filter:h}=r;if(u){const{anchor:t,fromto:e}=u;if(t&&("out"===t.inout&&"out"===i||"in"===t.inout&&"in"===i))return!1;if("from"===e&&"out"===i||"to"===e&&"in"===i)return!1}else console.error("should not be here.");if(Math.abs(a-l.x)>8/c.x||Math.abs(o-l.y)>8/c.y)return!1;const f=t.findInOutLines(n);return!!f.includes(e)||!(s!==1/0&&f.length>=s)&&(!u||!h||!!h.call(r,u))}));l?0==r?e.from={component:t.get("refid"),anchor:l.name,position:s}:e.to={component:t.get("refid"),anchor:l.name,position:s}:0==r?e.from={position:s}:e.to={position:s}}}e.mutatePath(null,(function(t){t[r]=s}))}ondragend(t){var{component:e,index:r,changes:n}=this.active;if(0===r||r===e.path.length-1){const{offsetX:n,offsetY:i}=t,a=e.rootModel.capture(n,i,(t=>t===e||t.isLine())),{x:o,y:s}=a.transcoordC2S(n,i),c=this.layer.get("scale")||{x:1,y:1},u=(a.anchors||[]).find((t=>t&&Math.abs(o-t.position.x)<=8/c.x&&Math.abs(s-t.position.y)<=8/c.y));u&&(0==r?e.from={component:a.get("refid"),anchor:u.name}:e.to={component:a.get("refid"),anchor:u.name}),this.layer.endLinkProcess()}if(this.created){let t=new srt({changes:[{component:this.created,to_container:this.created.parent}]});created.app.commander.execute(t)}else Vet.after(n,e.app.commander);e.parent&&e.parent.calculateBounds&&e.parent.calculateBounds()}}class $rt{constructor(t){this.layer=t}get active(){return this._active?.component.disposed&&(this._active=null),this._active}set active(t){this._active=t}reset(){this.active=null}contains(t,e,r,n){const i=this.active?.component===r&&this.active?.anchor;this.active=null;const a=this.layer.counterEnd;return(r.isConnectable()&&!r.disposed&&r.anchors||[]).filter((t=>{const{name:e,inout:n,multiplicity:i=1/0,filter:o}=t;if(a){const{anchor:t,fromto:e}=a;if(t&&("out"===t.inout&&"out"===n||"in"===t.inout&&"in"===n))return!1;if("from"===e&&"out"===n||"to"===e&&"in"===n)return!1}else if("in"===n)return!1;return!(i!==1/0&&r.findInOutLines(e).length>=i)&&(!o||!a||!!o.call(t,a))})).every((a=>{const o=i===a.name?2:1;return a&&a.position&&Math.abs(t-a.position.x)<=4*o/n.x&&Math.abs(e-a.position.y)<=4*o/n.y&&(this.active={component:r,anchor:a.name,template:a.template}),!this.active})),!!this.active}draw(t,e,r){if(!e.get("refid")||e.isLine())return;var n=this.active;const i=this.active?.component===e&&this.active?.anchor,a=this.layer.counterEnd;(e.isConnectable()&&!e.disposed&&e.anchors||[]).filter((t=>{const{name:r,inout:n,multiplicity:i=1/0,filter:o}=t;if(a){const{anchor:t,fromto:e}=a;if(t&&("out"===t.inout&&"out"===n||"in"===t.inout&&"in"===n))return!1;if("from"===e&&"out"===n||"to"===e&&"in"===n)return!1}else if("in"===n)return!1;return!(i!==1/0&&e.findInOutLines(r).length>=i)&&(!a||!o||!!o.call(t,a))})).forEach((a=>{const{name:o,position:s}=a,c=i===o?2:1;s&&(t.beginPath(),t.ellipse(s.x,s.y,4*c/r.x,4*c/r.y,0,0,2*Math.PI),t.setLineDash([0,0]),t.lineWidth=1/r.x,t.strokeStyle="#656565",t.stroke(),t.fillStyle="#fff",n&&n.component===e&&n.anchor===o&&(t.strokeStyle="#fa7703",n.focus&&(t.fillStyle="#ffb80c")),t.fill(),t.stroke())}))}onmousedown(t){this.active.focus=!0}ondragstart(t){const{component:e,anchor:r,template:n}=this.active,i=this.layer.transcoordC2S(t.offsetX,t.offsetY);this.layer.startLinkProcess(e,{type:"ortholine",lineWidth:1,strokeStyle:"black",begin:"oval",beginSize:"size9",end:"arrow",endSize:"size9",lineDash:"solid",lineCap:"butt",round:10,...n,from:{component:e.get("refid"),anchor:r,position:i},to:{position:i}},t)}ondragmove(t){}ondragend(t){}}const tnt=50,ent=0,rnt=1,nnt=2,int=3,ant=4,ont=5,snt=6,cnt=7;function unt(t,e,r){var n,i,{left:a,top:o,width:s,height:c}=t.bounds;switch(e){case ent:n=a,i=o;break;case rnt:n=a+s/2,i=o;break;case nnt:n=a+s,i=o;break;case int:n=a+s,i=o+c/2;break;case ant:n=a+s,i=o+c;break;case ont:n=a+s/2,i=o+c;break;case snt:n=a,i=o+c;break;case cnt:n=a,i=o+c/2}var u=n,l=i,h=t.transcoordT2S(r.x,r.y);return{dx:h.x-u,dy:h.y-l}}function lnt(t,e,r,n,i,a){var{left:o,top:s,width:c,height:u}=t.bounds,l={left:o,top:s,width:c,height:u};switch(e){case ent:o+=n,s+=i,c-=n,u-=i;break;case rnt:s+=i,u-=i;break;case nnt:s+=i,c+=n,u-=i;break;case int:c+=n;break;case ant:c+=n,u+=i;break;case ont:u+=i;break;case snt:o+=n,c-=n,u+=i;break;case cnt:o+=n,c-=n}if(t.mutateBounds((function(e){return Math.abs(c)<=.001&&(c=.001),Math.abs(u)<=.001&&(u=.001),t.adjustResize({left:o,top:s,width:c,height:u},l,r)}),this),t.isContainer()&&t.layout.ABSOLUTE&&!t.isGroup()){var h=l.left-o,f=l.top-s;a?t.components.forEach((t=>{t.delta("tx",0),t.delta("ty",0),t.move({x:h,y:f},!1)})):t.components.forEach((t=>{t.delta("tx",h),t.delta("ty",f)}))}else{var d=a&&t.parent;d&&d.isGroup()&&d.calculateBounds()}}function hnt(t,e){var{left:r,top:n,width:i,height:a}=t,o=r+i/2,s=n+a/2,c=r+i,u=n+a;const l=i*e.x>tnt,h=a*e.y>tnt;return[{x:r,y:n},l?{x:o,y:n}:null,{x:c,y:n},h?{x:c,y:s}:null,{x:c,y:u},l?{x:o,y:u}:null,{x:r,y:u},h?{x:r,y:s}:null]}class fnt{constructor(t){this.layer=t}reset(){this.active=null}get selected(){return this.layer.selected}contains(t,e,r,n){return!!r.resizable&&(hnt(r.bounds,n).every(((i,a)=>(i&&Math.abs(t-i.x)<=4/n.x&&Math.abs(e-i.y)<=4/n.y&&(this.active={component:r,index:a}),!this.active))),!!this.active)}draw(t,e,r){if(!e.isLine()){var{left:n,top:i,width:a,height:o}=e.bounds;if(t.beginPath(),t.rect(n-4/r.x,i-4/r.y,a+8/r.x,o+8/r.y),t.setLineDash([3/r.x,4/r.y]),t.lineWidth=1/r.x,t.strokeStyle="black",t.stroke(),t.setLineDash([]),e.resizable){var s=this.active;hnt(e.bounds,r).forEach(((n,i)=>{n&&(t.beginPath(),t.rect(n.x-4/r.x,n.y-4/r.y,8/r.x,8/r.y),t.setLineDash([0,0]),t.strokeStyle="#656565",t.stroke(),t.fillStyle="#fff",s&&s.component===e&&s.index===i&&(t.strokeStyle="#fa7703",s.focus&&(t.fillStyle="#ffb80c")),t.fill(),t.stroke())}))}}}onmousedown(t){this.active.focus=!0}ondragstart(t){var{component:e}=this.active;this.active.bounds=e.bounds,this.active.boundsList=this.layer.selected.filter((t=>t.resizable)).map((t=>t.bounds))}ondragmove(t){var{component:e,index:r,boundsList:n,bounds:i}=this.active,a=this.layer.transcoordC2S(t.offsetX,t.offsetY);e.bounds=i;var o=unt(e,r,a);this.layer.selected.filter((t=>t.resizable)).forEach(((e,i)=>{e.bounds=n[i],lnt(e,r,t.shiftKey,o.dx,o.dy,!1)}))}ondragend(t){var{component:e,index:r,boundsList:n,bounds:i}=this.active,a=this.layer.transcoordC2S(t.offsetX,t.offsetY);e.bounds=i;var o=unt(e,r,a);this.layer.selected.filter((t=>t.resizable)).forEach(((e,i)=>{e.bounds=n[i],lnt(e,r,t.shiftKey,o.dx,o.dy,!0)})),this.active.component.app.commander.execute(null,!1)}}const dnt=20,pnt=2*Math.PI,gnt=Math.PI/2;function vnt(t,e){var r=t.bounds;return{x:r.left+r.width/2,y:r.top-dnt/e.y}}class mnt{constructor(t){this.layer=t}reset(){this.active=null}get selected(){return this.layer.selected}contains(t,e,r,n){if(!r.rotatable)return!1;var i=vnt(r,n);return Math.abs(t-i.x)<=4/n.x&&Math.abs(e-i.y)<=4/n.y&&(this.active={component:r},!0)}draw(t,e,r){if(e.rotatable){t.beginPath();var n=vnt(e,r);t.lineWidth=1.5/r.x,t.moveTo(n.x,n.y+dnt/r.y),t.lineTo(n.x,n.y),t.strokeStyle="#656565",t.stroke(),t.beginPath(),t.ellipse(n.x,n.y,4/r.x,4/r.y,0,0,pnt,!0),t.stroke(),t.fillStyle="#fff",t.fill();var i=this.active;i&&i.component===e&&(t.strokeStyle="#fa7703",t.stroke(),i.toFill&&(t.fillStyle="#ffb80c",t.fill()))}}onmousedown(t){this.active.toFill=!0}ondragstart(t){var e=this.active;e.component,e.start_rotation=e.component.get("rotation"),e.rotations=this.layer.selected.filter((t=>t.rotatable)).map((t=>t.get("rotation")))}ondragmove(t){var{component:e}=this.active,r=e.transcoordC2S(t.offsetX,t.offsetY);r=e.transcoordS2P(r.x,r.y);var n=e.rotatePoint,i=e.get("rotation")||0,a=Math.atan((n.y-r.y)/(n.x-r.x)),o=(a=n.x>=r.x?a-gnt:gnt+a)-i;this.layer.selected.filter((t=>t.rotatable)).forEach(((e,r)=>{let n=((e.get("rotation")||0)+o)%pnt;e.set("rotation",e.adjustRotation(n,t.shiftKey))}))}ondragend(t){var{component:e,rotations:r}=this.active;e.app.commander.execute(null,!1)}}Btt.register("modeling-layer",class extends yet{constructor(t,e){super(t,e),this.pathHandler=new Zrt(this);var r=this.pathHandler,n=new Qrt(this),i=new fnt(this),a=new mnt(this);this._modelers=[r,n,i,a],this._control_mode_modelers=[n,r,i,a],this.focusOutline=new Xrt(this),this.groupOutline=new Vrt(this),this.anchorHandler=new $rt(this),this._reversed_modelers=this._modelers.slice().reverse(),this._control_mode_reverse_modelers=this._control_mode_modelers.slice().reverse(),this.hovered=null,this.hoveredDest=null}get modelers(){return this._control_mode?this._control_mode_modelers:this._modelers}get reversedModelers(){return this._control_mode?this._control_mode_reverse_modelers:this._reversed_modelers}ready(){super.ready();var t=this.rootModel,e=t.get("translate"),r=t.get("scale");this.set("translate",e),this.set("scale",r)}contains(t,e){var r=this.selected.filter((t=>!!t.parent)),n=this.get("scale")||{x:1,y:1};if(this._state_dragging){if(this._counter_end){let r=this.anchorTarget.transcoordT2S(t,e);if(this.anchorHandler.contains(r.x,r.y,this.anchorTarget,n))return!0}return!0}this.modelers.forEach((t=>t.reset()));r=this.selected.filter((t=>!!t.parent));for(let i=0;i<r.length;i++){let a=r[i],o=a.transcoordT2S(t,e);for(let t=0;t<this.modelers.length;t++){let e=this.modelers[t];if(e.contains(o.x,o.y,a,n))return this.currentModeler=e,!0}}if(this.anchorTarget){let r=this.anchorTarget.transcoordT2S(t,e);if(this.anchorHandler.contains(r.x,r.y,this.anchorTarget,n))return this.currentModeler=this.anchorHandler,!0}else this.anchorHandler.reset();return this.currentModeler=null,!1}_componentDrawer(t,e,r,n){let i=[],a=e.parent;if(e.isRootModel())return t.save(),n(t,e,r),void t.restore();for(;a&&!a.isRootModel();)i.push(a),a=a.parent;t.save(),i.reverse().forEach((function(e){let r=e.rotatePoint;t.translate(r.x,r.y);let n=e.get("scale");n&&t.scale(n.x,n.y),t.rotate(e.get("rotation")),t.translate(-r.x,-r.y);let i=e.bounds;t.translate(i.left,i.top)}));let o=e.rotatePoint;t.translate(o.x,o.y);let s=e.get("scale");s&&t.scale(s.x,s.y),t.rotate(e.get("rotation")),t.translate(-o.x,-o.y),n(t,e,r),t.restore()}prerender(t){var{translate:e,scale:r={x:1,y:1},rotation:n}=this.model;t.save(),t.beginPath(),t.clearRect(0,0,t.canvas.width,t.canvas.height),t.rect(0,0,t.canvas.width,t.canvas.height),t.fillStyle="black",t.globalAlpha=.5,t.fill(),t.restore(),e&&t.translate(e.x*P9,e.y*P9),t.scale(r.x*P9,r.y*P9),n&&t.rotate(n),t.clearRect(0,0,this.rootModel.get("width"),this.rootModel.get("height"))}render(t){t.beginPath();var e=this.get("scale")||{x:1,y:1},r=this.selected.filter((t=>!!t.parent));if(this.focused&&this._componentDrawer(t,this.focused,e,((t,e,r)=>{this.focusOutline.draw(t,e,r)})),r.length>0&&r[0].parent.isGroup()){let n=r[0].parent;for(;n.parent.isGroup();)n=n.parent;this._componentDrawer(t,n,e,((t,e,r)=>{this.groupOutline.draw(t,e,r)}))}r.forEach((r=>{this._componentDrawer(t,r,e,((t,e,r)=>{this.reversedModelers.forEach((n=>n.draw(t,e,r)))}))})),this.anchorTarget&&this._componentDrawer(t,this.anchorTarget,e,((t,e,r)=>{this.anchorHandler.draw(t,e,r)}))}get anchorTarget(){return this.currentModeler===this.anchorHandler||this.currentModeler===this.pathHandler||this.hovered?.isLine()||(this._anchorTarget=this.hovered),this._anchorTarget}set anchorTarget(t){this._anchorTarget=t}get hovered(){return this._hovered}set hovered(t){this._hovered=t,this.invalidate()}startLinkProcess(t,e,r){this.currentModeler=this.pathHandler,this.processingLink=this.pathHandler.startLinkProcess(t,e,r),this.counterEnd=this.processingLink.fromEnd,this.processingLink.trigger("tag")}set counterEnd(t){this.currentModeler=this.pathHandler,this._counter_end=t}get counterEnd(){return this._counter_end}endLinkProcess(){this.processingLink?.trigger("tagreset"),this.processingLink=null,this._counter_end=null}get eventMap(){return{"model-layer":{"(all)":{change:this.onchange_model,wheel:this.onwheel_scale,drop:this.ondrop},"(descendant)":{mouseenter:this.onmouseenter,mouseleave:this.onmouseleave}},"(root)":{"(self)":{selected:this.onselected,keydown:this.onkeydown,keyup:this.onkeyup}}}}onmouseenter(t,e){this.hovered=e?.origin}onmouseleave(t,e){this.hovered=null}onkeydown(t){"Alt"==t.key&&(this._control_mode=!0,this.invalidate())}onkeyup(t){"Alt"==t.key&&(this._control_mode=!1,this.invalidate())}onselected(t,e){this.invalidate()}onchange_model(t,e,r){var{origin:n,deliverer:i}=r;n===i&&(t.translate&&this.set("translate",t.translate),void 0!==t.rotation&&this.set("rotation",t.rotation),t.scale&&this.set("scale",t.scale)),this.invalidate()}ondblclick(t){"function"==typeof this.currentModeler.ondblclick&&this.currentModeler.ondblclick(t),this.invalidate()}onmousedown(t){this.currentModeler.onmousedown(t),this.invalidate()}onmouseup(t){"function"==typeof this.currentModeler.onmouseup&&this.currentModeler.onmouseup(t),this.invalidate()}ondragstart(t){this.currentModeler.ondragstart(t),this._state_dragging=!0}ondragmove(t){this.currentModeler.ondragmove(t),this.invalidate()}ondragend(t){this._state_dragging=!1,this.currentModeler.ondragend(t),this.invalidate()}ondrop(t,e){var{origin:r}=e,n=t.dataTransfer.files;if(n.length<1)return;let i=this.rootModel.transcoordC2S(t.offsetX,t.offsetY),a=this.rootModel;Promise.all(Array.from(n).map((t=>new Promise(((e,r)=>{let n=new FileReader;n.addEventListener("loadend",(t=>{e(n.result)})),["error","abort"].forEach((t=>n.addEventListener(t,(t=>{r(t)})))),n.readAsDataURL(t)}))))).then((e=>{if(t.altKey)return Vet.around(this.app.commander,(()=>{r.ondropfile(n,e)})),void(this.selected=[r]);let o=[],s=e.map(((t,e)=>{let r,s=n[e].type,c=n[e].name;return s.startsWith("image/")?(r=lrt({type:s.startsWith("image/gif")?"gif-view":"image-view",top:0,left:0,width:200,height:200,src:t},a.app),o.push(new Promise(((e,n)=>{let i=new Image;i.src=t,i.onload=()=>{r.set({width:i.width,height:i.height}),e()},i.onerror=t=>{n(t)}})))):s.startsWith("audio/")?r=lrt({type:"audio",top:0,left:0,width:100,height:100,src:t},a.app):s.startsWith("vnd.ms-excel/")||/\.xlsx?$/.test(c)?r=lrt({type:"excel",top:0,left:0,width:100,height:100,src:t},a.app):console.log("droped file",n[e]),r&&(r.center=i,i.x+=50,i.y+=50),r})).filter(Boolean).map((t=>({component:t,to_container:a})));s.length>0&&Promise.all(o).then((()=>{this.app.commander.execute(new srt({changes:s})),this.selected=s.map((t=>t.component))}),(t=>{console.error(t)}))}),(t=>{console.error(t)}))}onwheel_scale(t,e){if(0!=t.deltaY||0!=t.deltaX){var r=e.deliverer;if(t.shiftKey){if(-1!=navigator.userAgent.indexOf("Win"))var n=t.deltaY<0?1:-1;else n=t.deltaX<0?1:-1;Vet.around(this.app.commander,(()=>{r.selected.forEach((t=>{let e=t.get("fontSize")||R9.FONT_SIZE;e<1&&(e=1),e+=n,t.set("fontSize",e)}))}))}else{n=t.deltaY<0?1:-1;let e=r.get("scale")||{x:1,y:1},i=r.get("translate"),a=t.offsetX,o=t.offsetY,s=r.transcoordC2S(a,o),c=.1*n,u={x:e.x+c,y:e.y+c};if(n<0&&e.x<.2||n>0&&e.x>10)return;r.set("scale",u);let l=r.transcoordC2S(a,o);r.set("translate",{x:i.x+(l.x-s.x)*u.x,y:i.y+(l.y-s.y)*u.y})}}}});class ynt extends yet{constructor(t,e){super(t,e),this._anim_alpha=1}animOnTargetChange(t){t!==this._lastTargets&&(this._lastTargets=t,this._anim_alpha=1,this.animate({step:t=>{this._anim_alpha=1-t*t,this.invalidate()},duration:5e3,delta:"linear",options:{x:1},ease:"out"}).start())}render(t){var e=this.targets&&this.targets.filter((t=>t.rootModel));if(!e||0==e.length)return this._animate&&this._animate.stop(),void delete this._animate;t.globalAlpha*=this._anim_alpha;var r=!1;e.forEach((e=>{(function(t,e){const r=t.decorators;var n=!1;return r.map((t=>"string"==typeof t?Rtt[t]:t)).filter((t=>t&&"function"==typeof t)).map((r=>{const i=r(t,e);n||=i})),n})(e,t)&&(r=!0)})),r&&this.animOnTargetChange(this.targets)}get targets(){return this._targets}set targets(t){this._targets=t&&t.filter((t=>!t.isLayer())),this.invalidate()}onmouseenter(t,e){this._decotagreset(),this._ondecotag(e.origin)}onmouseleave(t,e){this._decotagreset()}get eventMap(){return{"model-layer":{"(descendant)":{tag:this.ondecotag,tagreset:this.ondecotagreset,mouseenter:this.onmouseenter,mouseleave:this.onmouseleave}}}}ondecotagreset(t){this._decotagreset()}ondecotag(t){this._ondecotag(t.origin)}offdecotag(t,e){this._offdecotag(e.origin)}_ondecotag(t){this.targets&&-1!==this.targets.lastIndexOf(t)||(this.targets=(this.targets||[]).concat(t))}_offdecotag(t){if(this.targets){var e=this.targets.slice();e.splice(this.targets.lastIndexOf(t),1),this.targets=e}}_decotagreset(){this.targets=[]}}function bnt(){var t=arguments,e=t[t.length-1],r=this.event_pump;r.listeners.forEach((n=>{!function(t,e,r,n,i){for(let a in r){let o=r[a];if(F9(a,n.origin,0,t))for(let t in o){let r=o[t];t==n.name&&(n.listener=e,r.apply(e,i))}}}(r.deliverer,n.listener,n.cloned_handlers,e,t)}))}Btt.register("decotag-layer",ynt),Btt.register("tag-layer",ynt);class xnt{constructor(t){if(void 0===t.on)throw new Error("Deliverer should be a event handlable object.");this.deliverer=t,this.listeners=[]}start(){this.deliverer.on("(all)",bnt,{event_pump:this})}stop(){this.deliverer.off("(all)",bnt)}on(t,e){var r=Object.assign({},e);Object.keys(r).forEach((e=>{if(0==e.indexOf("?")){let n=r[e],i=e.substr(1),a=t.get(i);delete r[e],a?r[a]=n:b9("EventPump#on","variable #{selector} is not evaluated on listener")}})),this.listeners.push({listener:t,handlers:e,cloned_handlers:r})}off(t,e){for(let r=0;r<this.listeners.length;r++){let n=this.listeners[r];n.listener!==t||e&&n.handlers!==e||this.listeners.splice(r,1)}}clear(){this.listeners=[]}dispose(){this.stop(),this.clear()}}class wnt{constructor(t){this.eventMaps=[],this.root=t,t.eventMap&&this.add(t,t.eventMap)}set root(t){this._root=t}get root(){return this._root}stop(){this.eventMaps.forEach((t=>t.eventPump.stop()))}add(t,e){if(this.root)for(let r in e){let n=e[r];if("(self)"===r&&void 0===t.on)throw new Error("(self) selector not available when deliverer is not a event handlable object.");U9(r,this.root,t).forEach((r=>{var i=new xnt(r);i.on(t,n),i.start(),this.eventMaps.push({eventPump:i,listener:t,handlerMap:e,deliverer:r})}))}}remove(t,e){var r=this.eventMaps.slice(0);for(let n=0;n<r.length;n++){let i=r[n];i.listener!==t||e&&i.handlerMap!==e||(this.eventMaps.splice(n,1),i.eventPump.dispose())}}clear(){this.eventMaps.slice(0).forEach((t=>t.eventPump.dispose())),this.eventMaps=[]}dispose(){this.stop(),this.clear()}}const Ant=0,_nt=1,knt=2,Ent=0,Snt=1,Mnt=2;var Tnt={},Pnt=0;class Ont{constructor(t,e){this._type=e||t.type,this._ctrlKey=t.ctrlKey,this._altKey=t.altKey,this._shiftKey=t.shiftKey,this._metaKey=t.metaKey;var r=function(t){if(t.touches){let e=t.touches[0];if(!e)return Tnt;let r=e.target.getBoundingClientRect();return Tnt={x:t.offsetX||e.clientX-(r.x||r.left),y:t.offsetY||e.clientY-(r.y||r.top)}}return{x:t.offsetX,y:t.offsetY}}(t);if(this._offsetX=r.x,this._offsetY=r.y,"wheel"==t.type)this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ;else if("drop"==t.type)this.dataTransfer=t.dataTransfer;else if(t.type.match(/^touch/)&&(this._scale=t.scale,this._touches=t.touches,this._changedTouches=t.changedTouches,null==this._scale)){var n=function(t){var e,r,n=0,i=0,a=0;if(1===t.touches.length)return a;Array.from(t.touches).forEach((t=>{e=null!=e?Math.min(t.screenX,e):t.screenX,n=Math.max(t.screenX,n),r=null!=r?Math.min(t.screenY,r):t.screenY,i=Math.max(t.screenY,i)}));var o=n-e||0,s=i-r||0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))||0}(t);Pnt>0&&(this._scale=n/Pnt),Pnt=n}}get type(){return this._type}set type(t){this._type=t}get offsetX(){return this._offsetX}get offsetY(){return this._offsetY}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get shiftKey(){return this._shiftKey}get metaKey(){return this._metaKey}get touches(){return this._touches}get changedTouches(){return this._changedTouches}get scale(){return this._scale}stopPropagation(){this._stop_=!0}isPropagationStopped(){return this._stop_}}function Int(t,e){return t.capture(e.offsetX,e.offsetY)}function Rnt(t,e,r){if(t&&t.app&&(!t.app.isViewMode||!t.hidden)){r instanceof Ont&&e===r.type||(r=new Ont(r,e));var n="on"+e;t[n]&&t[n](r),r.isPropagationStopped()||t.trigger(e,r)}}class Cnt{constructor(t,e){this.container=t,this.html_element=e,this.status=Ant,this.last_target=null,this.gesture_handlers=O9.map((t=>this.gestureHandlerBuilder(t))),this.keyevent_handlers=I9.map((t=>this.keyeventHandlerBuilder(t))),O9.forEach(((t,r)=>e.addEventListener(t,this.gesture_handlers[r]))),I9.forEach(((t,r)=>e.addEventListener(t,this.keyevent_handlers[r]))),e.ondragover=this.gestureHandlerBuilder("dragover"),e.ondrop=this.gestureHandlerBuilder("drop"),e.tabIndex=1}dispose(){this.last_enter_target&&Rnt(this.last_enter_target,"mouseleave",new CustomEvent("mouseleave")),O9.forEach(((t,e)=>this.html_element.removeEventListener(t,this.gesture_handlers[e]))),I9.forEach(((t,e)=>this.html_element.removeEventListener(t,this.keyevent_handlers[e]))),delete this.gesture_handlers,delete this.keyevent_handlers,delete this.last_target}gestureHandlerBuilder(t){var e=this[`on${t}`].bind(this);return t=>(e(new Ont(t))&&t.preventDefault(),!1)}keyeventHandlerBuilder(t){return this[`on${t}`].bind(this)}ondragover(t){return Rnt(Int(this.container,t),t.type,t),!1}ondrop(t){return Rnt(Int(this.container,t),t.type,t),!1}ondblclick(t){return Rnt(Int(this.container,t),t.type,t),this.last_target=null,!1}onkeydown(t){return this.container.trigger(t.type,t),!1}onkeyup(t){return this.container.trigger(t.type,t),!1}onmousemove(t){switch(this.status){case _nt:let r=t.offsetX-this.__dragstart_e.offsetX,n=t.offsetY-this.__dragstart_e.offsetY;if(r*r+n*n<16)break;this.status=knt,Rnt(this.last_target,"dragstart",this.__dragstart_e),this.__dragmove_e=t,Rnt(this.last_target,"dragmove",t);break;case knt:this.__dragmove_e=t,Rnt(this.last_target,"dragmove",t);break;default:var e=Int(this.container,t);this.last_enter_target!==e&&(this.last_enter_target&&Rnt(this.last_enter_target,"mouseleave",t),e&&Rnt(e,"mouseenter",t),this.last_enter_target=e),Rnt(e,t.type,t),this.last_target=e}return!1}onmousedown(t){if(this.status===knt)Rnt(this.last_target,"dragend",t),this.last_target=null,this.status=Ant;else{var e=Int(this.container,t);this.last_target=e,this.status=_nt,this.__dragstart_e=t,Rnt(e,t.type,t)}return!1}onmouseup(t){if(this.status===knt)Rnt(this.last_target,"dragend",t);else{var e=Int(this.container,t);Rnt(e,t.type,t),this.last_target===e&&Rnt(e,"click",t)}return this.last_target=null,this.status=Ant,!1}onmouseout(t){var e=Int(this.container,t);if(this.status===knt)Rnt(this.last_target,"dragend",t);else{if(this.last_target&&this.last_target===e)return;this.last_enter_target&&(Rnt(this.last_enter_target,"mouseleave",t),delete this.last_enter_target)}return this.last_target=null,this.status=Ant,!1}ontouchstart(t){var e=Int(this.container,t);return this.last_target=e,this.status=Snt,this.touchPoints||(this.touchPoints=[]),this.touchPoints.push(t.changedTouches[0]),this.holdTimer=setTimeout((()=>{this.status=Ent,Rnt(this.last_target,"hold",t),delete this.holdTimer}),500),Rnt(e,t.type,t),!1}ontouchmove(t){if(!t.touches||!t.changedTouches)return Rnt(this.last_target,"dragstart",t),Rnt(this.last_target,"dragmove",t),!1;var e=Int(this.container,t);switch(this.status){case Snt:Array.from(t.changedTouches).forEach((t=>{var e=this.touchPoints.find((e=>e.identifier===t.identifier));if(e){var r=e.clientX-t.clientX,n=e.clientY-t.clientY;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2))>=16?(this.status=Mnt,void(this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer))):void 0}}));break;case Mnt:if(this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer),2===t.changedTouches.length&&null!=t.scale&&1!==t.scale&&(t.scale<.9||t.scale>1.1))return Rnt(this.last_target,"pinch",t),!1;Rnt(this.last_target,"pan",t),e=this.last_target;break;default:this.last_enter_target!==e&&(this.last_enter_target&&Rnt(this.last_enter_target,"mouseleave",t),e&&Rnt(e,"mouseenter",t),this.last_enter_target=e),this.last_target=e}return Rnt(e,"touchmove",t),!1}ontouchend(t){var e=Int(this.container,t);switch(this.status){case Mnt:e=this.last_target;break;case Snt:var r=performance.now(),n=r-this.touchedAt;this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer,Rnt(e,n<500?"doubletap":"tap",t),this.touchedAt=r)}Rnt(e,"touchend",t);var i=this.touchPoints.findIndex((e=>e.identifier===t.changedTouches[0].identifier));return this.touchPoints.splice(i,1),this.last_target=null,this.status=Ent,!1}onwheel(t){return Rnt(Int(this.container,t),t.type,t),!1}}var jnt={};var Dnt={register:function(t,e){jnt[t]=e},unregister:function(t){delete jnt[t]},get:function(t){return jnt[t]}};function Lnt(t){if(!t.hasTextProperty||t.textHidden)return;var{text:e="",bold:r=R9.BOLD,italic:n=R9.ITALIC,textWrap:i=R9.TEXT_WRAP,fontFamily:a=R9.FONT_FAMILY,fontColor:o=R9.FONT_COLOR,textAlign:s=R9.TEXT_ALIGN,textBaseline:c=R9.TEXT_BASELINE,fontSize:u=R9.FONT_SIZE,lineHeight:l=1.2*u}=t.model,{left:h,top:f,width:d,height:p}=t.textBounds;u||=R9.FONT_SIZE,l||=1.2*u,t.textHidden=!0;var g=document.createElement("textarea");O9.forEach((function(t){g.addEventListener(t,(function(t){t.stopPropagation()}),!0)}));const v=t.transcoordS2C(h,f),{rotation:m,scale:y}=function(t){for(var e=0,r=1,n=t;n;){e+=n.get("rotation")||0;let{x:t,y:i}=n.get("scale")||{x:1,y:1};r*=Math.max(t,i)||1,n=n.parent}return{rotation:e,scale:r}}(t);switch(g.style.position="absolute",g.style.width=d+"px",g.style.height=p+"px",g.value=e,g.style.fontFamily=a,g.style.fontSize=u+"px",g.style.lineHeight=l+"px",g.style.overflow="hidden",g.style.resize="none",g.style.outline="none",g.style.border=0,g.style.backgroundColor="transparent",g.style.display="inline-block",g.style.color=o,r&&(g.style.fontWeight="bold"),n&&(g.style.fontStyle="italic"),s){case"right":case"end":g.style.textAlign="right";break;case"justify":g.style.textAlign="justify";break;case"left":case"start":g.style.textAlign="left";break;default:g.style.textAlign="center"}var b=[r,n,u+"px",a].filter(Boolean).join(" ");function x(e){var r={left:0,top:0},n=l*function(t,e,r,n){var i,a=t.getContext();return a.save(),a.font=r,i=utt(a,e,n,t.get("textWrap")).length,a.restore(),i}(t,e,b,d);switch(g.style.height=n+"px",c){case"top":case"hanging":break;case"bottom":case"alphabetic":r.top=p-n;break;default:r.top=p/2-n/2}if(!i){var a=function(t,e,r,n){var i=e.split("\n"),a=n;let o=t.getContext();return o.save(),o.font=r,i.forEach((t=>{let e=o.measureText(t).width;e>a&&(a=e)})),o.restore(),a}(t,e,b,d);switch(g.style.width=a+"px",s){case"right":case"end":r.left=d-a;break;case"left":case"start":break;default:r.left=(d-a)/2}}g.style.marginLeft=r.left+"px",g.style.marginTop=r.top+"px";var o=`translate(${v.x}px, ${v.y}px) scale(${y}) rotate(${m}rad)`;["-webkit-","-moz-","-ms-","-o-",""].forEach((t=>{g.style[t+"transform"]=o,g.style[t+"transform-origin"]=`${-r.left}px ${-r.top}px`}))}x(e);var w=t.root.target_element;w.appendChild(g),g.select();var A,_=!1;g.addEventListener("keydown",(function(t){t.stopPropagation(),"Escape"!=t.code&&(t.shiftKey||"Enter"!=t.code&&"NumpadEnter"!=t.code)?setTimeout((()=>{x(g.value)})):(_=A.skipUpdate="Escape"==t.code,document.createEvent?g.dispatchEvent(A):g.fireEvent(A.eventType,A))})),document.createEvent?(A=document.createEvent("HTMLEvents")).initEvent("blur",!0,!1):(A=document.createEventObject()).eventType="blur";var k=t.root.selected,E=function(r){t.root.selected=k,t.textHidden=!1,g.removeEventListener("blur",E,!1),g.parentElement&&g.parentElement.removeChild(g),w.focus(),r.skipUpdate||_||t.app.commander.execute(new Vet({changes:[{component:t,before:{text:e},after:{text:g.value}}]}))};g.addEventListener("blur",E,!1)}Dnt.register("text-editor",{"(root)":{"(self)":{keydown:function(t,e){var{origin:r,deliverer:n}=e,i=n.selected;return!(1!==i.length||!i[0].hasTextProperty)&&(("Enter"==t.code||"NumpadEnter"==t.code)&&(Lnt(i[0]),t.preventDefault(),!0))}}},"model-layer":{"(descendant)":{dblclick:function(t,e){Lnt(e.origin)}}}});const znt=0,Fnt=2,Bnt=3,Nnt=4;var Unt=I7((function(t,e,r){if(r)t.focused=null;else{var n=[];e[0].parent.isGroup()?t.focused=e[0].parent:(e.forEach((t=>{t.path.forEach((e=>{n.push(t.transcoordS2T(e.x,e.y))}))})),t.focused=t.capturePath(n,e))}}),300);Dnt.register("move-handler",{"model-layer":{"(descendant)":{dragstart:function(t,e){var{origin:r,deliverer:n}=e;if(!r.stuck){var i=n.selected,a=n.selected.filter((t=>!t.stuck));if(i.length!==a.length&&(i=n.selected=a),0!=i.length){var o=i[0].transcoordC2S(t.offsetX,t.offsetY);if(o=i[0].transcoordS2P(o.x,o.y),this.last_pos=o,this.direction=znt,n.focused=i[0].parent,t.altKey){var s=[],c=new Map;n.selected=n.selected.filter((t=>!t.isRootModel())).map((t=>{let e=hrt(t,(t=>{const e=n.root.getNewRefid();return void 0!==t&&c.set(t,e),e}));return s.push({component:e,to_container:t.parent}),e})).map((t=>(t.replaceRefids(c),t))),s.forEach((({component:t,to_container:e})=>{e.addComponent(t)})),this.duplicates=n.selected.map((t=>({component:t})))}else this.changes=Vet.before(i)}}},dragmove:function(t,e){var{origin:r,deliverer:n}=e;if(!r.stuck){var i=n.selected;if(0!=i.length){var{x:a,y:o}=i[0].transcoordC2S(t.offsetX,t.offsetY),s=i[0].transcoordS2P(a,o);t.shiftKey?this.direction==Fnt&&(this.direction=znt):this.direction=Fnt;var c=s.x-this.last_pos.x,u=s.y-this.last_pos.y;if(this.direction==znt){if(c*c+u*u<25)return;Math.abs(c)>Math.abs(u)?this.direction=Bnt:this.direction=Nnt}this.direction==Bnt?u=0:this.direction==Nnt&&(c=0),i.forEach((t=>{t.move({x:c,y:u},1===i.length)})),this.last_pos=s,Unt(n,i)}}},dragend:function(t,e){var{origin:r,deliverer:n}=e;if(!r.stuck){var i=n.selected;if(0!=i.length){var a=i[0].parent,o=n.focused||e.deliverer;if(this.changes&&!o.isGroup())if(o&&o!==a){var s=this.changes.map((t=>{let{component:e,before:r}=t;return{component:e,to_container:o}}));n.app.commander.execute(new srt({changes:s}))}else Vet.after(this.changes,n.app.commander);else if(this.duplicates){this.duplicates=this.duplicates.map((t=>(t.to_container=o,t)));let t=new srt({changes:this.duplicates});n.app.commander.execute(t)}i.forEach((t=>{t.parent&&t.parent.calculateBounds&&t.parent.calculateBounds()})),this.last_pos=null,this.changes=null,this.duplicates=null,Unt(n,i,!0)}}}}},"(root)":{"(self)":{keydown:function(t,e){var{origin:r,deliverer:n}=e,i={},a=t.shiftKey?r.rootModel.MPP:1;switch(t.which){case 37:i.x=-a,i.y=0;break;case 38:i.x=0,i.y=-a;break;case 39:i.x=a,i.y=0;break;case 40:i.x=0,i.y=a;break;default:return}var o=n.selected;Vet.around(n.app.commander,(function(){o.forEach((t=>{!t.stuck&&t.move(i,!1)}))}))}}}});var Ynt=[];"undefined"!=typeof window&&window.addEventListener("resize",(()=>{Ynt.forEach((t=>{t.resize()}))}));class Gnt extends met{constructor(t,e){super(Object.assign({type:"root",scale:{x:1,y:1}},t||{}),e),this._maxRefid=0,t=t||{},this.fitMode=t.model&&t.model.fitMode,this._app=e,this.target_element=t.target_element,this.rebuildContentModel(this.model.model),Ynt.push(this)}dispose(){iet.hideAll(this),this._app&&this._app.dispose(),super.dispose(),this._disposeAllResources(),this.target_element=null,delete this._refresh_mapping_debouncer;var t=Ynt.indexOf(this);t>=0&&Ynt.splice(t,1),this.refidIndexMap.clear(),this._maxRefid=0}isRoot(){return!0}get app(){return this._app}get target_element(){return this._target_element}set target_element(t){this._ua_event_handler&&(this._ua_event_handler.dispose(),delete this._ua_event_handler),t&&(t.style.position="absolute",t.style.cursor="default",t.style.overflow="hidden",this._ua_event_handler=new Cnt(this,t)),this.forEach((e=>e.target=t)),this._target_element=t}get unitScale(){switch(this.model_layer&&this.model_layer.get("unit")){case"mm":case"cm":case"in":return this.app.PPM/10;default:return 1}}addTemplate(t,e){var r=this.templateMap[t];r&&y9("Template replaced (duplicated)",t,e,r),this.templateMap[t]=e,delete this.templatePrefixes}removeTemplate(t,e){var r=this.templateMap[t];r!==e?b9("Removing template failed (different)",t,e,r):delete this.templateMap[t],delete this.templatePrefixes}findTemplateFor(t){this.templatePrefixes||(this.templatePrefixes=Object.keys(this.templateMap).sort().reverse());var e=this.templatePrefixes.find((e=>t.startsWith(e)));if(e)return this.templateMap[e]}addIndex(t,e){var r=this.indexMap[t];r&&y9("Index replaced (duplicated)",t,e,r),this.indexMap[t]=e}removeIndex(t,e){var r=this.indexMap[t];r!==e?b9("Removing index failed (different)",t,e,r):delete this.indexMap[t]}addRefidIndex(t,e){void 0===t&&(t=this.getNewRefid(),e.set("refid",t)),this._maxRefid=Math.max(t,this._maxRefid);var r=this.refidIndexMap.get(t);r&&y9("Refid Index replaced (has not to be)",t,e,r),this.refidIndexMap.set(t,e)}removeRefidIndex(t,e){if(null!=t){var r=this.refidIndexMap.get(t);r!==e?y9("Refid Removing index failed (has not to be)",t,e,r):this.refidIndexMap.delete(t)}}getNewRefid(){return this._maxRefid=(this._maxRefid||0)+1,this._maxRefid}async subscribe(t,e){this._app.isViewMode&&t&&this._app&&(e._subscription=await this._app.subscribe(t,e))}async unsubscribe(t,e){e._subscription&&(await e._subscription.unsubscribe(),delete e._subscription)}findById(t){return this.indexMap[t.replace(/^#/,"")]}findByRefid(t){return this.refidIndexMap.get(t)}findOrCreate(t){var e=this.indexMap[t];if(!e){let r=this.findTemplateFor(t);if(r){e=lrt(Object.assign(l7(r.hierarchy),{id:t,templatePrefix:""}),this.app),this.model_layer.addComponent(e)}}return e}resize(){this.components.forEach((t=>{t.resize&&t.resize()})),this.invalidate()}_disposeAllResources(){this.selected=[],this._focused=null,this._ready=!1,this.eventEngine&&(this.assist_handlers&&this.assist_handlers.forEach((t=>{this.eventEngine.remove(t)})),this.eventEngine.dispose(),delete this.eventEngine),this.assist_layers&&this.assist_layers.forEach((t=>{t.dispose(),this.removeComponent(t)})),delete this.assist_layers,this.model_layer&&this.model_layer.dispose(),this.model_layer&&this.removeComponent(this.model_layer),delete this.model_layer,this.indexMap={},this.refidIndexMap=new Map,this.templateMap={}}rebuildContentModel(t){this._disposeAllResources(),this.eventEngine=new wnt(this),(t=t||{}).type="model-layer",this.model_layer=lrt(t,this.app),this.addComponent(this.model_layer),this.model_layer.target=this.target_element,this.assist_layers=(this.model.layers||[]).map((t=>{var e=lrt(t,this.app);return this.addComponent(e),e.target=this.target_element,e})),this.assist_handlers=(this.model.handlers||[]).map((t=>{var e={};return this.eventEngine.add(e,Dnt.get(t)),e})),this._ready=!0,this.traverse((t=>t.ready()))}get root(){return this}get anchors(){}get isReady(){return this._ready}get rootModel(){return this.model_layer}get stuck(){return!0}get data(){return Object.values(this.indexMap).reduce(((t,e)=>(t[e.model.id]=e.data,t)),{})}set data(t){for(var e in t){var r=this.findOrCreate(e);r&&(r.data=t[e])}}get dataByRefid(){var t={};for(let[e,r]of this.refidIndexMap.entries())t[e]=r.data;return t}set dataByRefid(t){for(var e in t){var r=this.findByRefid(Number(e));r&&(r.data=t[e])}}get values(){return Object.values(this.indexMap).reduce(((t,e)=>(t[e.model.id]=e.value,t)),{})}set values(t){for(var e in t){var r=this.findOrCreate(e);r&&(r.value=t[e])}}get valuesByRefid(){var t={};for(let[e,r]of this.refidIndexMap.entries())t[e]=r.value;return t}set valuesByRefid(t){for(var e in t){var r=this.findByRefid(Number(e));r&&(r.value=t[e])}}get selected(){return(this._selected||[]).filter((t=>t.parent))}set selected(t){var e=this._selected;this._selected=t,this.trigger("selected",t,e)}get focused(){return this._focused}set focused(t){this._focused!==t&&(this._focused=t,this.invalidate())}get style(){return this._style}set style(t){this._style=t,this._compiled_style=t}get hasTextProperty(){return!1}render(){this.components.forEach((t=>t.draw()))}contains(t,e){return!0}capturePath(t,e){return this.model_layer.capturePath(t,e)}invalidate(){this.components.forEach((t=>t.invalidate()))}get eventMap(){return{"(root)":{"(descendant)":{added:this.onadded,removed:this.onremoved,change:this.onchanged}}}}refreshMappings(){if(!this._refresh_mapping_debouncer){if(this.disposed)return;this._refresh_mapping_debouncer=I7((function t(e){e.executeMappings(),e.components&&e.components.forEach((e=>t(e)))}),1e3)}this._refresh_mapping_debouncer(this.model_layer)}_addTraverse(t){t.components&&t.components.forEach((t=>this._addTraverse(t)));var{id:e,refid:r,tag:n,templatePrefix:i}=t.model;this.addRefidIndex(r,t),e&&this.addIndex(e,t),n&&this.subscribe(n,t),i&&this.addTemplate(i,t);var a=a9({},t.eventMap,t.model.eventMap);this.eventEngine.add(t,a)}_removeTraverse(t){t.components&&t.components.forEach((t=>this._removeTraverse(t)));var{id:e,refid:r,tag:n,templatePrefix:i}=t.model;this.removeRefidIndex(r,t),e&&this.removeIndex(e,t),n&&this.unsubscribe(n,t),i&&this.removeTemplate(i,t),this.eventEngine.remove(t)}onadded(t,e){this._addTraverse(e),this.refreshMappings(),this.invalidate()}onremoved(t,e){this._removeTraverse(e),this.invalidate()}onchanged(t,e,r){e.templatePrefix&&this.removeTemplate(e.templatePrefix,r.origin),t.templatePrefix&&this.addTemplate(t.templatePrefix,r.origin),e.id&&this.removeIndex(e.id,r.origin),t.id&&this.addIndex(t.id,r.origin),e.tag&&this.unsubscribe(e.tag,r.origin),t.tag&&this.subscribe(t.tag,r.origin),e.id==t.id&&e.class==t.class||this.refreshMappings()}}Object.assign(Gnt.prototype,{fit:function(t){var{width:e,height:r,fitMode:n}=this.model_layer.model,i=this.target_element,a=this.model_layer;if(this.fitMode=t||this.fitMode||n||"ratio",e&&r&&i&&i.clientWidth&&i.clientHeight){switch(this.fitMode){case"center":!function(t,e,r){var n=t.unitScale,{width:i,height:a}=e.model;e.set("scale",{x:n,y:n}),e.set("translate",{x:Math.max((r.clientWidth-i*n)/2,0),y:Math.max((r.clientHeight-a*n)/2,0)})}(this,a,i);break;case"both":!function(t,e,r){var{width:n,height:i}=e.model,a=r.clientWidth,o=r.clientHeight;e.set("scale",{x:a/n,y:o/i}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"width":!function(t,e,r){var n=r.clientWidth/e.get("width");e.set("scale",{x:n,y:n}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"height":!function(t,e,r){var n=r.clientHeight/e.get("height");e.set("scale",{x:n,y:n}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"ratio":!function(t,e,r){var{width:n,height:i}=e.model,a=r.clientWidth,o=r.clientHeight,s=a/n,c=o/i,u=Math.min(s,c);e.set("scale",{x:u,y:u}),e.set("translate",{x:(a-n*u)/2,y:(o-i*u)/2})}(0,a,i);break;default:!function(t,e,r){var n=t.unitScale;e.set("scale",{x:n,y:n}),e.set("translate",{x:0,y:0})}(this,a)}this.resize()}}}),Btt.memoize(Gnt.prototype,"unitScale",!1);var Hnt=13.3,Wnt=function(t){return void 0!==t&&(Hnt=t),Hnt};const qnt="$base_url";const Xnt=Math.PI/12;class Vnt{constructor(t,e){this._mode=t,this.screen=Wnt(),this._baseUrl="undefined"!=typeof window?window.location.origin:null,this._refProvider=e,this.isEditMode&&(this._rotateStep=Xnt,this._rotateStepForced=!1)}dispose(){this._dataSubscriptionProvider&&this._dataSubscriptionProvider.dispose(),delete this._dataStorage}_calcScreen(){var t={width:screen.width,height:screen.height};this._PPI=function(t,e,r,n){t>0||(t=1),e>0||(e=1),n||(n="d");var i=("d"==n?Math.sqrt(t*t+e*e):"w"==n?t:e)/r;return i>0?Math.round(i):0}(t.width,t.height,this.screen),this._PPM=this._PPI/25.4}subscribe(t,e){return this._dataSubscriptionProvider?.subscribe(t,e)}get refProvider(){return this._refProvider}set dataSubscriptionProvider(t){this._dataSubscriptionProvider=t}get dataSubscriptionProvider(){return this._dataSubscriptionProvider}set commander(t){this._commander=t}get commander(){return this._commander}get screen(){return this._screen}set screen(t){this._screen=t,this._calcScreen()}get DPPX(){return P9}get PPI(){return this._PPI}get PPM(){return this._PPM}get mode(){return this._mode}set mode(t){var e=this._mode;e!==t&&(this._mode=t,this.trigger("mode",t,e))}get isViewMode(){return this._mode==_9}get isEditMode(){return 1==this._mode}get baseUrl(){return this._baseUrl}set baseUrl(t){t&&this._baseUrl!=t&&(this._baseUrl=t)}url(t){try{return(t.includes(qnt)?new URL(t.replace(qnt,this.baseUrl),this.baseUrl):new URL(t,location.origin)).href}catch(e){b9(e,t)}}get rotateStep(){return this._rotateStep}set rotateStep(t){this._rotateStep=Number(t)||Xnt}get rotateStepForced(){return this._rotateStepForced}set rotateStepForced(t){this._rotateStepForced=!!t}get dataStorage(){return this._dataStorage}set dataStorage(t){this._dataStorage=t}}m9(Vnt.prototype,f9.withEvent);class Qnt{constructor(t,e){!(t=Number(t))||t<=0?(y9("TimeCapsule maxsize should be greater than 0.",t),this.maxsize=10):this.maxsize=t,this.reset(),e&&this.snapshot(e)}dispose(){this.reset()}snapshot(t){this.q.splice(this.pos+1,this.q.length-(this.pos+1),t),this.q.length>this.maxsize&&this.q.splice(0,this.q.length-this.maxsize),this.pos=this.q.length-1}forward(){if(this.snapshot_taker&&this.snapshot_taker.take(),this.forwardable)return this.q[++this.pos];b9("Not forwardable.")}backward(){if(this.snapshot_taker&&this.snapshot_taker.take(),this.backwardable)return this.q[--this.pos];b9("Not backwardable.")}get current(){if(-1!==this.pos)return this.q[this.pos];b9("Non state has been recorded.")}get length(){return this.q.length}get forwardable(){return this.pos<this.q.length-1}get backwardable(){return this.pos>0}get snapshot_taker(){return this._snapshot_taker}set snapshot_taker(t){this._snapshot_taker=t}reset(){this.q=[],this.pos=-1}}var Knt=I7((t=>{t.brake||t.take()}),1e3,{leading:!0,trailing:!1});function Jnt(t){!t.brake&&t.dirty&&Knt(t)}class Znt{constructor(t,e){this.brake=!1,this.dirty=!1,this.state_holder=t,this.timecapsule=e,this.timecapsule.snapshot_taker=this}dispose(){delete this.state_holder,delete this.timecapsule}touch(){this.dirty=!0,Jnt(this)}take(t){(this.dirty||t)&&(this.timecapsule.snapshot(this.state_holder.state),this.dirty=!1)}get brake(){return this._brake}set brake(t){this._brake=!!t,Jnt(this)}}function $nt(t,e){var r=e.model_layer.get("scale"),n=e.model_layer.get("translate");if(t){let i=JSON.parse(t);i.scale=r,i.translate=n,e.rebuildContentModel(i)}}class tit{constructor(t){this.container=t,this.timecapsule=new Qnt(20);var e=this;this.snapshot_taker=new Znt({get state(){let t=e.container.model_layer.hierarchy;return JSON.stringify(t)}},this.timecapsule),this.snapshot_taker.take(!0)}dispose(){this.reset(),this.timecapsule&&this.timecapsule.dispose(),this.snapshot_taker&&this.snapshot_taker.dispose(),delete this.container,delete this.timecapsule,delete this.snapshot_taker}execute(t,e){!1!==e&&t&&t.execute(),this.snapshot_taker.touch(),this.trigger("execute",t,!0,!1)}undo(){this.timecapsule.backwardable&&($nt(this.timecapsule.backward(),this.container),this.trigger("undo",this.undoable(),this.redoable()))}redo(){this.timecapsule.forwardable&&($nt(this.timecapsule.forward(),this.container),this.trigger("redo",this.undoable(),this.redoable()))}undoable(){return this.timecapsule.backwardable}redoable(){return this.timecapsule.forwardable}reset(){this.timecapsule&&this.timecapsule.reset(),this.trigger("command-reset")}}m9(tit.prototype,f9.withEvent);var eit=new WeakSet;class rit{static get residents(){return eit}constructor(t){this._container=t,this.app=t.app,this._commander=new tit(this._container),this.app.commander=this._commander,eit.add(this)}add(){return drt.apply(this._container,arguments)}duplicate(){return grt.apply(this._container,arguments)}remove(){return vrt.apply(this._container,arguments)}animate(){return t6.apply(this,arguments)}fullscreen(){return xrt.apply(this._container,arguments)}get target(){return this._container.target_element}set target(t){var e;if("string"==typeof t){if(!(e=document.getElementById(t)))throw`target element '${t}' is not exist`;if(e.firstChild)throw`target element '${t}' already has children`}else e=t;e&&e.style&&(e.style.cursor="default"),this._container.target_element=e,this._container.invalidate()}get scale(){return this.root.get("scale")}set scale(t){this.root.set("scale",t)}get translate(){return this.root.get("translate")}set translate(t){this.root.set("translate",t)}get unit(){return this.root.get("unit")||"px"}get PPM(){return this.app.PPM}get PPI(){return this.app.PPI}get DPPX(){return this.app.DPPX}get unitScale(){return this._container.unitScale}get screen(){return this.app.screen}set screen(t){this.app.screen=t,this._container.resize()}resize(){this._container.resize()}dispose(){this._commander&&this._commander.dispose(),this._container&&this._container.dispose()}get selected(){return this._container.selected.slice()}set selected(t){this._container.selected=t}select(t,...e){return this._container.selected=this.root?.findAll(t,...e),this.selected}get commander(){return this._commander}undo(){this.commander.undo()}redo(){this.commander.redo()}cut(){return _rt.apply(this._container,arguments)}copy(){return Art.apply(this._container,arguments)}paste(){return krt.apply(this._container,arguments)}undoableChange(){return Grt.apply(this._container,arguments)}change(){return Yrt.apply(this.root,arguments)}get model(){return this.root.hierarchy}set model(t){this._container.rebuildContentModel(t)}get root(){return this._container?.model_layer}findAll(){return this.root.findAll.apply(this.root,arguments)}findFirst(){return this.root.findFirst.apply(this.root,arguments)}findById(){return this._container.findById.apply(this._container,arguments)}serialize(){return this.root.trim(),this.root.serialize.apply(this.root,arguments)}align(){return rrt.apply(this._container,arguments)}distribute(){return art.apply(this._container,arguments)}move(){return crt.apply(this._container,arguments)}zorder(){return urt.apply(this._container,arguments)}symmetryX(){return Nrt.apply(this._container,arguments)}symmetryY(){return Urt.apply(this._container,arguments)}on(){return mrt.apply(this._container,arguments)}once(){return yrt.apply(this._container,arguments)}off(){return this._container&&brt.apply(this._container,arguments)}get mode(){return this.app.mode}set mode(t){void 0!==t&&(this.app.mode=t)}toDataURL(){return Drt.apply(this._container,arguments)}group(){return Lrt.apply(this._container,arguments)}ungroup(){return zrt.apply(this._container,arguments)}fit(t){this._container.once("redraw",(()=>this._container.fit(t))),this._container.invalidate()}get fitMode(){return this._container.fitMode}get ids(){return Hrt.apply(this._container)}get data(){return this._container.data}set data(t){this._container.data=t}get dataByRefid(){return this._container.dataByRefid}set dataByRefid(t){this._container.dataByRefid=t}get values(){return this._container.values}set values(t){this._container.values=t}get valuesByRefid(){return this._container.valuesByRefid}set valuesByRefid(t){this._container.valuesByRefid=t}get baseUrl(){return this.app.baseUrl}set baseUrl(t){this.app.baseUrl=t}startAddMode(){return prt.apply(this._container,arguments)}}const nit=new class{load(t){}save(t,e){}clear(t){}};function iit({target:t,model:e,style:r,layers:n=[],handlers:i=[],mode:a=_9,refProvider:o,dataSubscriptionProvider:s,dataStorage:c=nit,baseUrl:u,fitMode:l}){var h=null;if("string"==typeof t){if(!(h=document.getElementById(t)))throw`target element '${t}' is not exist`;if(h.firstChild)throw`target element '${t}' is not empty`}else h=t;h&&h.style&&(h.style.position="absolute",h.style.cursor="default",h.style.overflow="hidden");var f=new Vnt(a,o);return f.baseUrl=u,f.dataSubscriptionProvider=s,f.dataStorage=c,new rit(new Gnt({target_element:h,model:e,style:r,layers:n,handlers:i,fitMode:l},f))}const ait=["mousemove","mouseup","mousedown","mouseout","wheel","tap","click","touchstart","touchmove","touchend","mouseenter","mouseleave","dragstart","dragmove","dragend","dblclick"];var oit=t=>class extends t{isHTMLElement(){return!0}isShadowable(){return!0}get element(){return this._element}set element(t){this._element=t}get tagName(){return this.get("type")}setElementProperties(t){throw new Error("Not Implemented Yet")}createElement(){this.element=document.createElement(this.tagName),this.element&&(this.parent.isHTMLElement()?this.parent.element.appendChild(this.element):this.root.model_layer.overlay.appendChild(this.element),ait.forEach((t=>{this.element.addEventListener(t,this.userInputEventHandler.bind(this))})),I9.forEach((t=>{this.element.addEventListener(t,this.userInputEventHandler.bind(this))})),this.oncreate_element&&this.oncreate_element(this.element))}userInputEventHandler(t){Rnt(this,t.type,t),t.stopPropagation()}reposition(){this.element&&xtt(this)}disposeElement(){var t=this.element;t&&t.parentElement&&t.parentElement.removeChild(t),delete this.element}ready(){super.ready(),!this.element&&this.createElement(),this.parent.isHTMLElement()?this.parent.element.appendChild(this.element):this.root.model_layer.overlay.appendChild(this.element),this.setElementProperties(this.element),this.reposition()}dispose(){this.disposeElement(this),super.dispose()}get hasTextProperty(){return!0}get textHidden(){return!0}onchange(t,e){this.element&&this.setElementProperties(this.element),this.reposition()}isDescendible(t){return t.isHTMLElement()}};const sit={x:1,y:1},cit={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"},uit={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"layout",label:"layout",name:"layoutOption"}],help:"scene/component/container"};class lit extends(oit(met)){get tagName(){return"div"}get nature(){return uit}setElementProperties(t){}get layout(){return Xtt.get(this.get("layout"))||Vtt}reposition(){if(this.element){var t=this,{id:e,class:r,scale:n=sit}=t.state,{rotation:i=0,hidden:a}=t,{left:o,top:s,width:c,height:u}=t.bounds,l=c/2,h=u/2,f=t.element;f.hidden=a,e&&(f.id=e),r&&(f.className=r),Object.assign(f.style,cit,{left:o+"px",top:s+"px",width:"0px",height:"0px",backgroundColor:"transparent"});var d=t.delta(),p=(n&&n.x||1)*d.sx,g=(n&&n.y||1)*d.sy,v=(i||0)+d.theta,m=d.tx||0,y=d.ty||0;["-webkit-","-moz-","-ms-","-o-",""].forEach((t=>{f.style[t+"transform"]=`translate(${m+l}px, ${y+h}px) rotate(${v}rad) translate(${-l}px, ${-h}px) scale(${p}, ${g}) perspective(1px)`}))}}}Btt.register("container",lit);const hit=5,fit=Math.sqrt(3),dit=2;function pit(t,e,r,n,i){var a,o,s,c,u=hit+i,l=r.x,h=r.y,f=n.x,d=n.y;if(Math.abs(l-f)>u&&Math.abs(h-d)>u){var p=(d-h)/(f-l),g=h-p*l;if(Math.abs(e-(p*t+g))>u)return!1}return l>f?(o=l,a=f):(o=f,a=l),h>d?(c=h,s=d):(c=d,s=h),!(o+hit<t)&&(!(a-hit>t)&&(!(c+hit<e)&&!(s-hit>e)))}function git(t,e,r,n=2){for(let i=0;i<r.length-1;i++)if(pit(t,e,r[i],r[i+1],n))return!0;return!1}function vit(t,e,r,n){if("arrow"!=t.slice(-5))return r;var i=Math.atan2(n.y-r.y,n.x-r.x),a=1.5*e;return{x:r.x+Math.cos(i)*a,y:r.y+Math.sin(i)*a}}function mit(t,e,r){var{lineWidth:n=dit,strokeStyle:i="#000000",lineCap:a=!1,alpha:o=1,begin:s="none",end:c="none",beginSize:u="size5",endSize:l="size5"}=r;if(("none"!=s||"none"!=c)&&(n=Number(n)||dit,t.lineCap=a,t.lineWidth=n,t.strokeStyle=i,t.fillStyle=i,t.globalAlpha*=o,"none"!=s&&yit(t,e[0],e[1],n,s,bit(u,n)),"none"!=c)){let r=e.length;yit(t,e[r-1],e[r-2],n,c,bit(l,n))}}function yit(t,e,r,n,i,a){var{x:o,y:s}=e,c=Math.atan2(r.y-s,r.x-o);switch(t.beginPath(),t.translate(o,s),t.rotate(c),i){case"oval":t.ellipse(0,0,a.X,a.Y,0,0,2*Math.PI),t.fill();break;case"diamond":t.moveTo(-a.X,0),t.lineTo(0,-a.Y),t.lineTo(a.X,0),t.lineTo(0,a.Y),t.fill();break;case"arrow":t.moveTo(0,0),t.lineTo(fit*a.X,-a.Y),t.lineTo(fit*a.X,a.Y),t.fill();break;case"sharp-arrow":t.moveTo(0,0),t.lineTo(fit*a.X,-a.Y),t.lineTo(-a.X/1.5+fit*a.X,0),t.lineTo(fit*a.X,a.Y),t.fill();break;case"open-arrow":t.moveTo(fit*a.X+n,-a.Y),t.lineTo(n,0),t.lineTo(fit*a.X+n,a.Y),t.stroke()}t.rotate(-c),t.translate(-o,-s),t.closePath()}function bit(t,e){let r={};switch(e*=1.2,t){case"size1":r.X=e,r.Y=e;break;case"size2":r.X=1.5*e,r.Y=e;break;case"size3":r.X=2*e,r.Y=e;break;case"size4":r.X=e,r.Y=1.5*e;break;case"size5":default:r.X=1.5*e,r.Y=1.5*e;break;case"size6":r.X=2*e,r.Y=1.5*e;break;case"size7":r.X=e,r.Y=2*e;break;case"size8":r.X=1.5*e,r.Y=2*e;break;case"size9":r.X=2*e,r.Y=2*e}return r}const xit="N",wit="S",Ait="E",_it="W";class kit{constructor({component:t,anchor:e,position:r,self:n}){this.component=t,this._anchorName=e,this._position=r,this.self=n}get position(){const t=this.anchor;if(t){var{position:e}=t;const r=this.component.transcoordS2T(e.x,e.y);return this.self.transcoordT2P(r.x,r.y)}return this._position}set position({x:t,y:e}){this._position={x:t,y:e}}get anchor(){return this.component?.findAnchor(this._anchorName)}get direction(){const t=this.component.bounds,e=this.anchor;if(!e)return Ait;const r=e.position;return r.y<=t.top?xit:r.y>=t.top+t.height?wit:r.x<=t.left?_it:Ait}get boundaryPosition(){const t=this.anchor;if(t){var{position:e}=t,r=0,n=0;switch(this.direction){case wit:n=20;break;case xit:n=-20;break;case _it:r=-20;break;default:r=20}e={x:e.x+r,y:e.y+n};const i=this.component.transcoordS2T(e.x,e.y);return this.self.transcoordT2P(i.x,i.y)}}}class Eit extends Btt{isLine(){return!0}replaceRefids(t){["from","to"].forEach((e=>{const r=this.get(e);if(r?.component){const n=t.get(r.component)||r.component;this.set(e,{...r,component:n})}}))}get fromEnd(){if(this.parent&&!this._fromEnd){const{component:t,anchor:e,position:r}=this.getState("from")||{};if(!t)return;const n=this.root?.findByRefid(t);if(!n)return;this._fromEnd=new kit({component:n,fromto:"from",anchor:e,position:r,self:this})}return this._fromEnd}get from(){return this.getState("from")}set from(t){delete this._fromEnd,this.set("from",t)}get toEnd(){if(this.parent&&!this._toEnd){const{component:t,anchor:e,position:r}=this.getState("to")||{};if(!t)return;const n=this.root?.findByRefid(t);if(!n)return;this._toEnd=new kit({component:n,fromto:"to",anchor:e,position:r,self:this})}return this._toEnd}get to(){return this.getState("to")}set to(t){delete this._toEnd,this.set("to",t)}move({x:t,y:e},r){r&&(this.from={position:this._fromEnd?.position||this.getState("from")?.position||{x:0,y:0}},this.to={position:this._toEnd?.position||this.getState("to")?.position||{x:0,y:0}}),super.move({x:t,y:e},r)}render(t){var{begin:e="none",end:r="none",lineWidth:n,round:i=0}=this.state,a=this.drawPath;mit(t,a,this.state),t.beginPath();var o=vit(e,n,a[0],a[1]),s=vit(r,n,a[a.length-1],a[a.length-2]);a=[o,...a.slice(1,-1),s];var c={x:o.x,y:o.y};t.moveTo(o.x,o.y);for(var u=1;u<a.length;u++){const e=c;c=a[u];const r=a[u+1];if(e.x===c.x&&e.y===c.y)continue;if(!r){t.lineTo(c.x,c.y);break}var l=0!==(d=Math.sqrt((e.x-c.x)*(e.x-c.x)+(e.y-c.y)*(e.y-c.y)))?Math.atan2(e.x-c.x,e.y-c.y):0,h=Math.sin(l)*Math.min(i,d/2)+c.x,f=Math.cos(l)*Math.min(i,d/2)+c.y;const n=i>0||0!==d?{x:h,y:f}:c;var d;l=0!==(d=Math.sqrt((r.x-c.x)*(r.x-c.x)+(r.y-c.y)*(r.y-c.y)))?Math.atan2(r.x-c.x,r.y-c.y):0,h=Math.sin(l)*Math.min(i,d/2)+c.x,f=Math.cos(l)*Math.min(i,d/2)+c.y;const o=i>0||0!==d?{x:h,y:f}:c;t.lineTo(n.x,n.y),i>0&&t.quadraticCurveTo(c.x,c.y,o.x,o.y)}this.drawStroke(t)}contains(t,e){var{lineWidth:r}=this.state;return git(t,e,this.drawPath,r)}get resizable(){return!1}get mutable(){return!0}get rotatable(){return!1}get path(){const{from:t,to:e}=this.state;var{x1:r,y1:n,x2:i,y2:a}=this.state;return[this.fromEnd?.position||t?.position||{x:r,y:n},this.toEnd?.position||e?.position||{x:i,y:a}]}set path(t){const[e,r]=t,{from:n,to:i}=this.state;delete this._fromEnd,delete this._toEnd,this.set({from:{...n,position:e},to:{...i,position:r}})}get textBounds(){var t,e,r=this.drawPath,n=0;for(let s=1;s<r.length;s++){var i=r[s-1],a=r[s],o=(i.x-a.x)*(i.x-a.x)+(i.y-a.y)*(i.y-a.y);o>n&&(n=Math.ceil(o),t=i,e=a)}var{paddingTop:s,paddingLeft:c,paddingRight:u,paddingBottom:l}=this.state;return l||=0,s||=0,c||=0,u||=0,{left:Math.min(t.x,e.x)+c,top:Math.min(t.y,e.y)+s,width:Math.max(Math.abs(t.x-e.x)-c-u,0),height:Math.max(Math.abs(t.y-e.y)-s-l,0)}}get decorators(){return["decotag"]}}Eit.getTipNeckPos=vit,Eit.containedInPath=git,Eit.drawEndTips=mit,Btt.register("line",Eit);const Sit={mutable:!1,resizable:!0,rotatable:!0,properties:[],"value-property":"text"};class Mit extends(ket(Ntt)){is3dish(){return!0}render(t){var{cx:e,cy:r,rx:n,ry:i,startAngle:a,endAngle:o,anticlockwise:s}=this.state;t.beginPath(),t.ellipse(e,r,Math.abs(n),Math.abs(i),0,a||0,o||2*Math.PI,s)}get path(){var{cx:t,cy:e,rx:r,ry:n}=this.state;return[{x:t-r,y:e-n},{x:t+r,y:e-n},{x:t+r,y:e+n},{x:t-r,y:e+n}]}set path(t){var e=t[0],r=t[2];this.set({cx:e.x+(r.x-e.x)/2,cy:e.y+(r.y-e.y)/2,rx:(r.x-e.x)/2,ry:(r.y-e.y)/2})}contains(t,e){var{cx:r,cy:n,rx:i,ry:a}=this.state,o=(t-r)/(2*i-.5),s=(e-n)/(2*a-.5);return o*o+s*s<.25}outline(t){return function(t,e){var{cx:r,cy:n,rx:i,ry:a}=t.model,o=2*Math.PI*e,s=r+i*Math.cos(o),c=n+a*Math.sin(o);return t.transcoordS2T(s,c)}(this,t)}get anchors(){return function(t){var{left:e,top:r,width:n,height:i}=t.bounds,a=e+n/2,o=r+i/2;return[{name:"TOP",position:{x:a,y:r}},{name:"RIGHT",position:{x:e+n,y:o}},{name:"BOTTOM",position:{x:a,y:r+i}},{name:"LEFT",position:{x:e,y:o}}]}(this)}get nature(){return Sit}}Btt.memoize(Mit.prototype,"path",!1),Btt.register("ellipse",Mit);var Tit={ondragstart:function(t,e,r){r.mutatePath(null,(function(r){r.splice(e+1,0,t)}))},ondragmove:function(t,e,r){r.mutatePath(null,(function(r){r[e+1]=t}))},ondragend:function(t,e,r){}};const Pit={mutable:!0,resizable:!1,rotatable:!0,properties:[{type:"number",label:"round",name:"round",property:{min:0,max:100,step:1}}],help:"scene/component/polygon"};class Oit extends Ntt{is3dish(){return!0}get mutable(){return!0}get pathExtendable(){return!0}get path(){return this.state.path}set path(t){this.set("path",t)}contains(t,e){var r=this.state.path,n=!1;return r.forEach(((i,a)=>{let o=(a+r.length+1)%r.length,s=i.x,c=i.y,u=r[o].x,l=r[o].y;c>e!=l>e&&t<(u-s)*(e-c)/(l-c)+s&&(n=!n)})),n}get controls(){var t=this.path;return t.map(((e,r)=>{let n=t[r+1>=t.length?0:r+1];return{x:(e.x+n.x)/2,y:(e.y+n.y)/2,handler:Tit}}))}get nature(){return Pit}}Btt.memoize(Oit.prototype,"controls",!1),Btt.register("polygon",Oit);var Iit={ondragstart:function(t,e,r){r.mutatePath(null,(function(r){r.splice(e,0,t)}))},ondragmove:function(t,e,r){r.mutatePath(null,(function(r){r[e]=t}))},ondragend:function(t,e,r){}};const Rit={mutable:!1,resizable:!1,rotatable:!1,properties:[{type:"number",label:"round",name:"round",property:{min:0,max:100,step:1}}],help:"scene/component/polyline"};class Cit extends Eit{get pathExtendable(){return!0}get path(){const{from:t,to:e}=this.state,{path:r}=this.state;return[this.fromEnd?.position||t?.position||r[0],...r.slice(1,-1),this.toEnd?.position||e?.position||r[r.length-1]]}set path(t){const{from:e,to:r}=this.state;delete this._fromEnd,delete this._toEnd,this.set({from:{...e,position:t[0]},to:{...r,position:t[t.length-1]},path:t})}get controls(){var t=this.path,e=[];for(let r=0;r<t.length-1;r++){let n=t[r],i=t[r+1];0==r&&e.push({x:n.x,y:n.y,handler:Iit}),e.push({x:(n.x+i.x)/2,y:(n.y+i.y)/2,handler:Iit}),r==t.length-2&&e.push({x:i.x,y:i.y,handler:Iit})}return e}get nature(){return Rit}}Btt.register("polyline",Cit);const jit={mutable:!1,resizable:!1,rotatable:!1,properties:[{type:"number",label:"round",name:"round",property:{min:0,max:100,step:1}}],help:"scene/component/ortholine"};class Dit extends Eit{get pathExtendable(){return!1}get drawPath(){const t=this.path[0],e=this.path[1],{component:r,direction:n,boundaryPosition:i=t}=this.fromEnd||{},{component:a,direction:o,boundaryPosition:s=e}=this.toEnd||{};var c=[i,s],u=[];i&&u.push(i);var l=r?.bounds;if(l){var h=r.transcoordS2T(l.left,l.top);h=this.transcoordT2P(h.x,h.y),l={...l,left:h.x,top:h.y}}var f=l?{left:l.left-20,top:l.top-20,width:l.width+40,height:l.height+40}:{left:i.x,top:i.y,width:0,height:0};l=l||f;var d=a?.bounds;if(d){h=a.transcoordS2T(d.left,d.top);h=this.transcoordT2P(h.x,h.y),d={...d,left:h.x,top:h.y}}var p=d?{left:d.left-20,top:d.top-20,width:d.width+40,height:d.height+40}:{left:s.x,top:s.y,width:0,height:0};d=d||p;var g=[f,p];const v=f.left>p.left?p.left:f.left,m=f.top>p.top?p.top:f.top;var y,b,x,w,A,_,k,E,S,M,T={left:v,top:m,width:f.left+f.width>p.left+p.width?f.left+f.width-v:p.left+p.width-v,height:f.top+f.height>p.top+p.height?f.top+f.height-m:p.top+p.height-m},P=0,O=0;l.left+l.width<d.left?(w=0,A=1,S=n,M=o,y=(l.left+l.width+d.left)/2,P=d.left-y):d.left+d.width<l.left&&(w=1,A=0,S=o,M=n,y=(l.left+d.width+d.left)/2,P=l.left-y),l.top+l.height<d.top?(x=0,_=1,k=n,E=o,b=(l.top+l.height+d.top)/2,O=d.top-b):d.top+d.height<l.top&&(x=1,_=0,k=o,E=n,b=(l.top+d.height+d.top)/2,O=l.top-b);var I=[];if(y&&P>O){switch(M){case _it:switch(S){case Ait:I.push({x:y,y:c[w].y}),I.push({x:y,y:c[A].y});break;case _it:var R=g[w].top+g[w].height/2>c[A].y?Math.min(g[w].top,c[A].y):Math.max(g[w].top+g[w].height,c[A].y);I.push({x:c[w].x,y:R}),I.push({x:y,y:R}),I.push({x:y,y:c[A].y});break;case xit:case wit:R=S===wit?Math.max(c[w].y,c[A].y):Math.min(c[w].y,c[A].y);I.push({x:c[w].x,y:R}),I.push({x:y,y:R}),I.push({x:y,y:c[A].y});break;default:return this.path}break;case Ait:switch(S){case Ait:var C=R=c[w].y<c[A].y?Math.min(g[A].top,c[w].y):Math.max(g[A].top+g[A].height,c[w].y);break;case _it:C=R=void 0!==b?b:c[w].y<c[A].y?T.top-.5*P:T.top+T.height+.5*P;break;case wit:C=R=void 0!==b?Math.max(b,c[w].y):T.top+T.height;break;case xit:C=R=b?Math.min(b,g[w].top):T.top;break;default:return this.path}I.push({x:c[w].x,y:R}),I.push({x:y,y:R}),I.push({x:y,y:C}),I.push({x:c[A].x,y:C});break;case wit:switch(S){case Ait:R=c[w].y,C=c[w].y>c[A].y?c[w].y:g[A].top+g[A].height;break;case _it:C=R=b?Math.max(b,g[A].top+g[A].height):T.top+T.height;break;case wit:C=R=T.top+T.height;break;case xit:R=b?Math.min(b,g[w].top):g[w].top,C=b?Math.max(b,g[A].top+g[A].height):g[A].top+g[A].height;break;default:return this.path}I.push({x:c[w].x,y:R}),I.push({x:y,y:R}),I.push({x:y,y:C}),I.push({x:c[A].x,y:C});break;case xit:switch(S){case Ait:R=c[w].y,C=c[w].y<c[A].y?c[w].y:g[A].top;break;case _it:C=R=b?Math.min(b,g[A].top):T.top;break;case wit:R=void 0!==b?Math.max(b,c[w].y):c[w].y,C=void 0!==b?Math.min(b,c[A].y):c[A].y;break;case xit:C=R=T.top;break;default:return this.path}I.push({x:c[w].x,y:R}),I.push({x:y,y:R}),I.push({x:y,y:C}),I.push({x:c[A].x,y:C});break;default:return this.path}u.push(...0===w?I:I.reverse())}else if(b){switch(E){case xit:switch(k){case wit:I.push({x:c[x].x,y:b}),I.push({x:c[_].x,y:b});break;case xit:var j=g[x].left+g[x].width/2>c[_].x?Math.min(g[x].left,c[_].x):Math.max(g[x].left+g[x].width,c[_].x);I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:c[_].x,y:b});break;case _it:j=Math.min(c[x].x,c[_].x);I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:c[_].x,y:b});break;case Ait:j=Math.max(c[x].x,c[_].x);I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:c[_].x,y:b});break;default:return this.path}break;case wit:switch(k){case _it:var D=j=T.left;break;case Ait:D=j=void 0!==y?Math.max(y,c[x].x):T.left+T.width;break;case xit:D=j=void 0!==y?y:c[x].x<c[_].x?T.left-.5*O:T.left+T.width+.5*O;break;case wit:j=c[x].x,D=c[x].x<c[_].x?Math.min(g[_].left,c[x].x):Math.max(g[_].left+g[_].width,c[x].x);break;default:return this.path}I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:D,y:b}),I.push({x:D,y:c[_].y});break;case Ait:switch(k){case _it:j=void 0!==y?Math.min(y,c[x].x):c[x].x,D=void 0!==y?Math.max(y,c[_].x):c[_].x;break;case Ait:D=j=T.left+T.width;break;case xit:D=j=void 0!==y?Math.max(y,c[_].x):T.left+T.width;break;case wit:j=c[x].x,D=Math.max(g[_].left+g[_].width,c[x].x);break;default:return this.path}I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:D,y:b}),I.push({x:D,y:c[_].y});break;case _it:switch(k){case _it:D=j=T.left;break;case Ait:j=void 0!==y?Math.max(y,c[x].x):c[x].x,D=void 0!==y?Math.min(y,c[_].x):c[_].x;break;case xit:D=j=T.left;break;case wit:j=c[x].x<c[_].x?Math.min(g[_].left,c[x].x):c[x].x,D=Math.min(j,c[_].x);break;default:return this.path}I.push({x:j,y:c[x].y}),I.push({x:j,y:b}),I.push({x:D,y:b}),I.push({x:D,y:c[_].y});break;default:return this.path}u.push(...0===x?I:I.reverse())}else switch(n){case xit:switch(o){case xit:var L=T.top;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case wit:var z=T.left+T.width;u.push({x:z,y:c[0].y}),u.push({x:z,y:T.top+T.height}),u.push({x:c[1].x,y:T.top+T.height});break;case Ait:z=c[1].y<c[0].y&&c[1].x<c[0].x?c[0].x:T.left+T.width;u.push({x:z,y:c[0].y}),u.push({x:z,y:c[1].y});break;case _it:z=T.left;u.push({x:z,y:c[0].y}),u.push({x:z,y:c[1].y});break;default:return this.path}break;case wit:switch(o){case xit:z=T.left+T.width;u.push({x:z,y:c[0].y}),u.push({x:z,y:T.top}),u.push({x:c[1].x,y:T.top});break;case wit:L=T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case Ait:L=T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case _it:L=T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;default:return this.path}break;case _it:switch(o){case xit:z=c[0].x>c[1].x&&c[0].y<c[1].y?c[1].x:T.left,L=c[0].x>c[1].x&&c[0].y<c[1].y?c[1].y:Math.min(T.top,c[0].y);u.push({x:z,y:c[0].y}),u.push({x:z,y:L}),u.push({x:c[1].x,y:L});break;case wit:z=T.left,L=Math.max(T.top+T.height,c[0].y);u.push({x:z,y:c[0].y}),u.push({x:z,y:L}),u.push({x:c[1].x,y:L});break;case Ait:z=T.left+T.width;u.push({x:c[0].x,y:T.top}),u.push({x:z,y:T.top}),u.push({x:z,y:c[1].y});break;case _it:z=T.left;u.push({x:z,y:c[0].y}),u.push({x:z,y:c[1].y});break;default:return this.path}break;case Ait:switch(o){case xit:L=c[0].y<c[1].y&&c[0].x<c[1].x?c[0].y:T.top;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case wit:L=c[0].y>c[1].y&&c[0].x<c[1].x?c[0].y:T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case Ait:L=T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;case _it:L=T.top+T.height;u.push({x:c[0].x,y:L}),u.push({x:c[1].x,y:L});break;default:return this.path}break;default:return this.path}return s&&u.push(s),[t,...u,e].filter(((t,e,r)=>{if(0===e)return!0;const n=r[e-1];return t.x!==n.x||t.y!==n.y})).filter(((t,e,r)=>{if(0===e||e>=r.length-1)return!0;const n=r[e-1],i=r[e+1];return!(t.x===n.x&&t.x===i.x||t.y===n.y&&t.y===i.y)}))}get nature(){return jit}}Btt.register("ortholine",Dit);const Lit={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"image-selector",label:"image-src",name:"src",property:{displayField:"id",displayFullUrl:!0,baseUrlAlias:"$base_url",defaultStorage:"scene-image",storageFilters:{type:Array,value:[{name:"category",value:"image"}]},useUpload:!0}},{type:"select",label:"cross-origin",name:"crossOrigin",property:{options:["","anonymous","use-credentials"]}}],"value-property":"src",help:"scene/component/image-view"};class zit extends(Utt(Ntt)){static get noimage(){return zit.NOIMAGE||(zit.NOIMAGE=new Image,zit.NOIMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABIBAMAAAD7Se1QAAAAIVBMVEUAAABHcEwBAQEREREBAQEEBAQGBgYLCwsDAwMDAwMICAi6HF9tAAAAC3RSTlNNAEAERiMYCS41Eac10lYAAAEgSURBVHhe7dY9asQwEAXgh7DNertNiJy48pIitY3SB7bYdk0ukL1BDDmA9gZecoH4pmFQ3MQayUMguPBrNPD4wD9TCMvJmt3M/AtYwXOlXiWgqADVCUBD46MAnGhMBaCiUQmAm8VA/Eh/eWl9Fn5WcxD+OLuRrUYJDKLluwH2InACUgkoACSdADxQc50Bytadb9RkM0CT13TcvlCT1HFg8UTHvasuUVACCa3El6u2UdD8LFTlKhUFFgA+d3dj10aABkUN72N3jAADCrJq7PIIsPidcxBoTHIIAjMFmyCwmGYIAA1P9gFgfCANAOsDSccCDW+uLDB+kLGg94OkZoAGkwsDDAe2DOg5oPxAg03rBR88OHpBz4N8UVeHFSwma74BTW6Ge4rIRa4AAAAASUVORK5CYII="),zit.NOIMAGE}dispose(){super.dispose(),this._offcanvas=null,this._image=null}render(t){var{left:e,top:r,width:n,height:i,isGray:a=!1,alpha:o=1,src:s}=this.state;if(this.prepareIf(!this._image&&s),t.beginPath(),t.globalAlpha*=o,this._image&&this._image.complete)if(a&&this._offcanvas)t.drawImage(this._offcanvas,e,r,n,i);else try{t.drawImage(this._image,e,r,n,i)}catch(a){t.drawImage(zit.noimage,e,r,n,i)}else!this.app.isViewMode&&t.drawImage(zit.noimage,e,r,n,i)}get nature(){return Lit}get hasTextProperty(){return!1}ready(){super.ready(),this.prepareIf(!this._image&&this.state.src)}prepare(t,e){var{src:r,crossOrigin:n}=this.state;if(r){this._image=new Image;try{n&&(this._image.crossOrigin=n),this._image.src=this.app.url(r)||""}catch(t){return void e(t)}this._image.onload=()=>{if(this.get("isGray")){let t=this._image.width,e=this._image.height;this._offcanvas=Btt.createCanvas(t,e);let r=this._offcanvas.getContext("2d");r.drawImage(this._image,0,0);let n=function(t,e,r){try{var n=t.getImageData(0,0,e,r)}catch(t){return y9("Get Image Data Error: "+t.message),null}var i=n.data;for(let t=0;t<e*r*4;t+=4){let e=i[t],r=i[t+1],a=i[t+2],o=parseInt((e+r+a)/3);n.data[t]=o,n.data[t+1]=o,n.data[t+2]=o}return n}(r,t,e);r.putImageData(n,0,0)}t(this)},this._image.onerror=t=>{this._image&&!this._image.currentSrc&&(this._image=null),e(t)}}else t(this)}get src(){return this.get("src")}set src(t){this.set("src",t)}onchange(t,e){(t.hasOwnProperty("src")||t.hasOwnProperty("isGray"))&&(this._offcanvas=null,this._image=null,this.prepareIf(t.src))}ondropfile(t,e){for(let r=0;r<t.length;r++)if(t[r].type.startsWith("image/"))return void(this.src=e[r])}}Btt.register("image-view",zit);class Fit extends(oit(Utt(Btt))){}var Bit={},Nit={},Uit={};Object.defineProperty(Uit,"__esModule",{value:!0});var Yit=function(){function t(){}return t.bitsToNum=function(t){return t.reduce((function(t,e){return 2*t+e}),0)},t.byteToBitArr=function(t){for(var e=[],r=7;r>=0;r--)e.push(!!(t&1<<r));return e},t.lzwDecode=function(t,e){for(var r,n,i=0,a=function(t){for(var r=0,n=0;n<t;n++)e.charCodeAt(i>>3)&1<<(7&i)&&(r|=1<<n),i++;return r},o=[],s=1<<t,c=s+1,u=t+1,l=[],h=function(){l=[],u=t+1;for(var e=0;e<s;e++)l[e]=[e];l[s]=[],l[c]=null};;)if(n=r,(r=a(u))!==s){if(r===c)break;if(r<l.length)n!==s&&l.push(l[n].concat(l[r][0]));else{if(r!==l.length)throw new Error("Invalid LZW code.");l.push(l[n].concat(l[n][0]))}o.push.apply(o,l[r]),l.length===1<<u&&u<12&&u++}else h();return o},t}();Uit.SuperGifUtils=Yit,Object.defineProperty(Nit,"__esModule",{value:!0});var Git=Uit,Hit=function(){function t(t,e){this.stream=t,this.handler=e}return t.prototype.parseCT=function(t){for(var e=[],r=0;r<t;r++)e.push(this.stream.readBytes(3));return e},t.prototype.readSubBlocks=function(){var t,e;e="";do{t=this.stream.readByte(),e+=this.stream.read(t)}while(0!==t);return e},t.prototype.parseHeader=function(){var t={};if(t.sig=this.stream.read(3),t.ver=this.stream.read(3),"GIF"!==t.sig)throw new Error("Not a GIF file.");t.width=this.stream.readUnsigned(),t.height=this.stream.readUnsigned();var e=Git.SuperGifUtils.byteToBitArr(this.stream.readByte());t.gctFlag=e.shift(),t.colorRes=Git.SuperGifUtils.bitsToNum(e.splice(0,3)),t.sorted=e.shift(),t.gctSize=Git.SuperGifUtils.bitsToNum(e.splice(0,3)),t.bgColor=this.stream.readByte(),t.pixelAspectRatio=this.stream.readByte(),t.gctFlag&&(t.gct=this.parseCT(1<<t.gctSize+1)),this.handler.hdr&&this.handler.hdr(t)},t.prototype.parseExt=function(t){var e=this;switch(t.label=this.stream.readByte(),t.label){case 249:t.extType="gce",function(t){e.stream.readByte();var r=Git.SuperGifUtils.byteToBitArr(e.stream.readByte());t.reserved=r.splice(0,3),t.disposalMethod=Git.SuperGifUtils.bitsToNum(r.splice(0,3)),t.userInput=r.shift(),t.transparencyGiven=r.shift(),t.delayTime=e.stream.readUnsigned(),t.transparencyIndex=e.stream.readByte(),t.terminator=e.stream.readByte(),e.handler.gce&&e.handler.gce(t)}(t);break;case 254:t.extType="com",function(t){t.comment=e.readSubBlocks(),e.handler.com&&e.handler.com(t)}(t);break;case 1:t.extType="pte",function(t){e.stream.readByte(),t.ptHeader=e.stream.readBytes(12),t.ptData=e.readSubBlocks(),e.handler.pte&&e.handler.pte(t)}(t);break;case 255:t.extType="app",function(t){e.stream.readByte(),t.identifier=e.stream.read(8),t.authCode=e.stream.read(3),"NETSCAPE"===t.identifier?function(t){e.stream.readByte(),t.unknown=e.stream.readByte(),t.iterations=e.stream.readUnsigned(),t.terminator=e.stream.readByte(),e.handler.app&&e.handler.app.NETSCAPE&&e.handler.app.NETSCAPE(t)}(t):function(t){t.appData=e.readSubBlocks(),e.handler.app&&e.handler.app[t.identifier]&&e.handler.app[t.identifier](t)}(t)}(t);break;default:t.extType="unknown",function(t){t.data=e.readSubBlocks(),e.handler.unknown&&e.handler.unknown(t)}(t)}},t.prototype.parseImg=function(t){t.leftPos=this.stream.readUnsigned(),t.topPos=this.stream.readUnsigned(),t.width=this.stream.readUnsigned(),t.height=this.stream.readUnsigned();var e=Git.SuperGifUtils.byteToBitArr(this.stream.readByte());t.lctFlag=e.shift(),t.interlaced=e.shift(),t.sorted=e.shift(),t.reserved=e.splice(0,2),t.lctSize=Git.SuperGifUtils.bitsToNum(e.splice(0,3)),t.lctFlag&&(t.lct=this.parseCT(1<<t.lctSize+1)),t.lzwMinCodeSize=this.stream.readByte();var r=this.readSubBlocks();t.pixels=Git.SuperGifUtils.lzwDecode(t.lzwMinCodeSize,r),t.interlaced&&(t.pixels=function(t,e){for(var r=new Array(t.length),n=t.length/e,i=function(n,i){var a=t.slice(i*e,(i+1)*e);r.splice.apply(r,[n*e,e].concat(a))},a=[0,4,2,1],o=[8,8,4,2],s=0,c=0;c<4;c++)for(var u=a[c];u<n;u+=o[c])i(u,s),s++;return r}(t.pixels,t.width)),this.handler.img&&this.handler.img(t)},t.prototype.parseBlock=function(){var t={};switch(t.sentinel=this.stream.readByte(),String.fromCharCode(t.sentinel)){case"!":t.type="ext",this.parseExt(t);break;case",":t.type="img",this.parseImg(t);break;case";":t.type="eof",this.handler.eof&&this.handler.eof(t);break;default:throw new Error("Unknown block: 0x"+t.sentinel.toString(16))}"eof"!==t.type&&setTimeout(this.parseBlock.bind(this),0)},t.prototype.parse=function(){this.parseHeader(),setTimeout(this.parseBlock.bind(this),0)},t}();Nit.SuperGifParser=Hit;var Wit={};Object.defineProperty(Wit,"__esModule",{value:!0});var qit=function(){function t(t){this.data=t,this.position=0}return t.prototype.readByte=function(){if(this.position>=this.data.length)throw new Error("Attempted to read past end of stream.");return this.data instanceof Uint8Array?this.data[this.position++]:255&this.data.charCodeAt(this.position++)},t.prototype.readBytes=function(t){for(var e=[],r=0;r<t;r++)e.push(this.readByte());return e},t.prototype.read=function(t){for(var e="",r=0;r<t;r++)e+=String.fromCharCode(this.readByte());return e},t.prototype.readUnsigned=function(){var t=this.readBytes(2);return(t[1]<<8)+t[0]},t}();Wit.SuperGifStream=qit,Object.defineProperty(Bit,"__esModule",{value:!0});var Xit=Nit,Vit=Wit,Qit=function(){function t(t,e){var r=this;for(var n in this.gifImgElement=t,this.options={autoPlay:!0},this.loading=!1,this.ready=!1,this.transparency=null,this.delay=null,this.disposalMethod=null,this.disposalRestoreFromIdx=null,this.lastDisposalMethod=null,this.frame=null,this.lastImg=null,this.playing=!0,this.forward=!0,this.ctxScaled=!1,this.frames=[],this.frameOffsets=[],this.initialized=!1,this.currentFrameIndex=-1,this.iterationCount=0,this.stepping=!1,this.handler={hdr:this.withProgress(this.doHdr.bind(this)),gce:this.withProgress(this.doGCE.bind(this)),com:this.withProgress(this.doNothing.bind(this)),app:{NETSCAPE:this.withProgress(this.doNothing.bind(this))},img:this.withProgress(this.doImg.bind(this)),eof:function(){r.pushFrame(),r.canvas.width=r.hdr.width*r.getCanvasScale(),r.canvas.height=r.hdr.height*r.getCanvasScale(),r.playerInit(),r.loading=!1,r.ready=!0,r.loadCallback&&r.loadCallback(r.gifImgElement)}},e)this.options[n]=e[n];this.onEndListener=e.onEnd,this.loopDelay=e.loopDelay||0,this.overrideLoopMode=null!=e.loopMode?e.loopMode:"auto",this.drawWhileLoading=null==e.drawWhileLoading||e.drawWhileLoading}return t.prototype.init=function(){var t=this.gifImgElement.parentNode,e=document.createElement("div");this.canvas=document.createElement("canvas"),this.canvasContext=this.canvas.getContext("2d"),this.tmpCanvas=document.createElement("canvas"),e.className=this.options.enclosingClass||"super-gif",e.appendChild(this.canvas),t&&(t.insertBefore(e,this.gifImgElement),t.removeChild(this.gifImgElement)),this.initialized=!0},t.prototype.loadSetup=function(t){return!this.loading&&(t&&(this.loadCallback=t),this.loading=!0,this.frames=[],this.clear(),this.disposalRestoreFromIdx=null,this.lastDisposalMethod=null,this.frame=null,this.lastImg=null,!0)},t.prototype.completeLoop=function(){this.onEndListener&&this.onEndListener(this.gifImgElement),this.iterationCount++,!1!==this.overrideLoopMode||this.iterationCount<0?this.doStep():(this.stepping=!1,this.playing=!1)},t.prototype.doStep=function(){if(this.stepping=this.playing,this.stepping){this.stepFrame(1);var t=10*this.frames[this.currentFrameIndex].delay;t||(t=100),0===this.getNextFrameNo()?(t+=this.loopDelay,setTimeout(this.completeLoop.bind(this),t)):setTimeout(this.doStep.bind(this),t)}},t.prototype.step=function(){this.stepping||setTimeout(this.doStep.bind(this),0)},t.prototype.putFrame=function(){var t;this.currentFrameIndex=parseInt(this.currentFrameIndex.toString(),10),this.currentFrameIndex>this.frames.length-1&&(this.currentFrameIndex=0),this.currentFrameIndex<0&&(this.currentFrameIndex=0),t=this.frameOffsets[this.currentFrameIndex],this.tmpCanvas.getContext("2d").putImageData(this.frames[this.currentFrameIndex].data,t.x,t.y),this.canvasContext.globalCompositeOperation="copy",this.canvasContext.drawImage(this.tmpCanvas,0,0)},t.prototype.playerInit=function(){this.loadErrorCause||(this.canvasContext.scale(this.getCanvasScale(),this.getCanvasScale()),this.options.autoPlay?this.step():(this.currentFrameIndex=0,this.putFrame()))},t.prototype.clear=function(){this.transparency=null,this.delay=null,this.lastDisposalMethod=this.disposalMethod,this.disposalMethod=null,this.frame=null},t.prototype.parseStream=function(t){try{new Xit.SuperGifParser(t,this.handler).parse()}catch(t){this.handleError("parse")}},t.prototype.setSizes=function(t,e){this.canvas.width=t*this.getCanvasScale(),this.canvas.height=e*this.getCanvasScale(),this.tmpCanvas.width=t,this.tmpCanvas.height=e,this.tmpCanvas.style.width=t+"px",this.tmpCanvas.style.height=e+"px",this.tmpCanvas.getContext("2d").setTransform(1,0,0,1,0,0)},t.prototype.drawError=function(){this.canvasContext.fillStyle="black",this.canvasContext.fillRect(0,0,this.hdr.width,this.hdr.height),this.canvasContext.strokeStyle="red",this.canvasContext.lineWidth=3,this.canvasContext.moveTo(0,0),this.canvasContext.lineTo(this.hdr.width,this.hdr.height),this.canvasContext.moveTo(0,this.hdr.height),this.canvasContext.lineTo(this.hdr.width,0),this.canvasContext.stroke()},t.prototype.handleError=function(t){this.loadErrorCause=t,this.hdr={width:this.gifImgElement.width,height:this.gifImgElement.height},this.frames=[],this.drawError()},t.prototype.doHdr=function(t){this.hdr=t,this.setSizes(this.hdr.width,this.hdr.height)},t.prototype.doGCE=function(t){this.pushFrame(),this.clear(),this.transparency=t.transparencyGiven?t.transparencyIndex:null,this.delay=t.delayTime,this.disposalMethod=t.disposalMethod},t.prototype.pushFrame=function(){this.frame&&(this.frames.push({data:this.frame.getImageData(0,0,this.hdr.width,this.hdr.height),delay:this.delay}),this.frameOffsets.push({x:0,y:0}))},t.prototype.doImg=function(t){var e=this;this.frame||(this.frame=this.tmpCanvas.getContext("2d"));var r=this.frames.length,n=t.lctFlag?t.lct:this.hdr.gct;r>0&&(3===this.lastDisposalMethod?null!==this.disposalRestoreFromIdx?this.frame.putImageData(frames[this.disposalRestoreFromIdx].data,0,0):this.frame.clearRect(this.lastImg.leftPos,this.lastImg.topPos,this.lastImg.width,this.lastImg.height):this.disposalRestoreFromIdx=r-1,2===this.lastDisposalMethod&&this.frame.clearRect(this.lastImg.leftPos,this.lastImg.topPos,this.lastImg.width,this.lastImg.height));var i=this.frame.getImageData(t.leftPos,t.topPos,t.width,t.height);t.pixels.forEach((function(t,r){t!==e.transparency&&(i.data[4*r+0]=n[t][0],i.data[4*r+1]=n[t][1],i.data[4*r+2]=n[t][2],i.data[4*r+3]=255)})),this.frame.putImageData(i,t.leftPos,t.topPos),this.ctxScaled||(this.canvasContext.scale(this.getCanvasScale(),this.getCanvasScale()),this.ctxScaled=!0),this.drawWhileLoading&&(this.canvasContext.drawImage(this.tmpCanvas,0,0),this.drawWhileLoading=this.options.autoPlay),this.lastImg=t},t.prototype.doNothing=function(){},t.prototype.withProgress=function(t){return function(e){t(e)}},t.prototype.getNextFrameNo=function(){var t=this.forward?1:-1;return(this.currentFrameIndex+t+this.frames.length)%this.frames.length},t.prototype.stepFrame=function(t){this.currentFrameIndex=this.currentFrameIndex+t,this.putFrame()},t.prototype.getCanvasScale=function(){return this.options.maxWidth&&this.hdr&&this.hdr.width>this.options.maxWidth?this.options.maxWidth/this.hdr.width:window.devicePixelRatio||1},t.prototype.play=function(){this.playing=!0,this.step()},t.prototype.pause=function(){this.playing=!1},t.prototype.isPlaying=function(){return this.playing},t.prototype.getCanvas=function(){return this.canvas},t.prototype.isLoading=function(){return this.loading},t.prototype.isReady=function(){return this.ready},t.prototype.isAutoPlay=function(){return this.options.autoPlay},t.prototype.getLength=function(){return this.frames.length},t.prototype.getCurrentFrame=function(){return this.currentFrameIndex},t.prototype.moveTo=function(t){this.currentFrameIndex=t,this.putFrame()},t.prototype.loadURL=function(t,e){var r=this;if(this.loadSetup(e)){var n=new XMLHttpRequest;n.open("GET",t,!0),"overrideMimeType"in n?n.overrideMimeType("text/plain; charset=x-user-defined"):"responseType"in n?n.responseType="arraybuffer":n.setRequestHeader("Accept-Charset","x-user-defined"),n.onloadstart=function(){r.initialized||r.init()},n.onload=function(){if(200===n.status){var t=n.response;t.toString().indexOf("ArrayBuffer")>0&&(t=new Uint8Array(t));var e=new Vit.SuperGifStream(t);setTimeout((function(){r.parseStream(e)}),0)}else r.handleError("xhr - response")},n.onerror=function(){r.handleError("xhr")},n.send()}},t.prototype.load=function(t){this.loadURL(this.gifImgElement.src,t)},t}(),Kit=Bit.SuperGif=Qit;const Jit={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"string",label:"src",name:"src"},{type:"checkbox",label:"play",name:"play"}],"value-property":"src",help:"scene/component/gif-view"};class Zit extends Fit{async oncreate_element(t){var{src:e,play:r}=this.state;this.onchangesrc(e),this.onchangeplay(r)}buildImg(){var t=this.element;t.innerHTML="";var e=document.createElement("img");return e.style.width="100%",e.style.height="100%",t.appendChild(e),e}onchange(t,e){super.onchange(t,e),"src"in t&&this.onchangesrc(t.src),"play"in t&&this.onchangeplay(t.play)}setElementProperties(t){}onchangeplay(t){var e=this._superGif;e&&e.isReady()&&(t?e.play():e.pause())}onchangesrc(t){var e=this.buildImg();t||(t="data:image/gif;base64,R0lGODlhYABIAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEhISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdHR0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpaWltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1tbW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CAgIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKio+Pj5iYmKCgoKampqurq66urrCwsLGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrOzs7S0tLa2tre3t7m5ubu7u7+/v8DAwMHBwcPDw8XFxcfHx8vLy8/Pz9LS0tXV1dfX193d3eTk5Onp6fj4+Pz8/P7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v///////////////////////////////////////////////////////////////////////////////yH5BAkAAPUAIf47R2VuZXJhdGVkIGJ5IGpzZ2lmIChodHRwczovL2dpdGh1Yi5jb20vYW50aW1hdHRlcjE1L2pzZ2lmLykALAAAAABgAEgAAAj+AGcJHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmR9VKqXMmypcuXMGPKnJkSIs2bOHPqZGlzp8+fQOv1DEq0KMyhRpMmRaq0KVCmTqPmhCq1qkyqLrFRSyYwGTVsVo1iZXmNa8Fk18ISHasSm1mDycCq/ck2JTWF1ObSfTjz7cFken3WFbow8M7BDA3rHOwXruKpfGXeTZg3qDVrUge7RRg3KLZjx+Q2HVyvLNy0QaMJjBaVdD2tZr2K/mmNIObRkR+n9AsYt0Pddg1WXppb8bWDx1CLLW74GcJnSl3TtDY8Zu2Et4tKl7n52eyWnxXvhl7+26jqrspbnlfIWjtz2gWPZV95neH8veU9NxZYfbfD3kFt99J6Bnmn0mQO9XfYezrVxxlmx0GUXIAM4hSeffsxBN1TFd5E4Ef3QZbfTg6CNJ5gHXJ3TEntLThiTh+KFCJNAqZU4kgAitjQTheepOBMNcZI0oQ6JpbTjSZtiNN2PZ400IxHpdiSc07G911M0iFZZYtAStnWilUeBGVLrlEZpmM0elmPlmfO8iOZXl4DZpsGEYmll2bSWWCXLwJXVY1+urhjoGEBSuiSah6K36CKtpZoo4s9CimielZq6aWYZqrpppx26umnoIZ6UkAAOw=="),e.src=t,e.setAttribute("rel:animated_src",t),e.setAttribute("rel:auto_play",0),this._superGif=new Kit(e,{autoPlay:!1}),this._superGif.init();for(const t of this.element.children)t.style.width="100%",t.style.height="100%";var r=this._superGif.getCanvas();r.style.width="100%",r.style.height="100%",this._superGif.load((()=>{setTimeout((()=>{this._superGif.moveTo(0),this.play&&this._superGif.play()}),100)}))}ondropfile(t,e){for(let r=0;r<t.length;r++)if(/\.gif$/.test(t[r].name))return void(this.src=e[r])}get src(){return this.getState("src")}set src(t){this.set("src",t)}get play(){return this.getState("play")}set play(t){this.setState("play",t)}get nature(){return Jit}get tagName(){return"div"}}Btt.register("gif-view",Zit);const $it={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"string",label:"src",name:"src"},{type:"checkbox",label:"started",name:"started"},{type:"checkbox",label:"loop",name:"loop"}],"value-property":"src",help:"scene/component/audio"};class tat extends(Utt(Ntt)){static get image(){return tat.IMAGE||(tat.IMAGE=new Image,tat.IMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAP1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACzJYIvAAAAFHRSTlMA8BAwgNBgQKB/wCBwUJDg37CvXyUlBK8AABFYSURBVHja7NsBkqIwFIThTiAQgyBq3/+sm6p1tnamZkaTMhJJf1f4S/JeEIiIiIiIiIiIiIiIiEhD7Hg4BH84TpAKjJ4f3NFCtjVd+InXz2RTs+FXlxGylYHfcVfIJmb+YFWSLUyGVJKKBJJKUo+Rd6w63l/qzLuCkryO5fe0l2xk5mMWbe+v0fNBRqf7S3je6CipQ2ACr+dWcYEpzBFS1plpguatsnomMgdIQSOTuQ5SjmE6/UgK8szgdJIUM/FG41YlFmYJ2kkKsY5ZzAwBurHDk3WGeRY0bvYrGa1+rqNI22f7dS32ZnUK1GMr0eSK3mEc9dhKMxp+ZTo8kT2emOXS5LQ1kCxbJBocSd2k5PaIjMVzjWcdJPk9ooBnmzx1t5XbIxqBKpJ4NGTgzwKiGpK4do72gb+ZUMIYtCPm9WCPMsYTE5k2hq2ZvzujlCE1iRmwf3dvmRyKsT0T7b9I7HEPCpqCiqT2IIqaT1pI0noQZdlFC8l/PbYPAnRORT56VBEE6FXkb49agmByKhJ71BME6FsvEntUFQTdqekisUdlQWCXhovEHtUFAWbTapHYo8YgmFybO3vsUWcQYGmxSOxRbRAMprkisUfFQVKmrX18sxt7VB0ENjT1xir2qDxIwkFi3v89e+xRfxAMzfzzIfZ4hyAYDR9zwVuLPd4jCDrTwoLYGb5LEFi3/+E3rweR6urX20c/Fvls2Pvwm9mDSGIPhv8YPyGf3/eo9Ye7O8B2FIShAAooakEttex/rbODad5/yTHIAjqn505IQPv+Xz06dz+4VXORHEZcgAcB8updM8F6e25jBzwIkE07l+x8amMnPDp6nsNJ+BoZ7Q6F8egqAda9VEuRNlZjBzwYkMskdXR73okd8GBAJiKYjBcZKKqG9OiKDbgdfxJ5VhsBPDiQZhaouD3p4hfw4EAmwxisz3MSHwAPEmQ1TB1N+SmXWoAHC7JbZsWl/IxLLcCDBplNo3lrfMLsmwAPGmShAxX5/1vOEzjEz3iyfQ/hI36W4TctsUesOAifPdrQg8M++KYl95iCBkjI1r8634betBAPHZDTPFAmD3zLiHgogVTziMsahz0eIh5aIGHGRSJ2mFtHPR4iHhQIP2UvWGMf8wk74qEIEib7rLjPiBfxiAcCwp8V+Nae3uMdRhAPDIR/J5f/Q2DTcC+hIB7qIGEq3Ti9bx+sryMeAAgS70OK8G2kBD8L8QBAoLWU3g3vUVIc6D0txAMAsY+4jBWowXHO64gHBGKfYJ2T5qY1BxcL98BB+PQ+XiS9xxh9EQ8ChA6C5UXWIUoE9MBB8LVHQoS7ib8/dRn3sAcJ6bQRSdH96RDxIEH4QEX+AHF4LxHEAwUh12xyr1V8lwjiQYDYF8kuf1jluUQQDwrEvkhW8Wc6LhHUgwfhi4QPlHm7LRHawx4kpE191Dq8lgjhAYDQa1cftYrPEiE8OJDb40uqyzdQCA8WhAzL4G/PT4c3WrgHD2IfllGl53V37zsgHg5ApPNvVvq4Fn4spx4oiH1W3CwtEV+PDhEPJyBSkVX4aa7emkM83ICEKWpGM7wdvYCCeDgCEYpcwhLxczhEPFyBCEUWnRL5T6X59SBASBF+9l28TL5F7uEORCZyCUvEx+S7yT0cgoRVb9JaXLR1qUdfgksQ0fTbgmhFB20d8HAKEha14+F8f1sHPNyCiL6EqK+n20/rgIdjkFC0Ho1s6Gndvcc9ICkr/ey8/rHO6vp9KawL8DAFOV6l9Fyub7IbflsCag1qRfVsXWvxHjxIejU+BHZV6uvHD1XiEb++Bw8i+dNd+Wv0eCQmhcPhRPwUUt2DB5G1sfa1aeyzAuyJj9x2HjyIdKzIKw5SI14ieFtvo3kIQERj3lVhkUOnRD7AnjV5369QkAOJZeCH+Jh41xOLs73dQwAifY6dpxCCbjTDzLf1Bm1Y93tAIDOWXcLPvrHyr2hVoEAceEAgDQzB4jetk0/c2OXRHB48EJCpa4dgpYh2ETxtrshz7zx4ICCzfuTSDn8p/EOS9OTjwgMB+cABP3yWYuOPIofs33LigYCULlpZNXJppVU30Vf14kGAUCLijf1D71lN9FW9eFiA9KgZ8FPpPUsSnufGA+8hvAg2Kpz0nrX//qp+PIgpC3i6xJRITOye9fn1VT15ICCrVlQG5rywo0H8x965bVkNwmCYQ2kR6Gmb939WXV65dFnI/tPdjPBfO7XMN4EkTUJtqZp4sCJ1+8jwkhMu0KpMxFXFA8hlVfQSMxGH5mDK1VKV8QCyvTVtUiYyo7V358VStfGoAEFMhGYhEwloxZy9WKo2Hjwg5iSOvFDXeUYd33+PuVfHgwnEBWLocDJp+IIa2fyvperjwQRiXCKGosyXqoA+YfsIELuYu4HAt+msMknfDK4jfQJIzOZ2IPAQWJtFOhQKivR2IDZ6Awis7V0iLxqBI7uEZo19dakTogLSwKvf8yk8Jq6CGK0GKvWlatG7b7kkUU/Lo1gdXWn7/4E0j0qeJDpqN/ABqQcgJgdqURb4chjQktIugDS6wFFiz3JgaJj7AGJmholAe9YKhoZLJ0Ca6smjwJ4VwVN96gVIE5GM71kHaGKxGyAtRDaB2NBhLVmpHyANRKzDO28W7FS3HQFpaIWa8TrfCXQwegJSL5k+8M9UJ+pm9QTEnCIZrR0MDQeQ9ua0iCcYQaBTV0CqNXQW/yiyYG7W1heQanPaCkciBXuH1BkQJzHcDQxmpgGkPatl4WkbCXO/bW9AqlNg4H0PPMi6A1IxkQmOZ8D0ousNSMVEEuyreTAQ6Q7IRJeCX2YZQHhv6SrBOmpkM+YUzN0BqSRQCupmTeCP9wdkhiOREwtEzgGEsWcF9BhK9R8fQDiN7A8DiR0CKXQlj/q9IM8OgXjIzcKBlAHkD6FulgNzJwPIHwpo8mQAkX3LiPq9dKUMAQk9AqmcqmjuBAJCPQIpA4guIAsKJA0gnwNy3A4kDyBIHCEPxAwgf8gPILqA5AFEF5CxZX0lIHYc6rqADLf380BmFMgxgIzUyf8MJKLTRelKHgKy9wgkjfS7LiA0gKgC8vQn3HUA4RQ5LKPIAQciWbqIEg0YkLNDIHYUyqkCsmKN5vg3+W0AYTRATaPY+uu1IwS6UMGAlO6AFPjSCQMStaNh53cdcPG7Hx1Uupo+rx+Bltn1BuTAj5BptEV/bHAAwbnJMICwRmtUDOSEA8s4Rmtw3nITGD6TwUNoG0Ca7xi2YKSPj2eKXQFxQWKA2QbGMWEMMGseOb7C7T47uJS1JyAzVbTjqZdU3zbHzMXWS+qp4Fgn8Ahy/QCRGqQcwU1vGnN7fylboWn8Bzg//hyjxltvdcl45bwFfYKzFyBy11UU9BnjuoqfWizVlQXulpzBTNbaB5Aid+VRrkBFB630AMS9BC8FK2ggE7u/FGy1kvfcB9TKQufX5uUXNWl3EjvWCi4k/u9A3Ddq1CpTIQGe6VN1qd8ArcvDQNw3S41Kn6qQmOq5e7pRr+8fAYLiIJtFrrvYRMYL0q06vj8EZLXUriJzRY8H1xEagOCK7gkghRg6RQYO0I6aWPwIEAru80AiMWSdzAeuDXUKyr+WqpAID8hMHC1Ct8F4mUsQ6W8pJMICki0JHCBczAFdBl38G3VE6ErQhhWlih4LWrCSLpaqjggHiGe9mVjRY0YPoelyqcqIcIDEe97rqJFFH7FcLlUZEQ6Qg5plvZiBFNhtri1VFREGEC/Eg4nZoU5vqi1VFREGkIXDQ8xAIhzoT/WlKiLCAFIYPOQMxOPdjfWlKiLCADJRm3YGj+pDE2xktmmpaogwgMz8d8GrumZ4xzpbvinqISJ+hiTWm7wEqoJdI9JEV9JChAEkS3xCZzKecLcgN6YwlRBhAGmweTsblg6qKMM7Vmh321UQ4QAp1VfwhqVJIh+Wm03W0qV0EOEAybXtivkCmWrKeH2EZ/xBaSBCV2L9Re+LYSqJJIxDu1ew07U0EGEBcTtmHty4JuPtQhvLh1BAhK7Uvvq0GK484QZST0GvvFDqeSJ1IA0r2mfDljvqBoJ//rVsq7yZCA6kXgVkJ2f4ijIGMjOfMVsCBBORB2Jy+sM6ijNvaBUqmw/cStZ8EiKciHwp6Rp++88qmxXQeTUxDiJWJ9wSISvBicgXW+dypn1PqWTznlwgwdZdfiLHr5OELEAEASKvJFRE5JCPKbh8OxHdQKJU0crEzRXrJ/IEkFms6tGyrUw9kQeALFRXvK2iSzsRAAi6BLxM+60xdsqJAEBuXMAMxDLVp+gmAgC57/UT4qvVj3TVRCAgSAYL91aXtyNLzUQAIFhAiP8m0/NHOp+ILiBtPFKrs6bgSOcT0QTEB8nO3QR1yKslggKRf+m11UB0HOl8IlqAeCvauXuo8HnfIqIDyCw6G8XMcGiplMingMzCnbuHFp/3LSLPA4nUpqm5YkWNzwsQeQxIDsKjH5wVSU5qJPIJIIt4jjpqNBAekQeBfJOeHWS81FQoo4/I7UDcS3wUh0liTzLqiEgDqddx4ZHDrNZAACIAEMw88HPYWb0GAhABgEDmgf9Vb5oNBCByOxD3uqWYbCHVBgIQuRlIsbfwMEG5gQBE7gSyHMDsOayrxJvHBRC5B0hOxJH1nK4SlUE6QOR+IG6ju3iYQEqDdIDIzUDyZu/jMRHpS/OiRG4FkiPRfTw8kbrvIAJEACAIDpyHC1/GQHhEbgKSXwTyqIeEur6kixEBgABHOTr7YSX1MSFAhA0E307wUU76Y0KACAsI/tvCRzkF+iIuL0AEAYLbR2QOfvhKJ/obRESBxNt5rPSFXN4f7dyNdqMgEIbhAXWwJErT/e7/Wreb5HTT07QVgWSAeW5g7b4n8qOSUCRPEId4HP93SXp5dDNGRJFcQTxihSH+NW1Bb1cXKpIryJAwnG/zhl8ZcSP6jiKZghwRaaWLnP/AkcSKKJIniEcUs8QfjFLdEmRvkSxB4lfn0QN6DY+lshQpHiT96Dlr6r5hxRUpHST9ZEY71X7DOmOZQVZLsd5Q8wzrPxYYJDiKNqOBG1ZCkZKzrNXu6lHvkjChSFqQsdTPg45ApXtYaUXKr9TNuPcvqO2pVMkitFXAL2a79/qr3HQvVSTXUtofCl79RDXh5CDpw3pwu6+9kRlvtiI5VtPhmHLltT4EKVQkfb8pcOHrXqk6nBAksUjgpKtuYsskaxGKYT0+84uYgziE4YQgMdx0m8PRfis2MbL33PMXoVjD6PEunI4HSjDjStiJP08vQk9hZzQ7oH/geoLYCUBDW4rf4FqCDFt7THUO6B+4jiDn2XNTW7zf4hqCMND4BOsGyw+yAmh0x+QeFh7EeqD5Ce8nLDrI8NpbDyIWHIQNruo4GyAPlhrEzuixBxHLDDJMnfYgYolBricHNfjIdgMWF+Qyu+pkgX4HCwuymL57ELGkIHZG7z2IWE6Q5VV7vGMhQewbtMcZiwhyHj26ne9+xs8PcvDQHnFFqCD7Au0RW4TK+fOKqw4eoOcqYqgU53HR3/5uShFPCfKey9hFDyJO/vAi7RDZnp7X5igyUH72xSDW1E2Pn4tMRCQgR8vLwbgii4gcmLvqQcSPGtIPX3M08wn6I4qYQ94cM/Yw9Xxhmw+X/59wHrtMlX1AmIkzdyaaAnLg1Nnw8WGYSk40X/BOh4+El6LMSBnN2Cd0tPq4w/LJXGrMbCX06PZ2dcM65yzlNertShSHf3SzRAyPM332IcSAHUKPi8EHmXU0l8Uglmni0yipDoi16s+jJKejhywLooz68yiMEcHr2qM4h81CJ++VPJfTu5UwBpv4Pp9DJSi6MJx0bvUwiw4ewgT8zNR0LHUL+OccOpY/3ElzyGKD5pBlMJpDlsOkMythRoNbXh95PJsdA67MrMtAEYbjeDqNo+7oKqWUUkoppZRSSimllFJKFfMXp4vmSjB8n6sAAAAASUVORK5CYII="),tat.IMAGE}dispose(){super.dispose(),this.started=!1,delete this._audio}ready(){super.ready(),this._audio=new Audio,this._audio.addEventListener("canplay",(()=>{this.started&&this._audio.play()}));var{src:t="",loop:e=!1,started:r=!1}=this.state;this.onchangeSrc(t),this.onchangeLoop(e),this.onchangeStarted(r)}render(t){var{left:e,top:r,width:n,height:i,src:a}=this.state;t.beginPath(),this.drawImage(t,tat.image,e,r,n,i)}get nature(){return $it}get hasTextProperty(){return!1}get src(){return this.get("src")}set src(t){this.set("src",t)}get started(){return!!this.get("started")}set started(t){this.set("started",t)}start(){this._audio&&(this._audio.classList.add("active"),this._audio.play())}pause(){this._audio&&(this._audio.classList.remove("active"),this._audio.pause())}onchangeSrc(t){try{"data"!==String(t).substring(0,4)?this._audio.crossOrigin="use-credentials":this._audio.crossOrigin=null,this._audio.src="string"==typeof t?this.app.url(t):t}catch(t){return void console.error(t)}}onchangeStarted(t){const e=this._audio;t?4==e.readyState&&e.play():e.pause()}onchangeLoop(t){this._audio.loop=t}onchange(t,e){"src"in t&&this.onchangeSrc(t.src),"started"in t&&this.onchangeStarted(t.started),"loop"in t&&this.onchangeLoop(t.loop)}ondblclick(t){this.started=!this.started}ondropfile(t,e){for(let r=0;r<t.length;r++)if(t[r].type.startsWith("audio/"))return void(this.src=e[r])}}Btt.register("audio",tat);class eat extends(Utt(Btt)){is3dish(){return!0}}Btt.register("text",eat);const rat=["refid","left","top","width","height","rotation","animation"];class nat extends lit{isGroup(){return!0}get(t){return this._model[t]}set(t,e){if("string"==typeof t)return this.set({[t]:e});var r=rat.reduce(((e,r)=>(t.hasOwnProperty(r)&&(e[r]=t[r]),e)),{});return super.set(r)}capture(t,e,r){var n=super.capture(t,e,r);if(n!==this)return n}set bounds(t){if(this.__MUTATING__)super.bounds=t;else{var e=this.bounds,r=t.width/e.width,n=t.height/e.height;this.path=this.path.map((i=>({x:t.left+(i.x-e.left)*r,y:t.top+(i.y-e.top)*n}))),this.components&&this.components.forEach((t=>{if(t.mutable)t.mutatePath(null,(function(t){return t.map((function(t){return{x:t.x*r,y:t.y*n}}))}));else{let e=t.bounds,i=t.center,a={x:i.x*(1-r),y:i.y*(1-n)},o=e.width*(1-r),s=e.height*(1-n),c=-(a.x-o/2),u=-(a.y-s/2);t.bounds={left:e.left+c,top:e.top+u,width:e.width*r,height:e.height*n}}}))}}get focusible(){return!1}get bounds(){return super.bounds}get hasTextProperty(){return!1}calculateBounds(){this.clearCache(),this.__MUTATING__=!0,this.mutateBounds((function(t){var e=Btt.union(this.components.map((t=>t.bounds)));return this.components.forEach((t=>{let r=t.bounds;t.bounds={left:r.left-e.left,top:r.top-e.top,width:r.width,height:r.height}})),{left:t.left+e.left,top:t.top+e.top,width:e.width,height:e.height}}),this),this.__MUTATING__=!1,this.parent.isGroup()&&this.parent.calculateBounds()}render(t){}postrender(t){var{top:e,left:r,scale:n}=this.state;t.translate(r,e),this.layout.drawables(this).forEach((e=>{e.draw(t)})),t.translate(-r,-e)}}Btt.register("group",nat);const iat={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"id-input",label:"ref",name:"ref"},{type:"select",label:"fit",name:"fit",property:{options:["both","ratio"]}}],"value-property":"ref",help:"scene/component/local-ref"};class aat extends(Utt(Ntt)){get ref(){var t=this.getState("ref");return t&&"string"==typeof t?this.root.findById(t):null}set ref(t){this.setState("ref",t)}get refScale(){let t=this.ref.bounds,e=this.bounds,r=e.width/t.width,n=e.height/t.height;return"both"===this.model.fit?{x:r,y:n}:{x:Math.min(r,n),y:Math.min(r,n)}}draw(t){this._drawing||(this._drawing=!0,super.draw(t),this._drawing=!1)}prerender(t){if(super.prerender(t),this.ref){let e=this.ref.center,r=this.center,n=this.refScale;t.translate(r.x,r.y),t.scale(n.x,n.y),t.translate(-e.x,-e.y)}}postrender(t){if(this.ref)return this.ref.postrender(t);super.postrender(t)}render(t){if(this.ref)return this.ref.render(t);this.state;var{left:e,top:r,width:n,height:i}=this.bounds;t.beginPath(),t.rect(e,r,n,i)}get nature(){return iat}get hasTextProperty(){return!1}}Btt.memoize(aat.prototype,"ref",!1),Btt.memoize(aat.prototype,"refScale",!1),Btt.register("local-ref",aat);class oat extends(oit(met)){render(t){}get layout(){return Xtt.get(this.get("layout"))||Vtt}}const sat={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"board-selector",label:"scene-number",name:"ref",placeholder:"SCENE-1"},{type:"select",label:"fit",name:"fit",property:{options:["both","ratio"]}},{type:"select",label:"mode",name:"mode",property:{options:["view","interaction"]}}],"value-property":"ref",help:"scene/component/global-ref"};class cat extends oat{dispose(){this._releaseRef(),super.dispose()}get nature(){return sat}get hasTextProperty(){return!1}get tagName(){return"div"}setElementProperties(t){var{mode:e="view"}=this.state;t.style.pointerEvents="view"==e?"none":"inherit"}ready(){super.ready(),this.fetchRef()}reposition(){if(!this.element)return;super.reposition();let t=this._element_bounds,{offsetWidth:e,offsetHeight:r}=this.element;if(this._element_bounds={offsetWidth:e,offsetHeight:r},(!t||t.offsetWidth!=e||t.offsetHeight!=r)&&this.ref&&this.root.target_element){let{fit:t="ratio"}=this.state;this.ref.fit(t)}}async fetchRef(){this._releaseRef();var{ref:t,fit:e="ratio"}=this.state;if(t){var r=this.app.refProvider;if(r&&t)try{this.__ref=await r.get(t,!0),this.__ref.target=this.element,this.__ref.fit(e),this.__ref.data=this.data}catch(t){y9(t)}}}get ref(){return this.__ref}set ref(t){this.setState("ref",t)}_releaseRef(){this.__ref&&this.__ref.release&&this.__ref.release(),delete this.__ref}onchange(t,e,r){super.onchange(t,e,r),"ref"in t&&this.fetchRef(),"fit"in t&&this.ref&&requestAnimationFrame((()=>{let{fit:t}=this.state;this.ref.fit(t)})),"data"in t&&this.ref&&requestAnimationFrame((()=>{this.ref.data=t.data}))}}Btt.register("global-ref",cat);const uat={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"board-selector",label:"board",name:"board"},{type:"checkbox",label:"modal",name:"modal"},{type:"checkbox",label:"closable",name:"closable"},{type:"checkbox",label:"show",name:"show"},{type:"select",label:"location",name:"location",property:{options:["center","left-top","right-top","left-bottom","right-bottom","auto"]}},{type:"data",label:"value",name:"value"}],help:"scene/component/popup"};class lat extends(Utt(Ntt)){static get image(){return lat._image||(lat._image=new Image,lat._image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAMAAABG8BK2AAADJmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4xLWMwMDAgNzkuZGFiYWNiYiwgMjAyMS8wNC8xNC0wMDozOTo0NCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIzLjAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RkM4QzQxNUMzMzBEMTFFQ0JEMzZDMDUwQUI4MEI3QTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RkM4QzQxNUQzMzBEMTFFQ0JEMzZDMDUwQUI4MEI3QTAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpENjlENTQ3RjMzMDkxMUVDQkQzNkMwNTBBQjgwQjdBMCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpENjlENTQ4MDMzMDkxMUVDQkQzNkMwNTBBQjgwQjdBMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsiUYSQAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA51BMVEVHcEwzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzOguTm2AAAATHRSTlMARhB73r9B7YLrsqdE+0cq9Avzeg31eQx4aQ+Ks6aUd5DsYKixEX1w8vyT2VjoZ3YezY/cCEDvl+QTvRwJ0ifwK/5T/aw6+IuFuCImAcS6MQAAAeJJREFUWMPt2FlX2zAQhuHJYmOSFhIggbC0QNn3rS1dKXSH9///Hi58CJLxKIpEWi6YO8c5z4lG/nxGEXmu/1OVLGnhrFaSVQYg1SZetTTvUibqeFZ9QlfmvRWoV1VmCaCRzroXPpsuAjTV7gLUfPahBqD1OQMW/fazAWTKvQRI/ZgUSJR7U8CM/dHZ+/2VcatWdvdEZAaYUhiAwkerJXt0rnzXwdRKmHfDM0fHD5kxjTFyVLzVfvvirn7+cDJWjhy7c7XlYuwc6Urvu2tRhRypyhwAf1sKY+TIxfQA+H39q5wxc+RgVrcBduTmZTlj5khnDgH4IzKpMGaOVCbvyyvRGTNHGtPrKypjXirM5jb910I4k69oQeKY+77EMAcALEsck/+W6f71tyCma/ZFROTrJVwMy7wmf3bv6/MX+Dgkkysblvxps/dhOKZb6IvrTakzXXuPApnpYneDGOeKvJlaSXcDmA7AicQyW84VeTOnY+NdiWcG1uiZksFEHdyAlsJEjEkmkwGNsKHNZCJGSKtVTYC1tO022mnjwUBrMdXg8dreuOBhv7D/62/8lGZ1wLxXyZKOm+iUHIQintyny0TkaATHjYgcjeAoFpEje9R/nGPqIx2aw3NU9odCQI6e6x/VLY32cKQXVBnkAAAAAElFTkSuQmCC"),lat._image}ready(){super.ready(),this.show&&this.onchangeShow(!0)}render(t){var{left:e,top:r,width:n,height:i}=this.bounds;t.beginPath(),this.drawImage(t,lat.image,e,r,n,i)}onchange(t,e){"value"in t?this.show?this.onchangeShow(!0):this.show=!0:"show"in t&&this.onchangeShow(this.show)}onchangeShow(t){!this.app.isEditMode&&this.getState("board")&&(t?iet.show(this,this.board,{location:this.getState("location"),modal:this.getState("modal"),closable:this.getState("closable")||!1,data:this.value}):iet.hide(this))}get board(){return this.getState("board")}set board(t){this.set("board",t)}get show(){return this.getState("show")}set show(t){this.setState("show",t)}get started(){return this.getState("show")}set started(t){this.setState("show",t)}get value(){return this.getState("value")}set value(t){this.setState("value",t)}get hasTextProperty(){return!1}get nature(){return uat}}Btt.register("popup",lat);class hat extends Btt{render(t){var{path:e=[]}=this.state;if(!(e.length<=1)){t.beginPath(),t.moveTo(e[0].x,e[0].y);for(let r=1;r<e.length;r++)t.lineTo(e[r].x,e[r].y);t.closePath(),this.drawStroke(t)}}get path(){return this.model.path}set path(t){this.set("path",t)}contains(t,e){var r=this.state.path,n=!1;return r.forEach(((i,a)=>{let o=(a+r.length+1)%r.length,s=i.x,c=i.y,u=r[o].x,l=r[o].y;c>e!=l>e&&t<(u-s)*(e-c)/(l-c)+s&&(n=!n)})),n}}Btt.register("path",hat);const fat={mutable:!0,resizable:!1,rotatable:!0,properties:[{type:"number",label:"round",name:"round",property:{min:0,max:100,step:1}}],help:"scene/component/triangle"};class dat extends Ntt{contains(t,e){var{x1:r,y1:n,x2:i,y2:a,x3:o,y3:s}=this.state,c=[r,n,i,a,o,s],u=!1;for(let r=0;r<c.length;r+=2){let n=(r+2)%c.length,i=c[r],a=c[r+1],o=c[n+1];a>e!=o>e&&t<(c[n]-i)*(e-a)/(o-a)+i&&(u=!u)}return u}get mutable(){return!0}get path(){var{x1:t,y1:e,x2:r,y2:n,x3:i,y3:a}=this.state;return[{x:t,y:e},{x:r,y:n},{x:i,y:a}]}set path(t){this.set({x1:t[0].x,y1:t[0].y,x2:t[1].x,y2:t[1].y,x3:t[2].x,y3:t[2].y})}get nature(){return fat}}Btt.memoize(dat.prototype,"path",!1),Btt.register("triangle",dat);const pat={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"ratio",name:"ratio",property:"ratio"}],help:"scene/component/donut"};var gat={ondragmove:function(t,e,r){r.controls;var{cx:n,rx:i}=r.model;i=Math.abs(i);var a=(r.transcoordP2S(t.x,t.y).x-n)/i*100;a=a>=100||a<=-100?100:Math.abs(a),r.set({ratio:a})}};class vat extends Mit{is3dish(){return!1}render(t){var{ratio:e=50,cx:r,cy:n,rx:i,ry:a,startAngle:o,endAngle:s,anticlockwise:c}=this.state;i=Math.abs(i),a=Math.abs(a),t.beginPath(),t.ellipse(r,n,i,a,0,o||0,s||2*Math.PI,c),t.moveTo(r+i/100*e,n),t.ellipse(r,n,i/100*e,a/100*e,0,o||0,s||2*Math.PI,!0)}contains(t,e){var{cx:r,cy:n,rx:i,ry:a,ratio:o}=this.state,s=(t-r)/(2*(i=Math.abs(i))-.5),c=(e-n)/(2*(a=Math.abs(a))-.5),u=(t-r)/(i/100*o*2-.5),l=(e-n)/(a/100*o*2-.5),h=!1;return s*s+c*c<.25&&u*u+l*l>.25&&(h=!h),h}get controls(){var{cx:t,cy:e,rx:r,ratio:n}=this.state;return[{x:t+(r=Math.abs(r))/100*n,y:e,handler:gat}]}get nature(){return pat}}Btt.memoize(vat.prototype,"controls",!1),Btt.register("donut",vat);const mat={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"ratio",name:"ratio",property:"ratio"},{type:"number",label:"wing",name:"wing",property:"wing"}],help:"scene/component/star"};var yat={ondragmove:function(t,e,r){r.controls;var{cy:n,ry:i}=r.model,a=(r.transcoordP2S(t.x,t.y).y-n)/i*100+100;a>=100?a=100:a<=0&&(a=0),r.set({ratio:a})}};class bat extends Mit{is3dish(){return!1}render(t){var{ratio:e=30,wing:r=5,cx:n,cy:i,rx:a,ry:o,startAngle:s,endAngle:c,anticlockwise:u}=this.state;if(r<3)return;const l=1.5707963267948966;var h=2*Math.PI/r,f=a-e/100*a,d=o-e/100*o;t.save(),t.beginPath(),t.translate(n,i),t.moveTo(a*Math.cos(-l),o*Math.sin(-l)),t.lineTo((a-f)*(Math.cos(h-l)+Math.cos(0-l))/2,(o-d)*(Math.sin(h-l)+Math.sin(0-l))/2);for(var p=1;p<r;p++)t.lineTo(a*Math.cos(h*p-l),o*Math.sin(h*p-l)),t.lineTo((a-f)*(Math.cos(h*(p+1)-l)+Math.cos(h*p-l))/2,(o-d)*(Math.sin(h*(p+1)-l)+Math.sin(h*p-l))/2);t.closePath(),t.restore()}get controls(){var{cx:t,cy:e,ry:r,ratio:n}=this.state;return[{x:t,y:e-r+r*(n/100),handler:yat}]}get nature(){return mat}}Btt.memoize(bat.prototype,"controls",!1),Btt.register("star",bat);var xat=t=>class extends t{animOnValueChange(t,e=!1,r){if(t!=this._lastValue){if(e)var n=t-(Number(r)||0);else n=t-(this._lastValue||0);this._lastValue=t,this._anim_alpha=-n,this.animate({step:t=>{this._anim_alpha=n*(t-1),this.invalidate()},duration:1e3,delta:"circ",options:{x:1},ease:"out"}).start()}}dispose(){super.dispose(),delete this._value_substitutor}onchange(t,e){t.hasOwnProperty("value")&&delete this._value_substitutor}get animAlpha(){return this._anim_alpha||0}get animValue(){return(this._lastValue||0)+(this._anim_alpha||0)}defaultValueSubstitutor(){return this.getState("value")}get valueSubstitutor(){return this._value_substitutor||(this._value_substitutor=Ptt(this.getState("value"),this)||this.defaultValueSubstitutor),this._value_substitutor}get value(){return Number(this.valueSubstitutor())||0}set value(t){delete this._value_substitutor,this.setState("value",Number(o9(t)))}},wat=t=>class extends t{_convertDataFormat(t,e){var r;if("json"===e)r=JSON.parse(t);else r=t;return r}isDataSource(){return!0}},Aat=new WeakSet;class _at{static get residents(){return Aat}constructor(t,e){this.counters={},this.references={},this.creator=t,this.disposer=e,Aat.add(this)}dispose(){if(this.disposer)for(let t in this.references)this.disposer.call(null,t,this.references[t]);delete this.references,delete this.counters}get ids(){return Object.keys(this.references)}add(t,e){var r=this,n=new Promise((function(n,i){var a=r.references[t];if(a)a===e?i(Error("Reference ID and target duplicate")):e?i(Error("Reference ID duplicate")):n(a);else{function o(e){e.release=function(){r.release(this)},r.references[t]=e,r.counters[t]=1,n(e)}if(e)o(e);else{if(!r.creator)return void i(Error("Reference id("+t+") is not allowed. Reference creator should be defined."));r.creator.call(null,t,(function(t){o(t)}),(function(t){i(t)}))}}}));return this.references[t]||(this.references[t]=n),n}async get(t,e){var r=this.references[t];if(r){if(!(r instanceof Promise)){if(!(t in this.counters))throw new Error("No Reference Count");return this.counters[t]++,r}if(e)return r=await r,this.counters[t]++,r}if(e)return await this.add(t);throw new Error("No References for "+t)}_id(t){for(let e in this.references){if(this.references[e]===t)return e}return-1}release(t){var e=this._id(t),r=this.references[e];r?(this.counters[e]--,0==this.counters[e]&&(this.disposer&&this.disposer.call(null,e,r),delete this.references[e],delete this.counters[e],delete t.release,x9("RELEASED",e))):y9("No Referenced ID")}}var kat={},Eat={},Sat=[];function Mat(t){var e="SCRIPT"==t.target.tagName?kat:Eat,r=t.target.src||t.target.href;e[r]=!0,Sat.forEach(((t,n)=>{let{resolve:i,scripts:a,styles:o}=t;if(e==kat){let t=a.indexOf(r);t>-1&&t<a.length-1&&Pat(a[t+1])}for(let t=0;t<a.length;t++)if(!kat[a[t]])return;if(o)for(let t=0;t<o.length;t++)if(!Eat[o[t]])return;i(),Sat[n]=null})),Sat=Sat.filter(Boolean)}function Tat(t){var e=t.target.src,r="SCRIPT"==t.target.tagName?kat:Eat;Sat.forEach(((n,i)=>{let{reject:a,scripts:o,styles:s}=n,c=!1;if(r===kat){for(let t=0;t<o.length;t++)if(o[t]==e){c=!0;break}}else if(s)for(let t=0;t<s.length;t++)if(s[t]==e){c=!0;break}c&&(a(t),Sat[i]=null)})),Sat=Sat.filter(Boolean),delete r[e],document.head.removeChild(t.target)}function Pat(t){kat[t]=!1;var e=document.createElement("script");e.onload=Mat,e.onerror=Tat,e.type="text/javascript",e.src=t,document.head.appendChild(e)}class Oat{static load(t,e){return"string"==typeof t&&(t=[t]),"string"==typeof e&&(e=[e]),new Promise((function(r,n){if((!t||t instanceof Array)&&(!e||e instanceof Array)){var i,a=!0;if(e&&e.forEach((t=>{Eat.hasOwnProperty(t)||function(t){Eat[t]=!1;var e=document.createElement("link");e.onload=Mat,e.onerror=Tat,e.type="text/css",e.rel="stylesheet",e.media="screen,print",e.href=t,document.head.appendChild(e)}(t),Eat[t]||(a=!1)})),t&&t.length>0&&t.forEach((t=>{kat.hasOwnProperty(t)?kat[t]||(a=!1):i=i||t})),i)Pat(i);else if(a)return void r();Sat.push({resolve:r,reject:n,scripts:t,styles:e})}else n("invalid sources for load")}))}}const Iat="0.0.0";var Rat=0,Cat=performance.now(),jat=0;function Dat(){return Rat}requestAnimationFrame((function t(){requestAnimationFrame(t),jat++;var e=performance.now(),r=e-Cat;r<1e3||(Rat=Math.round(1e3*jat/r),Cat=e,jat=0)}));var Lat=frt;function zat(){}export{aet as AbsoluteLayout,tat as AudioPlayer,set as CardLayout,Btt as Component,ket as Connectable,lit as Container,met as ContainerAbstract,R9 as DEFAULT,P9 as DPPX,wat as DataSource,vat as Donut,Mit as Ellipse,Dnt as EventMap,Dat as FPS,O9 as GESTURES,Zit as GifView,cat as GlobalRef,nat as Group,Vtt as HTMLAbsoluteLayout,oat as HTMLOverlayContainer,Fit as HTMLOverlayElement,zit as ImageView,Wtt as InfoWindow,I9 as KEYEVENTS,yet as Layer,Xtt as Layout,Eit as Line,uet as LinearHorizontalLayout,fet as LinearVerticalLayout,aat as LocalRef,T9 as MAX_UNDO_SIZE,S9 as MODE_ADD,k9 as MODE_EDIT,E9 as MODE_SHIFT,_9 as MODE_VIEW,Lat as Model,get as MoveHandle,A9 as NOTHING,Dit as OrthoLine,hat as Path,Oit as Polygon,Cit as Polyline,lat as Popup,Pet as Rect,Utt as RectPath,_at as ReferenceMap,Gnt as RootContainer,Iet as Ruler,M9 as SCENE_MODE,rit as Scene,iet as ScenePopup,Oat as ScriptLoader,Ntt as Shape,bat as Star,det as TableLayout,eat as Text,dat as Triangle,xat as ValueHolder,iit as create,x9 as debug,y9 as error,zat as license,OZ as polyfill,Iat as version,b9 as warn};console.log("@hatiolab/things-scene@3.2.17 is loaded");