@geops/rvf-mobility-web-component 0.1.73 → 0.1.74
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/.vscode/settings.json +2 -0
- package/.yarnrc.yml +1 -0
- package/CHANGELOG.md +7 -0
- package/index.js +7 -4
- package/package.json +2 -2
- package/src/MobilityNotifications/MobilityNotifications.tsx +9 -4
- package/src/RvfFeatureDetails/RvfLineNetworkDetails/RvfLineNetworkDetails.tsx +0 -2
- package/src/RvfSingleClickListener/RvfSingleClickListener.tsx +0 -2
- package/src/SituationDetails/SituationDetails.tsx +1 -0
- package/src/utils/hooks/useInitialPermalink.tsx +1 -1
- package/src/utils/hooks/useLnpLineInfo.tsx +97 -0
package/index.js
CHANGED
|
@@ -830,7 +830,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
830
830
|
`)&&r.flags==="s")})});var mj=W2((GQ1,gj)=>{"use strict";var Ea1=d0(),Ta1=Q6(),Ia1=Ta1.RegExp;gj.exports=Ea1(function(){var r=Ia1("(?<a>b)","g");return r.exec("b").groups.a!=="b"||"b".replace(r,"$<a>c")!=="bc"})});var jm=W2((jQ1,yj)=>{"use strict";var Xh=yi(),Gm=f0(),Fa1=W4(),Pa1=GE(),Ra1=WE(),za1=Lm(),Da1=Tp(),ka1=Cp().get,Oa1=Cj(),Za1=mj(),Na1=za1("native-string-replace",String.prototype.replace),Vm=RegExp.prototype.exec,tT=Vm,Ua1=Gm("".charAt),Qa1=Gm("".indexOf),Ha1=Gm("".replace),JE=Gm("".slice),eT=(function(){var r=/a/,t=/b*/g;return Xh(Vm,r,"a"),Xh(Vm,t,"a"),r.lastIndex!==0||t.lastIndex!==0})(),vj=Ra1.BROKEN_CARET,rT=/()??/.exec("")[1]!==void 0,Va1=eT||rT||vj||Oa1||Za1;Va1&&(tT=function(t){var e=this,i=ka1(e),o=Fa1(t),n=i.raw,l,A,d,L,C,y,E;if(n)return n.lastIndex=e.lastIndex,l=Xh(tT,n,o),e.lastIndex=n.lastIndex,l;var B=i.groups,Z=vj&&e.sticky,Q=Xh(Pa1,e),V=e.source,G=0,J=o;if(Z&&(Q=Ha1(Q,"y",""),Qa1(Q,"g")===-1&&(Q+="g"),J=JE(o,e.lastIndex),e.lastIndex>0&&(!e.multiline||e.multiline&&Ua1(o,e.lastIndex-1)!==`
|
|
831
831
|
`)&&(V="(?: "+V+")",J=" "+J,G++),A=new RegExp("^(?:"+V+")",Q)),rT&&(A=new RegExp("^"+V+"$(?!\\s)",Q)),eT&&(d=e.lastIndex),L=Xh(Vm,Z?A:e,J),Z?L?(L.input=JE(L.input,G),L[0]=JE(L[0],G),L.index=e.lastIndex,e.lastIndex+=L[0].length):e.lastIndex=0:eT&&L&&(e.lastIndex=e.global?L.index+L[0].length:d),rT&&L&&L.length>1&&Xh(Na1,L[0],A,function(){for(C=1;C<arguments.length-2;C++)arguments[C]===void 0&&(L[C]=void 0)}),L&&B)for(L.groups=y=Da1(null),C=0;C<B.length;C++)E=B[C],y[E[0]]=L[E[1]];return L});yj.exports=tT});var xj=W2(()=>{"use strict";var Ga1=F9(),_j=jm();Ga1({target:"RegExp",proto:!0,forced:/./.exec!==_j},{exec:_j})});var qm=W2((WQ1,Sj)=>{"use strict";xj();var wj=yi(),bj=cl(),ja1=jm(),Mj=d0(),Bj=Y8(),qa1=Nh(),Ka1=Bj("species"),iT=RegExp.prototype;Sj.exports=function(r,t,e,i){var o=Bj(r),n=!Mj(function(){var L={};return L[o]=function(){return 7},""[r](L)!==7}),l=n&&!Mj(function(){var L=!1,C=/a/;return r==="split"&&(C={},C.constructor={},C.constructor[Ka1]=function(){return C},C.flags="",C[o]=/./[o]),C.exec=function(){return L=!0,null},C[o](""),!L});if(!n||!l||e){var A=/./[o],d=t(o,""[r],function(L,C,y,E,B){var Z=C.exec;return Z===ja1||Z===iT.exec?n&&!B?{done:!0,value:wj(A,C,y,E)}:{done:!0,value:wj(L,y,C,E)}:{done:!1}});bj(String.prototype,r,d[0]),bj(iT,o,d[1])}i&&qa1(iT[o],"sham",!0)}});var Fj=W2(($Q1,Ij)=>{"use strict";var nT=f0(),Wa1=gp(),$a1=W4(),Xa1=Xn(),Ya1=nT("".charAt),Ej=nT("".charCodeAt),Ja1=nT("".slice),Tj=function(r){return function(t,e){var i=$a1(Xa1(t)),o=Wa1(e),n=i.length,l,A;return o<0||o>=n?r?"":void 0:(l=Ej(i,o),l<55296||l>56319||o+1===n||(A=Ej(i,o+1))<56320||A>57343?r?Ya1(i,o):l:r?Ja1(i,o,o+2):(l-55296<<10)+(A-56320)+65536)}};Ij.exports={codeAt:Tj(!1),charAt:Tj(!0)}});var Km=W2((XQ1,Pj)=>{"use strict";var ts1=Fj().charAt;Pj.exports=function(r,t,e){return t+(e?ts1(r,t).length:1)}});var Dj=W2((YQ1,zj)=>{"use strict";var es1=Q6(),rs1=d0(),Rj=es1.RegExp,is1=!rs1(function(){var r=!0;try{Rj(".","d")}catch{r=!1}var t={},e="",i=r?"dgimsy":"gimsy",o=function(d,L){Object.defineProperty(t,d,{get:function(){return e+=L,!0}})},n={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};r&&(n.hasIndices="d");for(var l in n)o(l,n[l]);var A=Object.getOwnPropertyDescriptor(Rj.prototype,"flags").get.call(t);return A!==i||e!==i});zj.exports={correct:is1}});var Wm=W2((JQ1,Oj)=>{"use strict";var ns1=yi(),os1=Yn(),as1=up(),kj=Dj(),ss1=GE(),ls1=RegExp.prototype;Oj.exports=kj.correct?function(r){return r.flags}:function(r){return!kj.correct&&as1(ls1,r)&&!os1(r,"flags")?ns1(ss1,r):r.flags}});var $m=W2((tH1,Nj)=>{"use strict";var Zj=yi(),cs1=I9(),us1=k0(),hs1=sl(),As1=jm(),ds1=TypeError;Nj.exports=function(r,t){var e=r.exec;if(us1(e)){var i=Zj(e,r,t);return i!==null&&cs1(i),i}if(hs1(r)==="RegExp")return Zj(As1,r,t);throw new ds1("RegExp#exec called on incompatible receiver")}});var Hj=W2(()=>{"use strict";var fs1=yi(),ps1=f0(),Ls1=qm(),Cs1=I9(),gs1=f7(),ms1=Tc(),Xm=W4(),vs1=Xn(),ys1=Sc(),_s1=Km(),xs1=Wm(),Uj=$m(),Qj=ps1("".indexOf);Ls1("match",function(r,t,e){return[function(o){var n=vs1(this),l=gs1(o)?ys1(o,r):void 0;return l?fs1(l,o,n):new RegExp(o)[r](Xm(n))},function(i){var o=Cs1(this),n=Xm(i),l=e(t,o,n);if(l.done)return l.value;var A=Xm(xs1(o));if(Qj(A,"g")===-1)return Uj(o,n);var d=Qj(A,"u")!==-1;o.lastIndex=0;for(var L=[],C=0,y;(y=Uj(o,n))!==null;){var E=Xm(y[0]);L[C]=E,E===""&&(o.lastIndex=_s1(n,ms1(o.lastIndex),d)),C++}return C===0?null:L}]})});var Gj=W2((iH1,Vj)=>{"use strict";var sT=f0(),ws1=Ap(),bs1=Math.floor,oT=sT("".charAt),Ms1=sT("".replace),aT=sT("".slice),Bs1=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ss1=/\$([$&'`]|\d{1,2})/g;Vj.exports=function(r,t,e,i,o,n){var l=e+r.length,A=i.length,d=Ss1;return o!==void 0&&(o=ws1(o),d=Bs1),Ms1(n,d,function(L,C){var y;switch(oT(C,0)){case"$":return"$";case"&":return r;case"`":return aT(t,0,e);case"'":return aT(t,l);case"<":y=o[aT(C,1,-1)];break;default:var E=+C;if(E===0)return L;if(E>A){var B=bs1(E/10);return B===0?L:B<=A?i[B-1]===void 0?oT(C,1):i[B-1]+oT(C,1):L}y=i[E-1]}return y===void 0?"":y})}});var Wj=W2(()=>{"use strict";var Es1=hE(),jj=yi(),Jm=f0(),Ts1=qm(),Is1=d0(),Fs1=I9(),Ps1=k0(),Rs1=f7(),zs1=gp(),Ds1=Tc(),Pc=W4(),ks1=Xn(),Os1=Km(),Zs1=Sc(),Ns1=Gj(),Us1=Wm(),Qs1=$m(),Hs1=Y8(),cT=Hs1("replace"),Vs1=Math.max,Gs1=Math.min,js1=Jm([].concat),lT=Jm([].push),Ym=Jm("".indexOf),qj=Jm("".slice),qs1=function(r){return r===void 0?r:String(r)},Ks1=(function(){return"a".replace(/./,"$0")==="$0"})(),Kj=(function(){return/./[cT]?/./[cT]("a","$0")==="":!1})(),Ws1=!Is1(function(){var r=/./;return r.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(r,"$<a>")!=="7"});Ts1("replace",function(r,t,e){var i=Kj?"$":"$0";return[function(n,l){var A=ks1(this),d=Rs1(n)?Zs1(n,cT):void 0;return d?jj(d,n,A,l):jj(t,Pc(A),n,l)},function(o,n){var l=Fs1(this),A=Pc(o);if(typeof n=="string"&&Ym(n,i)===-1&&Ym(n,"$<")===-1){var d=e(t,l,A,n);if(d.done)return d.value}var L=Ps1(n);L||(n=Pc(n));var C=Pc(Us1(l)),y=Ym(C,"g")!==-1,E;y&&(E=Ym(C,"u")!==-1,l.lastIndex=0);for(var B=[],Z;Z=Qs1(l,A),!(Z===null||(lT(B,Z),!y));){var Q=Pc(Z[0]);Q===""&&(l.lastIndex=Os1(A,Ds1(l.lastIndex),E))}for(var V="",G=0,J=0;J<B.length;J++){Z=B[J];for(var n1=Pc(Z[0]),r1=Vs1(Gs1(zs1(Z.index),A.length),0),m1=[],w1,B1=1;B1<Z.length;B1++)lT(m1,qs1(Z[B1]));var g1=Z.groups;if(L){var L1=js1([n1],m1,r1,A);g1!==void 0&&lT(L1,g1),w1=Pc(Es1(n,void 0,L1))}else w1=Ns1(n1,A,r1,m1,g1,n);r1>=G&&(V+=qj(A,G,r1)+w1,G=r1+n1.length)}return V+qj(A,G)}]},!Ws1||!Ks1||Kj)});var Xj=W2((aH1,$j)=>{"use strict";var $s1=f7(),Xs1=sl(),Ys1=Y8(),Js1=Ys1("match");$j.exports=function(r){var t;return $s1(r)&&((t=r[Js1])!==void 0?!!t:Xs1(r)==="RegExp")}});var tv=W2((sH1,Yj)=>{"use strict";var tl1=Xj(),el1=TypeError;Yj.exports=function(r){if(tl1(r))throw new el1("The method doesn't accept regular expressions");return r}});var ev=W2((lH1,Jj)=>{"use strict";var rl1=Y8(),il1=rl1("match");Jj.exports=function(r){var t=/./;try{"/./"[r](t)}catch{try{return t[il1]=!1,"/./"[r](t)}catch{}}return!1}});var rq=W2(()=>{"use strict";var nl1=F9(),ol1=wp(),al1=fp().f,sl1=Tc(),tq=W4(),ll1=tv(),cl1=Xn(),ul1=ev(),hl1=j4(),Al1=ol1("".slice),dl1=Math.min,eq=ul1("startsWith"),fl1=!hl1&&!eq&&!!(function(){var r=al1(String.prototype,"startsWith");return r&&!r.writable})();nl1({target:"String",proto:!0,forced:!fl1&&!eq},{startsWith:function(t){var e=tq(cl1(this));ll1(t);var i=sl1(dl1(arguments.length>1?arguments[1]:void 0,e.length)),o=tq(t);return Al1(e,i,i+o.length)===o}})});var nq=W2((hH1,iq)=>{"use strict";var pl1=Y8(),Ll1=Tp(),Cl1=is().f,uT=pl1("unscopables"),hT=Array.prototype;hT[uT]===void 0&&Cl1(hT,uT,{configurable:!0,value:Ll1(null)});iq.exports=function(r){hT[uT][r]=!0}});var aq=W2((AH1,oq)=>{"use strict";var gl1=d0();oq.exports=!gl1(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var dT=W2((dH1,lq)=>{"use strict";var ml1=Yn(),vl1=k0(),yl1=Ap(),_l1=mm(),xl1=aq(),sq=_l1("IE_PROTO"),AT=Object,wl1=AT.prototype;lq.exports=xl1?AT.getPrototypeOf:function(r){var t=yl1(r);if(ml1(t,sq))return t[sq];var e=t.constructor;return vl1(e)&&t instanceof e?e.prototype:t instanceof AT?wl1:null}});var CT=W2((fH1,hq)=>{"use strict";var bl1=d0(),Ml1=k0(),Bl1=f7(),Sl1=Tp(),cq=dT(),El1=cl(),Tl1=Y8(),Il1=j4(),LT=Tl1("iterator"),uq=!1,ns,fT,pT;[].keys&&(pT=[].keys(),"next"in pT?(fT=cq(cq(pT)),fT!==Object.prototype&&(ns=fT)):uq=!0);var Fl1=!Bl1(ns)||bl1(function(){var r={};return ns[LT].call(r)!==r});Fl1?ns={}:Il1&&(ns=Sl1(ns));Ml1(ns[LT])||El1(ns,LT,function(){return this});hq.exports={IteratorPrototype:ns,BUGGY_SAFARI_ITERATORS:uq}});var dq=W2((pH1,Aq)=>{"use strict";var Pl1=CT().IteratorPrototype,Rl1=Tp(),zl1=hm(),Dl1=_p(),kl1=$h(),Ol1=function(){return this};Aq.exports=function(r,t,e,i){var o=t+" Iterator";return r.prototype=Rl1(Pl1,{next:zl1(+!i,e)}),Dl1(r,o,!1,!0),kl1[o]=Ol1,r}});var wq=W2((LH1,xq)=>{"use strict";var Zl1=F9(),Nl1=yi(),rv=j4(),yq=pp(),Ul1=k0(),Ql1=dq(),fq=dT(),pq=lE(),Hl1=_p(),Vl1=Nh(),gT=cl(),Gl1=Y8(),Lq=$h(),_q=CT(),jl1=yq.PROPER,ql1=yq.CONFIGURABLE,Cq=_q.IteratorPrototype,iv=_q.BUGGY_SAFARI_ITERATORS,Ip=Gl1("iterator"),gq="keys",Fp="values",mq="entries",vq=function(){return this};xq.exports=function(r,t,e,i,o,n,l){Ql1(e,t,i);var A=function(G){if(G===o&&E)return E;if(!iv&&G&&G in C)return C[G];switch(G){case gq:return function(){return new e(this,G)};case Fp:return function(){return new e(this,G)};case mq:return function(){return new e(this,G)}}return function(){return new e(this)}},d=t+" Iterator",L=!1,C=r.prototype,y=C[Ip]||C["@@iterator"]||o&&C[o],E=!iv&&y||A(o),B=t==="Array"&&C.entries||y,Z,Q,V;if(B&&(Z=fq(B.call(new r)),Z!==Object.prototype&&Z.next&&(!rv&&fq(Z)!==Cq&&(pq?pq(Z,Cq):Ul1(Z[Ip])||gT(Z,Ip,vq)),Hl1(Z,d,!0,!0),rv&&(Lq[d]=vq))),jl1&&o===Fp&&y&&y.name!==Fp&&(!rv&&ql1?Vl1(C,"name",Fp):(L=!0,E=function(){return Nl1(y,this)})),o)if(Q={values:A(Fp),keys:n?E:A(gq),entries:A(mq)},l)for(V in Q)(iv||L||!(V in C))&&gT(C,V,Q[V]);else Zl1({target:t,proto:!0,forced:iv||L},Q);return(!rv||l)&&C[Ip]!==E&&gT(C,Ip,E,{name:o}),Lq[t]=E,Q}});var Mq=W2((CH1,bq)=>{"use strict";bq.exports=function(r,t){return{value:r,done:t}}});var vT=W2((gH1,Iq)=>{"use strict";var Kl1=kh(),mT=nq(),Bq=$h(),Eq=Cp(),Wl1=is().f,$l1=wq(),nv=Mq(),Xl1=j4(),Yl1=$n(),Tq="Array Iterator",Jl1=Eq.set,tc1=Eq.getterFor(Tq);Iq.exports=$l1(Array,"Array",function(r,t){Jl1(this,{type:Tq,target:Kl1(r),index:0,kind:t})},function(){var r=tc1(this),t=r.target,e=r.index++;if(!t||e>=t.length)return r.target=null,nv(void 0,!0);switch(r.kind){case"keys":return nv(e,!1);case"values":return nv(t[e],!1)}return nv([e,t[e]],!1)},"values");var Sq=Bq.Arguments=Bq.Array;mT("keys");mT("values");mT("entries");if(!Xl1&&Yl1&&Sq.name!=="values")try{Wl1(Sq,"name",{value:"values"})}catch{}});var Pq=W2((mH1,Fq)=>{"use strict";Fq.exports={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}});var Dq=W2((vH1,zq)=>{"use strict";var ec1=dp(),yT=ec1("span").classList,Rq=yT&&yT.constructor&&yT.constructor.prototype;zq.exports=Rq===Object.prototype?void 0:Rq});var Uq=W2(()=>{"use strict";var kq=Q6(),Zq=Pq(),rc1=Dq(),Pp=vT(),Oq=Nh(),ic1=_p(),nc1=Y8(),_T=nc1("iterator"),xT=Pp.values,Nq=function(r,t){if(r){if(r[_T]!==xT)try{Oq(r,_T,xT)}catch{r[_T]=xT}if(ic1(r,t,!0),Zq[t]){for(var e in Pp)if(r[e]!==Pp[e])try{Oq(r,e,Pp[e])}catch{r[e]=Pp[e]}}}};for(ov in Zq)Nq(kq[ov]&&kq[ov].prototype,ov);var ov;Nq(rc1,"DOMTokenList")});function hl(r){"@babel/helpers - typeof";return hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hl(r)}var wT=_o(()=>{});function bT(r,t){if(hl(r)!=="object"||r===null)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var i=e.call(r,t||"default");if(hl(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}var Qq=_o(()=>{wT()});function MT(r){var t=bT(r,"string");return hl(t)==="symbol"?t:String(t)}var Hq=_o(()=>{wT();Qq()});function Rp(r,t,e){return t=MT(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var Vq=_o(()=>{Hq()});var Wq=W2((IH1,Kq)=>{"use strict";var oc1=Wo(),ac1=Ap(),sc1=SS(),lc1=bm(),Gq=TypeError,jq="Reduce of empty array with no initial value",qq=function(r){return function(t,e,i,o){var n=ac1(t),l=sc1(n),A=lc1(n);if(oc1(e),A===0&&i<2)throw new Gq(jq);var d=r?A-1:0,L=r?-1:1;if(i<2)for(;;){if(d in l){o=l[d],d+=L;break}if(d+=L,r?d<0:A<=d)throw new Gq(jq)}for(;r?d>=0:A>d;d+=L)d in l&&(o=e(o,l[d],d,n));return o}};Kq.exports={left:qq(!1),right:qq(!0)}});var BT=W2((FH1,$q)=>{"use strict";var cc1=d0();$q.exports=function(r,t){var e=[][r];return!!e&&cc1(function(){e.call(null,t||function(){return 1},1)})}});var Yq=W2(()=>{"use strict";var uc1=F9(),hc1=Wq().left,Ac1=BT(),Xq=dm(),dc1=yp(),fc1=!dc1&&Xq>79&&Xq<83,pc1=fc1||!Ac1("reduce");uc1({target:"Array",proto:!0,forced:pc1},{reduce:function(t){var e=arguments.length;return hc1(this,t,e,e>1?arguments[1]:void 0)}})});var eK=W2(()=>{"use strict";var Lc1=F9(),Cc1=wp(),gc1=fp().f,mc1=Tc(),Jq=W4(),vc1=tv(),yc1=Xn(),_c1=ev(),xc1=j4(),wc1=Cc1("".slice),bc1=Math.min,tK=_c1("endsWith"),Mc1=!xc1&&!tK&&!!(function(){var r=gc1(String.prototype,"endsWith");return r&&!r.writable})();Lc1({target:"String",proto:!0,forced:!Mc1&&!tK},{endsWith:function(t){var e=Jq(yc1(this));vc1(t);var i=arguments.length>1?arguments[1]:void 0,o=e.length,n=i===void 0?o:bc1(mc1(i),o),l=Jq(t);return wc1(e,n-l.length,n)===l}})});var aK=W2(()=>{"use strict";var ST=yi(),oK=f0(),Bc1=qm(),Sc1=I9(),Ec1=f7(),Tc1=Xn(),Ic1=uE(),Fc1=Km(),Pc1=Tc(),rK=W4(),Rc1=Sc(),iK=$m(),zc1=WE(),Dc1=d0(),Yh=zc1.UNSUPPORTED_Y,kc1=4294967295,Oc1=Math.min,ET=oK([].push),TT=oK("".slice),Zc1=!Dc1(function(){var r=/(?:)/,t=r.exec;r.exec=function(){return t.apply(this,arguments)};var e="ab".split(r);return e.length!==2||e[0]!=="a"||e[1]!=="b"}),nK="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;Bc1("split",function(r,t,e){var i="0".split(void 0,0).length?function(o,n){return o===void 0&&n===0?[]:ST(t,this,o,n)}:t;return[function(n,l){var A=Tc1(this),d=Ec1(n)?Rc1(n,r):void 0;return d?ST(d,n,A,l):ST(i,rK(A),n,l)},function(o,n){var l=Sc1(this),A=rK(o);if(!nK){var d=e(i,l,A,n,i!==t);if(d.done)return d.value}var L=Ic1(l,RegExp),C=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(Yh?"g":"y"),E=new L(Yh?"^(?:"+l.source+")":l,y),B=n===void 0?kc1:n>>>0;if(B===0)return[];if(A.length===0)return iK(E,A)===null?[A]:[];for(var Z=0,Q=0,V=[];Q<A.length;){E.lastIndex=Yh?0:Q;var G=iK(E,Yh?TT(A,Q):A),J;if(G===null||(J=Oc1(Pc1(E.lastIndex+(Yh?Q:0)),A.length))===Z)Q=Fc1(A,Q,C);else{if(ET(V,TT(A,Z,Q)),V.length===B)return V;for(var n1=1;n1<=G.length-1;n1++)if(ET(V,G[n1]),V.length===B)return V;Q=Z=J}}return ET(V,TT(A,Z)),V}]},nK||!Zc1,Yh)});var lK=W2((sK,zp)=>{(function(){var r,t,e,i,o,n;typeof performance<"u"&&performance!==null&&performance.now?zp.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(zp.exports=function(){return(r()-o)/1e6},t=process.hrtime,r=function(){var l;return l=t(),l[0]*1e9+l[1]},i=r(),n=process.uptime()*1e9,o=i-n):Date.now?(zp.exports=function(){return Date.now()-e},e=Date.now()):(zp.exports=function(){return new Date().getTime()-e},e=new Date().getTime())}).call(sK)});var uK=W2((ZH1,lv)=>{var Nc1=lK(),os=typeof window>"u"?global:window,av=["moz","webkit"],tA="AnimationFrame",eA=os["request"+tA],Dp=os["cancel"+tA]||os["cancelRequest"+tA];for(Jh=0;!eA&&Jh<av.length;Jh++)eA=os[av[Jh]+"Request"+tA],Dp=os[av[Jh]+"Cancel"+tA]||os[av[Jh]+"CancelRequest"+tA];var Jh;(!eA||!Dp)&&(sv=0,IT=0,Al=[],cK=1e3/60,eA=function(r){if(Al.length===0){var t=Nc1(),e=Math.max(0,cK-(t-sv));sv=e+t,setTimeout(function(){var i=Al.slice(0);Al.length=0;for(var o=0;o<i.length;o++)if(!i[o].cancelled)try{i[o].callback(sv)}catch(n){setTimeout(function(){throw n},0)}},Math.round(e))}return Al.push({handle:++IT,callback:r,cancelled:!1}),IT},Dp=function(r){for(var t=0;t<Al.length;t++)Al[t].handle===r&&(Al[t].cancelled=!0)});var sv,IT,Al,cK;lv.exports=function(r){return eA.call(os,r)};lv.exports.cancel=function(){Dp.apply(os,arguments)};lv.exports.polyfill=function(r){r||(r=os),r.requestAnimationFrame=eA,r.cancelAnimationFrame=Dp}});var FT=W2((NH1,hK)=>{"use strict";hK.exports=`
|
|
832
832
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var fK=W2((UH1,dK)=>{"use strict";var Uc1=f0(),Qc1=Xn(),Hc1=W4(),RT=FT(),AK=Uc1("".replace),Vc1=RegExp("^["+RT+"]+"),Gc1=RegExp("(^|[^"+RT+"])["+RT+"]+$"),PT=function(r){return function(t){var e=Hc1(Qc1(t));return r&1&&(e=AK(e,Vc1,"")),r&2&&(e=AK(e,Gc1,"$1")),e}};dK.exports={start:PT(1),end:PT(2),trim:PT(3)}});var gK=W2((QH1,CK)=>{"use strict";var jc1=pp().PROPER,qc1=d0(),pK=FT(),LK="\u200B\x85\u180E";CK.exports=function(r){return qc1(function(){return!!pK[r]()||LK[r]()!==LK||jc1&&pK[r].name!==r})}});var mK=W2(()=>{"use strict";var Kc1=F9(),Wc1=fK().trim,$c1=gK();Kc1({target:"String",proto:!0,forced:$c1("trim")},{trim:function(){return Wc1(this)}})});var yK=W2((GH1,vK)=>{vK.exports=function(r){this.ok=!1,this.alpha=1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r=r.replace(/ /g,""),r=r.toLowerCase();var t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};r=t[r]||r;for(var e=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(d){return[parseInt(d[1]),parseInt(d[2]),parseInt(d[3]),parseFloat(d[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(d){return[parseInt(d[1]),parseInt(d[2]),parseInt(d[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(d){return[parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(d){return[parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16)]}}],i=0;i<e.length;i++){var o=e[i].re,n=e[i].process,l=o.exec(r);if(l){var A=n(l);this.r=A[0],this.g=A[1],this.b=A[2],A.length>3&&(this.alpha=A[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var d=this.r.toString(16),L=this.g.toString(16),C=this.b.toString(16);return d.length==1&&(d="0"+d),L.length==1&&(L="0"+L),C.length==1&&(C="0"+C),"#"+d+L+C},this.getHelpXML=function(){for(var d=new Array,L=0;L<e.length;L++)for(var C=e[L].example,y=0;y<C.length;y++)d[d.length]=C[y];for(var E in t)d[d.length]=E;var B=document.createElement("ul");B.setAttribute("id","rgbcolor-examples");for(var L=0;L<d.length;L++)try{var Z=document.createElement("li"),Q=new RGBColor(d[L]),V=document.createElement("div");V.style.cssText="margin: 3px; border: 1px solid black; background:"+Q.toHex()+"; color:"+Q.toHex(),V.appendChild(document.createTextNode("test"));var G=document.createTextNode(" "+d[L]+" -> "+Q.toRGB()+" -> "+Q.toHex());Z.appendChild(V),Z.appendChild(G),B.appendChild(Z)}catch{}return B}}});var xK=W2(()=>{"use strict";var Xc1=F9(),Yc1=wp(),Jc1=iE().indexOf,tu1=BT(),zT=Yc1([].indexOf),_K=!!zT&&1/zT([1],1,-0)<0,eu1=_K||!tu1("indexOf");Xc1({target:"Array",proto:!0,forced:eu1},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return _K?zT(this,t,e)||0:Jc1(this,t,e)}})});var bK=W2(()=>{"use strict";var ru1=F9(),iu1=f0(),nu1=tv(),ou1=Xn(),wK=W4(),au1=ev(),su1=iu1("".indexOf);ru1({target:"String",proto:!0,forced:!au1("includes")},{includes:function(t){return!!~su1(wK(ou1(this)),wK(nu1(t)),arguments.length>1?arguments[1]:void 0)}})});var BK=W2(($H1,MK)=>{"use strict";var lu1=sl();MK.exports=Array.isArray||function(t){return lu1(t)==="Array"}});var EK=W2(()=>{"use strict";var cu1=F9(),uu1=f0(),hu1=BK(),Au1=uu1([].reverse),SK=[1,2];cu1({target:"Array",proto:!0,forced:String(SK)===String(SK.reverse())},{reverse:function(){return hu1(this)&&(this.length=this.length),Au1(this)}})});function kK(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=r}DK(r,t),r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function du1(r){var t="";Array.isArray(r)||(r=[r]);for(var e=0;e<r.length;e++){var i=r[e];if(i.type===Zt.CLOSE_PATH)t+="z";else if(i.type===Zt.HORIZ_LINE_TO)t+=(i.relative?"h":"H")+i.x;else if(i.type===Zt.VERT_LINE_TO)t+=(i.relative?"v":"V")+i.y;else if(i.type===Zt.MOVE_TO)t+=(i.relative?"m":"M")+i.x+" "+i.y;else if(i.type===Zt.LINE_TO)t+=(i.relative?"l":"L")+i.x+" "+i.y;else if(i.type===Zt.CURVE_TO)t+=(i.relative?"c":"C")+i.x1+" "+i.y1+" "+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===Zt.SMOOTH_CURVE_TO)t+=(i.relative?"s":"S")+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===Zt.QUAD_TO)t+=(i.relative?"q":"Q")+i.x1+" "+i.y1+" "+i.x+" "+i.y;else if(i.type===Zt.SMOOTH_QUAD_TO)t+=(i.relative?"t":"T")+i.x+" "+i.y;else{if(i.type!==Zt.ARC)throw new Error('Unexpected command type "'+i.type+'" at index '+e+".");t+=(i.relative?"a":"A")+i.rX+" "+i.rY+" "+i.xRot+" "+ +i.lArcFlag+" "+ +i.sweepFlag+" "+i.x+" "+i.y}}return t}function kT(r,t){var e=r[0],i=r[1];return[e*Math.cos(t)-i*Math.sin(t),e*Math.sin(t)+i*Math.cos(t)]}function X4(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0;e<r.length;e++)if(typeof r[e]!="number")throw new Error("assertNumbers arguments["+e+"] is not a number. "+typeof r[e]+" == typeof "+r[e]);return!0}function DT(r,t,e){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;var i=r.rX,o=r.rY,n=r.x,l=r.y;i=Math.abs(r.rX),o=Math.abs(r.rY);var A=kT([(t-n)/2,(e-l)/2],-r.xRot/180*dl),d=A[0],L=A[1],C=Math.pow(d,2)/Math.pow(i,2)+Math.pow(L,2)/Math.pow(o,2);1<C&&(i*=Math.sqrt(C),o*=Math.sqrt(C)),r.rX=i,r.rY=o;var y=Math.pow(i,2)*Math.pow(L,2)+Math.pow(o,2)*Math.pow(d,2),E=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(i,2)*Math.pow(o,2)-y)/y)),B=i*L/o*E,Z=-o*d/i*E,Q=kT([B,Z],r.xRot/180*dl);r.cX=Q[0]+(t+n)/2,r.cY=Q[1]+(e+l)/2,r.phi1=Math.atan2((L-Z)/o,(d-B)/i),r.phi2=Math.atan2((-L-Z)/o,(-d-B)/i),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*dl),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*dl),r.phi1*=180/dl,r.phi2*=180/dl}function TK(r,t,e){X4(r,t,e);var i=r*r+t*t-e*e;if(0>i)return[];if(i===0)return[[r*e/(r*r+t*t),t*e/(r*r+t*t)]];var o=Math.sqrt(i);return[[(r*e+t*o)/(r*r+t*t),(t*e-r*o)/(r*r+t*t)],[(r*e-t*o)/(r*r+t*t),(t*e+r*o)/(r*r+t*t)]]}function IK(r,t,e){return(1-e)*r+e*t}function FK(r,t,e,i){return r+Math.cos(i/180*dl)*t+Math.sin(i/180*dl)*e}function PK(r,t,e,i){var o=1e-6,n=t-r,l=e-t,A=3*n+3*(i-e)-6*l,d=6*(l-n),L=3*n;return Math.abs(A)<o?[-L/d]:(function(C,y,E){E===void 0&&(E=1e-6);var B=C*C/4-y;if(B<-E)return[];if(B<=E)return[-C/2];var Z=Math.sqrt(B);return[-C/2-Z,-C/2+Z]})(d/A,L/A,o)}function RK(r,t,e,i,o){var n=1-o;return r*(n*n*n)+t*(3*n*n*o)+e*(3*n*o*o)+i*(o*o*o)}var DK,dl,S8,as,$4,OK,fu1,zK,pu1,Zt,Lu1,ZK=_o(()=>{DK=function(r,t){return(DK=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])})(r,t)};dl=Math.PI;as=Math.PI/180;(function(r){function t(){return o((function(A,d,L){return A.relative&&(A.x1!==void 0&&(A.x1+=d),A.y1!==void 0&&(A.y1+=L),A.x2!==void 0&&(A.x2+=d),A.y2!==void 0&&(A.y2+=L),A.x!==void 0&&(A.x+=d),A.y!==void 0&&(A.y+=L),A.relative=!1),A}))}function e(){var A=NaN,d=NaN,L=NaN,C=NaN;return o((function(y,E,B){return y.type&Zt.SMOOTH_CURVE_TO&&(y.type=Zt.CURVE_TO,A=isNaN(A)?E:A,d=isNaN(d)?B:d,y.x1=y.relative?E-A:2*E-A,y.y1=y.relative?B-d:2*B-d),y.type&Zt.CURVE_TO?(A=y.relative?E+y.x2:y.x2,d=y.relative?B+y.y2:y.y2):(A=NaN,d=NaN),y.type&Zt.SMOOTH_QUAD_TO&&(y.type=Zt.QUAD_TO,L=isNaN(L)?E:L,C=isNaN(C)?B:C,y.x1=y.relative?E-L:2*E-L,y.y1=y.relative?B-C:2*B-C),y.type&Zt.QUAD_TO?(L=y.relative?E+y.x1:y.x1,C=y.relative?B+y.y1:y.y1):(L=NaN,C=NaN),y}))}function i(){var A=NaN,d=NaN;return o((function(L,C,y){if(L.type&Zt.SMOOTH_QUAD_TO&&(L.type=Zt.QUAD_TO,A=isNaN(A)?C:A,d=isNaN(d)?y:d,L.x1=L.relative?C-A:2*C-A,L.y1=L.relative?y-d:2*y-d),L.type&Zt.QUAD_TO){A=L.relative?C+L.x1:L.x1,d=L.relative?y+L.y1:L.y1;var E=L.x1,B=L.y1;L.type=Zt.CURVE_TO,L.x1=((L.relative?0:C)+2*E)/3,L.y1=((L.relative?0:y)+2*B)/3,L.x2=(L.x+2*E)/3,L.y2=(L.y+2*B)/3}else A=NaN,d=NaN;return L}))}function o(A){var d=0,L=0,C=NaN,y=NaN;return function(E){if(isNaN(C)&&!(E.type&Zt.MOVE_TO))throw new Error("path must start with moveto");var B=A(E,d,L,C,y);return E.type&Zt.CLOSE_PATH&&(d=C,L=y),E.x!==void 0&&(d=E.relative?d+E.x:E.x),E.y!==void 0&&(L=E.relative?L+E.y:E.y),E.type&Zt.MOVE_TO&&(C=d,y=L),B}}function n(A,d,L,C,y,E){return X4(A,d,L,C,y,E),o((function(B,Z,Q,V){var G=B.x1,J=B.x2,n1=B.relative&&!isNaN(V),r1=B.x!==void 0?B.x:n1?0:Z,m1=B.y!==void 0?B.y:n1?0:Q;function w1(u1){return u1*u1}B.type&Zt.HORIZ_LINE_TO&&d!==0&&(B.type=Zt.LINE_TO,B.y=B.relative?0:Q),B.type&Zt.VERT_LINE_TO&&L!==0&&(B.type=Zt.LINE_TO,B.x=B.relative?0:Z),B.x!==void 0&&(B.x=B.x*A+m1*L+(n1?0:y)),B.y!==void 0&&(B.y=r1*d+B.y*C+(n1?0:E)),B.x1!==void 0&&(B.x1=B.x1*A+B.y1*L+(n1?0:y)),B.y1!==void 0&&(B.y1=G*d+B.y1*C+(n1?0:E)),B.x2!==void 0&&(B.x2=B.x2*A+B.y2*L+(n1?0:y)),B.y2!==void 0&&(B.y2=J*d+B.y2*C+(n1?0:E));var B1=A*C-d*L;if(B.xRot!==void 0&&(A!==1||d!==0||L!==0||C!==1))if(B1===0)delete B.rX,delete B.rY,delete B.xRot,delete B.lArcFlag,delete B.sweepFlag,B.type=Zt.LINE_TO;else{var g1=B.xRot*Math.PI/180,L1=Math.sin(g1),z1=Math.cos(g1),s1=1/w1(B.rX),x1=1/w1(B.rY),N1=w1(z1)*s1+w1(L1)*x1,V1=2*L1*z1*(s1-x1),l2=w1(L1)*s1+w1(z1)*x1,p2=N1*C*C-V1*d*C+l2*d*d,o2=V1*(A*C+d*L)-2*(N1*L*C+l2*A*d),G1=N1*L*L-V1*A*L+l2*A*A,L2=(Math.atan2(o2,p2-G1)+Math.PI)%Math.PI/2,V2=Math.sin(L2),w2=Math.cos(L2);B.rX=Math.abs(B1)/Math.sqrt(p2*w1(w2)+o2*V2*w2+G1*w1(V2)),B.rY=Math.abs(B1)/Math.sqrt(p2*w1(V2)-o2*V2*w2+G1*w1(w2)),B.xRot=180*L2/Math.PI}return B.sweepFlag!==void 0&&0>B1&&(B.sweepFlag=+!B.sweepFlag),B}))}function l(){return function(A){var d={};for(var L in A)d[L]=A[L];return d}}r.ROUND=function(A){function d(L){return Math.round(L*A)/A}return A===void 0&&(A=1e13),X4(A),function(L){return L.x1!==void 0&&(L.x1=d(L.x1)),L.y1!==void 0&&(L.y1=d(L.y1)),L.x2!==void 0&&(L.x2=d(L.x2)),L.y2!==void 0&&(L.y2=d(L.y2)),L.x!==void 0&&(L.x=d(L.x)),L.y!==void 0&&(L.y=d(L.y)),L.rX!==void 0&&(L.rX=d(L.rX)),L.rY!==void 0&&(L.rY=d(L.rY)),L}},r.TO_ABS=t,r.TO_REL=function(){return o((function(A,d,L){return A.relative||(A.x1!==void 0&&(A.x1-=d),A.y1!==void 0&&(A.y1-=L),A.x2!==void 0&&(A.x2-=d),A.y2!==void 0&&(A.y2-=L),A.x!==void 0&&(A.x-=d),A.y!==void 0&&(A.y-=L),A.relative=!0),A}))},r.NORMALIZE_HVZ=function(A,d,L){return A===void 0&&(A=!0),d===void 0&&(d=!0),L===void 0&&(L=!0),o((function(C,y,E,B,Z){if(isNaN(B)&&!(C.type&Zt.MOVE_TO))throw new Error("path must start with moveto");return d&&C.type&Zt.HORIZ_LINE_TO&&(C.type=Zt.LINE_TO,C.y=C.relative?0:E),L&&C.type&Zt.VERT_LINE_TO&&(C.type=Zt.LINE_TO,C.x=C.relative?0:y),A&&C.type&Zt.CLOSE_PATH&&(C.type=Zt.LINE_TO,C.x=C.relative?B-y:B,C.y=C.relative?Z-E:Z),C.type&Zt.ARC&&(C.rX===0||C.rY===0)&&(C.type=Zt.LINE_TO,delete C.rX,delete C.rY,delete C.xRot,delete C.lArcFlag,delete C.sweepFlag),C}))},r.NORMALIZE_ST=e,r.QT_TO_C=i,r.INFO=o,r.SANITIZE=function(A){A===void 0&&(A=0),X4(A);var d=NaN,L=NaN,C=NaN,y=NaN;return o((function(E,B,Z,Q,V){var G=Math.abs,J=!1,n1=0,r1=0;if(E.type&Zt.SMOOTH_CURVE_TO&&(n1=isNaN(d)?0:B-d,r1=isNaN(L)?0:Z-L),E.type&(Zt.CURVE_TO|Zt.SMOOTH_CURVE_TO)?(d=E.relative?B+E.x2:E.x2,L=E.relative?Z+E.y2:E.y2):(d=NaN,L=NaN),E.type&Zt.SMOOTH_QUAD_TO?(C=isNaN(C)?B:2*B-C,y=isNaN(y)?Z:2*Z-y):E.type&Zt.QUAD_TO?(C=E.relative?B+E.x1:E.x1,y=E.relative?Z+E.y1:E.y2):(C=NaN,y=NaN),E.type&Zt.LINE_COMMANDS||E.type&Zt.ARC&&(E.rX===0||E.rY===0||!E.lArcFlag)||E.type&Zt.CURVE_TO||E.type&Zt.SMOOTH_CURVE_TO||E.type&Zt.QUAD_TO||E.type&Zt.SMOOTH_QUAD_TO){var m1=E.x===void 0?0:E.relative?E.x:E.x-B,w1=E.y===void 0?0:E.relative?E.y:E.y-Z;n1=isNaN(C)?E.x1===void 0?n1:E.relative?E.x:E.x1-B:C-B,r1=isNaN(y)?E.y1===void 0?r1:E.relative?E.y:E.y1-Z:y-Z;var B1=E.x2===void 0?0:E.relative?E.x:E.x2-B,g1=E.y2===void 0?0:E.relative?E.y:E.y2-Z;G(m1)<=A&&G(w1)<=A&&G(n1)<=A&&G(r1)<=A&&G(B1)<=A&&G(g1)<=A&&(J=!0)}return E.type&Zt.CLOSE_PATH&&G(B-Q)<=A&&G(Z-V)<=A&&(J=!0),J?[]:E}))},r.MATRIX=n,r.ROTATE=function(A,d,L){d===void 0&&(d=0),L===void 0&&(L=0),X4(A,d,L);var C=Math.sin(A),y=Math.cos(A);return n(y,C,-C,y,d-d*y+L*C,L-d*C-L*y)},r.TRANSLATE=function(A,d){return d===void 0&&(d=0),X4(A,d),n(1,0,0,1,A,d)},r.SCALE=function(A,d){return d===void 0&&(d=A),X4(A,d),n(A,0,0,d,0,0)},r.SKEW_X=function(A){return X4(A),n(1,0,Math.atan(A),1,0,0)},r.SKEW_Y=function(A){return X4(A),n(1,Math.atan(A),0,1,0,0)},r.X_AXIS_SYMMETRY=function(A){return A===void 0&&(A=0),X4(A),n(-1,0,0,1,A,0)},r.Y_AXIS_SYMMETRY=function(A){return A===void 0&&(A=0),X4(A),n(1,0,0,-1,0,A)},r.A_TO_C=function(){return o((function(A,d,L){return Zt.ARC===A.type?(function(C,y,E){var B,Z,Q,V;C.cX||DT(C,y,E);for(var G=Math.min(C.phi1,C.phi2),J=Math.max(C.phi1,C.phi2)-G,n1=Math.ceil(J/90),r1=new Array(n1),m1=y,w1=E,B1=0;B1<n1;B1++){var g1=IK(C.phi1,C.phi2,B1/n1),L1=IK(C.phi1,C.phi2,(B1+1)/n1),z1=L1-g1,s1=4/3*Math.tan(z1*as/4),x1=[Math.cos(g1*as)-s1*Math.sin(g1*as),Math.sin(g1*as)+s1*Math.cos(g1*as)],N1=x1[0],V1=x1[1],l2=[Math.cos(L1*as),Math.sin(L1*as)],p2=l2[0],o2=l2[1],G1=[p2+s1*Math.sin(L1*as),o2-s1*Math.cos(L1*as)],L2=G1[0],V2=G1[1];r1[B1]={relative:C.relative,type:Zt.CURVE_TO};var w2=function(u1,P1){var F1=kT([u1*C.rX,P1*C.rY],C.xRot),J1=F1[0],u2=F1[1];return[C.cX+J1,C.cY+u2]};B=w2(N1,V1),r1[B1].x1=B[0],r1[B1].y1=B[1],Z=w2(L2,V2),r1[B1].x2=Z[0],r1[B1].y2=Z[1],Q=w2(p2,o2),r1[B1].x=Q[0],r1[B1].y=Q[1],C.relative&&(r1[B1].x1-=m1,r1[B1].y1-=w1,r1[B1].x2-=m1,r1[B1].y2-=w1,r1[B1].x-=m1,r1[B1].y-=w1),m1=(V=[r1[B1].x,r1[B1].y])[0],w1=V[1]}return r1})(A,A.relative?0:d,A.relative?0:L):A}))},r.ANNOTATE_ARCS=function(){return o((function(A,d,L){return A.relative&&(d=0,L=0),Zt.ARC===A.type&&DT(A,d,L),A}))},r.CLONE=l,r.CALCULATE_BOUNDS=function(){var A=function(E){var B={};for(var Z in E)B[Z]=E[Z];return B},d=t(),L=i(),C=e(),y=o((function(E,B,Z){var Q=C(L(d(A(E))));function V(V2){V2>y.maxX&&(y.maxX=V2),V2<y.minX&&(y.minX=V2)}function G(V2){V2>y.maxY&&(y.maxY=V2),V2<y.minY&&(y.minY=V2)}if(Q.type&Zt.DRAWING_COMMANDS&&(V(B),G(Z)),Q.type&Zt.HORIZ_LINE_TO&&V(Q.x),Q.type&Zt.VERT_LINE_TO&&G(Q.y),Q.type&Zt.LINE_TO&&(V(Q.x),G(Q.y)),Q.type&Zt.CURVE_TO){V(Q.x),G(Q.y);for(var J=0,n1=PK(B,Q.x1,Q.x2,Q.x);J<n1.length;J++)0<(L2=n1[J])&&1>L2&&V(RK(B,Q.x1,Q.x2,Q.x,L2));for(var r1=0,m1=PK(Z,Q.y1,Q.y2,Q.y);r1<m1.length;r1++)0<(L2=m1[r1])&&1>L2&&G(RK(Z,Q.y1,Q.y2,Q.y,L2))}if(Q.type&Zt.ARC){V(Q.x),G(Q.y),DT(Q,B,Z);for(var w1=Q.xRot/180*Math.PI,B1=Math.cos(w1)*Q.rX,g1=Math.sin(w1)*Q.rX,L1=-Math.sin(w1)*Q.rY,z1=Math.cos(w1)*Q.rY,s1=Q.phi1<Q.phi2?[Q.phi1,Q.phi2]:-180>Q.phi2?[Q.phi2+360,Q.phi1+360]:[Q.phi2,Q.phi1],x1=s1[0],N1=s1[1],V1=function(V2){var w2=V2[0],u1=V2[1],P1=180*Math.atan2(u1,w2)/Math.PI;return P1<x1?P1+360:P1},l2=0,p2=TK(L1,-B1,0).map(V1);l2<p2.length;l2++)(L2=p2[l2])>x1&&L2<N1&&V(FK(Q.cX,B1,L1,L2));for(var o2=0,G1=TK(z1,-g1,0).map(V1);o2<G1.length;o2++){var L2;(L2=G1[o2])>x1&&L2<N1&&G(FK(Q.cY,g1,z1,L2))}}return E}));return y.minX=1/0,y.maxX=-1/0,y.minY=1/0,y.maxY=-1/0,y}})(S8||(S8={}));OK=(function(){function r(){}return r.prototype.round=function(t){return this.transform(S8.ROUND(t))},r.prototype.toAbs=function(){return this.transform(S8.TO_ABS())},r.prototype.toRel=function(){return this.transform(S8.TO_REL())},r.prototype.normalizeHVZ=function(t,e,i){return this.transform(S8.NORMALIZE_HVZ(t,e,i))},r.prototype.normalizeST=function(){return this.transform(S8.NORMALIZE_ST())},r.prototype.qtToC=function(){return this.transform(S8.QT_TO_C())},r.prototype.aToC=function(){return this.transform(S8.A_TO_C())},r.prototype.sanitize=function(t){return this.transform(S8.SANITIZE(t))},r.prototype.translate=function(t,e){return this.transform(S8.TRANSLATE(t,e))},r.prototype.scale=function(t,e){return this.transform(S8.SCALE(t,e))},r.prototype.rotate=function(t,e,i){return this.transform(S8.ROTATE(t,e,i))},r.prototype.matrix=function(t,e,i,o,n,l){return this.transform(S8.MATRIX(t,e,i,o,n,l))},r.prototype.skewX=function(t){return this.transform(S8.SKEW_X(t))},r.prototype.skewY=function(t){return this.transform(S8.SKEW_Y(t))},r.prototype.xSymmetry=function(t){return this.transform(S8.X_AXIS_SYMMETRY(t))},r.prototype.ySymmetry=function(t){return this.transform(S8.Y_AXIS_SYMMETRY(t))},r.prototype.annotateArcs=function(){return this.transform(S8.ANNOTATE_ARCS())},r})(),fu1=function(r){return r===" "||r===" "||r==="\r"||r===`
|
|
833
|
-
`},zK=function(r){return 48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57},pu1=(function(r){function t(){var e=r.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return kK(t,r),t.prototype.finish=function(e){if(e===void 0&&(e=[]),this.parse(" ",e),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return e},t.prototype.parse=function(e,i){var o=this;i===void 0&&(i=[]);for(var n=function(y){i.push(y),o.curArgs.length=0,o.canParseCommandOrComma=!0},l=0;l<e.length;l++){var A=e[l],d=!(this.curCommandType!==Zt.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),L=zK(A)&&(this.curNumber==="0"&&A==="0"||d);if(!zK(A)||L)if(A!=="e"&&A!=="E")if(A!=="-"&&A!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(A!=="."||this.curNumberHasExp||this.curNumberHasDecimal||d){if(this.curNumber&&this.curCommandType!==-1){var C=Number(this.curNumber);if(isNaN(C))throw new SyntaxError("Invalid number ending at "+l);if(this.curCommandType===Zt.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>C)throw new SyntaxError('Expected positive number, got "'+C+'" at index "'+l+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+l+'"')}this.curArgs.push(C),this.curArgs.length===Lu1[this.curCommandType]&&(Zt.HORIZ_LINE_TO===this.curCommandType?n({type:Zt.HORIZ_LINE_TO,relative:this.curCommandRelative,x:C}):Zt.VERT_LINE_TO===this.curCommandType?n({type:Zt.VERT_LINE_TO,relative:this.curCommandRelative,y:C}):this.curCommandType===Zt.MOVE_TO||this.curCommandType===Zt.LINE_TO||this.curCommandType===Zt.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),Zt.MOVE_TO===this.curCommandType&&(this.curCommandType=Zt.LINE_TO)):this.curCommandType===Zt.CURVE_TO?n({type:Zt.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===Zt.SMOOTH_CURVE_TO?n({type:Zt.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Zt.QUAD_TO?n({type:Zt.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Zt.ARC&&n({type:Zt.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!fu1(A))if(A===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(A!=="+"&&A!=="-"&&A!==".")if(L)this.curNumber=A,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+l+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+A+'" at index '+l+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,A!=="z"&&A!=="Z")if(A==="h"||A==="H")this.curCommandType=Zt.HORIZ_LINE_TO,this.curCommandRelative=A==="h";else if(A==="v"||A==="V")this.curCommandType=Zt.VERT_LINE_TO,this.curCommandRelative=A==="v";else if(A==="m"||A==="M")this.curCommandType=Zt.MOVE_TO,this.curCommandRelative=A==="m";else if(A==="l"||A==="L")this.curCommandType=Zt.LINE_TO,this.curCommandRelative=A==="l";else if(A==="c"||A==="C")this.curCommandType=Zt.CURVE_TO,this.curCommandRelative=A==="c";else if(A==="s"||A==="S")this.curCommandType=Zt.SMOOTH_CURVE_TO,this.curCommandRelative=A==="s";else if(A==="q"||A==="Q")this.curCommandType=Zt.QUAD_TO,this.curCommandRelative=A==="q";else if(A==="t"||A==="T")this.curCommandType=Zt.SMOOTH_QUAD_TO,this.curCommandRelative=A==="t";else{if(A!=="a"&&A!=="A")throw new SyntaxError('Unexpected character "'+A+'" at index '+l+".");this.curCommandType=Zt.ARC,this.curCommandRelative=A==="a"}else i.push({type:Zt.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=A,this.curNumberHasDecimal=A==="."}else this.curNumber+=A,this.curNumberHasDecimal=!0;else this.curNumber+=A;else this.curNumber+=A,this.curNumberHasExp=!0;else this.curNumber+=A,this.curNumberHasExpDigits=this.curNumberHasExp}return i},t.prototype.transform=function(e){return Object.create(this,{parse:{value:function(i,o){o===void 0&&(o=[]);for(var n=0,l=Object.getPrototypeOf(this).parse.call(this,i);n<l.length;n++){var A=l[n],d=e(A);Array.isArray(d)?o.push.apply(o,d):o.push(d)}return o}}})},t})(OK),Zt=(function(r){function t(e){var i=r.call(this)||this;return i.commands=typeof e=="string"?t.parse(e):e,i}return kK(t,r),t.prototype.encode=function(){return t.encode(this.commands)},t.prototype.getBounds=function(){var e=S8.CALCULATE_BOUNDS();return this.transform(e),e},t.prototype.transform=function(e){for(var i=[],o=0,n=this.commands;o<n.length;o++){var l=e(n[o]);Array.isArray(l)?i.push.apply(i,l):i.push(l)}return this.commands=i,this},t.encode=function(e){return du1(e)},t.parse=function(e){var i=new pu1,o=[];return i.parse(e,o),i.finish(o),o},t.CLOSE_PATH=1,t.MOVE_TO=2,t.HORIZ_LINE_TO=4,t.VERT_LINE_TO=8,t.LINE_TO=16,t.CURVE_TO=32,t.SMOOTH_CURVE_TO=64,t.QUAD_TO=128,t.SMOOTH_QUAD_TO=256,t.ARC=512,t.LINE_COMMANDS=t.LINE_TO|t.HORIZ_LINE_TO|t.VERT_LINE_TO,t.DRAWING_COMMANDS=t.HORIZ_LINE_TO|t.VERT_LINE_TO|t.LINE_TO|t.CURVE_TO|t.SMOOTH_CURVE_TO|t.QUAD_TO|t.SMOOTH_QUAD_TO|t.ARC,t})(OK),Lu1=(($4={})[Zt.MOVE_TO]=2,$4[Zt.LINE_TO]=2,$4[Zt.HORIZ_LINE_TO]=1,$4[Zt.VERT_LINE_TO]=1,$4[Zt.CLOSE_PATH]=0,$4[Zt.QUAD_TO]=4,$4[Zt.SMOOTH_QUAD_TO]=2,$4[Zt.CURVE_TO]=6,$4[Zt.SMOOTH_CURVE_TO]=4,$4[Zt.ARC]=7,$4)});var HK=W2(()=>{"use strict";var Cu1=pp().PROPER,gu1=cl(),mu1=I9(),NK=W4(),vu1=d0(),yu1=Wm(),OT="toString",UK=RegExp.prototype,QK=UK[OT],_u1=vu1(function(){return QK.call({source:"a",flags:"b"})!=="/a/b"}),xu1=Cu1&&QK.name!==OT;(_u1||xu1)&&gu1(UK,OT,function(){var t=mu1(this),e=NK(t.source),i=NK(yu1(t));return"/"+e+"/"+i},{unsafe:!0})});function cv(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cv=function(t){return typeof t}:cv=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cv(r)}function wu1(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function Bu1(r,t,e,i,o){if(typeof r=="string"&&(r=document.getElementById(r)),!r||cv(r)!=="object"||!("getContext"in r))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var n=r.getContext("2d");try{return n.getImageData(t,e,i,o)}catch(l){throw new Error("unable to access image data: "+l)}}function GK(r,t,e,i,o,n){if(!(isNaN(n)||n<1)){n|=0;var l=Bu1(r,t,e,i,o);l=Su1(l,t,e,i,o,n),r.getContext("2d").putImageData(l,t,e)}}function Su1(r,t,e,i,o,n){for(var l=r.data,A=2*n+1,d=i-1,L=o-1,C=n+1,y=C*(C+1)/2,E=new VK,B=E,Z,Q=1;Q<A;Q++)B=B.next=new VK,Q===C&&(Z=B);B.next=E;for(var V=null,G=null,J=0,n1=0,r1=bu1[n],m1=Mu1[n],w1=0;w1<o;w1++){B=E;for(var B1=l[n1],g1=l[n1+1],L1=l[n1+2],z1=l[n1+3],s1=0;s1<C;s1++)B.r=B1,B.g=g1,B.b=L1,B.a=z1,B=B.next;for(var x1=0,N1=0,V1=0,l2=0,p2=C*B1,o2=C*g1,G1=C*L1,L2=C*z1,V2=y*B1,w2=y*g1,u1=y*L1,P1=y*z1,F1=1;F1<C;F1++){var J1=n1+((d<F1?d:F1)<<2),u2=l[J1],r2=l[J1+1],F2=l[J1+2],k2=l[J1+3],j2=C-F1;V2+=(B.r=u2)*j2,w2+=(B.g=r2)*j2,u1+=(B.b=F2)*j2,P1+=(B.a=k2)*j2,x1+=u2,N1+=r2,V1+=F2,l2+=k2,B=B.next}V=E,G=Z;for(var R2=0;R2<i;R2++){var it=P1*r1>>>m1;if(l[n1+3]=it,it!==0){var pt=255/it;l[n1]=(V2*r1>>>m1)*pt,l[n1+1]=(w2*r1>>>m1)*pt,l[n1+2]=(u1*r1>>>m1)*pt}else l[n1]=l[n1+1]=l[n1+2]=0;V2-=p2,w2-=o2,u1-=G1,P1-=L2,p2-=V.r,o2-=V.g,G1-=V.b,L2-=V.a;var N2=R2+n+1;N2=J+(N2<d?N2:d)<<2,x1+=V.r=l[N2],N1+=V.g=l[N2+1],V1+=V.b=l[N2+2],l2+=V.a=l[N2+3],V2+=x1,w2+=N1,u1+=V1,P1+=l2,V=V.next;var K1=G,ce=K1.r,Vt=K1.g,qt=K1.b,ot=K1.a;p2+=ce,o2+=Vt,G1+=qt,L2+=ot,x1-=ce,N1-=Vt,V1-=qt,l2-=ot,G=G.next,n1+=4}J+=i}for(var Qt=0;Qt<i;Qt++){n1=Qt<<2;var Lt=l[n1],Gt=l[n1+1],Ht=l[n1+2],re=l[n1+3],le=C*Lt,ie=C*Gt,c2=C*Ht,A1=C*re,h1=y*Lt,b1=y*Gt,R1=y*Ht,$1=y*re;B=E;for(var h2=0;h2<C;h2++)B.r=Lt,B.g=Gt,B.b=Ht,B.a=re,B=B.next;for(var d2=i,s2=0,I2=0,Q2=0,Z2=0,at=1;at<=n;at++){n1=d2+Qt<<2;var Pt=C-at;h1+=(B.r=Lt=l[n1])*Pt,b1+=(B.g=Gt=l[n1+1])*Pt,R1+=(B.b=Ht=l[n1+2])*Pt,$1+=(B.a=re=l[n1+3])*Pt,Z2+=Lt,s2+=Gt,I2+=Ht,Q2+=re,B=B.next,at<L&&(d2+=i)}n1=Qt,V=E,G=Z;for(var x2=0;x2<o;x2++){var zt=n1<<2;l[zt+3]=re=$1*r1>>>m1,re>0?(re=255/re,l[zt]=(h1*r1>>>m1)*re,l[zt+1]=(b1*r1>>>m1)*re,l[zt+2]=(R1*r1>>>m1)*re):l[zt]=l[zt+1]=l[zt+2]=0,h1-=le,b1-=ie,R1-=c2,$1-=A1,le-=V.r,ie-=V.g,c2-=V.b,A1-=V.a,zt=Qt+((zt=x2+C)<L?zt:L)*i<<2,h1+=Z2+=V.r=l[zt],b1+=s2+=V.g=l[zt+1],R1+=I2+=V.b=l[zt+2],$1+=Q2+=V.a=l[zt+3],V=V.next,le+=Lt=G.r,ie+=Gt=G.g,c2+=Ht=G.b,A1+=re=G.a,Z2-=Lt,s2-=Gt,I2-=Ht,Q2-=re,G=G.next,n1+=i}}return r}var bu1,Mu1,VK,jK=_o(()=>{bu1=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],Mu1=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];VK=function r(){wu1(this,r),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}});var nW={};__(nW,{AElement:()=>Nv,AnimateColorElement:()=>Rv,AnimateElement:()=>nA,AnimateTransformElement:()=>zv,BoundingBox:()=>G7,CB1:()=>UT,CB2:()=>QT,CB3:()=>HT,CB4:()=>VT,Canvg:()=>$T,CircleElement:()=>wv,ClipPathElement:()=>jv,DefsElement:()=>Tv,DescElement:()=>Yv,Document:()=>Zc,Element:()=>H6,EllipseElement:()=>bv,FeColorMatrixElement:()=>Gp,FeCompositeElement:()=>Wv,FeDropShadowElement:()=>qv,FeGaussianBlurElement:()=>$v,FeMorphologyElement:()=>Kv,FilterElement:()=>qp,Font:()=>Jn,FontElement:()=>Dv,FontFaceElement:()=>kv,GElement:()=>iA,GlyphElement:()=>Zp,GradientElement:()=>Hp,ImageElement:()=>Qv,LineElement:()=>Mv,LinearGradientElement:()=>Iv,MarkerElement:()=>Ev,MaskElement:()=>jp,Matrix:()=>kp,MissingGlyphElement:()=>Ov,Mouse:()=>Cv,PSEUDO_ZERO:()=>Dc,Parser:()=>rA,PathElement:()=>r8,PathParser:()=>j5,PatternElement:()=>Sv,Point:()=>T8,PolygonElement:()=>Bv,PolylineElement:()=>Qp,Property:()=>y5,QB1:()=>GT,QB2:()=>jT,QB3:()=>qT,RadialGradientElement:()=>Fv,RectElement:()=>Up,RenderedElement:()=>$o,Rotate:()=>mv,SVGElement:()=>pl,SVGFontLoader:()=>Vv,Scale:()=>vv,Screen:()=>kc,Skew:()=>Op,SkewX:()=>yv,SkewY:()=>_v,StopElement:()=>Pv,StyleElement:()=>Vp,SymbolElement:()=>Hv,TRefElement:()=>Zv,TSpanElement:()=>Np,TextElement:()=>fl,TextPathElement:()=>Uv,TitleElement:()=>Xv,Transform:()=>Oc,Translate:()=>gv,UnknownElement:()=>xv,UseElement:()=>Gv,ViewPort:()=>Lv,compressSpaces:()=>Nc,default:()=>$T,getSelectorSpecificity:()=>eW,normalizeAttributeName:()=>JK,normalizeColor:()=>tW,parseExternalUrl:()=>XT,presets:()=>Iu1,toNumbers:()=>V7,trimLeft:()=>XK,trimRight:()=>YK,vectorMagnitude:()=>ZT,vectorsAngle:()=>NT,vectorsRatio:()=>pv});function Eu1(){var{DOMParser:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:r,createCanvas(e,i){return new OffscreenCanvas(e,i)},createImage(e){return K4(function*(){var i=yield fetch(e),o=yield i.blob(),n=yield createImageBitmap(o);return n})()}};return(typeof DOMParser<"u"||typeof r>"u")&&Reflect.deleteProperty(t,"DOMParser"),t}function Tu1(r){var{DOMParser:t,canvas:e,fetch:i}=r;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,fetch:i,createCanvas:e.createCanvas,createImage:e.loadImage}}function Nc(r){return r.replace(/(?!\u3000)\s+/gm," ")}function XK(r){return r.replace(/^[\n \t]+/,"")}function YK(r){return r.replace(/[\n \t]+$/,"")}function V7(r){var t=(r||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return t.map(parseFloat)}function JK(r){return Fu1.test(r)?r.toLowerCase():r}function XT(r){var t=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(r)||[];return t[2]||t[3]||t[4]}function tW(r){if(!r.startsWith("rgb"))return r;var t=3,e=r.replace(/\d+(\.\d+)?/g,(i,o)=>t--&&o?String(Math.round(parseFloat(i))):i);return e}function Rc(r,t){var e=t.exec(r);return e?[r.replace(t," "),e.length]:[r,0]}function eW(r){var t=[0,0,0],e=r.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),i=0;return[e,i]=Rc(e,Pu1),t[1]+=i,[e,i]=Rc(e,Ru1),t[0]+=i,[e,i]=Rc(e,zu1),t[1]+=i,[e,i]=Rc(e,Du1),t[2]+=i,[e,i]=Rc(e,ku1),t[1]+=i,[e,i]=Rc(e,Ou1),t[1]+=i,e=e.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[e,i]=Rc(e,Zu1),t[2]+=i,t.join("")}function ZT(r){return Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2))}function pv(r,t){return(r[0]*t[0]+r[1]*t[1])/(ZT(r)*ZT(t))}function NT(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(pv(r,t))}function UT(r){return r*r*r}function QT(r){return 3*r*r*(1-r)}function HT(r){return 3*r*(1-r)*(1-r)}function VT(r){return(1-r)*(1-r)*(1-r)}function GT(r){return r*r}function jT(r){return 2*r*(1-r)}function qT(r){return(1-r)*(1-r)}function Qu1(r){return Nc(r).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function Hu1(r){var[t,e]=r.split("(");return[t.trim(),e.trim().replace(")","")]}function Vu1(r){var t=r.trim();return/^('|")/.test(t)?t:'"'.concat(t,'"')}function Gu1(r){return typeof process>"u"?r:r.trim().split(",").map(Vu1).join(",")}function ju1(r){if(!r)return"";var t=r.trim().toLowerCase();switch(t){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return t;default:return/^oblique\s+(-|)\d+deg$/.test(t)?t:""}}function qu1(r){if(!r)return"";var t=r.trim().toLowerCase();switch(t){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return t;default:return/^[\d.]+$/.test(t)?t:""}}function qK(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,i)}return e}function uv(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?qK(Object(e),!0).forEach(function(i){Rp(r,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):qK(Object(e)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(e,i))})}return r}function hv(r,t,e,i,o,n){return r[e*i*4+t*4+n]}function Av(r,t,e,i,o,n,l){r[e*i*4+t*4+n]=l}function E8(r,t,e){var i=r[t];return i*e}function ss(r,t,e,i){return t+Math.cos(r)*e+Math.sin(r)*i}function WK(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,i)}return e}function $u1(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?WK(Object(e),!0).forEach(function(i){Rp(r,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):WK(Object(e)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(e,i))})}return r}function Xu1(r,t){var e=document.createElement("canvas");return e.width=r,e.height=t,e}function Yu1(r){return WT.apply(this,arguments)}function WT(){return WT=K4(function*(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=document.createElement("img");return t&&(e.crossOrigin="Anonymous"),new Promise((i,o)=>{e.onload=()=>{i(e)},e.onerror=(n,l,A,d,L)=>{o(L)},e.src=r})}),WT.apply(this,arguments)}function $K(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,i)}return e}function zc(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?$K(Object(e),!0).forEach(function(i){Rp(r,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):$K(Object(e)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(e,i))})}return r}var iV1,oV1,aV1,sV1,lV1,cV1,hV1,AV1,dV1,dv,fV1,fv,pV1,LV1,CV1,mV1,Iu1,Fu1,Pu1,Ru1,zu1,Du1,ku1,Ou1,Zu1,Dc,y5,Lv,T8,Cv,rW,iW,kc,Nu1,Uu1,rA,gv,mv,vv,kp,Op,yv,_v,Oc,H6,xv,Jn,G7,j5,$o,r8,Zp,fl,Np,KT,pl,Up,wv,bv,Mv,Qp,Bv,Sv,Ev,Tv,iA,Hp,Iv,Fv,Pv,nA,Rv,zv,Dv,kv,Ov,Zv,Nv,Uv,Ku1,Qv,Hv,Vv,Vp,Gv,Gp,jp,KK,jv,qp,qv,Kv,Wv,$v,Xv,Yv,Wu1,Zc,$T,oW=_o(()=>{iV1=P3(JG(),1);ej();oV1=P3(Hj(),1),aV1=P3(Wj(),1),sV1=P3(rq(),1),lV1=P3(vT(),1),cV1=P3(Uq(),1);Vq();hV1=P3(Yq(),1),AV1=P3(eK(),1),dV1=P3(aK(),1),dv=P3(uK(),1),fV1=P3(mK(),1),fv=P3(yK(),1),pV1=P3(xK(),1),LV1=P3(bK(),1),CV1=P3(EK(),1);ZK();mV1=P3(HK(),1);jK();Iu1=Object.freeze({__proto__:null,offscreen:Eu1,node:Tu1});Fu1=/^[A-Z-]+$/;Pu1=/(\[[^\]]+\])/g,Ru1=/(#[^\s+>~.[:]+)/g,zu1=/(\.[^\s+>~.[:]+)/g,Du1=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,ku1=/(:[\w-]+\([^)]*\))/gi,Ou1=/(:[^\s+>~.[:]+)/g,Zu1=/([^\s+>~.[:]+)/g;Dc=1e-8;y5=class r{constructor(t,e,i){this.document=t,this.name=e,this.value=i,this.isNormalizedColor=!1}static empty(t){return new r(t,"EMPTY","")}split(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:e,name:i}=this;return Nc(this.getString()).trim().split(t).map(o=>new r(e,i,o))}hasValue(t){var{value:e}=this;return e!==null&&e!==""&&(t||e!==0)&&typeof e<"u"}isString(t){var{value:e}=this,i=typeof e=="string";return!i||!t?i:t.test(e)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return typeof t>"u"||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return typeof t>"u"?0:parseFloat(t);var{value:e}=this,i=parseFloat(e);return this.isString(/%$/)&&(i/=100),i}getString(t){return typeof t>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(t)}getColor(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=tW(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[i,o]=typeof t=="boolean"?[void 0,t]:[t],{viewPort:n}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(n.computeSize("x"),n.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(n.computeSize("x"),n.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*n.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*n.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&o):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*n.computeSize(i);default:{var l=this.getNumber();return e&&l<1?l*n.computeSize(i):l}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}getFillStyleDefinition(t,e){var i=this.getDefinition();if(!i)return null;if(typeof i.createGradient=="function")return i.createGradient(this.document.ctx,t,e);if(typeof i.createPattern=="function"){if(i.getHrefAttribute().hasValue()){var o=i.getAttribute("patternTransform");i=i.getHrefAttribute().getDefinition(),o.hasValue()&&i.getAttribute("patternTransform",!0).setValue(o.value)}return i.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){return this.hasValue()?r.textBaselineMapping[this.getString()]:null}addOpacity(t){for(var e=this.getColor(),i=e.length,o=0,n=0;n<i&&(e[n]===","&&o++,o!==3);n++);if(t.hasValue()&&this.isString()&&o!==3){var l=new fv.default(e);l.ok&&(l.alpha=t.getNumber(),e=l.toRGBA())}return new r(this.document,this.name,e)}};y5.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};Lv=class{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:t}=this;return t[t.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return typeof t=="number"?t:t==="x"?this.width:t==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}},T8=class r{constructor(t,e){this.x=t,this.y=e}static parse(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[i=e,o=e]=V7(t);return new r(i,o)}static parseScale(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[i=e,o=i]=V7(t);return new r(i,o)}static parsePath(t){for(var e=V7(t),i=e.length,o=[],n=0;n<i;n+=2)o.push(new r(e[n],e[n+1]));return o}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){var{x:e,y:i}=this,o=e*t[0]+i*t[2]+t[4],n=e*t[1]+i*t[3]+t[5];this.x=o,this.y=n}},Cv=class{constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:t,onClick:e,onMouseMove:i}=this,o=t.ctx.canvas;o.onclick=e,o.onmousemove=i,this.working=!0}}stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:t,events:e,eventElements:i}=this,{style:o}=t.ctx.canvas;o&&(o.cursor=""),e.forEach((n,l)=>{for(var{run:A}=n,d=i[l];d;)A(d),d=d.parent}),this.events=[],this.eventElements=[]}}checkPath(t,e){if(!(!this.working||!e)){var{events:i,eventElements:o}=this;i.forEach((n,l)=>{var{x:A,y:d}=n;!o[l]&&e.isPointInPath&&e.isPointInPath(A,d)&&(o[l]=t)})}}checkBoundingBox(t,e){if(!(!this.working||!e)){var{events:i,eventElements:o}=this;i.forEach((n,l)=>{var{x:A,y:d}=n;!o[l]&&e.isPointInBox(A,d)&&(o[l]=t)})}}mapXY(t,e){for(var{window:i,ctx:o}=this.screen,n=new T8(t,e),l=o.canvas;l;)n.x-=l.offsetLeft,n.y-=l.offsetTop,l=l.offsetParent;return i.scrollX&&(n.x+=i.scrollX),i.scrollY&&(n.y+=i.scrollY),n}onClick(t){var{x:e,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:i,run(o){o.onClick&&o.onClick()}})}onMouseMove(t){var{x:e,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:i,run(o){o.onMouseMove&&o.onMouseMove()}})}},rW=typeof window<"u"?window:null,iW=typeof fetch<"u"?fetch.bind(void 0):null,kc=class{constructor(t){var{fetch:e=iW,window:i=rW}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Lv,this.mouse=new Cv(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=i,this.fetch=e}wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var t=this.waits.every(e=>e());return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){var{document:e,ctx:i,aspectRatio:o,width:n,desiredWidth:l,height:A,desiredHeight:d,minX:L=0,minY:C=0,refX:y,refY:E,clip:B=!1,clipX:Z=0,clipY:Q=0}=t,V=Nc(o).replace(/^defer\s/,""),[G,J]=V.split(" "),n1=G||"xMidYMid",r1=J||"meet",m1=n/l,w1=A/d,B1=Math.min(m1,w1),g1=Math.max(m1,w1),L1=l,z1=d;r1==="meet"&&(L1*=B1,z1*=B1),r1==="slice"&&(L1*=g1,z1*=g1);var s1=new y5(e,"refX",y),x1=new y5(e,"refY",E),N1=s1.hasValue()&&x1.hasValue();if(N1&&i.translate(-B1*s1.getPixels("x"),-B1*x1.getPixels("y")),B){var V1=B1*Z,l2=B1*Q;i.beginPath(),i.moveTo(V1,l2),i.lineTo(n,l2),i.lineTo(n,A),i.lineTo(V1,A),i.closePath(),i.clip()}if(!N1){var p2=r1==="meet"&&B1===w1,o2=r1==="slice"&&g1===w1,G1=r1==="meet"&&B1===m1,L2=r1==="slice"&&g1===m1;n1.startsWith("xMid")&&(p2||o2)&&i.translate(n/2-L1/2,0),n1.endsWith("YMid")&&(G1||L2)&&i.translate(0,A/2-z1/2),n1.startsWith("xMax")&&(p2||o2)&&i.translate(n-L1,0),n1.endsWith("YMax")&&(G1||L2)&&i.translate(0,A-z1)}switch(!0){case n1==="none":i.scale(m1,w1);break;case r1==="meet":i.scale(B1,B1);break;case r1==="slice":i.scale(g1,g1);break}i.translate(-L,-C)}start(t){var{enableRedraw:e=!1,ignoreMouse:i=!1,ignoreAnimation:o=!1,ignoreDimensions:n=!1,ignoreClear:l=!1,forceRedraw:A,scaleWidth:d,scaleHeight:L,offsetX:C,offsetY:y}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:E,mouse:B}=this,Z=1e3/E;if(this.frameDuration=Z,this.readyPromise=new Promise(n1=>{this.resolveReady=n1}),this.isReady()&&this.render(t,n,l,d,L,C,y),!!e){var Q=Date.now(),V=Q,G=0,J=()=>{Q=Date.now(),G=Q-V,G>=Z&&(V=Q-G%Z,this.shouldUpdate(o,A)&&(this.render(t,n,l,d,L,C,y),B.runEvents())),this.intervalId=(0,dv.default)(J)};i||B.start(),this.intervalId=(0,dv.default)(J)}}stop(){this.intervalId&&(dv.default.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){var{frameDuration:i}=this,o=this.animations.reduce((n,l)=>l.update(i)||n,!1);if(o)return!0}return!!(typeof e=="function"&&e()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(t,e,i,o,n,l,A){var{CLIENT_WIDTH:d,CLIENT_HEIGHT:L,viewPort:C,ctx:y,isFirstRender:E}=this,B=y.canvas;C.clear(),B.width&&B.height?C.setCurrent(B.width,B.height):C.setCurrent(d,L);var Z=t.getStyle("width"),Q=t.getStyle("height");!e&&(E||typeof o!="number"&&typeof n!="number")&&(Z.hasValue()&&(B.width=Z.getPixels("x"),B.style&&(B.style.width="".concat(B.width,"px"))),Q.hasValue()&&(B.height=Q.getPixels("y"),B.style&&(B.style.height="".concat(B.height,"px"))));var V=B.clientWidth||B.width,G=B.clientHeight||B.height;if(e&&Z.hasValue()&&Q.hasValue()&&(V=Z.getPixels("x"),G=Q.getPixels("y")),C.setCurrent(V,G),typeof l=="number"&&t.getAttribute("x",!0).setValue(l),typeof A=="number"&&t.getAttribute("y",!0).setValue(A),typeof o=="number"||typeof n=="number"){var J=V7(t.getAttribute("viewBox").getString()),n1=0,r1=0;if(typeof o=="number"){var m1=t.getStyle("width");m1.hasValue()?n1=m1.getPixels("x")/o:isNaN(J[2])||(n1=J[2]/o)}if(typeof n=="number"){var w1=t.getStyle("height");w1.hasValue()?r1=w1.getPixels("y")/n:isNaN(J[3])||(r1=J[3]/n)}n1||(n1=r1),r1||(r1=n1),t.getAttribute("width",!0).setValue(o),t.getAttribute("height",!0).setValue(n);var B1=t.getStyle("transform",!0,!0);B1.setValue("".concat(B1.getString()," scale(").concat(1/n1,", ").concat(1/r1,")"))}i||y.clearRect(0,0,V,G),t.render(y),E&&(this.isFirstRender=!1)}};kc.defaultWindow=rW;kc.defaultFetch=iW;({defaultFetch:Nu1}=kc),Uu1=typeof DOMParser<"u"?DOMParser:null,rA=class{constructor(){var{fetch:t=Nu1,DOMParser:e=Uu1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=t,this.DOMParser=e}parse(t){var e=this;return K4(function*(){return t.startsWith("<")?e.parseFromString(t):e.load(t)})()}parseFromString(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch{return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}load(t){var e=this;return K4(function*(){var i=yield e.fetch(t),o=yield i.text();return e.parseFromString(o)})()}},gv=class{constructor(t,e){this.type="translate",this.point=null,this.point=T8.parse(e)}apply(t){var{x:e,y:i}=this.point;t.translate(e||0,i||0)}unapply(t){var{x:e,y:i}=this.point;t.translate(-1*e||0,-1*i||0)}applyToPoint(t){var{x:e,y:i}=this.point;t.applyTransform([1,0,0,1,e||0,i||0])}},mv=class{constructor(t,e,i){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var o=V7(e);this.angle=new y5(t,"angle",o[0]),this.originX=i[0],this.originY=i[1],this.cx=o[1]||0,this.cy=o[2]||0}apply(t){var{cx:e,cy:i,originX:o,originY:n,angle:l}=this,A=e+o.getPixels("x"),d=i+n.getPixels("y");t.translate(A,d),t.rotate(l.getRadians()),t.translate(-A,-d)}unapply(t){var{cx:e,cy:i,originX:o,originY:n,angle:l}=this,A=e+o.getPixels("x"),d=i+n.getPixels("y");t.translate(A,d),t.rotate(-1*l.getRadians()),t.translate(-A,-d)}applyToPoint(t){var{cx:e,cy:i,angle:o}=this,n=o.getRadians();t.applyTransform([1,0,0,1,e||0,i||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-e||0,-i||0])}},vv=class{constructor(t,e,i){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var o=T8.parseScale(e);(o.x===0||o.y===0)&&(o.x=Dc,o.y=Dc),this.scale=o,this.originX=i[0],this.originY=i[1]}apply(t){var{scale:{x:e,y:i},originX:o,originY:n}=this,l=o.getPixels("x"),A=n.getPixels("y");t.translate(l,A),t.scale(e,i||e),t.translate(-l,-A)}unapply(t){var{scale:{x:e,y:i},originX:o,originY:n}=this,l=o.getPixels("x"),A=n.getPixels("y");t.translate(l,A),t.scale(1/e,1/i||e),t.translate(-l,-A)}applyToPoint(t){var{x:e,y:i}=this.scale;t.applyTransform([e||0,0,0,i||0,0,0])}},kp=class{constructor(t,e,i){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=V7(e),this.originX=i[0],this.originY=i[1]}apply(t){var{originX:e,originY:i,matrix:o}=this,n=e.getPixels("x"),l=i.getPixels("y");t.translate(n,l),t.transform(o[0],o[1],o[2],o[3],o[4],o[5]),t.translate(-n,-l)}unapply(t){var{originX:e,originY:i,matrix:o}=this,n=o[0],l=o[2],A=o[4],d=o[1],L=o[3],C=o[5],y=0,E=0,B=1,Z=1/(n*(L*B-C*E)-l*(d*B-C*y)+A*(d*E-L*y)),Q=e.getPixels("x"),V=i.getPixels("y");t.translate(Q,V),t.transform(Z*(L*B-C*E),Z*(C*y-d*B),Z*(A*E-l*B),Z*(n*B-A*y),Z*(l*C-A*L),Z*(A*d-n*C)),t.translate(-Q,-V)}applyToPoint(t){t.applyTransform(this.matrix)}},Op=class extends kp{constructor(t,e,i){super(t,e,i),this.type="skew",this.angle=null,this.angle=new y5(t,"angle",e)}},yv=class extends Op{constructor(t,e,i){super(t,e,i),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}},_v=class extends Op{constructor(t,e,i){super(t,e,i),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}};Oc=class r{constructor(t,e,i){this.document=t,this.transforms=[];var o=Qu1(e);o.forEach(n=>{if(n!=="none"){var[l,A]=Hu1(n),d=r.transformTypes[l];typeof d<"u"&&this.transforms.push(new d(this.document,A,i))}})}static fromElement(t,e){var i=e.getStyle("transform",!1,!0),[o,n=o]=e.getStyle("transform-origin",!1,!0).split(),l=[o,n];return i.hasValue()?new r(t,i.getString(),l):null}apply(t){for(var{transforms:e}=this,i=e.length,o=0;o<i;o++)e[o].apply(t)}unapply(t){for(var{transforms:e}=this,i=e.length,o=i-1;o>=0;o--)e[o].unapply(t)}applyToPoint(t){for(var{transforms:e}=this,i=e.length,o=0;o<i;o++)e[o].applyToPoint(t)}};Oc.transformTypes={translate:gv,rotate:mv,scale:vv,matrix:kp,skewX:yv,skewY:_v};H6=class r{constructor(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=t,this.node=e,this.captureTextNodes=i,this.attributes=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!e||e.nodeType!==1)){if(Array.from(e.attributes).forEach(A=>{var d=JK(A.nodeName);this.attributes[d]=new y5(t,d,A.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var o=this.getAttribute("style").getString().split(";").map(A=>A.trim());o.forEach(A=>{if(A){var[d,L]=A.split(":").map(C=>C.trim());this.styles[d]=new y5(t,d,L)}})}var{definitions:n}=t,l=this.getAttribute("id");l.hasValue()&&(n[l.getString()]||(n[l.getString()]=this)),Array.from(e.childNodes).forEach(A=>{if(A.nodeType===1)this.addChild(A);else if(i&&(A.nodeType===3||A.nodeType===4)){var d=t.createTextNode(A);d.getText().length>0&&this.addChild(d)}})}}getAttribute(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.attributes[t];if(!i&&e){var o=new y5(this.document,t,"");return this.attributes[t]=o,o}return i||y5.empty(this.document)}getHrefAttribute(){for(var t in this.attributes)if(t==="href"||t.endsWith(":href"))return this.attributes[t];return y5.empty(this.document)}getStyle(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,o=this.styles[t];if(o)return o;var n=this.getAttribute(t);if(n!=null&&n.hasValue())return this.styles[t]=n,n;if(!i){var{parent:l}=this;if(l){var A=l.getStyle(t);if(A!=null&&A.hasValue())return A}}if(e){var d=new y5(this.document,t,"");return this.styles[t]=d,d}return o||y5.empty(this.document)}render(t){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var i=this.getStyle("filter").getDefinition();i&&(this.applyEffects(t),i.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){var e=Oc.fromElement(this.document,this);e&&e.apply(t);var i=this.getStyle("clip-path",!1,!0);if(i.hasValue()){var o=i.getDefinition();o&&o.apply(t)}}clearContext(t){}renderChildren(t){this.children.forEach(e=>{e.render(t)})}addChild(t){var e=t instanceof r?t:this.document.createElement(t);e.parent=this,r.ignoreChildTypes.includes(e.type)||this.children.push(e)}matchesSelector(t){var e,{node:i}=this;if(typeof i.matches=="function")return i.matches(t);var o=(e=i.getAttribute)===null||e===void 0?void 0:e.call(i,"class");return!o||o===""?!1:o.split(" ").some(n=>".".concat(n)===t)}addStylesFromStyleDefinition(){var{styles:t,stylesSpecificity:e}=this.document;for(var i in t)if(!i.startsWith("@")&&this.matchesSelector(i)){var o=t[i],n=e[i];if(o)for(var l in o){var A=this.stylesSpecificity[l];typeof A>"u"&&(A="000"),n>=A&&(this.styles[l]=o[l],this.stylesSpecificity[l]=n)}}}removeStyles(t,e){var i=e.reduce((o,n)=>{var l=t.getStyle(n);if(!l.hasValue())return o;var A=l.getString();return l.setValue(""),[...o,[n,A]]},[]);return i}restoreStyles(t,e){e.forEach(i=>{var[o,n]=i;t.getStyle(o,!0).setValue(n)})}isFirstChild(){var t;return((t=this.parent)===null||t===void 0?void 0:t.children.indexOf(this))===0}};H6.ignoreChildTypes=["title"];xv=class extends H6{constructor(t,e,i){super(t,e,i)}};Jn=class r{constructor(t,e,i,o,n,l){var A=l?typeof l=="string"?r.parse(l):l:{};this.fontFamily=n||A.fontFamily,this.fontSize=o||A.fontSize,this.fontStyle=t||A.fontStyle,this.fontWeight=i||A.fontWeight,this.fontVariant=e||A.fontVariant}static parse(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,i="",o="",n="",l="",A="",d=Nc(t).trim().split(" "),L={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return d.forEach(C=>{switch(!0){case(!L.fontStyle&&r.styles.includes(C)):C!=="inherit"&&(i=C),L.fontStyle=!0;break;case(!L.fontVariant&&r.variants.includes(C)):C!=="inherit"&&(o=C),L.fontStyle=!0,L.fontVariant=!0;break;case(!L.fontWeight&&r.weights.includes(C)):C!=="inherit"&&(n=C),L.fontStyle=!0,L.fontVariant=!0,L.fontWeight=!0;break;case!L.fontSize:C!=="inherit"&&([l]=C.split("/")),L.fontStyle=!0,L.fontVariant=!0,L.fontWeight=!0,L.fontSize=!0;break;default:C!=="inherit"&&(A+=C)}}),new r(i,o,n,l,A,e)}toString(){return[ju1(this.fontStyle),this.fontVariant,qu1(this.fontWeight),this.fontSize,Gu1(this.fontFamily)].join(" ").trim()}};Jn.styles="normal|italic|oblique|inherit";Jn.variants="normal|small-caps|inherit";Jn.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";G7=class{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=t,this.y1=e,this.x2=i,this.y2=o,this.addPoint(t,e),this.addPoint(i,o)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(t,e){typeof t<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),typeof e<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}addX(t){this.addPoint(t,null)}addY(t){this.addPoint(null,t)}addBoundingBox(t){if(t){var{x1:e,y1:i,x2:o,y2:n}=t;this.addPoint(e,i),this.addPoint(o,n)}}sumCubic(t,e,i,o,n){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*i+3*(1-t)*Math.pow(t,2)*o+Math.pow(t,3)*n}bezierCurveAdd(t,e,i,o,n){var l=6*e-12*i+6*o,A=-3*e+9*i-9*o+3*n,d=3*i-3*e;if(A===0){if(l===0)return;var L=-d/l;0<L&&L<1&&(t?this.addX(this.sumCubic(L,e,i,o,n)):this.addY(this.sumCubic(L,e,i,o,n)));return}var C=Math.pow(l,2)-4*d*A;if(!(C<0)){var y=(-l+Math.sqrt(C))/(2*A);0<y&&y<1&&(t?this.addX(this.sumCubic(y,e,i,o,n)):this.addY(this.sumCubic(y,e,i,o,n)));var E=(-l-Math.sqrt(C))/(2*A);0<E&&E<1&&(t?this.addX(this.sumCubic(E,e,i,o,n)):this.addY(this.sumCubic(E,e,i,o,n)))}}addBezierCurve(t,e,i,o,n,l,A,d){this.addPoint(t,e),this.addPoint(A,d),this.bezierCurveAdd(!0,t,i,n,A),this.bezierCurveAdd(!1,e,o,l,d)}addQuadraticCurve(t,e,i,o,n,l){var A=t+.6666666666666666*(i-t),d=e+2/3*(o-e),L=A+1/3*(n-t),C=d+1/3*(l-e);this.addBezierCurve(t,e,A,L,d,C,n,l)}isPointInBox(t,e){var{x1:i,y1:o,x2:n,y2:l}=this;return i<=t&&t<=n&&o<=e&&e<=l}},j5=class extends Zt{constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new T8(0,0),this.control=new T8(0,0),this.current=new T8(0,0),this.points=[],this.angles=[]}isEnd(){var{i:t,commands:e}=this;return t>=e.length-1}next(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",i=new T8(this.command[t],this.command[e]);return this.makeAbsolute(i)}getAsControlPoint(t,e){var i=this.getPoint(t,e);return this.control=i,i}getAsCurrentPoint(t,e){var i=this.getPoint(t,e);return this.current=i,i}getReflectedControlPoint(){var t=this.previousCommand.type;if(t!==Zt.CURVE_TO&&t!==Zt.SMOOTH_CURVE_TO&&t!==Zt.QUAD_TO&&t!==Zt.SMOOTH_QUAD_TO)return this.current;var{current:{x:e,y:i},control:{x:o,y:n}}=this,l=new T8(2*e-o,2*i-n);return l}makeAbsolute(t){if(this.command.relative){var{x:e,y:i}=this.current;t.x+=e,t.y+=i}return t}addMarker(t,e,i){var{points:o,angles:n}=this;i&&n.length>0&&!n[n.length-1]&&(n[n.length-1]=o[o.length-1].angleTo(i)),this.addMarkerAngle(t,e?e.angleTo(t):null)}addMarkerAngle(t,e){this.points.push(t),this.angles.push(e)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:t}=this,e=t.length,i=0;i<e;i++)if(!t[i]){for(var o=i+1;o<e;o++)if(t[o]){t[i]=t[o];break}}return t}},$o=class extends H6{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var t=1,e=this;e;){var i=e.getStyle("opacity",!1,!0);i.hasValue(!0)&&(t*=i.getNumber()),e=e.parent}return t}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!e){var i=this.getStyle("fill"),o=this.getStyle("fill-opacity"),n=this.getStyle("stroke"),l=this.getStyle("stroke-opacity");if(i.isUrlDefinition()){var A=i.getFillStyleDefinition(this,o);A&&(t.fillStyle=A)}else if(i.hasValue()){i.getString()==="currentColor"&&i.setValue(this.getStyle("color").getColor());var d=i.getColor();d!=="inherit"&&(t.fillStyle=d==="none"?"rgba(0,0,0,0)":d)}if(o.hasValue()){var L=new y5(this.document,"fill",t.fillStyle).addOpacity(o).getColor();t.fillStyle=L}if(n.isUrlDefinition()){var C=n.getFillStyleDefinition(this,l);C&&(t.strokeStyle=C)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());var y=n.getString();y!=="inherit"&&(t.strokeStyle=y==="none"?"rgba(0,0,0,0)":y)}if(l.hasValue()){var E=new y5(this.document,"stroke",t.strokeStyle).addOpacity(l).getString();t.strokeStyle=E}var B=this.getStyle("stroke-width");if(B.hasValue()){var Z=B.getPixels();t.lineWidth=Z||Dc}var Q=this.getStyle("stroke-linecap"),V=this.getStyle("stroke-linejoin"),G=this.getStyle("stroke-miterlimit"),J=this.getStyle("stroke-dasharray"),n1=this.getStyle("stroke-dashoffset");if(Q.hasValue()&&(t.lineCap=Q.getString()),V.hasValue()&&(t.lineJoin=V.getString()),G.hasValue()&&(t.miterLimit=G.getNumber()),J.hasValue()&&J.getString()!=="none"){var r1=V7(J.getString());typeof t.setLineDash<"u"?t.setLineDash(r1):typeof t.webkitLineDash<"u"?t.webkitLineDash=r1:typeof t.mozDash<"u"&&!(r1.length===1&&r1[0]===0)&&(t.mozDash=r1);var m1=n1.getPixels();typeof t.lineDashOffset<"u"?t.lineDashOffset=m1:typeof t.webkitLineDashOffset<"u"?t.webkitLineDashOffset=m1:typeof t.mozDashOffset<"u"&&(t.mozDashOffset=m1)}}if(this.modifiedEmSizeStack=!1,typeof t.font<"u"){var w1=this.getStyle("font"),B1=this.getStyle("font-style"),g1=this.getStyle("font-variant"),L1=this.getStyle("font-weight"),z1=this.getStyle("font-size"),s1=this.getStyle("font-family"),x1=new Jn(B1.getString(),g1.getString(),L1.getString(),z1.hasValue()?"".concat(z1.getPixels(!0),"px"):"",s1.getString(),Jn.parse(w1.getString(),t.font));B1.setValue(x1.fontStyle),g1.setValue(x1.fontVariant),L1.setValue(x1.fontWeight),z1.setValue(x1.fontSize),s1.setValue(x1.fontFamily),t.font=x1.toString(),z1.isPixels()&&(this.document.emSize=z1.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}},r8=class r extends $o{constructor(t,e,i){super(t,e,i),this.type="path",this.pathParser=null,this.pathParser=new j5(this.getAttribute("d").getString())}path(t){var{pathParser:e}=this,i=new G7;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case j5.MOVE_TO:this.pathM(t,i);break;case j5.LINE_TO:this.pathL(t,i);break;case j5.HORIZ_LINE_TO:this.pathH(t,i);break;case j5.VERT_LINE_TO:this.pathV(t,i);break;case j5.CURVE_TO:this.pathC(t,i);break;case j5.SMOOTH_CURVE_TO:this.pathS(t,i);break;case j5.QUAD_TO:this.pathQ(t,i);break;case j5.SMOOTH_QUAD_TO:this.pathT(t,i);break;case j5.ARC:this.pathA(t,i);break;case j5.CLOSE_PATH:this.pathZ(t,i);break}return i}getBoundingBox(t){return this.path()}getMarkers(){var{pathParser:t}=this,e=t.getMarkerPoints(),i=t.getMarkerAngles(),o=e.map((n,l)=>[n,i[l]]);return o}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");t.fillStyle!==""&&(e.getString("inherit")!=="inherit"?t.fill(e.getString()):t.fill()),t.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var i=this.getMarkers();if(i){var o=i.length-1,n=this.getStyle("marker-start"),l=this.getStyle("marker-mid"),A=this.getStyle("marker-end");if(n.isUrlDefinition()){var d=n.getDefinition(),[L,C]=i[0];d.render(t,L,C)}if(l.isUrlDefinition())for(var y=l.getDefinition(),E=1;E<o;E++){var[B,Z]=i[E];y.render(t,B,Z)}if(A.isUrlDefinition()){var Q=A.getDefinition(),[V,G]=i[o];Q.render(t,V,G)}}}static pathM(t){var e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}pathM(t,e){var{pathParser:i}=this,{point:o}=r.pathM(i),{x:n,y:l}=o;i.addMarker(o),e.addPoint(n,l),t&&t.moveTo(n,l)}static pathL(t){var{current:e}=t,i=t.getAsCurrentPoint();return{current:e,point:i}}pathL(t,e){var{pathParser:i}=this,{current:o,point:n}=r.pathL(i),{x:l,y:A}=n;i.addMarker(n,o),e.addPoint(l,A),t&&t.lineTo(l,A)}static pathH(t){var{current:e,command:i}=t,o=new T8((i.relative?e.x:0)+i.x,e.y);return t.current=o,{current:e,point:o}}pathH(t,e){var{pathParser:i}=this,{current:o,point:n}=r.pathH(i),{x:l,y:A}=n;i.addMarker(n,o),e.addPoint(l,A),t&&t.lineTo(l,A)}static pathV(t){var{current:e,command:i}=t,o=new T8(e.x,(i.relative?e.y:0)+i.y);return t.current=o,{current:e,point:o}}pathV(t,e){var{pathParser:i}=this,{current:o,point:n}=r.pathV(i),{x:l,y:A}=n;i.addMarker(n,o),e.addPoint(l,A),t&&t.lineTo(l,A)}static pathC(t){var{current:e}=t,i=t.getPoint("x1","y1"),o=t.getAsControlPoint("x2","y2"),n=t.getAsCurrentPoint();return{current:e,point:i,controlPoint:o,currentPoint:n}}pathC(t,e){var{pathParser:i}=this,{current:o,point:n,controlPoint:l,currentPoint:A}=r.pathC(i);i.addMarker(A,l,n),e.addBezierCurve(o.x,o.y,n.x,n.y,l.x,l.y,A.x,A.y),t&&t.bezierCurveTo(n.x,n.y,l.x,l.y,A.x,A.y)}static pathS(t){var{current:e}=t,i=t.getReflectedControlPoint(),o=t.getAsControlPoint("x2","y2"),n=t.getAsCurrentPoint();return{current:e,point:i,controlPoint:o,currentPoint:n}}pathS(t,e){var{pathParser:i}=this,{current:o,point:n,controlPoint:l,currentPoint:A}=r.pathS(i);i.addMarker(A,l,n),e.addBezierCurve(o.x,o.y,n.x,n.y,l.x,l.y,A.x,A.y),t&&t.bezierCurveTo(n.x,n.y,l.x,l.y,A.x,A.y)}static pathQ(t){var{current:e}=t,i=t.getAsControlPoint("x1","y1"),o=t.getAsCurrentPoint();return{current:e,controlPoint:i,currentPoint:o}}pathQ(t,e){var{pathParser:i}=this,{current:o,controlPoint:n,currentPoint:l}=r.pathQ(i);i.addMarker(l,n,n),e.addQuadraticCurve(o.x,o.y,n.x,n.y,l.x,l.y),t&&t.quadraticCurveTo(n.x,n.y,l.x,l.y)}static pathT(t){var{current:e}=t,i=t.getReflectedControlPoint();t.control=i;var o=t.getAsCurrentPoint();return{current:e,controlPoint:i,currentPoint:o}}pathT(t,e){var{pathParser:i}=this,{current:o,controlPoint:n,currentPoint:l}=r.pathT(i);i.addMarker(l,n,n),e.addQuadraticCurve(o.x,o.y,n.x,n.y,l.x,l.y),t&&t.quadraticCurveTo(n.x,n.y,l.x,l.y)}static pathA(t){var{current:e,command:i}=t,{rX:o,rY:n,xRot:l,lArcFlag:A,sweepFlag:d}=i,L=l*(Math.PI/180),C=t.getAsCurrentPoint(),y=new T8(Math.cos(L)*(e.x-C.x)/2+Math.sin(L)*(e.y-C.y)/2,-Math.sin(L)*(e.x-C.x)/2+Math.cos(L)*(e.y-C.y)/2),E=Math.pow(y.x,2)/Math.pow(o,2)+Math.pow(y.y,2)/Math.pow(n,2);E>1&&(o*=Math.sqrt(E),n*=Math.sqrt(E));var B=(A===d?-1:1)*Math.sqrt((Math.pow(o,2)*Math.pow(n,2)-Math.pow(o,2)*Math.pow(y.y,2)-Math.pow(n,2)*Math.pow(y.x,2))/(Math.pow(o,2)*Math.pow(y.y,2)+Math.pow(n,2)*Math.pow(y.x,2)));isNaN(B)&&(B=0);var Z=new T8(B*o*y.y/n,B*-n*y.x/o),Q=new T8((e.x+C.x)/2+Math.cos(L)*Z.x-Math.sin(L)*Z.y,(e.y+C.y)/2+Math.sin(L)*Z.x+Math.cos(L)*Z.y),V=NT([1,0],[(y.x-Z.x)/o,(y.y-Z.y)/n]),G=[(y.x-Z.x)/o,(y.y-Z.y)/n],J=[(-y.x-Z.x)/o,(-y.y-Z.y)/n],n1=NT(G,J);return pv(G,J)<=-1&&(n1=Math.PI),pv(G,J)>=1&&(n1=0),{currentPoint:C,rX:o,rY:n,sweepFlag:d,xAxisRotation:L,centp:Q,a1:V,ad:n1}}pathA(t,e){var{pathParser:i}=this,{currentPoint:o,rX:n,rY:l,sweepFlag:A,xAxisRotation:d,centp:L,a1:C,ad:y}=r.pathA(i),E=1-A?1:-1,B=C+E*(y/2),Z=new T8(L.x+n*Math.cos(B),L.y+l*Math.sin(B));if(i.addMarkerAngle(Z,B-E*Math.PI/2),i.addMarkerAngle(o,B-E*Math.PI),e.addPoint(o.x,o.y),t&&!isNaN(C)&&!isNaN(y)){var Q=n>l?n:l,V=n>l?1:n/l,G=n>l?l/n:1;t.translate(L.x,L.y),t.rotate(d),t.scale(V,G),t.arc(0,0,Q,C,C+y,!!(1-A)),t.scale(1/V,1/G),t.rotate(-d),t.translate(-L.x,-L.y)}}static pathZ(t){t.current=t.start}pathZ(t,e){r.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}},Zp=class extends r8{constructor(t,e,i){super(t,e,i),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}},fl=class r extends $o{constructor(t,e,i){super(t,e,new.target===r?!0:i),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(t,e);var i=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();i&&(t.textBaseline=i)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if(this.type!=="text")return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var e=null;return this.children.forEach((i,o)=>{var n=this.getChildBoundingBox(t,this,this,o);e?e.addBoundingBox(n):e=n}),e}getFontSize(){var{document:t,parent:e}=this,i=Jn.parse(t.ctx.font).fontSize,o=e.getStyle("font-size").getNumber(i);return o}getTElementBoundingBox(t){var e=this.getFontSize();return new G7(this.x,this.y-e,this.x+this.measureText(t),this.y)}getGlyph(t,e,i){var o=e[i],n=null;if(t.isArabic){var l=e.length,A=e[i-1],d=e[i+1],L="isolated";if((i===0||A===" ")&&i<l-1&&d!==" "&&(L="terminal"),i>0&&A!==" "&&i<l-1&&d!==" "&&(L="medial"),i>0&&A!==" "&&(i===l-1||d===" ")&&(L="initial"),typeof t.glyphs[o]<"u"){var C=t.glyphs[o];n=C instanceof Zp?C:C[L]}}else n=t.glyphs[o];return n||(n=t.missingGlyph),n}getText(){return""}getTextFromNode(t){var e=t||this.node,i=Array.from(e.parentNode.childNodes),o=i.indexOf(e),n=i.length-1,l=Nc(e.textContent||"");return o===0&&(l=XK(l)),o===n&&(l=YK(l)),l}renderChildren(t){if(this.type!=="text"){this.renderTElementChildren(t);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((i,o)=>{this.renderChild(t,this,this,o)});var{mouse:e}=this.document.screen;e.isWorking()&&e.checkBoundingBox(this,this.getBoundingBox(t))}renderTElementChildren(t){var{document:e,parent:i}=this,o=this.getText(),n=i.getStyle("font-family").getDefinition();if(n){for(var{unitsPerEm:l}=n.fontFace,A=Jn.parse(e.ctx.font),d=i.getStyle("font-size").getNumber(A.fontSize),L=i.getStyle("font-style").getString(A.fontStyle),C=d/l,y=n.isRTL?o.split("").reverse().join(""):o,E=V7(i.getAttribute("dx").getString()),B=y.length,Z=0;Z<B;Z++){var Q=this.getGlyph(n,y,Z);t.translate(this.x,this.y),t.scale(C,-C);var V=t.lineWidth;t.lineWidth=t.lineWidth*l/d,L==="italic"&&t.transform(1,0,.4,1,0,0),Q.render(t),L==="italic"&&t.transform(1,0,-.4,1,0,0),t.lineWidth=V,t.scale(1/C,-1/C),t.translate(-this.x,-this.y),this.x+=d*(Q.horizAdvX||n.horizAdvX)/l,typeof E[Z]<"u"&&!isNaN(E[Z])&&(this.x+=E[Z])}return}var{x:G,y:J}=this;t.fillStyle&&t.fillText(o,G,J),t.strokeStyle&&t.strokeText(o,G,J)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start"),i=!1,o=0;e==="start"&&!i||e==="end"&&i?o=t.x-this.minX:e==="end"&&!i||e==="start"&&i?o=t.x-this.maxX:o=t.x-(this.minX+this.maxX)/2;for(var n=this.textChunkStart;n<this.leafTexts.length;n++)this.leafTexts[n].x+=o;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(t){this.children.forEach((e,i)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,i)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,e,i,o){var n=i.children[o];n.children.length>0?n.children.forEach((l,A)=>{e.adjustChildCoordinatesRecursiveCore(t,e,n,A)}):this.adjustChildCoordinates(t,e,i,o)}adjustChildCoordinates(t,e,i,o){var n=i.children[o];if(typeof n.measureText!="function")return n;t.save(),n.setContext(t,!0);var l=n.getAttribute("x"),A=n.getAttribute("y"),d=n.getAttribute("dx"),L=n.getAttribute("dy"),C=n.getStyle("font-family").getDefinition(),y=!!C&&C.isRTL;o===0&&(l.hasValue()||l.setValue(n.getInheritedAttribute("x")),A.hasValue()||A.setValue(n.getInheritedAttribute("y")),d.hasValue()||d.setValue(n.getInheritedAttribute("dx")),L.hasValue()||L.setValue(n.getInheritedAttribute("dy")));var E=n.measureText(t);return y&&(e.x-=E),l.hasValue()?(e.applyAnchoring(),n.x=l.getPixels("x"),d.hasValue()&&(n.x+=d.getPixels("x"))):(d.hasValue()&&(e.x+=d.getPixels("x")),n.x=e.x),e.x=n.x,y||(e.x+=E),A.hasValue()?(n.y=A.getPixels("y"),L.hasValue()&&(n.y+=L.getPixels("y"))):(L.hasValue()&&(e.y+=L.getPixels("y")),n.y=e.y),e.y=n.y,e.leafTexts.push(n),e.minX=Math.min(e.minX,n.x,n.x+E),e.maxX=Math.max(e.maxX,n.x,n.x+E),n.clearContext(t),t.restore(),n}getChildBoundingBox(t,e,i,o){var n=i.children[o];if(typeof n.getBoundingBox!="function")return null;var l=n.getBoundingBox(t);return l?(n.children.forEach((A,d)=>{var L=e.getChildBoundingBox(t,e,n,d);l.addBoundingBox(L)}),l):null}renderChild(t,e,i,o){var n=i.children[o];n.render(t),n.children.forEach((l,A)=>{e.renderChild(t,e,n,A)})}measureText(t){var{measureCache:e}=this;if(~e)return e;var i=this.getText(),o=this.measureTargetText(t,i);return this.measureCache=o,o}measureTargetText(t,e){if(!e.length)return 0;var{parent:i}=this,o=i.getStyle("font-family").getDefinition();if(o){for(var n=this.getFontSize(),l=o.isRTL?e.split("").reverse().join(""):e,A=V7(i.getAttribute("dx").getString()),d=l.length,L=0,C=0;C<d;C++){var y=this.getGlyph(o,l,C);L+=(y.horizAdvX||o.horizAdvX)*n/o.fontFace.unitsPerEm,typeof A[C]<"u"&&!isNaN(A[C])&&(L+=A[C])}return L}if(!t.measureText)return e.length*10;t.save(),this.setContext(t,!0);var{width:E}=t.measureText(e);return this.clearContext(t),t.restore(),E}getInheritedAttribute(t){for(var e=this;e instanceof r&&e.isFirstChild();){var i=e.parent.getAttribute(t);if(i.hasValue(!0))return i.getValue("0");e=e.parent}return null}},Np=class r extends fl{constructor(t,e,i){super(t,e,new.target===r?!0:i),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}},KT=class extends Np{constructor(){super(...arguments),this.type="textNode"}},pl=class extends $o{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(t){var e,{document:i}=this,{screen:o,window:n}=i,l=t.canvas;if(o.setDefaults(t),l.style&&typeof t.font<"u"&&n&&typeof n.getComputedStyle<"u"){t.font=n.getComputedStyle(l).getPropertyValue("font");var A=new y5(i,"fontSize",Jn.parse(t.font).fontSize);A.hasValue()&&(i.rootEmSize=A.getPixels("y"),i.emSize=i.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:d,height:L}=o.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var C=this.getAttribute("refX"),y=this.getAttribute("refY"),E=this.getAttribute("viewBox"),B=E.hasValue()?V7(E.getString()):null,Z=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",Q=0,V=0,G=0,J=0;B&&(Q=B[0],V=B[1]),this.root||(d=this.getStyle("width").getPixels("x"),L=this.getStyle("height").getPixels("y"),this.type==="marker"&&(G=Q,J=V,Q=0,V=0)),o.viewPort.setCurrent(d,L),this.node&&(!this.parent||((e=this.node.parentNode)===null||e===void 0?void 0:e.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),B&&(d=B[2],L=B[3]),i.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:o.viewPort.width,desiredWidth:d,height:o.viewPort.height,desiredHeight:L,minX:Q,minY:V,refX:C.getValue(),refY:y.getValue(),clip:Z,clipX:G,clipY:J}),B&&(o.viewPort.removeCurrent(),o.viewPort.setCurrent(d,L))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,o=this.getAttribute("width",!0),n=this.getAttribute("height",!0),l=this.getAttribute("viewBox"),A=this.getAttribute("style"),d=o.getNumber(0),L=n.getNumber(0);if(i)if(typeof i=="string")this.getAttribute("preserveAspectRatio",!0).setValue(i);else{var C=this.getAttribute("preserveAspectRatio");C.hasValue()&&C.setValue(C.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(o.setValue(t),n.setValue(e),l.hasValue()||l.setValue("0 0 ".concat(d||t," ").concat(L||e)),A.hasValue()){var y=this.getStyle("width"),E=this.getStyle("height");y.hasValue()&&y.setValue("".concat(t,"px")),E.hasValue()&&E.setValue("".concat(e,"px"))}}},Up=class extends r8{constructor(){super(...arguments),this.type="rect"}path(t){var e=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),o=this.getStyle("width",!1,!0).getPixels("x"),n=this.getStyle("height",!1,!0).getPixels("y"),l=this.getAttribute("rx"),A=this.getAttribute("ry"),d=l.getPixels("x"),L=A.getPixels("y");if(l.hasValue()&&!A.hasValue()&&(L=d),A.hasValue()&&!l.hasValue()&&(d=L),d=Math.min(d,o/2),L=Math.min(L,n/2),t){var C=4*((Math.sqrt(2)-1)/3);t.beginPath(),n>0&&o>0&&(t.moveTo(e+d,i),t.lineTo(e+o-d,i),t.bezierCurveTo(e+o-d+C*d,i,e+o,i+L-C*L,e+o,i+L),t.lineTo(e+o,i+n-L),t.bezierCurveTo(e+o,i+n-L+C*L,e+o-d+C*d,i+n,e+o-d,i+n),t.lineTo(e+d,i+n),t.bezierCurveTo(e+d-C*d,i+n,e,i+n-L+C*L,e,i+n-L),t.lineTo(e,i+L),t.bezierCurveTo(e,i+L-C*L,e+d-C*d,i,e+d,i),t.closePath())}return new G7(e,i,e+o,i+n)}getMarkers(){return null}},wv=class extends r8{constructor(){super(...arguments),this.type="circle"}path(t){var e=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y"),o=this.getAttribute("r").getPixels();return t&&o>0&&(t.beginPath(),t.arc(e,i,o,0,Math.PI*2,!1),t.closePath()),new G7(e-o,i-o,e+o,i+o)}getMarkers(){return null}},bv=class extends r8{constructor(){super(...arguments),this.type="ellipse"}path(t){var e=4*((Math.sqrt(2)-1)/3),i=this.getAttribute("rx").getPixels("x"),o=this.getAttribute("ry").getPixels("y"),n=this.getAttribute("cx").getPixels("x"),l=this.getAttribute("cy").getPixels("y");return t&&i>0&&o>0&&(t.beginPath(),t.moveTo(n+i,l),t.bezierCurveTo(n+i,l+e*o,n+e*i,l+o,n,l+o),t.bezierCurveTo(n-e*i,l+o,n-i,l+e*o,n-i,l),t.bezierCurveTo(n-i,l-e*o,n-e*i,l-o,n,l-o),t.bezierCurveTo(n+e*i,l-o,n+i,l-e*o,n+i,l),t.closePath()),new G7(n-i,l-o,n+i,l+o)}getMarkers(){return null}},Mv=class extends r8{constructor(){super(...arguments),this.type="line"}getPoints(){return[new T8(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new T8(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){var[{x:e,y:i},{x:o,y:n}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(e,i),t.lineTo(o,n)),new G7(e,i,o,n)}getMarkers(){var[t,e]=this.getPoints(),i=t.angleTo(e);return[[t,i],[e,i]]}},Qp=class extends r8{constructor(t,e,i){super(t,e,i),this.type="polyline",this.points=[],this.points=T8.parsePath(this.getAttribute("points").getString())}path(t){var{points:e}=this,[{x:i,y:o}]=e,n=new G7(i,o);return t&&(t.beginPath(),t.moveTo(i,o)),e.forEach(l=>{var{x:A,y:d}=l;n.addPoint(A,d),t&&t.lineTo(A,d)}),n}getMarkers(){var{points:t}=this,e=t.length-1,i=[];return t.forEach((o,n)=>{n!==e&&i.push([o,o.angleTo(t[n+1])])}),i.length>0&&i.push([t[t.length-1],i[i.length-1][1]]),i}},Bv=class extends Qp{constructor(){super(...arguments),this.type="polygon"}path(t){var e=super.path(t),[{x:i,y:o}]=this.points;return t&&(t.lineTo(i,o),t.closePath()),e}},Sv=class extends H6{constructor(){super(...arguments),this.type="pattern"}createPattern(t,e,i){var o=this.getStyle("width").getPixels("x",!0),n=this.getStyle("height").getPixels("y",!0),l=new pl(this.document,null);l.attributes.viewBox=new y5(this.document,"viewBox",this.getAttribute("viewBox").getValue()),l.attributes.width=new y5(this.document,"width","".concat(o,"px")),l.attributes.height=new y5(this.document,"height","".concat(n,"px")),l.attributes.transform=new y5(this.document,"transform",this.getAttribute("patternTransform").getValue()),l.children=this.children;var A=this.document.createCanvas(o,n),d=A.getContext("2d"),L=this.getAttribute("x"),C=this.getAttribute("y");L.hasValue()&&C.hasValue()&&d.translate(L.getPixels("x",!0),C.getPixels("y",!0)),i.hasValue()?this.styles["fill-opacity"]=i:Reflect.deleteProperty(this.styles,"fill-opacity");for(var y=-1;y<=1;y++)for(var E=-1;E<=1;E++)d.save(),l.attributes.x=new y5(this.document,"x",y*A.width),l.attributes.y=new y5(this.document,"y",E*A.height),l.render(d),d.restore();var B=t.createPattern(A,"repeat");return B}},Ev=class extends H6{constructor(){super(...arguments),this.type="marker"}render(t,e,i){if(e){var{x:o,y:n}=e,l=this.getAttribute("orient").getString("auto"),A=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(o,n),l==="auto"&&t.rotate(i),A==="strokeWidth"&&t.scale(t.lineWidth,t.lineWidth),t.save();var d=new pl(this.document,null);d.type=this.type,d.attributes.viewBox=new y5(this.document,"viewBox",this.getAttribute("viewBox").getValue()),d.attributes.refX=new y5(this.document,"refX",this.getAttribute("refX").getValue()),d.attributes.refY=new y5(this.document,"refY",this.getAttribute("refY").getValue()),d.attributes.width=new y5(this.document,"width",this.getAttribute("markerWidth").getValue()),d.attributes.height=new y5(this.document,"height",this.getAttribute("markerHeight").getValue()),d.attributes.overflow=new y5(this.document,"overflow",this.getAttribute("overflow").getValue()),d.attributes.fill=new y5(this.document,"fill",this.getAttribute("fill").getColor("black")),d.attributes.stroke=new y5(this.document,"stroke",this.getAttribute("stroke").getValue("none")),d.children=this.children,d.render(t),t.restore(),A==="strokeWidth"&&t.scale(1/t.lineWidth,1/t.lineWidth),l==="auto"&&t.rotate(-i),t.translate(-o,-n)}}},Tv=class extends H6{constructor(){super(...arguments),this.type="defs"}render(){}},iA=class extends $o{constructor(){super(...arguments),this.type="g"}getBoundingBox(t){var e=new G7;return this.children.forEach(i=>{e.addBoundingBox(i.getBoundingBox(t))}),e}},Hp=class extends H6{constructor(t,e,i){super(t,e,i),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:o,children:n}=this;n.forEach(l=>{l.type==="stop"&&o.push(l)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,e,i){var o=this;this.getHrefAttribute().hasValue()&&(o=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(o));var{stops:n}=o,l=this.getGradient(t,e);if(!l)return this.addParentOpacity(i,n[n.length-1].color);if(n.forEach(V=>{l.addColorStop(V.offset,this.addParentOpacity(i,V.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:A}=this,{MAX_VIRTUAL_PIXELS:d,viewPort:L}=A.screen,[C]=L.viewPorts,y=new Up(A,null);y.attributes.x=new y5(A,"x",-d/3),y.attributes.y=new y5(A,"y",-d/3),y.attributes.width=new y5(A,"width",d),y.attributes.height=new y5(A,"height",d);var E=new iA(A,null);E.attributes.transform=new y5(A,"transform",this.getAttribute("gradientTransform").getValue()),E.children=[y];var B=new pl(A,null);B.attributes.x=new y5(A,"x",0),B.attributes.y=new y5(A,"y",0),B.attributes.width=new y5(A,"width",C.width),B.attributes.height=new y5(A,"height",C.height),B.children=[E];var Z=A.createCanvas(C.width,C.height),Q=Z.getContext("2d");return Q.fillStyle=l,B.render(Q),Q.createPattern(Z,"no-repeat")}return l}inheritStopContainer(t){this.attributesToInherit.forEach(e=>{!this.getAttribute(e).hasValue()&&t.getAttribute(e).hasValue()&&this.getAttribute(e,!0).setValue(t.getAttribute(e).getValue())})}addParentOpacity(t,e){if(t.hasValue()){var i=new y5(this.document,"color",e);return i.addOpacity(t).getColor()}return e}},Iv=class extends Hp{constructor(t,e,i){super(t,e,i),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(t,e){var i=this.getGradientUnits()==="objectBoundingBox",o=i?e.getBoundingBox(t):null;if(i&&!o)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var n=i?o.x+o.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),l=i?o.y+o.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),A=i?o.x+o.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),d=i?o.y+o.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return n===A&&l===d?null:t.createLinearGradient(n,l,A,d)}},Fv=class extends Hp{constructor(t,e,i){super(t,e,i),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(t,e){var i=this.getGradientUnits()==="objectBoundingBox",o=e.getBoundingBox(t);if(i&&!o)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var n=i?o.x+o.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),l=i?o.y+o.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),A=n,d=l;this.getAttribute("fx").hasValue()&&(A=i?o.x+o.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(d=i?o.y+o.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var L=i?(o.width+o.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),C=this.getAttribute("fr").getPixels();return t.createRadialGradient(A,d,C,n,l,L)}},Pv=class extends H6{constructor(t,e,i){super(t,e,i),this.type="stop";var o=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),n=this.getStyle("stop-opacity"),l=this.getStyle("stop-color",!0);l.getString()===""&&l.setValue("#000"),n.hasValue()&&(l=l.addOpacity(n)),this.offset=o,this.color=l.getColor()}},nA=class extends H6{constructor(t,e,i){super(t,e,i),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,t.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new y5(t,"values",null);var o=this.getAttribute("values");o.hasValue()&&this.values.setValue(o.getString().split(";"))}getProperty(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return t==="CSS"?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}calcValue(){var{initialUnits:t}=this,{progress:e,from:i,to:o}=this.getProgress(),n=i.getNumber()+(o.getNumber()-i.getNumber())*e;return t==="%"&&(n*=100),"".concat(n).concat(t)}update(t){var{parent:e}=this,i=this.getProperty();if(this.initialValue||(this.initialValue=i.getString(),this.initialUnits=i.getUnits()),this.duration>this.maxDuration){var o=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(o==="freeze"&&!this.frozen)this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=i.getString();else if(o==="remove"&&!this.removed)return this.removed=!0,i.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=t;var n=!1;if(this.begin<this.duration){var l=this.calcValue(),A=this.getAttribute("type");if(A.hasValue()){var d=A.getString();l="".concat(d,"(").concat(l,")")}i.setValue(l),n=!0}return n}getProgress(){var{document:t,values:e}=this,i={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var o=i.progress*(e.getValue().length-1),n=Math.floor(o),l=Math.ceil(o);i.from=new y5(t,"from",parseFloat(e.getValue()[n])),i.to=new y5(t,"to",parseFloat(e.getValue()[l])),i.progress=(o-n)/(l-n)}else i.from=this.from,i.to=this.to;return i}},Rv=class extends nA{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:t,from:e,to:i}=this.getProgress(),o=new fv.default(e.getColor()),n=new fv.default(i.getColor());if(o.ok&&n.ok){var l=o.r+(n.r-o.r)*t,A=o.g+(n.g-o.g)*t,d=o.b+(n.b-o.b)*t;return"rgb(".concat(Math.floor(l),", ").concat(Math.floor(A),", ").concat(Math.floor(d),")")}return this.getAttribute("from").getColor()}},zv=class extends nA{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:t,from:e,to:i}=this.getProgress(),o=V7(e.getString()),n=V7(i.getString()),l=o.map((A,d)=>{var L=n[d];return A+(L-A)*t}).join(" ");return l}},Dv=class extends H6{constructor(t,e,i){super(t,e,i),this.type="font",this.glyphs=Object.create(null),this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:o}=t,{children:n}=this;for(var l of n)switch(l.type){case"font-face":{this.fontFace=l;var A=l.getStyle("font-family");A.hasValue()&&(o[A.getString()]=this);break}case"missing-glyph":this.missingGlyph=l;break;case"glyph":{var d=l;d.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[d.unicode]>"u"&&(this.glyphs[d.unicode]=Object.create(null)),this.glyphs[d.unicode][d.arabicForm]=d):this.glyphs[d.unicode]=d;break}}}render(){}},kv=class extends H6{constructor(t,e,i){super(t,e,i),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}},Ov=class extends r8{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}},Zv=class extends fl{constructor(){super(...arguments),this.type="tref"}getText(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}},Nv=class extends fl{constructor(t,e,i){super(t,e,i),this.type="a";var{childNodes:o}=e,n=o[0],l=o.length>0&&Array.from(o).every(A=>A.nodeType===3);this.hasText=l,this.text=l?this.getTextFromNode(n):""}getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);var{document:e,x:i,y:o}=this,{mouse:n}=e.screen,l=new y5(e,"fontSize",Jn.parse(e.ctx.font).fontSize);n.isWorking()&&n.checkBoundingBox(this,new G7(i,o-l.getPixels("y"),i+this.measureText(t),o))}else if(this.children.length>0){var A=new iA(this.document,null);A.children=this.children,A.parent=this,A.render(t)}}onClick(){var{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){var t=this.document.ctx;t.canvas.style.cursor="pointer"}};Uv=class extends fl{constructor(t,e,i){super(t,e,i),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var o=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(o)}getText(){return this.text}path(t){var{dataArray:e}=this;t&&t.beginPath(),e.forEach(i=>{var{type:o,points:n}=i;switch(o){case j5.LINE_TO:t&&t.lineTo(n[0],n[1]);break;case j5.MOVE_TO:t&&t.moveTo(n[0],n[1]);break;case j5.CURVE_TO:t&&t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case j5.QUAD_TO:t&&t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case j5.ARC:{var[l,A,d,L,C,y,E,B]=n,Z=d>L?d:L,Q=d>L?1:d/L,V=d>L?L/d:1;t&&(t.translate(l,A),t.rotate(E),t.scale(Q,V),t.arc(0,0,Z,C,C+y,!!(1-B)),t.scale(1/Q,1/V),t.rotate(-E),t.translate(-l,-A));break}case j5.CLOSE_PATH:t&&t.closePath();break}})}renderChildren(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),i=this.getFontSize(),{glyphInfo:o}=this,n=t.fillStyle;e==="underline"&&t.beginPath(),o.forEach((l,A)=>{var{p0:d,p1:L,rotation:C,text:y}=l;t.save(),t.translate(d.x,d.y),t.rotate(C),t.fillStyle&&t.fillText(y,0,0),t.strokeStyle&&t.strokeText(y,0,0),t.restore(),e==="underline"&&(A===0&&t.moveTo(d.x,d.y+i/8),t.lineTo(L.x,L.y+i/5))}),e==="underline"&&(t.lineWidth=i/20,t.strokeStyle=n,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[t]||0}findSegmentToFitChar(t,e,i,o,n,l,A,d,L){var C=l,y=this.measureText(t,d);d===" "&&e==="justify"&&i<o&&(y+=(o-i)/n),L>-1&&(C+=this.getLetterSpacingAt(L));var E=this.textHeight/20,B=this.getEquidistantPointOnPath(C,E,0),Z=this.getEquidistantPointOnPath(C+y,E,0),Q={p0:B,p1:Z},V=B&&Z?Math.atan2(Z.y-B.y,Z.x-B.x):0;if(A){var G=Math.cos(Math.PI/2+V)*A,J=Math.cos(-V)*A;Q.p0=uv(uv({},B),{},{x:B.x+G,y:B.y+J}),Q.p1=uv(uv({},Z),{},{x:Z.x+G,y:Z.y+J})}return C+=y,{offset:C,segment:Q,rotation:V}}measureText(t,e){var{measuresCache:i}=this,o=e||this.getText();if(i.has(o))return i.get(o);var n=this.measureTargetText(t,o);return i.set(o,n),n}setTextData(t){if(!this.glyphInfo){var e=this.getText(),i=e.split(""),o=e.split(" ").length-1,n=this.parent.getAttribute("dx").split().map(r1=>r1.getPixels("x")),l=this.parent.getAttribute("dy").getPixels("y"),A=this.parent.getStyle("text-anchor").getString("start"),d=this.getStyle("letter-spacing"),L=this.parent.getStyle("letter-spacing"),C=0;!d.hasValue()||d.getValue()==="inherit"?C=L.getPixels():d.hasValue()&&d.getValue()!=="initial"&&d.getValue()!=="unset"&&(C=d.getPixels());var y=[],E=e.length;this.letterSpacingCache=y;for(var B=0;B<E;B++)y.push(typeof n[B]<"u"?n[B]:C);var Z=y.reduce((r1,m1,w1)=>w1===0?0:r1+m1||0,0),Q=this.measureText(t),V=Math.max(Q+Z,0);this.textWidth=Q,this.textHeight=this.getFontSize(),this.glyphInfo=[];var G=this.getPathLength(),J=this.getStyle("startOffset").getNumber(0)*G,n1=0;(A==="middle"||A==="center")&&(n1=-V/2),(A==="end"||A==="right")&&(n1=-V),n1+=J,i.forEach((r1,m1)=>{var{offset:w1,segment:B1,rotation:g1}=this.findSegmentToFitChar(t,A,V,G,o,n1,l,r1,m1);n1=w1,!(!B1.p0||!B1.p1)&&this.glyphInfo.push({text:i[m1],p0:B1.p0,p1:B1.p1,rotation:g1})})}}parsePathData(t){if(this.pathLength=-1,!t)return[];var e=[],{pathParser:i}=t;for(i.reset();!i.isEnd();){var{current:o}=i,n=o?o.x:0,l=o?o.y:0,A=i.next(),d=A.type,L=[];switch(A.type){case j5.MOVE_TO:this.pathM(i,L);break;case j5.LINE_TO:d=this.pathL(i,L);break;case j5.HORIZ_LINE_TO:d=this.pathH(i,L);break;case j5.VERT_LINE_TO:d=this.pathV(i,L);break;case j5.CURVE_TO:this.pathC(i,L);break;case j5.SMOOTH_CURVE_TO:d=this.pathS(i,L);break;case j5.QUAD_TO:this.pathQ(i,L);break;case j5.SMOOTH_QUAD_TO:d=this.pathT(i,L);break;case j5.ARC:L=this.pathA(i);break;case j5.CLOSE_PATH:r8.pathZ(i);break}A.type!==j5.CLOSE_PATH?e.push({type:d,points:L,start:{x:n,y:l},pathLength:this.calcLength(n,l,d,L)}):e.push({type:j5.CLOSE_PATH,points:[],pathLength:0})}return e}pathM(t,e){var{x:i,y:o}=r8.pathM(t).point;e.push(i,o)}pathL(t,e){var{x:i,y:o}=r8.pathL(t).point;return e.push(i,o),j5.LINE_TO}pathH(t,e){var{x:i,y:o}=r8.pathH(t).point;return e.push(i,o),j5.LINE_TO}pathV(t,e){var{x:i,y:o}=r8.pathV(t).point;return e.push(i,o),j5.LINE_TO}pathC(t,e){var{point:i,controlPoint:o,currentPoint:n}=r8.pathC(t);e.push(i.x,i.y,o.x,o.y,n.x,n.y)}pathS(t,e){var{point:i,controlPoint:o,currentPoint:n}=r8.pathS(t);return e.push(i.x,i.y,o.x,o.y,n.x,n.y),j5.CURVE_TO}pathQ(t,e){var{controlPoint:i,currentPoint:o}=r8.pathQ(t);e.push(i.x,i.y,o.x,o.y)}pathT(t,e){var{controlPoint:i,currentPoint:o}=r8.pathT(t);return e.push(i.x,i.y,o.x,o.y),j5.QUAD_TO}pathA(t){var{rX:e,rY:i,sweepFlag:o,xAxisRotation:n,centp:l,a1:A,ad:d}=r8.pathA(t);return o===0&&d>0&&(d-=2*Math.PI),o===1&&d<0&&(d+=2*Math.PI),[l.x,l.y,e,i,A,d,n,o]}calcLength(t,e,i,o){var n=0,l=null,A=null,d=0;switch(i){case j5.LINE_TO:return this.getLineLength(t,e,o[0],o[1]);case j5.CURVE_TO:for(n=0,l=this.getPointOnCubicBezier(0,t,e,o[0],o[1],o[2],o[3],o[4],o[5]),d=.01;d<=1;d+=.01)A=this.getPointOnCubicBezier(d,t,e,o[0],o[1],o[2],o[3],o[4],o[5]),n+=this.getLineLength(l.x,l.y,A.x,A.y),l=A;return n;case j5.QUAD_TO:for(n=0,l=this.getPointOnQuadraticBezier(0,t,e,o[0],o[1],o[2],o[3]),d=.01;d<=1;d+=.01)A=this.getPointOnQuadraticBezier(d,t,e,o[0],o[1],o[2],o[3]),n+=this.getLineLength(l.x,l.y,A.x,A.y),l=A;return n;case j5.ARC:{n=0;var L=o[4],C=o[5],y=o[4]+C,E=Math.PI/180;if(Math.abs(L-y)<E&&(E=Math.abs(L-y)),l=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],L,0),C<0)for(d=L-E;d>y;d-=E)A=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],d,0),n+=this.getLineLength(l.x,l.y,A.x,A.y),l=A;else for(d=L+E;d<y;d+=E)A=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],d,0),n+=this.getLineLength(l.x,l.y,A.x,A.y),l=A;return A=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],y,0),n+=this.getLineLength(l.x,l.y,A.x,A.y),n}}return 0}getPointOnLine(t,e,i,o,n){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e,A=arguments.length>6&&arguments[6]!==void 0?arguments[6]:i,d=(n-i)/(o-e+Dc),L=Math.sqrt(t*t/(1+d*d));o<e&&(L*=-1);var C=d*L,y=null;if(o===e)y={x:l,y:A+C};else if((A-i)/(l-e+Dc)===d)y={x:l+L,y:A+C};else{var E=0,B=0,Z=this.getLineLength(e,i,o,n);if(Z<Dc)return null;var Q=(l-e)*(o-e)+(A-i)*(n-i);Q/=Z*Z,E=e+Q*(o-e),B=i+Q*(n-i);var V=this.getLineLength(l,A,E,B),G=Math.sqrt(t*t-V*V);L=Math.sqrt(G*G/(1+d*d)),o<e&&(L*=-1),C=d*L,y={x:E+L,y:B+C}}return y}getPointOnPath(t){var e=this.getPathLength(),i=0,o=null;if(t<-5e-5||t-5e-5>e)return null;var{dataArray:n}=this;for(var l of n){if(l&&(l.pathLength<5e-5||i+l.pathLength+5e-5<t)){i+=l.pathLength;continue}var A=t-i,d=0;switch(l.type){case j5.LINE_TO:o=this.getPointOnLine(A,l.start.x,l.start.y,l.points[0],l.points[1],l.start.x,l.start.y);break;case j5.ARC:{var L=l.points[4],C=l.points[5],y=l.points[4]+C;if(d=L+A/l.pathLength*C,C<0&&d<y||C>=0&&d>y)break;o=this.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],d,l.points[6]);break}case j5.CURVE_TO:d=A/l.pathLength,d>1&&(d=1),o=this.getPointOnCubicBezier(d,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3],l.points[4],l.points[5]);break;case j5.QUAD_TO:d=A/l.pathLength,d>1&&(d=1),o=this.getPointOnQuadraticBezier(d,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3]);break}if(o)return o;break}return null}getLineLength(t,e,i,o){return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((t,e)=>e.pathLength>0?t+e.pathLength:t,0)),this.pathLength}getPointOnCubicBezier(t,e,i,o,n,l,A,d,L){var C=d*UT(t)+l*QT(t)+o*HT(t)+e*VT(t),y=L*UT(t)+A*QT(t)+n*HT(t)+i*VT(t);return{x:C,y}}getPointOnQuadraticBezier(t,e,i,o,n,l,A){var d=l*GT(t)+o*jT(t)+e*qT(t),L=A*GT(t)+n*jT(t)+i*qT(t);return{x:d,y:L}}getPointOnEllipticalArc(t,e,i,o,n,l){var A=Math.cos(l),d=Math.sin(l),L={x:i*Math.cos(n),y:o*Math.sin(n)};return{x:t+(L.x*A-L.y*d),y:e+(L.x*d+L.y*A)}}buildEquidistantCache(t,e){var i=this.getPathLength(),o=e||.25,n=t||i/100;if(!this.equidistantCache||this.equidistantCache.step!==n||this.equidistantCache.precision!==o){this.equidistantCache={step:n,precision:o,points:[]};for(var l=0,A=0;A<=i;A+=o){var d=this.getPointOnPath(A),L=this.getPointOnPath(A+o);!d||!L||(l+=this.getLineLength(d.x,d.y,L.x,L.y),l>=n&&(this.equidistantCache.points.push({x:d.x,y:d.y,distance:A}),l-=n))}}}getEquidistantPointOnPath(t,e,i){if(this.buildEquidistantCache(e,i),t<0||t-this.getPathLength()>5e-5)return null;var o=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[o]||null}},Ku1=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i,Qv=class extends $o{constructor(t,e,i){super(t,e,i),this.type="image",this.loaded=!1;var o=this.getHrefAttribute().getString();if(o){var n=o.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(o);t.images.push(this),n?this.loadSvg(o):this.loadImage(o),this.isSvg=n}}loadImage(t){var e=this;return K4(function*(){try{var i=yield e.document.createImage(t);e.image=i}catch(o){console.error('Error while loading image "'.concat(t,'":'),o)}e.loaded=!0})()}loadSvg(t){var e=this;return K4(function*(){var i=Ku1.exec(t);if(i){var o=i[5];i[4]==="base64"?e.image=atob(o):e.image=decodeURIComponent(o)}else try{var n=yield e.document.fetch(t),l=yield n.text();e.image=l}catch(A){console.error('Error while loading image "'.concat(t,'":'),A)}e.loaded=!0})()}renderChildren(t){var{document:e,image:i,loaded:o}=this,n=this.getAttribute("x").getPixels("x"),l=this.getAttribute("y").getPixels("y"),A=this.getStyle("width").getPixels("x"),d=this.getStyle("height").getPixels("y");if(!(!o||!i||!A||!d)){if(t.save(),t.translate(n,l),this.isSvg){var L=e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:A,scaleHeight:d});L.document.documentElement.parent=this,L.render()}else{var C=this.image;e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:A,desiredWidth:C.width,height:d,desiredHeight:C.height}),this.loaded&&(typeof C.complete>"u"||C.complete)&&t.drawImage(C,0,0)}t.restore()}}getBoundingBox(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");return new G7(t,e,t+i,e+o)}},Hv=class extends $o{constructor(){super(...arguments),this.type="symbol"}render(t){}},Vv=class{constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}load(t,e){var i=this;return K4(function*(){try{var{document:o}=i,n=yield o.canvg.parser.load(e),l=n.getElementsByTagName("font");Array.from(l).forEach(A=>{var d=o.createElement(A);o.definitions[t]=d})}catch(A){console.error('Error while loading font "'.concat(e,'":'),A)}i.loaded=!0})()}},Vp=class extends H6{constructor(t,e,i){super(t,e,i),this.type="style";var o=Nc(Array.from(e.childNodes).map(l=>l.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),n=o.split("}");n.forEach(l=>{var A=l.trim();if(A){var d=A.split("{"),L=d[0].split(","),C=d[1].split(";");L.forEach(y=>{var E=y.trim();if(E){var B=t.styles[E]||{};if(C.forEach(V=>{var G=V.indexOf(":"),J=V.substr(0,G).trim(),n1=V.substr(G+1,V.length-G).trim();J&&n1&&(B[J]=new y5(t,J,n1))}),t.styles[E]=B,t.stylesSpecificity[E]=eW(E),E==="@font-face"){var Z=B["font-family"].getString().replace(/"|'/g,""),Q=B.src.getString().split(",");Q.forEach(V=>{if(V.indexOf('format("svg")')>0){var G=XT(V);G&&new Vv(t).load(Z,G)}})}}})}})}};Vp.parseExternalUrl=XT;Gv=class extends $o{constructor(){super(...arguments),this.type="use"}setContext(t){super.setContext(t);var e=this.getAttribute("x"),i=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),i.hasValue()&&t.translate(0,i.getPixels("y"))}path(t){var{element:e}=this;e&&e.path(t)}renderChildren(t){var{document:e,element:i}=this;if(i){var o=i;if(i.type==="symbol"&&(o=new pl(e,null),o.attributes.viewBox=new y5(e,"viewBox",i.getAttribute("viewBox").getString()),o.attributes.preserveAspectRatio=new y5(e,"preserveAspectRatio",i.getAttribute("preserveAspectRatio").getString()),o.attributes.overflow=new y5(e,"overflow",i.getAttribute("overflow").getString()),o.children=i.children,i.styles.opacity=new y5(e,"opacity",this.calculateOpacity())),o.type==="svg"){var n=this.getStyle("width",!1,!0),l=this.getStyle("height",!1,!0);n.hasValue()&&(o.attributes.width=new y5(e,"width",n.getString())),l.hasValue()&&(o.attributes.height=new y5(e,"height",l.getString()))}var A=o.parent;o.parent=this,o.render(t),o.parent=A}}getBoundingBox(t){var{element:e}=this;return e?e.getBoundingBox(t):null}elementTransform(){var{document:t,element:e}=this;return Oc.fromElement(t,e)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}};Gp=class extends H6{constructor(t,e,i){super(t,e,i),this.type="feColorMatrix";var o=V7(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var n=o[0];o=[.213+.787*n,.715-.715*n,.072-.072*n,0,0,.213-.213*n,.715+.285*n,.072-.072*n,0,0,.213-.213*n,.715-.715*n,.072+.928*n,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var l=o[0]*Math.PI/180;o=[ss(l,.213,.787,-.213),ss(l,.715,-.715,-.715),ss(l,.072,-.072,.928),0,0,ss(l,.213,-.213,.143),ss(l,.715,.285,.14),ss(l,.072,-.072,-.283),0,0,ss(l,.213,-.213,-.787),ss(l,.715,-.715,.715),ss(l,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=o,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(t,e,i,o,n){for(var{includeOpacity:l,matrix:A}=this,d=t.getImageData(0,0,o,n),L=0;L<n;L++)for(var C=0;C<o;C++){var y=hv(d.data,C,L,o,n,0),E=hv(d.data,C,L,o,n,1),B=hv(d.data,C,L,o,n,2),Z=hv(d.data,C,L,o,n,3),Q=E8(A,0,y)+E8(A,1,E)+E8(A,2,B)+E8(A,3,Z)+E8(A,4,1),V=E8(A,5,y)+E8(A,6,E)+E8(A,7,B)+E8(A,8,Z)+E8(A,9,1),G=E8(A,10,y)+E8(A,11,E)+E8(A,12,B)+E8(A,13,Z)+E8(A,14,1),J=E8(A,15,y)+E8(A,16,E)+E8(A,17,B)+E8(A,18,Z)+E8(A,19,1);l&&(Q=0,V=0,G=0,J*=Z/255),Av(d.data,C,L,o,n,0,Q),Av(d.data,C,L,o,n,1,V),Av(d.data,C,L,o,n,2,G),Av(d.data,C,L,o,n,3,J)}t.clearRect(0,0,o,n),t.putImageData(d,0,0)}},jp=class r extends H6{constructor(){super(...arguments),this.type="mask"}apply(t,e){var{document:i}=this,o=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),l=this.getStyle("width").getPixels("x"),A=this.getStyle("height").getPixels("y");if(!l&&!A){var d=new G7;this.children.forEach(Z=>{d.addBoundingBox(Z.getBoundingBox(t))}),o=Math.floor(d.x1),n=Math.floor(d.y1),l=Math.floor(d.width),A=Math.floor(d.height)}var L=this.removeStyles(e,r.ignoreStyles),C=i.createCanvas(o+l,n+A),y=C.getContext("2d");i.screen.setDefaults(y),this.renderChildren(y),new Gp(i,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(y,0,0,o+l,n+A);var E=i.createCanvas(o+l,n+A),B=E.getContext("2d");i.screen.setDefaults(B),e.render(B),B.globalCompositeOperation="destination-in",B.fillStyle=y.createPattern(C,"no-repeat"),B.fillRect(0,0,o+l,n+A),t.fillStyle=B.createPattern(E,"no-repeat"),t.fillRect(0,0,o+l,n+A),this.restoreStyles(e,L)}render(t){}};jp.ignoreStyles=["mask","transform","clip-path"];KK=()=>{},jv=class extends H6{constructor(){super(...arguments),this.type="clipPath"}apply(t){var{document:e}=this,i=Reflect.getPrototypeOf(t),{beginPath:o,closePath:n}=t;i&&(i.beginPath=KK,i.closePath=KK),Reflect.apply(o,t,[]),this.children.forEach(l=>{if(!(typeof l.path>"u")){var A=typeof l.elementTransform<"u"?l.elementTransform():null;A||(A=Oc.fromElement(e,l)),A&&A.apply(t),l.path(t),i&&(i.closePath=n),A&&A.unapply(t)}}),Reflect.apply(n,t,[]),t.clip(),i&&(i.beginPath=o,i.closePath=n)}render(t){}},qp=class r extends H6{constructor(){super(...arguments),this.type="filter"}apply(t,e){var{document:i,children:o}=this,n=e.getBoundingBox(t);if(n){var l=0,A=0;o.forEach(G=>{var J=G.extraFilterDistance||0;l=Math.max(l,J),A=Math.max(A,J)});var d=Math.floor(n.width),L=Math.floor(n.height),C=d+2*l,y=L+2*A;if(!(C<1||y<1)){var E=Math.floor(n.x),B=Math.floor(n.y),Z=this.removeStyles(e,r.ignoreStyles),Q=i.createCanvas(C,y),V=Q.getContext("2d");i.screen.setDefaults(V),V.translate(-E+l,-B+A),e.render(V),o.forEach(G=>{typeof G.apply=="function"&&G.apply(V,0,0,C,y)}),t.drawImage(Q,0,0,C,y,E-l,B-A,C,y),this.restoreStyles(e,Z)}}}render(t){}};qp.ignoreStyles=["filter","transform","clip-path"];qv=class extends H6{constructor(t,e,i){super(t,e,i),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(t,e,i,o,n){}},Kv=class extends H6{constructor(){super(...arguments),this.type="feMorphology"}apply(t,e,i,o,n){}},Wv=class extends H6{constructor(){super(...arguments),this.type="feComposite"}apply(t,e,i,o,n){}},$v=class extends H6{constructor(t,e,i){super(t,e,i),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(t,e,i,o,n){var{document:l,blurRadius:A}=this,d=l.window?l.window.document.body:null,L=t.canvas;L.id=l.getUniqueId(),d&&(L.style.display="none",d.appendChild(L)),GK(L,e,i,o,n,A),d&&d.removeChild(L)}},Xv=class extends H6{constructor(){super(...arguments),this.type="title"}},Yv=class extends H6{constructor(){super(...arguments),this.type="desc"}},Wu1={svg:pl,rect:Up,circle:wv,ellipse:bv,line:Mv,polyline:Qp,polygon:Bv,path:r8,pattern:Sv,marker:Ev,defs:Tv,linearGradient:Iv,radialGradient:Fv,stop:Pv,animate:nA,animateColor:Rv,animateTransform:zv,font:Dv,"font-face":kv,"missing-glyph":Ov,glyph:Zp,text:fl,tspan:Np,tref:Zv,a:Nv,textPath:Uv,image:Qv,g:iA,symbol:Hv,style:Vp,use:Gv,mask:jp,clipPath:jv,filter:qp,feDropShadow:qv,feMorphology:Kv,feComposite:Wv,feColorMatrix:Gp,feGaussianBlur:$v,title:Xv,desc:Yv};Zc=class r{constructor(t){var{rootEmSize:e=12,emSize:i=12,createCanvas:o=r.createCanvas,createImage:n=r.createImage,anonymousCrossOrigin:l}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=t,this.definitions=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=e,this.emSize=i,this.createCanvas=o,this.createImage=this.bindCreateImage(n,l),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(t,e){return typeof e=="boolean"?(i,o)=>t(i,typeof o=="boolean"?o:e):t}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:t}=this;return t[t.length-1]}set emSize(t){var{emSizeStack:e}=this;e.push(t)}popEmSize(){var{emSizeStack:t}=this;t.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(t=>t.loaded)}isFontsLoaded(){return this.fonts.every(t=>t.loaded)}createDocumentElement(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}createElement(t){var e=t.nodeName.replace(/^[^:]+:/,""),i=r.elementTypes[e];return typeof i<"u"?new i(this,t):new xv(this,t)}createTextNode(t){return new KT(this,t)}setViewBox(t){this.screen.setViewBox($u1({document:this},t))}};Zc.createCanvas=Xu1;Zc.createImage=Yu1;Zc.elementTypes=Wu1;$T=class r{constructor(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new rA(i),this.screen=new kc(t,i),this.options=i;var o=new Zc(this,i),n=o.createDocumentElement(e);this.document=o,this.documentElement=n}static from(t,e){var i=arguments;return K4(function*(){var o=i.length>2&&i[2]!==void 0?i[2]:{},n=new rA(o),l=yield n.parse(e);return new r(t,l,o)})()}static fromString(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=new rA(i),n=o.parseFromString(e);return new r(t,n,i)}fork(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return r.from(t,e,zc(zc({},this.options),i))}forkString(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return r.fromString(t,e,zc(zc({},this.options),i))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var t=arguments,e=this;return K4(function*(){var i=t.length>0&&t[0]!==void 0?t[0]:{};e.start(zc({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},i)),yield e.ready(),e.stop()})()}start(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:e,screen:i,options:o}=this;i.start(e,zc(zc({enableRedraw:!0},o),t))}stop(){this.screen.stop()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(t,e,i)}}});var K$=W2((St2,q$)=>{"use strict";var Cf1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";q$.exports=Cf1});var Y$=W2((Et2,X$)=>{"use strict";var gf1=K$();function W$(){}function $$(){}$$.resetWarningCache=W$;X$.exports=function(){function r(i,o,n,l,A,d){if(d!==gf1){var L=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw L.name="Invariant Violation",L}}r.isRequired=r;function t(){return r}var e={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:t,element:r,elementType:r,instanceOf:t,node:r,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:$$,resetWarningCache:W$};return e.PropTypes=e,e}});var tX=W2((Ft2,J$)=>{J$.exports=Y$()();var Tt2,It2});var FX=W2((uP,hP)=>{(function(r,t){typeof uP=="object"&&typeof hP<"u"?hP.exports=function(e,i,o,n,l){for(i=i.split?i.split("."):i,n=0;n<i.length;n++)e=e?e[i[n]]:l;return e===l?o:e}:typeof define=="function"&&define.amd?define(function(){return function(e,i,o,n,l){for(i=i.split?i.split("."):i,n=0;n<i.length;n++)e=e?e[i[n]]:l;return e===l?o:e}}):r.dlv=function(e,i,o,n,l){for(i=i.split?i.split("."):i,n=0;n<i.length;n++)e=e?e[i[n]]:l;return e===l?o:e}})(uP)});var Cd,X5,yP,iY,Ul,gP,_P,xP,wP,B_,x_,w_,bP,Ld={},MP=[],nY=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,gd=Array.isArray;function xo(r,t){for(var e in t)r[e]=t[e];return r}function S_(r){r&&r.parentNode&&r.parentNode.removeChild(r)}function q8(r,t,e){var i,o,n,l={};for(n in t)n=="key"?i=t[n]:n=="ref"?o=t[n]:l[n]=t[n];if(arguments.length>2&&(l.children=arguments.length>3?Cd.call(arguments,2):e),typeof r=="function"&&r.defaultProps!=null)for(n in r.defaultProps)l[n]===void 0&&(l[n]=r.defaultProps[n]);return pd(r,l,i,o,null)}function pd(r,t,e,i,o){var n={type:r,props:t,key:e,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++yP,__i:-1,__u:0};return o==null&&X5.vnode!=null&&X5.vnode(n),n}function E_(){return{current:null}}function m5(r){return r.children}function Nn(r,t){this.props=r,this.context=t}function Su(r,t){if(t==null)return r.__?Su(r.__,r.__i+1):null;for(var e;t<r.__k.length;t++)if((e=r.__k[t])!=null&&e.__e!=null)return e.__e;return typeof r.type=="function"?Su(r):null}function BP(r){var t,e;if((r=r.__)!=null&&r.__c!=null){for(r.__e=r.__c.base=null,t=0;t<r.__k.length;t++)if((e=r.__k[t])!=null&&e.__e!=null){r.__e=r.__c.base=e.__e;break}return BP(r)}}function b_(r){(!r.__d&&(r.__d=!0)&&Ul.push(r)&&!GL.__r++||gP!=X5.debounceRendering)&&((gP=X5.debounceRendering)||_P)(GL)}function GL(){for(var r,t,e,i,o,n,l,A=1;Ul.length;)Ul.length>A&&Ul.sort(xP),r=Ul.shift(),A=Ul.length,r.__d&&(e=void 0,i=void 0,o=(i=(t=r).__v).__e,n=[],l=[],t.__P&&((e=xo({},i)).__v=i.__v+1,X5.vnode&&X5.vnode(e),T_(t.__P,e,i,t.__n,t.__P.namespaceURI,32&i.__u?[o]:null,n,o??Su(i),!!(32&i.__u),l),e.__v=i.__v,e.__.__k[e.__i]=e,TP(n,e,l),i.__e=i.__=null,e.__e!=o&&BP(e)));GL.__r=0}function SP(r,t,e,i,o,n,l,A,d,L,C){var y,E,B,Z,Q,V,G,J=i&&i.__k||MP,n1=t.length;for(d=oY(e,t,J,d,n1),y=0;y<n1;y++)(B=e.__k[y])!=null&&(E=B.__i==-1?Ld:J[B.__i]||Ld,B.__i=y,V=T_(r,B,E,o,n,l,A,d,L,C),Z=B.__e,B.ref&&E.ref!=B.ref&&(E.ref&&I_(E.ref,null,B),C.push(B.ref,B.__c||Z,B)),Q==null&&Z!=null&&(Q=Z),(G=!!(4&B.__u))||E.__k===B.__k?d=EP(B,d,r,G):typeof B.type=="function"&&V!==void 0?d=V:Z&&(d=Z.nextSibling),B.__u&=-7);return e.__e=Q,d}function oY(r,t,e,i,o){var n,l,A,d,L,C=e.length,y=C,E=0;for(r.__k=new Array(o),n=0;n<o;n++)(l=t[n])!=null&&typeof l!="boolean"&&typeof l!="function"?(d=n+E,(l=r.__k[n]=typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?pd(null,l,null,null,null):gd(l)?pd(m5,{children:l},null,null,null):l.constructor==null&&l.__b>0?pd(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):l).__=r,l.__b=r.__b+1,A=null,(L=l.__i=aY(l,e,d,y))!=-1&&(y--,(A=e[L])&&(A.__u|=2)),A==null||A.__v==null?(L==-1&&(o>C?E--:o<C&&E++),typeof l.type!="function"&&(l.__u|=4)):L!=d&&(L==d-1?E--:L==d+1?E++:(L>d?E--:E++,l.__u|=4))):r.__k[n]=null;if(y)for(n=0;n<C;n++)(A=e[n])!=null&&(2&A.__u)==0&&(A.__e==i&&(i=Su(A)),FP(A,A));return i}function EP(r,t,e,i){var o,n;if(typeof r.type=="function"){for(o=r.__k,n=0;o&&n<o.length;n++)o[n]&&(o[n].__=r,t=EP(o[n],t,e,i));return t}r.__e!=t&&(i&&(t&&r.type&&!t.parentNode&&(t=Su(r)),e.insertBefore(r.__e,t||null)),t=r.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function wo(r,t){return t=t||[],r==null||typeof r=="boolean"||(gd(r)?r.some(function(e){wo(e,t)}):t.push(r)),t}function aY(r,t,e,i){var o,n,l,A=r.key,d=r.type,L=t[e],C=L!=null&&(2&L.__u)==0;if(L===null&&r.key==null||C&&A==L.key&&d==L.type)return e;if(i>(C?1:0)){for(o=e-1,n=e+1;o>=0||n<t.length;)if((L=t[l=o>=0?o--:n++])!=null&&(2&L.__u)==0&&A==L.key&&d==L.type)return l}return-1}function mP(r,t,e){t[0]=="-"?r.setProperty(t,e??""):r[t]=e==null?"":typeof e!="number"||nY.test(t)?e:e+"px"}function VL(r,t,e,i,o){var n,l;t:if(t=="style")if(typeof e=="string")r.style.cssText=e;else{if(typeof i=="string"&&(r.style.cssText=i=""),i)for(t in i)e&&t in e||mP(r.style,t,"");if(e)for(t in e)i&&e[t]==i[t]||mP(r.style,t,e[t])}else if(t[0]=="o"&&t[1]=="n")n=t!=(t=t.replace(wP,"$1")),l=t.toLowerCase(),t=l in r||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),r.l||(r.l={}),r.l[t+n]=e,e?i?e.u=i.u:(e.u=B_,r.addEventListener(t,n?w_:x_,n)):r.removeEventListener(t,n?w_:x_,n);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in r)try{r[t]=e??"";break t}catch{}typeof e=="function"||(e==null||e===!1&&t[4]!="-"?r.removeAttribute(t):r.setAttribute(t,t=="popover"&&e==1?"":e))}}function vP(r){return function(t){if(this.l){var e=this.l[t.type+r];if(t.t==null)t.t=B_++;else if(t.t<e.u)return;return e(X5.event?X5.event(t):t)}}}function T_(r,t,e,i,o,n,l,A,d,L){var C,y,E,B,Z,Q,V,G,J,n1,r1,m1,w1,B1,g1,L1,z1,s1=t.type;if(t.constructor!=null)return null;128&e.__u&&(d=!!(32&e.__u),n=[A=t.__e=e.__e]),(C=X5.__b)&&C(t);t:if(typeof s1=="function")try{if(G=t.props,J="prototype"in s1&&s1.prototype.render,n1=(C=s1.contextType)&&i[C.__c],r1=C?n1?n1.props.value:C.__:i,e.__c?V=(y=t.__c=e.__c).__=y.__E:(J?t.__c=y=new s1(G,r1):(t.__c=y=new Nn(G,r1),y.constructor=s1,y.render=lY),n1&&n1.sub(y),y.props=G,y.state||(y.state={}),y.context=r1,y.__n=i,E=y.__d=!0,y.__h=[],y._sb=[]),J&&y.__s==null&&(y.__s=y.state),J&&s1.getDerivedStateFromProps!=null&&(y.__s==y.state&&(y.__s=xo({},y.__s)),xo(y.__s,s1.getDerivedStateFromProps(G,y.__s))),B=y.props,Z=y.state,y.__v=t,E)J&&s1.getDerivedStateFromProps==null&&y.componentWillMount!=null&&y.componentWillMount(),J&&y.componentDidMount!=null&&y.__h.push(y.componentDidMount);else{if(J&&s1.getDerivedStateFromProps==null&&G!==B&&y.componentWillReceiveProps!=null&&y.componentWillReceiveProps(G,r1),!y.__e&&y.shouldComponentUpdate!=null&&y.shouldComponentUpdate(G,y.__s,r1)===!1||t.__v==e.__v){for(t.__v!=e.__v&&(y.props=G,y.state=y.__s,y.__d=!1),t.__e=e.__e,t.__k=e.__k,t.__k.some(function(x1){x1&&(x1.__=t)}),m1=0;m1<y._sb.length;m1++)y.__h.push(y._sb[m1]);y._sb=[],y.__h.length&&l.push(y);break t}y.componentWillUpdate!=null&&y.componentWillUpdate(G,y.__s,r1),J&&y.componentDidUpdate!=null&&y.__h.push(function(){y.componentDidUpdate(B,Z,Q)})}if(y.context=r1,y.props=G,y.__P=r,y.__e=!1,w1=X5.__r,B1=0,J){for(y.state=y.__s,y.__d=!1,w1&&w1(t),C=y.render(y.props,y.state,y.context),g1=0;g1<y._sb.length;g1++)y.__h.push(y._sb[g1]);y._sb=[]}else do y.__d=!1,w1&&w1(t),C=y.render(y.props,y.state,y.context),y.state=y.__s;while(y.__d&&++B1<25);y.state=y.__s,y.getChildContext!=null&&(i=xo(xo({},i),y.getChildContext())),J&&!E&&y.getSnapshotBeforeUpdate!=null&&(Q=y.getSnapshotBeforeUpdate(B,Z)),L1=C,C!=null&&C.type===m5&&C.key==null&&(L1=IP(C.props.children)),A=SP(r,gd(L1)?L1:[L1],t,e,i,o,n,l,A,d,L),y.base=t.__e,t.__u&=-161,y.__h.length&&l.push(y),V&&(y.__E=y.__=null)}catch(x1){if(t.__v=null,d||n!=null)if(x1.then){for(t.__u|=d?160:128;A&&A.nodeType==8&&A.nextSibling;)A=A.nextSibling;n[n.indexOf(A)]=null,t.__e=A}else{for(z1=n.length;z1--;)S_(n[z1]);M_(t)}else t.__e=e.__e,t.__k=e.__k,x1.then||M_(t);X5.__e(x1,t,e)}else n==null&&t.__v==e.__v?(t.__k=e.__k,t.__e=e.__e):A=t.__e=sY(e.__e,t,e,i,o,n,l,d,L);return(C=X5.diffed)&&C(t),128&t.__u?void 0:A}function M_(r){r&&r.__c&&(r.__c.__e=!0),r&&r.__k&&r.__k.forEach(M_)}function TP(r,t,e){for(var i=0;i<e.length;i++)I_(e[i],e[++i],e[++i]);X5.__c&&X5.__c(t,r),r.some(function(o){try{r=o.__h,o.__h=[],r.some(function(n){n.call(o)})}catch(n){X5.__e(n,o.__v)}})}function IP(r){return typeof r!="object"||r==null||r.__b&&r.__b>0?r:gd(r)?r.map(IP):xo({},r)}function sY(r,t,e,i,o,n,l,A,d){var L,C,y,E,B,Z,Q,V=e.props,G=t.props,J=t.type;if(J=="svg"?o="http://www.w3.org/2000/svg":J=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),n!=null){for(L=0;L<n.length;L++)if((B=n[L])&&"setAttribute"in B==!!J&&(J?B.localName==J:B.nodeType==3)){r=B,n[L]=null;break}}if(r==null){if(J==null)return document.createTextNode(G);r=document.createElementNS(o,J,G.is&&G),A&&(X5.__m&&X5.__m(t,n),A=!1),n=null}if(J==null)V===G||A&&r.data==G||(r.data=G);else{if(n=n&&Cd.call(r.childNodes),V=e.props||Ld,!A&&n!=null)for(V={},L=0;L<r.attributes.length;L++)V[(B=r.attributes[L]).name]=B.value;for(L in V)if(B=V[L],L!="children"){if(L=="dangerouslySetInnerHTML")y=B;else if(!(L in G)){if(L=="value"&&"defaultValue"in G||L=="checked"&&"defaultChecked"in G)continue;VL(r,L,null,B,o)}}for(L in G)B=G[L],L=="children"?E=B:L=="dangerouslySetInnerHTML"?C=B:L=="value"?Z=B:L=="checked"?Q=B:A&&typeof B!="function"||V[L]===B||VL(r,L,B,V[L],o);if(C)A||y&&(C.__html==y.__html||C.__html==r.innerHTML)||(r.innerHTML=C.__html),t.__k=[];else if(y&&(r.innerHTML=""),SP(t.type=="template"?r.content:r,gd(E)?E:[E],t,e,i,J=="foreignObject"?"http://www.w3.org/1999/xhtml":o,n,l,n?n[0]:e.__k&&Su(e,0),A,d),n!=null)for(L=n.length;L--;)S_(n[L]);A||(L="value",J=="progress"&&Z==null?r.removeAttribute("value"):Z!=null&&(Z!==r[L]||J=="progress"&&!Z||J=="option"&&Z!=V[L])&&VL(r,L,Z,V[L],o),L="checked",Q!=null&&Q!=r[L]&&VL(r,L,Q,V[L],o))}return r}function I_(r,t,e){try{if(typeof r=="function"){var i=typeof r.__u=="function";i&&r.__u(),i&&t==null||(r.__u=r(t))}else r.current=t}catch(o){X5.__e(o,e)}}function FP(r,t,e){var i,o;if(X5.unmount&&X5.unmount(r),(i=r.ref)&&(i.current&&i.current!=r.__e||I_(i,null,t)),(i=r.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){X5.__e(n,t)}i.base=i.__P=null}if(i=r.__k)for(o=0;o<i.length;o++)i[o]&&FP(i[o],t,e||typeof r.type!="function");e||S_(r.__e),r.__c=r.__=r.__e=void 0}function lY(r,t,e){return this.constructor(r,e)}function bo(r,t,e){var i,o,n,l;t==document&&(t=document.documentElement),X5.__&&X5.__(r,t),o=(i=typeof e=="function")?null:e&&e.__k||t.__k,n=[],l=[],T_(t,r=(!i&&e||t).__k=q8(m5,null,[r]),o||Ld,Ld,t.namespaceURI,!i&&e?[e]:o?null:t.firstChild?Cd.call(t.childNodes):null,n,!i&&e?e:o?o.__e:t.firstChild,i,l),TP(n,r,l)}function md(r,t){bo(r,t,md)}function vd(r,t,e){var i,o,n,l,A=xo({},r.props);for(n in r.type&&r.type.defaultProps&&(l=r.type.defaultProps),t)n=="key"?i=t[n]:n=="ref"?o=t[n]:A[n]=t[n]===void 0&&l!=null?l[n]:t[n];return arguments.length>2&&(A.children=arguments.length>3?Cd.call(arguments,2):e),pd(r.type,A,i||r.key,o||r.ref,null)}function M9(r){function t(e){var i,o;return this.getChildContext||(i=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&i.forEach(function(l){l.__e=!0,b_(l)})},this.sub=function(n){i.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){i&&i.delete(n),l&&l.call(n)}}),e.children}return t.__c="__cC"+bP++,t.__=r,t.Provider=t.__l=(t.Consumer=function(e,i){return e.children(i)}).contextType=t,t}Cd=MP.slice,X5={__e:function(r,t,e,i){for(var o,n,l;t=t.__;)if((o=t.__c)&&!o.__)try{if((n=o.constructor)&&n.getDerivedStateFromError!=null&&(o.setState(n.getDerivedStateFromError(r)),l=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(r,i||{}),l=o.__d),l)return o.__E=o}catch(A){r=A}throw r}},yP=0,iY=function(r){return r!=null&&r.constructor==null},Nn.prototype.setState=function(r,t){var e;e=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=xo({},this.state),typeof r=="function"&&(r=r(xo({},e),this.props)),r&&xo(e,r),r!=null&&this.__v&&(t&&this._sb.push(t),b_(this))},Nn.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),b_(this))},Nn.prototype.render=m5,Ul=[],_P=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,xP=function(r,t){return r.__v.__b-t.__v.__b},GL.__r=0,wP=/(PointerCapture)$|Capture$/i,B_=0,x_=vP(!1),w_=vP(!0),bP=0;function jL(){return jL=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},jL.apply(this,arguments)}function RP(r,t){if(r==null)return{};var e,i,o={},n=Object.keys(r);for(i=0;i<n.length;i++)t.indexOf(e=n[i])>=0||(o[e]=r[e]);return o}var cY=["context","children"],uY=["useFragment"];function qL(r,t,e,i){function o(){var n=Reflect.construct(HTMLElement,[],o);return n._vdomComponent=r,n._root=i&&i.shadow?n.attachShadow({mode:i.mode||"open"}):n,i&&i.adoptedStyleSheets&&(n._root.adoptedStyleSheets=i.adoptedStyleSheets),n}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=function(){AY.call(this,i)},o.prototype.attributeChangedCallback=dY,o.prototype.disconnectedCallback=fY,e=e||r.observedAttributes||Object.keys(r.propTypes||{}),o.observedAttributes=e,r.formAssociated&&(o.formAssociated=!0),e.forEach(function(n){Object.defineProperty(o.prototype,n,{get:function(){return this._vdom?this._vdom.props[n]:this._props[n]},set:function(l){this._vdom?this.attributeChangedCallback(n,null,l):(this._props||(this._props={}),this._props[n]=l);var A=typeof l;l!=null&&A!=="string"&&A!=="boolean"&&A!=="number"||this.setAttribute(n,l)}})}),customElements.define(t||r.tagName||r.displayName||r.name,o),o}function hY(r){this.getChildContext=function(){return r.context};var t=r.children,e=RP(r,cY);return vd(t,e)}function AY(r){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=q8(hY,jL({},this._props,{context:t.detail.context}),DP(this,this._vdomComponent,r)),(this.hasAttribute("hydrate")?md:bo)(this._vdom,this._root)}function zP(r){return r.replace(/-(\w)/g,function(t,e){return e?e.toUpperCase():""})}function dY(r,t,e){if(this._vdom){var i={};i[r]=e=e??void 0,i[zP(r)]=e,this._vdom=vd(this._vdom,i),bo(this._vdom,this._root)}}function fY(){bo(this._vdom=null,this._root)}function PP(r,t){var e=this,i=r.useFragment,o=RP(r,uY);return q8(i?m5:"slot",jL({},o,{ref:function(n){n?(e.ref=n,e._listener||(e._listener=function(l){l.stopPropagation(),l.detail.context=t},n.addEventListener("_preact",e._listener))):e.ref.removeEventListener("_preact",e._listener)}}))}function DP(r,t,e){if(r.nodeType===3)return r.data;if(r.nodeType!==1)return null;var i=[],o={},n=0,l=r.attributes,A=r.childNodes;for(n=l.length;n--;)l[n].name!=="slot"&&(o[l[n].name]=l[n].value,o[zP(l[n].name)]=l[n].value);for(n=A.length;n--;){var d=DP(A[n],null,e),L=A[n].slot;L?o[L]=q8(PP,{name:L},d):i[n]=d}var C=!(!e||!e.shadow),y=t?q8(PP,{useFragment:!C},i):i;return!C&&t&&(r.innerHTML=""),q8(t||r.nodeName.toLowerCase(),o,y)}var Ps,Z6,F_,kP,Eu=0,GP=[],c0=X5,OP=c0.__b,ZP=c0.__r,NP=c0.diffed,UP=c0.__c,QP=c0.unmount,HP=c0.__;function Tu(r,t){c0.__h&&c0.__h(Z6,r,Eu||t),Eu=0;var e=Z6.__H||(Z6.__H={__:[],__h:[]});return r>=e.__.length&&e.__.push({}),e.__[r]}function Ft(r){return Eu=1,Iu(jP,r)}function Iu(r,t,e){var i=Tu(Ps++,2);if(i.t=r,!i.__c&&(i.__=[e?e(t):jP(void 0,t),function(A){var d=i.__N?i.__N[0]:i.__[0],L=i.t(d,A);d!==L&&(i.__N=[L,i.__[1]],i.__c.setState({}))}],i.__c=Z6,!Z6.__f)){var o=function(A,d,L){if(!i.__c.__H)return!0;var C=i.__c.__H.__.filter(function(E){return!!E.__c});if(C.every(function(E){return!E.__N}))return!n||n.call(this,A,d,L);var y=i.__c.props!==A;return C.forEach(function(E){if(E.__N){var B=E.__[0];E.__=E.__N,E.__N=void 0,B!==E.__[0]&&(y=!0)}}),n&&n.call(this,A,d,L)||y};Z6.__f=!0;var n=Z6.shouldComponentUpdate,l=Z6.componentWillUpdate;Z6.componentWillUpdate=function(A,d,L){if(this.__e){var C=n;n=void 0,o(A,d,L),n=C}l&&l.call(this,A,d,L)},Z6.shouldComponentUpdate=o}return i.__N||i.__}function et(r,t){var e=Tu(Ps++,3);!c0.__s&&D_(e.__H,t)&&(e.__=r,e.u=t,Z6.__H.__h.push(e))}function Fu(r,t){var e=Tu(Ps++,4);!c0.__s&&D_(e.__H,t)&&(e.__=r,e.u=t,Z6.__h.push(e))}function Vi(r){return Eu=5,ye(function(){return{current:r}},[])}function R_(r,t,e){Eu=6,Fu(function(){if(typeof r=="function"){var i=r(t());return function(){r(null),i&&typeof i=="function"&&i()}}if(r)return r.current=t(),function(){return r.current=null}},e==null?e:e.concat(r))}function ye(r,t){var e=Tu(Ps++,7);return D_(e.__H,t)&&(e.__=r(),e.__H=t,e.__h=r),e.__}function i6(r,t){return Eu=8,ye(function(){return r},t)}function r7(r){var t=Z6.context[r.__c],e=Tu(Ps++,9);return e.c=r,t?(e.__==null&&(e.__=!0,t.sub(Z6)),t.props.value):r.__}function z_(r,t){c0.useDebugValue&&c0.useDebugValue(t?t(r):r)}function w4(){var r=Tu(Ps++,11);if(!r.__){for(var t=Z6.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var e=t.__m||(t.__m=[0,0]);r.__="P"+e[0]+"-"+e[1]++}return r.__}function pY(){for(var r;r=GP.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(KL),r.__H.__h.forEach(P_),r.__H.__h=[]}catch(t){r.__H.__h=[],c0.__e(t,r.__v)}}c0.__b=function(r){Z6=null,OP&&OP(r)},c0.__=function(r,t){r&&t.__k&&t.__k.__m&&(r.__m=t.__k.__m),HP&&HP(r,t)},c0.__r=function(r){ZP&&ZP(r),Ps=0;var t=(Z6=r.__c).__H;t&&(F_===Z6?(t.__h=[],Z6.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(KL),t.__h.forEach(P_),t.__h=[],Ps=0)),F_=Z6},c0.diffed=function(r){NP&&NP(r);var t=r.__c;t&&t.__H&&(t.__H.__h.length&&(GP.push(t)!==1&&kP===c0.requestAnimationFrame||((kP=c0.requestAnimationFrame)||LY)(pY)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),F_=Z6=null},c0.__c=function(r,t){t.some(function(e){try{e.__h.forEach(KL),e.__h=e.__h.filter(function(i){return!i.__||P_(i)})}catch(i){t.some(function(o){o.__h&&(o.__h=[])}),t=[],c0.__e(i,e.__v)}}),UP&&UP(r,t)},c0.unmount=function(r){QP&&QP(r);var t,e=r.__c;e&&e.__H&&(e.__H.__.forEach(function(i){try{KL(i)}catch(o){t=o}}),e.__H=void 0,t&&c0.__e(t,e.__v))};var VP=typeof requestAnimationFrame=="function";function LY(r){var t,e=function(){clearTimeout(i),VP&&cancelAnimationFrame(t),setTimeout(r)},i=setTimeout(e,35);VP&&(t=requestAnimationFrame(e))}function KL(r){var t=Z6,e=r.__c;typeof e=="function"&&(r.__c=void 0,e()),Z6=t}function P_(r){var t=Z6;r.__c=r.__(),Z6=t}function D_(r,t){return!r||r.length!==t.length||t.some(function(e,i){return e!==r[i]})}function jP(r,t){return typeof t=="function"?t(r):t}function eR(r,t){for(var e in t)r[e]=t[e];return r}function O_(r,t){for(var e in r)if(e!=="__source"&&!(e in t))return!0;for(var i in t)if(i!=="__source"&&r[i]!==t[i])return!0;return!1}function rR(r,t){var e=t(),i=Ft({t:{__:e,u:t}}),o=i[0].t,n=i[1];return Fu(function(){o.__=e,o.u=t,k_(o)&&n({t:o})},[r,e,t]),et(function(){return k_(o)&&n({t:o}),r(function(){k_(o)&&n({t:o})})},[r]),e}function k_(r){var t,e,i=r.u,o=r.__;try{var n=i();return!((t=o)===(e=n)&&(t!==0||1/t==1/e)||t!=t&&e!=e)}catch{return!0}}function iR(r){r()}function nR(r){return r}function oR(){return[!1,iR]}var aR=Fu;function Z_(r,t){this.props=r,this.context=t}function ht(r,t){function e(o){var n=this.props.ref,l=n==o.ref;return!l&&n&&(n.call?n(null):n.current=null),t?!t(this.props,o)||!l:O_(this.props,o)}function i(o){return this.shouldComponentUpdate=e,q8(r,o)}return i.displayName="Memo("+(r.displayName||r.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i.type=r,i}(Z_.prototype=new Nn).isPureReactComponent=!0,Z_.prototype.shouldComponentUpdate=function(r,t){return O_(this.props,r)||O_(this.state,t)};var qP=X5.__b;X5.__b=function(r){r.type&&r.type.__f&&r.ref&&(r.props.ref=r.ref,r.ref=null),qP&&qP(r)};var CY=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function gY(r){function t(e){var i=eR({},e);return delete i.ref,r(i,e.ref||null)}return t.$$typeof=CY,t.render=r,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(r.displayName||r.name)+")",t}var KP=function(r,t){return r==null?null:wo(wo(r).map(t))},mY={map:KP,forEach:KP,count:function(r){return r?wo(r).length:0},only:function(r){var t=wo(r);if(t.length!==1)throw"Children.only";return t[0]},toArray:wo},vY=X5.__e;X5.__e=function(r,t,e,i){if(r.then){for(var o,n=t;n=n.__;)if((o=n.__c)&&o.__c)return t.__e==null&&(t.__e=e.__e,t.__k=e.__k),o.__c(r,t)}vY(r,t,e,i)};var WP=X5.unmount;function sR(r,t,e){return r&&(r.__c&&r.__c.__H&&(r.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),r.__c.__H=null),(r=eR({},r)).__c!=null&&(r.__c.__P===e&&(r.__c.__P=t),r.__c.__e=!0,r.__c=null),r.__k=r.__k&&r.__k.map(function(i){return sR(i,t,e)})),r}function lR(r,t,e){return r&&e&&(r.__v=null,r.__k=r.__k&&r.__k.map(function(i){return lR(i,t,e)}),r.__c&&r.__c.__P===t&&(r.__e&&e.appendChild(r.__e),r.__c.__e=!0,r.__c.__P=e)),r}function WL(){this.__u=0,this.o=null,this.__b=null}function cR(r){var t=r.__.__c;return t&&t.__a&&t.__a(r)}function yY(r){var t,e,i;function o(n){if(t||(t=r()).then(function(l){e=l.default||l},function(l){i=l}),i)throw i;if(!e)throw t;return q8(e,n)}return o.displayName="Lazy",o.__f=!0,o}function yd(){this.i=null,this.l=null}X5.unmount=function(r){var t=r.__c;t&&t.__R&&t.__R(),t&&32&r.__u&&(r.type=null),WP&&WP(r)},(WL.prototype=new Nn).__c=function(r,t){var e=t.__c,i=this;i.o==null&&(i.o=[]),i.o.push(e);var o=cR(i.__v),n=!1,l=function(){n||(n=!0,e.__R=null,o?o(A):A())};e.__R=l;var A=function(){if(!--i.__u){if(i.state.__a){var d=i.state.__a;i.__v.__k[0]=lR(d,d.__c.__P,d.__c.__O)}var L;for(i.setState({__a:i.__b=null});L=i.o.pop();)L.forceUpdate()}};i.__u++||32&t.__u||i.setState({__a:i.__b=i.__v.__k[0]}),r.then(l,l)},WL.prototype.componentWillUnmount=function(){this.o=[]},WL.prototype.render=function(r,t){if(this.__b){if(this.__v.__k){var e=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=sR(this.__b,e,i.__O=i.__P)}this.__b=null}var o=t.__a&&q8(m5,null,r.fallback);return o&&(o.__u&=-33),[q8(m5,null,t.__a?null:r.children),o]};var $P=function(r,t,e){if(++e[1]===e[0]&&r.l.delete(t),r.props.revealOrder&&(r.props.revealOrder[0]!=="t"||!r.l.size))for(e=r.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;r.i=e=e[2]}};function _Y(r){return this.getChildContext=function(){return r.context},r.children}function xY(r){var t=this,e=r.h;if(t.componentWillUnmount=function(){bo(null,t.v),t.v=null,t.h=null},t.h&&t.h!==e&&t.componentWillUnmount(),!t.v){for(var i=t.__v;i!==null&&!i.__m&&i.__!==null;)i=i.__;t.h=e,t.v={nodeType:1,parentNode:e,childNodes:[],__k:{__m:i.__m},contains:function(){return!0},insertBefore:function(o,n){this.childNodes.push(o),t.h.insertBefore(o,n)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.h.removeChild(o)}}}bo(q8(_Y,{context:t.context},r.__v),t.v)}function wY(r,t){var e=q8(xY,{__v:r,h:t});return e.containerInfo=t,e}(yd.prototype=new Nn).__a=function(r){var t=this,e=cR(t.__v),i=t.l.get(r);return i[0]++,function(o){var n=function(){t.props.revealOrder?(i.push(o),$P(t,r,i)):o()};e?e(n):n()}},yd.prototype.render=function(r){this.i=null,this.l=new Map;var t=wo(r.children);r.revealOrder&&r.revealOrder[0]==="b"&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return r.children},yd.prototype.componentDidUpdate=yd.prototype.componentDidMount=function(){var r=this;this.l.forEach(function(t,e){$P(r,e,t)})};var uR=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,bY=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,MY=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,BY=/[A-Z0-9]/g,SY=typeof document<"u",EY=function(r){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(r)};function TY(r,t,e){return t.__k==null&&(t.textContent=""),bo(r,t),typeof e=="function"&&e(),r?r.__c:null}function IY(r,t,e){return md(r,t),typeof e=="function"&&e(),r?r.__c:null}Nn.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(r){Object.defineProperty(Nn.prototype,r,{configurable:!0,get:function(){return this["UNSAFE_"+r]},set:function(t){Object.defineProperty(this,r,{configurable:!0,writable:!0,value:t})}})});var XP=X5.event;function FY(){}function PY(){return this.cancelBubble}function RY(){return this.defaultPrevented}X5.event=function(r){return XP&&(r=XP(r)),r.persist=FY,r.isPropagationStopped=PY,r.isDefaultPrevented=RY,r.nativeEvent=r};var N_,zY={enumerable:!1,configurable:!0,get:function(){return this.class}},YP=X5.vnode;X5.vnode=function(r){typeof r.type=="string"&&(function(t){var e=t.props,i=t.type,o={},n=i.indexOf("-")===-1;for(var l in e){var A=e[l];if(!(l==="value"&&"defaultValue"in e&&A==null||SY&&l==="children"&&i==="noscript"||l==="class"||l==="className")){var d=l.toLowerCase();l==="defaultValue"&&"value"in e&&e.value==null?l="value":l==="download"&&A===!0?A="":d==="translate"&&A==="no"?A=!1:d[0]==="o"&&d[1]==="n"?d==="ondoubleclick"?l="ondblclick":d!=="onchange"||i!=="input"&&i!=="textarea"||EY(e.type)?d==="onfocus"?l="onfocusin":d==="onblur"?l="onfocusout":MY.test(l)&&(l=d):d=l="oninput":n&&bY.test(l)?l=l.replace(BY,"-$&").toLowerCase():A===null&&(A=void 0),d==="oninput"&&o[l=d]&&(l="oninputCapture"),o[l]=A}}i=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=wo(e.children).forEach(function(L){L.props.selected=o.value.indexOf(L.props.value)!=-1})),i=="select"&&o.defaultValue!=null&&(o.value=wo(e.children).forEach(function(L){L.props.selected=o.multiple?o.defaultValue.indexOf(L.props.value)!=-1:o.defaultValue==L.props.value})),e.class&&!e.className?(o.class=e.class,Object.defineProperty(o,"className",zY)):(e.className&&!e.class||e.class&&e.className)&&(o.class=o.className=e.className),t.props=o})(r),r.$$typeof=uR,YP&&YP(r)};var JP=X5.__r;X5.__r=function(r){JP&&JP(r),N_=r.__c};var tR=X5.diffed;X5.diffed=function(r){tR&&tR(r);var t=r.props,e=r.__e;e!=null&&r.type==="textarea"&&"value"in t&&t.value!==e.value&&(e.value=t.value==null?"":t.value),N_=null};var DY={ReactCurrentDispatcher:{current:{readContext:function(r){return N_.__n[r.__c].props.value},useCallback:i6,useContext:r7,useDebugValue:z_,useDeferredValue:nR,useEffect:et,useId:w4,useImperativeHandle:R_,useInsertionEffect:aR,useLayoutEffect:Fu,useMemo:ye,useReducer:Iu,useRef:Vi,useState:Ft,useSyncExternalStore:rR,useTransition:oR}}};function kY(r){return q8.bind(null,r)}function $L(r){return!!r&&r.$$typeof===uR}function OY(r){return $L(r)&&r.type===m5}function ZY(r){return!!r&&!!r.displayName&&(typeof r.displayName=="string"||r.displayName instanceof String)&&r.displayName.startsWith("Memo(")}function NY(r){return $L(r)?vd.apply(null,arguments):r}function UY(r){return!!r.__k&&(bo(null,r),!0)}function QY(r){return r&&(r.base||r.nodeType===1&&r)||null}var HY=function(r,t){return r(t)},VY=function(r,t){return r(t)},GY=m5,jY=$L,i7={useState:Ft,useId:w4,useReducer:Iu,useEffect:et,useLayoutEffect:Fu,useInsertionEffect:aR,useTransition:oR,useDeferredValue:nR,useSyncExternalStore:rR,startTransition:iR,useRef:Vi,useImperativeHandle:R_,useMemo:ye,useCallback:i6,useContext:r7,useDebugValue:z_,version:"18.3.1",Children:mY,render:TY,hydrate:IY,unmountComponentAtNode:UY,createPortal:wY,createElement:q8,createContext:M9,createFactory:kY,cloneElement:NY,createRef:E_,Fragment:m5,isValidElement:$L,isElement:jY,isFragment:OY,isMemo:ZY,findDOMNode:QY,Component:Nn,PureComponent:Z_,memo:ht,forwardRef:gY,flushSync:VY,unstable_batchedUpdates:HY,StrictMode:GY,Suspense:WL,SuspenseList:yd,lazy:yY,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:DY};var qY=(r,t)=>{let e=new URL(r);return Object.entries(t||{}).forEach(([o,n])=>{n!=null&&e.searchParams.set(o,n)}),e},_d=qY;var KY=function(r,t,e,i){function o(n){return n instanceof e?n:new e(function(l){l(n)})}return new(e||(e=Promise))(function(n,l){function A(C){try{L(i.next(C))}catch(y){l(y)}}function d(C){try{L(i.throw(C))}catch(y){l(y)}}function L(C){C.done?n(C.value):o(C.value).then(A,d)}L((i=i.apply(r,t||[])).next())})},U_=class{constructor(t){this.url=t.url,this.apiKey=t.apiKey}fetch(t,e,i){return KY(this,void 0,void 0,function*(){if(!this.url)throw new Error(`No url defined for request to ${this.url}/${t}`);if(!this.url&&(!this.apiKey||this.apiKey==="public")&&!this.url.includes("key="))throw new Error(`No apiKey defined for request to ${this.url}`);let o=_d(`${this.url}${t||""}`,Object.assign({key:!this.apiKey||this.apiKey==="public"?void 0:this.apiKey},e||{})),l=yield(yield fetch(o.toString(),i)).json();if(l.error)throw new Error(l.error);return l})}},Pu=U_;var hR=function(r,t,e,i){function o(n){return n instanceof e?n:new e(function(l){l(n)})}return new(e||(e=Promise))(function(n,l){function A(C){try{L(i.next(C))}catch(y){l(y)}}function d(C){try{L(i.throw(C))}catch(y){l(y)}}function L(C){C.done?n(C.value):o(C.value).then(A,d)}L((i=i.apply(r,t||[])).next())})},Q_=class extends Pu{constructor(t){var e,i,o,n;super(Object.assign({url:(e=t.url)!==null&&e!==void 0?e:"https://editor.mapset.io/api/v1"},t)),this.bbox=[],this.tags=[],this.tenants=[],this.timestamp=void 0,this.tags=(i=t.tags)!==null&&i!==void 0?i:[],this.bbox=t.bbox,this.zoom=t.zoom,this.tenants=(o=t.tenants)!==null&&o!==void 0?o:[],this.timestamp=t.timestamp,this.apiKey=(n=t.apiKey)!==null&&n!==void 0?n:""}getPlanById(t){return hR(this,arguments,void 0,function*(e,i={}){return yield this.fetch(`/meta/kml/${e}`,{},Object.assign({method:"GET"},i))})}getPlans(){return hR(this,arguments,void 0,function*(t={},e={}){var i,o,n;let l=Object.assign({},t),A={};if(A=yield this.fetch("/export/kml",Object.assign({bbox:(i=this.bbox)===null||i===void 0?void 0:i.toString(),key:this.apiKey,tags:(o=this.tags)===null||o===void 0?void 0:o.toString(),tenants:(n=this.tenants)===null||n===void 0?void 0:n.toString(),timestamp:this.timestamp,zoom:this.zoom&&Math.floor(this.zoom)},l),e),A?.detail)throw console.error("Error fetching mapset plans:",A.detail),new Error(A.detail);return A?.results||[]})}},H_=Q_;var AR=function(r,t,e,i){function o(n){return n instanceof e?n:new e(function(l){l(n)})}return new(e||(e=Promise))(function(n,l){function A(C){try{L(i.next(C))}catch(y){l(y)}}function d(C){try{L(i.throw(C))}catch(y){l(y)}}function L(C){C.done?n(C.value):o(C.value).then(A,d)}L((i=i.apply(r,t||[])).next())})},V_=class extends Pu{constructor(t){super(Object.assign(Object.assign({},t),{url:t.url||"https://moco.geops.io/api/v2/"})),this.tenant="geopstest",t.tenant&&(this.tenant=t.tenant)}export(){return AR(this,arguments,void 0,function*(t={},e={}){return yield this.fetch(`${this.tenant}/export/`,Object.assign({},t),e)})}exportById(t){return AR(this,arguments,void 0,function*(e,i={},o={}){var n,l;let A=yield this.fetch(`${this.tenant}/export/${e}/`,i,o);return(l=(n=A?.paginatedSituations)===null||n===void 0?void 0:n.results)===null||l===void 0?void 0:l[0]})}},xd=V_;var WY=(r,t,e=100)=>{let i={},o={},n=[];return l=>{let{content:A,source:d}=l;i[d]&&window.clearTimeout(i[d]),t?o[t(A)]=A:n.push(A),i[d]=window.setTimeout(()=>{let L=t?Object.values(o):n;r(L)},e)}},dR=WY;var $Y=(r,t)=>r===t.SCHEMATIC?"_schematic":"",b4=$Y;var G_=class r{constructor(){this.defineProperties()}static getRequestString(t,e={}){let i=`${t} ${e.channel}`;return i+=e.args?` ${e.args}`:"",i+=e.id?` ${e.id}`:"",i.trim()}addEvents(t,e){this.websocket&&(this.websocket.addEventListener("message",t),e&&(this.websocket.addEventListener("error",e),this.websocket.addEventListener("close",e)))}close(){this.websocket&&(this.open||this.connecting)&&(this.websocket.onclose=()=>{},this.websocket.close(),this.messagesOnOpen=[])}connect(t,e=()=>{}){var i;if(!t){(i=this.websocket)===null||i===void 0||i.close();return}if(this.websocket){if(this.websocket.url===t&&(this.open||this.connecting))return;this.websocket.url!==t&&(this.open||this.connecting)&&this.websocket.close()}this.websocket=new WebSocket(t),this.open?(e(),this.subscribePreviousSubscriptions()):this.websocket.addEventListener("open",()=>{e(),this.subscribePreviousSubscriptions()})}defineProperties(){Object.defineProperties(this,{closed:{get:()=>!this.websocket||this.websocket.readyState===this.websocket.CLOSED},closing:{get:()=>!!(this.websocket&&this.websocket.readyState===this.websocket.CLOSING)},connecting:{get:()=>!!(this.websocket&&this.websocket.readyState===this.websocket.CONNECTING)},messagesOnOpen:{value:[],writable:!0},open:{get:()=>!!(this.websocket&&this.websocket.readyState===this.websocket.OPEN)},subscribed:{value:{},writable:!0},subscriptions:{value:[],writable:!0}})}get(t,e,i){let o=r.getRequestString("GET",t);this.send(o);let n=C=>(...y)=>{C(...y);let E=this.requests.findIndex(Q=>o===Q.requestString&&e===Q.cb),{onErrorCb:B,onMessageCb:Z}=this.requests[E];this.removeEvents(Z,B),this.requests.splice(E,1)},{onErrorCb:l,onMessageCb:A}=this.listen(t,n(e),i&&n(i));this.requests||(this.requests=[]);let d=this.requests.findIndex(C=>o===C.requestString&&e===C.cb),L={cb:e,errorCb:i,onErrorCb:l,onMessageCb:A,params:t,requestString:o};d>-1?this.requests[d]=L:this.requests.push(L)}listen(t,e,i){this.unlisten(t,e);let o=n=>{let l;try{l=JSON.parse(n.data)}catch(L){console.error("WebSocket: unable to parse JSON data",L,n.data);return}let A=t.channel;A+=t.args?` ${t.args}`:"";let d;l.source==="buffer"?d=l.content:d=[l],d.forEach(L=>{L?.source===A&&(!t.id||t.id===l.client_reference)&&e(L)})};return this.addEvents(o,i),{onErrorCb:i,onMessageCb:o}}removeEvents(t,e){this.websocket&&(this.websocket.removeEventListener("message",t),e&&(this.websocket.removeEventListener("error",e),this.websocket.removeEventListener("close",e)))}send(t){if(!this.websocket||this.closed||this.closing)return;let e=()=>{var i;(i=this.websocket)===null||i===void 0||i.send(t)};this.open?this.messagesOnOpen.includes(t)||e():this.messagesOnOpen.includes(t)||(this.messagesOnOpen.push(t),this.websocket.addEventListener("open",()=>{this.messagesOnOpen=[],e()}),this.websocket.addEventListener("close",()=>{this.messagesOnOpen=[]}))}subscribe(t,e,i,o=!1){let{onErrorCb:n,onMessageCb:l}=this.listen(t,e,i),A=r.getRequestString("",t),d=this.subscriptions.findIndex(C=>t.channel===C.params.channel&&e===C.cb),L={cb:e,errorCb:i,onErrorCb:n,onMessageCb:l,params:t,quiet:o};d>-1?this.subscriptions[d]=L:this.subscriptions.push(L),this.subscribed[A]||(L.quiet||(this.send(`GET ${A}`),this.send(`SUB ${A}`)),this.subscribed[A]=!0)}subscribePreviousSubscriptions(){Object.keys(this.subscribed).forEach(t=>{this.subscribed[t]=!1}),[...this.subscriptions].forEach(t=>{this.subscribe(t.params,t.cb,t.errorCb,t.quiet)})}unlisten(t,e){[...this.subscriptions||[],...this.requests||[]].filter(i=>i.params.channel===t.channel&&(!e||i.cb===e)).forEach(({onErrorCb:i,onMessageCb:o})=>{this.removeEvents(o,i)})}unsubscribe(t,e){let i=this.subscriptions.filter(o=>o.params.channel===t&&(!e||o.cb===e));i.forEach(({onErrorCb:o,onMessageCb:n})=>{this.removeEvents(n,o)}),this.subscriptions=this.subscriptions.filter(o=>o.params.channel!==t||e&&o.cb!==e),t&&this.subscribed[t]&&!this.subscriptions.find(o=>o.params.channel===t)&&i.find(o=>!o.quiet)&&(this.send(`DEL ${t}`),this.subscribed[t]=!1)}},fR=G_;var Gi={RAW:"raw",SCHEMATIC:"schematic",TOPOGRAPHIC:"topographic"},j_=class{get bbox(){return this._bbox}set bbox(t){JSON.stringify(t)!==JSON.stringify(this._bbox)&&(this._bbox=t,this.wsApi&&this._bbox&&this.wsApi.send(`BBOX ${this._bbox.join(" ")}`))}get buffer(){return this._buffer}set buffer(t){JSON.stringify(t)!==JSON.stringify(this._buffer)&&(this._buffer=t,this.wsApi&&this._buffer&&this.wsApi.send(`BUFFER ${this._buffer.join(" ")}`))}get url(){return this._url}set url(t){this._url!==t&&(this._url=t,(this.wsApi.open||this.wsApi.connecting)&&this.open())}constructor(t={}){this.version="2";let e=t;typeof t=="string"&&(e={url:t});let{apiKey:i}=e,{url:o}=e,n=new fR,l="";i&&!o?.includes("key=")&&(l=`?key=${i}`),this._url=(o||"wss://api.geops.io/tracker-ws/v1/")+l,this._buffer=e.buffer||[100,100],this._bbox=e.bbox,this.version=e.version||"2",this.pingIntervalMs=e.pingIntervalMs||1e4,this.reconnectTimeoutMs=e.reconnectTimeoutMs||100,this.wsApi=n}close(){this.wsApi.close()}get(t){let e=t;return typeof t=="string"&&(e={channel:t}),new Promise((i,o)=>{this.wsApi.get(e,i,o)})}getFullTrajectory(t,e,i){let o="";this.version==="1"&&(o=b4(e,Gi));let n=[`full_trajectory${o}`];return t&&n.push(t),(!e||e===Gi.TOPOGRAPHIC)&&i&&n.push(`gen${i}`),this.get(n.join("_"))}getStation(t,e){let i={args:t,channel:`station${b4(e,Gi)}`};return this.get(i)}getStations(t,e=100){return new Promise((i,o)=>{this.get(`station${b4(t,Gi)}`).then(dR(i,void 0,e)).catch(o)})}getStopSequence(t){return this.get(`stopsequence_${t}`)}getTrajectory(t,e){return this.get(`partial_trajectory${b4(e,Gi)}_${t}`)}onClose(){window.clearTimeout(this.pingInterval),window.clearTimeout(this.reconnectTimeout),this.reconnectTimeoutMs&&(this.reconnectTimeout=window.setTimeout(()=>this.open(),this.reconnectTimeoutMs))}onOpen(){this.bbox&&this.wsApi.send(`BBOX ${this.bbox.join(" ")}`),this.buffer&&this.wsApi.send(`BUFFER ${this.buffer.join(" ")}`),this.pingIntervalMs&&(window.clearInterval(this.pingInterval),this.pingInterval=window.setInterval(()=>{this.wsApi.send("PING")},this.pingIntervalMs))}open(){this.wsApi.connect(this.url,this.onOpen.bind(this)),this.wsApi.websocket&&(this.wsApi.websocket.onclose=()=>{this.onClose()})}reset(){this.wsApi.send("RESET")}subscribe(t,e,i=()=>{},o=!1){!t||!e||this.wsApi.subscribe({channel:t},e,i,o)}subscribeDeletedVehicles(t,e,i=()=>{},o=!1){this.unsubscribeDeletedVehicles(e);let n="";this.version==="1"&&(n=b4(t,Gi)),this.subscribe(`deleted_vehicles${n}`,e,i,o)}subscribeDepartures(t,e,i=()=>{},o=!1){this.subscribeTimetable(t,e,i,o)}subscribeDisruptions(t,e,i=()=>{},o=!1){this.subscribeNewsticker(t,e,i,o)}subscribeExtraGeoms(t,e=()=>{},i=!1){this.subscribe("extra_geoms",t,e,i)}subscribeFullTrajectory(t,e,i,o=()=>{},n=!1){let l="";this.version==="1"&&(l=b4(e,Gi)),this.subscribe(`full_trajectory${l}_${t}`,i,o,n)}subscribeHealthCheck(t,e=()=>{},i=!1){this.subscribe("healthcheck",t,e,i)}subscribeNewsticker(t,e,i=()=>{},o=!1){this.subscribe(`${t}_newsticker`,e,i,o)}subscribeStations(t,e,i=()=>{},o=!1){this.subscribe(`station${b4(t,Gi)}`,e,i,o)}subscribeStopSequence(t,e,i=()=>{},o=!1){this.subscribe(`stopsequence_${t}`,e,i,o)}subscribeTimetable(t,e,i=()=>{},o=!1){this.subscribe(`timetable_${t}`,e,i,o)}subscribeTrajectory(t,e,i=()=>{},o=!1){this.unsubscribeTrajectory(e);let n="";this.version==="1"&&(n=b4(t,Gi)),this.subscribe(`trajectory${n}`,e,i,o)}unsubscribe(t,e="",i){let o=b4(Gi.SCHEMATIC,Gi),n=b4(Gi.TOPOGRAPHIC,Gi);this.wsApi.unsubscribe(`${t}${o}${e||""}`,i),this.wsApi.unsubscribe(`${t}${n}${e||""}`,i)}unsubscribeDeletedVehicles(t){this.unsubscribe("deleted_vehicles","",t)}unsubscribeDepartures(t,e){this.unsubscribeTimetable(t,e)}unsubscribeDisruptions(t,e){this.unsubscribeNewsticker(t,e)}unsubscribeExtraGeoms(t){this.unsubscribe("extra_geoms","",t)}unsubscribeFullTrajectory(t,e){this.unsubscribe("full_trajectory",`_${t}`,e)}unsubscribeHealthCheck(t){this.unsubscribe("healthcheck","",t)}unsubscribeNewsticker(t,e){this.unsubscribe(`${t}_newsticker`,"",e)}unsubscribeStations(t){this.unsubscribe("station","",t)}unsubscribeStopSequence(t,e){this.unsubscribe("stopsequence",`_${t}`,e)}unsubscribeTimetable(t,e){this.unsubscribe(`timetable_${t}`,"",e)}unsubscribeTrajectory(t){this.unsubscribe("trajectory","",t)}},q_=j_;var K_=class extends Pu{constructor(t={}){super(Object.assign(Object.assign({},t),{url:t.url||"https://api.geops.io/stops/v1/"}))}search(t,e){return this.fetch("",t,e)}},W_=K_;var XY=(r,t)=>{let e=null;return typeof window>"u"?null:(typeof document<"u"&&document?.createElement?(e=document.createElement("canvas"),e.width=r,e.height=t):OffscreenCanvas?e=new OffscreenCanvas(r,t):console.error("We didn't find a way to create a canvas element, document.createElement('canvas') and new OffscrenCanvas() are not supported"),e)},R7=XY;var $_={},YY=(r,t,e)=>{let i=`${r}, ${t}, ${e}`;if(!$_[i]){let o=R7(r*2,r*2);if(o){let n=o.getContext("2d");if(!n)return null;n.beginPath(),n.arc(r,r,t,0,2*Math.PI,!1),n.fillStyle=e,n.filter="blur(1px)",n.fill(),$_[i]=o}}return $_[i]},X_={},JY=(r,t,e,i,o="#000",n=1)=>{let l=`${r}, ${e}, ${i}, ${o}, ${n}`;if(!X_[l]){let A=R7(Math.ceil(r.length*t),Math.ceil(t+8*n));if(A){let d=A.getContext("2d");if(!d)return null;d.font=e,d.textAlign="left",d.textBaseline="middle",d.font=e,d.fillStyle=i,d.strokeStyle=o,d.lineWidth=1.5*n,d.strokeText(r,0,t),d.fillText(r,0,t),X_[l]=A}}return X_[l]},Y_={},tJ=(r,t,e,i,o,n)=>{let l=`${r}, ${t}, ${e}, ${i}, ${o}, ${n}`;if(!Y_[l]){let A=R7(r*2,r*2);if(A){let d=A.getContext("2d");if(!d)return null;d.fillStyle=e,i&&(d.lineWidth=1*n,d.strokeStyle="#000000"),d.beginPath(),d.arc(r,r,t,0,2*Math.PI,!1),d.fill(),o&&d.setLineDash([5,3]),i&&d.stroke(),Y_[l]=A}}return Y_[l]},J_={},eJ=(r,t,e,i,o,n,l,A)=>{let d=`${r}, ${t}, ${e}, ${i},${o}, ${n}, ${l}`;if(!J_[d]){let L=R7(t*2,t*2);if(L){let C=L.getContext("2d");if(!C)return null;n&&(C.save(),C.textBaseline="middle",C.textAlign="center",C.font=A(e+2,r),C.strokeStyle=o,C.strokeText(r,t,t),C.restore()),C.textBaseline="middle",C.textAlign="center",C.fillStyle=i,C.font=A(e,r),C.strokeStyle=o,C.strokeText(r,t,t),C.fillText(r,t,t),J_[d]=L}}return J_[d]},tx={},rJ=(r,t,e)=>{let{delayDisplay:i=3e5,delayOutlineColor:o="#000",getBgColor:n=()=>"#000",getDelayColor:l=()=>"#000",getDelayFont:A=u1=>`bold ${u1}px arial, sans-serif`,getDelayText:d=()=>null,getMaxRadiusForStrokeAndDelay:L=()=>7,getMaxRadiusForText:C=()=>10,getRadius:y=()=>0,getText:E=u1=>u1,getTextColor:B=()=>"#000",getTextFont:Z=u1=>`bold ${u1}px arial, sans-serif`,getTextSize:Q=()=>14,hoverVehicleId:V,selectedVehicleId:G,useDelayStyle:J}=e,{pixelRatio:n1=1,zoom:r1}=t,{type:m1}=r.properties,{delay:w1,line:B1,operator_provides_realtime_journey:g1,state:L1,train_id:z1}=r.properties,{color:s1,name:x1,text_color:N1}=B1||{};x1=E(x1);let V1=L1==="JOURNEY_CANCELLED";m1||(m1="rail"),x1||(x1="I"),s1&&!s1.startsWith("#")&&(s1=`#${s1}`),N1&&!N1.startsWith("#")&&(N1=`#${N1}`);let l2=Math.min(Math.floor(r1||1),16),p2=!!(V&&V===z1),o2=!!(G&&G===z1),G1=y(m1,l2)*n1,L2=G1>=L()*n1;(p2||o2)&&(G1=L2?G1+5*n1:14*n1);let V2=G1>C()*n1,w2=`${G1}${p2||o2}`;if(J?w2+=`${g1}${w1}${V1}`:(s1=s1||n(m1,B1),w2+=`${s1}`,L2&&(w2+=`${V1}${w1}`)),V2&&(J?N1="#000000":N1=N1||B(m1,B1),w2+=`${x1}${N1}`),!tx[w2]){if(G1===0)return null;let u1=1*n1,P1=G1+2*n1,F1=G1*2,J1=P1*2+u1*2,u2=J1/2,r2=null;L2&&w1!==null&&(r2=YY(u2,P1,l(w1,V1)));let F2=null,k2=0;if(L2&&(p2||(w1||0)>=i||V1)){k2=Math.max(V1?19:14,Math.min(V1?19:17,G1*1.2))*n1;let Vt=d(w1,V1);Vt&&(F2=JY(Vt,k2,A(k2,Vt),l(w1,V1,!0),o,n1))}let j2=L2||p2||o2,R2=!!L2&&!!J&&w1===null&&g1==="yes",it=s1||"#fff";J&&(it=l(w1,V1));let pt=tJ(u2,G1,it,j2,R2,n1),N2=J1+(F2?.width||0)*2,ce=R7(N2,J1);if(ce){let Vt=ce.getContext("2d");if(!Vt)return null;let qt=F2?.width||0;r2&&Vt.drawImage(r2,qt,0),pt&&Vt.drawImage(pt,qt,0);let ot=null;if(V2){let Qt=Math.max(G1,10),Lt=Q(Vt,F1,x1,Qt,Z);ot=eJ(x1,u2,Lt,N1||"#000",it,!!J&&w1===null&&g1==="yes",n1,Z)}ot&&Vt.drawImage(ot,qt,0),F2&&Vt.drawImage(F2,qt+Math.ceil(u2+P1)+u1,Math.ceil(u2-k2)),tx[w2]=ce}}return tx[w2]},pR=rJ;var iJ=(r,t,e=!1)=>{let i=["HIDDEN","LEAVING","BOARDING"],o=r.has_fzo&&i.includes(r.state),n=t.has_fzo&&i.includes(t.state);if(o||n){if(o!==n)return o?-1:1;if(r.state!==t.state)return i.indexOf(r.state)-i.indexOf(t.state)}let l=null,A=null,d=Date.now();return e?(l=new Date(r.min_arrival_time||r.time).getTime()-d,A=new Date(t.min_arrival_time||t.time).getTime()-d):(l=new Date(r.time).getTime()-d,A=new Date(t.time).getTime()-d),l-A},LR=iJ;var XL="vectorTileFeature";var nJ=(r,t=!1,e=30)=>{let i=Object.keys(r).map(y=>r[y]);i.sort((y,E)=>LR(y,E,t));let o=new Date;o.setMinutes(o.getMinutes()+e);let n=o.getTime(),l=new Date;l.setMinutes(l.getMinutes()-e);let A=l.getTime(),d=[],L=[],C=null;for(let y=i.length-1;y>=0;y-=1){let E=Object.assign({},i[y]),B=new Date(E.time).getTime();B>A&&B<n&&(E.state==="BOARDING"&&(L.includes(E.platform)?E.state="HIDDEN":L.push(E.platform)),C&&E.to[0]===C.to[0]&&Math.abs(B-C.time)<1e3&&E.line.name===C.line.name&&(E.state="HIDDEN"),/(STOP_CANCELLED|JOURNEY_CANCELLED)/.test(E.state)&&(E.cancelled=!0),C=E,C.time=B,d.unshift(E))}return d},CR=nJ;var oJ=(r,t=!1,e=30,i=100)=>{let o={},n={};return l=>{let{content:A,source:d}=l;o[d]&&window.clearTimeout(o[d]),A&&(n[A.call_id]=A,o[d]=window.setTimeout(()=>{let L=CR(n,t||!1,e);r(L)},i))}},ex=oJ;var gR=r=>{let t=r;Array.isArray(t)||(t=[r]);let e=[];return t.forEach(i=>{var o,n,l;e.push(i);let A=i.children||i.get("children")||((l=(n=(o=i).getLayers)===null||n===void 0?void 0:n.call(o))===null||l===void 0?void 0:l.getArray());e=e.concat(gR(A||[]))}),e},M4=gR;function aJ(r){let t=r.filter(n=>{var l;return(l=n?.trim)===null||l===void 0?void 0:l.call(n)}),e=t.map(n=>n.toLowerCase());return[...new Set(e)].map(n=>t.find(l=>l.toLowerCase()===n))}var mR=aJ;var w8={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function sJ(r,t,e){let i=Math.min.apply(null,r),o=Math.min.apply(null,t),n=Math.max.apply(null,r),l=Math.max.apply(null,t);return B4(i,o,n,l,e)}function Rs(r,t,e){return e?(e[0]=r[0]-t,e[1]=r[1]-t,e[2]=r[2]+t,e[3]=r[3]+t,e):[r[0]-t,r[1]-t,r[2]+t,r[3]+t]}function JL(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r.slice()}function z7(r,t,e){let i,o;return t<r[0]?i=r[0]-t:r[2]<t?i=t-r[2]:i=0,e<r[1]?o=r[1]-e:r[3]<e?o=e-r[3]:o=0,i*i+o*o}function Ql(r,t){return wd(r,t[0],t[1])}function Hl(r,t){return r[0]<=t[0]&&t[2]<=r[2]&&r[1]<=t[1]&&t[3]<=r[3]}function wd(r,t,e){return r[0]<=t&&t<=r[2]&&r[1]<=e&&e<=r[3]}function YL(r,t){let e=r[0],i=r[1],o=r[2],n=r[3],l=t[0],A=t[1],d=w8.UNKNOWN;return l<e?d=d|w8.LEFT:l>o&&(d=d|w8.RIGHT),A<i?d=d|w8.BELOW:A>n&&(d=d|w8.ABOVE),d===w8.UNKNOWN&&(d=w8.INTERSECTING),d}function D7(){return[1/0,1/0,-1/0,-1/0]}function B4(r,t,e,i,o){return o?(o[0]=r,o[1]=t,o[2]=e,o[3]=i,o):[r,t,e,i]}function wa(r){return B4(1/0,1/0,-1/0,-1/0,r)}function tC(r,t){let e=r[0],i=r[1];return B4(e,i,e,i,t)}function Ru(r,t,e,i,o){let n=wa(o);return rx(n,r,t,e,i)}function Vl(r,t){return r[0]==t[0]&&r[2]==t[2]&&r[1]==t[1]&&r[3]==t[3]}function vR(r,t){return t[0]<r[0]&&(r[0]=t[0]),t[2]>r[2]&&(r[2]=t[2]),t[1]<r[1]&&(r[1]=t[1]),t[3]>r[3]&&(r[3]=t[3]),r}function yR(r,t){t[0]<r[0]&&(r[0]=t[0]),t[0]>r[2]&&(r[2]=t[0]),t[1]<r[1]&&(r[1]=t[1]),t[1]>r[3]&&(r[3]=t[1])}function rx(r,t,e,i,o){for(;e<i;e+=o)lJ(r,t[e],t[e+1]);return r}function lJ(r,t,e){r[0]=Math.min(r[0],t),r[1]=Math.min(r[1],e),r[2]=Math.max(r[2],t),r[3]=Math.max(r[3],e)}function eC(r,t){let e;return e=t(ix(r)),e||(e=t(Gl(r)),e)||(e=t(nx(r)),e)||(e=t(jl(r)),e)?e:!1}function ix(r){return[r[0],r[1]]}function Gl(r){return[r[2],r[1]]}function k7(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function bd(r,t,e,i,o){let[n,l,A,d,L,C,y,E]=cJ(r,t,e,i);return B4(Math.min(n,A,L,y),Math.min(l,d,C,E),Math.max(n,A,L,y),Math.max(l,d,C,E),o)}function cJ(r,t,e,i){let o=t*i[0]/2,n=t*i[1]/2,l=Math.cos(e),A=Math.sin(e),d=o*l,L=o*A,C=n*l,y=n*A,E=r[0],B=r[1];return[E-d+y,B-L-C,E-d-y,B-L+C,E+d-y,B+L+C,E+d+y,B+L-C,E-d+y,B-L-C]}function n7(r){return r[3]-r[1]}function rC(r,t,e){let i=e||D7();return u0(r,t)?(r[0]>t[0]?i[0]=r[0]:i[0]=t[0],r[1]>t[1]?i[1]=r[1]:i[1]=t[1],r[2]<t[2]?i[2]=r[2]:i[2]=t[2],r[3]<t[3]?i[3]=r[3]:i[3]=t[3]):wa(i),i}function jl(r){return[r[0],r[3]]}function nx(r){return[r[2],r[3]]}function F0(r){return r[2]-r[0]}function u0(r,t){return r[0]<=t[2]&&r[2]>=t[0]&&r[1]<=t[3]&&r[3]>=t[1]}function ba(r){return r[2]<r[0]||r[3]<r[1]}function _R(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r}function xR(r,t,e){let i=!1,o=YL(r,t),n=YL(r,e);if(o===w8.INTERSECTING||n===w8.INTERSECTING)i=!0;else{let l=r[0],A=r[1],d=r[2],L=r[3],C=t[0],y=t[1],E=e[0],B=e[1],Z=(B-y)/(E-C),Q,V;n&w8.ABOVE&&!(o&w8.ABOVE)&&(Q=E-(B-L)/Z,i=Q>=l&&Q<=d),!i&&n&w8.RIGHT&&!(o&w8.RIGHT)&&(V=B-(E-d)*Z,i=V>=A&&V<=L),!i&&n&w8.BELOW&&!(o&w8.BELOW)&&(Q=E-(B-A)/Z,i=Q>=l&&Q<=d),!i&&n&w8.LEFT&&!(o&w8.LEFT)&&(V=B-(E-l)*Z,i=V>=A&&V<=L)}return i}function wR(r,t,e,i){if(ba(r))return wa(e);let o=[];if(i>1){let A=r[2]-r[0],d=r[3]-r[1];for(let L=0;L<i;++L)o.push(r[0]+A*L/i,r[1],r[2],r[1]+d*L/i,r[2]-A*L/i,r[3],r[0],r[3]-d*L/i)}else o=[r[0],r[1],r[2],r[1],r[2],r[3],r[0],r[3]];t(o,o,2);let n=[],l=[];for(let A=0,d=o.length;A<d;A+=2)n.push(o[A]),l.push(o[A+1]);return sJ(n,l,e)}function ox(r,t){let e=t.getExtent(),i=k7(r);if(t.canWrapX()&&(i[0]<e[0]||i[0]>=e[2])){let o=F0(e),l=Math.floor((i[0]-e[0])/o)*o;r[0]-=l,r[2]-=l}return r}function bR(r,t,e){if(t.canWrapX()){let i=t.getExtent();if(!isFinite(r[0])||!isFinite(r[2]))return[[i[0],r[1],i[2],r[3]]];ox(r,t);let o=F0(i);if(F0(r)>o&&!e)return[[i[0],r[1],i[2],r[3]]];if(r[0]<i[0])return[[r[0]+o,r[1],i[2],r[3]],[i[0],r[1],r[2],r[3]]];if(r[2]>i[2])return[[r[0],r[1],i[2],r[3]],[i[0],r[1],r[2]-o,r[3]]]}return[r]}function h5(){throw new Error("Unimplemented abstract method.")}var uJ=0;function vr(r){return r.ol_uid||(r.ol_uid=String(++uJ))}var S4={PROPERTYCHANGE:"propertychange"};var l5={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};var ax=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}},zu=ax;function MR(r,t,e){let i,o;e=e||E4;let n=0,l=r.length,A=!1;for(;n<l;)i=n+(l-n>>1),o=+e(r[i],t),o<0?n=i+1:(l=i,A=!o);return A?n:~n}function E4(r,t){return r>t?1:r<t?-1:0}function BR(r,t){return r<t?1:r>t?-1:0}function iC(r,t,e){if(r[0]<=t)return 0;let i=r.length;if(t<=r[i-1])return i-1;if(typeof e=="function"){for(let o=1;o<i;++o){let n=r[o];if(n===t)return o;if(n<t)return e(t,r[o-1],n)>0?o-1:o}return i-1}if(e>0){for(let o=1;o<i;++o)if(r[o]<t)return o-1;return i-1}if(e<0){for(let o=1;o<i;++o)if(r[o]<=t)return o;return i-1}for(let o=1;o<i;++o){if(r[o]==t)return o;if(r[o]<t)return r[o-1]-t<t-r[o]?o-1:o}return i-1}function SR(r,t,e){for(;t<e;){let i=r[t];r[t]=r[e],r[e]=i,++t,--e}}function ar(r,t){let e=Array.isArray(t)?t:[t],i=e.length;for(let o=0;o<i;o++)r[r.length]=e[o]}function B9(r,t){let e=r.length;if(e!==t.length)return!1;for(let i=0;i<e;i++)if(r[i]!==t[i])return!1;return!0}function Ma(){return!0}function Ba(){return!1}function Sa(){}function nC(r){let t,e,i;return function(){let o=Array.prototype.slice.call(arguments);return(!e||this!==i||!B9(o,e))&&(i=this,e=o,t=r.apply(this,arguments)),t}}function ER(r){function t(){let e;try{e=r()}catch(i){return Promise.reject(i)}return e instanceof Promise?e:Promise.resolve(e)}return t()}function Mo(r){for(let t in r)delete r[t]}function An(r){let t;for(t in r)return!1;return!t}var sx=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}};var b8=sx;var lx=class extends zu{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;let i=this.listeners_||(this.listeners_={}),o=i[t]||(i[t]=[]);o.includes(e)||o.push(e)}dispatchEvent(t){let e=typeof t=="string",i=e?t:t.type,o=this.listeners_&&this.listeners_[i];if(!o)return;let n=e?new b8(t):t;n.target||(n.target=this.eventTarget_||this);let l=this.dispatching_||(this.dispatching_={}),A=this.pendingRemovals_||(this.pendingRemovals_={});i in l||(l[i]=0,A[i]=0),++l[i];let d;for(let L=0,C=o.length;L<C;++L)if("handleEvent"in o[L]?d=o[L].handleEvent(n):d=o[L].call(this,n),d===!1||n.propagationStopped){d=!1;break}if(--l[i]===0){let L=A[i];for(delete A[i];L--;)this.removeEventListener(i,Sa);delete l[i]}return d}disposeInternal(){this.listeners_&&Mo(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(t,e){if(!this.listeners_)return;let i=this.listeners_[t];if(!i)return;let o=i.indexOf(e);o!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[o]=Sa,++this.pendingRemovals_[t]):(i.splice(o,1),i.length===0&&delete this.listeners_[t]))}},Du=lx;function ir(r,t,e,i,o){if(o){let l=e;e=function(A){return r.removeEventListener(t,e),l.call(i??this,A)}}else i&&i!==r&&(e=e.bind(i));let n={target:r,type:t,listener:e};return r.addEventListener(t,e),n}function cx(r,t,e,i){return ir(r,t,e,i,!0)}function f3(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),Mo(r))}var ku=class extends Du{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(l5.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){let i=t.length,o=new Array(i);for(let n=0;n<i;++n)o[n]=ir(this,t[n],e);return o}return ir(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){let o=t.length;i=new Array(o);for(let n=0;n<o;++n)i[n]=cx(this,t[n],e)}else i=cx(this,t,e);return e.ol_key=i,i}unInternal(t,e){let i=e.ol_key;if(i)sr(i);else if(Array.isArray(t))for(let o=0,n=t.length;o<n;++o)this.removeEventListener(t[o],e);else this.removeEventListener(t,e)}};ku.prototype.on;ku.prototype.once;ku.prototype.un;function sr(r){if(Array.isArray(r))for(let t=0,e=r.length;t<e;++t)f3(r[t]);else f3(r)}var oC=ku;var aC=class extends b8{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}},ux=class extends oC{constructor(t){super(),this.on,this.once,this.un,vr(this),this.values_=null,t!==void 0&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new aC(i,t,e)),i=S4.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new aC(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){let o=this.values_||(this.values_={});if(i)o[t]=e;else{let n=o[t];o[t]=e,n!==e&&this.notify(t,n)}}setProperties(t,e){for(let i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){let i=this.values_[t];delete this.values_[t],An(this.values_)&&(this.values_=null),e||this.notify(t,i)}}},P0=ux;var TR={info:1,warn:2,error:3,none:4},hJ=TR.info;function sC(...r){hJ>TR.warn||console.warn(...r)}function n6(r,t,e){return Math.min(Math.max(r,t),e)}function IR(r,t,e,i,o,n){let l=o-e,A=n-i;if(l!==0||A!==0){let d=((r-e)*l+(t-i)*A)/(l*l+A*A);d>1?(e=o,i=n):d>0&&(e+=l*d,i+=A*d)}return T4(r,t,e,i)}function T4(r,t,e,i){let o=e-r,n=i-t;return o*o+n*n}function zs(r){return r*180/Math.PI}function ji(r){return r*Math.PI/180}function ql(r,t){let e=r%t;return e*t<0?e+t:e}function qi(r,t,e){return r+e*(t-r)}function lC(r,t){let e=Math.pow(10,t);return Math.round(r*e)/e}function cC(r,t,e){if(r>=t&&r<e)return r;let i=e-t;return((r-t)%i+i)%i+t}function FR(r,t){return r[0]+=+t[0],r[1]+=+t[1],r}function Kl(r,t){let e=!0;for(let i=r.length-1;i>=0;--i)if(r[i]!=t[i]){e=!1;break}return e}function Ou(r,t){let e=Math.cos(t),i=Math.sin(t),o=r[0]*e-r[1]*i,n=r[1]*e+r[0]*i;return r[0]=o,r[1]=n,r}function PR(r,t){return r[0]*=t,r[1]*=t,r}function uC(r,t){if(t.canWrapX()){let e=F0(t.getExtent()),i=RR(r,t,e);i&&(r[0]-=i*e)}return r}function RR(r,t,e){let i=t.getExtent(),o=0;return t.canWrapX()&&(r[0]<i[0]||r[0]>i[2])&&(e=e||F0(i),o=Math.floor((r[0]-i[0])/e)),o}var Ea={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var hx=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Ea[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},Zu=hx;var Md=6378137,Nu=Math.PI*Md,AJ=[-Nu,-Nu,Nu,Nu],dJ=[-180,-85,180,85],hC=Md*Math.log(Math.tan(Math.PI/2)),Ds=class extends Zu{constructor(t){super({code:t,units:"m",extent:AJ,global:!0,worldExtent:dJ,getPointResolution:function(e,i){return e/Math.cosh(i[1]/Md)}})}},Ax=[new Ds("EPSG:3857"),new Ds("EPSG:102100"),new Ds("EPSG:102113"),new Ds("EPSG:900913"),new Ds("http://www.opengis.net/def/crs/EPSG/0/3857"),new Ds("http://www.opengis.net/gml/srs/epsg.xml#3857")];function zR(r,t,e,i){let o=r.length;e=e>1?e:2,i=i??e,t===void 0&&(e>2?t=r.slice():t=new Array(o));for(let n=0;n<o;n+=i){t[n]=Nu*r[n]/180;let l=Md*Math.log(Math.tan(Math.PI*(+r[n+1]+90)/360));l>hC?l=hC:l<-hC&&(l=-hC),t[n+1]=l}return t}function DR(r,t,e,i){let o=r.length;e=e>1?e:2,i=i??e,t===void 0&&(e>2?t=r.slice():t=new Array(o));for(let n=0;n<o;n+=i)t[n]=180*r[n]/Nu,t[n+1]=360*Math.atan(Math.exp(r[n+1]/Md))/Math.PI-90;return t}var fJ=6378137,kR=[-180,-90,180,90],pJ=Math.PI*fJ/180,Ta=class extends Zu{constructor(t,e){super({code:t,units:"degrees",extent:kR,axisOrientation:e,global:!0,metersPerUnit:pJ,worldExtent:kR})}},dx=[new Ta("CRS:84"),new Ta("EPSG:4326","neu"),new Ta("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ta("urn:ogc:def:crs:OGC:2:84"),new Ta("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Ta("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ta("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];var fx={};function OR(r){return fx[r]||fx[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function ZR(r,t){fx[r]=t}var Uu={};function Qu(r,t,e){let i=r.getCode(),o=t.getCode();i in Uu||(Uu[i]={}),Uu[i][o]=e}function AC(r,t){return r in Uu&&t in Uu[r]?Uu[r][t]:null}var dC=.9996,Un=.00669438,pC=Un*Un,LC=pC*Un,Wl=Un/(1-Un),NR=Math.sqrt(1-Un),Hu=(1-NR)/(1+NR),VR=Hu*Hu,px=VR*Hu,Lx=px*Hu,GR=Lx*Hu,jR=1-Un/4-3*pC/64-5*LC/256,LJ=3*Un/8+3*pC/32+45*LC/1024,CJ=15*pC/256+45*LC/1024,gJ=35*LC/3072,mJ=3/2*Hu-27/32*px+269/512*GR,vJ=21/16*VR-55/32*Lx,yJ=151/96*px-417/128*GR,_J=1097/512*Lx,fC=6378137;function xJ(r,t,e){let i=r-5e5,l=(e.north?t:t-1e7)/dC/(fC*jR),A=l+mJ*Math.sin(2*l)+vJ*Math.sin(4*l)+yJ*Math.sin(6*l)+_J*Math.sin(8*l),d=Math.sin(A),L=d*d,C=Math.cos(A),y=d/C,E=y*y,B=E*E,Z=1-Un*L,Q=Math.sqrt(1-Un*L),V=fC/Q,G=(1-Un)/Z,J=Wl*C**2,n1=J*J,r1=i/(V*dC),m1=r1*r1,w1=m1*r1,B1=w1*r1,g1=B1*r1,L1=g1*r1,z1=A-y/G*(m1/2-B1/24*(5+3*E+10*J-4*n1-9*Wl))+L1/720*(61+90*E+298*J+45*B-252*Wl-3*n1),s1=(r1-w1/6*(1+2*E+J)+g1/120*(5-2*J+28*E-3*n1+8*Wl+24*B))/C;return s1=cC(s1+ji(qR(e.number)),-Math.PI,Math.PI),[zs(s1),zs(z1)]}var UR=-80,QR=84,wJ=-180,bJ=180;function MJ(r,t,e){r=cC(r,wJ,bJ),t<UR?t=UR:t>QR&&(t=QR);let i=ji(t),o=Math.sin(i),n=Math.cos(i),l=o/n,A=l*l,d=A*A,L=ji(r),C=qR(e.number),y=ji(C),E=fC/Math.sqrt(1-Un*o**2),B=Wl*n**2,Z=n*cC(L-y,-Math.PI,Math.PI),Q=Z*Z,V=Q*Z,G=V*Z,J=G*Z,n1=J*Z,r1=fC*(jR*i-LJ*Math.sin(2*i)+CJ*Math.sin(4*i)-gJ*Math.sin(6*i)),m1=dC*E*(Z+V/6*(1-A+B)+J/120*(5-18*A+d+72*B-58*Wl))+5e5,w1=dC*(r1+E*l*(Q/2+G/24*(5-A+9*B+4*B**2)+n1/720*(61-58*A+d+600*B-330*Wl)));return e.north||(w1+=1e7),[m1,w1]}function qR(r){return(r-1)*6-180+3}var BJ=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function KR(r){let t=0;for(let o of BJ){let n=r.match(o);if(n){t=parseInt(n[1]);break}}if(!t)return null;let e=0,i=!1;return t>32700&&t<32761?e=t-32700:t>32600&&t<32661&&(i=!0,e=t-32600),e?{number:e,north:i}:null}function HR(r,t){return function(e,i,o,n){let l=e.length;o=o>1?o:2,n=n??o,i||(o>2?i=e.slice():i=new Array(l));for(let A=0;A<l;A+=n){let d=e[A],L=e[A+1],C=r(d,L,t);i[A]=C[0],i[A+1]=C[1]}return i}}function WR(r){return KR(r)?new Zu({code:r,units:"m"}):null}function $R(r){let t=KR(r.getCode());return t?{forward:HR(MJ,t),inverse:HR(xJ,t)}:null}var XR=63710088e-1;function Cx(r,t,e){e=e||XR;let i=ji(r[1]),o=ji(t[1]),n=(o-i)/2,l=ji(t[0]-r[0])/2,A=Math.sin(n)*Math.sin(n)+Math.sin(l)*Math.sin(l)*Math.cos(i)*Math.cos(o);return 2*e*Math.atan2(Math.sqrt(A),Math.sqrt(1-A))}function YR(r,t,e,i){i=i||XR;let o=ji(r[1]),n=ji(r[0]),l=t/i,A=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(e)),d=n+Math.atan2(Math.sin(e)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(A));return[zs(d),zs(A)]}var SJ=[$R],EJ=[WR];var mx=!0;function yx(r){mx=!(r===void 0?!0:r)}function _x(r,t){if(t!==void 0){for(let e=0,i=r.length;e<i;++e)t[e]=r[e];t=t}else t=r.slice();return t}function tz(r,t){if(t!==void 0&&r!==t){for(let e=0,i=r.length;e<i;++e)t[e]=r[e];r=t}return r}function vx(r){ZR(r.getCode(),r),Qu(r,r,_x)}function TJ(r){r.forEach(vx)}function p3(r){if(typeof r!="string")return r;let t=OR(r);if(t)return t;for(let e of EJ){let i=e(r);if(i)return i}return null}function xx(r,t,e,i){r=p3(r);let o,n=r.getPointResolutionFunc();if(n){if(o=n(t,e),i&&i!==r.getUnits()){let l=r.getMetersPerUnit();l&&(o=o*l/Ea[i])}}else{let l=r.getUnits();if(l=="degrees"&&!i||i=="degrees")o=t;else{let A=Fa(r,p3("EPSG:4326"));if(!A&&l!=="degrees")o=t*r.getMetersPerUnit();else{let L=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];L=A(L,L,2);let C=Cx(L.slice(0,2),L.slice(2,4)),y=Cx(L.slice(4,6),L.slice(6,8));o=(C+y)/2}let d=i?Ea[i]:r.getMetersPerUnit();d!==void 0&&(o/=d)}}return o}function JR(r){TJ(r),r.forEach(function(t){r.forEach(function(e){t!==e&&Qu(t,e,_x)})})}function IJ(r,t,e,i){r.forEach(function(o){t.forEach(function(n){Qu(o,n,e),Qu(n,o,i)})})}function CC(r,t){return r?typeof r=="string"?p3(r):r:p3(t)}function Ia(r,t){return yx(),Yl(r,"EPSG:4326",t!==void 0?t:"EPSG:3857")}function $l(r,t){let e=Yl(r,t!==void 0?t:"EPSG:3857","EPSG:4326"),i=e[0];return(i<-180||i>180)&&(e[0]=ql(i+180,360)-180),e}function ez(r,t){if(r===t)return!0;let e=r.getUnits()===t.getUnits();return(r.getCode()===t.getCode()||Fa(r,t)===_x)&&e}function Fa(r,t){let e=r.getCode(),i=t.getCode(),o=AC(e,i);if(o)return o;let n=null,l=null;for(let d of SJ)n||(n=d(r)),l||(l=d(t));if(!n&&!l)return null;let A="EPSG:4326";if(l)if(n)o=gx(n.inverse,l.forward);else{let d=AC(e,A);d&&(o=gx(d,l.forward))}else{let d=AC(A,i);d&&(o=gx(n.inverse,d))}return o&&(vx(r),vx(t),Qu(r,t,o)),o}function gx(r,t){return function(e,i,o,n){return i=r(e,i,o,n),t(i,i,o,n)}}function Xl(r,t){let e=p3(r),i=p3(t);return Fa(e,i)}function Yl(r,t,e){let i=Xl(t,e);if(!i){let o=p3(t).getCode(),n=p3(e).getCode();throw new Error(`No transform available between ${o} and ${n}`)}return i(r,void 0,r.length)}function F4(r,t,e,i){let o=Xl(t,e);return wR(r,o,void 0,i)}var I4=null;function Jl(){return I4}function Bd(r,t){return I4?Yl(r,t,I4):r}function P4(r,t){return I4?Yl(r,I4,t):(mx&&!Kl(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(mx=!1,sC("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r)}function ks(r,t){return I4?F4(r,t,I4):r}function Os(r,t){return I4?F4(r,I4,t):r}function rz(r,t){if(!I4)return r;let e=p3(t).getMetersPerUnit(),i=I4.getMetersPerUnit();return e&&i?r*e/i:r}function FJ(){JR(Ax),JR(dx),IJ(dx,Ax,zR,DR)}FJ();function o3(r,t){if(!r)throw new Error(t)}var gg1=new Array(6);function e8(){return[1,0,0,1,0,0]}function nz(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function M8(r,t){let e=t[0],i=t[1];return t[0]=r[0]*e+r[2]*i+r[4],t[1]=r[1]*e+r[3]*i+r[5],t}function Ci(r,t,e,i,o,n,l,A){let d=Math.sin(n),L=Math.cos(n);return r[0]=i*L,r[1]=o*d,r[2]=-i*d,r[3]=o*L,r[4]=l*i*L-A*i*d+t,r[5]=l*o*d+A*o*L+e,r}function oz(r,t,e,i,o,n,l){return wx(Ci(e8(),r,t,e,i,o,n,l))}function gC(r,t){let e=PJ(t);o3(e!==0,"Transformation matrix cannot be inverted");let i=t[0],o=t[1],n=t[2],l=t[3],A=t[4],d=t[5];return r[0]=l/e,r[1]=-o/e,r[2]=-n/e,r[3]=i/e,r[4]=(n*d-l*A)/e,r[5]=-(i*d-o*A)/e,r}function PJ(r){return r[0]*r[3]-r[1]*r[2]}var RJ=[1e5,1e5,1e5,1e5,2,2];function wx(r){return"matrix("+r.join(", ")+")"}function iz(r){return r.substring(7,r.length-1).split(",").map(parseFloat)}function az(r,t){let e=iz(r),i=iz(t);for(let o=0;o<6;++o)if(Math.round((e[o]-i[o])*RJ[o])!==0)return!1;return!0}function O7(r,t,e,i,o,n,l){n=n||[],l=l||2;let A=0;for(let d=t;d<e;d+=i){let L=r[d],C=r[d+1];n[A++]=o[0]*L+o[2]*C+o[4],n[A++]=o[1]*L+o[3]*C+o[5];for(let y=2;y<l;y++)n[A++]=r[d+y]}return n&&n.length!=A&&(n.length=A),n}function Vu(r,t,e,i,o,n,l){l=l||[];let A=Math.cos(o),d=Math.sin(o),L=n[0],C=n[1],y=0;for(let E=t;E<e;E+=i){let B=r[E]-L,Z=r[E+1]-C;l[y++]=L+B*A-Z*d,l[y++]=C+B*d+Z*A;for(let Q=E+2;Q<E+i;++Q)l[y++]=r[Q]}return l&&l.length!=y&&(l.length=y),l}function sz(r,t,e,i,o,n,l,A){A=A||[];let d=l[0],L=l[1],C=0;for(let y=t;y<e;y+=i){let E=r[y]-d,B=r[y+1]-L;A[C++]=d+o*E,A[C++]=L+n*B;for(let Z=y+2;Z<y+i;++Z)A[C++]=r[Z]}return A&&A.length!=C&&(A.length=C),A}function lz(r,t,e,i,o,n,l){l=l||[];let A=0;for(let d=t;d<e;d+=i){l[A++]=r[d]+o,l[A++]=r[d+1]+n;for(let L=d+2;L<d+i;++L)l[A++]=r[L]}return l&&l.length!=A&&(l.length=A),l}var cz=e8(),zJ=[NaN,NaN],bx=class extends P0{constructor(){super(),this.extent_=D7(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=nC((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);let o=this.clone();return o.applyTransform(i),o.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return h5()}closestPointXY(t,e,i,o){return h5()}containsXY(t,e){return this.closestPointXY(t,e,zJ,Number.MIN_VALUE)===0}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return h5()}getExtent(t){if(this.extentRevision_!=this.getRevision()){let e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&wa(e),this.extentRevision_=this.getRevision()}return _R(this.extent_,t)}rotate(t,e){h5()}scale(t,e,i){h5()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return h5()}getType(){return h5()}applyTransform(t){h5()}intersectsExtent(t){return h5()}translate(t,e){h5()}transform(t,e){let i=p3(t),o=i.getUnits()=="tile-pixels"?function(n,l,A){let d=i.getExtent(),L=i.getWorldExtent(),C=n7(L)/n7(d);Ci(cz,L[0],L[3],C,-C,0,0,0);let y=O7(n,0,n.length,A,cz,l),E=Xl(i,e);return E?E(y,y,A):y}:Xl(i,e);return this.applyTransform(o),this}},mC=bx;var Mx=class extends mC{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return Ru(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return h5()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;let e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=uz(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){h5()}setLayout(t,e,i){let o;if(t)o=uz(t);else{for(let n=0;n<i;++n){if(e.length===0){this.layout="XY",this.stride=2;return}e=e[0]}o=e.length,t=Zs(o)}this.layout=t,this.stride=o}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(t,e){let i=this.getFlatCoordinates();if(i){let o=this.getStride();Vu(i,0,i.length,o,t,e,i),this.changed()}}scale(t,e,i){e===void 0&&(e=t),i||(i=k7(this.getExtent()));let o=this.getFlatCoordinates();if(o){let n=this.getStride();sz(o,0,o.length,n,t,e,i,o),this.changed()}}translate(t,e){let i=this.getFlatCoordinates();if(i){let o=this.getStride();lz(i,0,i.length,o,t,e,i),this.changed()}}};function Zs(r){let t;return r==2?t="XY":r==3?t="XYZ":r==4&&(t="XYZM"),t}function uz(r){let t;return r=="XY"?t=2:r=="XYZ"||r=="XYM"?t=3:r=="XYZM"&&(t=4),t}function hz(r,t,e){let i=r.getFlatCoordinates();if(!i)return null;let o=r.getStride();return O7(i,0,i.length,o,t,e)}var K8=Mx;function vC(r,t,e,i){for(let o=0,n=e.length;o<n;++o)r[t++]=e[o];return t}function tc(r,t,e,i){for(let o=0,n=e.length;o<n;++o){let l=e[o];for(let A=0;A<i;++A)r[t++]=l[A]}return t}function Ns(r,t,e,i,o){o=o||[];let n=0;for(let l=0,A=e.length;l<A;++l){let d=tc(r,t,e[l],i);o[n++]=d,t=d}return o.length=n,o}function yC(r,t,e,i,o){o=o||[];let n=0;for(let l=0,A=e.length;l<A;++l){let d=Ns(r,t,e[l],i,o[n]);d.length===0&&(d[0]=t),o[n++]=d,t=d[d.length-1]}return o.length=n,o}var _C=class r extends K8{constructor(t,e,i){super(),i!==void 0&&e===void 0?this.setFlatCoordinates(i,t):(e=e||0,this.setCenterAndRadius(t,e,i))}clone(){let t=new r(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,o){let n=this.flatCoordinates,l=t-n[0],A=e-n[1],d=l*l+A*A;if(d<o){if(d===0)for(let L=0;L<this.stride;++L)i[L]=n[L];else{let L=this.getRadius()/Math.sqrt(d);i[0]=n[0]+L*l,i[1]=n[1]+L*A;for(let C=2;C<this.stride;++C)i[C]=n[C]}return i.length=this.stride,d}return o}containsXY(t,e){let i=this.flatCoordinates,o=t-i[0],n=e-i[1];return o*o+n*n<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(t){let e=this.flatCoordinates,i=e[this.stride]-e[0];return B4(e[0]-i,e[1]-i,e[0]+i,e[1]+i,t)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){let t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e}getType(){return"Circle"}intersectsExtent(t){let e=this.getExtent();if(u0(t,e)){let i=this.getCenter();return t[0]<=i[0]&&t[2]>=i[0]||t[1]<=i[1]&&t[3]>=i[1]?!0:eC(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){let e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],o=t.slice();o[e]=o[0]+i;for(let n=1;n<e;++n)o[e+n]=t[n];this.setFlatCoordinates(this.layout,o),this.changed()}setCenterAndRadius(t,e,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);let o=this.flatCoordinates,n=vC(o,0,t,this.stride);o[n++]=o[0]+e;for(let l=1,A=this.stride;l<A;++l)o[n++]=o[l];o.length=n,this.changed()}getCoordinates(){return null}setCoordinates(t,e){}setRadius(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()}rotate(t,e){let i=this.getCenter(),o=this.getStride();this.setCenter(Vu(i,0,i.length,o,t,e,i)),this.changed()}};_C.prototype.transform;var Az=_C;var Sx=class r extends mC{constructor(t){super(),this.geometries_=t,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(f3),this.changeEventsKeys_.length=0}listenGeometriesChange_(){let t=this.geometries_;for(let e=0,i=t.length;e<i;++e)this.changeEventsKeys_.push(ir(t[e],l5.CHANGE,this.changed,this))}clone(){let t=new r(Bx(this.geometries_));return t.applyProperties(this),t}closestPointXY(t,e,i,o){if(o<z7(this.getExtent(),t,e))return o;let n=this.geometries_;for(let l=0,A=n.length;l<A;++l)o=n[l].closestPointXY(t,e,i,o);return o}containsXY(t,e){let i=this.geometries_;for(let o=0,n=i.length;o<n;++o)if(i[o].containsXY(t,e))return!0;return!1}computeExtent(t){wa(t);let e=this.geometries_;for(let i=0,o=e.length;i<o;++i)vR(t,e[i].getExtent());return t}getGeometries(){return Bx(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[],e=this.geometries_;for(let i=0,o=e.length;i<o;++i)e[i].getType()===this.getType()?t=t.concat(e[i].getGeometriesArrayRecursive()):t.push(e[i]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;let e=[],i=this.geometries_,o=!1;for(let n=0,l=i.length;n<l;++n){let A=i[n],d=A.getSimplifiedGeometry(t);e.push(d),d!==A&&(o=!0)}return o?new r(e):(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getType(){return"GeometryCollection"}intersectsExtent(t){let e=this.geometries_;for(let i=0,o=e.length;i<o;++i)if(e[i].intersectsExtent(t))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(t,e){let i=this.geometries_;for(let o=0,n=i.length;o<n;++o)i[o].rotate(t,e);this.changed()}scale(t,e,i){i||(i=k7(this.getExtent()));let o=this.geometries_;for(let n=0,l=o.length;n<l;++n)o[n].scale(t,e,i);this.changed()}setGeometries(t){this.setGeometriesArray(Bx(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){let e=this.geometries_;for(let i=0,o=e.length;i<o;++i)e[i].applyTransform(t);this.changed()}translate(t,e){let i=this.geometries_;for(let o=0,n=i.length;o<n;++o)i[o].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}};function Bx(r){return r.map(t=>t.clone())}var dn=Sx;function Ex(r,t,e,i){let o=0,n=r[e-i],l=r[e-i+1],A=0,d=0;for(;t<e;t+=i){let L=r[t]-n,C=r[t+1]-l;o+=d*L-A*C,A=L,d=C}return o/2}function Tx(r,t,e,i){let o=0;for(let n=0,l=e.length;n<l;++n){let A=e[n];o+=Ex(r,t,A,i),t=A}return o}function dz(r,t,e,i){let o=0;for(let n=0,l=e.length;n<l;++n){let A=e[n];o+=Tx(r,t,A,i),t=A[A.length-1]}return o}function fz(r,t,e,i,o,n,l){let A=r[t],d=r[t+1],L=r[e]-A,C=r[e+1]-d,y;if(L===0&&C===0)y=t;else{let E=((o-A)*L+(n-d)*C)/(L*L+C*C);if(E>1)y=e;else if(E>0){for(let B=0;B<i;++B)l[B]=qi(r[t+B],r[e+B],E);l.length=i;return}else y=t}for(let E=0;E<i;++E)l[E]=r[y+E];l.length=i}function Sd(r,t,e,i,o){let n=r[t],l=r[t+1];for(t+=i;t<e;t+=i){let A=r[t],d=r[t+1],L=T4(n,l,A,d);L>o&&(o=L),n=A,l=d}return o}function Ed(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n){let A=e[n];o=Sd(r,t,A,i,o),t=A}return o}function pz(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n){let A=e[n];o=Ed(r,t,A,i,o),t=A[A.length-1]}return o}function Td(r,t,e,i,o,n,l,A,d,L,C){if(t==e)return L;let y,E;if(o===0){if(E=T4(l,A,r[t],r[t+1]),E<L){for(y=0;y<i;++y)d[y]=r[t+y];return d.length=i,E}return L}C=C||[NaN,NaN];let B=t+i;for(;B<e;)if(fz(r,B-i,B,i,l,A,C),E=T4(l,A,C[0],C[1]),E<L){for(L=E,y=0;y<i;++y)d[y]=C[y];d.length=i,B+=i}else B+=i*Math.max((Math.sqrt(E)-Math.sqrt(L))/o|0,1);if(n&&(fz(r,e-i,t,i,l,A,C),E=T4(l,A,C[0],C[1]),E<L)){for(L=E,y=0;y<i;++y)d[y]=C[y];d.length=i}return L}function Id(r,t,e,i,o,n,l,A,d,L,C){C=C||[NaN,NaN];for(let y=0,E=e.length;y<E;++y){let B=e[y];L=Td(r,t,B,i,o,n,l,A,d,L,C),t=B}return L}function Lz(r,t,e,i,o,n,l,A,d,L,C){C=C||[NaN,NaN];for(let y=0,E=e.length;y<E;++y){let B=e[y];L=Id(r,t,B,i,o,n,l,A,d,L,C),t=B[B.length-1]}return L}function Qn(r,t,e,i,o){o=o!==void 0?o:[];let n=0;for(let l=t;l<e;l+=i)o[n++]=r.slice(l,l+i);return o.length=n,o}function Us(r,t,e,i,o){o=o!==void 0?o:[];let n=0;for(let l=0,A=e.length;l<A;++l){let d=e[l];o[n++]=Qn(r,t,d,i,o[n]),t=d}return o.length=n,o}function Fd(r,t,e,i,o){o=o!==void 0?o:[];let n=0;for(let l=0,A=e.length;l<A;++l){let d=e[l];o[n++]=d.length===1&&d[0]===t?[]:Us(r,t,d,i,o[n]),t=d[d.length-1]}return o.length=n,o}function ec(r,t,e,i,o,n,l){let A=(e-t)/i;if(A<3){for(;t<e;t+=i)n[l++]=r[t],n[l++]=r[t+1];return l}let d=new Array(A);d[0]=1,d[A-1]=1;let L=[t,e-i],C=0;for(;L.length>0;){let y=L.pop(),E=L.pop(),B=0,Z=r[E],Q=r[E+1],V=r[y],G=r[y+1];for(let J=E+i;J<y;J+=i){let n1=r[J],r1=r[J+1],m1=IR(n1,r1,Z,Q,V,G);m1>B&&(C=J,B=m1)}B>o&&(d[(C-t)/i]=1,E+i<C&&L.push(E,C),C+i<y&&L.push(C,y))}for(let y=0;y<A;++y)d[y]&&(n[l++]=r[t+y*i],n[l++]=r[t+y*i+1]);return l}function xC(r,t,e,i,o,n,l,A){for(let d=0,L=e.length;d<L;++d){let C=e[d];l=ec(r,t,C,i,o,n,l),A.push(l),t=C}return l}function Qs(r,t){return t*Math.round(r/t)}function DJ(r,t,e,i,o,n,l){if(t==e)return l;let A=Qs(r[t],o),d=Qs(r[t+1],o);t+=i,n[l++]=A,n[l++]=d;let L,C;do if(L=Qs(r[t],o),C=Qs(r[t+1],o),t+=i,t==e)return n[l++]=L,n[l++]=C,l;while(L==A&&C==d);for(;t<e;){let y=Qs(r[t],o),E=Qs(r[t+1],o);if(t+=i,y==L&&E==C)continue;let B=L-A,Z=C-d,Q=y-A,V=E-d;if(B*V==Z*Q&&(B<0&&Q<B||B==Q||B>0&&Q>B)&&(Z<0&&V<Z||Z==V||Z>0&&V>Z)){L=y,C=E;continue}n[l++]=L,n[l++]=C,A=L,d=C,L=y,C=E}return n[l++]=L,n[l++]=C,l}function Pd(r,t,e,i,o,n,l,A){for(let d=0,L=e.length;d<L;++d){let C=e[d];l=DJ(r,t,C,i,o,n,l),A.push(l),t=C}return l}function Cz(r,t,e,i,o,n,l,A){for(let d=0,L=e.length;d<L;++d){let C=e[d],y=[];l=Pd(r,t,C,i,o,n,l,y),A.push(y),t=C[C.length-1]}return l}var Ix=class r extends K8{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new r(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,o){return o<z7(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Sd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Td(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,o))}getArea(){return Ex(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Qn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){let e=[];return e.length=ec(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new r(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=tc(this.flatCoordinates,0,t,this.stride),this.changed()}},Fx=Ix;function rc(r,t,e,i,o,n,l){let A,d,L=(e-t)/i;if(L===1)A=t;else if(L===2)A=t,d=o;else if(L!==0){let C=r[t],y=r[t+1],E=0,B=[0];for(let V=t+i;V<e;V+=i){let G=r[V],J=r[V+1];E+=Math.sqrt((G-C)*(G-C)+(J-y)*(J-y)),B.push(E),C=G,y=J}let Z=o*E,Q=MR(B,Z);Q<0?(d=(Z-B[-Q-2])/(B[-Q-1]-B[-Q-2]),A=t+(-Q-2)*i):A=t+Q*i}l=l>1?l:2,n=n||new Array(l);for(let C=0;C<l;++C)n[C]=A===void 0?NaN:d===void 0?r[A+C]:qi(r[A+C],r[A+i+C],d);return n}function wC(r,t,e,i,o,n){if(e==t)return null;let l;if(o<r[t+i-1])return n?(l=r.slice(t,t+i),l[i-1]=o,l):null;if(r[e-1]<o)return n?(l=r.slice(e-i,e),l[i-1]=o,l):null;if(o==r[t+i-1])return r.slice(t,t+i);let A=t/i,d=e/i;for(;A<d;){let E=A+d>>1;o<r[(E+1)*i-1]?d=E:A=E+1}let L=r[A*i-1];if(o==L)return r.slice((A-1)*i,(A-1)*i+i);let C=r[(A+1)*i-1],y=(o-L)/(C-L);l=[];for(let E=0;E<i-1;++E)l.push(qi(r[(A-1)*i+E],r[A*i+E],y));return l.push(o),l}function gz(r,t,e,i,o,n,l){if(l)return wC(r,t,e[e.length-1],i,o,n);let A;if(o<r[i-1])return n?(A=r.slice(0,i),A[i-1]=o,A):null;if(r[r.length-1]<o)return n?(A=r.slice(r.length-i),A[i-1]=o,A):null;for(let d=0,L=e.length;d<L;++d){let C=e[d];if(t!=C){if(o<r[t+i-1])return null;if(o<=r[C-1])return wC(r,t,C,i,o,!1);t=C}}return null}function mz(r,t,e,i,o){return!eC(o,function(l){return!Hs(r,t,e,i,l[0],l[1])})}function Hs(r,t,e,i,o,n){let l=0,A=r[e-i],d=r[e-i+1];for(;t<e;t+=i){let L=r[t],C=r[t+1];d<=n?C>n&&(L-A)*(n-d)-(o-A)*(C-d)>0&&l++:C<=n&&(L-A)*(n-d)-(o-A)*(C-d)<0&&l--,A=L,d=C}return l!==0}function Rd(r,t,e,i,o,n){if(e.length===0||!Hs(r,t,e[0],i,o,n))return!1;for(let l=1,A=e.length;l<A;++l)if(Hs(r,e[l-1],e[l],i,o,n))return!1;return!0}function vz(r,t,e,i,o,n){if(e.length===0)return!1;for(let l=0,A=e.length;l<A;++l){let d=e[l];if(Rd(r,t,d,i,o,n))return!0;t=d[d.length-1]}return!1}function bC(r,t,e,i,o){let n;for(t+=i;t<e;t+=i)if(n=o(r.slice(t-i,t),r.slice(t,t+i)),n)return n;return!1}function zd(r,t,e,i,o,n){return n=n??rx(D7(),r,t,e,i),u0(o,n)?n[0]>=o[0]&&n[2]<=o[2]||n[1]>=o[1]&&n[3]<=o[3]?!0:bC(r,t,e,i,function(l,A){return xR(o,l,A)}):!1}function yz(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n){if(zd(r,t,e[n],i,o))return!0;t=e[n]}return!1}function kJ(r,t,e,i,o){return!!(zd(r,t,e,i,o)||Hs(r,t,e,i,o[0],o[1])||Hs(r,t,e,i,o[0],o[3])||Hs(r,t,e,i,o[2],o[1])||Hs(r,t,e,i,o[2],o[3]))}function Px(r,t,e,i,o){if(!kJ(r,t,e[0],i,o))return!1;if(e.length===1)return!0;for(let n=1,l=e.length;n<l;++n)if(mz(r,e[n-1],e[n],i,o)&&!zd(r,e[n-1],e[n],i,o))return!1;return!0}function _z(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n){let A=e[n];if(Px(r,t,A,i,o))return!0;t=A[A.length-1]}return!1}function Gu(r,t,e,i){let o=r[t],n=r[t+1],l=0;for(let A=t+i;A<e;A+=i){let d=r[A],L=r[A+1];l+=Math.sqrt((d-o)*(d-o)+(L-n)*(L-n)),o=d,n=L}return l}var Rx=class r extends K8{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){ar(this.flatCoordinates,t),this.changed()}clone(){let t=new r(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,o){return o<z7(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Sd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Td(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,o))}forEachSegment(t){return bC(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,wC(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return Qn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return rc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return Gu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){let e=[];return e.length=ec(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new r(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return zd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,this.getExtent())}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=tc(this.flatCoordinates,0,t,this.stride),this.changed()}},R4=Rx;var zx=class r extends K8{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{let o=t,n=[],l=[];for(let d=0,L=o.length;d<L;++d){let C=o[d];ar(n,C.getFlatCoordinates()),l.push(n.length)}let A=o.length===0?this.getLayout():o[0].getLayout();this.setFlatCoordinates(A,n),this.ends_=l}}appendLineString(t){ar(this.flatCoordinates,t.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){let t=new r(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,o){return o<z7(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ed(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Id(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,o))}getCoordinateAtM(t,e,i){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(e=e!==void 0?e:!1,i=i!==void 0?i:!1,gz(this.flatCoordinates,0,this.ends_,this.stride,t,e,i))}getCoordinates(){return Us(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new R4(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){let t=this.flatCoordinates,e=this.ends_,i=this.layout,o=[],n=0;for(let l=0,A=e.length;l<A;++l){let d=e[l],L=new R4(t.slice(n,d),i);o.push(L),n=d}return o}getLength(){let t=this.ends_,e=0,i=0;for(let o=0,n=t.length;o<n;++o)i+=Gu(this.flatCoordinates,e,t[o],this.stride),e=t[o];return i}getFlatMidpoints(){let t=[],e=this.flatCoordinates,i=0,o=this.ends_,n=this.stride;for(let l=0,A=o.length;l<A;++l){let d=o[l],L=rc(e,i,d,n,.5);ar(t,L),i=d}return t}getSimplifiedGeometryInternal(t){let e=[],i=[];return e.length=xC(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,i),new r(e,"XY",i)}getType(){return"MultiLineString"}intersectsExtent(t){return yz(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);let i=Ns(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}},ju=zx;var Dx=class r extends K8{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){let t=new r(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,o){let n=this.flatCoordinates,l=T4(t,e,n[0],n[1]);if(l<o){let A=this.stride;for(let d=0;d<A;++d)i[d]=n[d];return i.length=A,l}return o}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(t){return tC(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return wd(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=vC(this.flatCoordinates,0,t,this.stride),this.changed()}},Ki=Dx;var kx=class r extends K8{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){ar(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){let t=new r(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,o){if(o<z7(this.getExtent(),t,e))return o;let n=this.flatCoordinates,l=this.stride;for(let A=0,d=n.length;A<d;A+=l){let L=T4(t,e,n[A],n[A+1]);if(L<o){o=L;for(let C=0;C<l;++C)i[C]=n[A+C];i.length=l}}return o}getCoordinates(){return Qn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){let e=this.flatCoordinates.length/this.stride;return t<0||e<=t?null:new Ki(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){let t=this.flatCoordinates,e=this.layout,i=this.stride,o=[];for(let n=0,l=t.length;n<l;n+=i){let A=new Ki(t.slice(n,n+i),e);o.push(A)}return o}getType(){return"MultiPoint"}intersectsExtent(t){let e=this.flatCoordinates,i=this.stride;for(let o=0,n=e.length;o<n;o+=i){let l=e[o],A=e[o+1];if(wd(t,l,A))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=tc(this.flatCoordinates,0,t,this.stride),this.changed()}},Bo=kx;function Dd(r,t,e,i,o,n,l){let A,d,L,C,y,E,B,Z=o[n+1],Q=[];for(let J=0,n1=e.length;J<n1;++J){let r1=e[J];for(C=r[r1-i],E=r[r1-i+1],A=t;A<r1;A+=i)y=r[A],B=r[A+1],(Z<=E&&B<=Z||E<=Z&&Z<=B)&&(L=(Z-E)/(B-E)*(y-C)+C,Q.push(L)),C=y,E=B}let V=NaN,G=-1/0;for(Q.sort(E4),C=Q[0],A=1,d=Q.length;A<d;++A){y=Q[A];let J=Math.abs(y-C);J>G&&(L=(C+y)/2,Rd(r,t,e,i,L,Z)&&(V=L,G=J)),C=y}return isNaN(V)&&(V=o[n]),l?(l.push(V,Z,G),l):[V,Z,G]}function MC(r,t,e,i,o){let n=[];for(let l=0,A=e.length;l<A;++l){let d=e[l];n=Dd(r,t,d,i,o,2*l,n),t=d[d.length-1]}return n}function xz(r,t,e,i){for(;t<e-i;){for(let o=0;o<i;++o){let n=r[t+o];r[t+o]=r[e-i+o],r[e-i+o]=n}t+=i,e-=i}}function Ox(r,t,e,i){let o=0,n=r[e-i],l=r[e-i+1];for(;t<e;t+=i){let A=r[t],d=r[t+1];o+=(A-n)*(d+l),n=A,l=d}return o===0?void 0:o>0}function kd(r,t,e,i,o){o=o!==void 0?o:!1;for(let n=0,l=e.length;n<l;++n){let A=e[n],d=Ox(r,t,A,i);if(n===0){if(o&&d||!o&&!d)return!1}else if(o&&!d||!o&&d)return!1;t=A}return!0}function BC(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n){let A=e[n];if(!kd(r,t,A,i,o))return!1;A.length&&(t=A[A.length-1])}return!0}function qu(r,t,e,i,o){o=o!==void 0?o:!1;for(let n=0,l=e.length;n<l;++n){let A=e[n],d=Ox(r,t,A,i);(n===0?o&&d||!o&&!d:o&&!d||!o&&d)&&xz(r,t,A,i),t=A}return t}function Od(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n)t=qu(r,t,e[n],i,o);return t}function wz(r,t){let e=[],i=0,o=0,n;for(let l=0,A=t.length;l<A;++l){let d=t[l],L=Ox(r,i,d,2);if(n===void 0&&(n=L),L===n)e.push(t.slice(o,l+1));else{if(e.length===0)continue;e[e.length-1].push(t[o])}o=l+1,i=d}return e}var Ku=class r extends K8{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?ar(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){let t=new r(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,o){return o<z7(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ed(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Id(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,o))}containsXY(t,e){return Rd(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Tx(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),qu(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Us(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){let t=k7(this.getExtent());this.flatInteriorPoint_=Dd(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Ki(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Fx(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){let t=this.layout,e=this.flatCoordinates,i=this.ends_,o=[],n=0;for(let l=0,A=i.length;l<A;++l){let d=i[l],L=new Fx(e.slice(n,d),t);o.push(L),n=d}return o}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){let t=this.flatCoordinates;kd(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=qu(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){let e=[],i=[];return e.length=Pd(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new r(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return Px(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);let i=Ns(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}},z4=Ku;function bz(r,t,e,i){e=e||32;let o=[];for(let n=0;n<e;++n)ar(o,YR(r,t,2*Math.PI*n/e,i));return o.push(o[0],o[1]),new Ku(o,"XY",[o.length])}function Zx(r){if(ba(r))throw new Error("Cannot create polygon from empty extent");let t=r[0],e=r[1],i=r[2],o=r[3],n=[t,e,t,o,i,o,i,e,t,e];return new Ku(n,"XY",[n.length])}function Mz(r,t,e){t=t||32;let i=r.getStride(),o=r.getLayout(),n=r.getCenter(),l=i*(t+1),A=new Array(l);for(let C=0;C<l;C+=i){A[C]=0,A[C+1]=0;for(let y=2;y<i;y++)A[C+y]=n[y]}let d=[A.length],L=new Ku(A,o,d);return OJ(L,n,r.getRadius(),e),L}function OJ(r,t,e,i){let o=r.getFlatCoordinates(),n=r.getStride(),l=o.length/n-1,A=i||0;for(let d=0;d<=l;++d){let L=d*n,C=A+ql(d,l)*2*Math.PI/l;o[L]=t[0]+e*Math.cos(C),o[L+1]=t[1]+e*Math.sin(C)}r.changed()}function SC(r,t,e,i){let o=[],n=D7();for(let l=0,A=e.length;l<A;++l){let d=e[l];n=Ru(r,t,d[0],i),o.push((n[0]+n[2])/2,(n[1]+n[3])/2),t=d[d.length-1]}return o}var Nx=class r extends K8{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){let o=t,n=[],l=[];for(let A=0,d=o.length;A<d;++A){let L=o[A],C=n.length,y=L.getEnds();for(let E=0,B=y.length;E<B;++E)y[E]+=C;ar(n,L.getFlatCoordinates()),l.push(y)}e=o.length===0?this.getLayout():o[0].getLayout(),t=n,i=l}e!==void 0&&i?(this.setFlatCoordinates(e,t),this.endss_=i):this.setCoordinates(t,e)}appendPolygon(t){let e;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();else{let i=this.flatCoordinates.length;ar(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let o=0,n=e.length;o<n;++o)e[o]+=i}this.endss_.push(e),this.changed()}clone(){let t=this.endss_.length,e=new Array(t);for(let o=0;o<t;++o)e[o]=this.endss_[o].slice();let i=new r(this.flatCoordinates.slice(),this.layout,e);return i.applyProperties(this),i}closestPointXY(t,e,i,o){return o<z7(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(pz(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Lz(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,o))}containsXY(t,e){return vz(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return dz(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Od(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,Fd(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){let t=SC(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=MC(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Bo(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){let t=this.flatCoordinates;BC(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Od(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){let e=[],i=[];return e.length=Cz(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,i),new r(e,"XY",i)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{let n=this.endss_[t-1];e=n[n.length-1]}let i=this.endss_[t].slice(),o=i[i.length-1];if(e!==0)for(let n=0,l=i.length;n<l;++n)i[n]-=e;return new z4(this.flatCoordinates.slice(e,o),this.layout,i)}getPolygons(){let t=this.layout,e=this.flatCoordinates,i=this.endss_,o=[],n=0;for(let l=0,A=i.length;l<A;++l){let d=i[l].slice(),L=d[d.length-1];if(n!==0)for(let y=0,E=d.length;y<E;++y)d[y]-=n;let C=new z4(e.slice(n,L),t,d);o.push(C),n=L}return o}getType(){return"MultiPolygon"}intersectsExtent(t){return _z(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);let i=yC(this.flatCoordinates,0,t,this.stride,this.endss_);if(i.length===0)this.flatCoordinates.length=0;else{let o=i[i.length-1];this.flatCoordinates.length=o.length===0?0:o[o.length-1]}this.changed()}},Zd=Nx;var ZJ=(r,t,e)=>{var i;let{coordinate:o,olGeometry:n,time_intervals:l}=t.properties,{coordinates:A,type:d}=t.geometry,L=n,C,y;if(L&&(d=L.getType(),A=(i=L.getCoordinates())!==null&&i!==void 0?i:[]),e&&o)C=o;else if(d==="Point")C=A;else if(d==="LineString"){L||(L=new R4(A));let E=l||[[]],B=E[0],Z=E[E.length-1];if(r<B[0])[,,y]=B,C=L.getFirstCoordinate();else if(r>Z[0])[,,y]=Z,C=L.getLastCoordinate();else for(let Q=0;Q<E.length-1;Q+=1){let[V,G]=E[Q],[J,n1]=E[Q+1];if(V<=r&&r<=J){let m1=Math.min((r-V)/(J-V),1)*(n1-G)+G;C=L?.getCoordinateAt(m1),[,,y]=E[Q];break}}}else console.error("This geometry type is not supported. Only Point or LineString are. Current geometry: ",L);return{coord:C,rotation:y}},Nd=ZJ;var Ux=class r extends P0{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){let e=t;this.setGeometry(e)}else{let e=t;this.setProperties(e)}}clone(){let t=new r(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());let e=this.getGeometry();e&&t.setGeometry(e.clone());let i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(f3(this.geometryChangeKey_),this.geometryChangeKey_=null);let t=this.getGeometry();t&&(this.geometryChangeKey_=ir(t,l5.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?NJ(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}};function NJ(r){if(typeof r=="function")return r;let t;return Array.isArray(r)?t=r:(o3(typeof r.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),t=[r]),function(){return t}}var D4=Ux;var Bz=e8(),Ud=class r{constructor(t,e,i,o,n,l){this.styleFunction,this.extent_,this.id_=l,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=n,this.squaredTolerance_,this.stride_=o,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?tC(this.flatCoordinates_):Ru(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){let t=k7(this.getExtent());this.flatInteriorPoints_=Dd(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){let t=wz(this.flatCoordinates_,this.ends_),e=SC(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=MC(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=rc(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];let t=this.flatCoordinates_,e=0,i=this.ends_;for(let o=0,n=i.length;o<n;++o){let l=i[o],A=rc(t,e,l,2,.5);ar(this.flatMidpoints_,A),e=l}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=p3(t);let e=t.getExtent(),i=t.getWorldExtent();if(e&&i){let o=n7(i)/n7(e);Ci(Bz,i[0],i[3],o,-o,0,0,0),O7(this.flatCoordinates_,0,this.flatCoordinates_.length,2,Bz,this.flatCoordinates_)}}applyTransform(t){t(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new r(this.type_,this.flatCoordinates_.slice(),this.ends_?.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=nC((t,e)=>{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);let i=this.simplifiedGeometry_.getFlatCoordinates(),o;switch(this.type_){case"LineString":i.length=ec(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),o=[i.length];break;case"MultiLineString":o=[],i.length=xC(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,o);break;case"Polygon":o=[],i.length=Pd(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,o);break;default:}return o&&(this.simplifiedGeometry_=new r(this.type_,i,o,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}};Ud.prototype.getFlatCoordinates=Ud.prototype.getOrientedFlatCoordinates;var k4=Ud;var Qx=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=D4,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let i=e.dataProjection?p3(e.dataProjection):this.readProjection(t);e.extent&&i&&i.getUnits()==="tile-pixels"&&(i=p3(i),i.setWorldExtent(e.extent)),e={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return h5()}readFeature(t,e){return h5()}readFeatures(t,e){return h5()}readGeometry(t,e){return h5()}readProjection(t){return h5()}writeFeature(t,e){return h5()}writeFeatures(t,e){return h5()}writeGeometry(t,e){return h5()}},EC=Qx;function ic(r,t,e){let i=e?p3(e.featureProjection):null,o=e?p3(e.dataProjection):null,n=r;if(i&&o&&!ez(i,o)){t&&(n=r.clone());let l=t?i:o,A=t?o:i;l.getUnits()==="tile-pixels"?n.transform(l,A):n.applyTransform(Xl(l,A))}if(t&&e&&e.decimals!==void 0){let l=Math.pow(10,e.decimals),A=function(d){for(let L=0,C=d.length;L<C;++L)d[L]=Math.round(d[L]*l)/l;return d};n===r&&(n=r.clone()),n.applyTransform(A)}return n}var UJ={Point:Ki,LineString:R4,Polygon:z4,MultiPoint:Bo,MultiLineString:ju,MultiPolygon:Zd};function QJ(r,t,e){return Array.isArray(t[0])?(BC(r,0,t,e)||(r=r.slice(),Od(r,0,t,e)),r):(kd(r,0,t,e)||(r=r.slice(),qu(r,0,t,e)),r)}function Hx(r,t){let e=r.geometry;if(!e)return[];if(Array.isArray(e))return e.map(n=>Hx({...r,geometry:n})).flat();let i=e.type==="MultiPolygon"?"Polygon":e.type;if(i==="GeometryCollection"||i==="Circle")throw new Error("Unsupported geometry type: "+i);let o=e.layout.length;return ic(new k4(i,i==="Polygon"?QJ(e.flatCoordinates,e.ends,o):e.flatCoordinates,e.ends?.flat(),o,r.properties||{},r.id).enableSimplifyTransformed(),!1,t)}function TC(r,t){if(!r)return null;if(Array.isArray(r)){let i=r.map(o=>TC(o,t));return new dn(i)}let e=UJ[r.type];return ic(new e(r.flatCoordinates,r.layout||"XY",r.ends),!1,t)}var Vx=class extends EC{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(IC(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(IC(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return h5()}readFeaturesFromObject(t,e){return h5()}readGeometry(t,e){return this.readGeometryFromObject(IC(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return h5()}readProjection(t){return this.readProjectionFromObject(IC(t))}readProjectionFromObject(t){return h5()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return h5()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return h5()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return h5()}};function IC(r){if(typeof r=="string"){let t=JSON.parse(r);return t||null}return r!==null?r:null}var Sz=Vx;var Gx=class extends Sz{constructor(t){t=t||{},super(),this.dataProjection=p3(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=p3(t.featureProjection)),t.featureClass&&(this.featureClass=t.featureClass),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let i=null;t.type==="Feature"?i=t:i={type:"Feature",geometry:t,properties:null};let o=qx(i.geometry,e);if(this.featureClass===k4)return Hx({geometry:o,id:i.id,properties:i.properties},e);let n=new D4;return this.geometryName_?n.setGeometryName(this.geometryName_):this.extractGeometryName_&&i.geometry_name&&n.setGeometryName(i.geometry_name),n.setGeometry(TC(o,e)),"id"in i&&n.setId(i.id),i.properties&&n.setProperties(i.properties,!0),n}readFeaturesFromObject(t,e){let i=t,o=null;if(i.type==="FeatureCollection"){let n=t;o=[];let l=n.features;for(let A=0,d=l.length;A<d;++A){let L=this.readFeatureFromObject(l[A],e);L&&o.push(L)}}else o=[this.readFeatureFromObject(t,e)];return o.flat()}readGeometryFromObject(t,e){return HJ(t,e)}readProjectionFromObject(t){let e=t.crs,i;if(e)if(e.type=="name")i=p3(e.properties.name);else if(e.type==="EPSG")i=p3("EPSG:"+e.properties.code);else throw new Error("Unknown SRS type");else i=this.dataProjection;return i}writeFeatureObject(t,e){e=this.adaptOptions(e);let i={type:"Feature",geometry:null,properties:null},o=t.getId();if(o!==void 0&&(i.id=o),!t.hasProperties())return i;let n=t.getProperties(),l=t.getGeometry();return l&&(i.geometry=jx(l,e),delete n[t.getGeometryName()]),An(n)||(i.properties=n),i}writeFeaturesObject(t,e){e=this.adaptOptions(e);let i=[];for(let o=0,n=t.length;o<n;++o)i.push(this.writeFeatureObject(t[o],e));return{type:"FeatureCollection",features:i}}writeGeometryObject(t,e){return jx(t,this.adaptOptions(e))}};function qx(r,t){if(!r)return null;let e;switch(r.type){case"Point":{e=GJ(r);break}case"LineString":{e=jJ(r);break}case"Polygon":{e=$J(r);break}case"MultiPoint":{e=KJ(r);break}case"MultiLineString":{e=qJ(r);break}case"MultiPolygon":{e=WJ(r);break}case"GeometryCollection":{e=VJ(r);break}default:throw new Error("Unsupported GeoJSON type: "+r.type)}return e}function HJ(r,t){let e=qx(r,t);return TC(e,t)}function VJ(r,t){return r.geometries.map(function(i){return qx(i,t)})}function GJ(r){let t=r.coordinates;return{type:"Point",flatCoordinates:t,layout:Zs(t.length)}}function jJ(r){let t=r.coordinates,e=t.flat();return{type:"LineString",flatCoordinates:e,ends:[e.length],layout:Zs(t[0]?.length||2)}}function qJ(r){let t=r.coordinates,e=t[0]?.[0]?.length||2,i=[],o=Ns(i,0,t,e);return{type:"MultiLineString",flatCoordinates:i,ends:o,layout:Zs(e)}}function KJ(r){let t=r.coordinates;return{type:"MultiPoint",flatCoordinates:t.flat(),layout:Zs(t[0]?.length||2)}}function WJ(r){let t=r.coordinates,e=[],i=t[0]?.[0]?.[0].length||2,o=yC(e,0,t,i);return{type:"MultiPolygon",flatCoordinates:e,ends:o,layout:Zs(i)}}function $J(r){let t=r.coordinates,e=[],i=t[0]?.[0]?.length,o=Ns(e,0,t,i);return{type:"Polygon",flatCoordinates:e,ends:o,layout:Zs(i)}}function jx(r,t){r=ic(r,!0,t);let e=r.getType(),i;switch(e){case"Point":{i=r11(r,t);break}case"LineString":{i=YJ(r,t);break}case"Polygon":{i=i11(r,t);break}case"MultiPoint":{i=t11(r,t);break}case"MultiLineString":{i=JJ(r,t);break}case"MultiPolygon":{i=e11(r,t);break}case"GeometryCollection":{i=XJ(r,t);break}case"Circle":{i={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return i}function XJ(r,t){return t=Object.assign({},t),delete t.featureProjection,{type:"GeometryCollection",geometries:r.getGeometriesArray().map(function(i){return jx(i,t)})}}function YJ(r,t){return{type:"LineString",coordinates:r.getCoordinates()}}function JJ(r,t){return{type:"MultiLineString",coordinates:r.getCoordinates()}}function t11(r,t){return{type:"MultiPoint",coordinates:r.getCoordinates()}}function e11(r,t){let e;return t&&(e=t.rightHanded),{type:"MultiPolygon",coordinates:r.getCoordinates(e)}}function r11(r,t){return{type:"Point",coordinates:r.getCoordinates()}}function i11(r,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:r.getCoordinates(e)}}var h0=Gx;var Wi=[];for(let r=0;r<256;++r)Wi.push((r+256).toString(16).slice(1));function Ez(r,t=0){return(Wi[r[t+0]]+Wi[r[t+1]]+Wi[r[t+2]]+Wi[r[t+3]]+"-"+Wi[r[t+4]]+Wi[r[t+5]]+"-"+Wi[r[t+6]]+Wi[r[t+7]]+"-"+Wi[r[t+8]]+Wi[r[t+9]]+"-"+Wi[r[t+10]]+Wi[r[t+11]]+Wi[r[t+12]]+Wi[r[t+13]]+Wi[r[t+14]]+Wi[r[t+15]]).toLowerCase()}var Kx,n11=new Uint8Array(16);function Wx(){if(!Kx){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Kx=crypto.getRandomValues.bind(crypto)}return Kx(n11)}var o11=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$x={randomUUID:o11};function a11(r,t,e){r=r||{};let i=r.random??r.rng?.()??Wx();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){if(e=e||0,e<0||e+16>t.length)throw new RangeError(`UUID byte range ${e}:${e+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[e+o]=i[o];return t}return Ez(i)}function s11(r,t,e){return $x.randomUUID&&!t&&!r?$x.randomUUID():a11(r,t,e)}var Qd=s11;var Xx=r=>parseInt(r?.substr(0,8).replace(/:/g,""),10),Yx=new h0,Iz=(r,t=new Date)=>{var e;return!!(!((e=r.affectedTimeIntervals)===null||e===void 0)&&e.some(i=>{let{dailyEndTime:o="",dailyStartTime:n="",endTime:l,startTime:A}=i,d=Xx(t.toTimeString()),L=Xx(n),C=Xx(o),y=new Date(A)<=t&&t<=new Date(l);return L&&C?y&&L<=d&&d<=C:y}))},l11=(r,t=new Date)=>{var e,i,o;let n=(o=(e=r.publicationWindows)!==null&&e!==void 0?e:(i=r.publications)===null||i===void 0?void 0:i.flatMap(l=>{var A;return(A=l.publicationWindows)!==null&&A!==void 0?A:[]}))!==null&&o!==void 0?o:[];return n.length?!!n.some(({endTime:l,startTime:A})=>new Date(A)<=t&&t<=new Date(l)):!!Iz(r,t)},c11=r=>{let t=Yx.readGeometry(r.geometry),e=k7(t.getExtent());return{geometry:{coordinates:t.getClosestPoint(e),type:"Point"},id:Qd(),properties:Object.assign(Object.assign({},r.properties),{geometry:void 0}),type:"Feature"}},Tz=r=>Yx.writeGeometryObject(Yx.readGeometry(r,{dataProjection:"EPSG:3857",featureProjection:"EPSG:4326"})),u11=(r="undefiniert")=>r.toLowerCase().replace(/\s/g,"_").replace(/ü/g,"ue").replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ß/g,"ss"),Fz=(r,t=new Date)=>{var e,i,o;let n=[],l=u11((i=(e=r.reasons)===null||e===void 0?void 0:e[0])===null||i===void 0?void 0:i.categoryName),A={reasonCategoryImageName:l,reasons:r.reasons,reasons_category:l};return(o=r?.publications)===null||o===void 0||o.forEach(d=>{var L,C,y;let E=Iz(r,t),B=l11(r,t),Z={condition_group:d.serviceConditionGroup.toLowerCase(),isActive:E,isAffected:E,isPublished:B,serviceConditionGroup:d.serviceConditionGroup,severity_group:(L=d.severityGroup)===null||L===void 0?void 0:L.toLocaleLowerCase(),severityGroup:d.severityGroup};(C=d.publicationLines)===null||C===void 0||C.forEach(Q=>{Q.lines.forEach(V=>{V.geometry.forEach(({geom:G,graph:J})=>{let n1={geometry:Tz(G),id:Qd(),properties:Object.assign(Object.assign(Object.assign(Object.assign({graph:J,hasIcon:Q.hasIcon,line:V,publication:d,publicationLine:Q,situation:r},d),A),Z),{geometry:void 0}),type:"Feature"};if(n.push(n1),Q.hasIcon){let r1=c11(n1);r1.properties.situation=r,n.push(r1)}})})}),(y=d.publicationStops)===null||y===void 0||y.forEach(Q=>{Q.geometry.forEach(({geom:V,graph:G})=>{let J={geometry:Tz(V),id:Qd(),properties:Object.assign(Object.assign(Object.assign({graph:G,name:Q.name,publication:d,publicationStop:Q,situation:r},A),Z),{geometry:void 0}),type:"Feature"};n.push(J)})})}),{features:n,type:"FeatureCollection"}};var So={};__(So,{MOTS_ALL:()=>d11,MOTS_ONLY_RAIL:()=>O4,MOTS_WITHOUT_CABLE:()=>FC,MOTS_WITH_CABLE:()=>A11,bgColors:()=>Rz,getBgColor:()=>p11,getDelayColor:()=>g11,getDelayText:()=>m11,getRadius:()=>f11,getTextColor:()=>L11,getTextSize:()=>C11,getTypeIndex:()=>PC,textColors:()=>zz,types:()=>Pz});var h11=[[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,2,2,3,7,7,7,12,15,15,15,15,15],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,2,2,3,7,7,7,12,15,15,15,15,15]],O4=["rail"],A11=["cablecar","gondola","funicular","coach"],FC=["tram","subway","rail","bus"],d11=["tram","subway","rail","bus","ferry","cablecar","gondola","funicular","coach"],Pz=[/^Tram/i,/^Subway( \/ Metro \/ S-Bahn)?/i,/^Train/i,/^Bus/i,/^Ferry/i,/^Cable ?Car/i,/^Gondola/i,/^Funicular/i,/^(Long distance bus|coach)/i,/^Rail/i],Rz=["#ffb400","#ff5400","#ff8080","#ea0000","#3000ff","#ffb400","#41a27b","#00d237","#b5b5b5","#ff8080"],zz=["#000000","#ffffff","#000000","#ffffff","#ffffff","#000000","#ffffff","#000000","#000000","#000000"],PC=r=>typeof r=="string"?Pz.findIndex(t=>t.test(r)):r,f11=(r,t)=>{try{let e=PC(r||0);return h11[e][t]}catch{return 1}},p11=(r,t)=>{try{let e=PC(r);return Rz[e]}catch{return"#ffffff"}},L11=r=>{try{let t=PC(r);return zz[t]}catch{return"#ffffff"}},C11=(r,t,e,i,o)=>{if(!r)return 0;r.font=o(i,e);let n=r.measureText(e),l=25,A=0;for(;n.width>t-6&&A<l;)i-=.5,r.font=o(i,e),n=r.measureText(e),A+=1;return i},g11=(r,t,e)=>t?e?"#ff0000":"#a0a0a0":r===null?"#a0a0a0":r>=36e5?"#ed004c":r>=5e5?"#e80000":r>=3e5?"#ff4a00":r>=18e4?"#f7bf00":"#00a00c",m11=(r,t)=>t?String.fromCodePoint(215):r>=36e5?`+${Math.round(r/36e5)}h`:r>=6e4?`+${Math.round(r/6e4)}m`:r>=1e3?`+${Math.round(r/1e3)}s`:r>0?`+${r}ms`:"";var v11=(r,t,e,i,o)=>{if(!r)return{renderedTrajectories:[]};let{center:n,pixelRatio:l=1,resolution:A,rotation:d=0,size:L=[],time:C=Date.now()}=i;if(!A||!n)return{renderedTrajectories:[]};let{filter:y,getScreenPixel:E=(L1,z1)=>(z1.zoom||0)<12?L1.map(s1=>Math.floor(s1)):L1,hoverVehicleId:B,noInterpolate:Z=!1,selectedVehicleId:Q}=o,V=r.getContext("2d");V?.clearRect(0,0,r.width,r.height);let[G,J]=L;G&&J&&(r.width!==G*l||r.height!==J*l)&&([r.width,r.height]=[G*l,J*l]);let n1=Ci(e8(),L[0]/2,L[1]/2,1/A,-1/A,-d,-n[0],-n[1]);r.style&&(r.style.width=`${r.width/l}px`,r.style.height=`${r.height/l}px`);let r1,m1,w1,B1,g1=[];for(let L1=t.length-1;L1>=0;L1-=1){let z1=t[L1];if(y&&!y(z1))continue;let{timeOffset:s1,train_id:x1}=z1.properties,{coord:N1,rotation:V1}=Nd(C-(s1||0),z1,Z);if(t[L1].properties.coordinate=N1,t[L1].properties.rotation=V1,!N1)continue;let l2=M8(n1,[...N1]);if(!l2||(l2=l2.map(o2=>o2*l),l2[0]<0||l2[0]>r.width||l2[1]<0||l2[1]>r.height))continue;let p2=e(z1,i,o);if(p2){if(B!==x1&&Q!==x1){let[o2,G1]=E([l2[0]-p2.width/2,l2[1]-p2.height/2],i);V?.drawImage(p2,o2,G1)}B&&B===x1&&(r1=p2,m1=l2),Q&&Q===x1&&(w1=p2,B1=l2),g1.push(z1)}}return w1&&B1&&V?.drawImage(w1,Math.floor(B1[0]-w1.width/2),Math.floor(B1[1]-w1.height/2)),r1&&m1&&V?.drawImage(r1,Math.floor(m1[0]-r1.width/2),Math.floor(m1[1]-r1.height/2)),{renderedTrajectories:g1}},Dz=v11;var Eo={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"};var Jx=class extends P0{constructor(t){super();let e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&this.element?.remove();for(let e=0,i=this.listenerKeys.length;e<i;++e)f3(this.listenerKeys[e]);if(this.listenerKeys.length=0,this.map_=t,t){let e=this.target_??t.getOverlayContainerStopEvent();this.element&&e.appendChild(this.element),this.render!==Sa&&this.listenerKeys.push(ir(t,Eo.POSTRENDER,this.render,this)),t.render()}}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}},fn=Jx;var W8={ANIMATING:0,INTERACTING:1};var Hn={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function tw(r,t,e){return(function(i,o,n,l,A){if(!i)return;if(!o&&!t)return i;let d=t?0:n[0]*o,L=t?0:n[1]*o,C=A?A[0]:0,y=A?A[1]:0,E=r[0]+d/2+C,B=r[2]-d/2+C,Z=r[1]+L/2+y,Q=r[3]-L/2+y;E>B&&(E=(B+E)/2,B=E),Z>Q&&(Z=(Q+Z)/2,Q=Z);let V=n6(i[0],E,B),G=n6(i[1],Z,Q);if(l&&e&&o){let J=30*o;V+=-J*Math.log(1+Math.max(0,E-i[0])/J)+J*Math.log(1+Math.max(0,i[0]-B)/J),G+=-J*Math.log(1+Math.max(0,Z-i[1])/J)+J*Math.log(1+Math.max(0,i[1]-Q)/J)}return[V,G]})}function kz(r){return r}function y11(r){return Math.pow(r,3)}function Vn(r){return 1-y11(1-r)}function Oz(r){return 3*r*r-2*r*r*r}function RC(r){return r}function ew(r,t,e,i){let o=F0(t)/e[0],n=n7(t)/e[1];return i?Math.min(r,Math.max(o,n)):Math.min(r,Math.min(o,n))}function rw(r,t,e){let i=Math.min(r,t),o=50;return i*=Math.log(1+o*Math.max(0,r/t-1))/o+1,e&&(i=Math.max(i,e),i/=Math.log(1+o*Math.max(0,e/r-1))/o+1),n6(i,e/2,t*2)}function Zz(r,t,e,i){return t=t!==void 0?t:!0,(function(o,n,l,A){if(o!==void 0){let d=r[0],L=r[r.length-1],C=e?ew(d,e,l,i):d;if(A)return t?rw(o,C,L):n6(o,L,C);let y=Math.min(C,o),E=Math.floor(iC(r,y,n));return r[E]>C&&E<r.length-1?r[E+1]:r[E]}})}function Nz(r,t,e,i,o,n){return i=i!==void 0?i:!0,e=e!==void 0?e:0,(function(l,A,d,L){if(l!==void 0){let C=o?ew(t,o,d,n):t;if(L)return i?rw(l,C,e):n6(l,e,C);let y=1e-9,E=Math.ceil(Math.log(t/C)/Math.log(r)-y),B=-A*(.5-y)+.5,Z=Math.min(C,l),Q=Math.floor(Math.log(t/Z)/Math.log(r)+B),V=Math.max(E,Q),G=t/Math.pow(r,V);return n6(G,e,C)}})}function iw(r,t,e,i,o){return e=e!==void 0?e:!0,(function(n,l,A,d){if(n!==void 0){let L=i?ew(r,i,A,o):r;return!e||!d?n6(n,t,L):rw(n,L,t)}})}function Wu(r){if(r!==void 0)return 0}function nw(r){if(r!==void 0)return r}function Uz(r){let t=2*Math.PI/r;return(function(e,i){if(i)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e})}function Qz(r){let t=r===void 0?ji(5):r;return(function(e,i){return i||e===void 0?e:Math.abs(e)<=t?0:e})}var ow=0,sw=class extends P0{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=CC(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&yx(),t.center&&(t.center=P4(t.center,this.projection_)),t.extent&&(t.extent=Os(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){let e=Object.assign({},t);for(let A in Hn)delete e[A];this.setProperties(e,!0);let i=x11(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;let o=_11(t),n=i.constraint,l=w11(t);this.constraints_={center:o,resolution:n,rotation:l},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;let i=this.getCenterInternal();if(i){let o=t||[0,0,0,0];e=e||[0,0,0,0];let n=this.getResolution(),l=n/2*(o[3]-e[3]+e[1]-o[1]),A=n/2*(o[0]-e[0]+e[2]-o[2]);this.setCenterInternal([i[0]+l,i[1]-A])}}getUpdatedOptions_(t){let e=this.getProperties();return e.resolution!==void 0?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);let e=new Array(arguments.length);for(let i=0;i<e.length;++i){let o=arguments[i];o.center&&(o=Object.assign({},o),o.center=P4(o.center,this.getProjection())),o.anchor&&(o=Object.assign({},o),o.anchor=P4(o.anchor,this.getProjection())),e[i]=o}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,i;e>1&&typeof arguments[e-1]=="function"&&(i=arguments[e-1],--e);let o=0;for(;o<e&&!this.isDef();++o){let C=arguments[o];C.center&&this.setCenterInternal(C.center),C.zoom!==void 0?this.setZoom(C.zoom):C.resolution&&this.setResolution(C.resolution),C.rotation!==void 0&&this.setRotation(C.rotation)}if(o===e){i&&zC(i,!0);return}let n=Date.now(),l=this.targetCenter_.slice(),A=this.targetResolution_,d=this.targetRotation_,L=[];for(;o<e;++o){let C=arguments[o],y={start:n,complete:!1,anchor:C.anchor,duration:C.duration!==void 0?C.duration:1e3,easing:C.easing||Oz,callback:i};if(C.center&&(y.sourceCenter=l,y.targetCenter=C.center.slice(),l=y.targetCenter),C.zoom!==void 0?(y.sourceResolution=A,y.targetResolution=this.getResolutionForZoom(C.zoom),A=y.targetResolution):C.resolution&&(y.sourceResolution=A,y.targetResolution=C.resolution,A=y.targetResolution),C.rotation!==void 0){y.sourceRotation=d;let E=ql(C.rotation-d+Math.PI,2*Math.PI)-Math.PI;y.targetRotation=d+E,d=y.targetRotation}b11(y)?y.complete=!0:n+=y.duration,L.push(y)}this.animations_.push(L),this.setHint(W8.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[W8.ANIMATING]>0}getInteracting(){return this.hints_[W8.INTERACTING]>0}cancelAnimations(){this.setHint(W8.ANIMATING,-this.hints_[W8.ANIMATING]);let t;for(let e=0,i=this.animations_.length;e<i;++e){let o=this.animations_[e];if(o[0].callback&&zC(o[0].callback,!1),!t)for(let n=0,l=o.length;n<l;++n){let A=o[n];if(!A.complete){t=A.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;let t=Date.now(),e=!1;for(let i=this.animations_.length-1;i>=0;--i){let o=this.animations_[i],n=!0;for(let l=0,A=o.length;l<A;++l){let d=o[l];if(d.complete)continue;let L=t-d.start,C=d.duration>0?L/d.duration:1;C>=1?(d.complete=!0,C=1):n=!1;let y=d.easing(C);if(d.sourceCenter){let E=d.sourceCenter[0],B=d.sourceCenter[1],Z=d.targetCenter[0],Q=d.targetCenter[1];this.nextCenter_=d.targetCenter;let V=E+y*(Z-E),G=B+y*(Q-B);this.targetCenter_=[V,G]}if(d.sourceResolution&&d.targetResolution){let E=y===1?d.targetResolution:d.sourceResolution+y*(d.targetResolution-d.sourceResolution);if(d.anchor){let B=this.getViewportSize_(this.getRotation()),Z=this.constraints_.resolution(E,0,B,!0);this.targetCenter_=this.calculateCenterZoom(Z,d.anchor)}this.nextResolution_=d.targetResolution,this.targetResolution_=E,this.applyTargetState_(!0)}if(d.sourceRotation!==void 0&&d.targetRotation!==void 0){let E=y===1?ql(d.targetRotation+Math.PI,2*Math.PI)-Math.PI:d.sourceRotation+y*(d.targetRotation-d.sourceRotation);if(d.anchor){let B=this.constraints_.rotation(E,!0);this.targetCenter_=this.calculateCenterRotate(B,d.anchor)}this.nextRotation_=d.targetRotation,this.targetRotation_=E}if(this.applyTargetState_(!0),e=!0,!d.complete)break}if(n){this.animations_[i]=null,this.setHint(W8.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;let l=o[0].callback;l&&zC(l,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i,o=this.getCenterInternal();return o!==void 0&&(i=[o[0]-e[0],o[1]-e[1]],Ou(i,t-this.getRotation()),FR(i,e)),i}calculateCenterZoom(t,e){let i,o=this.getCenterInternal(),n=this.getResolution();if(o!==void 0&&n!==void 0){let l=e[0]-t*(e[0]-o[0])/n,A=e[1]-t*(e[1]-o[1])/n;i=[l,A]}return i}getViewportSize_(t){let e=this.viewportSize_;if(t){let i=e[0],o=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(o*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(o*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){let t=this.getCenterInternal();return t&&Bd(t,this.getProjection())}getCenterInternal(){return this.get(Hn.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){let e=this.calculateExtentInternal(t);return ks(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();let e=this.getCenterInternal();o3(e,"The view center is not defined");let i=this.getResolution();o3(i!==void 0,"The view resolution is not defined");let o=this.getRotation();return o3(o!==void 0,"The view rotation is not defined"),bd(e,i,o,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Hn.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Os(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();let i=F0(t)/e[0],o=n7(t)/e[1];return Math.max(i,o)}getResolutionForValueFunction(t){t=t||2;let e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,o=Math.log(e/i)/Math.log(t);return(function(n){return e/Math.pow(t,n*o)})}getRotation(){return this.get(Hn.ROTATION)}getValueForResolutionFunction(t){let e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),o=this.minResolution_,n=Math.log(i/o)/e;return(function(l){return Math.log(i/l)/e/n})}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t),i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){let t=this.getProjection(),e=this.getResolution(),i=this.getRotation(),o=this.getCenterInternal(),n=this.padding_;if(n){let l=this.getViewportSizeMinusPadding_();o=aw(o,this.getViewportSize_(),[l[0]/2+n[3],l[1]/2+n[0]],e,i)}return{center:o.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t,e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,i,o;if(this.resolutions_){let n=iC(this.resolutions_,t,1);e=n,i=this.resolutions_[n],n==this.resolutions_.length-1?o=2:o=i/this.resolutions_[n+1]}else i=this.maxResolution_,o=this.zoomFactor_;return e+Math.log(i/t)/Math.log(o)}getResolutionForZoom(t){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];let e=n6(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,n6(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(o3(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){o3(!ba(t),"Cannot fit empty extent provided as `geometry`");let o=Os(t,this.getProjection());i=Zx(o)}else if(t.getType()==="Circle"){let o=Os(t.getExtent(),this.getProjection());i=Zx(o),i.rotate(this.getRotation(),k7(o))}else{let o=Jl();o?i=t.clone().transform(o,this.getProjection()):i=t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){let e=this.getRotation(),i=Math.cos(e),o=Math.sin(-e),n=t.getFlatCoordinates(),l=t.getStride(),A=1/0,d=1/0,L=-1/0,C=-1/0;for(let y=0,E=n.length;y<E;y+=l){let B=n[y]*i-n[y+1]*o,Z=n[y]*o+n[y+1]*i;A=Math.min(A,B),d=Math.min(d,Z),L=Math.max(L,B),C=Math.max(C,Z)}return[A,d,L,C]}fitInternal(t,e){e=e||{};let i=e.size;i||(i=this.getViewportSizeMinusPadding_());let o=e.padding!==void 0?e.padding:[0,0,0,0],n=e.nearest!==void 0?e.nearest:!1,l;e.minResolution!==void 0?l=e.minResolution:e.maxZoom!==void 0?l=this.getResolutionForZoom(e.maxZoom):l=0;let A=this.rotatedExtentForGeometry(t),d=this.getResolutionForExtentInternal(A,[i[0]-o[1]-o[3],i[1]-o[0]-o[2]]);d=isNaN(d)?l:Math.max(d,l),d=this.getConstrainedResolution(d,n?0:1);let L=this.getRotation(),C=Math.sin(L),y=Math.cos(L),E=k7(A);E[0]+=(o[1]-o[3])/2*d,E[1]+=(o[0]-o[2])/2*d;let B=E[0]*y-E[1]*C,Z=E[1]*y+E[0]*C,Q=this.getConstrainedCenter([B,Z],d),V=e.callback?e.callback:Sa;e.duration!==void 0?this.animateInternal({resolution:d,center:Q,duration:e.duration,easing:e.easing},V):(this.targetResolution_=d,this.targetCenter_=Q,this.applyTargetState_(!1,!0),zC(V,!0))}centerOn(t,e,i){this.centerOnInternal(P4(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(aw(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,o){let n,l=this.padding_;if(l&&t){let A=this.getViewportSizeMinusPadding_(-i),d=aw(t,o,[A[0]/2+l[3],A[1]/2+l[0]],e,i);n=[t[0]-d[0],t[1]-d[1]]}return n}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){let e=Bd(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){let e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&P4(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){let i=this.getAnimating()||this.getInteracting(),o=this.getViewportSize_(this.getRotation()),n=this.constraints_.resolution(this.targetResolution_*t,0,o,i);e&&(this.targetCenter_=this.calculateCenterZoom(n,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=P4(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){let i=this.getAnimating()||this.getInteracting(),o=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(o,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&P4(t,this.getProjection()))}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){let i=this.getAnimating()||this.getInteracting()||e,o=this.constraints_.rotation(this.targetRotation_,i),n=this.getViewportSize_(o),l=this.constraints_.resolution(this.targetResolution_,0,n,i),A=this.constraints_.center(this.targetCenter_,l,n,i,this.calculateCenterShift(this.targetCenter_,l,o,n));this.get(Hn.ROTATION)!==o&&this.set(Hn.ROTATION,o),this.get(Hn.RESOLUTION)!==l&&(this.set(Hn.RESOLUTION,l),this.set("zoom",this.getZoom(),!0)),(!A||!this.get(Hn.CENTER)||!Kl(this.get(Hn.CENTER),A))&&this.set(Hn.CENTER,A),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=t!==void 0?t:200;let o=e||0,n=this.constraints_.rotation(this.targetRotation_),l=this.getViewportSize_(n),A=this.constraints_.resolution(this.targetResolution_,o,l),d=this.constraints_.center(this.targetCenter_,A,l,!1,this.calculateCenterShift(this.targetCenter_,A,n,l));if(t===0&&!this.cancelAnchor_){this.targetResolution_=A,this.targetRotation_=n,this.targetCenter_=d,this.applyTargetState_();return}i=i||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==A||this.getRotation()!==n||!this.getCenterInternal()||!Kl(this.getCenterInternal(),d))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:n,center:d,resolution:A,duration:t,easing:Vn,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(W8.INTERACTING,1)}endInteraction(t,e,i){i=i&&P4(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(W8.INTERACTING,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){let i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){let i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;let i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}};function zC(r,t){setTimeout(function(){r(t)},0)}function _11(r){if(r.extent!==void 0){let e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return tw(r.extent,r.constrainOnlyCenter,e)}let t=CC(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){let e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,tw(e,!1,!1)}return kz}function x11(r){let t,e,i,l=r.minZoom!==void 0?r.minZoom:ow,A=r.maxZoom!==void 0?r.maxZoom:28,d=r.zoomFactor!==void 0?r.zoomFactor:2,L=r.multiWorld!==void 0?r.multiWorld:!1,C=r.smoothResolutionConstraint!==void 0?r.smoothResolutionConstraint:!0,y=r.showFullExtent!==void 0?r.showFullExtent:!1,E=CC(r.projection,"EPSG:3857"),B=E.getExtent(),Z=r.constrainOnlyCenter,Q=r.extent;if(!L&&!Q&&E.isGlobal()&&(Z=!1,Q=B),r.resolutions!==void 0){let V=r.resolutions;e=V[l],i=V[A]!==void 0?V[A]:V[V.length-1],r.constrainResolution?t=Zz(V,C,!Z&&Q,y):t=iw(e,i,C,!Z&&Q,y)}else{let G=(B?Math.max(F0(B),n7(B)):360*Ea.degrees/E.getMetersPerUnit())/256/Math.pow(2,ow),J=G/Math.pow(2,28-ow);e=r.maxResolution,e!==void 0?l=0:e=G/Math.pow(d,l),i=r.minResolution,i===void 0&&(r.maxZoom!==void 0?r.maxResolution!==void 0?i=e/Math.pow(d,A):i=G/Math.pow(d,A):i=J),A=l+Math.floor(Math.log(e/i)/Math.log(d)),i=e/Math.pow(d,A-l),r.constrainResolution?t=Nz(d,e,i,C,!Z&&Q,y):t=iw(e,i,C,!Z&&Q,y)}return{constraint:t,maxResolution:e,minResolution:i,minZoom:l,zoomFactor:d}}function w11(r){if(r.enableRotation!==void 0?r.enableRotation:!0){let e=r.constrainRotation;return e===void 0||e===!0?Qz():e===!1?nw:typeof e=="number"?Uz(e):nw}return Wu}function b11(r){return!(r.sourceCenter&&r.targetCenter&&!Kl(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function aw(r,t,e,i,o){let n=Math.cos(-o),l=Math.sin(-o),A=r[0]*n-r[1]*l,d=r[1]*n+r[0]*l;A+=(t[0]/2-e[0])*i,d+=(e[1]-t[1]/2)*i,l=-l;let L=A*n-d*l,C=d*n+A*l;return[L,C]}var $i=sw;var Xi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};var w3={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};var lw=class extends P0{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;let e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[w3.OPACITY]=t.opacity!==void 0?t.opacity:1,o3(typeof e[w3.OPACITY]=="number","Layer opacity must be a number"),e[w3.VISIBLE]=t.visible!==void 0?t.visible:!0,e[w3.Z_INDEX]=t.zIndex,e[w3.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[w3.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[w3.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[w3.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){let e=this.state_||{layer:this,managed:t===void 0?!0:t},i=this.getZIndex();return e.opacity=n6(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=i===void 0&&!e.managed?1/0:i,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return h5()}getLayerStatesArray(t){return h5()}getExtent(){return this.get(w3.EXTENT)}getMaxResolution(){return this.get(w3.MAX_RESOLUTION)}getMinResolution(){return this.get(w3.MIN_RESOLUTION)}getMinZoom(){return this.get(w3.MIN_ZOOM)}getMaxZoom(){return this.get(w3.MAX_ZOOM)}getOpacity(){return this.get(w3.OPACITY)}getSourceState(){return h5()}getVisible(){return this.get(w3.VISIBLE)}getZIndex(){return this.get(w3.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(w3.EXTENT,t)}setMaxResolution(t){this.set(w3.MAX_RESOLUTION,t)}setMinResolution(t){this.set(w3.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(w3.MAX_ZOOM,t)}setMinZoom(t){this.set(w3.MIN_ZOOM,t)}setOpacity(t){o3(typeof t=="number","Layer opacity must be a number"),this.set(w3.OPACITY,t)}setVisible(t){this.set(w3.VISIBLE,t)}setZIndex(t){this.set(w3.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},DC=lw;var cw=class extends DC{constructor(t){let e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(w3.SOURCE,this.handleSourcePropertyChange_);let i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(w3.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){let t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(f3(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;let t=this.getSource();t&&(this.sourceChangeKey_=ir(t,l5.CHANGE,this.handleSourceChange_,this),t.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e,i=this.getMapInternal();!t&&i&&(t=i.getView()),t instanceof $i?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let o;if(e.layerStatesArray){if(o=e.layerStatesArray.find(l=>l.layer===this),!o)return!1}else o=this.getLayerState();let n=this.getExtent();return nc(o,e.viewState)&&(!n||u0(n,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e=this.getSource()?.getAttributions();if(!e)return[];let i=t instanceof $i?t.getViewStateAndExtent():t,o=e(i);return Array.isArray(o)||(o=[o]),o}render(t,e){let i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){let e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(w3.MAP,t)}getMapInternal(){return this.get(w3.MAP)}setMap(t){this.mapPrecomposeKey_&&(f3(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(f3(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=ir(t,Xi.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=ir(this,l5.CHANGE,t.render,t),this.changed())}handlePrecompose_(t){let e=t.frameState.layerStatesArray,i=this.getLayerState(!1);o3(!e.some(o=>o.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}setSource(t){this.set(w3.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}};function nc(r,t){if(!r.visible)return!1;let e=t.resolution;if(e<r.minResolution||e>=r.maxResolution)return!1;let i=t.zoom;return i>r.minZoom&&i<=r.maxZoom}var Gn=cw;var M11=()=>{let r=document.createElement("div");return Object.assign(r.style,{bottom:0,fontSize:".8rem",padding:"0 10px",position:"absolute",right:0}),r},Hz=M11;var uw=class extends fn{constructor(t={}){let e=Hz();e.className=t.className||"mbt-copyright",super(Object.assign({element:e},t)),this.format=t.format||(i=>i?.join(" | "))}render({frameState:t}){if(!t){this.element.innerHTML="";return}let e=[];t?.layerStatesArray.forEach(o=>{var n;let{layer:l}=o;if(t&&nc(o,t.viewState)){let A=(n=l?.getSource())===null||n===void 0?void 0:n.getAttributions();if(A&&(e=e.concat(A(t))),l?.get("copyrights")){let d=l.get("copyrights");d=Array.isArray(d)?d:[d],d?.length&&e.push(...d)}}});let i=mR(e)||[];this.element.innerHTML=this.format(i)}},Hd=uw;var gi={ADD:"add",REMOVE:"remove"};var Vz={LENGTH:"length"},$u=class extends b8{constructor(t,e,i){super(t),this.element=e,this.index=i}},hw=class extends P0{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let i=0,o=this.array_.length;i<o;++i)this.assertUnique_(this.array_[i],i);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){let e=this.array_;for(let i=0,o=e.length;i<o;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(Vz.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new $u(gi.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);let e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){let e=this.array_;for(let i=0,o=e.length;i<o;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;let e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new $u(gi.REMOVE,e,t)),e}setAt(t,e){let i=this.getLength();if(t>=i){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);let o=this.array_[t];this.array_[t]=e,this.dispatchEvent(new $u(gi.REMOVE,o,t)),this.dispatchEvent(new $u(gi.ADD,e,t))}updateLength_(){this.set(Vz.LENGTH,this.array_.length)}assertUnique_(t,e){for(let i=0,o=this.array_.length;i<o;++i)if(this.array_[i]===t&&i!==e)throw new Error("Duplicate item added to a unique collection")}},o7=hw;var A0={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},B11={ERROR:"error"},Aw=class extends b8{constructor(t){super(B11.ERROR),this.code=t.code,this.message=t.message}},dw=class extends P0{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.position_=null,this.transform_=tz,this.watchId_=void 0,this.addChangeListener(A0.PROJECTION,this.handleProjectionChanged_),this.addChangeListener(A0.TRACKING,this.handleTrackingChanged_),t.projection!==void 0&&this.setProjection(t.projection),t.trackingOptions!==void 0&&this.setTrackingOptions(t.trackingOptions),this.setTracking(t.tracking!==void 0?t.tracking:!1)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){let t=this.getProjection();t&&(this.transform_=Fa(p3("EPSG:4326"),t),this.position_&&this.set(A0.POSITION,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){let t=this.getTracking();t&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!t&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(t){let e=t.coords;this.set(A0.ACCURACY,e.accuracy),this.set(A0.ALTITUDE,e.altitude===null?void 0:e.altitude),this.set(A0.ALTITUDE_ACCURACY,e.altitudeAccuracy===null?void 0:e.altitudeAccuracy),this.set(A0.HEADING,e.heading===null?void 0:ji(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];let i=this.transform_(this.position_);this.set(A0.POSITION,i.slice()),this.set(A0.SPEED,e.speed===null?void 0:e.speed);let o=bz(this.position_,e.accuracy);o.applyTransform(this.transform_),this.set(A0.ACCURACY_GEOMETRY,o),this.changed()}positionError_(t){this.dispatchEvent(new Aw(t))}getAccuracy(){return this.get(A0.ACCURACY)}getAccuracyGeometry(){return this.get(A0.ACCURACY_GEOMETRY)||null}getAltitude(){return this.get(A0.ALTITUDE)}getAltitudeAccuracy(){return this.get(A0.ALTITUDE_ACCURACY)}getHeading(){return this.get(A0.HEADING)}getPosition(){return this.get(A0.POSITION)}getProjection(){return this.get(A0.PROJECTION)}getSpeed(){return this.get(A0.SPEED)}getTracking(){return this.get(A0.TRACKING)}getTrackingOptions(){return this.get(A0.TRACKING_OPTIONS)}setProjection(t){this.set(A0.PROJECTION,p3(t))}setTracking(t){this.set(A0.TRACKING,t)}setTrackingOptions(t){this.set(A0.TRACKING_OPTIONS,t)}},fw=dw;var oc=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",S11=oc.includes("safari")&&!oc.includes("chrom"),gx1=S11&&(oc.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(oc)),Gz=oc.includes("webkit")&&!oc.includes("edge"),pw=oc.includes("macintosh"),kC=typeof devicePixelRatio<"u"?devicePixelRatio:1,Vd=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,jz=typeof Image<"u"&&Image.prototype.decode;var OC=(function(){let r=!1;try{let t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return r})();var C5={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function t0(r,t,e,i){let o;return e&&e.length?o=e.shift():Vd?o=new OffscreenCanvas(r||300,t||300):o=document.createElement("canvas"),r&&(o.width=r),t&&(o.height=t),o.getContext("2d",i)}var Lw;function Xu(){return Lw||(Lw=t0(1,1)),Lw}function qz(r){let t=r.canvas;t.width=1,t.height=1,r.clearRect(0,0,1,1)}function Cw(r,t){let e=t.parentNode;e&&e.replaceChild(r,t)}function Kz(r){for(;r.lastChild;)r.lastChild.remove()}function Wz(r,t){let e=r.childNodes;for(let i=0;;++i){let o=e[i],n=t[i];if(!o&&!n)break;if(o!==n){if(!o){r.appendChild(n);continue}if(!n){r.removeChild(o),--i;continue}r.insertBefore(n,o)}}}var NC=[NaN,NaN,NaN,0],gw;function E11(){return gw||(gw=t0(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),gw}var T11=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,I11=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,F11=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,P11=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function ZC(r,t){return r.endsWith("%")?Number(r.substring(0,r.length-1))/t:Number(r)}function jd(r){throw new Error('failed to parse "'+r+'" as color')}function $z(r){if(r.toLowerCase().startsWith("rgb")){let n=r.match(I11)||r.match(T11)||r.match(F11);if(n){let l=n[4],A=100/255;return[n6(ZC(n[1],A)+.5|0,0,255),n6(ZC(n[2],A)+.5|0,0,255),n6(ZC(n[3],A)+.5|0,0,255),l!==void 0?n6(ZC(l,100),0,1):1]}jd(r)}if(r.startsWith("#")){if(P11.test(r)){let n=r.substring(1),l=n.length<=4?1:2,A=[0,0,0,255];for(let d=0,L=n.length;d<L;d+=l){let C=parseInt(n.substring(d,d+l),16);l===1&&(C+=C<<4),A[d/l]=C}return A[3]=A[3]/255,A}jd(r)}let t=E11();t.fillStyle="#abcdef";let e=t.fillStyle;t.fillStyle=r,t.fillStyle===e&&(t.fillStyle="#fedcba",e=t.fillStyle,t.fillStyle=r,t.fillStyle===e&&jd(r));let i=t.fillStyle;if(i.startsWith("#")||i.startsWith("rgba"))return $z(i);t.clearRect(0,0,1,1),t.fillRect(0,0,1,1);let o=Array.from(t.getImageData(0,0,1,1).data);return o[3]=lC(o[3]/255,3),o}function qd(r){return typeof r=="string"?r:Wd(r)}var R11=1024,Gd={},mw=0;function Xz(r){if(r.length===4)return r;let t=r.slice();return t[3]=1,t}function vw(r){return r>.0031308?Math.pow(r,1/2.4)*269.025-14.025:r*3294.6}function yw(r){return r>.2068965?Math.pow(r,3):(r-4/29)*(108/841)}function _w(r){return r>10.314724?Math.pow((r+14.025)/269.025,2.4):r/3294.6}function xw(r){return r>.0088564?Math.pow(r,1/3):r/(108/841)+4/29}function ww(r){let t=_w(r[0]),e=_w(r[1]),i=_w(r[2]),o=xw(t*.222488403+e*.716873169+i*.06060791),n=500*(xw(t*.452247074+e*.399439023+i*.148375274)-o),l=200*(o-xw(t*.016863605+e*.117638439+i*.865350722)),A=Math.atan2(l,n)*(180/Math.PI);return[116*o-16,Math.sqrt(n*n+l*l),A<0?A+360:A,r[3]]}function Yz(r){let t=(r[0]+16)/116,e=r[1],i=r[2]*Math.PI/180,o=yw(t),n=yw(t+e/500*Math.cos(i)),l=yw(t-e/200*Math.sin(i)),A=vw(n*3.021973625-o*1.617392459-l*.404875592),d=vw(n*-.943766287+o*1.916279586+l*.027607165),L=vw(n*.069407491-o*.22898585+l*1.159737864);return[n6(A+.5|0,0,255),n6(d+.5|0,0,255),n6(L+.5|0,0,255),r[3]]}function Kd(r){if(r==="none")return NC;if(Gd.hasOwnProperty(r))return Gd[r];if(mw>=R11){let e=0;for(let i in Gd)(e++&3)===0&&(delete Gd[i],--mw)}let t=$z(r);t.length!==4&&jd(r);for(let e of t)isNaN(e)&&jd(r);return Gd[r]=t,++mw,t}function pn(r){return Array.isArray(r)?r:Kd(r)}function Wd(r){let t=r[0];t!=(t|0)&&(t=t+.5|0);let e=r[1];e!=(e|0)&&(e=e+.5|0);let i=r[2];i!=(i|0)&&(i=i+.5|0);let o=r[3]===void 0?1:Math.round(r[3]*1e3)/1e3;return"rgba("+t+","+e+","+i+","+o+")"}function z11(r,t){return new Promise((e,i)=>{function o(){l(),e(r)}function n(){l(),i(new Error("Image load error"))}function l(){r.removeEventListener("load",o),r.removeEventListener("error",n)}r.addEventListener("load",o),r.addEventListener("error",n),t&&(r.src=t)})}function Jz(r,t){return t&&(r.src=t),r.src&&jz?new Promise((e,i)=>r.decode().then(()=>e(r)).catch(o=>r.complete&&r.width?e(r):i(o))):z11(r)}var Mw=class{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(let e in this.cache_){let i=this.cache_[e];(t++&3)===0&&!i.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){let o=bw(t,e,i);return o in this.cache_?this.cache_[o]:null}getPattern(t,e,i){let o=bw(t,e,i);return o in this.patternCache_?this.patternCache_[o]:null}set(t,e,i,o,n){let l=bw(t,e,i),A=l in this.cache_;this.cache_[l]=o,n&&(o.getImageState()===C5.IDLE&&o.load(),o.getImageState()===C5.LOADING?o.ready().then(()=>{this.patternCache_[l]=Xu().createPattern(o.getImage(1),"repeat")}):this.patternCache_[l]=Xu().createPattern(o.getImage(1),"repeat")),A||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}};function bw(r,t,e){let i=e?pn(e):"null";return t+":"+r+":"+i}var S9=new Mw;var $d=null,UC=class extends Du{constructor(t,e,i,o,n){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=n,this.imageState_=o===void 0?C5.IDLE:o,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===C5.LOADED){$d||($d=t0(1,1,void 0,{willReadFrequently:!0})),$d.drawImage(this.image_,0,0);try{$d.getImageData(0,0,1,1),this.tainted_=!1}catch{$d=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(l5.CHANGE)}handleImageError_(){this.imageState_=C5.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=C5.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){let t=this.size_[0],e=this.size_[1],i=t0(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===C5.IDLE){this.image_||this.initializeImage_(),this.imageState_=C5.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Jz(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==C5.LOADED)return;let e=this.image_,i=t0(Math.ceil(e.width*t),Math.ceil(e.height*t)),o=i.canvas;i.scale(t,t),i.drawImage(e,0,0),i.globalCompositeOperation="multiply",i.fillStyle=qd(this.color_),i.fillRect(0,0,o.width/t,o.height/t),i.globalCompositeOperation="destination-in",i.drawImage(e,0,0),this.canvas_[t]=o}ready(){return this.ready_||(this.ready_=new Promise(t=>{if(this.imageState_===C5.LOADED||this.imageState_===C5.ERROR)t();else{let e=()=>{(this.imageState_===C5.LOADED||this.imageState_===C5.ERROR)&&(this.removeEventListener(l5.CHANGE,e),t())};this.addEventListener(l5.CHANGE,e)}})),this.ready_}};function Yu(r,t,e,i,o,n){let l=t===void 0?void 0:S9.get(t,e,o);return l||(l=new UC(r,r&&"src"in r?r.src||void 0:t,e,i,o),S9.set(t,e,o,l,n)),n&&l&&!S9.getPattern(t,e,o)&&S9.set(t,e,o,l,n),l}var tD=UC;function Z7(r){return r?Array.isArray(r)?Wd(r):typeof r=="object"&&"src"in r?D11(r):r:null}function D11(r){if(!r.offset||!r.size)return S9.getPattern(r.src,"anonymous",r.color);let t=r.src+":"+r.offset,e=S9.getPattern(t,void 0,r.color);if(e)return e;let i=S9.get(r.src,"anonymous",null);if(i.getImageState()!==C5.LOADED)return null;let o=t0(r.size[0],r.size[1]);return o.drawImage(i.getImage(1),r.offset[0],r.offset[1],r.size[0],r.size[1],0,0,r.size[0],r.size[1]),Yu(o.canvas,t,void 0,C5.LOADED,r.color,!0),S9.getPattern(t,void 0,r.color)}var Bw=class{drawCustom(t,e,i,o,n){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}},QC=Bw;var Xd="ol-hidden";var To="ol-unselectable";var Ju="ol-control",Sw="ol-collapsed",k11=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z0-9]+?)\\s*$`].join(""),"i"),eD=["style","variant","weight","size","lineHeight","family"],HC={normal:400,bold:700},VC=function(r){let t=r.match(k11);if(!t)return null;let e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"400",variant:"normal"};for(let i=0,o=eD.length;i<o;++i){let n=t[i+1];n!==void 0&&(e[eD[i]]=typeof n=="string"?n.trim():n)}return isNaN(Number(e.weight))&&e.weight in HC&&(e.weight=HC[e.weight]),e.families=e.family.split(/,\s?/).map(i=>i.trim().replace(/^['"]|['"]$/g,"")),e};var GC="10px sans-serif",$8="#000",Io="round",N7=[],U7=0,Fo="round",Pa=10,Ra="#000",Vs="center",sc="middle",za=[0,0,0,0],Da=1,ac=new P0,Yd=null,rD,Ew={},O11=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function Z11(r,t,e){return`${r} ${t} 16px "${e}"`}var iD=(function(){let t,e;async function i(n){await e.ready;let l=await e.load(n);if(l.length===0)return!1;let A=VC(n),d=A.families[0].toLowerCase(),L=A.weight;return l.some(C=>{let y=C.family.replace(/^['"]|['"]$/g,"").toLowerCase(),E=HC[C.weight]||C.weight;return y===d&&C.style===A.style&&E==L})}async function o(){await e.ready;let n=!0,l=ac.getProperties(),A=Object.keys(l).filter(d=>l[d]<100);for(let d=A.length-1;d>=0;--d){let L=A[d],C=l[L];C<100&&(await i(L)?(Mo(Ew),ac.set(L,100)):(C+=10,ac.set(L,C,!0),C<100&&(n=!1)))}t=void 0,n||(t=setTimeout(o,100))}return async function(n){e||(e=Vd?self.fonts:document.fonts);let l=VC(n);if(!l)return;let A=l.families,d=!1;for(let L of A){if(O11.has(L))continue;let C=Z11(l.style,l.weight,L);ac.get(C)===void 0&&(ac.set(C,0,!0),d=!0)}d&&(clearTimeout(t),t=setTimeout(o,100))}})(),N11=(function(){let r;return function(t){let e=Ew[t];if(e==null){if(Vd){let i=VC(t),o=nD(t,"\u017Dg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(o.actualBoundingBoxAscent+o.actualBoundingBoxDescent)}else r||(r=document.createElement("div"),r.innerHTML="M",r.style.minHeight="0",r.style.maxHeight="none",r.style.height="auto",r.style.padding="0",r.style.border="none",r.style.position="absolute",r.style.display="block",r.style.left="-99999px"),r.style.font=t,document.body.appendChild(r),e=r.offsetHeight,document.body.removeChild(r);Ew[t]=e}return e}})();function nD(r,t){return Yd||(Yd=t0(1,1)),r!=rD&&(Yd.font=r,rD=Yd.font),Yd.measureText(t)}function oD(r,t){return nD(r,t).width}function Tw(r,t,e){if(t in e)return e[t];let i=t.split(`
|
|
833
|
+
`},zK=function(r){return 48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57},pu1=(function(r){function t(){var e=r.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return kK(t,r),t.prototype.finish=function(e){if(e===void 0&&(e=[]),this.parse(" ",e),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return e},t.prototype.parse=function(e,i){var o=this;i===void 0&&(i=[]);for(var n=function(y){i.push(y),o.curArgs.length=0,o.canParseCommandOrComma=!0},l=0;l<e.length;l++){var A=e[l],d=!(this.curCommandType!==Zt.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),L=zK(A)&&(this.curNumber==="0"&&A==="0"||d);if(!zK(A)||L)if(A!=="e"&&A!=="E")if(A!=="-"&&A!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(A!=="."||this.curNumberHasExp||this.curNumberHasDecimal||d){if(this.curNumber&&this.curCommandType!==-1){var C=Number(this.curNumber);if(isNaN(C))throw new SyntaxError("Invalid number ending at "+l);if(this.curCommandType===Zt.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>C)throw new SyntaxError('Expected positive number, got "'+C+'" at index "'+l+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+l+'"')}this.curArgs.push(C),this.curArgs.length===Lu1[this.curCommandType]&&(Zt.HORIZ_LINE_TO===this.curCommandType?n({type:Zt.HORIZ_LINE_TO,relative:this.curCommandRelative,x:C}):Zt.VERT_LINE_TO===this.curCommandType?n({type:Zt.VERT_LINE_TO,relative:this.curCommandRelative,y:C}):this.curCommandType===Zt.MOVE_TO||this.curCommandType===Zt.LINE_TO||this.curCommandType===Zt.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),Zt.MOVE_TO===this.curCommandType&&(this.curCommandType=Zt.LINE_TO)):this.curCommandType===Zt.CURVE_TO?n({type:Zt.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===Zt.SMOOTH_CURVE_TO?n({type:Zt.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Zt.QUAD_TO?n({type:Zt.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Zt.ARC&&n({type:Zt.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!fu1(A))if(A===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(A!=="+"&&A!=="-"&&A!==".")if(L)this.curNumber=A,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+l+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+A+'" at index '+l+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,A!=="z"&&A!=="Z")if(A==="h"||A==="H")this.curCommandType=Zt.HORIZ_LINE_TO,this.curCommandRelative=A==="h";else if(A==="v"||A==="V")this.curCommandType=Zt.VERT_LINE_TO,this.curCommandRelative=A==="v";else if(A==="m"||A==="M")this.curCommandType=Zt.MOVE_TO,this.curCommandRelative=A==="m";else if(A==="l"||A==="L")this.curCommandType=Zt.LINE_TO,this.curCommandRelative=A==="l";else if(A==="c"||A==="C")this.curCommandType=Zt.CURVE_TO,this.curCommandRelative=A==="c";else if(A==="s"||A==="S")this.curCommandType=Zt.SMOOTH_CURVE_TO,this.curCommandRelative=A==="s";else if(A==="q"||A==="Q")this.curCommandType=Zt.QUAD_TO,this.curCommandRelative=A==="q";else if(A==="t"||A==="T")this.curCommandType=Zt.SMOOTH_QUAD_TO,this.curCommandRelative=A==="t";else{if(A!=="a"&&A!=="A")throw new SyntaxError('Unexpected character "'+A+'" at index '+l+".");this.curCommandType=Zt.ARC,this.curCommandRelative=A==="a"}else i.push({type:Zt.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=A,this.curNumberHasDecimal=A==="."}else this.curNumber+=A,this.curNumberHasDecimal=!0;else this.curNumber+=A;else this.curNumber+=A,this.curNumberHasExp=!0;else this.curNumber+=A,this.curNumberHasExpDigits=this.curNumberHasExp}return i},t.prototype.transform=function(e){return Object.create(this,{parse:{value:function(i,o){o===void 0&&(o=[]);for(var n=0,l=Object.getPrototypeOf(this).parse.call(this,i);n<l.length;n++){var A=l[n],d=e(A);Array.isArray(d)?o.push.apply(o,d):o.push(d)}return o}}})},t})(OK),Zt=(function(r){function t(e){var i=r.call(this)||this;return i.commands=typeof e=="string"?t.parse(e):e,i}return kK(t,r),t.prototype.encode=function(){return t.encode(this.commands)},t.prototype.getBounds=function(){var e=S8.CALCULATE_BOUNDS();return this.transform(e),e},t.prototype.transform=function(e){for(var i=[],o=0,n=this.commands;o<n.length;o++){var l=e(n[o]);Array.isArray(l)?i.push.apply(i,l):i.push(l)}return this.commands=i,this},t.encode=function(e){return du1(e)},t.parse=function(e){var i=new pu1,o=[];return i.parse(e,o),i.finish(o),o},t.CLOSE_PATH=1,t.MOVE_TO=2,t.HORIZ_LINE_TO=4,t.VERT_LINE_TO=8,t.LINE_TO=16,t.CURVE_TO=32,t.SMOOTH_CURVE_TO=64,t.QUAD_TO=128,t.SMOOTH_QUAD_TO=256,t.ARC=512,t.LINE_COMMANDS=t.LINE_TO|t.HORIZ_LINE_TO|t.VERT_LINE_TO,t.DRAWING_COMMANDS=t.HORIZ_LINE_TO|t.VERT_LINE_TO|t.LINE_TO|t.CURVE_TO|t.SMOOTH_CURVE_TO|t.QUAD_TO|t.SMOOTH_QUAD_TO|t.ARC,t})(OK),Lu1=(($4={})[Zt.MOVE_TO]=2,$4[Zt.LINE_TO]=2,$4[Zt.HORIZ_LINE_TO]=1,$4[Zt.VERT_LINE_TO]=1,$4[Zt.CLOSE_PATH]=0,$4[Zt.QUAD_TO]=4,$4[Zt.SMOOTH_QUAD_TO]=2,$4[Zt.CURVE_TO]=6,$4[Zt.SMOOTH_CURVE_TO]=4,$4[Zt.ARC]=7,$4)});var HK=W2(()=>{"use strict";var Cu1=pp().PROPER,gu1=cl(),mu1=I9(),NK=W4(),vu1=d0(),yu1=Wm(),OT="toString",UK=RegExp.prototype,QK=UK[OT],_u1=vu1(function(){return QK.call({source:"a",flags:"b"})!=="/a/b"}),xu1=Cu1&&QK.name!==OT;(_u1||xu1)&&gu1(UK,OT,function(){var t=mu1(this),e=NK(t.source),i=NK(yu1(t));return"/"+e+"/"+i},{unsafe:!0})});function cv(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cv=function(t){return typeof t}:cv=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cv(r)}function wu1(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function Bu1(r,t,e,i,o){if(typeof r=="string"&&(r=document.getElementById(r)),!r||cv(r)!=="object"||!("getContext"in r))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var n=r.getContext("2d");try{return n.getImageData(t,e,i,o)}catch(l){throw new Error("unable to access image data: "+l)}}function GK(r,t,e,i,o,n){if(!(isNaN(n)||n<1)){n|=0;var l=Bu1(r,t,e,i,o);l=Su1(l,t,e,i,o,n),r.getContext("2d").putImageData(l,t,e)}}function Su1(r,t,e,i,o,n){for(var l=r.data,A=2*n+1,d=i-1,L=o-1,C=n+1,y=C*(C+1)/2,E=new VK,B=E,Z,Q=1;Q<A;Q++)B=B.next=new VK,Q===C&&(Z=B);B.next=E;for(var V=null,G=null,J=0,n1=0,r1=bu1[n],m1=Mu1[n],w1=0;w1<o;w1++){B=E;for(var B1=l[n1],g1=l[n1+1],L1=l[n1+2],z1=l[n1+3],s1=0;s1<C;s1++)B.r=B1,B.g=g1,B.b=L1,B.a=z1,B=B.next;for(var x1=0,N1=0,V1=0,l2=0,p2=C*B1,o2=C*g1,G1=C*L1,L2=C*z1,V2=y*B1,w2=y*g1,u1=y*L1,P1=y*z1,F1=1;F1<C;F1++){var J1=n1+((d<F1?d:F1)<<2),u2=l[J1],r2=l[J1+1],F2=l[J1+2],k2=l[J1+3],j2=C-F1;V2+=(B.r=u2)*j2,w2+=(B.g=r2)*j2,u1+=(B.b=F2)*j2,P1+=(B.a=k2)*j2,x1+=u2,N1+=r2,V1+=F2,l2+=k2,B=B.next}V=E,G=Z;for(var R2=0;R2<i;R2++){var it=P1*r1>>>m1;if(l[n1+3]=it,it!==0){var pt=255/it;l[n1]=(V2*r1>>>m1)*pt,l[n1+1]=(w2*r1>>>m1)*pt,l[n1+2]=(u1*r1>>>m1)*pt}else l[n1]=l[n1+1]=l[n1+2]=0;V2-=p2,w2-=o2,u1-=G1,P1-=L2,p2-=V.r,o2-=V.g,G1-=V.b,L2-=V.a;var N2=R2+n+1;N2=J+(N2<d?N2:d)<<2,x1+=V.r=l[N2],N1+=V.g=l[N2+1],V1+=V.b=l[N2+2],l2+=V.a=l[N2+3],V2+=x1,w2+=N1,u1+=V1,P1+=l2,V=V.next;var K1=G,ce=K1.r,Vt=K1.g,qt=K1.b,ot=K1.a;p2+=ce,o2+=Vt,G1+=qt,L2+=ot,x1-=ce,N1-=Vt,V1-=qt,l2-=ot,G=G.next,n1+=4}J+=i}for(var Qt=0;Qt<i;Qt++){n1=Qt<<2;var Lt=l[n1],Gt=l[n1+1],Ht=l[n1+2],re=l[n1+3],le=C*Lt,ie=C*Gt,c2=C*Ht,A1=C*re,h1=y*Lt,b1=y*Gt,R1=y*Ht,$1=y*re;B=E;for(var h2=0;h2<C;h2++)B.r=Lt,B.g=Gt,B.b=Ht,B.a=re,B=B.next;for(var d2=i,s2=0,I2=0,Q2=0,Z2=0,at=1;at<=n;at++){n1=d2+Qt<<2;var Pt=C-at;h1+=(B.r=Lt=l[n1])*Pt,b1+=(B.g=Gt=l[n1+1])*Pt,R1+=(B.b=Ht=l[n1+2])*Pt,$1+=(B.a=re=l[n1+3])*Pt,Z2+=Lt,s2+=Gt,I2+=Ht,Q2+=re,B=B.next,at<L&&(d2+=i)}n1=Qt,V=E,G=Z;for(var x2=0;x2<o;x2++){var zt=n1<<2;l[zt+3]=re=$1*r1>>>m1,re>0?(re=255/re,l[zt]=(h1*r1>>>m1)*re,l[zt+1]=(b1*r1>>>m1)*re,l[zt+2]=(R1*r1>>>m1)*re):l[zt]=l[zt+1]=l[zt+2]=0,h1-=le,b1-=ie,R1-=c2,$1-=A1,le-=V.r,ie-=V.g,c2-=V.b,A1-=V.a,zt=Qt+((zt=x2+C)<L?zt:L)*i<<2,h1+=Z2+=V.r=l[zt],b1+=s2+=V.g=l[zt+1],R1+=I2+=V.b=l[zt+2],$1+=Q2+=V.a=l[zt+3],V=V.next,le+=Lt=G.r,ie+=Gt=G.g,c2+=Ht=G.b,A1+=re=G.a,Z2-=Lt,s2-=Gt,I2-=Ht,Q2-=re,G=G.next,n1+=i}}return r}var bu1,Mu1,VK,jK=_o(()=>{bu1=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],Mu1=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];VK=function r(){wu1(this,r),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}});var nW={};__(nW,{AElement:()=>Nv,AnimateColorElement:()=>Rv,AnimateElement:()=>nA,AnimateTransformElement:()=>zv,BoundingBox:()=>G7,CB1:()=>UT,CB2:()=>QT,CB3:()=>HT,CB4:()=>VT,Canvg:()=>$T,CircleElement:()=>wv,ClipPathElement:()=>jv,DefsElement:()=>Tv,DescElement:()=>Yv,Document:()=>Zc,Element:()=>H6,EllipseElement:()=>bv,FeColorMatrixElement:()=>Gp,FeCompositeElement:()=>Wv,FeDropShadowElement:()=>qv,FeGaussianBlurElement:()=>$v,FeMorphologyElement:()=>Kv,FilterElement:()=>qp,Font:()=>Jn,FontElement:()=>Dv,FontFaceElement:()=>kv,GElement:()=>iA,GlyphElement:()=>Zp,GradientElement:()=>Hp,ImageElement:()=>Qv,LineElement:()=>Mv,LinearGradientElement:()=>Iv,MarkerElement:()=>Ev,MaskElement:()=>jp,Matrix:()=>kp,MissingGlyphElement:()=>Ov,Mouse:()=>Cv,PSEUDO_ZERO:()=>Dc,Parser:()=>rA,PathElement:()=>r8,PathParser:()=>j5,PatternElement:()=>Sv,Point:()=>T8,PolygonElement:()=>Bv,PolylineElement:()=>Qp,Property:()=>y5,QB1:()=>GT,QB2:()=>jT,QB3:()=>qT,RadialGradientElement:()=>Fv,RectElement:()=>Up,RenderedElement:()=>$o,Rotate:()=>mv,SVGElement:()=>pl,SVGFontLoader:()=>Vv,Scale:()=>vv,Screen:()=>kc,Skew:()=>Op,SkewX:()=>yv,SkewY:()=>_v,StopElement:()=>Pv,StyleElement:()=>Vp,SymbolElement:()=>Hv,TRefElement:()=>Zv,TSpanElement:()=>Np,TextElement:()=>fl,TextPathElement:()=>Uv,TitleElement:()=>Xv,Transform:()=>Oc,Translate:()=>gv,UnknownElement:()=>xv,UseElement:()=>Gv,ViewPort:()=>Lv,compressSpaces:()=>Nc,default:()=>$T,getSelectorSpecificity:()=>eW,normalizeAttributeName:()=>JK,normalizeColor:()=>tW,parseExternalUrl:()=>XT,presets:()=>Iu1,toNumbers:()=>V7,trimLeft:()=>XK,trimRight:()=>YK,vectorMagnitude:()=>ZT,vectorsAngle:()=>NT,vectorsRatio:()=>pv});function Eu1(){var{DOMParser:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:r,createCanvas(e,i){return new OffscreenCanvas(e,i)},createImage(e){return K4(function*(){var i=yield fetch(e),o=yield i.blob(),n=yield createImageBitmap(o);return n})()}};return(typeof DOMParser<"u"||typeof r>"u")&&Reflect.deleteProperty(t,"DOMParser"),t}function Tu1(r){var{DOMParser:t,canvas:e,fetch:i}=r;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,fetch:i,createCanvas:e.createCanvas,createImage:e.loadImage}}function Nc(r){return r.replace(/(?!\u3000)\s+/gm," ")}function XK(r){return r.replace(/^[\n \t]+/,"")}function YK(r){return r.replace(/[\n \t]+$/,"")}function V7(r){var t=(r||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return t.map(parseFloat)}function JK(r){return Fu1.test(r)?r.toLowerCase():r}function XT(r){var t=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(r)||[];return t[2]||t[3]||t[4]}function tW(r){if(!r.startsWith("rgb"))return r;var t=3,e=r.replace(/\d+(\.\d+)?/g,(i,o)=>t--&&o?String(Math.round(parseFloat(i))):i);return e}function Rc(r,t){var e=t.exec(r);return e?[r.replace(t," "),e.length]:[r,0]}function eW(r){var t=[0,0,0],e=r.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),i=0;return[e,i]=Rc(e,Pu1),t[1]+=i,[e,i]=Rc(e,Ru1),t[0]+=i,[e,i]=Rc(e,zu1),t[1]+=i,[e,i]=Rc(e,Du1),t[2]+=i,[e,i]=Rc(e,ku1),t[1]+=i,[e,i]=Rc(e,Ou1),t[1]+=i,e=e.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[e,i]=Rc(e,Zu1),t[2]+=i,t.join("")}function ZT(r){return Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2))}function pv(r,t){return(r[0]*t[0]+r[1]*t[1])/(ZT(r)*ZT(t))}function NT(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(pv(r,t))}function UT(r){return r*r*r}function QT(r){return 3*r*r*(1-r)}function HT(r){return 3*r*(1-r)*(1-r)}function VT(r){return(1-r)*(1-r)*(1-r)}function GT(r){return r*r}function jT(r){return 2*r*(1-r)}function qT(r){return(1-r)*(1-r)}function Qu1(r){return Nc(r).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function Hu1(r){var[t,e]=r.split("(");return[t.trim(),e.trim().replace(")","")]}function Vu1(r){var t=r.trim();return/^('|")/.test(t)?t:'"'.concat(t,'"')}function Gu1(r){return typeof process>"u"?r:r.trim().split(",").map(Vu1).join(",")}function ju1(r){if(!r)return"";var t=r.trim().toLowerCase();switch(t){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return t;default:return/^oblique\s+(-|)\d+deg$/.test(t)?t:""}}function qu1(r){if(!r)return"";var t=r.trim().toLowerCase();switch(t){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return t;default:return/^[\d.]+$/.test(t)?t:""}}function qK(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,i)}return e}function uv(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?qK(Object(e),!0).forEach(function(i){Rp(r,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):qK(Object(e)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(e,i))})}return r}function hv(r,t,e,i,o,n){return r[e*i*4+t*4+n]}function Av(r,t,e,i,o,n,l){r[e*i*4+t*4+n]=l}function E8(r,t,e){var i=r[t];return i*e}function ss(r,t,e,i){return t+Math.cos(r)*e+Math.sin(r)*i}function WK(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,i)}return e}function $u1(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?WK(Object(e),!0).forEach(function(i){Rp(r,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):WK(Object(e)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(e,i))})}return r}function Xu1(r,t){var e=document.createElement("canvas");return e.width=r,e.height=t,e}function Yu1(r){return WT.apply(this,arguments)}function WT(){return WT=K4(function*(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=document.createElement("img");return t&&(e.crossOrigin="Anonymous"),new Promise((i,o)=>{e.onload=()=>{i(e)},e.onerror=(n,l,A,d,L)=>{o(L)},e.src=r})}),WT.apply(this,arguments)}function $K(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,i)}return e}function zc(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?$K(Object(e),!0).forEach(function(i){Rp(r,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):$K(Object(e)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(e,i))})}return r}var iV1,oV1,aV1,sV1,lV1,cV1,hV1,AV1,dV1,dv,fV1,fv,pV1,LV1,CV1,mV1,Iu1,Fu1,Pu1,Ru1,zu1,Du1,ku1,Ou1,Zu1,Dc,y5,Lv,T8,Cv,rW,iW,kc,Nu1,Uu1,rA,gv,mv,vv,kp,Op,yv,_v,Oc,H6,xv,Jn,G7,j5,$o,r8,Zp,fl,Np,KT,pl,Up,wv,bv,Mv,Qp,Bv,Sv,Ev,Tv,iA,Hp,Iv,Fv,Pv,nA,Rv,zv,Dv,kv,Ov,Zv,Nv,Uv,Ku1,Qv,Hv,Vv,Vp,Gv,Gp,jp,KK,jv,qp,qv,Kv,Wv,$v,Xv,Yv,Wu1,Zc,$T,oW=_o(()=>{iV1=P3(JG(),1);ej();oV1=P3(Hj(),1),aV1=P3(Wj(),1),sV1=P3(rq(),1),lV1=P3(vT(),1),cV1=P3(Uq(),1);Vq();hV1=P3(Yq(),1),AV1=P3(eK(),1),dV1=P3(aK(),1),dv=P3(uK(),1),fV1=P3(mK(),1),fv=P3(yK(),1),pV1=P3(xK(),1),LV1=P3(bK(),1),CV1=P3(EK(),1);ZK();mV1=P3(HK(),1);jK();Iu1=Object.freeze({__proto__:null,offscreen:Eu1,node:Tu1});Fu1=/^[A-Z-]+$/;Pu1=/(\[[^\]]+\])/g,Ru1=/(#[^\s+>~.[:]+)/g,zu1=/(\.[^\s+>~.[:]+)/g,Du1=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,ku1=/(:[\w-]+\([^)]*\))/gi,Ou1=/(:[^\s+>~.[:]+)/g,Zu1=/([^\s+>~.[:]+)/g;Dc=1e-8;y5=class r{constructor(t,e,i){this.document=t,this.name=e,this.value=i,this.isNormalizedColor=!1}static empty(t){return new r(t,"EMPTY","")}split(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:e,name:i}=this;return Nc(this.getString()).trim().split(t).map(o=>new r(e,i,o))}hasValue(t){var{value:e}=this;return e!==null&&e!==""&&(t||e!==0)&&typeof e<"u"}isString(t){var{value:e}=this,i=typeof e=="string";return!i||!t?i:t.test(e)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return typeof t>"u"||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return typeof t>"u"?0:parseFloat(t);var{value:e}=this,i=parseFloat(e);return this.isString(/%$/)&&(i/=100),i}getString(t){return typeof t>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(t)}getColor(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=tW(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[i,o]=typeof t=="boolean"?[void 0,t]:[t],{viewPort:n}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(n.computeSize("x"),n.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(n.computeSize("x"),n.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*n.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*n.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&o):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*n.computeSize(i);default:{var l=this.getNumber();return e&&l<1?l*n.computeSize(i):l}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}getFillStyleDefinition(t,e){var i=this.getDefinition();if(!i)return null;if(typeof i.createGradient=="function")return i.createGradient(this.document.ctx,t,e);if(typeof i.createPattern=="function"){if(i.getHrefAttribute().hasValue()){var o=i.getAttribute("patternTransform");i=i.getHrefAttribute().getDefinition(),o.hasValue()&&i.getAttribute("patternTransform",!0).setValue(o.value)}return i.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){return this.hasValue()?r.textBaselineMapping[this.getString()]:null}addOpacity(t){for(var e=this.getColor(),i=e.length,o=0,n=0;n<i&&(e[n]===","&&o++,o!==3);n++);if(t.hasValue()&&this.isString()&&o!==3){var l=new fv.default(e);l.ok&&(l.alpha=t.getNumber(),e=l.toRGBA())}return new r(this.document,this.name,e)}};y5.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};Lv=class{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:t}=this;return t[t.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return typeof t=="number"?t:t==="x"?this.width:t==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}},T8=class r{constructor(t,e){this.x=t,this.y=e}static parse(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[i=e,o=e]=V7(t);return new r(i,o)}static parseScale(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[i=e,o=i]=V7(t);return new r(i,o)}static parsePath(t){for(var e=V7(t),i=e.length,o=[],n=0;n<i;n+=2)o.push(new r(e[n],e[n+1]));return o}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){var{x:e,y:i}=this,o=e*t[0]+i*t[2]+t[4],n=e*t[1]+i*t[3]+t[5];this.x=o,this.y=n}},Cv=class{constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:t,onClick:e,onMouseMove:i}=this,o=t.ctx.canvas;o.onclick=e,o.onmousemove=i,this.working=!0}}stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:t,events:e,eventElements:i}=this,{style:o}=t.ctx.canvas;o&&(o.cursor=""),e.forEach((n,l)=>{for(var{run:A}=n,d=i[l];d;)A(d),d=d.parent}),this.events=[],this.eventElements=[]}}checkPath(t,e){if(!(!this.working||!e)){var{events:i,eventElements:o}=this;i.forEach((n,l)=>{var{x:A,y:d}=n;!o[l]&&e.isPointInPath&&e.isPointInPath(A,d)&&(o[l]=t)})}}checkBoundingBox(t,e){if(!(!this.working||!e)){var{events:i,eventElements:o}=this;i.forEach((n,l)=>{var{x:A,y:d}=n;!o[l]&&e.isPointInBox(A,d)&&(o[l]=t)})}}mapXY(t,e){for(var{window:i,ctx:o}=this.screen,n=new T8(t,e),l=o.canvas;l;)n.x-=l.offsetLeft,n.y-=l.offsetTop,l=l.offsetParent;return i.scrollX&&(n.x+=i.scrollX),i.scrollY&&(n.y+=i.scrollY),n}onClick(t){var{x:e,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:i,run(o){o.onClick&&o.onClick()}})}onMouseMove(t){var{x:e,y:i}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:i,run(o){o.onMouseMove&&o.onMouseMove()}})}},rW=typeof window<"u"?window:null,iW=typeof fetch<"u"?fetch.bind(void 0):null,kc=class{constructor(t){var{fetch:e=iW,window:i=rW}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Lv,this.mouse=new Cv(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=i,this.fetch=e}wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var t=this.waits.every(e=>e());return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){var{document:e,ctx:i,aspectRatio:o,width:n,desiredWidth:l,height:A,desiredHeight:d,minX:L=0,minY:C=0,refX:y,refY:E,clip:B=!1,clipX:Z=0,clipY:Q=0}=t,V=Nc(o).replace(/^defer\s/,""),[G,J]=V.split(" "),n1=G||"xMidYMid",r1=J||"meet",m1=n/l,w1=A/d,B1=Math.min(m1,w1),g1=Math.max(m1,w1),L1=l,z1=d;r1==="meet"&&(L1*=B1,z1*=B1),r1==="slice"&&(L1*=g1,z1*=g1);var s1=new y5(e,"refX",y),x1=new y5(e,"refY",E),N1=s1.hasValue()&&x1.hasValue();if(N1&&i.translate(-B1*s1.getPixels("x"),-B1*x1.getPixels("y")),B){var V1=B1*Z,l2=B1*Q;i.beginPath(),i.moveTo(V1,l2),i.lineTo(n,l2),i.lineTo(n,A),i.lineTo(V1,A),i.closePath(),i.clip()}if(!N1){var p2=r1==="meet"&&B1===w1,o2=r1==="slice"&&g1===w1,G1=r1==="meet"&&B1===m1,L2=r1==="slice"&&g1===m1;n1.startsWith("xMid")&&(p2||o2)&&i.translate(n/2-L1/2,0),n1.endsWith("YMid")&&(G1||L2)&&i.translate(0,A/2-z1/2),n1.startsWith("xMax")&&(p2||o2)&&i.translate(n-L1,0),n1.endsWith("YMax")&&(G1||L2)&&i.translate(0,A-z1)}switch(!0){case n1==="none":i.scale(m1,w1);break;case r1==="meet":i.scale(B1,B1);break;case r1==="slice":i.scale(g1,g1);break}i.translate(-L,-C)}start(t){var{enableRedraw:e=!1,ignoreMouse:i=!1,ignoreAnimation:o=!1,ignoreDimensions:n=!1,ignoreClear:l=!1,forceRedraw:A,scaleWidth:d,scaleHeight:L,offsetX:C,offsetY:y}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:E,mouse:B}=this,Z=1e3/E;if(this.frameDuration=Z,this.readyPromise=new Promise(n1=>{this.resolveReady=n1}),this.isReady()&&this.render(t,n,l,d,L,C,y),!!e){var Q=Date.now(),V=Q,G=0,J=()=>{Q=Date.now(),G=Q-V,G>=Z&&(V=Q-G%Z,this.shouldUpdate(o,A)&&(this.render(t,n,l,d,L,C,y),B.runEvents())),this.intervalId=(0,dv.default)(J)};i||B.start(),this.intervalId=(0,dv.default)(J)}}stop(){this.intervalId&&(dv.default.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){var{frameDuration:i}=this,o=this.animations.reduce((n,l)=>l.update(i)||n,!1);if(o)return!0}return!!(typeof e=="function"&&e()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(t,e,i,o,n,l,A){var{CLIENT_WIDTH:d,CLIENT_HEIGHT:L,viewPort:C,ctx:y,isFirstRender:E}=this,B=y.canvas;C.clear(),B.width&&B.height?C.setCurrent(B.width,B.height):C.setCurrent(d,L);var Z=t.getStyle("width"),Q=t.getStyle("height");!e&&(E||typeof o!="number"&&typeof n!="number")&&(Z.hasValue()&&(B.width=Z.getPixels("x"),B.style&&(B.style.width="".concat(B.width,"px"))),Q.hasValue()&&(B.height=Q.getPixels("y"),B.style&&(B.style.height="".concat(B.height,"px"))));var V=B.clientWidth||B.width,G=B.clientHeight||B.height;if(e&&Z.hasValue()&&Q.hasValue()&&(V=Z.getPixels("x"),G=Q.getPixels("y")),C.setCurrent(V,G),typeof l=="number"&&t.getAttribute("x",!0).setValue(l),typeof A=="number"&&t.getAttribute("y",!0).setValue(A),typeof o=="number"||typeof n=="number"){var J=V7(t.getAttribute("viewBox").getString()),n1=0,r1=0;if(typeof o=="number"){var m1=t.getStyle("width");m1.hasValue()?n1=m1.getPixels("x")/o:isNaN(J[2])||(n1=J[2]/o)}if(typeof n=="number"){var w1=t.getStyle("height");w1.hasValue()?r1=w1.getPixels("y")/n:isNaN(J[3])||(r1=J[3]/n)}n1||(n1=r1),r1||(r1=n1),t.getAttribute("width",!0).setValue(o),t.getAttribute("height",!0).setValue(n);var B1=t.getStyle("transform",!0,!0);B1.setValue("".concat(B1.getString()," scale(").concat(1/n1,", ").concat(1/r1,")"))}i||y.clearRect(0,0,V,G),t.render(y),E&&(this.isFirstRender=!1)}};kc.defaultWindow=rW;kc.defaultFetch=iW;({defaultFetch:Nu1}=kc),Uu1=typeof DOMParser<"u"?DOMParser:null,rA=class{constructor(){var{fetch:t=Nu1,DOMParser:e=Uu1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=t,this.DOMParser=e}parse(t){var e=this;return K4(function*(){return t.startsWith("<")?e.parseFromString(t):e.load(t)})()}parseFromString(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch{return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}load(t){var e=this;return K4(function*(){var i=yield e.fetch(t),o=yield i.text();return e.parseFromString(o)})()}},gv=class{constructor(t,e){this.type="translate",this.point=null,this.point=T8.parse(e)}apply(t){var{x:e,y:i}=this.point;t.translate(e||0,i||0)}unapply(t){var{x:e,y:i}=this.point;t.translate(-1*e||0,-1*i||0)}applyToPoint(t){var{x:e,y:i}=this.point;t.applyTransform([1,0,0,1,e||0,i||0])}},mv=class{constructor(t,e,i){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var o=V7(e);this.angle=new y5(t,"angle",o[0]),this.originX=i[0],this.originY=i[1],this.cx=o[1]||0,this.cy=o[2]||0}apply(t){var{cx:e,cy:i,originX:o,originY:n,angle:l}=this,A=e+o.getPixels("x"),d=i+n.getPixels("y");t.translate(A,d),t.rotate(l.getRadians()),t.translate(-A,-d)}unapply(t){var{cx:e,cy:i,originX:o,originY:n,angle:l}=this,A=e+o.getPixels("x"),d=i+n.getPixels("y");t.translate(A,d),t.rotate(-1*l.getRadians()),t.translate(-A,-d)}applyToPoint(t){var{cx:e,cy:i,angle:o}=this,n=o.getRadians();t.applyTransform([1,0,0,1,e||0,i||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-e||0,-i||0])}},vv=class{constructor(t,e,i){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var o=T8.parseScale(e);(o.x===0||o.y===0)&&(o.x=Dc,o.y=Dc),this.scale=o,this.originX=i[0],this.originY=i[1]}apply(t){var{scale:{x:e,y:i},originX:o,originY:n}=this,l=o.getPixels("x"),A=n.getPixels("y");t.translate(l,A),t.scale(e,i||e),t.translate(-l,-A)}unapply(t){var{scale:{x:e,y:i},originX:o,originY:n}=this,l=o.getPixels("x"),A=n.getPixels("y");t.translate(l,A),t.scale(1/e,1/i||e),t.translate(-l,-A)}applyToPoint(t){var{x:e,y:i}=this.scale;t.applyTransform([e||0,0,0,i||0,0,0])}},kp=class{constructor(t,e,i){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=V7(e),this.originX=i[0],this.originY=i[1]}apply(t){var{originX:e,originY:i,matrix:o}=this,n=e.getPixels("x"),l=i.getPixels("y");t.translate(n,l),t.transform(o[0],o[1],o[2],o[3],o[4],o[5]),t.translate(-n,-l)}unapply(t){var{originX:e,originY:i,matrix:o}=this,n=o[0],l=o[2],A=o[4],d=o[1],L=o[3],C=o[5],y=0,E=0,B=1,Z=1/(n*(L*B-C*E)-l*(d*B-C*y)+A*(d*E-L*y)),Q=e.getPixels("x"),V=i.getPixels("y");t.translate(Q,V),t.transform(Z*(L*B-C*E),Z*(C*y-d*B),Z*(A*E-l*B),Z*(n*B-A*y),Z*(l*C-A*L),Z*(A*d-n*C)),t.translate(-Q,-V)}applyToPoint(t){t.applyTransform(this.matrix)}},Op=class extends kp{constructor(t,e,i){super(t,e,i),this.type="skew",this.angle=null,this.angle=new y5(t,"angle",e)}},yv=class extends Op{constructor(t,e,i){super(t,e,i),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}},_v=class extends Op{constructor(t,e,i){super(t,e,i),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}};Oc=class r{constructor(t,e,i){this.document=t,this.transforms=[];var o=Qu1(e);o.forEach(n=>{if(n!=="none"){var[l,A]=Hu1(n),d=r.transformTypes[l];typeof d<"u"&&this.transforms.push(new d(this.document,A,i))}})}static fromElement(t,e){var i=e.getStyle("transform",!1,!0),[o,n=o]=e.getStyle("transform-origin",!1,!0).split(),l=[o,n];return i.hasValue()?new r(t,i.getString(),l):null}apply(t){for(var{transforms:e}=this,i=e.length,o=0;o<i;o++)e[o].apply(t)}unapply(t){for(var{transforms:e}=this,i=e.length,o=i-1;o>=0;o--)e[o].unapply(t)}applyToPoint(t){for(var{transforms:e}=this,i=e.length,o=0;o<i;o++)e[o].applyToPoint(t)}};Oc.transformTypes={translate:gv,rotate:mv,scale:vv,matrix:kp,skewX:yv,skewY:_v};H6=class r{constructor(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=t,this.node=e,this.captureTextNodes=i,this.attributes=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!e||e.nodeType!==1)){if(Array.from(e.attributes).forEach(A=>{var d=JK(A.nodeName);this.attributes[d]=new y5(t,d,A.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var o=this.getAttribute("style").getString().split(";").map(A=>A.trim());o.forEach(A=>{if(A){var[d,L]=A.split(":").map(C=>C.trim());this.styles[d]=new y5(t,d,L)}})}var{definitions:n}=t,l=this.getAttribute("id");l.hasValue()&&(n[l.getString()]||(n[l.getString()]=this)),Array.from(e.childNodes).forEach(A=>{if(A.nodeType===1)this.addChild(A);else if(i&&(A.nodeType===3||A.nodeType===4)){var d=t.createTextNode(A);d.getText().length>0&&this.addChild(d)}})}}getAttribute(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.attributes[t];if(!i&&e){var o=new y5(this.document,t,"");return this.attributes[t]=o,o}return i||y5.empty(this.document)}getHrefAttribute(){for(var t in this.attributes)if(t==="href"||t.endsWith(":href"))return this.attributes[t];return y5.empty(this.document)}getStyle(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,o=this.styles[t];if(o)return o;var n=this.getAttribute(t);if(n!=null&&n.hasValue())return this.styles[t]=n,n;if(!i){var{parent:l}=this;if(l){var A=l.getStyle(t);if(A!=null&&A.hasValue())return A}}if(e){var d=new y5(this.document,t,"");return this.styles[t]=d,d}return o||y5.empty(this.document)}render(t){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var i=this.getStyle("filter").getDefinition();i&&(this.applyEffects(t),i.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){var e=Oc.fromElement(this.document,this);e&&e.apply(t);var i=this.getStyle("clip-path",!1,!0);if(i.hasValue()){var o=i.getDefinition();o&&o.apply(t)}}clearContext(t){}renderChildren(t){this.children.forEach(e=>{e.render(t)})}addChild(t){var e=t instanceof r?t:this.document.createElement(t);e.parent=this,r.ignoreChildTypes.includes(e.type)||this.children.push(e)}matchesSelector(t){var e,{node:i}=this;if(typeof i.matches=="function")return i.matches(t);var o=(e=i.getAttribute)===null||e===void 0?void 0:e.call(i,"class");return!o||o===""?!1:o.split(" ").some(n=>".".concat(n)===t)}addStylesFromStyleDefinition(){var{styles:t,stylesSpecificity:e}=this.document;for(var i in t)if(!i.startsWith("@")&&this.matchesSelector(i)){var o=t[i],n=e[i];if(o)for(var l in o){var A=this.stylesSpecificity[l];typeof A>"u"&&(A="000"),n>=A&&(this.styles[l]=o[l],this.stylesSpecificity[l]=n)}}}removeStyles(t,e){var i=e.reduce((o,n)=>{var l=t.getStyle(n);if(!l.hasValue())return o;var A=l.getString();return l.setValue(""),[...o,[n,A]]},[]);return i}restoreStyles(t,e){e.forEach(i=>{var[o,n]=i;t.getStyle(o,!0).setValue(n)})}isFirstChild(){var t;return((t=this.parent)===null||t===void 0?void 0:t.children.indexOf(this))===0}};H6.ignoreChildTypes=["title"];xv=class extends H6{constructor(t,e,i){super(t,e,i)}};Jn=class r{constructor(t,e,i,o,n,l){var A=l?typeof l=="string"?r.parse(l):l:{};this.fontFamily=n||A.fontFamily,this.fontSize=o||A.fontSize,this.fontStyle=t||A.fontStyle,this.fontWeight=i||A.fontWeight,this.fontVariant=e||A.fontVariant}static parse(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,i="",o="",n="",l="",A="",d=Nc(t).trim().split(" "),L={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return d.forEach(C=>{switch(!0){case(!L.fontStyle&&r.styles.includes(C)):C!=="inherit"&&(i=C),L.fontStyle=!0;break;case(!L.fontVariant&&r.variants.includes(C)):C!=="inherit"&&(o=C),L.fontStyle=!0,L.fontVariant=!0;break;case(!L.fontWeight&&r.weights.includes(C)):C!=="inherit"&&(n=C),L.fontStyle=!0,L.fontVariant=!0,L.fontWeight=!0;break;case!L.fontSize:C!=="inherit"&&([l]=C.split("/")),L.fontStyle=!0,L.fontVariant=!0,L.fontWeight=!0,L.fontSize=!0;break;default:C!=="inherit"&&(A+=C)}}),new r(i,o,n,l,A,e)}toString(){return[ju1(this.fontStyle),this.fontVariant,qu1(this.fontWeight),this.fontSize,Gu1(this.fontFamily)].join(" ").trim()}};Jn.styles="normal|italic|oblique|inherit";Jn.variants="normal|small-caps|inherit";Jn.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";G7=class{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=t,this.y1=e,this.x2=i,this.y2=o,this.addPoint(t,e),this.addPoint(i,o)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(t,e){typeof t<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),typeof e<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}addX(t){this.addPoint(t,null)}addY(t){this.addPoint(null,t)}addBoundingBox(t){if(t){var{x1:e,y1:i,x2:o,y2:n}=t;this.addPoint(e,i),this.addPoint(o,n)}}sumCubic(t,e,i,o,n){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*i+3*(1-t)*Math.pow(t,2)*o+Math.pow(t,3)*n}bezierCurveAdd(t,e,i,o,n){var l=6*e-12*i+6*o,A=-3*e+9*i-9*o+3*n,d=3*i-3*e;if(A===0){if(l===0)return;var L=-d/l;0<L&&L<1&&(t?this.addX(this.sumCubic(L,e,i,o,n)):this.addY(this.sumCubic(L,e,i,o,n)));return}var C=Math.pow(l,2)-4*d*A;if(!(C<0)){var y=(-l+Math.sqrt(C))/(2*A);0<y&&y<1&&(t?this.addX(this.sumCubic(y,e,i,o,n)):this.addY(this.sumCubic(y,e,i,o,n)));var E=(-l-Math.sqrt(C))/(2*A);0<E&&E<1&&(t?this.addX(this.sumCubic(E,e,i,o,n)):this.addY(this.sumCubic(E,e,i,o,n)))}}addBezierCurve(t,e,i,o,n,l,A,d){this.addPoint(t,e),this.addPoint(A,d),this.bezierCurveAdd(!0,t,i,n,A),this.bezierCurveAdd(!1,e,o,l,d)}addQuadraticCurve(t,e,i,o,n,l){var A=t+.6666666666666666*(i-t),d=e+2/3*(o-e),L=A+1/3*(n-t),C=d+1/3*(l-e);this.addBezierCurve(t,e,A,L,d,C,n,l)}isPointInBox(t,e){var{x1:i,y1:o,x2:n,y2:l}=this;return i<=t&&t<=n&&o<=e&&e<=l}},j5=class extends Zt{constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new T8(0,0),this.control=new T8(0,0),this.current=new T8(0,0),this.points=[],this.angles=[]}isEnd(){var{i:t,commands:e}=this;return t>=e.length-1}next(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",i=new T8(this.command[t],this.command[e]);return this.makeAbsolute(i)}getAsControlPoint(t,e){var i=this.getPoint(t,e);return this.control=i,i}getAsCurrentPoint(t,e){var i=this.getPoint(t,e);return this.current=i,i}getReflectedControlPoint(){var t=this.previousCommand.type;if(t!==Zt.CURVE_TO&&t!==Zt.SMOOTH_CURVE_TO&&t!==Zt.QUAD_TO&&t!==Zt.SMOOTH_QUAD_TO)return this.current;var{current:{x:e,y:i},control:{x:o,y:n}}=this,l=new T8(2*e-o,2*i-n);return l}makeAbsolute(t){if(this.command.relative){var{x:e,y:i}=this.current;t.x+=e,t.y+=i}return t}addMarker(t,e,i){var{points:o,angles:n}=this;i&&n.length>0&&!n[n.length-1]&&(n[n.length-1]=o[o.length-1].angleTo(i)),this.addMarkerAngle(t,e?e.angleTo(t):null)}addMarkerAngle(t,e){this.points.push(t),this.angles.push(e)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:t}=this,e=t.length,i=0;i<e;i++)if(!t[i]){for(var o=i+1;o<e;o++)if(t[o]){t[i]=t[o];break}}return t}},$o=class extends H6{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var t=1,e=this;e;){var i=e.getStyle("opacity",!1,!0);i.hasValue(!0)&&(t*=i.getNumber()),e=e.parent}return t}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!e){var i=this.getStyle("fill"),o=this.getStyle("fill-opacity"),n=this.getStyle("stroke"),l=this.getStyle("stroke-opacity");if(i.isUrlDefinition()){var A=i.getFillStyleDefinition(this,o);A&&(t.fillStyle=A)}else if(i.hasValue()){i.getString()==="currentColor"&&i.setValue(this.getStyle("color").getColor());var d=i.getColor();d!=="inherit"&&(t.fillStyle=d==="none"?"rgba(0,0,0,0)":d)}if(o.hasValue()){var L=new y5(this.document,"fill",t.fillStyle).addOpacity(o).getColor();t.fillStyle=L}if(n.isUrlDefinition()){var C=n.getFillStyleDefinition(this,l);C&&(t.strokeStyle=C)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());var y=n.getString();y!=="inherit"&&(t.strokeStyle=y==="none"?"rgba(0,0,0,0)":y)}if(l.hasValue()){var E=new y5(this.document,"stroke",t.strokeStyle).addOpacity(l).getString();t.strokeStyle=E}var B=this.getStyle("stroke-width");if(B.hasValue()){var Z=B.getPixels();t.lineWidth=Z||Dc}var Q=this.getStyle("stroke-linecap"),V=this.getStyle("stroke-linejoin"),G=this.getStyle("stroke-miterlimit"),J=this.getStyle("stroke-dasharray"),n1=this.getStyle("stroke-dashoffset");if(Q.hasValue()&&(t.lineCap=Q.getString()),V.hasValue()&&(t.lineJoin=V.getString()),G.hasValue()&&(t.miterLimit=G.getNumber()),J.hasValue()&&J.getString()!=="none"){var r1=V7(J.getString());typeof t.setLineDash<"u"?t.setLineDash(r1):typeof t.webkitLineDash<"u"?t.webkitLineDash=r1:typeof t.mozDash<"u"&&!(r1.length===1&&r1[0]===0)&&(t.mozDash=r1);var m1=n1.getPixels();typeof t.lineDashOffset<"u"?t.lineDashOffset=m1:typeof t.webkitLineDashOffset<"u"?t.webkitLineDashOffset=m1:typeof t.mozDashOffset<"u"&&(t.mozDashOffset=m1)}}if(this.modifiedEmSizeStack=!1,typeof t.font<"u"){var w1=this.getStyle("font"),B1=this.getStyle("font-style"),g1=this.getStyle("font-variant"),L1=this.getStyle("font-weight"),z1=this.getStyle("font-size"),s1=this.getStyle("font-family"),x1=new Jn(B1.getString(),g1.getString(),L1.getString(),z1.hasValue()?"".concat(z1.getPixels(!0),"px"):"",s1.getString(),Jn.parse(w1.getString(),t.font));B1.setValue(x1.fontStyle),g1.setValue(x1.fontVariant),L1.setValue(x1.fontWeight),z1.setValue(x1.fontSize),s1.setValue(x1.fontFamily),t.font=x1.toString(),z1.isPixels()&&(this.document.emSize=z1.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}},r8=class r extends $o{constructor(t,e,i){super(t,e,i),this.type="path",this.pathParser=null,this.pathParser=new j5(this.getAttribute("d").getString())}path(t){var{pathParser:e}=this,i=new G7;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case j5.MOVE_TO:this.pathM(t,i);break;case j5.LINE_TO:this.pathL(t,i);break;case j5.HORIZ_LINE_TO:this.pathH(t,i);break;case j5.VERT_LINE_TO:this.pathV(t,i);break;case j5.CURVE_TO:this.pathC(t,i);break;case j5.SMOOTH_CURVE_TO:this.pathS(t,i);break;case j5.QUAD_TO:this.pathQ(t,i);break;case j5.SMOOTH_QUAD_TO:this.pathT(t,i);break;case j5.ARC:this.pathA(t,i);break;case j5.CLOSE_PATH:this.pathZ(t,i);break}return i}getBoundingBox(t){return this.path()}getMarkers(){var{pathParser:t}=this,e=t.getMarkerPoints(),i=t.getMarkerAngles(),o=e.map((n,l)=>[n,i[l]]);return o}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");t.fillStyle!==""&&(e.getString("inherit")!=="inherit"?t.fill(e.getString()):t.fill()),t.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var i=this.getMarkers();if(i){var o=i.length-1,n=this.getStyle("marker-start"),l=this.getStyle("marker-mid"),A=this.getStyle("marker-end");if(n.isUrlDefinition()){var d=n.getDefinition(),[L,C]=i[0];d.render(t,L,C)}if(l.isUrlDefinition())for(var y=l.getDefinition(),E=1;E<o;E++){var[B,Z]=i[E];y.render(t,B,Z)}if(A.isUrlDefinition()){var Q=A.getDefinition(),[V,G]=i[o];Q.render(t,V,G)}}}static pathM(t){var e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}pathM(t,e){var{pathParser:i}=this,{point:o}=r.pathM(i),{x:n,y:l}=o;i.addMarker(o),e.addPoint(n,l),t&&t.moveTo(n,l)}static pathL(t){var{current:e}=t,i=t.getAsCurrentPoint();return{current:e,point:i}}pathL(t,e){var{pathParser:i}=this,{current:o,point:n}=r.pathL(i),{x:l,y:A}=n;i.addMarker(n,o),e.addPoint(l,A),t&&t.lineTo(l,A)}static pathH(t){var{current:e,command:i}=t,o=new T8((i.relative?e.x:0)+i.x,e.y);return t.current=o,{current:e,point:o}}pathH(t,e){var{pathParser:i}=this,{current:o,point:n}=r.pathH(i),{x:l,y:A}=n;i.addMarker(n,o),e.addPoint(l,A),t&&t.lineTo(l,A)}static pathV(t){var{current:e,command:i}=t,o=new T8(e.x,(i.relative?e.y:0)+i.y);return t.current=o,{current:e,point:o}}pathV(t,e){var{pathParser:i}=this,{current:o,point:n}=r.pathV(i),{x:l,y:A}=n;i.addMarker(n,o),e.addPoint(l,A),t&&t.lineTo(l,A)}static pathC(t){var{current:e}=t,i=t.getPoint("x1","y1"),o=t.getAsControlPoint("x2","y2"),n=t.getAsCurrentPoint();return{current:e,point:i,controlPoint:o,currentPoint:n}}pathC(t,e){var{pathParser:i}=this,{current:o,point:n,controlPoint:l,currentPoint:A}=r.pathC(i);i.addMarker(A,l,n),e.addBezierCurve(o.x,o.y,n.x,n.y,l.x,l.y,A.x,A.y),t&&t.bezierCurveTo(n.x,n.y,l.x,l.y,A.x,A.y)}static pathS(t){var{current:e}=t,i=t.getReflectedControlPoint(),o=t.getAsControlPoint("x2","y2"),n=t.getAsCurrentPoint();return{current:e,point:i,controlPoint:o,currentPoint:n}}pathS(t,e){var{pathParser:i}=this,{current:o,point:n,controlPoint:l,currentPoint:A}=r.pathS(i);i.addMarker(A,l,n),e.addBezierCurve(o.x,o.y,n.x,n.y,l.x,l.y,A.x,A.y),t&&t.bezierCurveTo(n.x,n.y,l.x,l.y,A.x,A.y)}static pathQ(t){var{current:e}=t,i=t.getAsControlPoint("x1","y1"),o=t.getAsCurrentPoint();return{current:e,controlPoint:i,currentPoint:o}}pathQ(t,e){var{pathParser:i}=this,{current:o,controlPoint:n,currentPoint:l}=r.pathQ(i);i.addMarker(l,n,n),e.addQuadraticCurve(o.x,o.y,n.x,n.y,l.x,l.y),t&&t.quadraticCurveTo(n.x,n.y,l.x,l.y)}static pathT(t){var{current:e}=t,i=t.getReflectedControlPoint();t.control=i;var o=t.getAsCurrentPoint();return{current:e,controlPoint:i,currentPoint:o}}pathT(t,e){var{pathParser:i}=this,{current:o,controlPoint:n,currentPoint:l}=r.pathT(i);i.addMarker(l,n,n),e.addQuadraticCurve(o.x,o.y,n.x,n.y,l.x,l.y),t&&t.quadraticCurveTo(n.x,n.y,l.x,l.y)}static pathA(t){var{current:e,command:i}=t,{rX:o,rY:n,xRot:l,lArcFlag:A,sweepFlag:d}=i,L=l*(Math.PI/180),C=t.getAsCurrentPoint(),y=new T8(Math.cos(L)*(e.x-C.x)/2+Math.sin(L)*(e.y-C.y)/2,-Math.sin(L)*(e.x-C.x)/2+Math.cos(L)*(e.y-C.y)/2),E=Math.pow(y.x,2)/Math.pow(o,2)+Math.pow(y.y,2)/Math.pow(n,2);E>1&&(o*=Math.sqrt(E),n*=Math.sqrt(E));var B=(A===d?-1:1)*Math.sqrt((Math.pow(o,2)*Math.pow(n,2)-Math.pow(o,2)*Math.pow(y.y,2)-Math.pow(n,2)*Math.pow(y.x,2))/(Math.pow(o,2)*Math.pow(y.y,2)+Math.pow(n,2)*Math.pow(y.x,2)));isNaN(B)&&(B=0);var Z=new T8(B*o*y.y/n,B*-n*y.x/o),Q=new T8((e.x+C.x)/2+Math.cos(L)*Z.x-Math.sin(L)*Z.y,(e.y+C.y)/2+Math.sin(L)*Z.x+Math.cos(L)*Z.y),V=NT([1,0],[(y.x-Z.x)/o,(y.y-Z.y)/n]),G=[(y.x-Z.x)/o,(y.y-Z.y)/n],J=[(-y.x-Z.x)/o,(-y.y-Z.y)/n],n1=NT(G,J);return pv(G,J)<=-1&&(n1=Math.PI),pv(G,J)>=1&&(n1=0),{currentPoint:C,rX:o,rY:n,sweepFlag:d,xAxisRotation:L,centp:Q,a1:V,ad:n1}}pathA(t,e){var{pathParser:i}=this,{currentPoint:o,rX:n,rY:l,sweepFlag:A,xAxisRotation:d,centp:L,a1:C,ad:y}=r.pathA(i),E=1-A?1:-1,B=C+E*(y/2),Z=new T8(L.x+n*Math.cos(B),L.y+l*Math.sin(B));if(i.addMarkerAngle(Z,B-E*Math.PI/2),i.addMarkerAngle(o,B-E*Math.PI),e.addPoint(o.x,o.y),t&&!isNaN(C)&&!isNaN(y)){var Q=n>l?n:l,V=n>l?1:n/l,G=n>l?l/n:1;t.translate(L.x,L.y),t.rotate(d),t.scale(V,G),t.arc(0,0,Q,C,C+y,!!(1-A)),t.scale(1/V,1/G),t.rotate(-d),t.translate(-L.x,-L.y)}}static pathZ(t){t.current=t.start}pathZ(t,e){r.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}},Zp=class extends r8{constructor(t,e,i){super(t,e,i),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}},fl=class r extends $o{constructor(t,e,i){super(t,e,new.target===r?!0:i),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(t,e);var i=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();i&&(t.textBaseline=i)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if(this.type!=="text")return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var e=null;return this.children.forEach((i,o)=>{var n=this.getChildBoundingBox(t,this,this,o);e?e.addBoundingBox(n):e=n}),e}getFontSize(){var{document:t,parent:e}=this,i=Jn.parse(t.ctx.font).fontSize,o=e.getStyle("font-size").getNumber(i);return o}getTElementBoundingBox(t){var e=this.getFontSize();return new G7(this.x,this.y-e,this.x+this.measureText(t),this.y)}getGlyph(t,e,i){var o=e[i],n=null;if(t.isArabic){var l=e.length,A=e[i-1],d=e[i+1],L="isolated";if((i===0||A===" ")&&i<l-1&&d!==" "&&(L="terminal"),i>0&&A!==" "&&i<l-1&&d!==" "&&(L="medial"),i>0&&A!==" "&&(i===l-1||d===" ")&&(L="initial"),typeof t.glyphs[o]<"u"){var C=t.glyphs[o];n=C instanceof Zp?C:C[L]}}else n=t.glyphs[o];return n||(n=t.missingGlyph),n}getText(){return""}getTextFromNode(t){var e=t||this.node,i=Array.from(e.parentNode.childNodes),o=i.indexOf(e),n=i.length-1,l=Nc(e.textContent||"");return o===0&&(l=XK(l)),o===n&&(l=YK(l)),l}renderChildren(t){if(this.type!=="text"){this.renderTElementChildren(t);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((i,o)=>{this.renderChild(t,this,this,o)});var{mouse:e}=this.document.screen;e.isWorking()&&e.checkBoundingBox(this,this.getBoundingBox(t))}renderTElementChildren(t){var{document:e,parent:i}=this,o=this.getText(),n=i.getStyle("font-family").getDefinition();if(n){for(var{unitsPerEm:l}=n.fontFace,A=Jn.parse(e.ctx.font),d=i.getStyle("font-size").getNumber(A.fontSize),L=i.getStyle("font-style").getString(A.fontStyle),C=d/l,y=n.isRTL?o.split("").reverse().join(""):o,E=V7(i.getAttribute("dx").getString()),B=y.length,Z=0;Z<B;Z++){var Q=this.getGlyph(n,y,Z);t.translate(this.x,this.y),t.scale(C,-C);var V=t.lineWidth;t.lineWidth=t.lineWidth*l/d,L==="italic"&&t.transform(1,0,.4,1,0,0),Q.render(t),L==="italic"&&t.transform(1,0,-.4,1,0,0),t.lineWidth=V,t.scale(1/C,-1/C),t.translate(-this.x,-this.y),this.x+=d*(Q.horizAdvX||n.horizAdvX)/l,typeof E[Z]<"u"&&!isNaN(E[Z])&&(this.x+=E[Z])}return}var{x:G,y:J}=this;t.fillStyle&&t.fillText(o,G,J),t.strokeStyle&&t.strokeText(o,G,J)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start"),i=!1,o=0;e==="start"&&!i||e==="end"&&i?o=t.x-this.minX:e==="end"&&!i||e==="start"&&i?o=t.x-this.maxX:o=t.x-(this.minX+this.maxX)/2;for(var n=this.textChunkStart;n<this.leafTexts.length;n++)this.leafTexts[n].x+=o;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(t){this.children.forEach((e,i)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,i)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,e,i,o){var n=i.children[o];n.children.length>0?n.children.forEach((l,A)=>{e.adjustChildCoordinatesRecursiveCore(t,e,n,A)}):this.adjustChildCoordinates(t,e,i,o)}adjustChildCoordinates(t,e,i,o){var n=i.children[o];if(typeof n.measureText!="function")return n;t.save(),n.setContext(t,!0);var l=n.getAttribute("x"),A=n.getAttribute("y"),d=n.getAttribute("dx"),L=n.getAttribute("dy"),C=n.getStyle("font-family").getDefinition(),y=!!C&&C.isRTL;o===0&&(l.hasValue()||l.setValue(n.getInheritedAttribute("x")),A.hasValue()||A.setValue(n.getInheritedAttribute("y")),d.hasValue()||d.setValue(n.getInheritedAttribute("dx")),L.hasValue()||L.setValue(n.getInheritedAttribute("dy")));var E=n.measureText(t);return y&&(e.x-=E),l.hasValue()?(e.applyAnchoring(),n.x=l.getPixels("x"),d.hasValue()&&(n.x+=d.getPixels("x"))):(d.hasValue()&&(e.x+=d.getPixels("x")),n.x=e.x),e.x=n.x,y||(e.x+=E),A.hasValue()?(n.y=A.getPixels("y"),L.hasValue()&&(n.y+=L.getPixels("y"))):(L.hasValue()&&(e.y+=L.getPixels("y")),n.y=e.y),e.y=n.y,e.leafTexts.push(n),e.minX=Math.min(e.minX,n.x,n.x+E),e.maxX=Math.max(e.maxX,n.x,n.x+E),n.clearContext(t),t.restore(),n}getChildBoundingBox(t,e,i,o){var n=i.children[o];if(typeof n.getBoundingBox!="function")return null;var l=n.getBoundingBox(t);return l?(n.children.forEach((A,d)=>{var L=e.getChildBoundingBox(t,e,n,d);l.addBoundingBox(L)}),l):null}renderChild(t,e,i,o){var n=i.children[o];n.render(t),n.children.forEach((l,A)=>{e.renderChild(t,e,n,A)})}measureText(t){var{measureCache:e}=this;if(~e)return e;var i=this.getText(),o=this.measureTargetText(t,i);return this.measureCache=o,o}measureTargetText(t,e){if(!e.length)return 0;var{parent:i}=this,o=i.getStyle("font-family").getDefinition();if(o){for(var n=this.getFontSize(),l=o.isRTL?e.split("").reverse().join(""):e,A=V7(i.getAttribute("dx").getString()),d=l.length,L=0,C=0;C<d;C++){var y=this.getGlyph(o,l,C);L+=(y.horizAdvX||o.horizAdvX)*n/o.fontFace.unitsPerEm,typeof A[C]<"u"&&!isNaN(A[C])&&(L+=A[C])}return L}if(!t.measureText)return e.length*10;t.save(),this.setContext(t,!0);var{width:E}=t.measureText(e);return this.clearContext(t),t.restore(),E}getInheritedAttribute(t){for(var e=this;e instanceof r&&e.isFirstChild();){var i=e.parent.getAttribute(t);if(i.hasValue(!0))return i.getValue("0");e=e.parent}return null}},Np=class r extends fl{constructor(t,e,i){super(t,e,new.target===r?!0:i),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}},KT=class extends Np{constructor(){super(...arguments),this.type="textNode"}},pl=class extends $o{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(t){var e,{document:i}=this,{screen:o,window:n}=i,l=t.canvas;if(o.setDefaults(t),l.style&&typeof t.font<"u"&&n&&typeof n.getComputedStyle<"u"){t.font=n.getComputedStyle(l).getPropertyValue("font");var A=new y5(i,"fontSize",Jn.parse(t.font).fontSize);A.hasValue()&&(i.rootEmSize=A.getPixels("y"),i.emSize=i.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:d,height:L}=o.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var C=this.getAttribute("refX"),y=this.getAttribute("refY"),E=this.getAttribute("viewBox"),B=E.hasValue()?V7(E.getString()):null,Z=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",Q=0,V=0,G=0,J=0;B&&(Q=B[0],V=B[1]),this.root||(d=this.getStyle("width").getPixels("x"),L=this.getStyle("height").getPixels("y"),this.type==="marker"&&(G=Q,J=V,Q=0,V=0)),o.viewPort.setCurrent(d,L),this.node&&(!this.parent||((e=this.node.parentNode)===null||e===void 0?void 0:e.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),B&&(d=B[2],L=B[3]),i.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:o.viewPort.width,desiredWidth:d,height:o.viewPort.height,desiredHeight:L,minX:Q,minY:V,refX:C.getValue(),refY:y.getValue(),clip:Z,clipX:G,clipY:J}),B&&(o.viewPort.removeCurrent(),o.viewPort.setCurrent(d,L))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,o=this.getAttribute("width",!0),n=this.getAttribute("height",!0),l=this.getAttribute("viewBox"),A=this.getAttribute("style"),d=o.getNumber(0),L=n.getNumber(0);if(i)if(typeof i=="string")this.getAttribute("preserveAspectRatio",!0).setValue(i);else{var C=this.getAttribute("preserveAspectRatio");C.hasValue()&&C.setValue(C.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(o.setValue(t),n.setValue(e),l.hasValue()||l.setValue("0 0 ".concat(d||t," ").concat(L||e)),A.hasValue()){var y=this.getStyle("width"),E=this.getStyle("height");y.hasValue()&&y.setValue("".concat(t,"px")),E.hasValue()&&E.setValue("".concat(e,"px"))}}},Up=class extends r8{constructor(){super(...arguments),this.type="rect"}path(t){var e=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),o=this.getStyle("width",!1,!0).getPixels("x"),n=this.getStyle("height",!1,!0).getPixels("y"),l=this.getAttribute("rx"),A=this.getAttribute("ry"),d=l.getPixels("x"),L=A.getPixels("y");if(l.hasValue()&&!A.hasValue()&&(L=d),A.hasValue()&&!l.hasValue()&&(d=L),d=Math.min(d,o/2),L=Math.min(L,n/2),t){var C=4*((Math.sqrt(2)-1)/3);t.beginPath(),n>0&&o>0&&(t.moveTo(e+d,i),t.lineTo(e+o-d,i),t.bezierCurveTo(e+o-d+C*d,i,e+o,i+L-C*L,e+o,i+L),t.lineTo(e+o,i+n-L),t.bezierCurveTo(e+o,i+n-L+C*L,e+o-d+C*d,i+n,e+o-d,i+n),t.lineTo(e+d,i+n),t.bezierCurveTo(e+d-C*d,i+n,e,i+n-L+C*L,e,i+n-L),t.lineTo(e,i+L),t.bezierCurveTo(e,i+L-C*L,e+d-C*d,i,e+d,i),t.closePath())}return new G7(e,i,e+o,i+n)}getMarkers(){return null}},wv=class extends r8{constructor(){super(...arguments),this.type="circle"}path(t){var e=this.getAttribute("cx").getPixels("x"),i=this.getAttribute("cy").getPixels("y"),o=this.getAttribute("r").getPixels();return t&&o>0&&(t.beginPath(),t.arc(e,i,o,0,Math.PI*2,!1),t.closePath()),new G7(e-o,i-o,e+o,i+o)}getMarkers(){return null}},bv=class extends r8{constructor(){super(...arguments),this.type="ellipse"}path(t){var e=4*((Math.sqrt(2)-1)/3),i=this.getAttribute("rx").getPixels("x"),o=this.getAttribute("ry").getPixels("y"),n=this.getAttribute("cx").getPixels("x"),l=this.getAttribute("cy").getPixels("y");return t&&i>0&&o>0&&(t.beginPath(),t.moveTo(n+i,l),t.bezierCurveTo(n+i,l+e*o,n+e*i,l+o,n,l+o),t.bezierCurveTo(n-e*i,l+o,n-i,l+e*o,n-i,l),t.bezierCurveTo(n-i,l-e*o,n-e*i,l-o,n,l-o),t.bezierCurveTo(n+e*i,l-o,n+i,l-e*o,n+i,l),t.closePath()),new G7(n-i,l-o,n+i,l+o)}getMarkers(){return null}},Mv=class extends r8{constructor(){super(...arguments),this.type="line"}getPoints(){return[new T8(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new T8(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){var[{x:e,y:i},{x:o,y:n}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(e,i),t.lineTo(o,n)),new G7(e,i,o,n)}getMarkers(){var[t,e]=this.getPoints(),i=t.angleTo(e);return[[t,i],[e,i]]}},Qp=class extends r8{constructor(t,e,i){super(t,e,i),this.type="polyline",this.points=[],this.points=T8.parsePath(this.getAttribute("points").getString())}path(t){var{points:e}=this,[{x:i,y:o}]=e,n=new G7(i,o);return t&&(t.beginPath(),t.moveTo(i,o)),e.forEach(l=>{var{x:A,y:d}=l;n.addPoint(A,d),t&&t.lineTo(A,d)}),n}getMarkers(){var{points:t}=this,e=t.length-1,i=[];return t.forEach((o,n)=>{n!==e&&i.push([o,o.angleTo(t[n+1])])}),i.length>0&&i.push([t[t.length-1],i[i.length-1][1]]),i}},Bv=class extends Qp{constructor(){super(...arguments),this.type="polygon"}path(t){var e=super.path(t),[{x:i,y:o}]=this.points;return t&&(t.lineTo(i,o),t.closePath()),e}},Sv=class extends H6{constructor(){super(...arguments),this.type="pattern"}createPattern(t,e,i){var o=this.getStyle("width").getPixels("x",!0),n=this.getStyle("height").getPixels("y",!0),l=new pl(this.document,null);l.attributes.viewBox=new y5(this.document,"viewBox",this.getAttribute("viewBox").getValue()),l.attributes.width=new y5(this.document,"width","".concat(o,"px")),l.attributes.height=new y5(this.document,"height","".concat(n,"px")),l.attributes.transform=new y5(this.document,"transform",this.getAttribute("patternTransform").getValue()),l.children=this.children;var A=this.document.createCanvas(o,n),d=A.getContext("2d"),L=this.getAttribute("x"),C=this.getAttribute("y");L.hasValue()&&C.hasValue()&&d.translate(L.getPixels("x",!0),C.getPixels("y",!0)),i.hasValue()?this.styles["fill-opacity"]=i:Reflect.deleteProperty(this.styles,"fill-opacity");for(var y=-1;y<=1;y++)for(var E=-1;E<=1;E++)d.save(),l.attributes.x=new y5(this.document,"x",y*A.width),l.attributes.y=new y5(this.document,"y",E*A.height),l.render(d),d.restore();var B=t.createPattern(A,"repeat");return B}},Ev=class extends H6{constructor(){super(...arguments),this.type="marker"}render(t,e,i){if(e){var{x:o,y:n}=e,l=this.getAttribute("orient").getString("auto"),A=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(o,n),l==="auto"&&t.rotate(i),A==="strokeWidth"&&t.scale(t.lineWidth,t.lineWidth),t.save();var d=new pl(this.document,null);d.type=this.type,d.attributes.viewBox=new y5(this.document,"viewBox",this.getAttribute("viewBox").getValue()),d.attributes.refX=new y5(this.document,"refX",this.getAttribute("refX").getValue()),d.attributes.refY=new y5(this.document,"refY",this.getAttribute("refY").getValue()),d.attributes.width=new y5(this.document,"width",this.getAttribute("markerWidth").getValue()),d.attributes.height=new y5(this.document,"height",this.getAttribute("markerHeight").getValue()),d.attributes.overflow=new y5(this.document,"overflow",this.getAttribute("overflow").getValue()),d.attributes.fill=new y5(this.document,"fill",this.getAttribute("fill").getColor("black")),d.attributes.stroke=new y5(this.document,"stroke",this.getAttribute("stroke").getValue("none")),d.children=this.children,d.render(t),t.restore(),A==="strokeWidth"&&t.scale(1/t.lineWidth,1/t.lineWidth),l==="auto"&&t.rotate(-i),t.translate(-o,-n)}}},Tv=class extends H6{constructor(){super(...arguments),this.type="defs"}render(){}},iA=class extends $o{constructor(){super(...arguments),this.type="g"}getBoundingBox(t){var e=new G7;return this.children.forEach(i=>{e.addBoundingBox(i.getBoundingBox(t))}),e}},Hp=class extends H6{constructor(t,e,i){super(t,e,i),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:o,children:n}=this;n.forEach(l=>{l.type==="stop"&&o.push(l)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,e,i){var o=this;this.getHrefAttribute().hasValue()&&(o=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(o));var{stops:n}=o,l=this.getGradient(t,e);if(!l)return this.addParentOpacity(i,n[n.length-1].color);if(n.forEach(V=>{l.addColorStop(V.offset,this.addParentOpacity(i,V.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:A}=this,{MAX_VIRTUAL_PIXELS:d,viewPort:L}=A.screen,[C]=L.viewPorts,y=new Up(A,null);y.attributes.x=new y5(A,"x",-d/3),y.attributes.y=new y5(A,"y",-d/3),y.attributes.width=new y5(A,"width",d),y.attributes.height=new y5(A,"height",d);var E=new iA(A,null);E.attributes.transform=new y5(A,"transform",this.getAttribute("gradientTransform").getValue()),E.children=[y];var B=new pl(A,null);B.attributes.x=new y5(A,"x",0),B.attributes.y=new y5(A,"y",0),B.attributes.width=new y5(A,"width",C.width),B.attributes.height=new y5(A,"height",C.height),B.children=[E];var Z=A.createCanvas(C.width,C.height),Q=Z.getContext("2d");return Q.fillStyle=l,B.render(Q),Q.createPattern(Z,"no-repeat")}return l}inheritStopContainer(t){this.attributesToInherit.forEach(e=>{!this.getAttribute(e).hasValue()&&t.getAttribute(e).hasValue()&&this.getAttribute(e,!0).setValue(t.getAttribute(e).getValue())})}addParentOpacity(t,e){if(t.hasValue()){var i=new y5(this.document,"color",e);return i.addOpacity(t).getColor()}return e}},Iv=class extends Hp{constructor(t,e,i){super(t,e,i),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(t,e){var i=this.getGradientUnits()==="objectBoundingBox",o=i?e.getBoundingBox(t):null;if(i&&!o)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var n=i?o.x+o.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),l=i?o.y+o.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),A=i?o.x+o.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),d=i?o.y+o.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return n===A&&l===d?null:t.createLinearGradient(n,l,A,d)}},Fv=class extends Hp{constructor(t,e,i){super(t,e,i),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(t,e){var i=this.getGradientUnits()==="objectBoundingBox",o=e.getBoundingBox(t);if(i&&!o)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var n=i?o.x+o.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),l=i?o.y+o.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),A=n,d=l;this.getAttribute("fx").hasValue()&&(A=i?o.x+o.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(d=i?o.y+o.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var L=i?(o.width+o.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),C=this.getAttribute("fr").getPixels();return t.createRadialGradient(A,d,C,n,l,L)}},Pv=class extends H6{constructor(t,e,i){super(t,e,i),this.type="stop";var o=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),n=this.getStyle("stop-opacity"),l=this.getStyle("stop-color",!0);l.getString()===""&&l.setValue("#000"),n.hasValue()&&(l=l.addOpacity(n)),this.offset=o,this.color=l.getColor()}},nA=class extends H6{constructor(t,e,i){super(t,e,i),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,t.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new y5(t,"values",null);var o=this.getAttribute("values");o.hasValue()&&this.values.setValue(o.getString().split(";"))}getProperty(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return t==="CSS"?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}calcValue(){var{initialUnits:t}=this,{progress:e,from:i,to:o}=this.getProgress(),n=i.getNumber()+(o.getNumber()-i.getNumber())*e;return t==="%"&&(n*=100),"".concat(n).concat(t)}update(t){var{parent:e}=this,i=this.getProperty();if(this.initialValue||(this.initialValue=i.getString(),this.initialUnits=i.getUnits()),this.duration>this.maxDuration){var o=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(o==="freeze"&&!this.frozen)this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=i.getString();else if(o==="remove"&&!this.removed)return this.removed=!0,i.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=t;var n=!1;if(this.begin<this.duration){var l=this.calcValue(),A=this.getAttribute("type");if(A.hasValue()){var d=A.getString();l="".concat(d,"(").concat(l,")")}i.setValue(l),n=!0}return n}getProgress(){var{document:t,values:e}=this,i={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var o=i.progress*(e.getValue().length-1),n=Math.floor(o),l=Math.ceil(o);i.from=new y5(t,"from",parseFloat(e.getValue()[n])),i.to=new y5(t,"to",parseFloat(e.getValue()[l])),i.progress=(o-n)/(l-n)}else i.from=this.from,i.to=this.to;return i}},Rv=class extends nA{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:t,from:e,to:i}=this.getProgress(),o=new fv.default(e.getColor()),n=new fv.default(i.getColor());if(o.ok&&n.ok){var l=o.r+(n.r-o.r)*t,A=o.g+(n.g-o.g)*t,d=o.b+(n.b-o.b)*t;return"rgb(".concat(Math.floor(l),", ").concat(Math.floor(A),", ").concat(Math.floor(d),")")}return this.getAttribute("from").getColor()}},zv=class extends nA{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:t,from:e,to:i}=this.getProgress(),o=V7(e.getString()),n=V7(i.getString()),l=o.map((A,d)=>{var L=n[d];return A+(L-A)*t}).join(" ");return l}},Dv=class extends H6{constructor(t,e,i){super(t,e,i),this.type="font",this.glyphs=Object.create(null),this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:o}=t,{children:n}=this;for(var l of n)switch(l.type){case"font-face":{this.fontFace=l;var A=l.getStyle("font-family");A.hasValue()&&(o[A.getString()]=this);break}case"missing-glyph":this.missingGlyph=l;break;case"glyph":{var d=l;d.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[d.unicode]>"u"&&(this.glyphs[d.unicode]=Object.create(null)),this.glyphs[d.unicode][d.arabicForm]=d):this.glyphs[d.unicode]=d;break}}}render(){}},kv=class extends H6{constructor(t,e,i){super(t,e,i),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}},Ov=class extends r8{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}},Zv=class extends fl{constructor(){super(...arguments),this.type="tref"}getText(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}},Nv=class extends fl{constructor(t,e,i){super(t,e,i),this.type="a";var{childNodes:o}=e,n=o[0],l=o.length>0&&Array.from(o).every(A=>A.nodeType===3);this.hasText=l,this.text=l?this.getTextFromNode(n):""}getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);var{document:e,x:i,y:o}=this,{mouse:n}=e.screen,l=new y5(e,"fontSize",Jn.parse(e.ctx.font).fontSize);n.isWorking()&&n.checkBoundingBox(this,new G7(i,o-l.getPixels("y"),i+this.measureText(t),o))}else if(this.children.length>0){var A=new iA(this.document,null);A.children=this.children,A.parent=this,A.render(t)}}onClick(){var{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){var t=this.document.ctx;t.canvas.style.cursor="pointer"}};Uv=class extends fl{constructor(t,e,i){super(t,e,i),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var o=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(o)}getText(){return this.text}path(t){var{dataArray:e}=this;t&&t.beginPath(),e.forEach(i=>{var{type:o,points:n}=i;switch(o){case j5.LINE_TO:t&&t.lineTo(n[0],n[1]);break;case j5.MOVE_TO:t&&t.moveTo(n[0],n[1]);break;case j5.CURVE_TO:t&&t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case j5.QUAD_TO:t&&t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case j5.ARC:{var[l,A,d,L,C,y,E,B]=n,Z=d>L?d:L,Q=d>L?1:d/L,V=d>L?L/d:1;t&&(t.translate(l,A),t.rotate(E),t.scale(Q,V),t.arc(0,0,Z,C,C+y,!!(1-B)),t.scale(1/Q,1/V),t.rotate(-E),t.translate(-l,-A));break}case j5.CLOSE_PATH:t&&t.closePath();break}})}renderChildren(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),i=this.getFontSize(),{glyphInfo:o}=this,n=t.fillStyle;e==="underline"&&t.beginPath(),o.forEach((l,A)=>{var{p0:d,p1:L,rotation:C,text:y}=l;t.save(),t.translate(d.x,d.y),t.rotate(C),t.fillStyle&&t.fillText(y,0,0),t.strokeStyle&&t.strokeText(y,0,0),t.restore(),e==="underline"&&(A===0&&t.moveTo(d.x,d.y+i/8),t.lineTo(L.x,L.y+i/5))}),e==="underline"&&(t.lineWidth=i/20,t.strokeStyle=n,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[t]||0}findSegmentToFitChar(t,e,i,o,n,l,A,d,L){var C=l,y=this.measureText(t,d);d===" "&&e==="justify"&&i<o&&(y+=(o-i)/n),L>-1&&(C+=this.getLetterSpacingAt(L));var E=this.textHeight/20,B=this.getEquidistantPointOnPath(C,E,0),Z=this.getEquidistantPointOnPath(C+y,E,0),Q={p0:B,p1:Z},V=B&&Z?Math.atan2(Z.y-B.y,Z.x-B.x):0;if(A){var G=Math.cos(Math.PI/2+V)*A,J=Math.cos(-V)*A;Q.p0=uv(uv({},B),{},{x:B.x+G,y:B.y+J}),Q.p1=uv(uv({},Z),{},{x:Z.x+G,y:Z.y+J})}return C+=y,{offset:C,segment:Q,rotation:V}}measureText(t,e){var{measuresCache:i}=this,o=e||this.getText();if(i.has(o))return i.get(o);var n=this.measureTargetText(t,o);return i.set(o,n),n}setTextData(t){if(!this.glyphInfo){var e=this.getText(),i=e.split(""),o=e.split(" ").length-1,n=this.parent.getAttribute("dx").split().map(r1=>r1.getPixels("x")),l=this.parent.getAttribute("dy").getPixels("y"),A=this.parent.getStyle("text-anchor").getString("start"),d=this.getStyle("letter-spacing"),L=this.parent.getStyle("letter-spacing"),C=0;!d.hasValue()||d.getValue()==="inherit"?C=L.getPixels():d.hasValue()&&d.getValue()!=="initial"&&d.getValue()!=="unset"&&(C=d.getPixels());var y=[],E=e.length;this.letterSpacingCache=y;for(var B=0;B<E;B++)y.push(typeof n[B]<"u"?n[B]:C);var Z=y.reduce((r1,m1,w1)=>w1===0?0:r1+m1||0,0),Q=this.measureText(t),V=Math.max(Q+Z,0);this.textWidth=Q,this.textHeight=this.getFontSize(),this.glyphInfo=[];var G=this.getPathLength(),J=this.getStyle("startOffset").getNumber(0)*G,n1=0;(A==="middle"||A==="center")&&(n1=-V/2),(A==="end"||A==="right")&&(n1=-V),n1+=J,i.forEach((r1,m1)=>{var{offset:w1,segment:B1,rotation:g1}=this.findSegmentToFitChar(t,A,V,G,o,n1,l,r1,m1);n1=w1,!(!B1.p0||!B1.p1)&&this.glyphInfo.push({text:i[m1],p0:B1.p0,p1:B1.p1,rotation:g1})})}}parsePathData(t){if(this.pathLength=-1,!t)return[];var e=[],{pathParser:i}=t;for(i.reset();!i.isEnd();){var{current:o}=i,n=o?o.x:0,l=o?o.y:0,A=i.next(),d=A.type,L=[];switch(A.type){case j5.MOVE_TO:this.pathM(i,L);break;case j5.LINE_TO:d=this.pathL(i,L);break;case j5.HORIZ_LINE_TO:d=this.pathH(i,L);break;case j5.VERT_LINE_TO:d=this.pathV(i,L);break;case j5.CURVE_TO:this.pathC(i,L);break;case j5.SMOOTH_CURVE_TO:d=this.pathS(i,L);break;case j5.QUAD_TO:this.pathQ(i,L);break;case j5.SMOOTH_QUAD_TO:d=this.pathT(i,L);break;case j5.ARC:L=this.pathA(i);break;case j5.CLOSE_PATH:r8.pathZ(i);break}A.type!==j5.CLOSE_PATH?e.push({type:d,points:L,start:{x:n,y:l},pathLength:this.calcLength(n,l,d,L)}):e.push({type:j5.CLOSE_PATH,points:[],pathLength:0})}return e}pathM(t,e){var{x:i,y:o}=r8.pathM(t).point;e.push(i,o)}pathL(t,e){var{x:i,y:o}=r8.pathL(t).point;return e.push(i,o),j5.LINE_TO}pathH(t,e){var{x:i,y:o}=r8.pathH(t).point;return e.push(i,o),j5.LINE_TO}pathV(t,e){var{x:i,y:o}=r8.pathV(t).point;return e.push(i,o),j5.LINE_TO}pathC(t,e){var{point:i,controlPoint:o,currentPoint:n}=r8.pathC(t);e.push(i.x,i.y,o.x,o.y,n.x,n.y)}pathS(t,e){var{point:i,controlPoint:o,currentPoint:n}=r8.pathS(t);return e.push(i.x,i.y,o.x,o.y,n.x,n.y),j5.CURVE_TO}pathQ(t,e){var{controlPoint:i,currentPoint:o}=r8.pathQ(t);e.push(i.x,i.y,o.x,o.y)}pathT(t,e){var{controlPoint:i,currentPoint:o}=r8.pathT(t);return e.push(i.x,i.y,o.x,o.y),j5.QUAD_TO}pathA(t){var{rX:e,rY:i,sweepFlag:o,xAxisRotation:n,centp:l,a1:A,ad:d}=r8.pathA(t);return o===0&&d>0&&(d-=2*Math.PI),o===1&&d<0&&(d+=2*Math.PI),[l.x,l.y,e,i,A,d,n,o]}calcLength(t,e,i,o){var n=0,l=null,A=null,d=0;switch(i){case j5.LINE_TO:return this.getLineLength(t,e,o[0],o[1]);case j5.CURVE_TO:for(n=0,l=this.getPointOnCubicBezier(0,t,e,o[0],o[1],o[2],o[3],o[4],o[5]),d=.01;d<=1;d+=.01)A=this.getPointOnCubicBezier(d,t,e,o[0],o[1],o[2],o[3],o[4],o[5]),n+=this.getLineLength(l.x,l.y,A.x,A.y),l=A;return n;case j5.QUAD_TO:for(n=0,l=this.getPointOnQuadraticBezier(0,t,e,o[0],o[1],o[2],o[3]),d=.01;d<=1;d+=.01)A=this.getPointOnQuadraticBezier(d,t,e,o[0],o[1],o[2],o[3]),n+=this.getLineLength(l.x,l.y,A.x,A.y),l=A;return n;case j5.ARC:{n=0;var L=o[4],C=o[5],y=o[4]+C,E=Math.PI/180;if(Math.abs(L-y)<E&&(E=Math.abs(L-y)),l=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],L,0),C<0)for(d=L-E;d>y;d-=E)A=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],d,0),n+=this.getLineLength(l.x,l.y,A.x,A.y),l=A;else for(d=L+E;d<y;d+=E)A=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],d,0),n+=this.getLineLength(l.x,l.y,A.x,A.y),l=A;return A=this.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],y,0),n+=this.getLineLength(l.x,l.y,A.x,A.y),n}}return 0}getPointOnLine(t,e,i,o,n){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e,A=arguments.length>6&&arguments[6]!==void 0?arguments[6]:i,d=(n-i)/(o-e+Dc),L=Math.sqrt(t*t/(1+d*d));o<e&&(L*=-1);var C=d*L,y=null;if(o===e)y={x:l,y:A+C};else if((A-i)/(l-e+Dc)===d)y={x:l+L,y:A+C};else{var E=0,B=0,Z=this.getLineLength(e,i,o,n);if(Z<Dc)return null;var Q=(l-e)*(o-e)+(A-i)*(n-i);Q/=Z*Z,E=e+Q*(o-e),B=i+Q*(n-i);var V=this.getLineLength(l,A,E,B),G=Math.sqrt(t*t-V*V);L=Math.sqrt(G*G/(1+d*d)),o<e&&(L*=-1),C=d*L,y={x:E+L,y:B+C}}return y}getPointOnPath(t){var e=this.getPathLength(),i=0,o=null;if(t<-5e-5||t-5e-5>e)return null;var{dataArray:n}=this;for(var l of n){if(l&&(l.pathLength<5e-5||i+l.pathLength+5e-5<t)){i+=l.pathLength;continue}var A=t-i,d=0;switch(l.type){case j5.LINE_TO:o=this.getPointOnLine(A,l.start.x,l.start.y,l.points[0],l.points[1],l.start.x,l.start.y);break;case j5.ARC:{var L=l.points[4],C=l.points[5],y=l.points[4]+C;if(d=L+A/l.pathLength*C,C<0&&d<y||C>=0&&d>y)break;o=this.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],d,l.points[6]);break}case j5.CURVE_TO:d=A/l.pathLength,d>1&&(d=1),o=this.getPointOnCubicBezier(d,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3],l.points[4],l.points[5]);break;case j5.QUAD_TO:d=A/l.pathLength,d>1&&(d=1),o=this.getPointOnQuadraticBezier(d,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3]);break}if(o)return o;break}return null}getLineLength(t,e,i,o){return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((t,e)=>e.pathLength>0?t+e.pathLength:t,0)),this.pathLength}getPointOnCubicBezier(t,e,i,o,n,l,A,d,L){var C=d*UT(t)+l*QT(t)+o*HT(t)+e*VT(t),y=L*UT(t)+A*QT(t)+n*HT(t)+i*VT(t);return{x:C,y}}getPointOnQuadraticBezier(t,e,i,o,n,l,A){var d=l*GT(t)+o*jT(t)+e*qT(t),L=A*GT(t)+n*jT(t)+i*qT(t);return{x:d,y:L}}getPointOnEllipticalArc(t,e,i,o,n,l){var A=Math.cos(l),d=Math.sin(l),L={x:i*Math.cos(n),y:o*Math.sin(n)};return{x:t+(L.x*A-L.y*d),y:e+(L.x*d+L.y*A)}}buildEquidistantCache(t,e){var i=this.getPathLength(),o=e||.25,n=t||i/100;if(!this.equidistantCache||this.equidistantCache.step!==n||this.equidistantCache.precision!==o){this.equidistantCache={step:n,precision:o,points:[]};for(var l=0,A=0;A<=i;A+=o){var d=this.getPointOnPath(A),L=this.getPointOnPath(A+o);!d||!L||(l+=this.getLineLength(d.x,d.y,L.x,L.y),l>=n&&(this.equidistantCache.points.push({x:d.x,y:d.y,distance:A}),l-=n))}}}getEquidistantPointOnPath(t,e,i){if(this.buildEquidistantCache(e,i),t<0||t-this.getPathLength()>5e-5)return null;var o=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[o]||null}},Ku1=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i,Qv=class extends $o{constructor(t,e,i){super(t,e,i),this.type="image",this.loaded=!1;var o=this.getHrefAttribute().getString();if(o){var n=o.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(o);t.images.push(this),n?this.loadSvg(o):this.loadImage(o),this.isSvg=n}}loadImage(t){var e=this;return K4(function*(){try{var i=yield e.document.createImage(t);e.image=i}catch(o){console.error('Error while loading image "'.concat(t,'":'),o)}e.loaded=!0})()}loadSvg(t){var e=this;return K4(function*(){var i=Ku1.exec(t);if(i){var o=i[5];i[4]==="base64"?e.image=atob(o):e.image=decodeURIComponent(o)}else try{var n=yield e.document.fetch(t),l=yield n.text();e.image=l}catch(A){console.error('Error while loading image "'.concat(t,'":'),A)}e.loaded=!0})()}renderChildren(t){var{document:e,image:i,loaded:o}=this,n=this.getAttribute("x").getPixels("x"),l=this.getAttribute("y").getPixels("y"),A=this.getStyle("width").getPixels("x"),d=this.getStyle("height").getPixels("y");if(!(!o||!i||!A||!d)){if(t.save(),t.translate(n,l),this.isSvg){var L=e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:A,scaleHeight:d});L.document.documentElement.parent=this,L.render()}else{var C=this.image;e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:A,desiredWidth:C.width,height:d,desiredHeight:C.height}),this.loaded&&(typeof C.complete>"u"||C.complete)&&t.drawImage(C,0,0)}t.restore()}}getBoundingBox(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),i=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");return new G7(t,e,t+i,e+o)}},Hv=class extends $o{constructor(){super(...arguments),this.type="symbol"}render(t){}},Vv=class{constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}load(t,e){var i=this;return K4(function*(){try{var{document:o}=i,n=yield o.canvg.parser.load(e),l=n.getElementsByTagName("font");Array.from(l).forEach(A=>{var d=o.createElement(A);o.definitions[t]=d})}catch(A){console.error('Error while loading font "'.concat(e,'":'),A)}i.loaded=!0})()}},Vp=class extends H6{constructor(t,e,i){super(t,e,i),this.type="style";var o=Nc(Array.from(e.childNodes).map(l=>l.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),n=o.split("}");n.forEach(l=>{var A=l.trim();if(A){var d=A.split("{"),L=d[0].split(","),C=d[1].split(";");L.forEach(y=>{var E=y.trim();if(E){var B=t.styles[E]||{};if(C.forEach(V=>{var G=V.indexOf(":"),J=V.substr(0,G).trim(),n1=V.substr(G+1,V.length-G).trim();J&&n1&&(B[J]=new y5(t,J,n1))}),t.styles[E]=B,t.stylesSpecificity[E]=eW(E),E==="@font-face"){var Z=B["font-family"].getString().replace(/"|'/g,""),Q=B.src.getString().split(",");Q.forEach(V=>{if(V.indexOf('format("svg")')>0){var G=XT(V);G&&new Vv(t).load(Z,G)}})}}})}})}};Vp.parseExternalUrl=XT;Gv=class extends $o{constructor(){super(...arguments),this.type="use"}setContext(t){super.setContext(t);var e=this.getAttribute("x"),i=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),i.hasValue()&&t.translate(0,i.getPixels("y"))}path(t){var{element:e}=this;e&&e.path(t)}renderChildren(t){var{document:e,element:i}=this;if(i){var o=i;if(i.type==="symbol"&&(o=new pl(e,null),o.attributes.viewBox=new y5(e,"viewBox",i.getAttribute("viewBox").getString()),o.attributes.preserveAspectRatio=new y5(e,"preserveAspectRatio",i.getAttribute("preserveAspectRatio").getString()),o.attributes.overflow=new y5(e,"overflow",i.getAttribute("overflow").getString()),o.children=i.children,i.styles.opacity=new y5(e,"opacity",this.calculateOpacity())),o.type==="svg"){var n=this.getStyle("width",!1,!0),l=this.getStyle("height",!1,!0);n.hasValue()&&(o.attributes.width=new y5(e,"width",n.getString())),l.hasValue()&&(o.attributes.height=new y5(e,"height",l.getString()))}var A=o.parent;o.parent=this,o.render(t),o.parent=A}}getBoundingBox(t){var{element:e}=this;return e?e.getBoundingBox(t):null}elementTransform(){var{document:t,element:e}=this;return Oc.fromElement(t,e)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}};Gp=class extends H6{constructor(t,e,i){super(t,e,i),this.type="feColorMatrix";var o=V7(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var n=o[0];o=[.213+.787*n,.715-.715*n,.072-.072*n,0,0,.213-.213*n,.715+.285*n,.072-.072*n,0,0,.213-.213*n,.715-.715*n,.072+.928*n,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var l=o[0]*Math.PI/180;o=[ss(l,.213,.787,-.213),ss(l,.715,-.715,-.715),ss(l,.072,-.072,.928),0,0,ss(l,.213,-.213,.143),ss(l,.715,.285,.14),ss(l,.072,-.072,-.283),0,0,ss(l,.213,-.213,-.787),ss(l,.715,-.715,.715),ss(l,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=o,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(t,e,i,o,n){for(var{includeOpacity:l,matrix:A}=this,d=t.getImageData(0,0,o,n),L=0;L<n;L++)for(var C=0;C<o;C++){var y=hv(d.data,C,L,o,n,0),E=hv(d.data,C,L,o,n,1),B=hv(d.data,C,L,o,n,2),Z=hv(d.data,C,L,o,n,3),Q=E8(A,0,y)+E8(A,1,E)+E8(A,2,B)+E8(A,3,Z)+E8(A,4,1),V=E8(A,5,y)+E8(A,6,E)+E8(A,7,B)+E8(A,8,Z)+E8(A,9,1),G=E8(A,10,y)+E8(A,11,E)+E8(A,12,B)+E8(A,13,Z)+E8(A,14,1),J=E8(A,15,y)+E8(A,16,E)+E8(A,17,B)+E8(A,18,Z)+E8(A,19,1);l&&(Q=0,V=0,G=0,J*=Z/255),Av(d.data,C,L,o,n,0,Q),Av(d.data,C,L,o,n,1,V),Av(d.data,C,L,o,n,2,G),Av(d.data,C,L,o,n,3,J)}t.clearRect(0,0,o,n),t.putImageData(d,0,0)}},jp=class r extends H6{constructor(){super(...arguments),this.type="mask"}apply(t,e){var{document:i}=this,o=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),l=this.getStyle("width").getPixels("x"),A=this.getStyle("height").getPixels("y");if(!l&&!A){var d=new G7;this.children.forEach(Z=>{d.addBoundingBox(Z.getBoundingBox(t))}),o=Math.floor(d.x1),n=Math.floor(d.y1),l=Math.floor(d.width),A=Math.floor(d.height)}var L=this.removeStyles(e,r.ignoreStyles),C=i.createCanvas(o+l,n+A),y=C.getContext("2d");i.screen.setDefaults(y),this.renderChildren(y),new Gp(i,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(y,0,0,o+l,n+A);var E=i.createCanvas(o+l,n+A),B=E.getContext("2d");i.screen.setDefaults(B),e.render(B),B.globalCompositeOperation="destination-in",B.fillStyle=y.createPattern(C,"no-repeat"),B.fillRect(0,0,o+l,n+A),t.fillStyle=B.createPattern(E,"no-repeat"),t.fillRect(0,0,o+l,n+A),this.restoreStyles(e,L)}render(t){}};jp.ignoreStyles=["mask","transform","clip-path"];KK=()=>{},jv=class extends H6{constructor(){super(...arguments),this.type="clipPath"}apply(t){var{document:e}=this,i=Reflect.getPrototypeOf(t),{beginPath:o,closePath:n}=t;i&&(i.beginPath=KK,i.closePath=KK),Reflect.apply(o,t,[]),this.children.forEach(l=>{if(!(typeof l.path>"u")){var A=typeof l.elementTransform<"u"?l.elementTransform():null;A||(A=Oc.fromElement(e,l)),A&&A.apply(t),l.path(t),i&&(i.closePath=n),A&&A.unapply(t)}}),Reflect.apply(n,t,[]),t.clip(),i&&(i.beginPath=o,i.closePath=n)}render(t){}},qp=class r extends H6{constructor(){super(...arguments),this.type="filter"}apply(t,e){var{document:i,children:o}=this,n=e.getBoundingBox(t);if(n){var l=0,A=0;o.forEach(G=>{var J=G.extraFilterDistance||0;l=Math.max(l,J),A=Math.max(A,J)});var d=Math.floor(n.width),L=Math.floor(n.height),C=d+2*l,y=L+2*A;if(!(C<1||y<1)){var E=Math.floor(n.x),B=Math.floor(n.y),Z=this.removeStyles(e,r.ignoreStyles),Q=i.createCanvas(C,y),V=Q.getContext("2d");i.screen.setDefaults(V),V.translate(-E+l,-B+A),e.render(V),o.forEach(G=>{typeof G.apply=="function"&&G.apply(V,0,0,C,y)}),t.drawImage(Q,0,0,C,y,E-l,B-A,C,y),this.restoreStyles(e,Z)}}}render(t){}};qp.ignoreStyles=["filter","transform","clip-path"];qv=class extends H6{constructor(t,e,i){super(t,e,i),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(t,e,i,o,n){}},Kv=class extends H6{constructor(){super(...arguments),this.type="feMorphology"}apply(t,e,i,o,n){}},Wv=class extends H6{constructor(){super(...arguments),this.type="feComposite"}apply(t,e,i,o,n){}},$v=class extends H6{constructor(t,e,i){super(t,e,i),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(t,e,i,o,n){var{document:l,blurRadius:A}=this,d=l.window?l.window.document.body:null,L=t.canvas;L.id=l.getUniqueId(),d&&(L.style.display="none",d.appendChild(L)),GK(L,e,i,o,n,A),d&&d.removeChild(L)}},Xv=class extends H6{constructor(){super(...arguments),this.type="title"}},Yv=class extends H6{constructor(){super(...arguments),this.type="desc"}},Wu1={svg:pl,rect:Up,circle:wv,ellipse:bv,line:Mv,polyline:Qp,polygon:Bv,path:r8,pattern:Sv,marker:Ev,defs:Tv,linearGradient:Iv,radialGradient:Fv,stop:Pv,animate:nA,animateColor:Rv,animateTransform:zv,font:Dv,"font-face":kv,"missing-glyph":Ov,glyph:Zp,text:fl,tspan:Np,tref:Zv,a:Nv,textPath:Uv,image:Qv,g:iA,symbol:Hv,style:Vp,use:Gv,mask:jp,clipPath:jv,filter:qp,feDropShadow:qv,feMorphology:Kv,feComposite:Wv,feColorMatrix:Gp,feGaussianBlur:$v,title:Xv,desc:Yv};Zc=class r{constructor(t){var{rootEmSize:e=12,emSize:i=12,createCanvas:o=r.createCanvas,createImage:n=r.createImage,anonymousCrossOrigin:l}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=t,this.definitions=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=e,this.emSize=i,this.createCanvas=o,this.createImage=this.bindCreateImage(n,l),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(t,e){return typeof e=="boolean"?(i,o)=>t(i,typeof o=="boolean"?o:e):t}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:t}=this;return t[t.length-1]}set emSize(t){var{emSizeStack:e}=this;e.push(t)}popEmSize(){var{emSizeStack:t}=this;t.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(t=>t.loaded)}isFontsLoaded(){return this.fonts.every(t=>t.loaded)}createDocumentElement(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}createElement(t){var e=t.nodeName.replace(/^[^:]+:/,""),i=r.elementTypes[e];return typeof i<"u"?new i(this,t):new xv(this,t)}createTextNode(t){return new KT(this,t)}setViewBox(t){this.screen.setViewBox($u1({document:this},t))}};Zc.createCanvas=Xu1;Zc.createImage=Yu1;Zc.elementTypes=Wu1;$T=class r{constructor(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new rA(i),this.screen=new kc(t,i),this.options=i;var o=new Zc(this,i),n=o.createDocumentElement(e);this.document=o,this.documentElement=n}static from(t,e){var i=arguments;return K4(function*(){var o=i.length>2&&i[2]!==void 0?i[2]:{},n=new rA(o),l=yield n.parse(e);return new r(t,l,o)})()}static fromString(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=new rA(i),n=o.parseFromString(e);return new r(t,n,i)}fork(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return r.from(t,e,zc(zc({},this.options),i))}forkString(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return r.fromString(t,e,zc(zc({},this.options),i))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var t=arguments,e=this;return K4(function*(){var i=t.length>0&&t[0]!==void 0?t[0]:{};e.start(zc({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},i)),yield e.ready(),e.stop()})()}start(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:e,screen:i,options:o}=this;i.start(e,zc(zc({enableRedraw:!0},o),t))}stop(){this.screen.stop()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(t,e,i)}}});var K$=W2((St2,q$)=>{"use strict";var Cf1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";q$.exports=Cf1});var Y$=W2((Et2,X$)=>{"use strict";var gf1=K$();function W$(){}function $$(){}$$.resetWarningCache=W$;X$.exports=function(){function r(i,o,n,l,A,d){if(d!==gf1){var L=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw L.name="Invariant Violation",L}}r.isRequired=r;function t(){return r}var e={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:t,element:r,elementType:r,instanceOf:t,node:r,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:$$,resetWarningCache:W$};return e.PropTypes=e,e}});var tX=W2((Ft2,J$)=>{J$.exports=Y$()();var Tt2,It2});var FX=W2((uP,hP)=>{(function(r,t){typeof uP=="object"&&typeof hP<"u"?hP.exports=function(e,i,o,n,l){for(i=i.split?i.split("."):i,n=0;n<i.length;n++)e=e?e[i[n]]:l;return e===l?o:e}:typeof define=="function"&&define.amd?define(function(){return function(e,i,o,n,l){for(i=i.split?i.split("."):i,n=0;n<i.length;n++)e=e?e[i[n]]:l;return e===l?o:e}}):r.dlv=function(e,i,o,n,l){for(i=i.split?i.split("."):i,n=0;n<i.length;n++)e=e?e[i[n]]:l;return e===l?o:e}})(uP)});var Cd,X5,yP,iY,Ul,gP,_P,xP,wP,B_,x_,w_,bP,Ld={},MP=[],nY=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,gd=Array.isArray;function xo(r,t){for(var e in t)r[e]=t[e];return r}function S_(r){r&&r.parentNode&&r.parentNode.removeChild(r)}function q8(r,t,e){var i,o,n,l={};for(n in t)n=="key"?i=t[n]:n=="ref"?o=t[n]:l[n]=t[n];if(arguments.length>2&&(l.children=arguments.length>3?Cd.call(arguments,2):e),typeof r=="function"&&r.defaultProps!=null)for(n in r.defaultProps)l[n]===void 0&&(l[n]=r.defaultProps[n]);return pd(r,l,i,o,null)}function pd(r,t,e,i,o){var n={type:r,props:t,key:e,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++yP,__i:-1,__u:0};return o==null&&X5.vnode!=null&&X5.vnode(n),n}function E_(){return{current:null}}function m5(r){return r.children}function Nn(r,t){this.props=r,this.context=t}function Su(r,t){if(t==null)return r.__?Su(r.__,r.__i+1):null;for(var e;t<r.__k.length;t++)if((e=r.__k[t])!=null&&e.__e!=null)return e.__e;return typeof r.type=="function"?Su(r):null}function BP(r){var t,e;if((r=r.__)!=null&&r.__c!=null){for(r.__e=r.__c.base=null,t=0;t<r.__k.length;t++)if((e=r.__k[t])!=null&&e.__e!=null){r.__e=r.__c.base=e.__e;break}return BP(r)}}function b_(r){(!r.__d&&(r.__d=!0)&&Ul.push(r)&&!GL.__r++||gP!=X5.debounceRendering)&&((gP=X5.debounceRendering)||_P)(GL)}function GL(){for(var r,t,e,i,o,n,l,A=1;Ul.length;)Ul.length>A&&Ul.sort(xP),r=Ul.shift(),A=Ul.length,r.__d&&(e=void 0,i=void 0,o=(i=(t=r).__v).__e,n=[],l=[],t.__P&&((e=xo({},i)).__v=i.__v+1,X5.vnode&&X5.vnode(e),T_(t.__P,e,i,t.__n,t.__P.namespaceURI,32&i.__u?[o]:null,n,o??Su(i),!!(32&i.__u),l),e.__v=i.__v,e.__.__k[e.__i]=e,TP(n,e,l),i.__e=i.__=null,e.__e!=o&&BP(e)));GL.__r=0}function SP(r,t,e,i,o,n,l,A,d,L,C){var y,E,B,Z,Q,V,G,J=i&&i.__k||MP,n1=t.length;for(d=oY(e,t,J,d,n1),y=0;y<n1;y++)(B=e.__k[y])!=null&&(E=B.__i==-1?Ld:J[B.__i]||Ld,B.__i=y,V=T_(r,B,E,o,n,l,A,d,L,C),Z=B.__e,B.ref&&E.ref!=B.ref&&(E.ref&&I_(E.ref,null,B),C.push(B.ref,B.__c||Z,B)),Q==null&&Z!=null&&(Q=Z),(G=!!(4&B.__u))||E.__k===B.__k?d=EP(B,d,r,G):typeof B.type=="function"&&V!==void 0?d=V:Z&&(d=Z.nextSibling),B.__u&=-7);return e.__e=Q,d}function oY(r,t,e,i,o){var n,l,A,d,L,C=e.length,y=C,E=0;for(r.__k=new Array(o),n=0;n<o;n++)(l=t[n])!=null&&typeof l!="boolean"&&typeof l!="function"?(d=n+E,(l=r.__k[n]=typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?pd(null,l,null,null,null):gd(l)?pd(m5,{children:l},null,null,null):l.constructor==null&&l.__b>0?pd(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):l).__=r,l.__b=r.__b+1,A=null,(L=l.__i=aY(l,e,d,y))!=-1&&(y--,(A=e[L])&&(A.__u|=2)),A==null||A.__v==null?(L==-1&&(o>C?E--:o<C&&E++),typeof l.type!="function"&&(l.__u|=4)):L!=d&&(L==d-1?E--:L==d+1?E++:(L>d?E--:E++,l.__u|=4))):r.__k[n]=null;if(y)for(n=0;n<C;n++)(A=e[n])!=null&&(2&A.__u)==0&&(A.__e==i&&(i=Su(A)),FP(A,A));return i}function EP(r,t,e,i){var o,n;if(typeof r.type=="function"){for(o=r.__k,n=0;o&&n<o.length;n++)o[n]&&(o[n].__=r,t=EP(o[n],t,e,i));return t}r.__e!=t&&(i&&(t&&r.type&&!t.parentNode&&(t=Su(r)),e.insertBefore(r.__e,t||null)),t=r.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function wo(r,t){return t=t||[],r==null||typeof r=="boolean"||(gd(r)?r.some(function(e){wo(e,t)}):t.push(r)),t}function aY(r,t,e,i){var o,n,l,A=r.key,d=r.type,L=t[e],C=L!=null&&(2&L.__u)==0;if(L===null&&r.key==null||C&&A==L.key&&d==L.type)return e;if(i>(C?1:0)){for(o=e-1,n=e+1;o>=0||n<t.length;)if((L=t[l=o>=0?o--:n++])!=null&&(2&L.__u)==0&&A==L.key&&d==L.type)return l}return-1}function mP(r,t,e){t[0]=="-"?r.setProperty(t,e??""):r[t]=e==null?"":typeof e!="number"||nY.test(t)?e:e+"px"}function VL(r,t,e,i,o){var n,l;t:if(t=="style")if(typeof e=="string")r.style.cssText=e;else{if(typeof i=="string"&&(r.style.cssText=i=""),i)for(t in i)e&&t in e||mP(r.style,t,"");if(e)for(t in e)i&&e[t]==i[t]||mP(r.style,t,e[t])}else if(t[0]=="o"&&t[1]=="n")n=t!=(t=t.replace(wP,"$1")),l=t.toLowerCase(),t=l in r||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),r.l||(r.l={}),r.l[t+n]=e,e?i?e.u=i.u:(e.u=B_,r.addEventListener(t,n?w_:x_,n)):r.removeEventListener(t,n?w_:x_,n);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in r)try{r[t]=e??"";break t}catch{}typeof e=="function"||(e==null||e===!1&&t[4]!="-"?r.removeAttribute(t):r.setAttribute(t,t=="popover"&&e==1?"":e))}}function vP(r){return function(t){if(this.l){var e=this.l[t.type+r];if(t.t==null)t.t=B_++;else if(t.t<e.u)return;return e(X5.event?X5.event(t):t)}}}function T_(r,t,e,i,o,n,l,A,d,L){var C,y,E,B,Z,Q,V,G,J,n1,r1,m1,w1,B1,g1,L1,z1,s1=t.type;if(t.constructor!=null)return null;128&e.__u&&(d=!!(32&e.__u),n=[A=t.__e=e.__e]),(C=X5.__b)&&C(t);t:if(typeof s1=="function")try{if(G=t.props,J="prototype"in s1&&s1.prototype.render,n1=(C=s1.contextType)&&i[C.__c],r1=C?n1?n1.props.value:C.__:i,e.__c?V=(y=t.__c=e.__c).__=y.__E:(J?t.__c=y=new s1(G,r1):(t.__c=y=new Nn(G,r1),y.constructor=s1,y.render=lY),n1&&n1.sub(y),y.props=G,y.state||(y.state={}),y.context=r1,y.__n=i,E=y.__d=!0,y.__h=[],y._sb=[]),J&&y.__s==null&&(y.__s=y.state),J&&s1.getDerivedStateFromProps!=null&&(y.__s==y.state&&(y.__s=xo({},y.__s)),xo(y.__s,s1.getDerivedStateFromProps(G,y.__s))),B=y.props,Z=y.state,y.__v=t,E)J&&s1.getDerivedStateFromProps==null&&y.componentWillMount!=null&&y.componentWillMount(),J&&y.componentDidMount!=null&&y.__h.push(y.componentDidMount);else{if(J&&s1.getDerivedStateFromProps==null&&G!==B&&y.componentWillReceiveProps!=null&&y.componentWillReceiveProps(G,r1),!y.__e&&y.shouldComponentUpdate!=null&&y.shouldComponentUpdate(G,y.__s,r1)===!1||t.__v==e.__v){for(t.__v!=e.__v&&(y.props=G,y.state=y.__s,y.__d=!1),t.__e=e.__e,t.__k=e.__k,t.__k.some(function(x1){x1&&(x1.__=t)}),m1=0;m1<y._sb.length;m1++)y.__h.push(y._sb[m1]);y._sb=[],y.__h.length&&l.push(y);break t}y.componentWillUpdate!=null&&y.componentWillUpdate(G,y.__s,r1),J&&y.componentDidUpdate!=null&&y.__h.push(function(){y.componentDidUpdate(B,Z,Q)})}if(y.context=r1,y.props=G,y.__P=r,y.__e=!1,w1=X5.__r,B1=0,J){for(y.state=y.__s,y.__d=!1,w1&&w1(t),C=y.render(y.props,y.state,y.context),g1=0;g1<y._sb.length;g1++)y.__h.push(y._sb[g1]);y._sb=[]}else do y.__d=!1,w1&&w1(t),C=y.render(y.props,y.state,y.context),y.state=y.__s;while(y.__d&&++B1<25);y.state=y.__s,y.getChildContext!=null&&(i=xo(xo({},i),y.getChildContext())),J&&!E&&y.getSnapshotBeforeUpdate!=null&&(Q=y.getSnapshotBeforeUpdate(B,Z)),L1=C,C!=null&&C.type===m5&&C.key==null&&(L1=IP(C.props.children)),A=SP(r,gd(L1)?L1:[L1],t,e,i,o,n,l,A,d,L),y.base=t.__e,t.__u&=-161,y.__h.length&&l.push(y),V&&(y.__E=y.__=null)}catch(x1){if(t.__v=null,d||n!=null)if(x1.then){for(t.__u|=d?160:128;A&&A.nodeType==8&&A.nextSibling;)A=A.nextSibling;n[n.indexOf(A)]=null,t.__e=A}else{for(z1=n.length;z1--;)S_(n[z1]);M_(t)}else t.__e=e.__e,t.__k=e.__k,x1.then||M_(t);X5.__e(x1,t,e)}else n==null&&t.__v==e.__v?(t.__k=e.__k,t.__e=e.__e):A=t.__e=sY(e.__e,t,e,i,o,n,l,d,L);return(C=X5.diffed)&&C(t),128&t.__u?void 0:A}function M_(r){r&&r.__c&&(r.__c.__e=!0),r&&r.__k&&r.__k.forEach(M_)}function TP(r,t,e){for(var i=0;i<e.length;i++)I_(e[i],e[++i],e[++i]);X5.__c&&X5.__c(t,r),r.some(function(o){try{r=o.__h,o.__h=[],r.some(function(n){n.call(o)})}catch(n){X5.__e(n,o.__v)}})}function IP(r){return typeof r!="object"||r==null||r.__b&&r.__b>0?r:gd(r)?r.map(IP):xo({},r)}function sY(r,t,e,i,o,n,l,A,d){var L,C,y,E,B,Z,Q,V=e.props,G=t.props,J=t.type;if(J=="svg"?o="http://www.w3.org/2000/svg":J=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),n!=null){for(L=0;L<n.length;L++)if((B=n[L])&&"setAttribute"in B==!!J&&(J?B.localName==J:B.nodeType==3)){r=B,n[L]=null;break}}if(r==null){if(J==null)return document.createTextNode(G);r=document.createElementNS(o,J,G.is&&G),A&&(X5.__m&&X5.__m(t,n),A=!1),n=null}if(J==null)V===G||A&&r.data==G||(r.data=G);else{if(n=n&&Cd.call(r.childNodes),V=e.props||Ld,!A&&n!=null)for(V={},L=0;L<r.attributes.length;L++)V[(B=r.attributes[L]).name]=B.value;for(L in V)if(B=V[L],L!="children"){if(L=="dangerouslySetInnerHTML")y=B;else if(!(L in G)){if(L=="value"&&"defaultValue"in G||L=="checked"&&"defaultChecked"in G)continue;VL(r,L,null,B,o)}}for(L in G)B=G[L],L=="children"?E=B:L=="dangerouslySetInnerHTML"?C=B:L=="value"?Z=B:L=="checked"?Q=B:A&&typeof B!="function"||V[L]===B||VL(r,L,B,V[L],o);if(C)A||y&&(C.__html==y.__html||C.__html==r.innerHTML)||(r.innerHTML=C.__html),t.__k=[];else if(y&&(r.innerHTML=""),SP(t.type=="template"?r.content:r,gd(E)?E:[E],t,e,i,J=="foreignObject"?"http://www.w3.org/1999/xhtml":o,n,l,n?n[0]:e.__k&&Su(e,0),A,d),n!=null)for(L=n.length;L--;)S_(n[L]);A||(L="value",J=="progress"&&Z==null?r.removeAttribute("value"):Z!=null&&(Z!==r[L]||J=="progress"&&!Z||J=="option"&&Z!=V[L])&&VL(r,L,Z,V[L],o),L="checked",Q!=null&&Q!=r[L]&&VL(r,L,Q,V[L],o))}return r}function I_(r,t,e){try{if(typeof r=="function"){var i=typeof r.__u=="function";i&&r.__u(),i&&t==null||(r.__u=r(t))}else r.current=t}catch(o){X5.__e(o,e)}}function FP(r,t,e){var i,o;if(X5.unmount&&X5.unmount(r),(i=r.ref)&&(i.current&&i.current!=r.__e||I_(i,null,t)),(i=r.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){X5.__e(n,t)}i.base=i.__P=null}if(i=r.__k)for(o=0;o<i.length;o++)i[o]&&FP(i[o],t,e||typeof r.type!="function");e||S_(r.__e),r.__c=r.__=r.__e=void 0}function lY(r,t,e){return this.constructor(r,e)}function bo(r,t,e){var i,o,n,l;t==document&&(t=document.documentElement),X5.__&&X5.__(r,t),o=(i=typeof e=="function")?null:e&&e.__k||t.__k,n=[],l=[],T_(t,r=(!i&&e||t).__k=q8(m5,null,[r]),o||Ld,Ld,t.namespaceURI,!i&&e?[e]:o?null:t.firstChild?Cd.call(t.childNodes):null,n,!i&&e?e:o?o.__e:t.firstChild,i,l),TP(n,r,l)}function md(r,t){bo(r,t,md)}function vd(r,t,e){var i,o,n,l,A=xo({},r.props);for(n in r.type&&r.type.defaultProps&&(l=r.type.defaultProps),t)n=="key"?i=t[n]:n=="ref"?o=t[n]:A[n]=t[n]===void 0&&l!=null?l[n]:t[n];return arguments.length>2&&(A.children=arguments.length>3?Cd.call(arguments,2):e),pd(r.type,A,i||r.key,o||r.ref,null)}function M9(r){function t(e){var i,o;return this.getChildContext||(i=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&i.forEach(function(l){l.__e=!0,b_(l)})},this.sub=function(n){i.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){i&&i.delete(n),l&&l.call(n)}}),e.children}return t.__c="__cC"+bP++,t.__=r,t.Provider=t.__l=(t.Consumer=function(e,i){return e.children(i)}).contextType=t,t}Cd=MP.slice,X5={__e:function(r,t,e,i){for(var o,n,l;t=t.__;)if((o=t.__c)&&!o.__)try{if((n=o.constructor)&&n.getDerivedStateFromError!=null&&(o.setState(n.getDerivedStateFromError(r)),l=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(r,i||{}),l=o.__d),l)return o.__E=o}catch(A){r=A}throw r}},yP=0,iY=function(r){return r!=null&&r.constructor==null},Nn.prototype.setState=function(r,t){var e;e=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=xo({},this.state),typeof r=="function"&&(r=r(xo({},e),this.props)),r&&xo(e,r),r!=null&&this.__v&&(t&&this._sb.push(t),b_(this))},Nn.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),b_(this))},Nn.prototype.render=m5,Ul=[],_P=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,xP=function(r,t){return r.__v.__b-t.__v.__b},GL.__r=0,wP=/(PointerCapture)$|Capture$/i,B_=0,x_=vP(!1),w_=vP(!0),bP=0;function jL(){return jL=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},jL.apply(this,arguments)}function RP(r,t){if(r==null)return{};var e,i,o={},n=Object.keys(r);for(i=0;i<n.length;i++)t.indexOf(e=n[i])>=0||(o[e]=r[e]);return o}var cY=["context","children"],uY=["useFragment"];function qL(r,t,e,i){function o(){var n=Reflect.construct(HTMLElement,[],o);return n._vdomComponent=r,n._root=i&&i.shadow?n.attachShadow({mode:i.mode||"open"}):n,i&&i.adoptedStyleSheets&&(n._root.adoptedStyleSheets=i.adoptedStyleSheets),n}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=function(){AY.call(this,i)},o.prototype.attributeChangedCallback=dY,o.prototype.disconnectedCallback=fY,e=e||r.observedAttributes||Object.keys(r.propTypes||{}),o.observedAttributes=e,r.formAssociated&&(o.formAssociated=!0),e.forEach(function(n){Object.defineProperty(o.prototype,n,{get:function(){return this._vdom?this._vdom.props[n]:this._props[n]},set:function(l){this._vdom?this.attributeChangedCallback(n,null,l):(this._props||(this._props={}),this._props[n]=l);var A=typeof l;l!=null&&A!=="string"&&A!=="boolean"&&A!=="number"||this.setAttribute(n,l)}})}),customElements.define(t||r.tagName||r.displayName||r.name,o),o}function hY(r){this.getChildContext=function(){return r.context};var t=r.children,e=RP(r,cY);return vd(t,e)}function AY(r){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=q8(hY,jL({},this._props,{context:t.detail.context}),DP(this,this._vdomComponent,r)),(this.hasAttribute("hydrate")?md:bo)(this._vdom,this._root)}function zP(r){return r.replace(/-(\w)/g,function(t,e){return e?e.toUpperCase():""})}function dY(r,t,e){if(this._vdom){var i={};i[r]=e=e??void 0,i[zP(r)]=e,this._vdom=vd(this._vdom,i),bo(this._vdom,this._root)}}function fY(){bo(this._vdom=null,this._root)}function PP(r,t){var e=this,i=r.useFragment,o=RP(r,uY);return q8(i?m5:"slot",jL({},o,{ref:function(n){n?(e.ref=n,e._listener||(e._listener=function(l){l.stopPropagation(),l.detail.context=t},n.addEventListener("_preact",e._listener))):e.ref.removeEventListener("_preact",e._listener)}}))}function DP(r,t,e){if(r.nodeType===3)return r.data;if(r.nodeType!==1)return null;var i=[],o={},n=0,l=r.attributes,A=r.childNodes;for(n=l.length;n--;)l[n].name!=="slot"&&(o[l[n].name]=l[n].value,o[zP(l[n].name)]=l[n].value);for(n=A.length;n--;){var d=DP(A[n],null,e),L=A[n].slot;L?o[L]=q8(PP,{name:L},d):i[n]=d}var C=!(!e||!e.shadow),y=t?q8(PP,{useFragment:!C},i):i;return!C&&t&&(r.innerHTML=""),q8(t||r.nodeName.toLowerCase(),o,y)}var Ps,Z6,F_,kP,Eu=0,GP=[],c0=X5,OP=c0.__b,ZP=c0.__r,NP=c0.diffed,UP=c0.__c,QP=c0.unmount,HP=c0.__;function Tu(r,t){c0.__h&&c0.__h(Z6,r,Eu||t),Eu=0;var e=Z6.__H||(Z6.__H={__:[],__h:[]});return r>=e.__.length&&e.__.push({}),e.__[r]}function Ft(r){return Eu=1,Iu(jP,r)}function Iu(r,t,e){var i=Tu(Ps++,2);if(i.t=r,!i.__c&&(i.__=[e?e(t):jP(void 0,t),function(A){var d=i.__N?i.__N[0]:i.__[0],L=i.t(d,A);d!==L&&(i.__N=[L,i.__[1]],i.__c.setState({}))}],i.__c=Z6,!Z6.__f)){var o=function(A,d,L){if(!i.__c.__H)return!0;var C=i.__c.__H.__.filter(function(E){return!!E.__c});if(C.every(function(E){return!E.__N}))return!n||n.call(this,A,d,L);var y=i.__c.props!==A;return C.forEach(function(E){if(E.__N){var B=E.__[0];E.__=E.__N,E.__N=void 0,B!==E.__[0]&&(y=!0)}}),n&&n.call(this,A,d,L)||y};Z6.__f=!0;var n=Z6.shouldComponentUpdate,l=Z6.componentWillUpdate;Z6.componentWillUpdate=function(A,d,L){if(this.__e){var C=n;n=void 0,o(A,d,L),n=C}l&&l.call(this,A,d,L)},Z6.shouldComponentUpdate=o}return i.__N||i.__}function et(r,t){var e=Tu(Ps++,3);!c0.__s&&D_(e.__H,t)&&(e.__=r,e.u=t,Z6.__H.__h.push(e))}function Fu(r,t){var e=Tu(Ps++,4);!c0.__s&&D_(e.__H,t)&&(e.__=r,e.u=t,Z6.__h.push(e))}function Vi(r){return Eu=5,ye(function(){return{current:r}},[])}function R_(r,t,e){Eu=6,Fu(function(){if(typeof r=="function"){var i=r(t());return function(){r(null),i&&typeof i=="function"&&i()}}if(r)return r.current=t(),function(){return r.current=null}},e==null?e:e.concat(r))}function ye(r,t){var e=Tu(Ps++,7);return D_(e.__H,t)&&(e.__=r(),e.__H=t,e.__h=r),e.__}function i6(r,t){return Eu=8,ye(function(){return r},t)}function r7(r){var t=Z6.context[r.__c],e=Tu(Ps++,9);return e.c=r,t?(e.__==null&&(e.__=!0,t.sub(Z6)),t.props.value):r.__}function z_(r,t){c0.useDebugValue&&c0.useDebugValue(t?t(r):r)}function w4(){var r=Tu(Ps++,11);if(!r.__){for(var t=Z6.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var e=t.__m||(t.__m=[0,0]);r.__="P"+e[0]+"-"+e[1]++}return r.__}function pY(){for(var r;r=GP.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(KL),r.__H.__h.forEach(P_),r.__H.__h=[]}catch(t){r.__H.__h=[],c0.__e(t,r.__v)}}c0.__b=function(r){Z6=null,OP&&OP(r)},c0.__=function(r,t){r&&t.__k&&t.__k.__m&&(r.__m=t.__k.__m),HP&&HP(r,t)},c0.__r=function(r){ZP&&ZP(r),Ps=0;var t=(Z6=r.__c).__H;t&&(F_===Z6?(t.__h=[],Z6.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(KL),t.__h.forEach(P_),t.__h=[],Ps=0)),F_=Z6},c0.diffed=function(r){NP&&NP(r);var t=r.__c;t&&t.__H&&(t.__H.__h.length&&(GP.push(t)!==1&&kP===c0.requestAnimationFrame||((kP=c0.requestAnimationFrame)||LY)(pY)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),F_=Z6=null},c0.__c=function(r,t){t.some(function(e){try{e.__h.forEach(KL),e.__h=e.__h.filter(function(i){return!i.__||P_(i)})}catch(i){t.some(function(o){o.__h&&(o.__h=[])}),t=[],c0.__e(i,e.__v)}}),UP&&UP(r,t)},c0.unmount=function(r){QP&&QP(r);var t,e=r.__c;e&&e.__H&&(e.__H.__.forEach(function(i){try{KL(i)}catch(o){t=o}}),e.__H=void 0,t&&c0.__e(t,e.__v))};var VP=typeof requestAnimationFrame=="function";function LY(r){var t,e=function(){clearTimeout(i),VP&&cancelAnimationFrame(t),setTimeout(r)},i=setTimeout(e,35);VP&&(t=requestAnimationFrame(e))}function KL(r){var t=Z6,e=r.__c;typeof e=="function"&&(r.__c=void 0,e()),Z6=t}function P_(r){var t=Z6;r.__c=r.__(),Z6=t}function D_(r,t){return!r||r.length!==t.length||t.some(function(e,i){return e!==r[i]})}function jP(r,t){return typeof t=="function"?t(r):t}function eR(r,t){for(var e in t)r[e]=t[e];return r}function O_(r,t){for(var e in r)if(e!=="__source"&&!(e in t))return!0;for(var i in t)if(i!=="__source"&&r[i]!==t[i])return!0;return!1}function rR(r,t){var e=t(),i=Ft({t:{__:e,u:t}}),o=i[0].t,n=i[1];return Fu(function(){o.__=e,o.u=t,k_(o)&&n({t:o})},[r,e,t]),et(function(){return k_(o)&&n({t:o}),r(function(){k_(o)&&n({t:o})})},[r]),e}function k_(r){var t,e,i=r.u,o=r.__;try{var n=i();return!((t=o)===(e=n)&&(t!==0||1/t==1/e)||t!=t&&e!=e)}catch{return!0}}function iR(r){r()}function nR(r){return r}function oR(){return[!1,iR]}var aR=Fu;function Z_(r,t){this.props=r,this.context=t}function ht(r,t){function e(o){var n=this.props.ref,l=n==o.ref;return!l&&n&&(n.call?n(null):n.current=null),t?!t(this.props,o)||!l:O_(this.props,o)}function i(o){return this.shouldComponentUpdate=e,q8(r,o)}return i.displayName="Memo("+(r.displayName||r.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i.type=r,i}(Z_.prototype=new Nn).isPureReactComponent=!0,Z_.prototype.shouldComponentUpdate=function(r,t){return O_(this.props,r)||O_(this.state,t)};var qP=X5.__b;X5.__b=function(r){r.type&&r.type.__f&&r.ref&&(r.props.ref=r.ref,r.ref=null),qP&&qP(r)};var CY=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function gY(r){function t(e){var i=eR({},e);return delete i.ref,r(i,e.ref||null)}return t.$$typeof=CY,t.render=r,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(r.displayName||r.name)+")",t}var KP=function(r,t){return r==null?null:wo(wo(r).map(t))},mY={map:KP,forEach:KP,count:function(r){return r?wo(r).length:0},only:function(r){var t=wo(r);if(t.length!==1)throw"Children.only";return t[0]},toArray:wo},vY=X5.__e;X5.__e=function(r,t,e,i){if(r.then){for(var o,n=t;n=n.__;)if((o=n.__c)&&o.__c)return t.__e==null&&(t.__e=e.__e,t.__k=e.__k),o.__c(r,t)}vY(r,t,e,i)};var WP=X5.unmount;function sR(r,t,e){return r&&(r.__c&&r.__c.__H&&(r.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),r.__c.__H=null),(r=eR({},r)).__c!=null&&(r.__c.__P===e&&(r.__c.__P=t),r.__c.__e=!0,r.__c=null),r.__k=r.__k&&r.__k.map(function(i){return sR(i,t,e)})),r}function lR(r,t,e){return r&&e&&(r.__v=null,r.__k=r.__k&&r.__k.map(function(i){return lR(i,t,e)}),r.__c&&r.__c.__P===t&&(r.__e&&e.appendChild(r.__e),r.__c.__e=!0,r.__c.__P=e)),r}function WL(){this.__u=0,this.o=null,this.__b=null}function cR(r){var t=r.__.__c;return t&&t.__a&&t.__a(r)}function yY(r){var t,e,i;function o(n){if(t||(t=r()).then(function(l){e=l.default||l},function(l){i=l}),i)throw i;if(!e)throw t;return q8(e,n)}return o.displayName="Lazy",o.__f=!0,o}function yd(){this.i=null,this.l=null}X5.unmount=function(r){var t=r.__c;t&&t.__R&&t.__R(),t&&32&r.__u&&(r.type=null),WP&&WP(r)},(WL.prototype=new Nn).__c=function(r,t){var e=t.__c,i=this;i.o==null&&(i.o=[]),i.o.push(e);var o=cR(i.__v),n=!1,l=function(){n||(n=!0,e.__R=null,o?o(A):A())};e.__R=l;var A=function(){if(!--i.__u){if(i.state.__a){var d=i.state.__a;i.__v.__k[0]=lR(d,d.__c.__P,d.__c.__O)}var L;for(i.setState({__a:i.__b=null});L=i.o.pop();)L.forceUpdate()}};i.__u++||32&t.__u||i.setState({__a:i.__b=i.__v.__k[0]}),r.then(l,l)},WL.prototype.componentWillUnmount=function(){this.o=[]},WL.prototype.render=function(r,t){if(this.__b){if(this.__v.__k){var e=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=sR(this.__b,e,i.__O=i.__P)}this.__b=null}var o=t.__a&&q8(m5,null,r.fallback);return o&&(o.__u&=-33),[q8(m5,null,t.__a?null:r.children),o]};var $P=function(r,t,e){if(++e[1]===e[0]&&r.l.delete(t),r.props.revealOrder&&(r.props.revealOrder[0]!=="t"||!r.l.size))for(e=r.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;r.i=e=e[2]}};function _Y(r){return this.getChildContext=function(){return r.context},r.children}function xY(r){var t=this,e=r.h;if(t.componentWillUnmount=function(){bo(null,t.v),t.v=null,t.h=null},t.h&&t.h!==e&&t.componentWillUnmount(),!t.v){for(var i=t.__v;i!==null&&!i.__m&&i.__!==null;)i=i.__;t.h=e,t.v={nodeType:1,parentNode:e,childNodes:[],__k:{__m:i.__m},contains:function(){return!0},insertBefore:function(o,n){this.childNodes.push(o),t.h.insertBefore(o,n)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.h.removeChild(o)}}}bo(q8(_Y,{context:t.context},r.__v),t.v)}function wY(r,t){var e=q8(xY,{__v:r,h:t});return e.containerInfo=t,e}(yd.prototype=new Nn).__a=function(r){var t=this,e=cR(t.__v),i=t.l.get(r);return i[0]++,function(o){var n=function(){t.props.revealOrder?(i.push(o),$P(t,r,i)):o()};e?e(n):n()}},yd.prototype.render=function(r){this.i=null,this.l=new Map;var t=wo(r.children);r.revealOrder&&r.revealOrder[0]==="b"&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return r.children},yd.prototype.componentDidUpdate=yd.prototype.componentDidMount=function(){var r=this;this.l.forEach(function(t,e){$P(r,e,t)})};var uR=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,bY=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,MY=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,BY=/[A-Z0-9]/g,SY=typeof document<"u",EY=function(r){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(r)};function TY(r,t,e){return t.__k==null&&(t.textContent=""),bo(r,t),typeof e=="function"&&e(),r?r.__c:null}function IY(r,t,e){return md(r,t),typeof e=="function"&&e(),r?r.__c:null}Nn.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(r){Object.defineProperty(Nn.prototype,r,{configurable:!0,get:function(){return this["UNSAFE_"+r]},set:function(t){Object.defineProperty(this,r,{configurable:!0,writable:!0,value:t})}})});var XP=X5.event;function FY(){}function PY(){return this.cancelBubble}function RY(){return this.defaultPrevented}X5.event=function(r){return XP&&(r=XP(r)),r.persist=FY,r.isPropagationStopped=PY,r.isDefaultPrevented=RY,r.nativeEvent=r};var N_,zY={enumerable:!1,configurable:!0,get:function(){return this.class}},YP=X5.vnode;X5.vnode=function(r){typeof r.type=="string"&&(function(t){var e=t.props,i=t.type,o={},n=i.indexOf("-")===-1;for(var l in e){var A=e[l];if(!(l==="value"&&"defaultValue"in e&&A==null||SY&&l==="children"&&i==="noscript"||l==="class"||l==="className")){var d=l.toLowerCase();l==="defaultValue"&&"value"in e&&e.value==null?l="value":l==="download"&&A===!0?A="":d==="translate"&&A==="no"?A=!1:d[0]==="o"&&d[1]==="n"?d==="ondoubleclick"?l="ondblclick":d!=="onchange"||i!=="input"&&i!=="textarea"||EY(e.type)?d==="onfocus"?l="onfocusin":d==="onblur"?l="onfocusout":MY.test(l)&&(l=d):d=l="oninput":n&&bY.test(l)?l=l.replace(BY,"-$&").toLowerCase():A===null&&(A=void 0),d==="oninput"&&o[l=d]&&(l="oninputCapture"),o[l]=A}}i=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=wo(e.children).forEach(function(L){L.props.selected=o.value.indexOf(L.props.value)!=-1})),i=="select"&&o.defaultValue!=null&&(o.value=wo(e.children).forEach(function(L){L.props.selected=o.multiple?o.defaultValue.indexOf(L.props.value)!=-1:o.defaultValue==L.props.value})),e.class&&!e.className?(o.class=e.class,Object.defineProperty(o,"className",zY)):(e.className&&!e.class||e.class&&e.className)&&(o.class=o.className=e.className),t.props=o})(r),r.$$typeof=uR,YP&&YP(r)};var JP=X5.__r;X5.__r=function(r){JP&&JP(r),N_=r.__c};var tR=X5.diffed;X5.diffed=function(r){tR&&tR(r);var t=r.props,e=r.__e;e!=null&&r.type==="textarea"&&"value"in t&&t.value!==e.value&&(e.value=t.value==null?"":t.value),N_=null};var DY={ReactCurrentDispatcher:{current:{readContext:function(r){return N_.__n[r.__c].props.value},useCallback:i6,useContext:r7,useDebugValue:z_,useDeferredValue:nR,useEffect:et,useId:w4,useImperativeHandle:R_,useInsertionEffect:aR,useLayoutEffect:Fu,useMemo:ye,useReducer:Iu,useRef:Vi,useState:Ft,useSyncExternalStore:rR,useTransition:oR}}};function kY(r){return q8.bind(null,r)}function $L(r){return!!r&&r.$$typeof===uR}function OY(r){return $L(r)&&r.type===m5}function ZY(r){return!!r&&!!r.displayName&&(typeof r.displayName=="string"||r.displayName instanceof String)&&r.displayName.startsWith("Memo(")}function NY(r){return $L(r)?vd.apply(null,arguments):r}function UY(r){return!!r.__k&&(bo(null,r),!0)}function QY(r){return r&&(r.base||r.nodeType===1&&r)||null}var HY=function(r,t){return r(t)},VY=function(r,t){return r(t)},GY=m5,jY=$L,i7={useState:Ft,useId:w4,useReducer:Iu,useEffect:et,useLayoutEffect:Fu,useInsertionEffect:aR,useTransition:oR,useDeferredValue:nR,useSyncExternalStore:rR,startTransition:iR,useRef:Vi,useImperativeHandle:R_,useMemo:ye,useCallback:i6,useContext:r7,useDebugValue:z_,version:"18.3.1",Children:mY,render:TY,hydrate:IY,unmountComponentAtNode:UY,createPortal:wY,createElement:q8,createContext:M9,createFactory:kY,cloneElement:NY,createRef:E_,Fragment:m5,isValidElement:$L,isElement:jY,isFragment:OY,isMemo:ZY,findDOMNode:QY,Component:Nn,PureComponent:Z_,memo:ht,forwardRef:gY,flushSync:VY,unstable_batchedUpdates:HY,StrictMode:GY,Suspense:WL,SuspenseList:yd,lazy:yY,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:DY};var qY=(r,t)=>{let e=new URL(r);return Object.entries(t||{}).forEach(([o,n])=>{n!=null&&e.searchParams.set(o,n)}),e},_d=qY;var KY=function(r,t,e,i){function o(n){return n instanceof e?n:new e(function(l){l(n)})}return new(e||(e=Promise))(function(n,l){function A(C){try{L(i.next(C))}catch(y){l(y)}}function d(C){try{L(i.throw(C))}catch(y){l(y)}}function L(C){C.done?n(C.value):o(C.value).then(A,d)}L((i=i.apply(r,t||[])).next())})},U_=class{constructor(t){this.url=t.url,this.apiKey=t.apiKey}fetch(t,e,i){return KY(this,void 0,void 0,function*(){if(!this.url)throw new Error(`No url defined for request to ${this.url}/${t}`);if(!this.url&&(!this.apiKey||this.apiKey==="public")&&!this.url.includes("key="))throw new Error(`No apiKey defined for request to ${this.url}`);let o=_d(`${this.url}${t||""}`,Object.assign({key:!this.apiKey||this.apiKey==="public"?void 0:this.apiKey},e||{})),l=yield(yield fetch(o.toString(),i)).json();if(l.error)throw new Error(l.error);return l})}},Pu=U_;var hR=function(r,t,e,i){function o(n){return n instanceof e?n:new e(function(l){l(n)})}return new(e||(e=Promise))(function(n,l){function A(C){try{L(i.next(C))}catch(y){l(y)}}function d(C){try{L(i.throw(C))}catch(y){l(y)}}function L(C){C.done?n(C.value):o(C.value).then(A,d)}L((i=i.apply(r,t||[])).next())})},Q_=class extends Pu{constructor(t){var e,i,o,n;super(Object.assign({url:(e=t.url)!==null&&e!==void 0?e:"https://editor.mapset.io/api/v1"},t)),this.bbox=[],this.tags=[],this.tenants=[],this.timestamp=void 0,this.tags=(i=t.tags)!==null&&i!==void 0?i:[],this.bbox=t.bbox,this.zoom=t.zoom,this.tenants=(o=t.tenants)!==null&&o!==void 0?o:[],this.timestamp=t.timestamp,this.apiKey=(n=t.apiKey)!==null&&n!==void 0?n:""}getPlanById(t){return hR(this,arguments,void 0,function*(e,i={}){return yield this.fetch(`/meta/kml/${e}`,{},Object.assign({method:"GET"},i))})}getPlans(){return hR(this,arguments,void 0,function*(t={},e={}){var i,o,n,l;let A=Object.assign({},t),d={};if(d=yield this.fetch("/export/kml",Object.assign({bbox:(i=this.bbox)===null||i===void 0?void 0:i.toString(),defaultplans:!((o=this.tags)===null||o===void 0)&&o.toString()?"false":"true",key:this.apiKey,tags:(n=this.tags)===null||n===void 0?void 0:n.toString(),tenants:(l=this.tenants)===null||l===void 0?void 0:l.toString(),timestamp:this.timestamp,zoom:this.zoom&&Math.floor(this.zoom)},A),e),d?.detail)throw console.error("Error fetching mapset plans:",d.detail),new Error(d.detail);return d?.results||[]})}},H_=Q_;var AR=function(r,t,e,i){function o(n){return n instanceof e?n:new e(function(l){l(n)})}return new(e||(e=Promise))(function(n,l){function A(C){try{L(i.next(C))}catch(y){l(y)}}function d(C){try{L(i.throw(C))}catch(y){l(y)}}function L(C){C.done?n(C.value):o(C.value).then(A,d)}L((i=i.apply(r,t||[])).next())})},V_=class extends Pu{constructor(t){super(Object.assign(Object.assign({},t),{url:t.url||"https://moco.geops.io/api/v2/"})),this.tenant="geopstest",t.tenant&&(this.tenant=t.tenant)}export(){return AR(this,arguments,void 0,function*(t={},e={}){return yield this.fetch(`${this.tenant}/export/`,Object.assign({},t),e)})}exportById(t){return AR(this,arguments,void 0,function*(e,i={},o={}){var n,l;let A=yield this.fetch(`${this.tenant}/export/${e}/`,i,o);return(l=(n=A?.paginatedSituations)===null||n===void 0?void 0:n.results)===null||l===void 0?void 0:l[0]})}},xd=V_;var WY=(r,t,e=100)=>{let i={},o={},n=[];return l=>{let{content:A,source:d}=l;i[d]&&window.clearTimeout(i[d]),t?o[t(A)]=A:n.push(A),i[d]=window.setTimeout(()=>{let L=t?Object.values(o):n;r(L)},e)}},dR=WY;var $Y=(r,t)=>r===t.SCHEMATIC?"_schematic":"",b4=$Y;var G_=class r{constructor(){this.defineProperties()}static getRequestString(t,e={}){let i=`${t} ${e.channel}`;return i+=e.args?` ${e.args}`:"",i+=e.id?` ${e.id}`:"",i.trim()}addEvents(t,e){this.websocket&&(this.websocket.addEventListener("message",t),e&&(this.websocket.addEventListener("error",e),this.websocket.addEventListener("close",e)))}close(){this.websocket&&(this.open||this.connecting)&&(this.websocket.onclose=()=>{},this.websocket.close(),this.messagesOnOpen=[])}connect(t,e=()=>{}){var i;if(!t){(i=this.websocket)===null||i===void 0||i.close();return}if(this.websocket){if(this.websocket.url===t&&(this.open||this.connecting))return;this.websocket.url!==t&&(this.open||this.connecting)&&this.websocket.close()}this.websocket=new WebSocket(t),this.open?(e(),this.subscribePreviousSubscriptions()):this.websocket.addEventListener("open",()=>{e(),this.subscribePreviousSubscriptions()})}defineProperties(){Object.defineProperties(this,{closed:{get:()=>!this.websocket||this.websocket.readyState===this.websocket.CLOSED},closing:{get:()=>!!(this.websocket&&this.websocket.readyState===this.websocket.CLOSING)},connecting:{get:()=>!!(this.websocket&&this.websocket.readyState===this.websocket.CONNECTING)},messagesOnOpen:{value:[],writable:!0},open:{get:()=>!!(this.websocket&&this.websocket.readyState===this.websocket.OPEN)},subscribed:{value:{},writable:!0},subscriptions:{value:[],writable:!0}})}get(t,e,i){let o=r.getRequestString("GET",t);this.send(o);let n=C=>(...y)=>{C(...y);let E=this.requests.findIndex(Q=>o===Q.requestString&&e===Q.cb),{onErrorCb:B,onMessageCb:Z}=this.requests[E];this.removeEvents(Z,B),this.requests.splice(E,1)},{onErrorCb:l,onMessageCb:A}=this.listen(t,n(e),i&&n(i));this.requests||(this.requests=[]);let d=this.requests.findIndex(C=>o===C.requestString&&e===C.cb),L={cb:e,errorCb:i,onErrorCb:l,onMessageCb:A,params:t,requestString:o};d>-1?this.requests[d]=L:this.requests.push(L)}listen(t,e,i){this.unlisten(t,e);let o=n=>{let l;try{l=JSON.parse(n.data)}catch(L){console.error("WebSocket: unable to parse JSON data",L,n.data);return}let A=t.channel;A+=t.args?` ${t.args}`:"";let d;l.source==="buffer"?d=l.content:d=[l],d.forEach(L=>{L?.source===A&&(!t.id||t.id===l.client_reference)&&e(L)})};return this.addEvents(o,i),{onErrorCb:i,onMessageCb:o}}removeEvents(t,e){this.websocket&&(this.websocket.removeEventListener("message",t),e&&(this.websocket.removeEventListener("error",e),this.websocket.removeEventListener("close",e)))}send(t){if(!this.websocket||this.closed||this.closing)return;let e=()=>{var i;(i=this.websocket)===null||i===void 0||i.send(t)};this.open?this.messagesOnOpen.includes(t)||e():this.messagesOnOpen.includes(t)||(this.messagesOnOpen.push(t),this.websocket.addEventListener("open",()=>{this.messagesOnOpen=[],e()}),this.websocket.addEventListener("close",()=>{this.messagesOnOpen=[]}))}subscribe(t,e,i,o=!1){let{onErrorCb:n,onMessageCb:l}=this.listen(t,e,i),A=r.getRequestString("",t),d=this.subscriptions.findIndex(C=>t.channel===C.params.channel&&e===C.cb),L={cb:e,errorCb:i,onErrorCb:n,onMessageCb:l,params:t,quiet:o};d>-1?this.subscriptions[d]=L:this.subscriptions.push(L),this.subscribed[A]||(L.quiet||(this.send(`GET ${A}`),this.send(`SUB ${A}`)),this.subscribed[A]=!0)}subscribePreviousSubscriptions(){Object.keys(this.subscribed).forEach(t=>{this.subscribed[t]=!1}),[...this.subscriptions].forEach(t=>{this.subscribe(t.params,t.cb,t.errorCb,t.quiet)})}unlisten(t,e){[...this.subscriptions||[],...this.requests||[]].filter(i=>i.params.channel===t.channel&&(!e||i.cb===e)).forEach(({onErrorCb:i,onMessageCb:o})=>{this.removeEvents(o,i)})}unsubscribe(t,e){let i=this.subscriptions.filter(o=>o.params.channel===t&&(!e||o.cb===e));i.forEach(({onErrorCb:o,onMessageCb:n})=>{this.removeEvents(n,o)}),this.subscriptions=this.subscriptions.filter(o=>o.params.channel!==t||e&&o.cb!==e),t&&this.subscribed[t]&&!this.subscriptions.find(o=>o.params.channel===t)&&i.find(o=>!o.quiet)&&(this.send(`DEL ${t}`),this.subscribed[t]=!1)}},fR=G_;var Gi={RAW:"raw",SCHEMATIC:"schematic",TOPOGRAPHIC:"topographic"},j_=class{get bbox(){return this._bbox}set bbox(t){JSON.stringify(t)!==JSON.stringify(this._bbox)&&(this._bbox=t,this.wsApi&&this._bbox&&this.wsApi.send(`BBOX ${this._bbox.join(" ")}`))}get buffer(){return this._buffer}set buffer(t){JSON.stringify(t)!==JSON.stringify(this._buffer)&&(this._buffer=t,this.wsApi&&this._buffer&&this.wsApi.send(`BUFFER ${this._buffer.join(" ")}`))}get url(){return this._url}set url(t){this._url!==t&&(this._url=t,(this.wsApi.open||this.wsApi.connecting)&&this.open())}constructor(t={}){this.version="2";let e=t;typeof t=="string"&&(e={url:t});let{apiKey:i}=e,{url:o}=e,n=new fR,l="";i&&!o?.includes("key=")&&(l=`?key=${i}`),this._url=(o||"wss://api.geops.io/tracker-ws/v1/")+l,this._buffer=e.buffer||[100,100],this._bbox=e.bbox,this.version=e.version||"2",this.pingIntervalMs=e.pingIntervalMs||1e4,this.reconnectTimeoutMs=e.reconnectTimeoutMs||100,this.wsApi=n}close(){this.wsApi.close()}get(t){let e=t;return typeof t=="string"&&(e={channel:t}),new Promise((i,o)=>{this.wsApi.get(e,i,o)})}getFullTrajectory(t,e,i){let o="";this.version==="1"&&(o=b4(e,Gi));let n=[`full_trajectory${o}`];return t&&n.push(t),(!e||e===Gi.TOPOGRAPHIC)&&i&&n.push(`gen${i}`),this.get(n.join("_"))}getStation(t,e){let i={args:t,channel:`station${b4(e,Gi)}`};return this.get(i)}getStations(t,e=100){return new Promise((i,o)=>{this.get(`station${b4(t,Gi)}`).then(dR(i,void 0,e)).catch(o)})}getStopSequence(t){return this.get(`stopsequence_${t}`)}getTrajectory(t,e){return this.get(`partial_trajectory${b4(e,Gi)}_${t}`)}onClose(){window.clearTimeout(this.pingInterval),window.clearTimeout(this.reconnectTimeout),this.reconnectTimeoutMs&&(this.reconnectTimeout=window.setTimeout(()=>this.open(),this.reconnectTimeoutMs))}onOpen(){this.bbox&&this.wsApi.send(`BBOX ${this.bbox.join(" ")}`),this.buffer&&this.wsApi.send(`BUFFER ${this.buffer.join(" ")}`),this.pingIntervalMs&&(window.clearInterval(this.pingInterval),this.pingInterval=window.setInterval(()=>{this.wsApi.send("PING")},this.pingIntervalMs))}open(){this.wsApi.connect(this.url,this.onOpen.bind(this)),this.wsApi.websocket&&(this.wsApi.websocket.onclose=()=>{this.onClose()})}reset(){this.wsApi.send("RESET")}subscribe(t,e,i=()=>{},o=!1){!t||!e||this.wsApi.subscribe({channel:t},e,i,o)}subscribeDeletedVehicles(t,e,i=()=>{},o=!1){this.unsubscribeDeletedVehicles(e);let n="";this.version==="1"&&(n=b4(t,Gi)),this.subscribe(`deleted_vehicles${n}`,e,i,o)}subscribeDepartures(t,e,i=()=>{},o=!1){this.subscribeTimetable(t,e,i,o)}subscribeDisruptions(t,e,i=()=>{},o=!1){this.subscribeNewsticker(t,e,i,o)}subscribeExtraGeoms(t,e=()=>{},i=!1){this.subscribe("extra_geoms",t,e,i)}subscribeFullTrajectory(t,e,i,o=()=>{},n=!1){let l="";this.version==="1"&&(l=b4(e,Gi)),this.subscribe(`full_trajectory${l}_${t}`,i,o,n)}subscribeHealthCheck(t,e=()=>{},i=!1){this.subscribe("healthcheck",t,e,i)}subscribeNewsticker(t,e,i=()=>{},o=!1){this.subscribe(`${t}_newsticker`,e,i,o)}subscribeStations(t,e,i=()=>{},o=!1){this.subscribe(`station${b4(t,Gi)}`,e,i,o)}subscribeStopSequence(t,e,i=()=>{},o=!1){this.subscribe(`stopsequence_${t}`,e,i,o)}subscribeTimetable(t,e,i=()=>{},o=!1){this.subscribe(`timetable_${t}`,e,i,o)}subscribeTrajectory(t,e,i=()=>{},o=!1){this.unsubscribeTrajectory(e);let n="";this.version==="1"&&(n=b4(t,Gi)),this.subscribe(`trajectory${n}`,e,i,o)}unsubscribe(t,e="",i){let o=b4(Gi.SCHEMATIC,Gi),n=b4(Gi.TOPOGRAPHIC,Gi);this.wsApi.unsubscribe(`${t}${o}${e||""}`,i),this.wsApi.unsubscribe(`${t}${n}${e||""}`,i)}unsubscribeDeletedVehicles(t){this.unsubscribe("deleted_vehicles","",t)}unsubscribeDepartures(t,e){this.unsubscribeTimetable(t,e)}unsubscribeDisruptions(t,e){this.unsubscribeNewsticker(t,e)}unsubscribeExtraGeoms(t){this.unsubscribe("extra_geoms","",t)}unsubscribeFullTrajectory(t,e){this.unsubscribe("full_trajectory",`_${t}`,e)}unsubscribeHealthCheck(t){this.unsubscribe("healthcheck","",t)}unsubscribeNewsticker(t,e){this.unsubscribe(`${t}_newsticker`,"",e)}unsubscribeStations(t){this.unsubscribe("station","",t)}unsubscribeStopSequence(t,e){this.unsubscribe("stopsequence",`_${t}`,e)}unsubscribeTimetable(t,e){this.unsubscribe(`timetable_${t}`,"",e)}unsubscribeTrajectory(t){this.unsubscribe("trajectory","",t)}},q_=j_;var K_=class extends Pu{constructor(t={}){super(Object.assign(Object.assign({},t),{url:t.url||"https://api.geops.io/stops/v1/"}))}search(t,e){return this.fetch("",t,e)}},W_=K_;var XY=(r,t)=>{let e=null;return typeof window>"u"?null:(typeof document<"u"&&document?.createElement?(e=document.createElement("canvas"),e.width=r,e.height=t):OffscreenCanvas?e=new OffscreenCanvas(r,t):console.error("We didn't find a way to create a canvas element, document.createElement('canvas') and new OffscrenCanvas() are not supported"),e)},R7=XY;var $_={},YY=(r,t,e)=>{let i=`${r}, ${t}, ${e}`;if(!$_[i]){let o=R7(r*2,r*2);if(o){let n=o.getContext("2d");if(!n)return null;n.beginPath(),n.arc(r,r,t,0,2*Math.PI,!1),n.fillStyle=e,n.filter="blur(1px)",n.fill(),$_[i]=o}}return $_[i]},X_={},JY=(r,t,e,i,o="#000",n=1)=>{let l=`${r}, ${e}, ${i}, ${o}, ${n}`;if(!X_[l]){let A=R7(Math.ceil(r.length*t),Math.ceil(t+8*n));if(A){let d=A.getContext("2d");if(!d)return null;d.font=e,d.textAlign="left",d.textBaseline="middle",d.font=e,d.fillStyle=i,d.strokeStyle=o,d.lineWidth=1.5*n,d.strokeText(r,0,t),d.fillText(r,0,t),X_[l]=A}}return X_[l]},Y_={},tJ=(r,t,e,i,o,n)=>{let l=`${r}, ${t}, ${e}, ${i}, ${o}, ${n}`;if(!Y_[l]){let A=R7(r*2,r*2);if(A){let d=A.getContext("2d");if(!d)return null;d.fillStyle=e,i&&(d.lineWidth=1*n,d.strokeStyle="#000000"),d.beginPath(),d.arc(r,r,t,0,2*Math.PI,!1),d.fill(),o&&d.setLineDash([5,3]),i&&d.stroke(),Y_[l]=A}}return Y_[l]},J_={},eJ=(r,t,e,i,o,n,l,A)=>{let d=`${r}, ${t}, ${e}, ${i},${o}, ${n}, ${l}`;if(!J_[d]){let L=R7(t*2,t*2);if(L){let C=L.getContext("2d");if(!C)return null;n&&(C.save(),C.textBaseline="middle",C.textAlign="center",C.font=A(e+2,r),C.strokeStyle=o,C.strokeText(r,t,t),C.restore()),C.textBaseline="middle",C.textAlign="center",C.fillStyle=i,C.font=A(e,r),C.strokeStyle=o,C.strokeText(r,t,t),C.fillText(r,t,t),J_[d]=L}}return J_[d]},tx={},rJ=(r,t,e)=>{let{delayDisplay:i=3e5,delayOutlineColor:o="#000",getBgColor:n=()=>"#000",getDelayColor:l=()=>"#000",getDelayFont:A=u1=>`bold ${u1}px arial, sans-serif`,getDelayText:d=()=>null,getMaxRadiusForStrokeAndDelay:L=()=>7,getMaxRadiusForText:C=()=>10,getRadius:y=()=>0,getText:E=u1=>u1,getTextColor:B=()=>"#000",getTextFont:Z=u1=>`bold ${u1}px arial, sans-serif`,getTextSize:Q=()=>14,hoverVehicleId:V,selectedVehicleId:G,useDelayStyle:J}=e,{pixelRatio:n1=1,zoom:r1}=t,{type:m1}=r.properties,{delay:w1,line:B1,operator_provides_realtime_journey:g1,state:L1,train_id:z1}=r.properties,{color:s1,name:x1,text_color:N1}=B1||{};x1=E(x1);let V1=L1==="JOURNEY_CANCELLED";m1||(m1="rail"),x1||(x1="I"),s1&&!s1.startsWith("#")&&(s1=`#${s1}`),N1&&!N1.startsWith("#")&&(N1=`#${N1}`);let l2=Math.min(Math.floor(r1||1),16),p2=!!(V&&V===z1),o2=!!(G&&G===z1),G1=y(m1,l2)*n1,L2=G1>=L()*n1;(p2||o2)&&(G1=L2?G1+5*n1:14*n1);let V2=G1>C()*n1,w2=`${G1}${p2||o2}`;if(J?w2+=`${g1}${w1}${V1}`:(s1=s1||n(m1,B1),w2+=`${s1}`,L2&&(w2+=`${V1}${w1}`)),V2&&(J?N1="#000000":N1=N1||B(m1,B1),w2+=`${x1}${N1}`),!tx[w2]){if(G1===0)return null;let u1=1*n1,P1=G1+2*n1,F1=G1*2,J1=P1*2+u1*2,u2=J1/2,r2=null;L2&&w1!==null&&(r2=YY(u2,P1,l(w1,V1)));let F2=null,k2=0;if(L2&&(p2||(w1||0)>=i||V1)){k2=Math.max(V1?19:14,Math.min(V1?19:17,G1*1.2))*n1;let Vt=d(w1,V1);Vt&&(F2=JY(Vt,k2,A(k2,Vt),l(w1,V1,!0),o,n1))}let j2=L2||p2||o2,R2=!!L2&&!!J&&w1===null&&g1==="yes",it=s1||"#fff";J&&(it=l(w1,V1));let pt=tJ(u2,G1,it,j2,R2,n1),N2=J1+(F2?.width||0)*2,ce=R7(N2,J1);if(ce){let Vt=ce.getContext("2d");if(!Vt)return null;let qt=F2?.width||0;r2&&Vt.drawImage(r2,qt,0),pt&&Vt.drawImage(pt,qt,0);let ot=null;if(V2){let Qt=Math.max(G1,10),Lt=Q(Vt,F1,x1,Qt,Z);ot=eJ(x1,u2,Lt,N1||"#000",it,!!J&&w1===null&&g1==="yes",n1,Z)}ot&&Vt.drawImage(ot,qt,0),F2&&Vt.drawImage(F2,qt+Math.ceil(u2+P1)+u1,Math.ceil(u2-k2)),tx[w2]=ce}}return tx[w2]},pR=rJ;var iJ=(r,t,e=!1)=>{let i=["HIDDEN","LEAVING","BOARDING"],o=r.has_fzo&&i.includes(r.state),n=t.has_fzo&&i.includes(t.state);if(o||n){if(o!==n)return o?-1:1;if(r.state!==t.state)return i.indexOf(r.state)-i.indexOf(t.state)}let l=null,A=null,d=Date.now();return e?(l=new Date(r.min_arrival_time||r.time).getTime()-d,A=new Date(t.min_arrival_time||t.time).getTime()-d):(l=new Date(r.time).getTime()-d,A=new Date(t.time).getTime()-d),l-A},LR=iJ;var XL="vectorTileFeature";var nJ=(r,t=!1,e=30)=>{let i=Object.keys(r).map(y=>r[y]);i.sort((y,E)=>LR(y,E,t));let o=new Date;o.setMinutes(o.getMinutes()+e);let n=o.getTime(),l=new Date;l.setMinutes(l.getMinutes()-e);let A=l.getTime(),d=[],L=[],C=null;for(let y=i.length-1;y>=0;y-=1){let E=Object.assign({},i[y]),B=new Date(E.time).getTime();B>A&&B<n&&(E.state==="BOARDING"&&(L.includes(E.platform)?E.state="HIDDEN":L.push(E.platform)),C&&E.to[0]===C.to[0]&&Math.abs(B-C.time)<1e3&&E.line.name===C.line.name&&(E.state="HIDDEN"),/(STOP_CANCELLED|JOURNEY_CANCELLED)/.test(E.state)&&(E.cancelled=!0),C=E,C.time=B,d.unshift(E))}return d},CR=nJ;var oJ=(r,t=!1,e=30,i=100)=>{let o={},n={};return l=>{let{content:A,source:d}=l;o[d]&&window.clearTimeout(o[d]),A&&(n[A.call_id]=A,o[d]=window.setTimeout(()=>{let L=CR(n,t||!1,e);r(L)},i))}},ex=oJ;var gR=r=>{let t=r;Array.isArray(t)||(t=[r]);let e=[];return t.forEach(i=>{var o,n,l;e.push(i);let A=i.children||i.get("children")||((l=(n=(o=i).getLayers)===null||n===void 0?void 0:n.call(o))===null||l===void 0?void 0:l.getArray());e=e.concat(gR(A||[]))}),e},M4=gR;function aJ(r){let t=r.filter(n=>{var l;return(l=n?.trim)===null||l===void 0?void 0:l.call(n)}),e=t.map(n=>n.toLowerCase());return[...new Set(e)].map(n=>t.find(l=>l.toLowerCase()===n))}var mR=aJ;var w8={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function sJ(r,t,e){let i=Math.min.apply(null,r),o=Math.min.apply(null,t),n=Math.max.apply(null,r),l=Math.max.apply(null,t);return B4(i,o,n,l,e)}function Rs(r,t,e){return e?(e[0]=r[0]-t,e[1]=r[1]-t,e[2]=r[2]+t,e[3]=r[3]+t,e):[r[0]-t,r[1]-t,r[2]+t,r[3]+t]}function JL(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r.slice()}function z7(r,t,e){let i,o;return t<r[0]?i=r[0]-t:r[2]<t?i=t-r[2]:i=0,e<r[1]?o=r[1]-e:r[3]<e?o=e-r[3]:o=0,i*i+o*o}function Ql(r,t){return wd(r,t[0],t[1])}function Hl(r,t){return r[0]<=t[0]&&t[2]<=r[2]&&r[1]<=t[1]&&t[3]<=r[3]}function wd(r,t,e){return r[0]<=t&&t<=r[2]&&r[1]<=e&&e<=r[3]}function YL(r,t){let e=r[0],i=r[1],o=r[2],n=r[3],l=t[0],A=t[1],d=w8.UNKNOWN;return l<e?d=d|w8.LEFT:l>o&&(d=d|w8.RIGHT),A<i?d=d|w8.BELOW:A>n&&(d=d|w8.ABOVE),d===w8.UNKNOWN&&(d=w8.INTERSECTING),d}function D7(){return[1/0,1/0,-1/0,-1/0]}function B4(r,t,e,i,o){return o?(o[0]=r,o[1]=t,o[2]=e,o[3]=i,o):[r,t,e,i]}function wa(r){return B4(1/0,1/0,-1/0,-1/0,r)}function tC(r,t){let e=r[0],i=r[1];return B4(e,i,e,i,t)}function Ru(r,t,e,i,o){let n=wa(o);return rx(n,r,t,e,i)}function Vl(r,t){return r[0]==t[0]&&r[2]==t[2]&&r[1]==t[1]&&r[3]==t[3]}function vR(r,t){return t[0]<r[0]&&(r[0]=t[0]),t[2]>r[2]&&(r[2]=t[2]),t[1]<r[1]&&(r[1]=t[1]),t[3]>r[3]&&(r[3]=t[3]),r}function yR(r,t){t[0]<r[0]&&(r[0]=t[0]),t[0]>r[2]&&(r[2]=t[0]),t[1]<r[1]&&(r[1]=t[1]),t[1]>r[3]&&(r[3]=t[1])}function rx(r,t,e,i,o){for(;e<i;e+=o)lJ(r,t[e],t[e+1]);return r}function lJ(r,t,e){r[0]=Math.min(r[0],t),r[1]=Math.min(r[1],e),r[2]=Math.max(r[2],t),r[3]=Math.max(r[3],e)}function eC(r,t){let e;return e=t(ix(r)),e||(e=t(Gl(r)),e)||(e=t(nx(r)),e)||(e=t(jl(r)),e)?e:!1}function ix(r){return[r[0],r[1]]}function Gl(r){return[r[2],r[1]]}function k7(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function bd(r,t,e,i,o){let[n,l,A,d,L,C,y,E]=cJ(r,t,e,i);return B4(Math.min(n,A,L,y),Math.min(l,d,C,E),Math.max(n,A,L,y),Math.max(l,d,C,E),o)}function cJ(r,t,e,i){let o=t*i[0]/2,n=t*i[1]/2,l=Math.cos(e),A=Math.sin(e),d=o*l,L=o*A,C=n*l,y=n*A,E=r[0],B=r[1];return[E-d+y,B-L-C,E-d-y,B-L+C,E+d-y,B+L+C,E+d+y,B+L-C,E-d+y,B-L-C]}function n7(r){return r[3]-r[1]}function rC(r,t,e){let i=e||D7();return u0(r,t)?(r[0]>t[0]?i[0]=r[0]:i[0]=t[0],r[1]>t[1]?i[1]=r[1]:i[1]=t[1],r[2]<t[2]?i[2]=r[2]:i[2]=t[2],r[3]<t[3]?i[3]=r[3]:i[3]=t[3]):wa(i),i}function jl(r){return[r[0],r[3]]}function nx(r){return[r[2],r[3]]}function F0(r){return r[2]-r[0]}function u0(r,t){return r[0]<=t[2]&&r[2]>=t[0]&&r[1]<=t[3]&&r[3]>=t[1]}function ba(r){return r[2]<r[0]||r[3]<r[1]}function _R(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r}function xR(r,t,e){let i=!1,o=YL(r,t),n=YL(r,e);if(o===w8.INTERSECTING||n===w8.INTERSECTING)i=!0;else{let l=r[0],A=r[1],d=r[2],L=r[3],C=t[0],y=t[1],E=e[0],B=e[1],Z=(B-y)/(E-C),Q,V;n&w8.ABOVE&&!(o&w8.ABOVE)&&(Q=E-(B-L)/Z,i=Q>=l&&Q<=d),!i&&n&w8.RIGHT&&!(o&w8.RIGHT)&&(V=B-(E-d)*Z,i=V>=A&&V<=L),!i&&n&w8.BELOW&&!(o&w8.BELOW)&&(Q=E-(B-A)/Z,i=Q>=l&&Q<=d),!i&&n&w8.LEFT&&!(o&w8.LEFT)&&(V=B-(E-l)*Z,i=V>=A&&V<=L)}return i}function wR(r,t,e,i){if(ba(r))return wa(e);let o=[];if(i>1){let A=r[2]-r[0],d=r[3]-r[1];for(let L=0;L<i;++L)o.push(r[0]+A*L/i,r[1],r[2],r[1]+d*L/i,r[2]-A*L/i,r[3],r[0],r[3]-d*L/i)}else o=[r[0],r[1],r[2],r[1],r[2],r[3],r[0],r[3]];t(o,o,2);let n=[],l=[];for(let A=0,d=o.length;A<d;A+=2)n.push(o[A]),l.push(o[A+1]);return sJ(n,l,e)}function ox(r,t){let e=t.getExtent(),i=k7(r);if(t.canWrapX()&&(i[0]<e[0]||i[0]>=e[2])){let o=F0(e),l=Math.floor((i[0]-e[0])/o)*o;r[0]-=l,r[2]-=l}return r}function bR(r,t,e){if(t.canWrapX()){let i=t.getExtent();if(!isFinite(r[0])||!isFinite(r[2]))return[[i[0],r[1],i[2],r[3]]];ox(r,t);let o=F0(i);if(F0(r)>o&&!e)return[[i[0],r[1],i[2],r[3]]];if(r[0]<i[0])return[[r[0]+o,r[1],i[2],r[3]],[i[0],r[1],r[2],r[3]]];if(r[2]>i[2])return[[r[0],r[1],i[2],r[3]],[i[0],r[1],r[2]-o,r[3]]]}return[r]}function h5(){throw new Error("Unimplemented abstract method.")}var uJ=0;function vr(r){return r.ol_uid||(r.ol_uid=String(++uJ))}var S4={PROPERTYCHANGE:"propertychange"};var l5={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};var ax=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}},zu=ax;function MR(r,t,e){let i,o;e=e||E4;let n=0,l=r.length,A=!1;for(;n<l;)i=n+(l-n>>1),o=+e(r[i],t),o<0?n=i+1:(l=i,A=!o);return A?n:~n}function E4(r,t){return r>t?1:r<t?-1:0}function BR(r,t){return r<t?1:r>t?-1:0}function iC(r,t,e){if(r[0]<=t)return 0;let i=r.length;if(t<=r[i-1])return i-1;if(typeof e=="function"){for(let o=1;o<i;++o){let n=r[o];if(n===t)return o;if(n<t)return e(t,r[o-1],n)>0?o-1:o}return i-1}if(e>0){for(let o=1;o<i;++o)if(r[o]<t)return o-1;return i-1}if(e<0){for(let o=1;o<i;++o)if(r[o]<=t)return o;return i-1}for(let o=1;o<i;++o){if(r[o]==t)return o;if(r[o]<t)return r[o-1]-t<t-r[o]?o-1:o}return i-1}function SR(r,t,e){for(;t<e;){let i=r[t];r[t]=r[e],r[e]=i,++t,--e}}function ar(r,t){let e=Array.isArray(t)?t:[t],i=e.length;for(let o=0;o<i;o++)r[r.length]=e[o]}function B9(r,t){let e=r.length;if(e!==t.length)return!1;for(let i=0;i<e;i++)if(r[i]!==t[i])return!1;return!0}function Ma(){return!0}function Ba(){return!1}function Sa(){}function nC(r){let t,e,i;return function(){let o=Array.prototype.slice.call(arguments);return(!e||this!==i||!B9(o,e))&&(i=this,e=o,t=r.apply(this,arguments)),t}}function ER(r){function t(){let e;try{e=r()}catch(i){return Promise.reject(i)}return e instanceof Promise?e:Promise.resolve(e)}return t()}function Mo(r){for(let t in r)delete r[t]}function An(r){let t;for(t in r)return!1;return!t}var sx=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}};var b8=sx;var lx=class extends zu{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;let i=this.listeners_||(this.listeners_={}),o=i[t]||(i[t]=[]);o.includes(e)||o.push(e)}dispatchEvent(t){let e=typeof t=="string",i=e?t:t.type,o=this.listeners_&&this.listeners_[i];if(!o)return;let n=e?new b8(t):t;n.target||(n.target=this.eventTarget_||this);let l=this.dispatching_||(this.dispatching_={}),A=this.pendingRemovals_||(this.pendingRemovals_={});i in l||(l[i]=0,A[i]=0),++l[i];let d;for(let L=0,C=o.length;L<C;++L)if("handleEvent"in o[L]?d=o[L].handleEvent(n):d=o[L].call(this,n),d===!1||n.propagationStopped){d=!1;break}if(--l[i]===0){let L=A[i];for(delete A[i];L--;)this.removeEventListener(i,Sa);delete l[i]}return d}disposeInternal(){this.listeners_&&Mo(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(t,e){if(!this.listeners_)return;let i=this.listeners_[t];if(!i)return;let o=i.indexOf(e);o!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[o]=Sa,++this.pendingRemovals_[t]):(i.splice(o,1),i.length===0&&delete this.listeners_[t]))}},Du=lx;function ir(r,t,e,i,o){if(o){let l=e;e=function(A){return r.removeEventListener(t,e),l.call(i??this,A)}}else i&&i!==r&&(e=e.bind(i));let n={target:r,type:t,listener:e};return r.addEventListener(t,e),n}function cx(r,t,e,i){return ir(r,t,e,i,!0)}function f3(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),Mo(r))}var ku=class extends Du{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(l5.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){let i=t.length,o=new Array(i);for(let n=0;n<i;++n)o[n]=ir(this,t[n],e);return o}return ir(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){let o=t.length;i=new Array(o);for(let n=0;n<o;++n)i[n]=cx(this,t[n],e)}else i=cx(this,t,e);return e.ol_key=i,i}unInternal(t,e){let i=e.ol_key;if(i)sr(i);else if(Array.isArray(t))for(let o=0,n=t.length;o<n;++o)this.removeEventListener(t[o],e);else this.removeEventListener(t,e)}};ku.prototype.on;ku.prototype.once;ku.prototype.un;function sr(r){if(Array.isArray(r))for(let t=0,e=r.length;t<e;++t)f3(r[t]);else f3(r)}var oC=ku;var aC=class extends b8{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}},ux=class extends oC{constructor(t){super(),this.on,this.once,this.un,vr(this),this.values_=null,t!==void 0&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new aC(i,t,e)),i=S4.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new aC(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){let o=this.values_||(this.values_={});if(i)o[t]=e;else{let n=o[t];o[t]=e,n!==e&&this.notify(t,n)}}setProperties(t,e){for(let i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){let i=this.values_[t];delete this.values_[t],An(this.values_)&&(this.values_=null),e||this.notify(t,i)}}},P0=ux;var TR={info:1,warn:2,error:3,none:4},hJ=TR.info;function sC(...r){hJ>TR.warn||console.warn(...r)}function n6(r,t,e){return Math.min(Math.max(r,t),e)}function IR(r,t,e,i,o,n){let l=o-e,A=n-i;if(l!==0||A!==0){let d=((r-e)*l+(t-i)*A)/(l*l+A*A);d>1?(e=o,i=n):d>0&&(e+=l*d,i+=A*d)}return T4(r,t,e,i)}function T4(r,t,e,i){let o=e-r,n=i-t;return o*o+n*n}function zs(r){return r*180/Math.PI}function ji(r){return r*Math.PI/180}function ql(r,t){let e=r%t;return e*t<0?e+t:e}function qi(r,t,e){return r+e*(t-r)}function lC(r,t){let e=Math.pow(10,t);return Math.round(r*e)/e}function cC(r,t,e){if(r>=t&&r<e)return r;let i=e-t;return((r-t)%i+i)%i+t}function FR(r,t){return r[0]+=+t[0],r[1]+=+t[1],r}function Kl(r,t){let e=!0;for(let i=r.length-1;i>=0;--i)if(r[i]!=t[i]){e=!1;break}return e}function Ou(r,t){let e=Math.cos(t),i=Math.sin(t),o=r[0]*e-r[1]*i,n=r[1]*e+r[0]*i;return r[0]=o,r[1]=n,r}function PR(r,t){return r[0]*=t,r[1]*=t,r}function uC(r,t){if(t.canWrapX()){let e=F0(t.getExtent()),i=RR(r,t,e);i&&(r[0]-=i*e)}return r}function RR(r,t,e){let i=t.getExtent(),o=0;return t.canWrapX()&&(r[0]<i[0]||r[0]>i[2])&&(e=e||F0(i),o=Math.floor((r[0]-i[0])/e)),o}var Ea={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var hx=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Ea[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},Zu=hx;var Md=6378137,Nu=Math.PI*Md,AJ=[-Nu,-Nu,Nu,Nu],dJ=[-180,-85,180,85],hC=Md*Math.log(Math.tan(Math.PI/2)),Ds=class extends Zu{constructor(t){super({code:t,units:"m",extent:AJ,global:!0,worldExtent:dJ,getPointResolution:function(e,i){return e/Math.cosh(i[1]/Md)}})}},Ax=[new Ds("EPSG:3857"),new Ds("EPSG:102100"),new Ds("EPSG:102113"),new Ds("EPSG:900913"),new Ds("http://www.opengis.net/def/crs/EPSG/0/3857"),new Ds("http://www.opengis.net/gml/srs/epsg.xml#3857")];function zR(r,t,e,i){let o=r.length;e=e>1?e:2,i=i??e,t===void 0&&(e>2?t=r.slice():t=new Array(o));for(let n=0;n<o;n+=i){t[n]=Nu*r[n]/180;let l=Md*Math.log(Math.tan(Math.PI*(+r[n+1]+90)/360));l>hC?l=hC:l<-hC&&(l=-hC),t[n+1]=l}return t}function DR(r,t,e,i){let o=r.length;e=e>1?e:2,i=i??e,t===void 0&&(e>2?t=r.slice():t=new Array(o));for(let n=0;n<o;n+=i)t[n]=180*r[n]/Nu,t[n+1]=360*Math.atan(Math.exp(r[n+1]/Md))/Math.PI-90;return t}var fJ=6378137,kR=[-180,-90,180,90],pJ=Math.PI*fJ/180,Ta=class extends Zu{constructor(t,e){super({code:t,units:"degrees",extent:kR,axisOrientation:e,global:!0,metersPerUnit:pJ,worldExtent:kR})}},dx=[new Ta("CRS:84"),new Ta("EPSG:4326","neu"),new Ta("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ta("urn:ogc:def:crs:OGC:2:84"),new Ta("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Ta("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ta("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];var fx={};function OR(r){return fx[r]||fx[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function ZR(r,t){fx[r]=t}var Uu={};function Qu(r,t,e){let i=r.getCode(),o=t.getCode();i in Uu||(Uu[i]={}),Uu[i][o]=e}function AC(r,t){return r in Uu&&t in Uu[r]?Uu[r][t]:null}var dC=.9996,Un=.00669438,pC=Un*Un,LC=pC*Un,Wl=Un/(1-Un),NR=Math.sqrt(1-Un),Hu=(1-NR)/(1+NR),VR=Hu*Hu,px=VR*Hu,Lx=px*Hu,GR=Lx*Hu,jR=1-Un/4-3*pC/64-5*LC/256,LJ=3*Un/8+3*pC/32+45*LC/1024,CJ=15*pC/256+45*LC/1024,gJ=35*LC/3072,mJ=3/2*Hu-27/32*px+269/512*GR,vJ=21/16*VR-55/32*Lx,yJ=151/96*px-417/128*GR,_J=1097/512*Lx,fC=6378137;function xJ(r,t,e){let i=r-5e5,l=(e.north?t:t-1e7)/dC/(fC*jR),A=l+mJ*Math.sin(2*l)+vJ*Math.sin(4*l)+yJ*Math.sin(6*l)+_J*Math.sin(8*l),d=Math.sin(A),L=d*d,C=Math.cos(A),y=d/C,E=y*y,B=E*E,Z=1-Un*L,Q=Math.sqrt(1-Un*L),V=fC/Q,G=(1-Un)/Z,J=Wl*C**2,n1=J*J,r1=i/(V*dC),m1=r1*r1,w1=m1*r1,B1=w1*r1,g1=B1*r1,L1=g1*r1,z1=A-y/G*(m1/2-B1/24*(5+3*E+10*J-4*n1-9*Wl))+L1/720*(61+90*E+298*J+45*B-252*Wl-3*n1),s1=(r1-w1/6*(1+2*E+J)+g1/120*(5-2*J+28*E-3*n1+8*Wl+24*B))/C;return s1=cC(s1+ji(qR(e.number)),-Math.PI,Math.PI),[zs(s1),zs(z1)]}var UR=-80,QR=84,wJ=-180,bJ=180;function MJ(r,t,e){r=cC(r,wJ,bJ),t<UR?t=UR:t>QR&&(t=QR);let i=ji(t),o=Math.sin(i),n=Math.cos(i),l=o/n,A=l*l,d=A*A,L=ji(r),C=qR(e.number),y=ji(C),E=fC/Math.sqrt(1-Un*o**2),B=Wl*n**2,Z=n*cC(L-y,-Math.PI,Math.PI),Q=Z*Z,V=Q*Z,G=V*Z,J=G*Z,n1=J*Z,r1=fC*(jR*i-LJ*Math.sin(2*i)+CJ*Math.sin(4*i)-gJ*Math.sin(6*i)),m1=dC*E*(Z+V/6*(1-A+B)+J/120*(5-18*A+d+72*B-58*Wl))+5e5,w1=dC*(r1+E*l*(Q/2+G/24*(5-A+9*B+4*B**2)+n1/720*(61-58*A+d+600*B-330*Wl)));return e.north||(w1+=1e7),[m1,w1]}function qR(r){return(r-1)*6-180+3}var BJ=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function KR(r){let t=0;for(let o of BJ){let n=r.match(o);if(n){t=parseInt(n[1]);break}}if(!t)return null;let e=0,i=!1;return t>32700&&t<32761?e=t-32700:t>32600&&t<32661&&(i=!0,e=t-32600),e?{number:e,north:i}:null}function HR(r,t){return function(e,i,o,n){let l=e.length;o=o>1?o:2,n=n??o,i||(o>2?i=e.slice():i=new Array(l));for(let A=0;A<l;A+=n){let d=e[A],L=e[A+1],C=r(d,L,t);i[A]=C[0],i[A+1]=C[1]}return i}}function WR(r){return KR(r)?new Zu({code:r,units:"m"}):null}function $R(r){let t=KR(r.getCode());return t?{forward:HR(MJ,t),inverse:HR(xJ,t)}:null}var XR=63710088e-1;function Cx(r,t,e){e=e||XR;let i=ji(r[1]),o=ji(t[1]),n=(o-i)/2,l=ji(t[0]-r[0])/2,A=Math.sin(n)*Math.sin(n)+Math.sin(l)*Math.sin(l)*Math.cos(i)*Math.cos(o);return 2*e*Math.atan2(Math.sqrt(A),Math.sqrt(1-A))}function YR(r,t,e,i){i=i||XR;let o=ji(r[1]),n=ji(r[0]),l=t/i,A=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(e)),d=n+Math.atan2(Math.sin(e)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(A));return[zs(d),zs(A)]}var SJ=[$R],EJ=[WR];var mx=!0;function yx(r){mx=!(r===void 0?!0:r)}function _x(r,t){if(t!==void 0){for(let e=0,i=r.length;e<i;++e)t[e]=r[e];t=t}else t=r.slice();return t}function tz(r,t){if(t!==void 0&&r!==t){for(let e=0,i=r.length;e<i;++e)t[e]=r[e];r=t}return r}function vx(r){ZR(r.getCode(),r),Qu(r,r,_x)}function TJ(r){r.forEach(vx)}function p3(r){if(typeof r!="string")return r;let t=OR(r);if(t)return t;for(let e of EJ){let i=e(r);if(i)return i}return null}function xx(r,t,e,i){r=p3(r);let o,n=r.getPointResolutionFunc();if(n){if(o=n(t,e),i&&i!==r.getUnits()){let l=r.getMetersPerUnit();l&&(o=o*l/Ea[i])}}else{let l=r.getUnits();if(l=="degrees"&&!i||i=="degrees")o=t;else{let A=Fa(r,p3("EPSG:4326"));if(!A&&l!=="degrees")o=t*r.getMetersPerUnit();else{let L=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];L=A(L,L,2);let C=Cx(L.slice(0,2),L.slice(2,4)),y=Cx(L.slice(4,6),L.slice(6,8));o=(C+y)/2}let d=i?Ea[i]:r.getMetersPerUnit();d!==void 0&&(o/=d)}}return o}function JR(r){TJ(r),r.forEach(function(t){r.forEach(function(e){t!==e&&Qu(t,e,_x)})})}function IJ(r,t,e,i){r.forEach(function(o){t.forEach(function(n){Qu(o,n,e),Qu(n,o,i)})})}function CC(r,t){return r?typeof r=="string"?p3(r):r:p3(t)}function Ia(r,t){return yx(),Yl(r,"EPSG:4326",t!==void 0?t:"EPSG:3857")}function $l(r,t){let e=Yl(r,t!==void 0?t:"EPSG:3857","EPSG:4326"),i=e[0];return(i<-180||i>180)&&(e[0]=ql(i+180,360)-180),e}function ez(r,t){if(r===t)return!0;let e=r.getUnits()===t.getUnits();return(r.getCode()===t.getCode()||Fa(r,t)===_x)&&e}function Fa(r,t){let e=r.getCode(),i=t.getCode(),o=AC(e,i);if(o)return o;let n=null,l=null;for(let d of SJ)n||(n=d(r)),l||(l=d(t));if(!n&&!l)return null;let A="EPSG:4326";if(l)if(n)o=gx(n.inverse,l.forward);else{let d=AC(e,A);d&&(o=gx(d,l.forward))}else{let d=AC(A,i);d&&(o=gx(n.inverse,d))}return o&&(vx(r),vx(t),Qu(r,t,o)),o}function gx(r,t){return function(e,i,o,n){return i=r(e,i,o,n),t(i,i,o,n)}}function Xl(r,t){let e=p3(r),i=p3(t);return Fa(e,i)}function Yl(r,t,e){let i=Xl(t,e);if(!i){let o=p3(t).getCode(),n=p3(e).getCode();throw new Error(`No transform available between ${o} and ${n}`)}return i(r,void 0,r.length)}function F4(r,t,e,i){let o=Xl(t,e);return wR(r,o,void 0,i)}var I4=null;function Jl(){return I4}function Bd(r,t){return I4?Yl(r,t,I4):r}function P4(r,t){return I4?Yl(r,I4,t):(mx&&!Kl(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(mx=!1,sC("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r)}function ks(r,t){return I4?F4(r,t,I4):r}function Os(r,t){return I4?F4(r,I4,t):r}function rz(r,t){if(!I4)return r;let e=p3(t).getMetersPerUnit(),i=I4.getMetersPerUnit();return e&&i?r*e/i:r}function FJ(){JR(Ax),JR(dx),IJ(dx,Ax,zR,DR)}FJ();function o3(r,t){if(!r)throw new Error(t)}var gg1=new Array(6);function e8(){return[1,0,0,1,0,0]}function nz(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function M8(r,t){let e=t[0],i=t[1];return t[0]=r[0]*e+r[2]*i+r[4],t[1]=r[1]*e+r[3]*i+r[5],t}function Ci(r,t,e,i,o,n,l,A){let d=Math.sin(n),L=Math.cos(n);return r[0]=i*L,r[1]=o*d,r[2]=-i*d,r[3]=o*L,r[4]=l*i*L-A*i*d+t,r[5]=l*o*d+A*o*L+e,r}function oz(r,t,e,i,o,n,l){return wx(Ci(e8(),r,t,e,i,o,n,l))}function gC(r,t){let e=PJ(t);o3(e!==0,"Transformation matrix cannot be inverted");let i=t[0],o=t[1],n=t[2],l=t[3],A=t[4],d=t[5];return r[0]=l/e,r[1]=-o/e,r[2]=-n/e,r[3]=i/e,r[4]=(n*d-l*A)/e,r[5]=-(i*d-o*A)/e,r}function PJ(r){return r[0]*r[3]-r[1]*r[2]}var RJ=[1e5,1e5,1e5,1e5,2,2];function wx(r){return"matrix("+r.join(", ")+")"}function iz(r){return r.substring(7,r.length-1).split(",").map(parseFloat)}function az(r,t){let e=iz(r),i=iz(t);for(let o=0;o<6;++o)if(Math.round((e[o]-i[o])*RJ[o])!==0)return!1;return!0}function O7(r,t,e,i,o,n,l){n=n||[],l=l||2;let A=0;for(let d=t;d<e;d+=i){let L=r[d],C=r[d+1];n[A++]=o[0]*L+o[2]*C+o[4],n[A++]=o[1]*L+o[3]*C+o[5];for(let y=2;y<l;y++)n[A++]=r[d+y]}return n&&n.length!=A&&(n.length=A),n}function Vu(r,t,e,i,o,n,l){l=l||[];let A=Math.cos(o),d=Math.sin(o),L=n[0],C=n[1],y=0;for(let E=t;E<e;E+=i){let B=r[E]-L,Z=r[E+1]-C;l[y++]=L+B*A-Z*d,l[y++]=C+B*d+Z*A;for(let Q=E+2;Q<E+i;++Q)l[y++]=r[Q]}return l&&l.length!=y&&(l.length=y),l}function sz(r,t,e,i,o,n,l,A){A=A||[];let d=l[0],L=l[1],C=0;for(let y=t;y<e;y+=i){let E=r[y]-d,B=r[y+1]-L;A[C++]=d+o*E,A[C++]=L+n*B;for(let Z=y+2;Z<y+i;++Z)A[C++]=r[Z]}return A&&A.length!=C&&(A.length=C),A}function lz(r,t,e,i,o,n,l){l=l||[];let A=0;for(let d=t;d<e;d+=i){l[A++]=r[d]+o,l[A++]=r[d+1]+n;for(let L=d+2;L<d+i;++L)l[A++]=r[L]}return l&&l.length!=A&&(l.length=A),l}var cz=e8(),zJ=[NaN,NaN],bx=class extends P0{constructor(){super(),this.extent_=D7(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=nC((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);let o=this.clone();return o.applyTransform(i),o.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return h5()}closestPointXY(t,e,i,o){return h5()}containsXY(t,e){return this.closestPointXY(t,e,zJ,Number.MIN_VALUE)===0}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return h5()}getExtent(t){if(this.extentRevision_!=this.getRevision()){let e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&wa(e),this.extentRevision_=this.getRevision()}return _R(this.extent_,t)}rotate(t,e){h5()}scale(t,e,i){h5()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return h5()}getType(){return h5()}applyTransform(t){h5()}intersectsExtent(t){return h5()}translate(t,e){h5()}transform(t,e){let i=p3(t),o=i.getUnits()=="tile-pixels"?function(n,l,A){let d=i.getExtent(),L=i.getWorldExtent(),C=n7(L)/n7(d);Ci(cz,L[0],L[3],C,-C,0,0,0);let y=O7(n,0,n.length,A,cz,l),E=Xl(i,e);return E?E(y,y,A):y}:Xl(i,e);return this.applyTransform(o),this}},mC=bx;var Mx=class extends mC{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return Ru(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return h5()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;let e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=uz(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){h5()}setLayout(t,e,i){let o;if(t)o=uz(t);else{for(let n=0;n<i;++n){if(e.length===0){this.layout="XY",this.stride=2;return}e=e[0]}o=e.length,t=Zs(o)}this.layout=t,this.stride=o}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(t,e){let i=this.getFlatCoordinates();if(i){let o=this.getStride();Vu(i,0,i.length,o,t,e,i),this.changed()}}scale(t,e,i){e===void 0&&(e=t),i||(i=k7(this.getExtent()));let o=this.getFlatCoordinates();if(o){let n=this.getStride();sz(o,0,o.length,n,t,e,i,o),this.changed()}}translate(t,e){let i=this.getFlatCoordinates();if(i){let o=this.getStride();lz(i,0,i.length,o,t,e,i),this.changed()}}};function Zs(r){let t;return r==2?t="XY":r==3?t="XYZ":r==4&&(t="XYZM"),t}function uz(r){let t;return r=="XY"?t=2:r=="XYZ"||r=="XYM"?t=3:r=="XYZM"&&(t=4),t}function hz(r,t,e){let i=r.getFlatCoordinates();if(!i)return null;let o=r.getStride();return O7(i,0,i.length,o,t,e)}var K8=Mx;function vC(r,t,e,i){for(let o=0,n=e.length;o<n;++o)r[t++]=e[o];return t}function tc(r,t,e,i){for(let o=0,n=e.length;o<n;++o){let l=e[o];for(let A=0;A<i;++A)r[t++]=l[A]}return t}function Ns(r,t,e,i,o){o=o||[];let n=0;for(let l=0,A=e.length;l<A;++l){let d=tc(r,t,e[l],i);o[n++]=d,t=d}return o.length=n,o}function yC(r,t,e,i,o){o=o||[];let n=0;for(let l=0,A=e.length;l<A;++l){let d=Ns(r,t,e[l],i,o[n]);d.length===0&&(d[0]=t),o[n++]=d,t=d[d.length-1]}return o.length=n,o}var _C=class r extends K8{constructor(t,e,i){super(),i!==void 0&&e===void 0?this.setFlatCoordinates(i,t):(e=e||0,this.setCenterAndRadius(t,e,i))}clone(){let t=new r(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,o){let n=this.flatCoordinates,l=t-n[0],A=e-n[1],d=l*l+A*A;if(d<o){if(d===0)for(let L=0;L<this.stride;++L)i[L]=n[L];else{let L=this.getRadius()/Math.sqrt(d);i[0]=n[0]+L*l,i[1]=n[1]+L*A;for(let C=2;C<this.stride;++C)i[C]=n[C]}return i.length=this.stride,d}return o}containsXY(t,e){let i=this.flatCoordinates,o=t-i[0],n=e-i[1];return o*o+n*n<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(t){let e=this.flatCoordinates,i=e[this.stride]-e[0];return B4(e[0]-i,e[1]-i,e[0]+i,e[1]+i,t)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){let t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e}getType(){return"Circle"}intersectsExtent(t){let e=this.getExtent();if(u0(t,e)){let i=this.getCenter();return t[0]<=i[0]&&t[2]>=i[0]||t[1]<=i[1]&&t[3]>=i[1]?!0:eC(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){let e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],o=t.slice();o[e]=o[0]+i;for(let n=1;n<e;++n)o[e+n]=t[n];this.setFlatCoordinates(this.layout,o),this.changed()}setCenterAndRadius(t,e,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);let o=this.flatCoordinates,n=vC(o,0,t,this.stride);o[n++]=o[0]+e;for(let l=1,A=this.stride;l<A;++l)o[n++]=o[l];o.length=n,this.changed()}getCoordinates(){return null}setCoordinates(t,e){}setRadius(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()}rotate(t,e){let i=this.getCenter(),o=this.getStride();this.setCenter(Vu(i,0,i.length,o,t,e,i)),this.changed()}};_C.prototype.transform;var Az=_C;var Sx=class r extends mC{constructor(t){super(),this.geometries_=t,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(f3),this.changeEventsKeys_.length=0}listenGeometriesChange_(){let t=this.geometries_;for(let e=0,i=t.length;e<i;++e)this.changeEventsKeys_.push(ir(t[e],l5.CHANGE,this.changed,this))}clone(){let t=new r(Bx(this.geometries_));return t.applyProperties(this),t}closestPointXY(t,e,i,o){if(o<z7(this.getExtent(),t,e))return o;let n=this.geometries_;for(let l=0,A=n.length;l<A;++l)o=n[l].closestPointXY(t,e,i,o);return o}containsXY(t,e){let i=this.geometries_;for(let o=0,n=i.length;o<n;++o)if(i[o].containsXY(t,e))return!0;return!1}computeExtent(t){wa(t);let e=this.geometries_;for(let i=0,o=e.length;i<o;++i)vR(t,e[i].getExtent());return t}getGeometries(){return Bx(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[],e=this.geometries_;for(let i=0,o=e.length;i<o;++i)e[i].getType()===this.getType()?t=t.concat(e[i].getGeometriesArrayRecursive()):t.push(e[i]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;let e=[],i=this.geometries_,o=!1;for(let n=0,l=i.length;n<l;++n){let A=i[n],d=A.getSimplifiedGeometry(t);e.push(d),d!==A&&(o=!0)}return o?new r(e):(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getType(){return"GeometryCollection"}intersectsExtent(t){let e=this.geometries_;for(let i=0,o=e.length;i<o;++i)if(e[i].intersectsExtent(t))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(t,e){let i=this.geometries_;for(let o=0,n=i.length;o<n;++o)i[o].rotate(t,e);this.changed()}scale(t,e,i){i||(i=k7(this.getExtent()));let o=this.geometries_;for(let n=0,l=o.length;n<l;++n)o[n].scale(t,e,i);this.changed()}setGeometries(t){this.setGeometriesArray(Bx(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){let e=this.geometries_;for(let i=0,o=e.length;i<o;++i)e[i].applyTransform(t);this.changed()}translate(t,e){let i=this.geometries_;for(let o=0,n=i.length;o<n;++o)i[o].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}};function Bx(r){return r.map(t=>t.clone())}var dn=Sx;function Ex(r,t,e,i){let o=0,n=r[e-i],l=r[e-i+1],A=0,d=0;for(;t<e;t+=i){let L=r[t]-n,C=r[t+1]-l;o+=d*L-A*C,A=L,d=C}return o/2}function Tx(r,t,e,i){let o=0;for(let n=0,l=e.length;n<l;++n){let A=e[n];o+=Ex(r,t,A,i),t=A}return o}function dz(r,t,e,i){let o=0;for(let n=0,l=e.length;n<l;++n){let A=e[n];o+=Tx(r,t,A,i),t=A[A.length-1]}return o}function fz(r,t,e,i,o,n,l){let A=r[t],d=r[t+1],L=r[e]-A,C=r[e+1]-d,y;if(L===0&&C===0)y=t;else{let E=((o-A)*L+(n-d)*C)/(L*L+C*C);if(E>1)y=e;else if(E>0){for(let B=0;B<i;++B)l[B]=qi(r[t+B],r[e+B],E);l.length=i;return}else y=t}for(let E=0;E<i;++E)l[E]=r[y+E];l.length=i}function Sd(r,t,e,i,o){let n=r[t],l=r[t+1];for(t+=i;t<e;t+=i){let A=r[t],d=r[t+1],L=T4(n,l,A,d);L>o&&(o=L),n=A,l=d}return o}function Ed(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n){let A=e[n];o=Sd(r,t,A,i,o),t=A}return o}function pz(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n){let A=e[n];o=Ed(r,t,A,i,o),t=A[A.length-1]}return o}function Td(r,t,e,i,o,n,l,A,d,L,C){if(t==e)return L;let y,E;if(o===0){if(E=T4(l,A,r[t],r[t+1]),E<L){for(y=0;y<i;++y)d[y]=r[t+y];return d.length=i,E}return L}C=C||[NaN,NaN];let B=t+i;for(;B<e;)if(fz(r,B-i,B,i,l,A,C),E=T4(l,A,C[0],C[1]),E<L){for(L=E,y=0;y<i;++y)d[y]=C[y];d.length=i,B+=i}else B+=i*Math.max((Math.sqrt(E)-Math.sqrt(L))/o|0,1);if(n&&(fz(r,e-i,t,i,l,A,C),E=T4(l,A,C[0],C[1]),E<L)){for(L=E,y=0;y<i;++y)d[y]=C[y];d.length=i}return L}function Id(r,t,e,i,o,n,l,A,d,L,C){C=C||[NaN,NaN];for(let y=0,E=e.length;y<E;++y){let B=e[y];L=Td(r,t,B,i,o,n,l,A,d,L,C),t=B}return L}function Lz(r,t,e,i,o,n,l,A,d,L,C){C=C||[NaN,NaN];for(let y=0,E=e.length;y<E;++y){let B=e[y];L=Id(r,t,B,i,o,n,l,A,d,L,C),t=B[B.length-1]}return L}function Qn(r,t,e,i,o){o=o!==void 0?o:[];let n=0;for(let l=t;l<e;l+=i)o[n++]=r.slice(l,l+i);return o.length=n,o}function Us(r,t,e,i,o){o=o!==void 0?o:[];let n=0;for(let l=0,A=e.length;l<A;++l){let d=e[l];o[n++]=Qn(r,t,d,i,o[n]),t=d}return o.length=n,o}function Fd(r,t,e,i,o){o=o!==void 0?o:[];let n=0;for(let l=0,A=e.length;l<A;++l){let d=e[l];o[n++]=d.length===1&&d[0]===t?[]:Us(r,t,d,i,o[n]),t=d[d.length-1]}return o.length=n,o}function ec(r,t,e,i,o,n,l){let A=(e-t)/i;if(A<3){for(;t<e;t+=i)n[l++]=r[t],n[l++]=r[t+1];return l}let d=new Array(A);d[0]=1,d[A-1]=1;let L=[t,e-i],C=0;for(;L.length>0;){let y=L.pop(),E=L.pop(),B=0,Z=r[E],Q=r[E+1],V=r[y],G=r[y+1];for(let J=E+i;J<y;J+=i){let n1=r[J],r1=r[J+1],m1=IR(n1,r1,Z,Q,V,G);m1>B&&(C=J,B=m1)}B>o&&(d[(C-t)/i]=1,E+i<C&&L.push(E,C),C+i<y&&L.push(C,y))}for(let y=0;y<A;++y)d[y]&&(n[l++]=r[t+y*i],n[l++]=r[t+y*i+1]);return l}function xC(r,t,e,i,o,n,l,A){for(let d=0,L=e.length;d<L;++d){let C=e[d];l=ec(r,t,C,i,o,n,l),A.push(l),t=C}return l}function Qs(r,t){return t*Math.round(r/t)}function DJ(r,t,e,i,o,n,l){if(t==e)return l;let A=Qs(r[t],o),d=Qs(r[t+1],o);t+=i,n[l++]=A,n[l++]=d;let L,C;do if(L=Qs(r[t],o),C=Qs(r[t+1],o),t+=i,t==e)return n[l++]=L,n[l++]=C,l;while(L==A&&C==d);for(;t<e;){let y=Qs(r[t],o),E=Qs(r[t+1],o);if(t+=i,y==L&&E==C)continue;let B=L-A,Z=C-d,Q=y-A,V=E-d;if(B*V==Z*Q&&(B<0&&Q<B||B==Q||B>0&&Q>B)&&(Z<0&&V<Z||Z==V||Z>0&&V>Z)){L=y,C=E;continue}n[l++]=L,n[l++]=C,A=L,d=C,L=y,C=E}return n[l++]=L,n[l++]=C,l}function Pd(r,t,e,i,o,n,l,A){for(let d=0,L=e.length;d<L;++d){let C=e[d];l=DJ(r,t,C,i,o,n,l),A.push(l),t=C}return l}function Cz(r,t,e,i,o,n,l,A){for(let d=0,L=e.length;d<L;++d){let C=e[d],y=[];l=Pd(r,t,C,i,o,n,l,y),A.push(y),t=C[C.length-1]}return l}var Ix=class r extends K8{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new r(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,o){return o<z7(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Sd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Td(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,o))}getArea(){return Ex(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Qn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){let e=[];return e.length=ec(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new r(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=tc(this.flatCoordinates,0,t,this.stride),this.changed()}},Fx=Ix;function rc(r,t,e,i,o,n,l){let A,d,L=(e-t)/i;if(L===1)A=t;else if(L===2)A=t,d=o;else if(L!==0){let C=r[t],y=r[t+1],E=0,B=[0];for(let V=t+i;V<e;V+=i){let G=r[V],J=r[V+1];E+=Math.sqrt((G-C)*(G-C)+(J-y)*(J-y)),B.push(E),C=G,y=J}let Z=o*E,Q=MR(B,Z);Q<0?(d=(Z-B[-Q-2])/(B[-Q-1]-B[-Q-2]),A=t+(-Q-2)*i):A=t+Q*i}l=l>1?l:2,n=n||new Array(l);for(let C=0;C<l;++C)n[C]=A===void 0?NaN:d===void 0?r[A+C]:qi(r[A+C],r[A+i+C],d);return n}function wC(r,t,e,i,o,n){if(e==t)return null;let l;if(o<r[t+i-1])return n?(l=r.slice(t,t+i),l[i-1]=o,l):null;if(r[e-1]<o)return n?(l=r.slice(e-i,e),l[i-1]=o,l):null;if(o==r[t+i-1])return r.slice(t,t+i);let A=t/i,d=e/i;for(;A<d;){let E=A+d>>1;o<r[(E+1)*i-1]?d=E:A=E+1}let L=r[A*i-1];if(o==L)return r.slice((A-1)*i,(A-1)*i+i);let C=r[(A+1)*i-1],y=(o-L)/(C-L);l=[];for(let E=0;E<i-1;++E)l.push(qi(r[(A-1)*i+E],r[A*i+E],y));return l.push(o),l}function gz(r,t,e,i,o,n,l){if(l)return wC(r,t,e[e.length-1],i,o,n);let A;if(o<r[i-1])return n?(A=r.slice(0,i),A[i-1]=o,A):null;if(r[r.length-1]<o)return n?(A=r.slice(r.length-i),A[i-1]=o,A):null;for(let d=0,L=e.length;d<L;++d){let C=e[d];if(t!=C){if(o<r[t+i-1])return null;if(o<=r[C-1])return wC(r,t,C,i,o,!1);t=C}}return null}function mz(r,t,e,i,o){return!eC(o,function(l){return!Hs(r,t,e,i,l[0],l[1])})}function Hs(r,t,e,i,o,n){let l=0,A=r[e-i],d=r[e-i+1];for(;t<e;t+=i){let L=r[t],C=r[t+1];d<=n?C>n&&(L-A)*(n-d)-(o-A)*(C-d)>0&&l++:C<=n&&(L-A)*(n-d)-(o-A)*(C-d)<0&&l--,A=L,d=C}return l!==0}function Rd(r,t,e,i,o,n){if(e.length===0||!Hs(r,t,e[0],i,o,n))return!1;for(let l=1,A=e.length;l<A;++l)if(Hs(r,e[l-1],e[l],i,o,n))return!1;return!0}function vz(r,t,e,i,o,n){if(e.length===0)return!1;for(let l=0,A=e.length;l<A;++l){let d=e[l];if(Rd(r,t,d,i,o,n))return!0;t=d[d.length-1]}return!1}function bC(r,t,e,i,o){let n;for(t+=i;t<e;t+=i)if(n=o(r.slice(t-i,t),r.slice(t,t+i)),n)return n;return!1}function zd(r,t,e,i,o,n){return n=n??rx(D7(),r,t,e,i),u0(o,n)?n[0]>=o[0]&&n[2]<=o[2]||n[1]>=o[1]&&n[3]<=o[3]?!0:bC(r,t,e,i,function(l,A){return xR(o,l,A)}):!1}function yz(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n){if(zd(r,t,e[n],i,o))return!0;t=e[n]}return!1}function kJ(r,t,e,i,o){return!!(zd(r,t,e,i,o)||Hs(r,t,e,i,o[0],o[1])||Hs(r,t,e,i,o[0],o[3])||Hs(r,t,e,i,o[2],o[1])||Hs(r,t,e,i,o[2],o[3]))}function Px(r,t,e,i,o){if(!kJ(r,t,e[0],i,o))return!1;if(e.length===1)return!0;for(let n=1,l=e.length;n<l;++n)if(mz(r,e[n-1],e[n],i,o)&&!zd(r,e[n-1],e[n],i,o))return!1;return!0}function _z(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n){let A=e[n];if(Px(r,t,A,i,o))return!0;t=A[A.length-1]}return!1}function Gu(r,t,e,i){let o=r[t],n=r[t+1],l=0;for(let A=t+i;A<e;A+=i){let d=r[A],L=r[A+1];l+=Math.sqrt((d-o)*(d-o)+(L-n)*(L-n)),o=d,n=L}return l}var Rx=class r extends K8{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){ar(this.flatCoordinates,t),this.changed()}clone(){let t=new r(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,o){return o<z7(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Sd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Td(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,o))}forEachSegment(t){return bC(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,wC(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return Qn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return rc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return Gu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){let e=[];return e.length=ec(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new r(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return zd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,this.getExtent())}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=tc(this.flatCoordinates,0,t,this.stride),this.changed()}},R4=Rx;var zx=class r extends K8{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{let o=t,n=[],l=[];for(let d=0,L=o.length;d<L;++d){let C=o[d];ar(n,C.getFlatCoordinates()),l.push(n.length)}let A=o.length===0?this.getLayout():o[0].getLayout();this.setFlatCoordinates(A,n),this.ends_=l}}appendLineString(t){ar(this.flatCoordinates,t.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){let t=new r(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,o){return o<z7(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ed(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Id(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,o))}getCoordinateAtM(t,e,i){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(e=e!==void 0?e:!1,i=i!==void 0?i:!1,gz(this.flatCoordinates,0,this.ends_,this.stride,t,e,i))}getCoordinates(){return Us(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new R4(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){let t=this.flatCoordinates,e=this.ends_,i=this.layout,o=[],n=0;for(let l=0,A=e.length;l<A;++l){let d=e[l],L=new R4(t.slice(n,d),i);o.push(L),n=d}return o}getLength(){let t=this.ends_,e=0,i=0;for(let o=0,n=t.length;o<n;++o)i+=Gu(this.flatCoordinates,e,t[o],this.stride),e=t[o];return i}getFlatMidpoints(){let t=[],e=this.flatCoordinates,i=0,o=this.ends_,n=this.stride;for(let l=0,A=o.length;l<A;++l){let d=o[l],L=rc(e,i,d,n,.5);ar(t,L),i=d}return t}getSimplifiedGeometryInternal(t){let e=[],i=[];return e.length=xC(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,i),new r(e,"XY",i)}getType(){return"MultiLineString"}intersectsExtent(t){return yz(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);let i=Ns(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}},ju=zx;var Dx=class r extends K8{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){let t=new r(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,o){let n=this.flatCoordinates,l=T4(t,e,n[0],n[1]);if(l<o){let A=this.stride;for(let d=0;d<A;++d)i[d]=n[d];return i.length=A,l}return o}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(t){return tC(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return wd(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=vC(this.flatCoordinates,0,t,this.stride),this.changed()}},Ki=Dx;var kx=class r extends K8{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){ar(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){let t=new r(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,o){if(o<z7(this.getExtent(),t,e))return o;let n=this.flatCoordinates,l=this.stride;for(let A=0,d=n.length;A<d;A+=l){let L=T4(t,e,n[A],n[A+1]);if(L<o){o=L;for(let C=0;C<l;++C)i[C]=n[A+C];i.length=l}}return o}getCoordinates(){return Qn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){let e=this.flatCoordinates.length/this.stride;return t<0||e<=t?null:new Ki(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){let t=this.flatCoordinates,e=this.layout,i=this.stride,o=[];for(let n=0,l=t.length;n<l;n+=i){let A=new Ki(t.slice(n,n+i),e);o.push(A)}return o}getType(){return"MultiPoint"}intersectsExtent(t){let e=this.flatCoordinates,i=this.stride;for(let o=0,n=e.length;o<n;o+=i){let l=e[o],A=e[o+1];if(wd(t,l,A))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=tc(this.flatCoordinates,0,t,this.stride),this.changed()}},Bo=kx;function Dd(r,t,e,i,o,n,l){let A,d,L,C,y,E,B,Z=o[n+1],Q=[];for(let J=0,n1=e.length;J<n1;++J){let r1=e[J];for(C=r[r1-i],E=r[r1-i+1],A=t;A<r1;A+=i)y=r[A],B=r[A+1],(Z<=E&&B<=Z||E<=Z&&Z<=B)&&(L=(Z-E)/(B-E)*(y-C)+C,Q.push(L)),C=y,E=B}let V=NaN,G=-1/0;for(Q.sort(E4),C=Q[0],A=1,d=Q.length;A<d;++A){y=Q[A];let J=Math.abs(y-C);J>G&&(L=(C+y)/2,Rd(r,t,e,i,L,Z)&&(V=L,G=J)),C=y}return isNaN(V)&&(V=o[n]),l?(l.push(V,Z,G),l):[V,Z,G]}function MC(r,t,e,i,o){let n=[];for(let l=0,A=e.length;l<A;++l){let d=e[l];n=Dd(r,t,d,i,o,2*l,n),t=d[d.length-1]}return n}function xz(r,t,e,i){for(;t<e-i;){for(let o=0;o<i;++o){let n=r[t+o];r[t+o]=r[e-i+o],r[e-i+o]=n}t+=i,e-=i}}function Ox(r,t,e,i){let o=0,n=r[e-i],l=r[e-i+1];for(;t<e;t+=i){let A=r[t],d=r[t+1];o+=(A-n)*(d+l),n=A,l=d}return o===0?void 0:o>0}function kd(r,t,e,i,o){o=o!==void 0?o:!1;for(let n=0,l=e.length;n<l;++n){let A=e[n],d=Ox(r,t,A,i);if(n===0){if(o&&d||!o&&!d)return!1}else if(o&&!d||!o&&d)return!1;t=A}return!0}function BC(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n){let A=e[n];if(!kd(r,t,A,i,o))return!1;A.length&&(t=A[A.length-1])}return!0}function qu(r,t,e,i,o){o=o!==void 0?o:!1;for(let n=0,l=e.length;n<l;++n){let A=e[n],d=Ox(r,t,A,i);(n===0?o&&d||!o&&!d:o&&!d||!o&&d)&&xz(r,t,A,i),t=A}return t}function Od(r,t,e,i,o){for(let n=0,l=e.length;n<l;++n)t=qu(r,t,e[n],i,o);return t}function wz(r,t){let e=[],i=0,o=0,n;for(let l=0,A=t.length;l<A;++l){let d=t[l],L=Ox(r,i,d,2);if(n===void 0&&(n=L),L===n)e.push(t.slice(o,l+1));else{if(e.length===0)continue;e[e.length-1].push(t[o])}o=l+1,i=d}return e}var Ku=class r extends K8{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?ar(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){let t=new r(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,o){return o<z7(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ed(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Id(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,o))}containsXY(t,e){return Rd(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Tx(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),qu(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Us(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){let t=k7(this.getExtent());this.flatInteriorPoint_=Dd(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Ki(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Fx(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){let t=this.layout,e=this.flatCoordinates,i=this.ends_,o=[],n=0;for(let l=0,A=i.length;l<A;++l){let d=i[l],L=new Fx(e.slice(n,d),t);o.push(L),n=d}return o}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){let t=this.flatCoordinates;kd(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=qu(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){let e=[],i=[];return e.length=Pd(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new r(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return Px(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);let i=Ns(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}},z4=Ku;function bz(r,t,e,i){e=e||32;let o=[];for(let n=0;n<e;++n)ar(o,YR(r,t,2*Math.PI*n/e,i));return o.push(o[0],o[1]),new Ku(o,"XY",[o.length])}function Zx(r){if(ba(r))throw new Error("Cannot create polygon from empty extent");let t=r[0],e=r[1],i=r[2],o=r[3],n=[t,e,t,o,i,o,i,e,t,e];return new Ku(n,"XY",[n.length])}function Mz(r,t,e){t=t||32;let i=r.getStride(),o=r.getLayout(),n=r.getCenter(),l=i*(t+1),A=new Array(l);for(let C=0;C<l;C+=i){A[C]=0,A[C+1]=0;for(let y=2;y<i;y++)A[C+y]=n[y]}let d=[A.length],L=new Ku(A,o,d);return OJ(L,n,r.getRadius(),e),L}function OJ(r,t,e,i){let o=r.getFlatCoordinates(),n=r.getStride(),l=o.length/n-1,A=i||0;for(let d=0;d<=l;++d){let L=d*n,C=A+ql(d,l)*2*Math.PI/l;o[L]=t[0]+e*Math.cos(C),o[L+1]=t[1]+e*Math.sin(C)}r.changed()}function SC(r,t,e,i){let o=[],n=D7();for(let l=0,A=e.length;l<A;++l){let d=e[l];n=Ru(r,t,d[0],i),o.push((n[0]+n[2])/2,(n[1]+n[3])/2),t=d[d.length-1]}return o}var Nx=class r extends K8{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){let o=t,n=[],l=[];for(let A=0,d=o.length;A<d;++A){let L=o[A],C=n.length,y=L.getEnds();for(let E=0,B=y.length;E<B;++E)y[E]+=C;ar(n,L.getFlatCoordinates()),l.push(y)}e=o.length===0?this.getLayout():o[0].getLayout(),t=n,i=l}e!==void 0&&i?(this.setFlatCoordinates(e,t),this.endss_=i):this.setCoordinates(t,e)}appendPolygon(t){let e;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();else{let i=this.flatCoordinates.length;ar(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let o=0,n=e.length;o<n;++o)e[o]+=i}this.endss_.push(e),this.changed()}clone(){let t=this.endss_.length,e=new Array(t);for(let o=0;o<t;++o)e[o]=this.endss_[o].slice();let i=new r(this.flatCoordinates.slice(),this.layout,e);return i.applyProperties(this),i}closestPointXY(t,e,i,o){return o<z7(this.getExtent(),t,e)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(pz(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Lz(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,o))}containsXY(t,e){return vz(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return dz(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Od(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,Fd(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){let t=SC(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=MC(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Bo(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){let t=this.flatCoordinates;BC(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Od(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){let e=[],i=[];return e.length=Cz(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,i),new r(e,"XY",i)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{let n=this.endss_[t-1];e=n[n.length-1]}let i=this.endss_[t].slice(),o=i[i.length-1];if(e!==0)for(let n=0,l=i.length;n<l;++n)i[n]-=e;return new z4(this.flatCoordinates.slice(e,o),this.layout,i)}getPolygons(){let t=this.layout,e=this.flatCoordinates,i=this.endss_,o=[],n=0;for(let l=0,A=i.length;l<A;++l){let d=i[l].slice(),L=d[d.length-1];if(n!==0)for(let y=0,E=d.length;y<E;++y)d[y]-=n;let C=new z4(e.slice(n,L),t,d);o.push(C),n=L}return o}getType(){return"MultiPolygon"}intersectsExtent(t){return _z(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);let i=yC(this.flatCoordinates,0,t,this.stride,this.endss_);if(i.length===0)this.flatCoordinates.length=0;else{let o=i[i.length-1];this.flatCoordinates.length=o.length===0?0:o[o.length-1]}this.changed()}},Zd=Nx;var ZJ=(r,t,e)=>{var i;let{coordinate:o,olGeometry:n,time_intervals:l}=t.properties,{coordinates:A,type:d}=t.geometry,L=n,C,y;if(L&&(d=L.getType(),A=(i=L.getCoordinates())!==null&&i!==void 0?i:[]),e&&o)C=o;else if(d==="Point")C=A;else if(d==="LineString"){L||(L=new R4(A));let E=l||[[]],B=E[0],Z=E[E.length-1];if(r<B[0])[,,y]=B,C=L.getFirstCoordinate();else if(r>Z[0])[,,y]=Z,C=L.getLastCoordinate();else for(let Q=0;Q<E.length-1;Q+=1){let[V,G]=E[Q],[J,n1]=E[Q+1];if(V<=r&&r<=J){let m1=Math.min((r-V)/(J-V),1)*(n1-G)+G;C=L?.getCoordinateAt(m1),[,,y]=E[Q];break}}}else console.error("This geometry type is not supported. Only Point or LineString are. Current geometry: ",L);return{coord:C,rotation:y}},Nd=ZJ;var Ux=class r extends P0{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){let e=t;this.setGeometry(e)}else{let e=t;this.setProperties(e)}}clone(){let t=new r(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());let e=this.getGeometry();e&&t.setGeometry(e.clone());let i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(f3(this.geometryChangeKey_),this.geometryChangeKey_=null);let t=this.getGeometry();t&&(this.geometryChangeKey_=ir(t,l5.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?NJ(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}};function NJ(r){if(typeof r=="function")return r;let t;return Array.isArray(r)?t=r:(o3(typeof r.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),t=[r]),function(){return t}}var D4=Ux;var Bz=e8(),Ud=class r{constructor(t,e,i,o,n,l){this.styleFunction,this.extent_,this.id_=l,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=n,this.squaredTolerance_,this.stride_=o,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?tC(this.flatCoordinates_):Ru(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){let t=k7(this.getExtent());this.flatInteriorPoints_=Dd(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){let t=wz(this.flatCoordinates_,this.ends_),e=SC(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=MC(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=rc(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];let t=this.flatCoordinates_,e=0,i=this.ends_;for(let o=0,n=i.length;o<n;++o){let l=i[o],A=rc(t,e,l,2,.5);ar(this.flatMidpoints_,A),e=l}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=p3(t);let e=t.getExtent(),i=t.getWorldExtent();if(e&&i){let o=n7(i)/n7(e);Ci(Bz,i[0],i[3],o,-o,0,0,0),O7(this.flatCoordinates_,0,this.flatCoordinates_.length,2,Bz,this.flatCoordinates_)}}applyTransform(t){t(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new r(this.type_,this.flatCoordinates_.slice(),this.ends_?.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=nC((t,e)=>{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);let i=this.simplifiedGeometry_.getFlatCoordinates(),o;switch(this.type_){case"LineString":i.length=ec(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),o=[i.length];break;case"MultiLineString":o=[],i.length=xC(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,o);break;case"Polygon":o=[],i.length=Pd(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,o);break;default:}return o&&(this.simplifiedGeometry_=new r(this.type_,i,o,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}};Ud.prototype.getFlatCoordinates=Ud.prototype.getOrientedFlatCoordinates;var k4=Ud;var Qx=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=D4,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let i=e.dataProjection?p3(e.dataProjection):this.readProjection(t);e.extent&&i&&i.getUnits()==="tile-pixels"&&(i=p3(i),i.setWorldExtent(e.extent)),e={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return h5()}readFeature(t,e){return h5()}readFeatures(t,e){return h5()}readGeometry(t,e){return h5()}readProjection(t){return h5()}writeFeature(t,e){return h5()}writeFeatures(t,e){return h5()}writeGeometry(t,e){return h5()}},EC=Qx;function ic(r,t,e){let i=e?p3(e.featureProjection):null,o=e?p3(e.dataProjection):null,n=r;if(i&&o&&!ez(i,o)){t&&(n=r.clone());let l=t?i:o,A=t?o:i;l.getUnits()==="tile-pixels"?n.transform(l,A):n.applyTransform(Xl(l,A))}if(t&&e&&e.decimals!==void 0){let l=Math.pow(10,e.decimals),A=function(d){for(let L=0,C=d.length;L<C;++L)d[L]=Math.round(d[L]*l)/l;return d};n===r&&(n=r.clone()),n.applyTransform(A)}return n}var UJ={Point:Ki,LineString:R4,Polygon:z4,MultiPoint:Bo,MultiLineString:ju,MultiPolygon:Zd};function QJ(r,t,e){return Array.isArray(t[0])?(BC(r,0,t,e)||(r=r.slice(),Od(r,0,t,e)),r):(kd(r,0,t,e)||(r=r.slice(),qu(r,0,t,e)),r)}function Hx(r,t){let e=r.geometry;if(!e)return[];if(Array.isArray(e))return e.map(n=>Hx({...r,geometry:n})).flat();let i=e.type==="MultiPolygon"?"Polygon":e.type;if(i==="GeometryCollection"||i==="Circle")throw new Error("Unsupported geometry type: "+i);let o=e.layout.length;return ic(new k4(i,i==="Polygon"?QJ(e.flatCoordinates,e.ends,o):e.flatCoordinates,e.ends?.flat(),o,r.properties||{},r.id).enableSimplifyTransformed(),!1,t)}function TC(r,t){if(!r)return null;if(Array.isArray(r)){let i=r.map(o=>TC(o,t));return new dn(i)}let e=UJ[r.type];return ic(new e(r.flatCoordinates,r.layout||"XY",r.ends),!1,t)}var Vx=class extends EC{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(IC(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(IC(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return h5()}readFeaturesFromObject(t,e){return h5()}readGeometry(t,e){return this.readGeometryFromObject(IC(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return h5()}readProjection(t){return this.readProjectionFromObject(IC(t))}readProjectionFromObject(t){return h5()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return h5()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return h5()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return h5()}};function IC(r){if(typeof r=="string"){let t=JSON.parse(r);return t||null}return r!==null?r:null}var Sz=Vx;var Gx=class extends Sz{constructor(t){t=t||{},super(),this.dataProjection=p3(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=p3(t.featureProjection)),t.featureClass&&(this.featureClass=t.featureClass),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let i=null;t.type==="Feature"?i=t:i={type:"Feature",geometry:t,properties:null};let o=qx(i.geometry,e);if(this.featureClass===k4)return Hx({geometry:o,id:i.id,properties:i.properties},e);let n=new D4;return this.geometryName_?n.setGeometryName(this.geometryName_):this.extractGeometryName_&&i.geometry_name&&n.setGeometryName(i.geometry_name),n.setGeometry(TC(o,e)),"id"in i&&n.setId(i.id),i.properties&&n.setProperties(i.properties,!0),n}readFeaturesFromObject(t,e){let i=t,o=null;if(i.type==="FeatureCollection"){let n=t;o=[];let l=n.features;for(let A=0,d=l.length;A<d;++A){let L=this.readFeatureFromObject(l[A],e);L&&o.push(L)}}else o=[this.readFeatureFromObject(t,e)];return o.flat()}readGeometryFromObject(t,e){return HJ(t,e)}readProjectionFromObject(t){let e=t.crs,i;if(e)if(e.type=="name")i=p3(e.properties.name);else if(e.type==="EPSG")i=p3("EPSG:"+e.properties.code);else throw new Error("Unknown SRS type");else i=this.dataProjection;return i}writeFeatureObject(t,e){e=this.adaptOptions(e);let i={type:"Feature",geometry:null,properties:null},o=t.getId();if(o!==void 0&&(i.id=o),!t.hasProperties())return i;let n=t.getProperties(),l=t.getGeometry();return l&&(i.geometry=jx(l,e),delete n[t.getGeometryName()]),An(n)||(i.properties=n),i}writeFeaturesObject(t,e){e=this.adaptOptions(e);let i=[];for(let o=0,n=t.length;o<n;++o)i.push(this.writeFeatureObject(t[o],e));return{type:"FeatureCollection",features:i}}writeGeometryObject(t,e){return jx(t,this.adaptOptions(e))}};function qx(r,t){if(!r)return null;let e;switch(r.type){case"Point":{e=GJ(r);break}case"LineString":{e=jJ(r);break}case"Polygon":{e=$J(r);break}case"MultiPoint":{e=KJ(r);break}case"MultiLineString":{e=qJ(r);break}case"MultiPolygon":{e=WJ(r);break}case"GeometryCollection":{e=VJ(r);break}default:throw new Error("Unsupported GeoJSON type: "+r.type)}return e}function HJ(r,t){let e=qx(r,t);return TC(e,t)}function VJ(r,t){return r.geometries.map(function(i){return qx(i,t)})}function GJ(r){let t=r.coordinates;return{type:"Point",flatCoordinates:t,layout:Zs(t.length)}}function jJ(r){let t=r.coordinates,e=t.flat();return{type:"LineString",flatCoordinates:e,ends:[e.length],layout:Zs(t[0]?.length||2)}}function qJ(r){let t=r.coordinates,e=t[0]?.[0]?.length||2,i=[],o=Ns(i,0,t,e);return{type:"MultiLineString",flatCoordinates:i,ends:o,layout:Zs(e)}}function KJ(r){let t=r.coordinates;return{type:"MultiPoint",flatCoordinates:t.flat(),layout:Zs(t[0]?.length||2)}}function WJ(r){let t=r.coordinates,e=[],i=t[0]?.[0]?.[0].length||2,o=yC(e,0,t,i);return{type:"MultiPolygon",flatCoordinates:e,ends:o,layout:Zs(i)}}function $J(r){let t=r.coordinates,e=[],i=t[0]?.[0]?.length,o=Ns(e,0,t,i);return{type:"Polygon",flatCoordinates:e,ends:o,layout:Zs(i)}}function jx(r,t){r=ic(r,!0,t);let e=r.getType(),i;switch(e){case"Point":{i=r11(r,t);break}case"LineString":{i=YJ(r,t);break}case"Polygon":{i=i11(r,t);break}case"MultiPoint":{i=t11(r,t);break}case"MultiLineString":{i=JJ(r,t);break}case"MultiPolygon":{i=e11(r,t);break}case"GeometryCollection":{i=XJ(r,t);break}case"Circle":{i={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return i}function XJ(r,t){return t=Object.assign({},t),delete t.featureProjection,{type:"GeometryCollection",geometries:r.getGeometriesArray().map(function(i){return jx(i,t)})}}function YJ(r,t){return{type:"LineString",coordinates:r.getCoordinates()}}function JJ(r,t){return{type:"MultiLineString",coordinates:r.getCoordinates()}}function t11(r,t){return{type:"MultiPoint",coordinates:r.getCoordinates()}}function e11(r,t){let e;return t&&(e=t.rightHanded),{type:"MultiPolygon",coordinates:r.getCoordinates(e)}}function r11(r,t){return{type:"Point",coordinates:r.getCoordinates()}}function i11(r,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:r.getCoordinates(e)}}var h0=Gx;var Wi=[];for(let r=0;r<256;++r)Wi.push((r+256).toString(16).slice(1));function Ez(r,t=0){return(Wi[r[t+0]]+Wi[r[t+1]]+Wi[r[t+2]]+Wi[r[t+3]]+"-"+Wi[r[t+4]]+Wi[r[t+5]]+"-"+Wi[r[t+6]]+Wi[r[t+7]]+"-"+Wi[r[t+8]]+Wi[r[t+9]]+"-"+Wi[r[t+10]]+Wi[r[t+11]]+Wi[r[t+12]]+Wi[r[t+13]]+Wi[r[t+14]]+Wi[r[t+15]]).toLowerCase()}var Kx,n11=new Uint8Array(16);function Wx(){if(!Kx){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Kx=crypto.getRandomValues.bind(crypto)}return Kx(n11)}var o11=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$x={randomUUID:o11};function a11(r,t,e){r=r||{};let i=r.random??r.rng?.()??Wx();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){if(e=e||0,e<0||e+16>t.length)throw new RangeError(`UUID byte range ${e}:${e+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[e+o]=i[o];return t}return Ez(i)}function s11(r,t,e){return $x.randomUUID&&!t&&!r?$x.randomUUID():a11(r,t,e)}var Qd=s11;var Xx=r=>parseInt(r?.substr(0,8).replace(/:/g,""),10),Yx=new h0,Iz=(r,t=new Date)=>{var e;return!!(!((e=r.affectedTimeIntervals)===null||e===void 0)&&e.some(i=>{let{dailyEndTime:o="",dailyStartTime:n="",endTime:l,startTime:A}=i,d=Xx(t.toTimeString()),L=Xx(n),C=Xx(o),y=new Date(A)<=t&&t<=new Date(l);return L&&C?y&&L<=d&&d<=C:y}))},l11=(r,t=new Date)=>{var e,i,o;let n=(o=(e=r.publicationWindows)!==null&&e!==void 0?e:(i=r.publications)===null||i===void 0?void 0:i.flatMap(l=>{var A;return(A=l.publicationWindows)!==null&&A!==void 0?A:[]}))!==null&&o!==void 0?o:[];return n.length?!!n.some(({endTime:l,startTime:A})=>new Date(A)<=t&&t<=new Date(l)):!!Iz(r,t)},c11=r=>{let t=Yx.readGeometry(r.geometry),e=k7(t.getExtent());return{geometry:{coordinates:t.getClosestPoint(e),type:"Point"},id:Qd(),properties:Object.assign(Object.assign({},r.properties),{geometry:void 0}),type:"Feature"}},Tz=r=>Yx.writeGeometryObject(Yx.readGeometry(r,{dataProjection:"EPSG:3857",featureProjection:"EPSG:4326"})),u11=(r="undefiniert")=>r.toLowerCase().replace(/\s/g,"_").replace(/ü/g,"ue").replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ß/g,"ss"),Fz=(r,t=new Date)=>{var e,i,o;let n=[],l=u11((i=(e=r.reasons)===null||e===void 0?void 0:e[0])===null||i===void 0?void 0:i.categoryName),A={reasonCategoryImageName:l,reasons:r.reasons,reasons_category:l};return(o=r?.publications)===null||o===void 0||o.forEach(d=>{var L,C,y;let E=Iz(r,t),B=l11(r,t),Z={condition_group:d.serviceConditionGroup.toLowerCase(),isActive:E,isAffected:E,isPublished:B,serviceConditionGroup:d.serviceConditionGroup,severity_group:(L=d.severityGroup)===null||L===void 0?void 0:L.toLocaleLowerCase(),severityGroup:d.severityGroup};(C=d.publicationLines)===null||C===void 0||C.forEach(Q=>{Q.lines.forEach(V=>{V.geometry.forEach(({geom:G,graph:J})=>{let n1={geometry:Tz(G),id:Qd(),properties:Object.assign(Object.assign(Object.assign(Object.assign({graph:J,hasIcon:Q.hasIcon,line:V,publication:d,publicationLine:Q,situation:r},d),A),Z),{geometry:void 0}),type:"Feature"};if(n.push(n1),Q.hasIcon){let r1=c11(n1);r1.properties.situation=r,n.push(r1)}})})}),(y=d.publicationStops)===null||y===void 0||y.forEach(Q=>{Q.geometry.forEach(({geom:V,graph:G})=>{let J={geometry:Tz(V),id:Qd(),properties:Object.assign(Object.assign(Object.assign({graph:G,name:Q.name,publication:d,publicationStop:Q,situation:r},A),Z),{geometry:void 0}),type:"Feature"};n.push(J)})})}),{features:n,type:"FeatureCollection"}};var So={};__(So,{MOTS_ALL:()=>d11,MOTS_ONLY_RAIL:()=>O4,MOTS_WITHOUT_CABLE:()=>FC,MOTS_WITH_CABLE:()=>A11,bgColors:()=>Rz,getBgColor:()=>p11,getDelayColor:()=>g11,getDelayText:()=>m11,getRadius:()=>f11,getTextColor:()=>L11,getTextSize:()=>C11,getTypeIndex:()=>PC,textColors:()=>zz,types:()=>Pz});var h11=[[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,2,2,3,7,7,7,12,15,15,15,15,15],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7],[0,0,0,0,0,2,2,3,7,7,7,12,15,15,15,15,15]],O4=["rail"],A11=["cablecar","gondola","funicular","coach"],FC=["tram","subway","rail","bus"],d11=["tram","subway","rail","bus","ferry","cablecar","gondola","funicular","coach"],Pz=[/^Tram/i,/^Subway( \/ Metro \/ S-Bahn)?/i,/^Train/i,/^Bus/i,/^Ferry/i,/^Cable ?Car/i,/^Gondola/i,/^Funicular/i,/^(Long distance bus|coach)/i,/^Rail/i],Rz=["#ffb400","#ff5400","#ff8080","#ea0000","#3000ff","#ffb400","#41a27b","#00d237","#b5b5b5","#ff8080"],zz=["#000000","#ffffff","#000000","#ffffff","#ffffff","#000000","#ffffff","#000000","#000000","#000000"],PC=r=>typeof r=="string"?Pz.findIndex(t=>t.test(r)):r,f11=(r,t)=>{try{let e=PC(r||0);return h11[e][t]}catch{return 1}},p11=(r,t)=>{try{let e=PC(r);return Rz[e]}catch{return"#ffffff"}},L11=r=>{try{let t=PC(r);return zz[t]}catch{return"#ffffff"}},C11=(r,t,e,i,o)=>{if(!r)return 0;r.font=o(i,e);let n=r.measureText(e),l=25,A=0;for(;n.width>t-6&&A<l;)i-=.5,r.font=o(i,e),n=r.measureText(e),A+=1;return i},g11=(r,t,e)=>t?e?"#ff0000":"#a0a0a0":r===null?"#a0a0a0":r>=36e5?"#ed004c":r>=5e5?"#e80000":r>=3e5?"#ff4a00":r>=18e4?"#f7bf00":"#00a00c",m11=(r,t)=>t?String.fromCodePoint(215):r>=36e5?`+${Math.round(r/36e5)}h`:r>=6e4?`+${Math.round(r/6e4)}m`:r>=1e3?`+${Math.round(r/1e3)}s`:r>0?`+${r}ms`:"";var v11=(r,t,e,i,o)=>{if(!r)return{renderedTrajectories:[]};let{center:n,pixelRatio:l=1,resolution:A,rotation:d=0,size:L=[],time:C=Date.now()}=i;if(!A||!n)return{renderedTrajectories:[]};let{filter:y,getScreenPixel:E=(L1,z1)=>(z1.zoom||0)<12?L1.map(s1=>Math.floor(s1)):L1,hoverVehicleId:B,noInterpolate:Z=!1,selectedVehicleId:Q}=o,V=r.getContext("2d");V?.clearRect(0,0,r.width,r.height);let[G,J]=L;G&&J&&(r.width!==G*l||r.height!==J*l)&&([r.width,r.height]=[G*l,J*l]);let n1=Ci(e8(),L[0]/2,L[1]/2,1/A,-1/A,-d,-n[0],-n[1]);r.style&&(r.style.width=`${r.width/l}px`,r.style.height=`${r.height/l}px`);let r1,m1,w1,B1,g1=[];for(let L1=t.length-1;L1>=0;L1-=1){let z1=t[L1];if(y&&!y(z1))continue;let{timeOffset:s1,train_id:x1}=z1.properties,{coord:N1,rotation:V1}=Nd(C-(s1||0),z1,Z);if(t[L1].properties.coordinate=N1,t[L1].properties.rotation=V1,!N1)continue;let l2=M8(n1,[...N1]);if(!l2||(l2=l2.map(o2=>o2*l),l2[0]<0||l2[0]>r.width||l2[1]<0||l2[1]>r.height))continue;let p2=e(z1,i,o);if(p2){if(B!==x1&&Q!==x1){let[o2,G1]=E([l2[0]-p2.width/2,l2[1]-p2.height/2],i);V?.drawImage(p2,o2,G1)}B&&B===x1&&(r1=p2,m1=l2),Q&&Q===x1&&(w1=p2,B1=l2),g1.push(z1)}}return w1&&B1&&V?.drawImage(w1,Math.floor(B1[0]-w1.width/2),Math.floor(B1[1]-w1.height/2)),r1&&m1&&V?.drawImage(r1,Math.floor(m1[0]-r1.width/2),Math.floor(m1[1]-r1.height/2)),{renderedTrajectories:g1}},Dz=v11;var Eo={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"};var Jx=class extends P0{constructor(t){super();let e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&this.element?.remove();for(let e=0,i=this.listenerKeys.length;e<i;++e)f3(this.listenerKeys[e]);if(this.listenerKeys.length=0,this.map_=t,t){let e=this.target_??t.getOverlayContainerStopEvent();this.element&&e.appendChild(this.element),this.render!==Sa&&this.listenerKeys.push(ir(t,Eo.POSTRENDER,this.render,this)),t.render()}}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}},fn=Jx;var W8={ANIMATING:0,INTERACTING:1};var Hn={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function tw(r,t,e){return(function(i,o,n,l,A){if(!i)return;if(!o&&!t)return i;let d=t?0:n[0]*o,L=t?0:n[1]*o,C=A?A[0]:0,y=A?A[1]:0,E=r[0]+d/2+C,B=r[2]-d/2+C,Z=r[1]+L/2+y,Q=r[3]-L/2+y;E>B&&(E=(B+E)/2,B=E),Z>Q&&(Z=(Q+Z)/2,Q=Z);let V=n6(i[0],E,B),G=n6(i[1],Z,Q);if(l&&e&&o){let J=30*o;V+=-J*Math.log(1+Math.max(0,E-i[0])/J)+J*Math.log(1+Math.max(0,i[0]-B)/J),G+=-J*Math.log(1+Math.max(0,Z-i[1])/J)+J*Math.log(1+Math.max(0,i[1]-Q)/J)}return[V,G]})}function kz(r){return r}function y11(r){return Math.pow(r,3)}function Vn(r){return 1-y11(1-r)}function Oz(r){return 3*r*r-2*r*r*r}function RC(r){return r}function ew(r,t,e,i){let o=F0(t)/e[0],n=n7(t)/e[1];return i?Math.min(r,Math.max(o,n)):Math.min(r,Math.min(o,n))}function rw(r,t,e){let i=Math.min(r,t),o=50;return i*=Math.log(1+o*Math.max(0,r/t-1))/o+1,e&&(i=Math.max(i,e),i/=Math.log(1+o*Math.max(0,e/r-1))/o+1),n6(i,e/2,t*2)}function Zz(r,t,e,i){return t=t!==void 0?t:!0,(function(o,n,l,A){if(o!==void 0){let d=r[0],L=r[r.length-1],C=e?ew(d,e,l,i):d;if(A)return t?rw(o,C,L):n6(o,L,C);let y=Math.min(C,o),E=Math.floor(iC(r,y,n));return r[E]>C&&E<r.length-1?r[E+1]:r[E]}})}function Nz(r,t,e,i,o,n){return i=i!==void 0?i:!0,e=e!==void 0?e:0,(function(l,A,d,L){if(l!==void 0){let C=o?ew(t,o,d,n):t;if(L)return i?rw(l,C,e):n6(l,e,C);let y=1e-9,E=Math.ceil(Math.log(t/C)/Math.log(r)-y),B=-A*(.5-y)+.5,Z=Math.min(C,l),Q=Math.floor(Math.log(t/Z)/Math.log(r)+B),V=Math.max(E,Q),G=t/Math.pow(r,V);return n6(G,e,C)}})}function iw(r,t,e,i,o){return e=e!==void 0?e:!0,(function(n,l,A,d){if(n!==void 0){let L=i?ew(r,i,A,o):r;return!e||!d?n6(n,t,L):rw(n,L,t)}})}function Wu(r){if(r!==void 0)return 0}function nw(r){if(r!==void 0)return r}function Uz(r){let t=2*Math.PI/r;return(function(e,i){if(i)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e})}function Qz(r){let t=r===void 0?ji(5):r;return(function(e,i){return i||e===void 0?e:Math.abs(e)<=t?0:e})}var ow=0,sw=class extends P0{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=CC(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&yx(),t.center&&(t.center=P4(t.center,this.projection_)),t.extent&&(t.extent=Os(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){let e=Object.assign({},t);for(let A in Hn)delete e[A];this.setProperties(e,!0);let i=x11(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;let o=_11(t),n=i.constraint,l=w11(t);this.constraints_={center:o,resolution:n,rotation:l},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;let i=this.getCenterInternal();if(i){let o=t||[0,0,0,0];e=e||[0,0,0,0];let n=this.getResolution(),l=n/2*(o[3]-e[3]+e[1]-o[1]),A=n/2*(o[0]-e[0]+e[2]-o[2]);this.setCenterInternal([i[0]+l,i[1]-A])}}getUpdatedOptions_(t){let e=this.getProperties();return e.resolution!==void 0?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);let e=new Array(arguments.length);for(let i=0;i<e.length;++i){let o=arguments[i];o.center&&(o=Object.assign({},o),o.center=P4(o.center,this.getProjection())),o.anchor&&(o=Object.assign({},o),o.anchor=P4(o.anchor,this.getProjection())),e[i]=o}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,i;e>1&&typeof arguments[e-1]=="function"&&(i=arguments[e-1],--e);let o=0;for(;o<e&&!this.isDef();++o){let C=arguments[o];C.center&&this.setCenterInternal(C.center),C.zoom!==void 0?this.setZoom(C.zoom):C.resolution&&this.setResolution(C.resolution),C.rotation!==void 0&&this.setRotation(C.rotation)}if(o===e){i&&zC(i,!0);return}let n=Date.now(),l=this.targetCenter_.slice(),A=this.targetResolution_,d=this.targetRotation_,L=[];for(;o<e;++o){let C=arguments[o],y={start:n,complete:!1,anchor:C.anchor,duration:C.duration!==void 0?C.duration:1e3,easing:C.easing||Oz,callback:i};if(C.center&&(y.sourceCenter=l,y.targetCenter=C.center.slice(),l=y.targetCenter),C.zoom!==void 0?(y.sourceResolution=A,y.targetResolution=this.getResolutionForZoom(C.zoom),A=y.targetResolution):C.resolution&&(y.sourceResolution=A,y.targetResolution=C.resolution,A=y.targetResolution),C.rotation!==void 0){y.sourceRotation=d;let E=ql(C.rotation-d+Math.PI,2*Math.PI)-Math.PI;y.targetRotation=d+E,d=y.targetRotation}b11(y)?y.complete=!0:n+=y.duration,L.push(y)}this.animations_.push(L),this.setHint(W8.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[W8.ANIMATING]>0}getInteracting(){return this.hints_[W8.INTERACTING]>0}cancelAnimations(){this.setHint(W8.ANIMATING,-this.hints_[W8.ANIMATING]);let t;for(let e=0,i=this.animations_.length;e<i;++e){let o=this.animations_[e];if(o[0].callback&&zC(o[0].callback,!1),!t)for(let n=0,l=o.length;n<l;++n){let A=o[n];if(!A.complete){t=A.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;let t=Date.now(),e=!1;for(let i=this.animations_.length-1;i>=0;--i){let o=this.animations_[i],n=!0;for(let l=0,A=o.length;l<A;++l){let d=o[l];if(d.complete)continue;let L=t-d.start,C=d.duration>0?L/d.duration:1;C>=1?(d.complete=!0,C=1):n=!1;let y=d.easing(C);if(d.sourceCenter){let E=d.sourceCenter[0],B=d.sourceCenter[1],Z=d.targetCenter[0],Q=d.targetCenter[1];this.nextCenter_=d.targetCenter;let V=E+y*(Z-E),G=B+y*(Q-B);this.targetCenter_=[V,G]}if(d.sourceResolution&&d.targetResolution){let E=y===1?d.targetResolution:d.sourceResolution+y*(d.targetResolution-d.sourceResolution);if(d.anchor){let B=this.getViewportSize_(this.getRotation()),Z=this.constraints_.resolution(E,0,B,!0);this.targetCenter_=this.calculateCenterZoom(Z,d.anchor)}this.nextResolution_=d.targetResolution,this.targetResolution_=E,this.applyTargetState_(!0)}if(d.sourceRotation!==void 0&&d.targetRotation!==void 0){let E=y===1?ql(d.targetRotation+Math.PI,2*Math.PI)-Math.PI:d.sourceRotation+y*(d.targetRotation-d.sourceRotation);if(d.anchor){let B=this.constraints_.rotation(E,!0);this.targetCenter_=this.calculateCenterRotate(B,d.anchor)}this.nextRotation_=d.targetRotation,this.targetRotation_=E}if(this.applyTargetState_(!0),e=!0,!d.complete)break}if(n){this.animations_[i]=null,this.setHint(W8.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;let l=o[0].callback;l&&zC(l,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i,o=this.getCenterInternal();return o!==void 0&&(i=[o[0]-e[0],o[1]-e[1]],Ou(i,t-this.getRotation()),FR(i,e)),i}calculateCenterZoom(t,e){let i,o=this.getCenterInternal(),n=this.getResolution();if(o!==void 0&&n!==void 0){let l=e[0]-t*(e[0]-o[0])/n,A=e[1]-t*(e[1]-o[1])/n;i=[l,A]}return i}getViewportSize_(t){let e=this.viewportSize_;if(t){let i=e[0],o=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(o*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(o*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){let t=this.getCenterInternal();return t&&Bd(t,this.getProjection())}getCenterInternal(){return this.get(Hn.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){let e=this.calculateExtentInternal(t);return ks(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();let e=this.getCenterInternal();o3(e,"The view center is not defined");let i=this.getResolution();o3(i!==void 0,"The view resolution is not defined");let o=this.getRotation();return o3(o!==void 0,"The view rotation is not defined"),bd(e,i,o,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Hn.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Os(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();let i=F0(t)/e[0],o=n7(t)/e[1];return Math.max(i,o)}getResolutionForValueFunction(t){t=t||2;let e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,o=Math.log(e/i)/Math.log(t);return(function(n){return e/Math.pow(t,n*o)})}getRotation(){return this.get(Hn.ROTATION)}getValueForResolutionFunction(t){let e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),o=this.minResolution_,n=Math.log(i/o)/e;return(function(l){return Math.log(i/l)/e/n})}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t),i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){let t=this.getProjection(),e=this.getResolution(),i=this.getRotation(),o=this.getCenterInternal(),n=this.padding_;if(n){let l=this.getViewportSizeMinusPadding_();o=aw(o,this.getViewportSize_(),[l[0]/2+n[3],l[1]/2+n[0]],e,i)}return{center:o.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t,e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,i,o;if(this.resolutions_){let n=iC(this.resolutions_,t,1);e=n,i=this.resolutions_[n],n==this.resolutions_.length-1?o=2:o=i/this.resolutions_[n+1]}else i=this.maxResolution_,o=this.zoomFactor_;return e+Math.log(i/t)/Math.log(o)}getResolutionForZoom(t){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];let e=n6(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,n6(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(o3(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){o3(!ba(t),"Cannot fit empty extent provided as `geometry`");let o=Os(t,this.getProjection());i=Zx(o)}else if(t.getType()==="Circle"){let o=Os(t.getExtent(),this.getProjection());i=Zx(o),i.rotate(this.getRotation(),k7(o))}else{let o=Jl();o?i=t.clone().transform(o,this.getProjection()):i=t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){let e=this.getRotation(),i=Math.cos(e),o=Math.sin(-e),n=t.getFlatCoordinates(),l=t.getStride(),A=1/0,d=1/0,L=-1/0,C=-1/0;for(let y=0,E=n.length;y<E;y+=l){let B=n[y]*i-n[y+1]*o,Z=n[y]*o+n[y+1]*i;A=Math.min(A,B),d=Math.min(d,Z),L=Math.max(L,B),C=Math.max(C,Z)}return[A,d,L,C]}fitInternal(t,e){e=e||{};let i=e.size;i||(i=this.getViewportSizeMinusPadding_());let o=e.padding!==void 0?e.padding:[0,0,0,0],n=e.nearest!==void 0?e.nearest:!1,l;e.minResolution!==void 0?l=e.minResolution:e.maxZoom!==void 0?l=this.getResolutionForZoom(e.maxZoom):l=0;let A=this.rotatedExtentForGeometry(t),d=this.getResolutionForExtentInternal(A,[i[0]-o[1]-o[3],i[1]-o[0]-o[2]]);d=isNaN(d)?l:Math.max(d,l),d=this.getConstrainedResolution(d,n?0:1);let L=this.getRotation(),C=Math.sin(L),y=Math.cos(L),E=k7(A);E[0]+=(o[1]-o[3])/2*d,E[1]+=(o[0]-o[2])/2*d;let B=E[0]*y-E[1]*C,Z=E[1]*y+E[0]*C,Q=this.getConstrainedCenter([B,Z],d),V=e.callback?e.callback:Sa;e.duration!==void 0?this.animateInternal({resolution:d,center:Q,duration:e.duration,easing:e.easing},V):(this.targetResolution_=d,this.targetCenter_=Q,this.applyTargetState_(!1,!0),zC(V,!0))}centerOn(t,e,i){this.centerOnInternal(P4(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(aw(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,o){let n,l=this.padding_;if(l&&t){let A=this.getViewportSizeMinusPadding_(-i),d=aw(t,o,[A[0]/2+l[3],A[1]/2+l[0]],e,i);n=[t[0]-d[0],t[1]-d[1]]}return n}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){let e=Bd(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){let e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&P4(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){let i=this.getAnimating()||this.getInteracting(),o=this.getViewportSize_(this.getRotation()),n=this.constraints_.resolution(this.targetResolution_*t,0,o,i);e&&(this.targetCenter_=this.calculateCenterZoom(n,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=P4(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){let i=this.getAnimating()||this.getInteracting(),o=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(o,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&P4(t,this.getProjection()))}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){let i=this.getAnimating()||this.getInteracting()||e,o=this.constraints_.rotation(this.targetRotation_,i),n=this.getViewportSize_(o),l=this.constraints_.resolution(this.targetResolution_,0,n,i),A=this.constraints_.center(this.targetCenter_,l,n,i,this.calculateCenterShift(this.targetCenter_,l,o,n));this.get(Hn.ROTATION)!==o&&this.set(Hn.ROTATION,o),this.get(Hn.RESOLUTION)!==l&&(this.set(Hn.RESOLUTION,l),this.set("zoom",this.getZoom(),!0)),(!A||!this.get(Hn.CENTER)||!Kl(this.get(Hn.CENTER),A))&&this.set(Hn.CENTER,A),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=t!==void 0?t:200;let o=e||0,n=this.constraints_.rotation(this.targetRotation_),l=this.getViewportSize_(n),A=this.constraints_.resolution(this.targetResolution_,o,l),d=this.constraints_.center(this.targetCenter_,A,l,!1,this.calculateCenterShift(this.targetCenter_,A,n,l));if(t===0&&!this.cancelAnchor_){this.targetResolution_=A,this.targetRotation_=n,this.targetCenter_=d,this.applyTargetState_();return}i=i||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==A||this.getRotation()!==n||!this.getCenterInternal()||!Kl(this.getCenterInternal(),d))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:n,center:d,resolution:A,duration:t,easing:Vn,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(W8.INTERACTING,1)}endInteraction(t,e,i){i=i&&P4(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(W8.INTERACTING,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){let i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){let i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;let i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}};function zC(r,t){setTimeout(function(){r(t)},0)}function _11(r){if(r.extent!==void 0){let e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return tw(r.extent,r.constrainOnlyCenter,e)}let t=CC(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){let e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,tw(e,!1,!1)}return kz}function x11(r){let t,e,i,l=r.minZoom!==void 0?r.minZoom:ow,A=r.maxZoom!==void 0?r.maxZoom:28,d=r.zoomFactor!==void 0?r.zoomFactor:2,L=r.multiWorld!==void 0?r.multiWorld:!1,C=r.smoothResolutionConstraint!==void 0?r.smoothResolutionConstraint:!0,y=r.showFullExtent!==void 0?r.showFullExtent:!1,E=CC(r.projection,"EPSG:3857"),B=E.getExtent(),Z=r.constrainOnlyCenter,Q=r.extent;if(!L&&!Q&&E.isGlobal()&&(Z=!1,Q=B),r.resolutions!==void 0){let V=r.resolutions;e=V[l],i=V[A]!==void 0?V[A]:V[V.length-1],r.constrainResolution?t=Zz(V,C,!Z&&Q,y):t=iw(e,i,C,!Z&&Q,y)}else{let G=(B?Math.max(F0(B),n7(B)):360*Ea.degrees/E.getMetersPerUnit())/256/Math.pow(2,ow),J=G/Math.pow(2,28-ow);e=r.maxResolution,e!==void 0?l=0:e=G/Math.pow(d,l),i=r.minResolution,i===void 0&&(r.maxZoom!==void 0?r.maxResolution!==void 0?i=e/Math.pow(d,A):i=G/Math.pow(d,A):i=J),A=l+Math.floor(Math.log(e/i)/Math.log(d)),i=e/Math.pow(d,A-l),r.constrainResolution?t=Nz(d,e,i,C,!Z&&Q,y):t=iw(e,i,C,!Z&&Q,y)}return{constraint:t,maxResolution:e,minResolution:i,minZoom:l,zoomFactor:d}}function w11(r){if(r.enableRotation!==void 0?r.enableRotation:!0){let e=r.constrainRotation;return e===void 0||e===!0?Qz():e===!1?nw:typeof e=="number"?Uz(e):nw}return Wu}function b11(r){return!(r.sourceCenter&&r.targetCenter&&!Kl(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function aw(r,t,e,i,o){let n=Math.cos(-o),l=Math.sin(-o),A=r[0]*n-r[1]*l,d=r[1]*n+r[0]*l;A+=(t[0]/2-e[0])*i,d+=(e[1]-t[1]/2)*i,l=-l;let L=A*n-d*l,C=d*n+A*l;return[L,C]}var $i=sw;var Xi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};var w3={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};var lw=class extends P0{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;let e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[w3.OPACITY]=t.opacity!==void 0?t.opacity:1,o3(typeof e[w3.OPACITY]=="number","Layer opacity must be a number"),e[w3.VISIBLE]=t.visible!==void 0?t.visible:!0,e[w3.Z_INDEX]=t.zIndex,e[w3.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[w3.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[w3.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[w3.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){let e=this.state_||{layer:this,managed:t===void 0?!0:t},i=this.getZIndex();return e.opacity=n6(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=i===void 0&&!e.managed?1/0:i,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return h5()}getLayerStatesArray(t){return h5()}getExtent(){return this.get(w3.EXTENT)}getMaxResolution(){return this.get(w3.MAX_RESOLUTION)}getMinResolution(){return this.get(w3.MIN_RESOLUTION)}getMinZoom(){return this.get(w3.MIN_ZOOM)}getMaxZoom(){return this.get(w3.MAX_ZOOM)}getOpacity(){return this.get(w3.OPACITY)}getSourceState(){return h5()}getVisible(){return this.get(w3.VISIBLE)}getZIndex(){return this.get(w3.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(w3.EXTENT,t)}setMaxResolution(t){this.set(w3.MAX_RESOLUTION,t)}setMinResolution(t){this.set(w3.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(w3.MAX_ZOOM,t)}setMinZoom(t){this.set(w3.MIN_ZOOM,t)}setOpacity(t){o3(typeof t=="number","Layer opacity must be a number"),this.set(w3.OPACITY,t)}setVisible(t){this.set(w3.VISIBLE,t)}setZIndex(t){this.set(w3.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},DC=lw;var cw=class extends DC{constructor(t){let e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(w3.SOURCE,this.handleSourcePropertyChange_);let i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(w3.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){let t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(f3(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;let t=this.getSource();t&&(this.sourceChangeKey_=ir(t,l5.CHANGE,this.handleSourceChange_,this),t.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e,i=this.getMapInternal();!t&&i&&(t=i.getView()),t instanceof $i?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let o;if(e.layerStatesArray){if(o=e.layerStatesArray.find(l=>l.layer===this),!o)return!1}else o=this.getLayerState();let n=this.getExtent();return nc(o,e.viewState)&&(!n||u0(n,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e=this.getSource()?.getAttributions();if(!e)return[];let i=t instanceof $i?t.getViewStateAndExtent():t,o=e(i);return Array.isArray(o)||(o=[o]),o}render(t,e){let i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){let e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(w3.MAP,t)}getMapInternal(){return this.get(w3.MAP)}setMap(t){this.mapPrecomposeKey_&&(f3(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(f3(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=ir(t,Xi.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=ir(this,l5.CHANGE,t.render,t),this.changed())}handlePrecompose_(t){let e=t.frameState.layerStatesArray,i=this.getLayerState(!1);o3(!e.some(o=>o.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}setSource(t){this.set(w3.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}};function nc(r,t){if(!r.visible)return!1;let e=t.resolution;if(e<r.minResolution||e>=r.maxResolution)return!1;let i=t.zoom;return i>r.minZoom&&i<=r.maxZoom}var Gn=cw;var M11=()=>{let r=document.createElement("div");return Object.assign(r.style,{bottom:0,fontSize:".8rem",padding:"0 10px",position:"absolute",right:0}),r},Hz=M11;var uw=class extends fn{constructor(t={}){let e=Hz();e.className=t.className||"mbt-copyright",super(Object.assign({element:e},t)),this.format=t.format||(i=>i?.join(" | "))}render({frameState:t}){if(!t){this.element.innerHTML="";return}let e=[];t?.layerStatesArray.forEach(o=>{var n;let{layer:l}=o;if(t&&nc(o,t.viewState)){let A=(n=l?.getSource())===null||n===void 0?void 0:n.getAttributions();if(A&&(e=e.concat(A(t))),l?.get("copyrights")){let d=l.get("copyrights");d=Array.isArray(d)?d:[d],d?.length&&e.push(...d)}}});let i=mR(e)||[];this.element.innerHTML=this.format(i)}},Hd=uw;var gi={ADD:"add",REMOVE:"remove"};var Vz={LENGTH:"length"},$u=class extends b8{constructor(t,e,i){super(t),this.element=e,this.index=i}},hw=class extends P0{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let i=0,o=this.array_.length;i<o;++i)this.assertUnique_(this.array_[i],i);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){let e=this.array_;for(let i=0,o=e.length;i<o;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(Vz.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new $u(gi.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);let e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){let e=this.array_;for(let i=0,o=e.length;i<o;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;let e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new $u(gi.REMOVE,e,t)),e}setAt(t,e){let i=this.getLength();if(t>=i){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);let o=this.array_[t];this.array_[t]=e,this.dispatchEvent(new $u(gi.REMOVE,o,t)),this.dispatchEvent(new $u(gi.ADD,e,t))}updateLength_(){this.set(Vz.LENGTH,this.array_.length)}assertUnique_(t,e){for(let i=0,o=this.array_.length;i<o;++i)if(this.array_[i]===t&&i!==e)throw new Error("Duplicate item added to a unique collection")}},o7=hw;var A0={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},B11={ERROR:"error"},Aw=class extends b8{constructor(t){super(B11.ERROR),this.code=t.code,this.message=t.message}},dw=class extends P0{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.position_=null,this.transform_=tz,this.watchId_=void 0,this.addChangeListener(A0.PROJECTION,this.handleProjectionChanged_),this.addChangeListener(A0.TRACKING,this.handleTrackingChanged_),t.projection!==void 0&&this.setProjection(t.projection),t.trackingOptions!==void 0&&this.setTrackingOptions(t.trackingOptions),this.setTracking(t.tracking!==void 0?t.tracking:!1)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){let t=this.getProjection();t&&(this.transform_=Fa(p3("EPSG:4326"),t),this.position_&&this.set(A0.POSITION,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){let t=this.getTracking();t&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!t&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(t){let e=t.coords;this.set(A0.ACCURACY,e.accuracy),this.set(A0.ALTITUDE,e.altitude===null?void 0:e.altitude),this.set(A0.ALTITUDE_ACCURACY,e.altitudeAccuracy===null?void 0:e.altitudeAccuracy),this.set(A0.HEADING,e.heading===null?void 0:ji(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];let i=this.transform_(this.position_);this.set(A0.POSITION,i.slice()),this.set(A0.SPEED,e.speed===null?void 0:e.speed);let o=bz(this.position_,e.accuracy);o.applyTransform(this.transform_),this.set(A0.ACCURACY_GEOMETRY,o),this.changed()}positionError_(t){this.dispatchEvent(new Aw(t))}getAccuracy(){return this.get(A0.ACCURACY)}getAccuracyGeometry(){return this.get(A0.ACCURACY_GEOMETRY)||null}getAltitude(){return this.get(A0.ALTITUDE)}getAltitudeAccuracy(){return this.get(A0.ALTITUDE_ACCURACY)}getHeading(){return this.get(A0.HEADING)}getPosition(){return this.get(A0.POSITION)}getProjection(){return this.get(A0.PROJECTION)}getSpeed(){return this.get(A0.SPEED)}getTracking(){return this.get(A0.TRACKING)}getTrackingOptions(){return this.get(A0.TRACKING_OPTIONS)}setProjection(t){this.set(A0.PROJECTION,p3(t))}setTracking(t){this.set(A0.TRACKING,t)}setTrackingOptions(t){this.set(A0.TRACKING_OPTIONS,t)}},fw=dw;var oc=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",S11=oc.includes("safari")&&!oc.includes("chrom"),gx1=S11&&(oc.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(oc)),Gz=oc.includes("webkit")&&!oc.includes("edge"),pw=oc.includes("macintosh"),kC=typeof devicePixelRatio<"u"?devicePixelRatio:1,Vd=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,jz=typeof Image<"u"&&Image.prototype.decode;var OC=(function(){let r=!1;try{let t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return r})();var C5={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function t0(r,t,e,i){let o;return e&&e.length?o=e.shift():Vd?o=new OffscreenCanvas(r||300,t||300):o=document.createElement("canvas"),r&&(o.width=r),t&&(o.height=t),o.getContext("2d",i)}var Lw;function Xu(){return Lw||(Lw=t0(1,1)),Lw}function qz(r){let t=r.canvas;t.width=1,t.height=1,r.clearRect(0,0,1,1)}function Cw(r,t){let e=t.parentNode;e&&e.replaceChild(r,t)}function Kz(r){for(;r.lastChild;)r.lastChild.remove()}function Wz(r,t){let e=r.childNodes;for(let i=0;;++i){let o=e[i],n=t[i];if(!o&&!n)break;if(o!==n){if(!o){r.appendChild(n);continue}if(!n){r.removeChild(o),--i;continue}r.insertBefore(n,o)}}}var NC=[NaN,NaN,NaN,0],gw;function E11(){return gw||(gw=t0(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),gw}var T11=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,I11=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,F11=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,P11=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function ZC(r,t){return r.endsWith("%")?Number(r.substring(0,r.length-1))/t:Number(r)}function jd(r){throw new Error('failed to parse "'+r+'" as color')}function $z(r){if(r.toLowerCase().startsWith("rgb")){let n=r.match(I11)||r.match(T11)||r.match(F11);if(n){let l=n[4],A=100/255;return[n6(ZC(n[1],A)+.5|0,0,255),n6(ZC(n[2],A)+.5|0,0,255),n6(ZC(n[3],A)+.5|0,0,255),l!==void 0?n6(ZC(l,100),0,1):1]}jd(r)}if(r.startsWith("#")){if(P11.test(r)){let n=r.substring(1),l=n.length<=4?1:2,A=[0,0,0,255];for(let d=0,L=n.length;d<L;d+=l){let C=parseInt(n.substring(d,d+l),16);l===1&&(C+=C<<4),A[d/l]=C}return A[3]=A[3]/255,A}jd(r)}let t=E11();t.fillStyle="#abcdef";let e=t.fillStyle;t.fillStyle=r,t.fillStyle===e&&(t.fillStyle="#fedcba",e=t.fillStyle,t.fillStyle=r,t.fillStyle===e&&jd(r));let i=t.fillStyle;if(i.startsWith("#")||i.startsWith("rgba"))return $z(i);t.clearRect(0,0,1,1),t.fillRect(0,0,1,1);let o=Array.from(t.getImageData(0,0,1,1).data);return o[3]=lC(o[3]/255,3),o}function qd(r){return typeof r=="string"?r:Wd(r)}var R11=1024,Gd={},mw=0;function Xz(r){if(r.length===4)return r;let t=r.slice();return t[3]=1,t}function vw(r){return r>.0031308?Math.pow(r,1/2.4)*269.025-14.025:r*3294.6}function yw(r){return r>.2068965?Math.pow(r,3):(r-4/29)*(108/841)}function _w(r){return r>10.314724?Math.pow((r+14.025)/269.025,2.4):r/3294.6}function xw(r){return r>.0088564?Math.pow(r,1/3):r/(108/841)+4/29}function ww(r){let t=_w(r[0]),e=_w(r[1]),i=_w(r[2]),o=xw(t*.222488403+e*.716873169+i*.06060791),n=500*(xw(t*.452247074+e*.399439023+i*.148375274)-o),l=200*(o-xw(t*.016863605+e*.117638439+i*.865350722)),A=Math.atan2(l,n)*(180/Math.PI);return[116*o-16,Math.sqrt(n*n+l*l),A<0?A+360:A,r[3]]}function Yz(r){let t=(r[0]+16)/116,e=r[1],i=r[2]*Math.PI/180,o=yw(t),n=yw(t+e/500*Math.cos(i)),l=yw(t-e/200*Math.sin(i)),A=vw(n*3.021973625-o*1.617392459-l*.404875592),d=vw(n*-.943766287+o*1.916279586+l*.027607165),L=vw(n*.069407491-o*.22898585+l*1.159737864);return[n6(A+.5|0,0,255),n6(d+.5|0,0,255),n6(L+.5|0,0,255),r[3]]}function Kd(r){if(r==="none")return NC;if(Gd.hasOwnProperty(r))return Gd[r];if(mw>=R11){let e=0;for(let i in Gd)(e++&3)===0&&(delete Gd[i],--mw)}let t=$z(r);t.length!==4&&jd(r);for(let e of t)isNaN(e)&&jd(r);return Gd[r]=t,++mw,t}function pn(r){return Array.isArray(r)?r:Kd(r)}function Wd(r){let t=r[0];t!=(t|0)&&(t=t+.5|0);let e=r[1];e!=(e|0)&&(e=e+.5|0);let i=r[2];i!=(i|0)&&(i=i+.5|0);let o=r[3]===void 0?1:Math.round(r[3]*1e3)/1e3;return"rgba("+t+","+e+","+i+","+o+")"}function z11(r,t){return new Promise((e,i)=>{function o(){l(),e(r)}function n(){l(),i(new Error("Image load error"))}function l(){r.removeEventListener("load",o),r.removeEventListener("error",n)}r.addEventListener("load",o),r.addEventListener("error",n),t&&(r.src=t)})}function Jz(r,t){return t&&(r.src=t),r.src&&jz?new Promise((e,i)=>r.decode().then(()=>e(r)).catch(o=>r.complete&&r.width?e(r):i(o))):z11(r)}var Mw=class{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(let e in this.cache_){let i=this.cache_[e];(t++&3)===0&&!i.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){let o=bw(t,e,i);return o in this.cache_?this.cache_[o]:null}getPattern(t,e,i){let o=bw(t,e,i);return o in this.patternCache_?this.patternCache_[o]:null}set(t,e,i,o,n){let l=bw(t,e,i),A=l in this.cache_;this.cache_[l]=o,n&&(o.getImageState()===C5.IDLE&&o.load(),o.getImageState()===C5.LOADING?o.ready().then(()=>{this.patternCache_[l]=Xu().createPattern(o.getImage(1),"repeat")}):this.patternCache_[l]=Xu().createPattern(o.getImage(1),"repeat")),A||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}};function bw(r,t,e){let i=e?pn(e):"null";return t+":"+r+":"+i}var S9=new Mw;var $d=null,UC=class extends Du{constructor(t,e,i,o,n){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=n,this.imageState_=o===void 0?C5.IDLE:o,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===C5.LOADED){$d||($d=t0(1,1,void 0,{willReadFrequently:!0})),$d.drawImage(this.image_,0,0);try{$d.getImageData(0,0,1,1),this.tainted_=!1}catch{$d=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(l5.CHANGE)}handleImageError_(){this.imageState_=C5.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=C5.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){let t=this.size_[0],e=this.size_[1],i=t0(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===C5.IDLE){this.image_||this.initializeImage_(),this.imageState_=C5.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Jz(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==C5.LOADED)return;let e=this.image_,i=t0(Math.ceil(e.width*t),Math.ceil(e.height*t)),o=i.canvas;i.scale(t,t),i.drawImage(e,0,0),i.globalCompositeOperation="multiply",i.fillStyle=qd(this.color_),i.fillRect(0,0,o.width/t,o.height/t),i.globalCompositeOperation="destination-in",i.drawImage(e,0,0),this.canvas_[t]=o}ready(){return this.ready_||(this.ready_=new Promise(t=>{if(this.imageState_===C5.LOADED||this.imageState_===C5.ERROR)t();else{let e=()=>{(this.imageState_===C5.LOADED||this.imageState_===C5.ERROR)&&(this.removeEventListener(l5.CHANGE,e),t())};this.addEventListener(l5.CHANGE,e)}})),this.ready_}};function Yu(r,t,e,i,o,n){let l=t===void 0?void 0:S9.get(t,e,o);return l||(l=new UC(r,r&&"src"in r?r.src||void 0:t,e,i,o),S9.set(t,e,o,l,n)),n&&l&&!S9.getPattern(t,e,o)&&S9.set(t,e,o,l,n),l}var tD=UC;function Z7(r){return r?Array.isArray(r)?Wd(r):typeof r=="object"&&"src"in r?D11(r):r:null}function D11(r){if(!r.offset||!r.size)return S9.getPattern(r.src,"anonymous",r.color);let t=r.src+":"+r.offset,e=S9.getPattern(t,void 0,r.color);if(e)return e;let i=S9.get(r.src,"anonymous",null);if(i.getImageState()!==C5.LOADED)return null;let o=t0(r.size[0],r.size[1]);return o.drawImage(i.getImage(1),r.offset[0],r.offset[1],r.size[0],r.size[1],0,0,r.size[0],r.size[1]),Yu(o.canvas,t,void 0,C5.LOADED,r.color,!0),S9.getPattern(t,void 0,r.color)}var Bw=class{drawCustom(t,e,i,o,n){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}},QC=Bw;var Xd="ol-hidden";var To="ol-unselectable";var Ju="ol-control",Sw="ol-collapsed",k11=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z0-9]+?)\\s*$`].join(""),"i"),eD=["style","variant","weight","size","lineHeight","family"],HC={normal:400,bold:700},VC=function(r){let t=r.match(k11);if(!t)return null;let e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"400",variant:"normal"};for(let i=0,o=eD.length;i<o;++i){let n=t[i+1];n!==void 0&&(e[eD[i]]=typeof n=="string"?n.trim():n)}return isNaN(Number(e.weight))&&e.weight in HC&&(e.weight=HC[e.weight]),e.families=e.family.split(/,\s?/).map(i=>i.trim().replace(/^['"]|['"]$/g,"")),e};var GC="10px sans-serif",$8="#000",Io="round",N7=[],U7=0,Fo="round",Pa=10,Ra="#000",Vs="center",sc="middle",za=[0,0,0,0],Da=1,ac=new P0,Yd=null,rD,Ew={},O11=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function Z11(r,t,e){return`${r} ${t} 16px "${e}"`}var iD=(function(){let t,e;async function i(n){await e.ready;let l=await e.load(n);if(l.length===0)return!1;let A=VC(n),d=A.families[0].toLowerCase(),L=A.weight;return l.some(C=>{let y=C.family.replace(/^['"]|['"]$/g,"").toLowerCase(),E=HC[C.weight]||C.weight;return y===d&&C.style===A.style&&E==L})}async function o(){await e.ready;let n=!0,l=ac.getProperties(),A=Object.keys(l).filter(d=>l[d]<100);for(let d=A.length-1;d>=0;--d){let L=A[d],C=l[L];C<100&&(await i(L)?(Mo(Ew),ac.set(L,100)):(C+=10,ac.set(L,C,!0),C<100&&(n=!1)))}t=void 0,n||(t=setTimeout(o,100))}return async function(n){e||(e=Vd?self.fonts:document.fonts);let l=VC(n);if(!l)return;let A=l.families,d=!1;for(let L of A){if(O11.has(L))continue;let C=Z11(l.style,l.weight,L);ac.get(C)===void 0&&(ac.set(C,0,!0),d=!0)}d&&(clearTimeout(t),t=setTimeout(o,100))}})(),N11=(function(){let r;return function(t){let e=Ew[t];if(e==null){if(Vd){let i=VC(t),o=nD(t,"\u017Dg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(o.actualBoundingBoxAscent+o.actualBoundingBoxDescent)}else r||(r=document.createElement("div"),r.innerHTML="M",r.style.minHeight="0",r.style.maxHeight="none",r.style.height="auto",r.style.padding="0",r.style.border="none",r.style.position="absolute",r.style.display="block",r.style.left="-99999px"),r.style.font=t,document.body.appendChild(r),e=r.offsetHeight,document.body.removeChild(r);Ew[t]=e}return e}})();function nD(r,t){return Yd||(Yd=t0(1,1)),r!=rD&&(Yd.font=r,rD=Yd.font),Yd.measureText(t)}function oD(r,t){return nD(r,t).width}function Tw(r,t,e){if(t in e)return e[t];let i=t.split(`
|
|
834
834
|
`).reduce((o,n)=>Math.max(o,oD(r,n)),0);return e[t]=i,i}function aD(r,t){let e=[],i=[],o=[],n=0,l=0,A=0,d=0;for(let L=0,C=t.length;L<=C;L+=2){let y=t[L];if(y===`
|
|
835
835
|
`||L===C){n=Math.max(n,l),o.push(l),l=0,A+=d,d=0;continue}let E=t[L+1]||r.font,B=oD(E,y);e.push(B),l+=B;let Z=N11(E);i.push(Z),d=Math.max(d,Z)}return{width:n,height:A,widths:e,heights:i,lineWidths:o}}function sD(r,t,e,i,o,n,l,A,d,L,C){r.save(),e!==1&&(r.globalAlpha===void 0?r.globalAlpha=y=>y.globalAlpha*=e:r.globalAlpha*=e),t&&r.transform.apply(r,t),i.contextInstructions?(r.translate(d,L),r.scale(C[0],C[1]),U11(i,r)):C[0]<0||C[1]<0?(r.translate(d,L),r.scale(C[0],C[1]),r.drawImage(i,o,n,l,A,0,0,l,A)):r.drawImage(i,o,n,l,A,d,L,l*C[0],A*C[1]),r.restore()}function U11(r,t){let e=r.contextInstructions;for(let i=0,o=e.length;i<o;i+=2)Array.isArray(e[i+1])?t[e[i]].apply(t,e[i+1]):t[e[i]]=e[i+1]}var Iw=class extends QC{constructor(t,e,i,o,n,l,A){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=o,this.transformRotation_=o?lC(Math.atan2(o[1],o[0]),10):0,this.viewRotation_=n,this.squaredTolerance_=l,this.userTransform_=A,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=e8()}drawImages_(t,e,i,o){if(!this.image_)return;let n=O7(t,e,i,o,this.transform_,this.pixelCoordinates_),l=this.context_,A=this.tmpLocalTransform_,d=l.globalAlpha;this.imageOpacity_!=1&&(l.globalAlpha=d*this.imageOpacity_);let L=this.imageRotation_;this.transformRotation_===0&&(L-=this.viewRotation_),this.imageRotateWithView_&&(L+=this.viewRotation_);for(let C=0,y=n.length;C<y;C+=2){let E=n[C]-this.imageAnchorX_,B=n[C+1]-this.imageAnchorY_;if(L!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){let Z=E+this.imageAnchorX_,Q=B+this.imageAnchorY_;Ci(A,Z,Q,1,1,L,-Z,-Q),l.save(),l.transform.apply(l,A),l.translate(Z,Q),l.scale(this.imageScale_[0],this.imageScale_[1]),l.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),l.restore()}else l.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,E,B,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(l.globalAlpha=d)}drawText_(t,e,i,o){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);let n=O7(t,e,i,o,this.transform_,this.pixelCoordinates_),l=this.context_,A=this.textRotation_;for(this.transformRotation_===0&&(A-=this.viewRotation_),this.textRotateWithView_&&(A+=this.viewRotation_);e<i;e+=o){let d=n[e]+this.textOffsetX_,L=n[e+1]+this.textOffsetY_;A!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(l.save(),l.translate(d-this.textOffsetX_,L-this.textOffsetY_),l.rotate(A),l.translate(this.textOffsetX_,this.textOffsetY_),l.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&l.strokeText(this.text_,0,0),this.textFillState_&&l.fillText(this.text_,0,0),l.restore()):(this.textStrokeState_&&l.strokeText(this.text_,d,L),this.textFillState_&&l.fillText(this.text_,d,L))}}moveToLineTo_(t,e,i,o,n){let l=this.context_,A=O7(t,e,i,o,this.transform_,this.pixelCoordinates_);l.moveTo(A[0],A[1]);let d=A.length;n&&(d-=2);for(let L=2;L<d;L+=2)l.lineTo(A[L],A[L+1]);return n&&l.closePath(),i}drawRings_(t,e,i,o){for(let n=0,l=i.length;n<l;++n)e=this.moveToLineTo_(t,e,i[n],o,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!u0(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);let e=hz(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],o=e[3]-e[1],n=Math.sqrt(i*i+o*o),l=this.context_;l.beginPath(),l.arc(e[0],e[1],n,0,2*Math.PI),this.fillState_&&l.fill(),this.strokeState_&&l.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break;default:}}drawFeature(t,e){let i=e.getGeometryFunction()(t);i&&(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){let e=t.getGeometriesArray();for(let i=0,o=e.length;i<o;++i)this.drawGeometry(e[i])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));let e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),this.text_!==""&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));let e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),this.text_!==""&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!u0(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);let e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(this.text_!==""){let e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));let e=t.getExtent();if(u0(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);let i=this.context_,o=t.getFlatCoordinates(),n=0,l=t.getEnds(),A=t.getStride();i.beginPath();for(let d=0,L=l.length;d<L;++d)n=this.moveToLineTo_(o,n,l[d],A,!1);i.stroke()}if(this.text_!==""){let i=t.getFlatMidpoints();this.drawText_(i,0,i.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!u0(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);let e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){let e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!u0(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);let e=this.context_,i=t.getOrientedFlatCoordinates(),o=0,n=t.getEndss(),l=t.getStride();e.beginPath();for(let A=0,d=n.length;A<d;++A){let L=n[A];o=this.drawRings_(i,o,L,l)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){let e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){let e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){let e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),B9(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){let e=this.context_,i=this.contextTextState_,o=t.textAlign?t.textAlign:Vs;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=o&&(i.textAlign=o,e.textAlign=o),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=o,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:o,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{let i=t.getColor();this.fillState_={fillStyle:Z7(i||$8)}}if(!e)this.strokeState_=null;else{let i=e.getColor(),o=e.getLineCap(),n=e.getLineDash(),l=e.getLineDashOffset(),A=e.getLineJoin(),d=e.getWidth(),L=e.getMiterLimit(),C=n||N7;this.strokeState_={lineCap:o!==void 0?o:Io,lineDash:this.pixelRatio_===1?C:C.map(y=>y*this.pixelRatio_),lineDashOffset:(l||U7)*this.pixelRatio_,lineJoin:A!==void 0?A:Fo,lineWidth:(d!==void 0?d:Da)*this.pixelRatio_,miterLimit:L!==void 0?L:Pa,strokeStyle:Z7(i||Ra)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}let i=t.getPixelRatio(this.pixelRatio_),o=t.getAnchor(),n=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=o[0]*i,this.imageAnchorY_=o[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=n[0],this.imageOriginY_=n[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();let l=t.getScaleArray();this.imageScale_=[l[0]*this.pixelRatio_/i,l[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(!t)this.text_="";else{let e=t.getFill();if(!e)this.textFillState_=null;else{let B=e.getColor();this.textFillState_={fillStyle:Z7(B||$8)}}let i=t.getStroke();if(!i)this.textStrokeState_=null;else{let B=i.getColor(),Z=i.getLineCap(),Q=i.getLineDash(),V=i.getLineDashOffset(),G=i.getLineJoin(),J=i.getWidth(),n1=i.getMiterLimit();this.textStrokeState_={lineCap:Z!==void 0?Z:Io,lineDash:Q||N7,lineDashOffset:V||U7,lineJoin:G!==void 0?G:Fo,lineWidth:J!==void 0?J:Da,miterLimit:n1!==void 0?n1:Pa,strokeStyle:Z7(B||Ra)}}let o=t.getFont(),n=t.getOffsetX(),l=t.getOffsetY(),A=t.getRotateWithView(),d=t.getRotation(),L=t.getScaleArray(),C=t.getText(),y=t.getTextAlign(),E=t.getTextBaseline();this.textState_={font:o!==void 0?o:GC,textAlign:y!==void 0?y:Vs,textBaseline:E!==void 0?E:sc},this.text_=C!==void 0?Array.isArray(C)?C.reduce((B,Z,Q)=>B+=Q%2?" ":Z,""):C:"",this.textOffsetX_=n!==void 0?this.pixelRatio_*n:0,this.textOffsetY_=l!==void 0?this.pixelRatio_*l:0,this.textRotateWithView_=A!==void 0?A:!1,this.textRotation_=d!==void 0?d:0,this.textScale_=[this.pixelRatio_*L[0],this.pixelRatio_*L[1]]}}},lD=Iw;var Q11=.5,cD={Point:W11,LineString:j11,Polygon:X11,MultiPoint:$11,MultiLineString:q11,MultiPolygon:K11,GeometryCollection:G11,Circle:H11};function uD(r,t){return parseInt(vr(r),10)-parseInt(vr(t),10)}function Fw(r,t){let e=Pw(r,t);return e*e}function Pw(r,t){return Q11*r/t}function H11(r,t,e,i,o){let n=e.getFill(),l=e.getStroke();if(n||l){let d=r.getBuilder(e.getZIndex(),"Circle");d.setFillStrokeStyle(n,l),d.drawCircle(t,i,o)}let A=e.getText();if(A&&A.getText()){let d=r.getBuilder(e.getZIndex(),"Text");d.setTextStyle(A),d.drawText(t,i)}}function Rw(r,t,e,i,o,n,l,A){let d=[],L=e.getImage();if(L){let E=!0,B=L.getImageState();B==C5.LOADED||B==C5.ERROR?E=!1:B==C5.IDLE&&L.load(),E&&d.push(L.ready())}let C=e.getFill();C&&C.loading()&&d.push(C.ready());let y=d.length>0;return y&&Promise.all(d).then(()=>o(null)),V11(r,t,e,i,n,l,A),y}function V11(r,t,e,i,o,n,l){let A=e.getGeometryFunction()(t);if(!A)return;let d=A.simplifyTransformed(i,o);if(e.getRenderer())hD(r,d,e,t,l);else{let C=cD[d.getType()];C(r,d,e,t,l,n)}}function hD(r,t,e,i,o){if(t.getType()=="GeometryCollection"){let l=t.getGeometries();for(let A=0,d=l.length;A<d;++A)hD(r,l[A],e,i,o);return}r.getBuilder(e.getZIndex(),"Default").drawCustom(t,i,e.getRenderer(),e.getHitDetectionRenderer(),o)}function G11(r,t,e,i,o,n){let l=t.getGeometriesArray(),A,d;for(A=0,d=l.length;A<d;++A){let L=cD[l[A].getType()];L(r,l[A],e,i,o,n)}}function j11(r,t,e,i,o){let n=e.getStroke();if(n){let A=r.getBuilder(e.getZIndex(),"LineString");A.setFillStrokeStyle(null,n),A.drawLineString(t,i,o)}let l=e.getText();if(l&&l.getText()){let A=r.getBuilder(e.getZIndex(),"Text");A.setTextStyle(l),A.drawText(t,i,o)}}function q11(r,t,e,i,o){let n=e.getStroke();if(n){let A=r.getBuilder(e.getZIndex(),"LineString");A.setFillStrokeStyle(null,n),A.drawMultiLineString(t,i,o)}let l=e.getText();if(l&&l.getText()){let A=r.getBuilder(e.getZIndex(),"Text");A.setTextStyle(l),A.drawText(t,i,o)}}function K11(r,t,e,i,o){let n=e.getFill(),l=e.getStroke();if(l||n){let d=r.getBuilder(e.getZIndex(),"Polygon");d.setFillStrokeStyle(n,l),d.drawMultiPolygon(t,i,o)}let A=e.getText();if(A&&A.getText()){let d=r.getBuilder(e.getZIndex(),"Text");d.setTextStyle(A),d.drawText(t,i,o)}}function W11(r,t,e,i,o,n){let l=e.getImage(),A=e.getText(),d=A&&A.getText(),L=n&&l&&d?{}:void 0;if(l){if(l.getImageState()!=C5.LOADED)return;let C=r.getBuilder(e.getZIndex(),"Image");C.setImageStyle(l,L),C.drawPoint(t,i,o)}if(d){let C=r.getBuilder(e.getZIndex(),"Text");C.setTextStyle(A,L),C.drawText(t,i,o)}}function $11(r,t,e,i,o,n){let l=e.getImage(),A=l&&l.getOpacity()!==0,d=e.getText(),L=d&&d.getText(),C=n&&A&&L?{}:void 0;if(A){if(l.getImageState()!=C5.LOADED)return;let y=r.getBuilder(e.getZIndex(),"Image");y.setImageStyle(l,C),y.drawMultiPoint(t,i,o)}if(L){let y=r.getBuilder(e.getZIndex(),"Text");y.setTextStyle(d,C),y.drawText(t,i,o)}}function X11(r,t,e,i,o){let n=e.getFill(),l=e.getStroke();if(n||l){let d=r.getBuilder(e.getZIndex(),"Polygon");d.setFillStrokeStyle(n,l),d.drawPolygon(t,i,o)}let A=e.getText();if(A&&A.getText()){let d=r.getBuilder(e.getZIndex(),"Text");d.setTextStyle(A),d.drawText(t,i,o)}}var Y11=!1;function J11(r,t,e,i,o,n,l){let A=new XMLHttpRequest;A.open("GET",typeof r=="function"?r(e,i,o):r,!0),t.getType()=="arraybuffer"&&(A.responseType="arraybuffer"),A.withCredentials=Y11,A.onload=function(d){if(!A.status||A.status>=200&&A.status<300){let L=t.getType();try{let C;L=="text"||L=="json"?C=A.responseText:L=="xml"?C=A.responseXML||A.responseText:L=="arraybuffer"&&(C=A.response),C?n(t.readFeatures(C,{extent:e,featureProjection:o}),t.readProjection(C)):l()}catch{l()}}else l()},A.onerror=l,A.send()}function zw(r,t){return function(e,i,o,n,l){J11(r,t,e,i,o,(A,d)=>{this.addFeatures(A),n!==void 0&&n(A)},()=>{this.changed(),l!==void 0&&l()})}}function AD(r,t){return[[-1/0,-1/0,1/0,1/0]]}function jC(r,t,e=0,i=r.length-1,o=t21){for(;i>e;){if(i-e>600){let d=i-e+1,L=t-e+1,C=Math.log(d),y=.5*Math.exp(2*C/3),E=.5*Math.sqrt(C*y*(d-y)/d)*(L-d/2<0?-1:1),B=Math.max(e,Math.floor(t-L*y/d+E)),Z=Math.min(i,Math.floor(t+(d-L)*y/d+E));jC(r,t,B,Z,o)}let n=r[t],l=e,A=i;for(Jd(r,e,t),o(r[i],n)>0&&Jd(r,e,i);l<A;){for(Jd(r,l,A),l++,A--;o(r[l],n)<0;)l++;for(;o(r[A],n)>0;)A--}o(r[e],n)===0?Jd(r,e,A):(A++,Jd(r,A,i)),A<=t&&(e=A+1),t<=A&&(i=A-1)}}function Jd(r,t,e){let i=r[t];r[t]=r[e],r[e]=i}function t21(r,t){return r<t?-1:r>t?1:0}var lc=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data,i=[];if(!KC(t,e))return i;let o=this.toBBox,n=[];for(;e;){for(let l=0;l<e.children.length;l++){let A=e.children[l],d=e.leaf?o(A):A;KC(t,d)&&(e.leaf?i.push(A):kw(t,d)?this._all(A,i):n.push(A))}e=n.pop()}return i}collides(t){let e=this.data;if(!KC(t,e))return!1;let i=[];for(;e;){for(let o=0;o<e.children.length;o++){let n=e.children[o],l=e.leaf?this.toBBox(n):n;if(KC(t,l)){if(e.leaf||kw(t,l))return!0;i.push(n)}}e=i.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let i=0;i<t.length;i++)this.insert(t[i]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){let i=this.data;this.data=e,e=i}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=eh([]),this}remove(t,e){if(!t)return this;let i=this.data,o=this.toBBox(t),n=[],l=[],A,d,L;for(;i||n.length;){if(i||(i=n.pop(),d=n[n.length-1],A=l.pop(),L=!0),i.leaf){let C=e21(t,i.children,e);if(C!==-1)return i.children.splice(C,1),n.push(i),this._condense(n),this}!L&&!i.leaf&&kw(i,o)?(n.push(i),l.push(A),A=0,d=i,i=i.children[0]):d?(A++,i=d.children[A],L=!1):i=null}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){let i=[];for(;t;)t.leaf?e.push(...t.children):i.push(...t.children),t=i.pop();return e}_build(t,e,i,o){let n=i-e+1,l=this._maxEntries,A;if(n<=l)return A=eh(t.slice(e,i+1)),th(A,this.toBBox),A;o||(o=Math.ceil(Math.log(n)/Math.log(l)),l=Math.ceil(n/Math.pow(l,o-1))),A=eh([]),A.leaf=!1,A.height=o;let d=Math.ceil(n/l),L=d*Math.ceil(Math.sqrt(l));dD(t,e,i,L,this.compareMinX);for(let C=e;C<=i;C+=L){let y=Math.min(C+L-1,i);dD(t,C,y,d,this.compareMinY);for(let E=C;E<=y;E+=d){let B=Math.min(E+d-1,y);A.children.push(this._build(t,E,B,o-1))}}return th(A,this.toBBox),A}_chooseSubtree(t,e,i,o){for(;o.push(e),!(e.leaf||o.length-1===i);){let n=1/0,l=1/0,A;for(let d=0;d<e.children.length;d++){let L=e.children[d],C=Dw(L),y=n21(t,L)-C;y<l?(l=y,n=C<n?C:n,A=L):y===l&&C<n&&(n=C,A=L)}e=A||e.children[0]}return e}_insert(t,e,i){let o=i?t:this.toBBox(t),n=[],l=this._chooseSubtree(o,this.data,e,n);for(l.children.push(t),ef(l,o);e>=0&&n[e].children.length>this._maxEntries;)this._split(n,e),e--;this._adjustParentBBoxes(o,n,e)}_split(t,e){let i=t[e],o=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,o);let l=this._chooseSplitIndex(i,n,o),A=eh(i.children.splice(l,i.children.length-l));A.height=i.height,A.leaf=i.leaf,th(i,this.toBBox),th(A,this.toBBox),e?t[e-1].children.push(A):this._splitRoot(i,A)}_splitRoot(t,e){this.data=eh([t,e]),this.data.height=t.height+1,this.data.leaf=!1,th(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let o,n=1/0,l=1/0;for(let A=e;A<=i-e;A++){let d=tf(t,0,A,this.toBBox),L=tf(t,A,i,this.toBBox),C=o21(d,L),y=Dw(d)+Dw(L);C<n?(n=C,o=A,l=y<l?y:l):C===n&&y<l&&(l=y,o=A)}return o||i-e}_chooseSplitAxis(t,e,i){let o=t.leaf?this.compareMinX:r21,n=t.leaf?this.compareMinY:i21,l=this._allDistMargin(t,e,i,o),A=this._allDistMargin(t,e,i,n);l<A&&t.children.sort(o)}_allDistMargin(t,e,i,o){t.children.sort(o);let n=this.toBBox,l=tf(t,0,e,n),A=tf(t,i-e,i,n),d=qC(l)+qC(A);for(let L=e;L<i-e;L++){let C=t.children[L];ef(l,t.leaf?n(C):C),d+=qC(l)}for(let L=i-e-1;L>=e;L--){let C=t.children[L];ef(A,t.leaf?n(C):C),d+=qC(A)}return d}_adjustParentBBoxes(t,e,i){for(let o=i;o>=0;o--)ef(e[o],t)}_condense(t){for(let e=t.length-1,i;e>=0;e--)t[e].children.length===0?e>0?(i=t[e-1].children,i.splice(i.indexOf(t[e]),1)):this.clear():th(t[e],this.toBBox)}};function e21(r,t,e){if(!e)return t.indexOf(r);for(let i=0;i<t.length;i++)if(e(r,t[i]))return i;return-1}function th(r,t){tf(r,0,r.children.length,t,r)}function tf(r,t,e,i,o){o||(o=eh(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let n=t;n<e;n++){let l=r.children[n];ef(o,r.leaf?i(l):l)}return o}function ef(r,t){return r.minX=Math.min(r.minX,t.minX),r.minY=Math.min(r.minY,t.minY),r.maxX=Math.max(r.maxX,t.maxX),r.maxY=Math.max(r.maxY,t.maxY),r}function r21(r,t){return r.minX-t.minX}function i21(r,t){return r.minY-t.minY}function Dw(r){return(r.maxX-r.minX)*(r.maxY-r.minY)}function qC(r){return r.maxX-r.minX+(r.maxY-r.minY)}function n21(r,t){return(Math.max(t.maxX,r.maxX)-Math.min(t.minX,r.minX))*(Math.max(t.maxY,r.maxY)-Math.min(t.minY,r.minY))}function o21(r,t){let e=Math.max(r.minX,t.minX),i=Math.max(r.minY,t.minY),o=Math.min(r.maxX,t.maxX),n=Math.min(r.maxY,t.maxY);return Math.max(0,o-e)*Math.max(0,n-i)}function kw(r,t){return r.minX<=t.minX&&r.minY<=t.minY&&t.maxX<=r.maxX&&t.maxY<=r.maxY}function KC(r,t){return t.minX<=r.maxX&&t.minY<=r.maxY&&t.maxX>=r.minX&&t.maxY>=r.minY}function eh(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function dD(r,t,e,i,o){let n=[t,e];for(;n.length;){if(e=n.pop(),t=n.pop(),e-t<=i)continue;let l=t+Math.ceil((e-t)/i/2)*i;jC(r,l,t,e,o),n.push(t,l,l,e)}}var Ow=class{constructor(t){this.rbush_=new lc(t),this.items_={}}insert(t,e){let i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[vr(e)]=i}load(t,e){let i=new Array(e.length);for(let o=0,n=e.length;o<n;o++){let l=t[o],A=e[o],d={minX:l[0],minY:l[1],maxX:l[2],maxY:l[3],value:A};i[o]=d,this.items_[vr(A)]=d}this.rbush_.load(i)}remove(t){let e=vr(t),i=this.items_[e];return delete this.items_[e],this.rbush_.remove(i)!==null}update(t,e){let i=this.items_[vr(e)],o=[i.minX,i.minY,i.maxX,i.maxY];Vl(o,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){let e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(o){return o.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let o=0,n=t.length;o<n;o++)if(i=e(t[o]),i)return i;return i}isEmpty(){return An(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){let e=this.rbush_.toJSON();return B4(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(let e in t.items_)this.items_[e]=t.items_[e]}},Zw=Ow;var Nw=class extends P0{constructor(t){super(),this.projection=p3(t.projection),this.attributions_=fD(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible??!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;let e=this;this.viewPromise_=new Promise(function(i,o){e.viewResolver=i,e.viewRejector=o})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=fD(t),this.changed()}setState(t){this.state_=t,this.changed()}};function fD(r){return r?typeof r=="function"?r:(Array.isArray(r)||(r=[r]),t=>r):null}var ka=Nw;var Ln={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};var Po=class extends b8{constructor(t,e,i){super(t),this.feature=e,this.features=i}},Uw=class extends ka{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Sa,this.format_=t.format||null,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(o3(this.format_,"`format` must be set when `url` is set"),this.loader_=zw(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:AD;let e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Zw:null,this.loadedExtentsRtree_=new Zw,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,o;Array.isArray(t.features)?o=t.features:t.features&&(i=t.features,o=i.getArray()),!e&&i===void 0&&(i=new o7(o)),o!==void 0&&this.addFeaturesInternal(o),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){let e=vr(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);let i=t.getGeometry();if(i){let o=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(o,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Po(Ln.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof k4||(this.featureChangeKeys_[t]=[ir(e,l5.CHANGE,this.handleFeatureChange_,this),ir(e,S4.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(e.getId()!==void 0){let o=String(e.getId());if(!(o in this.idIndex_))this.idIndex_[o]=e;else if(e instanceof k4){let n=this.idIndex_[o];n instanceof k4?Array.isArray(n)?n.push(e):this.idIndex_[o]=[n,e]:i=!1}else i=!1}return i&&(o3(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){let e=[],i=[],o=[];for(let n=0,l=t.length;n<l;n++){let A=t[n],d=vr(A);this.addToIndex_(d,A)&&i.push(A)}for(let n=0,l=i.length;n<l;n++){let A=i[n],d=vr(A);this.setupChangeEvents_(d,A);let L=A.getGeometry();if(L){let C=L.getExtent();e.push(C),o.push(A)}else this.nullGeometryFeatures_[d]=A}if(this.featuresRtree_&&this.featuresRtree_.load(e,o),this.hasListener(Ln.ADDFEATURE))for(let n=0,l=i.length;n<l;n++)this.dispatchEvent(new Po(Ln.ADDFEATURE,i[n]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(Ln.ADDFEATURE,function(i){e||(e=!0,t.push(i.feature),e=!1)}),this.addEventListener(Ln.REMOVEFEATURE,function(i){e||(e=!0,t.remove(i.feature),e=!1)}),t.addEventListener(gi.ADD,i=>{e||(e=!0,this.addFeature(i.element),e=!1)}),t.addEventListener(gi.REMOVE,i=>{e||(e=!0,this.removeFeature(i.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(let i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(f3);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){this.featuresRtree_.forEach(i=>{this.removeFeatureInternal(i)});for(let i in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};let e=new Po(Ln.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){let i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(o){let n=o.getGeometry();if(n instanceof k4||n.intersectsCoordinate(t))return e(o)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(i){let o=i.getGeometry();if(o instanceof k4||o.intersectsExtent(t)){let n=e(i);if(n)return n}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),An(this.nullGeometryFeatures_)||ar(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){let e=[];return this.forEachFeatureAtCoordinateDirect(t,function(i){e.push(i)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);let o=bR(t,e);return[].concat(...o.map(n=>this.featuresRtree_.getInExtent(n)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){let i=t[0],o=t[1],n=null,l=[NaN,NaN],A=1/0,d=[-1/0,-1/0,1/0,1/0];return e=e||Ma,this.featuresRtree_.forEachInExtent(d,function(L){if(e(L)){let C=L.getGeometry(),y=A;if(A=C instanceof k4?0:C.closestPointXY(i,o,l,A),A<y){n=L;let E=Math.sqrt(A);d[0]=i-E,d[1]=o-E,d[2]=i+E,d[3]=o+E}}}),n}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){let e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){let e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){let e=t.target,i=vr(e),o=e.getGeometry();if(!o)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);else{let l=o.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(l,e)):this.featuresRtree_&&this.featuresRtree_.update(l,e)}let n=e.getId();if(n!==void 0){let l=n.toString();this.idIndex_[l]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[l]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new Po(Ln.CHANGEFEATURE,e))}hasFeature(t){let e=t.getId();return e!==void 0?e in this.idIndex_:vr(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&An(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,i){let o=this.loadedExtentsRtree_,n=this.strategy_(t,e,i);for(let l=0,A=n.length;l<A;++l){let d=n[l];o.forEachInExtent(d,function(C){return Hl(C.extent,d)})||(++this.loadingExtentsCount_,this.dispatchEvent(new Po(Ln.FEATURESLOADSTART)),this.loader_.call(this,d,e,i,C=>{--this.loadingExtentsCount_,this.dispatchEvent(new Po(Ln.FEATURESLOADEND,void 0,C))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Po(Ln.FEATURESLOADERROR))}),o.insert(d,{extent:d.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){let e=this.loadedExtentsRtree_,i=e.forEachInExtent(t,function(o){if(Vl(o.extent,t))return o});i&&e.remove(i)}removeFeatures(t){let e=!1;for(let i=0,o=t.length;i<o;++i)e=this.removeFeatureInternal(t[i])||e;e&&this.changed()}removeFeature(t){if(!t)return;this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){let e=vr(t);if(!(e in this.uidIndex_))return!1;e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.featureChangeKeys_[e]?.forEach(f3),delete this.featureChangeKeys_[e];let o=t.getId();if(o!==void 0){let n=o.toString(),l=this.idIndex_[n];l===t?delete this.idIndex_[n]:Array.isArray(l)&&(l.splice(l.indexOf(t),1),l.length===1&&(this.idIndex_[n]=l[0]))}return delete this.uidIndex_[e],this.hasListener(Ln.REMOVEFEATURE)&&this.dispatchEvent(new Po(Ln.REMOVEFEATURE,t)),!0}removeFromIdIndex_(t){for(let e in this.idIndex_)if(this.idIndex_[e]===t){delete this.idIndex_[e];break}}setLoader(t){this.loader_=t}setUrl(t){o3(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(zw(t,this.format_))}setOverlaps(t){this.overlaps_=t,this.changed()}},cc=Uw;var Qw=class r{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,t.color!==void 0&&this.setColor(t.color)}clone(){let t=this.getColor();return new r({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(t!==null&&typeof t=="object"&&"src"in t){let e=Yu(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then(()=>{this.patternImage_=null}),e.getImageState()===C5.IDLE&&e.load(),e.getImageState()===C5.LOADING&&(this.patternImage_=e)}this.color_=t}getKey(){let t=this.getColor();return t?t instanceof CanvasPattern||t instanceof CanvasGradient?vr(t):typeof t=="object"&&"src"in t?t.src+":"+t.offset:pn(t).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}},R0=Qw;var Hw=class r{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){let t=this.getColor();return new r({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}},B8=Hw;function Vw(r){return r[0]>0&&r[1]>0}function Ro(r,t){return Array.isArray(r)?r:(t===void 0?t=[r,r]:(t[0]=r,t[1]=r),t)}var Gw=class r{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Ro(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){let t=this.getScale();return new r({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return h5()}getImage(t){return h5()}getHitDetectionImage(){return h5()}getPixelRatio(t){return 1}getImageState(){return h5()}getImageSize(){return h5()}getOrigin(){return h5()}getSize(){return h5()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Ro(t)}listenImageChange(t){h5()}load(){h5()}unlistenImageChange(t){h5()}ready(){return Promise.resolve()}},WC=Gw;var jw=class r extends WC{constructor(t){super({opacity:1,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius=t.radius,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?C5.LOADING:C5.LOADED,this.imageState_===C5.LOADING&&this.ready().then(()=>this.imageState_=C5.LOADED),this.render()}clone(){let t=this.getScale(),e=new r({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){let t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.fill_?.getKey(),i=`${t},${this.angle_},${this.radius},${this.radius2_},${this.points_},${e}`+Object.values(this.renderOptions_).join(","),o=S9.get(i,null,null)?.getImage(1);if(!o){let n=this.renderOptions_,l=Math.ceil(n.size*t),A=t0(l,l);this.draw_(n,A,t),o=A.canvas,S9.set(i,null,null,new tD(o,void 0,null,C5.LOADED,null))}return o}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let o=this.radius,n=this.radius2_===void 0?o:this.radius2_;if(o<n){let w1=o;o=n,n=w1}let l=this.radius2_===void 0?this.points_:this.points_*2,A=2*Math.PI/l,d=n*Math.sin(A),L=Math.sqrt(n*n-d*d),C=o-L,y=Math.sqrt(d*d+C*C),E=y/d;if(t==="miter"&&E<=i)return E*e;let B=e/2/E,Z=e/2*(C/y),V=Math.sqrt((o+B)*(o+B)+Z*Z)-o;if(this.radius2_===void 0||t==="bevel")return V*2;let G=o*Math.sin(A),J=Math.sqrt(o*o-G*G),n1=n-J,m1=Math.sqrt(G*G+n1*n1)/G;if(m1<=i){let w1=m1*e/2-n-o;return 2*Math.max(V,w1)}return V*2}createRenderOptions(){let t=Io,e=Fo,i=0,o=null,n=0,l,A=0;this.stroke_&&(l=Z7(this.stroke_.getColor()??Ra),A=this.stroke_.getWidth()??Da,o=this.stroke_.getLineDash(),n=this.stroke_.getLineDashOffset()??0,e=this.stroke_.getLineJoin()??Fo,t=this.stroke_.getLineCap()??Io,i=this.stroke_.getMiterLimit()??Pa);let d=this.calculateLineJoinSize_(e,A,i),L=Math.max(this.radius,this.radius2_||0),C=Math.ceil(2*L+d);return{strokeStyle:l,strokeWidth:A,size:C,lineCap:t,lineDash:o,lineDashOffset:n,lineJoin:e,miterLimit:i}}render(){this.renderOptions_=this.createRenderOptions();let t=this.renderOptions_.size;this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let o=this.fill_.getColor();o===null&&(o=$8),e.fillStyle=Z7(o),e.fill()}t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){let e;if(this.fill_){let i=this.fill_.getColor(),o=0;typeof i=="string"&&(i=pn(i)),i===null?o=1:Array.isArray(i)&&(o=i.length===4?i[3]:1),o===0&&(e=t0(t.size,t.size),this.drawHitDetectionCanvas_(t,e))}return e?e.canvas:this.getImage(1)}createPath_(t){let e=this.points_,i=this.radius;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{let o=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(e*=2);let n=this.angle_-Math.PI/2,l=2*Math.PI/e;for(let A=0;A<e;A++){let d=n+A*l,L=A%2===0?i:o;t.lineTo(L*Math.cos(d),L*Math.sin(d))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=$8,e.fill(),t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}},$C=jw;var qw=class r extends $C{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){let t=this.getScale(),e=new r({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius=t,this.render()}},a7=qw;var XC=class r{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=pD,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new r({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=pD,this.geometry_=t}setZIndex(t){this.zIndex_=t}};function LD(r){let t;if(typeof r=="function")t=r;else{let e;Array.isArray(r)?e=r:(o3(typeof r.getZIndex=="function","Expected an `Style` or an array of `Style`"),e=[r]),t=function(){return e}}return t}var Kw=null;function Ww(r,t){if(!Kw){let e=new R0({color:"rgba(255,255,255,0.4)"}),i=new B8({color:"#3399CC",width:1.25});Kw=[new XC({image:new a7({fill:e,stroke:i,radius:5}),fill:e,stroke:i})]}return Kw}function pD(r){return r.getGeometry()}var G3=XC;var a21="#333",$w=class r{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.keepUpright_=t.keepUpright,this.scale_=t.scale,this.scaleArray_=Ro(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new R0({color:a21}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding,this.declutterMode_=t.declutterMode}clone(){let t=this.getScale();return new r({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getKeepUpright(){return this.keepUpright_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setKeepUpright(t){this.keepUpright_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Ro(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}},Oa=$w;var rf={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},nf=[rf.FILL],zo=[rf.STROKE],Za=[rf.BEGIN_PATH],Xw=[rf.CLOSE_PATH],A5=rf;var Yw=class extends QC{constructor(t,e,i,o){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=o,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){let e=this.pixelRatio;return e==1?t:t.map(function(i){return i*e})}appendFlatPointCoordinates(t,e){let i=this.getBufferedMaxExtent(),o=this.tmpCoordinate_,n=this.coordinates,l=n.length;for(let A=0,d=t.length;A<d;A+=e)o[0]=t[A],o[1]=t[A+1],Ql(i,o)&&(n[l++]=o[0],n[l++]=o[1]);return l}appendFlatLineCoordinates(t,e,i,o,n,l){let A=this.coordinates,d=A.length,L=this.getBufferedMaxExtent();l&&(e+=o);let C=t[e],y=t[e+1],E=this.tmpCoordinate_,B=!0,Z,Q,V;for(Z=e+o;Z<i;Z+=o)E[0]=t[Z],E[1]=t[Z+1],V=YL(L,E),V!==Q?(B&&(A[d++]=C,A[d++]=y,B=!1),A[d++]=E[0],A[d++]=E[1]):V===w8.INTERSECTING?(A[d++]=E[0],A[d++]=E[1],B=!1):B=!0,C=E[0],y=E[1],Q=V;return(n&&B||Z===e+o)&&(A[d++]=C,A[d++]=y),d}drawCustomCoordinates_(t,e,i,o,n){for(let l=0,A=i.length;l<A;++l){let d=i[l],L=this.appendFlatLineCoordinates(t,e,d,o,!1,!1);n.push(L),e=d}return e}drawCustom(t,e,i,o,n){this.beginGeometry(t,e,n);let l=t.getType(),A=t.getStride(),d=this.coordinates.length,L,C,y,E,B;switch(l){case"MultiPolygon":L=t.getOrientedFlatCoordinates(),E=[];let Z=t.getEndss();B=0;for(let Q=0,V=Z.length;Q<V;++Q){let G=[];B=this.drawCustomCoordinates_(L,B,Z[Q],A,G),E.push(G)}this.instructions.push([A5.CUSTOM,d,E,t,i,Fd,n]),this.hitDetectionInstructions.push([A5.CUSTOM,d,E,t,o||i,Fd,n]);break;case"Polygon":case"MultiLineString":y=[],L=l=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),B=this.drawCustomCoordinates_(L,0,t.getEnds(),A,y),this.instructions.push([A5.CUSTOM,d,y,t,i,Us,n]),this.hitDetectionInstructions.push([A5.CUSTOM,d,y,t,o||i,Us,n]);break;case"LineString":case"Circle":L=t.getFlatCoordinates(),C=this.appendFlatLineCoordinates(L,0,L.length,A,!1,!1),this.instructions.push([A5.CUSTOM,d,C,t,i,Qn,n]),this.hitDetectionInstructions.push([A5.CUSTOM,d,C,t,o||i,Qn,n]);break;case"MultiPoint":L=t.getFlatCoordinates(),C=this.appendFlatPointCoordinates(L,A),C>d&&(this.instructions.push([A5.CUSTOM,d,C,t,i,Qn,n]),this.hitDetectionInstructions.push([A5.CUSTOM,d,C,t,o||i,Qn,n]));break;case"Point":L=t.getFlatCoordinates(),this.coordinates.push(L[0],L[1]),C=this.coordinates.length,this.instructions.push([A5.CUSTOM,d,C,t,i,void 0,n]),this.hitDetectionInstructions.push([A5.CUSTOM,d,C,t,o||i,void 0,n]);break;default:}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[A5.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[A5.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){let t=this.hitDetectionInstructions;t.reverse();let e,i=t.length,o,n,l=-1;for(e=0;e<i;++e)o=t[e],n=o[0],n==A5.END_GEOMETRY?l=e:n==A5.BEGIN_GEOMETRY&&(o[2]=e,SR(this.hitDetectionInstructions,l,e),l=-1)}fillStyleToState(t,e={}){if(t){let i=t.getColor();e.fillPatternScale=i&&typeof i=="object"&&"src"in i?this.pixelRatio:1,e.fillStyle=Z7(i||$8)}else e.fillStyle=void 0;return e}strokeStyleToState(t,e={}){if(t){let i=t.getColor();e.strokeStyle=Z7(i||Ra);let o=t.getLineCap();e.lineCap=o!==void 0?o:Io;let n=t.getLineDash();e.lineDash=n?n.slice():N7;let l=t.getLineDashOffset();e.lineDashOffset=l||U7;let A=t.getLineJoin();e.lineJoin=A!==void 0?A:Fo;let d=t.getWidth();e.lineWidth=d!==void 0?d:Da;let L=t.getMiterLimit();e.miterLimit=L!==void 0?L:Pa,e.lineWidth>this.maxLineWidth&&(this.maxLineWidth=e.lineWidth,this.bufferedMaxExtent_=null)}else e.strokeStyle=void 0,e.lineCap=void 0,e.lineDash=null,e.lineDashOffset=void 0,e.lineJoin=void 0,e.lineWidth=void 0,e.miterLimit=void 0;return e}setFillStrokeStyle(t,e){let i=this.state;this.fillStyleToState(t,i),this.strokeStyleToState(e,i)}createFill(t){let e=t.fillStyle,i=[A5.SET_FILL_STYLE,e];return typeof e!="string"&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[A5.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,t.lineDash?this.applyPixelRatio(t.lineDash):null,t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){let i=t.fillStyle;(typeof i!="string"||t.currentFillStyle!=i)&&(this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){let i=t.strokeStyle,o=t.lineCap,n=t.lineDash,l=t.lineDashOffset,A=t.lineJoin,d=t.lineWidth,L=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=o||n!=t.currentLineDash&&!B9(t.currentLineDash,n)||t.currentLineDashOffset!=l||t.currentLineJoin!=A||t.currentLineWidth!=d||t.currentMiterLimit!=L)&&(e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=o,t.currentLineDash=n,t.currentLineDashOffset=l,t.currentLineJoin=A,t.currentLineWidth=d,t.currentMiterLimit=L)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;let e=[A5.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=JL(this.maxExtent),this.maxLineWidth>0)){let t=this.resolution*(this.maxLineWidth+1)/2;Rs(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}},Do=Yw;var Jw=class extends Do{constructor(t,e,i,o){super(t,e,i,o),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!Ql(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);let o=t.getFlatCoordinates(),n=t.getStride(),l=this.coordinates.length,A=this.appendFlatPointCoordinates(o,n);this.instructions.push([A5.DRAW_IMAGE,l,A,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([A5.DRAW_IMAGE,l,A,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);let o=t.getFlatCoordinates(),n=[];for(let d=0,L=o.length;d<L;d+=t.getStride())(!this.maxExtent||Ql(this.maxExtent,o.slice(d,d+2)))&&n.push(o[d],o[d+1]);let l=this.coordinates.length,A=this.appendFlatPointCoordinates(n,2);this.instructions.push([A5.DRAW_IMAGE,l,A,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([A5.DRAW_IMAGE,l,A,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){let i=t.getAnchor(),o=t.getSize(),n=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=o[1],this.opacity_=t.getOpacity(),this.originX_=n[0],this.originY_=n[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=o[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}},CD=Jw;var tb=class extends Do{constructor(t,e,i,o){super(t,e,i,o)}drawFlatCoordinates_(t,e,i,o){let n=this.coordinates.length,l=this.appendFlatLineCoordinates(t,e,i,o,!1,!1),A=[A5.MOVE_TO_LINE_TO,n,l];return this.instructions.push(A),this.hitDetectionInstructions.push(A),i}drawLineString(t,e,i){let o=this.state,n=o.strokeStyle,l=o.lineWidth;if(n===void 0||l===void 0)return;this.updateStrokeStyle(o,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([A5.SET_STROKE_STYLE,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,N7,U7],Za);let A=t.getFlatCoordinates(),d=t.getStride();this.drawFlatCoordinates_(A,0,A.length,d),this.hitDetectionInstructions.push(zo),this.endGeometry(e)}drawMultiLineString(t,e,i){let o=this.state,n=o.strokeStyle,l=o.lineWidth;if(n===void 0||l===void 0)return;this.updateStrokeStyle(o,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([A5.SET_STROKE_STYLE,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,N7,U7],Za);let A=t.getEnds(),d=t.getFlatCoordinates(),L=t.getStride(),C=0;for(let y=0,E=A.length;y<E;++y)C=this.drawFlatCoordinates_(d,C,A[y],L);this.hitDetectionInstructions.push(zo),this.endGeometry(e)}finish(){let t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(zo),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(zo),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Za)}},gD=tb;var eb=class extends Do{constructor(t,e,i,o){super(t,e,i,o)}drawFlatCoordinatess_(t,e,i,o){let n=this.state,l=n.fillStyle!==void 0,A=n.strokeStyle!==void 0,d=i.length;this.instructions.push(Za),this.hitDetectionInstructions.push(Za);for(let L=0;L<d;++L){let C=i[L],y=this.coordinates.length,E=this.appendFlatLineCoordinates(t,e,C,o,!0,!A),B=[A5.MOVE_TO_LINE_TO,y,E];this.instructions.push(B),this.hitDetectionInstructions.push(B),A&&(this.instructions.push(Xw),this.hitDetectionInstructions.push(Xw)),e=C}return l&&(this.instructions.push(nf),this.hitDetectionInstructions.push(nf)),A&&(this.instructions.push(zo),this.hitDetectionInstructions.push(zo)),e}drawCircle(t,e,i){let o=this.state,n=o.fillStyle,l=o.strokeStyle;if(n===void 0&&l===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),o.fillStyle!==void 0&&this.hitDetectionInstructions.push([A5.SET_FILL_STYLE,$8]),o.strokeStyle!==void 0&&this.hitDetectionInstructions.push([A5.SET_STROKE_STYLE,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,N7,U7]);let A=t.getFlatCoordinates(),d=t.getStride(),L=this.coordinates.length;this.appendFlatLineCoordinates(A,0,A.length,d,!1,!1);let C=[A5.CIRCLE,L];this.instructions.push(Za,C),this.hitDetectionInstructions.push(Za,C),o.fillStyle!==void 0&&(this.instructions.push(nf),this.hitDetectionInstructions.push(nf)),o.strokeStyle!==void 0&&(this.instructions.push(zo),this.hitDetectionInstructions.push(zo)),this.endGeometry(e)}drawPolygon(t,e,i){let o=this.state,n=o.fillStyle,l=o.strokeStyle;if(n===void 0&&l===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),o.fillStyle!==void 0&&this.hitDetectionInstructions.push([A5.SET_FILL_STYLE,$8]),o.strokeStyle!==void 0&&this.hitDetectionInstructions.push([A5.SET_STROKE_STYLE,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,N7,U7]);let A=t.getEnds(),d=t.getOrientedFlatCoordinates(),L=t.getStride();this.drawFlatCoordinatess_(d,0,A,L),this.endGeometry(e)}drawMultiPolygon(t,e,i){let o=this.state,n=o.fillStyle,l=o.strokeStyle;if(n===void 0&&l===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),o.fillStyle!==void 0&&this.hitDetectionInstructions.push([A5.SET_FILL_STYLE,$8]),o.strokeStyle!==void 0&&this.hitDetectionInstructions.push([A5.SET_STROKE_STYLE,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,N7,U7]);let A=t.getEndss(),d=t.getOrientedFlatCoordinates(),L=t.getStride(),C=0;for(let y=0,E=A.length;y<E;++y)C=this.drawFlatCoordinatess_(d,C,A[y],L);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;let t=this.tolerance;if(t!==0){let e=this.coordinates;for(let i=0,o=e.length;i<o;++i)e[i]=Qs(e[i],t)}return super.finish()}setFillStrokeStyles_(){let t=this.state;this.updateFillStyle(t,this.createFill),this.updateStrokeStyle(t,this.applyStroke)}},rb=eb;function mD(r,t,e,i,o){let n=[],l=e,A=0,d=t.slice(e,2);for(;A<r&&l+o<i;){let[L,C]=d.slice(-2),y=t[l+o],E=t[l+o+1],B=Math.sqrt((y-L)*(y-L)+(E-C)*(E-C));if(A+=B,A>=r){let Z=(r-A+B)/B,Q=qi(L,y,Z),V=qi(C,E,Z);d.push(Q,V),n.push(d),d=[Q,V],A==r&&(l+=o),A=0}else if(A<r)d.push(t[l+o],t[l+o+1]),l+=o;else{let Z=B-A,Q=qi(L,y,Z/B),V=qi(C,E,Z/B);d.push(Q,V),n.push(d),d=[Q,V],A=0,l+=o}}return A>0&&n.push(d),n}function vD(r,t,e,i,o){let n=e,l=e,A=0,d=0,L=e,C,y,E,B,Z,Q,V,G,J,n1;for(y=e;y<i;y+=o){let r1=t[y],m1=t[y+1];Z!==void 0&&(J=r1-Z,n1=m1-Q,B=Math.sqrt(J*J+n1*n1),V!==void 0&&(d+=E,C=Math.acos((V*J+G*n1)/(E*B)),C>r&&(d>A&&(A=d,n=L,l=y),d=0,L=y-o)),E=B,V=J,G=n1),Z=r1,Q=m1}return d+=B,d>A?[L,y]:[n,l]}var of={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},ib=class extends Do{constructor(t,e,i,o){super(t,e,i,o),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textKeepUpright_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[$8]={fillStyle:$8},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){let t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){let o=this.textFillState_,n=this.textStrokeState_,l=this.textState_;if(this.text_===""||!l||!o&&!n)return;let A=this.coordinates,d=A.length,L=t.getType(),C=null,y=t.getStride();if(l.placement==="line"&&(L=="LineString"||L=="MultiLineString"||L=="Polygon"||L=="MultiPolygon")){if(!u0(this.maxExtent,t.getExtent()))return;let E;if(C=t.getFlatCoordinates(),L=="LineString")E=[C.length];else if(L=="MultiLineString")E=t.getEnds();else if(L=="Polygon")E=t.getEnds().slice(0,1);else if(L=="MultiPolygon"){let V=t.getEndss();E=[];for(let G=0,J=V.length;G<J;++G)E.push(V[G][0])}this.beginGeometry(t,e,i);let B=l.repeat,Z=B?void 0:l.textAlign,Q=0;for(let V=0,G=E.length;V<G;++V){let J;B?J=mD(B*this.resolution,C,Q,E[V],y):J=[C.slice(Q,E[V])];for(let n1=0,r1=J.length;n1<r1;++n1){let m1=J[n1],w1=0,B1=m1.length;if(Z==null){let L1=vD(l.maxAngle,m1,0,m1.length,2);w1=L1[0],B1=L1[1]}for(let L1=w1;L1<B1;L1+=y)A.push(m1[L1],m1[L1+1]);let g1=A.length;Q=E[V],this.drawChars_(d,g1),d=g1}}this.endGeometry(e)}else{let E=l.overflow?null:[];switch(L){case"Point":case"MultiPoint":C=t.getFlatCoordinates();break;case"LineString":C=t.getFlatMidpoint();break;case"Circle":C=t.getCenter();break;case"MultiLineString":C=t.getFlatMidpoints(),y=2;break;case"Polygon":C=t.getFlatInteriorPoint(),l.overflow||E.push(C[2]/this.resolution),y=3;break;case"MultiPolygon":let r1=t.getFlatInteriorPoints();C=[];for(let m1=0,w1=r1.length;m1<w1;m1+=3)l.overflow||E.push(r1[m1+2]/this.resolution),C.push(r1[m1],r1[m1+1]);if(C.length===0)return;y=2;break;default:}let B=this.appendFlatPointCoordinates(C,y);if(B===d)return;if(E&&(B-d)/2!==C.length/y){let r1=d/2;E=E.filter((m1,w1)=>{let B1=A[(r1+w1)*2]===C[w1*y]&&A[(r1+w1)*2+1]===C[w1*y+1];return B1||--r1,B1})}this.saveTextStates_();let Z=l.backgroundFill?this.createFill(this.fillStyleToState(l.backgroundFill)):null,Q=l.backgroundStroke?this.createStroke(this.strokeStyleToState(l.backgroundStroke)):null;this.beginGeometry(t,e,i);let V=l.padding;if(V!=za&&(l.scale[0]<0||l.scale[1]<0)){let r1=l.padding[0],m1=l.padding[1],w1=l.padding[2],B1=l.padding[3];l.scale[0]<0&&(m1=-m1,B1=-B1),l.scale[1]<0&&(r1=-r1,w1=-w1),V=[r1,m1,w1,B1]}let G=this.pixelRatio;this.instructions.push([A5.DRAW_IMAGE,d,B,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,V==za?za:V.map(function(r1){return r1*G}),Z,Q,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,E]);let J=1/G,n1=Z?Z.slice(0):null;n1&&(n1[1]=$8),this.hitDetectionInstructions.push([A5.DRAW_IMAGE,d,B,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[J,J],NaN,this.declutterMode_,this.declutterImageWithText_,V,n1,Q,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?$8:this.fillKey_,this.textOffsetX_,this.textOffsetY_,E]),this.endGeometry(e)}}saveTextStates_(){let t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,o=this.strokeKey_;t&&(o in this.strokeStates||(this.strokeStates[o]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));let n=this.textKey_;n in this.textStates||(this.textStates[n]={font:e.font,textAlign:e.textAlign||Vs,justify:e.justify,textBaseline:e.textBaseline||sc,scale:e.scale});let l=this.fillKey_;i&&(l in this.fillStates||(this.fillStates[l]={fillStyle:i.fillStyle}))}drawChars_(t,e){let i=this.textStrokeState_,o=this.textState_,n=this.strokeKey_,l=this.textKey_,A=this.fillKey_;this.saveTextStates_();let d=this.pixelRatio,L=of[o.textBaseline],C=this.textOffsetY_*d,y=this.text_,E=i?i.lineWidth*Math.abs(o.scale[0])/2:0;this.instructions.push([A5.DRAW_CHARS,t,e,L,o.overflow,A,o.maxAngle,d,C,n,E*d,y,l,1,this.declutterMode_,this.textKeepUpright_]),this.hitDetectionInstructions.push([A5.DRAW_CHARS,t,e,L,o.overflow,A&&$8,o.maxAngle,d,C,n,E*d,y,l,1/d,this.declutterMode_,this.textKeepUpright_])}setTextStyle(t,e){let i,o,n;if(!t)this.text_="";else{let l=t.getFill();l?(o=this.textFillState_,o||(o={},this.textFillState_=o),o.fillStyle=Z7(l.getColor()||$8)):(o=null,this.textFillState_=o);let A=t.getStroke();if(!A)n=null,this.textStrokeState_=n;else{n=this.textStrokeState_,n||(n={},this.textStrokeState_=n);let Q=A.getLineDash(),V=A.getLineDashOffset(),G=A.getWidth(),J=A.getMiterLimit();n.lineCap=A.getLineCap()||Io,n.lineDash=Q?Q.slice():N7,n.lineDashOffset=V===void 0?U7:V,n.lineJoin=A.getLineJoin()||Fo,n.lineWidth=G===void 0?Da:G,n.miterLimit=J===void 0?Pa:J,n.strokeStyle=Z7(A.getColor()||Ra)}i=this.textState_;let d=t.getFont()||GC;iD(d);let L=t.getScaleArray();i.overflow=t.getOverflow(),i.font=d,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||sc,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||za,i.scale=L===void 0?[1,1]:L;let C=t.getOffsetX(),y=t.getOffsetY(),E=t.getRotateWithView(),B=t.getKeepUpright(),Z=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=C===void 0?0:C,this.textOffsetY_=y===void 0?0:y,this.textRotateWithView_=E===void 0?!1:E,this.textKeepUpright_=B===void 0?!0:B,this.textRotation_=Z===void 0?0:Z,this.strokeKey_=n?(typeof n.strokeStyle=="string"?n.strokeStyle:vr(n.strokeStyle))+n.lineCap+n.lineDashOffset+"|"+n.lineWidth+n.lineJoin+n.miterLimit+"["+n.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=o&&o.fillStyle?typeof o.fillStyle=="string"?o.fillStyle:"|"+vr(o.fillStyle):""}this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}},yD=ib;var s21={Circle:rb,Default:Do,Image:CD,LineString:gD,Polygon:rb,Text:yD},nb=class{constructor(t,e,i,o){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=o,this.resolution_=i,this.buildersByZIndex_={}}finish(){let t={};for(let e in this.buildersByZIndex_){t[e]=t[e]||{};let i=this.buildersByZIndex_[e];for(let o in i){let n=i[o].finish();t[e][o]=n}}return t}getBuilder(t,e){let i=t!==void 0?t.toString():"0",o=this.buildersByZIndex_[i];o===void 0&&(o={},this.buildersByZIndex_[i]=o);let n=o[e];if(n===void 0){let l=s21[e];n=new l(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),o[e]=n}return n}},_D=nb;function xD(r,t,e,i,o,n,l,A,d,L,C,y,E=!0){let B=r[t],Z=r[t+1],Q=0,V=0,G=0,J=0;function n1(){Q=B,V=Z,t+=i,B=r[t],Z=r[t+1],J+=G,G=Math.sqrt((B-Q)*(B-Q)+(Z-V)*(Z-V))}do n1();while(t<e-i&&J+G<n);let r1=G===0?0:(n-J)/G,m1=qi(Q,B,r1),w1=qi(V,Z,r1),B1=t-i,g1=J,L1=n+A*d(L,o,C);for(;t<e-i&&J+G<L1;)n1();r1=G===0?0:(L1-J)/G;let z1=qi(Q,B,r1),s1=qi(V,Z,r1),x1=!1;if(E)if(y){let o2=[m1,w1,z1,s1];Vu(o2,0,4,2,y,o2,o2),x1=o2[0]>o2[2]}else x1=m1>z1;let N1=Math.PI,V1=[],l2=B1+i===t;t=B1,G=0,J=g1,B=r[t],Z=r[t+1];let p2;if(l2){n1(),p2=Math.atan2(Z-V,B-Q),x1&&(p2+=p2>0?-N1:N1);let o2=(z1+m1)/2,G1=(s1+w1)/2;return V1[0]=[o2,G1,(L1-n)/2,p2,o],V1}o=o.replace(/\n/g," ");for(let o2=0,G1=o.length;o2<G1;){n1();let L2=Math.atan2(Z-V,B-Q);if(x1&&(L2+=L2>0?-N1:N1),p2!==void 0){let J1=L2-p2;if(J1+=J1>N1?-2*N1:J1<-N1?2*N1:0,Math.abs(J1)>l)return null}p2=L2;let V2=o2,w2=0;for(;o2<G1;++o2){let J1=x1?G1-o2-1:o2,u2=A*d(L,o[J1],C);if(t+i<e&&J+G<n+w2+u2/2)break;w2+=u2}if(o2===V2)continue;let u1=x1?o.substring(G1-V2,G1-o2):o.substring(V2,o2);r1=G===0?0:(n+w2/2-J)/G;let P1=qi(Q,B,r1),F1=qi(V,Z,r1);V1.push([P1,F1,w2/2,L2,u1]),n+=w2}return V1}var ob=class{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Xu(),{get:(t,e)=>{if(typeof Xu()[e]=="function")return this.push_(e),this.pushMethodArgs_},set:(t,e,i)=>(this.push_(e,i),!0)})}push_(...t){let e=this.instructions_,i=this.zIndex+this.offset_;e[i]||(e[i]=[]),e[i].push(...t)}pushMethodArgs_=(...t)=>(this.push_(t),this);pushFunction(t){this.push_(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let i=0,o=e.length;i<o;++i){let n=e[i];if(typeof n=="function"){n(t);continue}let l=e[++i];if(typeof t[n]=="function")t[n](...l);else{if(typeof l=="function"){t[n]=l(t);continue}t[n]=l}}})}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}},YC=ob;var rh=D7(),Gs=[],Na=[],Ua=[],js=[];function wD(r){return r[3].declutterBox}var bD=new RegExp("[\u0591-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFC\u0800-\u0FFF\uE800-\uEFFF]");function ab(r,t){return t==="start"?t=bD.test(r)?"right":"left":t==="end"&&(t=bD.test(r)?"left":"right"),of[t]}function l21(r,t,e){return e>0&&r.push(`
|
|
836
836
|
`,""),r.push(t,""),r}function c21(r,t,e){return e%2===0&&(r+=t),r}var sb=class{constructor(t,e,i,o,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=o.instructions,this.coordinates=o.coordinates,this.coordinateCache_={},this.renderedTransform_=e8(),this.hitDetectionInstructions=o.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=o.fillStates||{},this.strokeStates=o.strokeStates||{},this.textStates=o.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=n?new YC:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,o){let n=t+e+i+o;if(this.labels_[n])return this.labels_[n];let l=o?this.strokeStates[o]:null,A=i?this.fillStates[i]:null,d=this.textStates[e],L=this.pixelRatio,C=[d.scale[0]*L,d.scale[1]*L],y=d.justify?of[d.justify]:ab(Array.isArray(t)?t[0]:t,d.textAlign||Vs),E=o&&l.lineWidth?l.lineWidth:0,B=Array.isArray(t)?t:String(t).split(`
|
|
@@ -846,7 +846,7 @@ sharing`,nextbike_df:"Frelo",yoio_freiburg:"Yoio",zeus_freiburg:"ZEUS"},QO="bicy
|
|
|
846
846
|
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
|
|
847
847
|
<path fill="none" stroke="currentColor" stroke-width="2" d="M22.999,25 L22.997,13.002 C22.997,11.896 23.893,11 24.999,11 C26.105,11 27.001,11.896 27.001,13.002 L26.999,26.002 M31,25.003 C31,23.897 31.896,23.001 33.002,23.001 C34.11,23.001 35.006,23.897 35.006,25.003 C35.006,25.003 35,26.125 35,32.001 C35,37.875 33.2,41.001 33.2,41.001 L19,41.001 C19,41.001 12.21,29.483 11.586,28.419 C10.962,27.355 10.804,26.369 11.586,25.587 C12.37,24.805 13.636,24.805 14.418,25.587 L18.998,30.169 L19,30.169 L19,25.001 L18.996,15.003 C18.996,13.897 19.894,13.001 21,13.001 C22.106,13.001 23.002,13.897 23.002,15.003 L23,26.015 M26.9942,22.997 C26.9942,21.891 27.8902,20.995 28.9962,20.995 C30.1042,20.995 31.0002,21.891 31.0002,22.997 L31.0002,26.001 M30,16.3046 C30.632,15.3606 31,14.2246 31,13.0006 C31,9.6846 28.314,7.0006 25,7.0006 C23.208,7.0006 21.616,7.8026 20.518,9.0486 C17.432,9.2986 15,11.8506 15,15.0006 C15,16.2166 15.368,17.3426 15.988,18.2866"/>
|
|
848
848
|
</svg>
|
|
849
|
-
`,this.element.appendChild(this.icon),this.text=document.createElement("p"),this.text.className=`${e.className}-text`,this.text.innerHTML="Benutzen Sie 2 Finger um die Karte zu bedienen.",this.element.appendChild(this.text),this.dragPan=void 0,this.onPointerDragRef=void 0,this.onPointerDrag=this.onPointerDrag.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this)}onPointerDrag(t){return t.activePointers?.length!==1?!0:(this.element.style.display="flex",document.addEventListener("touchend",this.onTouchEnd,{once:!0}),!1)}onTouchEnd(){sr(this.onPointerDragRef),this.element.style.display="none"}setMap(t){if(super.setMap(t),document.removeEventListener("touchend",this.onTouchEnd),sr(this.onPointerDragRef),t){let e=t.getViewport();if(e.style.touchAction="pan-x pan-y",this.dragPan=t.getInteractions().getArray().find(i=>i instanceof Lf),!this.dragPan){console.error("Impossible to find the DragPan interaction, DragPanWarning will not work as expected.");return}this.listenerKeys.push(t.on("pointerdown",i=>(document.removeEventListener("touchend",this.onTouchEnd),i.originalEvent.pointerType!=="touch"||!this.dragPan?.condition_(i)?(this.element.style.display="none",!0):(this.onPointerDragRef=t.on("pointerdrag",this.onPointerDrag),!0)))),this.element.addEventListener("click",this.onTouchEnd)}}},fZ=AB;function Gr1(){let{isEmbed:r,map:t}=Ot(),[e,i]=Ft(null);return et(()=>{let o=null;if(!(!t||!e||!r))return t.getInteractions().forEach(n=>{n instanceof Ah&&n.setActive(!1)}),o=new fZ({target:e}),t.addControl(o),()=>{o&&t.removeControl(o),t.getInteractions().forEach(n=>{n instanceof Ah&&n.setActive(!0)})}},[t,e,r]),W("div",{ref:o=>i(o)})}var dB=Gr1;function jr1({...r}){return W("svg",{height:"24px",viewBox:"0 0 24 24",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:W("g",{children:W("path",{d:"M21,16 C21.5522847,16 22,16.4477153 22,17 L22,20 C22,21.6568542 20.6568542,23 19,23 L5,23 C3.34314575,23 2,21.6568542 2,20 L2,17 C2,16.4477153 2.44771525,16 3,16 C3.55228475,16 4,16.4477153 4,17 L4,20 C4,20.5522847 4.44771525,21 5,21 L19,21 C19.5522847,21 20,20.5522847 20,20 L20,17 C20,16.4477153 20.4477153,16 21,16 Z M12,1 C12.5522847,1 13,1.44771525 13,2 L13,13.585 L15.2928932,11.2928932 C15.6533772,10.9324093 16.2206082,10.9046797 16.6128994,11.2097046 L16.7071068,11.2928932 C17.0976311,11.6834175 17.0976311,12.3165825 16.7071068,12.7071068 L12.7071068,16.7071068 C12.6786405,16.7355731 12.6484659,16.7623312 12.6167501,16.787214 C12.6098424,16.7927155 12.602603,16.7982466 12.5953066,16.8036654 C12.5711307,16.8215099 12.546275,16.8382813 12.5206602,16.8539326 C12.5086131,16.8613931 12.4963944,16.8685012 12.4840621,16.8753288 C12.4642939,16.8862061 12.4438914,16.8966234 12.4230991,16.9063462 C12.4060985,16.914321 12.3887956,16.9218036 12.371336,16.9287745 C12.3515792,16.9366843 12.3317977,16.9438775 12.3117364,16.9504533 C12.2968513,16.9552713 12.2814633,16.9599023 12.265993,16.9641549 C12.2444365,16.9701664 12.2227461,16.9753602 12.2007941,16.9798348 C12.1833753,16.9832978 12.165949,16.9863719 12.1484669,16.9889822 C12.1003621,16.9962388 12.0506203,17 12,17 L12.0852242,16.996384 C12.0679231,16.997855 12.050591,16.9988772 12.0332468,16.9994506 L12,17 C11.9888734,17 11.9777892,16.9998183 11.9667503,16.9994576 C11.9497336,16.9989053 11.9317345,16.9978436 11.9137692,16.9962979 C11.892114,16.9944666 11.8714753,16.9920328 11.8510388,16.9889807 C11.834051,16.9863719 11.8166247,16.9832978 11.7992742,16.9797599 C11.7772539,16.9753602 11.7555635,16.9701664 11.7341604,16.964279 C11.7185367,16.9599023 11.7031487,16.9552713 11.6878575,16.9502619 C11.6682023,16.9438775 11.6484208,16.9366843 11.6289415,16.928896 C11.6112044,16.9218036 11.5939015,16.914321 11.5767785,16.9063266 C11.5561086,16.8966234 11.5357061,16.8862061 11.515723,16.8751242 C11.5036056,16.8685012 11.4913869,16.8613931 11.4792912,16.8540045 C11.453725,16.8382813 11.4288693,16.8215099 11.4048407,16.8036865 C11.3656744,16.774687 11.3282873,16.7425008 11.2928932,16.7071068 L11.3832499,16.787214 C11.3515341,16.7623312 11.3213595,16.7355731 11.2928932,16.7071068 L7.29289322,12.7071068 C6.90236893,12.3165825 6.90236893,11.6834175 7.29289322,11.2928932 C7.68341751,10.9023689 8.31658249,10.9023689 8.70710678,11.2928932 L11,13.585 L11,2 C11,1.48716416 11.3860402,1.06449284 11.8833789,1.00672773 Z",fill:"currentColor"})})})}var fB=jr1;var qr1="flex gap-2 text-[14px] @sm:text-[16px] @md:text-[18px] h-[32px] @sm:h-[36px] @md:h-[40px] px-[22px] @sm:px-[22.5px] @md:px-[27.5px] pt-[7px] pb-[5px] @sm:pt-[8px] @sm:pb-[6px] @md:pt-[8.5px] @md:pb-[6.5px] items-center justify-left rounded-full border font-semibold text-button cursor-pointer disabled:cursor-default",Ef={primary:{classes:"border-red bg-red text-white disabled:bg-lightgrey disabled:border-lightgrey hover:bg-darkred hover:border-darkred active:bg-lightred active:border-lightred ",selectedClasses:"bg-darkred border-darkred"},secondary:{classes:"border border-current bg-white text-grey hover:text-red disabled:text-lightgrey active:text-lightred",selectedClasses:"text-red"}};function Kr1({children:r,className:t,href:e,selected:i=!1,theme:o="secondary",...n}){let l=ye(()=>Fe(`${qr1} ${Ef[o].classes} ${i?Ef[o].selectedClasses:""} ${t||""}`),[t,i,o]);return e?W("a",{className:l,href:e,...n,children:r}):W("button",{className:l,...n,children:r})}var $a=ht(Kr1);var Wr1="flex size-[32px] @sm/main:size-[36px] @md/main:size-[40px] p-[7px] items-center justify-center rounded-full border cursor-pointer disabled:cursor-default";function $r1({children:r,className:t,href:e,Icon:i,selected:o=!1,theme:n="secondary",...l}){let A=ye(()=>Fe(Wr1,Ef[n].classes,o?Ef[n].selectedClasses:"",t),[t,o,n]);return e?W("a",{className:A,href:e,...l,children:r||W(i,{height:"100%",width:"100%"})}):W("button",{className:A,...l,children:r||W(i,{height:"100%",width:"100%"})})}var U6=ht($r1);var gc=M9({t:(r,t)=>`${r} ${JSON.stringify(t)}`}),Xr1=()=>{let r=r7(gc);if(!r)throw new Error("useI18n must be used within a ContextProvider");return r},L3=Xr1;function Yr1({...r}){let{isExportMenuOpen:t,setIsExportMenuOpen:e}=Ot(),{t:i}=L3(),o=i6(()=>{e(!t)},[t,e]);return W(U6,{title:i("print_menu_title"),...r,onClick:o,selected:t,children:W(fB,{})})}var pB=ht(Yr1);function Jr1({...r}){return W("svg",{fill:"currentColor",focusable:"false",height:"24",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",width:"24",xmlns:"http://www.w3.org/2000/svg",...r,children:W("path",{d:"M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 168c-44.183 0-80 35.817-80 80s35.817 80 80 80 80-35.817 80-80-35.817-80-80-80z"})})}var LB=Jr1;var pZ='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">%0A <title>iconfont/location</title>%0A <g id="iconfont/location" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">%0A <path d="M12,1.42108547e-14 C17.5228474,1.42108547e-14 22,4.47715241 22,10 C22,13.3716045 20.1975984,16.6760073 17.2259527,19.8127445 C16.2070021,20.8883035 15.118253,21.8681776 14.0291768,22.735405 C13.6473986,23.0394136 13.2921737,23.3081093 12.9722093,23.5391947 C12.777224,23.6800174 12.6351454,23.77842 12.5547002,23.8320502 C12.2188008,24.0559831 11.7811992,24.0559831 11.4452998,23.8320502 C11.3648546,23.77842 11.222776,23.6800174 11.0277907,23.5391947 C10.7078263,23.3081093 10.3526014,23.0394136 9.97082322,22.735405 C8.88174698,21.8681776 7.7929979,20.8883035 6.77404732,19.8127445 C3.80240157,16.6760073 2,13.3716045 2,10 C2,4.47715241 6.47715256,1.42108547e-14 12,1.42108547e-14 Z M12,2 C7.58172205,2 4,5.58172193 4,10 C4,12.7533953 5.57259843,15.6364924 8.22595268,18.4372552 C9.1757521,19.4398213 10.196378,20.3583846 11.2166768,21.1708447 C11.4951711,21.3926087 11.7576885,21.5936102 12,21.7726167 C12.2423115,21.5936102 12.5048289,21.3926087 12.7833232,21.1708447 C13.803622,20.3583846 14.8242479,19.4398213 15.7740473,18.4372552 C18.4274016,15.6364924 20,12.7533953 20,10 C20,5.58172193 16.418278,2 12,2 Z M12,5.99999987 C14.209139,5.99999987 16,7.79086087 16,9.99999987 C16,12.2091389 14.209139,13.9999999 12,13.9999999 C9.790861,13.9999999 8,12.2091389 8,9.99999987 C8,7.79086087 9.790861,5.99999987 12,5.99999987 Z M12,7.99999987 C10.8954305,7.99999987 10,8.89543037 10,9.99999987 C10,11.1045694 10.8954305,11.9999999 12,11.9999999 C13.1045695,11.9999999 14,11.1045694 14,9.99999987 C14,8.89543037 13.1045695,7.99999987 12,7.99999987 Z" id="Combined-Shape" fill="%23E3000B" fill-rule="nonzero"></path>%0A </g>%0A</svg>';var CB=new Ki([0,0]),e31=new D4(CB),LZ=new sh({source:new cc({features:[e31]}),style:new G3({image:new E9({anchor:[.5,1],src:pZ})})}),r31=16;function i31({...r}){let t=Ot(),{isTracking:e,map:i,setIsTracking:o}=t,n=ye(()=>new fw,[]);return et(()=>{let l=[];if(!(!i||!n))return l=[n.once("change:position",A=>{let d=A.target.getPosition();if(A.target.getPosition()){let L=Ia(d,"EPSG:3857");i.getView().setZoom(r31),i.getView().setCenter(L),CB.setCoordinates(L)}}),n.on("change:position",A=>{let d=A.target.getPosition();if(A.target.getPosition()){let L=Ia(d,"EPSG:3857");i.getView().setCenter(L),CB.setCoordinates(L)}})],()=>{sr(l)}},[i,n]),et(()=>(n.setTracking(e),e&&LZ.setMap(i),()=>{LZ.setMap(null)}),[i,n,e]),W(U6,{onClick:()=>{o(!e)},selected:e,...r,children:W(LB,{className:e?"animate-pulse":""})})}var zg=ht(i31);function n31({...r}){return W("svg",{fill:"none",height:24,stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...r,children:W("path",{d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3",strokeLinecap:"round",strokeLinejoin:"round"})})}var gB=n31;function o31({...r}){let{isLayerTreeOpen:t,setIsLayerTreeOpen:e}=Ot(),{t:i}=L3(),o=i6(()=>{e(!t)},[t,e]);return W(U6,{title:i("layertree_menu_title"),...r,onClick:o,selected:t,children:W(gB,{})})}var mB=ht(o31);var a31=r=>{let{permalinktemplate:t}=Ot();return ye(()=>{let i=r||t;if(console.log("template",i),!i)return null;try{let o,n,l,A;if(i?.startsWith("?")){let L=new URLSearchParams(i),C=[...L.keys()],y=C.find(V=>L.get(V).includes("{{x}}")),E=C.find(V=>L.get(V).includes("{{y}}")),B=C.find(V=>L.get(V).includes("{{z}}")),Z=C.find(V=>L.get(V).includes("{{layers}}")),Q=new URLSearchParams(window.location.search);n=Q.get(y),l=Q.get(E),A=Q.get(B),o=Q.get(Z)}else if(i?.startsWith("#")){let L=i.substring(1).split("/"),y=window.location.hash.substring(1).split("/"),E=L.findIndex(V=>V.includes("{{x}}")),B=L.findIndex(V=>V.includes("{{y}}")),Z=L.findIndex(V=>V.includes("{{z}}")),Q=L.findIndex(V=>V.includes("{{layers}}"));n=E>-1?y[E]:null,l=B>-1?y[B]:null,A=Z>-1?y[Z]:null,o=Q>-1?y[Q]:null}let d={};return n&&l&&(d.center=`${n},${l}`),A&&(d.zoom=A),o!=null&&(d.layers=o),d}catch(o){console.warn("Impossible to read x,y,z and layers from the url with template",i,o)}return null},[t,r])},Dg=a31;var CZ=`:root,
|
|
849
|
+
`,this.element.appendChild(this.icon),this.text=document.createElement("p"),this.text.className=`${e.className}-text`,this.text.innerHTML="Benutzen Sie 2 Finger um die Karte zu bedienen.",this.element.appendChild(this.text),this.dragPan=void 0,this.onPointerDragRef=void 0,this.onPointerDrag=this.onPointerDrag.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this)}onPointerDrag(t){return t.activePointers?.length!==1?!0:(this.element.style.display="flex",document.addEventListener("touchend",this.onTouchEnd,{once:!0}),!1)}onTouchEnd(){sr(this.onPointerDragRef),this.element.style.display="none"}setMap(t){if(super.setMap(t),document.removeEventListener("touchend",this.onTouchEnd),sr(this.onPointerDragRef),t){let e=t.getViewport();if(e.style.touchAction="pan-x pan-y",this.dragPan=t.getInteractions().getArray().find(i=>i instanceof Lf),!this.dragPan){console.error("Impossible to find the DragPan interaction, DragPanWarning will not work as expected.");return}this.listenerKeys.push(t.on("pointerdown",i=>(document.removeEventListener("touchend",this.onTouchEnd),i.originalEvent.pointerType!=="touch"||!this.dragPan?.condition_(i)?(this.element.style.display="none",!0):(this.onPointerDragRef=t.on("pointerdrag",this.onPointerDrag),!0)))),this.element.addEventListener("click",this.onTouchEnd)}}},fZ=AB;function Gr1(){let{isEmbed:r,map:t}=Ot(),[e,i]=Ft(null);return et(()=>{let o=null;if(!(!t||!e||!r))return t.getInteractions().forEach(n=>{n instanceof Ah&&n.setActive(!1)}),o=new fZ({target:e}),t.addControl(o),()=>{o&&t.removeControl(o),t.getInteractions().forEach(n=>{n instanceof Ah&&n.setActive(!0)})}},[t,e,r]),W("div",{ref:o=>i(o)})}var dB=Gr1;function jr1({...r}){return W("svg",{height:"24px",viewBox:"0 0 24 24",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:W("g",{children:W("path",{d:"M21,16 C21.5522847,16 22,16.4477153 22,17 L22,20 C22,21.6568542 20.6568542,23 19,23 L5,23 C3.34314575,23 2,21.6568542 2,20 L2,17 C2,16.4477153 2.44771525,16 3,16 C3.55228475,16 4,16.4477153 4,17 L4,20 C4,20.5522847 4.44771525,21 5,21 L19,21 C19.5522847,21 20,20.5522847 20,20 L20,17 C20,16.4477153 20.4477153,16 21,16 Z M12,1 C12.5522847,1 13,1.44771525 13,2 L13,13.585 L15.2928932,11.2928932 C15.6533772,10.9324093 16.2206082,10.9046797 16.6128994,11.2097046 L16.7071068,11.2928932 C17.0976311,11.6834175 17.0976311,12.3165825 16.7071068,12.7071068 L12.7071068,16.7071068 C12.6786405,16.7355731 12.6484659,16.7623312 12.6167501,16.787214 C12.6098424,16.7927155 12.602603,16.7982466 12.5953066,16.8036654 C12.5711307,16.8215099 12.546275,16.8382813 12.5206602,16.8539326 C12.5086131,16.8613931 12.4963944,16.8685012 12.4840621,16.8753288 C12.4642939,16.8862061 12.4438914,16.8966234 12.4230991,16.9063462 C12.4060985,16.914321 12.3887956,16.9218036 12.371336,16.9287745 C12.3515792,16.9366843 12.3317977,16.9438775 12.3117364,16.9504533 C12.2968513,16.9552713 12.2814633,16.9599023 12.265993,16.9641549 C12.2444365,16.9701664 12.2227461,16.9753602 12.2007941,16.9798348 C12.1833753,16.9832978 12.165949,16.9863719 12.1484669,16.9889822 C12.1003621,16.9962388 12.0506203,17 12,17 L12.0852242,16.996384 C12.0679231,16.997855 12.050591,16.9988772 12.0332468,16.9994506 L12,17 C11.9888734,17 11.9777892,16.9998183 11.9667503,16.9994576 C11.9497336,16.9989053 11.9317345,16.9978436 11.9137692,16.9962979 C11.892114,16.9944666 11.8714753,16.9920328 11.8510388,16.9889807 C11.834051,16.9863719 11.8166247,16.9832978 11.7992742,16.9797599 C11.7772539,16.9753602 11.7555635,16.9701664 11.7341604,16.964279 C11.7185367,16.9599023 11.7031487,16.9552713 11.6878575,16.9502619 C11.6682023,16.9438775 11.6484208,16.9366843 11.6289415,16.928896 C11.6112044,16.9218036 11.5939015,16.914321 11.5767785,16.9063266 C11.5561086,16.8966234 11.5357061,16.8862061 11.515723,16.8751242 C11.5036056,16.8685012 11.4913869,16.8613931 11.4792912,16.8540045 C11.453725,16.8382813 11.4288693,16.8215099 11.4048407,16.8036865 C11.3656744,16.774687 11.3282873,16.7425008 11.2928932,16.7071068 L11.3832499,16.787214 C11.3515341,16.7623312 11.3213595,16.7355731 11.2928932,16.7071068 L7.29289322,12.7071068 C6.90236893,12.3165825 6.90236893,11.6834175 7.29289322,11.2928932 C7.68341751,10.9023689 8.31658249,10.9023689 8.70710678,11.2928932 L11,13.585 L11,2 C11,1.48716416 11.3860402,1.06449284 11.8833789,1.00672773 Z",fill:"currentColor"})})})}var fB=jr1;var qr1="flex gap-2 text-[14px] @sm:text-[16px] @md:text-[18px] h-[32px] @sm:h-[36px] @md:h-[40px] px-[22px] @sm:px-[22.5px] @md:px-[27.5px] pt-[7px] pb-[5px] @sm:pt-[8px] @sm:pb-[6px] @md:pt-[8.5px] @md:pb-[6.5px] items-center justify-left rounded-full border font-semibold text-button cursor-pointer disabled:cursor-default",Ef={primary:{classes:"border-red bg-red text-white disabled:bg-lightgrey disabled:border-lightgrey hover:bg-darkred hover:border-darkred active:bg-lightred active:border-lightred ",selectedClasses:"bg-darkred border-darkred"},secondary:{classes:"border border-current bg-white text-grey hover:text-red disabled:text-lightgrey active:text-lightred",selectedClasses:"text-red"}};function Kr1({children:r,className:t,href:e,selected:i=!1,theme:o="secondary",...n}){let l=ye(()=>Fe(`${qr1} ${Ef[o].classes} ${i?Ef[o].selectedClasses:""} ${t||""}`),[t,i,o]);return e?W("a",{className:l,href:e,...n,children:r}):W("button",{className:l,...n,children:r})}var $a=ht(Kr1);var Wr1="flex size-[32px] @sm/main:size-[36px] @md/main:size-[40px] p-[7px] items-center justify-center rounded-full border cursor-pointer disabled:cursor-default";function $r1({children:r,className:t,href:e,Icon:i,selected:o=!1,theme:n="secondary",...l}){let A=ye(()=>Fe(Wr1,Ef[n].classes,o?Ef[n].selectedClasses:"",t),[t,o,n]);return e?W("a",{className:A,href:e,...l,children:r||W(i,{height:"100%",width:"100%"})}):W("button",{className:A,...l,children:r||W(i,{height:"100%",width:"100%"})})}var U6=ht($r1);var gc=M9({t:(r,t)=>`${r} ${JSON.stringify(t)}`}),Xr1=()=>{let r=r7(gc);if(!r)throw new Error("useI18n must be used within a ContextProvider");return r},L3=Xr1;function Yr1({...r}){let{isExportMenuOpen:t,setIsExportMenuOpen:e}=Ot(),{t:i}=L3(),o=i6(()=>{e(!t)},[t,e]);return W(U6,{title:i("print_menu_title"),...r,onClick:o,selected:t,children:W(fB,{})})}var pB=ht(Yr1);function Jr1({...r}){return W("svg",{fill:"currentColor",focusable:"false",height:"24",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",width:"24",xmlns:"http://www.w3.org/2000/svg",...r,children:W("path",{d:"M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 168c-44.183 0-80 35.817-80 80s35.817 80 80 80 80-35.817 80-80-35.817-80-80-80z"})})}var LB=Jr1;var pZ='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">%0A <title>iconfont/location</title>%0A <g id="iconfont/location" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">%0A <path d="M12,1.42108547e-14 C17.5228474,1.42108547e-14 22,4.47715241 22,10 C22,13.3716045 20.1975984,16.6760073 17.2259527,19.8127445 C16.2070021,20.8883035 15.118253,21.8681776 14.0291768,22.735405 C13.6473986,23.0394136 13.2921737,23.3081093 12.9722093,23.5391947 C12.777224,23.6800174 12.6351454,23.77842 12.5547002,23.8320502 C12.2188008,24.0559831 11.7811992,24.0559831 11.4452998,23.8320502 C11.3648546,23.77842 11.222776,23.6800174 11.0277907,23.5391947 C10.7078263,23.3081093 10.3526014,23.0394136 9.97082322,22.735405 C8.88174698,21.8681776 7.7929979,20.8883035 6.77404732,19.8127445 C3.80240157,16.6760073 2,13.3716045 2,10 C2,4.47715241 6.47715256,1.42108547e-14 12,1.42108547e-14 Z M12,2 C7.58172205,2 4,5.58172193 4,10 C4,12.7533953 5.57259843,15.6364924 8.22595268,18.4372552 C9.1757521,19.4398213 10.196378,20.3583846 11.2166768,21.1708447 C11.4951711,21.3926087 11.7576885,21.5936102 12,21.7726167 C12.2423115,21.5936102 12.5048289,21.3926087 12.7833232,21.1708447 C13.803622,20.3583846 14.8242479,19.4398213 15.7740473,18.4372552 C18.4274016,15.6364924 20,12.7533953 20,10 C20,5.58172193 16.418278,2 12,2 Z M12,5.99999987 C14.209139,5.99999987 16,7.79086087 16,9.99999987 C16,12.2091389 14.209139,13.9999999 12,13.9999999 C9.790861,13.9999999 8,12.2091389 8,9.99999987 C8,7.79086087 9.790861,5.99999987 12,5.99999987 Z M12,7.99999987 C10.8954305,7.99999987 10,8.89543037 10,9.99999987 C10,11.1045694 10.8954305,11.9999999 12,11.9999999 C13.1045695,11.9999999 14,11.1045694 14,9.99999987 C14,8.89543037 13.1045695,7.99999987 12,7.99999987 Z" id="Combined-Shape" fill="%23E3000B" fill-rule="nonzero"></path>%0A </g>%0A</svg>';var CB=new Ki([0,0]),e31=new D4(CB),LZ=new sh({source:new cc({features:[e31]}),style:new G3({image:new E9({anchor:[.5,1],src:pZ})})}),r31=16;function i31({...r}){let t=Ot(),{isTracking:e,map:i,setIsTracking:o}=t,n=ye(()=>new fw,[]);return et(()=>{let l=[];if(!(!i||!n))return l=[n.once("change:position",A=>{let d=A.target.getPosition();if(A.target.getPosition()){let L=Ia(d,"EPSG:3857");i.getView().setZoom(r31),i.getView().setCenter(L),CB.setCoordinates(L)}}),n.on("change:position",A=>{let d=A.target.getPosition();if(A.target.getPosition()){let L=Ia(d,"EPSG:3857");i.getView().setCenter(L),CB.setCoordinates(L)}})],()=>{sr(l)}},[i,n]),et(()=>(n.setTracking(e),e&&LZ.setMap(i),()=>{LZ.setMap(null)}),[i,n,e]),W(U6,{onClick:()=>{o(!e)},selected:e,...r,children:W(LB,{className:e?"animate-pulse":""})})}var zg=ht(i31);function n31({...r}){return W("svg",{fill:"none",height:24,stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...r,children:W("path",{d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3",strokeLinecap:"round",strokeLinejoin:"round"})})}var gB=n31;function o31({...r}){let{isLayerTreeOpen:t,setIsLayerTreeOpen:e}=Ot(),{t:i}=L3(),o=i6(()=>{e(!t)},[t,e]);return W(U6,{title:i("layertree_menu_title"),...r,onClick:o,selected:t,children:W(gB,{})})}var mB=ht(o31);var a31=r=>{let{permalinktemplate:t}=Ot();return ye(()=>{let i=r||t;if(!i)return null;try{let o,n,l,A;if(i?.startsWith("?")){let L=new URLSearchParams(i),C=[...L.keys()],y=C.find(V=>L.get(V).includes("{{x}}")),E=C.find(V=>L.get(V).includes("{{y}}")),B=C.find(V=>L.get(V).includes("{{z}}")),Z=C.find(V=>L.get(V).includes("{{layers}}")),Q=new URLSearchParams(window.location.search);n=Q.get(y),l=Q.get(E),A=Q.get(B),o=Q.get(Z)}else if(i?.startsWith("#")){let L=i.substring(1).split("/"),y=window.location.hash.substring(1).split("/"),E=L.findIndex(V=>V.includes("{{x}}")),B=L.findIndex(V=>V.includes("{{y}}")),Z=L.findIndex(V=>V.includes("{{z}}")),Q=L.findIndex(V=>V.includes("{{layers}}"));n=E>-1?y[E]:null,l=B>-1?y[B]:null,A=Z>-1?y[Z]:null,o=Q>-1?y[Q]:null}let d={};return n&&l&&(d.center=`${n},${l}`),A&&(d.zoom=A),o!=null&&(d.layers=o),d}catch(o){console.warn("Impossible to read x,y,z and layers from the url with template",i,o)}return null},[t,r])},Dg=a31;var CZ=`:root,
|
|
850
850
|
:host {
|
|
851
851
|
--ol-background-color: white;
|
|
852
852
|
--ol-accent-background-color: #F5F5F5;
|
|
@@ -1281,7 +1281,7 @@ end`};t.events.push(["putFont",function(n){(function(l){var A=l.font,d=l.out,L=l
|
|
|
1281
1281
|
/* transform: rotate(-45deg); */
|
|
1282
1282
|
`,children:W("path",{d:"M13.2928932,5.29289322 C13.6834175,4.90236893 14.3165825,4.90236893 14.7071068,5.29289322 L20.7071068,11.2928932 C20.7355731,11.3213595 20.7623312,11.3515341 20.787214,11.3832499 C20.7927155,11.3901576 20.7982466,11.397397 20.8036654,11.4046934 C20.8215099,11.4288693 20.8382813,11.453725 20.8539326,11.4793398 C20.8613931,11.4913869 20.8685012,11.5036056 20.8753288,11.5159379 C20.8862061,11.5357061 20.8966234,11.5561086 20.9063462,11.5769009 C20.914321,11.5939015 20.9218036,11.6112044 20.9287745,11.628664 C20.9366843,11.6484208 20.9438775,11.6682023 20.9504533,11.6882636 C20.9552713,11.7031487 20.9599023,11.7185367 20.9641549,11.734007 C20.9701664,11.7555635 20.9753602,11.7772539 20.9798348,11.7992059 C20.9832978,11.8166247 20.9863719,11.834051 20.9889822,11.8515331 C20.9962388,11.8996379 21,11.9493797 21,12 L20.9962979,11.9137692 C20.9978436,11.9317345 20.9989053,11.9497336 20.9994829,11.9677454 L21,12 C21,12.0112225 20.9998151,12.0224019 20.9994483,12.0335352 C20.9988772,12.050591 20.997855,12.0679231 20.996384,12.0852242 C20.994564,12.1070574 20.9920941,12.1281144 20.9889807,12.1489612 C20.9863719,12.165949 20.9832978,12.1833753 20.9797599,12.2007258 C20.9753602,12.2227461 20.9701664,12.2444365 20.964279,12.2658396 C20.9599023,12.2814633 20.9552713,12.2968513 20.9502619,12.3121425 C20.9438775,12.3317977 20.9366843,12.3515792 20.928896,12.3710585 C20.9218036,12.3887956 20.914321,12.4060985 20.9063266,12.4232215 C20.8966234,12.4438914 20.8862061,12.4642939 20.8751242,12.484277 C20.8685012,12.4963944 20.8613931,12.5086131 20.8540045,12.5207088 C20.8382813,12.546275 20.8215099,12.5711307 20.8036865,12.5951593 C20.774687,12.6343256 20.7425008,12.6717127 20.7071068,12.7071068 L20.787214,12.6167501 C20.7849289,12.6196628 20.7826279,12.6225624 20.7803112,12.625449 L20.7071068,12.7071068 L14.7071068,18.7071068 C14.3165825,19.0976311 13.6834175,19.0976311 13.2928932,18.7071068 C12.9023689,18.3165825 12.9023689,17.6834175 13.2928932,17.2928932 L17.585,13 L4,13 C3.48716416,13 3.06449284,12.6139598 3.00672773,12.1166211 L3,12 C3,11.4477153 3.44771525,11 4,11 L17.585,11 L13.2928932,6.70710678 C12.9324093,6.34662282 12.9046797,5.77939176 13.2097046,5.38710056 Z",fill:"currentColor",fillRule:"nonzero",id:"Combined-Shape",style:`
|
|
1283
1283
|
/* transform: rotate(-45deg); */
|
|
1284
|
-
`})})]})}var wI=gA1;var mA1="my-1 flex items-center leading-[1.1] underline text-base items-center justify-left font-semibold gap-1",vA1={primary:{classes:"bg-red text-white disabled:bg-lightgrey hover:bg-darkred hover:border-darkred active:bg-lightred active:border-lightred ",selectedClasses:"bg-darkred border-darkred"},secondary:{classes:"bg-white text-black hover:text-red active:text-lightred",selectedClasses:"text-red"}};function yA1({children:r,className:t,theme:e="secondary",...i}){let o=ye(()=>Fe(`${mA1} ${vA1[e].classes} ${t||""}`),[t,e]);return W("a",{className:o,rel:"noreferrer",target:"_blank",...i,children:[(!i.href?.includes(window.location.hostname)||!i.href?.startsWith("(https?|ftp)"))&&W(wI,{height:"20",width:"20"}),r]})}var ls=ht(yA1);var n$=(r,t,e,i=!0)=>{let o=r.toLocaleTimeString(["de"],{hour:"2-digit",minute:"2-digit"});return`${r.toLocaleDateString(["de"],{day:"2-digit",month:i?"short":"long",year:e?"numeric":void 0})}${t&&o?` ${o}`:""}`.replace(",","")};function _A1({canToggle:r=!1,headerClassName:t,iconClassName:e,publicationClassName:i,reasonClassName:o,situation:n,timeIntervalClassName:l,useShortMonth:A=!0}){let{locale:d,t:L}=L3(),[C,y]=Ft(!r);if(!n)return null;let E={},B={},Z=[],Q=[],V=[];return Q=(n?.publications||[])?.filter(({publicationWindows:J})=>J.find(({endTime:n1,startTime:r1})=>{let m1=new Date,w1=new Date(r1),B1=new Date(n1);return w1<=m1&&m1<=B1}))||[],Z=(n?.affectedTimeIntervals||[]).filter(({endTime:J,startTime:n1})=>{let r1=new Date,m1=new Date(n1),w1=new Date(J);return m1<=r1&&r1<=w1||r1<m1})||[],V=(n?.reasons||[]).map(({name:J})=>J),W(m5,{children:Q?.map(({id:J,publicationLines:n1,publicationStops:r1,textualContentLarge:m1,textualContentMedium:w1,textualContentSmall:B1})=>{E=m1||w1||B1,B=E?.[d()],B?.summary||(B=E?.de);let g1=n1?.flatMap(z1=>z1.lines?.map(({name:s1})=>s1)||[])||[],L1=r1.map(z1=>z1?.name||"");return W("div",{className:Fe("text-base",i),children:[W("div",{className:Fe("text-xs uppercase",o),children:V}),W("h3",{className:Fe("space-x-2 text-xl font-bold text-balance",t),children:[W("span",{className:"line-height-[1.3] inline-block align-middle",children:W(xI,{className:Fe(e)})}),W("span",{className:"*:inline",dangerouslySetInnerHTML:{__html:B?.summary}})]}),W("hr",{className:"my-1"}),Z?.map(({dailyEndTime:z1,dailyStartTime:s1,endTime:x1,startTime:N1},V1)=>{let l2=z1&&s1,p2=x1.includes("2500"),o2=n$(new Date(N1),!1,!0,A),G1=p2?void 0:n$(new Date(x1),!1,!0,A);return W("button",{className:Fe("flex w-full items-center",r&&"cursor-pointer"),onClick:()=>{y(!C)},tabIndex:r?0:-1,children:[W("div",{className:Fe("flex-1 text-left text-sm font-bold text-balance",l),children:[W("span",{children:[o2&&G1?`${o2} - ${G1}`:null,o2&&!G1?L("from",{from:o2}):null]}),l2&&W("span",{children:` (${L("daily_from_to",{from:s1,to:z1})})`})]},N1),r&&V1==0&&W(m5,{children:C?W(Kp,{className:"text-red"}):W(mc,{className:"text-red"})})]},N1)}),W("div",{className:C?"my-4 flex flex-col gap-4":"hidden",children:[W("div",{dangerouslySetInnerHTML:{__html:B?.description||L("no_details_available")}}),!!E?.images?.length&&W("div",{className:"flex flex-wrap gap-2",children:E.images.map(({image:{absoluteUrl:z1,label:s1}})=>W("img",{alt:s1,src:z1,title:s1},z1+s1))}),!!E?.infoLinks?.length&&W("div",{children:E.infoLinks.map(({label:z1,uri:s1})=>{let x1=z1[d()]||z1.de||s1;return W(ls,{href:s1,title:x1,children:x1},s1)})}),!!g1?.length&&W("div",{children:[W("div",{className:"font-bold",children:[L("affected_lines"),":"]}),W("div",{className:"flex flex-wrap gap-1 text-sm",children:g1?.map(z1=>W("div",{className:"bg-red rounded-md px-2 py-1 font-bold text-white",children:z1},z1))})]}),!!L1?.length&&W("div",{children:[W("div",{className:"font-bold",children:[L("affected_stops"),":"]}),W("div",{className:"flex flex-wrap gap-1 text-sm",children:L1.map(z1=>W("div",{className:"bg-red rounded-md px-2 py-1 font-bold text-white",children:z1},z1))})]})]}),r&&W("hr",{className:"my-1"})]},J)})})}var Wp=ht(_A1);function xA1({className:r,feature:t,...e}){let{situation:i}=t.getProperties(),o={};try{o=JSON.parse(i)||{}}catch(n){console.error("Failed to parse publications",n)}return W(eo,{...e,className:Fe("px-4 text-base",r),children:W(Wp,{situation:o})})}var my=xA1;var bI=(r,t)=>t?W("a",{className:"whitespace-normal underline",href:t,rel:"noreferrer",target:"_blank",children:r}):r;function wA1(){let{stopSequence:r}=Ot();return!r.operator&&!r.publisher?null:W(m5,{children:W("div",{className:"m-4 mb-0 flex flex-wrap text-[10px] text-gray-500",children:[r.operator&&bI(r.operator,r.operatorUrl),r.operator&&r.publisher&&W("span",{children:" - "}),r.publisher&&bI(r.publisher,r.publisherUrl),r.license&&W("span",{children:"\xA0("}),r.license&&bI(r.license,r.licenseUrl),r.license&&")"]})})}var MI=ht(wA1);function bA1({...r}){return W("svg",{fill:"none",height:"24",part:"svg",viewBox:"0 0 14 14",width:"24",xmlns:"http://www.w3.org/2000/svg",...r,children:[W("path",{clipRule:"evenodd",d:"M7 0.333344C7.375 0.333344 7.66667 0.62501 7.66667 0.97921V2.35414C9.7292 2.66668 11.3333 4.27081 11.625 6.33334H13C13.375 6.33334 13.6667 6.62501 13.6667 7.00001C13.6667 7.37501 13.375 7.66668 13 7.66668H11.625C11.3333 9.70834 9.70833 11.3333 7.66667 11.625V13C7.66667 13.375 7.375 13.6667 7 13.6667C6.64587 13.6667 6.33333 13.375 6.33333 13V11.625C4.29167 11.3333 2.68747 9.70834 2.39587 7.66668H1C0.625 7.66668 0.333333 7.37501 0.333333 7.00001C0.333333 6.62501 0.625 6.33334 1 6.33334H2.39587C2.68747 4.27081 4.29167 2.66668 6.33333 2.35414V0.97921C6.33333 0.62501 6.64587 0.333344 7 0.333344ZM7 3.66668C5.16667 3.66668 3.66667 5.16668 3.66667 7.00001C3.66667 8.79168 5.08333 10.3125 7 10.3125C8.89587 10.3125 10.3333 8.81254 10.3333 7.00001C10.3333 5.16668 8.83333 3.66668 7 3.66668Z",fill:"currentColor",fillRule:"evenodd"}),W("path",{clipRule:"evenodd",d:"M5.66667 7.00001C5.66667 6.27081 6.2708 5.66668 7 5.66668C7.7292 5.66668 8.33333 6.27081 8.33333 7.00001C8.33333 7.72921 7.7292 8.33334 7 8.33334C6.2708 8.33334 5.66667 7.72921 5.66667 7.00001Z",fill:"currentColor",fillRule:"evenodd",part:"circle"})]})}var BI=bA1;function MA1({stopSequence:r,...t}){let{destination:e}=r||{};return W("span",{...t,children:e})}var SI=ht(MA1);function BA1({stopSequence:r,...t}){let{longName:e,routeIdentifier:i}=r||{},o=e;if(i){let n=i;i.includes(".")?[n]=i.split("."):i.includes("_")?[n]=i.split("_"):i.includes(":")&&([n]=i.split(":")),/^\d*$/.test(n)&&(n=`${parseInt(n,10)}`),e.includes(n)||(o=`${e} (${n})`)}return W("span",{...t,children:o})}var EI=ht(BA1);function SA1({stopSequence:r,...t}){return W("div",{...t,children:[W(SI,{className:"text-base font-bold",stopSequence:r}),W(EI,{className:"text-sm",stopSequence:r})]})}var TI=ht(SA1);function EA1(){let{isFollowing:r,setIsFollowing:t,stopSequence:e}=Ot();return W("div",{className:"flex items-center gap-x-4 bg-slate-100 p-4 py-2",children:[W(ml,{stopSequence:e}),W(TI,{className:"flex grow flex-col",stopSequence:e}),W(U6,{className:`${r?"animate-pulse":""}`,onClick:()=>{t(!r)},selected:r,children:W(BI,{})})]})}var II=ht(EA1);var TA1=()=>ye(()=>{let t=new URLSearchParams(window.location.search).get("debug");return!t||t==="false"?!1:t},[]),vy=TA1;var FI=M9({index:null,invertColor:null,station:null,status:null,stop:null}),IA1=()=>{let r=r7(FI);if(!r)throw new Error("useRouteStop must be used within a ContextProvider");return r},k9=IA1;function FA1(r){let{status:t,stop:e}=k9();return vy()?W("div",{className:"p-4 text-left text-xs",...r,children:[W("div",{children:["State: ",W("b",{children:e.state})," (isPassed: ",`${t.isPassed}`,") (cancelled: ",`${e.cancelled}`,")"]}),W("div",{children:["Arrival time: ",e.arrivalTime," (delay: ",W("b",{children:`${e.arrivalDelay}`}),") (aimed: ",e.aimedArrivalTime,")"]}),W("div",{children:["Departure time: ",e.arrivalTime," (delay:"," ",W("b",{children:`${e.departureDelay}`}),") (aimed: ",e.aimedArrivalTime,")"]}),W("div",{children:Object.entries(t).map(([o,n])=>n===!1?null:W("div",{children:[o,": ",`${n}`]},o))})]}):null}var o$=FA1;var PA1=(r,t=!1)=>{let e=Math.round(r/1e3/60);return e>5?"#dc2626":e>=3?"#ea580c":t?"#16a34a":"transparent"},$p=PA1;var RA1=r=>{let t=r;t<0&&(t=0);let e=Math.floor(t/36e5),i=Math.round(t%36e5/6e4),o="";return e>0&&(o+=`${e}h`),i>0&&(o+=`${i}m`),o||"0"},Xp=RA1;function zA1(r){let{status:t,stop:e}=k9(),{arrivalDelay:i,departureDelay:o}=e,n=t.isNotRealtime||t.isCancelled||t.isNotStop||t.isPassed;return W("div",{...r,children:[n||i===null||t.isFirst?null:W("span",{style:{color:$p(i)},children:`+${Xp(i)}`}),n||o===null||t.isLast?null:W("span",{style:{color:$p(i)},children:`+${Xp(o)}`})]})}var PI=ht(zA1);function DA1({lineColor:r,svgProps:t,...e}){let{stopSequence:i}=Ot(),{invertColor:o,status:n}=k9(),{isBoarding:l,isFirst:A,isLast:d,isLeft:L,isPassed:C,progress:y}=n,E=A?"50%":"-100%",B=d?"50%":"100%",Z=`${y}%`,Q="rgb(156, 163, 175)",V=r||fy(i),G=C?Q:V,J=C?V:Q,n1=Q;o&&(G=C?V:Q,J=C?Q:V,n1=V);let r1=!C&&(L||l)?J:G;return W("div",{...e,children:W("svg",{fill:"none",height:"100%",stroke:G,width:"16",xmlns:"http://www.w3.org/2000/svg",...t,children:[W("circle",{cx:"50%",cy:"50%",r:"5",stroke:"black",strokeWidth:"6"}),W("line",{stroke:"black",strokeWidth:"6",x1:"50%",x2:"50%",y1:E,y2:B}),W("line",{stroke:n1,strokeWidth:"4",x1:"50%",x2:"50%",y1:E,y2:Z}),W("line",{strokeWidth:"4",x1:"50%",x2:"50%",y1:`${y-2}%`,y2:B}),W("circle",{cx:"50%",cy:"50%",r:"5",strokeWidth:"4"}),W("circle",{className:l?"animate-pulse":"",cx:"50%",cy:"50%",r:"5",stroke:r1,strokeWidth:"4"}),W("circle",{cx:"50%",cy:"50%",fill:"white",r:"3",stroke:"black",strokeWidth:"1"})]})})}var RI=ht(DA1);function kA1({...r}){let{stop:t}=k9(),{stopSequence:e}=Ot(),{type:i}=e,{t:o}=L3(),{platform:n}=t||{};if(!n)return null;let l=o(`platform_${i||"rail"}`);return W("span",{...r,children:[l||o("platform_rail")," ",n]})}var zI=ht(kA1);function OA1({children:r,...t}){let{stop:e}=k9(),{stationName:i}=e||{};return W("div",{...t,children:[i,W("br",{}),W(zI,{className:"rounded-sm bg-slate-100 px-0.5 py-px text-xs group-hover:bg-slate-50"}),r]})}var DI=ht(OA1);function ZA1({...r}){return W("svg",{fill:"currentColor",height:"24",version:"1.1",viewBox:"0 0 14 14",width:"24",xmlns:"http://www.w3.org/2000/svg",...r,children:W("path",{d:"m 14,8 0,1 -6,-1 0,3 2,2 0,1 L 7,13 4,14 4,13 6,11 6,8 0,9 0,8 6,5 6,2 C 6,1 6.22222,0 7,0 7.77777,0 8,1 8,2 l 0,3 z"})})}var kI=ZA1;function NA1({...r}){return W("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 -3.84 122.88 122.88",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:W("path",{d:"M29.03,100.46l20.79-25.21l9.51,12.13L41,110.69C33.98,119.61,20.99,110.21,29.03,100.46L29.03,100.46z M53.31,43.05 c1.98-6.46,1.07-11.98-6.37-20.18L28.76,1c-2.58-3.03-8.66,1.42-6.12,5.09L37.18,24c2.75,3.34-2.36,7.76-5.2,4.32L16.94,9.8 c-2.8-3.21-8.59,1.03-5.66,4.7c4.24,5.1,10.8,13.43,15.04,18.53c2.94,2.99-1.53,7.42-4.43,3.69L6.96,18.32 c-2.19-2.38-5.77-0.9-6.72,1.88c-1.02,2.97,1.49,5.14,3.2,7.34L20.1,49.06c5.17,5.99,10.95,9.54,17.67,7.53 c1.03-0.31,2.29-0.94,3.64-1.77l44.76,57.78c2.41,3.11,7.06,3.44,10.08,0.93l0.69-0.57c3.4-2.83,3.95-8,1.04-11.34L50.58,47.16 C51.96,45.62,52.97,44.16,53.31,43.05L53.31,43.05z M65.98,55.65l7.37-8.94C63.87,23.21,99-8.11,116.03,6.29 C136.72,23.8,105.97,66,84.36,55.57l-8.73,11.09L65.98,55.65L65.98,55.65z"})})}var OI=NA1;function UA1({...r}){return W("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 0 512 512",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:[W("g",{children:W("g",{children:W("path",{d:`M256,0c-9.217,0-16.696,7.473-16.696,16.696v478.609c0,9.223,7.479,16.696,16.696,16.696
|
|
1284
|
+
`})})]})}var wI=gA1;var mA1="my-1 flex items-center leading-[1.1] underline text-base items-center justify-left font-semibold gap-1",vA1={primary:{classes:"bg-red text-white disabled:bg-lightgrey hover:bg-darkred hover:border-darkred active:bg-lightred active:border-lightred ",selectedClasses:"bg-darkred border-darkred"},secondary:{classes:"bg-white text-black hover:text-red active:text-lightred",selectedClasses:"text-red"}};function yA1({children:r,className:t,theme:e="secondary",...i}){let o=ye(()=>Fe(`${mA1} ${vA1[e].classes} ${t||""}`),[t,e]);return W("a",{className:o,rel:"noreferrer",target:"_blank",...i,children:[(!i.href?.includes(window.location.hostname)||!i.href?.startsWith("(https?|ftp)"))&&W(wI,{height:"20",width:"20"}),r]})}var ls=ht(yA1);var n$=(r,t,e,i=!0)=>{let o=r.toLocaleTimeString(["de"],{hour:"2-digit",minute:"2-digit"});return`${r.toLocaleDateString(["de"],{day:"2-digit",month:i?"short":"long",year:e?"numeric":void 0})}${t&&o?` ${o}`:""}`.replace(",","")};function _A1({canToggle:r=!1,headerClassName:t,iconClassName:e,publicationClassName:i,reasonClassName:o,situation:n,timeIntervalClassName:l,useShortMonth:A=!0}){let{locale:d,t:L}=L3(),[C,y]=Ft(!r);if(!n)return null;let E={},B={},Z=[],Q=[],V=[];return Q=(n?.publications||[])?.filter(({publicationWindows:J})=>J.find(({endTime:n1,startTime:r1})=>{let m1=new Date,w1=new Date(r1),B1=new Date(n1);return w1<=m1&&m1<=B1}))||[],Z=(n?.affectedTimeIntervals||[]).filter(({endTime:J,startTime:n1})=>{let r1=new Date,m1=new Date(n1),w1=new Date(J);return m1<=r1&&r1<=w1||r1<m1})||[],V=(n?.reasons||[]).map(({name:J})=>J),W(m5,{children:Q?.map(({id:J,publicationLines:n1,publicationStops:r1,textualContentLarge:m1,textualContentMedium:w1,textualContentSmall:B1})=>{E=m1||w1||B1,B=E?.[d()],B?.summary||(B=E?.de);let g1=n1?.flatMap(z1=>z1.lines?.map(({name:s1})=>s1)||[])||[],L1=r1.map(z1=>z1?.name||"");return W("div",{className:Fe("text-base",i),children:[W("div",{className:Fe("text-xs uppercase",o),children:V}),W("h3",{className:Fe("space-x-2 text-xl font-bold text-balance",t),children:[W("span",{className:"line-height-[1.3] inline-block align-middle",children:W(xI,{className:Fe(e)})}),W("span",{className:"*:inline",dangerouslySetInnerHTML:{__html:B?.summary}})]}),W("hr",{className:"my-1"}),Z?.map(({dailyEndTime:z1,dailyStartTime:s1,endTime:x1,startTime:N1},V1)=>{let l2=z1&&s1,p2=x1.includes("2500"),o2=n$(new Date(N1),!1,!0,A),G1=p2?void 0:n$(new Date(x1),!1,!0,A);return W("button",{className:Fe("flex w-full items-center",r&&"cursor-pointer"),onClick:()=>{y(!C)},tabIndex:r?0:-1,children:[W("div",{className:Fe("flex-1 text-left text-sm font-bold text-balance",l),children:[W("span",{children:[o2&&G1?`${o2} - ${G1}`:null,o2&&!G1?L("from",{from:o2}):null]}),l2&&W("span",{children:` (${L("daily_from_to",{from:s1,to:z1})})`})]},N1),r&&V1==0&&W(m5,{children:C?W(Kp,{className:"text-red"}):W(mc,{className:"text-red"})})]},N1)}),W("div",{className:C?"my-4 flex flex-col gap-4":"hidden",children:[W("div",{dangerouslySetInnerHTML:{__html:B?.description||L("no_details_available")}}),!!E?.images?.length&&W("div",{className:"flex flex-wrap gap-2",children:E.images.map(({image:{absoluteUrl:z1,label:s1}})=>W("img",{alt:s1,className:"h-fit",src:z1,title:s1},z1+s1))}),!!E?.infoLinks?.length&&W("div",{children:E.infoLinks.map(({label:z1,uri:s1})=>{let x1=z1[d()]||z1.de||s1;return W(ls,{href:s1,title:x1,children:x1},s1)})}),!!g1?.length&&W("div",{children:[W("div",{className:"font-bold",children:[L("affected_lines"),":"]}),W("div",{className:"flex flex-wrap gap-1 text-sm",children:g1?.map(z1=>W("div",{className:"bg-red rounded-md px-2 py-1 font-bold text-white",children:z1},z1))})]}),!!L1?.length&&W("div",{children:[W("div",{className:"font-bold",children:[L("affected_stops"),":"]}),W("div",{className:"flex flex-wrap gap-1 text-sm",children:L1.map(z1=>W("div",{className:"bg-red rounded-md px-2 py-1 font-bold text-white",children:z1},z1))})]})]}),r&&W("hr",{className:"my-1"})]},J)})})}var Wp=ht(_A1);function xA1({className:r,feature:t,...e}){let{situation:i}=t.getProperties(),o={};try{o=JSON.parse(i)||{}}catch(n){console.error("Failed to parse publications",n)}return W(eo,{...e,className:Fe("px-4 text-base",r),children:W(Wp,{situation:o})})}var my=xA1;var bI=(r,t)=>t?W("a",{className:"whitespace-normal underline",href:t,rel:"noreferrer",target:"_blank",children:r}):r;function wA1(){let{stopSequence:r}=Ot();return!r.operator&&!r.publisher?null:W(m5,{children:W("div",{className:"m-4 mb-0 flex flex-wrap text-[10px] text-gray-500",children:[r.operator&&bI(r.operator,r.operatorUrl),r.operator&&r.publisher&&W("span",{children:" - "}),r.publisher&&bI(r.publisher,r.publisherUrl),r.license&&W("span",{children:"\xA0("}),r.license&&bI(r.license,r.licenseUrl),r.license&&")"]})})}var MI=ht(wA1);function bA1({...r}){return W("svg",{fill:"none",height:"24",part:"svg",viewBox:"0 0 14 14",width:"24",xmlns:"http://www.w3.org/2000/svg",...r,children:[W("path",{clipRule:"evenodd",d:"M7 0.333344C7.375 0.333344 7.66667 0.62501 7.66667 0.97921V2.35414C9.7292 2.66668 11.3333 4.27081 11.625 6.33334H13C13.375 6.33334 13.6667 6.62501 13.6667 7.00001C13.6667 7.37501 13.375 7.66668 13 7.66668H11.625C11.3333 9.70834 9.70833 11.3333 7.66667 11.625V13C7.66667 13.375 7.375 13.6667 7 13.6667C6.64587 13.6667 6.33333 13.375 6.33333 13V11.625C4.29167 11.3333 2.68747 9.70834 2.39587 7.66668H1C0.625 7.66668 0.333333 7.37501 0.333333 7.00001C0.333333 6.62501 0.625 6.33334 1 6.33334H2.39587C2.68747 4.27081 4.29167 2.66668 6.33333 2.35414V0.97921C6.33333 0.62501 6.64587 0.333344 7 0.333344ZM7 3.66668C5.16667 3.66668 3.66667 5.16668 3.66667 7.00001C3.66667 8.79168 5.08333 10.3125 7 10.3125C8.89587 10.3125 10.3333 8.81254 10.3333 7.00001C10.3333 5.16668 8.83333 3.66668 7 3.66668Z",fill:"currentColor",fillRule:"evenodd"}),W("path",{clipRule:"evenodd",d:"M5.66667 7.00001C5.66667 6.27081 6.2708 5.66668 7 5.66668C7.7292 5.66668 8.33333 6.27081 8.33333 7.00001C8.33333 7.72921 7.7292 8.33334 7 8.33334C6.2708 8.33334 5.66667 7.72921 5.66667 7.00001Z",fill:"currentColor",fillRule:"evenodd",part:"circle"})]})}var BI=bA1;function MA1({stopSequence:r,...t}){let{destination:e}=r||{};return W("span",{...t,children:e})}var SI=ht(MA1);function BA1({stopSequence:r,...t}){let{longName:e,routeIdentifier:i}=r||{},o=e;if(i){let n=i;i.includes(".")?[n]=i.split("."):i.includes("_")?[n]=i.split("_"):i.includes(":")&&([n]=i.split(":")),/^\d*$/.test(n)&&(n=`${parseInt(n,10)}`),e.includes(n)||(o=`${e} (${n})`)}return W("span",{...t,children:o})}var EI=ht(BA1);function SA1({stopSequence:r,...t}){return W("div",{...t,children:[W(SI,{className:"text-base font-bold",stopSequence:r}),W(EI,{className:"text-sm",stopSequence:r})]})}var TI=ht(SA1);function EA1(){let{isFollowing:r,setIsFollowing:t,stopSequence:e}=Ot();return W("div",{className:"flex items-center gap-x-4 bg-slate-100 p-4 py-2",children:[W(ml,{stopSequence:e}),W(TI,{className:"flex grow flex-col",stopSequence:e}),W(U6,{className:`${r?"animate-pulse":""}`,onClick:()=>{t(!r)},selected:r,children:W(BI,{})})]})}var II=ht(EA1);var TA1=()=>ye(()=>{let t=new URLSearchParams(window.location.search).get("debug");return!t||t==="false"?!1:t},[]),vy=TA1;var FI=M9({index:null,invertColor:null,station:null,status:null,stop:null}),IA1=()=>{let r=r7(FI);if(!r)throw new Error("useRouteStop must be used within a ContextProvider");return r},k9=IA1;function FA1(r){let{status:t,stop:e}=k9();return vy()?W("div",{className:"p-4 text-left text-xs",...r,children:[W("div",{children:["State: ",W("b",{children:e.state})," (isPassed: ",`${t.isPassed}`,") (cancelled: ",`${e.cancelled}`,")"]}),W("div",{children:["Arrival time: ",e.arrivalTime," (delay: ",W("b",{children:`${e.arrivalDelay}`}),") (aimed: ",e.aimedArrivalTime,")"]}),W("div",{children:["Departure time: ",e.arrivalTime," (delay:"," ",W("b",{children:`${e.departureDelay}`}),") (aimed: ",e.aimedArrivalTime,")"]}),W("div",{children:Object.entries(t).map(([o,n])=>n===!1?null:W("div",{children:[o,": ",`${n}`]},o))})]}):null}var o$=FA1;var PA1=(r,t=!1)=>{let e=Math.round(r/1e3/60);return e>5?"#dc2626":e>=3?"#ea580c":t?"#16a34a":"transparent"},$p=PA1;var RA1=r=>{let t=r;t<0&&(t=0);let e=Math.floor(t/36e5),i=Math.round(t%36e5/6e4),o="";return e>0&&(o+=`${e}h`),i>0&&(o+=`${i}m`),o||"0"},Xp=RA1;function zA1(r){let{status:t,stop:e}=k9(),{arrivalDelay:i,departureDelay:o}=e,n=t.isNotRealtime||t.isCancelled||t.isNotStop||t.isPassed;return W("div",{...r,children:[n||i===null||t.isFirst?null:W("span",{style:{color:$p(i)},children:`+${Xp(i)}`}),n||o===null||t.isLast?null:W("span",{style:{color:$p(i)},children:`+${Xp(o)}`})]})}var PI=ht(zA1);function DA1({lineColor:r,svgProps:t,...e}){let{stopSequence:i}=Ot(),{invertColor:o,status:n}=k9(),{isBoarding:l,isFirst:A,isLast:d,isLeft:L,isPassed:C,progress:y}=n,E=A?"50%":"-100%",B=d?"50%":"100%",Z=`${y}%`,Q="rgb(156, 163, 175)",V=r||fy(i),G=C?Q:V,J=C?V:Q,n1=Q;o&&(G=C?V:Q,J=C?Q:V,n1=V);let r1=!C&&(L||l)?J:G;return W("div",{...e,children:W("svg",{fill:"none",height:"100%",stroke:G,width:"16",xmlns:"http://www.w3.org/2000/svg",...t,children:[W("circle",{cx:"50%",cy:"50%",r:"5",stroke:"black",strokeWidth:"6"}),W("line",{stroke:"black",strokeWidth:"6",x1:"50%",x2:"50%",y1:E,y2:B}),W("line",{stroke:n1,strokeWidth:"4",x1:"50%",x2:"50%",y1:E,y2:Z}),W("line",{strokeWidth:"4",x1:"50%",x2:"50%",y1:`${y-2}%`,y2:B}),W("circle",{cx:"50%",cy:"50%",r:"5",strokeWidth:"4"}),W("circle",{className:l?"animate-pulse":"",cx:"50%",cy:"50%",r:"5",stroke:r1,strokeWidth:"4"}),W("circle",{cx:"50%",cy:"50%",fill:"white",r:"3",stroke:"black",strokeWidth:"1"})]})})}var RI=ht(DA1);function kA1({...r}){let{stop:t}=k9(),{stopSequence:e}=Ot(),{type:i}=e,{t:o}=L3(),{platform:n}=t||{};if(!n)return null;let l=o(`platform_${i||"rail"}`);return W("span",{...r,children:[l||o("platform_rail")," ",n]})}var zI=ht(kA1);function OA1({children:r,...t}){let{stop:e}=k9(),{stationName:i}=e||{};return W("div",{...t,children:[i,W("br",{}),W(zI,{className:"rounded-sm bg-slate-100 px-0.5 py-px text-xs group-hover:bg-slate-50"}),r]})}var DI=ht(OA1);function ZA1({...r}){return W("svg",{fill:"currentColor",height:"24",version:"1.1",viewBox:"0 0 14 14",width:"24",xmlns:"http://www.w3.org/2000/svg",...r,children:W("path",{d:"m 14,8 0,1 -6,-1 0,3 2,2 0,1 L 7,13 4,14 4,13 6,11 6,8 0,9 0,8 6,5 6,2 C 6,1 6.22222,0 7,0 7.77777,0 8,1 8,2 l 0,3 z"})})}var kI=ZA1;function NA1({...r}){return W("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 -3.84 122.88 122.88",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:W("path",{d:"M29.03,100.46l20.79-25.21l9.51,12.13L41,110.69C33.98,119.61,20.99,110.21,29.03,100.46L29.03,100.46z M53.31,43.05 c1.98-6.46,1.07-11.98-6.37-20.18L28.76,1c-2.58-3.03-8.66,1.42-6.12,5.09L37.18,24c2.75,3.34-2.36,7.76-5.2,4.32L16.94,9.8 c-2.8-3.21-8.59,1.03-5.66,4.7c4.24,5.1,10.8,13.43,15.04,18.53c2.94,2.99-1.53,7.42-4.43,3.69L6.96,18.32 c-2.19-2.38-5.77-0.9-6.72,1.88c-1.02,2.97,1.49,5.14,3.2,7.34L20.1,49.06c5.17,5.99,10.95,9.54,17.67,7.53 c1.03-0.31,2.29-0.94,3.64-1.77l44.76,57.78c2.41,3.11,7.06,3.44,10.08,0.93l0.69-0.57c3.4-2.83,3.95-8,1.04-11.34L50.58,47.16 C51.96,45.62,52.97,44.16,53.31,43.05L53.31,43.05z M65.98,55.65l7.37-8.94C63.87,23.21,99-8.11,116.03,6.29 C136.72,23.8,105.97,66,84.36,55.57l-8.73,11.09L65.98,55.65L65.98,55.65z"})})}var OI=NA1;function UA1({...r}){return W("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 0 512 512",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:[W("g",{children:W("g",{children:W("path",{d:`M256,0c-9.217,0-16.696,7.473-16.696,16.696v478.609c0,9.223,7.479,16.696,16.696,16.696
|
|
1285
1285
|
c9.217,0,16.696-7.473,16.696-16.696V16.696C272.696,7.473,265.217,0,256,0z`})})}),W("g",{children:W("g",{children:W("path",{d:`M105.739,44.522c-36.826,0-66.783,29.956-66.783,66.783c0,36.826,29.956,66.783,66.783,66.783
|
|
1286
1286
|
s66.783-29.956,66.783-66.783C172.522,74.478,142.565,44.522,105.739,44.522z`})})}),W("g",{children:W("g",{children:W("path",{d:`M406.261,44.522c-36.826,0-66.783,29.956-66.783,66.783c0,36.826,29.956,66.783,66.783,66.783
|
|
1287
1287
|
s66.783-29.956,66.783-66.783C473.043,74.478,443.087,44.522,406.261,44.522z`})})}),W("g",{children:W("g",{children:W("path",{d:`M202.935,218.664c-3.109-4.501-8.239-7.186-13.717-7.186H22.261c-5.478,0-10.608,2.685-13.717,7.185
|
|
@@ -2065,6 +2065,9 @@ where:
|
|
|
2065
2065
|
.h-\\[65px\\] {
|
|
2066
2066
|
height: 65px;
|
|
2067
2067
|
}
|
|
2068
|
+
.h-fit {
|
|
2069
|
+
height: fit-content;
|
|
2070
|
+
}
|
|
2068
2071
|
.h-full {
|
|
2069
2072
|
height: 100%;
|
|
2070
2073
|
}
|
|
@@ -3576,7 +3579,7 @@ html {
|
|
|
3576
3579
|
--tw-drop-shadow: initial;
|
|
3577
3580
|
--tw-duration: initial;
|
|
3578
3581
|
--tw-ease: initial;
|
|
3579
|
-
}`}),W("style",{children:bA}),W("style",{children:ZX}),W(YM.Provider,{value:p5,children:[W(eB,{}),W(tP,{replaceState:r1}),W(aB,{node:t.current,wcAttributes:r}),W(AP,{eventNode:t.current}),W(lP,{}),W(tB,{}),W(JM,{}),J&&W(JF,{}),g1&&W(Wy,{}),x1&&W(wA,{}),E&&W(rB,{}),E&&W(nB,{}),V&&W(YF,{}),W("div",{className:"@container/main relative size-full border font-sans",ref:t,children:W(Ky,{})})]})]})}var lL1=ht(sL1),NX={};Object.entries(us).forEach(([r])=>{NX[r]=us[r].defaultValue||null});function cL1(r){return W(lL1,{...NX,...r})}var UX=ht(cL1);function uL1(r){let[t,e]=Ft(),[i,o]=Ft(),[n,l]=Ft(),[A,d]=Ft(),L=ye(()=>({poisLayer:n,sellingPointsLayer:t,setPoisLayer:l,setSellingPointsLayer:e,setSharedMobilityLayerGroup:d,setTarifZonenLayer:o,sharedMobilityLayerGroup:A,tarifZonenLayer:i}),[n,t,A,i]);return W(zF.Provider,{value:L,children:W(UX,{...r})})}var hL1=ht(uL1),QX={};Object.entries(us).forEach(([r])=>{QX[r]=us[r].defaultValue||null});function AL1(r){return W(hL1,{...QX,...r})}var Xy=ht(AL1);var dL1='<a href="https://developer.geops.io/">geOps API key</a>',HX='<a href="https://geops.com/en/solution/disruption-information">geOps MOCO API</a>',fL1={apikey:{defaultValue:"5cc87b12d7c5370001c1d655820abcc37dfd4d968d7bab5b2a74a935",description:`Your ${dL1}`,public:!1},lang:{defaultValue:"de",description:"The language to use for the notifications.",public:!1},notificationat:{description:"An ISO date string used to display active notification at this date in the notification layer. If not defined the current date will be used.<br/>Ex: 2025-08-01T00:00:00Z .",public:!1},notificationtenant:{defaultValue:"rvf",description:`The ${HX} tenant to get the notification from.`,public:!1},notificationurl:{defaultValue:"https://moco.geops.io/api/v2/",description:`The ${HX} url to use.`,public:!1}},MA=fL1;function pL1({apikey:r,lang:t,notificationtenant:e,notificationurl:i}){let[o,n]=Ft([]);return et(()=>{new xd({apiKey:r||void 0,tenant:e,url:i}).export({contentMedium:!0,
|
|
3582
|
+
}`}),W("style",{children:bA}),W("style",{children:ZX}),W(YM.Provider,{value:p5,children:[W(eB,{}),W(tP,{replaceState:r1}),W(aB,{node:t.current,wcAttributes:r}),W(AP,{eventNode:t.current}),W(lP,{}),W(tB,{}),W(JM,{}),J&&W(JF,{}),g1&&W(Wy,{}),x1&&W(wA,{}),E&&W(rB,{}),E&&W(nB,{}),V&&W(YF,{}),W("div",{className:"@container/main relative size-full border font-sans",ref:t,children:W(Ky,{})})]})]})}var lL1=ht(sL1),NX={};Object.entries(us).forEach(([r])=>{NX[r]=us[r].defaultValue||null});function cL1(r){return W(lL1,{...NX,...r})}var UX=ht(cL1);function uL1(r){let[t,e]=Ft(),[i,o]=Ft(),[n,l]=Ft(),[A,d]=Ft(),L=ye(()=>({poisLayer:n,sellingPointsLayer:t,setPoisLayer:l,setSellingPointsLayer:e,setSharedMobilityLayerGroup:d,setTarifZonenLayer:o,sharedMobilityLayerGroup:A,tarifZonenLayer:i}),[n,t,A,i]);return W(zF.Provider,{value:L,children:W(UX,{...r})})}var hL1=ht(uL1),QX={};Object.entries(us).forEach(([r])=>{QX[r]=us[r].defaultValue||null});function AL1(r){return W(hL1,{...QX,...r})}var Xy=ht(AL1);var dL1='<a href="https://developer.geops.io/">geOps API key</a>',HX='<a href="https://geops.com/en/solution/disruption-information">geOps MOCO API</a>',fL1={apikey:{defaultValue:"5cc87b12d7c5370001c1d655820abcc37dfd4d968d7bab5b2a74a935",description:`Your ${dL1}`,public:!1},lang:{defaultValue:"de",description:"The language to use for the notifications.",public:!1},notificationat:{description:"An ISO date string used to display active notification at this date in the notification layer. If not defined the current date will be used.<br/>Ex: 2025-08-01T00:00:00Z .",public:!1},notificationtenant:{defaultValue:"rvf",description:`The ${HX} tenant to get the notification from.`,public:!1},notificationurl:{defaultValue:"https://moco.geops.io/api/v2/",description:`The ${HX} url to use.`,public:!1}},MA=fL1;function pL1({apikey:r,lang:t,notificationtenant:e,notificationurl:i}){let[o,n]=Ft([]);return et(()=>{let l=new Date;l.setMilliseconds(0),l.setSeconds(0),new xd({apiKey:r||void 0,tenant:e,url:i}).export({contentMedium:!0,includeGeoms:!1,includeLines:!0,includeStops:!0,publicAt:l.toISOString()}).then(A=>{A?.paginatedSituations?.results&&n(A.paginatedSituations.results)}).catch(A=>{console.error(A)})},[r,i,e]),et(()=>{_l.locale(t)},[t]),W(gc.Provider,{value:_l,children:[W("style",{children:bA}),W("div",{className:"flex w-full flex-col gap-6",children:o?.map(l=>W(Wp,{canToggle:!0,headerClassName:"text-rvf-h3 font-semibold",iconClassName:"w-8 h-8 text-red",reasonClassName:"hidden",situation:l,timeIntervalClassName:"pl-1 text-base py-3 font-semibold text-balance",useShortMonth:!1},l.id))})]})}var VX={};Object.entries(MA).forEach(([r])=>{VX[r]=MA[r].defaultValue||null});function LL1(r){return W(pL1,{...VX,...r})}var pP=ht(LL1);var CL1='<a href="https://developer.geops.io/">geOps API key</a>',xl='<a href="https://developer.geops.io/apis/stops">geOps Stops API</a>',gL1={apikey:{description:`Your ${CL1}`,public:!0},bbox:{description:`The extent where to search the stops (minx,miny,maxx,maxy). See the ${xl} documentation.`,public:!0},countrycode:{description:"The country code to filter the results (IT, DE, CH ...)",public:!0},event:{defaultValue:"mwc:stopssearchselect",description:"The event's name to listen to when a stop is selected.",public:!0},field:{description:`Which field to look up, default all of them, Possible values:id, name, coords. See the ${xl} documentation.`,public:!0},limit:{defaultValue:"5",description:`The number of suggestions to show. See the ${xl} documentation.`,public:!0},mots:{description:`Commas separated list of mots used to filter the results (rail, bus, coach, foot, tram, subway, gondola, funicular, ferry, car). See the ${xl} documentation.`,public:!0},onselect:{description:null,public:!1},params:{description:`JSON string with additional parameters to pass to the request to the API. Ex: {"{ 'key': 'value' }"}. See the ${xl} documentation.`,public:!0},prefagencies:{description:`comma seperated list, order chooses which agency will be preferred as
|
|
3580
3583
|
ident_source (for id and code fields). Possible values: sbb, db. See the ${xl} documentation.`,public:!0},reflocation:{description:`Coordinates in WGS84 (in lat,lon order) used to rank stops close to this position higher. See the ${xl} documentation.`,public:!0},url:{defaultValue:"https://api.geops.io/stops/v1/",description:`The URL to the ${xl}.`,public:!0}},BA=gL1;function mL1(r){return W(gc.Provider,{value:_l,children:[W("style",{children:bA}),W(dL,{...r})]})}var GX={};Object.entries(BA).forEach(([r])=>{GX[r]=BA[r].defaultValue||null});function vL1(r){return W(mL1,{...GX,...r})}var LP=ht(vL1);qL(Xy,"geops-mobility",Object.keys(us),{mode:"open",shadow:!0});qL(LP,"geops-mobility-search",Object.keys(BA),{mode:"open",shadow:!0});qL(pP,"geops-mobility-notifications",Object.keys(MA),{mode:"open",shadow:!0});})();
|
|
3581
3584
|
/*! Bundled license information:
|
|
3582
3585
|
|